From f1ca4da6f79730bad6d0ad75db567881c96a5e51 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 26 Feb 2008 20:36:04 +0000 Subject: [PATCH 0001/1062] Initial commit. All spl source written up to this point wrapped in an initial reasonable autoconf style build system. This does not yet build but the configure system does appear to work properly and integrate with the kernel. Hopefully the next commit gets us back to a buildable version we can run the test suite against. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@1 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 5 + Makefile.am | 9 + autogen.sh | 8 + configure.ac | 133 ++++++ include/Makefile.am | 5 + include/linux-callb.h | 45 +++ include/linux-condvar.h | 201 ++++++++++ include/linux-cred.h | 40 ++ include/linux-generic.h | 72 ++++ include/linux-kmem.h | 173 ++++++++ include/linux-kstat.h | 136 +++++++ include/linux-mutex.h | 118 ++++++ include/linux-random.h | 37 ++ include/linux-rwlock.h | 223 +++++++++++ include/linux-taskq.h | 86 ++++ include/linux-thread.h | 48 +++ include/linux-time.h | 64 +++ include/linux-timer.h | 21 + include/linux-types.h | 27 ++ include/spl.h | 4 + include/splat-ctl.h | 211 ++++++++++ include/splat.h | 47 +++ scripts/Makefile.am | 1 + scripts/spl.spec | 28 ++ scripts/spl.spec.in | 28 ++ src/Makefile.am | 1 + src/cmd/Makefile.am | 3 + src/cmd/splat.c | 821 ++++++++++++++++++++++++++++++++++++++ src/spl/Makefile.in | 50 +++ src/spl/linux-kmem.c | 249 ++++++++++++ src/spl/linux-rwlock.c | 41 ++ src/spl/linux-taskq.c | 78 ++++ src/spl/linux-thread.c | 113 ++++++ src/splat/Makefile.in | 57 +++ src/splat/splat-condvar.c | 454 +++++++++++++++++++++ src/splat/splat-ctl.c | 684 +++++++++++++++++++++++++++++++ src/splat/splat-kmem.c | 365 +++++++++++++++++ src/splat/splat-mutex.c | 324 +++++++++++++++ src/splat/splat-random.c | 104 +++++ src/splat/splat-rwlock.c | 764 +++++++++++++++++++++++++++++++++++ src/splat/splat-taskq.c | 238 +++++++++++ src/splat/splat-thread.c | 116 ++++++ src/splat/splat-time.c | 90 +++++ 43 files changed, 6322 insertions(+) create mode 100644 ChangeLog create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 include/Makefile.am create mode 100644 include/linux-callb.h create mode 100644 include/linux-condvar.h create mode 100644 include/linux-cred.h create mode 100644 include/linux-generic.h create mode 100644 include/linux-kmem.h create mode 100644 include/linux-kstat.h create mode 100644 include/linux-mutex.h create mode 100644 include/linux-random.h create mode 100644 include/linux-rwlock.h create mode 100644 include/linux-taskq.h create mode 100644 include/linux-thread.h create mode 100644 include/linux-time.h create mode 100644 include/linux-timer.h create mode 100644 include/linux-types.h create mode 100644 include/spl.h create mode 100644 include/splat-ctl.h create mode 100644 include/splat.h create mode 100644 scripts/Makefile.am create mode 100644 scripts/spl.spec create mode 100644 scripts/spl.spec.in create mode 100644 src/Makefile.am create mode 100644 src/cmd/Makefile.am create mode 100644 src/cmd/splat.c create mode 100644 src/spl/Makefile.in create mode 100644 src/spl/linux-kmem.c create mode 100644 src/spl/linux-rwlock.c create mode 100644 src/spl/linux-taskq.c create mode 100644 src/spl/linux-thread.c create mode 100644 src/splat/Makefile.in create mode 100644 src/splat/splat-condvar.c create mode 100644 src/splat/splat-ctl.c create mode 100644 src/splat/splat-kmem.c create mode 100644 src/splat/splat-mutex.c create mode 100644 src/splat/splat-random.c create mode 100644 src/splat/splat-rwlock.c create mode 100644 src/splat/splat-taskq.c create mode 100644 src/splat/splat-thread.c create mode 100644 src/splat/splat-time.c diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000..b21cdf2fa --- /dev/null +++ b/ChangeLog @@ -0,0 +1,5 @@ +2008-02-26 Brian Behlendorf + + : Initial commit of the solaris porting layer (spl). Included + in addition to the source is an initial autoconf / configure + style build system. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..7abb6ee39 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,9 @@ +AUTOMAKE_OPTIONS = foreign dist-zip + +SUBDIRS = src include scripts +CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub +CONFIG_CLEAN_FILES += depcomp install-sh missing mkinstalldirs +EXTRA_DIST = autogen.sh + +rpms: dist Makefile + rpmbuild -ta $(distdir).tar.gz diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 000000000..340b2c673 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +find . -type d -name .deps | xargs rm -rf +aclocal 2>/dev/null && +autoheader && +automake --add-missing --include-deps # 2>/dev/null && +autoconf + diff --git a/configure.ac b/configure.ac new file mode 100644 index 000000000..52bc4f593 --- /dev/null +++ b/configure.ac @@ -0,0 +1,133 @@ +AC_INIT + +AC_CANONICAL_SYSTEM +AM_INIT_AUTOMAKE(spl, 0.0.1) +AC_CONFIG_HEADERS([config.h]) + +AC_PROG_INSTALL +AC_PROG_CC + +ver=`uname -r` +KERNELCFLAGS= + +kernelsrc= +kernelbuild= +AC_ARG_WITH(kernel, + [ --with-linux=PATH Path to kernel source ], + [kernelsrc="$withval"; kernelbuild="$withval"]) +AC_ARG_WITH(kernel-build, + [ --with-linux-obj=PATH Path to kernel build objects ], + [kernelbuild="$withval"]) + +AC_MSG_CHECKING([kernel source directory]) +if test -z "$kernelsrc"; then + kernelbuild= + sourcelink=/lib/modules/${ver}/source + buildlink=/lib/modules/${ver}/build + + if test -e $sourcelink; then + kernelsrc=`(cd $sourcelink; /bin/pwd)` + fi + if test -e $buildlink; then + kernelbuild=`(cd $buildlink; /bin/pwd)` + fi + if test -z "$kernelsrc"; then + kernelsrc=$kernelbuild + fi + if test -z "$kernelsrc" -o -z "$kernelbuild"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([ + *** Please specify the location of the kernel source + *** with the '--with-kernel=PATH' option]) + fi +fi + +AC_MSG_RESULT([$kernelsrc]) +AC_MSG_CHECKING([kernel build directory]) +AC_MSG_RESULT([$kernelbuild]) + +AC_MSG_CHECKING([kernel source version]) +if test -r $kernelbuild/include/linux/version.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + +elif test -r $kernelbuild/include/linux/utsrelease.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` +fi + +if test -z "$kernsrcver"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([ + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script]) +fi + +AC_MSG_RESULT([$kernsrcver]) +kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver +AC_SUBST(kernelsrc) +AC_SUBST(kmoduledir) + +# +# Each version of the kernel provides a slightly different +# ABI, so figure out what we have to work with and adapt. +# +AC_MSG_CHECKING([if kernel defines kzalloc function]) +if egrep -qw "kzalloc" $kernelsrc/include/linux/slab.h; then + AC_DEFINE(HAVE_KZALLOC, 1, [kzalloc() is defined]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([if inode has i_private field]) +if egrep -qw "i_private" $kernelsrc/include/linux/fs.h; then + AC_DEFINE(HAVE_I_PRIVATE, 1, [inode has i_private field]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([if inode has i_mutex field ]) +if egrep -qw "i_mutex" $kernelsrc/include/linux/fs.h; then + AC_DEFINE(HAVE_I_MUTEX, 1, [inode has i_mutex field]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([if kernel has mutex.h ]) +if test -f $kernelsrc/include/linux/mutex.h; then + AC_DEFINE(HAVE_MUTEX_H, 1, [kernel has mutex.h]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +if test "$kernelbuild" != "$kernelsrc"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" +fi + +AC_SUBST(KERNELMAKE_PARAMS) +AC_SUBST(KERNELCPPFLAGS) +AC_SUBST(KERNELCFLAGS) + +AC_CONFIG_FILES([ Makefile + src/Makefile + src/cmd/Makefile + src/spl/Makefile + src/splat/Makefile + include/Makefile + scripts/Makefile + scripts/spl.spec + ]) + +AC_OUTPUT diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 000000000..42bbb2399 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = spl.h splat.h splat-ctl.h +EXTRA_DIST += linux-condvar.h linux-kmem.h linux-random.h linux-thread.h +EXTRA_DIST += linux-types.h linux-cred.h linux-kstat.h linux-rwlock.h +EXTRA_DIST += linux-time.h linux-callb.h linux-generic.h linux-mutex.h +EXTRA_DIST += linux-taskq.h linux-timer.h diff --git a/include/linux-callb.h b/include/linux-callb.h new file mode 100644 index 000000000..5ddb678b3 --- /dev/null +++ b/include/linux-callb.h @@ -0,0 +1,45 @@ +#ifndef _SYS_LINUX_CALLB_H +#define _SYS_LINUX_CALLB_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define DEBUG_CALLB + +#ifndef DEBUG_CALLB +#define CALLB_CPR_ASSERT(cp) BUG_ON(!(MUTEX_HELD((cp)->cc_lockp))); +#else +#define CALLB_CPR_ASSERT(cp) +#endif + + +typedef struct callb_cpr { + kmutex_t *cc_lockp; +} callb_cpr_t; + +#define CALLB_CPR_INIT(cp, lockp, func, name) { \ + (cp)->cc_lockp = lockp; \ +} + +#define CALLB_CPR_SAFE_BEGIN(cp) { \ + CALLB_CPR_ASSERT(cp); \ +} + +#define CALLB_CPR_SAFE_END(cp, lockp) { \ + CALLB_CPR_ASSERT(cp); \ +} + +#define CALLB_CPR_EXIT(cp) { \ + ASSERT(MUTEX_HELD((cp)->cc_lockp)); \ + mutex_exit((cp)->cc_lockp); \ +} + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_CALLB_H */ + diff --git a/include/linux-condvar.h b/include/linux-condvar.h new file mode 100644 index 000000000..33ad51539 --- /dev/null +++ b/include/linux-condvar.h @@ -0,0 +1,201 @@ +#ifndef _SYS_LINUX_CONDVAR_H +#define _SYS_LINUX_CONDVAR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* The kcondvar_t struct is protected by mutex taken externally before + * calling any of the wait/signal funs, and passed into the wait funs. + */ +#define CV_MAGIC 0x346545f4 +#define CV_POISON 0x95 + +typedef struct { + int cv_magic; + char *cv_name; + wait_queue_head_t cv_event; + atomic_t cv_waiters; + kmutex_t *cv_mutex; /* only for verification purposes */ +} kcondvar_t; + +typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; + +static __inline__ void +cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) +{ + BUG_ON(cvp == NULL); + BUG_ON(type != CV_DEFAULT); + BUG_ON(arg != NULL); + + cvp->cv_magic = CV_MAGIC; + init_waitqueue_head(&cvp->cv_event); + atomic_set(&cvp->cv_waiters, 0); + cvp->cv_mutex = NULL; + cvp->cv_name = NULL; + + if (name) { + cvp->cv_name = kmalloc(strlen(name) + 1, GFP_KERNEL); + if (cvp->cv_name) + strcpy(cvp->cv_name, name); + } +} + +static __inline__ void +cv_destroy(kcondvar_t *cvp) +{ + BUG_ON(cvp == NULL); + BUG_ON(cvp->cv_magic != CV_MAGIC); + BUG_ON(atomic_read(&cvp->cv_waiters) != 0); + BUG_ON(waitqueue_active(&cvp->cv_event)); + + if (cvp->cv_name) + kfree(cvp->cv_name); + + memset(cvp, CV_POISON, sizeof(*cvp)); +} + +static __inline__ void +cv_wait(kcondvar_t *cvp, kmutex_t *mtx) +{ + DEFINE_WAIT(wait); + int flag = 1; + + BUG_ON(cvp == NULL || mtx == NULL); + BUG_ON(cvp->cv_magic != CV_MAGIC); + BUG_ON(!mutex_owned(mtx)); + + if (cvp->cv_mutex == NULL) + cvp->cv_mutex = mtx; + + /* Ensure the same mutex is used by all callers */ + BUG_ON(cvp->cv_mutex != mtx); + + for (;;) { + prepare_to_wait_exclusive(&cvp->cv_event, &wait, + TASK_INTERRUPTIBLE); + /* Must occur after we are added to the list but only once */ + if (flag) { + atomic_inc(&cvp->cv_waiters); + flag = 0; + } + + /* XXX - The correct thing to do here may be to wake up and + * force the caller to handle the signal. Spurious wakeups + * should already be safely handled by the caller. */ + if (signal_pending(current)) + flush_signals(current); + + /* Mutex should be dropped after prepare_to_wait() this + * ensures we're linked in to the waiters list and avoids the + * race where 'cvp->cv_waiters > 0' but the list is empty. */ + mutex_exit(mtx); + schedule(); + mutex_enter(mtx); + + /* XXX - The correct thing to do here may be to wake up and + * force the caller to handle the signal. Spurious wakeups + * should already be safely handled by the caller. */ + if (signal_pending(current)) + continue; + + break; + } + + atomic_dec(&cvp->cv_waiters); + finish_wait(&cvp->cv_event, &wait); +} + +/* 'expire_time' argument is an absolute wall clock time in jiffies. + * Return value is time left (expire_time - now) or -1 if timeout occurred. + */ +static __inline__ clock_t +cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) +{ + DEFINE_WAIT(wait); + clock_t time_left; + int flag = 1; + + BUG_ON(cvp == NULL || mtx == NULL); + BUG_ON(cvp->cv_magic != CV_MAGIC); + BUG_ON(!mutex_owned(mtx)); + + if (cvp->cv_mutex == NULL) + cvp->cv_mutex = mtx; + + /* XXX - Does not handle jiffie wrap properly */ + time_left = expire_time - jiffies; + if (time_left <= 0) + return -1; + + /* Ensure the same mutex is used by all callers */ + BUG_ON(cvp->cv_mutex != mtx); + + for (;;) { + prepare_to_wait_exclusive(&cvp->cv_event, &wait, + TASK_INTERRUPTIBLE); + if (flag) { + atomic_inc(&cvp->cv_waiters); + flag = 0; + } + + /* XXX - The correct thing to do here may be to wake up and + * force the caller to handle the signal. Spurious wakeups + * should already be safely handled by the caller. */ + if (signal_pending(current)) + flush_signals(current); + + /* Mutex should be dropped after prepare_to_wait() this + * ensures we're linked in to the waiters list and avoids the + * race where 'cvp->cv_waiters > 0' but the list is empty. */ + mutex_exit(mtx); + time_left = schedule_timeout(time_left); + mutex_enter(mtx); + + /* XXX - The correct thing to do here may be to wake up and + * force the caller to handle the signal. Spurious wakeups + * should already be safely handled by the caller. */ + if (signal_pending(current)) { + if (time_left > 0) + continue; + + flush_signals(current); + } + + break; + } + + atomic_dec(&cvp->cv_waiters); + finish_wait(&cvp->cv_event, &wait); + + return (time_left > 0 ? time_left : -1); +} + +static __inline__ void +cv_signal(kcondvar_t *cvp) +{ + BUG_ON(cvp == NULL); + BUG_ON(cvp->cv_magic != CV_MAGIC); + + /* All waiters are added with WQ_FLAG_EXCLUSIVE so only one + * waiter will be set runable with each call to wake_up(). + * Additionally wake_up() holds a spin_lock assoicated with + * the wait queue to ensure we don't race waking up processes. */ + if (atomic_read(&cvp->cv_waiters) > 0) + wake_up(&cvp->cv_event); +} + +static __inline__ void +cv_broadcast(kcondvar_t *cvp) +{ + BUG_ON(cvp == NULL); + BUG_ON(cvp->cv_magic != CV_MAGIC); + + /* Wake_up_all() will wake up all waiters even those which + * have the WQ_FLAG_EXCLUSIVE flag set. */ + if (atomic_read(&cvp->cv_waiters) > 0) + wake_up_all(&cvp->cv_event); +} +#endif /* _SYS_LINUX_CONDVAR_H */ diff --git a/include/linux-cred.h b/include/linux-cred.h new file mode 100644 index 000000000..5f308bace --- /dev/null +++ b/include/linux-cred.h @@ -0,0 +1,40 @@ +#ifndef _SYS_LINUX_CRED_H +#define _SYS_LINUX_CRED_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* XXX - Portions commented out because we really just want to have the type + * defined and the contents aren't nearly so important at the moment. */ +typedef struct cred { + uint_t cr_ref; /* reference count */ + uid_t cr_uid; /* effective user id */ + gid_t cr_gid; /* effective group id */ + uid_t cr_ruid; /* real user id */ + gid_t cr_rgid; /* real group id */ + uid_t cr_suid; /* "saved" user id (from exec) */ + gid_t cr_sgid; /* "saved" group id (from exec) */ + uint_t cr_ngroups; /* number of groups returned by */ + /* crgroups() */ +#if 0 + cred_priv_t cr_priv; /* privileges */ + projid_t cr_projid; /* project */ + struct zone *cr_zone; /* pointer to per-zone structure */ + struct ts_label_s *cr_label; /* pointer to the effective label */ + credsid_t *cr_ksid; /* pointer to SIDs */ +#endif + gid_t cr_groups[1]; /* cr_groups size not fixed */ + /* audit info is defined dynamically */ + /* and valid only when audit enabled */ + /* auditinfo_addr_t cr_auinfo; audit info */ +} cred_t; + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_CRED_H */ + diff --git a/include/linux-generic.h b/include/linux-generic.h new file mode 100644 index 000000000..5c4f9146a --- /dev/null +++ b/include/linux-generic.h @@ -0,0 +1,72 @@ +#ifndef _SYS_LINUX_GENERIC_H +#define _SYS_LINUX_GENERIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Missing defines. + */ +#define INT32_MAX INT_MAX +#define UINT64_MAX (~0ULL) +#define NBBY 8 +#define ENOTSUP ENOTSUPP +#define MAXNAMELEN 256 +#define MAXPATHLEN PATH_MAX +#define __va_list va_list +#define _KERNEL 1 +#define max_ncpus 64 + +/* 0..MAX_PRIO-1: Process priority + * 0..MAX_RT_PRIO-1: RT priority tasks + * MAX_RT_PRIO..MAX_PRIO-1: SCHED_NORMAL tasks + * + * Treat shim tasks as SCHED_NORMAL tasks + */ +#define minclsyspri (MAX_RT_PRIO) +#define maxclsyspri (MAX_PRIO-1) + +#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) +#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) + +#define kred NULL + +#define FREAD 1 +#define FWRITE 2 +#define FCREAT O_CREAT +#define FTRUNC O_TRUNC +#define FOFFMAX O_LARGEFILE +#define FSYNC O_SYNC +#define FDSYNC O_DSYNC +#define FRSYNC O_RSYNC +#define FEXCL O_EXCL + +#define FNODSYNC 0x10000 /* fsync pseudo flag */ +#define FNOFOLLOW 0x20000 /* don't follow symlinks */ + +/* Missing macros + */ +#define PAGESIZE PAGE_SIZE + +/* from Solaris sys/byteorder.h */ +#define BSWAP_8(x) ((x) & 0xff) +#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) +#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) +#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) + +/* Map some simple functions. + */ +#define bzero(ptr,size) memset(ptr,0,size) +#define bcopy(src,dest,size) memcpy(dest,src,size) +#define ASSERT(x) BUG_ON(!(x)) +#define ASSERT3U(left,OP,right) BUG_ON(!((left) OP (right))) + +/* Missing globals + */ +static int p0 = 0; + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_GENERIC_H */ diff --git a/include/linux-kmem.h b/include/linux-kmem.h new file mode 100644 index 000000000..c68344cf3 --- /dev/null +++ b/include/linux-kmem.h @@ -0,0 +1,173 @@ +#ifndef _SYS_LINUX_KMEM_H +#define _SYS_LINUX_KMEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +#undef DEBUG_KMEM +#undef DEBUG_KMEM_UNIMPLEMENTED + +#include +#include +#include +/* + * Memory allocation interfaces + */ +#define KM_SLEEP GFP_KERNEL +#define KM_NOSLEEP GFP_ATOMIC +#undef KM_PANIC /* No linux analog */ +#define KM_PUSHPAGE (GFP_KERNEL | GFP_HIGH) +#define KM_VMFLAGS GFP_LEVEL_MASK +#define KM_FLAGS __GFP_BITS_MASK + +#ifdef DEBUG_KMEM +/* Shim layer memory accounting */ +extern atomic_t kmem_alloc_used; +extern unsigned int kmem_alloc_max; +#endif + +#ifdef DEBUG_KMEM +#define __kmem_alloc(size, flags, allocator) \ +({ void *_ptr_; \ + \ + /* Marked unlikely because we should never be doing this */ \ + if (unlikely((size) > (PAGE_SIZE * 2))) \ + printk("Warning: kmem_alloc(%d, 0x%x) large alloc at %s:%d " \ + "(%d/%d)\n", (int)(size), (int)(flags), \ + __FILE__, __LINE__, \ + atomic_read(&kmem_alloc_used), kmem_alloc_max); \ + \ + _ptr_ = (void *)allocator((size), (flags)); \ + if (_ptr_ == NULL) { \ + printk("Warning: kmem_alloc(%d, 0x%x) failed at %s:%d " \ + "(%d/%d)\n", (int)(size), (int)(flags), \ + __FILE__, __LINE__, \ + atomic_read(&kmem_alloc_used), kmem_alloc_max); \ + atomic_add((size), &kmem_alloc_used); \ + if (unlikely(atomic_read(&kmem_alloc_used) > kmem_alloc_max)) \ + kmem_alloc_max = atomic_read(&kmem_alloc_used); \ + } \ + \ + _ptr_; \ +}) + +#define kmem_alloc(size, flags) __kmem_alloc(size, flags, kmalloc) +#define kmem_zalloc(size, flags) __kmem_alloc(size, flags, kzalloc) + +#define kmem_free(ptr, size) \ +({ \ + BUG_ON(!ptr); \ + atomic_sub((size), &kmem_alloc_used); \ + memset(ptr, 0x5a, (size)); /* Poison */ \ + kfree(ptr); \ + (ptr) = (void *)0xdeadbeef; \ +}) + + +#else + +#define kmem_alloc(size, flags) kmalloc(size, flags) +#define kmem_zalloc(size, flags) kzalloc(size, flags) +#define kmem_free(ptr, size) kfree(ptr) + +#endif /* DEBUG_KMEM */ + + +#ifdef DEBUG_KMEM_UNIMPLEMENTED +static __inline__ void * +kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) +{ +#error "kmem_alloc_tryhard() not implemented" +} +#endif /* DEBUG_KMEM_UNIMPLEMENTED */ + +/* + * Slab allocation interfaces + */ +#undef KMC_NOTOUCH /* No linux analog */ +#define KMC_NODEBUG 0x00000000 /* Default beahvior */ +#define KMC_NOMAGAZINE /* No linux analog */ +#define KMC_NOHASH /* No linux analog */ +#define KMC_QCACHE /* No linux analog */ + +#define KMC_REAP_CHUNK 256 +#define KMC_DEFAULT_SEEKS DEFAULT_SEEKS + +/* Defined by linux slab.h + * typedef struct kmem_cache_s kmem_cache_t; + */ + +/* No linux analog + * extern int kmem_ready; + * extern pgcnt_t kmem_reapahead; + */ + +#ifdef DEBUG_KMEM_UNIMPLEMENTED +static __inline__ void kmem_init(void) { +#error "kmem_init() not implemented" +} + +static __inline__ void kmem_thread_init(void) { +#error "kmem_thread_init() not implemented" +} + +static __inline__ void kmem_mp_init(void) { +#error "kmem_mp_init() not implemented" +} + +static __inline__ void kmem_reap_idspace(void) { +#error "kmem_reap_idspace() not implemented" +} + +static __inline__ size_t kmem_avail(void) { +#error "kmem_avail() not implemented" +} + +static __inline__ size_t kmem_maxavail(void) { +#error "kmem_maxavail() not implemented" +} + +static __inline__ uint64_t kmem_cache_stat(kmem_cache_t *cache) { +#error "kmem_cache_stat() not implemented" +} +#endif /* DEBUG_KMEM_UNIMPLEMENTED */ + +/* XXX - Used by arc.c to adjust its memory footprint. We may want + * to use this hook in the future to adjust behavior based on + * debug levels. For now it's safe to always return 0. + */ +static __inline__ int +kmem_debugging(void) +{ + return 0; +} + +typedef int (*kmem_constructor_t)(void *, void *, int); +typedef void (*kmem_destructor_t)(void *, void *); +typedef void (*kmem_reclaim_t)(void *); + +kmem_cache_t * +__kmem_cache_create(char *name, size_t size, size_t align, + int (*constructor)(void *, void *, int), + void (*destructor)(void *, void *), + void (*reclaim)(void *), + void *priv, void *vmp, int flags); + +void +__kmem_cache_destroy(kmem_cache_t *cache); + +#define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ + __kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) +#define kmem_cache_destroy(cache) __kmem_cache_destroy(cache) +#define kmem_cache_alloc(cache, flags) kmem_cache_alloc(cache, flags) +#define kmem_cache_free(cache, ptr) kmem_cache_free(cache, ptr) +#define kmem_cache_reap_now(cache) kmem_cache_shrink(cache) +#define kmem_reap() __kmem_reap() + + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_KMEM_H */ diff --git a/include/linux-kstat.h b/include/linux-kstat.h new file mode 100644 index 000000000..738dbc867 --- /dev/null +++ b/include/linux-kstat.h @@ -0,0 +1,136 @@ +#ifndef _SYS_LINUX_KSTAT_H +#define _SYS_LINUX_KSTAT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* XXX - The minimum functionality here is stubbed out but nothing works. */ + +#define KSTAT_STRLEN 31 /* 30 chars + NULL; must be 16 * n - 1 */ + +#define KSTAT_TYPE_RAW 0 /* can be anything */ + /* ks_ndata >= 1 */ +#define KSTAT_TYPE_NAMED 1 /* name/value pair */ + /* ks_ndata >= 1 */ +#define KSTAT_TYPE_INTR 2 /* interrupt statistics */ + /* ks_ndata == 1 */ +#define KSTAT_TYPE_IO 3 /* I/O statistics */ + /* ks_ndata == 1 */ +#define KSTAT_TYPE_TIMER 4 /* event timer */ + /* ks_ndata >= 1 */ + +#define KSTAT_NUM_TYPES 5 + + +#define KSTAT_DATA_CHAR 0 +#define KSTAT_DATA_INT32 1 +#define KSTAT_DATA_UINT32 2 +#define KSTAT_DATA_INT64 3 +#define KSTAT_DATA_UINT64 4 + + +#define KSTAT_FLAG_VIRTUAL 0x01 +#define KSTAT_FLAG_VAR_SIZE 0x02 +#define KSTAT_FLAG_WRITABLE 0x04 +#define KSTAT_FLAG_PERSISTENT 0x08 +#define KSTAT_FLAG_DORMANT 0x10 +#define KSTAT_FLAG_INVALID 0x2 + + +typedef int kid_t; /* unique kstat id */ + +typedef struct kstat_s { + /* + * Fields relevant to both kernel and user + */ + hrtime_t ks_crtime; /* creation time (from gethrtime()) */ + struct kstat_s *ks_next; /* kstat chain linkage */ + kid_t ks_kid; /* unique kstat ID */ + char ks_module[KSTAT_STRLEN]; /* provider module name */ + uchar_t ks_resv; /* reserved, currently just padding */ + int ks_instance; /* provider module's instance */ + char ks_name[KSTAT_STRLEN]; /* kstat name */ + uchar_t ks_type; /* kstat data type */ + char ks_class[KSTAT_STRLEN]; /* kstat class */ + uchar_t ks_flags; /* kstat flags */ + void *ks_data; /* kstat type-specific data */ + uint_t ks_ndata; /* # of type-specific data records */ + size_t ks_data_size; /* total size of kstat data section */ + hrtime_t ks_snaptime; /* time of last data shapshot */ + /* + * Fields relevant to kernel only + */ + int (*ks_update)(struct kstat *, int); /* dynamic update */ + void *ks_private; /* arbitrary provider-private data */ + int (*ks_snapshot)(struct kstat *, void *, int); + void *ks_lock; /* protects this kstat's data */ +} kstat_t; + +typedef struct kstat_named_s { + char name[KSTAT_STRLEN]; /* name of counter */ + uchar_t data_type; /* data type */ + union { + char c[16]; /* enough for 128-bit ints */ + int32_t i32; + uint32_t ui32; + struct { + union { + char *ptr; /* NULL-term string */ + char __pad[8]; /* 64-bit padding */ + } addr; + uint32_t len; /* # bytes for strlen + '\0' */ + } str; +/* + * The int64_t and uint64_t types are not valid for a maximally conformant + * 32-bit compilation environment (cc -Xc) using compilers prior to the + * introduction of C99 conforming compiler (reference ISO/IEC 9899:1990). + * In these cases, the visibility of i64 and ui64 is only permitted for + * 64-bit compilation environments or 32-bit non-maximally conformant + * C89 or C90 ANSI C compilation environments (cc -Xt and cc -Xa). In the + * C99 ANSI C compilation environment, the long long type is supported. + * The _INT64_TYPE is defined by the implementation (see sys/int_types.h). + */ + int64_t i64; + uint64_t ui64; + long l; + ulong_t ul; + + /* These structure members are obsolete */ + + longlong_t ll; + u_longlong_t ull; + float f; + double d; + } value; /* value of counter */ +} kstat_named_t; + + +static __inline__ kstat_t * +kstat_create(const char *ks_module, int ks_instance, const char *ks_name, + const char *ks_class, uchar_t ks_type, uint_t ks_ndata, + uchar_t ks_flags) +{ + return NULL; +} + +static __inline__ void +kstat_install(kstat_t *ksp) +{ + return; +} + +static __inline__ void +kstat_delete(kstat_t *ksp) +{ + return; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_KSTAT_H */ + diff --git a/include/linux-mutex.h b/include/linux-mutex.h new file mode 100644 index 000000000..42056617f --- /dev/null +++ b/include/linux-mutex.h @@ -0,0 +1,118 @@ +#ifndef _SYS_LINUX_MUTEX_H +#define _SYS_LINUX_MUTEX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* See the "Big Theory Statement" in solaris mutex.c. + * + * Spin mutexes apparently aren't needed by zfs so we assert + * if ibc is non-zero. + * + * Our impementation of adaptive mutexes aren't really adaptive. + * They go to sleep every time. + */ + +#define MUTEX_DEFAULT 0 +#define MUTEX_HELD(x) (mutex_owned(x)) + +#define KM_MAGIC 0x42424242 +#define KM_POISON 0x84 + +typedef struct { + int km_magic; + char *km_name; + struct task_struct *km_owner; + struct semaphore km_sem; +} kmutex_t; + +#undef mutex_init +static __inline__ void +mutex_init(kmutex_t *mp, char *name, int type, void *ibc) +{ + BUG_ON(ibc != NULL); /* XXX - Spin mutexes not needed? */ + BUG_ON(type != MUTEX_DEFAULT); /* XXX - Only default type supported? */ + + mp->km_magic = KM_MAGIC; + sema_init(&mp->km_sem, 1); + mp->km_owner = NULL; + mp->km_name = NULL; + + if (name) { + mp->km_name = kmalloc(strlen(name) + 1, GFP_KERNEL); + if (mp->km_name) + strcpy(mp->km_name, name); + } +} + +#undef mutex_destroy +static __inline__ void +mutex_destroy(kmutex_t *mp) +{ + BUG_ON(mp->km_magic != KM_MAGIC); + + if (mp->km_name) + kfree(mp->km_name); + + memset(mp, KM_POISON, sizeof(*mp)); +} + +static __inline__ void +mutex_enter(kmutex_t *mp) +{ + BUG_ON(mp->km_magic != KM_MAGIC); + down(&mp->km_sem); /* Will check in_atomic() for us */ + BUG_ON(mp->km_owner != NULL); + mp->km_owner = current; +} + +/* Return 1 if we acquired the mutex, else zero. + */ +static __inline__ int +mutex_tryenter(kmutex_t *mp) +{ + int result; + + BUG_ON(mp->km_magic != KM_MAGIC); + result = down_trylock(&mp->km_sem); /* returns 0 if acquired */ + if (result == 0) { + BUG_ON(mp->km_owner != NULL); + mp->km_owner = current; + return 1; + } + return 0; +} + +static __inline__ void +mutex_exit(kmutex_t *mp) +{ + BUG_ON(mp->km_magic != KM_MAGIC); + BUG_ON(mp->km_owner != current); + mp->km_owner = NULL; + up(&mp->km_sem); +} + +/* Return 1 if mutex is held by current process, else zero. + */ +static __inline__ int +mutex_owned(kmutex_t *mp) +{ + BUG_ON(mp->km_magic != KM_MAGIC); + return (mp->km_owner == current); +} + +/* Return owner if mutex is owned, else NULL. + */ +static __inline__ kthread_t * +mutex_owner(kmutex_t *mp) +{ + BUG_ON(mp->km_magic != KM_MAGIC); + return mp->km_owner; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_MUTEX_H */ diff --git a/include/linux-random.h b/include/linux-random.h new file mode 100644 index 000000000..51233d48f --- /dev/null +++ b/include/linux-random.h @@ -0,0 +1,37 @@ +#ifndef _SYS_LINUX_RANDOM_H +#define _SYS_LINUX_RANDOM_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* FIXME: + * Should add support for blocking in the future to + * ensure that proper entopy is collected. ZFS doesn't + * use it at the moment so this is good enough for now. + * Always will succeed by returning 0. + */ +static __inline__ int +random_get_bytes(uint8_t *ptr, size_t len) +{ + BUG_ON(len < 0); + get_random_bytes((void *)ptr,(int)len); + return 0; +} + + /* Always will succeed by returning 0. */ +static __inline__ int +random_get_pseudo_bytes(uint8_t *ptr, size_t len) +{ + BUG_ON(len < 0); + get_random_bytes((void *)ptr,(int)len); + return 0; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_RANDOM_H */ diff --git a/include/linux-rwlock.h b/include/linux-rwlock.h new file mode 100644 index 000000000..a6a2787d8 --- /dev/null +++ b/include/linux-rwlock.h @@ -0,0 +1,223 @@ +#ifndef _SYS_LINUX_RWLOCK_H +#define _SYS_LINUX_RWLOCK_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + RW_DRIVER = 2, /* driver (DDI) rwlock */ + RW_DEFAULT = 4 /* kernel default rwlock */ +} krw_type_t; + +typedef enum { + RW_WRITER, + RW_READER +} krw_t; + +#define RW_READ_HELD(x) (rw_read_held((x))) +#define RW_WRITE_HELD(x) (rw_write_held((x))) +#define RW_LOCK_HELD(x) (rw_lock_held((x))) +#define RW_ISWRITER(x) (rw_iswriter(x)) + +#define RW_MAGIC 0x3423645a +#define RW_POISON 0xa6 + +typedef struct { + int rw_magic; + char *rw_name; + struct rw_semaphore rw_sem; + struct task_struct *rw_owner; /* holder of the write lock */ +} krwlock_t; + +static __inline__ void +rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg) +{ + BUG_ON(type != RW_DEFAULT); /* XXX no irq handler use */ + BUG_ON(arg != NULL); /* XXX no irq handler use */ + rwlp->rw_magic = RW_MAGIC; + rwlp->rw_owner = NULL; /* no one holds the write lock yet */ + init_rwsem(&rwlp->rw_sem); + rwlp->rw_name = NULL; + + if (name) { + rwlp->rw_name = kmalloc(strlen(name) + 1, GFP_KERNEL); + if (rwlp->rw_name) + strcpy(rwlp->rw_name, name); + } +} + +static __inline__ void +rw_destroy(krwlock_t *rwlp) +{ + BUG_ON(rwlp == NULL); + BUG_ON(rwlp->rw_magic != RW_MAGIC); + BUG_ON(rwlp->rw_owner != NULL); + spin_lock(&rwlp->rw_sem.wait_lock); + BUG_ON(!list_empty(&rwlp->rw_sem.wait_list)); + spin_unlock(&rwlp->rw_sem.wait_lock); + + if (rwlp->rw_name) + kfree(rwlp->rw_name); + + memset(rwlp, RW_POISON, sizeof(krwlock_t)); +} + +/* Return 0 if the lock could not be obtained without blocking. + */ +static __inline__ int +rw_tryenter(krwlock_t *rwlp, krw_t rw) +{ + int result; + + BUG_ON(rwlp->rw_magic != RW_MAGIC); + switch (rw) { + /* these functions return 1 if success, 0 if contention */ + case RW_READER: + /* Here the Solaris code would return 0 + * if there were any write waiters. Specifically + * thinking about the case where readers may have + * the lock and we would also allow this thread + * to grab the read lock with a writer waiting in the + * queue. This doesn't seem like a correctness + * issue, so just call down_read_trylock() + * for the test. We may have to revisit this if + * it becomes an issue */ + result = down_read_trylock(&rwlp->rw_sem); + break; + case RW_WRITER: + result = down_write_trylock(&rwlp->rw_sem); + if (result) { + /* there better not be anyone else + * holding the write lock here */ + BUG_ON(rwlp->rw_owner != NULL); + rwlp->rw_owner = current; + } + break; + } + + return result; +} + +static __inline__ void +rw_enter(krwlock_t *rwlp, krw_t rw) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + switch (rw) { + case RW_READER: + /* Here the Solaris code would block + * if there were any write waiters. Specifically + * thinking about the case where readers may have + * the lock and we would also allow this thread + * to grab the read lock with a writer waiting in the + * queue. This doesn't seem like a correctness + * issue, so just call down_read() + * for the test. We may have to revisit this if + * it becomes an issue */ + down_read(&rwlp->rw_sem); + break; + case RW_WRITER: + down_write(&rwlp->rw_sem); + + /* there better not be anyone else + * holding the write lock here */ + BUG_ON(rwlp->rw_owner != NULL); + rwlp->rw_owner = current; + break; + } +} + +static __inline__ void +rw_exit(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + + /* rw_owner is held by current + * thread iff it is a writer */ + if (rwlp->rw_owner == current) { + rwlp->rw_owner = NULL; + up_write(&rwlp->rw_sem); + } else { + up_read(&rwlp->rw_sem); + } +} + +static __inline__ void +rw_downgrade(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + BUG_ON(rwlp->rw_owner != current); + rwlp->rw_owner = NULL; + downgrade_write(&rwlp->rw_sem); +} + +/* Return 0 if unable to perform the upgrade. + * Might be wise to fix the caller + * to acquire the write lock first? + */ +static __inline__ int +rw_tryupgrade(krwlock_t *rwlp) +{ + int result; + BUG_ON(rwlp->rw_magic != RW_MAGIC); + + spin_lock(&rwlp->rw_sem.wait_lock); + + /* Check if there is anyone waiting for the + * lock. If there is, then we know we should + * not try to upgrade the lock */ + if (!list_empty(&rwlp->rw_sem.wait_list)) { + printk(KERN_WARNING "There are threads waiting\n"); + spin_unlock(&rwlp->rw_sem.wait_lock); + return 0; + } +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + /* Note that activity is protected by + * the wait_lock. Don't try to upgrade + * if there are multiple readers currently + * holding the lock */ + if (rwlp->rw_sem.activity > 1) { +#else + /* Don't try to upgrade + * if there are multiple readers currently + * holding the lock */ + if ((rwlp->rw_sem.count & RWSEM_ACTIVE_MASK) > 1) { +#endif + spin_unlock(&rwlp->rw_sem.wait_lock); + return 0; + } + + /* Here it should be safe to drop the + * read lock and reacquire it for writing since + * we know there are no waiters */ + up_read(&rwlp->rw_sem); + + /* returns 1 if success, 0 if contention */ + result = down_write_trylock(&rwlp->rw_sem); + + /* Check if upgrade failed. Should not ever happen + * if we got to this point */ + BUG_ON(!result); + BUG_ON(rwlp->rw_owner != NULL); + rwlp->rw_owner = current; + spin_unlock(&rwlp->rw_sem.wait_lock); + return 1; +} + +static __inline__ kthread_t * +rw_owner(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + return rwlp->rw_owner; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_RWLOCK_H */ diff --git a/include/linux-taskq.h b/include/linux-taskq.h new file mode 100644 index 000000000..3612f84c0 --- /dev/null +++ b/include/linux-taskq.h @@ -0,0 +1,86 @@ +#ifndef _SYS_LINUX_TASKQ_H +#define _SYS_LINUX_TASKQ_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Task Queues - As of linux 2.6.x task queues have been replaced by a + * similar construct called work queues. The big difference on the linux + * side is that functions called from work queues run in process context + * and not interrupt context. + * + * One nice feature of Solaris which does not exist in linux work + * queues in the notion of a dynamic work queue. Rather than implementing + * this in the shim layer I'm hardcoding one-thread per work queue. + * + * XXX - This may end up being a significant performance penalty which + * forces us to implement dynamic workqueues. Which is all very doable + * with a little effort. + */ +#include +#include +#include +#include +#include + +#undef DEBUG_TASKQ_UNIMPLEMENTED + +#define TASKQ_NAMELEN 31 +#define taskq_t workq_t + +typedef struct workqueue_struct workq_t; +typedef unsigned long taskqid_t; +typedef void (*task_func_t)(void *); + +/* + * Public flags for taskq_create(): bit range 0-15 + */ +#define TASKQ_PREPOPULATE 0x0000 /* XXX - Workqueues fully populate */ +#define TASKQ_CPR_SAFE 0x0000 /* XXX - No analog */ +#define TASKQ_DYNAMIC 0x0000 /* XXX - Worksqueues not dynamic */ + +/* + * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as + * KM_SLEEP/KM_NOSLEEP. + */ +#define TQ_SLEEP 0x00 /* XXX - Workqueues don't support */ +#define TQ_NOSLEEP 0x00 /* these sorts of flags. They */ +#define TQ_NOQUEUE 0x00 /* always run in application */ +#define TQ_NOALLOC 0x00 /* context and can sleep. */ + + +#ifdef DEBUG_TASKQ_UNIMPLEMENTED +static __inline__ void taskq_init(void) { +#error "taskq_init() not implemented" +} + +static __inline__ taskq_t * +taskq_create_instance(const char *, int, int, pri_t, int, int, uint_t) { +#error "taskq_create_instance() not implemented" +} + +extern void nulltask(void *); +extern void taskq_suspend(taskq_t *); +extern int taskq_suspended(taskq_t *); +extern void taskq_resume(taskq_t *); + +#endif /* DEBUG_TASKQ_UNIMPLEMENTED */ + +extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); +extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); + +#define taskq_create(name, thr, pri, min, max, flags) \ + __taskq_create(name, thr, pri, min, max, flags) +#define taskq_dispatch(tq, func, priv, flags) \ + __taskq_dispatch(tq, func, priv, flags) +#define taskq_destory(tq) destroy_workqueue(tq) +#define taskq_wait(tq) flush_workqueue(tq) +#define taskq_member(tq, kthr) 1 /* XXX -Just be true */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_TASKQ_H */ diff --git a/include/linux-thread.h b/include/linux-thread.h new file mode 100644 index 000000000..dc9726322 --- /dev/null +++ b/include/linux-thread.h @@ -0,0 +1,48 @@ +#ifndef _SYS_LINUX_THREAD_H +#define _SYS_LINUX_THREAD_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include + +/* + * Thread interfaces + */ +#define TP_MAGIC 0x53535353 + +#define TS_SLEEP TASK_INTERRUPTIBLE +#define TS_RUN TASK_RUNNING +#define TS_ZOMB EXIT_ZOMBIE +#define TS_STOPPED TASK_STOPPED +#if 0 +#define TS_FREE 0x00 /* No clean linux mapping */ +#define TS_ONPROC 0x04 /* No clean linux mapping */ +#define TS_WAIT 0x20 /* No clean linux mapping */ +#endif + +#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ + __thread_create(stk, stksize, func, arg, len, pp, state, pri) +#define thread_exit() __thread_exit() +#define curthread get_current() + +/* We just need a valid type to pass around, it's unused */ +typedef struct proc_s { + int foo; +} proc_t; + +kthread_t * __thread_create(caddr_t stk, size_t stksize, + void (*proc)(void *), void *args, + size_t len, proc_t *pp, int state, + pri_t pri); + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_THREAD_H */ + diff --git a/include/linux-time.h b/include/linux-time.h new file mode 100644 index 000000000..c1105ab6b --- /dev/null +++ b/include/linux-time.h @@ -0,0 +1,64 @@ +#ifndef _SYS_TIME_H +#define _SYS_TIME_H + +#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.16 */ + +/* + * Structure returned by gettimeofday(2) system call, + * and used in other calls. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +extern unsigned long long monotonic_clock(void); +typedef struct timespec timestruc_t; /* definition per SVr4 */ +typedef longlong_t hrtime_t; + +#define TIME32_MAX INT32_MAX +#define TIME32_MIN INT32_MIN + +#define SEC 1 +#define MILLISEC 1000 +#define MICROSEC 1000000 +#define NANOSEC 1000000000 + +#define hz \ +({ \ + BUG_ON(HZ < 100 || HZ > MICROSEC); \ + HZ; \ +}) + +#define gethrestime(ts) getnstimeofday((ts)) + +static __inline__ hrtime_t +gethrtime(void) { + /* BUG_ON(cur_timer == timer_none); */ + + /* Solaris expects a long long here but monotonic_clock() returns an + * unsigned long long. Note that monotonic_clock() returns the number + * of nanoseconds passed since kernel initialization. Even for a signed + * long long this will not "go negative" for ~292 years. + */ + return monotonic_clock(); +} + +static __inline__ time_t +gethrestime_sec(void) +{ + timestruc_t now; + + gethrestime(&now); + return (now.tv_sec); +} + + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_TIME_H */ diff --git a/include/linux-timer.h b/include/linux-timer.h new file mode 100644 index 000000000..a01579519 --- /dev/null +++ b/include/linux-timer.h @@ -0,0 +1,21 @@ +#ifndef _SYS_LINUX_TIMER_H +#define _SYS_LINUX_TIMER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#define lbolt ((clock_t)jiffies) +#define lbolt64 ((int64_t)get_jiffies_64()) + +#define delay(ticks) schedule_timeout((long timeout)(ticks)) + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_TIMER_H */ + diff --git a/include/linux-types.h b/include/linux-types.h new file mode 100644 index 000000000..d2b12a16b --- /dev/null +++ b/include/linux-types.h @@ -0,0 +1,27 @@ +#ifndef _SYS_LINUX_TYPES_H +#define _SYS_LINUX_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; +typedef unsigned long uintptr_t; +typedef unsigned long intptr_t; +typedef unsigned long ulong_t; +typedef unsigned int uint_t; +typedef unsigned char uchar_t; +typedef unsigned long long u_longlong_t; +typedef unsigned long long u_offset_t; +typedef unsigned long long rlim64_t; +typedef long long longlong_t; +typedef long long offset_t; +typedef struct task_struct kthread_t; +typedef struct vmem { } vmem_t; +typedef short pri_t; + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_LINUX_TYPES_H */ diff --git a/include/spl.h b/include/spl.h new file mode 100644 index 000000000..ba38e8105 --- /dev/null +++ b/include/spl.h @@ -0,0 +1,4 @@ +#ifndef _SYS_SPL_H +#define _SYS_SPL_H + +#endif /* _SYS_SPL_H */ diff --git a/include/splat-ctl.h b/include/splat-ctl.h new file mode 100644 index 000000000..b0e2a69eb --- /dev/null +++ b/include/splat-ctl.h @@ -0,0 +1,211 @@ +#ifndef _SYS_KZT_H +#define _SYS_KZT_H + +#ifdef _KERNEL +#include +#include +#include +#endif /* _KERNEL */ + +#define KZT_VERSION "v1.0" +#define KZT_VERSION_SIZE 64 + +#define KZT_MAJOR 229 /* XXX - Arbitrary */ +#define KZT_MINORS 1 +#define KZT_DEV "/dev/kztctl" + +#define KZT_NAME_SIZE 12 +#define KZT_DESC_SIZE 60 + +typedef struct kzt_user { + char name[KZT_NAME_SIZE]; /* short name */ + char desc[KZT_DESC_SIZE]; /* short description */ + int id; /* unique numeric id */ +} kzt_user_t; + +#define KZT_CFG_MAGIC 0x15263748U +typedef struct kzt_cfg { + unsigned int cfg_magic; /* Unique magic */ + int cfg_cmd; /* Config command */ + int cfg_arg1; /* Config command arg 1 */ + int cfg_rc1; /* Config response 1 */ + union { + struct { + int size; + kzt_user_t descs[0]; + } kzt_subsystems; + struct { + int size; + kzt_user_t descs[0]; + } kzt_tests; + } cfg_data; +} kzt_cfg_t; + +#define KZT_CMD_MAGIC 0x9daebfc0U +typedef struct kzt_cmd { + unsigned int cmd_magic; /* Unique magic */ + int cmd_subsystem; /* Target subsystem */ + int cmd_test; /* Subsystem test */ + int cmd_data_size; /* Extra opaque data */ + char cmd_data_str[0]; /* Opaque data region */ +} kzt_cmd_t; + +/* Valid ioctls */ +#define KZT_CFG _IOWR('f', 101, long) +#define KZT_CMD _IOWR('f', 102, long) + +/* Valid configuration commands */ +#define KZT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ +#define KZT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ +#define KZT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ +#define KZT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ +#define KZT_CFG_TEST_COUNT 0x201 /* Number of tests */ +#define KZT_CFG_TEST_LIST 0x202 /* List of N tests */ + +/* Valid subsystem and test commands defined in each subsystem, we do + * need to be careful to avoid colisions. That alone may argue to define + * them all here, for now we just define the global error codes. + */ +#define KZT_SUBSYSTEM_UNKNOWN 0xF00 +#define KZT_TEST_UNKNOWN 0xFFF + + +#ifdef _KERNEL +#define KZT_SUBSYSTEM_INIT(type) \ +({ kzt_subsystem_t *_sub_; \ + \ + _sub_ = (kzt_subsystem_t *)kzt_##type##_init(); \ + if (_sub_ == NULL) { \ + printk(KERN_ERR "Error initializing: " #type "\n"); \ + } else { \ + spin_lock(&kzt_module_lock); \ + list_add_tail(&(_sub_->subsystem_list), \ + &kzt_module_list); \ + spin_unlock(&kzt_module_lock); \ + } \ +}) + +#define KZT_SUBSYSTEM_FINI(type) \ +({ kzt_subsystem_t *_sub_, *_tmp_; \ + int _id_, _flag_ = 0; \ + \ + _id_ = kzt_##type##_id(); \ + spin_lock(&kzt_module_lock); \ + list_for_each_entry_safe(_sub_, _tmp_, &kzt_module_list, \ + subsystem_list) { \ + if (_sub_->desc.id == _id_) { \ + list_del_init(&(_sub_->subsystem_list)); \ + spin_unlock(&kzt_module_lock); \ + kzt_##type##_fini(_sub_); \ + spin_lock(&kzt_module_lock); \ + _flag_ = 1; \ + } \ + } \ + spin_unlock(&kzt_module_lock); \ + \ + if (!_flag_) \ + printk(KERN_ERR "Error finalizing: " #type "\n"); \ +}) + +#define KZT_TEST_INIT(sub, n, d, tid, func) \ +({ kzt_test_t *_test_; \ + \ + _test_ = (kzt_test_t *)kmalloc(sizeof(*_test_), GFP_KERNEL); \ + if (_test_ == NULL) { \ + printk(KERN_ERR "Error initializing: " n "/" #tid" \n");\ + } else { \ + memset(_test_, 0, sizeof(*_test_)); \ + strncpy(_test_->desc.name, n, KZT_NAME_SIZE); \ + strncpy(_test_->desc.desc, d, KZT_DESC_SIZE); \ + _test_->desc.id = tid; \ + _test_->test = func; \ + INIT_LIST_HEAD(&(_test_->test_list)); \ + spin_lock(&((sub)->test_lock)); \ + list_add_tail(&(_test_->test_list),&((sub)->test_list));\ + spin_unlock(&((sub)->test_lock)); \ + } \ +}) + +#define KZT_TEST_FINI(sub, tid) \ +({ kzt_test_t *_test_, *_tmp_; \ + int _flag_ = 0; \ + \ + spin_lock(&((sub)->test_lock)); \ + list_for_each_entry_safe(_test_, _tmp_, \ + &((sub)->test_list), test_list) { \ + if (_test_->desc.id == tid) { \ + list_del_init(&(_test_->test_list)); \ + _flag_ = 1; \ + } \ + } \ + spin_unlock(&((sub)->test_lock)); \ + \ + if (!_flag_) \ + printk(KERN_ERR "Error finalizing: " #tid "\n"); \ +}) + +typedef int (*kzt_test_func_t)(struct file *, void *); + +typedef struct kzt_test { + struct list_head test_list; + kzt_user_t desc; + kzt_test_func_t test; +} kzt_test_t; + +typedef struct kzt_subsystem { + struct list_head subsystem_list;/* List had to chain entries */ + kzt_user_t desc; + spinlock_t test_lock; + struct list_head test_list; +} kzt_subsystem_t; + +#define KZT_INFO_BUFFER_SIZE 65536 +#define KZT_INFO_BUFFER_REDZONE 256 + +typedef struct kzt_info { + spinlock_t info_lock; + int info_size; + char *info_buffer; + char *info_head; /* Internal kernel use only */ +} kzt_info_t; + +#define sym2str(sym) (char *)(#sym) + +#define kzt_print(file, format, args...) \ +({ kzt_info_t *_info_ = (kzt_info_t *)file->private_data; \ + int _rc_; \ + \ + ASSERT(_info_); \ + ASSERT(_info_->info_buffer); \ + \ + spin_lock(&_info_->info_lock); \ + \ + /* Don't allow the kernel to start a write in the red zone */ \ + if ((int)(_info_->info_head - _info_->info_buffer) > \ + (KZT_INFO_BUFFER_SIZE -KZT_INFO_BUFFER_REDZONE)) { \ + _rc_ = -EOVERFLOW; \ + } else { \ + _rc_ = sprintf(_info_->info_head, format, args); \ + if (_rc_ >= 0) \ + _info_->info_head += _rc_; \ + } \ + \ + spin_unlock(&_info_->info_lock); \ + _rc_; \ +}) + +#define kzt_vprint(file, test, format, args...) \ + kzt_print(file, "%*s: " format, KZT_NAME_SIZE, test, args) + +kzt_subsystem_t * kzt_condvar_init(void); +kzt_subsystem_t * kzt_kmem_init(void); +kzt_subsystem_t * kzt_mutex_init(void); +kzt_subsystem_t * kzt_krng_init(void); +kzt_subsystem_t * kzt_rwlock_init(void); +kzt_subsystem_t * kzt_taskq_init(void); +kzt_subsystem_t * kzt_thread_init(void); +kzt_subsystem_t * kzt_time_init(void); + +#endif /* _KERNEL */ + +#endif /* _SYS_KZT_H */ diff --git a/include/splat.h b/include/splat.h new file mode 100644 index 000000000..69cb387ad --- /dev/null +++ b/include/splat.h @@ -0,0 +1,47 @@ +#ifndef _KZT_H +#define _KZT_H + +#include + +#define DEV_NAME "/dev/kztctl" +#define COLOR_BLACK "\033[0;30m" +#define COLOR_DK_GRAY "\033[1;30m" +#define COLOR_BLUE "\033[0;34m" +#define COLOR_LT_BLUE "\033[1;34m" +#define COLOR_GREEN "\033[0;32m" +#define COLOR_LT_GREEN "\033[1;32m" +#define COLOR_CYAN "\033[0;36m" +#define COLOR_LT_CYAN "\033[1;36m" +#define COLOR_RED "\033[0;31m" +#define COLOR_LT_RED "\033[1;31m" +#define COLOR_PURPLE "\033[0;35m" +#define COLOR_LT_PURPLE "\033[1;35m" +#define COLOR_BROWN "\033[0;33m" +#define COLOR_YELLOW "\033[1;33m" +#define COLOR_LT_GRAY "\033[0;37m" +#define COLOR_WHITE "\033[1;37m" +#define COLOR_RESET "\033[0m" + +typedef struct subsystem { + uu_list_node_t sub_node; /* Linkage for global subsystem list */ + kzt_user_t sub_desc; /* Subsystem description */ + uu_list_t *sub_tests; /* Assocated subsystem tests list */ +} subsystem_t; + +typedef struct test { + uu_list_node_t test_node; /* Linkage for globals test list */ + kzt_user_t test_desc; /* Test description */ + subsystem_t *test_sub; /* Parent subsystem */ +} test_t; + +typedef struct cmd_args { + int args_verbose; /* Verbose flag */ + int args_do_list; /* Display all tests flag */ + int args_do_all; /* Run all tests flag */ + int args_do_color; /* Colorize output */ + int args_exit_on_error; /* Exit on first error flag */ + uu_list_t *args_tests; /* Requested subsystems/tests */ +} cmd_args_t; + +#endif /* _KZT_H */ + diff --git a/scripts/Makefile.am b/scripts/Makefile.am new file mode 100644 index 000000000..1c92f977b --- /dev/null +++ b/scripts/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = spl.spec.in diff --git a/scripts/spl.spec b/scripts/spl.spec new file mode 100644 index 000000000..1ce524865 --- /dev/null +++ b/scripts/spl.spec @@ -0,0 +1,28 @@ +# spl +%define name spl +%define version 0.0.1 + +Summary: Solaris Porting Layer +Name: %{name} +Version: %{version} +Release: 1 +Copyright: GPL +Group: Utilities/System +BuildRoot: /tmp/%{name}-%{version} +Source: %{name}-%{version}.tar.gz + +%description +Abstration layer to provide Solaris style primatives in the linux kernel. + +%prep +%setup -q +./configure + +%build +rm -rf $RPM_BUILD_ROOT +make + +%install +make install "DESTDIR=$RPM_BUILD_ROOT" + +%files diff --git a/scripts/spl.spec.in b/scripts/spl.spec.in new file mode 100644 index 000000000..9d9d4e325 --- /dev/null +++ b/scripts/spl.spec.in @@ -0,0 +1,28 @@ +# spl +%define name @PACKAGE@ +%define version @VERSION@ + +Summary: Solaris Porting Layer +Name: %{name} +Version: %{version} +Release: 1 +Copyright: GPL +Group: Utilities/System +BuildRoot: /tmp/%{name}-%{version} +Source: %{name}-%{version}.tar.gz + +%description +Abstration layer to provide Solaris style primatives in the linux kernel. + +%prep +%setup -q +./configure + +%build +rm -rf $RPM_BUILD_ROOT +make + +%install +make install "DESTDIR=$RPM_BUILD_ROOT" + +%files diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 000000000..86f519112 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = cmd spl splat diff --git a/src/cmd/Makefile.am b/src/cmd/Makefile.am new file mode 100644 index 000000000..2ab0a497c --- /dev/null +++ b/src/cmd/Makefile.am @@ -0,0 +1,3 @@ +AM_CFLAGS = @EXTRA_CFLAGS@ -g -O2 -W -Wall -Wstrict-prototypes -Wshadow +sbin_PROGRAMS = splat +kzt_SOURCES = splat.c diff --git a/src/cmd/splat.c b/src/cmd/splat.c new file mode 100644 index 000000000..0ad65490c --- /dev/null +++ b/src/cmd/splat.c @@ -0,0 +1,821 @@ +/* Kernel ZFS Test (KZT) user space command interface */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "splat.h" + +#undef ioctl + +static const char shortOpts[] = "hvlat:xc"; +static const struct option longOpts[] = { + { "help", no_argument, 0, 'h' }, + { "verbose", no_argument, 0, 'v' }, + { "list", no_argument, 0, 'l' }, + { "all", no_argument, 0, 'a' }, + { "test", required_argument, 0, 't' }, + { "exit", no_argument, 0, 'x' }, + { "nocolor", no_argument, 0, 'c' }, + { 0, 0, 0, 0 } +}; + +static uu_list_t *subsystems; /* Subsystem/tests */ +static uu_list_pool_t *subsystem_pool; /* Subsystem pool */ +static uu_list_pool_t *test_pool; /* Test pool */ +static int kztctl_fd; /* Control file descriptor */ +static char kzt_version[KZT_VERSION_SIZE]; /* Kernel version string */ +static char *kzt_buffer = NULL; /* Scratch space area */ +static int kzt_buffer_size = 0; /* Scratch space size */ + + +static void test_list(uu_list_t *, int); +static int dev_clear(void); + + +static int usage(void) { + fprintf(stderr, "usage: kzt [hvla] [-t >]\n"); + fprintf(stderr, + " --help -h This help\n" + " --verbose -v Increase verbosity\n" + " --list -l List all tests in all subsystems\n" + " --all -a Run all tests in all subsystems\n" + " --test -t Run 'test' in subsystem 'sub'\n" + " --exit -x Exit on first test error\n" + " --nocolor -c Do not colorize output\n"); + fprintf(stderr, "\n" + "Examples:\n" + " kzt -t kmem:all # Runs all kmem tests\n" + " kzt -t taskq:0x201 # Run taskq test 0x201\n"); + + return 0; +} + +static subsystem_t *subsystem_init(kzt_user_t *desc) +{ + subsystem_t *sub; + + sub = (subsystem_t *)malloc(sizeof(*sub)); + if (sub == NULL) + return NULL; + + memcpy(&sub->sub_desc, desc, sizeof(*desc)); + uu_list_node_init(sub, &sub->sub_node, subsystem_pool); + + sub->sub_tests = uu_list_create(test_pool, NULL, 0); + if (sub->sub_tests == NULL) { + free(sub); + return NULL; + } + + return sub; +} + +static void subsystem_fini(subsystem_t *sub) +{ + assert(sub != NULL); + + uu_list_node_fini(sub, &sub->sub_node, subsystem_pool); + free(sub); +} + +static int subsystem_setup(void) +{ + kzt_cfg_t *cfg; + int i, rc, size, cfg_size; + subsystem_t *sub; + kzt_user_t *desc; + + /* Aquire the number of registered subsystems */ + cfg_size = sizeof(*cfg); + cfg = (kzt_cfg_t *)malloc(cfg_size); + if (cfg == NULL) + return -ENOMEM; + + memset(cfg, 0, cfg_size); + cfg->cfg_magic = KZT_CFG_MAGIC; + cfg->cfg_cmd = KZT_CFG_SUBSYSTEM_COUNT; + + rc = ioctl(kztctl_fd, KZT_CFG, cfg); + if (rc) { + fprintf(stderr, "Ioctl() error %lu / %d: %d\n", + (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + free(cfg); + return rc; + } + + size = cfg->cfg_rc1; + free(cfg); + + /* Based on the newly aquired number of subsystems allocate enough + * memory to get the descriptive information for them all. */ + cfg_size = sizeof(*cfg) + size * sizeof(kzt_user_t); + cfg = (kzt_cfg_t *)malloc(cfg_size); + if (cfg == NULL) + return -ENOMEM; + + memset(cfg, 0, cfg_size); + cfg->cfg_magic = KZT_CFG_MAGIC; + cfg->cfg_cmd = KZT_CFG_SUBSYSTEM_LIST; + cfg->cfg_data.kzt_subsystems.size = size; + + rc = ioctl(kztctl_fd, KZT_CFG, cfg); + if (rc) { + fprintf(stderr, "Ioctl() error %lu / %d: %d\n", + (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + free(cfg); + return rc; + } + + /* Add the new subsystems in to the global list */ + size = cfg->cfg_rc1; + for (i = 0; i < size; i++) { + desc = &(cfg->cfg_data.kzt_subsystems.descs[i]); + + sub = subsystem_init(desc); + if (sub == NULL) { + fprintf(stderr, "Error initializing subsystem: %s\n", + desc->name); + free(cfg); + return -ENOMEM; + } + + uu_list_insert(subsystems, sub, 0); + } + + free(cfg); + return 0; +} + +static int subsystem_compare(const void *l_arg, const void *r_arg, void *private) +{ + const subsystem_t *l = l_arg; + const subsystem_t *r = r_arg; + + if (l->sub_desc.id > r->sub_desc.id) + return 1; + + if (l->sub_desc.id < r->sub_desc.id) + return -1; + + return 0; +} + +static void subsystem_list(uu_list_t *list, int indent) +{ + subsystem_t *sub; + + fprintf(stdout, + "------------------------------- " + "Available KZT Tests " + "-------------------------------\n"); + + for (sub = uu_list_first(list); sub != NULL; + sub = uu_list_next(list, sub)) { + fprintf(stdout, "%*s0x%0*x %-*s ---- %s ----\n", + indent, "", + 4, sub->sub_desc.id, + KZT_NAME_SIZE + 7, sub->sub_desc.name, + sub->sub_desc.desc); + test_list(sub->sub_tests, indent + 7); + } +} + +static test_t *test_init(subsystem_t *sub, kzt_user_t *desc) +{ + test_t *test; + + test = (test_t *)malloc(sizeof(*test)); + if (test == NULL) + return NULL; + + test->test_sub = sub; + memcpy(&test->test_desc, desc, sizeof(*desc)); + uu_list_node_init(test, &test->test_node, test_pool); + + return test; +} + +static void test_fini(test_t *test) +{ + assert(test != NULL); + + uu_list_node_fini(test, &test->test_node, test_pool); + free(test); +} + +static int test_setup(subsystem_t *sub) +{ + kzt_cfg_t *cfg; + int i, rc, size; + test_t *test; + kzt_user_t *desc; + + /* Aquire the number of registered tests for the give subsystem */ + cfg = (kzt_cfg_t *)malloc(sizeof(*cfg)); + if (cfg == NULL) + return -ENOMEM; + + memset(cfg, 0, sizeof(*cfg)); + cfg->cfg_magic = KZT_CFG_MAGIC; + cfg->cfg_cmd = KZT_CFG_TEST_COUNT; + cfg->cfg_arg1 = sub->sub_desc.id; /* Subsystem of interest */ + + rc = ioctl(kztctl_fd, KZT_CFG, cfg); + if (rc) { + fprintf(stderr, "Ioctl() error %lu / %d: %d\n", + (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + free(cfg); + return rc; + } + + size = cfg->cfg_rc1; + free(cfg); + + /* Based on the newly aquired number of tests allocate enough + * memory to get the descriptive information for them all. */ + cfg = (kzt_cfg_t *)malloc(sizeof(*cfg) + size * sizeof(kzt_user_t)); + if (cfg == NULL) + return -ENOMEM; + + memset(cfg, 0, sizeof(*cfg) + size * sizeof(kzt_user_t)); + cfg->cfg_magic = KZT_CFG_MAGIC; + cfg->cfg_cmd = KZT_CFG_TEST_LIST; + cfg->cfg_arg1 = sub->sub_desc.id; /* Subsystem of interest */ + cfg->cfg_data.kzt_tests.size = size; + + rc = ioctl(kztctl_fd, KZT_CFG, cfg); + if (rc) { + fprintf(stderr, "Ioctl() error %lu / %d: %d\n", + (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + free(cfg); + return rc; + } + + /* Add the new tests in to the relevant subsystems */ + size = cfg->cfg_rc1; + for (i = 0; i < size; i++) { + desc = &(cfg->cfg_data.kzt_tests.descs[i]); + + test = test_init(sub, desc); + if (test == NULL) { + fprintf(stderr, "Error initializing test: %s\n", + desc->name); + free(cfg); + return -ENOMEM; + } + + uu_list_insert(sub->sub_tests, test, 0); + } + + free(cfg); + return 0; +} + +static int test_compare(const void *l_arg, const void *r_arg, void *private) +{ + const test_t *l = l_arg; + const test_t *r = r_arg; + + if (l->test_desc.id > r->test_desc.id) + return 1; + + if (l->test_desc.id < r->test_desc.id) + return -1; + + return 0; +} + +static test_t *test_copy(test_t *test) +{ + return test_init(test->test_sub, &test->test_desc); +} + +static void test_list(uu_list_t *list, int indent) +{ + test_t *test; + + for (test = uu_list_first(list); test != NULL; + test = uu_list_next(list, test)) + fprintf(stdout, "%*s0x%0*x %-*s %-*s\n", + indent, "", + 04, test->test_desc.id, + KZT_NAME_SIZE, test->test_desc.name, + KZT_DESC_SIZE, test->test_desc.desc); +} + +static test_t *test_find(char *sub_str, char *test_str) +{ + subsystem_t *sub; + test_t *test; + int sub_num, test_num; + + /* No error checking here because it may not be a number, it's + * perfectly OK for it to be a string. Since we're just using + * it for comparison purposes this is all very safe. + */ + sub_num = strtol(sub_str, NULL, 0); + test_num = strtol(test_str, NULL, 0); + + for (sub = uu_list_first(subsystems); sub != NULL; + sub = uu_list_next(subsystems, sub)) { + + if (strncmp(sub->sub_desc.name, sub_str, KZT_NAME_SIZE) && + sub->sub_desc.id != sub_num) + continue; + + for (test = uu_list_first(sub->sub_tests); test != NULL; + test = uu_list_next(sub->sub_tests, test)) { + + if (!strncmp(test->test_desc.name, test_str, + KZT_NAME_SIZE) || test->test_desc.id == test_num) + return test; + } + } + + return NULL; +} + +static int test_add(cmd_args_t *args, test_t *test) +{ + test_t *tmp; + + tmp = test_copy(test); + if (tmp == NULL) + return -ENOMEM; + + uu_list_insert(args->args_tests, tmp, 0); + return 0; +} + +static int test_add_all(cmd_args_t *args) +{ + subsystem_t *sub; + test_t *test; + int rc; + + for (sub = uu_list_first(subsystems); sub != NULL; + sub = uu_list_next(subsystems, sub)) { + + for (test = uu_list_first(sub->sub_tests); test != NULL; + test = uu_list_next(sub->sub_tests, test)) { + + if (rc = test_add(args, test)) + return rc; + } + } + + return 0; +} + +static int test_run(cmd_args_t *args, test_t *test) +{ + subsystem_t *sub = test->test_sub; + kzt_cmd_t *cmd; + int rc, cmd_size; + + dev_clear(); + + cmd_size = sizeof(*cmd); + cmd = (kzt_cmd_t *)malloc(cmd_size); + if (cmd == NULL) + return -ENOMEM; + + memset(cmd, 0, cmd_size); + cmd->cmd_magic = KZT_CMD_MAGIC; + cmd->cmd_subsystem = sub->sub_desc.id; + cmd->cmd_test = test->test_desc.id; + cmd->cmd_data_size = 0; /* Unused feature */ + + fprintf(stdout, "%*s:%-*s ", + KZT_NAME_SIZE, sub->sub_desc.name, + KZT_NAME_SIZE, test->test_desc.name); + fflush(stdout); + rc = ioctl(kztctl_fd, KZT_CMD, cmd); + if (args->args_do_color) { + fprintf(stdout, "%s %s\n", rc ? + COLOR_RED "Fail" COLOR_RESET : + COLOR_GREEN "Pass" COLOR_RESET, + rc ? strerror(errno) : ""); + } else { + fprintf(stdout, "%s %s\n", rc ? + "Fail" : "Pass", + rc ? strerror(errno) : ""); + } + fflush(stdout); + free(cmd); + + if (args->args_verbose) { + if ((rc = read(kztctl_fd, kzt_buffer, kzt_buffer_size - 1)) < 0) { + fprintf(stdout, "Error reading results: %d\n", rc); + } else { + fprintf(stdout, "\n%s\n", kzt_buffer); + fflush(stdout); + } + } + + return rc; +} + +static int tests_run(cmd_args_t *args) +{ + test_t *test; + int rc; + + fprintf(stdout, + "------------------------------- " + "Running KZT Tests " + "-------------------------------\n"); + + for (test = uu_list_first(args->args_tests); test != NULL; + test = uu_list_next(args->args_tests, test)) { + + rc = test_run(args, test); + if (rc && args->args_exit_on_error) + return rc; + } + + return 0; +} + +static int args_parse_test(cmd_args_t *args, char *str) +{ + subsystem_t *s; + test_t *t; + char *sub_str, *test_str; + int sub_num, test_num; + int sub_all = 0, test_all = 0; + int rc, flag = 0; + + test_str = strchr(str, ':'); + if (test_str == NULL) { + fprintf(stderr, "Test must be of the " + "form \n"); + return -EINVAL; + } + + sub_str = str; + test_str[0] = '\0'; + test_str = test_str + 1; + + sub_num = strtol(sub_str, NULL, 0); + test_num = strtol(test_str, NULL, 0); + + if (!strncasecmp(sub_str, "all", strlen(sub_str)) || (sub_num == -1)) + sub_all = 1; + + if (!strncasecmp(test_str, "all", strlen(test_str)) || (test_num == -1)) + test_all = 1; + + if (sub_all) { + if (test_all) { + /* Add all tests from all subsystems */ + for (s = uu_list_first(subsystems); s != NULL; + s = uu_list_next(subsystems, s)) + for (t = uu_list_first(s->sub_tests);t != NULL; + t = uu_list_next(s->sub_tests, t)) + if (rc = test_add(args, t)) + goto error_run; + } else { + /* Add a specific test from all subsystems */ + for (s = uu_list_first(subsystems); s != NULL; + s = uu_list_next(subsystems, s)) { + if (t = test_find(s->sub_desc.name,test_str)) { + if (rc = test_add(args, t)) + goto error_run; + + flag = 1; + } + } + + if (!flag) + fprintf(stderr, "No tests '%s:%s' could be " + "found\n", sub_str, test_str); + } + } else { + if (test_all) { + /* Add all tests from a specific subsystem */ + for (s = uu_list_first(subsystems); s != NULL; + s = uu_list_next(subsystems, s)) { + if (strncasecmp(sub_str, s->sub_desc.name, + strlen(sub_str))) + continue; + + for (t = uu_list_first(s->sub_tests);t != NULL; + t = uu_list_next(s->sub_tests, t)) + if (rc = test_add(args, t)) + goto error_run; + } + } else { + /* Add a specific test from a specific subsystem */ + if (t = test_find(sub_str, test_str)) { + if (rc = test_add(args, t)) + goto error_run; + } else { + fprintf(stderr, "Test '%s:%s' could not be " + "found\n", sub_str, test_str); + return -EINVAL; + } + } + } + + return 0; + +error_run: + fprintf(stderr, "Test '%s:%s' not added to run list: %d\n", + sub_str, test_str, rc); + return rc; +} + +static void args_fini(cmd_args_t *args) +{ + struct cmd_test *ptr1, *ptr2; + + assert(args != NULL); + + + + if (args->args_tests != NULL) { + uu_list_destroy(args->args_tests); + } + + free(args); +} + +static cmd_args_t * +args_init(int argc, char **argv) +{ + cmd_args_t *args; + int c, rc; + + if (argc == 1) { + usage(); + return (cmd_args_t *) NULL; + } + + /* Configure and populate the args structures */ + args = malloc(sizeof(*args)); + if (args == NULL) + return NULL; + + memset(args, 0, sizeof(*args)); + args->args_verbose = 0; + args->args_do_list = 0; + args->args_do_all = 0; + args->args_do_color = 1; + args->args_exit_on_error = 0; + args->args_tests = uu_list_create(test_pool, NULL, 0); + if (args->args_tests == NULL) { + args_fini(args); + return NULL; + } + + while ((c = getopt_long(argc, argv, shortOpts, longOpts, NULL)) != -1){ + switch (c) { + case 'v': args->args_verbose++; break; + case 'l': args->args_do_list = 1; break; + case 'a': args->args_do_all = 1; break; + case 'c': args->args_do_color = 0; break; + case 'x': args->args_exit_on_error = 1; break; + case 't': + if (args->args_do_all) { + fprintf(stderr, "Option -t is " + "useless when used with -a\n"); + args_fini(args); + return NULL; + } + + rc = args_parse_test(args, argv[optind - 1]); + if (rc) { + args_fini(args); + return NULL; + } + break; + case 'h': + case '?': + usage(); + args_fini(args); + return NULL; + default: + fprintf(stderr, "Unknown option '%s'\n", + argv[optind - 1]); + break; + } + } + + return args; +} + +static int +dev_clear(void) +{ + kzt_cfg_t cfg; + int rc; + + memset(&cfg, 0, sizeof(cfg)); + cfg.cfg_magic = KZT_CFG_MAGIC; + cfg.cfg_cmd = KZT_CFG_BUFFER_CLEAR; + cfg.cfg_arg1 = 0; + + rc = ioctl(kztctl_fd, KZT_CFG, &cfg); + if (rc) + fprintf(stderr, "Ioctl() error %lu / %d: %d\n", + (unsigned long) KZT_CFG, cfg.cfg_cmd, errno); + + lseek(kztctl_fd, 0, SEEK_SET); + + return rc; +} + +static int +dev_size(int size) +{ + kzt_cfg_t cfg; + int rc; + + memset(&cfg, 0, sizeof(cfg)); + cfg.cfg_magic = KZT_CFG_MAGIC; + cfg.cfg_cmd = KZT_CFG_BUFFER_SIZE; + cfg.cfg_arg1 = size; + + rc = ioctl(kztctl_fd, KZT_CFG, &cfg); + if (rc) { + fprintf(stderr, "Ioctl() error %lu / %d: %d\n", + (unsigned long) KZT_CFG, cfg.cfg_cmd, errno); + return rc; + } + + return cfg.cfg_rc1; +} + +static void +dev_fini(void) +{ + if (kzt_buffer) + free(kzt_buffer); + + if (kztctl_fd != -1) { + if (close(kztctl_fd) == -1) { + fprintf(stderr, "Unable to close %s: %d\n", + KZT_DEV, errno); + } + } +} + +static int +dev_init(void) +{ + subsystem_t *sub; + int rc; + + kztctl_fd = open(KZT_DEV, O_RDONLY); + if (kztctl_fd == -1) { + fprintf(stderr, "Unable to open %s: %d\n" + "Is the kzt module loaded?\n", KZT_DEV, errno); + rc = errno; + goto error; + } + + /* Determine kernel module version string */ + memset(kzt_version, 0, KZT_VERSION_SIZE); + if ((rc = read(kztctl_fd, kzt_version, KZT_VERSION_SIZE - 1)) == -1) + goto error; + + if (rc = dev_clear()) + goto error; + + if ((rc = dev_size(0)) < 0) + goto error; + + kzt_buffer_size = rc; + kzt_buffer = (char *)malloc(kzt_buffer_size); + if (kzt_buffer == NULL) { + rc = -ENOMEM; + goto error; + } + + memset(kzt_buffer, 0, kzt_buffer_size); + + /* Determine available subsystems */ + if ((rc = subsystem_setup()) != 0) + goto error; + + /* Determine available tests for all subsystems */ + for (sub = uu_list_first(subsystems); sub != NULL; + sub = uu_list_next(subsystems, sub)) + if ((rc = test_setup(sub)) != 0) + goto error; + + return 0; + +error: + if (kztctl_fd != -1) { + if (close(kztctl_fd) == -1) { + fprintf(stderr, "Unable to close %s: %d\n", + KZT_DEV, errno); + } + } + + return rc; +} + +int +init(void) +{ + int rc; + + /* Configure the subsystem pool */ + subsystem_pool = uu_list_pool_create("sub_pool", sizeof(subsystem_t), + offsetof(subsystem_t, sub_node), + subsystem_compare, 0); + if (subsystem_pool == NULL) + return -ENOMEM; + + /* Configure the test pool */ + test_pool = uu_list_pool_create("test_pool", sizeof(test_t), + offsetof(test_t, test_node), + test_compare, 0); + if (test_pool == NULL) { + uu_list_pool_destroy(subsystem_pool); + return -ENOMEM; + } + + /* Allocate the subsystem list */ + subsystems = uu_list_create(subsystem_pool, NULL, 0); + if (subsystems == NULL) { + uu_list_pool_destroy(test_pool); + uu_list_pool_destroy(subsystem_pool); + return -ENOMEM; + } + + return 0; +} + +void +fini(void) +{ + /* XXX - Cleanup destroy lists release memory */ + + /* XXX - Remove contents of list first */ + uu_list_destroy(subsystems); +} + + +int +main(int argc, char **argv) +{ + cmd_args_t *args = NULL; + int rc = 0; + + /* General init */ + if (rc = init()) + return rc; + + /* Device specific init */ + if (rc = dev_init()) + goto out; + + /* Argument init and parsing */ + if ((args = args_init(argc, argv)) == NULL) { + rc = -1; + goto out; + } + + /* Generic kernel version string */ + if (args->args_verbose) + fprintf(stdout, "%s", kzt_version); + + /* Print the available test list and exit */ + if (args->args_do_list) { + subsystem_list(subsystems, 0); + goto out; + } + + /* Add all available test to the list of tests to run */ + if (args->args_do_all) { + if (rc = test_add_all(args)) + goto out; + } + + /* Run all the requested tests */ + if (rc = tests_run(args)) + goto out; + +out: + if (args != NULL) + args_fini(args); + + dev_fini(); + fini(); + return rc; +} + diff --git a/src/spl/Makefile.in b/src/spl/Makefile.in new file mode 100644 index 000000000..d052fc370 --- /dev/null +++ b/src/spl/Makefile.in @@ -0,0 +1,50 @@ +# Makefile.in for spl kernel module + +MODULES := spl + +DISTFILES = Makefile.in \ + linux-kmem.c linux-rwlock.c linux-taskq.c linux-thread.c + +# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED +# EXTRA_CFLAGS += -I$(src) +# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \ +# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \ +# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \ +# -Wno-char-subscripts -Wno-switch + +# Solaris porting layer module +obj-m := spl.o + +spl-objs += linux-kmem.o +spl-objs += linux-thread.o +spl-objs += linux-taskq.o +spl-objs += linux-rwlock.o + +splmodule := spl.ko +splmoduledir := @kmoduledir@/kernel/lib/ + +all: all-spec + +install: all + mkdir -p $(DESTDIR)$(splmoduledir) + $(INSTALL) -m 644 $(splmodule) $(DESTDIR)$(splmoduledir)/$(splmodule) + -/sbin/depmod -a + +uninstall: + rm -f $(DESTDIR)$(splmoduledir)/$(splmodule) + -/sbin/depmod -a + +clean: + -rm -f $(splmodule) *.o .*.cmd *.mod.c *.ko *.s */*.o + +distclean: clean + rm -f Makefile + rm -rf .tmp_versions + +maintainer-clean: distclean + +distdir: $(DISTFILES) + cp -p $(DISTFILES) $(distdir) + +all-spec: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/src/spl/linux-kmem.c b/src/spl/linux-kmem.c new file mode 100644 index 000000000..7de2b211d --- /dev/null +++ b/src/spl/linux-kmem.c @@ -0,0 +1,249 @@ +#include + +/* + * Memory allocation interfaces + */ +#ifdef DEBUG_KMEM +/* Shim layer memory accounting */ +atomic_t kmem_alloc_used; +unsigned int kmem_alloc_max; +#endif + +/* + * Slab allocation interfaces + * + * While the linux slab implementation was inspired by solaris they + * have made some changes to the API which complicates this shim + * layer. For one thing the same symbol names are used with different + * arguments for the prototypes. To deal with this we must use the + * preprocessor to re-order arguments. Happily for us standard C says, + * "Macro's appearing in their own expansion are not reexpanded" so + * this does not result in an infinite recursion. Additionally the + * function pointers registered by solarias differ from those used + * by linux so a lookup and mapping from linux style callback to a + * solaris style callback is needed. There is some overhead in this + * operation which isn't horibile but it needs to be kept in mind. + */ +typedef struct kmem_cache_cb { + struct list_head kcc_list; + kmem_cache_t * kcc_cache; + kmem_constructor_t kcc_constructor; + kmem_destructor_t kcc_destructor; + kmem_reclaim_t kcc_reclaim; + void * kcc_private; + void * kcc_vmp; +} kmem_cache_cb_t; + + +static spinlock_t kmem_cache_cb_lock = SPIN_LOCK_UNLOCKED; +//static spinlock_t kmem_cache_cb_lock = (spinlock_t) { 1 SPINLOCK_MAGIC_INIT }; +static LIST_HEAD(kmem_cache_cb_list); +static struct shrinker *kmem_cache_shrinker; + +/* Function must be called while holding the kmem_cache_cb_lock + * Because kmem_cache_t is an opaque datatype we're forced to + * match pointers to identify specific cache entires. + */ +static kmem_cache_cb_t * +kmem_cache_find_cache_cb(kmem_cache_t *cache) +{ + kmem_cache_cb_t *kcc; + + list_for_each_entry(kcc, &kmem_cache_cb_list, kcc_list) + if (cache == kcc->kcc_cache) + return kcc; + + return NULL; +} + +static kmem_cache_cb_t * +kmem_cache_add_cache_cb(kmem_cache_t *cache, + kmem_constructor_t constructor, + kmem_destructor_t destructor, + kmem_reclaim_t reclaim, + void *priv, void *vmp) +{ + kmem_cache_cb_t *kcc; + + kcc = (kmem_cache_cb_t *)kmalloc(sizeof(*kcc), GFP_KERNEL); + if (kcc) { + kcc->kcc_cache = cache; + kcc->kcc_constructor = constructor; + kcc->kcc_destructor = destructor; + kcc->kcc_reclaim = reclaim; + kcc->kcc_private = priv; + kcc->kcc_vmp = vmp; + spin_lock(&kmem_cache_cb_lock); + list_add(&kcc->kcc_list, &kmem_cache_cb_list); + spin_unlock(&kmem_cache_cb_lock); + } + + return kcc; +} + +static void +kmem_cache_remove_cache_cb(kmem_cache_cb_t *kcc) +{ + spin_lock(&kmem_cache_cb_lock); + list_del(&kcc->kcc_list); + spin_unlock(&kmem_cache_cb_lock); + + if (kcc) + kfree(kcc); +} + +static void +kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long flags) +{ + kmem_cache_cb_t *kcc; + + spin_lock(&kmem_cache_cb_lock); + + /* Callback list must be in sync with linux slab caches */ + kcc = kmem_cache_find_cache_cb(cache); + BUG_ON(!kcc); + + kcc->kcc_constructor(ptr, kcc->kcc_private, (int)flags); + spin_unlock(&kmem_cache_cb_lock); + /* Linux constructor has no return code, silently eat it */ +} + +static void +kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flags) +{ + kmem_cache_cb_t *kcc; + + spin_lock(&kmem_cache_cb_lock); + + /* Callback list must be in sync with linux slab caches */ + kcc = kmem_cache_find_cache_cb(cache); + BUG_ON(!kcc); + + /* Solaris destructor takes no flags, silently eat them */ + kcc->kcc_destructor(ptr, kcc->kcc_private); + spin_unlock(&kmem_cache_cb_lock); +} + +/* XXX - Arguments are ignored */ +static int +kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) +{ + kmem_cache_cb_t *kcc; + int total = 0; + + /* Under linux a shrinker is not tightly coupled with a slab + * cache. In fact linux always systematically trys calling all + * registered shrinker callbacks until its target reclamation level + * is reached. Because of this we only register one shrinker + * function in the shim layer for all slab caches. And we always + * attempt to shrink all caches when this generic shrinker is called. + */ + spin_lock(&kmem_cache_cb_lock); + + list_for_each_entry(kcc, &kmem_cache_cb_list, kcc_list) { + /* Under linux the desired number and gfp type of objects + * is passed to the reclaiming function as a sugested reclaim + * target. I do not pass these args on because reclaim + * policy is entirely up to the owner under solaris. We only + * pass on the pre-registered private data. + */ + if (kcc->kcc_reclaim) + kcc->kcc_reclaim(kcc->kcc_private); + + total += 1; + } + + /* Under linux we should return the remaining number of entires in + * the cache. Unfortunately, I don't see an easy way to safely + * emulate this behavior so I'm returning one entry per cache which + * was registered with the generic shrinker. This should fake out + * the linux VM when it attempts to shrink caches. + */ + spin_unlock(&kmem_cache_cb_lock); + return total; +} + +/* Ensure the __kmem_cache_create/__kmem_cache_destroy macros are + * removed here to prevent a recursive substitution, we want to call + * the native linux version. + */ +#undef kmem_cache_create +#undef kmem_cache_destroy + +kmem_cache_t * +__kmem_cache_create(char *name, size_t size, size_t align, + int (*constructor)(void *, void *, int), + void (*destructor)(void *, void *), + void (*reclaim)(void *), + void *priv, void *vmp, int flags) +{ + kmem_cache_t *cache; + kmem_cache_cb_t *kcc; + int shrinker_flag = 0; + + /* FIXME: - Option currently unsupported by shim layer */ + BUG_ON(vmp); + + cache = kmem_cache_create(name, size, align, flags, + kmem_cache_generic_constructor, + kmem_cache_generic_destructor); + if (cache == NULL) + return NULL; + + /* Register shared shrinker function on initial cache create */ + spin_lock(&kmem_cache_cb_lock); + if (list_empty(&kmem_cache_cb_list)) { + kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, + kmem_cache_generic_shrinker); + if (kmem_cache_shrinker == NULL) { + kmem_cache_destroy(cache); + spin_unlock(&kmem_cache_cb_lock); + return NULL; + } + + } + spin_unlock(&kmem_cache_cb_lock); + + kcc = kmem_cache_add_cache_cb(cache, constructor, destructor, + reclaim, priv, vmp); + if (kcc == NULL) { + if (shrinker_flag) /* New shrinker registered must be removed */ + remove_shrinker(kmem_cache_shrinker); + + kmem_cache_destroy(cache); + return NULL; + } + + return cache; +} + +/* Return codes discarded because Solaris implementation has void return */ +void +__kmem_cache_destroy(kmem_cache_t *cache) +{ + kmem_cache_cb_t *kcc; + + spin_lock(&kmem_cache_cb_lock); + kcc = kmem_cache_find_cache_cb(cache); + spin_unlock(&kmem_cache_cb_lock); + if (kcc == NULL) + return; + + kmem_cache_destroy(cache); + kmem_cache_remove_cache_cb(kcc); + + /* Unregister generic shrinker on removal of all caches */ + spin_lock(&kmem_cache_cb_lock); + if (list_empty(&kmem_cache_cb_list)) + remove_shrinker(kmem_cache_shrinker); + + spin_unlock(&kmem_cache_cb_lock); +} + +void +__kmem_reap(void) { + /* Since there's no easy hook in to linux to force all the registered + * shrinkers to run we just run the ones registered for this shim */ + kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); +} + diff --git a/src/spl/linux-rwlock.c b/src/spl/linux-rwlock.c new file mode 100644 index 000000000..e95ec1555 --- /dev/null +++ b/src/spl/linux-rwlock.c @@ -0,0 +1,41 @@ +#include + +int +rw_lock_held(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + if (rwlp->rw_sem.activity != 0) { +#else + if (rwlp->rw_sem.count != 0) { +#endif + return 1; + } + + return 0; +} + +int +rw_read_held(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + + if (rw_lock_held(rwlp) && rwlp->rw_owner == NULL) { + return 1; + } + + return 0; +} + +int +rw_write_held(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + + if (rwlp->rw_owner == current) { + return 1; + } + + return 0; +} diff --git a/src/spl/linux-taskq.c b/src/spl/linux-taskq.c new file mode 100644 index 000000000..0babd2395 --- /dev/null +++ b/src/spl/linux-taskq.c @@ -0,0 +1,78 @@ +#include + +/* + * Task queue interface + * + * The taskq_work_wrapper functions are used to manage the work_structs + * which must be submitted to linux. The shim layer allocates a wrapper + * structure for all items which contains a pointer to itself as well as + * the real work to be performed. When the work item run the generic + * handle is called which calls the real work function and then using + * the self pointer frees the work_struct. + */ +typedef struct taskq_work_wrapper { + struct work_struct tww_work; + task_func_t tww_func; + void * tww_priv; +} taskq_work_wrapper_t; + +static void +taskq_work_handler(void *priv) +{ + taskq_work_wrapper_t *tww = priv; + + BUG_ON(tww == NULL); + BUG_ON(tww->tww_func == NULL); + + /* Call the real function and free the wrapper */ + tww->tww_func(tww->tww_priv); + kfree(tww); +} + +/* XXX - All flags currently ignored */ +taskqid_t +__taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags) +{ + struct workqueue_struct *wq = tq; + taskq_work_wrapper_t *tww; + int rc; + + + BUG_ON(in_interrupt()); + BUG_ON(tq == NULL); + BUG_ON(func == NULL); + + tww = (taskq_work_wrapper_t *)kmalloc(sizeof(*tww), GFP_KERNEL); + if (!tww) + return (taskqid_t)0; + + INIT_WORK(&(tww->tww_work), taskq_work_handler, tww); + tww->tww_func = func; + tww->tww_priv = priv; + + rc = queue_work(wq, &(tww->tww_work)); + if (!rc) { + kfree(tww); + return (taskqid_t)0; + } + + return (taskqid_t)wq; +} + +/* XXX - Most args ignored until we decide if it's worth the effort + * to emulate the solaris notion of dynamic thread pools. For + * now we simply serialize everything through one thread which + * may come back to bite us as a performance issue. + * pri - Ignore priority + * min - Ignored until this is a dynamic thread pool + * max - Ignored until this is a dynamic thread pool + * flags - Ignored until this is a dynamic thread_pool + */ +taskq_t * +__taskq_create(const char *name, int nthreads, pri_t pri, + int minalloc, int maxalloc, uint_t flags) +{ + /* NOTE: Linux workqueue names are limited to 10 chars */ + + return create_singlethread_workqueue(name); +} diff --git a/src/spl/linux-thread.c b/src/spl/linux-thread.c new file mode 100644 index 000000000..ad036471a --- /dev/null +++ b/src/spl/linux-thread.c @@ -0,0 +1,113 @@ +#include + +/* + * Thread interfaces + */ +typedef struct thread_priv_s { + unsigned long tp_magic; /* Magic */ + void (*tp_func)(void *); /* Registered function */ + void *tp_args; /* Args to be passed to function */ + size_t tp_len; /* Len to be passed to function */ + int tp_state; /* State to start thread at */ + pri_t tp_pri; /* Priority to start threat at */ + volatile kthread_t *tp_task; /* Task pointer for new thread */ + spinlock_t tp_lock; /* Syncronization lock */ + wait_queue_head_t tp_waitq; /* Syncronization wait queue */ +} thread_priv_t; + +int +thread_generic_wrapper(void *arg) +{ + thread_priv_t *tp = (thread_priv_t *)arg; + void (*func)(void *); + void *args; + char name[16]; + + /* Use the truncated function name as thread name */ + snprintf(name, sizeof(name), "%s", "kthread"); + daemonize(name); + + spin_lock(&tp->tp_lock); + BUG_ON(tp->tp_magic != TP_MAGIC); + func = tp->tp_func; + args = tp->tp_args; + tp->tp_task = get_current(); + set_current_state(tp->tp_state); + set_user_nice((kthread_t *)tp->tp_task, PRIO_TO_NICE(tp->tp_pri)); + + spin_unlock(&tp->tp_lock); + wake_up(&tp->tp_waitq); + + /* DO NOT USE 'ARG' AFTER THIS POINT, EVER, EVER, EVER! + * Local variables are used here because after the calling thread + * has been woken up it will exit and this memory will no longer + * be safe to access since it was declared on the callers stack. */ + if (func) + func(args); + + return 0; +} + +void +__thread_exit(void) +{ + return; +} + +/* thread_create() may block forever if it cannot create a thread or + * allocate memory. This is preferable to returning a NULL which Solaris + * style callers likely never check for... since it can't fail. */ +kthread_t * +__thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), + void *args, size_t len, proc_t *pp, int state, pri_t pri) +{ + thread_priv_t tp; + DEFINE_WAIT(wait); + kthread_t *task; + long pid; + + /* Option pp is simply ignored */ + /* Variable stack size unsupported */ + BUG_ON(stk != NULL); + BUG_ON(stk != 0); + + /* Variable tp is located on the stack and not the heap because I want + * to minimize any chance of a failure, since the Solaris code is designed + * such that this function cannot fail. This is a little dangerous since + * we're passing a stack address to a new thread but correct locking was + * added to ensure the callee can use the data safely until wake_up(). */ + tp.tp_magic = TP_MAGIC; + tp.tp_func = proc; + tp.tp_args = args; + tp.tp_len = len; + tp.tp_state = state; + tp.tp_pri = pri; + tp.tp_task = NULL; + spin_lock_init(&tp.tp_lock); + init_waitqueue_head(&tp.tp_waitq); + + spin_lock(&tp.tp_lock); + + /* Solaris says this must never fail so we try forever */ + while ((pid = kernel_thread(thread_generic_wrapper, (void *)&tp, 0)) < 0) + printk(KERN_ERR "linux-thread: Unable to create thread; " + "pid = %ld\n", pid); + + /* All signals are ignored due to sleeping TASK_UNINTERRUPTIBLE */ + for (;;) { + prepare_to_wait(&tp.tp_waitq, &wait, TASK_UNINTERRUPTIBLE); + if (tp.tp_task != NULL) + break; + + spin_unlock(&tp.tp_lock); + schedule(); + spin_lock(&tp.tp_lock); + } + + /* Verify the pid retunred matches the pid in the task struct */ + BUG_ON(pid != (tp.tp_task)->pid); + + spin_unlock(&tp.tp_lock); + + return (kthread_t *)tp.tp_task; +} diff --git a/src/splat/Makefile.in b/src/splat/Makefile.in new file mode 100644 index 000000000..758c4be0a --- /dev/null +++ b/src/splat/Makefile.in @@ -0,0 +1,57 @@ +# Makefile.in for splat kernel module + +MODULES := splat + +DISTFILES = Makefile.in \ + splat-kmem.c splat-random.c splat-taskq.c \ + splat-time.c splat-condvar.c splat-mutex.c \ + splat-rwlock.c splat-thread.c splat-ctl.c + +# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED +# EXTRA_CFLAGS += -I$(src) +# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \ +# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \ +# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \ +# -Wno-char-subscripts -Wno-switch + +# Solaris porting layer aggressive tests +obj-m := splat.o + +splat-objs += splat-ctl.o +splat-objs += splat-kmem.o +splat-objs += splat-taskq.o +splat-objs += splat-random.o +splat-objs += splat-mutex.o +splat-objs += splat-condvar.o +splat-objs += splat-thread.o +splat-objs += splat-rwlock.o +splat-objs += splat-time.o + +splatmodule := splat.ko +splatmoduledir := @kmoduledir@/kernel/lib/ + +all: all-spec + +install: all + mkdir -p $(DESTDIR)$(splatmoduledir) + $(INSTALL) -m 644 $(splatmodule) $(DESTDIR)$(splatmoduledir)/$(splatmodule) + -/sbin/depmod -a + +uninstall: + rm -f $(DESTDIR)$(splatmoduledir)/$(splatmodule) + -/sbin/depmod -a + +clean: + -rm -f $(splmodule) *.o .*.cmd *.mod.c *.ko *.s */*.o + +distclean: clean + rm -f Makefile + rm -rf .tmp_versions + +maintainer-clean: distclean + +distdir: $(DISTFILES) + cp -p $(DISTFILES) $(distdir) + +all-spec: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/src/splat/splat-condvar.c b/src/splat/splat-condvar.c new file mode 100644 index 000000000..eaab2ac0a --- /dev/null +++ b/src/splat/splat-condvar.c @@ -0,0 +1,454 @@ +#include +#include + +#define KZT_SUBSYSTEM_CONDVAR 0x0500 +#define KZT_CONDVAR_NAME "condvar" +#define KZT_CONDVAR_DESC "Kernel Condition Variable Tests" + +#define KZT_CONDVAR_TEST1_ID 0x0501 +#define KZT_CONDVAR_TEST1_NAME "signal1" +#define KZT_CONDVAR_TEST1_DESC "Wake a single thread, cv_wait()/cv_signal()" + +#define KZT_CONDVAR_TEST2_ID 0x0502 +#define KZT_CONDVAR_TEST2_NAME "broadcast1" +#define KZT_CONDVAR_TEST2_DESC "Wake all threads, cv_wait()/cv_broadcast()" + +#define KZT_CONDVAR_TEST3_ID 0x0503 +#define KZT_CONDVAR_TEST3_NAME "signal2" +#define KZT_CONDVAR_TEST3_DESC "Wake a single thread, cv_wait_timeout()/cv_signal()" + +#define KZT_CONDVAR_TEST4_ID 0x0504 +#define KZT_CONDVAR_TEST4_NAME "broadcast2" +#define KZT_CONDVAR_TEST4_DESC "Wake all threads, cv_wait_timeout()/cv_broadcast()" + +#define KZT_CONDVAR_TEST5_ID 0x0505 +#define KZT_CONDVAR_TEST5_NAME "timeout" +#define KZT_CONDVAR_TEST5_DESC "Timeout thread, cv_wait_timeout()" + +#define KZT_CONDVAR_TEST_MAGIC 0x115599DDUL +#define KZT_CONDVAR_TEST_NAME "condvar_test" +#define KZT_CONDVAR_TEST_COUNT 8 + +typedef struct condvar_priv { + unsigned long cv_magic; + struct file *cv_file; + kcondvar_t cv_condvar; + kmutex_t cv_mtx; +} condvar_priv_t; + +typedef struct condvar_thr { + int ct_id; + const char *ct_name; + condvar_priv_t *ct_cvp; + int ct_rc; +} condvar_thr_t; + +int +kzt_condvar_test12_thread(void *arg) +{ + condvar_thr_t *ct = (condvar_thr_t *)arg; + condvar_priv_t *cv = ct->ct_cvp; + char name[16]; + + ASSERT(cv->cv_magic == KZT_CONDVAR_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", KZT_CONDVAR_TEST_NAME, ct->ct_id); + daemonize(name); + + mutex_enter(&cv->cv_mtx); + kzt_vprint(cv->cv_file, ct->ct_name, + "%s thread sleeping with %d waiters\n", + name, atomic_read(&cv->cv_condvar.cv_waiters)); + cv_wait(&cv->cv_condvar, &cv->cv_mtx); + kzt_vprint(cv->cv_file, ct->ct_name, + "%s thread woken %d waiters remain\n", + name, atomic_read(&cv->cv_condvar.cv_waiters)); + mutex_exit(&cv->cv_mtx); + + return 0; +} + +static int +kzt_condvar_test1(struct file *file, void *arg) +{ + int i, count = 0, rc = 0; + long pids[KZT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + condvar_priv_t cv; + + cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_file = file; + mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + + /* Create some threads, the exact number isn't important just as + * long as we know how many we managed to create and should expect. */ + for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + ct[i].ct_cvp = &cv; + ct[i].ct_id = i; + ct[i].ct_name = KZT_CONDVAR_TEST1_NAME; + ct[i].ct_rc = 0; + + pids[i] = kernel_thread(kzt_condvar_test12_thread, &ct[i], 0); + if (pids[i] >= 0) + count++; + } + + /* Wait until all threads are waiting on the condition variable */ + while (atomic_read(&cv.cv_condvar.cv_waiters) != count) + schedule(); + + /* Wake a single thread at a time, wait until it exits */ + for (i = 1; i <= count; i++) { + cv_signal(&cv.cv_condvar); + + while (atomic_read(&cv.cv_condvar.cv_waiters) > (count - i)) + schedule(); + + /* Correct behavior 1 thread woken */ + if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) + continue; + + kzt_vprint(file, KZT_CONDVAR_TEST1_NAME, "Attempted to " + "wake %d thread but work %d threads woke\n", + 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); + rc = -EINVAL; + break; + } + + if (!rc) + kzt_vprint(file, KZT_CONDVAR_TEST1_NAME, "Correctly woke " + "%d sleeping threads %d at a time\n", count, 1); + + /* Wait until that last nutex is dropped */ + while (mutex_owner(&cv.cv_mtx)) + schedule(); + + /* Wake everything for the failure case */ + cv_broadcast(&cv.cv_condvar); + cv_destroy(&cv.cv_condvar); + mutex_destroy(&cv.cv_mtx); + + return rc; +} + +static int +kzt_condvar_test2(struct file *file, void *arg) +{ + int i, count = 0, rc = 0; + long pids[KZT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + condvar_priv_t cv; + + cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_file = file; + mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + + /* Create some threads, the exact number isn't important just as + * long as we know how many we managed to create and should expect. */ + for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + ct[i].ct_cvp = &cv; + ct[i].ct_id = i; + ct[i].ct_name = KZT_CONDVAR_TEST2_NAME; + ct[i].ct_rc = 0; + + pids[i] = kernel_thread(kzt_condvar_test12_thread, &ct[i], 0); + if (pids[i] > 0) + count++; + } + + /* Wait until all threads are waiting on the condition variable */ + while (atomic_read(&cv.cv_condvar.cv_waiters) != count) + schedule(); + + /* Wake all threads waiting on the condition variable */ + cv_broadcast(&cv.cv_condvar); + + /* Wait until all threads have exited */ + while ((atomic_read(&cv.cv_condvar.cv_waiters) > 0) || mutex_owner(&cv.cv_mtx)) + schedule(); + + kzt_vprint(file, KZT_CONDVAR_TEST2_NAME, "Correctly woke all " + "%d sleeping threads at once\n", count); + + /* Wake everything for the failure case */ + cv_destroy(&cv.cv_condvar); + mutex_destroy(&cv.cv_mtx); + + return rc; +} + +int +kzt_condvar_test34_thread(void *arg) +{ + condvar_thr_t *ct = (condvar_thr_t *)arg; + condvar_priv_t *cv = ct->ct_cvp; + char name[16]; + clock_t rc; + + ASSERT(cv->cv_magic == KZT_CONDVAR_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", KZT_CONDVAR_TEST_NAME, ct->ct_id); + daemonize(name); + + mutex_enter(&cv->cv_mtx); + kzt_vprint(cv->cv_file, ct->ct_name, + "%s thread sleeping with %d waiters\n", + name, atomic_read(&cv->cv_condvar.cv_waiters)); + + /* Sleep no longer than 3 seconds, for this test we should + * actually never sleep that long without being woken up. */ + rc = cv_timedwait(&cv->cv_condvar, &cv->cv_mtx, lbolt + HZ * 3); + if (rc == -1) { + ct->ct_rc = -ETIMEDOUT; + kzt_vprint(cv->cv_file, ct->ct_name, "%s thread timed out, " + "should have been woken\n", name); + } else { + kzt_vprint(cv->cv_file, ct->ct_name, + "%s thread woken %d waiters remain\n", + name, atomic_read(&cv->cv_condvar.cv_waiters)); + } + + mutex_exit(&cv->cv_mtx); + + return 0; +} + +static int +kzt_condvar_test3(struct file *file, void *arg) +{ + int i, count = 0, rc = 0; + long pids[KZT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + condvar_priv_t cv; + + cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_file = file; + mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + + /* Create some threads, the exact number isn't important just as + * long as we know how many we managed to create and should expect. */ + for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + ct[i].ct_cvp = &cv; + ct[i].ct_id = i; + ct[i].ct_name = KZT_CONDVAR_TEST3_NAME; + ct[i].ct_rc = 0; + + pids[i] = kernel_thread(kzt_condvar_test34_thread, &ct[i], 0); + if (pids[i] >= 0) + count++; + } + + /* Wait until all threads are waiting on the condition variable */ + while (atomic_read(&cv.cv_condvar.cv_waiters) != count) + schedule(); + + /* Wake a single thread at a time, wait until it exits */ + for (i = 1; i <= count; i++) { + cv_signal(&cv.cv_condvar); + + while (atomic_read(&cv.cv_condvar.cv_waiters) > (count - i)) + schedule(); + + /* Correct behavior 1 thread woken */ + if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) + continue; + + kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Attempted to " + "wake %d thread but work %d threads woke\n", + 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); + rc = -EINVAL; + break; + } + + /* Validate no waiting thread timed out early */ + for (i = 0; i < count; i++) + if (ct[i].ct_rc) + rc = ct[i].ct_rc; + + if (!rc) + kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Correctly woke " + "%d sleeping threads %d at a time\n", count, 1); + + /* Wait until that last nutex is dropped */ + while (mutex_owner(&cv.cv_mtx)) + schedule(); + + /* Wake everything for the failure case */ + cv_broadcast(&cv.cv_condvar); + cv_destroy(&cv.cv_condvar); + mutex_destroy(&cv.cv_mtx); + + return rc; +} + +static int +kzt_condvar_test4(struct file *file, void *arg) +{ + int i, count = 0, rc = 0; + long pids[KZT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + condvar_priv_t cv; + + cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_file = file; + mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + + /* Create some threads, the exact number isn't important just as + * long as we know how many we managed to create and should expect. */ + for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + ct[i].ct_cvp = &cv; + ct[i].ct_id = i; + ct[i].ct_name = KZT_CONDVAR_TEST3_NAME; + ct[i].ct_rc = 0; + + pids[i] = kernel_thread(kzt_condvar_test34_thread, &ct[i], 0); + if (pids[i] >= 0) + count++; + } + + /* Wait until all threads are waiting on the condition variable */ + while (atomic_read(&cv.cv_condvar.cv_waiters) != count) + schedule(); + + /* Wake a single thread at a time, wait until it exits */ + for (i = 1; i <= count; i++) { + cv_signal(&cv.cv_condvar); + + while (atomic_read(&cv.cv_condvar.cv_waiters) > (count - i)) + schedule(); + + /* Correct behavior 1 thread woken */ + if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) + continue; + + kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Attempted to " + "wake %d thread but work %d threads woke\n", + 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); + rc = -EINVAL; + break; + } + + /* Validate no waiting thread timed out early */ + for (i = 0; i < count; i++) + if (ct[i].ct_rc) + rc = ct[i].ct_rc; + + if (!rc) + kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Correctly woke " + "%d sleeping threads %d at a time\n", count, 1); + + /* Wait until that last nutex is dropped */ + while (mutex_owner(&cv.cv_mtx)) + schedule(); + + /* Wake everything for the failure case */ + cv_broadcast(&cv.cv_condvar); + cv_destroy(&cv.cv_condvar); + mutex_destroy(&cv.cv_mtx); + + return rc; +} + +static int +kzt_condvar_test5(struct file *file, void *arg) +{ + kcondvar_t condvar; + kmutex_t mtx; + clock_t time_left, time_before, time_after, time_delta; + int64_t whole_delta; + int32_t remain_delta; + int rc = 0; + + mutex_init(&mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + + kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, "Thread going to sleep for " + "%d second and expecting to be woken by timeout\n", 1); + + /* Allow a 1 second timeout, plenty long to validate correctness. */ + time_before = lbolt; + mutex_enter(&mtx); + time_left = cv_timedwait(&condvar, &mtx, lbolt + HZ); + mutex_exit(&mtx); + time_after = lbolt; + time_delta = time_after - time_before; /* XXX - Handle jiffie wrap */ + whole_delta = time_delta; + remain_delta = do_div(whole_delta, HZ); + + if (time_left == -1) { + if (time_delta >= HZ) { + kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, + "Thread correctly timed out and was asleep " + "for %d.%d seconds (%d second min)\n", + (int)whole_delta, remain_delta, 1); + } else { + kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, + "Thread correctly timed out but was only " + "asleep for %d.%d seconds (%d second " + "min)\n", (int)whole_delta, remain_delta, 1); + rc = -ETIMEDOUT; + } + } else { + kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, + "Thread exited after only %d.%d seconds, it " + "did not hit the %d second timeout\n", + (int)whole_delta, remain_delta, 1); + rc = -ETIMEDOUT; + } + + cv_destroy(&condvar); + mutex_destroy(&mtx); + + return rc; +} + +kzt_subsystem_t * +kzt_condvar_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_CONDVAR_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_CONDVAR_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_CONDVAR; + + KZT_TEST_INIT(sub, KZT_CONDVAR_TEST1_NAME, KZT_CONDVAR_TEST1_DESC, + KZT_CONDVAR_TEST1_ID, kzt_condvar_test1); + KZT_TEST_INIT(sub, KZT_CONDVAR_TEST2_NAME, KZT_CONDVAR_TEST2_DESC, + KZT_CONDVAR_TEST2_ID, kzt_condvar_test2); + KZT_TEST_INIT(sub, KZT_CONDVAR_TEST3_NAME, KZT_CONDVAR_TEST3_DESC, + KZT_CONDVAR_TEST3_ID, kzt_condvar_test3); + KZT_TEST_INIT(sub, KZT_CONDVAR_TEST4_NAME, KZT_CONDVAR_TEST4_DESC, + KZT_CONDVAR_TEST4_ID, kzt_condvar_test4); + KZT_TEST_INIT(sub, KZT_CONDVAR_TEST5_NAME, KZT_CONDVAR_TEST5_DESC, + KZT_CONDVAR_TEST5_ID, kzt_condvar_test5); + + return sub; +} + +void +kzt_condvar_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + KZT_TEST_FINI(sub, KZT_CONDVAR_TEST5_ID); + KZT_TEST_FINI(sub, KZT_CONDVAR_TEST4_ID); + KZT_TEST_FINI(sub, KZT_CONDVAR_TEST3_ID); + KZT_TEST_FINI(sub, KZT_CONDVAR_TEST2_ID); + KZT_TEST_FINI(sub, KZT_CONDVAR_TEST1_ID); + + kfree(sub); +} + +int +kzt_condvar_id(void) { + return KZT_SUBSYSTEM_CONDVAR; +} diff --git a/src/splat/splat-ctl.c b/src/splat/splat-ctl.c new file mode 100644 index 000000000..5292b0e60 --- /dev/null +++ b/src/splat/splat-ctl.c @@ -0,0 +1,684 @@ +/* + * My intent is the create a loadable kzt (kernel ZFS test) module + * which can be used as an access point to run in kernel ZFS regression + * tests. Why do we need this when we have ztest? Well ztest.c only + * excersises the ZFS code proper, it cannot be used to validate the + * linux kernel shim primatives. This also provides a nice hook for + * any other in kernel regression tests we wish to run such as direct + * in-kernel tests against the DMU. + * + * The basic design is the kzt module is that it is constructed of + * various kzt_* source files each of which contains regression tests. + * For example the kzt_linux_kmem.c file contains tests for validating + * kmem correctness. When the kzt module is loaded kzt_*_init() + * will be called for each subsystems tests, similarly kzt_*_fini() is + * called when the kzt module is removed. Each test can then be + * run by making an ioctl() call from a userspace control application + * to pick the subsystem and test which should be run. + * + * Author: Brian Behlendorf + */ + +#include +#include + +#include +#include +#include +#include + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) +#include +#endif + +#include + + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) +static struct class_simple *kzt_class; +#else +static struct class *kzt_class; +#endif +static struct list_head kzt_module_list; +static spinlock_t kzt_module_lock; + +static int +kzt_open(struct inode *inode, struct file *file) +{ + unsigned int minor = iminor(inode); + kzt_info_t *info; + + if (minor >= KZT_MINORS) + return -ENXIO; + + info = (kzt_info_t *)kmalloc(sizeof(*info), GFP_KERNEL); + if (info == NULL) + return -ENOMEM; + + spin_lock_init(&info->info_lock); + info->info_size = KZT_INFO_BUFFER_SIZE; + info->info_buffer = (char *)vmalloc(KZT_INFO_BUFFER_SIZE); + if (info->info_buffer == NULL) { + kfree(info); + return -ENOMEM; + } + + info->info_head = info->info_buffer; + file->private_data = (void *)info; + + kzt_print(file, "Kernel ZFS Tests %s\n", KZT_VERSION); + + return 0; +} + +static int +kzt_release(struct inode *inode, struct file *file) +{ + unsigned int minor = iminor(inode); + kzt_info_t *info = (kzt_info_t *)file->private_data; + + if (minor >= KZT_MINORS) + return -ENXIO; + + ASSERT(info); + ASSERT(info->info_buffer); + + vfree(info->info_buffer); + kfree(info); + + return 0; +} + +static int +kzt_buffer_clear(struct file *file, kzt_cfg_t *kcfg, unsigned long arg) +{ + kzt_info_t *info = (kzt_info_t *)file->private_data; + + ASSERT(info); + ASSERT(info->info_buffer); + + spin_lock(&info->info_lock); + memset(info->info_buffer, 0, info->info_size); + info->info_head = info->info_buffer; + spin_unlock(&info->info_lock); + + return 0; +} + +static int +kzt_buffer_size(struct file *file, kzt_cfg_t *kcfg, unsigned long arg) +{ + kzt_info_t *info = (kzt_info_t *)file->private_data; + char *buf; + int min, size, rc = 0; + + ASSERT(info); + ASSERT(info->info_buffer); + + spin_lock(&info->info_lock); + if (kcfg->cfg_arg1 > 0) { + + size = kcfg->cfg_arg1; + buf = (char *)vmalloc(size); + if (buf == NULL) { + rc = -ENOMEM; + goto out; + } + + /* Zero fill and truncate contents when coping buffer */ + min = ((size < info->info_size) ? size : info->info_size); + memset(buf, 0, size); + memcpy(buf, info->info_buffer, min); + vfree(info->info_buffer); + info->info_size = size; + info->info_buffer = buf; + info->info_head = info->info_buffer; + } + + kcfg->cfg_rc1 = info->info_size; + + if (copy_to_user((struct kzt_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) + rc = -EFAULT; +out: + spin_unlock(&info->info_lock); + + return rc; +} + + +static kzt_subsystem_t * +kzt_subsystem_find(int id) { + kzt_subsystem_t *sub; + + spin_lock(&kzt_module_lock); + list_for_each_entry(sub, &kzt_module_list, subsystem_list) { + if (id == sub->desc.id) { + spin_unlock(&kzt_module_lock); + return sub; + } + } + spin_unlock(&kzt_module_lock); + + return NULL; +} + +static int +kzt_subsystem_count(kzt_cfg_t *kcfg, unsigned long arg) +{ + kzt_subsystem_t *sub; + int i = 0; + + spin_lock(&kzt_module_lock); + list_for_each_entry(sub, &kzt_module_list, subsystem_list) + i++; + + spin_unlock(&kzt_module_lock); + kcfg->cfg_rc1 = i; + + if (copy_to_user((struct kzt_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) + return -EFAULT; + + return 0; +} + +static int +kzt_subsystem_list(kzt_cfg_t *kcfg, unsigned long arg) +{ + kzt_subsystem_t *sub; + kzt_cfg_t *tmp; + int size, i = 0; + + /* Structure will be sized large enough for N subsystem entries + * which is passed in by the caller. On exit the number of + * entries filled in with valid subsystems will be stored in + * cfg_rc1. If the caller does not provide enough entries + * for all subsystems we will truncate the list to avoid overrun. + */ + size = sizeof(*tmp) + kcfg->cfg_data.kzt_subsystems.size * + sizeof(kzt_user_t); + tmp = kmalloc(size, GFP_KERNEL); + if (tmp == NULL) + return -ENOMEM; + + /* Local 'tmp' is used as the structure copied back to user space */ + memset(tmp, 0, size); + memcpy(tmp, kcfg, sizeof(*kcfg)); + + spin_lock(&kzt_module_lock); + list_for_each_entry(sub, &kzt_module_list, subsystem_list) { + strncpy(tmp->cfg_data.kzt_subsystems.descs[i].name, + sub->desc.name, KZT_NAME_SIZE); + strncpy(tmp->cfg_data.kzt_subsystems.descs[i].desc, + sub->desc.desc, KZT_DESC_SIZE); + tmp->cfg_data.kzt_subsystems.descs[i].id = sub->desc.id; + + /* Truncate list if we are about to overrun alloc'ed memory */ + if ((i++) == kcfg->cfg_data.kzt_subsystems.size) + break; + } + spin_unlock(&kzt_module_lock); + tmp->cfg_rc1 = i; + + if (copy_to_user((struct kzt_cfg_t __user *)arg, tmp, size)) { + kfree(tmp); + return -EFAULT; + } + + kfree(tmp); + return 0; +} + +static int +kzt_test_count(kzt_cfg_t *kcfg, unsigned long arg) +{ + kzt_subsystem_t *sub; + kzt_test_t *test; + int rc, i = 0; + + /* Subsystem ID passed as arg1 */ + sub = kzt_subsystem_find(kcfg->cfg_arg1); + if (sub == NULL) + return -EINVAL; + + spin_lock(&(sub->test_lock)); + list_for_each_entry(test, &(sub->test_list), test_list) + i++; + + spin_unlock(&(sub->test_lock)); + kcfg->cfg_rc1 = i; + + if (copy_to_user((struct kzt_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) + return -EFAULT; + + return 0; +} + +static int +kzt_test_list(kzt_cfg_t *kcfg, unsigned long arg) +{ + kzt_subsystem_t *sub; + kzt_test_t *test; + kzt_cfg_t *tmp; + int size, rc, i = 0; + + /* Subsystem ID passed as arg1 */ + sub = kzt_subsystem_find(kcfg->cfg_arg1); + if (sub == NULL) + return -EINVAL; + + /* Structure will be sized large enough for N test entries + * which is passed in by the caller. On exit the number of + * entries filled in with valid tests will be stored in + * cfg_rc1. If the caller does not provide enough entries + * for all tests we will truncate the list to avoid overrun. + */ + size = sizeof(*tmp)+kcfg->cfg_data.kzt_tests.size*sizeof(kzt_user_t); + tmp = kmalloc(size, GFP_KERNEL); + if (tmp == NULL) + return -ENOMEM; + + /* Local 'tmp' is used as the structure copied back to user space */ + memset(tmp, 0, size); + memcpy(tmp, kcfg, sizeof(*kcfg)); + + spin_lock(&(sub->test_lock)); + list_for_each_entry(test, &(sub->test_list), test_list) { + strncpy(tmp->cfg_data.kzt_tests.descs[i].name, + test->desc.name, KZT_NAME_SIZE); + strncpy(tmp->cfg_data.kzt_tests.descs[i].desc, + test->desc.desc, KZT_DESC_SIZE); + tmp->cfg_data.kzt_tests.descs[i].id = test->desc.id; + + /* Truncate list if we are about to overrun alloc'ed memory */ + if ((i++) == kcfg->cfg_data.kzt_tests.size) + break; + } + spin_unlock(&(sub->test_lock)); + tmp->cfg_rc1 = i; + + if (copy_to_user((struct kzt_cfg_t __user *)arg, tmp, size)) { + kfree(tmp); + return -EFAULT; + } + + kfree(tmp); + return 0; +} + +static int +kzt_validate(struct file *file, kzt_subsystem_t *sub, int cmd, void *arg) +{ + kzt_test_t *test; + int rc = 0; + + spin_lock(&(sub->test_lock)); + list_for_each_entry(test, &(sub->test_list), test_list) { + if (test->desc.id == cmd) { + spin_unlock(&(sub->test_lock)); + return test->test(file, arg); + } + } + spin_unlock(&(sub->test_lock)); + + return -EINVAL; +} + +static int +kzt_ioctl_cfg(struct file *file, unsigned long arg) +{ + kzt_cfg_t kcfg; + int rc = 0; + + if (copy_from_user(&kcfg, (kzt_cfg_t *)arg, sizeof(kcfg))) + return -EFAULT; + + if (kcfg.cfg_magic != KZT_CFG_MAGIC) { + kzt_print(file, "Bad config magic 0x%x != 0x%x\n", + kcfg.cfg_magic, KZT_CFG_MAGIC); + return -EINVAL; + } + + switch (kcfg.cfg_cmd) { + case KZT_CFG_BUFFER_CLEAR: + /* cfg_arg1 - Unused + * cfg_rc1 - Unused + */ + rc = kzt_buffer_clear(file, &kcfg, arg); + break; + case KZT_CFG_BUFFER_SIZE: + /* cfg_arg1 - 0 - query size; >0 resize + * cfg_rc1 - Set to current buffer size + */ + rc = kzt_buffer_size(file, &kcfg, arg); + break; + case KZT_CFG_SUBSYSTEM_COUNT: + /* cfg_arg1 - Unused + * cfg_rc1 - Set to number of subsystems + */ + rc = kzt_subsystem_count(&kcfg, arg); + break; + case KZT_CFG_SUBSYSTEM_LIST: + /* cfg_arg1 - Unused + * cfg_rc1 - Set to number of subsystems + * cfg_data.kzt_subsystems - Populated with subsystems + */ + rc = kzt_subsystem_list(&kcfg, arg); + break; + case KZT_CFG_TEST_COUNT: + /* cfg_arg1 - Set to a target subsystem + * cfg_rc1 - Set to number of tests + */ + rc = kzt_test_count(&kcfg, arg); + break; + case KZT_CFG_TEST_LIST: + /* cfg_arg1 - Set to a target subsystem + * cfg_rc1 - Set to number of tests + * cfg_data.kzt_subsystems - Populated with tests + */ + rc = kzt_test_list(&kcfg, arg); + break; + default: + kzt_print(file, "Bad config command %d\n", kcfg.cfg_cmd); + rc = -EINVAL; + break; + } + + return rc; +} + +static int +kzt_ioctl_cmd(struct file *file, unsigned long arg) +{ + kzt_subsystem_t *sub; + kzt_cmd_t kcmd; + int rc = -EINVAL; + void *data = NULL; + + if (copy_from_user(&kcmd, (kzt_cfg_t *)arg, sizeof(kcmd))) + return -EFAULT; + + if (kcmd.cmd_magic != KZT_CMD_MAGIC) { + kzt_print(file, "Bad command magic 0x%x != 0x%x\n", + kcmd.cmd_magic, KZT_CFG_MAGIC); + return -EINVAL; + } + + /* Allocate memory for any opaque data the caller needed to pass on */ + if (kcmd.cmd_data_size > 0) { + data = (void *)kmalloc(kcmd.cmd_data_size, GFP_KERNEL); + if (data == NULL) + return -ENOMEM; + + if (copy_from_user(data, (void *)(arg + offsetof(kzt_cmd_t, + cmd_data_str)), kcmd.cmd_data_size)) { + kfree(data); + return -EFAULT; + } + } + + sub = kzt_subsystem_find(kcmd.cmd_subsystem); + if (sub != NULL) + rc = kzt_validate(file, sub, kcmd.cmd_test, data); + else + rc = -EINVAL; + + if (data != NULL) + kfree(data); + + return rc; +} + +static int +kzt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int minor, rc = 0; + + /* Ignore tty ioctls */ + if ((cmd & 0xffffff00) == ((int)'T') << 8) + return -ENOTTY; + + if (minor >= KZT_MINORS) + return -ENXIO; + + switch (cmd) { + case KZT_CFG: + rc = kzt_ioctl_cfg(file, arg); + break; + case KZT_CMD: + rc = kzt_ioctl_cmd(file, arg); + break; + default: + kzt_print(file, "Bad ioctl command %d\n", cmd); + rc = -EINVAL; + break; + } + + return rc; +} + +/* I'm not sure why you would want to write in to this buffer from + * user space since its principle use is to pass test status info + * back to the user space, but I don't see any reason to prevent it. + */ +static ssize_t kzt_write(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) +{ + unsigned int minor = iminor(file->f_dentry->d_inode); + kzt_info_t *info = (kzt_info_t *)file->private_data; + int rc = 0; + + if (minor >= KZT_MINORS) + return -ENXIO; + + ASSERT(info); + ASSERT(info->info_buffer); + + spin_lock(&info->info_lock); + + /* Write beyond EOF */ + if (*ppos >= info->info_size) { + rc = -EFBIG; + goto out; + } + + /* Resize count if beyond EOF */ + if (*ppos + count > info->info_size) + count = info->info_size - *ppos; + + if (copy_from_user(info->info_buffer, buf, count)) { + rc = -EFAULT; + goto out; + } + + *ppos += count; + rc = count; +out: + spin_unlock(&info->info_lock); + return rc; +} + +static ssize_t kzt_read(struct file *file, char __user *buf, + size_t count, loff_t *ppos) +{ + unsigned int minor = iminor(file->f_dentry->d_inode); + kzt_info_t *info = (kzt_info_t *)file->private_data; + int rc = 0; + + if (minor >= KZT_MINORS) + return -ENXIO; + + ASSERT(info); + ASSERT(info->info_buffer); + + spin_lock(&info->info_lock); + + /* Read beyond EOF */ + if (*ppos >= info->info_size) + goto out; + + /* Resize count if beyond EOF */ + if (*ppos + count > info->info_size) + count = info->info_size - *ppos; + + if (copy_to_user(buf, info->info_buffer + *ppos, count)) { + rc = -EFAULT; + goto out; + } + + *ppos += count; + rc = count; +out: + spin_unlock(&info->info_lock); + return rc; +} + +static loff_t kzt_seek(struct file *file, loff_t offset, int origin) +{ + unsigned int minor = iminor(file->f_dentry->d_inode); + kzt_info_t *info = (kzt_info_t *)file->private_data; + int rc = -EINVAL; + + if (minor >= KZT_MINORS) + return -ENXIO; + + ASSERT(info); + ASSERT(info->info_buffer); + + spin_lock(&info->info_lock); + + switch (origin) { + case 0: /* SEEK_SET - No-op just do it */ + break; + case 1: /* SEEK_CUR - Seek from current */ + offset = file->f_pos + offset; + break; + case 2: /* SEEK_END - Seek from end */ + offset = info->info_size + offset; + break; + } + + if (offset >= 0) { + file->f_pos = offset; + file->f_version = 0; + rc = offset; + } + + spin_unlock(&info->info_lock); + + return rc; +} + +static struct file_operations kzt_fops = { + .owner = THIS_MODULE, + .open = kzt_open, + .release = kzt_release, + .ioctl = kzt_ioctl, + .read = kzt_read, + .write = kzt_write, + .llseek = kzt_seek, +}; + +static struct cdev kzt_cdev = { + .owner = THIS_MODULE, + .kobj = { .name = "kztctl", }, +}; + +static int __init +kzt_init(void) +{ + dev_t dev; + int i, rc; + + spin_lock_init(&kzt_module_lock); + INIT_LIST_HEAD(&kzt_module_list); + + KZT_SUBSYSTEM_INIT(kmem); + KZT_SUBSYSTEM_INIT(taskq); + KZT_SUBSYSTEM_INIT(krng); + KZT_SUBSYSTEM_INIT(mutex); + KZT_SUBSYSTEM_INIT(condvar); + KZT_SUBSYSTEM_INIT(thread); + KZT_SUBSYSTEM_INIT(rwlock); + KZT_SUBSYSTEM_INIT(time); + + dev = MKDEV(KZT_MAJOR, 0); + if (rc = register_chrdev_region(dev, KZT_MINORS, "kztctl")) + goto error; + + /* Support for registering a character driver */ + cdev_init(&kzt_cdev, &kzt_fops); + if ((rc = cdev_add(&kzt_cdev, dev, KZT_MINORS))) { + printk(KERN_ERR "kzt: Error adding cdev, %d\n", rc); + kobject_put(&kzt_cdev.kobj); + unregister_chrdev_region(dev, KZT_MINORS); + goto error; + } + + /* Support for udev make driver info available in sysfs */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + kzt_class = class_simple_create(THIS_MODULE, "kzt"); +#else + kzt_class = class_create(THIS_MODULE, "kzt"); +#endif + if (IS_ERR(kzt_class)) { + rc = PTR_ERR(kzt_class); + printk(KERN_ERR "kzt: Error creating kzt class, %d\n", rc); + cdev_del(&kzt_cdev); + unregister_chrdev_region(dev, KZT_MINORS); + goto error; + } + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + class_simple_device_add(kzt_class, MKDEV(KZT_MAJOR, 0), + NULL, "kztctl"); +#else + class_device_create(kzt_class, NULL, MKDEV(KZT_MAJOR, 0), + NULL, "kztctl"); +#endif + + printk(KERN_INFO "kzt: Kernel ZFS Tests %s Loaded\n", KZT_VERSION); + return 0; +error: + printk(KERN_ERR "kzt: Error registering kzt device, %d\n", rc); + return rc; +} + +static void +kzt_fini(void) +{ + dev_t dev = MKDEV(KZT_MAJOR, 0); + int i; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + class_simple_device_remove(dev); + class_simple_destroy(kzt_class); + devfs_remove("kzt/kztctl"); + devfs_remove("kzt"); +#else + class_device_destroy(kzt_class, dev); + class_destroy(kzt_class); +#endif + cdev_del(&kzt_cdev); + unregister_chrdev_region(dev, KZT_MINORS); + + KZT_SUBSYSTEM_FINI(time); + KZT_SUBSYSTEM_FINI(rwlock); + KZT_SUBSYSTEM_FINI(thread); + KZT_SUBSYSTEM_FINI(condvar); + KZT_SUBSYSTEM_FINI(mutex); + KZT_SUBSYSTEM_FINI(krng); + KZT_SUBSYSTEM_FINI(taskq); + KZT_SUBSYSTEM_FINI(kmem); + + ASSERT(list_empty(&kzt_module_list)); + printk(KERN_INFO "kzt: Kernel ZFS Tests %s Unloaded\n", KZT_VERSION); +} + +module_init(kzt_init); +module_exit(kzt_fini); + +MODULE_AUTHOR("Lawrence Livermore National Labs"); +MODULE_DESCRIPTION("Kernel ZFS Test"); +MODULE_LICENSE("GPL"); + diff --git a/src/splat/splat-kmem.c b/src/splat/splat-kmem.c new file mode 100644 index 000000000..fb40819b5 --- /dev/null +++ b/src/splat/splat-kmem.c @@ -0,0 +1,365 @@ +#include +#include + +#define KZT_SUBSYSTEM_KMEM 0x0100 +#define KZT_KMEM_NAME "kmem" +#define KZT_KMEM_DESC "Kernel Malloc/Slab Tests" + +#define KZT_KMEM_TEST1_ID 0x0101 +#define KZT_KMEM_TEST1_NAME "kmem_alloc" +#define KZT_KMEM_TEST1_DESC "Memory allocation test (kmem_alloc)" + +#define KZT_KMEM_TEST2_ID 0x0102 +#define KZT_KMEM_TEST2_NAME "kmem_zalloc" +#define KZT_KMEM_TEST2_DESC "Memory allocation test (kmem_zalloc)" + +#define KZT_KMEM_TEST3_ID 0x0103 +#define KZT_KMEM_TEST3_NAME "slab_alloc" +#define KZT_KMEM_TEST3_DESC "Slab constructor/destructor test" + +#define KZT_KMEM_TEST4_ID 0x0104 +#define KZT_KMEM_TEST4_NAME "slab_reap" +#define KZT_KMEM_TEST4_DESC "Slab reaping test" + +#define KZT_KMEM_ALLOC_COUNT 10 +/* XXX - This test may fail under tight memory conditions */ +static int +kzt_kmem_test1(struct file *file, void *arg) +{ + void *ptr[KZT_KMEM_ALLOC_COUNT]; + int size = PAGE_SIZE; + int i, count, rc = 0; + + while ((!rc) && (size < (PAGE_SIZE * 16))) { + count = 0; + + for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) { + ptr[i] = kmem_alloc(size, KM_SLEEP); + if (ptr[i]) + count++; + } + + for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) + if (ptr[i]) + kmem_free(ptr[i], size); + + kzt_vprint(file, KZT_KMEM_TEST1_NAME, + "%d byte allocations, %d/%d successful\n", + size, count, KZT_KMEM_ALLOC_COUNT); + if (count != KZT_KMEM_ALLOC_COUNT) + rc = -ENOMEM; + + size *= 2; + } + + return rc; +} + +static int +kzt_kmem_test2(struct file *file, void *arg) +{ + void *ptr[KZT_KMEM_ALLOC_COUNT]; + int size = PAGE_SIZE; + int i, j, count, rc = 0; + + while ((!rc) && (size < (PAGE_SIZE * 16))) { + count = 0; + + for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) { + ptr[i] = kmem_zalloc(size, KM_SLEEP); + if (ptr[i]) + count++; + } + + /* Ensure buffer has been zero filled */ + for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) { + for (j = 0; j < size; j++) { + if (((char *)ptr[i])[j] != '\0') { + kzt_vprint(file, KZT_KMEM_TEST2_NAME, + "%d-byte allocation was " + "not zeroed\n", size); + rc = -EFAULT; + } + } + } + + for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) + if (ptr[i]) + kmem_free(ptr[i], size); + + kzt_vprint(file, KZT_KMEM_TEST2_NAME, + "%d byte allocations, %d/%d successful\n", + size, count, KZT_KMEM_ALLOC_COUNT); + if (count != KZT_KMEM_ALLOC_COUNT) + rc = -ENOMEM; + + size *= 2; + } + + return rc; +} + +#define KZT_KMEM_TEST_MAGIC 0x004488CCUL +#define KZT_KMEM_CACHE_NAME "kmem_test" +#define KZT_KMEM_CACHE_SIZE 256 +#define KZT_KMEM_OBJ_COUNT 128 +#define KZT_KMEM_OBJ_RECLAIM 64 + +typedef struct kmem_cache_data { + char kcd_buf[KZT_KMEM_CACHE_SIZE]; + unsigned long kcd_magic; + int kcd_flag; +} kmem_cache_data_t; + +typedef struct kmem_cache_priv { + unsigned long kcp_magic; + struct file *kcp_file; + kmem_cache_t *kcp_cache; + kmem_cache_data_t *kcp_kcd[KZT_KMEM_OBJ_COUNT]; + int kcp_count; + int kcp_rc; +} kmem_cache_priv_t; + +static int +kzt_kmem_test34_constructor(void *ptr, void *priv, int flags) +{ + kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; + + if (kcd) { + memset(kcd->kcd_buf, 0xaa, KZT_KMEM_CACHE_SIZE); + kcd->kcd_flag = 1; + + if (kcp) { + kcd->kcd_magic = kcp->kcp_magic; + kcp->kcp_count++; + } + } + + return 0; +} + +static void +kzt_kmem_test34_destructor(void *ptr, void *priv) +{ + kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; + + if (kcd) { + memset(kcd->kcd_buf, 0xbb, KZT_KMEM_CACHE_SIZE); + kcd->kcd_flag = 0; + + if (kcp) + kcp->kcp_count--; + } + + return; +} + +static int +kzt_kmem_test3(struct file *file, void *arg) +{ + kmem_cache_t *cache = NULL; + kmem_cache_data_t *kcd = NULL; + kmem_cache_priv_t kcp; + int rc = 0, max; + + kcp.kcp_magic = KZT_KMEM_TEST_MAGIC; + kcp.kcp_file = file; + kcp.kcp_count = 0; + kcp.kcp_rc = 0; + + cache = kmem_cache_create(KZT_KMEM_CACHE_NAME, sizeof(*kcd), 0, + kzt_kmem_test34_constructor, + kzt_kmem_test34_destructor, + NULL, &kcp, NULL, 0); + if (!cache) { + kzt_vprint(file, KZT_KMEM_TEST3_NAME, + "Unable to create '%s'\n", KZT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + kcd = kmem_cache_alloc(cache, 0); + if (!kcd) { + kzt_vprint(file, KZT_KMEM_TEST3_NAME, + "Unable to allocate from '%s'\n", + KZT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + if (!kcd->kcd_flag) { + kzt_vprint(file, KZT_KMEM_TEST3_NAME, + "Failed to run contructor for '%s'\n", + KZT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + if (kcd->kcd_magic != kcp.kcp_magic) { + kzt_vprint(file, KZT_KMEM_TEST3_NAME, + "Failed to pass private data to constructor " + "for '%s'\n", KZT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + max = kcp.kcp_count; + + /* Destructor's run lazily so it hard to check correctness here. + * We assume if it doesn't crash the free worked properly */ + kmem_cache_free(cache, kcd); + + /* Destroy the entire cache which will force destructors to + * run and we can verify one was called for every object */ + kmem_cache_destroy(cache); + if (kcp.kcp_count) { + kzt_vprint(file, KZT_KMEM_TEST3_NAME, + "Failed to run destructor on all slab objects " + "for '%s'\n", KZT_KMEM_CACHE_NAME); + rc = -EINVAL; + } + + kzt_vprint(file, KZT_KMEM_TEST3_NAME, + "%d allocated/destroyed objects for '%s'\n", + max, KZT_KMEM_CACHE_NAME); + + return rc; + +out_free: + if (kcd) + kmem_cache_free(cache, kcd); +out_destroy: + kmem_cache_destroy(cache); + return rc; +} + +static void +kzt_kmem_test4_reclaim(void *priv) +{ + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; + int i; + + kzt_vprint(kcp->kcp_file, KZT_KMEM_TEST4_NAME, + "Reaping %d objects from '%s'\n", + KZT_KMEM_OBJ_RECLAIM, KZT_KMEM_CACHE_NAME); + for (i = 0; i < KZT_KMEM_OBJ_RECLAIM; i++) { + if (kcp->kcp_kcd[i]) { + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); + kcp->kcp_kcd[i] = NULL; + } + } + + return; +} + +static int +kzt_kmem_test4(struct file *file, void *arg) +{ + kmem_cache_t *cache; + kmem_cache_priv_t kcp; + int i, rc = 0, max, reclaim_percent, target_percent; + + kcp.kcp_magic = KZT_KMEM_TEST_MAGIC; + kcp.kcp_file = file; + kcp.kcp_count = 0; + kcp.kcp_rc = 0; + + cache = kmem_cache_create(KZT_KMEM_CACHE_NAME, + sizeof(kmem_cache_data_t), 0, + kzt_kmem_test34_constructor, + kzt_kmem_test34_destructor, + kzt_kmem_test4_reclaim, &kcp, NULL, 0); + if (!cache) { + kzt_vprint(file, KZT_KMEM_TEST4_NAME, + "Unable to create '%s'\n", KZT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + kcp.kcp_cache = cache; + + for (i = 0; i < KZT_KMEM_OBJ_COUNT; i++) { + /* All allocations need not succeed */ + kcp.kcp_kcd[i] = kmem_cache_alloc(cache, 0); + if (!kcp.kcp_kcd[i]) { + kzt_vprint(file, KZT_KMEM_TEST4_NAME, + "Unable to allocate from '%s'\n", + KZT_KMEM_CACHE_NAME); + } + } + + max = kcp.kcp_count; + + /* Force shrinker to run */ + kmem_reap(); + + /* Reclaim reclaimed objects, this ensure the destructors are run */ + kmem_cache_reap_now(cache); + + reclaim_percent = ((kcp.kcp_count * 100) / max); + target_percent = (((KZT_KMEM_OBJ_COUNT - KZT_KMEM_OBJ_RECLAIM) * 100) / + KZT_KMEM_OBJ_COUNT); + kzt_vprint(file, KZT_KMEM_TEST4_NAME, + "%d%% (%d/%d) of previous size, target of " + "%d%%-%d%% for '%s'\n", reclaim_percent, kcp.kcp_count, + max, target_percent - 10, target_percent + 10, + KZT_KMEM_CACHE_NAME); + if ((reclaim_percent < target_percent - 10) || + (reclaim_percent > target_percent + 10)) + rc = -EINVAL; + + /* Cleanup our mess */ + for (i = 0; i < KZT_KMEM_OBJ_COUNT; i++) + if (kcp.kcp_kcd[i]) + kmem_cache_free(cache, kcp.kcp_kcd[i]); + + kmem_cache_destroy(cache); + + return rc; +} + +kzt_subsystem_t * +kzt_kmem_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_KMEM_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_KMEM_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_KMEM; + + KZT_TEST_INIT(sub, KZT_KMEM_TEST1_NAME, KZT_KMEM_TEST1_DESC, + KZT_KMEM_TEST1_ID, kzt_kmem_test1); + KZT_TEST_INIT(sub, KZT_KMEM_TEST2_NAME, KZT_KMEM_TEST2_DESC, + KZT_KMEM_TEST2_ID, kzt_kmem_test2); + KZT_TEST_INIT(sub, KZT_KMEM_TEST3_NAME, KZT_KMEM_TEST3_DESC, + KZT_KMEM_TEST3_ID, kzt_kmem_test3); + KZT_TEST_INIT(sub, KZT_KMEM_TEST4_NAME, KZT_KMEM_TEST4_DESC, + KZT_KMEM_TEST4_ID, kzt_kmem_test4); + + return sub; +} + +void +kzt_kmem_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + KZT_TEST_FINI(sub, KZT_KMEM_TEST4_ID); + KZT_TEST_FINI(sub, KZT_KMEM_TEST3_ID); + KZT_TEST_FINI(sub, KZT_KMEM_TEST2_ID); + KZT_TEST_FINI(sub, KZT_KMEM_TEST1_ID); + + kfree(sub); +} + +int +kzt_kmem_id(void) { + return KZT_SUBSYSTEM_KMEM; +} diff --git a/src/splat/splat-mutex.c b/src/splat/splat-mutex.c new file mode 100644 index 000000000..254a40de2 --- /dev/null +++ b/src/splat/splat-mutex.c @@ -0,0 +1,324 @@ +#include +#include + +#define KZT_SUBSYSTEM_MUTEX 0x0400 +#define KZT_MUTEX_NAME "mutex" +#define KZT_MUTEX_DESC "Kernel Mutex Tests" + +#define KZT_MUTEX_TEST1_ID 0x0401 +#define KZT_MUTEX_TEST1_NAME "tryenter" +#define KZT_MUTEX_TEST1_DESC "Validate mutex_tryenter() correctness" + +#define KZT_MUTEX_TEST2_ID 0x0402 +#define KZT_MUTEX_TEST2_NAME "race" +#define KZT_MUTEX_TEST2_DESC "Many threads entering/exiting the mutex" + +#define KZT_MUTEX_TEST3_ID 0x0403 +#define KZT_MUTEX_TEST3_NAME "owned" +#define KZT_MUTEX_TEST3_DESC "Validate mutex_owned() correctness" + +#define KZT_MUTEX_TEST4_ID 0x0404 +#define KZT_MUTEX_TEST4_NAME "owner" +#define KZT_MUTEX_TEST4_DESC "Validate mutex_owner() correctness" + +#define KZT_MUTEX_TEST_MAGIC 0x115599DDUL +#define KZT_MUTEX_TEST_NAME "mutex_test" +#define KZT_MUTEX_TEST_WORKQ "mutex_wq" +#define KZT_MUTEX_TEST_COUNT 128 + +typedef struct mutex_priv { + unsigned long mp_magic; + struct file *mp_file; + struct work_struct mp_work[KZT_MUTEX_TEST_COUNT]; + kmutex_t mp_mtx; + int mp_rc; +} mutex_priv_t; + + +static void +kzt_mutex_test1_work(void *priv) +{ + mutex_priv_t *mp = (mutex_priv_t *)priv; + + ASSERT(mp->mp_magic == KZT_MUTEX_TEST_MAGIC); + mp->mp_rc = 0; + + if (!mutex_tryenter(&mp->mp_mtx)) + mp->mp_rc = -EBUSY; +} + +static int +kzt_mutex_test1(struct file *file, void *arg) +{ + struct workqueue_struct *wq; + struct work_struct work; + mutex_priv_t *mp; + int rc = 0; + + mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); + if (mp == NULL) + return -ENOMEM; + + wq = create_singlethread_workqueue(KZT_MUTEX_TEST_WORKQ); + if (wq == NULL) { + rc = -ENOMEM; + goto out2; + } + + mutex_init(&(mp->mp_mtx), KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_enter(&(mp->mp_mtx)); + + mp->mp_magic = KZT_MUTEX_TEST_MAGIC; + mp->mp_file = file; + INIT_WORK(&work, kzt_mutex_test1_work, mp); + + /* Schedule a work item which will try and aquire the mutex via + * mutex_tryenter() while its held. This should fail and the work + * item will indicte this status in the passed private data. */ + if (!queue_work(wq, &work)) { + mutex_exit(&(mp->mp_mtx)); + rc = -EINVAL; + goto out; + } + + flush_workqueue(wq); + mutex_exit(&(mp->mp_mtx)); + + /* Work item successfully aquired mutex, very bad! */ + if (mp->mp_rc != -EBUSY) { + rc = -EINVAL; + goto out; + } + + kzt_vprint(file, KZT_MUTEX_TEST1_NAME, "%s", + "mutex_trylock() correctly failed when mutex held\n"); + + /* Schedule a work item which will try and aquire the mutex via + * mutex_tryenter() while it is not held. This should work and + * the item will indicte this status in the passed private data. */ + if (!queue_work(wq, &work)) { + rc = -EINVAL; + goto out; + } + + flush_workqueue(wq); + + /* Work item failed to aquire mutex, very bad! */ + if (mp->mp_rc != 0) { + rc = -EINVAL; + goto out; + } + + kzt_vprint(file, KZT_MUTEX_TEST1_NAME, "%s", + "mutex_trylock() correctly succeeded when mutex unheld\n"); +out: + mutex_destroy(&(mp->mp_mtx)); + destroy_workqueue(wq); +out2: + kfree(mp); + + return rc; +} + +static void +kzt_mutex_test2_work(void *priv) +{ + mutex_priv_t *mp = (mutex_priv_t *)priv; + int rc; + + ASSERT(mp->mp_magic == KZT_MUTEX_TEST_MAGIC); + + /* Read the value before sleeping and write it after we wake up to + * maximize the chance of a race if mutexs are not working properly */ + mutex_enter(&mp->mp_mtx); + rc = mp->mp_rc; + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ / 100); /* 1/100 of a second */ + mp->mp_rc = rc + 1; + mutex_exit(&mp->mp_mtx); +} + +static int +kzt_mutex_test2(struct file *file, void *arg) +{ + struct workqueue_struct *wq; + mutex_priv_t *mp; + int i, rc = 0; + + mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); + if (mp == NULL) + return -ENOMEM; + + /* Create a thread per CPU items on queue will race */ + wq = create_workqueue(KZT_MUTEX_TEST_WORKQ); + if (wq == NULL) { + rc = -ENOMEM; + goto out; + } + + mutex_init(&(mp->mp_mtx), KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + + mp->mp_magic = KZT_MUTEX_TEST_MAGIC; + mp->mp_file = file; + mp->mp_rc = 0; + + /* Schedule N work items to the work queue each of which enters the + * mutex, sleeps briefly, then exits the mutex. On a multiprocessor + * box these work items will be handled by all available CPUs. The + * mutex is instrumented such that if any two processors are in the + * critical region at the same time the system will panic. If the + * mutex is implemented right this will never happy, that's a pass. */ + for (i = 0; i < KZT_MUTEX_TEST_COUNT; i++) { + INIT_WORK(&(mp->mp_work[i]), kzt_mutex_test2_work, mp); + + if (!queue_work(wq, &(mp->mp_work[i]))) { + kzt_vprint(file, KZT_MUTEX_TEST2_NAME, + "Failed to queue work id %d\n", i); + rc = -EINVAL; + } + } + + flush_workqueue(wq); + + if (mp->mp_rc == KZT_MUTEX_TEST_COUNT) { + kzt_vprint(file, KZT_MUTEX_TEST2_NAME, "%d racing threads " + "correctly entered/exited the mutex %d times\n", + num_online_cpus(), mp->mp_rc); + } else { + kzt_vprint(file, KZT_MUTEX_TEST2_NAME, "%d racing threads " + "only processed %d/%d mutex work items\n", + num_online_cpus(), mp->mp_rc, KZT_MUTEX_TEST_COUNT); + rc = -EINVAL; + } + + mutex_destroy(&(mp->mp_mtx)); + destroy_workqueue(wq); +out: + kfree(mp); + + return rc; +} + +static int +kzt_mutex_test3(struct file *file, void *arg) +{ + kmutex_t mtx; + int rc = 0; + + mutex_init(&mtx, KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + + mutex_enter(&mtx); + + /* Mutex should be owned by current */ + if (!mutex_owned(&mtx)) { + kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should " + "be owned by pid %d but is owned by pid %d\n", + current->pid, mtx.km_owner ? mtx.km_owner->pid : -1); + rc = -EINVAL; + goto out; + } + + mutex_exit(&mtx); + + /* Mutex should not be owned by any task */ + if (mutex_owned(&mtx)) { + kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should " + "not be owned but is owned by pid %d\n", + mtx.km_owner ? mtx.km_owner->pid : -1); + rc = -EINVAL; + goto out; + } + + kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "%s", + "Correct mutex_owned() behavior\n"); +out: + mutex_destroy(&mtx); + + return rc; +} + +static int +kzt_mutex_test4(struct file *file, void *arg) +{ + kmutex_t mtx; + kthread_t *owner; + int rc = 0; + + mutex_init(&mtx, KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + + mutex_enter(&mtx); + + /* Mutex should be owned by current */ + owner = mutex_owner(&mtx); + if (current != owner) { + kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should " + "be owned by pid %d but is owned by pid %d\n", + current->pid, owner ? owner->pid : -1); + rc = -EINVAL; + goto out; + } + + mutex_exit(&mtx); + + /* Mutex should not be owned by any task */ + owner = mutex_owner(&mtx); + if (owner) { + kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should not " + "be owned but is owned by pid %d\n", owner->pid); + rc = -EINVAL; + goto out; + } + + kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "%s", + "Correct mutex_owner() behavior\n"); +out: + mutex_destroy(&mtx); + + return rc; +} + +kzt_subsystem_t * +kzt_mutex_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_MUTEX_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_MUTEX_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_MUTEX; + + KZT_TEST_INIT(sub, KZT_MUTEX_TEST1_NAME, KZT_MUTEX_TEST1_DESC, + KZT_MUTEX_TEST1_ID, kzt_mutex_test1); + KZT_TEST_INIT(sub, KZT_MUTEX_TEST2_NAME, KZT_MUTEX_TEST2_DESC, + KZT_MUTEX_TEST2_ID, kzt_mutex_test2); + KZT_TEST_INIT(sub, KZT_MUTEX_TEST3_NAME, KZT_MUTEX_TEST3_DESC, + KZT_MUTEX_TEST3_ID, kzt_mutex_test3); + KZT_TEST_INIT(sub, KZT_MUTEX_TEST4_NAME, KZT_MUTEX_TEST4_DESC, + KZT_MUTEX_TEST4_ID, kzt_mutex_test4); + + return sub; +} + +void +kzt_mutex_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + KZT_TEST_FINI(sub, KZT_MUTEX_TEST4_ID); + KZT_TEST_FINI(sub, KZT_MUTEX_TEST3_ID); + KZT_TEST_FINI(sub, KZT_MUTEX_TEST2_ID); + KZT_TEST_FINI(sub, KZT_MUTEX_TEST1_ID); + + kfree(sub); +} + +int +kzt_mutex_id(void) { + return KZT_SUBSYSTEM_MUTEX; +} diff --git a/src/splat/splat-random.c b/src/splat/splat-random.c new file mode 100644 index 000000000..abb654063 --- /dev/null +++ b/src/splat/splat-random.c @@ -0,0 +1,104 @@ +#include +#include + +#define KZT_SUBSYSTEM_KRNG 0x0300 +#define KZT_KRNG_NAME "krng" +#define KZT_KRNG_DESC "Kernel Random Number Generator Tests" + +#define KZT_KRNG_TEST1_ID 0x0301 +#define KZT_KRNG_TEST1_NAME "freq" +#define KZT_KRNG_TEST1_DESC "Frequency Test" + +#define KRNG_NUM_BITS 1048576 +#define KRNG_NUM_BYTES (KRNG_NUM_BITS >> 3) +#define KRNG_NUM_BITS_DIV2 (KRNG_NUM_BITS >> 1) +#define KRNG_ERROR_RANGE 2097 + +/* Random Number Generator Tests + There can be meny more tests on quality of the + random number generator. For now we are only + testing the frequency of particular bits. + We could also test consecutive sequences, + randomness within a particular block, etc. + but is probably not necessary for our purposes */ + +static int +kzt_krng_test1(struct file *file, void *arg) +{ + uint8_t *buf; + int i, j, diff, num = 0, rc = 0; + + buf = kmalloc(sizeof(*buf) * KRNG_NUM_BYTES, GFP_KERNEL); + if (buf == NULL) { + rc = -ENOMEM; + goto out; + } + + memset(buf, 0, sizeof(*buf) * KRNG_NUM_BYTES); + + /* Always succeeds */ + random_get_pseudo_bytes(buf, sizeof(uint8_t) * KRNG_NUM_BYTES); + + for (i = 0; i < KRNG_NUM_BYTES; i++) { + uint8_t tmp = buf[i]; + for (j = 0; j < 8; j++) { + uint8_t tmp2 = ((tmp >> j) & 0x01); + if (tmp2 == 1) { + num++; + } + } + } + + kfree(buf); + + diff = KRNG_NUM_BITS_DIV2 - num; + if (diff < 0) + diff *= -1; + + kzt_print(file, "Test 1 Number of ones: %d\n", num); + kzt_print(file, "Test 1 Difference from expected: %d Allowed: %d\n", + diff, KRNG_ERROR_RANGE); + + if (diff > KRNG_ERROR_RANGE) + rc = -ERANGE; +out: + return rc; +} + +kzt_subsystem_t * +kzt_krng_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_KRNG_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_KRNG_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_KRNG; + + KZT_TEST_INIT(sub, KZT_KRNG_TEST1_NAME, KZT_KRNG_TEST1_DESC, + KZT_KRNG_TEST1_ID, kzt_krng_test1); + + return sub; +} + +void +kzt_krng_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + + KZT_TEST_FINI(sub, KZT_KRNG_TEST1_ID); + + kfree(sub); +} + +int +kzt_krng_id(void) { + return KZT_SUBSYSTEM_KRNG; +} diff --git a/src/splat/splat-rwlock.c b/src/splat/splat-rwlock.c new file mode 100644 index 000000000..9820937c3 --- /dev/null +++ b/src/splat/splat-rwlock.c @@ -0,0 +1,764 @@ +#include +#include + +#define KZT_SUBSYSTEM_RWLOCK 0x0700 +#define KZT_RWLOCK_NAME "rwlock" +#define KZT_RWLOCK_DESC "Kernel RW Lock Tests" + +#define KZT_RWLOCK_TEST1_ID 0x0701 +#define KZT_RWLOCK_TEST1_NAME "rwtest1" +#define KZT_RWLOCK_TEST1_DESC "Multiple Readers One Writer" + +#define KZT_RWLOCK_TEST2_ID 0x0702 +#define KZT_RWLOCK_TEST2_NAME "rwtest2" +#define KZT_RWLOCK_TEST2_DESC "Multiple Writers" + +#define KZT_RWLOCK_TEST3_ID 0x0703 +#define KZT_RWLOCK_TEST3_NAME "rwtest3" +#define KZT_RWLOCK_TEST3_DESC "Owner Verification" + +#define KZT_RWLOCK_TEST4_ID 0x0704 +#define KZT_RWLOCK_TEST4_NAME "rwtest4" +#define KZT_RWLOCK_TEST4_DESC "Trylock Test" + +#define KZT_RWLOCK_TEST5_ID 0x0705 +#define KZT_RWLOCK_TEST5_NAME "rwtest5" +#define KZT_RWLOCK_TEST5_DESC "Write Downgrade Test" + +#define KZT_RWLOCK_TEST6_ID 0x0706 +#define KZT_RWLOCK_TEST6_NAME "rwtest6" +#define KZT_RWLOCK_TEST6_DESC "Read Upgrade Test" + +#define KZT_RWLOCK_TEST_MAGIC 0x115599DDUL +#define KZT_RWLOCK_TEST_NAME "rwlock_test" +#define KZT_RWLOCK_TEST_COUNT 8 + +#define KZT_RWLOCK_RELEASE_INIT 0 +#define KZT_RWLOCK_RELEASE_WRITERS 1 +#define KZT_RWLOCK_RELEASE_READERS 2 + +typedef struct rw_priv { + unsigned long rw_magic; + struct file *rw_file; + krwlock_t rwl; + spinlock_t rw_priv_lock; + wait_queue_head_t rw_waitq; + atomic_t rw_completed; + atomic_t rw_acquired; + atomic_t rw_waiters; + atomic_t rw_release; +} rw_priv_t; + +typedef struct rw_thr { + int rwt_id; + const char *rwt_name; + rw_priv_t *rwt_rwp; + int rwt_rc; +} rw_thr_t; + +static inline void +kzt_rwlock_sleep(signed long delay) +{ + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(delay); +} + +#define kzt_rwlock_lock_and_test(lock,test) \ +({ \ + int ret = 0; \ + \ + spin_lock(lock); \ + ret = (test) ? 1 : 0; \ + spin_unlock(lock); \ + ret; \ +}) + +void kzt_init_rw_priv(rw_priv_t *rwv, struct file *file) +{ + rwv->rw_magic = KZT_RWLOCK_TEST_MAGIC; + rwv->rw_file = file; + spin_lock_init(&rwv->rw_priv_lock); + init_waitqueue_head(&rwv->rw_waitq); + atomic_set(&rwv->rw_completed, 0); + atomic_set(&rwv->rw_acquired, 0); + atomic_set(&rwv->rw_waiters, 0); + atomic_set(&rwv->rw_release, KZT_RWLOCK_RELEASE_INIT); + + /* Initialize the read/write lock */ + rw_init(&rwv->rwl, KZT_RWLOCK_TEST_NAME, RW_DEFAULT, NULL); +} + +int +kzt_rwlock_test1_writer_thread(void *arg) +{ + rw_thr_t *rwt = (rw_thr_t *)arg; + rw_priv_t *rwv = rwt->rwt_rwp; + uint8_t rnd = 0; + char name[16]; + + ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", + KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + daemonize(name); + get_random_bytes((void *)&rnd, 1); + kzt_rwlock_sleep(rnd * HZ / 1000); + + spin_lock(&rwv->rw_priv_lock); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s writer thread trying to acquire rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + atomic_inc(&rwv->rw_waiters); + spin_unlock(&rwv->rw_priv_lock); + + /* Take the semaphore for writing + * release it when we are told to */ + rw_enter(&rwv->rwl, RW_WRITER); + + spin_lock(&rwv->rw_priv_lock); + atomic_dec(&rwv->rw_waiters); + atomic_inc(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s writer thread acquired rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + /* Wait here until the control thread + * says we can release the write lock */ + wait_event_interruptible(rwv->rw_waitq, + kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + atomic_read(&rwv->rw_release) == + KZT_RWLOCK_RELEASE_WRITERS)); + spin_lock(&rwv->rw_priv_lock); + atomic_inc(&rwv->rw_completed); + atomic_dec(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s writer thread dropped rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + /* Release the semaphore */ + rw_exit(&rwv->rwl); + return 0; +} + +int +kzt_rwlock_test1_reader_thread(void *arg) +{ + rw_thr_t *rwt = (rw_thr_t *)arg; + rw_priv_t *rwv = rwt->rwt_rwp; + uint8_t rnd = 0; + char name[16]; + + ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", + KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + daemonize(name); + get_random_bytes((void *)&rnd, 1); + kzt_rwlock_sleep(rnd * HZ / 1000); + + /* Don't try and and take the semaphore until + * someone else has already acquired it */ + wait_event_interruptible(rwv->rw_waitq, + kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + atomic_read(&rwv->rw_acquired) > 0)); + + spin_lock(&rwv->rw_priv_lock); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s reader thread trying to acquire rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + atomic_inc(&rwv->rw_waiters); + spin_unlock(&rwv->rw_priv_lock); + + /* Take the semaphore for reading + * release it when we are told to */ + rw_enter(&rwv->rwl, RW_READER); + + spin_lock(&rwv->rw_priv_lock); + atomic_dec(&rwv->rw_waiters); + atomic_inc(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s reader thread acquired rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + /* Wait here until the control thread + * says we can release the read lock */ + wait_event_interruptible(rwv->rw_waitq, + kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + atomic_read(&rwv->rw_release) == + KZT_RWLOCK_RELEASE_READERS)); + + spin_lock(&rwv->rw_priv_lock); + atomic_inc(&rwv->rw_completed); + atomic_dec(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s reader thread dropped rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + /* Release the semaphore */ + rw_exit(&rwv->rwl); + return 0; +} + +static int +kzt_rwlock_test1(struct file *file, void *arg) +{ + int i, count = 0, rc = 0; + long pids[KZT_RWLOCK_TEST_COUNT]; + rw_thr_t rwt[KZT_RWLOCK_TEST_COUNT]; + rw_priv_t rwv; + + /* Initialize private data + * including the rwlock */ + kzt_init_rw_priv(&rwv, file); + + /* Create some threads, the exact number isn't important just as + * long as we know how many we managed to create and should expect. */ + for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + rwt[i].rwt_rwp = &rwv; + rwt[i].rwt_id = i; + rwt[i].rwt_name = KZT_RWLOCK_TEST1_NAME; + rwt[i].rwt_rc = 0; + + /* The first thread will be a writer */ + if (i == 0) { + pids[i] = kernel_thread(kzt_rwlock_test1_writer_thread, + &rwt[i], 0); + } else { + pids[i] = kernel_thread(kzt_rwlock_test1_reader_thread, + &rwt[i], 0); + } + + if (pids[i] >= 0) { + count++; + } + } + + /* Once the writer has the lock, release the readers */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) <= 0)) { + kzt_rwlock_sleep(1 * HZ); + } + wake_up_interruptible(&rwv.rw_waitq); + + /* Ensure that there is only 1 writer and all readers are waiting */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_acquired) != 1 || + atomic_read(&rwv.rw_waiters) != + KZT_RWLOCK_TEST_COUNT - 1)) { + + kzt_rwlock_sleep(1 * HZ); + } + /* Relase the writer */ + spin_lock(&rwv.rw_priv_lock); + atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_WRITERS); + spin_unlock(&rwv.rw_priv_lock); + wake_up_interruptible(&rwv.rw_waitq); + + /* Now ensure that there are multiple reader threads holding the lock */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_acquired) <= 1)) { + kzt_rwlock_sleep(1 * HZ); + } + /* Release the readers */ + spin_lock(&rwv.rw_priv_lock); + atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_READERS); + spin_unlock(&rwv.rw_priv_lock); + wake_up_interruptible(&rwv.rw_waitq); + + /* Wait for the test to complete */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_acquired) != 0 || + atomic_read(&rwv.rw_waiters) != 0)) { + kzt_rwlock_sleep(1 * HZ); + + } + + rw_destroy(&rwv.rwl); + return rc; +} + +int +kzt_rwlock_test2_writer_thread(void *arg) +{ + rw_thr_t *rwt = (rw_thr_t *)arg; + rw_priv_t *rwv = rwt->rwt_rwp; + uint8_t rnd = 0; + char name[16]; + + ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", + KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + daemonize(name); + get_random_bytes((void *)&rnd, 1); + kzt_rwlock_sleep(rnd * HZ / 1000); + + /* Here just increment the waiters count even if we are not + * exactly about to call rw_enter(). Not really a big deal + * since more than likely will be true when we simulate work + * later on */ + spin_lock(&rwv->rw_priv_lock); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s writer thread trying to acquire rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + atomic_inc(&rwv->rw_waiters); + spin_unlock(&rwv->rw_priv_lock); + + /* Wait here until the control thread + * says we can acquire the write lock */ + wait_event_interruptible(rwv->rw_waitq, + kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + atomic_read(&rwv->rw_release) == + KZT_RWLOCK_RELEASE_WRITERS)); + + /* Take the semaphore for writing */ + rw_enter(&rwv->rwl, RW_WRITER); + + spin_lock(&rwv->rw_priv_lock); + atomic_dec(&rwv->rw_waiters); + atomic_inc(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s writer thread acquired rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + /* Give up the processor for a bit to simulate + * doing some work while taking the write lock */ + kzt_rwlock_sleep(rnd * HZ / 1000); + + /* Ensure that we are the only one writing */ + if (atomic_read(&rwv->rw_acquired) > 1) { + rwt->rwt_rc = 1; + } else { + rwt->rwt_rc = 0; + } + + spin_lock(&rwv->rw_priv_lock); + atomic_inc(&rwv->rw_completed); + atomic_dec(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s writer thread dropped rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + rw_exit(&rwv->rwl); + + + return 0; +} + +static int +kzt_rwlock_test2(struct file *file, void *arg) +{ + int i, count = 0, rc = 0; + long pids[KZT_RWLOCK_TEST_COUNT]; + rw_thr_t rwt[KZT_RWLOCK_TEST_COUNT]; + rw_priv_t rwv; + + /* Initialize private data + * including the rwlock */ + kzt_init_rw_priv(&rwv, file); + + /* Create some threads, the exact number isn't important just as + * long as we know how many we managed to create and should expect. */ + for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + rwt[i].rwt_rwp = &rwv; + rwt[i].rwt_id = i; + rwt[i].rwt_name = KZT_RWLOCK_TEST2_NAME; + rwt[i].rwt_rc = 0; + + /* The first thread will be a writer */ + pids[i] = kernel_thread(kzt_rwlock_test2_writer_thread, + &rwt[i], 0); + + if (pids[i] >= 0) { + count++; + } + } + + /* Wait for writers to get queued up */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_waiters) < KZT_RWLOCK_TEST_COUNT)) { + kzt_rwlock_sleep(1 * HZ); + } + /* Relase the writers */ + spin_lock(&rwv.rw_priv_lock); + atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_WRITERS); + spin_unlock(&rwv.rw_priv_lock); + wake_up_interruptible(&rwv.rw_waitq); + + /* Wait for the test to complete */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_acquired) != 0 || + atomic_read(&rwv.rw_waiters) != 0)) { + kzt_rwlock_sleep(1 * HZ); + } + + /* If any of the write threads ever acquired the lock + * while another thread had it, make sure we return + * an error */ + for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + if (rwt[i].rwt_rc) { + rc++; + } + } + + rw_destroy(&rwv.rwl); + return rc; +} + +static int +kzt_rwlock_test3(struct file *file, void *arg) +{ + kthread_t *owner; + rw_priv_t rwv; + int rc = 0; + + /* Initialize private data + * including the rwlock */ + kzt_init_rw_priv(&rwv, file); + + /* Take the rwlock for writing */ + rw_enter(&rwv.rwl, RW_WRITER); + owner = rw_owner(&rwv.rwl); + if (current != owner) { + kzt_vprint(file, KZT_RWLOCK_TEST3_NAME, "rwlock should " + "be owned by pid %d but is owned by pid %d\n", + current->pid, owner ? owner->pid : -1); + rc = -EINVAL; + goto out; + } + + /* Release the rwlock */ + rw_exit(&rwv.rwl); + owner = rw_owner(&rwv.rwl); + if (owner) { + kzt_vprint(file, KZT_RWLOCK_TEST3_NAME, "rwlock should not " + "be owned but is owned by pid %d\n", owner->pid); + rc = -EINVAL; + goto out; + } + + /* Take the rwlock for reading. + * Should not have an owner */ + rw_enter(&rwv.rwl, RW_READER); + owner = rw_owner(&rwv.rwl); + if (owner) { + kzt_vprint(file, KZT_RWLOCK_TEST3_NAME, "rwlock should not " + "be owned but is owned by pid %d\n", owner->pid); + /* Release the rwlock */ + rw_exit(&rwv.rwl); + rc = -EINVAL; + goto out; + } + + /* Release the rwlock */ + rw_exit(&rwv.rwl); + +out: + rw_destroy(&rwv.rwl); + return rc; +} + +int +kzt_rwlock_test4_reader_thread(void *arg) +{ + rw_thr_t *rwt = (rw_thr_t *)arg; + rw_priv_t *rwv = rwt->rwt_rwp; + uint8_t rnd = 0; + char name[16]; + + ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", + KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + daemonize(name); + get_random_bytes((void *)&rnd, 1); + kzt_rwlock_sleep(rnd * HZ / 1000); + + /* Don't try and and take the semaphore until + * someone else has already acquired it */ + wait_event_interruptible(rwv->rw_waitq, + kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + atomic_read(&rwv->rw_acquired) > 0)); + + spin_lock(&rwv->rw_priv_lock); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s reader thread trying to acquire rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + /* Take the semaphore for reading + * release it when we are told to */ + rwt->rwt_rc = rw_tryenter(&rwv->rwl, RW_READER); + + /* Here we acquired the lock this is a + * failure since the writer should be + * holding the lock */ + if (rwt->rwt_rc == 1) { + spin_lock(&rwv->rw_priv_lock); + atomic_inc(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s reader thread acquired rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + spin_lock(&rwv->rw_priv_lock); + atomic_dec(&rwv->rw_acquired); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s reader thread dropped rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + + /* Release the semaphore */ + rw_exit(&rwv->rwl); + } + /* Here we know we didn't block and didn't + * acquire the rwlock for reading */ + else { + spin_lock(&rwv->rw_priv_lock); + atomic_inc(&rwv->rw_completed); + kzt_vprint(rwv->rw_file, rwt->rwt_name, + "%s reader thread could not acquire rwlock with " + "%d holding lock and %d waiting\n", + name, atomic_read(&rwv->rw_acquired), + atomic_read(&rwv->rw_waiters)); + spin_unlock(&rwv->rw_priv_lock); + } + + return 0; +} + +static int +kzt_rwlock_test4(struct file *file, void *arg) +{ + int i, count = 0, rc = 0; + long pids[KZT_RWLOCK_TEST_COUNT]; + rw_thr_t rwt[KZT_RWLOCK_TEST_COUNT]; + rw_priv_t rwv; + + /* Initialize private data + * including the rwlock */ + kzt_init_rw_priv(&rwv, file); + + /* Create some threads, the exact number isn't important just as + * long as we know how many we managed to create and should expect. */ + for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + rwt[i].rwt_rwp = &rwv; + rwt[i].rwt_id = i; + rwt[i].rwt_name = KZT_RWLOCK_TEST4_NAME; + rwt[i].rwt_rc = 0; + + /* The first thread will be a writer */ + if (i == 0) { + /* We can reuse the test1 writer thread here */ + pids[i] = kernel_thread(kzt_rwlock_test1_writer_thread, + &rwt[i], 0); + } else { + pids[i] = kernel_thread(kzt_rwlock_test4_reader_thread, + &rwt[i], 0); + } + + if (pids[i] >= 0) { + count++; + } + } + + /* Once the writer has the lock, release the readers */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_acquired) <= 0)) { + kzt_rwlock_sleep(1 * HZ); + } + wake_up_interruptible(&rwv.rw_waitq); + + /* Make sure that the reader threads complete */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_completed) != KZT_RWLOCK_TEST_COUNT - 1)) { + kzt_rwlock_sleep(1 * HZ); + } + /* Release the writer */ + spin_lock(&rwv.rw_priv_lock); + atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_WRITERS); + spin_unlock(&rwv.rw_priv_lock); + wake_up_interruptible(&rwv.rw_waitq); + + /* Wait for the test to complete */ + while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_acquired) != 0 || + atomic_read(&rwv.rw_waiters) != 0)) { + kzt_rwlock_sleep(1 * HZ); + } + + /* If any of the reader threads ever acquired the lock + * while another thread had it, make sure we return + * an error since the rw_tryenter() should have failed */ + for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + if (rwt[i].rwt_rc) { + rc++; + } + } + + rw_destroy(&rwv.rwl); + return rc; +} + +static int +kzt_rwlock_test5(struct file *file, void *arg) +{ + kthread_t *owner; + rw_priv_t rwv; + int rc = 0; + + /* Initialize private data + * including the rwlock */ + kzt_init_rw_priv(&rwv, file); + + /* Take the rwlock for writing */ + rw_enter(&rwv.rwl, RW_WRITER); + owner = rw_owner(&rwv.rwl); + if (current != owner) { + kzt_vprint(file, KZT_RWLOCK_TEST5_NAME, "rwlock should " + "be owned by pid %d but is owned by pid %d\n", + current->pid, owner ? owner->pid : -1); + rc = -EINVAL; + goto out; + } + + /* Make sure that the downgrade + * worked properly */ + rw_downgrade(&rwv.rwl); + + owner = rw_owner(&rwv.rwl); + if (owner) { + kzt_vprint(file, KZT_RWLOCK_TEST5_NAME, "rwlock should not " + "be owned but is owned by pid %d\n", owner->pid); + /* Release the rwlock */ + rw_exit(&rwv.rwl); + rc = -EINVAL; + goto out; + } + + /* Release the rwlock */ + rw_exit(&rwv.rwl); + +out: + rw_destroy(&rwv.rwl); + return rc; +} + +static int +kzt_rwlock_test6(struct file *file, void *arg) +{ + kthread_t *owner; + rw_priv_t rwv; + int rc = 0; + + /* Initialize private data + * including the rwlock */ + kzt_init_rw_priv(&rwv, file); + + /* Take the rwlock for reading */ + rw_enter(&rwv.rwl, RW_READER); + owner = rw_owner(&rwv.rwl); + if (owner) { + kzt_vprint(file, KZT_RWLOCK_TEST6_NAME, "rwlock should not " + "be owned but is owned by pid %d\n", owner->pid); + rc = -EINVAL; + goto out; + } + + /* Make sure that the upgrade + * worked properly */ + rc = !rw_tryupgrade(&rwv.rwl); + + owner = rw_owner(&rwv.rwl); + if (rc || current != owner) { + kzt_vprint(file, KZT_RWLOCK_TEST6_NAME, "rwlock should " + "be owned by pid %d but is owned by pid %d " + "trylock rc %d\n", + current->pid, owner ? owner->pid : -1, rc); + rc = -EINVAL; + goto out; + } + + /* Release the rwlock */ + rw_exit(&rwv.rwl); + +out: + rw_destroy(&rwv.rwl); + return rc; +} + +kzt_subsystem_t * +kzt_rwlock_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_RWLOCK_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_RWLOCK_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_RWLOCK; + + KZT_TEST_INIT(sub, KZT_RWLOCK_TEST1_NAME, KZT_RWLOCK_TEST1_DESC, + KZT_RWLOCK_TEST1_ID, kzt_rwlock_test1); + KZT_TEST_INIT(sub, KZT_RWLOCK_TEST2_NAME, KZT_RWLOCK_TEST2_DESC, + KZT_RWLOCK_TEST2_ID, kzt_rwlock_test2); + KZT_TEST_INIT(sub, KZT_RWLOCK_TEST3_NAME, KZT_RWLOCK_TEST3_DESC, + KZT_RWLOCK_TEST3_ID, kzt_rwlock_test3); + KZT_TEST_INIT(sub, KZT_RWLOCK_TEST4_NAME, KZT_RWLOCK_TEST4_DESC, + KZT_RWLOCK_TEST4_ID, kzt_rwlock_test4); + KZT_TEST_INIT(sub, KZT_RWLOCK_TEST5_NAME, KZT_RWLOCK_TEST5_DESC, + KZT_RWLOCK_TEST5_ID, kzt_rwlock_test5); + KZT_TEST_INIT(sub, KZT_RWLOCK_TEST6_NAME, KZT_RWLOCK_TEST6_DESC, + KZT_RWLOCK_TEST6_ID, kzt_rwlock_test6); + + return sub; +} + +void +kzt_rwlock_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + KZT_TEST_FINI(sub, KZT_RWLOCK_TEST6_ID); + KZT_TEST_FINI(sub, KZT_RWLOCK_TEST5_ID); + KZT_TEST_FINI(sub, KZT_RWLOCK_TEST4_ID); + KZT_TEST_FINI(sub, KZT_RWLOCK_TEST3_ID); + KZT_TEST_FINI(sub, KZT_RWLOCK_TEST2_ID); + KZT_TEST_FINI(sub, KZT_RWLOCK_TEST1_ID); + kfree(sub); +} + +int +kzt_rwlock_id(void) { + return KZT_SUBSYSTEM_RWLOCK; +} diff --git a/src/splat/splat-taskq.c b/src/splat/splat-taskq.c new file mode 100644 index 000000000..614e7136c --- /dev/null +++ b/src/splat/splat-taskq.c @@ -0,0 +1,238 @@ +#include +#include + +#define KZT_SUBSYSTEM_TASKQ 0x0200 +#define KZT_TASKQ_NAME "taskq" +#define KZT_TASKQ_DESC "Kernel Task Queue Tests" + +#define KZT_TASKQ_TEST1_ID 0x0201 +#define KZT_TASKQ_TEST1_NAME "single" +#define KZT_TASKQ_TEST1_DESC "Single task queue, single task" + +#define KZT_TASKQ_TEST2_ID 0x0202 +#define KZT_TASKQ_TEST2_NAME "multiple" +#define KZT_TASKQ_TEST2_DESC "Multiple task queues, multiple tasks" + +typedef struct kzt_taskq_arg { + int flag; + int id; + struct file *file; + const char *name; +} kzt_taskq_arg_t; + +/* Validation Test 1 - Create a taskq, queue a task, wait until + * task completes, ensure task ran properly, cleanup taskq, + */ +static void +kzt_taskq_test1_func(void *arg) +{ + kzt_taskq_arg_t *tq_arg = (kzt_taskq_arg_t *)arg; + + ASSERT(tq_arg); + kzt_vprint(tq_arg->file, KZT_TASKQ_TEST1_NAME, + "Taskq '%s' function '%s' setting flag\n", + tq_arg->name, sym2str(kzt_taskq_test1_func)); + tq_arg->flag = 1; +} + +static int +kzt_taskq_test1(struct file *file, void *arg) +{ + taskq_t *tq; + taskqid_t id; + kzt_taskq_arg_t tq_arg; + + kzt_vprint(file, KZT_TASKQ_TEST1_NAME, "Taskq '%s' creating\n", + KZT_TASKQ_TEST1_NAME); + if ((tq = taskq_create(KZT_TASKQ_TEST1_NAME, 1, 0, 0, 0, 0)) == NULL) { + kzt_vprint(file, KZT_TASKQ_TEST1_NAME, + "Taskq '%s' create failed\n", + KZT_TASKQ_TEST1_NAME); + return -EINVAL; + } + + tq_arg.flag = 0; + tq_arg.id = 0; + tq_arg.file = file; + tq_arg.name = KZT_TASKQ_TEST1_NAME; + + kzt_vprint(file, KZT_TASKQ_TEST1_NAME, + "Taskq '%s' function '%s' dispatching\n", + tq_arg.name, sym2str(kzt_taskq_test1_func)); + if ((id = taskq_dispatch(tq, kzt_taskq_test1_func, &tq_arg, 0)) == 0) { + kzt_vprint(file, KZT_TASKQ_TEST1_NAME, + "Taskq '%s' function '%s' dispatch failed\n", + tq_arg.name, sym2str(kzt_taskq_test1_func)); + taskq_destory(tq); + return -EINVAL; + } + + kzt_vprint(file, KZT_TASKQ_TEST1_NAME, "Taskq '%s' waiting\n", + tq_arg.name); + taskq_wait(tq); + kzt_vprint(file, KZT_TASKQ_TEST1_NAME, "Taskq '%s' destroying\n", + tq_arg.name); + taskq_destory(tq); + + return (tq_arg.flag) ? 0 : -EINVAL; +} + +/* Validation Test 2 - Create multiple taskq's, each with multiple tasks, + * wait until all tasks complete, ensure all tasks ran properly and in the + * the correct order, cleanup taskq's + */ +static void +kzt_taskq_test2_func1(void *arg) +{ + kzt_taskq_arg_t *tq_arg = (kzt_taskq_arg_t *)arg; + + ASSERT(tq_arg); + kzt_vprint(tq_arg->file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' function '%s' flag = %d = %d * 2\n", + tq_arg->name, tq_arg->id, + sym2str(kzt_taskq_test2_func1), + tq_arg->flag * 2, tq_arg->flag); + tq_arg->flag *= 2; +} + +static void +kzt_taskq_test2_func2(void *arg) +{ + kzt_taskq_arg_t *tq_arg = (kzt_taskq_arg_t *)arg; + + ASSERT(tq_arg); + kzt_vprint(tq_arg->file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' function '%s' flag = %d = %d + 1\n", + tq_arg->name, tq_arg->id, + sym2str(kzt_taskq_test2_func2), + tq_arg->flag + 1, tq_arg->flag); + tq_arg->flag += 1; +} + +#define TEST2_TASKQS 8 +static int +kzt_taskq_test2(struct file *file, void *arg) { + taskq_t *tq[TEST2_TASKQS] = { NULL }; + taskqid_t id; + kzt_taskq_arg_t tq_args[TEST2_TASKQS]; + int i, rc = 0; + + for (i = 0; i < TEST2_TASKQS; i++) { + + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, "Taskq '%s/%d' " + "creating\n", KZT_TASKQ_TEST2_NAME, i); + if ((tq[i] = taskq_create(KZT_TASKQ_TEST2_NAME, + 1, 0, 0, 0, 0)) == NULL) { + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' create failed\n", + KZT_TASKQ_TEST2_NAME, i); + rc = -EINVAL; + break; + } + + tq_args[i].flag = i; + tq_args[i].id = i; + tq_args[i].file = file; + tq_args[i].name = KZT_TASKQ_TEST2_NAME; + + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' function '%s' dispatching\n", + tq_args[i].name, tq_args[i].id, + sym2str(kzt_taskq_test2_func1)); + if ((id = taskq_dispatch( + tq[i], kzt_taskq_test2_func1, &tq_args[i], 0)) == 0) { + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' function '%s' dispatch " + "failed\n", tq_args[i].name, tq_args[i].id, + sym2str(kzt_taskq_test2_func1)); + rc = -EINVAL; + break; + } + + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' function '%s' dispatching\n", + tq_args[i].name, tq_args[i].id, + sym2str(kzt_taskq_test2_func2)); + if ((id = taskq_dispatch( + tq[i], kzt_taskq_test2_func2, &tq_args[i], 0)) == 0) { + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' function '%s' dispatch failed\n", + tq_args[i].name, tq_args[i].id, + sym2str(kzt_taskq_test2_func2)); + rc = -EINVAL; + break; + } + } + + /* When rc is set we're effectively just doing cleanup here, so + * ignore new errors in that case. They just cause noise. */ + for (i = 0; i < TEST2_TASKQS; i++) { + if (tq[i] != NULL) { + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' waiting\n", + tq_args[i].name, tq_args[i].id); + taskq_wait(tq[i]); + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d; destroying\n", + tq_args[i].name, tq_args[i].id); + taskq_destory(tq[i]); + + if (!rc && tq_args[i].flag != ((i * 2) + 1)) { + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' processed tasks " + "out of order; %d != %d\n", + tq_args[i].name, tq_args[i].id, + tq_args[i].flag, i * 2 + 1); + rc = -EINVAL; + } else { + kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' processed tasks " + "in the correct order; %d == %d\n", + tq_args[i].name, tq_args[i].id, + tq_args[i].flag, i * 2 + 1); + } + } + } + + return rc; +} + +kzt_subsystem_t * +kzt_taskq_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_TASKQ_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_TASKQ_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_TASKQ; + + KZT_TEST_INIT(sub, KZT_TASKQ_TEST1_NAME, KZT_TASKQ_TEST1_DESC, + KZT_TASKQ_TEST1_ID, kzt_taskq_test1); + KZT_TEST_INIT(sub, KZT_TASKQ_TEST2_NAME, KZT_TASKQ_TEST2_DESC, + KZT_TASKQ_TEST2_ID, kzt_taskq_test2); + + return sub; +} + +void +kzt_taskq_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + KZT_TEST_FINI(sub, KZT_TASKQ_TEST2_ID); + KZT_TEST_FINI(sub, KZT_TASKQ_TEST1_ID); + + kfree(sub); +} + +int +kzt_taskq_id(void) { + return KZT_SUBSYSTEM_TASKQ; +} diff --git a/src/splat/splat-thread.c b/src/splat/splat-thread.c new file mode 100644 index 000000000..0741db1fa --- /dev/null +++ b/src/splat/splat-thread.c @@ -0,0 +1,116 @@ +#include +#include + +#define KZT_SUBSYSTEM_THREAD 0x0600 +#define KZT_THREAD_NAME "thread" +#define KZT_THREAD_DESC "Kernel Thread Tests" + +#define KZT_THREAD_TEST1_ID 0x0601 +#define KZT_THREAD_TEST1_NAME "create" +#define KZT_THREAD_TEST1_DESC "Validate thread creation and destruction" + +#define KZT_THREAD_TEST_MAGIC 0x4488CC00UL + +typedef struct thread_priv { + unsigned long tp_magic; + struct file *tp_file; + spinlock_t tp_lock; + wait_queue_head_t tp_waitq; + int tp_rc; +} thread_priv_t; + + +static void +kzt_thread_work(void *priv) +{ + thread_priv_t *tp = (thread_priv_t *)priv; + + spin_lock(&tp->tp_lock); + ASSERT(tp->tp_magic == KZT_THREAD_TEST_MAGIC); + tp->tp_rc = 1; + + spin_unlock(&tp->tp_lock); + wake_up(&tp->tp_waitq); + + thread_exit(); +} + +static int +kzt_thread_test1(struct file *file, void *arg) +{ + thread_priv_t tp; + DEFINE_WAIT(wait); + kthread_t *thr; + int rc = 0; + + tp.tp_magic = KZT_THREAD_TEST_MAGIC; + tp.tp_file = file; + spin_lock_init(&tp.tp_lock); + init_waitqueue_head(&tp.tp_waitq); + tp.tp_rc = 0; + + spin_lock(&tp.tp_lock); + + thr = (kthread_t *)thread_create(NULL, 0, kzt_thread_work, &tp, 0, + (proc_t *) &p0, TS_RUN, minclsyspri); + /* Must never fail under Solaris, but we check anyway so we can + * report an error when this impossible thing happens */ + if (thr == NULL) { + rc = -ESRCH; + goto out; + } + + for (;;) { + prepare_to_wait(&tp.tp_waitq, &wait, TASK_UNINTERRUPTIBLE); + if (tp.tp_rc) + break; + + spin_unlock(&tp.tp_lock); + schedule(); + spin_lock(&tp.tp_lock); + } + + kzt_vprint(file, KZT_THREAD_TEST1_NAME, "%s", + "Thread successfully started and exited cleanly\n"); +out: + spin_unlock(&tp.tp_lock); + + return rc; +} + +kzt_subsystem_t * +kzt_thread_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_THREAD_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_THREAD_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_THREAD; + + KZT_TEST_INIT(sub, KZT_THREAD_TEST1_NAME, KZT_THREAD_TEST1_DESC, + KZT_THREAD_TEST1_ID, kzt_thread_test1); + + return sub; +} + +void +kzt_thread_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + KZT_TEST_FINI(sub, KZT_THREAD_TEST1_ID); + + kfree(sub); +} + +int +kzt_thread_id(void) { + return KZT_SUBSYSTEM_THREAD; +} diff --git a/src/splat/splat-time.c b/src/splat/splat-time.c new file mode 100644 index 000000000..b7d4ce86e --- /dev/null +++ b/src/splat/splat-time.c @@ -0,0 +1,90 @@ +#include +#include + +#define KZT_SUBSYSTEM_TIME 0x0800 +#define KZT_TIME_NAME "time" +#define KZT_TIME_DESC "Kernel Time Tests" + +#define KZT_TIME_TEST1_ID 0x0801 +#define KZT_TIME_TEST1_NAME "time1" +#define KZT_TIME_TEST1_DESC "HZ Test" + +#define KZT_TIME_TEST2_ID 0x0802 +#define KZT_TIME_TEST2_NAME "time2" +#define KZT_TIME_TEST2_DESC "Monotonic Test" + +static int +kzt_time_test1(struct file *file, void *arg) +{ + int myhz = hz; + kzt_vprint(file, KZT_TIME_TEST1_NAME, "hz is %d\n", myhz); + return 0; +} + +static int +kzt_time_test2(struct file *file, void *arg) +{ + hrtime_t tm1, tm2; + int i; + + tm1 = gethrtime(); + kzt_vprint(file, KZT_TIME_TEST2_NAME, "time is %lld\n", tm1); + + for(i = 0; i < 100; i++) { + tm2 = gethrtime(); + kzt_vprint(file, KZT_TIME_TEST2_NAME, "time is %lld\n", tm2); + + if(tm1 > tm2) { + kzt_print(file, "%s: gethrtime() is not giving monotonically increasing values\n", KZT_TIME_TEST2_NAME); + return 1; + } + tm1 = tm2; + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(10); + } + + return 0; +} + +kzt_subsystem_t * +kzt_time_init(void) +{ + kzt_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, KZT_TIME_NAME, KZT_NAME_SIZE); + strncpy(sub->desc.desc, KZT_TIME_DESC, KZT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = KZT_SUBSYSTEM_TIME; + + KZT_TEST_INIT(sub, KZT_TIME_TEST1_NAME, KZT_TIME_TEST1_DESC, + KZT_TIME_TEST1_ID, kzt_time_test1); + KZT_TEST_INIT(sub, KZT_TIME_TEST2_NAME, KZT_TIME_TEST2_DESC, + KZT_TIME_TEST2_ID, kzt_time_test2); + + return sub; +} + +void +kzt_time_fini(kzt_subsystem_t *sub) +{ + ASSERT(sub); + + KZT_TEST_FINI(sub, KZT_TIME_TEST2_ID); + KZT_TEST_FINI(sub, KZT_TIME_TEST1_ID); + + kfree(sub); +} + +int +kzt_time_id(void) +{ + return KZT_SUBSYSTEM_TIME; +} From 8f48c2c853b65d300c951028ae1eb15ccf52e928 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 26 Feb 2008 20:37:43 +0000 Subject: [PATCH 0002/1062] Whoops, I knew I'd miss something small in the build system. Fix it git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@2 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- src/cmd/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/Makefile.am b/src/cmd/Makefile.am index 2ab0a497c..38a21099c 100644 --- a/src/cmd/Makefile.am +++ b/src/cmd/Makefile.am @@ -1,3 +1,3 @@ AM_CFLAGS = @EXTRA_CFLAGS@ -g -O2 -W -Wall -Wstrict-prototypes -Wshadow sbin_PROGRAMS = splat -kzt_SOURCES = splat.c +splat_SOURCES = splat.c From 564f6d1509f71f14e0bd9631363995b7f193d758 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 26 Feb 2008 23:20:41 +0000 Subject: [PATCH 0003/1062] User space build fixes: - Add list handling compatibility library - Drop uu_* list handling in favor of local list implementation - libtoolize - generic makefile cleanup git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@3 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autogen.sh | 2 + configure.ac | 17 +- include/Makefile.am | 4 +- include/list.h | 281 +++++++++++++++ include/splat.h | 15 +- src/Makefile.am | 2 +- src/cmd/Makefile.am | 4 +- src/cmd/splat.c | 214 ++++++----- src/lib/Makefile.am | 3 + src/lib/list.c | 833 +++++++++++++++++++++++++++++++++++++++++++ src/spl/Makefile.in | 3 +- src/spl/linux-kmem.c | 2 +- 12 files changed, 1256 insertions(+), 124 deletions(-) create mode 100644 include/list.h create mode 100644 src/lib/Makefile.am create mode 100644 src/lib/list.c diff --git a/autogen.sh b/autogen.sh index 340b2c673..2e5965e73 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,8 @@ #!/bin/sh find . -type d -name .deps | xargs rm -rf +rm -rf config.guess config.sub ltmain.sh +libtoolize aclocal 2>/dev/null && autoheader && automake --add-missing --include-deps # 2>/dev/null && diff --git a/configure.ac b/configure.ac index 52bc4f593..833514dc1 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,7 @@ AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL AC_PROG_CC +AC_PROG_LIBTOOL ver=`uname -r` KERNELCFLAGS= @@ -88,21 +89,6 @@ else AC_MSG_RESULT([no]) fi -AC_MSG_CHECKING([if inode has i_private field]) -if egrep -qw "i_private" $kernelsrc/include/linux/fs.h; then - AC_DEFINE(HAVE_I_PRIVATE, 1, [inode has i_private field]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -AC_MSG_CHECKING([if inode has i_mutex field ]) -if egrep -qw "i_mutex" $kernelsrc/include/linux/fs.h; then - AC_DEFINE(HAVE_I_MUTEX, 1, [inode has i_mutex field]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi AC_MSG_CHECKING([if kernel has mutex.h ]) if test -f $kernelsrc/include/linux/mutex.h; then @@ -122,6 +108,7 @@ AC_SUBST(KERNELCFLAGS) AC_CONFIG_FILES([ Makefile src/Makefile + src/lib/Makefile src/cmd/Makefile src/spl/Makefile src/splat/Makefile diff --git a/include/Makefile.am b/include/Makefile.am index 42bbb2399..5b063fd09 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,5 +1,7 @@ -EXTRA_DIST = spl.h splat.h splat-ctl.h +EXTRA_DIST = spl.h +EXTRA_DIST += splat.h splat-ctl.h EXTRA_DIST += linux-condvar.h linux-kmem.h linux-random.h linux-thread.h EXTRA_DIST += linux-types.h linux-cred.h linux-kstat.h linux-rwlock.h EXTRA_DIST += linux-time.h linux-callb.h linux-generic.h linux-mutex.h EXTRA_DIST += linux-taskq.h linux-timer.h +EXTRA_DIST += list.h diff --git a/include/list.h b/include/list.h new file mode 100644 index 000000000..fe3fd006b --- /dev/null +++ b/include/list.h @@ -0,0 +1,281 @@ +/***************************************************************************** + * $Id: list.h 2899 2002-12-11 19:00:36Z dun $ + ***************************************************************************** + * Copyright (C) 2001-2002 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Chris Dunlap . + * + * This file is from LSD-Tools, the LLNL Software Development Toolbox. + * + * LSD-Tools is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with LSD-Tools; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + *****************************************************************************/ + + +#ifndef LSD_LIST_H +#define LSD_LIST_H + + +/*********** + * Notes * + ***********/ +/* + * If NDEBUG is not defined, internal debug code will be enabled. This is + * intended for development use only and production code should define NDEBUG. + * + * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to + * find an external lsd_fatal_error(file,line,mesg) function. By default, + * lsd_fatal_error(file,line,mesg) is a macro definition that outputs an + * error message to stderr. This macro may be redefined to invoke another + * routine instead. + * + * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to + * find an external lsd_nomem_error(file,line,mesg) function. By default, + * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. + * This macro may be redefined to invoke another routine instead. + * + * If WITH_PTHREADS is defined, these routines will be thread-safe. + */ + + +/**************** + * Data Types * + ****************/ + +typedef struct list * List; +/* + * List opaque data type. + */ + +typedef struct listIterator * ListIterator; +/* + * List Iterator opaque data type. + */ + +typedef void (*ListDelF) (void *x); +/* + * Function prototype to deallocate data stored in a list. + * This function is responsible for freeing all memory associated + * with an item, including all subordinate items (if applicable). + */ + +typedef int (*ListCmpF) (void *x, void *y); +/* + * Function prototype for comparing two items in a list. + * Returns less-than-zero if (xy). + */ + +typedef int (*ListFindF) (void *x, void *key); +/* + * Function prototype for matching items in a list. + * Returns non-zero if (x==key); o/w returns zero. + */ + +typedef int (*ListForF) (void *x, void *arg); +/* + * Function prototype for operating on each item in a list. + * Returns less-than-zero on error. + */ + + +/******************************* + * General-Purpose Functions * + *******************************/ + +List list_create (ListDelF f); +/* + * Creates and returns a new empty list, or lsd_nomem_error() on failure. + * The deletion function [f] is used to deallocate memory used by items + * in the list; if this is NULL, memory associated with these items + * will not be freed when the list is destroyed. + * Note: Abandoning a list without calling list_destroy() will result + * in a memory leak. + */ + +void list_destroy (List l); +/* + * Destroys list [l], freeing memory used for list iterators and the + * list itself; if a deletion function was specified when the list + * was created, it will be called for each item in the list. + */ + +int list_is_empty (List l); +/* + * Returns non-zero if list [l] is empty; o/w returns zero. + */ + +int list_count (List l); +/* + * Returns the number of items in list [l]. + */ + + +/*************************** + * List Access Functions * + ***************************/ + +void * list_append (List l, void *x); +/* + * Inserts data [x] at the end of list [l]. + * Returns the data's ptr, or lsd_nomem_error() if insertion failed. + */ + +void * list_prepend (List l, void *x); +/* + * Inserts data [x] at the beginning of list [l]. + * Returns the data's ptr, or lsd_nomem_error() if insertion failed. + */ + +void * list_find_first (List l, ListFindF f, void *key); +/* + * Traverses list [l] using [f] to match each item with [key]. + * Returns a ptr to the first item for which the function [f] + * returns non-zero, or NULL if no such item is found. + * Note: This function differs from list_find() in that it does not require + * a list iterator; it should only be used when all list items are known + * to be unique (according to the function [f]). + */ + +int list_delete_all (List l, ListFindF f, void *key); +/* + * Traverses list [l] using [f] to match each item with [key]. + * Removes all items from the list for which the function [f] returns + * non-zero; if a deletion function was specified when the list was + * created, it will be called to deallocate each item being removed. + * Returns a count of the number of items removed from the list. + */ + +int list_for_each (List l, ListForF f, void *arg); +/* + * For each item in list [l], invokes the function [f] with [arg]. + * Returns a count of the number of items on which [f] was invoked. + * If [f] returns <0 for a given item, the iteration is aborted and the + * function returns the negative of that item's position in the list. + */ + +void list_sort (List l, ListCmpF f); +/* + * Sorts list [l] into ascending order according to the function [f]. + * Note: Sorting a list resets all iterators associated with the list. + * Note: The sort algorithm is stable. + */ + + +/**************************** + * Stack Access Functions * + ****************************/ + +void * list_push (List l, void *x); +/* + * Pushes data [x] onto the top of stack [l]. + * Returns the data's ptr, or lsd_nomem_error() if insertion failed. + */ + +void * list_pop (List l); +/* + * Pops the data item at the top of the stack [l]. + * Returns the data's ptr, or NULL if the stack is empty. + */ + +void * list_peek (List l); +/* + * Peeks at the data item at the top of the stack (or head of the queue) [l]. + * Returns the data's ptr, or NULL if the stack (or queue) is empty. + * Note: The item is not removed from the list. + */ + + +/**************************** + * Queue Access Functions * + ****************************/ + +void * list_enqueue (List l, void *x); +/* + * Enqueues data [x] at the tail of queue [l]. + * Returns the data's ptr, or lsd_nomem_error() if insertion failed. + */ + +void * list_dequeue (List l); +/* + * Dequeues the data item at the head of the queue [l]. + * Returns the data's ptr, or NULL if the queue is empty. + */ + + +/***************************** + * List Iterator Functions * + *****************************/ + +ListIterator list_iterator_create (List l); +/* + * Creates and returns a list iterator for non-destructively traversing + * list [l], or lsd_nomem_error() on failure. + */ + +void list_iterator_reset (ListIterator i); +/* + * Resets the list iterator [i] to start traversal at the beginning + * of the list. + */ + +void list_iterator_destroy (ListIterator i); +/* + * Destroys the list iterator [i]; list iterators not explicitly destroyed + * in this manner will be destroyed when the list is deallocated via + * list_destroy(). + */ + +void * list_next (ListIterator i); +/* + * Returns a ptr to the next item's data, + * or NULL once the end of the list is reached. + * Example: i=list_iterator_create(i); while ((x=list_next(i))) {...} + */ + +void * list_insert (ListIterator i, void *x); +/* + * Inserts data [x] immediately before the last item returned via list + * iterator [i]; once the list iterator reaches the end of the list, + * insertion is made at the list's end. + * Returns the data's ptr, or lsd_nomem_error() if insertion failed. + */ + +void * list_find (ListIterator i, ListFindF f, void *key); +/* + * Traverses the list from the point of the list iterator [i] + * using [f] to match each item with [key]. + * Returns a ptr to the next item for which the function [f] + * returns non-zero, or NULL once the end of the list is reached. + * Example: i=list_iterator_reset(i); while ((x=list_find(i,f,k))) {...} + */ + +void * list_remove (ListIterator i); +/* + * Removes from the list the last item returned via list iterator [i] + * and returns the data's ptr. + * Note: The client is responsible for freeing the returned data. + */ + +int list_delete (ListIterator i); +/* + * Removes from the list the last item returned via list iterator [i]; + * if a deletion function was specified when the list was created, + * it will be called to deallocate the item being removed. + * Returns a count of the number of items removed from the list + * (ie, '1' if the item was removed, and '0' otherwise). + */ + + +#endif /* !LSD_LIST_H */ diff --git a/include/splat.h b/include/splat.h index 69cb387ad..f9341b5d9 100644 --- a/include/splat.h +++ b/include/splat.h @@ -1,7 +1,8 @@ -#ifndef _KZT_H -#define _KZT_H +#ifndef _SPLAT_H +#define _SPLAT_H -#include +#include "list.h" +#include "splat-ctl.h" #define DEV_NAME "/dev/kztctl" #define COLOR_BLACK "\033[0;30m" @@ -23,13 +24,11 @@ #define COLOR_RESET "\033[0m" typedef struct subsystem { - uu_list_node_t sub_node; /* Linkage for global subsystem list */ kzt_user_t sub_desc; /* Subsystem description */ - uu_list_t *sub_tests; /* Assocated subsystem tests list */ + List sub_tests; /* Assocated subsystem tests list */ } subsystem_t; typedef struct test { - uu_list_node_t test_node; /* Linkage for globals test list */ kzt_user_t test_desc; /* Test description */ subsystem_t *test_sub; /* Parent subsystem */ } test_t; @@ -40,8 +39,8 @@ typedef struct cmd_args { int args_do_all; /* Run all tests flag */ int args_do_color; /* Colorize output */ int args_exit_on_error; /* Exit on first error flag */ - uu_list_t *args_tests; /* Requested subsystems/tests */ + List args_tests; /* Requested subsystems/tests */ } cmd_args_t; -#endif /* _KZT_H */ +#endif /* _SPLAT_H */ diff --git a/src/Makefile.am b/src/Makefile.am index 86f519112..51013b8d1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1 +1 @@ -SUBDIRS = cmd spl splat +SUBDIRS = lib cmd spl splat diff --git a/src/cmd/Makefile.am b/src/cmd/Makefile.am index 38a21099c..ae3961a97 100644 --- a/src/cmd/Makefile.am +++ b/src/cmd/Makefile.am @@ -1,3 +1,5 @@ -AM_CFLAGS = @EXTRA_CFLAGS@ -g -O2 -W -Wall -Wstrict-prototypes -Wshadow +AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow +INCLUDES = -I$(top_srcdir)/include sbin_PROGRAMS = splat splat_SOURCES = splat.c +splat_LDFLAGS = $(top_builddir)/src/lib/libcommon.la diff --git a/src/cmd/splat.c b/src/cmd/splat.c index 0ad65490c..56181af3d 100644 --- a/src/cmd/splat.c +++ b/src/cmd/splat.c @@ -1,4 +1,4 @@ -/* Kernel ZFS Test (KZT) user space command interface */ +/* Solaris Porting Layer Aggressive Test (SPLAT) userspace interface */ #include #include @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -29,17 +28,17 @@ static const struct option longOpts[] = { { 0, 0, 0, 0 } }; -static uu_list_t *subsystems; /* Subsystem/tests */ -static uu_list_pool_t *subsystem_pool; /* Subsystem pool */ -static uu_list_pool_t *test_pool; /* Test pool */ +static List subsystems; /* Subsystem/tests */ static int kztctl_fd; /* Control file descriptor */ static char kzt_version[KZT_VERSION_SIZE]; /* Kernel version string */ static char *kzt_buffer = NULL; /* Scratch space area */ static int kzt_buffer_size = 0; /* Scratch space size */ -static void test_list(uu_list_t *, int); +static void test_list(List, int); static int dev_clear(void); +static void subsystem_fini(subsystem_t *); +static void test_fini(test_t *); static int usage(void) { @@ -69,9 +68,8 @@ static subsystem_t *subsystem_init(kzt_user_t *desc) return NULL; memcpy(&sub->sub_desc, desc, sizeof(*desc)); - uu_list_node_init(sub, &sub->sub_node, subsystem_pool); - sub->sub_tests = uu_list_create(test_pool, NULL, 0); + sub->sub_tests = list_create((ListDelF)test_fini); if (sub->sub_tests == NULL) { free(sub); return NULL; @@ -83,8 +81,6 @@ static subsystem_t *subsystem_init(kzt_user_t *desc) static void subsystem_fini(subsystem_t *sub) { assert(sub != NULL); - - uu_list_node_fini(sub, &sub->sub_node, subsystem_pool); free(sub); } @@ -149,13 +145,15 @@ static int subsystem_setup(void) return -ENOMEM; } - uu_list_insert(subsystems, sub, 0); + list_append(subsystems, sub); } free(cfg); return 0; } +/* XXX - Commented out until we sort the lists */ +#if 0 static int subsystem_compare(const void *l_arg, const void *r_arg, void *private) { const subsystem_t *l = l_arg; @@ -169,9 +167,11 @@ static int subsystem_compare(const void *l_arg, const void *r_arg, void *private return 0; } +#endif -static void subsystem_list(uu_list_t *list, int indent) +static void subsystem_list(List l, int indent) { + ListIterator i; subsystem_t *sub; fprintf(stdout, @@ -179,8 +179,9 @@ static void subsystem_list(uu_list_t *list, int indent) "Available KZT Tests " "-------------------------------\n"); - for (sub = uu_list_first(list); sub != NULL; - sub = uu_list_next(list, sub)) { + i = list_iterator_create(l); + + while ((sub = list_next(i))) { fprintf(stdout, "%*s0x%0*x %-*s ---- %s ----\n", indent, "", 4, sub->sub_desc.id, @@ -188,6 +189,8 @@ static void subsystem_list(uu_list_t *list, int indent) sub->sub_desc.desc); test_list(sub->sub_tests, indent + 7); } + + list_iterator_destroy(i); } static test_t *test_init(subsystem_t *sub, kzt_user_t *desc) @@ -200,7 +203,6 @@ static test_t *test_init(subsystem_t *sub, kzt_user_t *desc) test->test_sub = sub; memcpy(&test->test_desc, desc, sizeof(*desc)); - uu_list_node_init(test, &test->test_node, test_pool); return test; } @@ -208,8 +210,6 @@ static test_t *test_init(subsystem_t *sub, kzt_user_t *desc) static void test_fini(test_t *test) { assert(test != NULL); - - uu_list_node_fini(test, &test->test_node, test_pool); free(test); } @@ -274,13 +274,15 @@ static int test_setup(subsystem_t *sub) return -ENOMEM; } - uu_list_insert(sub->sub_tests, test, 0); + list_append(sub->sub_tests, test); } free(cfg); return 0; } +/* XXX - Commented out until we sort the lists */ +#if 0 static int test_compare(const void *l_arg, const void *r_arg, void *private) { const test_t *l = l_arg; @@ -294,27 +296,33 @@ static int test_compare(const void *l_arg, const void *r_arg, void *private) return 0; } +#endif static test_t *test_copy(test_t *test) { return test_init(test->test_sub, &test->test_desc); } -static void test_list(uu_list_t *list, int indent) +static void test_list(List l, int indent) { + ListIterator i; test_t *test; - for (test = uu_list_first(list); test != NULL; - test = uu_list_next(list, test)) + i = list_iterator_create(l); + + while ((test = list_next(i))) fprintf(stdout, "%*s0x%0*x %-*s %-*s\n", indent, "", 04, test->test_desc.id, KZT_NAME_SIZE, test->test_desc.name, KZT_DESC_SIZE, test->test_desc.desc); + + list_iterator_destroy(i); } static test_t *test_find(char *sub_str, char *test_str) { + ListIterator si, ti; subsystem_t *sub; test_t *test; int sub_num, test_num; @@ -326,22 +334,31 @@ static test_t *test_find(char *sub_str, char *test_str) sub_num = strtol(sub_str, NULL, 0); test_num = strtol(test_str, NULL, 0); - for (sub = uu_list_first(subsystems); sub != NULL; - sub = uu_list_next(subsystems, sub)) { + si = list_iterator_create(subsystems); + + while ((sub = list_next(si))) { if (strncmp(sub->sub_desc.name, sub_str, KZT_NAME_SIZE) && sub->sub_desc.id != sub_num) continue; - for (test = uu_list_first(sub->sub_tests); test != NULL; - test = uu_list_next(sub->sub_tests, test)) { + ti = list_iterator_create(sub->sub_tests); + + while ((test = list_next(ti))) { if (!strncmp(test->test_desc.name, test_str, - KZT_NAME_SIZE) || test->test_desc.id == test_num) + KZT_NAME_SIZE) || test->test_desc.id == test_num) { + list_iterator_destroy(ti); + list_iterator_destroy(si); return test; + } } + + list_iterator_destroy(ti); } + list_iterator_destroy(si); + return NULL; } @@ -353,27 +370,35 @@ static int test_add(cmd_args_t *args, test_t *test) if (tmp == NULL) return -ENOMEM; - uu_list_insert(args->args_tests, tmp, 0); + list_append(args->args_tests, tmp); return 0; } static int test_add_all(cmd_args_t *args) { + ListIterator si, ti; subsystem_t *sub; test_t *test; int rc; - for (sub = uu_list_first(subsystems); sub != NULL; - sub = uu_list_next(subsystems, sub)) { + si = list_iterator_create(subsystems); - for (test = uu_list_first(sub->sub_tests); test != NULL; - test = uu_list_next(sub->sub_tests, test)) { + while ((sub = list_next(si))) { + ti = list_iterator_create(sub->sub_tests); - if (rc = test_add(args, test)) + while ((test = list_next(ti))) { + if ((rc = test_add(args, test))) { + list_iterator_destroy(ti); + list_iterator_destroy(si); return rc; + } } + + list_iterator_destroy(ti); } + list_iterator_destroy(si); + return 0; } @@ -428,6 +453,7 @@ static int test_run(cmd_args_t *args, test_t *test) static int tests_run(cmd_args_t *args) { + ListIterator i; test_t *test; int rc; @@ -436,19 +462,23 @@ static int tests_run(cmd_args_t *args) "Running KZT Tests " "-------------------------------\n"); - for (test = uu_list_first(args->args_tests); test != NULL; - test = uu_list_next(args->args_tests, test)) { + i = list_iterator_create(args->args_tests); + while ((test = list_next(i))) { rc = test_run(args, test); - if (rc && args->args_exit_on_error) + if (rc && args->args_exit_on_error) { + list_iterator_destroy(i); return rc; + } } + list_iterator_destroy(i); return 0; } static int args_parse_test(cmd_args_t *args, char *str) { + ListIterator si, ti; subsystem_t *s; test_t *t; char *sub_str, *test_str; @@ -476,21 +506,26 @@ static int args_parse_test(cmd_args_t *args, char *str) if (!strncasecmp(test_str, "all", strlen(test_str)) || (test_num == -1)) test_all = 1; + si = list_iterator_create(subsystems); + if (sub_all) { if (test_all) { /* Add all tests from all subsystems */ - for (s = uu_list_first(subsystems); s != NULL; - s = uu_list_next(subsystems, s)) - for (t = uu_list_first(s->sub_tests);t != NULL; - t = uu_list_next(s->sub_tests, t)) - if (rc = test_add(args, t)) + while ((s = list_next(si))) { + ti = list_iterator_create(s->sub_tests); + while ((t = list_next(ti))) { + if ((rc = test_add(args, t))) { + list_iterator_destroy(ti); goto error_run; + } + } + list_iterator_destroy(ti); + } } else { /* Add a specific test from all subsystems */ - for (s = uu_list_first(subsystems); s != NULL; - s = uu_list_next(subsystems, s)) { - if (t = test_find(s->sub_desc.name,test_str)) { - if (rc = test_add(args, t)) + while ((s = list_next(si))) { + if ((t = test_find(s->sub_desc.name,test_str))) { + if ((rc = test_add(args, t))) goto error_run; flag = 1; @@ -504,21 +539,24 @@ static int args_parse_test(cmd_args_t *args, char *str) } else { if (test_all) { /* Add all tests from a specific subsystem */ - for (s = uu_list_first(subsystems); s != NULL; - s = uu_list_next(subsystems, s)) { + while ((s = list_next(si))) { if (strncasecmp(sub_str, s->sub_desc.name, strlen(sub_str))) continue; - for (t = uu_list_first(s->sub_tests);t != NULL; - t = uu_list_next(s->sub_tests, t)) - if (rc = test_add(args, t)) + ti = list_iterator_create(s->sub_tests); + while ((t = list_next(ti))) { + if ((rc = test_add(args, t))) { + list_iterator_destroy(ti); goto error_run; + } + } + list_iterator_destroy(ti); } } else { /* Add a specific test from a specific subsystem */ - if (t = test_find(sub_str, test_str)) { - if (rc = test_add(args, t)) + if ((t = test_find(sub_str, test_str))) { + if ((rc = test_add(args, t))) goto error_run; } else { fprintf(stderr, "Test '%s:%s' could not be " @@ -528,25 +566,25 @@ static int args_parse_test(cmd_args_t *args, char *str) } } + list_iterator_destroy(si); + return 0; error_run: + list_iterator_destroy(si); + fprintf(stderr, "Test '%s:%s' not added to run list: %d\n", sub_str, test_str, rc); + return rc; } static void args_fini(cmd_args_t *args) { - struct cmd_test *ptr1, *ptr2; - assert(args != NULL); - - - if (args->args_tests != NULL) { - uu_list_destroy(args->args_tests); - } + if (args->args_tests != NULL) + list_destroy(args->args_tests); free(args); } @@ -573,7 +611,7 @@ args_init(int argc, char **argv) args->args_do_all = 0; args->args_do_color = 1; args->args_exit_on_error = 0; - args->args_tests = uu_list_create(test_pool, NULL, 0); + args->args_tests = list_create((ListDelF)test_fini); if (args->args_tests == NULL) { args_fini(args); return NULL; @@ -674,6 +712,7 @@ dev_fini(void) static int dev_init(void) { + ListIterator i; subsystem_t *sub; int rc; @@ -690,7 +729,7 @@ dev_init(void) if ((rc = read(kztctl_fd, kzt_version, KZT_VERSION_SIZE - 1)) == -1) goto error; - if (rc = dev_clear()) + if ((rc = dev_clear())) goto error; if ((rc = dev_size(0)) < 0) @@ -710,11 +749,16 @@ dev_init(void) goto error; /* Determine available tests for all subsystems */ - for (sub = uu_list_first(subsystems); sub != NULL; - sub = uu_list_next(subsystems, sub)) - if ((rc = test_setup(sub)) != 0) - goto error; + i = list_iterator_create(subsystems); + while ((sub = list_next(i))) { + if ((rc = test_setup(sub)) != 0) { + list_iterator_destroy(i); + goto error; + } + } + + list_iterator_destroy(i); return 0; error: @@ -731,42 +775,20 @@ error: int init(void) { - int rc; - - /* Configure the subsystem pool */ - subsystem_pool = uu_list_pool_create("sub_pool", sizeof(subsystem_t), - offsetof(subsystem_t, sub_node), - subsystem_compare, 0); - if (subsystem_pool == NULL) - return -ENOMEM; - - /* Configure the test pool */ - test_pool = uu_list_pool_create("test_pool", sizeof(test_t), - offsetof(test_t, test_node), - test_compare, 0); - if (test_pool == NULL) { - uu_list_pool_destroy(subsystem_pool); - return -ENOMEM; - } + int rc = 0; /* Allocate the subsystem list */ - subsystems = uu_list_create(subsystem_pool, NULL, 0); - if (subsystems == NULL) { - uu_list_pool_destroy(test_pool); - uu_list_pool_destroy(subsystem_pool); - return -ENOMEM; - } + subsystems = list_create((ListDelF)subsystem_fini); + if (subsystems == NULL) + rc = ENOMEM; - return 0; + return rc; } void fini(void) { - /* XXX - Cleanup destroy lists release memory */ - - /* XXX - Remove contents of list first */ - uu_list_destroy(subsystems); + list_destroy(subsystems); } @@ -777,11 +799,11 @@ main(int argc, char **argv) int rc = 0; /* General init */ - if (rc = init()) + if ((rc = init())) return rc; /* Device specific init */ - if (rc = dev_init()) + if ((rc = dev_init())) goto out; /* Argument init and parsing */ @@ -802,12 +824,12 @@ main(int argc, char **argv) /* Add all available test to the list of tests to run */ if (args->args_do_all) { - if (rc = test_add_all(args)) + if ((rc = test_add_all(args))) goto out; } /* Run all the requested tests */ - if (rc = tests_run(args)) + if ((rc = tests_run(args))) goto out; out: diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am new file mode 100644 index 000000000..91c228fb0 --- /dev/null +++ b/src/lib/Makefile.am @@ -0,0 +1,3 @@ +INCLUDES = -I$(top_srcdir)/include +noinst_LTLIBRARIES = libcommon.la +libcommon_la_SOURCES = list.c diff --git a/src/lib/list.c b/src/lib/list.c new file mode 100644 index 000000000..6548cacbc --- /dev/null +++ b/src/lib/list.c @@ -0,0 +1,833 @@ +/***************************************************************************** + * $Id: list.c 3709 2006-11-29 00:51:22Z dun $ + ***************************************************************************** + * Copyright (C) 2001-2002 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Chris Dunlap . + * + * This file is from LSD-Tools, the LLNL Software Development Toolbox. + * + * LSD-Tools is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with LSD-Tools; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + ***************************************************************************** + * Refer to "list.h" for documentation on public functions. + *****************************************************************************/ + + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif /* HAVE_CONFIG_H */ + +#ifdef WITH_PTHREADS +# include +#endif /* WITH_PTHREADS */ + +#include +#include +#include +#include +#include "list.h" + + +/********************* + * lsd_fatal_error * + *********************/ + +#ifdef WITH_LSD_FATAL_ERROR_FUNC +# undef lsd_fatal_error + extern void lsd_fatal_error(char *file, int line, char *mesg); +#else /* !WITH_LSD_FATAL_ERROR_FUNC */ +# ifndef lsd_fatal_error +# include +# include +# include +# define lsd_fatal_error(file, line, mesg) \ + do { \ + fprintf(stderr, "ERROR: [%s:%d] %s: %s\n", \ + file, line, mesg, strerror(errno)); \ + } while (0) +# endif /* !lsd_fatal_error */ +#endif /* !WITH_LSD_FATAL_ERROR_FUNC */ + + +/********************* + * lsd_nomem_error * + *********************/ + +#ifdef WITH_LSD_NOMEM_ERROR_FUNC +# undef lsd_nomem_error + extern void * lsd_nomem_error(char *file, int line, char *mesg); +#else /* !WITH_LSD_NOMEM_ERROR_FUNC */ +# ifndef lsd_nomem_error +# define lsd_nomem_error(file, line, mesg) (NULL) +# endif /* !lsd_nomem_error */ +#endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ + + +/*************** + * Constants * + ***************/ + +#define LIST_ALLOC 32 +#define LIST_MAGIC 0xDEADBEEF + + +/**************** + * Data Types * + ****************/ + +struct listNode { + void *data; /* node's data */ + struct listNode *next; /* next node in list */ +}; + +struct listIterator { + struct list *list; /* the list being iterated */ + struct listNode *pos; /* the next node to be iterated */ + struct listNode **prev; /* addr of 'next' ptr to prv It node */ + struct listIterator *iNext; /* iterator chain for list_destroy() */ +#ifndef NDEBUG + unsigned int magic; /* sentinel for asserting validity */ +#endif /* !NDEBUG */ +}; + +struct list { + struct listNode *head; /* head of the list */ + struct listNode **tail; /* addr of last node's 'next' ptr */ + struct listIterator *iNext; /* iterator chain for list_destroy() */ + ListDelF fDel; /* function to delete node data */ + int count; /* number of nodes in list */ +#ifdef WITH_PTHREADS + pthread_mutex_t mutex; /* mutex to protect access to list */ +#endif /* WITH_PTHREADS */ +#ifndef NDEBUG + unsigned int magic; /* sentinel for asserting validity */ +#endif /* !NDEBUG */ +}; + +typedef struct listNode * ListNode; + + +/**************** + * Prototypes * + ****************/ + +static void * list_node_create (List l, ListNode *pp, void *x); +static void * list_node_destroy (List l, ListNode *pp); +static List list_alloc (void); +static void list_free (List l); +static ListNode list_node_alloc (void); +static void list_node_free (ListNode p); +static ListIterator list_iterator_alloc (void); +static void list_iterator_free (ListIterator i); +static void * list_alloc_aux (int size, void *pfreelist); +static void list_free_aux (void *x, void *pfreelist); + + +/*************** + * Variables * + ***************/ + +static List list_free_lists = NULL; +static ListNode list_free_nodes = NULL; +static ListIterator list_free_iterators = NULL; + +#ifdef WITH_PTHREADS +static pthread_mutex_t list_free_lock = PTHREAD_MUTEX_INITIALIZER; +#endif /* WITH_PTHREADS */ + + +/************ + * Macros * + ************/ + +#ifdef WITH_PTHREADS + +# define list_mutex_init(mutex) \ + do { \ + int e = pthread_mutex_init(mutex, NULL); \ + if (e != 0) { \ + errno = e; \ + lsd_fatal_error(__FILE__, __LINE__, "list mutex init"); \ + abort(); \ + } \ + } while (0) + +# define list_mutex_lock(mutex) \ + do { \ + int e = pthread_mutex_lock(mutex); \ + if (e != 0) { \ + errno = e; \ + lsd_fatal_error(__FILE__, __LINE__, "list mutex lock"); \ + abort(); \ + } \ + } while (0) + +# define list_mutex_unlock(mutex) \ + do { \ + int e = pthread_mutex_unlock(mutex); \ + if (e != 0) { \ + errno = e; \ + lsd_fatal_error(__FILE__, __LINE__, "list mutex unlock"); \ + abort(); \ + } \ + } while (0) + +# define list_mutex_destroy(mutex) \ + do { \ + int e = pthread_mutex_destroy(mutex); \ + if (e != 0) { \ + errno = e; \ + lsd_fatal_error(__FILE__, __LINE__, "list mutex destroy"); \ + abort(); \ + } \ + } while (0) + +# ifndef NDEBUG + static int list_mutex_is_locked (pthread_mutex_t *mutex); +# endif /* !NDEBUG */ + +#else /* !WITH_PTHREADS */ + +# define list_mutex_init(mutex) +# define list_mutex_lock(mutex) +# define list_mutex_unlock(mutex) +# define list_mutex_destroy(mutex) +# define list_mutex_is_locked(mutex) (1) + +#endif /* !WITH_PTHREADS */ + + +/*************** + * Functions * + ***************/ + +List +list_create (ListDelF f) +{ + List l; + + if (!(l = list_alloc())) + return(lsd_nomem_error(__FILE__, __LINE__, "list create")); + l->head = NULL; + l->tail = &l->head; + l->iNext = NULL; + l->fDel = f; + l->count = 0; + list_mutex_init(&l->mutex); + assert(l->magic = LIST_MAGIC); /* set magic via assert abuse */ + return(l); +} + + +void +list_destroy (List l) +{ + ListIterator i, iTmp; + ListNode p, pTmp; + + assert(l != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + i = l->iNext; + while (i) { + assert(i->magic == LIST_MAGIC); + iTmp = i->iNext; + assert(i->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ + list_iterator_free(i); + i = iTmp; + } + p = l->head; + while (p) { + pTmp = p->next; + if (p->data && l->fDel) + l->fDel(p->data); + list_node_free(p); + p = pTmp; + } + assert(l->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ + list_mutex_unlock(&l->mutex); + list_mutex_destroy(&l->mutex); + list_free(l); + return; +} + + +int +list_is_empty (List l) +{ + int n; + + assert(l != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + n = l->count; + list_mutex_unlock(&l->mutex); + return(n == 0); +} + + +int +list_count (List l) +{ + int n; + + assert(l != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + n = l->count; + list_mutex_unlock(&l->mutex); + return(n); +} + + +void * +list_append (List l, void *x) +{ + void *v; + + assert(l != NULL); + assert(x != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + v = list_node_create(l, l->tail, x); + list_mutex_unlock(&l->mutex); + return(v); +} + + +void * +list_prepend (List l, void *x) +{ + void *v; + + assert(l != NULL); + assert(x != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + v = list_node_create(l, &l->head, x); + list_mutex_unlock(&l->mutex); + return(v); +} + + +void * +list_find_first (List l, ListFindF f, void *key) +{ + ListNode p; + void *v = NULL; + + assert(l != NULL); + assert(f != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + for (p=l->head; p; p=p->next) { + if (f(p->data, key)) { + v = p->data; + break; + } + } + list_mutex_unlock(&l->mutex); + return(v); +} + + +int +list_delete_all (List l, ListFindF f, void *key) +{ + ListNode *pp; + void *v; + int n = 0; + + assert(l != NULL); + assert(f != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + pp = &l->head; + while (*pp) { + if (f((*pp)->data, key)) { + if ((v = list_node_destroy(l, pp))) { + if (l->fDel) + l->fDel(v); + n++; + } + } + else { + pp = &(*pp)->next; + } + } + list_mutex_unlock(&l->mutex); + return(n); +} + + +int +list_for_each (List l, ListForF f, void *arg) +{ + ListNode p; + int n = 0; + + assert(l != NULL); + assert(f != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + for (p=l->head; p; p=p->next) { + n++; + if (f(p->data, arg) < 0) { + n = -n; + break; + } + } + list_mutex_unlock(&l->mutex); + return(n); +} + + +void +list_sort (List l, ListCmpF f) +{ +/* Note: Time complexity O(n^2). + */ + ListNode *pp, *ppPrev, *ppPos, pTmp; + ListIterator i; + + assert(l != NULL); + assert(f != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + if (l->count > 1) { + ppPrev = &l->head; + pp = &(*ppPrev)->next; + while (*pp) { + if (f((*pp)->data, (*ppPrev)->data) < 0) { + ppPos = &l->head; + while (f((*pp)->data, (*ppPos)->data) >= 0) + ppPos = &(*ppPos)->next; + pTmp = (*pp)->next; + (*pp)->next = *ppPos; + *ppPos = *pp; + *pp = pTmp; + if (ppPrev == ppPos) + ppPrev = &(*ppPrev)->next; + } + else { + ppPrev = pp; + pp = &(*pp)->next; + } + } + l->tail = pp; + + for (i=l->iNext; i; i=i->iNext) { + assert(i->magic == LIST_MAGIC); + i->pos = i->list->head; + i->prev = &i->list->head; + } + } + list_mutex_unlock(&l->mutex); + return; +} + + +void * +list_push (List l, void *x) +{ + void *v; + + assert(l != NULL); + assert(x != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + v = list_node_create(l, &l->head, x); + list_mutex_unlock(&l->mutex); + return(v); +} + + +void * +list_pop (List l) +{ + void *v; + + assert(l != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + v = list_node_destroy(l, &l->head); + list_mutex_unlock(&l->mutex); + return(v); +} + + +void * +list_peek (List l) +{ + void *v; + + assert(l != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + v = (l->head) ? l->head->data : NULL; + list_mutex_unlock(&l->mutex); + return(v); +} + + +void * +list_enqueue (List l, void *x) +{ + void *v; + + assert(l != NULL); + assert(x != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + v = list_node_create(l, l->tail, x); + list_mutex_unlock(&l->mutex); + return(v); +} + + +void * +list_dequeue (List l) +{ + void *v; + + assert(l != NULL); + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + v = list_node_destroy(l, &l->head); + list_mutex_unlock(&l->mutex); + return(v); +} + + +ListIterator +list_iterator_create (List l) +{ + ListIterator i; + + assert(l != NULL); + if (!(i = list_iterator_alloc())) + return(lsd_nomem_error(__FILE__, __LINE__, "list iterator create")); + i->list = l; + list_mutex_lock(&l->mutex); + assert(l->magic == LIST_MAGIC); + i->pos = l->head; + i->prev = &l->head; + i->iNext = l->iNext; + l->iNext = i; + assert(i->magic = LIST_MAGIC); /* set magic via assert abuse */ + list_mutex_unlock(&l->mutex); + return(i); +} + + +void +list_iterator_reset (ListIterator i) +{ + assert(i != NULL); + assert(i->magic == LIST_MAGIC); + list_mutex_lock(&i->list->mutex); + assert(i->list->magic == LIST_MAGIC); + i->pos = i->list->head; + i->prev = &i->list->head; + list_mutex_unlock(&i->list->mutex); + return; +} + + +void +list_iterator_destroy (ListIterator i) +{ + ListIterator *pi; + + assert(i != NULL); + assert(i->magic == LIST_MAGIC); + list_mutex_lock(&i->list->mutex); + assert(i->list->magic == LIST_MAGIC); + for (pi=&i->list->iNext; *pi; pi=&(*pi)->iNext) { + assert((*pi)->magic == LIST_MAGIC); + if (*pi == i) { + *pi = (*pi)->iNext; + break; + } + } + list_mutex_unlock(&i->list->mutex); + assert(i->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ + list_iterator_free(i); + return; +} + + +void * +list_next (ListIterator i) +{ + ListNode p; + + assert(i != NULL); + assert(i->magic == LIST_MAGIC); + list_mutex_lock(&i->list->mutex); + assert(i->list->magic == LIST_MAGIC); + if ((p = i->pos)) + i->pos = p->next; + if (*i->prev != p) + i->prev = &(*i->prev)->next; + list_mutex_unlock(&i->list->mutex); + return(p ? p->data : NULL); +} + + +void * +list_insert (ListIterator i, void *x) +{ + void *v; + + assert(i != NULL); + assert(x != NULL); + assert(i->magic == LIST_MAGIC); + list_mutex_lock(&i->list->mutex); + assert(i->list->magic == LIST_MAGIC); + v = list_node_create(i->list, i->prev, x); + list_mutex_unlock(&i->list->mutex); + return(v); +} + + +void * +list_find (ListIterator i, ListFindF f, void *key) +{ + void *v; + + assert(i != NULL); + assert(f != NULL); + assert(i->magic == LIST_MAGIC); + while ((v=list_next(i)) && !f(v,key)) {;} + return(v); +} + + +void * +list_remove (ListIterator i) +{ + void *v = NULL; + + assert(i != NULL); + assert(i->magic == LIST_MAGIC); + list_mutex_lock(&i->list->mutex); + assert(i->list->magic == LIST_MAGIC); + if (*i->prev != i->pos) + v = list_node_destroy(i->list, i->prev); + list_mutex_unlock(&i->list->mutex); + return(v); +} + + +int +list_delete (ListIterator i) +{ + void *v; + + assert(i != NULL); + assert(i->magic == LIST_MAGIC); + if ((v = list_remove(i))) { + if (i->list->fDel) + i->list->fDel(v); + return(1); + } + return(0); +} + + +static void * +list_node_create (List l, ListNode *pp, void *x) +{ +/* Inserts data pointed to by [x] into list [l] after [pp], + * the address of the previous node's "next" ptr. + * Returns a ptr to data [x], or NULL if insertion fails. + * This routine assumes the list is already locked upon entry. + */ + ListNode p; + ListIterator i; + + assert(l != NULL); + assert(l->magic == LIST_MAGIC); + assert(list_mutex_is_locked(&l->mutex)); + assert(pp != NULL); + assert(x != NULL); + if (!(p = list_node_alloc())) + return(lsd_nomem_error(__FILE__, __LINE__, "list node create")); + p->data = x; + if (!(p->next = *pp)) + l->tail = &p->next; + *pp = p; + l->count++; + for (i=l->iNext; i; i=i->iNext) { + assert(i->magic == LIST_MAGIC); + if (i->prev == pp) + i->prev = &p->next; + else if (i->pos == p->next) + i->pos = p; + assert((i->pos == *i->prev) || (i->pos == (*i->prev)->next)); + } + return(x); +} + + +static void * +list_node_destroy (List l, ListNode *pp) +{ +/* Removes the node pointed to by [*pp] from from list [l], + * where [pp] is the address of the previous node's "next" ptr. + * Returns the data ptr associated with list item being removed, + * or NULL if [*pp] points to the NULL element. + * This routine assumes the list is already locked upon entry. + */ + void *v; + ListNode p; + ListIterator i; + + assert(l != NULL); + assert(l->magic == LIST_MAGIC); + assert(list_mutex_is_locked(&l->mutex)); + assert(pp != NULL); + if (!(p = *pp)) + return(NULL); + v = p->data; + if (!(*pp = p->next)) + l->tail = pp; + l->count--; + for (i=l->iNext; i; i=i->iNext) { + assert(i->magic == LIST_MAGIC); + if (i->pos == p) + i->pos = p->next, i->prev = pp; + else if (i->prev == &p->next) + i->prev = pp; + assert((i->pos == *i->prev) || (i->pos == (*i->prev)->next)); + } + list_node_free(p); + return(v); +} + + +static List +list_alloc (void) +{ + return(list_alloc_aux(sizeof(struct list), &list_free_lists)); +} + + +static void +list_free (List l) +{ + list_free_aux(l, &list_free_lists); + return; +} + + +static ListNode +list_node_alloc (void) +{ + return(list_alloc_aux(sizeof(struct listNode), &list_free_nodes)); +} + + +static void +list_node_free (ListNode p) +{ + list_free_aux(p, &list_free_nodes); + return; +} + + +static ListIterator +list_iterator_alloc (void) +{ + return(list_alloc_aux(sizeof(struct listIterator), &list_free_iterators)); +} + + +static void +list_iterator_free (ListIterator i) +{ + list_free_aux(i, &list_free_iterators); + return; +} + + +static void * +list_alloc_aux (int size, void *pfreelist) +{ +/* Allocates an object of [size] bytes from the freelist [*pfreelist]. + * Memory is added to the freelist in chunks of size LIST_ALLOC. + * Returns a ptr to the object, or NULL if the memory request fails. + */ + void **px; + void **pfree = pfreelist; + void **plast; + + assert(sizeof(char) == 1); + assert(size >= sizeof(void *)); + assert(pfreelist != NULL); + assert(LIST_ALLOC > 0); + list_mutex_lock(&list_free_lock); + if (!*pfree) { + if ((*pfree = malloc(LIST_ALLOC * size))) { + px = *pfree; + plast = (void **) ((char *) *pfree + ((LIST_ALLOC - 1) * size)); + while (px < plast) + *px = (char *) px + size, px = *px; + *plast = NULL; + } + } + if ((px = *pfree)) + *pfree = *px; + else + errno = ENOMEM; + list_mutex_unlock(&list_free_lock); + return(px); +} + + +static void +list_free_aux (void *x, void *pfreelist) +{ +/* Frees the object [x], returning it to the freelist [*pfreelist]. + */ + void **px = x; + void **pfree = pfreelist; + + assert(x != NULL); + assert(pfreelist != NULL); + list_mutex_lock(&list_free_lock); + *px = *pfree; + *pfree = px; + list_mutex_unlock(&list_free_lock); + return; +} + + +#ifndef NDEBUG +#ifdef WITH_PTHREADS +static int +list_mutex_is_locked (pthread_mutex_t *mutex) +{ +/* Returns true if the mutex is locked; o/w, returns false. + */ + int rc; + + assert(mutex != NULL); + rc = pthread_mutex_trylock(mutex); + return(rc == EBUSY ? 1 : 0); +} +#endif /* WITH_PTHREADS */ +#endif /* !NDEBUG */ diff --git a/src/spl/Makefile.in b/src/spl/Makefile.in index d052fc370..8a8674d6e 100644 --- a/src/spl/Makefile.in +++ b/src/spl/Makefile.in @@ -5,8 +5,9 @@ MODULES := spl DISTFILES = Makefile.in \ linux-kmem.c linux-rwlock.c linux-taskq.c linux-thread.c +EXTRA_CFLAGS += -I$(src) + # Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED -# EXTRA_CFLAGS += -I$(src) # EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \ # -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \ # -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \ diff --git a/src/spl/linux-kmem.c b/src/spl/linux-kmem.c index 7de2b211d..e5ebdc175 100644 --- a/src/spl/linux-kmem.c +++ b/src/spl/linux-kmem.c @@ -1,4 +1,4 @@ -#include +#include "linux-kmem.h" /* * Memory allocation interfaces From 3d4ea0ced6c2400d2b7d62d4f90b1a69d7e1a04e Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 00:59:48 +0000 Subject: [PATCH 0004/1062] More build fixes, I have the kernel module almost building and its feeling a lot more sane, cleaner, and linuxy. I may finish this tonight. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@4 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- configure.ac | 6 ++++-- include/linux-callb.h | 8 ++++---- include/linux-condvar.h | 6 +++--- include/linux-cred.h | 6 +++--- include/linux-generic.h | 6 +++--- include/linux-kmem.h | 6 +++--- include/linux-kstat.h | 8 ++++---- include/linux-mutex.h | 6 +++--- include/linux-random.h | 6 +++--- include/linux-rwlock.h | 8 ++++---- include/linux-taskq.h | 8 ++++---- include/linux-thread.h | 10 +++++----- include/linux-time.h | 8 ++++---- include/linux-timer.h | 6 +++--- include/linux-types.h | 10 +++++----- include/spl.h | 6 +++--- include/splat-ctl.h | 6 +++--- src/spl/Makefile.in | 10 +--------- src/spl/linux-thread.c | 2 +- src/splat/Makefile.in | 9 +-------- 20 files changed, 64 insertions(+), 77 deletions(-) diff --git a/configure.ac b/configure.ac index 833514dc1..215b5091c 100644 --- a/configure.ac +++ b/configure.ac @@ -9,8 +9,6 @@ AC_PROG_CC AC_PROG_LIBTOOL ver=`uname -r` -KERNELCFLAGS= - kernelsrc= kernelbuild= AC_ARG_WITH(kernel, @@ -98,6 +96,10 @@ else AC_MSG_RESULT([no]) fi +# Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build +KERNELMAKE_PARAMS= +KERNELCPPFLAGS="-I`/bin/pwd`/include" + if test "$kernelbuild" != "$kernelsrc"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" fi diff --git a/include/linux-callb.h b/include/linux-callb.h index 5ddb678b3..6ffcfb76e 100644 --- a/include/linux-callb.h +++ b/include/linux-callb.h @@ -1,11 +1,11 @@ -#ifndef _SYS_LINUX_CALLB_H -#define _SYS_LINUX_CALLB_H +#ifndef _LINUX_CALLB_H +#define _LINUX_CALLB_H #ifdef __cplusplus extern "C" { #endif -#include +#include #define DEBUG_CALLB @@ -41,5 +41,5 @@ typedef struct callb_cpr { } #endif -#endif /* _SYS_LINUX_CALLB_H */ +#endif /* _LINUX_CALLB_H */ diff --git a/include/linux-condvar.h b/include/linux-condvar.h index 33ad51539..e4a1779a5 100644 --- a/include/linux-condvar.h +++ b/include/linux-condvar.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_CONDVAR_H -#define _SYS_LINUX_CONDVAR_H +#ifndef _LINUX_CONDVAR_H +#define _LINUX_CONDVAR_H #ifdef __cplusplus extern "C" { @@ -198,4 +198,4 @@ cv_broadcast(kcondvar_t *cvp) if (atomic_read(&cvp->cv_waiters) > 0) wake_up_all(&cvp->cv_event); } -#endif /* _SYS_LINUX_CONDVAR_H */ +#endif /* _LINUX_CONDVAR_H */ diff --git a/include/linux-cred.h b/include/linux-cred.h index 5f308bace..d342aa016 100644 --- a/include/linux-cred.h +++ b/include/linux-cred.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_CRED_H -#define _SYS_LINUX_CRED_H +#ifndef _LINUX_CRED_H +#define _LINUX_CRED_H #ifdef __cplusplus extern "C" { @@ -36,5 +36,5 @@ typedef struct cred { } #endif -#endif /* _SYS_LINUX_CRED_H */ +#endif /* _LINUX_CRED_H */ diff --git a/include/linux-generic.h b/include/linux-generic.h index 5c4f9146a..e36baef0e 100644 --- a/include/linux-generic.h +++ b/include/linux-generic.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_GENERIC_H -#define _SYS_LINUX_GENERIC_H +#ifndef _LINUX_GENERIC_H +#define _LINUX_GENERIC_H #ifdef __cplusplus extern "C" { @@ -69,4 +69,4 @@ static int p0 = 0; } #endif -#endif /* _SYS_LINUX_GENERIC_H */ +#endif /* _LINUX_GENERIC_H */ diff --git a/include/linux-kmem.h b/include/linux-kmem.h index c68344cf3..f08590d1d 100644 --- a/include/linux-kmem.h +++ b/include/linux-kmem.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_KMEM_H -#define _SYS_LINUX_KMEM_H +#ifndef _LINUX_KMEM_H +#define _LINUX_KMEM_H #ifdef __cplusplus extern "C" { @@ -170,4 +170,4 @@ __kmem_cache_destroy(kmem_cache_t *cache); } #endif -#endif /* _SYS_LINUX_KMEM_H */ +#endif /* _LINUX_KMEM_H */ diff --git a/include/linux-kstat.h b/include/linux-kstat.h index 738dbc867..27aefdb9d 100644 --- a/include/linux-kstat.h +++ b/include/linux-kstat.h @@ -1,11 +1,11 @@ -#ifndef _SYS_LINUX_KSTAT_H -#define _SYS_LINUX_KSTAT_H +#ifndef _LINUX_KSTAT_H +#define _LINUX_KSTAT_H #ifdef __cplusplus extern "C" { #endif -#include +#include /* XXX - The minimum functionality here is stubbed out but nothing works. */ @@ -132,5 +132,5 @@ kstat_delete(kstat_t *ksp) } #endif -#endif /* _SYS_LINUX_KSTAT_H */ +#endif /* _LINUX_KSTAT_H */ diff --git a/include/linux-mutex.h b/include/linux-mutex.h index 42056617f..1fea2e7d1 100644 --- a/include/linux-mutex.h +++ b/include/linux-mutex.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_MUTEX_H -#define _SYS_LINUX_MUTEX_H +#ifndef _LINUX_MUTEX_H +#define _LINUX_MUTEX_H #ifdef __cplusplus extern "C" { @@ -115,4 +115,4 @@ mutex_owner(kmutex_t *mp) } #endif -#endif /* _SYS_LINUX_MUTEX_H */ +#endif /* _LINUX_MUTEX_H */ diff --git a/include/linux-random.h b/include/linux-random.h index 51233d48f..78327d0f0 100644 --- a/include/linux-random.h +++ b/include/linux-random.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_RANDOM_H -#define _SYS_LINUX_RANDOM_H +#ifndef _LINUX_RANDOM_H +#define _LINUX_RANDOM_H #ifdef __cplusplus extern "C" { @@ -34,4 +34,4 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len) } #endif -#endif /* _SYS_LINUX_RANDOM_H */ +#endif /* _LINUX_RANDOM_H */ diff --git a/include/linux-rwlock.h b/include/linux-rwlock.h index a6a2787d8..6ceafddf8 100644 --- a/include/linux-rwlock.h +++ b/include/linux-rwlock.h @@ -1,10 +1,10 @@ -#ifndef _SYS_LINUX_RWLOCK_H -#define _SYS_LINUX_RWLOCK_H +#ifndef _LINUX_RWLOCK_H +#define _LINUX_RWLOCK_H #include #include #include -#include +#include #ifdef __cplusplus extern "C" { @@ -220,4 +220,4 @@ rw_owner(krwlock_t *rwlp) } #endif -#endif /* _SYS_LINUX_RWLOCK_H */ +#endif /* _LINUX_RWLOCK_H */ diff --git a/include/linux-taskq.h b/include/linux-taskq.h index 3612f84c0..9680178df 100644 --- a/include/linux-taskq.h +++ b/include/linux-taskq.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_TASKQ_H -#define _SYS_LINUX_TASKQ_H +#ifndef _LINUX_TASKQ_H +#define _LINUX_TASKQ_H #ifdef __cplusplus extern "C" { @@ -23,7 +23,7 @@ extern "C" { #include #include #include -#include +#include #undef DEBUG_TASKQ_UNIMPLEMENTED @@ -83,4 +83,4 @@ extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); } #endif -#endif /* _SYS_LINUX_TASKQ_H */ +#endif /* _LINUX_TASKQ_H */ diff --git a/include/linux-thread.h b/include/linux-thread.h index dc9726322..a1e1296a3 100644 --- a/include/linux-thread.h +++ b/include/linux-thread.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_THREAD_H -#define _SYS_LINUX_THREAD_H +#ifndef _LINUX_THREAD_H +#define _LINUX_THREAD_H #ifdef __cplusplus extern "C" { @@ -7,8 +7,8 @@ extern "C" { #include #include -#include -#include +#include +#include /* * Thread interfaces @@ -44,5 +44,5 @@ kthread_t * __thread_create(caddr_t stk, size_t stksize, } #endif -#endif /* _SYS_LINUX_THREAD_H */ +#endif /* _LINUX_THREAD_H */ diff --git a/include/linux-time.h b/include/linux-time.h index c1105ab6b..792811c69 100644 --- a/include/linux-time.h +++ b/include/linux-time.h @@ -1,5 +1,5 @@ -#ifndef _SYS_TIME_H -#define _SYS_TIME_H +#ifndef _TIME_H +#define _TIME_H #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.16 */ @@ -13,7 +13,7 @@ extern "C" { #endif #include -#include +#include extern unsigned long long monotonic_clock(void); typedef struct timespec timestruc_t; /* definition per SVr4 */ @@ -61,4 +61,4 @@ gethrestime_sec(void) } #endif -#endif /* _SYS_TIME_H */ +#endif /* _TIME_H */ diff --git a/include/linux-timer.h b/include/linux-timer.h index a01579519..0ff296ede 100644 --- a/include/linux-timer.h +++ b/include/linux-timer.h @@ -1,5 +1,5 @@ -#ifndef _SYS_LINUX_TIMER_H -#define _SYS_LINUX_TIMER_H +#ifndef _LINUX_TIMER_H +#define _LINUX_TIMER_H #ifdef __cplusplus extern "C" { @@ -17,5 +17,5 @@ extern "C" { } #endif -#endif /* _SYS_LINUX_TIMER_H */ +#endif /* _LINUX_TIMER_H */ diff --git a/include/linux-types.h b/include/linux-types.h index d2b12a16b..af692e364 100644 --- a/include/linux-types.h +++ b/include/linux-types.h @@ -1,11 +1,11 @@ -#ifndef _SYS_LINUX_TYPES_H -#define _SYS_LINUX_TYPES_H +#ifndef _LINUX_TYPES_H +#define _LINUX_TYPES_H #ifdef __cplusplus extern "C" { #endif -typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; +typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; typedef unsigned long uintptr_t; typedef unsigned long intptr_t; typedef unsigned long ulong_t; @@ -16,7 +16,7 @@ typedef unsigned long long u_offset_t; typedef unsigned long long rlim64_t; typedef long long longlong_t; typedef long long offset_t; -typedef struct task_struct kthread_t; +typedef struct task_struct kthread_t; typedef struct vmem { } vmem_t; typedef short pri_t; @@ -24,4 +24,4 @@ typedef short pri_t; } #endif -#endif /* _SYS_LINUX_TYPES_H */ +#endif /* _LINUX_TYPES_H */ diff --git a/include/spl.h b/include/spl.h index ba38e8105..26e6b8712 100644 --- a/include/spl.h +++ b/include/spl.h @@ -1,4 +1,4 @@ -#ifndef _SYS_SPL_H -#define _SYS_SPL_H +#ifndef _SPL_H +#define _SPL_H -#endif /* _SYS_SPL_H */ +#endif /* _SPL_H */ diff --git a/include/splat-ctl.h b/include/splat-ctl.h index b0e2a69eb..89b8eb7b0 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -1,5 +1,5 @@ -#ifndef _SYS_KZT_H -#define _SYS_KZT_H +#ifndef _SPLAT_CTL_H +#define _SPLAY_CTL_H #ifdef _KERNEL #include @@ -208,4 +208,4 @@ kzt_subsystem_t * kzt_time_init(void); #endif /* _KERNEL */ -#endif /* _SYS_KZT_H */ +#endif /* _SPLAY_CTL_H */ diff --git a/src/spl/Makefile.in b/src/spl/Makefile.in index 8a8674d6e..2a77394d3 100644 --- a/src/spl/Makefile.in +++ b/src/spl/Makefile.in @@ -1,17 +1,9 @@ # Makefile.in for spl kernel module MODULES := spl - DISTFILES = Makefile.in \ linux-kmem.c linux-rwlock.c linux-taskq.c linux-thread.c - -EXTRA_CFLAGS += -I$(src) - -# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED -# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \ -# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \ -# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \ -# -Wno-char-subscripts -Wno-switch +CPPFLAGS += @KERNELCPPFLAGS@ # Solaris porting layer module obj-m := spl.o diff --git a/src/spl/linux-thread.c b/src/spl/linux-thread.c index ad036471a..f3caa6365 100644 --- a/src/spl/linux-thread.c +++ b/src/spl/linux-thread.c @@ -1,4 +1,4 @@ -#include +#include /* * Thread interfaces diff --git a/src/splat/Makefile.in b/src/splat/Makefile.in index 758c4be0a..ebc0fb6cf 100644 --- a/src/splat/Makefile.in +++ b/src/splat/Makefile.in @@ -1,18 +1,11 @@ # Makefile.in for splat kernel module MODULES := splat - DISTFILES = Makefile.in \ splat-kmem.c splat-random.c splat-taskq.c \ splat-time.c splat-condvar.c splat-mutex.c \ splat-rwlock.c splat-thread.c splat-ctl.c - -# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED -# EXTRA_CFLAGS += -I$(src) -# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \ -# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \ -# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \ -# -Wno-char-subscripts -Wno-switch +CPPFLAGS += @KERNELCPPFLAGS@ # Solaris porting layer aggressive tests obj-m := splat.o From f1b59d2620ae2bd977e67e292f9bebc43049872c Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 19:09:51 +0000 Subject: [PATCH 0005/1062] Lots of build fixes. This is turning out to be a very good idea since it forcefully codifing the ABI. Since the shim layer is no longer linked at build time in to the test suite we can;'t cut any corners and get away with it. Everything is working now with the exception of sorting setting Module.symvers properly. This may take a little Makefile reorg. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@5 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/linux-callb.h | 7 ++-- include/linux-condvar.h | 7 ++-- include/linux-cred.h | 7 ++-- include/linux-generic.h | 12 ++++--- include/linux-kmem.h | 23 ++++++------ include/linux-kstat.h | 7 ++-- include/linux-mutex.h | 10 +++--- include/linux-random.h | 7 ++-- include/linux-rwlock.h | 15 ++++---- include/linux-taskq.h | 7 ++-- include/linux-thread.h | 10 +++--- include/linux-time.h | 9 +++-- include/linux-timer.h | 7 ++-- include/linux-types.h | 6 ++-- include/splat-ctl.h | 73 ++++++++++++++++++++++++++++++++------- src/spl/Makefile.in | 3 +- src/spl/linux-generic.c | 8 +++++ src/spl/linux-kmem.c | 14 ++++---- src/spl/linux-rwlock.c | 4 +-- src/spl/linux-taskq.c | 6 ++-- src/spl/linux-thread.c | 11 +++--- src/splat/splat-condvar.c | 3 +- src/splat/splat-ctl.c | 21 ++++------- src/splat/splat-kmem.c | 7 ++-- src/splat/splat-mutex.c | 3 +- src/splat/splat-random.c | 3 +- src/splat/splat-rwlock.c | 3 +- src/splat/splat-taskq.c | 3 +- src/splat/splat-thread.c | 3 +- src/splat/splat-time.c | 3 +- 30 files changed, 182 insertions(+), 120 deletions(-) create mode 100644 src/spl/linux-generic.c diff --git a/include/linux-callb.h b/include/linux-callb.h index 6ffcfb76e..0a34ad2cf 100644 --- a/include/linux-callb.h +++ b/include/linux-callb.h @@ -1,10 +1,11 @@ -#ifndef _LINUX_CALLB_H -#define _LINUX_CALLB_H +#ifndef _SOLARIS_CALLB_H +#define _SOLARIS_CALLB_H #ifdef __cplusplus extern "C" { #endif +#include #include #define DEBUG_CALLB @@ -41,5 +42,5 @@ typedef struct callb_cpr { } #endif -#endif /* _LINUX_CALLB_H */ +#endif /* _SOLARIS_CALLB_H */ diff --git a/include/linux-condvar.h b/include/linux-condvar.h index e4a1779a5..8f5cb922a 100644 --- a/include/linux-condvar.h +++ b/include/linux-condvar.h @@ -1,10 +1,11 @@ -#ifndef _LINUX_CONDVAR_H -#define _LINUX_CONDVAR_H +#ifndef _SOLARIS_CONDVAR_H +#define _SOLARIS_CONDVAR_H #ifdef __cplusplus extern "C" { #endif +#include #include /* The kcondvar_t struct is protected by mutex taken externally before @@ -198,4 +199,4 @@ cv_broadcast(kcondvar_t *cvp) if (atomic_read(&cvp->cv_waiters) > 0) wake_up_all(&cvp->cv_event); } -#endif /* _LINUX_CONDVAR_H */ +#endif /* _SOLARIS_CONDVAR_H */ diff --git a/include/linux-cred.h b/include/linux-cred.h index d342aa016..946810d5e 100644 --- a/include/linux-cred.h +++ b/include/linux-cred.h @@ -1,10 +1,11 @@ -#ifndef _LINUX_CRED_H -#define _LINUX_CRED_H +#ifndef _SOLARIS_CRED_H +#define _SOLARIS_CRED_H #ifdef __cplusplus extern "C" { #endif +#include #include /* XXX - Portions commented out because we really just want to have the type @@ -36,5 +37,5 @@ typedef struct cred { } #endif -#endif /* _LINUX_CRED_H */ +#endif /* _SOLARIS_CRED_H */ diff --git a/include/linux-generic.h b/include/linux-generic.h index e36baef0e..ee77cba57 100644 --- a/include/linux-generic.h +++ b/include/linux-generic.h @@ -1,10 +1,12 @@ -#ifndef _LINUX_GENERIC_H -#define _LINUX_GENERIC_H +#ifndef _SOLARIS_GENERIC_H +#define _SOLARIS_GENERIC_H #ifdef __cplusplus extern "C" { #endif +#include + /* Missing defines. */ #define INT32_MAX INT_MAX @@ -14,7 +16,7 @@ extern "C" { #define MAXNAMELEN 256 #define MAXPATHLEN PATH_MAX #define __va_list va_list -#define _KERNEL 1 +#define _KERNEL __KERNEL__ #define max_ncpus 64 /* 0..MAX_PRIO-1: Process priority @@ -63,10 +65,10 @@ extern "C" { /* Missing globals */ -static int p0 = 0; +extern int p0; #ifdef __cplusplus } #endif -#endif /* _LINUX_GENERIC_H */ +#endif /* _SOLARIS_GENERIC_H */ diff --git a/include/linux-kmem.h b/include/linux-kmem.h index f08590d1d..3025e1a97 100644 --- a/include/linux-kmem.h +++ b/include/linux-kmem.h @@ -1,5 +1,5 @@ -#ifndef _LINUX_KMEM_H -#define _LINUX_KMEM_H +#ifndef _SOLARIS_KMEM_H +#define _SOLARIS_KMEM_H #ifdef __cplusplus extern "C" { @@ -8,6 +8,7 @@ extern "C" { #undef DEBUG_KMEM #undef DEBUG_KMEM_UNIMPLEMENTED +#include #include #include #include @@ -147,15 +148,18 @@ typedef int (*kmem_constructor_t)(void *, void *, int); typedef void (*kmem_destructor_t)(void *, void *); typedef void (*kmem_reclaim_t)(void *); -kmem_cache_t * +extern kmem_cache_t * __kmem_cache_create(char *name, size_t size, size_t align, - int (*constructor)(void *, void *, int), - void (*destructor)(void *, void *), - void (*reclaim)(void *), + kmem_constructor_t constructor, + kmem_destructor_t destructor, + kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); void -__kmem_cache_destroy(kmem_cache_t *cache); +extern __kmem_cache_destroy(kmem_cache_t *cache); + +void +extern __kmem_reap(void); #define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ __kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) @@ -163,11 +167,10 @@ __kmem_cache_destroy(kmem_cache_t *cache); #define kmem_cache_alloc(cache, flags) kmem_cache_alloc(cache, flags) #define kmem_cache_free(cache, ptr) kmem_cache_free(cache, ptr) #define kmem_cache_reap_now(cache) kmem_cache_shrink(cache) -#define kmem_reap() __kmem_reap() - +#define kmem_reap() __kmem_reap() #ifdef __cplusplus } #endif -#endif /* _LINUX_KMEM_H */ +#endif /* _SOLARIS_KMEM_H */ diff --git a/include/linux-kstat.h b/include/linux-kstat.h index 27aefdb9d..eb65811ef 100644 --- a/include/linux-kstat.h +++ b/include/linux-kstat.h @@ -1,10 +1,11 @@ -#ifndef _LINUX_KSTAT_H -#define _LINUX_KSTAT_H +#ifndef _SOLARIS_KSTAT_H +#define _SOLARIS_KSTAT_H #ifdef __cplusplus extern "C" { #endif +#include #include /* XXX - The minimum functionality here is stubbed out but nothing works. */ @@ -132,5 +133,5 @@ kstat_delete(kstat_t *ksp) } #endif -#endif /* _LINUX_KSTAT_H */ +#endif /* _SOLARIS_KSTAT_H */ diff --git a/include/linux-mutex.h b/include/linux-mutex.h index 1fea2e7d1..46406cf59 100644 --- a/include/linux-mutex.h +++ b/include/linux-mutex.h @@ -1,10 +1,12 @@ -#ifndef _LINUX_MUTEX_H -#define _LINUX_MUTEX_H +#ifndef _SOLARIS_MUTEX_H +#define _SOLARIS_MUTEX_H #ifdef __cplusplus extern "C" { #endif +#include + /* See the "Big Theory Statement" in solaris mutex.c. * * Spin mutexes apparently aren't needed by zfs so we assert @@ -19,7 +21,7 @@ extern "C" { #define KM_MAGIC 0x42424242 #define KM_POISON 0x84 - + typedef struct { int km_magic; char *km_name; @@ -115,4 +117,4 @@ mutex_owner(kmutex_t *mp) } #endif -#endif /* _LINUX_MUTEX_H */ +#endif /* _SOLARIS_MUTEX_H */ diff --git a/include/linux-random.h b/include/linux-random.h index 78327d0f0..68ca8dde7 100644 --- a/include/linux-random.h +++ b/include/linux-random.h @@ -1,10 +1,11 @@ -#ifndef _LINUX_RANDOM_H -#define _LINUX_RANDOM_H +#ifndef _SOLARIS_RANDOM_H +#define _SOLARIS_RANDOM_H #ifdef __cplusplus extern "C" { #endif +#include #include /* FIXME: @@ -34,4 +35,4 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len) } #endif -#endif /* _LINUX_RANDOM_H */ +#endif /* _SOLARIS_RANDOM_H */ diff --git a/include/linux-rwlock.h b/include/linux-rwlock.h index 6ceafddf8..d212059e7 100644 --- a/include/linux-rwlock.h +++ b/include/linux-rwlock.h @@ -1,6 +1,7 @@ -#ifndef _LINUX_RWLOCK_H -#define _LINUX_RWLOCK_H +#ifndef _SOLARIS_RWLOCK_H +#define _SOLARIS_RWLOCK_H +#include #include #include #include @@ -32,7 +33,7 @@ typedef struct { int rw_magic; char *rw_name; struct rw_semaphore rw_sem; - struct task_struct *rw_owner; /* holder of the write lock */ + struct task_struct *rw_owner; /* holder of the write lock */ } krwlock_t; static __inline__ void @@ -196,11 +197,11 @@ rw_tryupgrade(krwlock_t *rwlp) * read lock and reacquire it for writing since * we know there are no waiters */ up_read(&rwlp->rw_sem); - + /* returns 1 if success, 0 if contention */ result = down_write_trylock(&rwlp->rw_sem); - - /* Check if upgrade failed. Should not ever happen + + /* Check if upgrade failed. Should not ever happen * if we got to this point */ BUG_ON(!result); BUG_ON(rwlp->rw_owner != NULL); @@ -220,4 +221,4 @@ rw_owner(krwlock_t *rwlp) } #endif -#endif /* _LINUX_RWLOCK_H */ +#endif /* _SOLARIS_RWLOCK_H */ diff --git a/include/linux-taskq.h b/include/linux-taskq.h index 9680178df..90081b25e 100644 --- a/include/linux-taskq.h +++ b/include/linux-taskq.h @@ -1,5 +1,5 @@ -#ifndef _LINUX_TASKQ_H -#define _LINUX_TASKQ_H +#ifndef _SOLARIS_TASKQ_H +#define _SOLARIS_TASKQ_H #ifdef __cplusplus extern "C" { @@ -19,6 +19,7 @@ extern "C" { * forces us to implement dynamic workqueues. Which is all very doable * with a little effort. */ +#include #include #include #include @@ -83,4 +84,4 @@ extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); } #endif -#endif /* _LINUX_TASKQ_H */ +#endif /* _SOLARIS_TASKQ_H */ diff --git a/include/linux-thread.h b/include/linux-thread.h index a1e1296a3..bcee08e47 100644 --- a/include/linux-thread.h +++ b/include/linux-thread.h @@ -1,10 +1,11 @@ -#ifndef _LINUX_THREAD_H -#define _LINUX_THREAD_H +#ifndef _SOLARIS_THREAD_H +#define _SOLARIS_THREAD_H #ifdef __cplusplus extern "C" { #endif +#include #include #include #include @@ -35,14 +36,15 @@ typedef struct proc_s { int foo; } proc_t; -kthread_t * __thread_create(caddr_t stk, size_t stksize, +extern kthread_t *__thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), void *args, size_t len, proc_t *pp, int state, pri_t pri); +extern void __thread_exit(void); #ifdef __cplusplus } #endif -#endif /* _LINUX_THREAD_H */ +#endif /* _SOLARIS_THREAD_H */ diff --git a/include/linux-time.h b/include/linux-time.h index 792811c69..2bbc7b257 100644 --- a/include/linux-time.h +++ b/include/linux-time.h @@ -1,7 +1,5 @@ -#ifndef _TIME_H -#define _TIME_H - -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.16 */ +#ifndef _SOLARIS_TIME_H +#define _SOLARIS_TIME_H /* * Structure returned by gettimeofday(2) system call, @@ -12,6 +10,7 @@ extern "C" { #endif +#include #include #include @@ -61,4 +60,4 @@ gethrestime_sec(void) } #endif -#endif /* _TIME_H */ +#endif /* _SOLARIS_TIME_H */ diff --git a/include/linux-timer.h b/include/linux-timer.h index 0ff296ede..faee64755 100644 --- a/include/linux-timer.h +++ b/include/linux-timer.h @@ -1,10 +1,11 @@ -#ifndef _LINUX_TIMER_H -#define _LINUX_TIMER_H +#ifndef _SOLARIS_TIMER_H +#define _SOLARIS_TIMER_H #ifdef __cplusplus extern "C" { #endif +#include #include #include @@ -17,5 +18,5 @@ extern "C" { } #endif -#endif /* _LINUX_TIMER_H */ +#endif /* _SOLARIS_TIMER_H */ diff --git a/include/linux-types.h b/include/linux-types.h index af692e364..d61b2f21f 100644 --- a/include/linux-types.h +++ b/include/linux-types.h @@ -1,5 +1,5 @@ -#ifndef _LINUX_TYPES_H -#define _LINUX_TYPES_H +#ifndef _SOLARIS_TYPES_H +#define _SOLARIS_TYPES_H #ifdef __cplusplus extern "C" { @@ -24,4 +24,4 @@ typedef short pri_t; } #endif -#endif /* _LINUX_TYPES_H */ +#endif /* _SOLARIS_TYPES_H */ diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 89b8eb7b0..5cc715879 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -1,11 +1,40 @@ #ifndef _SPLAT_CTL_H -#define _SPLAY_CTL_H +#define _SPLAT_CTL_H -#ifdef _KERNEL +#ifdef __KERNEL__ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#endif /* _KERNEL */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* __KERNEL__ */ #define KZT_VERSION "v1.0" #define KZT_VERSION_SIZE 64 @@ -70,7 +99,7 @@ typedef struct kzt_cmd { #define KZT_TEST_UNKNOWN 0xFFF -#ifdef _KERNEL +#ifdef __KERNEL__ #define KZT_SUBSYSTEM_INIT(type) \ ({ kzt_subsystem_t *_sub_; \ \ @@ -79,7 +108,7 @@ typedef struct kzt_cmd { printk(KERN_ERR "Error initializing: " #type "\n"); \ } else { \ spin_lock(&kzt_module_lock); \ - list_add_tail(&(_sub_->subsystem_list), \ + list_add_tail(&(_sub_->subsystem_list), \ &kzt_module_list); \ spin_unlock(&kzt_module_lock); \ } \ @@ -92,10 +121,10 @@ typedef struct kzt_cmd { _id_ = kzt_##type##_id(); \ spin_lock(&kzt_module_lock); \ list_for_each_entry_safe(_sub_, _tmp_, &kzt_module_list, \ - subsystem_list) { \ + subsystem_list) { \ if (_sub_->desc.id == _id_) { \ list_del_init(&(_sub_->subsystem_list)); \ - spin_unlock(&kzt_module_lock); \ + spin_unlock(&kzt_module_lock); \ kzt_##type##_fini(_sub_); \ spin_lock(&kzt_module_lock); \ _flag_ = 1; \ @@ -128,7 +157,7 @@ typedef struct kzt_cmd { #define KZT_TEST_FINI(sub, tid) \ ({ kzt_test_t *_test_, *_tmp_; \ - int _flag_ = 0; \ + int _flag_ = 0; \ \ spin_lock(&((sub)->test_lock)); \ list_for_each_entry_safe(_test_, _tmp_, \ @@ -141,7 +170,7 @@ typedef struct kzt_cmd { spin_unlock(&((sub)->test_lock)); \ \ if (!_flag_) \ - printk(KERN_ERR "Error finalizing: " #tid "\n"); \ + printk(KERN_ERR "Error finalizing: " #tid "\n"); \ }) typedef int (*kzt_test_func_t)(struct file *, void *); @@ -181,7 +210,7 @@ typedef struct kzt_info { spin_lock(&_info_->info_lock); \ \ /* Don't allow the kernel to start a write in the red zone */ \ - if ((int)(_info_->info_head - _info_->info_buffer) > \ + if ((int)(_info_->info_head - _info_->info_buffer) > \ (KZT_INFO_BUFFER_SIZE -KZT_INFO_BUFFER_REDZONE)) { \ _rc_ = -EOVERFLOW; \ } else { \ @@ -206,6 +235,24 @@ kzt_subsystem_t * kzt_taskq_init(void); kzt_subsystem_t * kzt_thread_init(void); kzt_subsystem_t * kzt_time_init(void); -#endif /* _KERNEL */ +void kzt_condvar_fini(kzt_subsystem_t *); +void kzt_kmem_fini(kzt_subsystem_t *); +void kzt_mutex_fini(kzt_subsystem_t *); +void kzt_krng_fini(kzt_subsystem_t *); +void kzt_rwlock_fini(kzt_subsystem_t *); +void kzt_taskq_fini(kzt_subsystem_t *); +void kzt_thread_fini(kzt_subsystem_t *); +void kzt_time_fini(kzt_subsystem_t *); -#endif /* _SPLAY_CTL_H */ +int kzt_condvar_id(void); +int kzt_kmem_id(void); +int kzt_mutex_id(void); +int kzt_krng_id(void); +int kzt_rwlock_id(void); +int kzt_taskq_id(void); +int kzt_thread_id(void); +int kzt_time_id(void); + +#endif /* __KERNEL__ */ + +#endif /* _SPLAT_CTL_H */ diff --git a/src/spl/Makefile.in b/src/spl/Makefile.in index 2a77394d3..82b45a287 100644 --- a/src/spl/Makefile.in +++ b/src/spl/Makefile.in @@ -2,7 +2,8 @@ MODULES := spl DISTFILES = Makefile.in \ - linux-kmem.c linux-rwlock.c linux-taskq.c linux-thread.c + linux-kmem.c linux-rwlock.c linux-taskq.c \ + linux-thread.c linux-generic.c CPPFLAGS += @KERNELCPPFLAGS@ # Solaris porting layer module diff --git a/src/spl/linux-generic.c b/src/spl/linux-generic.c new file mode 100644 index 000000000..fa1ebab85 --- /dev/null +++ b/src/spl/linux-generic.c @@ -0,0 +1,8 @@ +#include "linux-generic.h" + +/* + * Generic support + */ + +int p0 = 0; +EXPORT_SYMBOL(p0); diff --git a/src/spl/linux-kmem.c b/src/spl/linux-kmem.c index e5ebdc175..4dc7c01d8 100644 --- a/src/spl/linux-kmem.c +++ b/src/spl/linux-kmem.c @@ -172,9 +172,9 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) kmem_cache_t * __kmem_cache_create(char *name, size_t size, size_t align, - int (*constructor)(void *, void *, int), - void (*destructor)(void *, void *), - void (*reclaim)(void *), + kmem_constructor_t constructor, + kmem_destructor_t destructor, + kmem_reclaim_t reclaim, void *priv, void *vmp, int flags) { kmem_cache_t *cache; @@ -216,6 +216,7 @@ __kmem_cache_create(char *name, size_t size, size_t align, return cache; } +EXPORT_SYMBOL(__kmem_cache_create); /* Return codes discarded because Solaris implementation has void return */ void @@ -239,11 +240,12 @@ __kmem_cache_destroy(kmem_cache_t *cache) spin_unlock(&kmem_cache_cb_lock); } +EXPORT_SYMBOL(__kmem_cache_destroy); -void +void __kmem_reap(void) { - /* Since there's no easy hook in to linux to force all the registered + /* Since there's no easy hook in to linux to force all the registered * shrinkers to run we just run the ones registered for this shim */ kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); } - +EXPORT_SYMBOL(__kmem_reap); diff --git a/src/spl/linux-rwlock.c b/src/spl/linux-rwlock.c index e95ec1555..24775c414 100644 --- a/src/spl/linux-rwlock.c +++ b/src/spl/linux-rwlock.c @@ -1,4 +1,4 @@ -#include +#include int rw_lock_held(krwlock_t *rwlp) @@ -12,7 +12,7 @@ rw_lock_held(krwlock_t *rwlp) #endif return 1; } - + return 0; } diff --git a/src/spl/linux-taskq.c b/src/spl/linux-taskq.c index 0babd2395..ddcf57c3c 100644 --- a/src/spl/linux-taskq.c +++ b/src/spl/linux-taskq.c @@ -1,4 +1,4 @@ -#include +#include /* * Task queue interface @@ -58,6 +58,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags) return (taskqid_t)wq; } +EXPORT_SYMBOL(__taskq_dispatch); /* XXX - Most args ignored until we decide if it's worth the effort * to emulate the solaris notion of dynamic thread pools. For @@ -72,7 +73,8 @@ taskq_t * __taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { - /* NOTE: Linux workqueue names are limited to 10 chars */ + /* NOTE: Linux workqueue names are limited to 10 chars */ return create_singlethread_workqueue(name); } +EXPORT_SYMBOL(__taskq_create); diff --git a/src/spl/linux-thread.c b/src/spl/linux-thread.c index f3caa6365..9785d50d3 100644 --- a/src/spl/linux-thread.c +++ b/src/spl/linux-thread.c @@ -15,7 +15,7 @@ typedef struct thread_priv_s { wait_queue_head_t tp_waitq; /* Syncronization wait queue */ } thread_priv_t; -int +static int thread_generic_wrapper(void *arg) { thread_priv_t *tp = (thread_priv_t *)arg; @@ -38,8 +38,8 @@ thread_generic_wrapper(void *arg) spin_unlock(&tp->tp_lock); wake_up(&tp->tp_waitq); - /* DO NOT USE 'ARG' AFTER THIS POINT, EVER, EVER, EVER! - * Local variables are used here because after the calling thread + /* DO NOT USE 'ARG' AFTER THIS POINT, EVER, EVER, EVER! + * Local variables are used here because after the calling thread * has been woken up it will exit and this memory will no longer * be safe to access since it was declared on the callers stack. */ if (func) @@ -53,6 +53,7 @@ __thread_exit(void) { return; } +EXPORT_SYMBOL(__thread_exit); /* thread_create() may block forever if it cannot create a thread or * allocate memory. This is preferable to returning a NULL which Solaris @@ -63,7 +64,6 @@ __thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), { thread_priv_t tp; DEFINE_WAIT(wait); - kthread_t *task; long pid; /* Option pp is simply ignored */ @@ -106,8 +106,9 @@ __thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), /* Verify the pid retunred matches the pid in the task struct */ BUG_ON(pid != (tp.tp_task)->pid); - + spin_unlock(&tp.tp_lock); return (kthread_t *)tp.tp_task; } +EXPORT_SYMBOL(__thread_create); diff --git a/src/splat/splat-condvar.c b/src/splat/splat-condvar.c index eaab2ac0a..7c9b55784 100644 --- a/src/splat/splat-condvar.c +++ b/src/splat/splat-condvar.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_CONDVAR 0x0500 #define KZT_CONDVAR_NAME "condvar" diff --git a/src/splat/splat-ctl.c b/src/splat/splat-ctl.c index 5292b0e60..9bff58a65 100644 --- a/src/splat/splat-ctl.c +++ b/src/splat/splat-ctl.c @@ -19,13 +19,7 @@ * Author: Brian Behlendorf */ -#include -#include - -#include -#include -#include -#include +#include #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #include @@ -233,7 +227,7 @@ kzt_test_count(kzt_cfg_t *kcfg, unsigned long arg) { kzt_subsystem_t *sub; kzt_test_t *test; - int rc, i = 0; + int i = 0; /* Subsystem ID passed as arg1 */ sub = kzt_subsystem_find(kcfg->cfg_arg1); @@ -259,7 +253,7 @@ kzt_test_list(kzt_cfg_t *kcfg, unsigned long arg) kzt_subsystem_t *sub; kzt_test_t *test; kzt_cfg_t *tmp; - int size, rc, i = 0; + int size, i = 0; /* Subsystem ID passed as arg1 */ sub = kzt_subsystem_find(kcfg->cfg_arg1); @@ -309,7 +303,6 @@ static int kzt_validate(struct file *file, kzt_subsystem_t *sub, int cmd, void *arg) { kzt_test_t *test; - int rc = 0; spin_lock(&(sub->test_lock)); list_for_each_entry(test, &(sub->test_list), test_list) { @@ -432,7 +425,8 @@ static int kzt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - int minor, rc = 0; + unsigned int minor = iminor(file->f_dentry->d_inode); + int rc = 0; /* Ignore tty ioctls */ if ((cmd & 0xffffff00) == ((int)'T') << 8) @@ -588,7 +582,7 @@ static int __init kzt_init(void) { dev_t dev; - int i, rc; + int rc; spin_lock_init(&kzt_module_lock); INIT_LIST_HEAD(&kzt_module_list); @@ -603,7 +597,7 @@ kzt_init(void) KZT_SUBSYSTEM_INIT(time); dev = MKDEV(KZT_MAJOR, 0); - if (rc = register_chrdev_region(dev, KZT_MINORS, "kztctl")) + if ((rc = register_chrdev_region(dev, KZT_MINORS, "kztctl"))) goto error; /* Support for registering a character driver */ @@ -648,7 +642,6 @@ static void kzt_fini(void) { dev_t dev = MKDEV(KZT_MAJOR, 0); - int i; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) class_simple_device_remove(dev); diff --git a/src/splat/splat-kmem.c b/src/splat/splat-kmem.c index fb40819b5..d0af3fc52 100644 --- a/src/splat/splat-kmem.c +++ b/src/splat/splat-kmem.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_KMEM 0x0100 #define KZT_KMEM_NAME "kmem" @@ -229,7 +228,7 @@ kzt_kmem_test3(struct file *file, void *arg) out_free: if (kcd) kmem_cache_free(cache, kcd); -out_destroy: + kmem_cache_destroy(cache); return rc; } @@ -279,7 +278,7 @@ kzt_kmem_test4(struct file *file, void *arg) kcp.kcp_cache = cache; for (i = 0; i < KZT_KMEM_OBJ_COUNT; i++) { - /* All allocations need not succeed */ + /* All allocations need not succeed */ kcp.kcp_kcd[i] = kmem_cache_alloc(cache, 0); if (!kcp.kcp_kcd[i]) { kzt_vprint(file, KZT_KMEM_TEST4_NAME, diff --git a/src/splat/splat-mutex.c b/src/splat/splat-mutex.c index 254a40de2..47a36308e 100644 --- a/src/splat/splat-mutex.c +++ b/src/splat/splat-mutex.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_MUTEX 0x0400 #define KZT_MUTEX_NAME "mutex" diff --git a/src/splat/splat-random.c b/src/splat/splat-random.c index abb654063..412c1d62a 100644 --- a/src/splat/splat-random.c +++ b/src/splat/splat-random.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_KRNG 0x0300 #define KZT_KRNG_NAME "krng" diff --git a/src/splat/splat-rwlock.c b/src/splat/splat-rwlock.c index 9820937c3..df4585ea3 100644 --- a/src/splat/splat-rwlock.c +++ b/src/splat/splat-rwlock.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_RWLOCK 0x0700 #define KZT_RWLOCK_NAME "rwlock" diff --git a/src/splat/splat-taskq.c b/src/splat/splat-taskq.c index 614e7136c..3d5c075f4 100644 --- a/src/splat/splat-taskq.c +++ b/src/splat/splat-taskq.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_TASKQ 0x0200 #define KZT_TASKQ_NAME "taskq" diff --git a/src/splat/splat-thread.c b/src/splat/splat-thread.c index 0741db1fa..34260c2d6 100644 --- a/src/splat/splat-thread.c +++ b/src/splat/splat-thread.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_THREAD 0x0600 #define KZT_THREAD_NAME "thread" diff --git a/src/splat/splat-time.c b/src/splat/splat-time.c index b7d4ce86e..3e8007a37 100644 --- a/src/splat/splat-time.c +++ b/src/splat/splat-time.c @@ -1,5 +1,4 @@ -#include -#include +#include #define KZT_SUBSYSTEM_TIME 0x0800 #define KZT_TIME_NAME "time" From 15821fd660fde934ddd06e49b1333185a45bc586 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 19:35:54 +0000 Subject: [PATCH 0006/1062] Move dir git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@6 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- {src/lib => lib}/Makefile.am | 0 {src/lib => lib}/list.c | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {src/lib => lib}/Makefile.am (100%) rename {src/lib => lib}/list.c (100%) diff --git a/src/lib/Makefile.am b/lib/Makefile.am similarity index 100% rename from src/lib/Makefile.am rename to lib/Makefile.am diff --git a/src/lib/list.c b/lib/list.c similarity index 100% rename from src/lib/list.c rename to lib/list.c From ce58df922657572db62ec0e0a526d39ee6f17df6 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 19:36:07 +0000 Subject: [PATCH 0007/1062] Move dir git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@7 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- {src/cmd => cmd}/Makefile.am | 0 {src/cmd => cmd}/splat.c | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {src/cmd => cmd}/Makefile.am (100%) rename {src/cmd => cmd}/splat.c (100%) diff --git a/src/cmd/Makefile.am b/cmd/Makefile.am similarity index 100% rename from src/cmd/Makefile.am rename to cmd/Makefile.am diff --git a/src/cmd/splat.c b/cmd/splat.c similarity index 100% rename from src/cmd/splat.c rename to cmd/splat.c From d01858a1ca786b85baff93976f7d300ea542b1a6 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 19:36:20 +0000 Subject: [PATCH 0008/1062] Move dir git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@8 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- {src/spl => spl}/Makefile.in | 0 {src/spl => spl}/linux-generic.c | 0 {src/spl => spl}/linux-kmem.c | 0 {src/spl => spl}/linux-rwlock.c | 0 {src/spl => spl}/linux-taskq.c | 0 {src/spl => spl}/linux-thread.c | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {src/spl => spl}/Makefile.in (100%) rename {src/spl => spl}/linux-generic.c (100%) rename {src/spl => spl}/linux-kmem.c (100%) rename {src/spl => spl}/linux-rwlock.c (100%) rename {src/spl => spl}/linux-taskq.c (100%) rename {src/spl => spl}/linux-thread.c (100%) diff --git a/src/spl/Makefile.in b/spl/Makefile.in similarity index 100% rename from src/spl/Makefile.in rename to spl/Makefile.in diff --git a/src/spl/linux-generic.c b/spl/linux-generic.c similarity index 100% rename from src/spl/linux-generic.c rename to spl/linux-generic.c diff --git a/src/spl/linux-kmem.c b/spl/linux-kmem.c similarity index 100% rename from src/spl/linux-kmem.c rename to spl/linux-kmem.c diff --git a/src/spl/linux-rwlock.c b/spl/linux-rwlock.c similarity index 100% rename from src/spl/linux-rwlock.c rename to spl/linux-rwlock.c diff --git a/src/spl/linux-taskq.c b/spl/linux-taskq.c similarity index 100% rename from src/spl/linux-taskq.c rename to spl/linux-taskq.c diff --git a/src/spl/linux-thread.c b/spl/linux-thread.c similarity index 100% rename from src/spl/linux-thread.c rename to spl/linux-thread.c From 032d12a90053bf86648a91384d39d27e4a3da7c2 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 19:36:31 +0000 Subject: [PATCH 0009/1062] Move dir git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@9 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- {src/splat => splat}/Makefile.in | 0 {src/splat => splat}/splat-condvar.c | 0 {src/splat => splat}/splat-ctl.c | 0 {src/splat => splat}/splat-kmem.c | 0 {src/splat => splat}/splat-mutex.c | 0 {src/splat => splat}/splat-random.c | 0 {src/splat => splat}/splat-rwlock.c | 0 {src/splat => splat}/splat-taskq.c | 0 {src/splat => splat}/splat-thread.c | 0 {src/splat => splat}/splat-time.c | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename {src/splat => splat}/Makefile.in (100%) rename {src/splat => splat}/splat-condvar.c (100%) rename {src/splat => splat}/splat-ctl.c (100%) rename {src/splat => splat}/splat-kmem.c (100%) rename {src/splat => splat}/splat-mutex.c (100%) rename {src/splat => splat}/splat-random.c (100%) rename {src/splat => splat}/splat-rwlock.c (100%) rename {src/splat => splat}/splat-taskq.c (100%) rename {src/splat => splat}/splat-thread.c (100%) rename {src/splat => splat}/splat-time.c (100%) diff --git a/src/splat/Makefile.in b/splat/Makefile.in similarity index 100% rename from src/splat/Makefile.in rename to splat/Makefile.in diff --git a/src/splat/splat-condvar.c b/splat/splat-condvar.c similarity index 100% rename from src/splat/splat-condvar.c rename to splat/splat-condvar.c diff --git a/src/splat/splat-ctl.c b/splat/splat-ctl.c similarity index 100% rename from src/splat/splat-ctl.c rename to splat/splat-ctl.c diff --git a/src/splat/splat-kmem.c b/splat/splat-kmem.c similarity index 100% rename from src/splat/splat-kmem.c rename to splat/splat-kmem.c diff --git a/src/splat/splat-mutex.c b/splat/splat-mutex.c similarity index 100% rename from src/splat/splat-mutex.c rename to splat/splat-mutex.c diff --git a/src/splat/splat-random.c b/splat/splat-random.c similarity index 100% rename from src/splat/splat-random.c rename to splat/splat-random.c diff --git a/src/splat/splat-rwlock.c b/splat/splat-rwlock.c similarity index 100% rename from src/splat/splat-rwlock.c rename to splat/splat-rwlock.c diff --git a/src/splat/splat-taskq.c b/splat/splat-taskq.c similarity index 100% rename from src/splat/splat-taskq.c rename to splat/splat-taskq.c diff --git a/src/splat/splat-thread.c b/splat/splat-thread.c similarity index 100% rename from src/splat/splat-thread.c rename to splat/splat-thread.c diff --git a/src/splat/splat-time.c b/splat/splat-time.c similarity index 100% rename from src/splat/splat-time.c rename to splat/splat-time.c From 1735fa73f4ac6935e5029fbf5c3ce9e7c9617f8f Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 20:28:52 +0000 Subject: [PATCH 0010/1062] New approach git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@10 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c From a0aadf5666d5070e55ab1a6fd58eddf06494010c Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 20:52:44 +0000 Subject: [PATCH 0011/1062] OK, everything builds now. My initial intent was to place all of the directories at the top level but that proved troublesome. The kernel buildsystem and autoconf were conflicting too much. To resolve the issue I moved the kernel bits in to a modules directory which can then only use the kernel build system. We just pass along the likely make targets to the kernel build system. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@11 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- Makefile.am | 3 ++- cmd/Makefile.am | 2 +- configure.ac | 10 +++++----- modules/Makefile.in | 12 ++++++++++++ {spl => modules/spl}/Makefile.in | 8 ++------ {spl => modules/spl}/linux-generic.c | 0 {spl => modules/spl}/linux-kmem.c | 0 {spl => modules/spl}/linux-rwlock.c | 0 {spl => modules/spl}/linux-taskq.c | 0 {spl => modules/spl}/linux-thread.c | 0 {splat => modules/splat}/Makefile.in | 7 +------ {splat => modules/splat}/splat-condvar.c | 0 {splat => modules/splat}/splat-ctl.c | 0 {splat => modules/splat}/splat-kmem.c | 0 {splat => modules/splat}/splat-mutex.c | 0 {splat => modules/splat}/splat-random.c | 0 {splat => modules/splat}/splat-rwlock.c | 0 {splat => modules/splat}/splat-taskq.c | 0 {splat => modules/splat}/splat-thread.c | 0 {splat => modules/splat}/splat-time.c | 0 src/Makefile.am | 1 - 21 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 modules/Makefile.in rename {spl => modules/spl}/Makefile.in (88%) rename {spl => modules/spl}/linux-generic.c (100%) rename {spl => modules/spl}/linux-kmem.c (100%) rename {spl => modules/spl}/linux-rwlock.c (100%) rename {spl => modules/spl}/linux-taskq.c (100%) rename {spl => modules/spl}/linux-thread.c (100%) rename {splat => modules/splat}/Makefile.in (91%) rename {splat => modules/splat}/splat-condvar.c (100%) rename {splat => modules/splat}/splat-ctl.c (100%) rename {splat => modules/splat}/splat-kmem.c (100%) rename {splat => modules/splat}/splat-mutex.c (100%) rename {splat => modules/splat}/splat-random.c (100%) rename {splat => modules/splat}/splat-rwlock.c (100%) rename {splat => modules/splat}/splat-taskq.c (100%) rename {splat => modules/splat}/splat-thread.c (100%) rename {splat => modules/splat}/splat-time.c (100%) delete mode 100644 src/Makefile.am diff --git a/Makefile.am b/Makefile.am index 7abb6ee39..1d219cd85 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,10 @@ AUTOMAKE_OPTIONS = foreign dist-zip -SUBDIRS = src include scripts +SUBDIRS = lib cmd modules include scripts CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub CONFIG_CLEAN_FILES += depcomp install-sh missing mkinstalldirs EXTRA_DIST = autogen.sh rpms: dist Makefile rpmbuild -ta $(distdir).tar.gz + diff --git a/cmd/Makefile.am b/cmd/Makefile.am index ae3961a97..f211db18f 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -2,4 +2,4 @@ AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow INCLUDES = -I$(top_srcdir)/include sbin_PROGRAMS = splat splat_SOURCES = splat.c -splat_LDFLAGS = $(top_builddir)/src/lib/libcommon.la +splat_LDFLAGS = $(top_builddir)/lib/libcommon.la diff --git a/configure.ac b/configure.ac index 215b5091c..3992520ac 100644 --- a/configure.ac +++ b/configure.ac @@ -109,11 +109,11 @@ AC_SUBST(KERNELCPPFLAGS) AC_SUBST(KERNELCFLAGS) AC_CONFIG_FILES([ Makefile - src/Makefile - src/lib/Makefile - src/cmd/Makefile - src/spl/Makefile - src/splat/Makefile + lib/Makefile + cmd/Makefile + modules/Makefile + modules/spl/Makefile + modules/splat/Makefile include/Makefile scripts/Makefile scripts/spl.spec diff --git a/modules/Makefile.in b/modules/Makefile.in new file mode 100644 index 000000000..f1cb0ca46 --- /dev/null +++ b/modules/Makefile.in @@ -0,0 +1,12 @@ +subdir-m += spl +subdir-m += splat + +all: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules + +install uninstall clean distclean maintainer-clean distdir: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + + + + diff --git a/spl/Makefile.in b/modules/spl/Makefile.in similarity index 88% rename from spl/Makefile.in rename to modules/spl/Makefile.in index 82b45a287..134d88227 100644 --- a/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -13,13 +13,12 @@ spl-objs += linux-kmem.o spl-objs += linux-thread.o spl-objs += linux-taskq.o spl-objs += linux-rwlock.o +spl-objs += linux-generic.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ -all: all-spec - -install: all +install: mkdir -p $(DESTDIR)$(splmoduledir) $(INSTALL) -m 644 $(splmodule) $(DESTDIR)$(splmoduledir)/$(splmodule) -/sbin/depmod -a @@ -39,6 +38,3 @@ maintainer-clean: distclean distdir: $(DISTFILES) cp -p $(DISTFILES) $(distdir) - -all-spec: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/spl/linux-generic.c b/modules/spl/linux-generic.c similarity index 100% rename from spl/linux-generic.c rename to modules/spl/linux-generic.c diff --git a/spl/linux-kmem.c b/modules/spl/linux-kmem.c similarity index 100% rename from spl/linux-kmem.c rename to modules/spl/linux-kmem.c diff --git a/spl/linux-rwlock.c b/modules/spl/linux-rwlock.c similarity index 100% rename from spl/linux-rwlock.c rename to modules/spl/linux-rwlock.c diff --git a/spl/linux-taskq.c b/modules/spl/linux-taskq.c similarity index 100% rename from spl/linux-taskq.c rename to modules/spl/linux-taskq.c diff --git a/spl/linux-thread.c b/modules/spl/linux-thread.c similarity index 100% rename from spl/linux-thread.c rename to modules/spl/linux-thread.c diff --git a/splat/Makefile.in b/modules/splat/Makefile.in similarity index 91% rename from splat/Makefile.in rename to modules/splat/Makefile.in index ebc0fb6cf..54155c8de 100644 --- a/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -23,9 +23,7 @@ splat-objs += splat-time.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ -all: all-spec - -install: all +install: mkdir -p $(DESTDIR)$(splatmoduledir) $(INSTALL) -m 644 $(splatmodule) $(DESTDIR)$(splatmoduledir)/$(splatmodule) -/sbin/depmod -a @@ -45,6 +43,3 @@ maintainer-clean: distclean distdir: $(DISTFILES) cp -p $(DISTFILES) $(distdir) - -all-spec: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/splat/splat-condvar.c b/modules/splat/splat-condvar.c similarity index 100% rename from splat/splat-condvar.c rename to modules/splat/splat-condvar.c diff --git a/splat/splat-ctl.c b/modules/splat/splat-ctl.c similarity index 100% rename from splat/splat-ctl.c rename to modules/splat/splat-ctl.c diff --git a/splat/splat-kmem.c b/modules/splat/splat-kmem.c similarity index 100% rename from splat/splat-kmem.c rename to modules/splat/splat-kmem.c diff --git a/splat/splat-mutex.c b/modules/splat/splat-mutex.c similarity index 100% rename from splat/splat-mutex.c rename to modules/splat/splat-mutex.c diff --git a/splat/splat-random.c b/modules/splat/splat-random.c similarity index 100% rename from splat/splat-random.c rename to modules/splat/splat-random.c diff --git a/splat/splat-rwlock.c b/modules/splat/splat-rwlock.c similarity index 100% rename from splat/splat-rwlock.c rename to modules/splat/splat-rwlock.c diff --git a/splat/splat-taskq.c b/modules/splat/splat-taskq.c similarity index 100% rename from splat/splat-taskq.c rename to modules/splat/splat-taskq.c diff --git a/splat/splat-thread.c b/modules/splat/splat-thread.c similarity index 100% rename from splat/splat-thread.c rename to modules/splat/splat-thread.c diff --git a/splat/splat-time.c b/modules/splat/splat-time.c similarity index 100% rename from splat/splat-time.c rename to modules/splat/splat-time.c diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 51013b8d1..000000000 --- a/src/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = lib cmd spl splat From e4009e98c75612fcd75a1f142dfc37fea4b5ac4a Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 20:55:24 +0000 Subject: [PATCH 0012/1062] Quiet libtool git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@12 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 2e5965e73..bf452fdca 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,7 +2,7 @@ find . -type d -name .deps | xargs rm -rf rm -rf config.guess config.sub ltmain.sh -libtoolize +libtoolize --automake aclocal 2>/dev/null && autoheader && automake --add-missing --include-deps # 2>/dev/null && From 70eadc19583d4c90f59bd1a78350657aa3f4afc9 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 21:56:51 +0000 Subject: [PATCH 0013/1062] OK, it builds... and the modules load... now for some more cleanup to remove the remaining vestages of the time it lives with the ZFS code. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@13 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- configure.ac | 2 +- modules/spl/linux-generic.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3992520ac..6b8dd7d36 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(spl, 0.0.1) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([include/config.h]) AC_PROG_INSTALL AC_PROG_CC diff --git a/modules/spl/linux-generic.c b/modules/spl/linux-generic.c index fa1ebab85..e139c351b 100644 --- a/modules/spl/linux-generic.c +++ b/modules/spl/linux-generic.c @@ -1,4 +1,5 @@ #include "linux-generic.h" +#include "config.h" /* * Generic support @@ -6,3 +7,21 @@ int p0 = 0; EXPORT_SYMBOL(p0); + +static int __init spl_init(void) +{ + printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); + return 0; +} + +static void spl_fini(void) +{ + return; +} + +module_init(spl_init); +module_exit(spl_fini); + +MODULE_AUTHOR("Lawrence Livermore National Labs"); +MODULE_DESCRIPTION("Solaris Porting Layer"); +MODULE_LICENSE("GPL"); From 7c50328b40df4733f31d0fb1ef2056581ff71d4e Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 23:42:31 +0000 Subject: [PATCH 0014/1062] More cleanup. - Removed all references to kzt and replaced with splat - Moved portions of include files which do not need to be available to all source files in to local.h files in proper source subdirs. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@14 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- cmd/Makefile.am | 1 + cmd/splat.c | 176 +++++++-------- {include => cmd}/splat.h | 6 +- include/Makefile.am | 2 +- include/splat-ctl.h | 255 +++------------------- modules/splat/Makefile.in | 4 +- modules/splat/splat-condvar.c | 214 +++++++++--------- modules/splat/splat-ctl.c | 381 ++++++++++++++++----------------- modules/splat/splat-internal.h | 191 +++++++++++++++++ modules/splat/splat-kmem.c | 204 +++++++++--------- modules/splat/splat-mutex.c | 148 ++++++------- modules/splat/splat-random.c | 44 ++-- modules/splat/splat-rwlock.c | 347 +++++++++++++++--------------- modules/splat/splat-taskq.c | 156 +++++++------- modules/splat/splat-thread.c | 52 ++--- modules/splat/splat-time.c | 64 +++--- 16 files changed, 1123 insertions(+), 1122 deletions(-) rename {include => cmd}/splat.h (89%) create mode 100644 modules/splat/splat-internal.h diff --git a/cmd/Makefile.am b/cmd/Makefile.am index f211db18f..1a10fa808 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -3,3 +3,4 @@ INCLUDES = -I$(top_srcdir)/include sbin_PROGRAMS = splat splat_SOURCES = splat.c splat_LDFLAGS = $(top_builddir)/lib/libcommon.la +EXTRA_DIST = splat.h diff --git a/cmd/splat.c b/cmd/splat.c index 56181af3d..d0d8e4a8e 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -28,11 +28,13 @@ static const struct option longOpts[] = { { 0, 0, 0, 0 } }; +#define VERSION_SIZE 64 + static List subsystems; /* Subsystem/tests */ -static int kztctl_fd; /* Control file descriptor */ -static char kzt_version[KZT_VERSION_SIZE]; /* Kernel version string */ -static char *kzt_buffer = NULL; /* Scratch space area */ -static int kzt_buffer_size = 0; /* Scratch space size */ +static int splatctl_fd; /* Control file descriptor */ +static char splat_version[VERSION_SIZE]; /* Kernel version string */ +static char *splat_buffer = NULL; /* Scratch space area */ +static int splat_buffer_size = 0; /* Scratch space size */ static void test_list(List, int); @@ -42,7 +44,7 @@ static void test_fini(test_t *); static int usage(void) { - fprintf(stderr, "usage: kzt [hvla] [-t >]\n"); + fprintf(stderr, "usage: splat [hvla] [-t >]\n"); fprintf(stderr, " --help -h This help\n" " --verbose -v Increase verbosity\n" @@ -53,13 +55,13 @@ static int usage(void) { " --nocolor -c Do not colorize output\n"); fprintf(stderr, "\n" "Examples:\n" - " kzt -t kmem:all # Runs all kmem tests\n" - " kzt -t taskq:0x201 # Run taskq test 0x201\n"); + " splat -t kmem:all # Runs all kmem tests\n" + " splat -t taskq:0x201 # Run taskq test 0x201\n"); return 0; } -static subsystem_t *subsystem_init(kzt_user_t *desc) +static subsystem_t *subsystem_init(splat_user_t *desc) { subsystem_t *sub; @@ -86,25 +88,25 @@ static void subsystem_fini(subsystem_t *sub) static int subsystem_setup(void) { - kzt_cfg_t *cfg; + splat_cfg_t *cfg; int i, rc, size, cfg_size; subsystem_t *sub; - kzt_user_t *desc; + splat_user_t *desc; /* Aquire the number of registered subsystems */ cfg_size = sizeof(*cfg); - cfg = (kzt_cfg_t *)malloc(cfg_size); + cfg = (splat_cfg_t *)malloc(cfg_size); if (cfg == NULL) return -ENOMEM; memset(cfg, 0, cfg_size); - cfg->cfg_magic = KZT_CFG_MAGIC; - cfg->cfg_cmd = KZT_CFG_SUBSYSTEM_COUNT; + cfg->cfg_magic = SPLAT_CFG_MAGIC; + cfg->cfg_cmd = SPLAT_CFG_SUBSYSTEM_COUNT; - rc = ioctl(kztctl_fd, KZT_CFG, cfg); + rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); if (rc) { fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); free(cfg); return rc; } @@ -114,20 +116,20 @@ static int subsystem_setup(void) /* Based on the newly aquired number of subsystems allocate enough * memory to get the descriptive information for them all. */ - cfg_size = sizeof(*cfg) + size * sizeof(kzt_user_t); - cfg = (kzt_cfg_t *)malloc(cfg_size); + cfg_size = sizeof(*cfg) + size * sizeof(splat_user_t); + cfg = (splat_cfg_t *)malloc(cfg_size); if (cfg == NULL) return -ENOMEM; memset(cfg, 0, cfg_size); - cfg->cfg_magic = KZT_CFG_MAGIC; - cfg->cfg_cmd = KZT_CFG_SUBSYSTEM_LIST; - cfg->cfg_data.kzt_subsystems.size = size; + cfg->cfg_magic = SPLAT_CFG_MAGIC; + cfg->cfg_cmd = SPLAT_CFG_SUBSYSTEM_LIST; + cfg->cfg_data.splat_subsystems.size = size; - rc = ioctl(kztctl_fd, KZT_CFG, cfg); + rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); if (rc) { fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); free(cfg); return rc; } @@ -135,7 +137,7 @@ static int subsystem_setup(void) /* Add the new subsystems in to the global list */ size = cfg->cfg_rc1; for (i = 0; i < size; i++) { - desc = &(cfg->cfg_data.kzt_subsystems.descs[i]); + desc = &(cfg->cfg_data.splat_subsystems.descs[i]); sub = subsystem_init(desc); if (sub == NULL) { @@ -175,9 +177,9 @@ static void subsystem_list(List l, int indent) subsystem_t *sub; fprintf(stdout, - "------------------------------- " - "Available KZT Tests " - "-------------------------------\n"); + "------------------------------ " + "Available SPLAT Tests " + "------------------------------\n"); i = list_iterator_create(l); @@ -185,7 +187,7 @@ static void subsystem_list(List l, int indent) fprintf(stdout, "%*s0x%0*x %-*s ---- %s ----\n", indent, "", 4, sub->sub_desc.id, - KZT_NAME_SIZE + 7, sub->sub_desc.name, + SPLAT_NAME_SIZE + 7, sub->sub_desc.name, sub->sub_desc.desc); test_list(sub->sub_tests, indent + 7); } @@ -193,7 +195,7 @@ static void subsystem_list(List l, int indent) list_iterator_destroy(i); } -static test_t *test_init(subsystem_t *sub, kzt_user_t *desc) +static test_t *test_init(subsystem_t *sub, splat_user_t *desc) { test_t *test; @@ -215,25 +217,25 @@ static void test_fini(test_t *test) static int test_setup(subsystem_t *sub) { - kzt_cfg_t *cfg; + splat_cfg_t *cfg; int i, rc, size; test_t *test; - kzt_user_t *desc; + splat_user_t *desc; /* Aquire the number of registered tests for the give subsystem */ - cfg = (kzt_cfg_t *)malloc(sizeof(*cfg)); + cfg = (splat_cfg_t *)malloc(sizeof(*cfg)); if (cfg == NULL) return -ENOMEM; memset(cfg, 0, sizeof(*cfg)); - cfg->cfg_magic = KZT_CFG_MAGIC; - cfg->cfg_cmd = KZT_CFG_TEST_COUNT; + cfg->cfg_magic = SPLAT_CFG_MAGIC; + cfg->cfg_cmd = SPLAT_CFG_TEST_COUNT; cfg->cfg_arg1 = sub->sub_desc.id; /* Subsystem of interest */ - rc = ioctl(kztctl_fd, KZT_CFG, cfg); + rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); if (rc) { fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); free(cfg); return rc; } @@ -243,20 +245,20 @@ static int test_setup(subsystem_t *sub) /* Based on the newly aquired number of tests allocate enough * memory to get the descriptive information for them all. */ - cfg = (kzt_cfg_t *)malloc(sizeof(*cfg) + size * sizeof(kzt_user_t)); + cfg = (splat_cfg_t *)malloc(sizeof(*cfg) + size * sizeof(splat_user_t)); if (cfg == NULL) return -ENOMEM; - memset(cfg, 0, sizeof(*cfg) + size * sizeof(kzt_user_t)); - cfg->cfg_magic = KZT_CFG_MAGIC; - cfg->cfg_cmd = KZT_CFG_TEST_LIST; + memset(cfg, 0, sizeof(*cfg) + size * sizeof(splat_user_t)); + cfg->cfg_magic = SPLAT_CFG_MAGIC; + cfg->cfg_cmd = SPLAT_CFG_TEST_LIST; cfg->cfg_arg1 = sub->sub_desc.id; /* Subsystem of interest */ - cfg->cfg_data.kzt_tests.size = size; + cfg->cfg_data.splat_tests.size = size; - rc = ioctl(kztctl_fd, KZT_CFG, cfg); + rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); if (rc) { fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) KZT_CFG, cfg->cfg_cmd, errno); + (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); free(cfg); return rc; } @@ -264,7 +266,7 @@ static int test_setup(subsystem_t *sub) /* Add the new tests in to the relevant subsystems */ size = cfg->cfg_rc1; for (i = 0; i < size; i++) { - desc = &(cfg->cfg_data.kzt_tests.descs[i]); + desc = &(cfg->cfg_data.splat_tests.descs[i]); test = test_init(sub, desc); if (test == NULL) { @@ -314,8 +316,8 @@ static void test_list(List l, int indent) fprintf(stdout, "%*s0x%0*x %-*s %-*s\n", indent, "", 04, test->test_desc.id, - KZT_NAME_SIZE, test->test_desc.name, - KZT_DESC_SIZE, test->test_desc.desc); + SPLAT_NAME_SIZE, test->test_desc.name, + SPLAT_DESC_SIZE, test->test_desc.desc); list_iterator_destroy(i); } @@ -338,7 +340,7 @@ static test_t *test_find(char *sub_str, char *test_str) while ((sub = list_next(si))) { - if (strncmp(sub->sub_desc.name, sub_str, KZT_NAME_SIZE) && + if (strncmp(sub->sub_desc.name, sub_str, SPLAT_NAME_SIZE) && sub->sub_desc.id != sub_num) continue; @@ -347,7 +349,7 @@ static test_t *test_find(char *sub_str, char *test_str) while ((test = list_next(ti))) { if (!strncmp(test->test_desc.name, test_str, - KZT_NAME_SIZE) || test->test_desc.id == test_num) { + SPLAT_NAME_SIZE) || test->test_desc.id == test_num) { list_iterator_destroy(ti); list_iterator_destroy(si); return test; @@ -405,27 +407,27 @@ static int test_add_all(cmd_args_t *args) static int test_run(cmd_args_t *args, test_t *test) { subsystem_t *sub = test->test_sub; - kzt_cmd_t *cmd; + splat_cmd_t *cmd; int rc, cmd_size; dev_clear(); cmd_size = sizeof(*cmd); - cmd = (kzt_cmd_t *)malloc(cmd_size); + cmd = (splat_cmd_t *)malloc(cmd_size); if (cmd == NULL) return -ENOMEM; memset(cmd, 0, cmd_size); - cmd->cmd_magic = KZT_CMD_MAGIC; + cmd->cmd_magic = SPLAT_CMD_MAGIC; cmd->cmd_subsystem = sub->sub_desc.id; cmd->cmd_test = test->test_desc.id; cmd->cmd_data_size = 0; /* Unused feature */ fprintf(stdout, "%*s:%-*s ", - KZT_NAME_SIZE, sub->sub_desc.name, - KZT_NAME_SIZE, test->test_desc.name); + SPLAT_NAME_SIZE, sub->sub_desc.name, + SPLAT_NAME_SIZE, test->test_desc.name); fflush(stdout); - rc = ioctl(kztctl_fd, KZT_CMD, cmd); + rc = ioctl(splatctl_fd, SPLAT_CMD, cmd); if (args->args_do_color) { fprintf(stdout, "%s %s\n", rc ? COLOR_RED "Fail" COLOR_RESET : @@ -440,10 +442,10 @@ static int test_run(cmd_args_t *args, test_t *test) free(cmd); if (args->args_verbose) { - if ((rc = read(kztctl_fd, kzt_buffer, kzt_buffer_size - 1)) < 0) { + if ((rc = read(splatctl_fd, splat_buffer, splat_buffer_size - 1)) < 0) { fprintf(stdout, "Error reading results: %d\n", rc); } else { - fprintf(stdout, "\n%s\n", kzt_buffer); + fprintf(stdout, "\n%s\n", splat_buffer); fflush(stdout); } } @@ -458,9 +460,9 @@ static int tests_run(cmd_args_t *args) int rc; fprintf(stdout, - "------------------------------- " - "Running KZT Tests " - "-------------------------------\n"); + "------------------------------ " + "Running SPLAT Tests " + "------------------------------\n"); i = list_iterator_create(args->args_tests); @@ -656,20 +658,20 @@ args_init(int argc, char **argv) static int dev_clear(void) { - kzt_cfg_t cfg; + splat_cfg_t cfg; int rc; memset(&cfg, 0, sizeof(cfg)); - cfg.cfg_magic = KZT_CFG_MAGIC; - cfg.cfg_cmd = KZT_CFG_BUFFER_CLEAR; + cfg.cfg_magic = SPLAT_CFG_MAGIC; + cfg.cfg_cmd = SPLAT_CFG_BUFFER_CLEAR; cfg.cfg_arg1 = 0; - rc = ioctl(kztctl_fd, KZT_CFG, &cfg); + rc = ioctl(splatctl_fd, SPLAT_CFG, &cfg); if (rc) fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) KZT_CFG, cfg.cfg_cmd, errno); + (unsigned long) SPLAT_CFG, cfg.cfg_cmd, errno); - lseek(kztctl_fd, 0, SEEK_SET); + lseek(splatctl_fd, 0, SEEK_SET); return rc; } @@ -677,18 +679,18 @@ dev_clear(void) static int dev_size(int size) { - kzt_cfg_t cfg; + splat_cfg_t cfg; int rc; memset(&cfg, 0, sizeof(cfg)); - cfg.cfg_magic = KZT_CFG_MAGIC; - cfg.cfg_cmd = KZT_CFG_BUFFER_SIZE; + cfg.cfg_magic = SPLAT_CFG_MAGIC; + cfg.cfg_cmd = SPLAT_CFG_BUFFER_SIZE; cfg.cfg_arg1 = size; - rc = ioctl(kztctl_fd, KZT_CFG, &cfg); + rc = ioctl(splatctl_fd, SPLAT_CFG, &cfg); if (rc) { fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) KZT_CFG, cfg.cfg_cmd, errno); + (unsigned long) SPLAT_CFG, cfg.cfg_cmd, errno); return rc; } @@ -698,13 +700,13 @@ dev_size(int size) static void dev_fini(void) { - if (kzt_buffer) - free(kzt_buffer); + if (splat_buffer) + free(splat_buffer); - if (kztctl_fd != -1) { - if (close(kztctl_fd) == -1) { + if (splatctl_fd != -1) { + if (close(splatctl_fd) == -1) { fprintf(stderr, "Unable to close %s: %d\n", - KZT_DEV, errno); + SPLAT_DEV, errno); } } } @@ -716,17 +718,17 @@ dev_init(void) subsystem_t *sub; int rc; - kztctl_fd = open(KZT_DEV, O_RDONLY); - if (kztctl_fd == -1) { + splatctl_fd = open(SPLAT_DEV, O_RDONLY); + if (splatctl_fd == -1) { fprintf(stderr, "Unable to open %s: %d\n" - "Is the kzt module loaded?\n", KZT_DEV, errno); + "Is the splat module loaded?\n", SPLAT_DEV, errno); rc = errno; goto error; } /* Determine kernel module version string */ - memset(kzt_version, 0, KZT_VERSION_SIZE); - if ((rc = read(kztctl_fd, kzt_version, KZT_VERSION_SIZE - 1)) == -1) + memset(splat_version, 0, VERSION_SIZE); + if ((rc = read(splatctl_fd, splat_version, VERSION_SIZE - 1)) == -1) goto error; if ((rc = dev_clear())) @@ -735,14 +737,14 @@ dev_init(void) if ((rc = dev_size(0)) < 0) goto error; - kzt_buffer_size = rc; - kzt_buffer = (char *)malloc(kzt_buffer_size); - if (kzt_buffer == NULL) { + splat_buffer_size = rc; + splat_buffer = (char *)malloc(splat_buffer_size); + if (splat_buffer == NULL) { rc = -ENOMEM; goto error; } - memset(kzt_buffer, 0, kzt_buffer_size); + memset(splat_buffer, 0, splat_buffer_size); /* Determine available subsystems */ if ((rc = subsystem_setup()) != 0) @@ -762,10 +764,10 @@ dev_init(void) return 0; error: - if (kztctl_fd != -1) { - if (close(kztctl_fd) == -1) { + if (splatctl_fd != -1) { + if (close(splatctl_fd) == -1) { fprintf(stderr, "Unable to close %s: %d\n", - KZT_DEV, errno); + SPLAT_DEV, errno); } } @@ -814,7 +816,7 @@ main(int argc, char **argv) /* Generic kernel version string */ if (args->args_verbose) - fprintf(stdout, "%s", kzt_version); + fprintf(stdout, "%s", splat_version); /* Print the available test list and exit */ if (args->args_do_list) { diff --git a/include/splat.h b/cmd/splat.h similarity index 89% rename from include/splat.h rename to cmd/splat.h index f9341b5d9..869805723 100644 --- a/include/splat.h +++ b/cmd/splat.h @@ -4,7 +4,7 @@ #include "list.h" #include "splat-ctl.h" -#define DEV_NAME "/dev/kztctl" +#define DEV_NAME "/dev/splatctl" #define COLOR_BLACK "\033[0;30m" #define COLOR_DK_GRAY "\033[1;30m" #define COLOR_BLUE "\033[0;34m" @@ -24,12 +24,12 @@ #define COLOR_RESET "\033[0m" typedef struct subsystem { - kzt_user_t sub_desc; /* Subsystem description */ + splat_user_t sub_desc; /* Subsystem description */ List sub_tests; /* Assocated subsystem tests list */ } subsystem_t; typedef struct test { - kzt_user_t test_desc; /* Test description */ + splat_user_t test_desc; /* Test description */ subsystem_t *test_sub; /* Parent subsystem */ } test_t; diff --git a/include/Makefile.am b/include/Makefile.am index 5b063fd09..6fb965048 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST = spl.h -EXTRA_DIST += splat.h splat-ctl.h +EXTRA_DIST += splat-ctl.h EXTRA_DIST += linux-condvar.h linux-kmem.h linux-random.h linux-thread.h EXTRA_DIST += linux-types.h linux-cred.h linux-kstat.h linux-rwlock.h EXTRA_DIST += linux-time.h linux-callb.h linux-generic.h linux-mutex.h diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 5cc715879..d905340fb 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -1,59 +1,25 @@ #ifndef _SPLAT_CTL_H #define _SPLAT_CTL_H -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +/* Contains shared definitions which both the userspace + * and kernelspace portions of splat must agree on. + */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#define SPLAT_MAJOR 229 /* XXX - Arbitrary */ +#define SPLAT_MINORS 1 +#define SPLAT_DEV "/dev/splatctl" -#endif /* __KERNEL__ */ +#define SPLAT_NAME_SIZE 12 +#define SPLAT_DESC_SIZE 60 -#define KZT_VERSION "v1.0" -#define KZT_VERSION_SIZE 64 - -#define KZT_MAJOR 229 /* XXX - Arbitrary */ -#define KZT_MINORS 1 -#define KZT_DEV "/dev/kztctl" - -#define KZT_NAME_SIZE 12 -#define KZT_DESC_SIZE 60 - -typedef struct kzt_user { - char name[KZT_NAME_SIZE]; /* short name */ - char desc[KZT_DESC_SIZE]; /* short description */ +typedef struct splat_user { + char name[SPLAT_NAME_SIZE]; /* short name */ + char desc[SPLAT_DESC_SIZE]; /* short description */ int id; /* unique numeric id */ -} kzt_user_t; +} splat_user_t; -#define KZT_CFG_MAGIC 0x15263748U -typedef struct kzt_cfg { +#define SPLAT_CFG_MAGIC 0x15263748U +typedef struct splat_cfg { unsigned int cfg_magic; /* Unique magic */ int cfg_cmd; /* Config command */ int cfg_arg1; /* Config command arg 1 */ @@ -61,198 +27,41 @@ typedef struct kzt_cfg { union { struct { int size; - kzt_user_t descs[0]; - } kzt_subsystems; + splat_user_t descs[0]; + } splat_subsystems; struct { int size; - kzt_user_t descs[0]; - } kzt_tests; + splat_user_t descs[0]; + } splat_tests; } cfg_data; -} kzt_cfg_t; +} splat_cfg_t; -#define KZT_CMD_MAGIC 0x9daebfc0U -typedef struct kzt_cmd { +#define SPLAT_CMD_MAGIC 0x9daebfc0U +typedef struct splat_cmd { unsigned int cmd_magic; /* Unique magic */ int cmd_subsystem; /* Target subsystem */ int cmd_test; /* Subsystem test */ int cmd_data_size; /* Extra opaque data */ char cmd_data_str[0]; /* Opaque data region */ -} kzt_cmd_t; +} splat_cmd_t; /* Valid ioctls */ -#define KZT_CFG _IOWR('f', 101, long) -#define KZT_CMD _IOWR('f', 102, long) +#define SPLAT_CFG _IOWR('f', 101, long) +#define SPLAT_CMD _IOWR('f', 102, long) /* Valid configuration commands */ -#define KZT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ -#define KZT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ -#define KZT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ -#define KZT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ -#define KZT_CFG_TEST_COUNT 0x201 /* Number of tests */ -#define KZT_CFG_TEST_LIST 0x202 /* List of N tests */ +#define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ +#define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ +#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ +#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ +#define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ +#define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ /* Valid subsystem and test commands defined in each subsystem, we do * need to be careful to avoid colisions. That alone may argue to define * them all here, for now we just define the global error codes. */ -#define KZT_SUBSYSTEM_UNKNOWN 0xF00 -#define KZT_TEST_UNKNOWN 0xFFF - - -#ifdef __KERNEL__ -#define KZT_SUBSYSTEM_INIT(type) \ -({ kzt_subsystem_t *_sub_; \ - \ - _sub_ = (kzt_subsystem_t *)kzt_##type##_init(); \ - if (_sub_ == NULL) { \ - printk(KERN_ERR "Error initializing: " #type "\n"); \ - } else { \ - spin_lock(&kzt_module_lock); \ - list_add_tail(&(_sub_->subsystem_list), \ - &kzt_module_list); \ - spin_unlock(&kzt_module_lock); \ - } \ -}) - -#define KZT_SUBSYSTEM_FINI(type) \ -({ kzt_subsystem_t *_sub_, *_tmp_; \ - int _id_, _flag_ = 0; \ - \ - _id_ = kzt_##type##_id(); \ - spin_lock(&kzt_module_lock); \ - list_for_each_entry_safe(_sub_, _tmp_, &kzt_module_list, \ - subsystem_list) { \ - if (_sub_->desc.id == _id_) { \ - list_del_init(&(_sub_->subsystem_list)); \ - spin_unlock(&kzt_module_lock); \ - kzt_##type##_fini(_sub_); \ - spin_lock(&kzt_module_lock); \ - _flag_ = 1; \ - } \ - } \ - spin_unlock(&kzt_module_lock); \ - \ - if (!_flag_) \ - printk(KERN_ERR "Error finalizing: " #type "\n"); \ -}) - -#define KZT_TEST_INIT(sub, n, d, tid, func) \ -({ kzt_test_t *_test_; \ - \ - _test_ = (kzt_test_t *)kmalloc(sizeof(*_test_), GFP_KERNEL); \ - if (_test_ == NULL) { \ - printk(KERN_ERR "Error initializing: " n "/" #tid" \n");\ - } else { \ - memset(_test_, 0, sizeof(*_test_)); \ - strncpy(_test_->desc.name, n, KZT_NAME_SIZE); \ - strncpy(_test_->desc.desc, d, KZT_DESC_SIZE); \ - _test_->desc.id = tid; \ - _test_->test = func; \ - INIT_LIST_HEAD(&(_test_->test_list)); \ - spin_lock(&((sub)->test_lock)); \ - list_add_tail(&(_test_->test_list),&((sub)->test_list));\ - spin_unlock(&((sub)->test_lock)); \ - } \ -}) - -#define KZT_TEST_FINI(sub, tid) \ -({ kzt_test_t *_test_, *_tmp_; \ - int _flag_ = 0; \ - \ - spin_lock(&((sub)->test_lock)); \ - list_for_each_entry_safe(_test_, _tmp_, \ - &((sub)->test_list), test_list) { \ - if (_test_->desc.id == tid) { \ - list_del_init(&(_test_->test_list)); \ - _flag_ = 1; \ - } \ - } \ - spin_unlock(&((sub)->test_lock)); \ - \ - if (!_flag_) \ - printk(KERN_ERR "Error finalizing: " #tid "\n"); \ -}) - -typedef int (*kzt_test_func_t)(struct file *, void *); - -typedef struct kzt_test { - struct list_head test_list; - kzt_user_t desc; - kzt_test_func_t test; -} kzt_test_t; - -typedef struct kzt_subsystem { - struct list_head subsystem_list;/* List had to chain entries */ - kzt_user_t desc; - spinlock_t test_lock; - struct list_head test_list; -} kzt_subsystem_t; - -#define KZT_INFO_BUFFER_SIZE 65536 -#define KZT_INFO_BUFFER_REDZONE 256 - -typedef struct kzt_info { - spinlock_t info_lock; - int info_size; - char *info_buffer; - char *info_head; /* Internal kernel use only */ -} kzt_info_t; - -#define sym2str(sym) (char *)(#sym) - -#define kzt_print(file, format, args...) \ -({ kzt_info_t *_info_ = (kzt_info_t *)file->private_data; \ - int _rc_; \ - \ - ASSERT(_info_); \ - ASSERT(_info_->info_buffer); \ - \ - spin_lock(&_info_->info_lock); \ - \ - /* Don't allow the kernel to start a write in the red zone */ \ - if ((int)(_info_->info_head - _info_->info_buffer) > \ - (KZT_INFO_BUFFER_SIZE -KZT_INFO_BUFFER_REDZONE)) { \ - _rc_ = -EOVERFLOW; \ - } else { \ - _rc_ = sprintf(_info_->info_head, format, args); \ - if (_rc_ >= 0) \ - _info_->info_head += _rc_; \ - } \ - \ - spin_unlock(&_info_->info_lock); \ - _rc_; \ -}) - -#define kzt_vprint(file, test, format, args...) \ - kzt_print(file, "%*s: " format, KZT_NAME_SIZE, test, args) - -kzt_subsystem_t * kzt_condvar_init(void); -kzt_subsystem_t * kzt_kmem_init(void); -kzt_subsystem_t * kzt_mutex_init(void); -kzt_subsystem_t * kzt_krng_init(void); -kzt_subsystem_t * kzt_rwlock_init(void); -kzt_subsystem_t * kzt_taskq_init(void); -kzt_subsystem_t * kzt_thread_init(void); -kzt_subsystem_t * kzt_time_init(void); - -void kzt_condvar_fini(kzt_subsystem_t *); -void kzt_kmem_fini(kzt_subsystem_t *); -void kzt_mutex_fini(kzt_subsystem_t *); -void kzt_krng_fini(kzt_subsystem_t *); -void kzt_rwlock_fini(kzt_subsystem_t *); -void kzt_taskq_fini(kzt_subsystem_t *); -void kzt_thread_fini(kzt_subsystem_t *); -void kzt_time_fini(kzt_subsystem_t *); - -int kzt_condvar_id(void); -int kzt_kmem_id(void); -int kzt_mutex_id(void); -int kzt_krng_id(void); -int kzt_rwlock_id(void); -int kzt_taskq_id(void); -int kzt_thread_id(void); -int kzt_time_id(void); - -#endif /* __KERNEL__ */ +#define SPLAT_SUBSYSTEM_UNKNOWN 0xF00 +#define SPLAT_TEST_UNKNOWN 0xFFF #endif /* _SPLAT_CTL_H */ diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index 54155c8de..29cec4581 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -4,7 +4,9 @@ MODULES := splat DISTFILES = Makefile.in \ splat-kmem.c splat-random.c splat-taskq.c \ splat-time.c splat-condvar.c splat-mutex.c \ - splat-rwlock.c splat-thread.c splat-ctl.c + splat-rwlock.c splat-thread.c \ + splat-ctl.c splat-internal.h + CPPFLAGS += @KERNELCPPFLAGS@ # Solaris porting layer aggressive tests diff --git a/modules/splat/splat-condvar.c b/modules/splat/splat-condvar.c index 7c9b55784..d1b49303f 100644 --- a/modules/splat/splat-condvar.c +++ b/modules/splat/splat-condvar.c @@ -1,32 +1,32 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_CONDVAR 0x0500 -#define KZT_CONDVAR_NAME "condvar" -#define KZT_CONDVAR_DESC "Kernel Condition Variable Tests" +#define SPLAT_SUBSYSTEM_CONDVAR 0x0500 +#define SPLAT_CONDVAR_NAME "condvar" +#define SPLAT_CONDVAR_DESC "Kernel Condition Variable Tests" -#define KZT_CONDVAR_TEST1_ID 0x0501 -#define KZT_CONDVAR_TEST1_NAME "signal1" -#define KZT_CONDVAR_TEST1_DESC "Wake a single thread, cv_wait()/cv_signal()" +#define SPLAT_CONDVAR_TEST1_ID 0x0501 +#define SPLAT_CONDVAR_TEST1_NAME "signal1" +#define SPLAT_CONDVAR_TEST1_DESC "Wake a single thread, cv_wait()/cv_signal()" -#define KZT_CONDVAR_TEST2_ID 0x0502 -#define KZT_CONDVAR_TEST2_NAME "broadcast1" -#define KZT_CONDVAR_TEST2_DESC "Wake all threads, cv_wait()/cv_broadcast()" +#define SPLAT_CONDVAR_TEST2_ID 0x0502 +#define SPLAT_CONDVAR_TEST2_NAME "broadcast1" +#define SPLAT_CONDVAR_TEST2_DESC "Wake all threads, cv_wait()/cv_broadcast()" -#define KZT_CONDVAR_TEST3_ID 0x0503 -#define KZT_CONDVAR_TEST3_NAME "signal2" -#define KZT_CONDVAR_TEST3_DESC "Wake a single thread, cv_wait_timeout()/cv_signal()" +#define SPLAT_CONDVAR_TEST3_ID 0x0503 +#define SPLAT_CONDVAR_TEST3_NAME "signal2" +#define SPLAT_CONDVAR_TEST3_DESC "Wake a single thread, cv_wait_timeout()/cv_signal()" -#define KZT_CONDVAR_TEST4_ID 0x0504 -#define KZT_CONDVAR_TEST4_NAME "broadcast2" -#define KZT_CONDVAR_TEST4_DESC "Wake all threads, cv_wait_timeout()/cv_broadcast()" +#define SPLAT_CONDVAR_TEST4_ID 0x0504 +#define SPLAT_CONDVAR_TEST4_NAME "broadcast2" +#define SPLAT_CONDVAR_TEST4_DESC "Wake all threads, cv_wait_timeout()/cv_broadcast()" -#define KZT_CONDVAR_TEST5_ID 0x0505 -#define KZT_CONDVAR_TEST5_NAME "timeout" -#define KZT_CONDVAR_TEST5_DESC "Timeout thread, cv_wait_timeout()" +#define SPLAT_CONDVAR_TEST5_ID 0x0505 +#define SPLAT_CONDVAR_TEST5_NAME "timeout" +#define SPLAT_CONDVAR_TEST5_DESC "Timeout thread, cv_wait_timeout()" -#define KZT_CONDVAR_TEST_MAGIC 0x115599DDUL -#define KZT_CONDVAR_TEST_NAME "condvar_test" -#define KZT_CONDVAR_TEST_COUNT 8 +#define SPLAT_CONDVAR_TEST_MAGIC 0x115599DDUL +#define SPLAT_CONDVAR_TEST_NAME "condvar_test" +#define SPLAT_CONDVAR_TEST_COUNT 8 typedef struct condvar_priv { unsigned long cv_magic; @@ -43,22 +43,22 @@ typedef struct condvar_thr { } condvar_thr_t; int -kzt_condvar_test12_thread(void *arg) +splat_condvar_test12_thread(void *arg) { condvar_thr_t *ct = (condvar_thr_t *)arg; condvar_priv_t *cv = ct->ct_cvp; char name[16]; - ASSERT(cv->cv_magic == KZT_CONDVAR_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", KZT_CONDVAR_TEST_NAME, ct->ct_id); + ASSERT(cv->cv_magic == SPLAT_CONDVAR_TEST_MAGIC); + snprintf(name, sizeof(name),"%s%d",SPLAT_CONDVAR_TEST_NAME,ct->ct_id); daemonize(name); mutex_enter(&cv->cv_mtx); - kzt_vprint(cv->cv_file, ct->ct_name, + splat_vprint(cv->cv_file, ct->ct_name, "%s thread sleeping with %d waiters\n", name, atomic_read(&cv->cv_condvar.cv_waiters)); cv_wait(&cv->cv_condvar, &cv->cv_mtx); - kzt_vprint(cv->cv_file, ct->ct_name, + splat_vprint(cv->cv_file, ct->ct_name, "%s thread woken %d waiters remain\n", name, atomic_read(&cv->cv_condvar.cv_waiters)); mutex_exit(&cv->cv_mtx); @@ -67,27 +67,27 @@ kzt_condvar_test12_thread(void *arg) } static int -kzt_condvar_test1(struct file *file, void *arg) +splat_condvar_test1(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[KZT_CONDVAR_TEST_COUNT]; - condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + long pids[SPLAT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; - cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; - mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; ct[i].ct_id = i; - ct[i].ct_name = KZT_CONDVAR_TEST1_NAME; + ct[i].ct_name = SPLAT_CONDVAR_TEST1_NAME; ct[i].ct_rc = 0; - pids[i] = kernel_thread(kzt_condvar_test12_thread, &ct[i], 0); + pids[i] = kernel_thread(splat_condvar_test12_thread, &ct[i], 0); if (pids[i] >= 0) count++; } @@ -107,7 +107,7 @@ kzt_condvar_test1(struct file *file, void *arg) if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) continue; - kzt_vprint(file, KZT_CONDVAR_TEST1_NAME, "Attempted to " + splat_vprint(file, SPLAT_CONDVAR_TEST1_NAME, "Attempted to " "wake %d thread but work %d threads woke\n", 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); rc = -EINVAL; @@ -115,7 +115,7 @@ kzt_condvar_test1(struct file *file, void *arg) } if (!rc) - kzt_vprint(file, KZT_CONDVAR_TEST1_NAME, "Correctly woke " + splat_vprint(file, SPLAT_CONDVAR_TEST1_NAME, "Correctly woke " "%d sleeping threads %d at a time\n", count, 1); /* Wait until that last nutex is dropped */ @@ -131,27 +131,27 @@ kzt_condvar_test1(struct file *file, void *arg) } static int -kzt_condvar_test2(struct file *file, void *arg) +splat_condvar_test2(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[KZT_CONDVAR_TEST_COUNT]; - condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + long pids[SPLAT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; - cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; - mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; ct[i].ct_id = i; - ct[i].ct_name = KZT_CONDVAR_TEST2_NAME; + ct[i].ct_name = SPLAT_CONDVAR_TEST2_NAME; ct[i].ct_rc = 0; - pids[i] = kernel_thread(kzt_condvar_test12_thread, &ct[i], 0); + pids[i] = kernel_thread(splat_condvar_test12_thread, &ct[i], 0); if (pids[i] > 0) count++; } @@ -167,7 +167,7 @@ kzt_condvar_test2(struct file *file, void *arg) while ((atomic_read(&cv.cv_condvar.cv_waiters) > 0) || mutex_owner(&cv.cv_mtx)) schedule(); - kzt_vprint(file, KZT_CONDVAR_TEST2_NAME, "Correctly woke all " + splat_vprint(file, SPLAT_CONDVAR_TEST2_NAME, "Correctly woke all " "%d sleeping threads at once\n", count); /* Wake everything for the failure case */ @@ -178,19 +178,19 @@ kzt_condvar_test2(struct file *file, void *arg) } int -kzt_condvar_test34_thread(void *arg) +splat_condvar_test34_thread(void *arg) { condvar_thr_t *ct = (condvar_thr_t *)arg; condvar_priv_t *cv = ct->ct_cvp; char name[16]; clock_t rc; - ASSERT(cv->cv_magic == KZT_CONDVAR_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", KZT_CONDVAR_TEST_NAME, ct->ct_id); + ASSERT(cv->cv_magic == SPLAT_CONDVAR_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", SPLAT_CONDVAR_TEST_NAME, ct->ct_id); daemonize(name); mutex_enter(&cv->cv_mtx); - kzt_vprint(cv->cv_file, ct->ct_name, + splat_vprint(cv->cv_file, ct->ct_name, "%s thread sleeping with %d waiters\n", name, atomic_read(&cv->cv_condvar.cv_waiters)); @@ -199,10 +199,10 @@ kzt_condvar_test34_thread(void *arg) rc = cv_timedwait(&cv->cv_condvar, &cv->cv_mtx, lbolt + HZ * 3); if (rc == -1) { ct->ct_rc = -ETIMEDOUT; - kzt_vprint(cv->cv_file, ct->ct_name, "%s thread timed out, " + splat_vprint(cv->cv_file, ct->ct_name, "%s thread timed out, " "should have been woken\n", name); } else { - kzt_vprint(cv->cv_file, ct->ct_name, + splat_vprint(cv->cv_file, ct->ct_name, "%s thread woken %d waiters remain\n", name, atomic_read(&cv->cv_condvar.cv_waiters)); } @@ -213,27 +213,27 @@ kzt_condvar_test34_thread(void *arg) } static int -kzt_condvar_test3(struct file *file, void *arg) +splat_condvar_test3(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[KZT_CONDVAR_TEST_COUNT]; - condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + long pids[SPLAT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; - cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; - mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; ct[i].ct_id = i; - ct[i].ct_name = KZT_CONDVAR_TEST3_NAME; + ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; ct[i].ct_rc = 0; - pids[i] = kernel_thread(kzt_condvar_test34_thread, &ct[i], 0); + pids[i] = kernel_thread(splat_condvar_test34_thread, &ct[i], 0); if (pids[i] >= 0) count++; } @@ -253,7 +253,7 @@ kzt_condvar_test3(struct file *file, void *arg) if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) continue; - kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Attempted to " + splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Attempted to " "wake %d thread but work %d threads woke\n", 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); rc = -EINVAL; @@ -266,7 +266,7 @@ kzt_condvar_test3(struct file *file, void *arg) rc = ct[i].ct_rc; if (!rc) - kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Correctly woke " + splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Correctly woke " "%d sleeping threads %d at a time\n", count, 1); /* Wait until that last nutex is dropped */ @@ -282,27 +282,27 @@ kzt_condvar_test3(struct file *file, void *arg) } static int -kzt_condvar_test4(struct file *file, void *arg) +splat_condvar_test4(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[KZT_CONDVAR_TEST_COUNT]; - condvar_thr_t ct[KZT_CONDVAR_TEST_COUNT]; + long pids[SPLAT_CONDVAR_TEST_COUNT]; + condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; - cv.cv_magic = KZT_CONDVAR_TEST_MAGIC; + cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; - mutex_init(&cv.cv_mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - for (i = 0; i < KZT_CONDVAR_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; ct[i].ct_id = i; - ct[i].ct_name = KZT_CONDVAR_TEST3_NAME; + ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; ct[i].ct_rc = 0; - pids[i] = kernel_thread(kzt_condvar_test34_thread, &ct[i], 0); + pids[i] = kernel_thread(splat_condvar_test34_thread, &ct[i], 0); if (pids[i] >= 0) count++; } @@ -322,7 +322,7 @@ kzt_condvar_test4(struct file *file, void *arg) if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) continue; - kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Attempted to " + splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Attempted to " "wake %d thread but work %d threads woke\n", 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); rc = -EINVAL; @@ -335,7 +335,7 @@ kzt_condvar_test4(struct file *file, void *arg) rc = ct[i].ct_rc; if (!rc) - kzt_vprint(file, KZT_CONDVAR_TEST3_NAME, "Correctly woke " + splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Correctly woke " "%d sleeping threads %d at a time\n", count, 1); /* Wait until that last nutex is dropped */ @@ -351,7 +351,7 @@ kzt_condvar_test4(struct file *file, void *arg) } static int -kzt_condvar_test5(struct file *file, void *arg) +splat_condvar_test5(struct file *file, void *arg) { kcondvar_t condvar; kmutex_t mtx; @@ -360,10 +360,10 @@ kzt_condvar_test5(struct file *file, void *arg) int32_t remain_delta; int rc = 0; - mutex_init(&mtx, KZT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&condvar, KZT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + mutex_init(&mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); + cv_init(&condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); - kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, "Thread going to sleep for " + splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread going to sleep for " "%d second and expecting to be woken by timeout\n", 1); /* Allow a 1 second timeout, plenty long to validate correctness. */ @@ -378,19 +378,19 @@ kzt_condvar_test5(struct file *file, void *arg) if (time_left == -1) { if (time_delta >= HZ) { - kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, + splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread correctly timed out and was asleep " "for %d.%d seconds (%d second min)\n", (int)whole_delta, remain_delta, 1); } else { - kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, + splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread correctly timed out but was only " "asleep for %d.%d seconds (%d second " "min)\n", (int)whole_delta, remain_delta, 1); rc = -ETIMEDOUT; } } else { - kzt_vprint(file, KZT_CONDVAR_TEST5_NAME, + splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread exited after only %d.%d seconds, it " "did not hit the %d second timeout\n", (int)whole_delta, remain_delta, 1); @@ -403,51 +403,51 @@ kzt_condvar_test5(struct file *file, void *arg) return rc; } -kzt_subsystem_t * -kzt_condvar_init(void) +splat_subsystem_t * +splat_condvar_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_CONDVAR_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_CONDVAR_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_CONDVAR_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_CONDVAR_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_CONDVAR; + sub->desc.id = SPLAT_SUBSYSTEM_CONDVAR; - KZT_TEST_INIT(sub, KZT_CONDVAR_TEST1_NAME, KZT_CONDVAR_TEST1_DESC, - KZT_CONDVAR_TEST1_ID, kzt_condvar_test1); - KZT_TEST_INIT(sub, KZT_CONDVAR_TEST2_NAME, KZT_CONDVAR_TEST2_DESC, - KZT_CONDVAR_TEST2_ID, kzt_condvar_test2); - KZT_TEST_INIT(sub, KZT_CONDVAR_TEST3_NAME, KZT_CONDVAR_TEST3_DESC, - KZT_CONDVAR_TEST3_ID, kzt_condvar_test3); - KZT_TEST_INIT(sub, KZT_CONDVAR_TEST4_NAME, KZT_CONDVAR_TEST4_DESC, - KZT_CONDVAR_TEST4_ID, kzt_condvar_test4); - KZT_TEST_INIT(sub, KZT_CONDVAR_TEST5_NAME, KZT_CONDVAR_TEST5_DESC, - KZT_CONDVAR_TEST5_ID, kzt_condvar_test5); + SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST1_NAME, SPLAT_CONDVAR_TEST1_DESC, + SPLAT_CONDVAR_TEST1_ID, splat_condvar_test1); + SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST2_NAME, SPLAT_CONDVAR_TEST2_DESC, + SPLAT_CONDVAR_TEST2_ID, splat_condvar_test2); + SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST3_NAME, SPLAT_CONDVAR_TEST3_DESC, + SPLAT_CONDVAR_TEST3_ID, splat_condvar_test3); + SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST4_NAME, SPLAT_CONDVAR_TEST4_DESC, + SPLAT_CONDVAR_TEST4_ID, splat_condvar_test4); + SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST5_NAME, SPLAT_CONDVAR_TEST5_DESC, + SPLAT_CONDVAR_TEST5_ID, splat_condvar_test5); return sub; } void -kzt_condvar_fini(kzt_subsystem_t *sub) +splat_condvar_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_CONDVAR_TEST5_ID); - KZT_TEST_FINI(sub, KZT_CONDVAR_TEST4_ID); - KZT_TEST_FINI(sub, KZT_CONDVAR_TEST3_ID); - KZT_TEST_FINI(sub, KZT_CONDVAR_TEST2_ID); - KZT_TEST_FINI(sub, KZT_CONDVAR_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST5_ID); + SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST1_ID); kfree(sub); } int -kzt_condvar_id(void) { - return KZT_SUBSYSTEM_CONDVAR; +splat_condvar_id(void) { + return SPLAT_SUBSYSTEM_CONDVAR; } diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index 9bff58a65..968acc82a 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -1,25 +1,23 @@ /* - * My intent is the create a loadable kzt (kernel ZFS test) module - * which can be used as an access point to run in kernel ZFS regression - * tests. Why do we need this when we have ztest? Well ztest.c only - * excersises the ZFS code proper, it cannot be used to validate the - * linux kernel shim primatives. This also provides a nice hook for - * any other in kernel regression tests we wish to run such as direct - * in-kernel tests against the DMU. + * My intent is to create a loadable 'splat' (solaris porting layer + * aggressive test) module which can be used as an access point to + * run in kernel Solaris ABI regression tests. This provides a + * nice mechanism to validate the shim primates are working properly. * - * The basic design is the kzt module is that it is constructed of - * various kzt_* source files each of which contains regression tests. - * For example the kzt_linux_kmem.c file contains tests for validating - * kmem correctness. When the kzt module is loaded kzt_*_init() - * will be called for each subsystems tests, similarly kzt_*_fini() is - * called when the kzt module is removed. Each test can then be + * The basic design is the splat module is that it is constructed of + * various splat_* source files each of which contains regression tests. + * For example the splat_linux_kmem.c file contains tests for validating + * kmem correctness. When the splat module is loaded splat_*_init() + * will be called for each subsystems tests, similarly splat_*_fini() is + * called when the splat module is removed. Each test can then be * run by making an ioctl() call from a userspace control application * to pick the subsystem and test which should be run. * * Author: Brian Behlendorf */ -#include +#include "splat-internal.h" +#include #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #include @@ -29,29 +27,29 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -static struct class_simple *kzt_class; +static struct class_simple *splat_class; #else -static struct class *kzt_class; +static struct class *splat_class; #endif -static struct list_head kzt_module_list; -static spinlock_t kzt_module_lock; +static struct list_head splat_module_list; +static spinlock_t splat_module_lock; static int -kzt_open(struct inode *inode, struct file *file) +splat_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); - kzt_info_t *info; + splat_info_t *info; - if (minor >= KZT_MINORS) + if (minor >= SPLAT_MINORS) return -ENXIO; - info = (kzt_info_t *)kmalloc(sizeof(*info), GFP_KERNEL); + info = (splat_info_t *)kmalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) return -ENOMEM; spin_lock_init(&info->info_lock); - info->info_size = KZT_INFO_BUFFER_SIZE; - info->info_buffer = (char *)vmalloc(KZT_INFO_BUFFER_SIZE); + info->info_size = SPLAT_INFO_BUFFER_SIZE; + info->info_buffer = (char *)vmalloc(SPLAT_INFO_BUFFER_SIZE); if (info->info_buffer == NULL) { kfree(info); return -ENOMEM; @@ -60,18 +58,16 @@ kzt_open(struct inode *inode, struct file *file) info->info_head = info->info_buffer; file->private_data = (void *)info; - kzt_print(file, "Kernel ZFS Tests %s\n", KZT_VERSION); - return 0; } static int -kzt_release(struct inode *inode, struct file *file) +splat_release(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); - kzt_info_t *info = (kzt_info_t *)file->private_data; + splat_info_t *info = (splat_info_t *)file->private_data; - if (minor >= KZT_MINORS) + if (minor >= SPLAT_MINORS) return -ENXIO; ASSERT(info); @@ -84,9 +80,9 @@ kzt_release(struct inode *inode, struct file *file) } static int -kzt_buffer_clear(struct file *file, kzt_cfg_t *kcfg, unsigned long arg) +splat_buffer_clear(struct file *file, splat_cfg_t *kcfg, unsigned long arg) { - kzt_info_t *info = (kzt_info_t *)file->private_data; + splat_info_t *info = (splat_info_t *)file->private_data; ASSERT(info); ASSERT(info->info_buffer); @@ -100,9 +96,9 @@ kzt_buffer_clear(struct file *file, kzt_cfg_t *kcfg, unsigned long arg) } static int -kzt_buffer_size(struct file *file, kzt_cfg_t *kcfg, unsigned long arg) +splat_buffer_size(struct file *file, splat_cfg_t *kcfg, unsigned long arg) { - kzt_info_t *info = (kzt_info_t *)file->private_data; + splat_info_t *info = (splat_info_t *)file->private_data; char *buf; int min, size, rc = 0; @@ -131,7 +127,7 @@ kzt_buffer_size(struct file *file, kzt_cfg_t *kcfg, unsigned long arg) kcfg->cfg_rc1 = info->info_size; - if (copy_to_user((struct kzt_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) + if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) rc = -EFAULT; out: spin_unlock(&info->info_lock); @@ -140,46 +136,46 @@ out: } -static kzt_subsystem_t * -kzt_subsystem_find(int id) { - kzt_subsystem_t *sub; +static splat_subsystem_t * +splat_subsystem_find(int id) { + splat_subsystem_t *sub; - spin_lock(&kzt_module_lock); - list_for_each_entry(sub, &kzt_module_list, subsystem_list) { + spin_lock(&splat_module_lock); + list_for_each_entry(sub, &splat_module_list, subsystem_list) { if (id == sub->desc.id) { - spin_unlock(&kzt_module_lock); + spin_unlock(&splat_module_lock); return sub; } } - spin_unlock(&kzt_module_lock); + spin_unlock(&splat_module_lock); return NULL; } static int -kzt_subsystem_count(kzt_cfg_t *kcfg, unsigned long arg) +splat_subsystem_count(splat_cfg_t *kcfg, unsigned long arg) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; int i = 0; - spin_lock(&kzt_module_lock); - list_for_each_entry(sub, &kzt_module_list, subsystem_list) + spin_lock(&splat_module_lock); + list_for_each_entry(sub, &splat_module_list, subsystem_list) i++; - spin_unlock(&kzt_module_lock); + spin_unlock(&splat_module_lock); kcfg->cfg_rc1 = i; - if (copy_to_user((struct kzt_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) + if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) return -EFAULT; return 0; } static int -kzt_subsystem_list(kzt_cfg_t *kcfg, unsigned long arg) +splat_subsystem_list(splat_cfg_t *kcfg, unsigned long arg) { - kzt_subsystem_t *sub; - kzt_cfg_t *tmp; + splat_subsystem_t *sub; + splat_cfg_t *tmp; int size, i = 0; /* Structure will be sized large enough for N subsystem entries @@ -188,8 +184,8 @@ kzt_subsystem_list(kzt_cfg_t *kcfg, unsigned long arg) * cfg_rc1. If the caller does not provide enough entries * for all subsystems we will truncate the list to avoid overrun. */ - size = sizeof(*tmp) + kcfg->cfg_data.kzt_subsystems.size * - sizeof(kzt_user_t); + size = sizeof(*tmp) + kcfg->cfg_data.splat_subsystems.size * + sizeof(splat_user_t); tmp = kmalloc(size, GFP_KERNEL); if (tmp == NULL) return -ENOMEM; @@ -198,22 +194,22 @@ kzt_subsystem_list(kzt_cfg_t *kcfg, unsigned long arg) memset(tmp, 0, size); memcpy(tmp, kcfg, sizeof(*kcfg)); - spin_lock(&kzt_module_lock); - list_for_each_entry(sub, &kzt_module_list, subsystem_list) { - strncpy(tmp->cfg_data.kzt_subsystems.descs[i].name, - sub->desc.name, KZT_NAME_SIZE); - strncpy(tmp->cfg_data.kzt_subsystems.descs[i].desc, - sub->desc.desc, KZT_DESC_SIZE); - tmp->cfg_data.kzt_subsystems.descs[i].id = sub->desc.id; + spin_lock(&splat_module_lock); + list_for_each_entry(sub, &splat_module_list, subsystem_list) { + strncpy(tmp->cfg_data.splat_subsystems.descs[i].name, + sub->desc.name, SPLAT_NAME_SIZE); + strncpy(tmp->cfg_data.splat_subsystems.descs[i].desc, + sub->desc.desc, SPLAT_DESC_SIZE); + tmp->cfg_data.splat_subsystems.descs[i].id = sub->desc.id; /* Truncate list if we are about to overrun alloc'ed memory */ - if ((i++) == kcfg->cfg_data.kzt_subsystems.size) + if ((i++) == kcfg->cfg_data.splat_subsystems.size) break; } - spin_unlock(&kzt_module_lock); + spin_unlock(&splat_module_lock); tmp->cfg_rc1 = i; - if (copy_to_user((struct kzt_cfg_t __user *)arg, tmp, size)) { + if (copy_to_user((struct splat_cfg_t __user *)arg, tmp, size)) { kfree(tmp); return -EFAULT; } @@ -223,14 +219,14 @@ kzt_subsystem_list(kzt_cfg_t *kcfg, unsigned long arg) } static int -kzt_test_count(kzt_cfg_t *kcfg, unsigned long arg) +splat_test_count(splat_cfg_t *kcfg, unsigned long arg) { - kzt_subsystem_t *sub; - kzt_test_t *test; + splat_subsystem_t *sub; + splat_test_t *test; int i = 0; /* Subsystem ID passed as arg1 */ - sub = kzt_subsystem_find(kcfg->cfg_arg1); + sub = splat_subsystem_find(kcfg->cfg_arg1); if (sub == NULL) return -EINVAL; @@ -241,22 +237,22 @@ kzt_test_count(kzt_cfg_t *kcfg, unsigned long arg) spin_unlock(&(sub->test_lock)); kcfg->cfg_rc1 = i; - if (copy_to_user((struct kzt_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) + if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) return -EFAULT; return 0; } static int -kzt_test_list(kzt_cfg_t *kcfg, unsigned long arg) +splat_test_list(splat_cfg_t *kcfg, unsigned long arg) { - kzt_subsystem_t *sub; - kzt_test_t *test; - kzt_cfg_t *tmp; + splat_subsystem_t *sub; + splat_test_t *test; + splat_cfg_t *tmp; int size, i = 0; /* Subsystem ID passed as arg1 */ - sub = kzt_subsystem_find(kcfg->cfg_arg1); + sub = splat_subsystem_find(kcfg->cfg_arg1); if (sub == NULL) return -EINVAL; @@ -266,7 +262,7 @@ kzt_test_list(kzt_cfg_t *kcfg, unsigned long arg) * cfg_rc1. If the caller does not provide enough entries * for all tests we will truncate the list to avoid overrun. */ - size = sizeof(*tmp)+kcfg->cfg_data.kzt_tests.size*sizeof(kzt_user_t); + size = sizeof(*tmp)+kcfg->cfg_data.splat_tests.size*sizeof(splat_user_t); tmp = kmalloc(size, GFP_KERNEL); if (tmp == NULL) return -ENOMEM; @@ -277,20 +273,20 @@ kzt_test_list(kzt_cfg_t *kcfg, unsigned long arg) spin_lock(&(sub->test_lock)); list_for_each_entry(test, &(sub->test_list), test_list) { - strncpy(tmp->cfg_data.kzt_tests.descs[i].name, - test->desc.name, KZT_NAME_SIZE); - strncpy(tmp->cfg_data.kzt_tests.descs[i].desc, - test->desc.desc, KZT_DESC_SIZE); - tmp->cfg_data.kzt_tests.descs[i].id = test->desc.id; + strncpy(tmp->cfg_data.splat_tests.descs[i].name, + test->desc.name, SPLAT_NAME_SIZE); + strncpy(tmp->cfg_data.splat_tests.descs[i].desc, + test->desc.desc, SPLAT_DESC_SIZE); + tmp->cfg_data.splat_tests.descs[i].id = test->desc.id; /* Truncate list if we are about to overrun alloc'ed memory */ - if ((i++) == kcfg->cfg_data.kzt_tests.size) + if ((i++) == kcfg->cfg_data.splat_tests.size) break; } spin_unlock(&(sub->test_lock)); tmp->cfg_rc1 = i; - if (copy_to_user((struct kzt_cfg_t __user *)arg, tmp, size)) { + if (copy_to_user((struct splat_cfg_t __user *)arg, tmp, size)) { kfree(tmp); return -EFAULT; } @@ -300,9 +296,9 @@ kzt_test_list(kzt_cfg_t *kcfg, unsigned long arg) } static int -kzt_validate(struct file *file, kzt_subsystem_t *sub, int cmd, void *arg) +splat_validate(struct file *file, splat_subsystem_t *sub, int cmd, void *arg) { - kzt_test_t *test; + splat_test_t *test; spin_lock(&(sub->test_lock)); list_for_each_entry(test, &(sub->test_list), test_list) { @@ -317,61 +313,61 @@ kzt_validate(struct file *file, kzt_subsystem_t *sub, int cmd, void *arg) } static int -kzt_ioctl_cfg(struct file *file, unsigned long arg) +splat_ioctl_cfg(struct file *file, unsigned long arg) { - kzt_cfg_t kcfg; + splat_cfg_t kcfg; int rc = 0; - if (copy_from_user(&kcfg, (kzt_cfg_t *)arg, sizeof(kcfg))) + if (copy_from_user(&kcfg, (splat_cfg_t *)arg, sizeof(kcfg))) return -EFAULT; - if (kcfg.cfg_magic != KZT_CFG_MAGIC) { - kzt_print(file, "Bad config magic 0x%x != 0x%x\n", - kcfg.cfg_magic, KZT_CFG_MAGIC); + if (kcfg.cfg_magic != SPLAT_CFG_MAGIC) { + splat_print(file, "Bad config magic 0x%x != 0x%x\n", + kcfg.cfg_magic, SPLAT_CFG_MAGIC); return -EINVAL; } switch (kcfg.cfg_cmd) { - case KZT_CFG_BUFFER_CLEAR: + case SPLAT_CFG_BUFFER_CLEAR: /* cfg_arg1 - Unused * cfg_rc1 - Unused */ - rc = kzt_buffer_clear(file, &kcfg, arg); + rc = splat_buffer_clear(file, &kcfg, arg); break; - case KZT_CFG_BUFFER_SIZE: + case SPLAT_CFG_BUFFER_SIZE: /* cfg_arg1 - 0 - query size; >0 resize * cfg_rc1 - Set to current buffer size */ - rc = kzt_buffer_size(file, &kcfg, arg); + rc = splat_buffer_size(file, &kcfg, arg); break; - case KZT_CFG_SUBSYSTEM_COUNT: + case SPLAT_CFG_SUBSYSTEM_COUNT: /* cfg_arg1 - Unused * cfg_rc1 - Set to number of subsystems */ - rc = kzt_subsystem_count(&kcfg, arg); + rc = splat_subsystem_count(&kcfg, arg); break; - case KZT_CFG_SUBSYSTEM_LIST: + case SPLAT_CFG_SUBSYSTEM_LIST: /* cfg_arg1 - Unused * cfg_rc1 - Set to number of subsystems - * cfg_data.kzt_subsystems - Populated with subsystems + * cfg_data.splat_subsystems - Populated with subsystems */ - rc = kzt_subsystem_list(&kcfg, arg); + rc = splat_subsystem_list(&kcfg, arg); break; - case KZT_CFG_TEST_COUNT: + case SPLAT_CFG_TEST_COUNT: /* cfg_arg1 - Set to a target subsystem * cfg_rc1 - Set to number of tests */ - rc = kzt_test_count(&kcfg, arg); + rc = splat_test_count(&kcfg, arg); break; - case KZT_CFG_TEST_LIST: + case SPLAT_CFG_TEST_LIST: /* cfg_arg1 - Set to a target subsystem * cfg_rc1 - Set to number of tests - * cfg_data.kzt_subsystems - Populated with tests + * cfg_data.splat_subsystems - Populated with tests */ - rc = kzt_test_list(&kcfg, arg); + rc = splat_test_list(&kcfg, arg); break; default: - kzt_print(file, "Bad config command %d\n", kcfg.cfg_cmd); + splat_print(file, "Bad config command %d\n", kcfg.cfg_cmd); rc = -EINVAL; break; } @@ -380,19 +376,19 @@ kzt_ioctl_cfg(struct file *file, unsigned long arg) } static int -kzt_ioctl_cmd(struct file *file, unsigned long arg) +splat_ioctl_cmd(struct file *file, unsigned long arg) { - kzt_subsystem_t *sub; - kzt_cmd_t kcmd; + splat_subsystem_t *sub; + splat_cmd_t kcmd; int rc = -EINVAL; void *data = NULL; - if (copy_from_user(&kcmd, (kzt_cfg_t *)arg, sizeof(kcmd))) + if (copy_from_user(&kcmd, (splat_cfg_t *)arg, sizeof(kcmd))) return -EFAULT; - if (kcmd.cmd_magic != KZT_CMD_MAGIC) { - kzt_print(file, "Bad command magic 0x%x != 0x%x\n", - kcmd.cmd_magic, KZT_CFG_MAGIC); + if (kcmd.cmd_magic != SPLAT_CMD_MAGIC) { + splat_print(file, "Bad command magic 0x%x != 0x%x\n", + kcmd.cmd_magic, SPLAT_CFG_MAGIC); return -EINVAL; } @@ -402,16 +398,16 @@ kzt_ioctl_cmd(struct file *file, unsigned long arg) if (data == NULL) return -ENOMEM; - if (copy_from_user(data, (void *)(arg + offsetof(kzt_cmd_t, + if (copy_from_user(data, (void *)(arg + offsetof(splat_cmd_t, cmd_data_str)), kcmd.cmd_data_size)) { kfree(data); return -EFAULT; } } - sub = kzt_subsystem_find(kcmd.cmd_subsystem); + sub = splat_subsystem_find(kcmd.cmd_subsystem); if (sub != NULL) - rc = kzt_validate(file, sub, kcmd.cmd_test, data); + rc = splat_validate(file, sub, kcmd.cmd_test, data); else rc = -EINVAL; @@ -422,7 +418,7 @@ kzt_ioctl_cmd(struct file *file, unsigned long arg) } static int -kzt_ioctl(struct inode *inode, struct file *file, +splat_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { unsigned int minor = iminor(file->f_dentry->d_inode); @@ -432,18 +428,18 @@ kzt_ioctl(struct inode *inode, struct file *file, if ((cmd & 0xffffff00) == ((int)'T') << 8) return -ENOTTY; - if (minor >= KZT_MINORS) + if (minor >= SPLAT_MINORS) return -ENXIO; switch (cmd) { - case KZT_CFG: - rc = kzt_ioctl_cfg(file, arg); + case SPLAT_CFG: + rc = splat_ioctl_cfg(file, arg); break; - case KZT_CMD: - rc = kzt_ioctl_cmd(file, arg); + case SPLAT_CMD: + rc = splat_ioctl_cmd(file, arg); break; default: - kzt_print(file, "Bad ioctl command %d\n", cmd); + splat_print(file, "Bad ioctl command %d\n", cmd); rc = -EINVAL; break; } @@ -455,14 +451,14 @@ kzt_ioctl(struct inode *inode, struct file *file, * user space since its principle use is to pass test status info * back to the user space, but I don't see any reason to prevent it. */ -static ssize_t kzt_write(struct file *file, const char __user *buf, +static ssize_t splat_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { unsigned int minor = iminor(file->f_dentry->d_inode); - kzt_info_t *info = (kzt_info_t *)file->private_data; + splat_info_t *info = (splat_info_t *)file->private_data; int rc = 0; - if (minor >= KZT_MINORS) + if (minor >= SPLAT_MINORS) return -ENXIO; ASSERT(info); @@ -492,14 +488,14 @@ out: return rc; } -static ssize_t kzt_read(struct file *file, char __user *buf, +static ssize_t splat_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { unsigned int minor = iminor(file->f_dentry->d_inode); - kzt_info_t *info = (kzt_info_t *)file->private_data; + splat_info_t *info = (splat_info_t *)file->private_data; int rc = 0; - if (minor >= KZT_MINORS) + if (minor >= SPLAT_MINORS) return -ENXIO; ASSERT(info); @@ -527,13 +523,13 @@ out: return rc; } -static loff_t kzt_seek(struct file *file, loff_t offset, int origin) +static loff_t splat_seek(struct file *file, loff_t offset, int origin) { unsigned int minor = iminor(file->f_dentry->d_inode); - kzt_info_t *info = (kzt_info_t *)file->private_data; + splat_info_t *info = (splat_info_t *)file->private_data; int rc = -EINVAL; - if (minor >= KZT_MINORS) + if (minor >= SPLAT_MINORS) return -ENXIO; ASSERT(info); @@ -563,115 +559,116 @@ static loff_t kzt_seek(struct file *file, loff_t offset, int origin) return rc; } -static struct file_operations kzt_fops = { +static struct file_operations splat_fops = { .owner = THIS_MODULE, - .open = kzt_open, - .release = kzt_release, - .ioctl = kzt_ioctl, - .read = kzt_read, - .write = kzt_write, - .llseek = kzt_seek, + .open = splat_open, + .release = splat_release, + .ioctl = splat_ioctl, + .read = splat_read, + .write = splat_write, + .llseek = splat_seek, }; -static struct cdev kzt_cdev = { +static struct cdev splat_cdev = { .owner = THIS_MODULE, - .kobj = { .name = "kztctl", }, + .kobj = { .name = "splatctl", }, }; static int __init -kzt_init(void) +splat_init(void) { dev_t dev; int rc; - spin_lock_init(&kzt_module_lock); - INIT_LIST_HEAD(&kzt_module_list); + spin_lock_init(&splat_module_lock); + INIT_LIST_HEAD(&splat_module_list); - KZT_SUBSYSTEM_INIT(kmem); - KZT_SUBSYSTEM_INIT(taskq); - KZT_SUBSYSTEM_INIT(krng); - KZT_SUBSYSTEM_INIT(mutex); - KZT_SUBSYSTEM_INIT(condvar); - KZT_SUBSYSTEM_INIT(thread); - KZT_SUBSYSTEM_INIT(rwlock); - KZT_SUBSYSTEM_INIT(time); + SPLAT_SUBSYSTEM_INIT(kmem); + SPLAT_SUBSYSTEM_INIT(taskq); + SPLAT_SUBSYSTEM_INIT(krng); + SPLAT_SUBSYSTEM_INIT(mutex); + SPLAT_SUBSYSTEM_INIT(condvar); + SPLAT_SUBSYSTEM_INIT(thread); + SPLAT_SUBSYSTEM_INIT(rwlock); + SPLAT_SUBSYSTEM_INIT(time); - dev = MKDEV(KZT_MAJOR, 0); - if ((rc = register_chrdev_region(dev, KZT_MINORS, "kztctl"))) + dev = MKDEV(SPLAT_MAJOR, 0); + if ((rc = register_chrdev_region(dev, SPLAT_MINORS, "splatctl"))) goto error; /* Support for registering a character driver */ - cdev_init(&kzt_cdev, &kzt_fops); - if ((rc = cdev_add(&kzt_cdev, dev, KZT_MINORS))) { - printk(KERN_ERR "kzt: Error adding cdev, %d\n", rc); - kobject_put(&kzt_cdev.kobj); - unregister_chrdev_region(dev, KZT_MINORS); + cdev_init(&splat_cdev, &splat_fops); + if ((rc = cdev_add(&splat_cdev, dev, SPLAT_MINORS))) { + printk(KERN_ERR "splat: Error adding cdev, %d\n", rc); + kobject_put(&splat_cdev.kobj); + unregister_chrdev_region(dev, SPLAT_MINORS); goto error; } /* Support for udev make driver info available in sysfs */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) - kzt_class = class_simple_create(THIS_MODULE, "kzt"); + splat_class = class_simple_create(THIS_MODULE, "splat"); #else - kzt_class = class_create(THIS_MODULE, "kzt"); + splat_class = class_create(THIS_MODULE, "splat"); #endif - if (IS_ERR(kzt_class)) { - rc = PTR_ERR(kzt_class); - printk(KERN_ERR "kzt: Error creating kzt class, %d\n", rc); - cdev_del(&kzt_cdev); - unregister_chrdev_region(dev, KZT_MINORS); + if (IS_ERR(splat_class)) { + rc = PTR_ERR(splat_class); + printk(KERN_ERR "splat: Error creating splat class, %d\n", rc); + cdev_del(&splat_cdev); + unregister_chrdev_region(dev, SPLAT_MINORS); goto error; } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) - class_simple_device_add(kzt_class, MKDEV(KZT_MAJOR, 0), - NULL, "kztctl"); + class_simple_device_add(splat_class, MKDEV(SPLAT_MAJOR, 0), + NULL, "splatctl"); #else - class_device_create(kzt_class, NULL, MKDEV(KZT_MAJOR, 0), - NULL, "kztctl"); + class_device_create(splat_class, NULL, MKDEV(SPLAT_MAJOR, 0), + NULL, "splatctl"); #endif - printk(KERN_INFO "kzt: Kernel ZFS Tests %s Loaded\n", KZT_VERSION); + printk(KERN_INFO "splat: Loaded Solaris Porting Layer " + "Aggressive Tests v%s\n", VERSION); return 0; error: - printk(KERN_ERR "kzt: Error registering kzt device, %d\n", rc); + printk(KERN_ERR "splat: Error registering splat device, %d\n", rc); return rc; } static void -kzt_fini(void) +splat_fini(void) { - dev_t dev = MKDEV(KZT_MAJOR, 0); + dev_t dev = MKDEV(SPLAT_MAJOR, 0); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) class_simple_device_remove(dev); - class_simple_destroy(kzt_class); - devfs_remove("kzt/kztctl"); - devfs_remove("kzt"); + class_simple_destroy(splat_class); + devfs_remove("splat/splatctl"); + devfs_remove("splat"); #else - class_device_destroy(kzt_class, dev); - class_destroy(kzt_class); + class_device_destroy(splat_class, dev); + class_destroy(splat_class); #endif - cdev_del(&kzt_cdev); - unregister_chrdev_region(dev, KZT_MINORS); + cdev_del(&splat_cdev); + unregister_chrdev_region(dev, SPLAT_MINORS); - KZT_SUBSYSTEM_FINI(time); - KZT_SUBSYSTEM_FINI(rwlock); - KZT_SUBSYSTEM_FINI(thread); - KZT_SUBSYSTEM_FINI(condvar); - KZT_SUBSYSTEM_FINI(mutex); - KZT_SUBSYSTEM_FINI(krng); - KZT_SUBSYSTEM_FINI(taskq); - KZT_SUBSYSTEM_FINI(kmem); + SPLAT_SUBSYSTEM_FINI(time); + SPLAT_SUBSYSTEM_FINI(rwlock); + SPLAT_SUBSYSTEM_FINI(thread); + SPLAT_SUBSYSTEM_FINI(condvar); + SPLAT_SUBSYSTEM_FINI(mutex); + SPLAT_SUBSYSTEM_FINI(krng); + SPLAT_SUBSYSTEM_FINI(taskq); + SPLAT_SUBSYSTEM_FINI(kmem); - ASSERT(list_empty(&kzt_module_list)); - printk(KERN_INFO "kzt: Kernel ZFS Tests %s Unloaded\n", KZT_VERSION); + ASSERT(list_empty(&splat_module_list)); + printk(KERN_INFO "splat: Unloaded Solaris Porting Layer " + "Aggressive Tests v%s\n", VERSION); } -module_init(kzt_init); -module_exit(kzt_fini); +module_init(splat_init); +module_exit(splat_fini); MODULE_AUTHOR("Lawrence Livermore National Labs"); -MODULE_DESCRIPTION("Kernel ZFS Test"); +MODULE_DESCRIPTION("Solaris Porting Layer Aggresive Tests"); MODULE_LICENSE("GPL"); - diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h new file mode 100644 index 000000000..4e017e01e --- /dev/null +++ b/modules/splat/splat-internal.h @@ -0,0 +1,191 @@ +#ifndef _SPLAT_INTERNAL_H +#define _SPLAT_INTERNAL_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define SPLAT_SUBSYSTEM_INIT(type) \ +({ splat_subsystem_t *_sub_; \ + \ + _sub_ = (splat_subsystem_t *)splat_##type##_init(); \ + if (_sub_ == NULL) { \ + printk(KERN_ERR "Error initializing: " #type "\n"); \ + } else { \ + spin_lock(&splat_module_lock); \ + list_add_tail(&(_sub_->subsystem_list), \ + &splat_module_list); \ + spin_unlock(&splat_module_lock); \ + } \ +}) + +#define SPLAT_SUBSYSTEM_FINI(type) \ +({ splat_subsystem_t *_sub_, *_tmp_; \ + int _id_, _flag_ = 0; \ + \ + _id_ = splat_##type##_id(); \ + spin_lock(&splat_module_lock); \ + list_for_each_entry_safe(_sub_, _tmp_, &splat_module_list, \ + subsystem_list) { \ + if (_sub_->desc.id == _id_) { \ + list_del_init(&(_sub_->subsystem_list)); \ + spin_unlock(&splat_module_lock); \ + splat_##type##_fini(_sub_); \ + spin_lock(&splat_module_lock); \ + _flag_ = 1; \ + } \ + } \ + spin_unlock(&splat_module_lock); \ + \ + if (!_flag_) \ + printk(KERN_ERR "Error finalizing: " #type "\n"); \ +}) + +#define SPLAT_TEST_INIT(sub, n, d, tid, func) \ +({ splat_test_t *_test_; \ + \ + _test_ = (splat_test_t *)kmalloc(sizeof(*_test_), GFP_KERNEL); \ + if (_test_ == NULL) { \ + printk(KERN_ERR "Error initializing: " n "/" #tid" \n");\ + } else { \ + memset(_test_, 0, sizeof(*_test_)); \ + strncpy(_test_->desc.name, n, SPLAT_NAME_SIZE); \ + strncpy(_test_->desc.desc, d, SPLAT_DESC_SIZE); \ + _test_->desc.id = tid; \ + _test_->test = func; \ + INIT_LIST_HEAD(&(_test_->test_list)); \ + spin_lock(&((sub)->test_lock)); \ + list_add_tail(&(_test_->test_list),&((sub)->test_list));\ + spin_unlock(&((sub)->test_lock)); \ + } \ +}) + +#define SPLAT_TEST_FINI(sub, tid) \ +({ splat_test_t *_test_, *_tmp_; \ + int _flag_ = 0; \ + \ + spin_lock(&((sub)->test_lock)); \ + list_for_each_entry_safe(_test_, _tmp_, \ + &((sub)->test_list), test_list) { \ + if (_test_->desc.id == tid) { \ + list_del_init(&(_test_->test_list)); \ + _flag_ = 1; \ + } \ + } \ + spin_unlock(&((sub)->test_lock)); \ + \ + if (!_flag_) \ + printk(KERN_ERR "Error finalizing: " #tid "\n"); \ +}) + +typedef int (*splat_test_func_t)(struct file *, void *); + +typedef struct splat_test { + struct list_head test_list; + splat_user_t desc; + splat_test_func_t test; +} splat_test_t; + +typedef struct splat_subsystem { + struct list_head subsystem_list;/* List had to chain entries */ + splat_user_t desc; + spinlock_t test_lock; + struct list_head test_list; +} splat_subsystem_t; + +#define SPLAT_INFO_BUFFER_SIZE 65536 +#define SPLAT_INFO_BUFFER_REDZONE 256 + +typedef struct splat_info { + spinlock_t info_lock; + int info_size; + char *info_buffer; + char *info_head; /* Internal kernel use only */ +} splat_info_t; + +#define sym2str(sym) (char *)(#sym) + +#define splat_print(file, format, args...) \ +({ splat_info_t *_info_ = (splat_info_t *)file->private_data; \ + int _rc_; \ + \ + ASSERT(_info_); \ + ASSERT(_info_->info_buffer); \ + \ + spin_lock(&_info_->info_lock); \ + \ + /* Don't allow the kernel to start a write in the red zone */ \ + if ((int)(_info_->info_head - _info_->info_buffer) > \ + (SPLAT_INFO_BUFFER_SIZE - SPLAT_INFO_BUFFER_REDZONE)) { \ + _rc_ = -EOVERFLOW; \ + } else { \ + _rc_ = sprintf(_info_->info_head, format, args); \ + if (_rc_ >= 0) \ + _info_->info_head += _rc_; \ + } \ + \ + spin_unlock(&_info_->info_lock); \ + _rc_; \ +}) + +#define splat_vprint(file, test, format, args...) \ + splat_print(file, "%*s: " format, SPLAT_NAME_SIZE, test, args) + +splat_subsystem_t * splat_condvar_init(void); +splat_subsystem_t * splat_kmem_init(void); +splat_subsystem_t * splat_mutex_init(void); +splat_subsystem_t * splat_krng_init(void); +splat_subsystem_t * splat_rwlock_init(void); +splat_subsystem_t * splat_taskq_init(void); +splat_subsystem_t * splat_thread_init(void); +splat_subsystem_t * splat_time_init(void); + +void splat_condvar_fini(splat_subsystem_t *); +void splat_kmem_fini(splat_subsystem_t *); +void splat_mutex_fini(splat_subsystem_t *); +void splat_krng_fini(splat_subsystem_t *); +void splat_rwlock_fini(splat_subsystem_t *); +void splat_taskq_fini(splat_subsystem_t *); +void splat_thread_fini(splat_subsystem_t *); +void splat_time_fini(splat_subsystem_t *); + +int splat_condvar_id(void); +int splat_kmem_id(void); +int splat_mutex_id(void); +int splat_krng_id(void); +int splat_rwlock_id(void); +int splat_taskq_id(void); +int splat_thread_id(void); +int splat_time_id(void); + +#endif /* _SPLAT_INTERNAL_H */ diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index d0af3fc52..4b798df38 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -1,51 +1,51 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_KMEM 0x0100 -#define KZT_KMEM_NAME "kmem" -#define KZT_KMEM_DESC "Kernel Malloc/Slab Tests" +#define SPLAT_SUBSYSTEM_KMEM 0x0100 +#define SPLAT_KMEM_NAME "kmem" +#define SPLAT_KMEM_DESC "Kernel Malloc/Slab Tests" -#define KZT_KMEM_TEST1_ID 0x0101 -#define KZT_KMEM_TEST1_NAME "kmem_alloc" -#define KZT_KMEM_TEST1_DESC "Memory allocation test (kmem_alloc)" +#define SPLAT_KMEM_TEST1_ID 0x0101 +#define SPLAT_KMEM_TEST1_NAME "kmem_alloc" +#define SPLAT_KMEM_TEST1_DESC "Memory allocation test (kmem_alloc)" -#define KZT_KMEM_TEST2_ID 0x0102 -#define KZT_KMEM_TEST2_NAME "kmem_zalloc" -#define KZT_KMEM_TEST2_DESC "Memory allocation test (kmem_zalloc)" +#define SPLAT_KMEM_TEST2_ID 0x0102 +#define SPLAT_KMEM_TEST2_NAME "kmem_zalloc" +#define SPLAT_KMEM_TEST2_DESC "Memory allocation test (kmem_zalloc)" -#define KZT_KMEM_TEST3_ID 0x0103 -#define KZT_KMEM_TEST3_NAME "slab_alloc" -#define KZT_KMEM_TEST3_DESC "Slab constructor/destructor test" +#define SPLAT_KMEM_TEST3_ID 0x0103 +#define SPLAT_KMEM_TEST3_NAME "slab_alloc" +#define SPLAT_KMEM_TEST3_DESC "Slab constructor/destructor test" -#define KZT_KMEM_TEST4_ID 0x0104 -#define KZT_KMEM_TEST4_NAME "slab_reap" -#define KZT_KMEM_TEST4_DESC "Slab reaping test" +#define SPLAT_KMEM_TEST4_ID 0x0104 +#define SPLAT_KMEM_TEST4_NAME "slab_reap" +#define SPLAT_KMEM_TEST4_DESC "Slab reaping test" -#define KZT_KMEM_ALLOC_COUNT 10 +#define SPLAT_KMEM_ALLOC_COUNT 10 /* XXX - This test may fail under tight memory conditions */ static int -kzt_kmem_test1(struct file *file, void *arg) +splat_kmem_test1(struct file *file, void *arg) { - void *ptr[KZT_KMEM_ALLOC_COUNT]; + void *ptr[SPLAT_KMEM_ALLOC_COUNT]; int size = PAGE_SIZE; int i, count, rc = 0; while ((!rc) && (size < (PAGE_SIZE * 16))) { count = 0; - for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) { + for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { ptr[i] = kmem_alloc(size, KM_SLEEP); if (ptr[i]) count++; } - for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) + for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) if (ptr[i]) kmem_free(ptr[i], size); - kzt_vprint(file, KZT_KMEM_TEST1_NAME, + splat_vprint(file, SPLAT_KMEM_TEST1_NAME, "%d byte allocations, %d/%d successful\n", - size, count, KZT_KMEM_ALLOC_COUNT); - if (count != KZT_KMEM_ALLOC_COUNT) + size, count, SPLAT_KMEM_ALLOC_COUNT); + if (count != SPLAT_KMEM_ALLOC_COUNT) rc = -ENOMEM; size *= 2; @@ -55,26 +55,26 @@ kzt_kmem_test1(struct file *file, void *arg) } static int -kzt_kmem_test2(struct file *file, void *arg) +splat_kmem_test2(struct file *file, void *arg) { - void *ptr[KZT_KMEM_ALLOC_COUNT]; + void *ptr[SPLAT_KMEM_ALLOC_COUNT]; int size = PAGE_SIZE; int i, j, count, rc = 0; while ((!rc) && (size < (PAGE_SIZE * 16))) { count = 0; - for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) { + for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { ptr[i] = kmem_zalloc(size, KM_SLEEP); if (ptr[i]) count++; } /* Ensure buffer has been zero filled */ - for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) { + for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { for (j = 0; j < size; j++) { if (((char *)ptr[i])[j] != '\0') { - kzt_vprint(file, KZT_KMEM_TEST2_NAME, + splat_vprint(file, SPLAT_KMEM_TEST2_NAME, "%d-byte allocation was " "not zeroed\n", size); rc = -EFAULT; @@ -82,14 +82,14 @@ kzt_kmem_test2(struct file *file, void *arg) } } - for (i = 0; i < KZT_KMEM_ALLOC_COUNT; i++) + for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) if (ptr[i]) kmem_free(ptr[i], size); - kzt_vprint(file, KZT_KMEM_TEST2_NAME, + splat_vprint(file, SPLAT_KMEM_TEST2_NAME, "%d byte allocations, %d/%d successful\n", - size, count, KZT_KMEM_ALLOC_COUNT); - if (count != KZT_KMEM_ALLOC_COUNT) + size, count, SPLAT_KMEM_ALLOC_COUNT); + if (count != SPLAT_KMEM_ALLOC_COUNT) rc = -ENOMEM; size *= 2; @@ -98,14 +98,14 @@ kzt_kmem_test2(struct file *file, void *arg) return rc; } -#define KZT_KMEM_TEST_MAGIC 0x004488CCUL -#define KZT_KMEM_CACHE_NAME "kmem_test" -#define KZT_KMEM_CACHE_SIZE 256 -#define KZT_KMEM_OBJ_COUNT 128 -#define KZT_KMEM_OBJ_RECLAIM 64 +#define SPLAT_KMEM_TEST_MAGIC 0x004488CCUL +#define SPLAT_KMEM_CACHE_NAME "kmem_test" +#define SPLAT_KMEM_CACHE_SIZE 256 +#define SPLAT_KMEM_OBJ_COUNT 128 +#define SPLAT_KMEM_OBJ_RECLAIM 64 typedef struct kmem_cache_data { - char kcd_buf[KZT_KMEM_CACHE_SIZE]; + char kcd_buf[SPLAT_KMEM_CACHE_SIZE]; unsigned long kcd_magic; int kcd_flag; } kmem_cache_data_t; @@ -114,19 +114,19 @@ typedef struct kmem_cache_priv { unsigned long kcp_magic; struct file *kcp_file; kmem_cache_t *kcp_cache; - kmem_cache_data_t *kcp_kcd[KZT_KMEM_OBJ_COUNT]; + kmem_cache_data_t *kcp_kcd[SPLAT_KMEM_OBJ_COUNT]; int kcp_count; int kcp_rc; } kmem_cache_priv_t; static int -kzt_kmem_test34_constructor(void *ptr, void *priv, int flags) +splat_kmem_test34_constructor(void *ptr, void *priv, int flags) { kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; if (kcd) { - memset(kcd->kcd_buf, 0xaa, KZT_KMEM_CACHE_SIZE); + memset(kcd->kcd_buf, 0xaa, SPLAT_KMEM_CACHE_SIZE); kcd->kcd_flag = 1; if (kcp) { @@ -139,13 +139,13 @@ kzt_kmem_test34_constructor(void *ptr, void *priv, int flags) } static void -kzt_kmem_test34_destructor(void *ptr, void *priv) +splat_kmem_test34_destructor(void *ptr, void *priv) { kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; if (kcd) { - memset(kcd->kcd_buf, 0xbb, KZT_KMEM_CACHE_SIZE); + memset(kcd->kcd_buf, 0xbb, SPLAT_KMEM_CACHE_SIZE); kcd->kcd_flag = 0; if (kcp) @@ -156,49 +156,49 @@ kzt_kmem_test34_destructor(void *ptr, void *priv) } static int -kzt_kmem_test3(struct file *file, void *arg) +splat_kmem_test3(struct file *file, void *arg) { kmem_cache_t *cache = NULL; kmem_cache_data_t *kcd = NULL; kmem_cache_priv_t kcp; int rc = 0, max; - kcp.kcp_magic = KZT_KMEM_TEST_MAGIC; + kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; kcp.kcp_file = file; kcp.kcp_count = 0; kcp.kcp_rc = 0; - cache = kmem_cache_create(KZT_KMEM_CACHE_NAME, sizeof(*kcd), 0, - kzt_kmem_test34_constructor, - kzt_kmem_test34_destructor, + cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, sizeof(*kcd), 0, + splat_kmem_test34_constructor, + splat_kmem_test34_destructor, NULL, &kcp, NULL, 0); if (!cache) { - kzt_vprint(file, KZT_KMEM_TEST3_NAME, - "Unable to create '%s'\n", KZT_KMEM_CACHE_NAME); + splat_vprint(file, SPLAT_KMEM_TEST3_NAME, + "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); return -ENOMEM; } kcd = kmem_cache_alloc(cache, 0); if (!kcd) { - kzt_vprint(file, KZT_KMEM_TEST3_NAME, + splat_vprint(file, SPLAT_KMEM_TEST3_NAME, "Unable to allocate from '%s'\n", - KZT_KMEM_CACHE_NAME); + SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } if (!kcd->kcd_flag) { - kzt_vprint(file, KZT_KMEM_TEST3_NAME, + splat_vprint(file, SPLAT_KMEM_TEST3_NAME, "Failed to run contructor for '%s'\n", - KZT_KMEM_CACHE_NAME); + SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } if (kcd->kcd_magic != kcp.kcp_magic) { - kzt_vprint(file, KZT_KMEM_TEST3_NAME, + splat_vprint(file, SPLAT_KMEM_TEST3_NAME, "Failed to pass private data to constructor " - "for '%s'\n", KZT_KMEM_CACHE_NAME); + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } @@ -213,15 +213,15 @@ kzt_kmem_test3(struct file *file, void *arg) * run and we can verify one was called for every object */ kmem_cache_destroy(cache); if (kcp.kcp_count) { - kzt_vprint(file, KZT_KMEM_TEST3_NAME, + splat_vprint(file, SPLAT_KMEM_TEST3_NAME, "Failed to run destructor on all slab objects " - "for '%s'\n", KZT_KMEM_CACHE_NAME); + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; } - kzt_vprint(file, KZT_KMEM_TEST3_NAME, + splat_vprint(file, SPLAT_KMEM_TEST3_NAME, "%d allocated/destroyed objects for '%s'\n", - max, KZT_KMEM_CACHE_NAME); + max, SPLAT_KMEM_CACHE_NAME); return rc; @@ -234,15 +234,15 @@ out_free: } static void -kzt_kmem_test4_reclaim(void *priv) +splat_kmem_test4_reclaim(void *priv) { kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; int i; - kzt_vprint(kcp->kcp_file, KZT_KMEM_TEST4_NAME, + splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST4_NAME, "Reaping %d objects from '%s'\n", - KZT_KMEM_OBJ_RECLAIM, KZT_KMEM_CACHE_NAME); - for (i = 0; i < KZT_KMEM_OBJ_RECLAIM; i++) { + SPLAT_KMEM_OBJ_RECLAIM, SPLAT_KMEM_CACHE_NAME); + for (i = 0; i < SPLAT_KMEM_OBJ_RECLAIM; i++) { if (kcp->kcp_kcd[i]) { kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); kcp->kcp_kcd[i] = NULL; @@ -253,37 +253,37 @@ kzt_kmem_test4_reclaim(void *priv) } static int -kzt_kmem_test4(struct file *file, void *arg) +splat_kmem_test4(struct file *file, void *arg) { kmem_cache_t *cache; kmem_cache_priv_t kcp; int i, rc = 0, max, reclaim_percent, target_percent; - kcp.kcp_magic = KZT_KMEM_TEST_MAGIC; + kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; kcp.kcp_file = file; kcp.kcp_count = 0; kcp.kcp_rc = 0; - cache = kmem_cache_create(KZT_KMEM_CACHE_NAME, + cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, sizeof(kmem_cache_data_t), 0, - kzt_kmem_test34_constructor, - kzt_kmem_test34_destructor, - kzt_kmem_test4_reclaim, &kcp, NULL, 0); + splat_kmem_test34_constructor, + splat_kmem_test34_destructor, + splat_kmem_test4_reclaim, &kcp, NULL, 0); if (!cache) { - kzt_vprint(file, KZT_KMEM_TEST4_NAME, - "Unable to create '%s'\n", KZT_KMEM_CACHE_NAME); + splat_vprint(file, SPLAT_KMEM_TEST4_NAME, + "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); return -ENOMEM; } kcp.kcp_cache = cache; - for (i = 0; i < KZT_KMEM_OBJ_COUNT; i++) { + for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { /* All allocations need not succeed */ kcp.kcp_kcd[i] = kmem_cache_alloc(cache, 0); if (!kcp.kcp_kcd[i]) { - kzt_vprint(file, KZT_KMEM_TEST4_NAME, + splat_vprint(file, SPLAT_KMEM_TEST4_NAME, "Unable to allocate from '%s'\n", - KZT_KMEM_CACHE_NAME); + SPLAT_KMEM_CACHE_NAME); } } @@ -296,19 +296,19 @@ kzt_kmem_test4(struct file *file, void *arg) kmem_cache_reap_now(cache); reclaim_percent = ((kcp.kcp_count * 100) / max); - target_percent = (((KZT_KMEM_OBJ_COUNT - KZT_KMEM_OBJ_RECLAIM) * 100) / - KZT_KMEM_OBJ_COUNT); - kzt_vprint(file, KZT_KMEM_TEST4_NAME, + target_percent = (((SPLAT_KMEM_OBJ_COUNT - SPLAT_KMEM_OBJ_RECLAIM) * 100) / + SPLAT_KMEM_OBJ_COUNT); + splat_vprint(file, SPLAT_KMEM_TEST4_NAME, "%d%% (%d/%d) of previous size, target of " "%d%%-%d%% for '%s'\n", reclaim_percent, kcp.kcp_count, max, target_percent - 10, target_percent + 10, - KZT_KMEM_CACHE_NAME); + SPLAT_KMEM_CACHE_NAME); if ((reclaim_percent < target_percent - 10) || (reclaim_percent > target_percent + 10)) rc = -EINVAL; /* Cleanup our mess */ - for (i = 0; i < KZT_KMEM_OBJ_COUNT; i++) + for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) if (kcp.kcp_kcd[i]) kmem_cache_free(cache, kcp.kcp_kcd[i]); @@ -317,48 +317,48 @@ kzt_kmem_test4(struct file *file, void *arg) return rc; } -kzt_subsystem_t * -kzt_kmem_init(void) +splat_subsystem_t * +splat_kmem_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_KMEM_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_KMEM_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_KMEM_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_KMEM_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_KMEM; + sub->desc.id = SPLAT_SUBSYSTEM_KMEM; - KZT_TEST_INIT(sub, KZT_KMEM_TEST1_NAME, KZT_KMEM_TEST1_DESC, - KZT_KMEM_TEST1_ID, kzt_kmem_test1); - KZT_TEST_INIT(sub, KZT_KMEM_TEST2_NAME, KZT_KMEM_TEST2_DESC, - KZT_KMEM_TEST2_ID, kzt_kmem_test2); - KZT_TEST_INIT(sub, KZT_KMEM_TEST3_NAME, KZT_KMEM_TEST3_DESC, - KZT_KMEM_TEST3_ID, kzt_kmem_test3); - KZT_TEST_INIT(sub, KZT_KMEM_TEST4_NAME, KZT_KMEM_TEST4_DESC, - KZT_KMEM_TEST4_ID, kzt_kmem_test4); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST1_NAME, SPLAT_KMEM_TEST1_DESC, + SPLAT_KMEM_TEST1_ID, splat_kmem_test1); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST2_NAME, SPLAT_KMEM_TEST2_DESC, + SPLAT_KMEM_TEST2_ID, splat_kmem_test2); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST3_NAME, SPLAT_KMEM_TEST3_DESC, + SPLAT_KMEM_TEST3_ID, splat_kmem_test3); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST4_NAME, SPLAT_KMEM_TEST4_DESC, + SPLAT_KMEM_TEST4_ID, splat_kmem_test4); return sub; } void -kzt_kmem_fini(kzt_subsystem_t *sub) +splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_KMEM_TEST4_ID); - KZT_TEST_FINI(sub, KZT_KMEM_TEST3_ID); - KZT_TEST_FINI(sub, KZT_KMEM_TEST2_ID); - KZT_TEST_FINI(sub, KZT_KMEM_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST1_ID); kfree(sub); } int -kzt_kmem_id(void) { - return KZT_SUBSYSTEM_KMEM; +splat_kmem_id(void) { + return SPLAT_SUBSYSTEM_KMEM; } diff --git a/modules/splat/splat-mutex.c b/modules/splat/splat-mutex.c index 47a36308e..94760a185 100644 --- a/modules/splat/splat-mutex.c +++ b/modules/splat/splat-mutex.c @@ -1,45 +1,45 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_MUTEX 0x0400 -#define KZT_MUTEX_NAME "mutex" -#define KZT_MUTEX_DESC "Kernel Mutex Tests" +#define SPLAT_SUBSYSTEM_MUTEX 0x0400 +#define SPLAT_MUTEX_NAME "mutex" +#define SPLAT_MUTEX_DESC "Kernel Mutex Tests" -#define KZT_MUTEX_TEST1_ID 0x0401 -#define KZT_MUTEX_TEST1_NAME "tryenter" -#define KZT_MUTEX_TEST1_DESC "Validate mutex_tryenter() correctness" +#define SPLAT_MUTEX_TEST1_ID 0x0401 +#define SPLAT_MUTEX_TEST1_NAME "tryenter" +#define SPLAT_MUTEX_TEST1_DESC "Validate mutex_tryenter() correctness" -#define KZT_MUTEX_TEST2_ID 0x0402 -#define KZT_MUTEX_TEST2_NAME "race" -#define KZT_MUTEX_TEST2_DESC "Many threads entering/exiting the mutex" +#define SPLAT_MUTEX_TEST2_ID 0x0402 +#define SPLAT_MUTEX_TEST2_NAME "race" +#define SPLAT_MUTEX_TEST2_DESC "Many threads entering/exiting the mutex" -#define KZT_MUTEX_TEST3_ID 0x0403 -#define KZT_MUTEX_TEST3_NAME "owned" -#define KZT_MUTEX_TEST3_DESC "Validate mutex_owned() correctness" +#define SPLAT_MUTEX_TEST3_ID 0x0403 +#define SPLAT_MUTEX_TEST3_NAME "owned" +#define SPLAT_MUTEX_TEST3_DESC "Validate mutex_owned() correctness" -#define KZT_MUTEX_TEST4_ID 0x0404 -#define KZT_MUTEX_TEST4_NAME "owner" -#define KZT_MUTEX_TEST4_DESC "Validate mutex_owner() correctness" +#define SPLAT_MUTEX_TEST4_ID 0x0404 +#define SPLAT_MUTEX_TEST4_NAME "owner" +#define SPLAT_MUTEX_TEST4_DESC "Validate mutex_owner() correctness" -#define KZT_MUTEX_TEST_MAGIC 0x115599DDUL -#define KZT_MUTEX_TEST_NAME "mutex_test" -#define KZT_MUTEX_TEST_WORKQ "mutex_wq" -#define KZT_MUTEX_TEST_COUNT 128 +#define SPLAT_MUTEX_TEST_MAGIC 0x115599DDUL +#define SPLAT_MUTEX_TEST_NAME "mutex_test" +#define SPLAT_MUTEX_TEST_WORKQ "mutex_wq" +#define SPLAT_MUTEX_TEST_COUNT 128 typedef struct mutex_priv { unsigned long mp_magic; struct file *mp_file; - struct work_struct mp_work[KZT_MUTEX_TEST_COUNT]; + struct work_struct mp_work[SPLAT_MUTEX_TEST_COUNT]; kmutex_t mp_mtx; int mp_rc; } mutex_priv_t; static void -kzt_mutex_test1_work(void *priv) +splat_mutex_test1_work(void *priv) { mutex_priv_t *mp = (mutex_priv_t *)priv; - ASSERT(mp->mp_magic == KZT_MUTEX_TEST_MAGIC); + ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); mp->mp_rc = 0; if (!mutex_tryenter(&mp->mp_mtx)) @@ -47,7 +47,7 @@ kzt_mutex_test1_work(void *priv) } static int -kzt_mutex_test1(struct file *file, void *arg) +splat_mutex_test1(struct file *file, void *arg) { struct workqueue_struct *wq; struct work_struct work; @@ -58,18 +58,18 @@ kzt_mutex_test1(struct file *file, void *arg) if (mp == NULL) return -ENOMEM; - wq = create_singlethread_workqueue(KZT_MUTEX_TEST_WORKQ); + wq = create_singlethread_workqueue(SPLAT_MUTEX_TEST_WORKQ); if (wq == NULL) { rc = -ENOMEM; goto out2; } - mutex_init(&(mp->mp_mtx), KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); mutex_enter(&(mp->mp_mtx)); - mp->mp_magic = KZT_MUTEX_TEST_MAGIC; + mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; mp->mp_file = file; - INIT_WORK(&work, kzt_mutex_test1_work, mp); + INIT_WORK(&work, splat_mutex_test1_work, mp); /* Schedule a work item which will try and aquire the mutex via * mutex_tryenter() while its held. This should fail and the work @@ -89,7 +89,7 @@ kzt_mutex_test1(struct file *file, void *arg) goto out; } - kzt_vprint(file, KZT_MUTEX_TEST1_NAME, "%s", + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", "mutex_trylock() correctly failed when mutex held\n"); /* Schedule a work item which will try and aquire the mutex via @@ -108,7 +108,7 @@ kzt_mutex_test1(struct file *file, void *arg) goto out; } - kzt_vprint(file, KZT_MUTEX_TEST1_NAME, "%s", + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", "mutex_trylock() correctly succeeded when mutex unheld\n"); out: mutex_destroy(&(mp->mp_mtx)); @@ -120,12 +120,12 @@ out2: } static void -kzt_mutex_test2_work(void *priv) +splat_mutex_test2_work(void *priv) { mutex_priv_t *mp = (mutex_priv_t *)priv; int rc; - ASSERT(mp->mp_magic == KZT_MUTEX_TEST_MAGIC); + ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); /* Read the value before sleeping and write it after we wake up to * maximize the chance of a race if mutexs are not working properly */ @@ -138,7 +138,7 @@ kzt_mutex_test2_work(void *priv) } static int -kzt_mutex_test2(struct file *file, void *arg) +splat_mutex_test2(struct file *file, void *arg) { struct workqueue_struct *wq; mutex_priv_t *mp; @@ -149,15 +149,15 @@ kzt_mutex_test2(struct file *file, void *arg) return -ENOMEM; /* Create a thread per CPU items on queue will race */ - wq = create_workqueue(KZT_MUTEX_TEST_WORKQ); + wq = create_workqueue(SPLAT_MUTEX_TEST_WORKQ); if (wq == NULL) { rc = -ENOMEM; goto out; } - mutex_init(&(mp->mp_mtx), KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mp->mp_magic = KZT_MUTEX_TEST_MAGIC; + mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; mp->mp_file = file; mp->mp_rc = 0; @@ -167,11 +167,11 @@ kzt_mutex_test2(struct file *file, void *arg) * mutex is instrumented such that if any two processors are in the * critical region at the same time the system will panic. If the * mutex is implemented right this will never happy, that's a pass. */ - for (i = 0; i < KZT_MUTEX_TEST_COUNT; i++) { - INIT_WORK(&(mp->mp_work[i]), kzt_mutex_test2_work, mp); + for (i = 0; i < SPLAT_MUTEX_TEST_COUNT; i++) { + INIT_WORK(&(mp->mp_work[i]), splat_mutex_test2_work, mp); if (!queue_work(wq, &(mp->mp_work[i]))) { - kzt_vprint(file, KZT_MUTEX_TEST2_NAME, + splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "Failed to queue work id %d\n", i); rc = -EINVAL; } @@ -179,14 +179,14 @@ kzt_mutex_test2(struct file *file, void *arg) flush_workqueue(wq); - if (mp->mp_rc == KZT_MUTEX_TEST_COUNT) { - kzt_vprint(file, KZT_MUTEX_TEST2_NAME, "%d racing threads " + if (mp->mp_rc == SPLAT_MUTEX_TEST_COUNT) { + splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " "correctly entered/exited the mutex %d times\n", num_online_cpus(), mp->mp_rc); } else { - kzt_vprint(file, KZT_MUTEX_TEST2_NAME, "%d racing threads " + splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " "only processed %d/%d mutex work items\n", - num_online_cpus(), mp->mp_rc, KZT_MUTEX_TEST_COUNT); + num_online_cpus(), mp->mp_rc, SPLAT_MUTEX_TEST_COUNT); rc = -EINVAL; } @@ -199,18 +199,18 @@ out: } static int -kzt_mutex_test3(struct file *file, void *arg) +splat_mutex_test3(struct file *file, void *arg) { kmutex_t mtx; int rc = 0; - mutex_init(&mtx, KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); mutex_enter(&mtx); /* Mutex should be owned by current */ if (!mutex_owned(&mtx)) { - kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should " + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " "be owned by pid %d but is owned by pid %d\n", current->pid, mtx.km_owner ? mtx.km_owner->pid : -1); rc = -EINVAL; @@ -221,14 +221,14 @@ kzt_mutex_test3(struct file *file, void *arg) /* Mutex should not be owned by any task */ if (mutex_owned(&mtx)) { - kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should " + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " "not be owned but is owned by pid %d\n", mtx.km_owner ? mtx.km_owner->pid : -1); rc = -EINVAL; goto out; } - kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "%s", + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "%s", "Correct mutex_owned() behavior\n"); out: mutex_destroy(&mtx); @@ -237,20 +237,20 @@ out: } static int -kzt_mutex_test4(struct file *file, void *arg) +splat_mutex_test4(struct file *file, void *arg) { kmutex_t mtx; kthread_t *owner; int rc = 0; - mutex_init(&mtx, KZT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); mutex_enter(&mtx); /* Mutex should be owned by current */ owner = mutex_owner(&mtx); if (current != owner) { - kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should " + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " "be owned by pid %d but is owned by pid %d\n", current->pid, owner ? owner->pid : -1); rc = -EINVAL; @@ -262,13 +262,13 @@ kzt_mutex_test4(struct file *file, void *arg) /* Mutex should not be owned by any task */ owner = mutex_owner(&mtx); if (owner) { - kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "Mutex should not " + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should not " "be owned but is owned by pid %d\n", owner->pid); rc = -EINVAL; goto out; } - kzt_vprint(file, KZT_MUTEX_TEST3_NAME, "%s", + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "%s", "Correct mutex_owner() behavior\n"); out: mutex_destroy(&mtx); @@ -276,48 +276,48 @@ out: return rc; } -kzt_subsystem_t * -kzt_mutex_init(void) +splat_subsystem_t * +splat_mutex_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_MUTEX_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_MUTEX_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_MUTEX_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_MUTEX_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_MUTEX; + sub->desc.id = SPLAT_SUBSYSTEM_MUTEX; - KZT_TEST_INIT(sub, KZT_MUTEX_TEST1_NAME, KZT_MUTEX_TEST1_DESC, - KZT_MUTEX_TEST1_ID, kzt_mutex_test1); - KZT_TEST_INIT(sub, KZT_MUTEX_TEST2_NAME, KZT_MUTEX_TEST2_DESC, - KZT_MUTEX_TEST2_ID, kzt_mutex_test2); - KZT_TEST_INIT(sub, KZT_MUTEX_TEST3_NAME, KZT_MUTEX_TEST3_DESC, - KZT_MUTEX_TEST3_ID, kzt_mutex_test3); - KZT_TEST_INIT(sub, KZT_MUTEX_TEST4_NAME, KZT_MUTEX_TEST4_DESC, - KZT_MUTEX_TEST4_ID, kzt_mutex_test4); + SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST1_NAME, SPLAT_MUTEX_TEST1_DESC, + SPLAT_MUTEX_TEST1_ID, splat_mutex_test1); + SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST2_NAME, SPLAT_MUTEX_TEST2_DESC, + SPLAT_MUTEX_TEST2_ID, splat_mutex_test2); + SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST3_NAME, SPLAT_MUTEX_TEST3_DESC, + SPLAT_MUTEX_TEST3_ID, splat_mutex_test3); + SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST4_NAME, SPLAT_MUTEX_TEST4_DESC, + SPLAT_MUTEX_TEST4_ID, splat_mutex_test4); return sub; } void -kzt_mutex_fini(kzt_subsystem_t *sub) +splat_mutex_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_MUTEX_TEST4_ID); - KZT_TEST_FINI(sub, KZT_MUTEX_TEST3_ID); - KZT_TEST_FINI(sub, KZT_MUTEX_TEST2_ID); - KZT_TEST_FINI(sub, KZT_MUTEX_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST1_ID); kfree(sub); } int -kzt_mutex_id(void) { - return KZT_SUBSYSTEM_MUTEX; +splat_mutex_id(void) { + return SPLAT_SUBSYSTEM_MUTEX; } diff --git a/modules/splat/splat-random.c b/modules/splat/splat-random.c index 412c1d62a..a3e29eef6 100644 --- a/modules/splat/splat-random.c +++ b/modules/splat/splat-random.c @@ -1,12 +1,12 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_KRNG 0x0300 -#define KZT_KRNG_NAME "krng" -#define KZT_KRNG_DESC "Kernel Random Number Generator Tests" +#define SPLAT_SUBSYSTEM_KRNG 0x0300 +#define SPLAT_KRNG_NAME "krng" +#define SPLAT_KRNG_DESC "Kernel Random Number Generator Tests" -#define KZT_KRNG_TEST1_ID 0x0301 -#define KZT_KRNG_TEST1_NAME "freq" -#define KZT_KRNG_TEST1_DESC "Frequency Test" +#define SPLAT_KRNG_TEST1_ID 0x0301 +#define SPLAT_KRNG_TEST1_NAME "freq" +#define SPLAT_KRNG_TEST1_DESC "Frequency Test" #define KRNG_NUM_BITS 1048576 #define KRNG_NUM_BYTES (KRNG_NUM_BITS >> 3) @@ -22,7 +22,7 @@ but is probably not necessary for our purposes */ static int -kzt_krng_test1(struct file *file, void *arg) +splat_krng_test1(struct file *file, void *arg) { uint8_t *buf; int i, j, diff, num = 0, rc = 0; @@ -54,8 +54,8 @@ kzt_krng_test1(struct file *file, void *arg) if (diff < 0) diff *= -1; - kzt_print(file, "Test 1 Number of ones: %d\n", num); - kzt_print(file, "Test 1 Difference from expected: %d Allowed: %d\n", + splat_print(file, "Test 1 Number of ones: %d\n", num); + splat_print(file, "Test 1 Difference from expected: %d Allowed: %d\n", diff, KRNG_ERROR_RANGE); if (diff > KRNG_ERROR_RANGE) @@ -64,40 +64,40 @@ out: return rc; } -kzt_subsystem_t * -kzt_krng_init(void) +splat_subsystem_t * +splat_krng_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_KRNG_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_KRNG_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_KRNG_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_KRNG_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_KRNG; + sub->desc.id = SPLAT_SUBSYSTEM_KRNG; - KZT_TEST_INIT(sub, KZT_KRNG_TEST1_NAME, KZT_KRNG_TEST1_DESC, - KZT_KRNG_TEST1_ID, kzt_krng_test1); + SPLAT_TEST_INIT(sub, SPLAT_KRNG_TEST1_NAME, SPLAT_KRNG_TEST1_DESC, + SPLAT_KRNG_TEST1_ID, splat_krng_test1); return sub; } void -kzt_krng_fini(kzt_subsystem_t *sub) +splat_krng_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_KRNG_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_KRNG_TEST1_ID); kfree(sub); } int -kzt_krng_id(void) { - return KZT_SUBSYSTEM_KRNG; +splat_krng_id(void) { + return SPLAT_SUBSYSTEM_KRNG; } diff --git a/modules/splat/splat-rwlock.c b/modules/splat/splat-rwlock.c index df4585ea3..3148a02f8 100644 --- a/modules/splat/splat-rwlock.c +++ b/modules/splat/splat-rwlock.c @@ -1,40 +1,40 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_RWLOCK 0x0700 -#define KZT_RWLOCK_NAME "rwlock" -#define KZT_RWLOCK_DESC "Kernel RW Lock Tests" +#define SPLAT_SUBSYSTEM_RWLOCK 0x0700 +#define SPLAT_RWLOCK_NAME "rwlock" +#define SPLAT_RWLOCK_DESC "Kernel RW Lock Tests" -#define KZT_RWLOCK_TEST1_ID 0x0701 -#define KZT_RWLOCK_TEST1_NAME "rwtest1" -#define KZT_RWLOCK_TEST1_DESC "Multiple Readers One Writer" +#define SPLAT_RWLOCK_TEST1_ID 0x0701 +#define SPLAT_RWLOCK_TEST1_NAME "rwtest1" +#define SPLAT_RWLOCK_TEST1_DESC "Multiple Readers One Writer" -#define KZT_RWLOCK_TEST2_ID 0x0702 -#define KZT_RWLOCK_TEST2_NAME "rwtest2" -#define KZT_RWLOCK_TEST2_DESC "Multiple Writers" +#define SPLAT_RWLOCK_TEST2_ID 0x0702 +#define SPLAT_RWLOCK_TEST2_NAME "rwtest2" +#define SPLAT_RWLOCK_TEST2_DESC "Multiple Writers" -#define KZT_RWLOCK_TEST3_ID 0x0703 -#define KZT_RWLOCK_TEST3_NAME "rwtest3" -#define KZT_RWLOCK_TEST3_DESC "Owner Verification" +#define SPLAT_RWLOCK_TEST3_ID 0x0703 +#define SPLAT_RWLOCK_TEST3_NAME "rwtest3" +#define SPLAT_RWLOCK_TEST3_DESC "Owner Verification" -#define KZT_RWLOCK_TEST4_ID 0x0704 -#define KZT_RWLOCK_TEST4_NAME "rwtest4" -#define KZT_RWLOCK_TEST4_DESC "Trylock Test" +#define SPLAT_RWLOCK_TEST4_ID 0x0704 +#define SPLAT_RWLOCK_TEST4_NAME "rwtest4" +#define SPLAT_RWLOCK_TEST4_DESC "Trylock Test" -#define KZT_RWLOCK_TEST5_ID 0x0705 -#define KZT_RWLOCK_TEST5_NAME "rwtest5" -#define KZT_RWLOCK_TEST5_DESC "Write Downgrade Test" +#define SPLAT_RWLOCK_TEST5_ID 0x0705 +#define SPLAT_RWLOCK_TEST5_NAME "rwtest5" +#define SPLAT_RWLOCK_TEST5_DESC "Write Downgrade Test" -#define KZT_RWLOCK_TEST6_ID 0x0706 -#define KZT_RWLOCK_TEST6_NAME "rwtest6" -#define KZT_RWLOCK_TEST6_DESC "Read Upgrade Test" +#define SPLAT_RWLOCK_TEST6_ID 0x0706 +#define SPLAT_RWLOCK_TEST6_NAME "rwtest6" +#define SPLAT_RWLOCK_TEST6_DESC "Read Upgrade Test" -#define KZT_RWLOCK_TEST_MAGIC 0x115599DDUL -#define KZT_RWLOCK_TEST_NAME "rwlock_test" -#define KZT_RWLOCK_TEST_COUNT 8 +#define SPLAT_RWLOCK_TEST_MAGIC 0x115599DDUL +#define SPLAT_RWLOCK_TEST_NAME "rwlock_test" +#define SPLAT_RWLOCK_TEST_COUNT 8 -#define KZT_RWLOCK_RELEASE_INIT 0 -#define KZT_RWLOCK_RELEASE_WRITERS 1 -#define KZT_RWLOCK_RELEASE_READERS 2 +#define SPLAT_RWLOCK_RELEASE_INIT 0 +#define SPLAT_RWLOCK_RELEASE_WRITERS 1 +#define SPLAT_RWLOCK_RELEASE_READERS 2 typedef struct rw_priv { unsigned long rw_magic; @@ -56,13 +56,13 @@ typedef struct rw_thr { } rw_thr_t; static inline void -kzt_rwlock_sleep(signed long delay) +splat_rwlock_sleep(signed long delay) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(delay); } -#define kzt_rwlock_lock_and_test(lock,test) \ +#define splat_rwlock_lock_and_test(lock,test) \ ({ \ int ret = 0; \ \ @@ -72,38 +72,38 @@ kzt_rwlock_sleep(signed long delay) ret; \ }) -void kzt_init_rw_priv(rw_priv_t *rwv, struct file *file) +void splat_init_rw_priv(rw_priv_t *rwv, struct file *file) { - rwv->rw_magic = KZT_RWLOCK_TEST_MAGIC; + rwv->rw_magic = SPLAT_RWLOCK_TEST_MAGIC; rwv->rw_file = file; spin_lock_init(&rwv->rw_priv_lock); init_waitqueue_head(&rwv->rw_waitq); atomic_set(&rwv->rw_completed, 0); atomic_set(&rwv->rw_acquired, 0); atomic_set(&rwv->rw_waiters, 0); - atomic_set(&rwv->rw_release, KZT_RWLOCK_RELEASE_INIT); - + atomic_set(&rwv->rw_release, SPLAT_RWLOCK_RELEASE_INIT); + /* Initialize the read/write lock */ - rw_init(&rwv->rwl, KZT_RWLOCK_TEST_NAME, RW_DEFAULT, NULL); + rw_init(&rwv->rwl, SPLAT_RWLOCK_TEST_NAME, RW_DEFAULT, NULL); } int -kzt_rwlock_test1_writer_thread(void *arg) +splat_rwlock_test1_writer_thread(void *arg) { rw_thr_t *rwt = (rw_thr_t *)arg; rw_priv_t *rwv = rwt->rwt_rwp; uint8_t rnd = 0; char name[16]; - ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", - KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); + snprintf(name, sizeof(name), "%s%d", + SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); daemonize(name); get_random_bytes((void *)&rnd, 1); - kzt_rwlock_sleep(rnd * HZ / 1000); + splat_rwlock_sleep(rnd * HZ / 1000); spin_lock(&rwv->rw_priv_lock); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s writer thread trying to acquire rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -111,14 +111,14 @@ kzt_rwlock_test1_writer_thread(void *arg) atomic_inc(&rwv->rw_waiters); spin_unlock(&rwv->rw_priv_lock); - /* Take the semaphore for writing + /* Take the semaphore for writing * release it when we are told to */ rw_enter(&rwv->rwl, RW_WRITER); spin_lock(&rwv->rw_priv_lock); atomic_dec(&rwv->rw_waiters); atomic_inc(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s writer thread acquired rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -128,13 +128,13 @@ kzt_rwlock_test1_writer_thread(void *arg) /* Wait here until the control thread * says we can release the write lock */ wait_event_interruptible(rwv->rw_waitq, - kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + splat_rwlock_lock_and_test(&rwv->rw_priv_lock, atomic_read(&rwv->rw_release) == - KZT_RWLOCK_RELEASE_WRITERS)); + SPLAT_RWLOCK_RELEASE_WRITERS)); spin_lock(&rwv->rw_priv_lock); atomic_inc(&rwv->rw_completed); atomic_dec(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s writer thread dropped rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -147,28 +147,28 @@ kzt_rwlock_test1_writer_thread(void *arg) } int -kzt_rwlock_test1_reader_thread(void *arg) +splat_rwlock_test1_reader_thread(void *arg) { rw_thr_t *rwt = (rw_thr_t *)arg; rw_priv_t *rwv = rwt->rwt_rwp; uint8_t rnd = 0; char name[16]; - ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); + ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); snprintf(name, sizeof(name), "%s%d", - KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); daemonize(name); get_random_bytes((void *)&rnd, 1); - kzt_rwlock_sleep(rnd * HZ / 1000); + splat_rwlock_sleep(rnd * HZ / 1000); /* Don't try and and take the semaphore until * someone else has already acquired it */ wait_event_interruptible(rwv->rw_waitq, - kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + splat_rwlock_lock_and_test(&rwv->rw_priv_lock, atomic_read(&rwv->rw_acquired) > 0)); spin_lock(&rwv->rw_priv_lock); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s reader thread trying to acquire rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -183,7 +183,7 @@ kzt_rwlock_test1_reader_thread(void *arg) spin_lock(&rwv->rw_priv_lock); atomic_dec(&rwv->rw_waiters); atomic_inc(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s reader thread acquired rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -193,14 +193,14 @@ kzt_rwlock_test1_reader_thread(void *arg) /* Wait here until the control thread * says we can release the read lock */ wait_event_interruptible(rwv->rw_waitq, - kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + splat_rwlock_lock_and_test(&rwv->rw_priv_lock, atomic_read(&rwv->rw_release) == - KZT_RWLOCK_RELEASE_READERS)); + SPLAT_RWLOCK_RELEASE_READERS)); spin_lock(&rwv->rw_priv_lock); atomic_inc(&rwv->rw_completed); atomic_dec(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s reader thread dropped rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -213,75 +213,74 @@ kzt_rwlock_test1_reader_thread(void *arg) } static int -kzt_rwlock_test1(struct file *file, void *arg) +splat_rwlock_test1(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[KZT_RWLOCK_TEST_COUNT]; - rw_thr_t rwt[KZT_RWLOCK_TEST_COUNT]; + long pids[SPLAT_RWLOCK_TEST_COUNT]; + rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; rw_priv_t rwv; - /* Initialize private data - * including the rwlock */ - kzt_init_rw_priv(&rwv, file); + /* Initialize private data including the rwlock */ + splat_init_rw_priv(&rwv, file); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { rwt[i].rwt_rwp = &rwv; rwt[i].rwt_id = i; - rwt[i].rwt_name = KZT_RWLOCK_TEST1_NAME; + rwt[i].rwt_name = SPLAT_RWLOCK_TEST1_NAME; rwt[i].rwt_rc = 0; /* The first thread will be a writer */ if (i == 0) { - pids[i] = kernel_thread(kzt_rwlock_test1_writer_thread, + pids[i] = kernel_thread(splat_rwlock_test1_writer_thread, &rwt[i], 0); } else { - pids[i] = kernel_thread(kzt_rwlock_test1_reader_thread, + pids[i] = kernel_thread(splat_rwlock_test1_reader_thread, &rwt[i], 0); } - + if (pids[i] >= 0) { count++; } } /* Once the writer has the lock, release the readers */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) <= 0)) { - kzt_rwlock_sleep(1 * HZ); + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) <= 0)) { + splat_rwlock_sleep(1 * HZ); } wake_up_interruptible(&rwv.rw_waitq); /* Ensure that there is only 1 writer and all readers are waiting */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) != 1 || atomic_read(&rwv.rw_waiters) != - KZT_RWLOCK_TEST_COUNT - 1)) { + SPLAT_RWLOCK_TEST_COUNT - 1)) { - kzt_rwlock_sleep(1 * HZ); + splat_rwlock_sleep(1 * HZ); } /* Relase the writer */ spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_WRITERS); + atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_WRITERS); spin_unlock(&rwv.rw_priv_lock); wake_up_interruptible(&rwv.rw_waitq); /* Now ensure that there are multiple reader threads holding the lock */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) <= 1)) { - kzt_rwlock_sleep(1 * HZ); + splat_rwlock_sleep(1 * HZ); } /* Release the readers */ spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_READERS); + atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_READERS); spin_unlock(&rwv.rw_priv_lock); wake_up_interruptible(&rwv.rw_waitq); /* Wait for the test to complete */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) != 0 || atomic_read(&rwv.rw_waiters) != 0)) { - kzt_rwlock_sleep(1 * HZ); + splat_rwlock_sleep(1 * HZ); } @@ -290,26 +289,26 @@ kzt_rwlock_test1(struct file *file, void *arg) } int -kzt_rwlock_test2_writer_thread(void *arg) +splat_rwlock_test2_writer_thread(void *arg) { rw_thr_t *rwt = (rw_thr_t *)arg; rw_priv_t *rwv = rwt->rwt_rwp; uint8_t rnd = 0; char name[16]; - - ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); + + ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); snprintf(name, sizeof(name), "%s%d", - KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); daemonize(name); get_random_bytes((void *)&rnd, 1); - kzt_rwlock_sleep(rnd * HZ / 1000); + splat_rwlock_sleep(rnd * HZ / 1000); /* Here just increment the waiters count even if we are not * exactly about to call rw_enter(). Not really a big deal * since more than likely will be true when we simulate work * later on */ spin_lock(&rwv->rw_priv_lock); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s writer thread trying to acquire rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -320,17 +319,17 @@ kzt_rwlock_test2_writer_thread(void *arg) /* Wait here until the control thread * says we can acquire the write lock */ wait_event_interruptible(rwv->rw_waitq, - kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + splat_rwlock_lock_and_test(&rwv->rw_priv_lock, atomic_read(&rwv->rw_release) == - KZT_RWLOCK_RELEASE_WRITERS)); - + SPLAT_RWLOCK_RELEASE_WRITERS)); + /* Take the semaphore for writing */ rw_enter(&rwv->rwl, RW_WRITER); spin_lock(&rwv->rw_priv_lock); atomic_dec(&rwv->rw_waiters); atomic_inc(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s writer thread acquired rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -339,7 +338,7 @@ kzt_rwlock_test2_writer_thread(void *arg) /* Give up the processor for a bit to simulate * doing some work while taking the write lock */ - kzt_rwlock_sleep(rnd * HZ / 1000); + splat_rwlock_sleep(rnd * HZ / 1000); /* Ensure that we are the only one writing */ if (atomic_read(&rwv->rw_acquired) > 1) { @@ -351,7 +350,7 @@ kzt_rwlock_test2_writer_thread(void *arg) spin_lock(&rwv->rw_priv_lock); atomic_inc(&rwv->rw_completed); atomic_dec(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s writer thread dropped rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -359,33 +358,31 @@ kzt_rwlock_test2_writer_thread(void *arg) spin_unlock(&rwv->rw_priv_lock); rw_exit(&rwv->rwl); - return 0; } static int -kzt_rwlock_test2(struct file *file, void *arg) +splat_rwlock_test2(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[KZT_RWLOCK_TEST_COUNT]; - rw_thr_t rwt[KZT_RWLOCK_TEST_COUNT]; + long pids[SPLAT_RWLOCK_TEST_COUNT]; + rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; rw_priv_t rwv; - /* Initialize private data - * including the rwlock */ - kzt_init_rw_priv(&rwv, file); + /* Initialize private data including the rwlock */ + splat_init_rw_priv(&rwv, file); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { rwt[i].rwt_rwp = &rwv; rwt[i].rwt_id = i; - rwt[i].rwt_name = KZT_RWLOCK_TEST2_NAME; + rwt[i].rwt_name = SPLAT_RWLOCK_TEST2_NAME; rwt[i].rwt_rc = 0; /* The first thread will be a writer */ - pids[i] = kernel_thread(kzt_rwlock_test2_writer_thread, + pids[i] = kernel_thread(splat_rwlock_test2_writer_thread, &rwt[i], 0); if (pids[i] >= 0) { @@ -394,27 +391,27 @@ kzt_rwlock_test2(struct file *file, void *arg) } /* Wait for writers to get queued up */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_waiters) < KZT_RWLOCK_TEST_COUNT)) { - kzt_rwlock_sleep(1 * HZ); + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_waiters) < SPLAT_RWLOCK_TEST_COUNT)) { + splat_rwlock_sleep(1 * HZ); } /* Relase the writers */ spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_WRITERS); + atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_WRITERS); spin_unlock(&rwv.rw_priv_lock); wake_up_interruptible(&rwv.rw_waitq); /* Wait for the test to complete */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) != 0 || atomic_read(&rwv.rw_waiters) != 0)) { - kzt_rwlock_sleep(1 * HZ); + splat_rwlock_sleep(1 * HZ); } /* If any of the write threads ever acquired the lock * while another thread had it, make sure we return * an error */ - for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { if (rwt[i].rwt_rc) { rc++; } @@ -425,7 +422,7 @@ kzt_rwlock_test2(struct file *file, void *arg) } static int -kzt_rwlock_test3(struct file *file, void *arg) +splat_rwlock_test3(struct file *file, void *arg) { kthread_t *owner; rw_priv_t rwv; @@ -433,13 +430,13 @@ kzt_rwlock_test3(struct file *file, void *arg) /* Initialize private data * including the rwlock */ - kzt_init_rw_priv(&rwv, file); + splat_init_rw_priv(&rwv, file); /* Take the rwlock for writing */ rw_enter(&rwv.rwl, RW_WRITER); owner = rw_owner(&rwv.rwl); if (current != owner) { - kzt_vprint(file, KZT_RWLOCK_TEST3_NAME, "rwlock should " + splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "rwlock should " "be owned by pid %d but is owned by pid %d\n", current->pid, owner ? owner->pid : -1); rc = -EINVAL; @@ -450,7 +447,7 @@ kzt_rwlock_test3(struct file *file, void *arg) rw_exit(&rwv.rwl); owner = rw_owner(&rwv.rwl); if (owner) { - kzt_vprint(file, KZT_RWLOCK_TEST3_NAME, "rwlock should not " + splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "rwlock should not " "be owned but is owned by pid %d\n", owner->pid); rc = -EINVAL; goto out; @@ -461,7 +458,7 @@ kzt_rwlock_test3(struct file *file, void *arg) rw_enter(&rwv.rwl, RW_READER); owner = rw_owner(&rwv.rwl); if (owner) { - kzt_vprint(file, KZT_RWLOCK_TEST3_NAME, "rwlock should not " + splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "rwlock should not " "be owned but is owned by pid %d\n", owner->pid); /* Release the rwlock */ rw_exit(&rwv.rwl); @@ -478,28 +475,28 @@ out: } int -kzt_rwlock_test4_reader_thread(void *arg) +splat_rwlock_test4_reader_thread(void *arg) { rw_thr_t *rwt = (rw_thr_t *)arg; rw_priv_t *rwv = rwt->rwt_rwp; uint8_t rnd = 0; char name[16]; - ASSERT(rwv->rw_magic == KZT_RWLOCK_TEST_MAGIC); + ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); snprintf(name, sizeof(name), "%s%d", - KZT_RWLOCK_TEST_NAME, rwt->rwt_id); + SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); daemonize(name); get_random_bytes((void *)&rnd, 1); - kzt_rwlock_sleep(rnd * HZ / 1000); + splat_rwlock_sleep(rnd * HZ / 1000); /* Don't try and and take the semaphore until * someone else has already acquired it */ wait_event_interruptible(rwv->rw_waitq, - kzt_rwlock_lock_and_test(&rwv->rw_priv_lock, + splat_rwlock_lock_and_test(&rwv->rw_priv_lock, atomic_read(&rwv->rw_acquired) > 0)); spin_lock(&rwv->rw_priv_lock); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s reader thread trying to acquire rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -516,22 +513,22 @@ kzt_rwlock_test4_reader_thread(void *arg) if (rwt->rwt_rc == 1) { spin_lock(&rwv->rw_priv_lock); atomic_inc(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s reader thread acquired rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), atomic_read(&rwv->rw_waiters)); spin_unlock(&rwv->rw_priv_lock); - + spin_lock(&rwv->rw_priv_lock); atomic_dec(&rwv->rw_acquired); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s reader thread dropped rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), atomic_read(&rwv->rw_waiters)); spin_unlock(&rwv->rw_priv_lock); - + /* Release the semaphore */ rw_exit(&rwv->rwl); } @@ -540,7 +537,7 @@ kzt_rwlock_test4_reader_thread(void *arg) else { spin_lock(&rwv->rw_priv_lock); atomic_inc(&rwv->rw_completed); - kzt_vprint(rwv->rw_file, rwt->rwt_name, + splat_vprint(rwv->rw_file, rwt->rwt_name, "%s reader thread could not acquire rwlock with " "%d holding lock and %d waiting\n", name, atomic_read(&rwv->rw_acquired), @@ -552,32 +549,32 @@ kzt_rwlock_test4_reader_thread(void *arg) } static int -kzt_rwlock_test4(struct file *file, void *arg) +splat_rwlock_test4(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[KZT_RWLOCK_TEST_COUNT]; - rw_thr_t rwt[KZT_RWLOCK_TEST_COUNT]; + long pids[SPLAT_RWLOCK_TEST_COUNT]; + rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; rw_priv_t rwv; /* Initialize private data * including the rwlock */ - kzt_init_rw_priv(&rwv, file); + splat_init_rw_priv(&rwv, file); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { rwt[i].rwt_rwp = &rwv; rwt[i].rwt_id = i; - rwt[i].rwt_name = KZT_RWLOCK_TEST4_NAME; + rwt[i].rwt_name = SPLAT_RWLOCK_TEST4_NAME; rwt[i].rwt_rc = 0; /* The first thread will be a writer */ if (i == 0) { /* We can reuse the test1 writer thread here */ - pids[i] = kernel_thread(kzt_rwlock_test1_writer_thread, + pids[i] = kernel_thread(splat_rwlock_test1_writer_thread, &rwt[i], 0); } else { - pids[i] = kernel_thread(kzt_rwlock_test4_reader_thread, + pids[i] = kernel_thread(splat_rwlock_test4_reader_thread, &rwt[i], 0); } @@ -587,34 +584,34 @@ kzt_rwlock_test4(struct file *file, void *arg) } /* Once the writer has the lock, release the readers */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) <= 0)) { - kzt_rwlock_sleep(1 * HZ); + splat_rwlock_sleep(1 * HZ); } wake_up_interruptible(&rwv.rw_waitq); /* Make sure that the reader threads complete */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_completed) != KZT_RWLOCK_TEST_COUNT - 1)) { - kzt_rwlock_sleep(1 * HZ); + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, + atomic_read(&rwv.rw_completed) != SPLAT_RWLOCK_TEST_COUNT - 1)) { + splat_rwlock_sleep(1 * HZ); } /* Release the writer */ spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, KZT_RWLOCK_RELEASE_WRITERS); + atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_WRITERS); spin_unlock(&rwv.rw_priv_lock); wake_up_interruptible(&rwv.rw_waitq); /* Wait for the test to complete */ - while (kzt_rwlock_lock_and_test(&rwv.rw_priv_lock, + while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) != 0 || atomic_read(&rwv.rw_waiters) != 0)) { - kzt_rwlock_sleep(1 * HZ); + splat_rwlock_sleep(1 * HZ); } /* If any of the reader threads ever acquired the lock * while another thread had it, make sure we return * an error since the rw_tryenter() should have failed */ - for (i = 0; i < KZT_RWLOCK_TEST_COUNT; i++) { + for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { if (rwt[i].rwt_rc) { rc++; } @@ -625,7 +622,7 @@ kzt_rwlock_test4(struct file *file, void *arg) } static int -kzt_rwlock_test5(struct file *file, void *arg) +splat_rwlock_test5(struct file *file, void *arg) { kthread_t *owner; rw_priv_t rwv; @@ -633,13 +630,13 @@ kzt_rwlock_test5(struct file *file, void *arg) /* Initialize private data * including the rwlock */ - kzt_init_rw_priv(&rwv, file); + splat_init_rw_priv(&rwv, file); /* Take the rwlock for writing */ rw_enter(&rwv.rwl, RW_WRITER); owner = rw_owner(&rwv.rwl); if (current != owner) { - kzt_vprint(file, KZT_RWLOCK_TEST5_NAME, "rwlock should " + splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, "rwlock should " "be owned by pid %d but is owned by pid %d\n", current->pid, owner ? owner->pid : -1); rc = -EINVAL; @@ -652,7 +649,7 @@ kzt_rwlock_test5(struct file *file, void *arg) owner = rw_owner(&rwv.rwl); if (owner) { - kzt_vprint(file, KZT_RWLOCK_TEST5_NAME, "rwlock should not " + splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, "rwlock should not " "be owned but is owned by pid %d\n", owner->pid); /* Release the rwlock */ rw_exit(&rwv.rwl); @@ -669,7 +666,7 @@ out: } static int -kzt_rwlock_test6(struct file *file, void *arg) +splat_rwlock_test6(struct file *file, void *arg) { kthread_t *owner; rw_priv_t rwv; @@ -677,13 +674,13 @@ kzt_rwlock_test6(struct file *file, void *arg) /* Initialize private data * including the rwlock */ - kzt_init_rw_priv(&rwv, file); + splat_init_rw_priv(&rwv, file); /* Take the rwlock for reading */ rw_enter(&rwv.rwl, RW_READER); owner = rw_owner(&rwv.rwl); if (owner) { - kzt_vprint(file, KZT_RWLOCK_TEST6_NAME, "rwlock should not " + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "rwlock should not " "be owned but is owned by pid %d\n", owner->pid); rc = -EINVAL; goto out; @@ -695,7 +692,7 @@ kzt_rwlock_test6(struct file *file, void *arg) owner = rw_owner(&rwv.rwl); if (rc || current != owner) { - kzt_vprint(file, KZT_RWLOCK_TEST6_NAME, "rwlock should " + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "rwlock should " "be owned by pid %d but is owned by pid %d " "trylock rc %d\n", current->pid, owner ? owner->pid : -1, rc); @@ -711,53 +708,53 @@ out: return rc; } -kzt_subsystem_t * -kzt_rwlock_init(void) +splat_subsystem_t * +splat_rwlock_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_RWLOCK_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_RWLOCK_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_RWLOCK_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_RWLOCK_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_RWLOCK; + sub->desc.id = SPLAT_SUBSYSTEM_RWLOCK; - KZT_TEST_INIT(sub, KZT_RWLOCK_TEST1_NAME, KZT_RWLOCK_TEST1_DESC, - KZT_RWLOCK_TEST1_ID, kzt_rwlock_test1); - KZT_TEST_INIT(sub, KZT_RWLOCK_TEST2_NAME, KZT_RWLOCK_TEST2_DESC, - KZT_RWLOCK_TEST2_ID, kzt_rwlock_test2); - KZT_TEST_INIT(sub, KZT_RWLOCK_TEST3_NAME, KZT_RWLOCK_TEST3_DESC, - KZT_RWLOCK_TEST3_ID, kzt_rwlock_test3); - KZT_TEST_INIT(sub, KZT_RWLOCK_TEST4_NAME, KZT_RWLOCK_TEST4_DESC, - KZT_RWLOCK_TEST4_ID, kzt_rwlock_test4); - KZT_TEST_INIT(sub, KZT_RWLOCK_TEST5_NAME, KZT_RWLOCK_TEST5_DESC, - KZT_RWLOCK_TEST5_ID, kzt_rwlock_test5); - KZT_TEST_INIT(sub, KZT_RWLOCK_TEST6_NAME, KZT_RWLOCK_TEST6_DESC, - KZT_RWLOCK_TEST6_ID, kzt_rwlock_test6); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, + SPLAT_RWLOCK_TEST1_ID, splat_rwlock_test1); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, + SPLAT_RWLOCK_TEST2_ID, splat_rwlock_test2); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, + SPLAT_RWLOCK_TEST3_ID, splat_rwlock_test3); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, + SPLAT_RWLOCK_TEST4_ID, splat_rwlock_test4); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, + SPLAT_RWLOCK_TEST5_ID, splat_rwlock_test5); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, + SPLAT_RWLOCK_TEST6_ID, splat_rwlock_test6); return sub; } void -kzt_rwlock_fini(kzt_subsystem_t *sub) +splat_rwlock_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_RWLOCK_TEST6_ID); - KZT_TEST_FINI(sub, KZT_RWLOCK_TEST5_ID); - KZT_TEST_FINI(sub, KZT_RWLOCK_TEST4_ID); - KZT_TEST_FINI(sub, KZT_RWLOCK_TEST3_ID); - KZT_TEST_FINI(sub, KZT_RWLOCK_TEST2_ID); - KZT_TEST_FINI(sub, KZT_RWLOCK_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST6_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST5_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST1_ID); kfree(sub); } int -kzt_rwlock_id(void) { - return KZT_SUBSYSTEM_RWLOCK; +splat_rwlock_id(void) { + return SPLAT_SUBSYSTEM_RWLOCK; } diff --git a/modules/splat/splat-taskq.c b/modules/splat/splat-taskq.c index 3d5c075f4..5abe3a02d 100644 --- a/modules/splat/splat-taskq.c +++ b/modules/splat/splat-taskq.c @@ -1,75 +1,75 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_TASKQ 0x0200 -#define KZT_TASKQ_NAME "taskq" -#define KZT_TASKQ_DESC "Kernel Task Queue Tests" +#define SPLAT_SUBSYSTEM_TASKQ 0x0200 +#define SPLAT_TASKQ_NAME "taskq" +#define SPLAT_TASKQ_DESC "Kernel Task Queue Tests" -#define KZT_TASKQ_TEST1_ID 0x0201 -#define KZT_TASKQ_TEST1_NAME "single" -#define KZT_TASKQ_TEST1_DESC "Single task queue, single task" +#define SPLAT_TASKQ_TEST1_ID 0x0201 +#define SPLAT_TASKQ_TEST1_NAME "single" +#define SPLAT_TASKQ_TEST1_DESC "Single task queue, single task" -#define KZT_TASKQ_TEST2_ID 0x0202 -#define KZT_TASKQ_TEST2_NAME "multiple" -#define KZT_TASKQ_TEST2_DESC "Multiple task queues, multiple tasks" +#define SPLAT_TASKQ_TEST2_ID 0x0202 +#define SPLAT_TASKQ_TEST2_NAME "multiple" +#define SPLAT_TASKQ_TEST2_DESC "Multiple task queues, multiple tasks" -typedef struct kzt_taskq_arg { +typedef struct splat_taskq_arg { int flag; int id; struct file *file; const char *name; -} kzt_taskq_arg_t; +} splat_taskq_arg_t; /* Validation Test 1 - Create a taskq, queue a task, wait until * task completes, ensure task ran properly, cleanup taskq, */ static void -kzt_taskq_test1_func(void *arg) +splat_taskq_test1_func(void *arg) { - kzt_taskq_arg_t *tq_arg = (kzt_taskq_arg_t *)arg; + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; ASSERT(tq_arg); - kzt_vprint(tq_arg->file, KZT_TASKQ_TEST1_NAME, + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' setting flag\n", - tq_arg->name, sym2str(kzt_taskq_test1_func)); + tq_arg->name, sym2str(splat_taskq_test1_func)); tq_arg->flag = 1; } static int -kzt_taskq_test1(struct file *file, void *arg) +splat_taskq_test1(struct file *file, void *arg) { taskq_t *tq; taskqid_t id; - kzt_taskq_arg_t tq_arg; + splat_taskq_arg_t tq_arg; - kzt_vprint(file, KZT_TASKQ_TEST1_NAME, "Taskq '%s' creating\n", - KZT_TASKQ_TEST1_NAME); - if ((tq = taskq_create(KZT_TASKQ_TEST1_NAME, 1, 0, 0, 0, 0)) == NULL) { - kzt_vprint(file, KZT_TASKQ_TEST1_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' creating\n", + SPLAT_TASKQ_TEST1_NAME); + if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, 0, 0, 0, 0)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' create failed\n", - KZT_TASKQ_TEST1_NAME); + SPLAT_TASKQ_TEST1_NAME); return -EINVAL; } tq_arg.flag = 0; tq_arg.id = 0; tq_arg.file = file; - tq_arg.name = KZT_TASKQ_TEST1_NAME; + tq_arg.name = SPLAT_TASKQ_TEST1_NAME; - kzt_vprint(file, KZT_TASKQ_TEST1_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatching\n", - tq_arg.name, sym2str(kzt_taskq_test1_func)); - if ((id = taskq_dispatch(tq, kzt_taskq_test1_func, &tq_arg, 0)) == 0) { - kzt_vprint(file, KZT_TASKQ_TEST1_NAME, + tq_arg.name, sym2str(splat_taskq_test1_func)); + if ((id = taskq_dispatch(tq, splat_taskq_test1_func, &tq_arg, 0)) == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatch failed\n", - tq_arg.name, sym2str(kzt_taskq_test1_func)); + tq_arg.name, sym2str(splat_taskq_test1_func)); taskq_destory(tq); return -EINVAL; } - kzt_vprint(file, KZT_TASKQ_TEST1_NAME, "Taskq '%s' waiting\n", + splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' waiting\n", tq_arg.name); taskq_wait(tq); - kzt_vprint(file, KZT_TASKQ_TEST1_NAME, "Taskq '%s' destroying\n", + splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' destroying\n", tq_arg.name); taskq_destory(tq); @@ -81,50 +81,50 @@ kzt_taskq_test1(struct file *file, void *arg) * the correct order, cleanup taskq's */ static void -kzt_taskq_test2_func1(void *arg) +splat_taskq_test2_func1(void *arg) { - kzt_taskq_arg_t *tq_arg = (kzt_taskq_arg_t *)arg; + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; ASSERT(tq_arg); - kzt_vprint(tq_arg->file, KZT_TASKQ_TEST2_NAME, + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' flag = %d = %d * 2\n", tq_arg->name, tq_arg->id, - sym2str(kzt_taskq_test2_func1), + sym2str(splat_taskq_test2_func1), tq_arg->flag * 2, tq_arg->flag); tq_arg->flag *= 2; } static void -kzt_taskq_test2_func2(void *arg) +splat_taskq_test2_func2(void *arg) { - kzt_taskq_arg_t *tq_arg = (kzt_taskq_arg_t *)arg; + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; ASSERT(tq_arg); - kzt_vprint(tq_arg->file, KZT_TASKQ_TEST2_NAME, + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' flag = %d = %d + 1\n", tq_arg->name, tq_arg->id, - sym2str(kzt_taskq_test2_func2), + sym2str(splat_taskq_test2_func2), tq_arg->flag + 1, tq_arg->flag); tq_arg->flag += 1; } #define TEST2_TASKQS 8 static int -kzt_taskq_test2(struct file *file, void *arg) { +splat_taskq_test2(struct file *file, void *arg) { taskq_t *tq[TEST2_TASKQS] = { NULL }; taskqid_t id; - kzt_taskq_arg_t tq_args[TEST2_TASKQS]; + splat_taskq_arg_t tq_args[TEST2_TASKQS]; int i, rc = 0; for (i = 0; i < TEST2_TASKQS; i++) { - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, "Taskq '%s/%d' " - "creating\n", KZT_TASKQ_TEST2_NAME, i); - if ((tq[i] = taskq_create(KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' " + "creating\n", SPLAT_TASKQ_TEST2_NAME, i); + if ((tq[i] = taskq_create(SPLAT_TASKQ_TEST2_NAME, 1, 0, 0, 0, 0)) == NULL) { - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' create failed\n", - KZT_TASKQ_TEST2_NAME, i); + SPLAT_TASKQ_TEST2_NAME, i); rc = -EINVAL; break; } @@ -132,32 +132,32 @@ kzt_taskq_test2(struct file *file, void *arg) { tq_args[i].flag = i; tq_args[i].id = i; tq_args[i].file = file; - tq_args[i].name = KZT_TASKQ_TEST2_NAME; + tq_args[i].name = SPLAT_TASKQ_TEST2_NAME; - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatching\n", - tq_args[i].name, tq_args[i].id, - sym2str(kzt_taskq_test2_func1)); + tq_args[i].name, tq_args[i].id, + sym2str(splat_taskq_test2_func1)); if ((id = taskq_dispatch( - tq[i], kzt_taskq_test2_func1, &tq_args[i], 0)) == 0) { - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + tq[i], splat_taskq_test2_func1, &tq_args[i], 0)) == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch " "failed\n", tq_args[i].name, tq_args[i].id, - sym2str(kzt_taskq_test2_func1)); + sym2str(splat_taskq_test2_func1)); rc = -EINVAL; break; } - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatching\n", - tq_args[i].name, tq_args[i].id, - sym2str(kzt_taskq_test2_func2)); + tq_args[i].name, tq_args[i].id, + sym2str(splat_taskq_test2_func2)); if ((id = taskq_dispatch( - tq[i], kzt_taskq_test2_func2, &tq_args[i], 0)) == 0) { - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + tq[i], splat_taskq_test2_func2, &tq_args[i], 0)) == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch failed\n", tq_args[i].name, tq_args[i].id, - sym2str(kzt_taskq_test2_func2)); + sym2str(splat_taskq_test2_func2)); rc = -EINVAL; break; } @@ -167,24 +167,24 @@ kzt_taskq_test2(struct file *file, void *arg) { * ignore new errors in that case. They just cause noise. */ for (i = 0; i < TEST2_TASKQS; i++) { if (tq[i] != NULL) { - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' waiting\n", tq_args[i].name, tq_args[i].id); taskq_wait(tq[i]); - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d; destroying\n", tq_args[i].name, tq_args[i].id); taskq_destory(tq[i]); if (!rc && tq_args[i].flag != ((i * 2) + 1)) { - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' processed tasks " "out of order; %d != %d\n", tq_args[i].name, tq_args[i].id, tq_args[i].flag, i * 2 + 1); rc = -EINVAL; } else { - kzt_vprint(file, KZT_TASKQ_TEST2_NAME, + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' processed tasks " "in the correct order; %d == %d\n", tq_args[i].name, tq_args[i].id, @@ -196,42 +196,42 @@ kzt_taskq_test2(struct file *file, void *arg) { return rc; } -kzt_subsystem_t * -kzt_taskq_init(void) +splat_subsystem_t * +splat_taskq_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_TASKQ_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_TASKQ_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_TASKQ_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_TASKQ_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_TASKQ; + sub->desc.id = SPLAT_SUBSYSTEM_TASKQ; - KZT_TEST_INIT(sub, KZT_TASKQ_TEST1_NAME, KZT_TASKQ_TEST1_DESC, - KZT_TASKQ_TEST1_ID, kzt_taskq_test1); - KZT_TEST_INIT(sub, KZT_TASKQ_TEST2_NAME, KZT_TASKQ_TEST2_DESC, - KZT_TASKQ_TEST2_ID, kzt_taskq_test2); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST1_NAME, SPLAT_TASKQ_TEST1_DESC, + SPLAT_TASKQ_TEST1_ID, splat_taskq_test1); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST2_NAME, SPLAT_TASKQ_TEST2_DESC, + SPLAT_TASKQ_TEST2_ID, splat_taskq_test2); return sub; } void -kzt_taskq_fini(kzt_subsystem_t *sub) +splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_TASKQ_TEST2_ID); - KZT_TEST_FINI(sub, KZT_TASKQ_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST1_ID); kfree(sub); } int -kzt_taskq_id(void) { - return KZT_SUBSYSTEM_TASKQ; +splat_taskq_id(void) { + return SPLAT_SUBSYSTEM_TASKQ; } diff --git a/modules/splat/splat-thread.c b/modules/splat/splat-thread.c index 34260c2d6..aff18cd5f 100644 --- a/modules/splat/splat-thread.c +++ b/modules/splat/splat-thread.c @@ -1,14 +1,14 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_THREAD 0x0600 -#define KZT_THREAD_NAME "thread" -#define KZT_THREAD_DESC "Kernel Thread Tests" +#define SPLAT_SUBSYSTEM_THREAD 0x0600 +#define SPLAT_THREAD_NAME "thread" +#define SPLAT_THREAD_DESC "Kernel Thread Tests" -#define KZT_THREAD_TEST1_ID 0x0601 -#define KZT_THREAD_TEST1_NAME "create" -#define KZT_THREAD_TEST1_DESC "Validate thread creation and destruction" +#define SPLAT_THREAD_TEST1_ID 0x0601 +#define SPLAT_THREAD_TEST1_NAME "create" +#define SPLAT_THREAD_TEST1_DESC "Validate thread creation and destruction" -#define KZT_THREAD_TEST_MAGIC 0x4488CC00UL +#define SPLAT_THREAD_TEST_MAGIC 0x4488CC00UL typedef struct thread_priv { unsigned long tp_magic; @@ -20,12 +20,12 @@ typedef struct thread_priv { static void -kzt_thread_work(void *priv) +splat_thread_work(void *priv) { thread_priv_t *tp = (thread_priv_t *)priv; spin_lock(&tp->tp_lock); - ASSERT(tp->tp_magic == KZT_THREAD_TEST_MAGIC); + ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); tp->tp_rc = 1; spin_unlock(&tp->tp_lock); @@ -35,14 +35,14 @@ kzt_thread_work(void *priv) } static int -kzt_thread_test1(struct file *file, void *arg) +splat_thread_test1(struct file *file, void *arg) { thread_priv_t tp; DEFINE_WAIT(wait); kthread_t *thr; int rc = 0; - tp.tp_magic = KZT_THREAD_TEST_MAGIC; + tp.tp_magic = SPLAT_THREAD_TEST_MAGIC; tp.tp_file = file; spin_lock_init(&tp.tp_lock); init_waitqueue_head(&tp.tp_waitq); @@ -50,7 +50,7 @@ kzt_thread_test1(struct file *file, void *arg) spin_lock(&tp.tp_lock); - thr = (kthread_t *)thread_create(NULL, 0, kzt_thread_work, &tp, 0, + thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work, &tp, 0, (proc_t *) &p0, TS_RUN, minclsyspri); /* Must never fail under Solaris, but we check anyway so we can * report an error when this impossible thing happens */ @@ -69,7 +69,7 @@ kzt_thread_test1(struct file *file, void *arg) spin_lock(&tp.tp_lock); } - kzt_vprint(file, KZT_THREAD_TEST1_NAME, "%s", + splat_vprint(file, SPLAT_THREAD_TEST1_NAME, "%s", "Thread successfully started and exited cleanly\n"); out: spin_unlock(&tp.tp_lock); @@ -77,39 +77,39 @@ out: return rc; } -kzt_subsystem_t * -kzt_thread_init(void) +splat_subsystem_t * +splat_thread_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_THREAD_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_THREAD_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_THREAD_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_THREAD_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_THREAD; + sub->desc.id = SPLAT_SUBSYSTEM_THREAD; - KZT_TEST_INIT(sub, KZT_THREAD_TEST1_NAME, KZT_THREAD_TEST1_DESC, - KZT_THREAD_TEST1_ID, kzt_thread_test1); + SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC, + SPLAT_THREAD_TEST1_ID, splat_thread_test1); return sub; } void -kzt_thread_fini(kzt_subsystem_t *sub) +splat_thread_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_THREAD_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST1_ID); kfree(sub); } int -kzt_thread_id(void) { - return KZT_SUBSYSTEM_THREAD; +splat_thread_id(void) { + return SPLAT_SUBSYSTEM_THREAD; } diff --git a/modules/splat/splat-time.c b/modules/splat/splat-time.c index 3e8007a37..99568c982 100644 --- a/modules/splat/splat-time.c +++ b/modules/splat/splat-time.c @@ -1,40 +1,42 @@ -#include +#include "splat-internal.h" -#define KZT_SUBSYSTEM_TIME 0x0800 -#define KZT_TIME_NAME "time" -#define KZT_TIME_DESC "Kernel Time Tests" +#define SPLAT_SUBSYSTEM_TIME 0x0800 +#define SPLAT_TIME_NAME "time" +#define SPLAT_TIME_DESC "Kernel Time Tests" -#define KZT_TIME_TEST1_ID 0x0801 -#define KZT_TIME_TEST1_NAME "time1" -#define KZT_TIME_TEST1_DESC "HZ Test" +#define SPLAT_TIME_TEST1_ID 0x0801 +#define SPLAT_TIME_TEST1_NAME "time1" +#define SPLAT_TIME_TEST1_DESC "HZ Test" -#define KZT_TIME_TEST2_ID 0x0802 -#define KZT_TIME_TEST2_NAME "time2" -#define KZT_TIME_TEST2_DESC "Monotonic Test" +#define SPLAT_TIME_TEST2_ID 0x0802 +#define SPLAT_TIME_TEST2_NAME "time2" +#define SPLAT_TIME_TEST2_DESC "Monotonic Test" static int -kzt_time_test1(struct file *file, void *arg) +splat_time_test1(struct file *file, void *arg) { int myhz = hz; - kzt_vprint(file, KZT_TIME_TEST1_NAME, "hz is %d\n", myhz); + splat_vprint(file, SPLAT_TIME_TEST1_NAME, "hz is %d\n", myhz); return 0; } static int -kzt_time_test2(struct file *file, void *arg) +splat_time_test2(struct file *file, void *arg) { hrtime_t tm1, tm2; int i; tm1 = gethrtime(); - kzt_vprint(file, KZT_TIME_TEST2_NAME, "time is %lld\n", tm1); + splat_vprint(file, SPLAT_TIME_TEST2_NAME, "time is %lld\n", tm1); for(i = 0; i < 100; i++) { tm2 = gethrtime(); - kzt_vprint(file, KZT_TIME_TEST2_NAME, "time is %lld\n", tm2); + splat_vprint(file, SPLAT_TIME_TEST2_NAME, "time is %lld\n", tm2); if(tm1 > tm2) { - kzt_print(file, "%s: gethrtime() is not giving monotonically increasing values\n", KZT_TIME_TEST2_NAME); + splat_print(file, "%s: gethrtime() is not giving " + "monotonically increasing values\n", + SPLAT_TIME_TEST2_NAME); return 1; } tm1 = tm2; @@ -46,44 +48,44 @@ kzt_time_test2(struct file *file, void *arg) return 0; } -kzt_subsystem_t * -kzt_time_init(void) +splat_subsystem_t * +splat_time_init(void) { - kzt_subsystem_t *sub; + splat_subsystem_t *sub; sub = kmalloc(sizeof(*sub), GFP_KERNEL); if (sub == NULL) return NULL; memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, KZT_TIME_NAME, KZT_NAME_SIZE); - strncpy(sub->desc.desc, KZT_TIME_DESC, KZT_DESC_SIZE); + strncpy(sub->desc.name, SPLAT_TIME_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_TIME_DESC, SPLAT_DESC_SIZE); INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); spin_lock_init(&sub->test_lock); - sub->desc.id = KZT_SUBSYSTEM_TIME; + sub->desc.id = SPLAT_SUBSYSTEM_TIME; - KZT_TEST_INIT(sub, KZT_TIME_TEST1_NAME, KZT_TIME_TEST1_DESC, - KZT_TIME_TEST1_ID, kzt_time_test1); - KZT_TEST_INIT(sub, KZT_TIME_TEST2_NAME, KZT_TIME_TEST2_DESC, - KZT_TIME_TEST2_ID, kzt_time_test2); + SPLAT_TEST_INIT(sub, SPLAT_TIME_TEST1_NAME, SPLAT_TIME_TEST1_DESC, + SPLAT_TIME_TEST1_ID, splat_time_test1); + SPLAT_TEST_INIT(sub, SPLAT_TIME_TEST2_NAME, SPLAT_TIME_TEST2_DESC, + SPLAT_TIME_TEST2_ID, splat_time_test2); return sub; } void -kzt_time_fini(kzt_subsystem_t *sub) +splat_time_fini(splat_subsystem_t *sub) { ASSERT(sub); - KZT_TEST_FINI(sub, KZT_TIME_TEST2_ID); - KZT_TEST_FINI(sub, KZT_TIME_TEST1_ID); + SPLAT_TEST_FINI(sub, SPLAT_TIME_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_TIME_TEST1_ID); kfree(sub); } int -kzt_time_id(void) +splat_time_id(void) { - return KZT_SUBSYSTEM_TIME; + return SPLAT_SUBSYSTEM_TIME; } From 07d339d467337b07ff078d4f2bb81c00388c7565 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 28 Feb 2008 00:16:24 +0000 Subject: [PATCH 0015/1062] Add top level make check target which runs the validation suite. Careful with this right now one of the tests still causes a lockup on the node. This happened before the move from the ZFS repo so its not a new issue. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@15 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/Makefile.in | 4 +--- scripts/Makefile.am | 3 +++ scripts/check.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100755 scripts/check.sh diff --git a/modules/Makefile.in b/modules/Makefile.in index f1cb0ca46..cbc84403c 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -7,6 +7,4 @@ all: install uninstall clean distclean maintainer-clean distdir: $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ - - - +check: diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 1c92f977b..eb711fec6 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1 +1,4 @@ EXTRA_DIST = spl.spec.in + +check: + ./check.sh diff --git a/scripts/check.sh b/scripts/check.sh new file mode 100755 index 000000000..d98c67092 --- /dev/null +++ b/scripts/check.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +prog=check.sh +spl_module=../modules/spl/spl.ko +splat_module=../modules/splat/splat.ko +splat_cmd=../cmd/splat + +die() { + echo "${prog}: $1" >&2 + exit 1 +} + +warn() { + echo "${prog}: $1" >&2 +} + +if [ $(id -u) != 0 ]; then + die "Must run as root" +fi + +if /sbin/lsmod | egrep -q "^spl|^splat"; then + die "Must start with spl modules unloaded" +fi + +if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then + die "Source tree must be built, run 'make'" +fi + +echo "Loading ${spl_module}" +/sbin/insmod ${spl_module} || die "Failed to load ${spl_module}" + +echo "Loading ${splat_module}" +/sbin/insmod ${splat_module} || die "Unable to load ${splat_module}" + +sleep 5 +$splat_cmd -a + +echo "Unloading ${splat_module}" +/sbin/rmmod ${splat_module} || die "Failed to unload ${splat_module}" + +echo "Unloading ${spl_module}" +/sbin/rmmod ${spl_module} || die "Unable to unload ${spl_module}" + +exit 0 From 596e65b4e8e98e46705cb470deb72dbf8702b8c2 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 28 Feb 2008 00:48:31 +0000 Subject: [PATCH 0016/1062] OK, I think this is the last of major cleanup and restructuring. We've dropped all the linux- prefixes on the file in favor of spl- which makes more sense. And we've cleaned up some of the includes so everybody should be including their own dependencies properly. All a module which wants to use the spl support needs to do in include spl.h and ensure it has access to Module.symvers. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@16 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/Makefile.am | 8 ++++---- include/{linux-callb.h => spl-callb.h} | 2 +- include/{linux-condvar.h => spl-condvar.h} | 0 include/{linux-cred.h => spl-cred.h} | 0 include/{linux-generic.h => spl-generic.h} | 0 include/{linux-kmem.h => spl-kmem.h} | 0 include/{linux-kstat.h => spl-kstat.h} | 3 ++- include/{linux-mutex.h => spl-mutex.h} | 1 + include/{linux-random.h => spl-random.h} | 0 include/{linux-rwlock.h => spl-rwlock.h} | 2 +- include/{linux-taskq.h => spl-taskq.h} | 2 +- include/{linux-thread.h => spl-thread.h} | 4 ++-- include/{linux-time.h => spl-time.h} | 2 +- include/{linux-timer.h => spl-timer.h} | 0 include/{linux-types.h => spl-types.h} | 0 include/spl.h | 15 +++++++++++++++ modules/spl/Makefile.in | 14 +++++++------- modules/spl/{linux-generic.c => spl-generic.c} | 2 +- modules/spl/{linux-kmem.c => spl-kmem.c} | 2 +- modules/spl/{linux-rwlock.c => spl-rwlock.c} | 2 +- modules/spl/{linux-taskq.c => spl-taskq.c} | 2 +- modules/spl/{linux-thread.c => spl-thread.c} | 5 ++--- modules/splat/splat-internal.h | 18 ++---------------- 23 files changed, 43 insertions(+), 41 deletions(-) rename include/{linux-callb.h => spl-callb.h} (97%) rename include/{linux-condvar.h => spl-condvar.h} (100%) rename include/{linux-cred.h => spl-cred.h} (100%) rename include/{linux-generic.h => spl-generic.h} (100%) rename include/{linux-kmem.h => spl-kmem.h} (100%) rename include/{linux-kstat.h => spl-kstat.h} (99%) rename include/{linux-mutex.h => spl-mutex.h} (99%) rename include/{linux-random.h => spl-random.h} (100%) rename include/{linux-rwlock.h => spl-rwlock.h} (99%) rename include/{linux-taskq.h => spl-taskq.h} (99%) rename include/{linux-thread.h => spl-thread.h} (95%) rename include/{linux-time.h => spl-time.h} (98%) rename include/{linux-timer.h => spl-timer.h} (100%) rename include/{linux-types.h => spl-types.h} (100%) rename modules/spl/{linux-generic.c => spl-generic.c} (93%) rename modules/spl/{linux-kmem.c => spl-kmem.c} (99%) rename modules/spl/{linux-rwlock.c => spl-rwlock.c} (95%) rename modules/spl/{linux-taskq.c => spl-taskq.c} (98%) rename modules/spl/{linux-thread.c => spl-thread.c} (96%) diff --git a/include/Makefile.am b/include/Makefile.am index 6fb965048..b84da9a8e 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,7 +1,7 @@ EXTRA_DIST = spl.h +EXTRA_DIST += spl-condvar.h spl-kmem.h spl-random.h spl-thread.h +EXTRA_DIST += spl-types.h spl-cred.h spl-kstat.h spl-rwlock.h +EXTRA_DIST += spl-time.h spl-callb.h spl-generic.h spl-mutex.h +EXTRA_DIST += spl-taskq.h spl-timer.h EXTRA_DIST += splat-ctl.h -EXTRA_DIST += linux-condvar.h linux-kmem.h linux-random.h linux-thread.h -EXTRA_DIST += linux-types.h linux-cred.h linux-kstat.h linux-rwlock.h -EXTRA_DIST += linux-time.h linux-callb.h linux-generic.h linux-mutex.h -EXTRA_DIST += linux-taskq.h linux-timer.h EXTRA_DIST += list.h diff --git a/include/linux-callb.h b/include/spl-callb.h similarity index 97% rename from include/linux-callb.h rename to include/spl-callb.h index 0a34ad2cf..4480b4202 100644 --- a/include/linux-callb.h +++ b/include/spl-callb.h @@ -6,7 +6,7 @@ extern "C" { #endif #include -#include +#include "spl-mutex.h" #define DEBUG_CALLB diff --git a/include/linux-condvar.h b/include/spl-condvar.h similarity index 100% rename from include/linux-condvar.h rename to include/spl-condvar.h diff --git a/include/linux-cred.h b/include/spl-cred.h similarity index 100% rename from include/linux-cred.h rename to include/spl-cred.h diff --git a/include/linux-generic.h b/include/spl-generic.h similarity index 100% rename from include/linux-generic.h rename to include/spl-generic.h diff --git a/include/linux-kmem.h b/include/spl-kmem.h similarity index 100% rename from include/linux-kmem.h rename to include/spl-kmem.h diff --git a/include/linux-kstat.h b/include/spl-kstat.h similarity index 99% rename from include/linux-kstat.h rename to include/spl-kstat.h index eb65811ef..5fc95ccaa 100644 --- a/include/linux-kstat.h +++ b/include/spl-kstat.h @@ -6,7 +6,8 @@ extern "C" { #endif #include -#include +#include "spl-types.h" +#include "spl-time.h" /* XXX - The minimum functionality here is stubbed out but nothing works. */ diff --git a/include/linux-mutex.h b/include/spl-mutex.h similarity index 99% rename from include/linux-mutex.h rename to include/spl-mutex.h index 46406cf59..a937a1de2 100644 --- a/include/linux-mutex.h +++ b/include/spl-mutex.h @@ -6,6 +6,7 @@ extern "C" { #endif #include +#include "spl-types.h" /* See the "Big Theory Statement" in solaris mutex.c. * diff --git a/include/linux-random.h b/include/spl-random.h similarity index 100% rename from include/linux-random.h rename to include/spl-random.h diff --git a/include/linux-rwlock.h b/include/spl-rwlock.h similarity index 99% rename from include/linux-rwlock.h rename to include/spl-rwlock.h index d212059e7..305ccdf2b 100644 --- a/include/linux-rwlock.h +++ b/include/spl-rwlock.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include "spl-types.h" #ifdef __cplusplus extern "C" { diff --git a/include/linux-taskq.h b/include/spl-taskq.h similarity index 99% rename from include/linux-taskq.h rename to include/spl-taskq.h index 90081b25e..bf6e24438 100644 --- a/include/linux-taskq.h +++ b/include/spl-taskq.h @@ -24,7 +24,7 @@ extern "C" { #include #include #include -#include +#include "spl-types.h" #undef DEBUG_TASKQ_UNIMPLEMENTED diff --git a/include/linux-thread.h b/include/spl-thread.h similarity index 95% rename from include/linux-thread.h rename to include/spl-thread.h index bcee08e47..567d397e1 100644 --- a/include/linux-thread.h +++ b/include/spl-thread.h @@ -8,8 +8,8 @@ extern "C" { #include #include #include -#include -#include +#include "spl-types.h" +#include "spl-generic.h" /* * Thread interfaces diff --git a/include/linux-time.h b/include/spl-time.h similarity index 98% rename from include/linux-time.h rename to include/spl-time.h index 2bbc7b257..8fe1e59aa 100644 --- a/include/linux-time.h +++ b/include/spl-time.h @@ -12,7 +12,7 @@ extern "C" { #include #include -#include +#include "spl-types.h" extern unsigned long long monotonic_clock(void); typedef struct timespec timestruc_t; /* definition per SVr4 */ diff --git a/include/linux-timer.h b/include/spl-timer.h similarity index 100% rename from include/linux-timer.h rename to include/spl-timer.h diff --git a/include/linux-types.h b/include/spl-types.h similarity index 100% rename from include/linux-types.h rename to include/spl-types.h diff --git a/include/spl.h b/include/spl.h index 26e6b8712..d069fd94d 100644 --- a/include/spl.h +++ b/include/spl.h @@ -1,4 +1,19 @@ #ifndef _SPL_H #define _SPL_H +#include "spl-callb.h" +#include "spl-condvar.h" +#include "spl-cred.h" +#include "spl-generic.h" +#include "spl-kmem.h" +#include "spl-kstat.h" +#include "spl-mutex.h" +#include "spl-random.h" +#include "spl-rwlock.h" +#include "spl-taskq.h" +#include "spl-thread.h" +#include "spl-time.h" +#include "spl-timer.h" +#include "spl-types.h" + #endif /* _SPL_H */ diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 134d88227..09e934e4f 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -2,18 +2,18 @@ MODULES := spl DISTFILES = Makefile.in \ - linux-kmem.c linux-rwlock.c linux-taskq.c \ - linux-thread.c linux-generic.c + spl-kmem.c spl-rwlock.c spl-taskq.c \ + spl-thread.c spl-generic.c CPPFLAGS += @KERNELCPPFLAGS@ # Solaris porting layer module obj-m := spl.o -spl-objs += linux-kmem.o -spl-objs += linux-thread.o -spl-objs += linux-taskq.o -spl-objs += linux-rwlock.o -spl-objs += linux-generic.o +spl-objs += spl-kmem.o +spl-objs += spl-thread.o +spl-objs += spl-taskq.o +spl-objs += spl-rwlock.o +spl-objs += spl-generic.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/spl/linux-generic.c b/modules/spl/spl-generic.c similarity index 93% rename from modules/spl/linux-generic.c rename to modules/spl/spl-generic.c index e139c351b..8a8435694 100644 --- a/modules/spl/linux-generic.c +++ b/modules/spl/spl-generic.c @@ -1,4 +1,4 @@ -#include "linux-generic.h" +#include "spl-generic.h" #include "config.h" /* diff --git a/modules/spl/linux-kmem.c b/modules/spl/spl-kmem.c similarity index 99% rename from modules/spl/linux-kmem.c rename to modules/spl/spl-kmem.c index 4dc7c01d8..9b8ba26a7 100644 --- a/modules/spl/linux-kmem.c +++ b/modules/spl/spl-kmem.c @@ -1,4 +1,4 @@ -#include "linux-kmem.h" +#include "spl-kmem.h" /* * Memory allocation interfaces diff --git a/modules/spl/linux-rwlock.c b/modules/spl/spl-rwlock.c similarity index 95% rename from modules/spl/linux-rwlock.c rename to modules/spl/spl-rwlock.c index 24775c414..cafdd9b1c 100644 --- a/modules/spl/linux-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -1,4 +1,4 @@ -#include +#include int rw_lock_held(krwlock_t *rwlp) diff --git a/modules/spl/linux-taskq.c b/modules/spl/spl-taskq.c similarity index 98% rename from modules/spl/linux-taskq.c rename to modules/spl/spl-taskq.c index ddcf57c3c..d20ae59bd 100644 --- a/modules/spl/linux-taskq.c +++ b/modules/spl/spl-taskq.c @@ -1,4 +1,4 @@ -#include +#include /* * Task queue interface diff --git a/modules/spl/linux-thread.c b/modules/spl/spl-thread.c similarity index 96% rename from modules/spl/linux-thread.c rename to modules/spl/spl-thread.c index 9785d50d3..b55f8c6af 100644 --- a/modules/spl/linux-thread.c +++ b/modules/spl/spl-thread.c @@ -1,4 +1,4 @@ -#include +#include /* * Thread interfaces @@ -90,8 +90,7 @@ __thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), /* Solaris says this must never fail so we try forever */ while ((pid = kernel_thread(thread_generic_wrapper, (void *)&tp, 0)) < 0) - printk(KERN_ERR "linux-thread: Unable to create thread; " - "pid = %ld\n", pid); + printk(KERN_ERR "Unable to create thread; pid = %ld\n", pid); /* All signals are ignored due to sleeping TASK_UNINTERRUPTIBLE */ for (;;) { diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 4e017e01e..a64b711fe 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -18,22 +18,8 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include "spl.h" +#include "splat-ctl.h" #define SPLAT_SUBSYSTEM_INIT(type) \ ({ splat_subsystem_t *_sub_; \ From 09b414e880b0c2e4ae08d82354bbae034dafdd9e Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 28 Feb 2008 00:52:31 +0000 Subject: [PATCH 0017/1062] Minor nit, SOLARIS should be SPL git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@17 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/spl-callb.h | 6 +++--- include/spl-condvar.h | 6 +++--- include/spl-cred.h | 6 +++--- include/spl-generic.h | 6 +++--- include/spl-kmem.h | 6 +++--- include/spl-kstat.h | 8 ++++---- include/spl-mutex.h | 6 +++--- include/spl-random.h | 6 +++--- include/spl-rwlock.h | 6 +++--- include/spl-taskq.h | 6 +++--- include/spl-thread.h | 6 +++--- include/spl-time.h | 6 +++--- include/spl-timer.h | 6 +++--- include/spl-types.h | 6 +++--- 14 files changed, 43 insertions(+), 43 deletions(-) diff --git a/include/spl-callb.h b/include/spl-callb.h index 4480b4202..98b966778 100644 --- a/include/spl-callb.h +++ b/include/spl-callb.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_CALLB_H -#define _SOLARIS_CALLB_H +#ifndef _SPL_CALLB_H +#define _SPL_CALLB_H #ifdef __cplusplus extern "C" { @@ -42,5 +42,5 @@ typedef struct callb_cpr { } #endif -#endif /* _SOLARIS_CALLB_H */ +#endif /* _SPL_CALLB_H */ diff --git a/include/spl-condvar.h b/include/spl-condvar.h index 8f5cb922a..6a2060fd2 100644 --- a/include/spl-condvar.h +++ b/include/spl-condvar.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_CONDVAR_H -#define _SOLARIS_CONDVAR_H +#ifndef _SPL_CONDVAR_H +#define _SPL_CONDVAR_H #ifdef __cplusplus extern "C" { @@ -199,4 +199,4 @@ cv_broadcast(kcondvar_t *cvp) if (atomic_read(&cvp->cv_waiters) > 0) wake_up_all(&cvp->cv_event); } -#endif /* _SOLARIS_CONDVAR_H */ +#endif /* _SPL_CONDVAR_H */ diff --git a/include/spl-cred.h b/include/spl-cred.h index 946810d5e..0935a19fa 100644 --- a/include/spl-cred.h +++ b/include/spl-cred.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_CRED_H -#define _SOLARIS_CRED_H +#ifndef _SPL_CRED_H +#define _SPL_CRED_H #ifdef __cplusplus extern "C" { @@ -37,5 +37,5 @@ typedef struct cred { } #endif -#endif /* _SOLARIS_CRED_H */ +#endif /* _SPL_CRED_H */ diff --git a/include/spl-generic.h b/include/spl-generic.h index ee77cba57..2d0989233 100644 --- a/include/spl-generic.h +++ b/include/spl-generic.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_GENERIC_H -#define _SOLARIS_GENERIC_H +#ifndef _SPL_GENERIC_H +#define _SPL_GENERIC_H #ifdef __cplusplus extern "C" { @@ -71,4 +71,4 @@ extern int p0; } #endif -#endif /* _SOLARIS_GENERIC_H */ +#endif /* _SPL_GENERIC_H */ diff --git a/include/spl-kmem.h b/include/spl-kmem.h index 3025e1a97..89367c069 100644 --- a/include/spl-kmem.h +++ b/include/spl-kmem.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_KMEM_H -#define _SOLARIS_KMEM_H +#ifndef _SPL_KMEM_H +#define _SPL_KMEM_H #ifdef __cplusplus extern "C" { @@ -173,4 +173,4 @@ extern __kmem_reap(void); } #endif -#endif /* _SOLARIS_KMEM_H */ +#endif /* _SPL_KMEM_H */ diff --git a/include/spl-kstat.h b/include/spl-kstat.h index 5fc95ccaa..cbef067d5 100644 --- a/include/spl-kstat.h +++ b/include/spl-kstat.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_KSTAT_H -#define _SOLARIS_KSTAT_H +#ifndef _SPL_KSTAT_H +#define _SPL_KSTAT_H #ifdef __cplusplus extern "C" { @@ -111,7 +111,7 @@ typedef struct kstat_named_s { static __inline__ kstat_t * -kstat_create(const char *ks_module, int ks_instance, const char *ks_name, +kstat_create(const char *ks_module, int ks_instance, const char *ks_name, const char *ks_class, uchar_t ks_type, uint_t ks_ndata, uchar_t ks_flags) { @@ -134,5 +134,5 @@ kstat_delete(kstat_t *ksp) } #endif -#endif /* _SOLARIS_KSTAT_H */ +#endif /* _SPL_KSTAT_H */ diff --git a/include/spl-mutex.h b/include/spl-mutex.h index a937a1de2..dec5dd7de 100644 --- a/include/spl-mutex.h +++ b/include/spl-mutex.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_MUTEX_H -#define _SOLARIS_MUTEX_H +#ifndef _SPL_MUTEX_H +#define _SPL_MUTEX_H #ifdef __cplusplus extern "C" { @@ -118,4 +118,4 @@ mutex_owner(kmutex_t *mp) } #endif -#endif /* _SOLARIS_MUTEX_H */ +#endif /* _SPL_MUTEX_H */ diff --git a/include/spl-random.h b/include/spl-random.h index 68ca8dde7..b7f83ce1a 100644 --- a/include/spl-random.h +++ b/include/spl-random.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_RANDOM_H -#define _SOLARIS_RANDOM_H +#ifndef _SPL_RANDOM_H +#define _SPL_RANDOM_H #ifdef __cplusplus extern "C" { @@ -35,4 +35,4 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len) } #endif -#endif /* _SOLARIS_RANDOM_H */ +#endif /* _SPL_RANDOM_H */ diff --git a/include/spl-rwlock.h b/include/spl-rwlock.h index 305ccdf2b..b04a4f0db 100644 --- a/include/spl-rwlock.h +++ b/include/spl-rwlock.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_RWLOCK_H -#define _SOLARIS_RWLOCK_H +#ifndef _SPL_RWLOCK_H +#define _SPL_RWLOCK_H #include #include @@ -221,4 +221,4 @@ rw_owner(krwlock_t *rwlp) } #endif -#endif /* _SOLARIS_RWLOCK_H */ +#endif /* _SPL_RWLOCK_H */ diff --git a/include/spl-taskq.h b/include/spl-taskq.h index bf6e24438..3723a6d47 100644 --- a/include/spl-taskq.h +++ b/include/spl-taskq.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_TASKQ_H -#define _SOLARIS_TASKQ_H +#ifndef _SPL_TASKQ_H +#define _SPL_TASKQ_H #ifdef __cplusplus extern "C" { @@ -84,4 +84,4 @@ extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); } #endif -#endif /* _SOLARIS_TASKQ_H */ +#endif /* _SPL_TASKQ_H */ diff --git a/include/spl-thread.h b/include/spl-thread.h index 567d397e1..8833846e9 100644 --- a/include/spl-thread.h +++ b/include/spl-thread.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_THREAD_H -#define _SOLARIS_THREAD_H +#ifndef _SPL_THREAD_H +#define _SPL_THREAD_H #ifdef __cplusplus extern "C" { @@ -46,5 +46,5 @@ extern void __thread_exit(void); } #endif -#endif /* _SOLARIS_THREAD_H */ +#endif /* _SPL_THREAD_H */ diff --git a/include/spl-time.h b/include/spl-time.h index 8fe1e59aa..576fd191c 100644 --- a/include/spl-time.h +++ b/include/spl-time.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_TIME_H -#define _SOLARIS_TIME_H +#ifndef _SPL_TIME_H +#define _SPL_TIME_H /* * Structure returned by gettimeofday(2) system call, @@ -60,4 +60,4 @@ gethrestime_sec(void) } #endif -#endif /* _SOLARIS_TIME_H */ +#endif /* _SPL_TIME_H */ diff --git a/include/spl-timer.h b/include/spl-timer.h index faee64755..237195d76 100644 --- a/include/spl-timer.h +++ b/include/spl-timer.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_TIMER_H -#define _SOLARIS_TIMER_H +#ifndef _SPL_TIMER_H +#define _SPL_TIMER_H #ifdef __cplusplus extern "C" { @@ -18,5 +18,5 @@ extern "C" { } #endif -#endif /* _SOLARIS_TIMER_H */ +#endif /* _SPL_TIMER_H */ diff --git a/include/spl-types.h b/include/spl-types.h index d61b2f21f..b72b6c9e0 100644 --- a/include/spl-types.h +++ b/include/spl-types.h @@ -1,5 +1,5 @@ -#ifndef _SOLARIS_TYPES_H -#define _SOLARIS_TYPES_H +#ifndef _SPL_TYPES_H +#define _SPL_TYPES_H #ifdef __cplusplus extern "C" { @@ -24,4 +24,4 @@ typedef short pri_t; } #endif -#endif /* _SOLARIS_TYPES_H */ +#endif /* _SPL_TYPES_H */ From f4b377415b4b53722addedc10801db24ad4e6f23 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 1 Mar 2008 00:45:59 +0000 Subject: [PATCH 0018/1062] Reorganize /include/ to add a /sys/, this way we don't need to muck with #includes in existing Solaris style source to get it to find the right stuff. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@18 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- cmd/Makefile.am | 4 +- cmd/splat.h | 2 +- configure.ac | 3 +- include/Makefile.am | 10 ++-- include/spl.h | 19 ------- include/splat-ctl.h | 67 ------------------------ include/sys/Makefile.am | 5 ++ include/{spl-callb.h => sys/callb.h} | 2 +- include/sys/cmn_err.h | 4 ++ include/{spl-condvar.h => sys/condvar.h} | 0 include/{spl-cred.h => sys/cred.h} | 0 include/sys/debug.h | 4 ++ include/{spl-generic.h => sys/generic.h} | 0 include/{spl-kmem.h => sys/kmem.h} | 0 include/{spl-kstat.h => sys/kstat.h} | 4 +- include/{spl-mutex.h => sys/mutex.h} | 2 +- include/sys/param.h | 4 ++ include/{spl-random.h => sys/random.h} | 0 include/{spl-rwlock.h => sys/rwlock.h} | 2 +- include/sys/spl.h | 19 +++++++ include/{spl-taskq.h => sys/taskq.h} | 2 +- include/{spl-thread.h => sys/thread.h} | 4 +- include/{spl-time.h => sys/time.h} | 2 +- include/{spl-timer.h => sys/timer.h} | 0 include/{spl-types.h => sys/types.h} | 0 lib/Makefile.am | 6 ++- lib/list.c | 2 +- {include => lib}/list.h | 0 modules/spl/spl-generic.c | 2 +- modules/spl/spl-kmem.c | 2 +- modules/spl/spl-rwlock.c | 2 +- modules/spl/spl-taskq.c | 2 +- modules/spl/spl-thread.c | 2 +- modules/splat/splat-internal.h | 2 +- 34 files changed, 66 insertions(+), 113 deletions(-) delete mode 100644 include/spl.h delete mode 100644 include/splat-ctl.h create mode 100644 include/sys/Makefile.am rename include/{spl-callb.h => sys/callb.h} (97%) create mode 100644 include/sys/cmn_err.h rename include/{spl-condvar.h => sys/condvar.h} (100%) rename include/{spl-cred.h => sys/cred.h} (100%) create mode 100644 include/sys/debug.h rename include/{spl-generic.h => sys/generic.h} (100%) rename include/{spl-kmem.h => sys/kmem.h} (100%) rename include/{spl-kstat.h => sys/kstat.h} (99%) rename include/{spl-mutex.h => sys/mutex.h} (99%) create mode 100644 include/sys/param.h rename include/{spl-random.h => sys/random.h} (100%) rename include/{spl-rwlock.h => sys/rwlock.h} (99%) create mode 100644 include/sys/spl.h rename include/{spl-taskq.h => sys/taskq.h} (99%) rename include/{spl-thread.h => sys/thread.h} (96%) rename include/{spl-time.h => sys/time.h} (98%) rename include/{spl-timer.h => sys/timer.h} (100%) rename include/{spl-types.h => sys/types.h} (100%) rename {include => lib}/list.h (100%) diff --git a/cmd/Makefile.am b/cmd/Makefile.am index 1a10fa808..d3d747797 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -1,6 +1,8 @@ +DEFAULT_INCLUDES = -I. -I.. -I../lib AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow -INCLUDES = -I$(top_srcdir)/include + sbin_PROGRAMS = splat splat_SOURCES = splat.c splat_LDFLAGS = $(top_builddir)/lib/libcommon.la + EXTRA_DIST = splat.h diff --git a/cmd/splat.h b/cmd/splat.h index 869805723..e4419def5 100644 --- a/cmd/splat.h +++ b/cmd/splat.h @@ -2,7 +2,7 @@ #define _SPLAT_H #include "list.h" -#include "splat-ctl.h" +#include "../include/splat-ctl.h" #define DEV_NAME "/dev/splatctl" #define COLOR_BLACK "\033[0;30m" diff --git a/configure.ac b/configure.ac index 6b8dd7d36..9a7b103d0 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(spl, 0.0.1) -AC_CONFIG_HEADERS([include/config.h]) +AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL AC_PROG_CC @@ -115,6 +115,7 @@ AC_CONFIG_FILES([ Makefile modules/spl/Makefile modules/splat/Makefile include/Makefile + include/sys/Makefile scripts/Makefile scripts/spl.spec ]) diff --git a/include/Makefile.am b/include/Makefile.am index b84da9a8e..161a93a8d 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,7 +1,3 @@ -EXTRA_DIST = spl.h -EXTRA_DIST += spl-condvar.h spl-kmem.h spl-random.h spl-thread.h -EXTRA_DIST += spl-types.h spl-cred.h spl-kstat.h spl-rwlock.h -EXTRA_DIST += spl-time.h spl-callb.h spl-generic.h spl-mutex.h -EXTRA_DIST += spl-taskq.h spl-timer.h -EXTRA_DIST += splat-ctl.h -EXTRA_DIST += list.h +SUBDIRS = sys + +EXTRA_DIST = splat-ctl.h diff --git a/include/spl.h b/include/spl.h deleted file mode 100644 index d069fd94d..000000000 --- a/include/spl.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _SPL_H -#define _SPL_H - -#include "spl-callb.h" -#include "spl-condvar.h" -#include "spl-cred.h" -#include "spl-generic.h" -#include "spl-kmem.h" -#include "spl-kstat.h" -#include "spl-mutex.h" -#include "spl-random.h" -#include "spl-rwlock.h" -#include "spl-taskq.h" -#include "spl-thread.h" -#include "spl-time.h" -#include "spl-timer.h" -#include "spl-types.h" - -#endif /* _SPL_H */ diff --git a/include/splat-ctl.h b/include/splat-ctl.h deleted file mode 100644 index d905340fb..000000000 --- a/include/splat-ctl.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef _SPLAT_CTL_H -#define _SPLAT_CTL_H - -/* Contains shared definitions which both the userspace - * and kernelspace portions of splat must agree on. - */ - -#define SPLAT_MAJOR 229 /* XXX - Arbitrary */ -#define SPLAT_MINORS 1 -#define SPLAT_DEV "/dev/splatctl" - -#define SPLAT_NAME_SIZE 12 -#define SPLAT_DESC_SIZE 60 - -typedef struct splat_user { - char name[SPLAT_NAME_SIZE]; /* short name */ - char desc[SPLAT_DESC_SIZE]; /* short description */ - int id; /* unique numeric id */ -} splat_user_t; - -#define SPLAT_CFG_MAGIC 0x15263748U -typedef struct splat_cfg { - unsigned int cfg_magic; /* Unique magic */ - int cfg_cmd; /* Config command */ - int cfg_arg1; /* Config command arg 1 */ - int cfg_rc1; /* Config response 1 */ - union { - struct { - int size; - splat_user_t descs[0]; - } splat_subsystems; - struct { - int size; - splat_user_t descs[0]; - } splat_tests; - } cfg_data; -} splat_cfg_t; - -#define SPLAT_CMD_MAGIC 0x9daebfc0U -typedef struct splat_cmd { - unsigned int cmd_magic; /* Unique magic */ - int cmd_subsystem; /* Target subsystem */ - int cmd_test; /* Subsystem test */ - int cmd_data_size; /* Extra opaque data */ - char cmd_data_str[0]; /* Opaque data region */ -} splat_cmd_t; - -/* Valid ioctls */ -#define SPLAT_CFG _IOWR('f', 101, long) -#define SPLAT_CMD _IOWR('f', 102, long) - -/* Valid configuration commands */ -#define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ -#define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ -#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ -#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ -#define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ -#define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ - -/* Valid subsystem and test commands defined in each subsystem, we do - * need to be careful to avoid colisions. That alone may argue to define - * them all here, for now we just define the global error codes. - */ -#define SPLAT_SUBSYSTEM_UNKNOWN 0xF00 -#define SPLAT_TEST_UNKNOWN 0xFFF - -#endif /* _SPLAT_CTL_H */ diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am new file mode 100644 index 000000000..c44748e02 --- /dev/null +++ b/include/sys/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = callb.h cmn_err.h condvar.h cred.h +EXTRA_DIST += debug.h generic.h kmem.h kstat.h +EXTRA_DIST += mutex.h param.h random.h rwlock.h +EXTRA_DIST += spl.h taskq.h thread.h time.h +EXTRA_DIST += timer.h types.h diff --git a/include/spl-callb.h b/include/sys/callb.h similarity index 97% rename from include/spl-callb.h rename to include/sys/callb.h index 98b966778..053ddf500 100644 --- a/include/spl-callb.h +++ b/include/sys/callb.h @@ -6,7 +6,7 @@ extern "C" { #endif #include -#include "spl-mutex.h" +#include #define DEBUG_CALLB diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h new file mode 100644 index 000000000..44ccefc9f --- /dev/null +++ b/include/sys/cmn_err.h @@ -0,0 +1,4 @@ +#ifndef _SPL_CMN_ERR_H +#define _SPL_CMN_ERR_H + +#endif /* SPL_CMN_ERR_H */ diff --git a/include/spl-condvar.h b/include/sys/condvar.h similarity index 100% rename from include/spl-condvar.h rename to include/sys/condvar.h diff --git a/include/spl-cred.h b/include/sys/cred.h similarity index 100% rename from include/spl-cred.h rename to include/sys/cred.h diff --git a/include/sys/debug.h b/include/sys/debug.h new file mode 100644 index 000000000..02f64c2cf --- /dev/null +++ b/include/sys/debug.h @@ -0,0 +1,4 @@ +#ifndef _SPL_DEBUG_H +#define _SPL_DEBUG_H + +#endif /* SPL_DEBUG_H */ diff --git a/include/spl-generic.h b/include/sys/generic.h similarity index 100% rename from include/spl-generic.h rename to include/sys/generic.h diff --git a/include/spl-kmem.h b/include/sys/kmem.h similarity index 100% rename from include/spl-kmem.h rename to include/sys/kmem.h diff --git a/include/spl-kstat.h b/include/sys/kstat.h similarity index 99% rename from include/spl-kstat.h rename to include/sys/kstat.h index cbef067d5..0b79a41c0 100644 --- a/include/spl-kstat.h +++ b/include/sys/kstat.h @@ -6,8 +6,8 @@ extern "C" { #endif #include -#include "spl-types.h" -#include "spl-time.h" +#include +#include /* XXX - The minimum functionality here is stubbed out but nothing works. */ diff --git a/include/spl-mutex.h b/include/sys/mutex.h similarity index 99% rename from include/spl-mutex.h rename to include/sys/mutex.h index dec5dd7de..2db4a7f96 100644 --- a/include/spl-mutex.h +++ b/include/sys/mutex.h @@ -6,7 +6,7 @@ extern "C" { #endif #include -#include "spl-types.h" +#include /* See the "Big Theory Statement" in solaris mutex.c. * diff --git a/include/sys/param.h b/include/sys/param.h new file mode 100644 index 000000000..f924006ef --- /dev/null +++ b/include/sys/param.h @@ -0,0 +1,4 @@ +#ifndef _SPL_PARAM_H +#define _SPL_PARAM_H + +#endif /* SPL_PARAM_H */ diff --git a/include/spl-random.h b/include/sys/random.h similarity index 100% rename from include/spl-random.h rename to include/sys/random.h diff --git a/include/spl-rwlock.h b/include/sys/rwlock.h similarity index 99% rename from include/spl-rwlock.h rename to include/sys/rwlock.h index b04a4f0db..6c55ced98 100644 --- a/include/spl-rwlock.h +++ b/include/sys/rwlock.h @@ -5,7 +5,7 @@ #include #include #include -#include "spl-types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/sys/spl.h b/include/sys/spl.h new file mode 100644 index 000000000..7cc1cab58 --- /dev/null +++ b/include/sys/spl.h @@ -0,0 +1,19 @@ +#ifndef _SPL_H +#define _SPL_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* _SPL_H */ diff --git a/include/spl-taskq.h b/include/sys/taskq.h similarity index 99% rename from include/spl-taskq.h rename to include/sys/taskq.h index 3723a6d47..2d7583daf 100644 --- a/include/spl-taskq.h +++ b/include/sys/taskq.h @@ -24,7 +24,7 @@ extern "C" { #include #include #include -#include "spl-types.h" +#include #undef DEBUG_TASKQ_UNIMPLEMENTED diff --git a/include/spl-thread.h b/include/sys/thread.h similarity index 96% rename from include/spl-thread.h rename to include/sys/thread.h index 8833846e9..e7f99c96d 100644 --- a/include/spl-thread.h +++ b/include/sys/thread.h @@ -8,8 +8,8 @@ extern "C" { #include #include #include -#include "spl-types.h" -#include "spl-generic.h" +#include +#include /* * Thread interfaces diff --git a/include/spl-time.h b/include/sys/time.h similarity index 98% rename from include/spl-time.h rename to include/sys/time.h index 576fd191c..726bd5f8a 100644 --- a/include/spl-time.h +++ b/include/sys/time.h @@ -12,7 +12,7 @@ extern "C" { #include #include -#include "spl-types.h" +#include extern unsigned long long monotonic_clock(void); typedef struct timespec timestruc_t; /* definition per SVr4 */ diff --git a/include/spl-timer.h b/include/sys/timer.h similarity index 100% rename from include/spl-timer.h rename to include/sys/timer.h diff --git a/include/spl-types.h b/include/sys/types.h similarity index 100% rename from include/spl-types.h rename to include/sys/types.h diff --git a/lib/Makefile.am b/lib/Makefile.am index 91c228fb0..24ba72913 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,3 +1,7 @@ -INCLUDES = -I$(top_srcdir)/include +DEFAULT_INCLUDES = -I. -I.. +AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow + noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = list.c + +EXTRA_DIST = list.h diff --git a/lib/list.c b/lib/list.c index 6548cacbc..88af47c40 100644 --- a/lib/list.c +++ b/lib/list.c @@ -776,7 +776,7 @@ list_alloc_aux (int size, void *pfreelist) void **plast; assert(sizeof(char) == 1); - assert(size >= sizeof(void *)); + assert(size >= (int)sizeof(void *)); assert(pfreelist != NULL); assert(LIST_ALLOC > 0); list_mutex_lock(&list_free_lock); diff --git a/include/list.h b/lib/list.h similarity index 100% rename from include/list.h rename to lib/list.h diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 8a8435694..653b8cd1f 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -1,4 +1,4 @@ -#include "spl-generic.h" +#include #include "config.h" /* diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 9b8ba26a7..6442d5824 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -1,4 +1,4 @@ -#include "spl-kmem.h" +#include /* * Memory allocation interfaces diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c index cafdd9b1c..d74d89e24 100644 --- a/modules/spl/spl-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -1,4 +1,4 @@ -#include +#include int rw_lock_held(krwlock_t *rwlp) diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index d20ae59bd..0bfae5452 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -1,4 +1,4 @@ -#include +#include /* * Task queue interface diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index b55f8c6af..40b1b316f 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -1,4 +1,4 @@ -#include +#include /* * Thread interfaces diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index a64b711fe..d44c32463 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -18,7 +18,7 @@ #include #include -#include "spl.h" +#include #include "splat-ctl.h" #define SPLAT_SUBSYSTEM_INIT(type) \ From ea70970ff5a372a9d8d9dd960c555a9e4186f04a Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 1 Mar 2008 00:47:23 +0000 Subject: [PATCH 0019/1062] Almost dropped this! git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@19 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/splat-ctl.h | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 include/splat-ctl.h diff --git a/include/splat-ctl.h b/include/splat-ctl.h new file mode 100644 index 000000000..d905340fb --- /dev/null +++ b/include/splat-ctl.h @@ -0,0 +1,67 @@ +#ifndef _SPLAT_CTL_H +#define _SPLAT_CTL_H + +/* Contains shared definitions which both the userspace + * and kernelspace portions of splat must agree on. + */ + +#define SPLAT_MAJOR 229 /* XXX - Arbitrary */ +#define SPLAT_MINORS 1 +#define SPLAT_DEV "/dev/splatctl" + +#define SPLAT_NAME_SIZE 12 +#define SPLAT_DESC_SIZE 60 + +typedef struct splat_user { + char name[SPLAT_NAME_SIZE]; /* short name */ + char desc[SPLAT_DESC_SIZE]; /* short description */ + int id; /* unique numeric id */ +} splat_user_t; + +#define SPLAT_CFG_MAGIC 0x15263748U +typedef struct splat_cfg { + unsigned int cfg_magic; /* Unique magic */ + int cfg_cmd; /* Config command */ + int cfg_arg1; /* Config command arg 1 */ + int cfg_rc1; /* Config response 1 */ + union { + struct { + int size; + splat_user_t descs[0]; + } splat_subsystems; + struct { + int size; + splat_user_t descs[0]; + } splat_tests; + } cfg_data; +} splat_cfg_t; + +#define SPLAT_CMD_MAGIC 0x9daebfc0U +typedef struct splat_cmd { + unsigned int cmd_magic; /* Unique magic */ + int cmd_subsystem; /* Target subsystem */ + int cmd_test; /* Subsystem test */ + int cmd_data_size; /* Extra opaque data */ + char cmd_data_str[0]; /* Opaque data region */ +} splat_cmd_t; + +/* Valid ioctls */ +#define SPLAT_CFG _IOWR('f', 101, long) +#define SPLAT_CMD _IOWR('f', 102, long) + +/* Valid configuration commands */ +#define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ +#define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ +#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ +#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ +#define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ +#define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ + +/* Valid subsystem and test commands defined in each subsystem, we do + * need to be careful to avoid colisions. That alone may argue to define + * them all here, for now we just define the global error codes. + */ +#define SPLAT_SUBSYSTEM_UNKNOWN 0xF00 +#define SPLAT_TEST_UNKNOWN 0xFFF + +#endif /* _SPLAT_CTL_H */ From d5f087adef0e5f62f565998a8d54d7cb3c3fe2fa Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 1 Mar 2008 00:51:41 +0000 Subject: [PATCH 0020/1062] Remaining lose ends git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@20 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9a7b103d0..454e643a9 100644 --- a/configure.ac +++ b/configure.ac @@ -96,9 +96,11 @@ else AC_MSG_RESULT([no]) fi +TOPDIR=`/bin/pwd` + # Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build KERNELMAKE_PARAMS= -KERNELCPPFLAGS="-I`/bin/pwd`/include" +KERNELCPPFLAGS="-I$TOPDIR -I$TOPDIR/include" if test "$kernelbuild" != "$kernelsrc"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" From dbb484ec6002723fc89e2231436c2c7ef51d83d3 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 1 Mar 2008 18:30:12 +0000 Subject: [PATCH 0021/1062] Stub out some missing headers which are expected. I'll fill in what the contents need to be as I encounter the warnings about missing prototypes, symbols, and such. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@21 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/rpc/types.h | 6 ++++++ include/rpc/xdr.h | 6 ++++++ include/sys/errno.h | 4 ++++ include/sys/int_limits.h | 4 ++++ include/sys/isa_defs.h | 4 ++++ include/sys/stropts.h | 4 ++++ include/sys/time.h | 2 -- include/sys/types.h | 5 +++++ include/sys/va_list.h | 4 ++++ include/sys/varargs.h | 4 ++++ 10 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 include/rpc/types.h create mode 100644 include/rpc/xdr.h create mode 100644 include/sys/errno.h create mode 100644 include/sys/int_limits.h create mode 100644 include/sys/isa_defs.h create mode 100644 include/sys/stropts.h create mode 100644 include/sys/va_list.h create mode 100644 include/sys/varargs.h diff --git a/include/rpc/types.h b/include/rpc/types.h new file mode 100644 index 000000000..537d322f1 --- /dev/null +++ b/include/rpc/types.h @@ -0,0 +1,6 @@ +#ifndef _SPL_RPC_TYPES_H +#define _SPL_RPC_TYPES_H + +#include + +#endif /* SPL_RPC_TYPES_H */ diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h new file mode 100644 index 000000000..3cd3574eb --- /dev/null +++ b/include/rpc/xdr.h @@ -0,0 +1,6 @@ +#ifndef _SPL_RPC_XDR_H +#define _SPL_RPC_XDR_H + +#include + +#endif /* SPL_RPC_XDR_H */ diff --git a/include/sys/errno.h b/include/sys/errno.h new file mode 100644 index 000000000..f33fe8682 --- /dev/null +++ b/include/sys/errno.h @@ -0,0 +1,4 @@ +#ifndef _SPL_ERRNO_H +#define _SPL_ERRNO_H + +#endif /* SPL_ERRNO_H */ diff --git a/include/sys/int_limits.h b/include/sys/int_limits.h new file mode 100644 index 000000000..13193e6f1 --- /dev/null +++ b/include/sys/int_limits.h @@ -0,0 +1,4 @@ +#ifndef _SPL_INT_LIMITS_H +#define _SPL_INT_LIMITS_H + +#endif /* SPL_INT_LIMITS_H */ diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h new file mode 100644 index 000000000..953ff02e1 --- /dev/null +++ b/include/sys/isa_defs.h @@ -0,0 +1,4 @@ +#ifndef _SPL_ISA_DEFS_H +#define _SPL_ISA_DEFS_H + +#endif /* SPL_ISA_DEFS_H */ diff --git a/include/sys/stropts.h b/include/sys/stropts.h new file mode 100644 index 000000000..b92949fee --- /dev/null +++ b/include/sys/stropts.h @@ -0,0 +1,4 @@ +#ifndef _SPL_STROPTS_H +#define _SPL_STROPTS_H + +#endif /* SPL_STROPTS_H */ diff --git a/include/sys/time.h b/include/sys/time.h index 726bd5f8a..6124a841d 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -15,8 +15,6 @@ extern "C" { #include extern unsigned long long monotonic_clock(void); -typedef struct timespec timestruc_t; /* definition per SVr4 */ -typedef longlong_t hrtime_t; #define TIME32_MAX INT32_MAX #define TIME32_MIN INT32_MIN diff --git a/include/sys/types.h b/include/sys/types.h index b72b6c9e0..28dc16435 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -5,6 +5,9 @@ extern "C" { #endif +#include +#include + typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; typedef unsigned long uintptr_t; typedef unsigned long intptr_t; @@ -19,6 +22,8 @@ typedef long long offset_t; typedef struct task_struct kthread_t; typedef struct vmem { } vmem_t; typedef short pri_t; +typedef struct timespec timestruc_t; /* definition per SVr4 */ +typedef longlong_t hrtime_t; #ifdef __cplusplus } diff --git a/include/sys/va_list.h b/include/sys/va_list.h new file mode 100644 index 000000000..6eb763ff9 --- /dev/null +++ b/include/sys/va_list.h @@ -0,0 +1,4 @@ +#ifndef _SPL_VA_LIST_H +#define _SPL_VA_LIST_H + +#endif /* SPL_VA_LIST_H */ diff --git a/include/sys/varargs.h b/include/sys/varargs.h new file mode 100644 index 000000000..5a5444360 --- /dev/null +++ b/include/sys/varargs.h @@ -0,0 +1,4 @@ +#ifndef _SPL_VARARGS_H +#define _SPL_VARARGS_H + +#endif /* SPL_VARARGS_H */ From 14c5326ccd05d3741271219510138880575a5d81 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Mar 2008 18:22:31 +0000 Subject: [PATCH 0022/1062] More stub headers, moved generic to sysmacros, added some more macros for kernel compatibility git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@22 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/strings.h | 4 ++ include/sys/Makefile.am | 2 +- include/sys/generic.h | 74 -------------------- include/sys/spl.h | 2 +- include/sys/sysmacros.h | 141 ++++++++++++++++++++++++++++++++++++++ include/sys/thread.h | 2 +- include/sys/types.h | 2 +- include/unistd.h | 4 ++ modules/spl/spl-generic.c | 2 +- 9 files changed, 154 insertions(+), 79 deletions(-) create mode 100644 include/strings.h delete mode 100644 include/sys/generic.h create mode 100644 include/sys/sysmacros.h create mode 100644 include/unistd.h diff --git a/include/strings.h b/include/strings.h new file mode 100644 index 000000000..697ac4db6 --- /dev/null +++ b/include/strings.h @@ -0,0 +1,4 @@ +#ifndef _SPL_STRINGS_H +#define _SPL_STRINGS_H + +#endif /* SPL_STRINGS_H */ diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index c44748e02..8fc6f91b0 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST = callb.h cmn_err.h condvar.h cred.h -EXTRA_DIST += debug.h generic.h kmem.h kstat.h +EXTRA_DIST += debug.h kmem.h kstat.h EXTRA_DIST += mutex.h param.h random.h rwlock.h EXTRA_DIST += spl.h taskq.h thread.h time.h EXTRA_DIST += timer.h types.h diff --git a/include/sys/generic.h b/include/sys/generic.h deleted file mode 100644 index 2d0989233..000000000 --- a/include/sys/generic.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _SPL_GENERIC_H -#define _SPL_GENERIC_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* Missing defines. - */ -#define INT32_MAX INT_MAX -#define UINT64_MAX (~0ULL) -#define NBBY 8 -#define ENOTSUP ENOTSUPP -#define MAXNAMELEN 256 -#define MAXPATHLEN PATH_MAX -#define __va_list va_list -#define _KERNEL __KERNEL__ -#define max_ncpus 64 - -/* 0..MAX_PRIO-1: Process priority - * 0..MAX_RT_PRIO-1: RT priority tasks - * MAX_RT_PRIO..MAX_PRIO-1: SCHED_NORMAL tasks - * - * Treat shim tasks as SCHED_NORMAL tasks - */ -#define minclsyspri (MAX_RT_PRIO) -#define maxclsyspri (MAX_PRIO-1) - -#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) -#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) - -#define kred NULL - -#define FREAD 1 -#define FWRITE 2 -#define FCREAT O_CREAT -#define FTRUNC O_TRUNC -#define FOFFMAX O_LARGEFILE -#define FSYNC O_SYNC -#define FDSYNC O_DSYNC -#define FRSYNC O_RSYNC -#define FEXCL O_EXCL - -#define FNODSYNC 0x10000 /* fsync pseudo flag */ -#define FNOFOLLOW 0x20000 /* don't follow symlinks */ - -/* Missing macros - */ -#define PAGESIZE PAGE_SIZE - -/* from Solaris sys/byteorder.h */ -#define BSWAP_8(x) ((x) & 0xff) -#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) -#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) -#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) - -/* Map some simple functions. - */ -#define bzero(ptr,size) memset(ptr,0,size) -#define bcopy(src,dest,size) memcpy(dest,src,size) -#define ASSERT(x) BUG_ON(!(x)) -#define ASSERT3U(left,OP,right) BUG_ON(!((left) OP (right))) - -/* Missing globals - */ -extern int p0; - -#ifdef __cplusplus -} -#endif - -#endif /* _SPL_GENERIC_H */ diff --git a/include/sys/spl.h b/include/sys/spl.h index 7cc1cab58..b8c1c3837 100644 --- a/include/sys/spl.h +++ b/include/sys/spl.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h new file mode 100644 index 000000000..c48019fdb --- /dev/null +++ b/include/sys/sysmacros.h @@ -0,0 +1,141 @@ +#ifndef _SPL_SYSMACROS_H +#define _SPL_SYSMACROS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifndef _KERNEL +#define _KERNEL __KERNEL__ +#endif + +/* Missing defines. + */ +#define INT32_MAX INT_MAX +#define UINT64_MAX (~0ULL) +#define NBBY 8 +#define ENOTSUP ENOTSUPP +#define MAXNAMELEN 256 +#define MAXPATHLEN PATH_MAX +#define __va_list va_list +#define max_ncpus 64 + +/* 0..MAX_PRIO-1: Process priority + * 0..MAX_RT_PRIO-1: RT priority tasks + * MAX_RT_PRIO..MAX_PRIO-1: SCHED_NORMAL tasks + * + * Treat shim tasks as SCHED_NORMAL tasks + */ +#define minclsyspri (MAX_RT_PRIO) +#define maxclsyspri (MAX_PRIO-1) + +#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) +#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) + +#define kred NULL + +#define FREAD 1 +#define FWRITE 2 +#define FCREAT O_CREAT +#define FTRUNC O_TRUNC +#define FOFFMAX O_LARGEFILE +#define FSYNC O_SYNC +#define FDSYNC O_DSYNC +#define FRSYNC O_RSYNC +#define FEXCL O_EXCL + +#define FNODSYNC 0x10000 /* fsync pseudo flag */ +#define FNOFOLLOW 0x20000 /* don't follow symlinks */ + +/* Missing macros + */ +#define PAGESIZE PAGE_SIZE + +/* from Solaris sys/byteorder.h */ +#define BSWAP_8(x) ((x) & 0xff) +#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) +#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) +#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) + +/* Map some simple functions. + */ +#define bzero(ptr,size) memset(ptr,0,size) +#define bcopy(src,dest,size) memcpy(dest,src,size) +#define ASSERT(x) BUG_ON(!(x)) +#define ASSERT3U(left,OP,right) BUG_ON(!((left) OP (right))) + +/* Missing globals + */ +extern int p0; + +#define makedevice(maj,min) makedev(maj,min) + +/* XXX - Borrowed from zfs project libsolcompat/include/sys/sysmacros.h */ +/* common macros */ +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a, b) ((a) < (b) ? (b) : (a)) +#endif +#ifndef ABS +#define ABS(a) ((a) < 0 ? -(a) : (a)) +#endif + +/* + * Compatibility macros/typedefs needed for Solaris -> Linux port + */ +#define P2ALIGN(x, align) ((x) & -(align)) +#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) +#define P2ROUNDUP(x, align) (-(-(x) & -(align))) +#define P2ROUNDUP_TYPED(x, align, type) \ + (-(-(type)(x) & -(type)(align))) +#define P2PHASE(x, align) ((x) & ((align) - 1)) +#define P2NPHASE(x, align) (-(x) & ((align) - 1)) +#define P2NPHASE_TYPED(x, align, type) \ + (-(type)(x) & ((type)(align) - 1)) +#define ISP2(x) (((x) & ((x) - 1)) == 0) +#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) + +/* + * Typed version of the P2* macros. These macros should be used to ensure + * that the result is correctly calculated based on the data type of (x), + * which is passed in as the last argument, regardless of the data + * type of the alignment. For example, if (x) is of type uint64_t, + * and we want to round it up to a page boundary using "PAGESIZE" as + * the alignment, we can do either + * P2ROUNDUP(x, (uint64_t)PAGESIZE) + * or + * P2ROUNDUP_TYPED(x, PAGESIZE, uint64_t) + */ +#define P2ALIGN_TYPED(x, align, type) \ + ((type)(x) & -(type)(align)) +#define P2PHASE_TYPED(x, align, type) \ + ((type)(x) & ((type)(align) - 1)) +#define P2NPHASE_TYPED(x, align, type) \ + (-(type)(x) & ((type)(align) - 1)) +#define P2ROUNDUP_TYPED(x, align, type) \ + (-(-(type)(x) & -(type)(align))) +#define P2END_TYPED(x, align, type) \ + (-(~(type)(x) & -(type)(align))) +#define P2PHASEUP_TYPED(x, align, phase, type) \ + ((type)(phase) - (((type)(phase) - (type)(x)) & -(type)(align))) +#define P2CROSS_TYPED(x, y, align, type) \ + (((type)(x) ^ (type)(y)) > (type)(align) - 1) +#define P2SAMEHIGHBIT_TYPED(x, y, type) \ + (((type)(x) ^ (type)(y)) < ((type)(x) & (type)(y))) + +#if defined(_KERNEL) && !defined(_KMEMUSER) && !defined(offsetof) + +/* avoid any possibility of clashing with version */ + +#define offsetof(s, m) ((size_t)(&(((s *)0)->m))) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SPL_SYSMACROS_H */ diff --git a/include/sys/thread.h b/include/sys/thread.h index e7f99c96d..d1009ab6d 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -9,7 +9,7 @@ extern "C" { #include #include #include -#include +#include /* * Thread interfaces diff --git a/include/sys/types.h b/include/sys/types.h index 28dc16435..0a6cbfe79 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -6,7 +6,7 @@ extern "C" { #endif #include -#include +#include typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; typedef unsigned long uintptr_t; diff --git a/include/unistd.h b/include/unistd.h new file mode 100644 index 000000000..c6b298a34 --- /dev/null +++ b/include/unistd.h @@ -0,0 +1,4 @@ +#ifndef _SPL_UNISTD_H +#define _SPL_UNISTD_H + +#endif /* SPL_UNISTD_H */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 653b8cd1f..60bebfdc4 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -1,4 +1,4 @@ -#include +#include #include "config.h" /* From 48f940b9439902c2974c705e8fbec3b0a73ffacd Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Mar 2008 19:38:27 +0000 Subject: [PATCH 0023/1062] Fix type git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@23 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 89367c069..7bdd6fe24 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -87,7 +87,7 @@ kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) * Slab allocation interfaces */ #undef KMC_NOTOUCH /* No linux analog */ -#define KMC_NODEBUG 0x00000000 /* Default beahvior */ +#define KMC_NODEBUG 0x00000000 /* Default behavior */ #define KMC_NOMAGAZINE /* No linux analog */ #define KMC_NOHASH /* No linux analog */ #define KMC_QCACHE /* No linux analog */ From 23f28c4f75b6a7583ac706db331211baa055ca5d Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Mar 2008 20:06:29 +0000 Subject: [PATCH 0024/1062] Remove spl.h, just include the headers you need. Add a few more stubs. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@24 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/Makefile.am | 2 +- include/sys/ctype.h | 4 ++++ include/sys/inttypes.h | 4 ++++ include/sys/spl.h | 19 ------------------- include/sys/sunddi.h | 4 ++++ include/sys/systm.h | 4 ++++ modules/splat/splat-internal.h | 16 +++++++++++++++- 7 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 include/sys/ctype.h create mode 100644 include/sys/inttypes.h delete mode 100644 include/sys/spl.h create mode 100644 include/sys/sunddi.h create mode 100644 include/sys/systm.h diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 8fc6f91b0..2eda85688 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST = callb.h cmn_err.h condvar.h cred.h EXTRA_DIST += debug.h kmem.h kstat.h EXTRA_DIST += mutex.h param.h random.h rwlock.h -EXTRA_DIST += spl.h taskq.h thread.h time.h +EXTRA_DIST += taskq.h thread.h time.h EXTRA_DIST += timer.h types.h diff --git a/include/sys/ctype.h b/include/sys/ctype.h new file mode 100644 index 000000000..d8e8a0a55 --- /dev/null +++ b/include/sys/ctype.h @@ -0,0 +1,4 @@ +#ifndef _SPL_CTYPE_H +#define _SPL_CTYPE_H + +#endif /* SPL_CTYPE_H */ diff --git a/include/sys/inttypes.h b/include/sys/inttypes.h new file mode 100644 index 000000000..ff7a65a98 --- /dev/null +++ b/include/sys/inttypes.h @@ -0,0 +1,4 @@ +#ifndef _SPL_INTTYPES_H +#define _SPL_INTTYPES_H + +#endif /* SPL_INTTYPES_H */ diff --git a/include/sys/spl.h b/include/sys/spl.h deleted file mode 100644 index b8c1c3837..000000000 --- a/include/sys/spl.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _SPL_H -#define _SPL_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* _SPL_H */ diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h new file mode 100644 index 000000000..541102556 --- /dev/null +++ b/include/sys/sunddi.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SUNDDI_H +#define _SPL_SUNDDI_H + +#endif /* SPL_SUNDDI_H */ diff --git a/include/sys/systm.h b/include/sys/systm.h new file mode 100644 index 000000000..ca6cca5ce --- /dev/null +++ b/include/sys/systm.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SYSTM_H +#define _SPL_SYSTM_H + +#endif /* SPL_SYSTM_H */ diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index d44c32463..061a9d018 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -18,7 +18,21 @@ #include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "splat-ctl.h" #define SPLAT_SUBSYSTEM_INIT(type) \ From a713518f5d9e4f7b1c361035f1f3ef79869a960f Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 5 Mar 2008 00:58:54 +0000 Subject: [PATCH 0025/1062] Checkpoint for the night, added a few more stub headers, fleshed out a few stub headers, added a FIXME file, added various compatibility macros git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@25 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- FIXME | 16 + include/sys/acl.h | 289 + include/sys/acl_impl.h | 61 + include/sys/ctype.h | 2 + include/sys/dkio.h | 484 + include/sys/dklabel.h | 268 + include/sys/dnlc.h | 4 + include/sys/fs/swapnode.h | 4 + include/sys/int_types.h | 6 + include/sys/isa_defs.h | 484 +- include/sys/kstat.h | 29 + include/sys/sysmacros.h | 39 +- include/sys/types.h | 8 +- include/sys/types32.h | 91 + include/sys/u8_textprep.h | 119 + include/sys/u8_textprep_data.h | 35382 +++++++++++++++++++++++++++++++ include/sys/vmsystm.h | 8 + include/vm/anon.h | 4 + 18 files changed, 37290 insertions(+), 8 deletions(-) create mode 100644 FIXME create mode 100644 include/sys/acl.h create mode 100644 include/sys/acl_impl.h create mode 100644 include/sys/dkio.h create mode 100644 include/sys/dklabel.h create mode 100644 include/sys/dnlc.h create mode 100644 include/sys/fs/swapnode.h create mode 100644 include/sys/int_types.h create mode 100644 include/sys/types32.h create mode 100644 include/sys/u8_textprep.h create mode 100644 include/sys/u8_textprep_data.h create mode 100644 include/sys/vmsystm.h create mode 100644 include/vm/anon.h diff --git a/FIXME b/FIXME new file mode 100644 index 000000000..4acf67d08 --- /dev/null +++ b/FIXME @@ -0,0 +1,16 @@ +* We need to revist the following sections to ensure there are no +licensing issues: + +sys/sysmacros.h - Parts borrowed from libsolcompat +sys/dkio.h - All borrowed from libsolcompat +sys/dklabel.h - All borrowed from libsolcompat +sys/types32.h - All borrowed from libsolcompat +sys/isa_defs.h - AlL borrowed from libsolcompat +sys/u8_textprep.h - AlL borrowed from libsolcompat +sys/u8_textprep_data - AlL borrowed from libsolcompat +sys/acl.h _ All borrowed from libsolcompat +sys/acl_impl.h _ All borrowed from libsolcompat + +* Fix failure in rw lock test 6 + +* Non-atomic 64bit support for kstat.h diff --git a/include/sys/acl.h b/include/sys/acl.h new file mode 100644 index 000000000..a47ce49af --- /dev/null +++ b/include/sys/acl.h @@ -0,0 +1,289 @@ +/* + * 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 + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_ACL_H +#define _SYS_ACL_H + + + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define MAX_ACL_ENTRIES (1024) /* max entries of each type */ +typedef struct acl { + int a_type; /* the type of ACL entry */ + uid_t a_id; /* the entry in -uid or gid */ + o_mode_t a_perm; /* the permission field */ +} aclent_t; + +typedef struct ace { + uid_t a_who; /* uid or gid */ + uint32_t a_access_mask; /* read,write,... */ + uint16_t a_flags; /* see below */ + uint16_t a_type; /* allow or deny */ +} ace_t; + +typedef struct acl_info acl_t; + +/* + * The following are Defined types for an aclent_t. + */ +#define USER_OBJ (0x01) /* object owner */ +#define USER (0x02) /* additional users */ +#define GROUP_OBJ (0x04) /* owning group of the object */ +#define GROUP (0x08) /* additional groups */ +#define CLASS_OBJ (0x10) /* file group class and mask entry */ +#define OTHER_OBJ (0x20) /* other entry for the object */ +#define ACL_DEFAULT (0x1000) /* default flag */ +/* default object owner */ +#define DEF_USER_OBJ (ACL_DEFAULT | USER_OBJ) +/* default additional users */ +#define DEF_USER (ACL_DEFAULT | USER) +/* default owning group */ +#define DEF_GROUP_OBJ (ACL_DEFAULT | GROUP_OBJ) +/* default additional groups */ +#define DEF_GROUP (ACL_DEFAULT | GROUP) +/* default mask entry */ +#define DEF_CLASS_OBJ (ACL_DEFAULT | CLASS_OBJ) +/* default other entry */ +#define DEF_OTHER_OBJ (ACL_DEFAULT | OTHER_OBJ) + +/* + * The following are defined for ace_t. + */ +#define ACE_READ_DATA 0x00000001 +#define ACE_LIST_DIRECTORY 0x00000001 +#define ACE_WRITE_DATA 0x00000002 +#define ACE_ADD_FILE 0x00000002 +#define ACE_APPEND_DATA 0x00000004 +#define ACE_ADD_SUBDIRECTORY 0x00000004 +#define ACE_READ_NAMED_ATTRS 0x00000008 +#define ACE_WRITE_NAMED_ATTRS 0x00000010 +#define ACE_EXECUTE 0x00000020 +#define ACE_DELETE_CHILD 0x00000040 +#define ACE_READ_ATTRIBUTES 0x00000080 +#define ACE_WRITE_ATTRIBUTES 0x00000100 +#define ACE_DELETE 0x00010000 +#define ACE_READ_ACL 0x00020000 +#define ACE_WRITE_ACL 0x00040000 +#define ACE_WRITE_OWNER 0x00080000 +#define ACE_SYNCHRONIZE 0x00100000 + +#define ACE_FILE_INHERIT_ACE 0x0001 +#define ACE_DIRECTORY_INHERIT_ACE 0x0002 +#define ACE_NO_PROPAGATE_INHERIT_ACE 0x0004 +#define ACE_INHERIT_ONLY_ACE 0x0008 +#define ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x0010 +#define ACE_FAILED_ACCESS_ACE_FLAG 0x0020 +#define ACE_IDENTIFIER_GROUP 0x0040 +#define ACE_INHERITED_ACE 0x0080 +#define ACE_OWNER 0x1000 +#define ACE_GROUP 0x2000 +#define ACE_EVERYONE 0x4000 + +#define ACE_ACCESS_ALLOWED_ACE_TYPE 0x0000 +#define ACE_ACCESS_DENIED_ACE_TYPE 0x0001 +#define ACE_SYSTEM_AUDIT_ACE_TYPE 0x0002 +#define ACE_SYSTEM_ALARM_ACE_TYPE 0x0003 + +#define ACL_AUTO_INHERIT 0x0001 +#define ACL_PROTECTED 0x0002 +#define ACL_DEFAULTED 0x0004 +#define ACL_FLAGS_ALL (ACL_AUTO_INHERIT|ACL_PROTECTED| \ + ACL_DEFAULTED) + +#ifdef _KERNEL + +/* + * These are only applicable in a CIFS context. + */ +#define ACE_ACCESS_ALLOWED_COMPOUND_ACE_TYPE 0x04 +#define ACE_ACCESS_ALLOWED_OBJECT_ACE_TYPE 0x05 +#define ACE_ACCESS_DENIED_OBJECT_ACE_TYPE 0x06 +#define ACE_SYSTEM_AUDIT_OBJECT_ACE_TYPE 0x07 +#define ACE_SYSTEM_ALARM_OBJECT_ACE_TYPE 0x08 +#define ACE_ACCESS_ALLOWED_CALLBACK_ACE_TYPE 0x09 +#define ACE_ACCESS_DENIED_CALLBACK_ACE_TYPE 0x0A +#define ACE_ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE 0x0B +#define ACE_ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE 0x0C +#define ACE_SYSTEM_AUDIT_CALLBACK_ACE_TYPE 0x0D +#define ACE_SYSTEM_ALARM_CALLBACK_ACE_TYPE 0x0E +#define ACE_SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE 0x0F +#define ACE_SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE 0x10 + +#define ACE_ALL_TYPES 0x001F + +typedef struct ace_object { + uid_t a_who; /* uid or gid */ + uint32_t a_access_mask; /* read,write,... */ + uint16_t a_flags; /* see below */ + uint16_t a_type; /* allow or deny */ + uint8_t a_obj_type[16]; /* obj type */ + uint8_t a_inherit_obj_type[16]; /* inherit obj */ +} ace_object_t; + +#endif + +#define ACE_ALL_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \ + ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS| \ + ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES| \ + ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \ + ACE_WRITE_OWNER|ACE_SYNCHRONIZE) + +/* + * The following flags are supported by both NFSv4 ACLs and ace_t. + */ +#define ACE_NFSV4_SUP_FLAGS (ACE_FILE_INHERIT_ACE | \ + ACE_DIRECTORY_INHERIT_ACE | \ + ACE_NO_PROPAGATE_INHERIT_ACE | \ + ACE_INHERIT_ONLY_ACE | \ + ACE_IDENTIFIER_GROUP) + +#define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE| \ + ACE_IDENTIFIER_GROUP) +#define ACE_INHERIT_FLAGS (ACE_FILE_INHERIT_ACE| \ + ACE_DIRECTORY_INHERIT_ACE|ACE_NO_PROPAGATE_INHERIT_ACE|ACE_INHERIT_ONLY_ACE) + +/* cmd args to acl(2) for aclent_t */ +#define GETACL 1 +#define SETACL 2 +#define GETACLCNT 3 + +/* cmd's to manipulate ace acls. */ +#define ACE_GETACL 4 +#define ACE_SETACL 5 +#define ACE_GETACLCNT 6 + +/* minimal acl entries from GETACLCNT */ +#define MIN_ACL_ENTRIES 4 + +#if !defined(_KERNEL) + +/* acl check errors */ +#define GRP_ERROR 1 +#define USER_ERROR 2 +#define OTHER_ERROR 3 +#define CLASS_ERROR 4 +#define DUPLICATE_ERROR 5 +#define MISS_ERROR 6 +#define MEM_ERROR 7 +#define ENTRY_ERROR 8 + + +/* + * similar to ufs_acl.h: changed to char type for user commands (tar, cpio) + * Attribute types + */ +#define UFSD_FREE ('0') /* Free entry */ +#define UFSD_ACL ('1') /* Access Control Lists */ +#define UFSD_DFACL ('2') /* reserved for future use */ +#define ACE_ACL ('3') /* ace_t style acls */ + +/* + * flag to [f]acl_get() + * controls whether a trivial acl should be returned. + */ +#define ACL_NO_TRIVIAL 0x2 + + +/* + * Flags to control acl_totext() + */ + +#define ACL_APPEND_ID 0x1 /* append uid/gid to user/group entries */ +#define ACL_COMPACT_FMT 0x2 /* build ACL in ls -V format */ +#define ACL_NORESOLVE 0x4 /* don't do name service lookups */ + +/* + * Legacy aclcheck errors for aclent_t ACLs + */ +#define EACL_GRP_ERROR GRP_ERROR +#define EACL_USER_ERROR USER_ERROR +#define EACL_OTHER_ERROR OTHER_ERROR +#define EACL_CLASS_ERROR CLASS_ERROR +#define EACL_DUPLICATE_ERROR DUPLICATE_ERROR +#define EACL_MISS_ERROR MISS_ERROR +#define EACL_MEM_ERROR MEM_ERROR +#define EACL_ENTRY_ERROR ENTRY_ERROR + +#define EACL_INHERIT_ERROR 9 /* invalid inherit flags */ +#define EACL_FLAGS_ERROR 10 /* unknown flag value */ +#define EACL_PERM_MASK_ERROR 11 /* unknown permission */ +#define EACL_COUNT_ERROR 12 /* invalid acl count */ + +#define EACL_INVALID_SLOT 13 /* invalid acl slot */ +#define EACL_NO_ACL_ENTRY 14 /* Entry doesn't exist */ +#define EACL_DIFF_TYPE 15 /* acls aren't same type */ + +#define EACL_INVALID_USER_GROUP 16 /* need user/group name */ +#define EACL_INVALID_STR 17 /* invalid acl string */ +#define EACL_FIELD_NOT_BLANK 18 /* can't have blank field */ +#define EACL_INVALID_ACCESS_TYPE 19 /* invalid access type */ +#define EACL_UNKNOWN_DATA 20 /* Unrecognized data in ACL */ +#define EACL_MISSING_FIELDS 21 /* missing fields in acl */ + +#define EACL_INHERIT_NOTDIR 22 /* Need dir for inheritance */ + +extern int aclcheck(aclent_t *, int, int *); +extern int acltomode(aclent_t *, int, mode_t *); +extern int aclfrommode(aclent_t *, int, mode_t *); +extern int aclsort(int, int, aclent_t *); +extern char *acltotext(aclent_t *, int); +extern aclent_t *aclfromtext(char *, int *); +extern void acl_free(acl_t *); +extern int acl_get(const char *, int, acl_t **); +extern int facl_get(int, int, acl_t **); +extern int acl_set(const char *, acl_t *acl); +extern int facl_set(int, acl_t *acl); +extern int acl_strip(const char *, uid_t, gid_t, mode_t); +extern int acl_trivial(const char *); +extern char *acl_totext(acl_t *, int); +extern int acl_fromtext(const char *, acl_t **); +extern int acl_check(acl_t *, int); + +#else /* !defined(_KERNEL) */ + +extern void ksort(caddr_t, int, int, int (*)(void *, void *)); +extern int cmp2acls(void *, void *); + +#endif /* !defined(_KERNEL) */ + +#if defined(__STDC__) +extern int acl(const char *path, int cmd, int cnt, void *buf); +extern int facl(int fd, int cmd, int cnt, void *buf); +#else /* !__STDC__ */ +extern int acl(); +extern int facl(); +#endif /* defined(__STDC__) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_ACL_H */ diff --git a/include/sys/acl_impl.h b/include/sys/acl_impl.h new file mode 100644 index 000000000..5f8f01f2e --- /dev/null +++ b/include/sys/acl_impl.h @@ -0,0 +1,61 @@ +/* + * 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 + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_ACL_IMPL_H +#define _SYS_ACL_IMPL_H + + + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * acl flags + * + * ACL_AUTO_INHERIT, ACL_PROTECTED and ACL_DEFAULTED + * flags can also be stored in this field. + */ +#define ACL_IS_TRIVIAL 0x10000 +#define ACL_IS_DIR 0x20000 + +typedef enum acl_type { + ACLENT_T = 0, + ACE_T = 1 +} acl_type_t; + +struct acl_info { + acl_type_t acl_type; /* style of acl */ + int acl_cnt; /* number of acl entries */ + int acl_entry_size; /* sizeof acl entry */ + int acl_flags; /* special flags about acl */ + void *acl_aclp; /* the acl */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_ACL_IMPL_H */ diff --git a/include/sys/ctype.h b/include/sys/ctype.h index d8e8a0a55..93c76a17e 100644 --- a/include/sys/ctype.h +++ b/include/sys/ctype.h @@ -1,4 +1,6 @@ #ifndef _SPL_CTYPE_H #define _SPL_CTYPE_H +#include + #endif /* SPL_CTYPE_H */ diff --git a/include/sys/dkio.h b/include/sys/dkio.h new file mode 100644 index 000000000..32f786565 --- /dev/null +++ b/include/sys/dkio.h @@ -0,0 +1,484 @@ +/* + * 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 + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_DKIO_H +#define _SYS_DKIO_H + + + +#include /* Needed for NDKMAP define */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Structures and definitions for disk io control commands + */ + +/* + * Structures used as data by ioctl calls. + */ + +#define DK_DEVLEN 16 /* device name max length, including */ + /* unit # & NULL (ie - "xyc1") */ + +/* + * Used for controller info + */ +struct dk_cinfo { + char dki_cname[DK_DEVLEN]; /* controller name (no unit #) */ + ushort_t dki_ctype; /* controller type */ + ushort_t dki_flags; /* flags */ + ushort_t dki_cnum; /* controller number */ + uint_t dki_addr; /* controller address */ + uint_t dki_space; /* controller bus type */ + uint_t dki_prio; /* interrupt priority */ + uint_t dki_vec; /* interrupt vector */ + char dki_dname[DK_DEVLEN]; /* drive name (no unit #) */ + uint_t dki_unit; /* unit number */ + uint_t dki_slave; /* slave number */ + ushort_t dki_partition; /* partition number */ + ushort_t dki_maxtransfer; /* max. transfer size in DEV_BSIZE */ +}; + +/* + * Controller types + */ +#define DKC_UNKNOWN 0 +#define DKC_CDROM 1 /* CD-ROM, SCSI or otherwise */ +#define DKC_WDC2880 2 +#define DKC_XXX_0 3 /* unassigned */ +#define DKC_XXX_1 4 /* unassigned */ +#define DKC_DSD5215 5 +#define DKC_ACB4000 7 +#define DKC_MD21 8 +#define DKC_XXX_2 9 /* unassigned */ +#define DKC_NCRFLOPPY 10 +#define DKC_SMSFLOPPY 12 +#define DKC_SCSI_CCS 13 /* SCSI CCS compatible */ +#define DKC_INTEL82072 14 /* native floppy chip */ +#define DKC_MD 16 /* meta-disk (virtual-disk) driver */ +#define DKC_INTEL82077 19 /* 82077 floppy disk controller */ +#define DKC_DIRECT 20 /* Intel direct attached device i.e. IDE */ +#define DKC_PCMCIA_MEM 21 /* PCMCIA memory disk-like type */ +#define DKC_PCMCIA_ATA 22 /* PCMCIA AT Attached type */ +#define DKC_VBD 23 /* virtual block device */ + +/* + * Sun reserves up through 1023 + */ + +#define DKC_CUSTOMER_BASE 1024 + +/* + * Flags + */ +#define DKI_BAD144 0x01 /* use DEC std 144 bad sector fwding */ +#define DKI_MAPTRK 0x02 /* controller does track mapping */ +#define DKI_FMTTRK 0x04 /* formats only full track at a time */ +#define DKI_FMTVOL 0x08 /* formats only full volume at a time */ +#define DKI_FMTCYL 0x10 /* formats only full cylinders at a time */ +#define DKI_HEXUNIT 0x20 /* unit number is printed as 3 hex digits */ +#define DKI_PCMCIA_PFD 0x40 /* PCMCIA pseudo-floppy memory card */ + +/* + * Used for all partitions + */ +struct dk_allmap { + struct dk_map dka_map[NDKMAP]; +}; + +#if defined(_SYSCALL32) +struct dk_allmap32 { + struct dk_map32 dka_map[NDKMAP]; +}; +#endif /* _SYSCALL32 */ + +/* + * Definition of a disk's geometry + */ +struct dk_geom { + unsigned short dkg_ncyl; /* # of data cylinders */ + unsigned short dkg_acyl; /* # of alternate cylinders */ + unsigned short dkg_bcyl; /* cyl offset (for fixed head area) */ + unsigned short dkg_nhead; /* # of heads */ + unsigned short dkg_obs1; /* obsolete */ + unsigned short dkg_nsect; /* # of data sectors per track */ + unsigned short dkg_intrlv; /* interleave factor */ + unsigned short dkg_obs2; /* obsolete */ + unsigned short dkg_obs3; /* obsolete */ + unsigned short dkg_apc; /* alternates per cyl (SCSI only) */ + unsigned short dkg_rpm; /* revolutions per minute */ + unsigned short dkg_pcyl; /* # of physical cylinders */ + unsigned short dkg_write_reinstruct; /* # sectors to skip, writes */ + unsigned short dkg_read_reinstruct; /* # sectors to skip, reads */ + unsigned short dkg_extra[7]; /* for compatible expansion */ +}; + +/* + * These defines are for historic compatibility with old drivers. + */ +#define dkg_bhead dkg_obs1 /* used to be head offset */ +#define dkg_gap1 dkg_obs2 /* used to be gap1 */ +#define dkg_gap2 dkg_obs3 /* used to be gap2 */ + +/* + * Disk io control commands + * Warning: some other ioctls with the DIOC prefix exist elsewhere. + * The Generic DKIOC numbers are from 0 - 50. + * The Floppy Driver uses 51 - 100. + * The Hard Disk (except SCSI) 101 - 106. (these are obsolete) + * The CDROM Driver 151 - 200. + * The USCSI ioctl 201 - 250. + */ +#define DKIOC (0x04 << 8) + +/* + * The following ioctls are generic in nature and need to be + * suported as appropriate by all disk drivers + */ +#define DKIOCGGEOM (DKIOC|1) /* Get geometry */ +#define DKIOCINFO (DKIOC|3) /* Get info */ +#define DKIOCEJECT (DKIOC|6) /* Generic 'eject' */ +#define DKIOCGVTOC (DKIOC|11) /* Get VTOC */ +#define DKIOCSVTOC (DKIOC|12) /* Set VTOC & Write to Disk */ + +/* + * Disk Cache Controls. These ioctls should be supported by + * all disk drivers. + * + * DKIOCFLUSHWRITECACHE when used from user-mode ignores the ioctl + * argument, but it should be passed as NULL to allow for future + * reinterpretation. From user-mode, this ioctl request is synchronous. + * + * When invoked from within the kernel, the arg can be NULL to indicate + * a synchronous request or can be the address of a struct dk_callback + * to request an asynchronous callback when the flush request is complete. + * In this case, the flag to the ioctl must include FKIOCTL and the + * dkc_callback field of the pointed to struct must be non-null or the + * request is made synchronously. + * + * In the callback case: if the ioctl returns 0, a callback WILL be performed. + * If the ioctl returns non-zero, a callback will NOT be performed. + * NOTE: In some cases, the callback may be done BEFORE the ioctl call + * returns. The caller's locking strategy should be prepared for this case. + */ +#define DKIOCFLUSHWRITECACHE (DKIOC|34) /* flush cache to phys medium */ + +struct dk_callback { + void (*dkc_callback)(void *dkc_cookie, int error); + void *dkc_cookie; + int dkc_flag; +}; + +/* bit flag definitions for dkc_flag */ +#define FLUSH_VOLATILE 0x1 /* Bit 0: if set, only flush */ + /* volatile cache; otherwise, flush */ + /* volatile and non-volatile cache */ + +#define DKIOCGETWCE (DKIOC|36) /* Get current write cache */ + /* enablement status */ +#define DKIOCSETWCE (DKIOC|37) /* Enable/Disable write cache */ + +/* + * The following ioctls are used by Sun drivers to communicate + * with their associated format routines. Support of these ioctls + * is not required of foreign drivers + */ +#define DKIOCSGEOM (DKIOC|2) /* Set geometry */ +#define DKIOCSAPART (DKIOC|4) /* Set all partitions */ +#define DKIOCGAPART (DKIOC|5) /* Get all partitions */ +#define DKIOCG_PHYGEOM (DKIOC|32) /* get physical geometry */ +#define DKIOCG_VIRTGEOM (DKIOC|33) /* get virtual geometry */ + +/* + * The following ioctl's are removable media support + */ +#define DKIOCLOCK (DKIOC|7) /* Generic 'lock' */ +#define DKIOCUNLOCK (DKIOC|8) /* Generic 'unlock' */ +#define DKIOCSTATE (DKIOC|13) /* Inquire insert/eject state */ +#define DKIOCREMOVABLE (DKIOC|16) /* is media removable */ + + +/* + * ioctl for hotpluggable devices + */ +#define DKIOCHOTPLUGGABLE (DKIOC|35) /* is hotpluggable */ + +/* + * Ioctl to force driver to re-read the alternate partition and rebuild + * the internal defect map. + */ +#define DKIOCADDBAD (DKIOC|20) /* Re-read the alternate map (IDE) */ +#define DKIOCGETDEF (DKIOC|21) /* read defect list (IDE) */ + +/* + * Used by applications to get disk defect information from IDE + * drives. + */ +#ifdef _SYSCALL32 +struct defect_header32 { + int head; + caddr32_t buffer; +}; +#endif /* _SYSCALL32 */ + +struct defect_header { + int head; + caddr_t buffer; +}; + +#define DKIOCPARTINFO (DKIOC|22) /* Get partition or slice parameters */ + +/* + * Used by applications to get partition or slice information + */ +#ifdef _SYSCALL32 +struct part_info32 { + daddr32_t p_start; + int p_length; +}; +#endif /* _SYSCALL32 */ + +struct part_info { + daddr_t p_start; + int p_length; +}; + +/* The following ioctls are for Optical Memory Device */ +#define DKIOC_EBP_ENABLE (DKIOC|40) /* enable by pass erase on write */ +#define DKIOC_EBP_DISABLE (DKIOC|41) /* disable by pass erase on write */ + +/* + * This state enum is the argument passed to the DKIOCSTATE ioctl. + */ +enum dkio_state { DKIO_NONE, DKIO_EJECTED, DKIO_INSERTED, DKIO_DEV_GONE }; + +#define DKIOCGMEDIAINFO (DKIOC|42) /* get information about the media */ + +/* + * ioctls to read/write mboot info. + */ +#define DKIOCGMBOOT (DKIOC|43) /* get mboot info */ +#define DKIOCSMBOOT (DKIOC|44) /* set mboot info */ + +/* + * ioctl to get the device temperature. + */ +#define DKIOCGTEMPERATURE (DKIOC|45) /* get temperature */ + +/* + * Used for providing the temperature. + */ + +struct dk_temperature { + uint_t dkt_flags; /* Flags */ + short dkt_cur_temp; /* Current disk temperature */ + short dkt_ref_temp; /* reference disk temperature */ +}; + +#define DKT_BYPASS_PM 0x1 +#define DKT_INVALID_TEMP 0xFFFF + + +/* + * Used for Media info or the current profile info + */ +struct dk_minfo { + uint_t dki_media_type; /* Media type or profile info */ + uint_t dki_lbsize; /* Logical blocksize of media */ + diskaddr_t dki_capacity; /* Capacity as # of dki_lbsize blks */ +}; + +/* + * Media types or profiles known + */ +#define DK_UNKNOWN 0x00 /* Media inserted - type unknown */ + + +/* + * SFF 8090 Specification Version 3, media types 0x01 - 0xfffe are retained to + * maintain compatibility with SFF8090. The following define the + * optical media type. + */ +#define DK_REMOVABLE_DISK 0x02 /* Removable Disk */ +#define DK_MO_ERASABLE 0x03 /* MO Erasable */ +#define DK_MO_WRITEONCE 0x04 /* MO Write once */ +#define DK_AS_MO 0x05 /* AS MO */ +#define DK_CDROM 0x08 /* CDROM */ +#define DK_CDR 0x09 /* CD-R */ +#define DK_CDRW 0x0A /* CD-RW */ +#define DK_DVDROM 0x10 /* DVD-ROM */ +#define DK_DVDR 0x11 /* DVD-R */ +#define DK_DVDRAM 0x12 /* DVD_RAM or DVD-RW */ + +/* + * Media types for other rewritable magnetic media + */ +#define DK_FIXED_DISK 0x10001 /* Fixed disk SCSI or otherwise */ +#define DK_FLOPPY 0x10002 /* Floppy media */ +#define DK_ZIP 0x10003 /* IOMEGA ZIP media */ +#define DK_JAZ 0x10004 /* IOMEGA JAZ media */ + +#define DKIOCSETEFI (DKIOC|17) /* Set EFI info */ +#define DKIOCGETEFI (DKIOC|18) /* Get EFI info */ + +#define DKIOCPARTITION (DKIOC|9) /* Get partition info */ + +/* + * Ioctls to get/set volume capabilities related to Logical Volume Managers. + * They include the ability to get/set capabilities and to issue a read to a + * specific underlying device of a replicated device. + */ + +#define DKIOCGETVOLCAP (DKIOC | 25) /* Get volume capabilities */ +#define DKIOCSETVOLCAP (DKIOC | 26) /* Set volume capabilities */ +#define DKIOCDMR (DKIOC | 27) /* Issue a directed read */ + +typedef uint_t volcapinfo_t; + +typedef uint_t volcapset_t; + +#define DKV_ABR_CAP 0x00000001 /* Support Appl.Based Recovery */ +#define DKV_DMR_CAP 0x00000002 /* Support Directed Mirror Read */ + +typedef struct volcap { + volcapinfo_t vc_info; /* Capabilities available */ + volcapset_t vc_set; /* Capabilities set */ +} volcap_t; + +#define VOL_SIDENAME 256 + +typedef struct vol_directed_rd { + int vdr_flags; + offset_t vdr_offset; + size_t vdr_nbytes; + size_t vdr_bytesread; + void *vdr_data; + int vdr_side; + char vdr_side_name[VOL_SIDENAME]; +} vol_directed_rd_t; + +#define DKV_SIDE_INIT (-1) +#define DKV_DMR_NEXT_SIDE 0x00000001 +#define DKV_DMR_DONE 0x00000002 +#define DKV_DMR_ERROR 0x00000004 +#define DKV_DMR_SUCCESS 0x00000008 +#define DKV_DMR_SHORT 0x00000010 + +#ifdef _MULTI_DATAMODEL +#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 +#pragma pack(4) +#endif +typedef struct vol_directed_rd32 { + int32_t vdr_flags; + offset_t vdr_offset; /* 64-bit element on 32-bit alignment */ + size32_t vdr_nbytes; + size32_t vdr_bytesread; + caddr32_t vdr_data; + int32_t vdr_side; + char vdr_side_name[VOL_SIDENAME]; +} vol_directed_rd32_t; +#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 +#pragma pack() +#endif +#endif /* _MULTI_DATAMODEL */ + +/* + * The ioctl is used to fetch disk's device type, vendor ID, + * model number/product ID, firmware revision and serial number together. + * + * Currently there are two device types - DKD_ATA_TYPE which means the + * disk is driven by cmdk/ata or dad/uata driver, and DKD_SCSI_TYPE + * which means the disk is driven by sd/scsi hba driver. + */ +#define DKIOC_GETDISKID (DKIOC|46) + +/* These two labels are for dkd_dtype of dk_disk_id_t */ +#define DKD_ATA_TYPE 0x01 /* ATA disk or legacy mode SATA disk */ +#define DKD_SCSI_TYPE 0x02 /* SCSI disk or native mode SATA disk */ + +#define DKD_ATA_MODEL 40 /* model number length */ +#define DKD_ATA_FWVER 8 /* firmware revision length */ +#define DKD_ATA_SERIAL 20 /* serial number length */ + +#define DKD_SCSI_VENDOR 8 /* vendor ID length */ +#define DKD_SCSI_PRODUCT 16 /* product ID length */ +#define DKD_SCSI_REVLEVEL 4 /* revision level length */ +#define DKD_SCSI_SERIAL 12 /* serial number length */ + +/* + * The argument type for DKIOC_GETDISKID ioctl. + */ +typedef struct dk_disk_id { + uint_t dkd_dtype; + union { + struct { + char dkd_amodel[DKD_ATA_MODEL]; /* 40 bytes */ + char dkd_afwver[DKD_ATA_FWVER]; /* 8 bytes */ + char dkd_aserial[DKD_ATA_SERIAL]; /* 20 bytes */ + } ata_disk_id; + struct { + char dkd_svendor[DKD_SCSI_VENDOR]; /* 8 bytes */ + char dkd_sproduct[DKD_SCSI_PRODUCT]; /* 16 bytes */ + char dkd_sfwver[DKD_SCSI_REVLEVEL]; /* 4 bytes */ + char dkd_sserial[DKD_SCSI_SERIAL]; /* 12 bytes */ + } scsi_disk_id; + } disk_id; +} dk_disk_id_t; + +/* + * The ioctl is used to update the firmware of device. + */ +#define DKIOC_UPDATEFW (DKIOC|47) + +/* The argument type for DKIOC_UPDATEFW ioctl */ +typedef struct dk_updatefw { + caddr_t dku_ptrbuf; /* pointer to firmware buf */ + uint_t dku_size; /* firmware buf length */ + uint8_t dku_type; /* firmware update type */ +} dk_updatefw_t; + +#ifdef _SYSCALL32 +typedef struct dk_updatefw_32 { + caddr32_t dku_ptrbuf; /* pointer to firmware buf */ + uint_t dku_size; /* firmware buf length */ + uint8_t dku_type; /* firmware update type */ +} dk_updatefw_32_t; +#endif /* _SYSCALL32 */ + +/* + * firmware update type - temporary or permanent use + */ +#define FW_TYPE_TEMP 0x0 /* temporary use */ +#define FW_TYPE_PERM 0x1 /* permanent use */ + + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_DKIO_H */ diff --git a/include/sys/dklabel.h b/include/sys/dklabel.h new file mode 100644 index 000000000..77d5da10e --- /dev/null +++ b/include/sys/dklabel.h @@ -0,0 +1,268 @@ +/* + * 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 1990-2002 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_DKLABEL_H +#define _SYS_DKLABEL_H + + + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Miscellaneous defines + */ +#define DKL_MAGIC 0xDABE /* magic number */ +#define FKL_MAGIC 0xff /* magic number for DOS floppies */ + +#if defined(_SUNOS_VTOC_16) +#define NDKMAP 16 /* # of logical partitions */ +#define DK_LABEL_LOC 1 /* location of disk label */ +#elif defined(_SUNOS_VTOC_8) +#define NDKMAP 8 /* # of logical partitions */ +#define DK_LABEL_LOC 0 /* location of disk label */ +#else +#error "No VTOC format defined." +#endif + +#define LEN_DKL_ASCII 128 /* length of dkl_asciilabel */ +#define LEN_DKL_VVOL 8 /* length of v_volume */ +#define DK_LABEL_SIZE 512 /* size of disk label */ +#define DK_MAX_BLOCKS 0x7fffffff /* max # of blocks handled */ + +/* + * Reserve two cylinders on SCSI disks. + * One is for the backup disk label and the other is for the deviceid. + * + * IPI disks only reserve one cylinder, but they will go away soon. + * CDROMs do not reserve any cylinders. + */ +#define DK_ACYL 2 + +/* + * Format of a Sun disk label. + * Resides in cylinder 0, head 0, sector 0. + * + * sizeof (struct dk_label) should be 512 (the current sector size), + * but should the sector size increase, this structure should remain + * at the beginning of the sector. + */ + +/* + * partition headers: section 1 + * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I)) + */ +struct dk_map { + daddr_t dkl_cylno; /* starting cylinder */ + daddr_t dkl_nblk; /* number of blocks; if == 0, */ + /* partition is undefined */ +}; + +/* + * partition headers: section 1 + * Fixed size for on-disk dk_label + */ +struct dk_map32 { + daddr32_t dkl_cylno; /* starting cylinder */ + daddr32_t dkl_nblk; /* number of blocks; if == 0, */ + /* partition is undefined */ +}; + +/* + * partition headers: section 2, + * brought over from AT&T SVr4 vtoc structure. + */ +struct dk_map2 { + uint16_t p_tag; /* ID tag of partition */ + uint16_t p_flag; /* permission flag */ +}; + +struct dkl_partition { + uint16_t p_tag; /* ID tag of partition */ + uint16_t p_flag; /* permision flags */ + daddr32_t p_start; /* start sector no of partition */ + int32_t p_size; /* # of blocks in partition */ +}; + + +/* + * VTOC inclusions from AT&T SVr4 + * Fixed sized types for on-disk VTOC + */ + +struct dk_vtoc { +#if defined(_SUNOS_VTOC_16) + uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */ + uint32_t v_sanity; /* to verify vtoc sanity */ + uint32_t v_version; /* layout version */ + char v_volume[LEN_DKL_VVOL]; /* volume name */ + uint16_t v_sectorsz; /* sector size in bytes */ + uint16_t v_nparts; /* number of partitions */ + uint32_t v_reserved[10]; /* free space */ + struct dkl_partition v_part[NDKMAP]; /* partition headers */ + time32_t timestamp[NDKMAP]; /* partition timestamp (unsupported) */ + char v_asciilabel[LEN_DKL_ASCII]; /* for compatibility */ +#elif defined(_SUNOS_VTOC_8) + uint32_t v_version; /* layout version */ + char v_volume[LEN_DKL_VVOL]; /* volume name */ + uint16_t v_nparts; /* number of partitions */ + struct dk_map2 v_part[NDKMAP]; /* partition hdrs, sec 2 */ + uint32_t v_bootinfo[3]; /* info needed by mboot */ + uint32_t v_sanity; /* to verify vtoc sanity */ + uint32_t v_reserved[10]; /* free space */ + time32_t v_timestamp[NDKMAP]; /* partition timestamp */ +#else +#error "No VTOC format defined." +#endif +}; + +/* + * define the amount of disk label padding needed to make + * the entire structure occupy 512 bytes. + */ +#if defined(_SUNOS_VTOC_16) +#define LEN_DKL_PAD (DK_LABEL_SIZE - \ + ((sizeof (struct dk_vtoc) + \ + (4 * sizeof (uint32_t)) + \ + (12 * sizeof (uint16_t)) + \ + (2 * (sizeof (uint16_t)))))) +#elif defined(_SUNOS_VTOC_8) +#define LEN_DKL_PAD (DK_LABEL_SIZE \ + - ((LEN_DKL_ASCII) + \ + (sizeof (struct dk_vtoc)) + \ + (sizeof (struct dk_map32) * NDKMAP) + \ + (14 * (sizeof (uint16_t))) + \ + (2 * (sizeof (uint16_t))))) +#else +#error "No VTOC format defined." +#endif + + +struct dk_label { +#if defined(_SUNOS_VTOC_16) + struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */ + uint32_t dkl_pcyl; /* # of physical cylinders */ + uint32_t dkl_ncyl; /* # of data cylinders */ + uint16_t dkl_acyl; /* # of alternate cylinders */ + uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */ + uint32_t dkl_nhead; /* # of heads */ + uint32_t dkl_nsect; /* # of data sectors per track */ + uint16_t dkl_intrlv; /* interleave factor */ + uint16_t dkl_skew; /* skew factor */ + uint16_t dkl_apc; /* alternates per cyl (SCSI only) */ + uint16_t dkl_rpm; /* revolutions per minute */ + uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */ + uint16_t dkl_read_reinstruct; /* # sectors to skip, reads */ + uint16_t dkl_extra[4]; /* for compatible expansion */ + char dkl_pad[LEN_DKL_PAD]; /* unused part of 512 bytes */ +#elif defined(_SUNOS_VTOC_8) + char dkl_asciilabel[LEN_DKL_ASCII]; /* for compatibility */ + struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */ + uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */ + uint16_t dkl_read_reinstruct; /* # sectors to skip, reads */ + char dkl_pad[LEN_DKL_PAD]; /* unused part of 512 bytes */ + uint16_t dkl_rpm; /* rotations per minute */ + uint16_t dkl_pcyl; /* # physical cylinders */ + uint16_t dkl_apc; /* alternates per cylinder */ + uint16_t dkl_obs1; /* obsolete */ + uint16_t dkl_obs2; /* obsolete */ + uint16_t dkl_intrlv; /* interleave factor */ + uint16_t dkl_ncyl; /* # of data cylinders */ + uint16_t dkl_acyl; /* # of alternate cylinders */ + uint16_t dkl_nhead; /* # of heads in this partition */ + uint16_t dkl_nsect; /* # of 512 byte sectors per track */ + uint16_t dkl_obs3; /* obsolete */ + uint16_t dkl_obs4; /* obsolete */ + struct dk_map32 dkl_map[NDKMAP]; /* logical partition headers */ +#else +#error "No VTOC format defined." +#endif + uint16_t dkl_magic; /* identifies this label format */ + uint16_t dkl_cksum; /* xor checksum of sector */ +}; + +#if defined(_SUNOS_VTOC_16) +#define dkl_asciilabel dkl_vtoc.v_asciilabel +#define v_timestamp timestamp + +#elif defined(_SUNOS_VTOC_8) + +/* + * These defines are for historic compatibility with old drivers. + */ +#define dkl_gap1 dkl_obs1 /* used to be gap1 */ +#define dkl_gap2 dkl_obs2 /* used to be gap2 */ +#define dkl_bhead dkl_obs3 /* used to be label head offset */ +#define dkl_ppart dkl_obs4 /* used to by physical partition */ +#else +#error "No VTOC format defined." +#endif + +struct fk_label { /* DOS floppy label */ + uchar_t fkl_type; + uchar_t fkl_magich; + uchar_t fkl_magicl; + uchar_t filler; +}; + +/* + * Layout of stored fabricated device id (on-disk) + */ +#define DK_DEVID_BLKSIZE (512) +#define DK_DEVID_SIZE (DK_DEVID_BLKSIZE - ((sizeof (uchar_t) * 7))) +#define DK_DEVID_REV_MSB (0) +#define DK_DEVID_REV_LSB (1) + +struct dk_devid { + uchar_t dkd_rev_hi; /* revision (MSB) */ + uchar_t dkd_rev_lo; /* revision (LSB) */ + uchar_t dkd_flags; /* flags (not used yet) */ + uchar_t dkd_devid[DK_DEVID_SIZE]; /* devid stored here */ + uchar_t dkd_checksum3; /* checksum (MSB) */ + uchar_t dkd_checksum2; + uchar_t dkd_checksum1; + uchar_t dkd_checksum0; /* checksum (LSB) */ +}; + +#define DKD_GETCHKSUM(dkd) ((dkd)->dkd_checksum3 << 24) + \ + ((dkd)->dkd_checksum2 << 16) + \ + ((dkd)->dkd_checksum1 << 8) + \ + ((dkd)->dkd_checksum0) + +#define DKD_FORMCHKSUM(c, dkd) (dkd)->dkd_checksum3 = hibyte(hiword((c))); \ + (dkd)->dkd_checksum2 = lobyte(hiword((c))); \ + (dkd)->dkd_checksum1 = hibyte(loword((c))); \ + (dkd)->dkd_checksum0 = lobyte(loword((c))); +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_DKLABEL_H */ diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h new file mode 100644 index 000000000..91fb57e06 --- /dev/null +++ b/include/sys/dnlc.h @@ -0,0 +1,4 @@ +#ifndef _SPL_DNLC_H +#define _SPL_DNLC_H + +#endif /* SPL_DNLC_H */ diff --git a/include/sys/fs/swapnode.h b/include/sys/fs/swapnode.h new file mode 100644 index 000000000..12f2137a3 --- /dev/null +++ b/include/sys/fs/swapnode.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SWAPNODE_H +#define _SPL_SWAPNODE_H + +#endif /* SPL_SWAPNODE_H */ diff --git a/include/sys/int_types.h b/include/sys/int_types.h new file mode 100644 index 000000000..a30a8cc44 --- /dev/null +++ b/include/sys/int_types.h @@ -0,0 +1,6 @@ +#ifndef _SPL_INT_TYPES_H +#define _SPL_INT_TYPES_H + +#include + +#endif /* SPL_INT_TYPES_H */ diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 953ff02e1..cd2840d0e 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -1,4 +1,482 @@ -#ifndef _SPL_ISA_DEFS_H -#define _SPL_ISA_DEFS_H +/* + * 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 + */ -#endif /* SPL_ISA_DEFS_H */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_ISA_DEFS_H +#define _SYS_ISA_DEFS_H + + + +/* + * This header file serves to group a set of well known defines and to + * set these for each instruction set architecture. These defines may + * be divided into two groups; characteristics of the processor and + * implementation choices for Solaris on a processor. + * + * Processor Characteristics: + * + * _LITTLE_ENDIAN / _BIG_ENDIAN: + * The natural byte order of the processor. A pointer to an int points + * to the least/most significant byte of that int. + * + * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD: + * The processor specific direction of stack growth. A push onto the + * stack increases/decreases the stack pointer, so it stores data at + * successively higher/lower addresses. (Stackless machines ignored + * without regrets). + * + * _LONG_LONG_HTOL / _LONG_LONG_LTOH: + * A pointer to a long long points to the most/least significant long + * within that long long. + * + * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH: + * The C compiler assigns bit fields from the high/low to the low/high end + * of an int (most to least significant vs. least to most significant). + * + * _IEEE_754: + * The processor (or supported implementations of the processor) + * supports the ieee-754 floating point standard. No other floating + * point standards are supported (or significant). Any other supported + * floating point formats are expected to be cased on the ISA processor + * symbol. + * + * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED: + * The C Compiler implements objects of type `char' as `unsigned' or + * `signed' respectively. This is really an implementation choice of + * the compiler writer, but it is specified in the ABI and tends to + * be uniform across compilers for an instruction set architecture. + * Hence, it has the properties of a processor characteristic. + * + * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT / + * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT / + * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT: + * The ABI defines alignment requirements of each of the primitive + * object types. Some, if not all, may be hardware requirements as + * well. The values are expressed in "byte-alignment" units. + * + * _MAX_ALIGNMENT: + * The most stringent alignment requirement as specified by the ABI. + * Equal to the maximum of all the above _XXX_ALIGNMENT values. + * + * _ALIGNMENT_REQUIRED: + * True or false (1 or 0) whether or not the hardware requires the ABI + * alignment. + * + * _LONG_LONG_ALIGNMENT_32 + * The 32-bit ABI supported by a 64-bit kernel may have different + * alignment requirements for primitive object types. The value of this + * identifier is expressed in "byte-alignment" units. + * + * _HAVE_CPUID_INSN + * This indicates that the architecture supports the 'cpuid' + * instruction as defined by Intel. (Intel allows other vendors + * to extend the instruction for their own purposes.) + * + * + * Implementation Choices: + * + * _ILP32 / _LP64: + * This specifies the compiler data type implementation as specified in + * the relevant ABI. The choice between these is strongly influenced + * by the underlying hardware, but is not absolutely tied to it. + * Currently only two data type models are supported: + * + * _ILP32: + * Int/Long/Pointer are 32 bits. This is the historical UNIX + * and Solaris implementation. Due to its historical standing, + * this is the default case. + * + * _LP64: + * Long/Pointer are 64 bits, Int is 32 bits. This is the chosen + * implementation for 64-bit ABIs such as SPARC V9. + * + * _I32LPx: + * A compilation environment where 'int' is 32-bit, and + * longs and pointers are simply the same size. + * + * In all cases, Char is 8 bits and Short is 16 bits. + * + * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16: + * This specifies the form of the disk VTOC (or label): + * + * _SUNOS_VTOC_8: + * This is a VTOC form which is upwardly compatible with the + * SunOS 4.x disk label and allows 8 partitions per disk. + * + * _SUNOS_VTOC_16: + * In this format the incore vtoc image matches the ondisk + * version. It allows 16 slices per disk, and is not + * compatible with the SunOS 4.x disk label. + * + * Note that these are not the only two VTOC forms possible and + * additional forms may be added. One possible form would be the + * SVr4 VTOC form. The symbol for that is reserved now, although + * it is not implemented. + * + * _SVR4_VTOC_16: + * This VTOC form is compatible with the System V Release 4 + * VTOC (as implemented on the SVr4 Intel and 3b ports) with + * 16 partitions per disk. + * + * + * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR + * This describes the type of addresses used by system DMA: + * + * _DMA_USES_PHYSADDR: + * This type of DMA, used in the x86 implementation, + * requires physical addresses for DMA buffers. The 24-bit + * addresses used by some legacy boards is the source of the + * "low-memory" (<16MB) requirement for some devices using DMA. + * + * _DMA_USES_VIRTADDR: + * This method of DMA allows the use of virtual addresses for + * DMA transfers. + * + * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT + * This indicates the presence/absence of an fdisk table. + * + * _FIRMWARE_NEEDS_FDISK + * The fdisk table is required by system firmware. If present, + * it allows a disk to be subdivided into multiple fdisk + * partitions, each of which is equivalent to a separate, + * virtual disk. This enables the co-existence of multiple + * operating systems on a shared hard disk. + * + * _NO_FDISK_PRESENT + * If the fdisk table is absent, it is assumed that the entire + * media is allocated for a single operating system. + * + * _HAVE_TEM_FIRMWARE + * Defined if this architecture has the (fallback) option of + * using prom_* calls for doing I/O if a suitable kernel driver + * is not available to do it. + * + * _DONT_USE_1275_GENERIC_NAMES + * Controls whether or not device tree node names should + * comply with the IEEE 1275 "Generic Names" Recommended + * Practice. With _DONT_USE_GENERIC_NAMES, device-specific + * names identifying the particular device will be used. + * + * __i386_COMPAT + * This indicates whether the i386 ABI is supported as a *non-native* + * mode for the platform. When this symbol is defined: + * - 32-bit xstat-style system calls are enabled + * - 32-bit xmknod-style system calls are enabled + * - 32-bit system calls use i386 sizes -and- alignments + * + * Note that this is NOT defined for the i386 native environment! + * + * __x86 + * This is ONLY a synonym for defined(__i386) || defined(__amd64) + * which is useful only insofar as these two architectures share + * common attributes. Analogous to __sparc. + * + * _PSM_MODULES + * This indicates whether or not the implementation uses PSM + * modules for processor support, reading /etc/mach from inside + * the kernel to extract a list. + * + * _RTC_CONFIG + * This indicates whether or not the implementation uses /etc/rtc_config + * to configure the real-time clock in the kernel. + * + * _UNIX_KRTLD + * This indicates that the implementation uses a dynamically + * linked unix + krtld to form the core kernel image at boot + * time, or (in the absence of this symbol) a prelinked kernel image. + * + * _OBP + * This indicates the firmware interface is OBP. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The following set of definitions characterize Solaris on AMD's + * 64-bit systems. + */ +#if defined(__x86_64) || defined(__amd64) + +#if !defined(__amd64) +#define __amd64 /* preferred guard */ +#endif + +#if !defined(__x86) +#define __x86 +#endif + +/* + * Define the appropriate "processor characteristics" + */ +#define _LITTLE_ENDIAN +#define _STACK_GROWS_DOWNWARD +#define _LONG_LONG_LTOH +#define _BIT_FIELDS_LTOH +#define _IEEE_754 +#define _CHAR_IS_SIGNED +#define _BOOL_ALIGNMENT 1 +#define _CHAR_ALIGNMENT 1 +#define _SHORT_ALIGNMENT 2 +#define _INT_ALIGNMENT 4 +#define _FLOAT_ALIGNMENT 4 +#define _FLOAT_COMPLEX_ALIGNMENT 4 +#define _LONG_ALIGNMENT 8 +#define _LONG_LONG_ALIGNMENT 8 +#define _DOUBLE_ALIGNMENT 8 +#define _DOUBLE_COMPLEX_ALIGNMENT 8 +#define _LONG_DOUBLE_ALIGNMENT 16 +#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 16 +#define _POINTER_ALIGNMENT 8 +#define _MAX_ALIGNMENT 16 +#define _ALIGNMENT_REQUIRED 1 + +/* + * Different alignment constraints for the i386 ABI in compatibility mode + */ +#define _LONG_LONG_ALIGNMENT_32 4 + +/* + * Define the appropriate "implementation choices". + */ +#if !defined(_LP64) +#define _LP64 +#endif +#if !defined(_I32LPx) && defined(_KERNEL) +#define _I32LPx +#endif +#define _MULTI_DATAMODEL +#define _SUNOS_VTOC_16 +#define _DMA_USES_PHYSADDR +#define _FIRMWARE_NEEDS_FDISK +#define __i386_COMPAT +#define _PSM_MODULES +#define _RTC_CONFIG +#define _DONT_USE_1275_GENERIC_NAMES +#define _HAVE_CPUID_INSN + +/* + * The feature test macro __i386 is generic for all processors implementing + * the Intel 386 instruction set or a superset of it. Specifically, this + * includes all members of the 386, 486, and Pentium family of processors. + */ +#elif defined(__i386) || defined(__i386__) + +#if !defined(__i386) +#define __i386 +#endif + +#if !defined(__x86) +#define __x86 +#endif + +/* + * Define the appropriate "processor characteristics" + */ +#define _LITTLE_ENDIAN +#define _STACK_GROWS_DOWNWARD +#define _LONG_LONG_LTOH +#define _BIT_FIELDS_LTOH +#define _IEEE_754 +#define _CHAR_IS_SIGNED +#define _BOOL_ALIGNMENT 1 +#define _CHAR_ALIGNMENT 1 +#define _SHORT_ALIGNMENT 2 +#define _INT_ALIGNMENT 4 +#define _FLOAT_ALIGNMENT 4 +#define _FLOAT_COMPLEX_ALIGNMENT 4 +#define _LONG_ALIGNMENT 4 +#define _LONG_LONG_ALIGNMENT 4 +#define _DOUBLE_ALIGNMENT 4 +#define _DOUBLE_COMPLEX_ALIGNMENT 4 +#define _LONG_DOUBLE_ALIGNMENT 4 +#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 4 +#define _POINTER_ALIGNMENT 4 +#define _MAX_ALIGNMENT 4 +#define _ALIGNMENT_REQUIRED 0 + +#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT + +/* + * Define the appropriate "implementation choices". + */ +#define _ILP32 +#if !defined(_I32LPx) && defined(_KERNEL) +#define _I32LPx +#endif +#define _SUNOS_VTOC_16 +#define _DMA_USES_PHYSADDR +#define _FIRMWARE_NEEDS_FDISK +#define _PSM_MODULES +#define _RTC_CONFIG +#define _DONT_USE_1275_GENERIC_NAMES +#define _HAVE_CPUID_INSN + +/* + * The following set of definitions characterize the Solaris on SPARC systems. + * + * The symbol __sparc indicates any of the SPARC family of processor + * architectures. This includes SPARC V7, SPARC V8 and SPARC V9. + * + * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined + * by Version 8 of the SPARC Architecture Manual. (SPARC V7 is close enough + * to SPARC V8 for the former to be subsumed into the latter definition.) + * + * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined + * by Version 9 of the SPARC Architecture Manual. + * + * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only + * relevant when the symbol __sparc is defined. + */ +/* + * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added + * to support backwards builds. This workaround should be removed in s10_71. + */ +#elif defined(__sparc) || defined(__sparcv9) || defined(__sparc__) +#if !defined(__sparc) +#define __sparc +#endif + +/* + * You can be 32-bit or 64-bit, but not both at the same time. + */ +#if defined(__sparcv8) && defined(__sparcv9) +#error "SPARC Versions 8 and 9 are mutually exclusive choices" +#endif + +/* + * Existing compilers do not set __sparcv8. Years will transpire before + * the compilers can be depended on to set the feature test macro. In + * the interim, we'll set it here on the basis of historical behaviour; + * if you haven't asked for SPARC V9, then you must've meant SPARC V8. + */ +#if !defined(__sparcv9) && !defined(__sparcv8) +#define __sparcv8 +#endif + +/* + * Define the appropriate "processor characteristics" shared between + * all Solaris on SPARC systems. + */ +#define _BIG_ENDIAN +#define _STACK_GROWS_DOWNWARD +#define _LONG_LONG_HTOL +#define _BIT_FIELDS_HTOL +#define _IEEE_754 +#define _CHAR_IS_SIGNED +#define _BOOL_ALIGNMENT 1 +#define _CHAR_ALIGNMENT 1 +#define _SHORT_ALIGNMENT 2 +#define _INT_ALIGNMENT 4 +#define _FLOAT_ALIGNMENT 4 +#define _FLOAT_COMPLEX_ALIGNMENT 4 +#define _LONG_LONG_ALIGNMENT 8 +#define _DOUBLE_ALIGNMENT 8 +#define _DOUBLE_COMPLEX_ALIGNMENT 8 +#define _ALIGNMENT_REQUIRED 1 + +/* + * Define the appropriate "implementation choices" shared between versions. + */ +#define _SUNOS_VTOC_8 +#define _DMA_USES_VIRTADDR +#define _NO_FDISK_PRESENT +#define _HAVE_TEM_FIRMWARE +#define _OBP + +/* + * The following set of definitions characterize the implementation of + * 32-bit Solaris on SPARC V8 systems. + */ +#if defined(__sparcv8) + +/* + * Define the appropriate "processor characteristics" + */ +#define _LONG_ALIGNMENT 4 +#define _LONG_DOUBLE_ALIGNMENT 8 +#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 8 +#define _POINTER_ALIGNMENT 4 +#define _MAX_ALIGNMENT 8 + +#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT + +/* + * Define the appropriate "implementation choices" + */ +#define _ILP32 +#if !defined(_I32LPx) && defined(_KERNEL) +#define _I32LPx +#endif + +/* + * The following set of definitions characterize the implementation of + * 64-bit Solaris on SPARC V9 systems. + */ +#elif defined(__sparcv9) + +/* + * Define the appropriate "processor characteristics" + */ +#define _LONG_ALIGNMENT 8 +#define _LONG_DOUBLE_ALIGNMENT 16 +#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 16 +#define _POINTER_ALIGNMENT 8 +#define _MAX_ALIGNMENT 16 + +#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGMENT + +/* + * Define the appropriate "implementation choices" + */ +#if !defined(_LP64) +#define _LP64 +#endif +#if !defined(_I32LPx) +#define _I32LPx +#endif +#define _MULTI_DATAMODEL + +#else +#error "unknown SPARC version" +#endif + +/* + * #error is strictly ansi-C, but works as well as anything for K&R systems. + */ +#else +#error "ISA not supported" +#endif + +#if defined(_ILP32) && defined(_LP64) +#error "Both _ILP32 and _LP64 are defined" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_ISA_DEFS_H */ diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 0b79a41c0..dea7987f5 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -130,6 +130,35 @@ kstat_delete(kstat_t *ksp) return; } +/* FIXME - NONE OF THIS IS ATOMIC, IT SHOULD BE. For the moment this is + * OK since it is only used for the noncritical kstat counters */ +static __inline__ uint64_t +atomic_add_64(volatile uint64_t *target, uint64_t delta) +{ + uint64_t rc = *target; + *target += delta; + return rc; +} + +static __inline__ uint64_t +atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) +{ + *target += delta; + return *target; +} + +static __inline__ uint64_t +atomic_cas_64(volatile uint64_t *target, uint64_t cmp, + uint64_t newval) +{ + uint64_t rc = *target; + + if (*target == cmp) + *target = newval; + + return rc; +} + #ifdef __cplusplus } #endif diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index c48019fdb..65070d858 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -64,7 +64,44 @@ extern "C" { #define bzero(ptr,size) memset(ptr,0,size) #define bcopy(src,dest,size) memcpy(dest,src,size) #define ASSERT(x) BUG_ON(!(x)) -#define ASSERT3U(left,OP,right) BUG_ON(!((left) OP (right))) +#define VERIFY(x) + +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE) do { \ + const TYPE __left = (TYPE)(LEFT); \ + const TYPE __right = (TYPE)(RIGHT); \ + if (!(__left OP __right)) \ + BUG(); \ +} while (0) + +#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t) +#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t) +#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t) + +#define ASSERT3S(x, y, z) VERIFY3S(x, y, z) +#define ASSERT3U(x, y, z) VERIFY3U(x, y, z) +#define ASSERT3P(x, y, z) VERIFY3P(x, y, z) + +/* Dtrace probes do not exist in the linux kernel */ + +#ifdef DTRACE_PROBE1 +#undef DTRACE_PROBE1 +#endif /* DTRACE_PROBE1 */ +#define DTRACE_PROBE1(a, b, c) ((void)0) + +#ifdef DTRACE_PROBE2 +#undef DTRACE_PROBE2 +#endif /* DTRACE_PROBE2 */ +#define DTRACE_PROBE2(a, b, c, d, e) ((void)0) + +#ifdef DTRACE_PROBE3 +#undef DTRACE_PROBE3 +#endif /* DTRACE_PROBE3 */ +#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0) + +#ifdef DTRACE_PROBE4 +#undef DTRACE_PROBE4 +#endif /* DTRACE_PROBE4 */ +#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) /* Missing globals */ diff --git a/include/sys/types.h b/include/sys/types.h index 0a6cbfe79..87c6a3035 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -24,9 +24,9 @@ typedef struct vmem { } vmem_t; typedef short pri_t; typedef struct timespec timestruc_t; /* definition per SVr4 */ typedef longlong_t hrtime_t; - -#ifdef __cplusplus -} -#endif +typedef unsigned short ushort_t; +typedef u_longlong_t len_t; +typedef longlong_t diskaddr_t; +typedef ushort_t o_mode_t; #endif /* _SPL_TYPES_H */ diff --git a/include/sys/types32.h b/include/sys/types32.h new file mode 100644 index 000000000..6df64e713 --- /dev/null +++ b/include/sys/types32.h @@ -0,0 +1,91 @@ +/* + * 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 + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_TYPES32_H +#define _SYS_TYPES32_H + + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Interoperability types for programs. Used for: + * + * Crossing between 32-bit and 64-bit domains. + * + * On disk data formats such as filesystem meta data + * and disk label. + * + * Note: Applications should never include this + * header file. + */ +typedef uint32_t caddr32_t; +typedef int32_t daddr32_t; +typedef int32_t off32_t; +typedef uint32_t ino32_t; +typedef int32_t blkcnt32_t; +typedef uint32_t fsblkcnt32_t; +typedef uint32_t fsfilcnt32_t; +typedef int32_t id32_t; +typedef uint32_t major32_t; +typedef uint32_t minor32_t; +typedef int32_t key32_t; +typedef uint32_t mode32_t; +typedef uint32_t uid32_t; +typedef uint32_t gid32_t; +typedef uint32_t nlink32_t; +typedef uint32_t dev32_t; +typedef int32_t pid32_t; +typedef uint32_t size32_t; +typedef int32_t ssize32_t; +typedef int32_t time32_t; +typedef int32_t clock32_t; + +struct timeval32 { + time32_t tv_sec; /* seconds */ + int32_t tv_usec; /* and microseconds */ +}; + +typedef struct timespec32 { + time32_t tv_sec; /* seconds */ + int32_t tv_nsec; /* and nanoseconds */ +} timespec32_t; + +typedef struct timespec32 timestruc32_t; + +typedef struct itimerspec32 { + struct timespec32 it_interval; + struct timespec32 it_value; +} itimerspec32_t; + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_TYPES32_H */ diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h new file mode 100644 index 000000000..37e4e378c --- /dev/null +++ b/include/sys/u8_textprep.h @@ -0,0 +1,119 @@ +/* + * 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 + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +//#include "dmu_config.h" + +#ifdef HAVE_UNICODE +#include_next +#else + +#ifndef _SYS_U8_TEXTPREP_H +#define _SYS_U8_TEXTPREP_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Unicode encoding conversion functions and their macros. + */ +#define UCONV_IN_BIG_ENDIAN 0x0001 +#define UCONV_OUT_BIG_ENDIAN 0x0002 +#define UCONV_IN_SYSTEM_ENDIAN 0x0004 +#define UCONV_OUT_SYSTEM_ENDIAN 0x0008 +#define UCONV_IN_LITTLE_ENDIAN 0x0010 +#define UCONV_OUT_LITTLE_ENDIAN 0x0020 +#define UCONV_IGNORE_NULL 0x0040 +#define UCONV_IN_ACCEPT_BOM 0x0080 +#define UCONV_OUT_EMIT_BOM 0x0100 + +extern int uconv_u16tou32(const uint16_t *, size_t *, uint32_t *, size_t *, + int); +extern int uconv_u16tou8(const uint16_t *, size_t *, uchar_t *, size_t *, int); +extern int uconv_u32tou16(const uint32_t *, size_t *, uint16_t *, size_t *, + int); +extern int uconv_u32tou8(const uint32_t *, size_t *, uchar_t *, size_t *, int); +extern int uconv_u8tou16(const uchar_t *, size_t *, uint16_t *, size_t *, int); +extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int); + +/* + * UTF-8 text preparation functions and their macros. + * + * Among the macros defined, U8_CANON_DECOMP, U8_COMPAT_DECOMP, and + * U8_CANON_COMP are not public interfaces and must not be used directly + * at the flag input argument. + */ +#define U8_STRCMP_CS (0x00000001) +#define U8_STRCMP_CI_UPPER (0x00000002) +#define U8_STRCMP_CI_LOWER (0x00000004) + +#define U8_CANON_DECOMP (0x00000010) +#define U8_COMPAT_DECOMP (0x00000020) +#define U8_CANON_COMP (0x00000040) + +#define U8_STRCMP_NFD (U8_CANON_DECOMP) +#define U8_STRCMP_NFC (U8_CANON_DECOMP | U8_CANON_COMP) +#define U8_STRCMP_NFKD (U8_COMPAT_DECOMP) +#define U8_STRCMP_NFKC (U8_COMPAT_DECOMP | U8_CANON_COMP) + +#define U8_TEXTPREP_TOUPPER (U8_STRCMP_CI_UPPER) +#define U8_TEXTPREP_TOLOWER (U8_STRCMP_CI_LOWER) + +#define U8_TEXTPREP_NFD (U8_STRCMP_NFD) +#define U8_TEXTPREP_NFC (U8_STRCMP_NFC) +#define U8_TEXTPREP_NFKD (U8_STRCMP_NFKD) +#define U8_TEXTPREP_NFKC (U8_STRCMP_NFKC) + +#define U8_TEXTPREP_IGNORE_NULL (0x00010000) +#define U8_TEXTPREP_IGNORE_INVALID (0x00020000) +#define U8_TEXTPREP_NOWAIT (0x00040000) + +#define U8_UNICODE_320 (0) +#define U8_UNICODE_500 (1) +#define U8_UNICODE_LATEST (U8_UNICODE_500) + +#define U8_VALIDATE_ENTIRE (0x00100000) +#define U8_VALIDATE_CHECK_ADDITIONAL (0x00200000) +#define U8_VALIDATE_UCS2_RANGE (0x00400000) + +#define U8_ILLEGAL_CHAR (-1) +#define U8_OUT_OF_RANGE_CHAR (-2) + +extern int u8_validate(char *, size_t, char **, int, int *); +extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *); +extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t, + int *); + +#ifdef __cplusplus +} +#endif + +#endif /* HAVE_UNICODE */ + +#endif /* _SYS_U8_TEXTPREP_H */ diff --git a/include/sys/u8_textprep_data.h b/include/sys/u8_textprep_data.h new file mode 100644 index 000000000..fa58daacc --- /dev/null +++ b/include/sys/u8_textprep_data.h @@ -0,0 +1,35382 @@ +/* + * 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 + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (c) 1991-2006 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of the Unicode data files and any associated documentation (the + * "Data Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + * + * Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be + * registered in some jurisdictions. All other trademarks and registered + * trademarks mentioned herein are the property of their respective owners. + */ +/* + * This file has been modified by Sun Microsystems, Inc. + */ + +#include "dmu_config.h" + +#ifdef HAVE_UNICODE +#include_next +#else + +#ifndef _SYS_U8_TEXTPREP_DATA_H +#define _SYS_U8_TEXTPREP_DATA_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * To get to the combining class data, composition mappings, decomposition + * mappings, and case conversion mappings of Unicode, the data structures + * formulated and their meanings are like the following: + * + * Each UTF-8 character is seen as a 4-byte entity so that U+0061 (or 0x61 in + * UTF-8) would be seen as 0x00 0x00 0x00 0x61. Similarly, U+1D15E would be + * 0xF0 0x9D 0x85 0x9E in UTF-8. + * + * The first byte (MSB) value is an index to the b1_tbl, such as + * u8_common_b1_tbl and u8_composition_b1_tbl tables. A b1_tbl has + * indices to b2_tbl tables that have indices to b3_tbl. Each b3_tbl has + * either indices to b4_tbl or indices to b4_tbl and base values for + * displacement calculations later by using the u8_displacement_t type at + * below. Each b4_tbl table then has indices to the final tables. + * + * As an example, if we have a character with code value of U+1D15E which is + * 0xF0 0x9D 0x85 0x9E in UTF-8, the target decomposition character bytes + * that will be mapped by the mapping procedure would be the ones between + * the start_index and the end_index computed as like the following: + * + * b2_tbl_id = u8_common_b1_tbl[0][0xF0]; + * b3_tbl_id = u8_decomp_b2_tbl[0][b2_tbl_id][0x9D]; + * b4_tbl_id = u8_decomp_b3_tbl[0][b3_tbl_id][0x85].tbl_id; + * b4_base = u8_decomp_b3_tbl[0][b3_tbl_id][0x85].base; + * if (b4_tbl_id >= 0x8000) { + * b4_tbl_id -= 0x8000; + * start_index = u8_decomp_b4_16bit_tbl[0][b4_tbl_id][0x9E]; + * end_index = u8_decomp_b4_16bit_tbl[0][b4_tbl_id][0x9E + 1]; + * } else { + * start_index = u8_decomp_b4_tbl[0][b4_tbl_id][0x9E]; + * end_index = u8_decomp_b4_tbl[0][b4_tbl_id][0x9E + 1]; + * } + * + * The start_index and the end_index can be used to retrieve the bytes + * possibly of multiple UTF-8 characters from the final tables. + * + * The "[0]" at the above indicates this is for Unicode Version 3.2.0 data + * as of today. Consequently, the "[1]" indicates another Unicode version + * data and it is Unicode 5.0.0 as of today. + * + * The mapping procedures and the data structures are more or less similar or + * alike among different mappings. You might want to read the u8_textprep.c + * for specific details. + * + * The tool programs created and used to generate the tables in this file are + * saved at PSARC/2007/149/materials/ as tools.tar.gz file. + */ + +/* The following is a component type for the b4_tbl vectors. */ +typedef struct { + uint16_t tbl_id; + uint16_t base; +} u8_displacement_t; + +/* + * The U8_TBL_ELEMENT_NOT_DEF macro indicates a byte that is not defined or + * used. The U8_TBL_ELEMENT_FILLER indicates the end of a UTF-8 character at + * the final tables. + */ +#define U8_TBL_ELEMENT_NOT_DEF (0xff) +#define N_ U8_TBL_ELEMENT_NOT_DEF + +#define U8_TBL_ELEMENT_FILLER (0xf7) +#define FIL_ U8_TBL_ELEMENT_FILLER + +/* + * The common b1_tbl for combining class, decompositions, tolower, and + * toupper case conversion mappings. + */ +static const uchar_t u8_common_b1_tbl[2][256] = { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, +}; + +static const uchar_t u8_combining_class_b2_tbl[2][2][256] = { + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, 2, 3, 4, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 5, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, 6, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, 2, 3, 4, N_, N_, N_, N_, + N_, N_, 5, N_, N_, N_, N_, 6, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 7, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, 8, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + +}; + +static const uchar_t u8_combining_class_b3_tbl[2][9][256] = { + { + { /* Third byte table 0. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 0, 1, N_, N_, + N_, N_, 2, N_, N_, N_, 3, 4, + N_, 5, N_, 6, 7, 8, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 1. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, N_, 19, + N_, 20, N_, 21, N_, 22, N_, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 2. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 32, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 33, N_, N_, 34, + N_, N_, 35, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 3. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, 36, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 4. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 37, N_, 38, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 5. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 39, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 40, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 6. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, 41, 42, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 7. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 8. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + }, + { + { /* Third byte table 0. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 0, 1, N_, N_, + N_, N_, 2, N_, N_, N_, 3, 4, + 5, 6, N_, 7, 8, 9, N_, 10, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 1. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, N_, 21, + N_, 22, 23, 24, N_, 25, N_, 26, + 27, 28, 29, 30, 31, 32, 33, 34, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 2. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 35, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, 36, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 37, N_, N_, 38, + N_, N_, 39, N_, 40, N_, N_, N_, + 41, N_, N_, N_, 42, 43, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 44, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 3. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, 45, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 4. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 46, N_, 47, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 5. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 48, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 6. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, 49, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 50, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 7. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 51, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { /* Third byte table 8. */ + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, 52, 53, N_, + N_, 54, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + }, +}; + +/* + * Unlike other b4_tbl, the b4_tbl for combining class data has + * the combining class values not indices to the final tables. + */ +static const uchar_t u8_combining_class_b4_tbl[2][55][256] = { + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 232, 220, 220, + 220, 220, 232, 216, 220, 220, 220, 220, + 220, 202, 202, 220, 220, 220, 220, 202, + 202, 220, 220, 220, 220, 220, 220, 220, + 220, 220, 220, 220, 1, 1, 1, 1, + 1, 220, 220, 220, 220, 230, 230, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 230, 240, 230, 220, + 220, 220, 230, 230, 230, 220, 220, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 234, 234, 233, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 230, 230, 230, 230, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 220, 230, 230, 230, 230, 220, 230, + 230, 230, 222, 220, 230, 230, 230, 230, + 230, 230, 0, 220, 220, 220, 220, 220, + 230, 230, 220, 230, 230, 222, 228, 230, + 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 0, 20, 21, 22, 0, 23, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 24, 25, 0, 230, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 27, 28, 29, 30, 31, + 32, 33, 34, 230, 230, 220, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 35, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 230, 230, + 230, 230, 230, 230, 230, 0, 0, 230, + 230, 230, 230, 220, 230, 0, 0, 230, + 230, 0, 220, 230, 230, 220, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 220, 230, 230, 220, 230, 230, 220, + 220, 220, 230, 220, 220, 230, 220, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 220, 230, 220, 230, 220, 230, + 220, 230, 230, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 230, 220, 230, 230, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 84, 91, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 103, 103, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 107, 107, 107, 107, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 118, 118, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 122, 122, 122, 122, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 220, 220, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 220, 0, 220, + 0, 216, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 129, 130, 0, 132, 0, 0, 0, + 0, 0, 130, 130, 130, 130, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 130, 0, 230, 230, 9, 0, 230, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 220, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 0, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 228, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 1, 1, 230, 230, 230, 230, + 1, 1, 1, 230, 230, 0, 0, 0, + 0, 230, 0, 0, 0, 1, 1, 230, + 220, 230, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 218, 228, 232, 222, 224, 224, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 39. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 26, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 40. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 41. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 216, 216, 1, + 1, 1, 0, 0, 0, 226, 216, 216, + 216, 216, 216, 0, 0, 0, 0, 0, + 0, 0, 0, 220, 220, 220, 220, 220, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 42. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 220, 220, 220, 0, 0, 230, 230, 230, + 230, 230, 220, 220, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 230, 230, 230, 230, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 43. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 44. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 45. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 46. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 47. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 48. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 49. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 50. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 51. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 52. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 53. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 54. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + }, + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 232, 220, 220, + 220, 220, 232, 216, 220, 220, 220, 220, + 220, 202, 202, 220, 220, 220, 220, 202, + 202, 220, 220, 220, 220, 220, 220, 220, + 220, 220, 220, 220, 1, 1, 1, 1, + 1, 220, 220, 220, 220, 230, 230, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 230, 240, 230, 220, + 220, 220, 230, 230, 230, 220, 220, 0, + 230, 230, 230, 220, 220, 220, 220, 230, + 232, 220, 220, 230, 233, 234, 234, 233, + 234, 234, 233, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 230, 230, 230, 230, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 220, 230, 230, 230, 230, 220, 230, + 230, 230, 222, 220, 230, 230, 230, 230, + 230, 230, 220, 220, 220, 220, 220, 220, + 230, 230, 220, 230, 230, 222, 228, 230, + 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 19, 20, 21, 22, 0, 23, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 24, 25, 0, 230, 220, 0, 18, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 230, 230, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 27, 28, 29, 30, 31, + 32, 33, 34, 230, 230, 220, 220, 230, + 230, 230, 230, 230, 220, 230, 230, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 35, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 230, 230, + 230, 230, 230, 230, 230, 0, 0, 230, + 230, 230, 230, 220, 230, 0, 0, 230, + 230, 0, 220, 230, 230, 220, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 220, 230, 230, 220, 230, 230, 220, + 220, 220, 230, 220, 220, 230, 220, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 220, 230, 220, 230, 220, 230, + 220, 230, 230, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 230, 230, 230, 230, 230, + 230, 230, 220, 230, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 230, 220, 230, 230, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 84, 91, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 103, 103, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 107, 107, 107, 107, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 118, 118, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 122, 122, 122, 122, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 220, 220, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 220, 0, 220, + 0, 216, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 129, 130, 0, 132, 0, 0, 0, + 0, 0, 130, 130, 130, 130, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 130, 0, 230, 230, 9, 0, 230, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 220, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 0, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 230, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 39. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 228, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 40. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 222, 230, 220, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 41. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 230, + 220, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 42. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 43. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 230, 220, 230, 230, 230, + 230, 230, 230, 230, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 44. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 220, 230, 230, 230, 230, 230, + 230, 230, 220, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 230, 220, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 45. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 1, 1, 230, 230, 230, 230, + 1, 1, 1, 230, 230, 0, 0, 0, + 0, 230, 0, 0, 0, 1, 1, 230, + 220, 230, 1, 1, 220, 220, 220, 220, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 46. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 218, 228, 232, 222, 224, 224, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 47. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 48. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 49. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 26, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 50. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 51. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 220, 0, 230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 230, 1, 220, 0, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 52. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 216, 216, 1, + 1, 1, 0, 0, 0, 226, 216, 216, + 216, 216, 216, 0, 0, 0, 0, 0, + 0, 0, 0, 220, 220, 220, 220, 220, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 53. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 220, 220, 220, 0, 0, 230, 230, 230, + 230, 230, 220, 220, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 230, 230, 230, 230, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { /* Fourth byte table 54. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 230, 230, 230, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + }, +}; + +static const uchar_t u8_composition_b1_tbl[2][256] = { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, +}; + +static const uchar_t u8_composition_b2_tbl[2][1][256] = { + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, 2, 3, 4, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, 2, 3, 4, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + +}; + +static const u8_displacement_t u8_composition_b3_tbl[2][5][256] = { + { + { /* Third byte table 0. */ + { 0x8000, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0, 2470 }, + { 0x8001, 2491 }, { 1, 2871 }, { 2, 2959 }, + { 3, 3061 }, { 4, 3212 }, { 5, 3226 }, + { N_, 0 }, { 6, 3270 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0x8002, 3277 }, + { 7, 3774 }, { 8, 3949 }, { 9, 4198 }, + { N_, 0 }, { 10, 4265 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 11, 4293 }, { 12, 4312 }, { N_, 0 }, + { 13, 4326 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 14, 4347 }, + { N_, 0 }, { N_, 0 }, { 15, 4374 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 16, 4391 }, + { 17, 4416 }, { 18, 4425 }, { N_, 0 }, + { 19, 4451 }, { 20, 4460 }, { 21, 4469 }, + { N_, 0 }, { 22, 4503 }, { N_, 0 }, + { 23, 4529 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 24, 4563 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 25, 4572 }, { 26, 4588 }, + { 27, 4620 }, { 28, 4666 }, { 0x8003, 4682 }, + { 0x8004, 5254 }, { 29, 5616 }, { 30, 5646 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 31, 5684 }, + { 32, 5708 }, { 33, 5732 }, { 34, 5780 }, + { 35, 5900 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 36, 6012 }, { 37, 6241 }, { 38, 6358 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + }, + { + { /* Third byte table 0. */ + { 0x8000, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0, 2470 }, + { 0x8001, 2491 }, { 1, 2871 }, { 2, 2959 }, + { 3, 3061 }, { 4, 3212 }, { 5, 3226 }, + { N_, 0 }, { 6, 3270 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0x8002, 3277 }, + { 7, 3774 }, { 8, 3949 }, { 9, 4198 }, + { N_, 0 }, { 10, 4265 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 11, 4293 }, { 12, 4312 }, { N_, 0 }, + { 13, 4326 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 14, 4347 }, + { N_, 0 }, { N_, 0 }, { 15, 4374 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 16, 4391 }, + { 17, 4416 }, { 18, 4425 }, { N_, 0 }, + { 19, 4451 }, { 20, 4460 }, { 21, 4469 }, + { N_, 0 }, { 22, 4503 }, { N_, 0 }, + { 23, 4529 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 24, 4563 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 25, 4572 }, { 26, 4662 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 27, 4671 }, { 28, 4687 }, + { 29, 4719 }, { 30, 4765 }, { 0x8003, 4781 }, + { 0x8004, 5353 }, { 31, 5715 }, { 32, 5745 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 33, 5783 }, + { 34, 5807 }, { 35, 5831 }, { 36, 5879 }, + { 37, 5999 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 38, 6111 }, { 39, 6340 }, { 40, 6457 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + }, +}; + +static const uchar_t u8_composition_b4_tbl[2][41][257] = { + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 29, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 73, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 15, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 38, 46, 46, 46, 46, + 46, 54, 62, 62, 62, 62, 62, 62, + 62, 70, 78, 86, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 108, 144, 144, 144, 144, 144, 144, 144, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 14, 22, 30, 30, 30, 30, 30, 37, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 15, 15, 15, 70, 70, + 70, 70, 112, 133, 154, 154, 154, 162, + 162, 162, 162, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 20, 20, 20, 27, 27, 46, 59, + 66, 91, 91, 98, 98, 98, 98, 105, + 105, 105, 105, 105, 130, 130, 130, 130, + 137, 137, 137, 137, 144, 144, 151, 151, + 151, 164, 164, 164, 171, 171, 190, 203, + 210, 235, 235, 242, 242, 242, 242, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 25, 25, 25, 25, + 32, 32, 32, 32, 39, 39, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 53, + 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 60, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 21, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 14, 14, 14, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 9, 9, 9, 9, 9, 9, 9, + 9, 18, 18, 18, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 25, + 25, 25, 25, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 25, 25, 25, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 16, 16, 16, 16, + 16, 16, 16, 24, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 38, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 16, + 16, 16, 16, 16, 16, 16, 16, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 8, 16, 16, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 8, 16, 16, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 8, 8, 8, + 8, 16, 16, 16, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 32, 32, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 8, 16, 16, + 16, 24, 24, 24, 24, 24, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 40, 40, 40, 48, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 64, 72, 72, 72, 80, + 88, 88, 88, 96, 104, 112, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 16, 16, 16, 24, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 40, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 56, 56, 56, 56, 56, + 56, 64, 72, 72, 80, 80, 80, 80, + 80, 80, 80, 88, 96, 104, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, + 9, 9, 9, 9, 18, 18, 27, 27, + 36, 36, 45, 45, 54, 54, 63, 63, + 72, 72, 81, 81, 90, 90, 99, 99, + 108, 108, 117, 117, 117, 126, 126, 135, + 135, 144, 144, 144, 144, 144, 144, 144, + 161, 161, 161, 178, 178, 178, 195, 195, + 195, 212, 212, 212, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 18, + 18, 18, 18, 18, 27, 27, 36, 36, + 45, 45, 54, 54, 63, 63, 72, 72, + 81, 81, 90, 90, 99, 99, 108, 108, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 9, 18, 18, 27, + 27, 36, 36, 36, 36, 36, 36, 36, + 53, 53, 53, 70, 70, 70, 87, 87, + 87, 104, 104, 104, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, + 130, 139, 148, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, + }, + { /* Fourth byte table 39. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 40. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + }, + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 29, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 73, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 15, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 38, 46, 46, 46, 46, + 46, 54, 62, 62, 62, 62, 62, 62, + 62, 70, 78, 86, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 108, 144, 144, 144, 144, 144, 144, 144, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, + 151, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 14, 22, 30, 30, 30, 30, 30, 37, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 15, 15, 15, 70, 70, + 70, 70, 112, 133, 154, 154, 154, 162, + 162, 162, 162, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 20, 20, 20, 27, 27, 46, 59, + 66, 91, 91, 98, 98, 98, 98, 105, + 105, 105, 105, 105, 130, 130, 130, 130, + 137, 137, 137, 137, 144, 144, 151, 151, + 151, 164, 164, 164, 171, 171, 190, 203, + 210, 235, 235, 242, 242, 242, 242, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, + 249, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 25, 25, 25, 25, + 32, 32, 32, 32, 39, 39, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 53, + 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 60, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 21, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 14, 14, 14, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 9, 9, 9, 9, 9, 9, 9, + 9, 18, 18, 18, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 25, + 25, 25, 25, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 25, 25, 25, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, + 34, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 9, + 18, 18, 27, 27, 36, 36, 45, 45, + 45, 45, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 63, 63, 72, 72, 81, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 16, 16, 16, 16, + 16, 16, 16, 24, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 38, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 16, + 16, 16, 16, 16, 16, 16, 16, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 8, 16, 16, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 8, 16, 16, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 8, 8, 8, + 8, 16, 16, 16, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 32, 32, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 8, 16, 16, + 16, 24, 24, 24, 24, 24, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 40, 40, 40, 48, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 64, 72, 72, 72, 80, + 88, 88, 88, 96, 104, 112, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 16, 16, 16, 24, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 40, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 56, 56, 56, 56, 56, + 56, 64, 72, 72, 80, 80, 80, 80, + 80, 80, 80, 88, 96, 104, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, + 9, 9, 9, 9, 18, 18, 27, 27, + 36, 36, 45, 45, 54, 54, 63, 63, + 72, 72, 81, 81, 90, 90, 99, 99, + 108, 108, 117, 117, 117, 126, 126, 135, + 135, 144, 144, 144, 144, 144, 144, 144, + 161, 161, 161, 178, 178, 178, 195, 195, + 195, 212, 212, 212, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, + 229, + }, + { /* Fourth byte table 39. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 18, + 18, 18, 18, 18, 27, 27, 36, 36, + 45, 45, 54, 54, 63, 63, 72, 72, + 81, 81, 90, 90, 99, 99, 108, 108, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, + 117, + }, + { /* Fourth byte table 40. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 9, 18, 18, 27, + 27, 36, 36, 36, 36, 36, 36, 36, + 53, 53, 53, 70, 70, 70, 87, 87, + 87, 104, 104, 104, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, + 130, 139, 148, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, + 166, + }, + }, +}; + +static const uint16_t u8_composition_b4_16bit_tbl[2][5][257] = { + { + { /* Fourth byte 16-bit table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 16, 24, + 24, 24, 124, 146, 177, 219, 327, 335, + 379, 427, 521, 528, 562, 602, 624, 683, + 782, 797, 797, 849, 894, 941, 1061, 1076, + 1118, 1133, 1193, 1233, 1233, 1233, 1233, 1233, + 1233, 1233, 1333, 1355, 1386, 1428, 1536, 1544, + 1588, 1643, 1731, 1744, 1778, 1818, 1840, 1899, + 1998, 2013, 2013, 2065, 2110, 2164, 2284, 2299, + 2348, 2363, 2430, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, + }, + { /* Fourth byte 16-bit table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 29, 29, 36, 43, 56, + 64, 64, 64, 93, 93, 93, 93, 93, + 101, 101, 101, 101, 101, 130, 151, 158, + 158, 165, 165, 165, 165, 190, 190, 190, + 190, 190, 190, 219, 219, 226, 233, 246, + 254, 254, 254, 283, 283, 283, 283, 283, + 291, 291, 291, 291, 291, 320, 341, 348, + 348, 355, 355, 355, 355, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, + }, + { /* Fourth byte 16-bit table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 49, 49, 49, 49, 77, 77, + 112, 112, 160, 160, 160, 160, 160, 160, + 188, 188, 196, 196, 196, 196, 237, 237, + 237, 237, 272, 272, 272, 280, 280, 288, + 288, 288, 344, 344, 344, 344, 372, 372, + 414, 414, 469, 469, 469, 469, 469, 469, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, + }, + { /* Fourth byte 16-bit table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 29, 58, 66, 74, 82, 90, 98, + 106, 135, 164, 172, 180, 188, 196, 204, + 212, 227, 242, 242, 242, 242, 242, 242, + 242, 257, 272, 272, 272, 272, 272, 272, + 272, 301, 330, 338, 346, 354, 362, 370, + 378, 407, 436, 444, 452, 460, 468, 476, + 484, 506, 528, 528, 528, 528, 528, 528, + 528, 550, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, + }, + { /* Fourth byte 16-bit table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 30, 30, 30, 30, 30, 30, + 30, 45, 60, 60, 60, 60, 60, 60, + 60, 82, 104, 104, 104, 104, 104, 104, + 104, 104, 126, 126, 126, 126, 126, 126, + 126, 155, 184, 192, 200, 208, 216, 224, + 232, 261, 290, 298, 306, 314, 322, 330, + 338, 346, 346, 346, 346, 354, 354, 354, + 354, 354, 354, 354, 354, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, + }, + }, + { + { /* Fourth byte 16-bit table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 16, 24, + 24, 24, 124, 146, 177, 219, 327, 335, + 379, 427, 521, 528, 562, 602, 624, 683, + 782, 797, 797, 849, 894, 941, 1061, 1076, + 1118, 1133, 1193, 1233, 1233, 1233, 1233, 1233, + 1233, 1233, 1333, 1355, 1386, 1428, 1536, 1544, + 1588, 1643, 1731, 1744, 1778, 1818, 1840, 1899, + 1998, 2013, 2013, 2065, 2110, 2164, 2284, 2299, + 2348, 2363, 2430, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, + 2470, + }, + { /* Fourth byte 16-bit table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 29, 29, 36, 43, 56, + 64, 64, 64, 93, 93, 93, 93, 93, + 101, 101, 101, 101, 101, 130, 151, 158, + 158, 165, 165, 165, 165, 190, 190, 190, + 190, 190, 190, 219, 219, 226, 233, 246, + 254, 254, 254, 283, 283, 283, 283, 283, + 291, 291, 291, 291, 291, 320, 341, 348, + 348, 355, 355, 355, 355, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 380, 380, 380, 380, 380, + 380, + }, + { /* Fourth byte 16-bit table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 49, 49, 49, 49, 77, 77, + 112, 112, 160, 160, 160, 160, 160, 160, + 188, 188, 196, 196, 196, 196, 237, 237, + 237, 237, 272, 272, 272, 280, 280, 288, + 288, 288, 344, 344, 344, 344, 372, 372, + 414, 414, 469, 469, 469, 469, 469, 469, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, + 497, + }, + { /* Fourth byte 16-bit table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 29, 58, 66, 74, 82, 90, 98, + 106, 135, 164, 172, 180, 188, 196, 204, + 212, 227, 242, 242, 242, 242, 242, 242, + 242, 257, 272, 272, 272, 272, 272, 272, + 272, 301, 330, 338, 346, 354, 362, 370, + 378, 407, 436, 444, 452, 460, 468, 476, + 484, 506, 528, 528, 528, 528, 528, 528, + 528, 550, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, + 572, + }, + { /* Fourth byte 16-bit table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 30, 30, 30, 30, 30, 30, + 30, 45, 60, 60, 60, 60, 60, 60, + 60, 82, 104, 104, 104, 104, 104, 104, + 104, 104, 126, 126, 126, 126, 126, 126, + 126, 155, 184, 192, 200, 208, 216, 224, + 232, 261, 290, 298, 306, 314, 322, 330, + 338, 346, 346, 346, 346, 354, 354, 354, + 354, 354, 354, 354, 354, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, + 362, + }, + }, +}; + +static const uchar_t u8_composition_final_tbl[2][6623] = { + { + 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_, + 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA0, FIL_, + 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAF, FIL_, + 0x10, 0xCC, 0x86, FIL_, 0xC4, 0x82, FIL_, 0xCC, + 0x87, FIL_, 0xC8, 0xA6, FIL_, 0xCC, 0x8F, FIL_, + 0xC8, 0x80, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x82, + FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x81, FIL_, 0xCC, + 0x80, FIL_, 0xC3, 0x80, FIL_, 0xCC, 0x83, FIL_, + 0xC3, 0x83, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, + 0xA0, FIL_, 0xCC, 0xA5, FIL_, 0xE1, 0xB8, 0x80, + FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x82, FIL_, 0xCC, + 0x84, FIL_, 0xC4, 0x80, FIL_, 0xCC, 0x88, FIL_, + 0xC3, 0x84, FIL_, 0xCC, 0x8A, FIL_, 0xC3, 0x85, + FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x84, FIL_, 0xCC, + 0x89, FIL_, 0xE1, 0xBA, 0xA2, FIL_, 0xCC, 0x8C, + FIL_, 0xC7, 0x8D, FIL_, 0x03, 0xCC, 0x87, FIL_, + 0xE1, 0xB8, 0x82, FIL_, 0xCC, 0xB1, FIL_, 0xE1, + 0xB8, 0x86, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0x84, FIL_, 0x05, 0xCC, 0xA7, FIL_, 0xC3, 0x87, + FIL_, 0xCC, 0x81, FIL_, 0xC4, 0x86, FIL_, 0xCC, + 0x8C, FIL_, 0xC4, 0x8C, FIL_, 0xCC, 0x87, FIL_, + 0xC4, 0x8A, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0x88, + FIL_, 0x06, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0x8E, + FIL_, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0x90, FIL_, + 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x92, FIL_, 0xCC, + 0x87, FIL_, 0xE1, 0xB8, 0x8A, FIL_, 0xCC, 0x8C, + FIL_, 0xC4, 0x8E, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xB8, 0x8C, FIL_, 0x11, 0xCC, 0x80, FIL_, 0xC3, + 0x88, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x89, FIL_, + 0xCC, 0x82, FIL_, 0xC3, 0x8A, FIL_, 0xCC, 0x88, + FIL_, 0xC3, 0x8B, FIL_, 0xCC, 0xA7, FIL_, 0xC8, + 0xA8, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x86, FIL_, + 0xCC, 0x8F, FIL_, 0xC8, 0x84, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBA, 0xBA, FIL_, 0xCC, 0xB0, FIL_, + 0xE1, 0xB8, 0x9A, FIL_, 0xCC, 0xAD, FIL_, 0xE1, + 0xB8, 0x98, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBA, + 0xBC, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0xB8, + FIL_, 0xCC, 0x84, FIL_, 0xC4, 0x92, FIL_, 0xCC, + 0x86, FIL_, 0xC4, 0x94, FIL_, 0xCC, 0x87, FIL_, + 0xC4, 0x96, FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x98, + FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x9A, FIL_, 0x01, + 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9E, FIL_, 0x07, + 0xCC, 0x8C, FIL_, 0xC7, 0xA6, FIL_, 0xCC, 0x87, + FIL_, 0xC4, 0xA0, FIL_, 0xCC, 0x84, FIL_, 0xE1, + 0xB8, 0xA0, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0x9C, + FIL_, 0xCC, 0x81, FIL_, 0xC7, 0xB4, FIL_, 0xCC, + 0xA7, FIL_, 0xC4, 0xA2, FIL_, 0xCC, 0x86, FIL_, + 0xC4, 0x9E, FIL_, 0x07, 0xCC, 0xAE, FIL_, 0xE1, + 0xB8, 0xAA, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB8, + 0xA2, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA6, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0xA4, FIL_, + 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0xA8, FIL_, 0xCC, + 0x8C, FIL_, 0xC8, 0x9E, FIL_, 0xCC, 0x82, FIL_, + 0xC4, 0xA4, FIL_, 0x0F, 0xCC, 0x84, FIL_, 0xC4, + 0xAA, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x8C, FIL_, + 0xCC, 0xA8, FIL_, 0xC4, 0xAE, FIL_, 0xCC, 0x83, + FIL_, 0xC4, 0xA8, FIL_, 0xCC, 0x88, FIL_, 0xC3, + 0x8F, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x8D, FIL_, + 0xCC, 0x8F, FIL_, 0xC8, 0x88, FIL_, 0xCC, 0x86, + FIL_, 0xC4, 0xAC, FIL_, 0xCC, 0x91, FIL_, 0xC8, + 0x8A, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x8F, FIL_, + 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x88, FIL_, 0xCC, + 0x87, FIL_, 0xC4, 0xB0, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xBB, 0x8A, FIL_, 0xCC, 0xB0, FIL_, 0xE1, + 0xB8, 0xAC, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x8E, + FIL_, 0x01, 0xCC, 0x82, FIL_, 0xC4, 0xB4, FIL_, + 0x05, 0xCC, 0x8C, FIL_, 0xC7, 0xA8, FIL_, 0xCC, + 0xB1, FIL_, 0xE1, 0xB8, 0xB4, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xB8, 0xB0, FIL_, 0xCC, 0xA7, FIL_, + 0xC4, 0xB6, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0xB2, FIL_, 0x06, 0xCC, 0xA7, FIL_, 0xC4, 0xBB, + FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0xBD, FIL_, 0xCC, + 0xB1, FIL_, 0xE1, 0xB8, 0xBA, FIL_, 0xCC, 0xA3, + FIL_, 0xE1, 0xB8, 0xB6, FIL_, 0xCC, 0xAD, FIL_, + 0xE1, 0xB8, 0xBC, FIL_, 0xCC, 0x81, FIL_, 0xC4, + 0xB9, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xB8, + 0xBE, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x82, + FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x80, FIL_, + 0x09, 0xCC, 0x80, FIL_, 0xC7, 0xB8, FIL_, 0xCC, + 0xAD, FIL_, 0xE1, 0xB9, 0x8A, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0x84, FIL_, 0xCC, 0xB1, FIL_, + 0xE1, 0xB9, 0x88, FIL_, 0xCC, 0x83, FIL_, 0xC3, + 0x91, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x86, + FIL_, 0xCC, 0x81, FIL_, 0xC5, 0x83, FIL_, 0xCC, + 0xA7, FIL_, 0xC5, 0x85, FIL_, 0xCC, 0x8C, FIL_, + 0xC5, 0x87, FIL_, 0x10, 0xCC, 0xA8, FIL_, 0xC7, + 0xAA, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x8E, FIL_, + 0xCC, 0x80, FIL_, 0xC3, 0x92, FIL_, 0xCC, 0x9B, + FIL_, 0xC6, 0xA0, FIL_, 0xCC, 0x8F, FIL_, 0xC8, + 0x8C, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x93, FIL_, + 0xCC, 0x87, FIL_, 0xC8, 0xAE, FIL_, 0xCC, 0x8C, + FIL_, 0xC7, 0x91, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xBB, 0x8C, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x94, + FIL_, 0xCC, 0x84, FIL_, 0xC5, 0x8C, FIL_, 0xCC, + 0x83, FIL_, 0xC3, 0x95, FIL_, 0xCC, 0x86, FIL_, + 0xC5, 0x8E, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x96, + FIL_, 0xCC, 0x8B, FIL_, 0xC5, 0x90, FIL_, 0xCC, + 0x89, FIL_, 0xE1, 0xBB, 0x8E, FIL_, 0x02, 0xCC, + 0x87, FIL_, 0xE1, 0xB9, 0x96, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0x94, FIL_, 0x08, 0xCC, 0x91, + FIL_, 0xC8, 0x92, FIL_, 0xCC, 0xA7, FIL_, 0xC5, + 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0x98, FIL_, + 0xCC, 0xB1, FIL_, 0xE1, 0xB9, 0x9E, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xB9, 0x9A, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0x98, FIL_, 0xCC, 0x81, FIL_, + 0xC5, 0x94, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x90, + FIL_, 0x07, 0xCC, 0x81, FIL_, 0xC5, 0x9A, FIL_, + 0xCC, 0x82, FIL_, 0xC5, 0x9C, FIL_, 0xCC, 0xA7, + FIL_, 0xC5, 0x9E, FIL_, 0xCC, 0x8C, FIL_, 0xC5, + 0xA0, FIL_, 0xCC, 0xA6, FIL_, 0xC8, 0x98, FIL_, + 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA0, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xB9, 0xA2, FIL_, 0x07, 0xCC, + 0x8C, FIL_, 0xC5, 0xA4, FIL_, 0xCC, 0xB1, FIL_, + 0xE1, 0xB9, 0xAE, FIL_, 0xCC, 0xA6, FIL_, 0xC8, + 0x9A, FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0xA2, FIL_, + 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xAA, FIL_, 0xCC, + 0xAD, FIL_, 0xE1, 0xB9, 0xB0, FIL_, 0xCC, 0xA3, + FIL_, 0xE1, 0xB9, 0xAC, FIL_, 0x13, 0xCC, 0xA8, + FIL_, 0xC5, 0xB2, FIL_, 0xCC, 0x83, FIL_, 0xC5, + 0xA8, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0xAA, FIL_, + 0xCC, 0x81, FIL_, 0xC3, 0x9A, FIL_, 0xCC, 0x86, + FIL_, 0xC5, 0xAC, FIL_, 0xCC, 0x8A, FIL_, 0xC5, + 0xAE, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x99, FIL_, + 0xCC, 0x91, FIL_, 0xC8, 0x96, FIL_, 0xCC, 0x8B, + FIL_, 0xC5, 0xB0, FIL_, 0xCC, 0xA4, FIL_, 0xE1, + 0xB9, 0xB2, FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB9, + 0xB4, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x94, FIL_, + 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB6, FIL_, 0xCC, + 0x9B, FIL_, 0xC6, 0xAF, FIL_, 0xCC, 0x82, FIL_, + 0xC3, 0x9B, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x9C, + FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x93, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xBB, 0xA4, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0xA6, FIL_, 0x02, 0xCC, 0x83, + FIL_, 0xE1, 0xB9, 0xBC, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xB9, 0xBE, FIL_, 0x06, 0xCC, 0x82, FIL_, + 0xC5, 0xB4, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xBA, + 0x84, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xBA, 0x86, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x88, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0x82, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBA, 0x80, FIL_, 0x02, 0xCC, + 0x87, FIL_, 0xE1, 0xBA, 0x8A, FIL_, 0xCC, 0x88, + FIL_, 0xE1, 0xBA, 0x8C, FIL_, 0x09, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0xB6, FIL_, 0xCC, 0x87, FIL_, + 0xE1, 0xBA, 0x8E, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xBB, 0xB4, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x9D, + FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xB2, FIL_, 0xCC, + 0x82, FIL_, 0xC5, 0xB6, FIL_, 0xCC, 0x88, FIL_, + 0xC5, 0xB8, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, + 0xB2, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xB8, + FIL_, 0x06, 0xCC, 0x87, FIL_, 0xC5, 0xBB, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x92, FIL_, 0xCC, + 0x8C, FIL_, 0xC5, 0xBD, FIL_, 0xCC, 0xB1, FIL_, + 0xE1, 0xBA, 0x94, FIL_, 0xCC, 0x82, FIL_, 0xE1, + 0xBA, 0x90, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0xB9, + FIL_, 0x10, 0xCC, 0x8C, FIL_, 0xC7, 0x8E, FIL_, + 0xCC, 0x8F, FIL_, 0xC8, 0x81, FIL_, 0xCC, 0xA8, + FIL_, 0xC4, 0x85, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xBA, 0xA1, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x83, + FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA3, FIL_, + 0xCC, 0x84, FIL_, 0xC4, 0x81, FIL_, 0xCC, 0x91, + FIL_, 0xC8, 0x83, FIL_, 0xCC, 0x8A, FIL_, 0xC3, + 0xA5, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0xA4, FIL_, + 0xCC, 0x83, FIL_, 0xC3, 0xA3, FIL_, 0xCC, 0x82, + FIL_, 0xC3, 0xA2, FIL_, 0xCC, 0x81, FIL_, 0xC3, + 0xA1, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xA0, FIL_, + 0xCC, 0x87, FIL_, 0xC8, 0xA7, FIL_, 0xCC, 0xA5, + FIL_, 0xE1, 0xB8, 0x81, FIL_, 0x03, 0xCC, 0xB1, + FIL_, 0xE1, 0xB8, 0x87, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xB8, 0x85, FIL_, 0xCC, 0x87, FIL_, 0xE1, + 0xB8, 0x83, FIL_, 0x05, 0xCC, 0x87, FIL_, 0xC4, + 0x8B, FIL_, 0xCC, 0xA7, FIL_, 0xC3, 0xA7, FIL_, + 0xCC, 0x82, FIL_, 0xC4, 0x89, FIL_, 0xCC, 0x8C, + FIL_, 0xC4, 0x8D, FIL_, 0xCC, 0x81, FIL_, 0xC4, + 0x87, FIL_, 0x06, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, + 0x93, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x8B, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0x8D, FIL_, + 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0x8F, FIL_, 0xCC, + 0xA7, FIL_, 0xE1, 0xB8, 0x91, FIL_, 0xCC, 0x8C, + FIL_, 0xC4, 0x8F, FIL_, 0x11, 0xCC, 0xA8, FIL_, + 0xC4, 0x99, FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x9B, + FIL_, 0xCC, 0x87, FIL_, 0xC4, 0x97, FIL_, 0xCC, + 0x88, FIL_, 0xC3, 0xAB, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xBA, 0xB9, FIL_, 0xCC, 0xB0, FIL_, 0xE1, + 0xB8, 0x9B, FIL_, 0xCC, 0x84, FIL_, 0xC4, 0x93, + FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x99, FIL_, + 0xCC, 0x83, FIL_, 0xE1, 0xBA, 0xBD, FIL_, 0xCC, + 0x86, FIL_, 0xC4, 0x95, FIL_, 0xCC, 0xA7, FIL_, + 0xC8, 0xA9, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, + 0xBB, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x85, FIL_, + 0xCC, 0x81, FIL_, 0xC3, 0xA9, FIL_, 0xCC, 0x91, + FIL_, 0xC8, 0x87, FIL_, 0xCC, 0x80, FIL_, 0xC3, + 0xA8, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xAA, FIL_, + 0x01, 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9F, FIL_, + 0x07, 0xCC, 0x86, FIL_, 0xC4, 0x9F, FIL_, 0xCC, + 0xA7, FIL_, 0xC4, 0xA3, FIL_, 0xCC, 0x81, FIL_, + 0xC7, 0xB5, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0x9D, + FIL_, 0xCC, 0x87, FIL_, 0xC4, 0xA1, FIL_, 0xCC, + 0x8C, FIL_, 0xC7, 0xA7, FIL_, 0xCC, 0x84, FIL_, + 0xE1, 0xB8, 0xA1, FIL_, 0x08, 0xCC, 0x8C, FIL_, + 0xC8, 0x9F, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0xA5, + FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA7, FIL_, + 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0xA3, FIL_, 0xCC, + 0xB1, FIL_, 0xE1, 0xBA, 0x96, FIL_, 0xCC, 0xA3, + FIL_, 0xE1, 0xB8, 0xA5, FIL_, 0xCC, 0xA7, FIL_, + 0xE1, 0xB8, 0xA9, FIL_, 0xCC, 0xAE, FIL_, 0xE1, + 0xB8, 0xAB, FIL_, 0x0E, 0xCC, 0x81, FIL_, 0xC3, + 0xAD, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xAC, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0x8B, FIL_, 0xCC, + 0x8C, FIL_, 0xC7, 0x90, FIL_, 0xCC, 0x89, FIL_, + 0xE1, 0xBB, 0x89, FIL_, 0xCC, 0x91, FIL_, 0xC8, + 0x8B, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x89, FIL_, + 0xCC, 0x82, FIL_, 0xC3, 0xAE, FIL_, 0xCC, 0xB0, + FIL_, 0xE1, 0xB8, 0xAD, FIL_, 0xCC, 0xA8, FIL_, + 0xC4, 0xAF, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0xAD, + FIL_, 0xCC, 0x84, FIL_, 0xC4, 0xAB, FIL_, 0xCC, + 0x83, FIL_, 0xC4, 0xA9, FIL_, 0xCC, 0x88, FIL_, + 0xC3, 0xAF, FIL_, 0x02, 0xCC, 0x82, FIL_, 0xC4, + 0xB5, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0xB0, FIL_, + 0x05, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0xB3, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xB1, FIL_, 0xCC, + 0xA7, FIL_, 0xC4, 0xB7, FIL_, 0xCC, 0x8C, FIL_, + 0xC7, 0xA9, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, + 0xB5, FIL_, 0x06, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0xB7, FIL_, 0xCC, 0x81, FIL_, 0xC4, 0xBA, FIL_, + 0xCC, 0xA7, FIL_, 0xC4, 0xBC, FIL_, 0xCC, 0x8C, + FIL_, 0xC4, 0xBE, FIL_, 0xCC, 0xB1, FIL_, 0xE1, + 0xB8, 0xBB, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, + 0xBD, FIL_, 0x03, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, + 0x83, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xBF, + FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x81, FIL_, + 0x09, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x87, FIL_, + 0xCC, 0x83, FIL_, 0xC3, 0xB1, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0x85, FIL_, 0xCC, 0xB1, FIL_, + 0xE1, 0xB9, 0x89, FIL_, 0xCC, 0x81, FIL_, 0xC5, + 0x84, FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x86, FIL_, + 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0x8B, FIL_, 0xCC, + 0x8C, FIL_, 0xC5, 0x88, FIL_, 0xCC, 0x80, FIL_, + 0xC7, 0xB9, FIL_, 0x10, 0xCC, 0x89, FIL_, 0xE1, + 0xBB, 0x8F, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0xB3, + FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xB2, FIL_, 0xCC, + 0x87, FIL_, 0xC8, 0xAF, FIL_, 0xCC, 0x8F, FIL_, + 0xC8, 0x8D, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, + 0x8D, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0x8D, FIL_, + 0xCC, 0x8C, FIL_, 0xC7, 0x92, FIL_, 0xCC, 0x86, + FIL_, 0xC5, 0x8F, FIL_, 0xCC, 0x8B, FIL_, 0xC5, + 0x91, FIL_, 0xCC, 0x9B, FIL_, 0xC6, 0xA1, FIL_, + 0xCC, 0x91, FIL_, 0xC8, 0x8F, FIL_, 0xCC, 0xA8, + FIL_, 0xC7, 0xAB, FIL_, 0xCC, 0x88, FIL_, 0xC3, + 0xB6, FIL_, 0xCC, 0x83, FIL_, 0xC3, 0xB5, FIL_, + 0xCC, 0x82, FIL_, 0xC3, 0xB4, FIL_, 0x02, 0xCC, + 0x87, FIL_, 0xE1, 0xB9, 0x97, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0x95, FIL_, 0x08, 0xCC, 0xB1, + FIL_, 0xE1, 0xB9, 0x9F, FIL_, 0xCC, 0x87, FIL_, + 0xE1, 0xB9, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC5, + 0x95, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x91, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x9B, FIL_, 0xCC, + 0x8C, FIL_, 0xC5, 0x99, FIL_, 0xCC, 0x91, FIL_, + 0xC8, 0x93, FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x97, + FIL_, 0x07, 0xCC, 0xA6, FIL_, 0xC8, 0x99, FIL_, + 0xCC, 0x8C, FIL_, 0xC5, 0xA1, FIL_, 0xCC, 0x81, + FIL_, 0xC5, 0x9B, FIL_, 0xCC, 0x87, FIL_, 0xE1, + 0xB9, 0xA1, FIL_, 0xCC, 0x82, FIL_, 0xC5, 0x9D, + FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x9F, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xB9, 0xA3, FIL_, 0x08, 0xCC, + 0x88, FIL_, 0xE1, 0xBA, 0x97, FIL_, 0xCC, 0xAD, + FIL_, 0xE1, 0xB9, 0xB1, FIL_, 0xCC, 0xB1, FIL_, + 0xE1, 0xB9, 0xAF, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xB9, 0xAD, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0xA5, + FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0xA3, FIL_, 0xCC, + 0x87, FIL_, 0xE1, 0xB9, 0xAB, FIL_, 0xCC, 0xA6, + FIL_, 0xC8, 0x9B, FIL_, 0x13, 0xCC, 0x81, FIL_, + 0xC3, 0xBA, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x97, + FIL_, 0xCC, 0x83, FIL_, 0xC5, 0xA9, FIL_, 0xCC, + 0x8F, FIL_, 0xC8, 0x95, FIL_, 0xCC, 0xA8, FIL_, + 0xC5, 0xB3, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xBB, + FIL_, 0xCC, 0x88, FIL_, 0xC3, 0xBC, FIL_, 0xCC, + 0x80, FIL_, 0xC3, 0xB9, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xBB, 0xA5, FIL_, 0xCC, 0xA4, FIL_, 0xE1, + 0xB9, 0xB3, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, + 0xA7, FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB9, 0xB5, + FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB7, FIL_, + 0xCC, 0x9B, FIL_, 0xC6, 0xB0, FIL_, 0xCC, 0x84, + FIL_, 0xC5, 0xAB, FIL_, 0xCC, 0x8B, FIL_, 0xC5, + 0xB1, FIL_, 0xCC, 0x86, FIL_, 0xC5, 0xAD, FIL_, + 0xCC, 0x8C, FIL_, 0xC7, 0x94, FIL_, 0xCC, 0x8A, + FIL_, 0xC5, 0xAF, FIL_, 0x02, 0xCC, 0x83, FIL_, + 0xE1, 0xB9, 0xBD, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xB9, 0xBF, FIL_, 0x07, 0xCC, 0x82, FIL_, 0xC5, + 0xB5, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0x81, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0x83, FIL_, + 0xCC, 0x88, FIL_, 0xE1, 0xBA, 0x85, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xBA, 0x89, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xBA, 0x87, FIL_, 0xCC, 0x8A, FIL_, + 0xE1, 0xBA, 0x98, FIL_, 0x02, 0xCC, 0x87, FIL_, + 0xE1, 0xBA, 0x8B, FIL_, 0xCC, 0x88, FIL_, 0xE1, + 0xBA, 0x8D, FIL_, 0x0A, 0xCC, 0x87, FIL_, 0xE1, + 0xBA, 0x8F, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, + 0xB9, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xB3, + FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0xB7, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xB5, FIL_, 0xCC, + 0x82, FIL_, 0xC5, 0xB7, FIL_, 0xCC, 0x84, FIL_, + 0xC8, 0xB3, FIL_, 0xCC, 0x8A, FIL_, 0xE1, 0xBA, + 0x99, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0xBF, FIL_, + 0xCC, 0x81, FIL_, 0xC3, 0xBD, FIL_, 0x06, 0xCC, + 0x8C, FIL_, 0xC5, 0xBE, FIL_, 0xCC, 0x87, FIL_, + 0xC5, 0xBC, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xBA, + 0x95, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x93, + FIL_, 0xCC, 0x81, FIL_, 0xC5, 0xBA, FIL_, 0xCC, + 0x82, FIL_, 0xE1, 0xBA, 0x91, FIL_, 0x03, 0xCC, + 0x80, FIL_, 0xE1, 0xBF, 0xAD, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBF, 0x81, FIL_, 0xCC, 0x81, FIL_, + 0xCE, 0x85, FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, + 0xBA, 0xA8, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBA, + 0xAA, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xA4, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xA6, FIL_, + 0x01, 0xCC, 0x84, FIL_, 0xC7, 0x9E, FIL_, 0x01, + 0xCC, 0x81, FIL_, 0xC7, 0xBA, FIL_, 0x02, 0xCC, + 0x84, FIL_, 0xC7, 0xA2, FIL_, 0xCC, 0x81, FIL_, + 0xC7, 0xBC, FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, + 0xB8, 0x88, FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, + 0xBA, 0xBE, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, + 0x80, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0x84, + FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x82, FIL_, + 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xAE, FIL_, + 0x04, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0x96, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x90, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBB, 0x92, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0x94, FIL_, 0x03, 0xCC, 0x84, + FIL_, 0xC8, 0xAC, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xB9, 0x8C, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB9, + 0x8E, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAA, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xC7, 0xBE, FIL_, + 0x04, 0xCC, 0x80, FIL_, 0xC7, 0x9B, FIL_, 0xCC, + 0x84, FIL_, 0xC7, 0x95, FIL_, 0xCC, 0x8C, FIL_, + 0xC7, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC7, 0x97, + FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA9, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xA7, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xA5, FIL_, 0xCC, + 0x83, FIL_, 0xE1, 0xBA, 0xAB, FIL_, 0x01, 0xCC, + 0x84, FIL_, 0xC7, 0x9F, FIL_, 0x01, 0xCC, 0x81, + FIL_, 0xC7, 0xBB, FIL_, 0x02, 0xCC, 0x84, FIL_, + 0xC7, 0xA3, FIL_, 0xCC, 0x81, FIL_, 0xC7, 0xBD, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x89, + FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x83, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xBF, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0x81, FIL_, 0xCC, + 0x83, FIL_, 0xE1, 0xBB, 0x85, FIL_, 0x01, 0xCC, + 0x81, FIL_, 0xE1, 0xB8, 0xAF, FIL_, 0x04, 0xCC, + 0x83, FIL_, 0xE1, 0xBB, 0x97, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0x95, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBB, 0x93, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xBB, 0x91, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, + 0xB9, 0x8D, FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xAD, + FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB9, 0x8F, FIL_, + 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAB, FIL_, 0x01, + 0xCC, 0x81, FIL_, 0xC7, 0xBF, FIL_, 0x04, 0xCC, + 0x81, FIL_, 0xC7, 0x98, FIL_, 0xCC, 0x84, FIL_, + 0xC7, 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x9A, + FIL_, 0xCC, 0x80, FIL_, 0xC7, 0x9C, FIL_, 0x04, + 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xB0, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBA, 0xAE, FIL_, 0xCC, 0x83, + FIL_, 0xE1, 0xBA, 0xB4, FIL_, 0xCC, 0x89, FIL_, + 0xE1, 0xBA, 0xB2, FIL_, 0x04, 0xCC, 0x80, FIL_, + 0xE1, 0xBA, 0xB1, FIL_, 0xCC, 0x83, FIL_, 0xE1, + 0xBA, 0xB5, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, + 0xAF, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xB3, + FIL_, 0x02, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x96, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x94, FIL_, + 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x95, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x97, FIL_, 0x02, + 0xCC, 0x80, FIL_, 0xE1, 0xB9, 0x90, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xB9, 0x92, FIL_, 0x02, 0xCC, + 0x80, FIL_, 0xE1, 0xB9, 0x91, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0x93, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA4, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA5, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA6, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA7, FIL_, 0x01, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0xB8, FIL_, 0x01, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0xB9, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xE1, 0xB9, 0xBA, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xE1, 0xB9, 0xBB, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xBA, 0x9B, FIL_, 0x05, 0xCC, 0x80, + FIL_, 0xE1, 0xBB, 0x9C, FIL_, 0xCC, 0x81, FIL_, + 0xE1, 0xBB, 0x9A, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xBB, 0xA2, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, + 0xA0, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x9E, + FIL_, 0x05, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xA1, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x9B, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xA3, FIL_, 0xCC, + 0x89, FIL_, 0xE1, 0xBB, 0x9F, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBB, 0x9D, FIL_, 0x05, 0xCC, 0x83, + FIL_, 0xE1, 0xBB, 0xAE, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xBB, 0xB0, FIL_, 0xCC, 0x89, FIL_, 0xE1, + 0xBB, 0xAC, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, + 0xA8, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xAA, + FIL_, 0x05, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xB1, + FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xAF, FIL_, + 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0xAD, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBB, 0xA9, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBB, 0xAB, FIL_, 0x01, 0xCC, 0x8C, + FIL_, 0xC7, 0xAE, FIL_, 0x01, 0xCC, 0x84, FIL_, + 0xC7, 0xAC, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, + 0xAD, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA0, + FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA1, FIL_, + 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9C, FIL_, + 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9D, FIL_, + 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xB0, FIL_, 0x01, + 0xCC, 0x84, FIL_, 0xC8, 0xB1, FIL_, 0x01, 0xCC, + 0x8C, FIL_, 0xC7, 0xAF, FIL_, 0x07, 0xCC, 0x93, + FIL_, 0xE1, 0xBC, 0x88, FIL_, 0xCC, 0x94, FIL_, + 0xE1, 0xBC, 0x89, FIL_, 0xCC, 0x81, FIL_, 0xCE, + 0x86, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xBC, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBE, 0xBA, FIL_, + 0xCC, 0x84, FIL_, 0xE1, 0xBE, 0xB9, FIL_, 0xCC, + 0x86, FIL_, 0xE1, 0xBE, 0xB8, FIL_, 0x04, 0xCC, + 0x81, FIL_, 0xCE, 0x88, FIL_, 0xCC, 0x94, FIL_, + 0xE1, 0xBC, 0x99, FIL_, 0xCC, 0x93, FIL_, 0xE1, + 0xBC, 0x98, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, + 0x88, FIL_, 0x05, 0xCC, 0x94, FIL_, 0xE1, 0xBC, + 0xA9, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x8A, + FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x89, FIL_, 0xCD, + 0x85, FIL_, 0xE1, 0xBF, 0x8C, FIL_, 0xCC, 0x93, + FIL_, 0xE1, 0xBC, 0xA8, FIL_, 0x07, 0xCC, 0x81, + FIL_, 0xCE, 0x8A, FIL_, 0xCC, 0x88, FIL_, 0xCE, + 0xAA, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0x98, + FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xBF, 0x99, FIL_, + 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0xB8, FIL_, 0xCC, + 0x94, FIL_, 0xE1, 0xBC, 0xB9, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBF, 0x9A, FIL_, 0x04, 0xCC, 0x94, + FIL_, 0xE1, 0xBD, 0x89, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBF, 0xB8, FIL_, 0xCC, 0x81, FIL_, 0xCE, + 0x8C, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, 0x88, + FIL_, 0x01, 0xCC, 0x94, FIL_, 0xE1, 0xBF, 0xAC, + FIL_, 0x06, 0xCC, 0x81, FIL_, 0xCE, 0x8E, FIL_, + 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0xA8, FIL_, 0xCC, + 0x94, FIL_, 0xE1, 0xBD, 0x99, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBF, 0xAA, FIL_, 0xCC, 0x84, FIL_, + 0xE1, 0xBF, 0xA9, FIL_, 0xCC, 0x88, FIL_, 0xCE, + 0xAB, FIL_, 0x05, 0xCC, 0x80, FIL_, 0xE1, 0xBF, + 0xBA, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x8F, FIL_, + 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xBC, FIL_, 0xCC, + 0x94, FIL_, 0xE1, 0xBD, 0xA9, FIL_, 0xCC, 0x93, + FIL_, 0xE1, 0xBD, 0xA8, FIL_, 0x01, 0xCD, 0x85, + FIL_, 0xE1, 0xBE, 0xB4, FIL_, 0x01, 0xCD, 0x85, + FIL_, 0xE1, 0xBF, 0x84, FIL_, 0x08, 0xCC, 0x81, + FIL_, 0xCE, 0xAC, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBD, 0xB0, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, + 0x80, FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0x81, + FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBE, 0xB6, FIL_, + 0xCC, 0x86, FIL_, 0xE1, 0xBE, 0xB0, FIL_, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xB3, FIL_, 0xCC, 0x84, + FIL_, 0xE1, 0xBE, 0xB1, FIL_, 0x04, 0xCC, 0x81, + FIL_, 0xCE, 0xAD, FIL_, 0xCC, 0x94, FIL_, 0xE1, + 0xBC, 0x91, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, + 0xB2, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0x90, + FIL_, 0x06, 0xCC, 0x81, FIL_, 0xCE, 0xAE, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xB4, FIL_, 0xCD, + 0x85, FIL_, 0xE1, 0xBF, 0x83, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBF, 0x86, FIL_, 0xCC, 0x94, FIL_, + 0xE1, 0xBC, 0xA1, FIL_, 0xCC, 0x93, FIL_, 0xE1, + 0xBC, 0xA0, FIL_, 0x08, 0xCD, 0x82, FIL_, 0xE1, + 0xBF, 0x96, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, + 0x90, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0xB0, + FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAF, FIL_, 0xCC, + 0x94, FIL_, 0xE1, 0xBC, 0xB1, FIL_, 0xCC, 0x84, + FIL_, 0xE1, 0xBF, 0x91, FIL_, 0xCC, 0x88, FIL_, + 0xCF, 0x8A, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, + 0xB6, FIL_, 0x04, 0xCC, 0x81, FIL_, 0xCF, 0x8C, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xB8, FIL_, + 0xCC, 0x93, FIL_, 0xE1, 0xBD, 0x80, FIL_, 0xCC, + 0x94, FIL_, 0xE1, 0xBD, 0x81, FIL_, 0x02, 0xCC, + 0x93, FIL_, 0xE1, 0xBF, 0xA4, FIL_, 0xCC, 0x94, + FIL_, 0xE1, 0xBF, 0xA5, FIL_, 0x08, 0xCC, 0x93, + FIL_, 0xE1, 0xBD, 0x90, FIL_, 0xCC, 0x94, FIL_, + 0xE1, 0xBD, 0x91, FIL_, 0xCC, 0x86, FIL_, 0xE1, + 0xBF, 0xA0, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, + 0xA6, FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xBF, 0xA1, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xBA, FIL_, + 0xCC, 0x81, FIL_, 0xCF, 0x8D, FIL_, 0xCC, 0x88, + FIL_, 0xCF, 0x8B, FIL_, 0x06, 0xCC, 0x94, FIL_, + 0xE1, 0xBD, 0xA1, FIL_, 0xCD, 0x85, FIL_, 0xE1, + 0xBF, 0xB3, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, + 0xBC, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0xB6, + FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, 0xA0, FIL_, + 0xCC, 0x81, FIL_, 0xCF, 0x8E, FIL_, 0x03, 0xCD, + 0x82, FIL_, 0xE1, 0xBF, 0x97, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBF, 0x92, FIL_, 0xCC, 0x81, FIL_, + 0xCE, 0x90, FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, + 0xBF, 0xA2, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xB0, + FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0xA7, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB4, FIL_, + 0x02, 0xCC, 0x88, FIL_, 0xCF, 0x94, FIL_, 0xCC, + 0x81, FIL_, 0xCF, 0x93, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xD0, 0x87, FIL_, 0x02, 0xCC, 0x86, FIL_, + 0xD3, 0x90, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x92, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x83, FIL_, + 0x03, 0xCC, 0x86, FIL_, 0xD3, 0x96, FIL_, 0xCC, + 0x80, FIL_, 0xD0, 0x80, FIL_, 0xCC, 0x88, FIL_, + 0xD0, 0x81, FIL_, 0x02, 0xCC, 0x88, FIL_, 0xD3, + 0x9C, FIL_, 0xCC, 0x86, FIL_, 0xD3, 0x81, FIL_, + 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9E, FIL_, 0x04, + 0xCC, 0x80, FIL_, 0xD0, 0x8D, FIL_, 0xCC, 0x88, + FIL_, 0xD3, 0xA4, FIL_, 0xCC, 0x86, FIL_, 0xD0, + 0x99, FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xA2, FIL_, + 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x8C, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xA6, FIL_, 0x04, 0xCC, + 0x86, FIL_, 0xD0, 0x8E, FIL_, 0xCC, 0x8B, FIL_, + 0xD3, 0xB2, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0xB0, + FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xAE, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xB4, FIL_, 0x01, 0xCC, + 0x88, FIL_, 0xD3, 0xB8, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xD3, 0xAC, FIL_, 0x02, 0xCC, 0x86, FIL_, + 0xD3, 0x91, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x93, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x93, FIL_, + 0x03, 0xCC, 0x80, FIL_, 0xD1, 0x90, FIL_, 0xCC, + 0x88, FIL_, 0xD1, 0x91, FIL_, 0xCC, 0x86, FIL_, + 0xD3, 0x97, FIL_, 0x02, 0xCC, 0x88, FIL_, 0xD3, + 0x9D, FIL_, 0xCC, 0x86, FIL_, 0xD3, 0x82, FIL_, + 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9F, FIL_, 0x04, + 0xCC, 0x88, FIL_, 0xD3, 0xA5, FIL_, 0xCC, 0x86, + FIL_, 0xD0, 0xB9, FIL_, 0xCC, 0x80, FIL_, 0xD1, + 0x9D, FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xA3, FIL_, + 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x9C, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xA7, FIL_, 0x04, 0xCC, + 0x84, FIL_, 0xD3, 0xAF, FIL_, 0xCC, 0x86, FIL_, + 0xD1, 0x9E, FIL_, 0xCC, 0x8B, FIL_, 0xD3, 0xB3, + FIL_, 0xCC, 0x88, FIL_, 0xD3, 0xB1, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xB5, FIL_, 0x01, 0xCC, + 0x88, FIL_, 0xD3, 0xB9, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xD3, 0xAD, FIL_, 0x01, 0xCC, 0x88, FIL_, + 0xD1, 0x97, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, + 0xB6, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, 0xB7, + FIL_, 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9A, FIL_, + 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9B, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xAA, FIL_, 0x01, 0xCC, + 0x88, FIL_, 0xD3, 0xAB, FIL_, 0x03, 0xD9, 0x94, + FIL_, 0xD8, 0xA3, FIL_, 0xD9, 0x93, FIL_, 0xD8, + 0xA2, FIL_, 0xD9, 0x95, FIL_, 0xD8, 0xA5, FIL_, + 0x01, 0xD9, 0x94, FIL_, 0xD8, 0xA4, FIL_, 0x01, + 0xD9, 0x94, FIL_, 0xD8, 0xA6, FIL_, 0x01, 0xD9, + 0x94, FIL_, 0xDB, 0x82, FIL_, 0x01, 0xD9, 0x94, + FIL_, 0xDB, 0x93, FIL_, 0x01, 0xD9, 0x94, FIL_, + 0xDB, 0x80, FIL_, 0x01, 0xE0, 0xA4, 0xBC, FIL_, + 0xE0, 0xA4, 0xA9, FIL_, 0x01, 0xE0, 0xA4, 0xBC, + FIL_, 0xE0, 0xA4, 0xB1, FIL_, 0x01, 0xE0, 0xA4, + 0xBC, FIL_, 0xE0, 0xA4, 0xB4, FIL_, 0x02, 0xE0, + 0xA6, 0xBE, FIL_, 0xE0, 0xA7, 0x8B, FIL_, 0xE0, + 0xA7, 0x97, FIL_, 0xE0, 0xA7, 0x8C, FIL_, 0x03, + 0xE0, 0xAD, 0x97, FIL_, 0xE0, 0xAD, 0x8C, FIL_, + 0xE0, 0xAC, 0xBE, FIL_, 0xE0, 0xAD, 0x8B, FIL_, + 0xE0, 0xAD, 0x96, FIL_, 0xE0, 0xAD, 0x88, FIL_, + 0x01, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAE, 0x94, + FIL_, 0x02, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, 0xAF, + 0x8A, FIL_, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAF, + 0x8C, FIL_, 0x01, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, + 0xAF, 0x8B, FIL_, 0x01, 0xE0, 0xB1, 0x96, FIL_, + 0xE0, 0xB1, 0x88, FIL_, 0x01, 0xE0, 0xB3, 0x95, + FIL_, 0xE0, 0xB3, 0x80, FIL_, 0x03, 0xE0, 0xB3, + 0x95, FIL_, 0xE0, 0xB3, 0x87, FIL_, 0xE0, 0xB3, + 0x82, FIL_, 0xE0, 0xB3, 0x8A, FIL_, 0xE0, 0xB3, + 0x96, FIL_, 0xE0, 0xB3, 0x88, FIL_, 0x01, 0xE0, + 0xB3, 0x95, FIL_, 0xE0, 0xB3, 0x8B, FIL_, 0x02, + 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8A, FIL_, + 0xE0, 0xB5, 0x97, FIL_, 0xE0, 0xB5, 0x8C, FIL_, + 0x01, 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8B, + FIL_, 0x03, 0xE0, 0xB7, 0x8F, FIL_, 0xE0, 0xB7, + 0x9C, FIL_, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, 0xB7, + 0x9A, FIL_, 0xE0, 0xB7, 0x9F, FIL_, 0xE0, 0xB7, + 0x9E, FIL_, 0x01, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, + 0xB7, 0x9D, FIL_, 0x01, 0xE1, 0x80, 0xAE, FIL_, + 0xE1, 0x80, 0xA6, FIL_, 0x01, 0xCC, 0x84, FIL_, + 0xE1, 0xB8, 0xB8, FIL_, 0x01, 0xCC, 0x84, FIL_, + 0xE1, 0xB8, 0xB9, FIL_, 0x01, 0xCC, 0x84, FIL_, + 0xE1, 0xB9, 0x9C, FIL_, 0x01, 0xCC, 0x84, FIL_, + 0xE1, 0xB9, 0x9D, FIL_, 0x01, 0xCC, 0x87, FIL_, + 0xE1, 0xB9, 0xA8, FIL_, 0x01, 0xCC, 0x87, FIL_, + 0xE1, 0xB9, 0xA9, FIL_, 0x02, 0xCC, 0x86, FIL_, + 0xE1, 0xBA, 0xB6, FIL_, 0xCC, 0x82, FIL_, 0xE1, + 0xBA, 0xAC, FIL_, 0x02, 0xCC, 0x86, FIL_, 0xE1, + 0xBA, 0xB7, FIL_, 0xCC, 0x82, FIL_, 0xE1, 0xBA, + 0xAD, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, + 0x86, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, + 0x87, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, + 0x98, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, + 0x99, FIL_, 0x04, 0xCC, 0x80, FIL_, 0xE1, 0xBC, + 0x82, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x84, + FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x80, FIL_, + 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0x86, FIL_, 0x04, + 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0x87, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBC, 0x83, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xBC, 0x85, FIL_, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x81, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x82, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x83, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x84, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x85, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x86, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x87, FIL_, 0x04, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x88, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBC, 0x8A, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, + 0x8E, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x8C, + FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x8D, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x8B, FIL_, + 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0x8F, FIL_, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x89, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x8A, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x8B, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x8C, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x8D, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x8E, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x8F, FIL_, 0x02, 0xCC, + 0x80, FIL_, 0xE1, 0xBC, 0x92, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xBC, 0x94, FIL_, 0x02, 0xCC, 0x80, + FIL_, 0xE1, 0xBC, 0x93, FIL_, 0xCC, 0x81, FIL_, + 0xE1, 0xBC, 0x95, FIL_, 0x02, 0xCC, 0x80, FIL_, + 0xE1, 0xBC, 0x9A, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xBC, 0x9C, FIL_, 0x02, 0xCC, 0x80, FIL_, 0xE1, + 0xBC, 0x9B, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, + 0x9D, FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBC, + 0xA6, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x90, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xA4, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xA2, FIL_, 0x04, + 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xA3, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBC, 0xA5, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBC, 0xA7, FIL_, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x91, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x92, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x93, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x94, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x95, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x96, FIL_, 0x01, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0x97, FIL_, 0x04, 0xCD, 0x82, FIL_, + 0xE1, 0xBC, 0xAE, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xBC, 0xAC, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, + 0x98, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xAA, + FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xAF, + FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x99, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xAD, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBC, 0xAB, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x9A, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x9B, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x9C, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x9D, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x9E, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0x9F, FIL_, 0x03, 0xCC, + 0x81, FIL_, 0xE1, 0xBC, 0xB4, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBC, 0xB6, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBC, 0xB2, FIL_, 0x03, 0xCC, 0x81, FIL_, + 0xE1, 0xBC, 0xB5, FIL_, 0xCD, 0x82, FIL_, 0xE1, + 0xBC, 0xB7, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, + 0xB3, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xBC, + 0xBC, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xBA, + FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xBE, FIL_, + 0x03, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xBB, FIL_, + 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xBF, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBC, 0xBD, FIL_, 0x02, 0xCC, + 0x80, FIL_, 0xE1, 0xBD, 0x82, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xBD, 0x84, FIL_, 0x02, 0xCC, 0x80, + FIL_, 0xE1, 0xBD, 0x83, FIL_, 0xCC, 0x81, FIL_, + 0xE1, 0xBD, 0x85, FIL_, 0x02, 0xCC, 0x81, FIL_, + 0xE1, 0xBD, 0x8C, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBD, 0x8A, FIL_, 0x02, 0xCC, 0x81, FIL_, 0xE1, + 0xBD, 0x8D, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, + 0x8B, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xBD, + 0x94, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0x96, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x92, FIL_, + 0x03, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0x97, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x95, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBD, 0x93, FIL_, 0x03, 0xCC, + 0x81, FIL_, 0xE1, 0xBD, 0x9D, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBD, 0x9F, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBD, 0x9B, FIL_, 0x04, 0xCC, 0x81, FIL_, + 0xE1, 0xBD, 0xA4, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBD, 0xA2, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, + 0xA6, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA0, + FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xA7, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0xA5, FIL_, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA1, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBD, 0xA3, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA2, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA3, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA4, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA5, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA6, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA7, FIL_, 0x04, 0xCC, + 0x81, FIL_, 0xE1, 0xBD, 0xAC, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBD, 0xAA, FIL_, 0xCD, 0x82, FIL_, + 0xE1, 0xBD, 0xAE, FIL_, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xA8, FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, + 0xBD, 0xAD, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, + 0xA9, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xAF, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xAB, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAA, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAB, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAC, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAD, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAE, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAF, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xB2, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0x82, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB2, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xB7, FIL_, + 0x03, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0x8F, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x8D, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBF, 0x8E, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBF, 0x87, FIL_, 0x01, 0xCD, + 0x85, FIL_, 0xE1, 0xBF, 0xB7, FIL_, 0x03, 0xCC, + 0x80, FIL_, 0xE1, 0xBF, 0x9D, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBF, 0x9F, FIL_, 0xCC, 0x81, FIL_, + 0xE1, 0xBF, 0x9E, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x86, 0x9A, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x86, 0x9B, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x86, 0xAE, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x87, 0x8D, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x87, 0x8F, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x87, 0x8E, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x88, 0x84, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x88, 0x89, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x88, 0x8C, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x88, 0xA4, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x88, 0xA6, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0x81, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0x84, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0x87, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0x89, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xAD, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xA2, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xB0, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xB1, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xB4, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xB5, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xB8, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x89, 0xB9, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0x80, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0x81, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xA0, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xA1, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0x84, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0x85, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0x88, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0x89, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xA2, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xA3, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0xAC, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0xAD, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0xAE, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8A, 0xAF, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xAA, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xAB, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xAC, FIL_, 0x01, 0xCC, 0xB8, FIL_, + 0xE2, 0x8B, 0xAD, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x82, 0x94, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x81, 0x8C, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x81, 0x8E, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x90, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x92, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, + 0x94, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x81, 0x96, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x81, 0x98, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x81, 0x9A, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x81, 0x9C, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x81, 0x9E, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xA0, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xA2, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, + 0xA5, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x81, 0xA7, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x81, 0xA9, FIL_, 0x02, 0xE3, 0x82, 0x9A, + FIL_, 0xE3, 0x81, 0xB1, FIL_, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x81, 0xB0, FIL_, 0x02, 0xE3, 0x82, + 0x9A, FIL_, 0xE3, 0x81, 0xB4, FIL_, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x81, 0xB3, FIL_, 0x02, 0xE3, + 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xB7, FIL_, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB6, FIL_, 0x02, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB9, FIL_, + 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xBA, FIL_, + 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xBC, + FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xBD, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, + 0x9E, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x83, 0xB4, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x82, 0xAC, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x82, 0xAE, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x82, 0xB0, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB2, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB4, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB6, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, + 0xB8, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x82, 0xBA, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x82, 0xBC, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x82, 0xBE, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x83, 0x80, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x83, 0x82, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x85, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x87, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, + 0x89, FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x83, 0x90, FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, + 0x83, 0x91, FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x83, 0x93, FIL_, 0xE3, 0x82, 0x9A, FIL_, + 0xE3, 0x83, 0x94, FIL_, 0x02, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x83, 0x96, FIL_, 0xE3, 0x82, 0x9A, + FIL_, 0xE3, 0x83, 0x97, FIL_, 0x02, 0xE3, 0x82, + 0x9A, FIL_, 0xE3, 0x83, 0x9A, FIL_, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x83, 0x99, FIL_, 0x02, 0xE3, + 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x9D, FIL_, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x83, 0x9C, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0xB7, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0xB8, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, + 0xB9, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x83, 0xBA, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x83, 0xBE, FIL_, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + }, + { + 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_, + 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA0, FIL_, + 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAF, FIL_, + 0x10, 0xCC, 0xA5, FIL_, 0xE1, 0xB8, 0x80, FIL_, + 0xCC, 0x87, FIL_, 0xC8, 0xA6, FIL_, 0xCC, 0x83, + FIL_, 0xC3, 0x83, FIL_, 0xCC, 0x91, FIL_, 0xC8, + 0x82, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x80, FIL_, + 0xCC, 0x8A, FIL_, 0xC3, 0x85, FIL_, 0xCC, 0x88, + FIL_, 0xC3, 0x84, FIL_, 0xCC, 0x89, FIL_, 0xE1, + 0xBA, 0xA2, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, + 0xA0, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x8D, FIL_, + 0xCC, 0x80, FIL_, 0xC3, 0x80, FIL_, 0xCC, 0x81, + FIL_, 0xC3, 0x81, FIL_, 0xCC, 0x82, FIL_, 0xC3, + 0x82, FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x84, FIL_, + 0xCC, 0x86, FIL_, 0xC4, 0x82, FIL_, 0xCC, 0x84, + FIL_, 0xC4, 0x80, FIL_, 0x03, 0xCC, 0xB1, FIL_, + 0xE1, 0xB8, 0x86, FIL_, 0xCC, 0x87, FIL_, 0xE1, + 0xB8, 0x82, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0x84, FIL_, 0x05, 0xCC, 0xA7, FIL_, 0xC3, 0x87, + FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x8C, FIL_, 0xCC, + 0x81, FIL_, 0xC4, 0x86, FIL_, 0xCC, 0x82, FIL_, + 0xC4, 0x88, FIL_, 0xCC, 0x87, FIL_, 0xC4, 0x8A, + FIL_, 0x06, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0x90, + FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x8E, FIL_, 0xCC, + 0xB1, FIL_, 0xE1, 0xB8, 0x8E, FIL_, 0xCC, 0xAD, + FIL_, 0xE1, 0xB8, 0x92, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xB8, 0x8C, FIL_, 0xCC, 0x87, FIL_, 0xE1, + 0xB8, 0x8A, FIL_, 0x11, 0xCC, 0x84, FIL_, 0xC4, + 0x92, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x94, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0xB8, FIL_, 0xCC, + 0x91, FIL_, 0xC8, 0x86, FIL_, 0xCC, 0x82, FIL_, + 0xC3, 0x8A, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x84, + FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x98, FIL_, + 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xBA, FIL_, 0xCC, + 0xA7, FIL_, 0xC8, 0xA8, FIL_, 0xCC, 0x8C, FIL_, + 0xC4, 0x9A, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x88, + FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x98, FIL_, 0xCC, + 0x83, FIL_, 0xE1, 0xBA, 0xBC, FIL_, 0xCC, 0x87, + FIL_, 0xC4, 0x96, FIL_, 0xCC, 0x81, FIL_, 0xC3, + 0x89, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x8B, FIL_, + 0xCC, 0xB0, FIL_, 0xE1, 0xB8, 0x9A, FIL_, 0x01, + 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9E, FIL_, 0x07, + 0xCC, 0x8C, FIL_, 0xC7, 0xA6, FIL_, 0xCC, 0x86, + FIL_, 0xC4, 0x9E, FIL_, 0xCC, 0x82, FIL_, 0xC4, + 0x9C, FIL_, 0xCC, 0xA7, FIL_, 0xC4, 0xA2, FIL_, + 0xCC, 0x84, FIL_, 0xE1, 0xB8, 0xA0, FIL_, 0xCC, + 0x81, FIL_, 0xC7, 0xB4, FIL_, 0xCC, 0x87, FIL_, + 0xC4, 0xA0, FIL_, 0x07, 0xCC, 0x87, FIL_, 0xE1, + 0xB8, 0xA2, FIL_, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, + 0xA8, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0xA4, FIL_, + 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA6, FIL_, 0xCC, + 0x8C, FIL_, 0xC8, 0x9E, FIL_, 0xCC, 0xAE, FIL_, + 0xE1, 0xB8, 0xAA, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xB8, 0xA4, FIL_, 0x0F, 0xCC, 0xB0, FIL_, 0xE1, + 0xB8, 0xAC, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x8F, + FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x8C, FIL_, 0xCC, + 0x89, FIL_, 0xE1, 0xBB, 0x88, FIL_, 0xCC, 0xA3, + FIL_, 0xE1, 0xBB, 0x8A, FIL_, 0xCC, 0x91, FIL_, + 0xC8, 0x8A, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x8F, + FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x8E, FIL_, 0xCC, + 0x81, FIL_, 0xC3, 0x8D, FIL_, 0xCC, 0x83, FIL_, + 0xC4, 0xA8, FIL_, 0xCC, 0x87, FIL_, 0xC4, 0xB0, + FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x88, FIL_, 0xCC, + 0xA8, FIL_, 0xC4, 0xAE, FIL_, 0xCC, 0x86, FIL_, + 0xC4, 0xAC, FIL_, 0xCC, 0x84, FIL_, 0xC4, 0xAA, + FIL_, 0x01, 0xCC, 0x82, FIL_, 0xC4, 0xB4, FIL_, + 0x05, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xB0, FIL_, + 0xCC, 0x8C, FIL_, 0xC7, 0xA8, FIL_, 0xCC, 0xB1, + FIL_, 0xE1, 0xB8, 0xB4, FIL_, 0xCC, 0xA7, FIL_, + 0xC4, 0xB6, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0xB2, FIL_, 0x06, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0xB6, FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0xBD, FIL_, + 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0xBC, FIL_, 0xCC, + 0xB1, FIL_, 0xE1, 0xB8, 0xBA, FIL_, 0xCC, 0xA7, + FIL_, 0xC4, 0xBB, FIL_, 0xCC, 0x81, FIL_, 0xC4, + 0xB9, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xB8, + 0xBE, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x80, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x82, FIL_, + 0x09, 0xCC, 0x83, FIL_, 0xC3, 0x91, FIL_, 0xCC, + 0x81, FIL_, 0xC5, 0x83, FIL_, 0xCC, 0xA7, FIL_, + 0xC5, 0x85, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0x87, + FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x84, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x86, FIL_, 0xCC, + 0xB1, FIL_, 0xE1, 0xB9, 0x88, FIL_, 0xCC, 0xAD, + FIL_, 0xE1, 0xB9, 0x8A, FIL_, 0xCC, 0x80, FIL_, + 0xC7, 0xB8, FIL_, 0x10, 0xCC, 0x89, FIL_, 0xE1, + 0xBB, 0x8E, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0x8C, + FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x94, FIL_, 0xCC, + 0x86, FIL_, 0xC5, 0x8E, FIL_, 0xCC, 0x83, FIL_, + 0xC3, 0x95, FIL_, 0xCC, 0x8B, FIL_, 0xC5, 0x90, + FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x96, FIL_, 0xCC, + 0x9B, FIL_, 0xC6, 0xA0, FIL_, 0xCC, 0x91, FIL_, + 0xC8, 0x8E, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x91, + FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x8C, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xBB, 0x8C, FIL_, 0xCC, 0x80, + FIL_, 0xC3, 0x92, FIL_, 0xCC, 0xA8, FIL_, 0xC7, + 0xAA, FIL_, 0xCC, 0x87, FIL_, 0xC8, 0xAE, FIL_, + 0xCC, 0x81, FIL_, 0xC3, 0x93, FIL_, 0x02, 0xCC, + 0x87, FIL_, 0xE1, 0xB9, 0x96, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0x94, FIL_, 0x08, 0xCC, 0xA7, + FIL_, 0xC5, 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC5, + 0x98, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x92, FIL_, + 0xCC, 0x8F, FIL_, 0xC8, 0x90, FIL_, 0xCC, 0x81, + FIL_, 0xC5, 0x94, FIL_, 0xCC, 0x87, FIL_, 0xE1, + 0xB9, 0x98, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB9, + 0x9E, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x9A, + FIL_, 0x07, 0xCC, 0xA6, FIL_, 0xC8, 0x98, FIL_, + 0xCC, 0x81, FIL_, 0xC5, 0x9A, FIL_, 0xCC, 0x82, + FIL_, 0xC5, 0x9C, FIL_, 0xCC, 0xA7, FIL_, 0xC5, + 0x9E, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0xA0, FIL_, + 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA0, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xB9, 0xA2, FIL_, 0x07, 0xCC, + 0xA6, FIL_, 0xC8, 0x9A, FIL_, 0xCC, 0x87, FIL_, + 0xE1, 0xB9, 0xAA, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xB9, 0xAC, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB9, + 0xAE, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB0, + FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0xA2, FIL_, 0xCC, + 0x8C, FIL_, 0xC5, 0xA4, FIL_, 0x13, 0xCC, 0x8A, + FIL_, 0xC5, 0xAE, FIL_, 0xCC, 0x88, FIL_, 0xC3, + 0x9C, FIL_, 0xCC, 0x8B, FIL_, 0xC5, 0xB0, FIL_, + 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB6, FIL_, 0xCC, + 0xA8, FIL_, 0xC5, 0xB2, FIL_, 0xCC, 0x8C, FIL_, + 0xC7, 0x93, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x99, + FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x94, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xBB, 0xA4, FIL_, 0xCC, 0xA4, + FIL_, 0xE1, 0xB9, 0xB2, FIL_, 0xCC, 0x81, FIL_, + 0xC3, 0x9A, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x9B, + FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB9, 0xB4, FIL_, + 0xCC, 0x83, FIL_, 0xC5, 0xA8, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0xA6, FIL_, 0xCC, 0x84, FIL_, + 0xC5, 0xAA, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x96, + FIL_, 0xCC, 0x86, FIL_, 0xC5, 0xAC, FIL_, 0xCC, + 0x9B, FIL_, 0xC6, 0xAF, FIL_, 0x02, 0xCC, 0xA3, + FIL_, 0xE1, 0xB9, 0xBE, FIL_, 0xCC, 0x83, FIL_, + 0xE1, 0xB9, 0xBC, FIL_, 0x06, 0xCC, 0x88, FIL_, + 0xE1, 0xBA, 0x84, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xBA, 0x82, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, + 0x80, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x88, + FIL_, 0xCC, 0x82, FIL_, 0xC5, 0xB4, FIL_, 0xCC, + 0x87, FIL_, 0xE1, 0xBA, 0x86, FIL_, 0x02, 0xCC, + 0x88, FIL_, 0xE1, 0xBA, 0x8C, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xBA, 0x8A, FIL_, 0x09, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0xB6, FIL_, 0xCC, 0xA3, FIL_, + 0xE1, 0xBB, 0xB4, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBB, 0xB2, FIL_, 0xCC, 0x88, FIL_, 0xC5, 0xB8, + FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x9D, FIL_, 0xCC, + 0x83, FIL_, 0xE1, 0xBB, 0xB8, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xBA, 0x8E, FIL_, 0xCC, 0x84, FIL_, + 0xC8, 0xB2, FIL_, 0xCC, 0x82, FIL_, 0xC5, 0xB6, + FIL_, 0x06, 0xCC, 0x82, FIL_, 0xE1, 0xBA, 0x90, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x92, FIL_, + 0xCC, 0xB1, FIL_, 0xE1, 0xBA, 0x94, FIL_, 0xCC, + 0x8C, FIL_, 0xC5, 0xBD, FIL_, 0xCC, 0x87, FIL_, + 0xC5, 0xBB, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0xB9, + FIL_, 0x10, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0xA1, + FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x85, FIL_, 0xCC, + 0x81, FIL_, 0xC3, 0xA1, FIL_, 0xCC, 0x82, FIL_, + 0xC3, 0xA2, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, + 0xA3, FIL_, 0xCC, 0x83, FIL_, 0xC3, 0xA3, FIL_, + 0xCC, 0x8C, FIL_, 0xC7, 0x8E, FIL_, 0xCC, 0x8A, + FIL_, 0xC3, 0xA5, FIL_, 0xCC, 0x88, FIL_, 0xC3, + 0xA4, FIL_, 0xCC, 0x87, FIL_, 0xC8, 0xA7, FIL_, + 0xCC, 0x91, FIL_, 0xC8, 0x83, FIL_, 0xCC, 0xA5, + FIL_, 0xE1, 0xB8, 0x81, FIL_, 0xCC, 0x84, FIL_, + 0xC4, 0x81, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x81, + FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x83, FIL_, 0xCC, + 0x80, FIL_, 0xC3, 0xA0, FIL_, 0x03, 0xCC, 0xA3, + FIL_, 0xE1, 0xB8, 0x85, FIL_, 0xCC, 0x87, FIL_, + 0xE1, 0xB8, 0x83, FIL_, 0xCC, 0xB1, FIL_, 0xE1, + 0xB8, 0x87, FIL_, 0x05, 0xCC, 0x87, FIL_, 0xC4, + 0x8B, FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x8D, FIL_, + 0xCC, 0x82, FIL_, 0xC4, 0x89, FIL_, 0xCC, 0x81, + FIL_, 0xC4, 0x87, FIL_, 0xCC, 0xA7, FIL_, 0xC3, + 0xA7, FIL_, 0x06, 0xCC, 0x87, FIL_, 0xE1, 0xB8, + 0x8B, FIL_, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0x91, + FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0x8F, FIL_, + 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0x8D, FIL_, 0xCC, + 0x8C, FIL_, 0xC4, 0x8F, FIL_, 0xCC, 0xAD, FIL_, + 0xE1, 0xB8, 0x93, FIL_, 0x11, 0xCC, 0x80, FIL_, + 0xC3, 0xA8, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0xA9, + FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xAA, FIL_, 0xCC, + 0x88, FIL_, 0xC3, 0xAB, FIL_, 0xCC, 0x84, FIL_, + 0xC4, 0x93, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x95, + FIL_, 0xCC, 0x87, FIL_, 0xC4, 0x97, FIL_, 0xCC, + 0xA8, FIL_, 0xC4, 0x99, FIL_, 0xCC, 0x8C, FIL_, + 0xC4, 0x9B, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x85, + FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x87, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xBA, 0xB9, FIL_, 0xCC, 0xA7, + FIL_, 0xC8, 0xA9, FIL_, 0xCC, 0x83, FIL_, 0xE1, + 0xBA, 0xBD, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, + 0xBB, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x99, + FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB8, 0x9B, FIL_, + 0x01, 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9F, FIL_, + 0x07, 0xCC, 0x86, FIL_, 0xC4, 0x9F, FIL_, 0xCC, + 0x87, FIL_, 0xC4, 0xA1, FIL_, 0xCC, 0x82, FIL_, + 0xC4, 0x9D, FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xB8, + 0xA1, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0xA7, FIL_, + 0xCC, 0xA7, FIL_, 0xC4, 0xA3, FIL_, 0xCC, 0x81, + FIL_, 0xC7, 0xB5, FIL_, 0x08, 0xCC, 0xA7, FIL_, + 0xE1, 0xB8, 0xA9, FIL_, 0xCC, 0xB1, FIL_, 0xE1, + 0xBA, 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC8, 0x9F, + FIL_, 0xCC, 0xAE, FIL_, 0xE1, 0xB8, 0xAB, FIL_, + 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA7, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xB8, 0xA5, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xB8, 0xA3, FIL_, 0xCC, 0x82, FIL_, + 0xC4, 0xA5, FIL_, 0x0E, 0xCC, 0x88, FIL_, 0xC3, + 0xAF, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x89, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0x8B, FIL_, + 0xCC, 0x82, FIL_, 0xC3, 0xAE, FIL_, 0xCC, 0x81, + FIL_, 0xC3, 0xAD, FIL_, 0xCC, 0x80, FIL_, 0xC3, + 0xAC, FIL_, 0xCC, 0x83, FIL_, 0xC4, 0xA9, FIL_, + 0xCC, 0x84, FIL_, 0xC4, 0xAB, FIL_, 0xCC, 0x86, + FIL_, 0xC4, 0xAD, FIL_, 0xCC, 0xA8, FIL_, 0xC4, + 0xAF, FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB8, 0xAD, + FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x90, FIL_, 0xCC, + 0x91, FIL_, 0xC8, 0x8B, FIL_, 0xCC, 0x8F, FIL_, + 0xC8, 0x89, FIL_, 0x02, 0xCC, 0x8C, FIL_, 0xC7, + 0xB0, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0xB5, FIL_, + 0x05, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0xB5, FIL_, + 0xCC, 0xA7, FIL_, 0xC4, 0xB7, FIL_, 0xCC, 0x8C, + FIL_, 0xC7, 0xA9, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xB8, 0xB1, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0xB3, FIL_, 0x06, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, + 0xB7, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0xBD, + FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0xBB, FIL_, + 0xCC, 0xA7, FIL_, 0xC4, 0xBC, FIL_, 0xCC, 0x81, + FIL_, 0xC4, 0xBA, FIL_, 0xCC, 0x8C, FIL_, 0xC4, + 0xBE, FIL_, 0x03, 0xCC, 0x87, FIL_, 0xE1, 0xB9, + 0x81, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x83, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xBF, FIL_, + 0x09, 0xCC, 0x80, FIL_, 0xC7, 0xB9, FIL_, 0xCC, + 0xAD, FIL_, 0xE1, 0xB9, 0x8B, FIL_, 0xCC, 0x83, + FIL_, 0xC3, 0xB1, FIL_, 0xCC, 0x81, FIL_, 0xC5, + 0x84, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x87, + FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB9, 0x89, FIL_, + 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x85, FIL_, 0xCC, + 0xA7, FIL_, 0xC5, 0x86, FIL_, 0xCC, 0x8C, FIL_, + 0xC5, 0x88, FIL_, 0x10, 0xCC, 0xA3, FIL_, 0xE1, + 0xBB, 0x8D, FIL_, 0xCC, 0x87, FIL_, 0xC8, 0xAF, + FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xB2, FIL_, 0xCC, + 0x91, FIL_, 0xC8, 0x8F, FIL_, 0xCC, 0x89, FIL_, + 0xE1, 0xBB, 0x8F, FIL_, 0xCC, 0x88, FIL_, 0xC3, + 0xB6, FIL_, 0xCC, 0x83, FIL_, 0xC3, 0xB5, FIL_, + 0xCC, 0x81, FIL_, 0xC3, 0xB3, FIL_, 0xCC, 0x8C, + FIL_, 0xC7, 0x92, FIL_, 0xCC, 0xA8, FIL_, 0xC7, + 0xAB, FIL_, 0xCC, 0x9B, FIL_, 0xC6, 0xA1, FIL_, + 0xCC, 0x84, FIL_, 0xC5, 0x8D, FIL_, 0xCC, 0x86, + FIL_, 0xC5, 0x8F, FIL_, 0xCC, 0x8B, FIL_, 0xC5, + 0x91, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xB4, FIL_, + 0xCC, 0x8F, FIL_, 0xC8, 0x8D, FIL_, 0x02, 0xCC, + 0x87, FIL_, 0xE1, 0xB9, 0x97, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0x95, FIL_, 0x08, 0xCC, 0x8C, + FIL_, 0xC5, 0x99, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xB9, 0x9B, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0x95, + FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x97, FIL_, 0xCC, + 0xB1, FIL_, 0xE1, 0xB9, 0x9F, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0x99, FIL_, 0xCC, 0x91, FIL_, + 0xC8, 0x93, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x91, + FIL_, 0x07, 0xCC, 0xA7, FIL_, 0xC5, 0x9F, FIL_, + 0xCC, 0x82, FIL_, 0xC5, 0x9D, FIL_, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA1, FIL_, 0xCC, 0xA6, FIL_, + 0xC8, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0x9B, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0xA3, FIL_, + 0xCC, 0x8C, FIL_, 0xC5, 0xA1, FIL_, 0x08, 0xCC, + 0xA6, FIL_, 0xC8, 0x9B, FIL_, 0xCC, 0xAD, FIL_, + 0xE1, 0xB9, 0xB1, FIL_, 0xCC, 0xB1, FIL_, 0xE1, + 0xB9, 0xAF, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, + 0xAD, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xAB, + FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0xA5, FIL_, 0xCC, + 0xA7, FIL_, 0xC5, 0xA3, FIL_, 0xCC, 0x88, FIL_, + 0xE1, 0xBA, 0x97, FIL_, 0x13, 0xCC, 0x8A, FIL_, + 0xC5, 0xAF, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x95, + FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x94, FIL_, 0xCC, + 0x80, FIL_, 0xC3, 0xB9, FIL_, 0xCC, 0x9B, FIL_, + 0xC6, 0xB0, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xBB, + FIL_, 0xCC, 0x81, FIL_, 0xC3, 0xBA, FIL_, 0xCC, + 0x88, FIL_, 0xC3, 0xBC, FIL_, 0xCC, 0x83, FIL_, + 0xC5, 0xA9, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, + 0xA7, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0xAB, FIL_, + 0xCC, 0x86, FIL_, 0xC5, 0xAD, FIL_, 0xCC, 0xAD, + FIL_, 0xE1, 0xB9, 0xB7, FIL_, 0xCC, 0x8B, FIL_, + 0xC5, 0xB1, FIL_, 0xCC, 0xA8, FIL_, 0xC5, 0xB3, + FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x97, FIL_, 0xCC, + 0xA4, FIL_, 0xE1, 0xB9, 0xB3, FIL_, 0xCC, 0xA3, + FIL_, 0xE1, 0xBB, 0xA5, FIL_, 0xCC, 0xB0, FIL_, + 0xE1, 0xB9, 0xB5, FIL_, 0x02, 0xCC, 0x83, FIL_, + 0xE1, 0xB9, 0xBD, FIL_, 0xCC, 0xA3, FIL_, 0xE1, + 0xB9, 0xBF, FIL_, 0x07, 0xCC, 0x8A, FIL_, 0xE1, + 0xBA, 0x98, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xBA, + 0x87, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0x83, + FIL_, 0xCC, 0x82, FIL_, 0xC5, 0xB5, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBA, 0x81, FIL_, 0xCC, 0xA3, + FIL_, 0xE1, 0xBA, 0x89, FIL_, 0xCC, 0x88, FIL_, + 0xE1, 0xBA, 0x85, FIL_, 0x02, 0xCC, 0x87, FIL_, + 0xE1, 0xBA, 0x8B, FIL_, 0xCC, 0x88, FIL_, 0xE1, + 0xBA, 0x8D, FIL_, 0x0A, 0xCC, 0x87, FIL_, 0xE1, + 0xBA, 0x8F, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, + 0xB5, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0xB7, + FIL_, 0xCC, 0x8A, FIL_, 0xE1, 0xBA, 0x99, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xB3, FIL_, 0xCC, + 0x83, FIL_, 0xE1, 0xBB, 0xB9, FIL_, 0xCC, 0x88, + FIL_, 0xC3, 0xBF, FIL_, 0xCC, 0x81, FIL_, 0xC3, + 0xBD, FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xB3, FIL_, + 0xCC, 0x82, FIL_, 0xC5, 0xB7, FIL_, 0x06, 0xCC, + 0xB1, FIL_, 0xE1, 0xBA, 0x95, FIL_, 0xCC, 0xA3, + FIL_, 0xE1, 0xBA, 0x93, FIL_, 0xCC, 0x82, FIL_, + 0xE1, 0xBA, 0x91, FIL_, 0xCC, 0x81, FIL_, 0xC5, + 0xBA, FIL_, 0xCC, 0x87, FIL_, 0xC5, 0xBC, FIL_, + 0xCC, 0x8C, FIL_, 0xC5, 0xBE, FIL_, 0x03, 0xCC, + 0x80, FIL_, 0xE1, 0xBF, 0xAD, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBF, 0x81, FIL_, 0xCC, 0x81, FIL_, + 0xCE, 0x85, FIL_, 0x04, 0xCC, 0x83, FIL_, 0xE1, + 0xBA, 0xAA, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, + 0xA4, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA8, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xA6, FIL_, + 0x01, 0xCC, 0x84, FIL_, 0xC7, 0x9E, FIL_, 0x01, + 0xCC, 0x81, FIL_, 0xC7, 0xBA, FIL_, 0x02, 0xCC, + 0x84, FIL_, 0xC7, 0xA2, FIL_, 0xCC, 0x81, FIL_, + 0xC7, 0xBC, FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, + 0xB8, 0x88, FIL_, 0x04, 0xCC, 0x83, FIL_, 0xE1, + 0xBB, 0x84, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, + 0x80, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x82, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xBE, FIL_, + 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xAE, FIL_, + 0x04, 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x90, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0x92, FIL_, 0xCC, + 0x89, FIL_, 0xE1, 0xBB, 0x94, FIL_, 0xCC, 0x83, + FIL_, 0xE1, 0xBB, 0x96, FIL_, 0x03, 0xCC, 0x84, + FIL_, 0xC8, 0xAC, FIL_, 0xCC, 0x88, FIL_, 0xE1, + 0xB9, 0x8E, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xB9, + 0x8C, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAA, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xC7, 0xBE, FIL_, + 0x04, 0xCC, 0x80, FIL_, 0xC7, 0x9B, FIL_, 0xCC, + 0x84, FIL_, 0xC7, 0x95, FIL_, 0xCC, 0x8C, FIL_, + 0xC7, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC7, 0x97, + FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xA5, + FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBA, 0xAB, FIL_, + 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA9, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBA, 0xA7, FIL_, 0x01, 0xCC, + 0x84, FIL_, 0xC7, 0x9F, FIL_, 0x01, 0xCC, 0x81, + FIL_, 0xC7, 0xBB, FIL_, 0x02, 0xCC, 0x81, FIL_, + 0xC7, 0xBD, FIL_, 0xCC, 0x84, FIL_, 0xC7, 0xA3, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x89, + FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x83, + FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0x85, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0x81, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBA, 0xBF, FIL_, 0x01, 0xCC, + 0x81, FIL_, 0xE1, 0xB8, 0xAF, FIL_, 0x04, 0xCC, + 0x80, FIL_, 0xE1, 0xBB, 0x93, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xBB, 0x91, FIL_, 0xCC, 0x83, FIL_, + 0xE1, 0xBB, 0x97, FIL_, 0xCC, 0x89, FIL_, 0xE1, + 0xBB, 0x95, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, + 0xB9, 0x8D, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB9, + 0x8F, FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xAD, FIL_, + 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAB, FIL_, 0x01, + 0xCC, 0x81, FIL_, 0xC7, 0xBF, FIL_, 0x04, 0xCC, + 0x8C, FIL_, 0xC7, 0x9A, FIL_, 0xCC, 0x84, FIL_, + 0xC7, 0x96, FIL_, 0xCC, 0x80, FIL_, 0xC7, 0x9C, + FIL_, 0xCC, 0x81, FIL_, 0xC7, 0x98, FIL_, 0x04, + 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xAE, FIL_, 0xCC, + 0x83, FIL_, 0xE1, 0xBA, 0xB4, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBA, 0xB2, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBA, 0xB0, FIL_, 0x04, 0xCC, 0x83, FIL_, + 0xE1, 0xBA, 0xB5, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBA, 0xB1, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, + 0xAF, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xB3, + FIL_, 0x02, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x96, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x94, FIL_, + 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x95, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x97, FIL_, 0x02, + 0xCC, 0x80, FIL_, 0xE1, 0xB9, 0x90, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xB9, 0x92, FIL_, 0x02, 0xCC, + 0x81, FIL_, 0xE1, 0xB9, 0x93, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xB9, 0x91, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA4, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA5, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA6, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xB9, 0xA7, FIL_, 0x01, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0xB8, FIL_, 0x01, 0xCC, 0x81, + FIL_, 0xE1, 0xB9, 0xB9, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xE1, 0xB9, 0xBA, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xE1, 0xB9, 0xBB, FIL_, 0x01, 0xCC, 0x87, + FIL_, 0xE1, 0xBA, 0x9B, FIL_, 0x05, 0xCC, 0x80, + FIL_, 0xE1, 0xBB, 0x9C, FIL_, 0xCC, 0x89, FIL_, + 0xE1, 0xBB, 0x9E, FIL_, 0xCC, 0x83, FIL_, 0xE1, + 0xBB, 0xA0, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, + 0x9A, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xA2, + FIL_, 0x05, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xA1, + FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xA3, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x9B, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBB, 0x9D, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0x9F, FIL_, 0x05, 0xCC, 0x81, + FIL_, 0xE1, 0xBB, 0xA8, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBB, 0xAA, FIL_, 0xCC, 0x89, FIL_, 0xE1, + 0xBB, 0xAC, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, + 0xAE, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xB0, + FIL_, 0x05, 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xAB, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0xA9, FIL_, + 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xAF, FIL_, 0xCC, + 0xA3, FIL_, 0xE1, 0xBB, 0xB1, FIL_, 0xCC, 0x89, + FIL_, 0xE1, 0xBB, 0xAD, FIL_, 0x01, 0xCC, 0x8C, + FIL_, 0xC7, 0xAE, FIL_, 0x01, 0xCC, 0x84, FIL_, + 0xC7, 0xAC, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, + 0xAD, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA0, + FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA1, FIL_, + 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9C, FIL_, + 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9D, FIL_, + 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xB0, FIL_, 0x01, + 0xCC, 0x84, FIL_, 0xC8, 0xB1, FIL_, 0x01, 0xCC, + 0x8C, FIL_, 0xC7, 0xAF, FIL_, 0x07, 0xCC, 0x93, + FIL_, 0xE1, 0xBC, 0x88, FIL_, 0xCC, 0x81, FIL_, + 0xCE, 0x86, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBE, + 0xB8, FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xBE, 0xB9, + FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0x89, FIL_, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xBC, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBE, 0xBA, FIL_, 0x04, 0xCC, + 0x94, FIL_, 0xE1, 0xBC, 0x99, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBF, 0x88, FIL_, 0xCC, 0x81, FIL_, + 0xCE, 0x88, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, + 0x98, FIL_, 0x05, 0xCD, 0x85, FIL_, 0xE1, 0xBF, + 0x8C, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x89, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x8A, FIL_, 0xCC, + 0x93, FIL_, 0xE1, 0xBC, 0xA8, FIL_, 0xCC, 0x94, + FIL_, 0xE1, 0xBC, 0xA9, FIL_, 0x07, 0xCC, 0x80, + FIL_, 0xE1, 0xBF, 0x9A, FIL_, 0xCC, 0x84, FIL_, + 0xE1, 0xBF, 0x99, FIL_, 0xCC, 0x93, FIL_, 0xE1, + 0xBC, 0xB8, FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBC, + 0xB9, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0x98, + FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x8A, FIL_, 0xCC, + 0x88, FIL_, 0xCE, 0xAA, FIL_, 0x04, 0xCC, 0x81, + FIL_, 0xCE, 0x8C, FIL_, 0xCC, 0x94, FIL_, 0xE1, + 0xBD, 0x89, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, + 0x88, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0xB8, + FIL_, 0x01, 0xCC, 0x94, FIL_, 0xE1, 0xBF, 0xAC, + FIL_, 0x06, 0xCC, 0x94, FIL_, 0xE1, 0xBD, 0x99, + FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0xA8, FIL_, + 0xCC, 0x88, FIL_, 0xCE, 0xAB, FIL_, 0xCC, 0x84, + FIL_, 0xE1, 0xBF, 0xA9, FIL_, 0xCC, 0x81, FIL_, + 0xCE, 0x8E, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, + 0xAA, FIL_, 0x05, 0xCC, 0x93, FIL_, 0xE1, 0xBD, + 0xA8, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xBC, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0xBA, FIL_, + 0xCC, 0x94, FIL_, 0xE1, 0xBD, 0xA9, FIL_, 0xCC, + 0x81, FIL_, 0xCE, 0x8F, FIL_, 0x01, 0xCD, 0x85, + FIL_, 0xE1, 0xBE, 0xB4, FIL_, 0x01, 0xCD, 0x85, + FIL_, 0xE1, 0xBF, 0x84, FIL_, 0x08, 0xCD, 0x85, + FIL_, 0xE1, 0xBE, 0xB3, FIL_, 0xCC, 0x84, FIL_, + 0xE1, 0xBE, 0xB1, FIL_, 0xCC, 0x86, FIL_, 0xE1, + 0xBE, 0xB0, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, + 0xB0, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAC, FIL_, + 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0x81, FIL_, 0xCC, + 0x93, FIL_, 0xE1, 0xBC, 0x80, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBE, 0xB6, FIL_, 0x04, 0xCC, 0x93, + FIL_, 0xE1, 0xBC, 0x90, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBD, 0xB2, FIL_, 0xCC, 0x94, FIL_, 0xE1, + 0xBC, 0x91, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAD, + FIL_, 0x06, 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0xA1, + FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAE, FIL_, 0xCD, + 0x85, FIL_, 0xE1, 0xBF, 0x83, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBF, 0x86, FIL_, 0xCC, 0x93, FIL_, + 0xE1, 0xBC, 0xA0, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBD, 0xB4, FIL_, 0x08, 0xCC, 0x88, FIL_, 0xCF, + 0x8A, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAF, FIL_, + 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0xB0, FIL_, 0xCC, + 0x94, FIL_, 0xE1, 0xBC, 0xB1, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBD, 0xB6, FIL_, 0xCC, 0x86, FIL_, + 0xE1, 0xBF, 0x90, FIL_, 0xCC, 0x84, FIL_, 0xE1, + 0xBF, 0x91, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, + 0x96, FIL_, 0x04, 0xCC, 0x93, FIL_, 0xE1, 0xBD, + 0x80, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xB8, + FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBD, 0x81, FIL_, + 0xCC, 0x81, FIL_, 0xCF, 0x8C, FIL_, 0x02, 0xCC, + 0x93, FIL_, 0xE1, 0xBF, 0xA4, FIL_, 0xCC, 0x94, + FIL_, 0xE1, 0xBF, 0xA5, FIL_, 0x08, 0xCC, 0x81, + FIL_, 0xCF, 0x8D, FIL_, 0xCC, 0x94, FIL_, 0xE1, + 0xBD, 0x91, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, + 0xA6, FIL_, 0xCC, 0x88, FIL_, 0xCF, 0x8B, FIL_, + 0xCC, 0x84, FIL_, 0xE1, 0xBF, 0xA1, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBD, 0xBA, FIL_, 0xCC, 0x93, + FIL_, 0xE1, 0xBD, 0x90, FIL_, 0xCC, 0x86, FIL_, + 0xE1, 0xBF, 0xA0, FIL_, 0x06, 0xCC, 0x80, FIL_, + 0xE1, 0xBD, 0xBC, FIL_, 0xCC, 0x94, FIL_, 0xE1, + 0xBD, 0xA1, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, + 0xA0, FIL_, 0xCC, 0x81, FIL_, 0xCF, 0x8E, FIL_, + 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB3, FIL_, 0xCD, + 0x82, FIL_, 0xE1, 0xBF, 0xB6, FIL_, 0x03, 0xCC, + 0x80, FIL_, 0xE1, 0xBF, 0x92, FIL_, 0xCD, 0x82, + FIL_, 0xE1, 0xBF, 0x97, FIL_, 0xCC, 0x81, FIL_, + 0xCE, 0x90, FIL_, 0x03, 0xCD, 0x82, FIL_, 0xE1, + 0xBF, 0xA7, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, + 0xA2, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xB0, FIL_, + 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB4, FIL_, + 0x02, 0xCC, 0x88, FIL_, 0xCF, 0x94, FIL_, 0xCC, + 0x81, FIL_, 0xCF, 0x93, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xD0, 0x87, FIL_, 0x02, 0xCC, 0x88, FIL_, + 0xD3, 0x92, FIL_, 0xCC, 0x86, FIL_, 0xD3, 0x90, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x83, FIL_, + 0x03, 0xCC, 0x88, FIL_, 0xD0, 0x81, FIL_, 0xCC, + 0x80, FIL_, 0xD0, 0x80, FIL_, 0xCC, 0x86, FIL_, + 0xD3, 0x96, FIL_, 0x02, 0xCC, 0x86, FIL_, 0xD3, + 0x81, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x9C, FIL_, + 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9E, FIL_, 0x04, + 0xCC, 0x84, FIL_, 0xD3, 0xA2, FIL_, 0xCC, 0x88, + FIL_, 0xD3, 0xA4, FIL_, 0xCC, 0x86, FIL_, 0xD0, + 0x99, FIL_, 0xCC, 0x80, FIL_, 0xD0, 0x8D, FIL_, + 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x8C, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xA6, FIL_, 0x04, 0xCC, + 0x8B, FIL_, 0xD3, 0xB2, FIL_, 0xCC, 0x88, FIL_, + 0xD3, 0xB0, FIL_, 0xCC, 0x86, FIL_, 0xD0, 0x8E, + FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xAE, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xB4, FIL_, 0x01, 0xCC, + 0x88, FIL_, 0xD3, 0xB8, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xD3, 0xAC, FIL_, 0x02, 0xCC, 0x86, FIL_, + 0xD3, 0x91, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x93, + FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x93, FIL_, + 0x03, 0xCC, 0x80, FIL_, 0xD1, 0x90, FIL_, 0xCC, + 0x86, FIL_, 0xD3, 0x97, FIL_, 0xCC, 0x88, FIL_, + 0xD1, 0x91, FIL_, 0x02, 0xCC, 0x86, FIL_, 0xD3, + 0x82, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x9D, FIL_, + 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9F, FIL_, 0x04, + 0xCC, 0x86, FIL_, 0xD0, 0xB9, FIL_, 0xCC, 0x88, + FIL_, 0xD3, 0xA5, FIL_, 0xCC, 0x84, FIL_, 0xD3, + 0xA3, FIL_, 0xCC, 0x80, FIL_, 0xD1, 0x9D, FIL_, + 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x9C, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xA7, FIL_, 0x04, 0xCC, + 0x8B, FIL_, 0xD3, 0xB3, FIL_, 0xCC, 0x84, FIL_, + 0xD3, 0xAF, FIL_, 0xCC, 0x86, FIL_, 0xD1, 0x9E, + FIL_, 0xCC, 0x88, FIL_, 0xD3, 0xB1, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xB5, FIL_, 0x01, 0xCC, + 0x88, FIL_, 0xD3, 0xB9, FIL_, 0x01, 0xCC, 0x88, + FIL_, 0xD3, 0xAD, FIL_, 0x01, 0xCC, 0x88, FIL_, + 0xD1, 0x97, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, + 0xB6, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, 0xB7, + FIL_, 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9A, FIL_, + 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9B, FIL_, 0x01, + 0xCC, 0x88, FIL_, 0xD3, 0xAA, FIL_, 0x01, 0xCC, + 0x88, FIL_, 0xD3, 0xAB, FIL_, 0x03, 0xD9, 0x94, + FIL_, 0xD8, 0xA3, FIL_, 0xD9, 0x95, FIL_, 0xD8, + 0xA5, FIL_, 0xD9, 0x93, FIL_, 0xD8, 0xA2, FIL_, + 0x01, 0xD9, 0x94, FIL_, 0xD8, 0xA4, FIL_, 0x01, + 0xD9, 0x94, FIL_, 0xD8, 0xA6, FIL_, 0x01, 0xD9, + 0x94, FIL_, 0xDB, 0x82, FIL_, 0x01, 0xD9, 0x94, + FIL_, 0xDB, 0x93, FIL_, 0x01, 0xD9, 0x94, FIL_, + 0xDB, 0x80, FIL_, 0x01, 0xE0, 0xA4, 0xBC, FIL_, + 0xE0, 0xA4, 0xA9, FIL_, 0x01, 0xE0, 0xA4, 0xBC, + FIL_, 0xE0, 0xA4, 0xB1, FIL_, 0x01, 0xE0, 0xA4, + 0xBC, FIL_, 0xE0, 0xA4, 0xB4, FIL_, 0x02, 0xE0, + 0xA6, 0xBE, FIL_, 0xE0, 0xA7, 0x8B, FIL_, 0xE0, + 0xA7, 0x97, FIL_, 0xE0, 0xA7, 0x8C, FIL_, 0x03, + 0xE0, 0xAD, 0x96, FIL_, 0xE0, 0xAD, 0x88, FIL_, + 0xE0, 0xAC, 0xBE, FIL_, 0xE0, 0xAD, 0x8B, FIL_, + 0xE0, 0xAD, 0x97, FIL_, 0xE0, 0xAD, 0x8C, FIL_, + 0x01, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAE, 0x94, + FIL_, 0x02, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAF, + 0x8C, FIL_, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, 0xAF, + 0x8A, FIL_, 0x01, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, + 0xAF, 0x8B, FIL_, 0x01, 0xE0, 0xB1, 0x96, FIL_, + 0xE0, 0xB1, 0x88, FIL_, 0x01, 0xE0, 0xB3, 0x95, + FIL_, 0xE0, 0xB3, 0x80, FIL_, 0x03, 0xE0, 0xB3, + 0x82, FIL_, 0xE0, 0xB3, 0x8A, FIL_, 0xE0, 0xB3, + 0x96, FIL_, 0xE0, 0xB3, 0x88, FIL_, 0xE0, 0xB3, + 0x95, FIL_, 0xE0, 0xB3, 0x87, FIL_, 0x01, 0xE0, + 0xB3, 0x95, FIL_, 0xE0, 0xB3, 0x8B, FIL_, 0x02, + 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8A, FIL_, + 0xE0, 0xB5, 0x97, FIL_, 0xE0, 0xB5, 0x8C, FIL_, + 0x01, 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8B, + FIL_, 0x03, 0xE0, 0xB7, 0x9F, FIL_, 0xE0, 0xB7, + 0x9E, FIL_, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, 0xB7, + 0x9A, FIL_, 0xE0, 0xB7, 0x8F, FIL_, 0xE0, 0xB7, + 0x9C, FIL_, 0x01, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, + 0xB7, 0x9D, FIL_, 0x01, 0xE1, 0x80, 0xAE, FIL_, + 0xE1, 0x80, 0xA6, FIL_, 0x01, 0xE1, 0xAC, 0xB5, + FIL_, 0xE1, 0xAC, 0x86, FIL_, 0x01, 0xE1, 0xAC, + 0xB5, FIL_, 0xE1, 0xAC, 0x88, FIL_, 0x01, 0xE1, + 0xAC, 0xB5, FIL_, 0xE1, 0xAC, 0x8A, FIL_, 0x01, + 0xE1, 0xAC, 0xB5, FIL_, 0xE1, 0xAC, 0x8C, FIL_, + 0x01, 0xE1, 0xAC, 0xB5, FIL_, 0xE1, 0xAC, 0x8E, + FIL_, 0x01, 0xE1, 0xAC, 0xB5, FIL_, 0xE1, 0xAC, + 0x92, FIL_, 0x01, 0xE1, 0xAC, 0xB5, FIL_, 0xE1, + 0xAC, 0xBB, FIL_, 0x01, 0xE1, 0xAC, 0xB5, FIL_, + 0xE1, 0xAC, 0xBD, FIL_, 0x01, 0xE1, 0xAC, 0xB5, + FIL_, 0xE1, 0xAD, 0x80, FIL_, 0x01, 0xE1, 0xAC, + 0xB5, FIL_, 0xE1, 0xAD, 0x81, FIL_, 0x01, 0xE1, + 0xAC, 0xB5, FIL_, 0xE1, 0xAD, 0x83, FIL_, 0x01, + 0xCC, 0x84, FIL_, 0xE1, 0xB8, 0xB8, FIL_, 0x01, + 0xCC, 0x84, FIL_, 0xE1, 0xB8, 0xB9, FIL_, 0x01, + 0xCC, 0x84, FIL_, 0xE1, 0xB9, 0x9C, FIL_, 0x01, + 0xCC, 0x84, FIL_, 0xE1, 0xB9, 0x9D, FIL_, 0x01, + 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA8, FIL_, 0x01, + 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA9, FIL_, 0x02, + 0xCC, 0x86, FIL_, 0xE1, 0xBA, 0xB6, FIL_, 0xCC, + 0x82, FIL_, 0xE1, 0xBA, 0xAC, FIL_, 0x02, 0xCC, + 0x82, FIL_, 0xE1, 0xBA, 0xAD, FIL_, 0xCC, 0x86, + FIL_, 0xE1, 0xBA, 0xB7, FIL_, 0x01, 0xCC, 0x82, + FIL_, 0xE1, 0xBB, 0x86, FIL_, 0x01, 0xCC, 0x82, + FIL_, 0xE1, 0xBB, 0x87, FIL_, 0x01, 0xCC, 0x82, + FIL_, 0xE1, 0xBB, 0x98, FIL_, 0x01, 0xCC, 0x82, + FIL_, 0xE1, 0xBB, 0x99, FIL_, 0x04, 0xCD, 0x85, + FIL_, 0xE1, 0xBE, 0x80, FIL_, 0xCD, 0x82, FIL_, + 0xE1, 0xBC, 0x86, FIL_, 0xCC, 0x80, FIL_, 0xE1, + 0xBC, 0x82, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, + 0x84, FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBC, + 0x87, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x85, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x83, FIL_, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x81, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x82, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x83, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x84, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x85, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x86, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x87, FIL_, 0x04, + 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x8C, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBC, 0x8A, FIL_, 0xCD, 0x85, + FIL_, 0xE1, 0xBE, 0x88, FIL_, 0xCD, 0x82, FIL_, + 0xE1, 0xBC, 0x8E, FIL_, 0x04, 0xCC, 0x80, FIL_, + 0xE1, 0xBC, 0x8B, FIL_, 0xCD, 0x82, FIL_, 0xE1, + 0xBC, 0x8F, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, + 0x8D, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x89, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8A, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8B, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8C, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8D, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8E, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8F, + FIL_, 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x92, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x94, FIL_, + 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x93, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x95, FIL_, 0x02, + 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x9A, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBC, 0x9C, FIL_, 0x02, 0xCC, + 0x80, FIL_, 0xE1, 0xBC, 0x9B, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xBC, 0x9D, FIL_, 0x04, 0xCC, 0x80, + FIL_, 0xE1, 0xBC, 0xA2, FIL_, 0xCC, 0x81, FIL_, + 0xE1, 0xBC, 0xA4, FIL_, 0xCD, 0x82, FIL_, 0xE1, + 0xBC, 0xA6, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, + 0x90, FIL_, 0x04, 0xCD, 0x85, FIL_, 0xE1, 0xBE, + 0x91, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xA5, + FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xA7, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xA3, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x92, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x93, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x94, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x95, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x96, FIL_, 0x01, + 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x97, FIL_, 0x04, + 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xAC, FIL_, 0xCC, + 0x80, FIL_, 0xE1, 0xBC, 0xAA, FIL_, 0xCD, 0x85, + FIL_, 0xE1, 0xBE, 0x98, FIL_, 0xCD, 0x82, FIL_, + 0xE1, 0xBC, 0xAE, FIL_, 0x04, 0xCD, 0x82, FIL_, + 0xE1, 0xBC, 0xAF, FIL_, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, + 0xAD, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xAB, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9A, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9B, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9C, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9D, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9E, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9F, + FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xB4, + FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xB2, FIL_, + 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xB6, FIL_, 0x03, + 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xB3, FIL_, 0xCD, + 0x82, FIL_, 0xE1, 0xBC, 0xB7, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xBC, 0xB5, FIL_, 0x03, 0xCC, 0x81, + FIL_, 0xE1, 0xBC, 0xBC, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBC, 0xBA, FIL_, 0xCD, 0x82, FIL_, 0xE1, + 0xBC, 0xBE, FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, + 0xBC, 0xBB, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, + 0xBF, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xBD, + FIL_, 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x82, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x84, FIL_, + 0x02, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x85, FIL_, + 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x83, FIL_, 0x02, + 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x8A, FIL_, 0xCC, + 0x81, FIL_, 0xE1, 0xBD, 0x8C, FIL_, 0x02, 0xCC, + 0x80, FIL_, 0xE1, 0xBD, 0x8B, FIL_, 0xCC, 0x81, + FIL_, 0xE1, 0xBD, 0x8D, FIL_, 0x03, 0xCD, 0x82, + FIL_, 0xE1, 0xBD, 0x96, FIL_, 0xCC, 0x80, FIL_, + 0xE1, 0xBD, 0x92, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xBD, 0x94, FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, + 0xBD, 0x93, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, + 0x97, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x95, + FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x9B, + FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0x9F, FIL_, + 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x9D, FIL_, 0x04, + 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xA6, FIL_, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA0, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBD, 0xA2, FIL_, 0xCC, 0x81, FIL_, + 0xE1, 0xBD, 0xA4, FIL_, 0x04, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0xA1, FIL_, 0xCD, 0x82, FIL_, 0xE1, + 0xBD, 0xA7, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, + 0xA5, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xA3, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA2, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA3, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA4, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA5, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA6, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA7, + FIL_, 0x04, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xAA, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0xAC, FIL_, + 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xAE, FIL_, 0xCD, + 0x85, FIL_, 0xE1, 0xBE, 0xA8, FIL_, 0x04, 0xCD, + 0x82, FIL_, 0xE1, 0xBD, 0xAF, FIL_, 0xCC, 0x80, + FIL_, 0xE1, 0xBD, 0xAB, FIL_, 0xCD, 0x85, FIL_, + 0xE1, 0xBE, 0xA9, FIL_, 0xCC, 0x81, FIL_, 0xE1, + 0xBD, 0xAD, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xAA, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xAB, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xAC, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xAD, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xAE, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xAF, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xB2, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBF, 0x82, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBF, 0xB2, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, + 0xBE, 0xB7, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, + 0xBF, 0x8E, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, + 0x8D, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0x8F, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0x87, + FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB7, + FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x9D, + FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBF, 0x9E, FIL_, + 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0x9F, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x86, 0x9A, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x86, 0x9B, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x86, 0xAE, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x87, 0x8D, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x87, 0x8F, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x87, 0x8E, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0x84, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0x89, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0x8C, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0xA4, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0xA6, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x81, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x84, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x87, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x89, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAD, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA2, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB0, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB1, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB4, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB5, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB8, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB9, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x80, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x81, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA0, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA1, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x84, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x85, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x88, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x89, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA2, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA3, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAC, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAD, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAE, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAF, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAA, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAB, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAC, FIL_, 0x01, + 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAD, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0x94, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x8C, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, + 0x8E, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x81, 0x90, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x81, 0x92, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x81, 0x94, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x81, 0x96, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x81, 0x98, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x9A, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x9C, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, + 0x9E, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x81, 0xA0, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x81, 0xA2, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x81, 0xA5, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x81, 0xA7, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x81, 0xA9, FIL_, 0x02, + 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xB1, FIL_, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB0, FIL_, + 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB3, + FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xB4, + FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, + 0xB6, FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, + 0xB7, FIL_, 0x02, 0xE3, 0x82, 0x9A, FIL_, 0xE3, + 0x81, 0xBA, FIL_, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x81, 0xB9, FIL_, 0x02, 0xE3, 0x82, 0x9A, FIL_, + 0xE3, 0x81, 0xBD, FIL_, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x81, 0xBC, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x82, 0x9E, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x83, 0xB4, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x82, 0xAC, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xAE, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB0, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, + 0xB2, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x82, 0xB4, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x82, 0xB6, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x82, 0xB8, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x82, 0xBA, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x82, 0xBC, FIL_, 0x01, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xBE, FIL_, + 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x80, + FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, + 0x82, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x83, 0x85, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x83, 0x87, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x83, 0x89, FIL_, 0x02, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x83, 0x90, FIL_, 0xE3, 0x82, + 0x9A, FIL_, 0xE3, 0x83, 0x91, FIL_, 0x02, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x83, 0x93, FIL_, 0xE3, + 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x94, FIL_, 0x02, + 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x97, FIL_, + 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x96, FIL_, + 0x02, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x9A, + FIL_, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x99, + FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, + 0x9C, FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x83, + 0x9D, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, + 0x83, 0xB7, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, + 0xE3, 0x83, 0xB8, FIL_, 0x01, 0xE3, 0x82, 0x99, + FIL_, 0xE3, 0x83, 0xB9, FIL_, 0x01, 0xE3, 0x82, + 0x99, FIL_, 0xE3, 0x83, 0xBA, FIL_, 0x01, 0xE3, + 0x82, 0x99, FIL_, 0xE3, 0x83, 0xBE, FIL_, + }, +}; + +static const uchar_t u8_decomp_b2_tbl[2][2][256] = { + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, 2, 3, 4, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 5, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, 6, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 7, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 1, 2, 3, 4, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 5, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, 6, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 7, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + +}; + +static const u8_displacement_t u8_decomp_b3_tbl[2][8][256] = { + { + { /* Third byte table 0. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0, 0 }, + { 1, 35 }, { 2, 247 }, { 3, 474 }, + { 4, 693 }, { 5, 709 }, { 6, 951 }, + { N_, 0 }, { 7, 1139 }, { 8, 1152 }, + { N_, 0 }, { 9, 1177 }, { 10, 1199 }, + { 11, 1295 }, { 12, 1360 }, { 13, 1405 }, + { N_, 0 }, { 14, 1450 }, { N_, 0 }, + { N_, 0 }, { 15, 1620 }, { N_, 0 }, + { 16, 1624 }, { 17, 1649 }, { N_, 0 }, + { 18, 1665 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 19, 1680 }, + { 20, 1701 }, { N_, 0 }, { 21, 1757 }, + { 22, 1792 }, { 23, 1806 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 24, 1834 }, + { 25, 1869 }, { 26, 1876 }, { N_, 0 }, + { 27, 1897 }, { N_, 0 }, { 28, 1904 }, + { N_, 0 }, { 29, 1942 }, { N_, 0 }, + { 30, 1963 }, { 31, 1994 }, { N_, 0 }, + { 32, 2000 }, { 33, 2006 }, { 34, 2018 }, + { 35, 2021 }, { 36, 2109 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 37, 2158 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 0x8000, 2165 }, { 0x8001, 2445 }, + { 0x8002, 2741 }, { 0x8003, 3029 }, { 0x8004, 3337 }, + { 0x8005, 3725 }, { 0x8006, 4053 }, { 0x8007, 4536 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 38, 4895 }, + { 39, 4964 }, { 40, 4999 }, { N_, 0 }, + { 41, 5018 }, { 42, 5098 }, { 43, 5230 }, + { 44, 5248 }, { 45, 5266 }, { 46, 5326 }, + { 47, 5410 }, { 48, 5470 }, { 49, 5518 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 50, 5526 }, { 51, 5596 }, + { 52, 5767 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 53, 5810 }, { 54, 5822 }, { N_, 0 }, + { 55, 5830 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 56, 5836 }, { 57, 5839 }, { 58, 5842 }, + { 59, 6034 }, { 60, 6226 }, { 61, 6418 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 62, 6484 }, + { 63, 6497 }, { 64, 6672 }, { 65, 6770 }, + { 66, 6923 }, { 67, 6968 }, { 68, 7160 }, + { N_, 0 }, { 0x8008, 7247 }, { 69, 7597 }, + { 70, 7773 }, { 71, 7950 }, { 0x8009, 8142 }, + { 0x800A, 8919 }, { 72, 9351 }, { 73, 9522 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 5. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0x800B, 9743 }, + { 0x800C, 9999 }, { 0x800D, 10255 }, { 0x800E, 10511 }, + { 74, 10767 }, { 75, 10967 }, { N_, 0 }, + { N_, 0 }, { 76, 11139 }, { 77, 11303 }, + { 78, 11468 }, { 79, 11576 }, { 0x800F, 11740 }, + { 0x8010, 12006 }, { 0x8011, 12280 }, { 0x8012, 12546 }, + { 80, 12812 }, { 0x8013, 13060 }, { 0x8014, 13348 }, + { 81, 13720 }, { 82, 13898 }, { 83, 13933 }, + { 84, 14045 }, { 85, 14197 }, { 86, 14347 }, + { 87, 14410 }, { 88, 14540 }, { 89, 14729 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 6. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 90, 14829 }, { 91, 14912 }, + { 92, 14969 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 93, 14982 }, { 94, 15046 }, { 95, 15109 }, + { 96, 15163 }, { 97, 15225 }, { 98, 15282 }, + { 99, 15341 }, { 100, 15405 }, { 101, 15469 }, + { 102, 15533 }, { 103, 15597 }, { 104, 15681 }, + { 105, 15812 }, { 106, 15942 }, { 107, 16072 }, + { 108, 16202 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 7. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 0x8015, 16273 }, { 0x8016, 16536 }, + { 0x8017, 16799 }, { 0x8018, 17064 }, { 0x8019, 17329 }, + { 0x801A, 17601 }, { 0x801B, 17878 }, { 0x801C, 18147 }, + { 109, 18419 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + }, + { + { /* Third byte table 0. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0, 0 }, + { 1, 35 }, { 2, 247 }, { 3, 474 }, + { 4, 693 }, { 5, 709 }, { 6, 951 }, + { N_, 0 }, { 7, 1139 }, { 8, 1152 }, + { N_, 0 }, { 9, 1177 }, { 10, 1199 }, + { 11, 1295 }, { 12, 1362 }, { 13, 1407 }, + { N_, 0 }, { 14, 1452 }, { N_, 0 }, + { N_, 0 }, { 15, 1622 }, { N_, 0 }, + { 16, 1626 }, { 17, 1651 }, { N_, 0 }, + { 18, 1667 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 19, 1682 }, + { 20, 1703 }, { N_, 0 }, { 21, 1759 }, + { 22, 1794 }, { 23, 1808 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 24, 1836 }, + { 25, 1871 }, { 26, 1878 }, { N_, 0 }, + { 27, 1899 }, { N_, 0 }, { 28, 1906 }, + { N_, 0 }, { 29, 1944 }, { N_, 0 }, + { 30, 1965 }, { 31, 1996 }, { N_, 0 }, + { 32, 2002 }, { 33, 2008 }, { 34, 2020 }, + { 35, 2023 }, { 36, 2111 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 37, 2160 }, + { N_, 0 }, { N_, 0 }, { 38, 2167 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 39, 2170 }, { 40, 2226 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 41, 2247 }, { 42, 2268 }, { 43, 2340 }, + { N_, 0 }, { 0x8000, 2414 }, { 0x8001, 2694 }, + { 0x8002, 2990 }, { 0x8003, 3278 }, { 0x8004, 3586 }, + { 0x8005, 3974 }, { 0x8006, 4302 }, { 0x8007, 4785 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 44, 5144 }, + { 45, 5213 }, { 46, 5248 }, { N_, 0 }, + { 47, 5273 }, { 48, 5358 }, { 49, 5490 }, + { 50, 5508 }, { 51, 5526 }, { 52, 5586 }, + { 53, 5670 }, { 54, 5730 }, { 55, 5778 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 56, 5786 }, { 57, 5856 }, + { 58, 6027 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 59, 6070 }, { 60, 6082 }, { N_, 0 }, + { 61, 6090 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 62, 6096 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 63, 6099 }, { 64, 6102 }, { 65, 6105 }, + { 66, 6297 }, { 67, 6489 }, { 68, 6681 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 69, 6747 }, + { 70, 6760 }, { 71, 6935 }, { 72, 7033 }, + { 73, 7186 }, { 74, 7231 }, { 75, 7423 }, + { N_, 0 }, { 0x8008, 7510 }, { 76, 7891 }, + { 77, 8103 }, { 78, 8280 }, { 0x8009, 8482 }, + { 0x800A, 9259 }, { 79, 9701 }, { 80, 9872 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 5. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0x800B, 10106 }, + { 0x800C, 10362 }, { 0x800D, 10618 }, { 0x800E, 10874 }, + { 81, 11130 }, { 82, 11330 }, { 0x800F, 11566 }, + { 83, 11822 }, { 84, 11932 }, { 85, 12096 }, + { 86, 12261 }, { 87, 12369 }, { 0x8010, 12533 }, + { 0x8011, 12799 }, { 0x8012, 13073 }, { 0x8013, 13339 }, + { 88, 13605 }, { 0x8014, 13853 }, { 0x8015, 14141 }, + { 89, 14513 }, { 90, 14691 }, { 91, 14746 }, + { 92, 14860 }, { 93, 15012 }, { 94, 15162 }, + { 95, 15225 }, { 96, 15355 }, { 97, 15544 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 6. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 98, 15644 }, { 99, 15727 }, + { 100, 15784 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 101, 15797 }, { 102, 15861 }, { 103, 15924 }, + { 104, 15978 }, { 105, 16041 }, { 106, 16098 }, + { 107, 16157 }, { 108, 16221 }, { 109, 16285 }, + { 110, 16349 }, { 111, 16413 }, { 112, 16501 }, + { 113, 16632 }, { 114, 16762 }, { 115, 16892 }, + { 116, 17022 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + { /* Third byte table 7. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 0x8016, 17097 }, { 0x8017, 17360 }, + { 0x8018, 17623 }, { 0x8019, 17888 }, { 0x801A, 18153 }, + { 0x801B, 18425 }, { 0x801C, 18702 }, { 0x801D, 18971 }, + { 117, 19243 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, + }, + }, +}; + +static const uchar_t u8_decomp_b4_tbl[2][118][257] = { + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 5, 5, 5, 5, 5, + 8, 8, 8, 9, 10, 13, 15, 15, + 15, 18, 19, 20, 20, 25, 30, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 24, + 28, 32, 36, 40, 44, 48, 52, 56, + 60, 60, 64, 68, 72, 76, 80, 84, + 84, 84, 88, 92, 96, 100, 104, 104, + 104, 108, 112, 116, 120, 124, 128, 128, + 132, 136, 140, 144, 148, 152, 156, 160, + 164, 164, 168, 172, 176, 180, 184, 188, + 188, 188, 192, 196, 200, 204, 208, 208, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 64, 64, 68, 72, 76, 80, 84, + 88, 92, 96, 100, 104, 108, 112, 116, + 120, 124, 128, 132, 136, 140, 144, 144, + 144, 148, 152, 156, 160, 164, 168, 172, + 176, 180, 180, 182, 184, 188, 192, 196, + 200, 200, 204, 208, 212, 216, 220, 224, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 3, 7, 11, 15, 19, + 23, 27, 30, 30, 30, 34, 38, 42, + 46, 50, 54, 54, 54, 58, 62, 66, + 70, 74, 78, 82, 86, 90, 94, 98, + 102, 106, 110, 114, 118, 122, 126, 126, + 126, 130, 134, 138, 142, 146, 150, 154, + 158, 162, 166, 170, 174, 178, 182, 186, + 190, 194, 198, 202, 206, 210, 214, 218, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 12, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 8, 12, + 14, 16, 18, 20, 22, 24, 28, 32, + 36, 40, 44, 48, 52, 56, 62, 68, + 74, 80, 86, 92, 98, 104, 104, 110, + 116, 122, 128, 133, 138, 138, 138, 142, + 146, 150, 154, 158, 162, 168, 174, 179, + 184, 188, 190, 192, 194, 198, 202, 202, + 202, 206, 210, 216, 222, 227, 232, 237, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 112, 112, 116, + 120, 120, 120, 120, 120, 120, 120, 124, + 128, 132, 136, 142, 148, 154, 160, 164, + 168, 174, 180, 184, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 3, 4, 5, 7, 9, 11, + 12, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 18, + 18, 20, 21, 22, 23, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 6, 9, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 17, 17, 17, + 17, 17, 17, 20, 20, 20, 20, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 14, 19, + 22, 27, 32, 37, 37, 42, 42, 47, + 52, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 64, 69, 74, 79, 84, + 89, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 10, 15, 20, 25, + 25, 27, 29, 31, 41, 51, 53, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 57, 59, 61, 61, 63, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 65, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 10, 15, 15, 15, 15, + 20, 20, 20, 20, 20, 25, 30, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 10, 15, 15, 15, 15, + 20, 20, 20, 20, 20, 25, 30, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 40, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 15, 20, 25, 30, 30, 30, 35, + 40, 40, 40, 45, 50, 55, 60, 65, + 70, 70, 70, 75, 80, 85, 90, 95, + 100, 100, 100, 105, 110, 115, 120, 125, + 130, 135, 140, 145, 150, 155, 160, 160, + 160, 165, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 10, 15, 20, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 8, + 12, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 5, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 7, 7, 7, 7, + 7, 7, 14, 14, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 14, 21, 28, 35, 42, 49, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 21, 28, 28, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 14, 21, 21, 21, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 7, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 28, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 7, 7, 7, 7, 7, + 14, 21, 21, 28, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 7, 14, 24, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 14, 14, + 14, 14, 14, 21, 21, 21, 21, 21, + 28, 28, 28, 28, 28, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 49, 49, 56, 63, + 72, 79, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 21, 21, + 21, 21, 21, 28, 28, 28, 28, 28, + 35, 35, 35, 35, 35, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 21, 21, 21, 21, + 21, 21, 24, 24, 24, 24, 24, 24, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 28, 30, 33, + 33, 33, 33, 33, 33, 33, 33, 33, + 34, 34, 34, 34, 40, 49, 49, 55, + 64, 64, 64, 64, 64, 66, 66, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, + }, + { /* Fourth byte table 39. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 18, 18, 18, 18, 18, 18, 18, 18, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 20, 21, 21, 21, 22, 23, 24, + 25, 26, 27, 28, 31, 32, 33, 34, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 40. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 14, 15, 16, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, + }, + { /* Fourth byte table 41. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 7, 10, 10, 13, 16, + 18, 18, 21, 22, 23, 24, 25, 26, + 28, 29, 30, 31, 32, 32, 33, 35, + 35, 35, 36, 37, 38, 39, 40, 40, + 40, 42, 45, 47, 47, 48, 48, 51, + 51, 52, 52, 54, 58, 59, 60, 60, + 61, 62, 63, 63, 64, 65, 67, 69, + 71, 73, 74, 74, 74, 74, 76, 78, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, + 80, + }, + { /* Fourth byte table 42. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 3, 3, 3, 4, 5, + 6, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 13, 18, 23, 28, + 33, 38, 43, 48, 53, 58, 63, 68, + 72, 73, 75, 78, 80, 81, 83, 86, + 90, 92, 93, 95, 98, 99, 100, 101, + 102, 103, 105, 108, 110, 111, 113, 116, + 120, 122, 123, 125, 128, 129, 130, 131, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, + }, + { /* Fourth byte table 43. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, + }, + { /* Fourth byte table 44. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 6, 12, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, + }, + { /* Fourth byte table 45. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 6, + 6, 6, 12, 12, 12, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 24, 24, 30, + 30, 30, 30, 30, 30, 36, 45, 45, + 51, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, + }, + { /* Fourth byte table 46. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 6, 6, 12, 12, 12, + 18, 18, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 28, 28, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 40, 44, + 48, 54, 60, 60, 60, 66, 72, 72, + 72, 78, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, + }, + { /* Fourth byte table 47. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 12, 12, 18, 24, 24, + 24, 30, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 42, 48, 54, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, + }, + { /* Fourth byte table 48. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 24, 24, 24, + 24, 24, 24, 30, 36, 42, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 49. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, + }, + { /* Fourth byte table 50. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 11, 13, 15, 17, 19, 21, + 23, 25, 27, 29, 31, 34, 37, 40, + 43, 46, 49, 52, 55, 58, 62, 66, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, + }, + { /* Fourth byte table 51. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 53, 56, 59, 62, 65, 68, + 71, 74, 77, 80, 83, 86, 89, 92, + 95, 98, 101, 104, 107, 110, 113, 116, + 119, 122, 125, 128, 131, 134, 137, 140, + 143, 146, 149, 152, 155, 158, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, + }, + { /* Fourth byte table 52. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, + }, + { /* Fourth byte table 53. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, + }, + { /* Fourth byte table 54. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 5, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, + }, + { /* Fourth byte table 55. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, + }, + { /* Fourth byte table 56. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 57. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 58. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 59. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 60. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 61. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, + }, + { /* Fourth byte table 62. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 4, + 4, 7, 10, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, + }, + { /* Fourth byte table 63. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 7, 14, + 14, 21, 21, 28, 28, 35, 35, 42, + 42, 49, 49, 56, 56, 63, 63, 70, + 70, 77, 77, 84, 84, 84, 91, 91, + 98, 98, 105, 105, 105, 105, 105, 105, + 105, 112, 119, 119, 126, 133, 133, 140, + 147, 147, 154, 161, 161, 168, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, + }, + { /* Fourth byte table 64. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 7, 7, + 7, 7, 7, 7, 11, 15, 15, 22, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 35, 35, 42, + 42, 49, 49, 56, 56, 63, 63, 70, + 70, 77, 77, 84, 84, 91, 91, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, + }, + { /* Fourth byte table 65. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 14, 14, 14, 21, 21, + 28, 28, 35, 35, 35, 35, 35, 35, + 35, 42, 49, 49, 56, 63, 63, 70, + 77, 77, 84, 91, 91, 98, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 112, 112, 112, + 119, 126, 133, 140, 140, 140, 140, 147, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, + }, + { /* Fourth byte table 66. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 9, 12, 15, 18, + 21, 24, 27, 30, 33, 36, 39, 42, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, + }, + { /* Fourth byte table 67. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 68. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 45, 45, 45, 48, 51, 54, 57, 60, + 63, 66, 69, 72, 75, 78, 81, 84, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 69. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 15, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 22, 24, 26, 28, 30, 32, + 34, 36, 38, 40, 42, 44, 46, 48, + 50, 53, 56, 59, 62, 65, 68, 71, + 74, 77, 80, 83, 86, 89, 92, 98, + 104, 110, 116, 122, 128, 134, 140, 146, + 152, 158, 164, 170, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, + 176, + }, + { /* Fourth byte table 70. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 149, 151, 153, 155, 157, 159, + 161, 163, 165, 167, 169, 171, 173, 175, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, + }, + { /* Fourth byte table 71. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 41, 46, 51, 51, 51, 51, + 51, 54, 57, 60, 63, 66, 69, 72, + 75, 78, 81, 84, 87, 90, 93, 96, + 99, 102, 105, 108, 111, 114, 117, 120, + 123, 126, 129, 132, 135, 138, 141, 144, + 147, 150, 153, 156, 159, 162, 165, 168, + 171, 174, 177, 180, 183, 186, 189, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 72. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 7, 9, 11, 13, 15, + 17, 20, 24, 26, 28, 31, 34, 36, + 38, 40, 43, 46, 49, 52, 55, 57, + 59, 61, 63, 65, 68, 70, 72, 74, + 77, 80, 82, 85, 88, 91, 93, 96, + 101, 107, 109, 112, 115, 118, 121, 128, + 136, 138, 140, 143, 145, 147, 149, 152, + 154, 156, 158, 160, 162, 165, 167, 169, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, + }, + { /* Fourth byte table 73. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 10, 12, 14, 16, 22, + 25, 27, 29, 31, 33, 35, 37, 39, + 41, 43, 45, 48, 50, 52, 55, 58, + 60, 64, 67, 69, 71, 73, 75, 75, + 75, 79, 83, 87, 91, 95, 99, 103, + 107, 111, 116, 121, 126, 131, 136, 141, + 146, 151, 156, 161, 166, 171, 176, 181, + 186, 191, 196, 201, 206, 211, 216, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, + 221, + }, + { /* Fourth byte table 74. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 56, + 56, 60, 60, 64, 64, 64, 68, 72, + 76, 80, 84, 88, 92, 96, 100, 104, + 104, 108, 108, 112, 112, 112, 116, 120, + 120, 120, 120, 124, 128, 132, 136, 136, + 136, 140, 144, 148, 152, 156, 160, 164, + 168, 172, 176, 180, 184, 188, 192, 196, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, + }, + { /* Fourth byte table 75. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, + 172, + }, + { /* Fourth byte table 76. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 9, 12, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 20, 24, 28, 32, + 36, 36, 36, 36, 36, 36, 41, 41, + 46, 48, 50, 52, 54, 56, 58, 60, + 62, 64, 65, 70, 75, 82, 89, 94, + 99, 104, 109, 114, 119, 124, 129, 134, + 134, 139, 144, 149, 154, 159, 159, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, + }, + { /* Fourth byte table 77. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 10, 15, 20, 20, 25, + 30, 35, 40, 45, 50, 55, 60, 65, + 69, 71, 73, 75, 77, 79, 81, 83, + 85, 87, 89, 91, 93, 95, 97, 99, + 101, 103, 105, 107, 109, 111, 113, 115, + 117, 119, 121, 123, 125, 127, 129, 131, + 133, 135, 137, 139, 141, 143, 145, 147, + 149, 151, 153, 155, 157, 159, 161, 163, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, + }, + { /* Fourth byte table 78. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 76, 80, 82, + 84, 86, 88, 90, 92, 94, 96, 98, + 100, 104, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, + }, + { /* Fourth byte table 79. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 6, 8, + 10, 12, 14, 16, 18, 20, 24, 26, + 28, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 54, 60, 66, 72, 78, + 84, 90, 96, 102, 108, 114, 120, 126, + 132, 138, 144, 150, 156, 158, 160, 162, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, + }, + { /* Fourth byte table 80. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, + }, + { /* Fourth byte table 81. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 54, 60, 68, 76, 84, 92, 100, + 108, 116, 122, 155, 170, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, + }, + { /* Fourth byte table 82. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 5, 8, 9, 10, 11, 12, + 13, 14, 17, 20, 23, 26, 29, 32, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 83. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 15, 15, + 15, 15, 18, 21, 24, 27, 28, 29, + 30, 31, 34, 35, 35, 36, 37, 38, + 39, 42, 43, 44, 45, 46, 49, 52, + 53, 54, 55, 56, 57, 58, 59, 60, + 60, 61, 62, 63, 64, 64, 64, 64, + 64, 67, 71, 74, 74, 77, 77, 80, + 84, 87, 91, 94, 98, 101, 105, 108, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, + }, + { /* Fourth byte table 84. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 6, 10, 14, 18, 22, 26, + 30, 34, 38, 42, 46, 50, 52, 54, + 56, 58, 60, 62, 64, 66, 68, 70, + 72, 74, 76, 78, 80, 82, 84, 86, + 88, 90, 92, 94, 96, 98, 100, 102, + 104, 106, 108, 110, 112, 114, 116, 118, + 120, 122, 124, 126, 128, 130, 132, 134, + 136, 138, 140, 142, 144, 146, 148, 150, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, + }, + { /* Fourth byte table 85. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, + 80, 82, 84, 86, 88, 90, 92, 94, + 96, 98, 100, 102, 104, 106, 112, 118, + 124, 130, 136, 142, 146, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, + }, + { /* Fourth byte table 86. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 87. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 34, 37, 40, 43, 46, 49, 52, 55, + 58, 61, 64, 67, 70, 73, 76, 79, + 82, 85, 88, 91, 94, 97, 100, 103, + 106, 109, 112, 115, 118, 121, 124, 127, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 88. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, + }, + { /* Fourth byte table 89. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 6, 9, 12, 15, + 18, 18, 18, 21, 24, 27, 30, 33, + 36, 36, 36, 39, 42, 45, 48, 51, + 54, 54, 54, 57, 60, 63, 63, 63, + 63, 65, 67, 69, 72, 74, 76, 79, + 79, 82, 85, 88, 91, 94, 97, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, + }, + { /* Fourth byte table 90. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, + 18, 31, 44, 57, 70, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, + }, + { /* Fourth byte table 91. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 18, 31, 44, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, + }, + { /* Fourth byte table 92. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, + }, + { /* Fourth byte table 93. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 94. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 95. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 29, 30, + 31, 31, 31, 32, 32, 32, 33, 34, + 34, 34, 35, 36, 37, 38, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 50, 51, 51, 52, 53, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 96. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 2, 3, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 97. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 6, + 7, 8, 9, 10, 10, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 18, 19, + 20, 21, 22, 23, 24, 25, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 53, 54, 55, 56, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, + }, + { /* Fourth byte table 98. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 5, 6, + 6, 6, 6, 7, 8, 9, 10, 11, + 12, 13, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, + }, + { /* Fourth byte table 99. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 100. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 101. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 102. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 103. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 36, 36, 36, + 36, 38, 40, 42, 44, 46, 48, 50, + 52, 54, 56, 58, 60, 62, 64, 66, + 68, 70, 72, 74, 76, 78, 80, 82, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, + }, + { /* Fourth byte table 104. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 5, 7, 9, 11, 13, 15, + 17, 19, 21, 23, 25, 27, 29, 31, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 58, 60, 62, 64, + 66, 68, 70, 72, 74, 76, 78, 80, + 82, 84, 86, 88, 90, 92, 94, 96, + 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 123, 125, 127, 129, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, + }, + { /* Fourth byte table 105. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, + 97, 99, 101, 103, 105, 107, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 106. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, + 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 107. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 21, 23, 25, 27, 29, 31, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 86, 88, 90, 92, 94, 96, + 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 108. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 9, 11, 13, 15, + 17, 19, 21, 21, 21, 21, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, + }, + { /* Fourth byte table 109. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 9, 13, 17, 21, 25, 29, + 33, 37, 42, 46, 50, 54, 58, 62, + 66, 71, 75, 80, 85, 90, 94, 98, + 102, 106, 110, 114, 118, 122, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, + }, + { /* Fourth byte table 110. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 111. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 112. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 113. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 114. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 115. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 116. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 117. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + }, + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 5, 5, 5, 5, 5, + 8, 8, 8, 9, 10, 13, 15, 15, + 15, 18, 19, 20, 20, 25, 30, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 24, + 28, 32, 36, 40, 44, 48, 52, 56, + 60, 60, 64, 68, 72, 76, 80, 84, + 84, 84, 88, 92, 96, 100, 104, 104, + 104, 108, 112, 116, 120, 124, 128, 128, + 132, 136, 140, 144, 148, 152, 156, 160, + 164, 164, 168, 172, 176, 180, 184, 188, + 188, 188, 192, 196, 200, 204, 208, 208, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 64, 64, 68, 72, 76, 80, 84, + 88, 92, 96, 100, 104, 108, 112, 116, + 120, 124, 128, 132, 136, 140, 144, 144, + 144, 148, 152, 156, 160, 164, 168, 172, + 176, 180, 180, 182, 184, 188, 192, 196, + 200, 200, 204, 208, 212, 216, 220, 224, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, + 227, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 3, 7, 11, 15, 19, + 23, 27, 30, 30, 30, 34, 38, 42, + 46, 50, 54, 54, 54, 58, 62, 66, + 70, 74, 78, 82, 86, 90, 94, 98, + 102, 106, 110, 114, 118, 122, 126, 126, + 126, 130, 134, 138, 142, 146, 150, 154, + 158, 162, 166, 170, 174, 178, 182, 186, + 190, 194, 198, 202, 206, 210, 214, 218, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, + 219, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 12, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 8, 12, + 14, 16, 18, 20, 22, 24, 28, 32, + 36, 40, 44, 48, 52, 56, 62, 68, + 74, 80, 86, 92, 98, 104, 104, 110, + 116, 122, 128, 133, 138, 138, 138, 142, + 146, 150, 154, 158, 162, 168, 174, 179, + 184, 188, 190, 192, 194, 198, 202, 202, + 202, 206, 210, 216, 222, 227, 232, 237, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, + 242, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 112, 112, 116, + 120, 120, 120, 120, 120, 120, 120, 124, + 128, 132, 136, 142, 148, 154, 160, 164, + 168, 174, 180, 184, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, + 188, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 3, 4, 5, 7, 9, 11, + 12, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 18, + 18, 20, 21, 22, 23, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 6, 9, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 17, 17, 17, + 17, 17, 17, 20, 20, 20, 20, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 14, 19, + 22, 27, 32, 37, 37, 42, 42, 47, + 52, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 64, 69, 74, 79, 84, + 89, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 10, 15, 20, 25, + 25, 27, 29, 31, 41, 51, 53, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 57, 59, 61, 61, 63, 65, 65, + 65, 65, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 10, 15, 15, 15, 15, + 20, 20, 20, 20, 20, 25, 30, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 10, 15, 15, 15, 15, + 20, 20, 20, 20, 20, 25, 30, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 40, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 15, 20, 25, 30, 30, 30, 35, + 40, 40, 40, 45, 50, 55, 60, 65, + 70, 70, 70, 75, 80, 85, 90, 95, + 100, 100, 100, 105, 110, 115, 120, 125, + 130, 135, 140, 145, 150, 155, 160, 160, + 160, 165, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + 170, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 10, 15, 20, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 8, + 12, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 5, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 7, 7, 7, 7, + 7, 7, 14, 14, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 14, 21, 28, 35, 42, 49, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 21, 28, 28, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 14, 21, 21, 21, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 7, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 28, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 7, 7, 7, 7, 7, + 14, 21, 21, 28, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 14, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 7, 14, 24, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, + 31, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 14, 14, + 14, 14, 14, 21, 21, 21, 21, 21, + 28, 28, 28, 28, 28, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 49, 49, 56, 63, + 72, 79, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 21, 21, + 21, 21, 21, 28, 28, 28, 28, 28, + 35, 35, 35, 35, 35, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, + 49, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 39. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, + 7, 14, 14, 21, 21, 28, 28, 35, + 35, 35, 35, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 49, 49, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 40. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 14, 14, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 41. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 3, 4, + 4, 5, 6, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 16, 17, 19, 20, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 42. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 6, 8, 11, + 12, 13, 14, 16, 18, 20, 21, 21, + 22, 23, 25, 26, 28, 31, 34, 35, + 36, 37, 40, 42, 43, 46, 48, 50, + 52, 54, 56, 57, 58, 59, 60, 62, + 64, 66, 68, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, + }, + { /* Fourth byte table 43. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 3, 5, 7, + 9, 10, 12, 14, 16, 18, 20, 22, + 25, 27, 29, 32, 34, 36, 38, 40, + 42, 44, 46, 48, 50, 52, 54, 56, + 58, 61, 63, 65, 66, 68, 70, 72, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, + }, + { /* Fourth byte table 44. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 21, 21, 21, 21, + 21, 21, 24, 24, 24, 24, 24, 24, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 28, 30, 33, + 33, 33, 33, 33, 33, 33, 33, 33, + 34, 34, 34, 34, 40, 49, 49, 55, + 64, 64, 64, 64, 64, 66, 66, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, + }, + { /* Fourth byte table 45. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 18, 18, 18, 18, 18, 18, 18, 18, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 20, 21, 21, 21, 22, 23, 24, + 25, 26, 27, 28, 31, 32, 33, 34, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, + 35, + }, + { /* Fourth byte table 46. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 14, 15, 16, 17, + 17, 18, 19, 20, 21, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, + 23, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, + }, + { /* Fourth byte table 47. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 7, 10, 10, 13, 16, + 18, 18, 21, 22, 23, 24, 25, 26, + 28, 29, 30, 31, 32, 32, 33, 35, + 35, 35, 36, 37, 38, 39, 40, 40, + 40, 42, 45, 47, 47, 48, 48, 51, + 51, 52, 52, 54, 58, 59, 60, 60, + 61, 62, 63, 63, 64, 65, 67, 69, + 71, 73, 74, 74, 77, 79, 81, 83, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, + 85, + }, + { /* Fourth byte table 48. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 3, 3, 3, 4, 5, + 6, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 13, 18, 23, 28, + 33, 38, 43, 48, 53, 58, 63, 68, + 72, 73, 75, 78, 80, 81, 83, 86, + 90, 92, 93, 95, 98, 99, 100, 101, + 102, 103, 105, 108, 110, 111, 113, 116, + 120, 122, 123, 125, 128, 129, 130, 131, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, + 132, + }, + { /* Fourth byte table 49. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, + }, + { /* Fourth byte table 50. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 6, 12, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, + }, + { /* Fourth byte table 51. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 6, + 6, 6, 12, 12, 12, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 24, 24, 30, + 30, 30, 30, 30, 30, 36, 45, 45, + 51, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, + }, + { /* Fourth byte table 52. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 6, 6, 12, 12, 12, + 18, 18, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 28, 28, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 40, 44, + 48, 54, 60, 60, 60, 66, 72, 72, + 72, 78, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, + }, + { /* Fourth byte table 53. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 12, 12, 18, 24, 24, + 24, 30, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 42, 48, 54, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, + }, + { /* Fourth byte table 54. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 24, 24, 24, + 24, 24, 24, 30, 36, 42, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 55. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, + }, + { /* Fourth byte table 56. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 11, 13, 15, 17, 19, 21, + 23, 25, 27, 29, 31, 34, 37, 40, + 43, 46, 49, 52, 55, 58, 62, 66, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, + }, + { /* Fourth byte table 57. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 53, 56, 59, 62, 65, 68, + 71, 74, 77, 80, 83, 86, 89, 92, + 95, 98, 101, 104, 107, 110, 113, 116, + 119, 122, 125, 128, 131, 134, 137, 140, + 143, 146, 149, 152, 155, 158, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, + }, + { /* Fourth byte table 58. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, + 43, + }, + { /* Fourth byte table 59. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, + }, + { /* Fourth byte table 60. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 5, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, + }, + { /* Fourth byte table 61. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, + }, + { /* Fourth byte table 62. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 63. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 64. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 65. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 66. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 67. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 68. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, + }, + { /* Fourth byte table 69. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 4, + 4, 7, 10, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, + }, + { /* Fourth byte table 70. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 7, 14, + 14, 21, 21, 28, 28, 35, 35, 42, + 42, 49, 49, 56, 56, 63, 63, 70, + 70, 77, 77, 84, 84, 84, 91, 91, + 98, 98, 105, 105, 105, 105, 105, 105, + 105, 112, 119, 119, 126, 133, 133, 140, + 147, 147, 154, 161, 161, 168, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, + 175, + }, + { /* Fourth byte table 71. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 7, 7, + 7, 7, 7, 7, 11, 15, 15, 22, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 35, 35, 42, + 42, 49, 49, 56, 56, 63, 63, 70, + 70, 77, 77, 84, 84, 91, 91, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, + 98, + }, + { /* Fourth byte table 72. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 14, 14, 14, 21, 21, + 28, 28, 35, 35, 35, 35, 35, 35, + 35, 42, 49, 49, 56, 63, 63, 70, + 77, 77, 84, 91, 91, 98, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 112, 112, 112, + 119, 126, 133, 140, 140, 140, 140, 147, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, + 153, + }, + { /* Fourth byte table 73. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 9, 12, 15, 18, + 21, 24, 27, 30, 33, 36, 39, 42, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, + }, + { /* Fourth byte table 74. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, + }, + { /* Fourth byte table 75. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 45, 45, 45, 48, 51, 54, 57, 60, + 63, 66, 69, 72, 75, 78, 81, 84, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 76. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 15, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 23, 25, 27, 29, 31, 33, 35, + 37, 39, 41, 43, 45, 47, 49, 51, + 53, 56, 59, 62, 65, 68, 71, 74, + 77, 80, 83, 86, 89, 92, 95, 101, + 107, 113, 119, 125, 131, 137, 143, 149, + 155, 161, 167, 173, 179, 194, 206, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, + 212, + }, + { /* Fourth byte table 77. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 149, 151, 153, 155, 157, 159, + 161, 163, 165, 167, 169, 171, 173, 175, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, + 177, + }, + { /* Fourth byte table 78. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 41, 46, 51, 53, 56, 58, + 61, 64, 67, 70, 73, 76, 79, 82, + 85, 88, 91, 94, 97, 100, 103, 106, + 109, 112, 115, 118, 121, 124, 127, 130, + 133, 136, 139, 142, 145, 148, 151, 154, + 157, 160, 163, 166, 169, 172, 175, 178, + 181, 184, 187, 190, 193, 196, 199, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, + 202, + }, + { /* Fourth byte table 79. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 7, 9, 11, 13, 15, + 17, 20, 24, 26, 28, 31, 34, 36, + 38, 40, 43, 46, 49, 52, 55, 57, + 59, 61, 63, 65, 68, 70, 72, 74, + 77, 80, 82, 85, 88, 91, 93, 96, + 101, 107, 109, 112, 115, 118, 121, 128, + 136, 138, 140, 143, 145, 147, 149, 152, + 154, 156, 158, 160, 162, 165, 167, 169, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, + 171, + }, + { /* Fourth byte table 80. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 10, 12, 14, 16, 22, + 25, 27, 29, 31, 33, 35, 37, 39, + 41, 43, 45, 48, 50, 52, 55, 58, + 60, 64, 67, 69, 71, 73, 75, 80, + 85, 89, 93, 97, 101, 105, 109, 113, + 117, 121, 126, 131, 136, 141, 146, 151, + 156, 161, 166, 171, 176, 181, 186, 191, + 196, 201, 206, 211, 216, 221, 226, 231, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, + }, + { /* Fourth byte table 81. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 56, + 56, 60, 60, 64, 64, 64, 68, 72, + 76, 80, 84, 88, 92, 96, 100, 104, + 104, 108, 108, 112, 112, 112, 116, 120, + 120, 120, 120, 124, 128, 132, 136, 136, + 136, 140, 144, 148, 152, 156, 160, 164, + 168, 172, 176, 180, 184, 188, 192, 196, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, + 200, + }, + { /* Fourth byte table 82. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 172, 172, 172, 172, + 172, 176, 180, 184, 188, 192, 196, 200, + 204, 208, 212, 216, 220, 224, 228, 232, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, + }, + { /* Fourth byte table 83. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 65, 70, 75, 79, 83, 87, 92, 97, + 102, 106, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, + 110, + }, + { /* Fourth byte table 84. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 9, 12, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 20, 24, 28, 32, + 36, 36, 36, 36, 36, 36, 41, 41, + 46, 48, 50, 52, 54, 56, 58, 60, + 62, 64, 65, 70, 75, 82, 89, 94, + 99, 104, 109, 114, 119, 124, 129, 134, + 134, 139, 144, 149, 154, 159, 159, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, + }, + { /* Fourth byte table 85. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 10, 15, 20, 20, 25, + 30, 35, 40, 45, 50, 55, 60, 65, + 69, 71, 73, 75, 77, 79, 81, 83, + 85, 87, 89, 91, 93, 95, 97, 99, + 101, 103, 105, 107, 109, 111, 113, 115, + 117, 119, 121, 123, 125, 127, 129, 131, + 133, 135, 137, 139, 141, 143, 145, 147, + 149, 151, 153, 155, 157, 159, 161, 163, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, + 165, + }, + { /* Fourth byte table 86. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 76, 80, 82, + 84, 86, 88, 90, 92, 94, 96, 98, + 100, 104, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, + 108, + }, + { /* Fourth byte table 87. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 6, 8, + 10, 12, 14, 16, 18, 20, 24, 26, + 28, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 54, 60, 66, 72, 78, + 84, 90, 96, 102, 108, 114, 120, 126, + 132, 138, 144, 150, 156, 158, 160, 162, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, + 164, + }, + { /* Fourth byte table 88. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, + }, + { /* Fourth byte table 89. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 54, 60, 68, 76, 84, 92, 100, + 108, 116, 122, 155, 170, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, + 178, + }, + { /* Fourth byte table 90. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 4, 7, 8, 9, 10, 11, + 14, 17, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 22, 25, 28, 29, 30, 31, 32, + 33, 34, 37, 40, 43, 46, 49, 52, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, + }, + { /* Fourth byte table 91. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 15, 15, + 16, 17, 20, 23, 26, 29, 30, 31, + 32, 33, 36, 37, 37, 38, 39, 40, + 41, 44, 45, 46, 47, 48, 51, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 62, 63, 64, 65, 66, 66, 66, 66, + 66, 69, 73, 76, 76, 79, 79, 82, + 86, 89, 93, 96, 100, 103, 107, 110, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, + }, + { /* Fourth byte table 92. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 6, 10, 14, 18, 22, 26, + 30, 34, 38, 42, 46, 50, 52, 54, + 56, 58, 60, 62, 64, 66, 68, 70, + 72, 74, 76, 78, 80, 82, 84, 86, + 88, 90, 92, 94, 96, 98, 100, 102, + 104, 106, 108, 110, 112, 114, 116, 118, + 120, 122, 124, 126, 128, 130, 132, 134, + 136, 138, 140, 142, 144, 146, 148, 150, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, + }, + { /* Fourth byte table 93. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, + 80, 82, 84, 86, 88, 90, 92, 94, + 96, 98, 100, 102, 104, 106, 112, 118, + 124, 130, 136, 142, 146, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, + 150, + }, + { /* Fourth byte table 94. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 95. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 34, 37, 40, 43, 46, 49, 52, 55, + 58, 61, 64, 67, 70, 73, 76, 79, + 82, 85, 88, 91, 94, 97, 100, 103, + 106, 109, 112, 115, 118, 121, 124, 127, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 96. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 156, 159, 162, 165, + 168, 171, 174, 177, 180, 183, 186, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, + 189, + }, + { /* Fourth byte table 97. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 6, 9, 12, 15, + 18, 18, 18, 21, 24, 27, 30, 33, + 36, 36, 36, 39, 42, 45, 48, 51, + 54, 54, 54, 57, 60, 63, 63, 63, + 63, 65, 67, 69, 72, 74, 76, 79, + 79, 82, 85, 88, 91, 94, 97, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, + 100, + }, + { /* Fourth byte table 98. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, + 18, 31, 44, 57, 70, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, + }, + { /* Fourth byte table 99. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 18, 31, 44, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, + }, + { /* Fourth byte table 100. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, + }, + { /* Fourth byte table 101. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 102. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 103. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 29, 30, + 31, 31, 31, 32, 32, 32, 33, 34, + 34, 34, 35, 36, 37, 38, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 50, 51, 51, 52, 53, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 104. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 105. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 6, + 7, 8, 9, 10, 10, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 18, 19, + 20, 21, 22, 23, 24, 25, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 53, 54, 55, 56, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, + }, + { /* Fourth byte table 106. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 5, 6, + 6, 6, 6, 7, 8, 9, 10, 11, + 12, 13, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, + }, + { /* Fourth byte table 107. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 108. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 109. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 110. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 111. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 38, 40, 40, + 40, 42, 44, 46, 48, 50, 52, 54, + 56, 58, 60, 62, 64, 66, 68, 70, + 72, 74, 76, 78, 80, 82, 84, 86, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, + 88, + }, + { /* Fourth byte table 112. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 5, 7, 9, 11, 13, 15, + 17, 19, 21, 23, 25, 27, 29, 31, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 58, 60, 62, 64, + 66, 68, 70, 72, 74, 76, 78, 80, + 82, 84, 86, 88, 90, 92, 94, 96, + 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 123, 125, 127, 129, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, + 131, + }, + { /* Fourth byte table 113. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, + 97, 99, 101, 103, 105, 107, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 114. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, + 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 115. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 21, 23, 25, 27, 29, 31, + 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, + 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 86, 88, 90, 92, 94, 96, + 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, + 130, + }, + { /* Fourth byte table 116. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 9, 11, 13, 15, + 17, 19, 21, 23, 25, 25, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, + }, + { /* Fourth byte table 117. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 9, 13, 17, 21, 25, 29, + 33, 37, 42, 46, 50, 54, 58, 62, + 66, 71, 75, 80, 85, 90, 94, 98, + 102, 106, 110, 114, 118, 122, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, + }, + }, +}; + +static const uint16_t u8_decomp_b4_16bit_tbl[2][30][257] = { + { + { /* Fourth byte 16-bit table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 38, 44, 48, 52, 56, 60, 64, + 68, 72, 76, 80, 84, 90, 96, 102, + 108, 112, 116, 120, 124, 130, 136, 140, + 144, 148, 152, 156, 160, 164, 168, 172, + 176, 180, 184, 188, 192, 196, 200, 206, + 212, 216, 220, 224, 228, 232, 236, 240, + 244, 250, 256, 260, 264, 268, 272, 276, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, + }, + { /* Fourth byte 16-bit table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 54, 60, 66, + 72, 78, 84, 90, 96, 100, 104, 108, + 112, 116, 120, 124, 128, 134, 140, 144, + 148, 152, 156, 160, 164, 170, 176, 182, + 188, 194, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 262, 268, 274, 280, 284, 288, 292, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, + }, + { /* Fourth byte 16-bit table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 107, 116, 116, 116, 116, + 116, 120, 124, 128, 132, 138, 144, 150, + 156, 162, 168, 174, 180, 186, 192, 198, + 204, 210, 216, 222, 228, 234, 240, 246, + 252, 256, 260, 264, 268, 272, 276, 282, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, + }, + { /* Fourth byte 16-bit table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 52, 56, 60, 64, 68, 72, 76, + 80, 86, 92, 98, 104, 110, 116, 122, + 128, 134, 140, 146, 152, 158, 164, 170, + 176, 182, 188, 194, 200, 204, 208, 212, + 216, 222, 228, 234, 240, 246, 252, 258, + 264, 270, 276, 280, 284, 288, 292, 296, + 300, 304, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, + }, + { /* Fourth byte 16-bit table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 17, 24, 31, 38, 45, + 52, 57, 62, 69, 76, 83, 90, 97, + 104, 109, 114, 121, 128, 135, 142, 142, + 142, 147, 152, 159, 166, 173, 180, 180, + 180, 185, 190, 197, 204, 211, 218, 225, + 232, 237, 242, 249, 256, 263, 270, 277, + 284, 289, 294, 301, 308, 315, 322, 329, + 336, 341, 346, 353, 360, 367, 374, 381, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, + }, + { /* Fourth byte 16-bit table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 17, 24, 31, 38, 38, + 38, 43, 48, 55, 62, 69, 76, 76, + 76, 81, 86, 93, 100, 107, 114, 121, + 128, 128, 133, 133, 140, 140, 147, 147, + 154, 159, 164, 171, 178, 185, 192, 199, + 206, 211, 216, 223, 230, 237, 244, 251, + 258, 263, 268, 273, 278, 283, 288, 293, + 298, 303, 308, 313, 318, 323, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, + }, + { /* Fourth byte 16-bit table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 14, 23, 32, 41, 50, 59, + 68, 75, 82, 91, 100, 109, 118, 127, + 136, 143, 150, 159, 168, 177, 186, 195, + 204, 211, 218, 227, 236, 245, 254, 263, + 272, 279, 286, 295, 304, 313, 322, 331, + 340, 347, 354, 363, 372, 381, 390, 399, + 408, 413, 418, 425, 430, 437, 437, 442, + 449, 454, 459, 464, 469, 474, 477, 480, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, + }, + { /* Fourth byte 16-bit table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 14, 21, 26, 33, 33, 38, + 45, 50, 55, 60, 65, 70, 82, 94, + 106, 111, 116, 123, 130, 130, 130, 135, + 142, 147, 152, 157, 162, 162, 174, 186, + 198, 203, 208, 215, 222, 227, 232, 237, + 244, 249, 254, 259, 264, 269, 280, 291, + 293, 293, 293, 300, 305, 312, 312, 317, + 324, 329, 334, 339, 344, 349, 356, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, + }, + { /* Fourth byte 16-bit table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 15, 20, 25, 30, 35, + 40, 45, 50, 55, 60, 65, 70, 78, + 86, 94, 102, 110, 118, 126, 134, 142, + 150, 158, 166, 174, 182, 190, 190, 190, + 190, 195, 200, 205, 210, 215, 220, 225, + 230, 235, 240, 245, 250, 255, 260, 265, + 270, 275, 280, 285, 290, 295, 300, 305, + 310, 315, 320, 325, 330, 335, 340, 345, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 350, + 350, + }, + { /* Fourth byte 16-bit table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 27, 42, 51, 66, 75, 84, + 102, 114, 123, 132, 141, 153, 165, 177, + 189, 201, 213, 225, 243, 249, 267, 285, + 300, 312, 330, 348, 360, 369, 378, 390, + 402, 417, 432, 441, 450, 462, 471, 480, + 486, 492, 501, 510, 528, 540, 555, 573, + 585, 594, 603, 621, 633, 651, 660, 675, + 684, 696, 705, 717, 732, 744, 759, 771, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, + }, + { /* Fourth byte 16-bit table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 24, 33, 45, 54, 63, 72, + 87, 99, 105, 123, 132, 147, 159, 171, + 180, 189, 201, 207, 219, 234, 240, 258, + 267, 271, 275, 279, 283, 287, 291, 295, + 299, 303, 307, 312, 317, 322, 327, 332, + 337, 342, 347, 352, 357, 362, 367, 372, + 377, 382, 385, 387, 389, 392, 394, 396, + 396, 396, 396, 396, 402, 408, 414, 420, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, + 432, + }, + { /* Fourth byte 16-bit table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 34, 38, + 42, 46, 50, 54, 58, 62, 66, 70, + 74, 78, 82, 86, 90, 94, 98, 102, + 106, 110, 114, 118, 122, 126, 130, 134, + 138, 142, 146, 150, 154, 158, 162, 166, + 170, 174, 178, 182, 186, 190, 194, 198, + 202, 206, 210, 214, 218, 222, 226, 230, + 234, 238, 242, 246, 250, 254, 258, 262, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, + }, + { /* Fourth byte 16-bit table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 125, + 130, 135, 140, 145, 150, 156, 162, 168, + 174, 180, 186, 190, 194, 198, 202, 206, + 210, 214, 218, 222, 226, 230, 234, 238, + 242, 246, 250, 254, 258, 262, 266, 270, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, + }, + { /* Fourth byte 16-bit table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 98, 104, 110, 116, 122, 126, 130, 134, + 138, 142, 146, 150, 154, 158, 162, 166, + 170, 174, 178, 182, 186, 190, 194, 198, + 202, 206, 210, 214, 218, 222, 226, 230, + 234, 238, 242, 246, 250, 254, 258, 262, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, + }, + { /* Fourth byte 16-bit table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 130, 136, 140, 144, 148, 152, 156, 160, + 164, 168, 172, 176, 180, 184, 188, 192, + 196, 200, 204, 210, 216, 222, 226, 230, + 234, 238, 242, 246, 250, 254, 258, 262, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, + }, + { /* Fourth byte 16-bit table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 54, 60, 66, 72, 78, 84, 90, + 96, 102, 108, 114, 120, 126, 132, 138, + 144, 150, 156, 162, 168, 174, 180, 186, + 192, 198, 204, 210, 216, 222, 228, 234, + 240, 246, 252, 258, 264, 270, 276, 282, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, + }, + { /* Fourth byte 16-bit table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 54, 60, 66, 72, 78, 84, 90, + 96, 96, 96, 102, 108, 114, 120, 126, + 132, 138, 144, 150, 156, 162, 168, 174, + 180, 186, 192, 198, 204, 210, 216, 222, + 228, 234, 240, 246, 252, 258, 264, 270, + 276, 282, 288, 294, 300, 306, 312, 318, + 324, 330, 336, 342, 348, 354, 360, 366, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, + }, + { /* Fourth byte 16-bit table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 17, 21, 25, 29, + 33, 37, 41, 45, 49, 53, 58, 62, + 66, 70, 74, 79, 83, 87, 91, 96, + 100, 104, 108, 112, 116, 121, 125, 129, + 133, 137, 141, 145, 149, 153, 157, 161, + 165, 169, 173, 177, 181, 185, 189, 193, + 197, 201, 205, 209, 213, 218, 222, 226, + 230, 235, 239, 243, 247, 251, 255, 259, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, + }, + { /* Fourth byte 16-bit table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 105, 109, 113, 117, 121, 125, + 129, 134, 139, 143, 147, 151, 155, 159, + 163, 167, 171, 175, 179, 184, 188, 192, + 196, 200, 205, 209, 213, 217, 221, 225, + 229, 233, 237, 241, 246, 250, 255, 259, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, + }, + { /* Fourth byte 16-bit table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 41, 45, 49, 53, 57, 61, + 66, 70, 75, 80, 84, 88, 92, 96, + 101, 106, 110, 114, 118, 122, 126, 130, + 134, 138, 142, 146, 150, 155, 159, 163, + 167, 171, 175, 179, 183, 187, 191, 195, + 199, 203, 207, 211, 215, 219, 223, 227, + 231, 236, 240, 244, 248, 252, 256, 261, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, + }, + { /* Fourth byte 16-bit table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 45, 49, 53, 57, 61, + 65, 69, 73, 77, 81, 85, 89, 93, + 97, 101, 105, 109, 113, 117, 122, 126, + 130, 134, 138, 142, 147, 151, 155, 159, + 163, 167, 171, 175, 179, 184, 188, 192, + 196, 201, 205, 209, 213, 217, 221, 225, + 230, 235, 240, 244, 249, 253, 257, 261, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, + }, + { /* Fourth byte 16-bit table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 29, + 33, 37, 41, 45, 49, 53, 58, 62, + 66, 71, 76, 80, 84, 88, 92, 96, + 100, 104, 108, 112, 117, 121, 126, 130, + 135, 139, 143, 147, 152, 156, 160, 165, + 170, 174, 178, 182, 186, 190, 194, 198, + 202, 206, 210, 214, 218, 222, 227, 231, + 236, 240, 245, 249, 254, 259, 264, 268, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, + }, + { /* Fourth byte 16-bit table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 9, 14, 19, 24, 28, 32, + 36, 40, 44, 48, 52, 56, 61, 65, + 69, 73, 77, 82, 86, 91, 96, 100, + 104, 108, 112, 116, 120, 125, 130, 135, + 139, 143, 148, 152, 156, 160, 165, 169, + 173, 177, 181, 185, 190, 194, 198, 202, + 206, 210, 214, 219, 224, 228, 233, 237, + 242, 246, 250, 254, 259, 264, 268, 273, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, + }, + { /* Fourth byte 16-bit table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 9, 13, 17, 21, 25, 29, + 34, 39, 44, 49, 53, 57, 61, 65, + 69, 73, 77, 81, 85, 89, 93, 97, + 102, 106, 110, 114, 118, 122, 126, 130, + 134, 138, 142, 146, 150, 155, 160, 165, + 169, 173, 177, 181, 186, 190, 195, 199, + 203, 208, 213, 217, 221, 225, 229, 233, + 237, 241, 245, 249, 253, 257, 261, 265, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, + }, + { /* Fourth byte 16-bit table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 25, 29, + 33, 37, 41, 45, 50, 55, 59, 63, + 67, 71, 75, 79, 84, 88, 92, 96, + 100, 105, 110, 114, 118, 122, 127, 131, + 135, 140, 145, 149, 153, 157, 162, 166, + 170, 174, 178, 182, 186, 190, 195, 199, + 203, 207, 212, 216, 220, 224, 228, 233, + 238, 242, 246, 250, 255, 259, 264, 268, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, + }, + { /* Fourth byte 16-bit table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + }, + { + { /* Fourth byte 16-bit table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 38, 44, 48, 52, 56, 60, 64, + 68, 72, 76, 80, 84, 90, 96, 102, + 108, 112, 116, 120, 124, 130, 136, 140, + 144, 148, 152, 156, 160, 164, 168, 172, + 176, 180, 184, 188, 192, 196, 200, 206, + 212, 216, 220, 224, 228, 232, 236, 240, + 244, 250, 256, 260, 264, 268, 272, 276, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, + 280, + }, + { /* Fourth byte 16-bit table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 54, 60, 66, + 72, 78, 84, 90, 96, 100, 104, 108, + 112, 116, 120, 124, 128, 134, 140, 144, + 148, 152, 156, 160, 164, 170, 176, 182, + 188, 194, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 262, 268, 274, 280, 284, 288, 292, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, + 296, + }, + { /* Fourth byte 16-bit table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 107, 116, 116, 116, 116, + 116, 120, 124, 128, 132, 138, 144, 150, + 156, 162, 168, 174, 180, 186, 192, 198, + 204, 210, 216, 222, 228, 234, 240, 246, + 252, 256, 260, 264, 268, 272, 276, 282, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, + }, + { /* Fourth byte 16-bit table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 52, 56, 60, 64, 68, 72, 76, + 80, 86, 92, 98, 104, 110, 116, 122, + 128, 134, 140, 146, 152, 158, 164, 170, + 176, 182, 188, 194, 200, 204, 208, 212, + 216, 222, 228, 234, 240, 246, 252, 258, + 264, 270, 276, 280, 284, 288, 292, 296, + 300, 304, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, + 308, + }, + { /* Fourth byte 16-bit table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 17, 24, 31, 38, 45, + 52, 57, 62, 69, 76, 83, 90, 97, + 104, 109, 114, 121, 128, 135, 142, 142, + 142, 147, 152, 159, 166, 173, 180, 180, + 180, 185, 190, 197, 204, 211, 218, 225, + 232, 237, 242, 249, 256, 263, 270, 277, + 284, 289, 294, 301, 308, 315, 322, 329, + 336, 341, 346, 353, 360, 367, 374, 381, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, + 388, + }, + { /* Fourth byte 16-bit table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 17, 24, 31, 38, 38, + 38, 43, 48, 55, 62, 69, 76, 76, + 76, 81, 86, 93, 100, 107, 114, 121, + 128, 128, 133, 133, 140, 140, 147, 147, + 154, 159, 164, 171, 178, 185, 192, 199, + 206, 211, 216, 223, 230, 237, 244, 251, + 258, 263, 268, 273, 278, 283, 288, 293, + 298, 303, 308, 313, 318, 323, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, + 328, + }, + { /* Fourth byte 16-bit table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 14, 23, 32, 41, 50, 59, + 68, 75, 82, 91, 100, 109, 118, 127, + 136, 143, 150, 159, 168, 177, 186, 195, + 204, 211, 218, 227, 236, 245, 254, 263, + 272, 279, 286, 295, 304, 313, 322, 331, + 340, 347, 354, 363, 372, 381, 390, 399, + 408, 413, 418, 425, 430, 437, 437, 442, + 449, 454, 459, 464, 469, 474, 477, 480, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 483, 483, 483, 483, 483, 483, + 483, + }, + { /* Fourth byte 16-bit table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 14, 21, 26, 33, 33, 38, + 45, 50, 55, 60, 65, 70, 82, 94, + 106, 111, 116, 123, 130, 130, 130, 135, + 142, 147, 152, 157, 162, 162, 174, 186, + 198, 203, 208, 215, 222, 227, 232, 237, + 244, 249, 254, 259, 264, 269, 280, 291, + 293, 293, 293, 300, 305, 312, 312, 317, + 324, 329, 334, 339, 344, 349, 356, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, + }, + { /* Fourth byte 16-bit table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 10, 15, 20, 25, 30, 35, + 40, 45, 50, 55, 60, 65, 70, 78, + 86, 94, 102, 110, 118, 126, 134, 142, + 150, 158, 166, 174, 182, 190, 207, 221, + 221, 226, 231, 236, 241, 246, 251, 256, + 261, 266, 271, 276, 281, 286, 291, 296, + 301, 306, 311, 316, 321, 326, 331, 336, + 341, 346, 351, 356, 361, 366, 371, 376, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, + 381, + }, + { /* Fourth byte 16-bit table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 27, 42, 51, 66, 75, 84, + 102, 114, 123, 132, 141, 153, 165, 177, + 189, 201, 213, 225, 243, 249, 267, 285, + 300, 312, 330, 348, 360, 369, 378, 390, + 402, 417, 432, 441, 450, 462, 471, 480, + 486, 492, 501, 510, 528, 540, 555, 573, + 585, 594, 603, 621, 633, 651, 660, 675, + 684, 696, 705, 717, 732, 744, 759, 771, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, + 777, + }, + { /* Fourth byte 16-bit table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 24, 33, 45, 54, 63, 72, + 87, 99, 105, 123, 132, 147, 159, 171, + 180, 189, 201, 207, 219, 234, 240, 258, + 267, 271, 275, 279, 283, 287, 291, 295, + 299, 303, 307, 312, 317, 322, 327, 332, + 337, 342, 347, 352, 357, 362, 367, 372, + 377, 382, 385, 387, 389, 392, 394, 396, + 398, 401, 404, 406, 412, 418, 424, 430, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, + 442, + }, + { /* Fourth byte 16-bit table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 164, 168, 172, 176, 180, 184, 188, + 192, 196, 200, 204, 208, 212, 216, 220, + 224, 228, 232, 236, 240, 244, 248, 252, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, + 256, + }, + { /* Fourth byte 16-bit table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 34, 38, + 42, 46, 50, 54, 58, 62, 66, 70, + 74, 78, 82, 86, 90, 94, 98, 102, + 106, 110, 114, 118, 122, 126, 130, 134, + 138, 142, 146, 150, 154, 158, 162, 166, + 170, 174, 178, 182, 186, 190, 194, 198, + 202, 206, 210, 214, 218, 222, 226, 230, + 234, 238, 242, 246, 250, 254, 258, 262, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, + }, + { /* Fourth byte 16-bit table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 125, + 130, 135, 140, 145, 150, 156, 162, 168, + 174, 180, 186, 190, 194, 198, 202, 206, + 210, 214, 218, 222, 226, 230, 234, 238, + 242, 246, 250, 254, 258, 262, 266, 270, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, + 274, + }, + { /* Fourth byte 16-bit table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 98, 104, 110, 116, 122, 126, 130, 134, + 138, 142, 146, 150, 154, 158, 162, 166, + 170, 174, 178, 182, 186, 190, 194, 198, + 202, 206, 210, 214, 218, 222, 226, 230, + 234, 238, 242, 246, 250, 254, 258, 262, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, + }, + { /* Fourth byte 16-bit table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 130, 136, 140, 144, 148, 152, 156, 160, + 164, 168, 172, 176, 180, 184, 188, 192, + 196, 200, 204, 210, 216, 222, 226, 230, + 234, 238, 242, 246, 250, 254, 258, 262, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 266, 266, + 266, + }, + { /* Fourth byte 16-bit table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 54, 60, 66, 72, 78, 84, 90, + 96, 102, 108, 114, 120, 126, 132, 138, + 144, 150, 156, 162, 168, 174, 180, 186, + 192, 198, 204, 210, 216, 222, 228, 234, + 240, 246, 252, 258, 264, 270, 276, 282, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 288, 288, 288, 288, 288, 288, + 288, + }, + { /* Fourth byte 16-bit table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 12, 18, 24, 30, 36, 42, + 48, 54, 60, 66, 72, 78, 84, 90, + 96, 96, 96, 102, 108, 114, 120, 126, + 132, 138, 144, 150, 156, 162, 168, 174, + 180, 186, 192, 198, 204, 210, 216, 222, + 228, 234, 240, 246, 252, 258, 264, 270, + 276, 282, 288, 294, 300, 306, 312, 318, + 324, 330, 336, 342, 348, 354, 360, 366, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, 372, 372, 372, 372, 372, 372, 372, + 372, + }, + { /* Fourth byte 16-bit table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 17, 21, 25, 29, + 33, 37, 41, 45, 49, 53, 58, 62, + 66, 70, 74, 79, 83, 87, 91, 96, + 100, 104, 108, 112, 116, 121, 125, 129, + 133, 137, 141, 145, 149, 153, 157, 161, + 165, 169, 173, 177, 181, 185, 189, 193, + 197, 201, 205, 209, 213, 218, 222, 226, + 230, 235, 239, 243, 247, 251, 255, 259, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, + }, + { /* Fourth byte 16-bit table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 105, 109, 113, 117, 121, 125, + 129, 134, 139, 143, 147, 151, 155, 159, + 163, 167, 171, 175, 179, 184, 188, 192, + 196, 200, 205, 209, 213, 217, 221, 225, + 229, 233, 237, 241, 246, 250, 255, 259, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, + 263, + }, + { /* Fourth byte 16-bit table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 41, 45, 49, 53, 57, 61, + 66, 70, 75, 80, 84, 88, 92, 96, + 101, 106, 110, 114, 118, 122, 126, 130, + 134, 138, 142, 146, 150, 155, 159, 163, + 167, 171, 175, 179, 183, 187, 191, 195, + 199, 203, 207, 211, 215, 219, 223, 227, + 231, 236, 240, 244, 248, 252, 256, 261, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, + }, + { /* Fourth byte 16-bit table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 45, 49, 53, 57, 61, + 65, 69, 73, 77, 81, 85, 89, 93, + 97, 101, 105, 109, 113, 117, 122, 126, + 130, 134, 138, 142, 147, 151, 155, 159, + 163, 167, 171, 175, 179, 184, 188, 192, + 196, 201, 205, 209, 213, 217, 221, 225, + 230, 235, 240, 244, 249, 253, 257, 261, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 265, 265, + 265, + }, + { /* Fourth byte 16-bit table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 29, + 33, 37, 41, 45, 49, 53, 58, 62, + 66, 71, 76, 80, 84, 88, 92, 96, + 100, 104, 108, 112, 117, 121, 126, 130, + 135, 139, 143, 147, 152, 156, 160, 165, + 170, 174, 178, 182, 186, 190, 194, 198, + 202, 206, 210, 214, 218, 222, 227, 231, + 236, 240, 245, 249, 254, 259, 264, 268, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, + }, + { /* Fourth byte 16-bit table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 9, 14, 19, 24, 28, 32, + 36, 40, 44, 48, 52, 56, 61, 65, + 69, 73, 77, 82, 86, 91, 96, 100, + 104, 108, 112, 116, 120, 125, 130, 135, + 139, 143, 148, 152, 156, 160, 165, 169, + 173, 177, 181, 185, 190, 194, 198, 202, + 206, 210, 214, 219, 224, 228, 233, 237, + 242, 246, 250, 254, 259, 264, 268, 273, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, + }, + { /* Fourth byte 16-bit table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 9, 13, 17, 21, 25, 29, + 34, 39, 44, 49, 53, 57, 61, 65, + 69, 73, 77, 81, 85, 89, 93, 97, + 102, 106, 110, 114, 118, 122, 126, 130, + 134, 138, 142, 146, 150, 155, 160, 165, + 169, 173, 177, 181, 186, 190, 195, 199, + 203, 208, 213, 217, 221, 225, 229, 233, + 237, 241, 245, 249, 253, 257, 261, 265, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, + 269, + }, + { /* Fourth byte 16-bit table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 25, 29, + 33, 37, 41, 45, 50, 55, 59, 63, + 67, 71, 75, 79, 84, 88, 92, 96, + 100, 105, 110, 114, 118, 122, 127, 131, + 135, 140, 145, 149, 153, 157, 162, 166, + 170, 174, 178, 182, 186, 190, 195, 199, + 203, 207, 212, 216, 220, 224, 228, 233, + 238, 242, 246, 250, 255, 259, 264, 268, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, + 272, + }, + }, +}; + +static const uchar_t u8_decomp_final_tbl[2][19370] = { + { + 0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84, + 0x32, 0x33, 0x20, 0xCC, 0x81, 0xCE, 0xBC, 0x20, + 0xCC, 0xA7, 0x31, 0x6F, 0x31, 0xE2, 0x81, 0x84, + 0x34, 0x31, 0xE2, 0x81, 0x84, 0x32, 0x33, 0xE2, + 0x81, 0x84, 0x34, 0xF6, 0x41, 0xCC, 0x80, 0xF6, + 0x41, 0xCC, 0x81, 0xF6, 0x41, 0xCC, 0x82, 0xF6, + 0x41, 0xCC, 0x83, 0xF6, 0x41, 0xCC, 0x88, 0xF6, + 0x41, 0xCC, 0x8A, 0xF6, 0x43, 0xCC, 0xA7, 0xF6, + 0x45, 0xCC, 0x80, 0xF6, 0x45, 0xCC, 0x81, 0xF6, + 0x45, 0xCC, 0x82, 0xF6, 0x45, 0xCC, 0x88, 0xF6, + 0x49, 0xCC, 0x80, 0xF6, 0x49, 0xCC, 0x81, 0xF6, + 0x49, 0xCC, 0x82, 0xF6, 0x49, 0xCC, 0x88, 0xF6, + 0x4E, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x80, 0xF6, + 0x4F, 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xF6, + 0x4F, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x88, 0xF6, + 0x55, 0xCC, 0x80, 0xF6, 0x55, 0xCC, 0x81, 0xF6, + 0x55, 0xCC, 0x82, 0xF6, 0x55, 0xCC, 0x88, 0xF6, + 0x59, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x80, 0xF6, + 0x61, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x82, 0xF6, + 0x61, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x88, 0xF6, + 0x61, 0xCC, 0x8A, 0xF6, 0x63, 0xCC, 0xA7, 0xF6, + 0x65, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x81, 0xF6, + 0x65, 0xCC, 0x82, 0xF6, 0x65, 0xCC, 0x88, 0xF6, + 0x69, 0xCC, 0x80, 0xF6, 0x69, 0xCC, 0x81, 0xF6, + 0x69, 0xCC, 0x82, 0xF6, 0x69, 0xCC, 0x88, 0xF6, + 0x6E, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x80, 0xF6, + 0x6F, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, 0xF6, + 0x6F, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x88, 0xF6, + 0x75, 0xCC, 0x80, 0xF6, 0x75, 0xCC, 0x81, 0xF6, + 0x75, 0xCC, 0x82, 0xF6, 0x75, 0xCC, 0x88, 0xF6, + 0x79, 0xCC, 0x81, 0xF6, 0x79, 0xCC, 0x88, 0xF6, + 0x41, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x84, 0xF6, + 0x41, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0x86, 0xF6, + 0x41, 0xCC, 0xA8, 0xF6, 0x61, 0xCC, 0xA8, 0xF6, + 0x43, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0x81, 0xF6, + 0x43, 0xCC, 0x82, 0xF6, 0x63, 0xCC, 0x82, 0xF6, + 0x43, 0xCC, 0x87, 0xF6, 0x63, 0xCC, 0x87, 0xF6, + 0x43, 0xCC, 0x8C, 0xF6, 0x63, 0xCC, 0x8C, 0xF6, + 0x44, 0xCC, 0x8C, 0xF6, 0x64, 0xCC, 0x8C, 0xF6, + 0x45, 0xCC, 0x84, 0xF6, 0x65, 0xCC, 0x84, 0xF6, + 0x45, 0xCC, 0x86, 0xF6, 0x65, 0xCC, 0x86, 0xF6, + 0x45, 0xCC, 0x87, 0xF6, 0x65, 0xCC, 0x87, 0xF6, + 0x45, 0xCC, 0xA8, 0xF6, 0x65, 0xCC, 0xA8, 0xF6, + 0x45, 0xCC, 0x8C, 0xF6, 0x65, 0xCC, 0x8C, 0xF6, + 0x47, 0xCC, 0x82, 0xF6, 0x67, 0xCC, 0x82, 0xF6, + 0x47, 0xCC, 0x86, 0xF6, 0x67, 0xCC, 0x86, 0xF6, + 0x47, 0xCC, 0x87, 0xF6, 0x67, 0xCC, 0x87, 0xF6, + 0x47, 0xCC, 0xA7, 0xF6, 0x67, 0xCC, 0xA7, 0xF6, + 0x48, 0xCC, 0x82, 0xF6, 0x68, 0xCC, 0x82, 0xF6, + 0x49, 0xCC, 0x83, 0xF6, 0x69, 0xCC, 0x83, 0xF6, + 0x49, 0xCC, 0x84, 0xF6, 0x69, 0xCC, 0x84, 0xF6, + 0x49, 0xCC, 0x86, 0xF6, 0x69, 0xCC, 0x86, 0xF6, + 0x49, 0xCC, 0xA8, 0xF6, 0x69, 0xCC, 0xA8, 0xF6, + 0x49, 0xCC, 0x87, 0x49, 0x4A, 0x69, 0x6A, 0xF6, + 0x4A, 0xCC, 0x82, 0xF6, 0x6A, 0xCC, 0x82, 0xF6, + 0x4B, 0xCC, 0xA7, 0xF6, 0x6B, 0xCC, 0xA7, 0xF6, + 0x4C, 0xCC, 0x81, 0xF6, 0x6C, 0xCC, 0x81, 0xF6, + 0x4C, 0xCC, 0xA7, 0xF6, 0x6C, 0xCC, 0xA7, 0xF6, + 0x4C, 0xCC, 0x8C, 0xF6, 0x6C, 0xCC, 0x8C, 0x4C, + 0xC2, 0xB7, 0x6C, 0xC2, 0xB7, 0xF6, 0x4E, 0xCC, + 0x81, 0xF6, 0x6E, 0xCC, 0x81, 0xF6, 0x4E, 0xCC, + 0xA7, 0xF6, 0x6E, 0xCC, 0xA7, 0xF6, 0x4E, 0xCC, + 0x8C, 0xF6, 0x6E, 0xCC, 0x8C, 0xCA, 0xBC, 0x6E, + 0xF6, 0x4F, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, 0x84, + 0xF6, 0x4F, 0xCC, 0x86, 0xF6, 0x6F, 0xCC, 0x86, + 0xF6, 0x4F, 0xCC, 0x8B, 0xF6, 0x6F, 0xCC, 0x8B, + 0xF6, 0x52, 0xCC, 0x81, 0xF6, 0x72, 0xCC, 0x81, + 0xF6, 0x52, 0xCC, 0xA7, 0xF6, 0x72, 0xCC, 0xA7, + 0xF6, 0x52, 0xCC, 0x8C, 0xF6, 0x72, 0xCC, 0x8C, + 0xF6, 0x53, 0xCC, 0x81, 0xF6, 0x73, 0xCC, 0x81, + 0xF6, 0x53, 0xCC, 0x82, 0xF6, 0x73, 0xCC, 0x82, + 0xF6, 0x53, 0xCC, 0xA7, 0xF6, 0x73, 0xCC, 0xA7, + 0xF6, 0x53, 0xCC, 0x8C, 0xF6, 0x73, 0xCC, 0x8C, + 0xF6, 0x54, 0xCC, 0xA7, 0xF6, 0x74, 0xCC, 0xA7, + 0xF6, 0x54, 0xCC, 0x8C, 0xF6, 0x74, 0xCC, 0x8C, + 0xF6, 0x55, 0xCC, 0x83, 0xF6, 0x75, 0xCC, 0x83, + 0xF6, 0x55, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x84, + 0xF6, 0x55, 0xCC, 0x86, 0xF6, 0x75, 0xCC, 0x86, + 0xF6, 0x55, 0xCC, 0x8A, 0xF6, 0x75, 0xCC, 0x8A, + 0xF6, 0x55, 0xCC, 0x8B, 0xF6, 0x75, 0xCC, 0x8B, + 0xF6, 0x55, 0xCC, 0xA8, 0xF6, 0x75, 0xCC, 0xA8, + 0xF6, 0x57, 0xCC, 0x82, 0xF6, 0x77, 0xCC, 0x82, + 0xF6, 0x59, 0xCC, 0x82, 0xF6, 0x79, 0xCC, 0x82, + 0xF6, 0x59, 0xCC, 0x88, 0xF6, 0x5A, 0xCC, 0x81, + 0xF6, 0x7A, 0xCC, 0x81, 0xF6, 0x5A, 0xCC, 0x87, + 0xF6, 0x7A, 0xCC, 0x87, 0xF6, 0x5A, 0xCC, 0x8C, + 0xF6, 0x7A, 0xCC, 0x8C, 0x73, 0xF6, 0x4F, 0xCC, + 0x9B, 0xF6, 0x6F, 0xCC, 0x9B, 0xF6, 0x55, 0xCC, + 0x9B, 0xF6, 0x75, 0xCC, 0x9B, 0x44, 0x5A, 0xCC, + 0x8C, 0x44, 0x7A, 0xCC, 0x8C, 0x64, 0x7A, 0xCC, + 0x8C, 0x4C, 0x4A, 0x4C, 0x6A, 0x6C, 0x6A, 0x4E, + 0x4A, 0x4E, 0x6A, 0x6E, 0x6A, 0xF6, 0x41, 0xCC, + 0x8C, 0xF6, 0x61, 0xCC, 0x8C, 0xF6, 0x49, 0xCC, + 0x8C, 0xF6, 0x69, 0xCC, 0x8C, 0xF6, 0x4F, 0xCC, + 0x8C, 0xF6, 0x6F, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, + 0x8C, 0xF6, 0x75, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, + 0x88, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x88, 0xCC, + 0x84, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x81, 0xF6, + 0x75, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x55, 0xCC, + 0x88, 0xCC, 0x8C, 0xF6, 0x75, 0xCC, 0x88, 0xCC, + 0x8C, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x80, 0xF6, + 0x75, 0xCC, 0x88, 0xCC, 0x80, 0xF6, 0x41, 0xCC, + 0x88, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x88, 0xCC, + 0x84, 0xF6, 0x41, 0xCC, 0x87, 0xCC, 0x84, 0xF6, + 0x61, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0xC3, 0x86, + 0xCC, 0x84, 0xF6, 0xC3, 0xA6, 0xCC, 0x84, 0xF6, + 0x47, 0xCC, 0x8C, 0xF6, 0x67, 0xCC, 0x8C, 0xF6, + 0x4B, 0xCC, 0x8C, 0xF6, 0x6B, 0xCC, 0x8C, 0xF6, + 0x4F, 0xCC, 0xA8, 0xF6, 0x6F, 0xCC, 0xA8, 0xF6, + 0x4F, 0xCC, 0xA8, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, + 0xA8, 0xCC, 0x84, 0xF6, 0xC6, 0xB7, 0xCC, 0x8C, + 0xF6, 0xCA, 0x92, 0xCC, 0x8C, 0xF6, 0x6A, 0xCC, + 0x8C, 0x44, 0x5A, 0x44, 0x7A, 0x64, 0x7A, 0xF6, + 0x47, 0xCC, 0x81, 0xF6, 0x67, 0xCC, 0x81, 0xF6, + 0x4E, 0xCC, 0x80, 0xF6, 0x6E, 0xCC, 0x80, 0xF6, + 0x41, 0xCC, 0x8A, 0xCC, 0x81, 0xF6, 0x61, 0xCC, + 0x8A, 0xCC, 0x81, 0xF6, 0xC3, 0x86, 0xCC, 0x81, + 0xF6, 0xC3, 0xA6, 0xCC, 0x81, 0xF6, 0xC3, 0x98, + 0xCC, 0x81, 0xF6, 0xC3, 0xB8, 0xCC, 0x81, 0xF6, + 0x41, 0xCC, 0x8F, 0xF6, 0x61, 0xCC, 0x8F, 0xF6, + 0x41, 0xCC, 0x91, 0xF6, 0x61, 0xCC, 0x91, 0xF6, + 0x45, 0xCC, 0x8F, 0xF6, 0x65, 0xCC, 0x8F, 0xF6, + 0x45, 0xCC, 0x91, 0xF6, 0x65, 0xCC, 0x91, 0xF6, + 0x49, 0xCC, 0x8F, 0xF6, 0x69, 0xCC, 0x8F, 0xF6, + 0x49, 0xCC, 0x91, 0xF6, 0x69, 0xCC, 0x91, 0xF6, + 0x4F, 0xCC, 0x8F, 0xF6, 0x6F, 0xCC, 0x8F, 0xF6, + 0x4F, 0xCC, 0x91, 0xF6, 0x6F, 0xCC, 0x91, 0xF6, + 0x52, 0xCC, 0x8F, 0xF6, 0x72, 0xCC, 0x8F, 0xF6, + 0x52, 0xCC, 0x91, 0xF6, 0x72, 0xCC, 0x91, 0xF6, + 0x55, 0xCC, 0x8F, 0xF6, 0x75, 0xCC, 0x8F, 0xF6, + 0x55, 0xCC, 0x91, 0xF6, 0x75, 0xCC, 0x91, 0xF6, + 0x53, 0xCC, 0xA6, 0xF6, 0x73, 0xCC, 0xA6, 0xF6, + 0x54, 0xCC, 0xA6, 0xF6, 0x74, 0xCC, 0xA6, 0xF6, + 0x48, 0xCC, 0x8C, 0xF6, 0x68, 0xCC, 0x8C, 0xF6, + 0x41, 0xCC, 0x87, 0xF6, 0x61, 0xCC, 0x87, 0xF6, + 0x45, 0xCC, 0xA7, 0xF6, 0x65, 0xCC, 0xA7, 0xF6, + 0x4F, 0xCC, 0x88, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, + 0x88, 0xCC, 0x84, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, + 0x84, 0xF6, 0x6F, 0xCC, 0x83, 0xCC, 0x84, 0xF6, + 0x4F, 0xCC, 0x87, 0xF6, 0x6F, 0xCC, 0x87, 0xF6, + 0x4F, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, + 0x87, 0xCC, 0x84, 0xF6, 0x59, 0xCC, 0x84, 0xF6, + 0x79, 0xCC, 0x84, 0x68, 0xC9, 0xA6, 0x6A, 0x72, + 0xC9, 0xB9, 0xC9, 0xBB, 0xCA, 0x81, 0x77, 0x79, + 0x20, 0xCC, 0x86, 0x20, 0xCC, 0x87, 0x20, 0xCC, + 0x8A, 0x20, 0xCC, 0xA8, 0x20, 0xCC, 0x83, 0x20, + 0xCC, 0x8B, 0xC9, 0xA3, 0x6C, 0x73, 0x78, 0xCA, + 0x95, 0xF6, 0xCC, 0x80, 0xF6, 0xCC, 0x81, 0xF6, + 0xCC, 0x93, 0xF6, 0xCC, 0x88, 0xCC, 0x81, 0xF6, + 0xCA, 0xB9, 0x20, 0xCD, 0x85, 0xF6, 0x3B, 0x20, + 0xCC, 0x81, 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, + 0x20, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0xCE, 0x91, + 0xCC, 0x81, 0xF6, 0xC2, 0xB7, 0xF6, 0xCE, 0x95, + 0xCC, 0x81, 0xF6, 0xCE, 0x97, 0xCC, 0x81, 0xF6, + 0xCE, 0x99, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, + 0x81, 0xF6, 0xCE, 0xA5, 0xCC, 0x81, 0xF6, 0xCE, + 0xA9, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x88, + 0xCC, 0x81, 0xF6, 0xCE, 0x99, 0xCC, 0x88, 0xF6, + 0xCE, 0xA5, 0xCC, 0x88, 0xF6, 0xCE, 0xB1, 0xCC, + 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x81, 0xF6, 0xCE, + 0xB7, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, + 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, + 0xCE, 0xB9, 0xCC, 0x88, 0xF6, 0xCF, 0x85, 0xCC, + 0x88, 0xF6, 0xCE, 0xBF, 0xCC, 0x81, 0xF6, 0xCF, + 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, 0x81, + 0xCE, 0xB2, 0xCE, 0xB8, 0xCE, 0xA5, 0xF5, 0x05, + 0xCF, 0x92, 0xCC, 0x81, 0xCE, 0xA5, 0xCC, 0x81, + 0xF5, 0x05, 0xCF, 0x92, 0xCC, 0x88, 0xCE, 0xA5, + 0xCC, 0x88, 0xCF, 0x86, 0xCF, 0x80, 0xCE, 0xBA, + 0xCF, 0x81, 0xCF, 0x82, 0xCE, 0x98, 0xCE, 0xB5, + 0xF6, 0xD0, 0x95, 0xCC, 0x80, 0xF6, 0xD0, 0x95, + 0xCC, 0x88, 0xF6, 0xD0, 0x93, 0xCC, 0x81, 0xF6, + 0xD0, 0x86, 0xCC, 0x88, 0xF6, 0xD0, 0x9A, 0xCC, + 0x81, 0xF6, 0xD0, 0x98, 0xCC, 0x80, 0xF6, 0xD0, + 0xA3, 0xCC, 0x86, 0xF6, 0xD0, 0x98, 0xCC, 0x86, + 0xF6, 0xD0, 0xB8, 0xCC, 0x86, 0xF6, 0xD0, 0xB5, + 0xCC, 0x80, 0xF6, 0xD0, 0xB5, 0xCC, 0x88, 0xF6, + 0xD0, 0xB3, 0xCC, 0x81, 0xF6, 0xD1, 0x96, 0xCC, + 0x88, 0xF6, 0xD0, 0xBA, 0xCC, 0x81, 0xF6, 0xD0, + 0xB8, 0xCC, 0x80, 0xF6, 0xD1, 0x83, 0xCC, 0x86, + 0xF6, 0xD1, 0xB4, 0xCC, 0x8F, 0xF6, 0xD1, 0xB5, + 0xCC, 0x8F, 0xF6, 0xD0, 0x96, 0xCC, 0x86, 0xF6, + 0xD0, 0xB6, 0xCC, 0x86, 0xF6, 0xD0, 0x90, 0xCC, + 0x86, 0xF6, 0xD0, 0xB0, 0xCC, 0x86, 0xF6, 0xD0, + 0x90, 0xCC, 0x88, 0xF6, 0xD0, 0xB0, 0xCC, 0x88, + 0xF6, 0xD0, 0x95, 0xCC, 0x86, 0xF6, 0xD0, 0xB5, + 0xCC, 0x86, 0xF6, 0xD3, 0x98, 0xCC, 0x88, 0xF6, + 0xD3, 0x99, 0xCC, 0x88, 0xF6, 0xD0, 0x96, 0xCC, + 0x88, 0xF6, 0xD0, 0xB6, 0xCC, 0x88, 0xF6, 0xD0, + 0x97, 0xCC, 0x88, 0xF6, 0xD0, 0xB7, 0xCC, 0x88, + 0xF6, 0xD0, 0x98, 0xCC, 0x84, 0xF6, 0xD0, 0xB8, + 0xCC, 0x84, 0xF6, 0xD0, 0x98, 0xCC, 0x88, 0xF6, + 0xD0, 0xB8, 0xCC, 0x88, 0xF6, 0xD0, 0x9E, 0xCC, + 0x88, 0xF6, 0xD0, 0xBE, 0xCC, 0x88, 0xF6, 0xD3, + 0xA8, 0xCC, 0x88, 0xF6, 0xD3, 0xA9, 0xCC, 0x88, + 0xF6, 0xD0, 0xAD, 0xCC, 0x88, 0xF6, 0xD1, 0x8D, + 0xCC, 0x88, 0xF6, 0xD0, 0xA3, 0xCC, 0x84, 0xF6, + 0xD1, 0x83, 0xCC, 0x84, 0xF6, 0xD0, 0xA3, 0xCC, + 0x88, 0xF6, 0xD1, 0x83, 0xCC, 0x88, 0xF6, 0xD0, + 0xA3, 0xCC, 0x8B, 0xF6, 0xD1, 0x83, 0xCC, 0x8B, + 0xF6, 0xD0, 0xA7, 0xCC, 0x88, 0xF6, 0xD1, 0x87, + 0xCC, 0x88, 0xF6, 0xD0, 0xAB, 0xCC, 0x88, 0xF6, + 0xD1, 0x8B, 0xCC, 0x88, 0xD5, 0xA5, 0xD6, 0x82, + 0xF6, 0xD8, 0xA7, 0xD9, 0x93, 0xF6, 0xD8, 0xA7, + 0xD9, 0x94, 0xF6, 0xD9, 0x88, 0xD9, 0x94, 0xF6, + 0xD8, 0xA7, 0xD9, 0x95, 0xF6, 0xD9, 0x8A, 0xD9, + 0x94, 0xD8, 0xA7, 0xD9, 0xB4, 0xD9, 0x88, 0xD9, + 0xB4, 0xDB, 0x87, 0xD9, 0xB4, 0xD9, 0x8A, 0xD9, + 0xB4, 0xF6, 0xDB, 0x95, 0xD9, 0x94, 0xF6, 0xDB, + 0x81, 0xD9, 0x94, 0xF6, 0xDB, 0x92, 0xD9, 0x94, + 0xF6, 0xE0, 0xA4, 0xA8, 0xE0, 0xA4, 0xBC, 0xF6, + 0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, + 0xA4, 0xB3, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, + 0x95, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x96, + 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x97, 0xE0, + 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x9C, 0xE0, 0xA4, + 0xBC, 0xF6, 0xE0, 0xA4, 0xA1, 0xE0, 0xA4, 0xBC, + 0xF6, 0xE0, 0xA4, 0xA2, 0xE0, 0xA4, 0xBC, 0xF6, + 0xE0, 0xA4, 0xAB, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, + 0xA4, 0xAF, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA7, + 0x87, 0xE0, 0xA6, 0xBE, 0xF6, 0xE0, 0xA7, 0x87, + 0xE0, 0xA7, 0x97, 0xF6, 0xE0, 0xA6, 0xA1, 0xE0, + 0xA6, 0xBC, 0xF6, 0xE0, 0xA6, 0xA2, 0xE0, 0xA6, + 0xBC, 0xF6, 0xE0, 0xA6, 0xAF, 0xE0, 0xA6, 0xBC, + 0xF6, 0xE0, 0xA8, 0xB2, 0xE0, 0xA8, 0xBC, 0xF6, + 0xE0, 0xA8, 0xB8, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, + 0xA8, 0x96, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, + 0x97, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, 0x9C, + 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, 0xAB, 0xE0, + 0xA8, 0xBC, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, + 0x96, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAC, 0xBE, + 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x97, 0xF6, + 0xE0, 0xAC, 0xA1, 0xE0, 0xAC, 0xBC, 0xF6, 0xE0, + 0xAC, 0xA2, 0xE0, 0xAC, 0xBC, 0xF6, 0xE0, 0xAE, + 0x92, 0xE0, 0xAF, 0x97, 0xF6, 0xE0, 0xAF, 0x86, + 0xE0, 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, 0x87, 0xE0, + 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, 0x86, 0xE0, 0xAF, + 0x97, 0xF6, 0xE0, 0xB1, 0x86, 0xE0, 0xB1, 0x96, + 0xF6, 0xE0, 0xB2, 0xBF, 0xE0, 0xB3, 0x95, 0xF6, + 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x95, 0xF6, 0xE0, + 0xB3, 0x86, 0xE0, 0xB3, 0x96, 0xF6, 0xE0, 0xB3, + 0x86, 0xE0, 0xB3, 0x82, 0xF6, 0xE0, 0xB3, 0x86, + 0xE0, 0xB3, 0x82, 0xE0, 0xB3, 0x95, 0xF6, 0xE0, + 0xB5, 0x86, 0xE0, 0xB4, 0xBE, 0xF6, 0xE0, 0xB5, + 0x87, 0xE0, 0xB4, 0xBE, 0xF6, 0xE0, 0xB5, 0x86, + 0xE0, 0xB5, 0x97, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, + 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, 0xB7, + 0x8F, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x8F, + 0xE0, 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, + 0xB7, 0x9F, 0xE0, 0xB9, 0x8D, 0xE0, 0xB8, 0xB2, + 0xE0, 0xBB, 0x8D, 0xE0, 0xBA, 0xB2, 0xE0, 0xBA, + 0xAB, 0xE0, 0xBA, 0x99, 0xE0, 0xBA, 0xAB, 0xE0, + 0xBA, 0xA1, 0xE0, 0xBC, 0x8B, 0xF6, 0xE0, 0xBD, + 0x82, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x8C, + 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x91, 0xE0, + 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x96, 0xE0, 0xBE, + 0xB7, 0xF6, 0xE0, 0xBD, 0x9B, 0xE0, 0xBE, 0xB7, + 0xF6, 0xE0, 0xBD, 0x80, 0xE0, 0xBE, 0xB5, 0xF6, + 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB2, 0xF6, 0xE0, + 0xBD, 0xB1, 0xE0, 0xBD, 0xB4, 0xF6, 0xE0, 0xBE, + 0xB2, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, 0xB2, 0xE0, + 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, 0xBE, + 0xB3, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, 0xB3, 0xE0, + 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, 0xBD, + 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, 0xBE, 0x92, + 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0x9C, 0xE0, + 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xA1, 0xE0, 0xBE, + 0xB7, 0xF6, 0xE0, 0xBE, 0xA6, 0xE0, 0xBE, 0xB7, + 0xF6, 0xE0, 0xBE, 0xAB, 0xE0, 0xBE, 0xB7, 0xF6, + 0xE0, 0xBE, 0x90, 0xE0, 0xBE, 0xB5, 0xF6, 0xE1, + 0x80, 0xA5, 0xE1, 0x80, 0xAE, 0xF6, 0x41, 0xCC, + 0xA5, 0xF6, 0x61, 0xCC, 0xA5, 0xF6, 0x42, 0xCC, + 0x87, 0xF6, 0x62, 0xCC, 0x87, 0xF6, 0x42, 0xCC, + 0xA3, 0xF6, 0x62, 0xCC, 0xA3, 0xF6, 0x42, 0xCC, + 0xB1, 0xF6, 0x62, 0xCC, 0xB1, 0xF6, 0x43, 0xCC, + 0xA7, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0xA7, 0xCC, + 0x81, 0xF6, 0x44, 0xCC, 0x87, 0xF6, 0x64, 0xCC, + 0x87, 0xF6, 0x44, 0xCC, 0xA3, 0xF6, 0x64, 0xCC, + 0xA3, 0xF6, 0x44, 0xCC, 0xB1, 0xF6, 0x64, 0xCC, + 0xB1, 0xF6, 0x44, 0xCC, 0xA7, 0xF6, 0x64, 0xCC, + 0xA7, 0xF6, 0x44, 0xCC, 0xAD, 0xF6, 0x64, 0xCC, + 0xAD, 0xF6, 0x45, 0xCC, 0x84, 0xCC, 0x80, 0xF6, + 0x65, 0xCC, 0x84, 0xCC, 0x80, 0xF6, 0x45, 0xCC, + 0x84, 0xCC, 0x81, 0xF6, 0x65, 0xCC, 0x84, 0xCC, + 0x81, 0xF6, 0x45, 0xCC, 0xAD, 0xF6, 0x65, 0xCC, + 0xAD, 0xF6, 0x45, 0xCC, 0xB0, 0xF6, 0x65, 0xCC, + 0xB0, 0xF6, 0x45, 0xCC, 0xA7, 0xCC, 0x86, 0xF6, + 0x65, 0xCC, 0xA7, 0xCC, 0x86, 0xF6, 0x46, 0xCC, + 0x87, 0xF6, 0x66, 0xCC, 0x87, 0xF6, 0x47, 0xCC, + 0x84, 0xF6, 0x67, 0xCC, 0x84, 0xF6, 0x48, 0xCC, + 0x87, 0xF6, 0x68, 0xCC, 0x87, 0xF6, 0x48, 0xCC, + 0xA3, 0xF6, 0x68, 0xCC, 0xA3, 0xF6, 0x48, 0xCC, + 0x88, 0xF6, 0x68, 0xCC, 0x88, 0xF6, 0x48, 0xCC, + 0xA7, 0xF6, 0x68, 0xCC, 0xA7, 0xF6, 0x48, 0xCC, + 0xAE, 0xF6, 0x68, 0xCC, 0xAE, 0xF6, 0x49, 0xCC, + 0xB0, 0xF6, 0x69, 0xCC, 0xB0, 0xF6, 0x49, 0xCC, + 0x88, 0xCC, 0x81, 0xF6, 0x69, 0xCC, 0x88, 0xCC, + 0x81, 0xF6, 0x4B, 0xCC, 0x81, 0xF6, 0x6B, 0xCC, + 0x81, 0xF6, 0x4B, 0xCC, 0xA3, 0xF6, 0x6B, 0xCC, + 0xA3, 0xF6, 0x4B, 0xCC, 0xB1, 0xF6, 0x6B, 0xCC, + 0xB1, 0xF6, 0x4C, 0xCC, 0xA3, 0xF6, 0x6C, 0xCC, + 0xA3, 0xF6, 0x4C, 0xCC, 0xA3, 0xCC, 0x84, 0xF6, + 0x6C, 0xCC, 0xA3, 0xCC, 0x84, 0xF6, 0x4C, 0xCC, + 0xB1, 0xF6, 0x6C, 0xCC, 0xB1, 0xF6, 0x4C, 0xCC, + 0xAD, 0xF6, 0x6C, 0xCC, 0xAD, 0xF6, 0x4D, 0xCC, + 0x81, 0xF6, 0x6D, 0xCC, 0x81, 0xF6, 0x4D, 0xCC, + 0x87, 0xF6, 0x6D, 0xCC, 0x87, 0xF6, 0x4D, 0xCC, + 0xA3, 0xF6, 0x6D, 0xCC, 0xA3, 0xF6, 0x4E, 0xCC, + 0x87, 0xF6, 0x6E, 0xCC, 0x87, 0xF6, 0x4E, 0xCC, + 0xA3, 0xF6, 0x6E, 0xCC, 0xA3, 0xF6, 0x4E, 0xCC, + 0xB1, 0xF6, 0x6E, 0xCC, 0xB1, 0xF6, 0x4E, 0xCC, + 0xAD, 0xF6, 0x6E, 0xCC, 0xAD, 0xF6, 0x4F, 0xCC, + 0x83, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x83, 0xCC, + 0x81, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, 0x88, 0xF6, + 0x6F, 0xCC, 0x83, 0xCC, 0x88, 0xF6, 0x4F, 0xCC, + 0x84, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x84, 0xCC, + 0x80, 0xF6, 0x4F, 0xCC, 0x84, 0xCC, 0x81, 0xF6, + 0x6F, 0xCC, 0x84, 0xCC, 0x81, 0xF6, 0x50, 0xCC, + 0x81, 0xF6, 0x70, 0xCC, 0x81, 0xF6, 0x50, 0xCC, + 0x87, 0xF6, 0x70, 0xCC, 0x87, 0xF6, 0x52, 0xCC, + 0x87, 0xF6, 0x72, 0xCC, 0x87, 0xF6, 0x52, 0xCC, + 0xA3, 0xF6, 0x72, 0xCC, 0xA3, 0xF6, 0x52, 0xCC, + 0xA3, 0xCC, 0x84, 0xF6, 0x72, 0xCC, 0xA3, 0xCC, + 0x84, 0xF6, 0x52, 0xCC, 0xB1, 0xF6, 0x72, 0xCC, + 0xB1, 0xF6, 0x53, 0xCC, 0x87, 0xF6, 0x73, 0xCC, + 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xF6, 0x73, 0xCC, + 0xA3, 0xF6, 0x53, 0xCC, 0x81, 0xCC, 0x87, 0xF6, + 0x73, 0xCC, 0x81, 0xCC, 0x87, 0xF6, 0x53, 0xCC, + 0x8C, 0xCC, 0x87, 0xF6, 0x73, 0xCC, 0x8C, 0xCC, + 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xCC, 0x87, 0xF6, + 0x73, 0xCC, 0xA3, 0xCC, 0x87, 0xF6, 0x54, 0xCC, + 0x87, 0xF6, 0x74, 0xCC, 0x87, 0xF6, 0x54, 0xCC, + 0xA3, 0xF6, 0x74, 0xCC, 0xA3, 0xF6, 0x54, 0xCC, + 0xB1, 0xF6, 0x74, 0xCC, 0xB1, 0xF6, 0x54, 0xCC, + 0xAD, 0xF6, 0x74, 0xCC, 0xAD, 0xF6, 0x55, 0xCC, + 0xA4, 0xF6, 0x75, 0xCC, 0xA4, 0xF6, 0x55, 0xCC, + 0xB0, 0xF6, 0x75, 0xCC, 0xB0, 0xF6, 0x55, 0xCC, + 0xAD, 0xF6, 0x75, 0xCC, 0xAD, 0xF6, 0x55, 0xCC, + 0x83, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x83, 0xCC, + 0x81, 0xF6, 0x55, 0xCC, 0x84, 0xCC, 0x88, 0xF6, + 0x75, 0xCC, 0x84, 0xCC, 0x88, 0xF6, 0x56, 0xCC, + 0x83, 0xF6, 0x76, 0xCC, 0x83, 0xF6, 0x56, 0xCC, + 0xA3, 0xF6, 0x76, 0xCC, 0xA3, 0xF6, 0x57, 0xCC, + 0x80, 0xF6, 0x77, 0xCC, 0x80, 0xF6, 0x57, 0xCC, + 0x81, 0xF6, 0x77, 0xCC, 0x81, 0xF6, 0x57, 0xCC, + 0x88, 0xF6, 0x77, 0xCC, 0x88, 0xF6, 0x57, 0xCC, + 0x87, 0xF6, 0x77, 0xCC, 0x87, 0xF6, 0x57, 0xCC, + 0xA3, 0xF6, 0x77, 0xCC, 0xA3, 0xF6, 0x58, 0xCC, + 0x87, 0xF6, 0x78, 0xCC, 0x87, 0xF6, 0x58, 0xCC, + 0x88, 0xF6, 0x78, 0xCC, 0x88, 0xF6, 0x59, 0xCC, + 0x87, 0xF6, 0x79, 0xCC, 0x87, 0xF6, 0x5A, 0xCC, + 0x82, 0xF6, 0x7A, 0xCC, 0x82, 0xF6, 0x5A, 0xCC, + 0xA3, 0xF6, 0x7A, 0xCC, 0xA3, 0xF6, 0x5A, 0xCC, + 0xB1, 0xF6, 0x7A, 0xCC, 0xB1, 0xF6, 0x68, 0xCC, + 0xB1, 0xF6, 0x74, 0xCC, 0x88, 0xF6, 0x77, 0xCC, + 0x8A, 0xF6, 0x79, 0xCC, 0x8A, 0x61, 0xCA, 0xBE, + 0xF5, 0x05, 0xC5, 0xBF, 0xCC, 0x87, 0x73, 0xCC, + 0x87, 0xF6, 0x41, 0xCC, 0xA3, 0xF6, 0x61, 0xCC, + 0xA3, 0xF6, 0x41, 0xCC, 0x89, 0xF6, 0x61, 0xCC, + 0x89, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x81, 0xF6, + 0x61, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x41, 0xCC, + 0x82, 0xCC, 0x80, 0xF6, 0x61, 0xCC, 0x82, 0xCC, + 0x80, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x89, 0xF6, + 0x61, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x41, 0xCC, + 0x82, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x82, 0xCC, + 0x83, 0xF6, 0x41, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, + 0x61, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x41, 0xCC, + 0x86, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x86, 0xCC, + 0x81, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x80, 0xF6, + 0x61, 0xCC, 0x86, 0xCC, 0x80, 0xF6, 0x41, 0xCC, + 0x86, 0xCC, 0x89, 0xF6, 0x61, 0xCC, 0x86, 0xCC, + 0x89, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x83, 0xF6, + 0x61, 0xCC, 0x86, 0xCC, 0x83, 0xF6, 0x41, 0xCC, + 0xA3, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0xA3, 0xCC, + 0x86, 0xF6, 0x45, 0xCC, 0xA3, 0xF6, 0x65, 0xCC, + 0xA3, 0xF6, 0x45, 0xCC, 0x89, 0xF6, 0x65, 0xCC, + 0x89, 0xF6, 0x45, 0xCC, 0x83, 0xF6, 0x65, 0xCC, + 0x83, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x81, 0xF6, + 0x65, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x45, 0xCC, + 0x82, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x82, 0xCC, + 0x80, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x89, 0xF6, + 0x65, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x45, 0xCC, + 0x82, 0xCC, 0x83, 0xF6, 0x65, 0xCC, 0x82, 0xCC, + 0x83, 0xF6, 0x45, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, + 0x65, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x49, 0xCC, + 0x89, 0xF6, 0x69, 0xCC, 0x89, 0xF6, 0x49, 0xCC, + 0xA3, 0xF6, 0x69, 0xCC, 0xA3, 0xF6, 0x4F, 0xCC, + 0xA3, 0xF6, 0x6F, 0xCC, 0xA3, 0xF6, 0x4F, 0xCC, + 0x89, 0xF6, 0x6F, 0xCC, 0x89, 0xF6, 0x4F, 0xCC, + 0x82, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, 0xCC, + 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x80, 0xF6, + 0x6F, 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x4F, 0xCC, + 0x82, 0xCC, 0x89, 0xF6, 0x6F, 0xCC, 0x82, 0xCC, + 0x89, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x83, 0xF6, + 0x6F, 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, + 0xA3, 0xCC, 0x82, 0xF6, 0x6F, 0xCC, 0xA3, 0xCC, + 0x82, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x81, 0xF6, + 0x6F, 0xCC, 0x9B, 0xCC, 0x81, 0xF6, 0x4F, 0xCC, + 0x9B, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, + 0x80, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x89, 0xF6, + 0x6F, 0xCC, 0x9B, 0xCC, 0x89, 0xF6, 0x4F, 0xCC, + 0x9B, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, + 0x83, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, + 0x6F, 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, 0x55, 0xCC, + 0xA3, 0xF6, 0x75, 0xCC, 0xA3, 0xF6, 0x55, 0xCC, + 0x89, 0xF6, 0x75, 0xCC, 0x89, 0xF6, 0x55, 0xCC, + 0x9B, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x9B, 0xCC, + 0x81, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x80, 0xF6, + 0x75, 0xCC, 0x9B, 0xCC, 0x80, 0xF6, 0x55, 0xCC, + 0x9B, 0xCC, 0x89, 0xF6, 0x75, 0xCC, 0x9B, 0xCC, + 0x89, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x83, 0xF6, + 0x75, 0xCC, 0x9B, 0xCC, 0x83, 0xF6, 0x55, 0xCC, + 0x9B, 0xCC, 0xA3, 0xF6, 0x75, 0xCC, 0x9B, 0xCC, + 0xA3, 0xF6, 0x59, 0xCC, 0x80, 0xF6, 0x79, 0xCC, + 0x80, 0xF6, 0x59, 0xCC, 0xA3, 0xF6, 0x79, 0xCC, + 0xA3, 0xF6, 0x59, 0xCC, 0x89, 0xF6, 0x79, 0xCC, + 0x89, 0xF6, 0x59, 0xCC, 0x83, 0xF6, 0x79, 0xCC, + 0x83, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xF6, 0xCE, + 0xB1, 0xCC, 0x94, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, + 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, + 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x81, + 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xF6, + 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCE, + 0xB1, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0x91, + 0xCC, 0x93, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xF6, + 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, + 0x91, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0x91, + 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCC, + 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCC, 0x93, + 0xCD, 0x82, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCD, + 0x82, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xF6, 0xCE, + 0xB5, 0xCC, 0x94, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, + 0xCC, 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x94, 0xCC, + 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xCC, 0x81, + 0xF6, 0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x81, 0xF6, + 0xCE, 0x95, 0xCC, 0x93, 0xF6, 0xCE, 0x95, 0xCC, + 0x94, 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x80, + 0xF6, 0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x80, 0xF6, + 0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, + 0x95, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, + 0xCC, 0x93, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xF6, + 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, + 0xB7, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xB7, + 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, + 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, 0x93, + 0xCD, 0x82, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, + 0x82, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xF6, 0xCE, + 0x97, 0xCC, 0x94, 0xF6, 0xCE, 0x97, 0xCC, 0x93, + 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, + 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x81, + 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x81, 0xF6, + 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCE, + 0x97, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xB9, + 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, 0xF6, + 0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, + 0xB9, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, + 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, + 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x93, + 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, 0xCD, + 0x82, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xF6, 0xCE, + 0x99, 0xCC, 0x94, 0xF6, 0xCE, 0x99, 0xCC, 0x93, + 0xCC, 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x94, 0xCC, + 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xCC, 0x81, + 0xF6, 0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x81, 0xF6, + 0xCE, 0x99, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCE, + 0x99, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xBF, + 0xCC, 0x93, 0xF6, 0xCE, 0xBF, 0xCC, 0x94, 0xF6, + 0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, + 0xBF, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xBF, + 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xBF, 0xCC, + 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, 0x93, + 0xF6, 0xCE, 0x9F, 0xCC, 0x94, 0xF6, 0xCE, 0x9F, + 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, + 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, 0x93, + 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, 0x94, 0xCC, + 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xF6, 0xCF, + 0x85, 0xCC, 0x94, 0xF6, 0xCF, 0x85, 0xCC, 0x93, + 0xCC, 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x94, 0xCC, + 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xCC, 0x81, + 0xF6, 0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x81, 0xF6, + 0xCF, 0x85, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCF, + 0x85, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xA5, + 0xCC, 0x94, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCC, + 0x80, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCC, 0x81, + 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCD, 0x82, 0xF6, + 0xCF, 0x89, 0xCC, 0x93, 0xF6, 0xCF, 0x89, 0xCC, + 0x94, 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x80, + 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80, 0xF6, + 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCF, + 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCF, 0x89, + 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCF, 0x89, 0xCC, + 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, + 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xF6, 0xCE, 0xA9, + 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, + 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, + 0xCC, 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, + 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x82, + 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82, 0xF6, + 0xCE, 0xB1, 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, + 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x80, 0xF6, 0xCE, + 0xB5, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, 0x80, + 0xF6, 0xCE, 0xB7, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, + 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, 0xF6, + 0xCE, 0xBF, 0xCC, 0x80, 0xF6, 0xCE, 0xBF, 0xCC, + 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x80, 0xF6, 0xCF, + 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, 0x80, + 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xF6, 0xCE, 0xB1, + 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, + 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, + 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, + 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, + 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, + 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, 0xF6, + 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, + 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, 0xCD, + 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x85, + 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x85, 0xF6, + 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, + 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, 0xCD, + 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x81, + 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCC, + 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, + 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, + 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, + 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, + 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x93, + 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, + 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, + 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, + 0xB7, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, 0xF6, + 0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, + 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82, 0xCD, + 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x85, + 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x85, 0xF6, + 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, + 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80, 0xCD, + 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x81, + 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, + 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, + 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, + 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCF, 0x89, + 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, + 0x94, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x93, + 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, + 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, + 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCF, + 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, 0xF6, + 0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, + 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x82, 0xCD, + 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x85, + 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x85, 0xF6, + 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, + 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x80, 0xCD, + 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x81, + 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, + 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, + 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, + 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, + 0xCC, 0x86, 0xF6, 0xCE, 0xB1, 0xCC, 0x84, 0xF6, + 0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, + 0xB1, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, 0x81, + 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCD, 0x82, 0xF6, + 0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, + 0x91, 0xCC, 0x86, 0xF6, 0xCE, 0x91, 0xCC, 0x84, + 0xF6, 0xCE, 0x91, 0xCC, 0x80, 0xF6, 0xCE, 0x91, + 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCD, 0x85, 0x20, + 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0x20, 0xCC, 0x93, + 0x20, 0xCD, 0x82, 0xF5, 0x05, 0xC2, 0xA8, 0xCD, + 0x82, 0x20, 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, + 0xB7, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, + 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x81, 0xCD, + 0x85, 0xF6, 0xCE, 0xB7, 0xCD, 0x82, 0xF6, 0xCE, + 0xB7, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x95, + 0xCC, 0x80, 0xF6, 0xCE, 0x95, 0xCC, 0x81, 0xF6, + 0xCE, 0x97, 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, + 0x81, 0xF6, 0xCE, 0x97, 0xCD, 0x85, 0xF5, 0x06, + 0xE1, 0xBE, 0xBF, 0xCC, 0x80, 0x20, 0xCC, 0x93, + 0xCC, 0x80, 0xF5, 0x06, 0xE1, 0xBE, 0xBF, 0xCC, + 0x81, 0x20, 0xCC, 0x93, 0xCC, 0x81, 0xF5, 0x06, + 0xE1, 0xBE, 0xBF, 0xCD, 0x82, 0x20, 0xCC, 0x93, + 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x86, 0xF6, + 0xCE, 0xB9, 0xCC, 0x84, 0xF6, 0xCE, 0xB9, 0xCC, + 0x88, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, 0x88, + 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCD, 0x82, 0xF6, + 0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, + 0x99, 0xCC, 0x86, 0xF6, 0xCE, 0x99, 0xCC, 0x84, + 0xF6, 0xCE, 0x99, 0xCC, 0x80, 0xF6, 0xCE, 0x99, + 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, 0xCC, + 0x80, 0x20, 0xCC, 0x94, 0xCC, 0x80, 0xF5, 0x06, + 0xE1, 0xBF, 0xBE, 0xCC, 0x81, 0x20, 0xCC, 0x94, + 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, 0xCD, + 0x82, 0x20, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCF, + 0x85, 0xCC, 0x86, 0xF6, 0xCF, 0x85, 0xCC, 0x84, + 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x80, 0xF6, + 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0xCF, + 0x81, 0xCC, 0x93, 0xF6, 0xCF, 0x81, 0xCC, 0x94, + 0xF6, 0xCF, 0x85, 0xCD, 0x82, 0xF6, 0xCF, 0x85, + 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, 0xA5, 0xCC, + 0x86, 0xF6, 0xCE, 0xA5, 0xCC, 0x84, 0xF6, 0xCE, + 0xA5, 0xCC, 0x80, 0xF6, 0xCE, 0xA5, 0xCC, 0x81, + 0xF6, 0xCE, 0xA1, 0xCC, 0x94, 0xF5, 0x05, 0xC2, + 0xA8, 0xCC, 0x80, 0x20, 0xCC, 0x88, 0xCC, 0x80, + 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, 0x20, 0xCC, + 0x88, 0xCC, 0x81, 0xF6, 0x60, 0xF6, 0xCF, 0x89, + 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCD, + 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xCD, 0x85, + 0xF6, 0xCF, 0x89, 0xCD, 0x82, 0xF6, 0xCF, 0x89, + 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x9F, 0xCC, + 0x80, 0xF6, 0xCE, 0x9F, 0xCC, 0x81, 0xF6, 0xCE, + 0xA9, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, 0x81, + 0xF6, 0xCE, 0xA9, 0xCD, 0x85, 0xF5, 0x03, 0xC2, + 0xB4, 0x20, 0xCC, 0x81, 0x20, 0xCC, 0x94, 0xF5, + 0x04, 0xE2, 0x80, 0x82, 0x20, 0xF5, 0x04, 0xE2, + 0x80, 0x83, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0xE2, 0x80, 0x90, 0x20, + 0xCC, 0xB3, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, + 0x20, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2, + 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, + 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80, + 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0x21, + 0x21, 0x20, 0xCC, 0x85, 0x3F, 0x3F, 0x3F, 0x21, + 0x21, 0x3F, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, + 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0x20, 0x30, + 0x69, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, + 0xE2, 0x88, 0x92, 0x3D, 0x28, 0x29, 0x6E, 0x30, + 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x2B, 0xE2, 0x88, 0x92, 0x3D, 0x28, 0x29, + 0x52, 0x73, 0x61, 0x2F, 0x63, 0x61, 0x2F, 0x73, + 0x43, 0xC2, 0xB0, 0x43, 0x63, 0x2F, 0x6F, 0x63, + 0x2F, 0x75, 0xC6, 0x90, 0xC2, 0xB0, 0x46, 0x67, + 0x48, 0x48, 0x48, 0x68, 0xC4, 0xA7, 0x49, 0x49, + 0x4C, 0x6C, 0x4E, 0x4E, 0x6F, 0x50, 0x51, 0x52, + 0x52, 0x52, 0x53, 0x4D, 0x54, 0x45, 0x4C, 0x54, + 0x4D, 0x5A, 0xF6, 0xCE, 0xA9, 0x5A, 0xF6, 0x4B, + 0xF6, 0x41, 0xCC, 0x8A, 0x42, 0x43, 0x65, 0x45, + 0x46, 0x4D, 0x6F, 0xD7, 0x90, 0xD7, 0x91, 0xD7, + 0x92, 0xD7, 0x93, 0x69, 0xCE, 0xB3, 0xCE, 0x93, + 0xCE, 0xA0, 0xE2, 0x88, 0x91, 0x44, 0x64, 0x65, + 0x69, 0x6A, 0x31, 0xE2, 0x81, 0x84, 0x33, 0x32, + 0xE2, 0x81, 0x84, 0x33, 0x31, 0xE2, 0x81, 0x84, + 0x35, 0x32, 0xE2, 0x81, 0x84, 0x35, 0x33, 0xE2, + 0x81, 0x84, 0x35, 0x34, 0xE2, 0x81, 0x84, 0x35, + 0x31, 0xE2, 0x81, 0x84, 0x36, 0x35, 0xE2, 0x81, + 0x84, 0x36, 0x31, 0xE2, 0x81, 0x84, 0x38, 0x33, + 0xE2, 0x81, 0x84, 0x38, 0x35, 0xE2, 0x81, 0x84, + 0x38, 0x37, 0xE2, 0x81, 0x84, 0x38, 0x31, 0xE2, + 0x81, 0x84, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, + 0x49, 0x56, 0x56, 0x56, 0x49, 0x56, 0x49, 0x49, + 0x56, 0x49, 0x49, 0x49, 0x49, 0x58, 0x58, 0x58, + 0x49, 0x58, 0x49, 0x49, 0x4C, 0x43, 0x44, 0x4D, + 0x69, 0x69, 0x69, 0x69, 0x69, 0x69, 0x69, 0x76, + 0x76, 0x76, 0x69, 0x76, 0x69, 0x69, 0x76, 0x69, + 0x69, 0x69, 0x69, 0x78, 0x78, 0x78, 0x69, 0x78, + 0x69, 0x69, 0x6C, 0x63, 0x64, 0x6D, 0xF6, 0xE2, + 0x86, 0x90, 0xCC, 0xB8, 0xF6, 0xE2, 0x86, 0x92, + 0xCC, 0xB8, 0xF6, 0xE2, 0x86, 0x94, 0xCC, 0xB8, + 0xF6, 0xE2, 0x87, 0x90, 0xCC, 0xB8, 0xF6, 0xE2, + 0x87, 0x94, 0xCC, 0xB8, 0xF6, 0xE2, 0x87, 0x92, + 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0x83, 0xCC, 0xB8, + 0xF6, 0xE2, 0x88, 0x88, 0xCC, 0xB8, 0xF6, 0xE2, + 0x88, 0x8B, 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0xA3, + 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0xA5, 0xCC, 0xB8, + 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, + 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, + 0x88, 0xAE, 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, + 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, 0xF6, 0xE2, + 0x88, 0xBC, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x83, + 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x85, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0x88, 0xCC, 0xB8, 0xF6, 0x3D, + 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xA1, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0x8D, 0xCC, 0xB8, 0xF6, 0x3C, + 0xCC, 0xB8, 0xF6, 0x3E, 0xCC, 0xB8, 0xF6, 0xE2, + 0x89, 0xA4, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xA5, + 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB2, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0xB3, 0xCC, 0xB8, 0xF6, 0xE2, + 0x89, 0xB6, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB7, + 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBA, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0xBB, 0xCC, 0xB8, 0xF6, 0xE2, + 0x8A, 0x82, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x83, + 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x86, 0xCC, 0xB8, + 0xF6, 0xE2, 0x8A, 0x87, 0xCC, 0xB8, 0xF6, 0xE2, + 0x8A, 0xA2, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xA8, + 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xA9, 0xCC, 0xB8, + 0xF6, 0xE2, 0x8A, 0xAB, 0xCC, 0xB8, 0xF6, 0xE2, + 0x89, 0xBC, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBD, + 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x91, 0xCC, 0xB8, + 0xF6, 0xE2, 0x8A, 0x92, 0xCC, 0xB8, 0xF6, 0xE2, + 0x8A, 0xB2, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB3, + 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB4, 0xCC, 0xB8, + 0xF6, 0xE2, 0x8A, 0xB5, 0xCC, 0xB8, 0xF6, 0xE3, + 0x80, 0x88, 0xF6, 0xE3, 0x80, 0x89, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, + 0x30, 0x31, 0x31, 0x31, 0x32, 0x31, 0x33, 0x31, + 0x34, 0x31, 0x35, 0x31, 0x36, 0x31, 0x37, 0x31, + 0x38, 0x31, 0x39, 0x32, 0x30, 0x28, 0x31, 0x29, + 0x28, 0x32, 0x29, 0x28, 0x33, 0x29, 0x28, 0x34, + 0x29, 0x28, 0x35, 0x29, 0x28, 0x36, 0x29, 0x28, + 0x37, 0x29, 0x28, 0x38, 0x29, 0x28, 0x39, 0x29, + 0x28, 0x31, 0x30, 0x29, 0x28, 0x31, 0x31, 0x29, + 0x28, 0x31, 0x32, 0x29, 0x28, 0x31, 0x33, 0x29, + 0x28, 0x31, 0x34, 0x29, 0x28, 0x31, 0x35, 0x29, + 0x28, 0x31, 0x36, 0x29, 0x28, 0x31, 0x37, 0x29, + 0x28, 0x31, 0x38, 0x29, 0x28, 0x31, 0x39, 0x29, + 0x28, 0x32, 0x30, 0x29, 0x31, 0x2E, 0x32, 0x2E, + 0x33, 0x2E, 0x34, 0x2E, 0x35, 0x2E, 0x36, 0x2E, + 0x37, 0x2E, 0x38, 0x2E, 0x39, 0x2E, 0x31, 0x30, + 0x2E, 0x31, 0x31, 0x2E, 0x31, 0x32, 0x2E, 0x31, + 0x33, 0x2E, 0x31, 0x34, 0x2E, 0x31, 0x35, 0x2E, + 0x31, 0x36, 0x2E, 0x31, 0x37, 0x2E, 0x31, 0x38, + 0x2E, 0x31, 0x39, 0x2E, 0x32, 0x30, 0x2E, 0x28, + 0x61, 0x29, 0x28, 0x62, 0x29, 0x28, 0x63, 0x29, + 0x28, 0x64, 0x29, 0x28, 0x65, 0x29, 0x28, 0x66, + 0x29, 0x28, 0x67, 0x29, 0x28, 0x68, 0x29, 0x28, + 0x69, 0x29, 0x28, 0x6A, 0x29, 0x28, 0x6B, 0x29, + 0x28, 0x6C, 0x29, 0x28, 0x6D, 0x29, 0x28, 0x6E, + 0x29, 0x28, 0x6F, 0x29, 0x28, 0x70, 0x29, 0x28, + 0x71, 0x29, 0x28, 0x72, 0x29, 0x28, 0x73, 0x29, + 0x28, 0x74, 0x29, 0x28, 0x75, 0x29, 0x28, 0x76, + 0x29, 0x28, 0x77, 0x29, 0x28, 0x78, 0x29, 0x28, + 0x79, 0x29, 0x28, 0x7A, 0x29, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x30, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, + 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0x3A, 0x3A, + 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0xF6, 0xE2, + 0xAB, 0x9D, 0xCC, 0xB8, 0xE6, 0xAF, 0x8D, 0xE9, + 0xBE, 0x9F, 0xE4, 0xB8, 0x80, 0xE4, 0xB8, 0xA8, + 0xE4, 0xB8, 0xB6, 0xE4, 0xB8, 0xBF, 0xE4, 0xB9, + 0x99, 0xE4, 0xBA, 0x85, 0xE4, 0xBA, 0x8C, 0xE4, + 0xBA, 0xA0, 0xE4, 0xBA, 0xBA, 0xE5, 0x84, 0xBF, + 0xE5, 0x85, 0xA5, 0xE5, 0x85, 0xAB, 0xE5, 0x86, + 0x82, 0xE5, 0x86, 0x96, 0xE5, 0x86, 0xAB, 0xE5, + 0x87, 0xA0, 0xE5, 0x87, 0xB5, 0xE5, 0x88, 0x80, + 0xE5, 0x8A, 0x9B, 0xE5, 0x8B, 0xB9, 0xE5, 0x8C, + 0x95, 0xE5, 0x8C, 0x9A, 0xE5, 0x8C, 0xB8, 0xE5, + 0x8D, 0x81, 0xE5, 0x8D, 0x9C, 0xE5, 0x8D, 0xA9, + 0xE5, 0x8E, 0x82, 0xE5, 0x8E, 0xB6, 0xE5, 0x8F, + 0x88, 0xE5, 0x8F, 0xA3, 0xE5, 0x9B, 0x97, 0xE5, + 0x9C, 0x9F, 0xE5, 0xA3, 0xAB, 0xE5, 0xA4, 0x82, + 0xE5, 0xA4, 0x8A, 0xE5, 0xA4, 0x95, 0xE5, 0xA4, + 0xA7, 0xE5, 0xA5, 0xB3, 0xE5, 0xAD, 0x90, 0xE5, + 0xAE, 0x80, 0xE5, 0xAF, 0xB8, 0xE5, 0xB0, 0x8F, + 0xE5, 0xB0, 0xA2, 0xE5, 0xB0, 0xB8, 0xE5, 0xB1, + 0xAE, 0xE5, 0xB1, 0xB1, 0xE5, 0xB7, 0x9B, 0xE5, + 0xB7, 0xA5, 0xE5, 0xB7, 0xB1, 0xE5, 0xB7, 0xBE, + 0xE5, 0xB9, 0xB2, 0xE5, 0xB9, 0xBA, 0xE5, 0xB9, + 0xBF, 0xE5, 0xBB, 0xB4, 0xE5, 0xBB, 0xBE, 0xE5, + 0xBC, 0x8B, 0xE5, 0xBC, 0x93, 0xE5, 0xBD, 0x90, + 0xE5, 0xBD, 0xA1, 0xE5, 0xBD, 0xB3, 0xE5, 0xBF, + 0x83, 0xE6, 0x88, 0x88, 0xE6, 0x88, 0xB6, 0xE6, + 0x89, 0x8B, 0xE6, 0x94, 0xAF, 0xE6, 0x94, 0xB4, + 0xE6, 0x96, 0x87, 0xE6, 0x96, 0x97, 0xE6, 0x96, + 0xA4, 0xE6, 0x96, 0xB9, 0xE6, 0x97, 0xA0, 0xE6, + 0x97, 0xA5, 0xE6, 0x9B, 0xB0, 0xE6, 0x9C, 0x88, + 0xE6, 0x9C, 0xA8, 0xE6, 0xAC, 0xA0, 0xE6, 0xAD, + 0xA2, 0xE6, 0xAD, 0xB9, 0xE6, 0xAE, 0xB3, 0xE6, + 0xAF, 0x8B, 0xE6, 0xAF, 0x94, 0xE6, 0xAF, 0x9B, + 0xE6, 0xB0, 0x8F, 0xE6, 0xB0, 0x94, 0xE6, 0xB0, + 0xB4, 0xE7, 0x81, 0xAB, 0xE7, 0x88, 0xAA, 0xE7, + 0x88, 0xB6, 0xE7, 0x88, 0xBB, 0xE7, 0x88, 0xBF, + 0xE7, 0x89, 0x87, 0xE7, 0x89, 0x99, 0xE7, 0x89, + 0x9B, 0xE7, 0x8A, 0xAC, 0xE7, 0x8E, 0x84, 0xE7, + 0x8E, 0x89, 0xE7, 0x93, 0x9C, 0xE7, 0x93, 0xA6, + 0xE7, 0x94, 0x98, 0xE7, 0x94, 0x9F, 0xE7, 0x94, + 0xA8, 0xE7, 0x94, 0xB0, 0xE7, 0x96, 0x8B, 0xE7, + 0x96, 0x92, 0xE7, 0x99, 0xB6, 0xE7, 0x99, 0xBD, + 0xE7, 0x9A, 0xAE, 0xE7, 0x9A, 0xBF, 0xE7, 0x9B, + 0xAE, 0xE7, 0x9F, 0x9B, 0xE7, 0x9F, 0xA2, 0xE7, + 0x9F, 0xB3, 0xE7, 0xA4, 0xBA, 0xE7, 0xA6, 0xB8, + 0xE7, 0xA6, 0xBE, 0xE7, 0xA9, 0xB4, 0xE7, 0xAB, + 0x8B, 0xE7, 0xAB, 0xB9, 0xE7, 0xB1, 0xB3, 0xE7, + 0xB3, 0xB8, 0xE7, 0xBC, 0xB6, 0xE7, 0xBD, 0x91, + 0xE7, 0xBE, 0x8A, 0xE7, 0xBE, 0xBD, 0xE8, 0x80, + 0x81, 0xE8, 0x80, 0x8C, 0xE8, 0x80, 0x92, 0xE8, + 0x80, 0xB3, 0xE8, 0x81, 0xBF, 0xE8, 0x82, 0x89, + 0xE8, 0x87, 0xA3, 0xE8, 0x87, 0xAA, 0xE8, 0x87, + 0xB3, 0xE8, 0x87, 0xBC, 0xE8, 0x88, 0x8C, 0xE8, + 0x88, 0x9B, 0xE8, 0x88, 0x9F, 0xE8, 0x89, 0xAE, + 0xE8, 0x89, 0xB2, 0xE8, 0x89, 0xB8, 0xE8, 0x99, + 0x8D, 0xE8, 0x99, 0xAB, 0xE8, 0xA1, 0x80, 0xE8, + 0xA1, 0x8C, 0xE8, 0xA1, 0xA3, 0xE8, 0xA5, 0xBE, + 0xE8, 0xA6, 0x8B, 0xE8, 0xA7, 0x92, 0xE8, 0xA8, + 0x80, 0xE8, 0xB0, 0xB7, 0xE8, 0xB1, 0x86, 0xE8, + 0xB1, 0x95, 0xE8, 0xB1, 0xB8, 0xE8, 0xB2, 0x9D, + 0xE8, 0xB5, 0xA4, 0xE8, 0xB5, 0xB0, 0xE8, 0xB6, + 0xB3, 0xE8, 0xBA, 0xAB, 0xE8, 0xBB, 0x8A, 0xE8, + 0xBE, 0x9B, 0xE8, 0xBE, 0xB0, 0xE8, 0xBE, 0xB5, + 0xE9, 0x82, 0x91, 0xE9, 0x85, 0x89, 0xE9, 0x87, + 0x86, 0xE9, 0x87, 0x8C, 0xE9, 0x87, 0x91, 0xE9, + 0x95, 0xB7, 0xE9, 0x96, 0x80, 0xE9, 0x98, 0x9C, + 0xE9, 0x9A, 0xB6, 0xE9, 0x9A, 0xB9, 0xE9, 0x9B, + 0xA8, 0xE9, 0x9D, 0x91, 0xE9, 0x9D, 0x9E, 0xE9, + 0x9D, 0xA2, 0xE9, 0x9D, 0xA9, 0xE9, 0x9F, 0x8B, + 0xE9, 0x9F, 0xAD, 0xE9, 0x9F, 0xB3, 0xE9, 0xA0, + 0x81, 0xE9, 0xA2, 0xA8, 0xE9, 0xA3, 0x9B, 0xE9, + 0xA3, 0x9F, 0xE9, 0xA6, 0x96, 0xE9, 0xA6, 0x99, + 0xE9, 0xA6, 0xAC, 0xE9, 0xAA, 0xA8, 0xE9, 0xAB, + 0x98, 0xE9, 0xAB, 0x9F, 0xE9, 0xAC, 0xA5, 0xE9, + 0xAC, 0xAF, 0xE9, 0xAC, 0xB2, 0xE9, 0xAC, 0xBC, + 0xE9, 0xAD, 0x9A, 0xE9, 0xB3, 0xA5, 0xE9, 0xB9, + 0xB5, 0xE9, 0xB9, 0xBF, 0xE9, 0xBA, 0xA5, 0xE9, + 0xBA, 0xBB, 0xE9, 0xBB, 0x83, 0xE9, 0xBB, 0x8D, + 0xE9, 0xBB, 0x91, 0xE9, 0xBB, 0xB9, 0xE9, 0xBB, + 0xBD, 0xE9, 0xBC, 0x8E, 0xE9, 0xBC, 0x93, 0xE9, + 0xBC, 0xA0, 0xE9, 0xBC, 0xBB, 0xE9, 0xBD, 0x8A, + 0xE9, 0xBD, 0x92, 0xE9, 0xBE, 0x8D, 0xE9, 0xBE, + 0x9C, 0xE9, 0xBE, 0xA0, 0x20, 0xE3, 0x80, 0x92, + 0xE5, 0x8D, 0x81, 0xE5, 0x8D, 0x84, 0xE5, 0x8D, + 0x85, 0xF6, 0xE3, 0x81, 0x8B, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x81, 0x8D, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x81, 0x8F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x81, 0x91, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, + 0x93, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x95, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x97, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x99, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x81, 0x9B, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x81, 0x9D, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x81, 0x9F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x81, 0xA1, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, + 0xA4, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA6, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA8, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x9A, + 0xF6, 0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, + 0x81, 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, + 0xB5, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x81, 0xB8, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xB8, 0xE3, + 0x82, 0x9A, 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x9A, + 0xF6, 0xE3, 0x81, 0x86, 0xE3, 0x82, 0x99, 0x20, + 0xE3, 0x82, 0x99, 0x20, 0xE3, 0x82, 0x9A, 0xF6, + 0xE3, 0x82, 0x9D, 0xE3, 0x82, 0x99, 0xE3, 0x82, + 0x88, 0xE3, 0x82, 0x8A, 0xF6, 0xE3, 0x82, 0xAB, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xAD, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xAF, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x82, 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x82, 0xB7, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, + 0xB9, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBB, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBD, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBF, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x83, 0x81, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x83, 0x84, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x83, 0x88, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, + 0x8F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x8F, + 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x83, 0x92, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x92, 0xE3, 0x82, + 0x9A, 0xF6, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x9A, 0xF6, + 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x83, + 0x9B, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x9B, + 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x82, 0xA6, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x83, 0xAF, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x83, 0xB0, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x83, 0xB1, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x83, 0xB2, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x83, 0xBD, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xB3, + 0xE3, 0x83, 0x88, 0xE1, 0x84, 0x80, 0xE1, 0x84, + 0x81, 0xE1, 0x86, 0xAA, 0xE1, 0x84, 0x82, 0xE1, + 0x86, 0xAC, 0xE1, 0x86, 0xAD, 0xE1, 0x84, 0x83, + 0xE1, 0x84, 0x84, 0xE1, 0x84, 0x85, 0xE1, 0x86, + 0xB0, 0xE1, 0x86, 0xB1, 0xE1, 0x86, 0xB2, 0xE1, + 0x86, 0xB3, 0xE1, 0x86, 0xB4, 0xE1, 0x86, 0xB5, + 0xE1, 0x84, 0x9A, 0xE1, 0x84, 0x86, 0xE1, 0x84, + 0x87, 0xE1, 0x84, 0x88, 0xE1, 0x84, 0xA1, 0xE1, + 0x84, 0x89, 0xE1, 0x84, 0x8A, 0xE1, 0x84, 0x8B, + 0xE1, 0x84, 0x8C, 0xE1, 0x84, 0x8D, 0xE1, 0x84, + 0x8E, 0xE1, 0x84, 0x8F, 0xE1, 0x84, 0x90, 0xE1, + 0x84, 0x91, 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xA1, + 0xE1, 0x85, 0xA2, 0xE1, 0x85, 0xA3, 0xE1, 0x85, + 0xA4, 0xE1, 0x85, 0xA5, 0xE1, 0x85, 0xA6, 0xE1, + 0x85, 0xA7, 0xE1, 0x85, 0xA8, 0xE1, 0x85, 0xA9, + 0xE1, 0x85, 0xAA, 0xE1, 0x85, 0xAB, 0xE1, 0x85, + 0xAC, 0xE1, 0x85, 0xAD, 0xE1, 0x85, 0xAE, 0xE1, + 0x85, 0xAF, 0xE1, 0x85, 0xB0, 0xE1, 0x85, 0xB1, + 0xE1, 0x85, 0xB2, 0xE1, 0x85, 0xB3, 0xE1, 0x85, + 0xB4, 0xE1, 0x85, 0xB5, 0xE1, 0x85, 0xA0, 0xE1, + 0x84, 0x94, 0xE1, 0x84, 0x95, 0xE1, 0x87, 0x87, + 0xE1, 0x87, 0x88, 0xE1, 0x87, 0x8C, 0xE1, 0x87, + 0x8E, 0xE1, 0x87, 0x93, 0xE1, 0x87, 0x97, 0xE1, + 0x87, 0x99, 0xE1, 0x84, 0x9C, 0xE1, 0x87, 0x9D, + 0xE1, 0x87, 0x9F, 0xE1, 0x84, 0x9D, 0xE1, 0x84, + 0x9E, 0xE1, 0x84, 0xA0, 0xE1, 0x84, 0xA2, 0xE1, + 0x84, 0xA3, 0xE1, 0x84, 0xA7, 0xE1, 0x84, 0xA9, + 0xE1, 0x84, 0xAB, 0xE1, 0x84, 0xAC, 0xE1, 0x84, + 0xAD, 0xE1, 0x84, 0xAE, 0xE1, 0x84, 0xAF, 0xE1, + 0x84, 0xB2, 0xE1, 0x84, 0xB6, 0xE1, 0x85, 0x80, + 0xE1, 0x85, 0x87, 0xE1, 0x85, 0x8C, 0xE1, 0x87, + 0xB1, 0xE1, 0x87, 0xB2, 0xE1, 0x85, 0x97, 0xE1, + 0x85, 0x98, 0xE1, 0x85, 0x99, 0xE1, 0x86, 0x84, + 0xE1, 0x86, 0x85, 0xE1, 0x86, 0x88, 0xE1, 0x86, + 0x91, 0xE1, 0x86, 0x92, 0xE1, 0x86, 0x94, 0xE1, + 0x86, 0x9E, 0xE1, 0x86, 0xA1, 0xE4, 0xB8, 0x80, + 0xE4, 0xBA, 0x8C, 0xE4, 0xB8, 0x89, 0xE5, 0x9B, + 0x9B, 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, 0xAD, 0xE4, + 0xB8, 0x8B, 0xE7, 0x94, 0xB2, 0xE4, 0xB9, 0x99, + 0xE4, 0xB8, 0x99, 0xE4, 0xB8, 0x81, 0xE5, 0xA4, + 0xA9, 0xE5, 0x9C, 0xB0, 0xE4, 0xBA, 0xBA, 0x28, + 0xE1, 0x84, 0x80, 0x29, 0x28, 0xE1, 0x84, 0x82, + 0x29, 0x28, 0xE1, 0x84, 0x83, 0x29, 0x28, 0xE1, + 0x84, 0x85, 0x29, 0x28, 0xE1, 0x84, 0x86, 0x29, + 0x28, 0xE1, 0x84, 0x87, 0x29, 0x28, 0xE1, 0x84, + 0x89, 0x29, 0x28, 0xE1, 0x84, 0x8B, 0x29, 0x28, + 0xE1, 0x84, 0x8C, 0x29, 0x28, 0xE1, 0x84, 0x8E, + 0x29, 0x28, 0xE1, 0x84, 0x8F, 0x29, 0x28, 0xE1, + 0x84, 0x90, 0x29, 0x28, 0xE1, 0x84, 0x91, 0x29, + 0x28, 0xE1, 0x84, 0x92, 0x29, 0x28, 0xE1, 0x84, + 0x80, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x82, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x83, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x85, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x86, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x87, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x89, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x8B, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x8C, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x8E, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x8F, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x90, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x91, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x92, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, + 0x8C, 0xE1, 0x85, 0xAE, 0x29, 0x28, 0xE4, 0xB8, + 0x80, 0x29, 0x28, 0xE4, 0xBA, 0x8C, 0x29, 0x28, + 0xE4, 0xB8, 0x89, 0x29, 0x28, 0xE5, 0x9B, 0x9B, + 0x29, 0x28, 0xE4, 0xBA, 0x94, 0x29, 0x28, 0xE5, + 0x85, 0xAD, 0x29, 0x28, 0xE4, 0xB8, 0x83, 0x29, + 0x28, 0xE5, 0x85, 0xAB, 0x29, 0x28, 0xE4, 0xB9, + 0x9D, 0x29, 0x28, 0xE5, 0x8D, 0x81, 0x29, 0x28, + 0xE6, 0x9C, 0x88, 0x29, 0x28, 0xE7, 0x81, 0xAB, + 0x29, 0x28, 0xE6, 0xB0, 0xB4, 0x29, 0x28, 0xE6, + 0x9C, 0xA8, 0x29, 0x28, 0xE9, 0x87, 0x91, 0x29, + 0x28, 0xE5, 0x9C, 0x9F, 0x29, 0x28, 0xE6, 0x97, + 0xA5, 0x29, 0x28, 0xE6, 0xA0, 0xAA, 0x29, 0x28, + 0xE6, 0x9C, 0x89, 0x29, 0x28, 0xE7, 0xA4, 0xBE, + 0x29, 0x28, 0xE5, 0x90, 0x8D, 0x29, 0x28, 0xE7, + 0x89, 0xB9, 0x29, 0x28, 0xE8, 0xB2, 0xA1, 0x29, + 0x28, 0xE7, 0xA5, 0x9D, 0x29, 0x28, 0xE5, 0x8A, + 0xB4, 0x29, 0x28, 0xE4, 0xBB, 0xA3, 0x29, 0x28, + 0xE5, 0x91, 0xBC, 0x29, 0x28, 0xE5, 0xAD, 0xA6, + 0x29, 0x28, 0xE7, 0x9B, 0xA3, 0x29, 0x28, 0xE4, + 0xBC, 0x81, 0x29, 0x28, 0xE8, 0xB3, 0x87, 0x29, + 0x28, 0xE5, 0x8D, 0x94, 0x29, 0x28, 0xE7, 0xA5, + 0xAD, 0x29, 0x28, 0xE4, 0xBC, 0x91, 0x29, 0x28, + 0xE8, 0x87, 0xAA, 0x29, 0x28, 0xE8, 0x87, 0xB3, + 0x29, 0x32, 0x31, 0x32, 0x32, 0x32, 0x33, 0x32, + 0x34, 0x32, 0x35, 0x32, 0x36, 0x32, 0x37, 0x32, + 0x38, 0x32, 0x39, 0x33, 0x30, 0x33, 0x31, 0x33, + 0x32, 0x33, 0x33, 0x33, 0x34, 0x33, 0x35, 0xE1, + 0x84, 0x80, 0xE1, 0x84, 0x82, 0xE1, 0x84, 0x83, + 0xE1, 0x84, 0x85, 0xE1, 0x84, 0x86, 0xE1, 0x84, + 0x87, 0xE1, 0x84, 0x89, 0xE1, 0x84, 0x8B, 0xE1, + 0x84, 0x8C, 0xE1, 0x84, 0x8E, 0xE1, 0x84, 0x8F, + 0xE1, 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, 0x84, + 0x92, 0xE1, 0x84, 0x80, 0xE1, 0x85, 0xA1, 0xE1, + 0x84, 0x82, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x83, + 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x85, 0xE1, 0x85, + 0xA1, 0xE1, 0x84, 0x86, 0xE1, 0x85, 0xA1, 0xE1, + 0x84, 0x87, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x89, + 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x8B, 0xE1, 0x85, + 0xA1, 0xE1, 0x84, 0x8C, 0xE1, 0x85, 0xA1, 0xE1, + 0x84, 0x8E, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x8F, + 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x90, 0xE1, 0x85, + 0xA1, 0xE1, 0x84, 0x91, 0xE1, 0x85, 0xA1, 0xE1, + 0x84, 0x92, 0xE1, 0x85, 0xA1, 0xE4, 0xB8, 0x80, + 0xE4, 0xBA, 0x8C, 0xE4, 0xB8, 0x89, 0xE5, 0x9B, + 0x9B, 0xE4, 0xBA, 0x94, 0xE5, 0x85, 0xAD, 0xE4, + 0xB8, 0x83, 0xE5, 0x85, 0xAB, 0xE4, 0xB9, 0x9D, + 0xE5, 0x8D, 0x81, 0xE6, 0x9C, 0x88, 0xE7, 0x81, + 0xAB, 0xE6, 0xB0, 0xB4, 0xE6, 0x9C, 0xA8, 0xE9, + 0x87, 0x91, 0xE5, 0x9C, 0x9F, 0xE6, 0x97, 0xA5, + 0xE6, 0xA0, 0xAA, 0xE6, 0x9C, 0x89, 0xE7, 0xA4, + 0xBE, 0xE5, 0x90, 0x8D, 0xE7, 0x89, 0xB9, 0xE8, + 0xB2, 0xA1, 0xE7, 0xA5, 0x9D, 0xE5, 0x8A, 0xB4, + 0xE7, 0xA7, 0x98, 0xE7, 0x94, 0xB7, 0xE5, 0xA5, + 0xB3, 0xE9, 0x81, 0xA9, 0xE5, 0x84, 0xAA, 0xE5, + 0x8D, 0xB0, 0xE6, 0xB3, 0xA8, 0xE9, 0xA0, 0x85, + 0xE4, 0xBC, 0x91, 0xE5, 0x86, 0x99, 0xE6, 0xAD, + 0xA3, 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, 0xAD, 0xE4, + 0xB8, 0x8B, 0xE5, 0xB7, 0xA6, 0xE5, 0x8F, 0xB3, + 0xE5, 0x8C, 0xBB, 0xE5, 0xAE, 0x97, 0xE5, 0xAD, + 0xA6, 0xE7, 0x9B, 0xA3, 0xE4, 0xBC, 0x81, 0xE8, + 0xB3, 0x87, 0xE5, 0x8D, 0x94, 0xE5, 0xA4, 0x9C, + 0x33, 0x36, 0x33, 0x37, 0x33, 0x38, 0x33, 0x39, + 0x34, 0x30, 0x34, 0x31, 0x34, 0x32, 0x34, 0x33, + 0x34, 0x34, 0x34, 0x35, 0x34, 0x36, 0x34, 0x37, + 0x34, 0x38, 0x34, 0x39, 0x35, 0x30, 0x31, 0xE6, + 0x9C, 0x88, 0x32, 0xE6, 0x9C, 0x88, 0x33, 0xE6, + 0x9C, 0x88, 0x34, 0xE6, 0x9C, 0x88, 0x35, 0xE6, + 0x9C, 0x88, 0x36, 0xE6, 0x9C, 0x88, 0x37, 0xE6, + 0x9C, 0x88, 0x38, 0xE6, 0x9C, 0x88, 0x39, 0xE6, + 0x9C, 0x88, 0x31, 0x30, 0xE6, 0x9C, 0x88, 0x31, + 0x31, 0xE6, 0x9C, 0x88, 0x31, 0x32, 0xE6, 0x9C, + 0x88, 0xE3, 0x82, 0xA2, 0xE3, 0x82, 0xA4, 0xE3, + 0x82, 0xA6, 0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xAA, + 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0xAD, 0xE3, 0x82, + 0xAF, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0xB3, 0xE3, + 0x82, 0xB5, 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0xB9, + 0xE3, 0x82, 0xBB, 0xE3, 0x82, 0xBD, 0xE3, 0x82, + 0xBF, 0xE3, 0x83, 0x81, 0xE3, 0x83, 0x84, 0xE3, + 0x83, 0x86, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x8A, + 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0x8C, 0xE3, 0x83, + 0x8D, 0xE3, 0x83, 0x8E, 0xE3, 0x83, 0x8F, 0xE3, + 0x83, 0x92, 0xE3, 0x83, 0x95, 0xE3, 0x83, 0x98, + 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0x9E, 0xE3, 0x83, + 0x9F, 0xE3, 0x83, 0xA0, 0xE3, 0x83, 0xA1, 0xE3, + 0x83, 0xA2, 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xA6, + 0xE3, 0x83, 0xA8, 0xE3, 0x83, 0xA9, 0xE3, 0x83, + 0xAA, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xAC, 0xE3, + 0x83, 0xAD, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0xB0, + 0xE3, 0x83, 0xB1, 0xE3, 0x83, 0xB2, 0xE3, 0x82, + 0xA2, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xA2, + 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x95, 0xE3, 0x82, + 0xA1, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xB3, 0xE3, + 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xA2, + 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xBC, 0xE3, 0x83, + 0xAB, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0x8B, 0xE3, + 0x83, 0xB3, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, + 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x81, 0xE3, 0x82, 0xA6, 0xE3, 0x82, 0xA9, 0xE3, + 0x83, 0xB3, 0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xB9, + 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xBC, 0xE3, 0x83, + 0x88, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xA8, 0xE3, + 0x83, 0xBC, 0xE3, 0x82, 0xAB, 0xE3, 0x83, 0xBC, + 0xE3, 0x82, 0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82, + 0xB9, 0xE3, 0x82, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, + 0x83, 0xA0, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0xA4, + 0xE3, 0x83, 0xAA, 0xE3, 0x82, 0xAB, 0xE3, 0x83, + 0xA9, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, + 0x82, 0xAB, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xAA, + 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAB, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3, 0xE3, + 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xB3, + 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xAD, 0xE3, 0x82, + 0x99, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, + 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x8B, + 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAD, 0xE3, 0x83, + 0xA5, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, + 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, + 0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xBC, 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, + 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, 0x82, 0xAF, + 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9, 0xE3, 0x83, + 0xA0, 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, + 0x83, 0xA1, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, + 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xAD, 0xE3, 0x83, + 0xAD, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0x83, 0xE3, + 0x83, 0x88, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0xE3, 0x82, + 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9, 0xE3, + 0x83, 0xA0, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, + 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, 0xE3, 0x82, + 0xBB, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xA4, 0xE3, + 0x83, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, + 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x8D, 0xE3, 0x82, + 0xB1, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB9, 0xE3, + 0x82, 0xB3, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x8A, + 0xE3, 0x82, 0xB3, 0xE3, 0x83, 0xBC, 0xE3, 0x83, + 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xB5, 0xE3, + 0x82, 0xA4, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, + 0xE3, 0x82, 0xB5, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x81, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xA0, 0xE3, + 0x82, 0xB7, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xB3, + 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x82, + 0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, + 0x82, 0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, + 0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xBC, 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x86, 0xE3, + 0x82, 0x99, 0xE3, 0x82, 0xB7, 0xE3, 0x83, 0x88, + 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, + 0x88, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x8A, 0xE3, + 0x83, 0x8E, 0xE3, 0x83, 0x8E, 0xE3, 0x83, 0x83, + 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x8F, 0xE3, 0x82, + 0xA4, 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x8F, 0xE3, + 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xBB, + 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x83, + 0x8F, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, + 0x83, 0x84, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAC, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, + 0x82, 0xA2, 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x88, + 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, + 0x9A, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, 0xE3, + 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xB3, + 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0xA1, 0xE3, + 0x83, 0xA9, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, + 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x95, 0xE3, 0x82, + 0xA3, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, + 0x83, 0x95, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x83, + 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0xA7, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0x95, 0xE3, 0x83, 0xA9, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0xAF, + 0xE3, 0x82, 0xBF, 0xE3, 0x83, 0xBC, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, + 0x82, 0xBD, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, + 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0x92, 0xE3, 0x83, + 0x98, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x84, 0xE3, + 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3, + 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x98, 0xE3, 0x82, + 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB7, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xBF, 0xE3, 0x83, + 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xA4, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x9B, + 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, + 0x88, 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xB3, 0xE3, + 0x83, 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3, + 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, + 0x83, 0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xB3, + 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xA4, 0xE3, 0x82, + 0xAF, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0x9E, 0xE3, + 0x82, 0xA4, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x9E, + 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x8F, 0xE3, 0x83, + 0x9E, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xAF, 0xE3, + 0x83, 0x9E, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xB7, + 0xE3, 0x83, 0xA7, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x9F, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xAA, + 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xAA, 0xE3, 0x83, + 0x8F, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, + 0x83, 0xAB, 0xE3, 0x83, 0xA1, 0xE3, 0x82, 0xAB, + 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA1, 0xE3, 0x82, + 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x88, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0xE3, 0x83, + 0xA4, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xA6, 0xE3, 0x82, + 0xA2, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0xAA, 0xE3, + 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, + 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xA9, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xA0, 0xE3, + 0x83, 0xAC, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, + 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xB3, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0x83, 0xE3, + 0x83, 0x88, 0x30, 0xE7, 0x82, 0xB9, 0x31, 0xE7, + 0x82, 0xB9, 0x32, 0xE7, 0x82, 0xB9, 0x33, 0xE7, + 0x82, 0xB9, 0x34, 0xE7, 0x82, 0xB9, 0x35, 0xE7, + 0x82, 0xB9, 0x36, 0xE7, 0x82, 0xB9, 0x37, 0xE7, + 0x82, 0xB9, 0x38, 0xE7, 0x82, 0xB9, 0x39, 0xE7, + 0x82, 0xB9, 0x31, 0x30, 0xE7, 0x82, 0xB9, 0x31, + 0x31, 0xE7, 0x82, 0xB9, 0x31, 0x32, 0xE7, 0x82, + 0xB9, 0x31, 0x33, 0xE7, 0x82, 0xB9, 0x31, 0x34, + 0xE7, 0x82, 0xB9, 0x31, 0x35, 0xE7, 0x82, 0xB9, + 0x31, 0x36, 0xE7, 0x82, 0xB9, 0x31, 0x37, 0xE7, + 0x82, 0xB9, 0x31, 0x38, 0xE7, 0x82, 0xB9, 0x31, + 0x39, 0xE7, 0x82, 0xB9, 0x32, 0x30, 0xE7, 0x82, + 0xB9, 0x32, 0x31, 0xE7, 0x82, 0xB9, 0x32, 0x32, + 0xE7, 0x82, 0xB9, 0x32, 0x33, 0xE7, 0x82, 0xB9, + 0x32, 0x34, 0xE7, 0x82, 0xB9, 0x68, 0x50, 0x61, + 0x64, 0x61, 0x41, 0x55, 0x62, 0x61, 0x72, 0x6F, + 0x56, 0x70, 0x63, 0xE5, 0xB9, 0xB3, 0xE6, 0x88, + 0x90, 0xE6, 0x98, 0xAD, 0xE5, 0x92, 0x8C, 0xE5, + 0xA4, 0xA7, 0xE6, 0xAD, 0xA3, 0xE6, 0x98, 0x8E, + 0xE6, 0xB2, 0xBB, 0xE6, 0xA0, 0xAA, 0xE5, 0xBC, + 0x8F, 0xE4, 0xBC, 0x9A, 0xE7, 0xA4, 0xBE, 0x70, + 0x41, 0x6E, 0x41, 0xCE, 0xBC, 0x41, 0x6D, 0x41, + 0x6B, 0x41, 0x4B, 0x42, 0x4D, 0x42, 0x47, 0x42, + 0x63, 0x61, 0x6C, 0x6B, 0x63, 0x61, 0x6C, 0x70, + 0x46, 0x6E, 0x46, 0xCE, 0xBC, 0x46, 0xCE, 0xBC, + 0x67, 0x6D, 0x67, 0x6B, 0x67, 0x48, 0x7A, 0x6B, + 0x48, 0x7A, 0x4D, 0x48, 0x7A, 0x47, 0x48, 0x7A, + 0x54, 0x48, 0x7A, 0xCE, 0xBC, 0x6C, 0x6D, 0x6C, + 0x64, 0x6C, 0x6B, 0x6C, 0x66, 0x6D, 0x6E, 0x6D, + 0xCE, 0xBC, 0x6D, 0x6D, 0x6D, 0x63, 0x6D, 0x6B, + 0x6D, 0x6D, 0x6D, 0x32, 0x63, 0x6D, 0x32, 0x6D, + 0x32, 0x6B, 0x6D, 0x32, 0x6D, 0x6D, 0x33, 0x63, + 0x6D, 0x33, 0x6D, 0x33, 0x6B, 0x6D, 0x33, 0x6D, + 0xE2, 0x88, 0x95, 0x73, 0x6D, 0xE2, 0x88, 0x95, + 0x73, 0x32, 0x50, 0x61, 0x6B, 0x50, 0x61, 0x4D, + 0x50, 0x61, 0x47, 0x50, 0x61, 0x72, 0x61, 0x64, + 0x72, 0x61, 0x64, 0xE2, 0x88, 0x95, 0x73, 0x72, + 0x61, 0x64, 0xE2, 0x88, 0x95, 0x73, 0x32, 0x70, + 0x73, 0x6E, 0x73, 0xCE, 0xBC, 0x73, 0x6D, 0x73, + 0x70, 0x56, 0x6E, 0x56, 0xCE, 0xBC, 0x56, 0x6D, + 0x56, 0x6B, 0x56, 0x4D, 0x56, 0x70, 0x57, 0x6E, + 0x57, 0xCE, 0xBC, 0x57, 0x6D, 0x57, 0x6B, 0x57, + 0x4D, 0x57, 0x6B, 0xCE, 0xA9, 0x4D, 0xCE, 0xA9, + 0x61, 0x2E, 0x6D, 0x2E, 0x42, 0x71, 0x63, 0x63, + 0x63, 0x64, 0x43, 0xE2, 0x88, 0x95, 0x6B, 0x67, + 0x43, 0x6F, 0x2E, 0x64, 0x42, 0x47, 0x79, 0x68, + 0x61, 0x48, 0x50, 0x69, 0x6E, 0x4B, 0x4B, 0x4B, + 0x4D, 0x6B, 0x74, 0x6C, 0x6D, 0x6C, 0x6E, 0x6C, + 0x6F, 0x67, 0x6C, 0x78, 0x6D, 0x62, 0x6D, 0x69, + 0x6C, 0x6D, 0x6F, 0x6C, 0x50, 0x48, 0x70, 0x2E, + 0x6D, 0x2E, 0x50, 0x50, 0x4D, 0x50, 0x52, 0x73, + 0x72, 0x53, 0x76, 0x57, 0x62, 0x31, 0xE6, 0x97, + 0xA5, 0x32, 0xE6, 0x97, 0xA5, 0x33, 0xE6, 0x97, + 0xA5, 0x34, 0xE6, 0x97, 0xA5, 0x35, 0xE6, 0x97, + 0xA5, 0x36, 0xE6, 0x97, 0xA5, 0x37, 0xE6, 0x97, + 0xA5, 0x38, 0xE6, 0x97, 0xA5, 0x39, 0xE6, 0x97, + 0xA5, 0x31, 0x30, 0xE6, 0x97, 0xA5, 0x31, 0x31, + 0xE6, 0x97, 0xA5, 0x31, 0x32, 0xE6, 0x97, 0xA5, + 0x31, 0x33, 0xE6, 0x97, 0xA5, 0x31, 0x34, 0xE6, + 0x97, 0xA5, 0x31, 0x35, 0xE6, 0x97, 0xA5, 0x31, + 0x36, 0xE6, 0x97, 0xA5, 0x31, 0x37, 0xE6, 0x97, + 0xA5, 0x31, 0x38, 0xE6, 0x97, 0xA5, 0x31, 0x39, + 0xE6, 0x97, 0xA5, 0x32, 0x30, 0xE6, 0x97, 0xA5, + 0x32, 0x31, 0xE6, 0x97, 0xA5, 0x32, 0x32, 0xE6, + 0x97, 0xA5, 0x32, 0x33, 0xE6, 0x97, 0xA5, 0x32, + 0x34, 0xE6, 0x97, 0xA5, 0x32, 0x35, 0xE6, 0x97, + 0xA5, 0x32, 0x36, 0xE6, 0x97, 0xA5, 0x32, 0x37, + 0xE6, 0x97, 0xA5, 0x32, 0x38, 0xE6, 0x97, 0xA5, + 0x32, 0x39, 0xE6, 0x97, 0xA5, 0x33, 0x30, 0xE6, + 0x97, 0xA5, 0x33, 0x31, 0xE6, 0x97, 0xA5, 0xF6, + 0xE8, 0xB1, 0x88, 0xF6, 0xE6, 0x9B, 0xB4, 0xF6, + 0xE8, 0xBB, 0x8A, 0xF6, 0xE8, 0xB3, 0x88, 0xF6, + 0xE6, 0xBB, 0x91, 0xF6, 0xE4, 0xB8, 0xB2, 0xF6, + 0xE5, 0x8F, 0xA5, 0xF6, 0xE9, 0xBE, 0x9C, 0xF6, + 0xE9, 0xBE, 0x9C, 0xF6, 0xE5, 0xA5, 0x91, 0xF6, + 0xE9, 0x87, 0x91, 0xF6, 0xE5, 0x96, 0x87, 0xF6, + 0xE5, 0xA5, 0x88, 0xF6, 0xE6, 0x87, 0xB6, 0xF6, + 0xE7, 0x99, 0xA9, 0xF6, 0xE7, 0xBE, 0x85, 0xF6, + 0xE8, 0x98, 0xBF, 0xF6, 0xE8, 0x9E, 0xBA, 0xF6, + 0xE8, 0xA3, 0xB8, 0xF6, 0xE9, 0x82, 0x8F, 0xF6, + 0xE6, 0xA8, 0x82, 0xF6, 0xE6, 0xB4, 0x9B, 0xF6, + 0xE7, 0x83, 0x99, 0xF6, 0xE7, 0x8F, 0x9E, 0xF6, + 0xE8, 0x90, 0xBD, 0xF6, 0xE9, 0x85, 0xAA, 0xF6, + 0xE9, 0xA7, 0xB1, 0xF6, 0xE4, 0xBA, 0x82, 0xF6, + 0xE5, 0x8D, 0xB5, 0xF6, 0xE6, 0xAC, 0x84, 0xF6, + 0xE7, 0x88, 0x9B, 0xF6, 0xE8, 0x98, 0xAD, 0xF6, + 0xE9, 0xB8, 0x9E, 0xF6, 0xE5, 0xB5, 0x90, 0xF6, + 0xE6, 0xBF, 0xAB, 0xF6, 0xE8, 0x97, 0x8D, 0xF6, + 0xE8, 0xA5, 0xA4, 0xF6, 0xE6, 0x8B, 0x89, 0xF6, + 0xE8, 0x87, 0x98, 0xF6, 0xE8, 0xA0, 0x9F, 0xF6, + 0xE5, 0xBB, 0x8A, 0xF6, 0xE6, 0x9C, 0x97, 0xF6, + 0xE6, 0xB5, 0xAA, 0xF6, 0xE7, 0x8B, 0xBC, 0xF6, + 0xE9, 0x83, 0x8E, 0xF6, 0xE4, 0xBE, 0x86, 0xF6, + 0xE5, 0x86, 0xB7, 0xF6, 0xE5, 0x8B, 0x9E, 0xF6, + 0xE6, 0x93, 0x84, 0xF6, 0xE6, 0xAB, 0x93, 0xF6, + 0xE7, 0x88, 0x90, 0xF6, 0xE7, 0x9B, 0xA7, 0xF6, + 0xE8, 0x80, 0x81, 0xF6, 0xE8, 0x98, 0x86, 0xF6, + 0xE8, 0x99, 0x9C, 0xF6, 0xE8, 0xB7, 0xAF, 0xF6, + 0xE9, 0x9C, 0xB2, 0xF6, 0xE9, 0xAD, 0xAF, 0xF6, + 0xE9, 0xB7, 0xBA, 0xF6, 0xE7, 0xA2, 0x8C, 0xF6, + 0xE7, 0xA5, 0xBF, 0xF6, 0xE7, 0xB6, 0xA0, 0xF6, + 0xE8, 0x8F, 0x89, 0xF6, 0xE9, 0x8C, 0x84, 0xF6, + 0xE9, 0xB9, 0xBF, 0xF6, 0xE8, 0xAB, 0x96, 0xF6, + 0xE5, 0xA3, 0x9F, 0xF6, 0xE5, 0xBC, 0x84, 0xF6, + 0xE7, 0xB1, 0xA0, 0xF6, 0xE8, 0x81, 0xBE, 0xF6, + 0xE7, 0x89, 0xA2, 0xF6, 0xE7, 0xA3, 0x8A, 0xF6, + 0xE8, 0xB3, 0x82, 0xF6, 0xE9, 0x9B, 0xB7, 0xF6, + 0xE5, 0xA3, 0x98, 0xF6, 0xE5, 0xB1, 0xA2, 0xF6, + 0xE6, 0xA8, 0x93, 0xF6, 0xE6, 0xB7, 0x9A, 0xF6, + 0xE6, 0xBC, 0x8F, 0xF6, 0xE7, 0xB4, 0xAF, 0xF6, + 0xE7, 0xB8, 0xB7, 0xF6, 0xE9, 0x99, 0x8B, 0xF6, + 0xE5, 0x8B, 0x92, 0xF6, 0xE8, 0x82, 0x8B, 0xF6, + 0xE5, 0x87, 0x9C, 0xF6, 0xE5, 0x87, 0x8C, 0xF6, + 0xE7, 0xA8, 0x9C, 0xF6, 0xE7, 0xB6, 0xBE, 0xF6, + 0xE8, 0x8F, 0xB1, 0xF6, 0xE9, 0x99, 0xB5, 0xF6, + 0xE8, 0xAE, 0x80, 0xF6, 0xE6, 0x8B, 0x8F, 0xF6, + 0xE6, 0xA8, 0x82, 0xF6, 0xE8, 0xAB, 0xBE, 0xF6, + 0xE4, 0xB8, 0xB9, 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, + 0xE6, 0x80, 0x92, 0xF6, 0xE7, 0x8E, 0x87, 0xF6, + 0xE7, 0x95, 0xB0, 0xF6, 0xE5, 0x8C, 0x97, 0xF6, + 0xE7, 0xA3, 0xBB, 0xF6, 0xE4, 0xBE, 0xBF, 0xF6, + 0xE5, 0xBE, 0xA9, 0xF6, 0xE4, 0xB8, 0x8D, 0xF6, + 0xE6, 0xB3, 0x8C, 0xF6, 0xE6, 0x95, 0xB8, 0xF6, + 0xE7, 0xB4, 0xA2, 0xF6, 0xE5, 0x8F, 0x83, 0xF6, + 0xE5, 0xA1, 0x9E, 0xF6, 0xE7, 0x9C, 0x81, 0xF6, + 0xE8, 0x91, 0x89, 0xF6, 0xE8, 0xAA, 0xAA, 0xF6, + 0xE6, 0xAE, 0xBA, 0xF6, 0xE8, 0xBE, 0xB0, 0xF6, + 0xE6, 0xB2, 0x88, 0xF6, 0xE6, 0x8B, 0xBE, 0xF6, + 0xE8, 0x8B, 0xA5, 0xF6, 0xE6, 0x8E, 0xA0, 0xF6, + 0xE7, 0x95, 0xA5, 0xF6, 0xE4, 0xBA, 0xAE, 0xF6, + 0xE5, 0x85, 0xA9, 0xF6, 0xE5, 0x87, 0x89, 0xF6, + 0xE6, 0xA2, 0x81, 0xF6, 0xE7, 0xB3, 0xA7, 0xF6, + 0xE8, 0x89, 0xAF, 0xF6, 0xE8, 0xAB, 0x92, 0xF6, + 0xE9, 0x87, 0x8F, 0xF6, 0xE5, 0x8B, 0xB5, 0xF6, + 0xE5, 0x91, 0x82, 0xF6, 0xE5, 0xA5, 0xB3, 0xF6, + 0xE5, 0xBB, 0xAC, 0xF6, 0xE6, 0x97, 0x85, 0xF6, + 0xE6, 0xBF, 0xBE, 0xF6, 0xE7, 0xA4, 0xAA, 0xF6, + 0xE9, 0x96, 0xAD, 0xF6, 0xE9, 0xA9, 0xAA, 0xF6, + 0xE9, 0xBA, 0x97, 0xF6, 0xE9, 0xBB, 0x8E, 0xF6, + 0xE5, 0x8A, 0x9B, 0xF6, 0xE6, 0x9B, 0x86, 0xF6, + 0xE6, 0xAD, 0xB7, 0xF6, 0xE8, 0xBD, 0xA2, 0xF6, + 0xE5, 0xB9, 0xB4, 0xF6, 0xE6, 0x86, 0x90, 0xF6, + 0xE6, 0x88, 0x80, 0xF6, 0xE6, 0x92, 0x9A, 0xF6, + 0xE6, 0xBC, 0xA3, 0xF6, 0xE7, 0x85, 0x89, 0xF6, + 0xE7, 0x92, 0x89, 0xF6, 0xE7, 0xA7, 0x8A, 0xF6, + 0xE7, 0xB7, 0xB4, 0xF6, 0xE8, 0x81, 0xAF, 0xF6, + 0xE8, 0xBC, 0xA6, 0xF6, 0xE8, 0x93, 0xAE, 0xF6, + 0xE9, 0x80, 0xA3, 0xF6, 0xE9, 0x8D, 0x8A, 0xF6, + 0xE5, 0x88, 0x97, 0xF6, 0xE5, 0x8A, 0xA3, 0xF6, + 0xE5, 0x92, 0xBD, 0xF6, 0xE7, 0x83, 0x88, 0xF6, + 0xE8, 0xA3, 0x82, 0xF6, 0xE8, 0xAA, 0xAA, 0xF6, + 0xE5, 0xBB, 0x89, 0xF6, 0xE5, 0xBF, 0xB5, 0xF6, + 0xE6, 0x8D, 0xBB, 0xF6, 0xE6, 0xAE, 0xAE, 0xF6, + 0xE7, 0xB0, 0xBE, 0xF6, 0xE7, 0x8D, 0xB5, 0xF6, + 0xE4, 0xBB, 0xA4, 0xF6, 0xE5, 0x9B, 0xB9, 0xF6, + 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, 0xB6, 0xBA, 0xF6, + 0xE6, 0x80, 0x9C, 0xF6, 0xE7, 0x8E, 0xB2, 0xF6, + 0xE7, 0x91, 0xA9, 0xF6, 0xE7, 0xBE, 0x9A, 0xF6, + 0xE8, 0x81, 0x86, 0xF6, 0xE9, 0x88, 0xB4, 0xF6, + 0xE9, 0x9B, 0xB6, 0xF6, 0xE9, 0x9D, 0x88, 0xF6, + 0xE9, 0xA0, 0x98, 0xF6, 0xE4, 0xBE, 0x8B, 0xF6, + 0xE7, 0xA6, 0xAE, 0xF6, 0xE9, 0x86, 0xB4, 0xF6, + 0xE9, 0x9A, 0xB8, 0xF6, 0xE6, 0x83, 0xA1, 0xF6, + 0xE4, 0xBA, 0x86, 0xF6, 0xE5, 0x83, 0x9A, 0xF6, + 0xE5, 0xAF, 0xAE, 0xF6, 0xE5, 0xB0, 0xBF, 0xF6, + 0xE6, 0x96, 0x99, 0xF6, 0xE6, 0xA8, 0x82, 0xF6, + 0xE7, 0x87, 0x8E, 0xF6, 0xE7, 0x99, 0x82, 0xF6, + 0xE8, 0x93, 0xBC, 0xF6, 0xE9, 0x81, 0xBC, 0xF6, + 0xE9, 0xBE, 0x8D, 0xF6, 0xE6, 0x9A, 0x88, 0xF6, + 0xE9, 0x98, 0xAE, 0xF6, 0xE5, 0x8A, 0x89, 0xF6, + 0xE6, 0x9D, 0xBB, 0xF6, 0xE6, 0x9F, 0xB3, 0xF6, + 0xE6, 0xB5, 0x81, 0xF6, 0xE6, 0xBA, 0x9C, 0xF6, + 0xE7, 0x90, 0x89, 0xF6, 0xE7, 0x95, 0x99, 0xF6, + 0xE7, 0xA1, 0xAB, 0xF6, 0xE7, 0xB4, 0x90, 0xF6, + 0xE9, 0xA1, 0x9E, 0xF6, 0xE5, 0x85, 0xAD, 0xF6, + 0xE6, 0x88, 0xAE, 0xF6, 0xE9, 0x99, 0xB8, 0xF6, + 0xE5, 0x80, 0xAB, 0xF6, 0xE5, 0xB4, 0x99, 0xF6, + 0xE6, 0xB7, 0xAA, 0xF6, 0xE8, 0xBC, 0xAA, 0xF6, + 0xE5, 0xBE, 0x8B, 0xF6, 0xE6, 0x85, 0x84, 0xF6, + 0xE6, 0xA0, 0x97, 0xF6, 0xE7, 0x8E, 0x87, 0xF6, + 0xE9, 0x9A, 0x86, 0xF6, 0xE5, 0x88, 0xA9, 0xF6, + 0xE5, 0x90, 0x8F, 0xF6, 0xE5, 0xB1, 0xA5, 0xF6, + 0xE6, 0x98, 0x93, 0xF6, 0xE6, 0x9D, 0x8E, 0xF6, + 0xE6, 0xA2, 0xA8, 0xF6, 0xE6, 0xB3, 0xA5, 0xF6, + 0xE7, 0x90, 0x86, 0xF6, 0xE7, 0x97, 0xA2, 0xF6, + 0xE7, 0xBD, 0xB9, 0xF6, 0xE8, 0xA3, 0x8F, 0xF6, + 0xE8, 0xA3, 0xA1, 0xF6, 0xE9, 0x87, 0x8C, 0xF6, + 0xE9, 0x9B, 0xA2, 0xF6, 0xE5, 0x8C, 0xBF, 0xF6, + 0xE6, 0xBA, 0xBA, 0xF6, 0xE5, 0x90, 0x9D, 0xF6, + 0xE7, 0x87, 0x90, 0xF6, 0xE7, 0x92, 0x98, 0xF6, + 0xE8, 0x97, 0xBA, 0xF6, 0xE9, 0x9A, 0xA3, 0xF6, + 0xE9, 0xB1, 0x97, 0xF6, 0xE9, 0xBA, 0x9F, 0xF6, + 0xE6, 0x9E, 0x97, 0xF6, 0xE6, 0xB7, 0x8B, 0xF6, + 0xE8, 0x87, 0xA8, 0xF6, 0xE7, 0xAB, 0x8B, 0xF6, + 0xE7, 0xAC, 0xA0, 0xF6, 0xE7, 0xB2, 0x92, 0xF6, + 0xE7, 0x8B, 0x80, 0xF6, 0xE7, 0x82, 0x99, 0xF6, + 0xE8, 0xAD, 0x98, 0xF6, 0xE4, 0xBB, 0x80, 0xF6, + 0xE8, 0x8C, 0xB6, 0xF6, 0xE5, 0x88, 0xBA, 0xF6, + 0xE5, 0x88, 0x87, 0xF6, 0xE5, 0xBA, 0xA6, 0xF6, + 0xE6, 0x8B, 0x93, 0xF6, 0xE7, 0xB3, 0x96, 0xF6, + 0xE5, 0xAE, 0x85, 0xF6, 0xE6, 0xB4, 0x9E, 0xF6, + 0xE6, 0x9A, 0xB4, 0xF6, 0xE8, 0xBC, 0xBB, 0xF6, + 0xE8, 0xA1, 0x8C, 0xF6, 0xE9, 0x99, 0x8D, 0xF6, + 0xE8, 0xA6, 0x8B, 0xF6, 0xE5, 0xBB, 0x93, 0xF6, + 0xE5, 0x85, 0x80, 0xF6, 0xE5, 0x97, 0x80, 0xF6, + 0xE5, 0xA1, 0x9A, 0xF6, 0xE6, 0x99, 0xB4, 0xF6, + 0xE5, 0x87, 0x9E, 0xF6, 0xE7, 0x8C, 0xAA, 0xF6, + 0xE7, 0x9B, 0x8A, 0xF6, 0xE7, 0xA4, 0xBC, 0xF6, + 0xE7, 0xA5, 0x9E, 0xF6, 0xE7, 0xA5, 0xA5, 0xF6, + 0xE7, 0xA6, 0x8F, 0xF6, 0xE9, 0x9D, 0x96, 0xF6, + 0xE7, 0xB2, 0xBE, 0xF6, 0xE7, 0xBE, 0xBD, 0xF6, + 0xE8, 0x98, 0x92, 0xF6, 0xE8, 0xAB, 0xB8, 0xF6, + 0xE9, 0x80, 0xB8, 0xF6, 0xE9, 0x83, 0xBD, 0xF6, + 0xE9, 0xA3, 0xAF, 0xF6, 0xE9, 0xA3, 0xBC, 0xF6, + 0xE9, 0xA4, 0xA8, 0xF6, 0xE9, 0xB6, 0xB4, 0xF6, + 0xE4, 0xBE, 0xAE, 0xF6, 0xE5, 0x83, 0xA7, 0xF6, + 0xE5, 0x85, 0x8D, 0xF6, 0xE5, 0x8B, 0x89, 0xF6, + 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, 0x8D, 0x91, 0xF6, + 0xE5, 0x96, 0x9D, 0xF6, 0xE5, 0x98, 0x86, 0xF6, + 0xE5, 0x99, 0xA8, 0xF6, 0xE5, 0xA1, 0x80, 0xF6, + 0xE5, 0xA2, 0xA8, 0xF6, 0xE5, 0xB1, 0xA4, 0xF6, + 0xE5, 0xB1, 0xAE, 0xF6, 0xE6, 0x82, 0x94, 0xF6, + 0xE6, 0x85, 0xA8, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, + 0xE6, 0x87, 0xB2, 0xF6, 0xE6, 0x95, 0x8F, 0xF6, + 0xE6, 0x97, 0xA2, 0xF6, 0xE6, 0x9A, 0x91, 0xF6, + 0xE6, 0xA2, 0x85, 0xF6, 0xE6, 0xB5, 0xB7, 0xF6, + 0xE6, 0xB8, 0x9A, 0xF6, 0xE6, 0xBC, 0xA2, 0xF6, + 0xE7, 0x85, 0xAE, 0xF6, 0xE7, 0x88, 0xAB, 0xF6, + 0xE7, 0x90, 0xA2, 0xF6, 0xE7, 0xA2, 0x91, 0xF6, + 0xE7, 0xA4, 0xBE, 0xF6, 0xE7, 0xA5, 0x89, 0xF6, + 0xE7, 0xA5, 0x88, 0xF6, 0xE7, 0xA5, 0x90, 0xF6, + 0xE7, 0xA5, 0x96, 0xF6, 0xE7, 0xA5, 0x9D, 0xF6, + 0xE7, 0xA6, 0x8D, 0xF6, 0xE7, 0xA6, 0x8E, 0xF6, + 0xE7, 0xA9, 0x80, 0xF6, 0xE7, 0xAA, 0x81, 0xF6, + 0xE7, 0xAF, 0x80, 0xF6, 0xE7, 0xB7, 0xB4, 0xF6, + 0xE7, 0xB8, 0x89, 0xF6, 0xE7, 0xB9, 0x81, 0xF6, + 0xE7, 0xBD, 0xB2, 0xF6, 0xE8, 0x80, 0x85, 0xF6, + 0xE8, 0x87, 0xAD, 0xF6, 0xE8, 0x89, 0xB9, 0xF6, + 0xE8, 0x89, 0xB9, 0xF6, 0xE8, 0x91, 0x97, 0xF6, + 0xE8, 0xA4, 0x90, 0xF6, 0xE8, 0xA6, 0x96, 0xF6, + 0xE8, 0xAC, 0x81, 0xF6, 0xE8, 0xAC, 0xB9, 0xF6, + 0xE8, 0xB3, 0x93, 0xF6, 0xE8, 0xB4, 0x88, 0xF6, + 0xE8, 0xBE, 0xB6, 0xF6, 0xE9, 0x80, 0xB8, 0xF6, + 0xE9, 0x9B, 0xA3, 0xF6, 0xE9, 0x9F, 0xBF, 0xF6, + 0xE9, 0xA0, 0xBB, 0x66, 0x66, 0x66, 0x69, 0x66, + 0x6C, 0x66, 0x66, 0x69, 0x66, 0x66, 0x6C, 0x73, + 0x74, 0x73, 0x74, 0xD5, 0xB4, 0xD5, 0xB6, 0xD5, + 0xB4, 0xD5, 0xA5, 0xD5, 0xB4, 0xD5, 0xAB, 0xD5, + 0xBE, 0xD5, 0xB6, 0xD5, 0xB4, 0xD5, 0xAD, 0xF6, + 0xD7, 0x99, 0xD6, 0xB4, 0xF6, 0xD7, 0xB2, 0xD6, + 0xB7, 0xD7, 0xA2, 0xD7, 0x90, 0xD7, 0x93, 0xD7, + 0x94, 0xD7, 0x9B, 0xD7, 0x9C, 0xD7, 0x9D, 0xD7, + 0xA8, 0xD7, 0xAA, 0x2B, 0xF6, 0xD7, 0xA9, 0xD7, + 0x81, 0xF6, 0xD7, 0xA9, 0xD7, 0x82, 0xF6, 0xD7, + 0xA9, 0xD6, 0xBC, 0xD7, 0x81, 0xF6, 0xD7, 0xA9, + 0xD6, 0xBC, 0xD7, 0x82, 0xF6, 0xD7, 0x90, 0xD6, + 0xB7, 0xF6, 0xD7, 0x90, 0xD6, 0xB8, 0xF6, 0xD7, + 0x90, 0xD6, 0xBC, 0xF6, 0xD7, 0x91, 0xD6, 0xBC, + 0xF6, 0xD7, 0x92, 0xD6, 0xBC, 0xF6, 0xD7, 0x93, + 0xD6, 0xBC, 0xF6, 0xD7, 0x94, 0xD6, 0xBC, 0xF6, + 0xD7, 0x95, 0xD6, 0xBC, 0xF6, 0xD7, 0x96, 0xD6, + 0xBC, 0xF6, 0xD7, 0x98, 0xD6, 0xBC, 0xF6, 0xD7, + 0x99, 0xD6, 0xBC, 0xF6, 0xD7, 0x9A, 0xD6, 0xBC, + 0xF6, 0xD7, 0x9B, 0xD6, 0xBC, 0xF6, 0xD7, 0x9C, + 0xD6, 0xBC, 0xF6, 0xD7, 0x9E, 0xD6, 0xBC, 0xF6, + 0xD7, 0xA0, 0xD6, 0xBC, 0xF6, 0xD7, 0xA1, 0xD6, + 0xBC, 0xF6, 0xD7, 0xA3, 0xD6, 0xBC, 0xF6, 0xD7, + 0xA4, 0xD6, 0xBC, 0xF6, 0xD7, 0xA6, 0xD6, 0xBC, + 0xF6, 0xD7, 0xA7, 0xD6, 0xBC, 0xF6, 0xD7, 0xA8, + 0xD6, 0xBC, 0xF6, 0xD7, 0xA9, 0xD6, 0xBC, 0xF6, + 0xD7, 0xAA, 0xD6, 0xBC, 0xF6, 0xD7, 0x95, 0xD6, + 0xB9, 0xF6, 0xD7, 0x91, 0xD6, 0xBF, 0xF6, 0xD7, + 0x9B, 0xD6, 0xBF, 0xF6, 0xD7, 0xA4, 0xD6, 0xBF, + 0xD7, 0x90, 0xD7, 0x9C, 0xD9, 0xB1, 0xD9, 0xB1, + 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, 0xBB, + 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, 0xBE, + 0xDA, 0x80, 0xDA, 0x80, 0xDA, 0x80, 0xDA, 0x80, + 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, 0xBA, + 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, 0xBF, + 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, 0xB9, + 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, 0xA4, + 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, 0xA6, + 0xDA, 0x84, 0xDA, 0x84, 0xDA, 0x84, 0xDA, 0x84, + 0xDA, 0x83, 0xDA, 0x83, 0xDA, 0x83, 0xDA, 0x83, + 0xDA, 0x86, 0xDA, 0x86, 0xDA, 0x86, 0xDA, 0x86, + 0xDA, 0x87, 0xDA, 0x87, 0xDA, 0x87, 0xDA, 0x87, + 0xDA, 0x8D, 0xDA, 0x8D, 0xDA, 0x8C, 0xDA, 0x8C, + 0xDA, 0x8E, 0xDA, 0x8E, 0xDA, 0x88, 0xDA, 0x88, + 0xDA, 0x98, 0xDA, 0x98, 0xDA, 0x91, 0xDA, 0x91, + 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, 0xA9, + 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, 0xAF, + 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, 0xB3, + 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, 0xB1, + 0xDA, 0xBA, 0xDA, 0xBA, 0xDA, 0xBB, 0xDA, 0xBB, + 0xDA, 0xBB, 0xDA, 0xBB, 0xDB, 0x95, 0xD9, 0x94, + 0xDB, 0x95, 0xD9, 0x94, 0xDB, 0x81, 0xDB, 0x81, + 0xDB, 0x81, 0xDB, 0x81, 0xDA, 0xBE, 0xDA, 0xBE, + 0xDA, 0xBE, 0xDA, 0xBE, 0xDB, 0x92, 0xDB, 0x92, + 0xDB, 0x92, 0xD9, 0x94, 0xDB, 0x92, 0xD9, 0x94, + 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, 0xAD, + 0xDB, 0x87, 0xDB, 0x87, 0xDB, 0x86, 0xDB, 0x86, + 0xDB, 0x88, 0xDB, 0x88, 0xDB, 0x87, 0xD9, 0xB4, + 0xDB, 0x8B, 0xDB, 0x8B, 0xDB, 0x85, 0xDB, 0x85, + 0xDB, 0x89, 0xDB, 0x89, 0xDB, 0x90, 0xDB, 0x90, + 0xDB, 0x90, 0xDB, 0x90, 0xD9, 0x89, 0xD9, 0x89, + 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x8A, + 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x8A, 0xD9, 0x94, + 0xDB, 0x95, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x95, + 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x8A, 0xD9, 0x94, + 0xDB, 0x87, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x87, + 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x86, 0xD9, 0x8A, + 0xD9, 0x94, 0xDB, 0x86, 0xD9, 0x8A, 0xD9, 0x94, + 0xDB, 0x88, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x88, + 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x90, 0xD9, 0x8A, + 0xD9, 0x94, 0xDB, 0x90, 0xD9, 0x8A, 0xD9, 0x94, + 0xDB, 0x90, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, + 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x89, 0xDB, 0x8C, 0xDB, 0x8C, + 0xDB, 0x8C, 0xDB, 0x8C, 0xD9, 0x8A, 0xD9, 0x94, + 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAD, + 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x89, 0xD9, 0x8A, 0xD9, 0x94, + 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, 0xA8, + 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, 0xA8, + 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x89, 0xD8, 0xA8, + 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD8, 0xAA, + 0xD8, 0xAD, 0xD8, 0xAA, 0xD8, 0xAE, 0xD8, 0xAA, + 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x89, 0xD8, 0xAA, + 0xD9, 0x8A, 0xD8, 0xAB, 0xD8, 0xAC, 0xD8, 0xAB, + 0xD9, 0x85, 0xD8, 0xAB, 0xD9, 0x89, 0xD8, 0xAB, + 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, + 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, 0xAD, + 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD8, 0xAE, + 0xD8, 0xAD, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB3, + 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, + 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xB5, + 0xD8, 0xAD, 0xD8, 0xB5, 0xD9, 0x85, 0xD8, 0xB6, + 0xD8, 0xAC, 0xD8, 0xB6, 0xD8, 0xAD, 0xD8, 0xB6, + 0xD8, 0xAE, 0xD8, 0xB6, 0xD9, 0x85, 0xD8, 0xB7, + 0xD8, 0xAD, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xB8, + 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, 0xB9, + 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, 0xBA, + 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, 0x81, + 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, 0x81, + 0xD9, 0x85, 0xD9, 0x81, 0xD9, 0x89, 0xD9, 0x81, + 0xD9, 0x8A, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, 0x82, + 0xD9, 0x85, 0xD9, 0x82, 0xD9, 0x89, 0xD9, 0x82, + 0xD9, 0x8A, 0xD9, 0x83, 0xD8, 0xA7, 0xD9, 0x83, + 0xD8, 0xAC, 0xD9, 0x83, 0xD8, 0xAD, 0xD9, 0x83, + 0xD8, 0xAE, 0xD9, 0x83, 0xD9, 0x84, 0xD9, 0x83, + 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x89, 0xD9, 0x83, + 0xD9, 0x8A, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x84, + 0xD8, 0xAD, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x84, + 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x89, 0xD9, 0x84, + 0xD9, 0x8A, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x85, + 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, 0x85, + 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x89, 0xD9, 0x85, + 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x86, + 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, 0x86, + 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x89, 0xD9, 0x86, + 0xD9, 0x8A, 0xD9, 0x87, 0xD8, 0xAC, 0xD9, 0x87, + 0xD9, 0x85, 0xD9, 0x87, 0xD9, 0x89, 0xD9, 0x87, + 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, 0x8A, + 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x89, 0xD9, 0x8A, + 0xD9, 0x8A, 0xD8, 0xB0, 0xD9, 0xB0, 0xD8, 0xB1, + 0xD9, 0xB0, 0xD9, 0x89, 0xD9, 0xB0, 0x20, 0xD9, + 0x8C, 0xD9, 0x91, 0x20, 0xD9, 0x8D, 0xD9, 0x91, + 0x20, 0xD9, 0x8E, 0xD9, 0x91, 0x20, 0xD9, 0x8F, + 0xD9, 0x91, 0x20, 0xD9, 0x90, 0xD9, 0x91, 0x20, + 0xD9, 0x91, 0xD9, 0xB0, 0xD9, 0x8A, 0xD9, 0x94, + 0xD8, 0xB1, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xB2, + 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, 0x94, + 0xD9, 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x8A, + 0xD8, 0xA8, 0xD8, 0xB1, 0xD8, 0xA8, 0xD8, 0xB2, + 0xD8, 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x86, + 0xD8, 0xA8, 0xD9, 0x89, 0xD8, 0xA8, 0xD9, 0x8A, + 0xD8, 0xAA, 0xD8, 0xB1, 0xD8, 0xAA, 0xD8, 0xB2, + 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x86, + 0xD8, 0xAA, 0xD9, 0x89, 0xD8, 0xAA, 0xD9, 0x8A, + 0xD8, 0xAB, 0xD8, 0xB1, 0xD8, 0xAB, 0xD8, 0xB2, + 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAB, 0xD9, 0x86, + 0xD8, 0xAB, 0xD9, 0x89, 0xD8, 0xAB, 0xD9, 0x8A, + 0xD9, 0x81, 0xD9, 0x89, 0xD9, 0x81, 0xD9, 0x8A, + 0xD9, 0x82, 0xD9, 0x89, 0xD9, 0x82, 0xD9, 0x8A, + 0xD9, 0x83, 0xD8, 0xA7, 0xD9, 0x83, 0xD9, 0x84, + 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x89, + 0xD9, 0x83, 0xD9, 0x8A, 0xD9, 0x84, 0xD9, 0x85, + 0xD9, 0x84, 0xD9, 0x89, 0xD9, 0x84, 0xD9, 0x8A, + 0xD9, 0x85, 0xD8, 0xA7, 0xD9, 0x85, 0xD9, 0x85, + 0xD9, 0x86, 0xD8, 0xB1, 0xD9, 0x86, 0xD8, 0xB2, + 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x86, + 0xD9, 0x86, 0xD9, 0x89, 0xD9, 0x86, 0xD9, 0x8A, + 0xD9, 0x89, 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, 0xB1, + 0xD9, 0x8A, 0xD8, 0xB2, 0xD9, 0x8A, 0xD9, 0x85, + 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, 0x89, + 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x94, + 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAD, + 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAE, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x94, + 0xD9, 0x87, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, 0xA8, + 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, 0xA8, + 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x87, 0xD8, 0xAA, + 0xD8, 0xAC, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAA, + 0xD8, 0xAE, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, + 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAC, + 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, 0xAD, + 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, + 0xD8, 0xAC, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB3, + 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, + 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xB5, + 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAE, 0xD8, 0xB5, + 0xD9, 0x85, 0xD8, 0xB6, 0xD8, 0xAC, 0xD8, 0xB6, + 0xD8, 0xAD, 0xD8, 0xB6, 0xD8, 0xAE, 0xD8, 0xB6, + 0xD9, 0x85, 0xD8, 0xB7, 0xD8, 0xAD, 0xD8, 0xB8, + 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, 0xB9, + 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, 0xBA, + 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, 0x81, + 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, 0x81, + 0xD9, 0x85, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, 0x82, + 0xD9, 0x85, 0xD9, 0x83, 0xD8, 0xAC, 0xD9, 0x83, + 0xD8, 0xAD, 0xD9, 0x83, 0xD8, 0xAE, 0xD9, 0x83, + 0xD9, 0x84, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x84, + 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x84, + 0xD8, 0xAE, 0xD9, 0x84, 0xD9, 0x85, 0xD9, 0x84, + 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x85, + 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, 0x85, + 0xD9, 0x85, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x86, + 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, 0x86, + 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, 0x87, + 0xD8, 0xAC, 0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x87, + 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, 0x8A, + 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x94, + 0xD9, 0x87, 0xD8, 0xA8, 0xD9, 0x85, 0xD8, 0xA8, + 0xD9, 0x87, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, + 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAB, + 0xD9, 0x87, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xB3, + 0xD9, 0x87, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xB4, + 0xD9, 0x87, 0xD9, 0x83, 0xD9, 0x84, 0xD9, 0x83, + 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x85, 0xD9, 0x86, + 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, 0x8A, + 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x80, + 0xD9, 0x8E, 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x8F, + 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x90, 0xD9, 0x91, + 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, 0x8A, + 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, 0x8A, + 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x8A, + 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, 0x8A, + 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, 0x8A, + 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, 0x8A, + 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, 0x8A, + 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x8A, + 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, 0x8A, + 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, + 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, + 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, 0xB1, + 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, 0xB1, + 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, 0x8A, + 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, 0x8A, + 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x8A, + 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, 0x8A, + 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, 0x8A, + 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, 0x8A, + 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, 0x8A, + 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x8A, + 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, 0x8A, + 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, + 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, + 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, 0xB1, + 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, 0xB1, + 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, + 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, + 0xD8, 0xB3, 0xD9, 0x87, 0xD8, 0xB4, 0xD9, 0x87, + 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, 0xAC, + 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, 0xD8, 0xAE, + 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, + 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB7, 0xD9, 0x85, + 0xD8, 0xB8, 0xD9, 0x85, 0xD8, 0xA7, 0xD9, 0x8B, + 0xD8, 0xA7, 0xD9, 0x8B, 0xD8, 0xAA, 0xD8, 0xAC, + 0xD9, 0x85, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAC, + 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, 0xAA, + 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAA, 0xD8, 0xAE, + 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAC, + 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAA, + 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, 0x85, + 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, 0xAD, + 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xAD, + 0xD9, 0x85, 0xD9, 0x89, 0xD8, 0xB3, 0xD8, 0xAD, + 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAC, 0xD8, 0xAD, + 0xD8, 0xB3, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xB3, + 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, 0x85, + 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xAC, + 0xD8, 0xB3, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB3, + 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB5, 0xD8, 0xAD, + 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAD, 0xD8, 0xAD, + 0xD8, 0xB5, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB4, + 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB4, 0xD8, 0xAD, + 0xD9, 0x85, 0xD8, 0xB4, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xB4, + 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, + 0xD9, 0x85, 0xD8, 0xB4, 0xD9, 0x85, 0xD9, 0x85, + 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xB6, + 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB6, 0xD8, 0xAE, + 0xD9, 0x85, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, + 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xB7, + 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB7, 0xD9, 0x85, + 0xD9, 0x8A, 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, 0x85, + 0xD8, 0xB9, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB9, + 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, 0x85, + 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x85, + 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xBA, + 0xD9, 0x85, 0xD9, 0x89, 0xD9, 0x81, 0xD8, 0xAE, + 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, 0x85, + 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x82, + 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x84, 0xD8, 0xAD, + 0xD9, 0x85, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x8A, + 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x89, 0xD9, 0x84, + 0xD8, 0xAC, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAC, + 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, + 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, 0xD9, 0x84, + 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x84, 0xD9, 0x85, + 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, + 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x85, + 0xD8, 0xAD, 0xD9, 0x8A, 0xD9, 0x85, 0xD8, 0xAC, + 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x85, + 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, 0x85, + 0xD8, 0xAE, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xAC, + 0xD8, 0xAE, 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, + 0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x86, + 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x86, 0xD8, 0xAD, + 0xD9, 0x89, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, + 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x86, + 0xD8, 0xAC, 0xD9, 0x89, 0xD9, 0x86, 0xD9, 0x85, + 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x89, + 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x8A, + 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xA8, 0xD8, 0xAE, + 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAA, + 0xD8, 0xAE, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAE, + 0xD9, 0x89, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x8A, + 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x89, 0xD8, 0xAC, + 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, 0xAD, + 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x89, + 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xB5, + 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xB4, 0xD8, 0xAD, + 0xD9, 0x8A, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x8A, + 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x84, + 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAD, + 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x85, + 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x82, 0xD9, 0x85, + 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAD, 0xD9, 0x8A, + 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x84, + 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, 0x85, + 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x8A, + 0xD9, 0x86, 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, 0x85, + 0xD8, 0xAE, 0xD9, 0x8A, 0xD9, 0x84, 0xD8, 0xAC, + 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x85, + 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x86, + 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, 0xAD, + 0xD9, 0x8A, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x81, + 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, 0xAD, + 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x85, + 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, 0xB5, + 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, 0xAE, + 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x8A, + 0xD8, 0xB5, 0xD9, 0x84, 0xDB, 0x92, 0xD9, 0x82, + 0xD9, 0x84, 0xDB, 0x92, 0xD8, 0xA7, 0xD9, 0x84, + 0xD9, 0x84, 0xD9, 0x87, 0xD8, 0xA7, 0xD9, 0x83, + 0xD8, 0xA8, 0xD8, 0xB1, 0xD9, 0x85, 0xD8, 0xAD, + 0xD9, 0x85, 0xD8, 0xAF, 0xD8, 0xB5, 0xD9, 0x84, + 0xD8, 0xB9, 0xD9, 0x85, 0xD8, 0xB1, 0xD8, 0xB3, + 0xD9, 0x88, 0xD9, 0x84, 0xD8, 0xB9, 0xD9, 0x84, + 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x88, 0xD8, 0xB3, + 0xD9, 0x84, 0xD9, 0x85, 0xD8, 0xB5, 0xD9, 0x84, + 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x84, 0xD9, 0x89, + 0x20, 0xD8, 0xA7, 0xD9, 0x84, 0xD9, 0x84, 0xD9, + 0x87, 0x20, 0xD8, 0xB9, 0xD9, 0x84, 0xD9, 0x8A, + 0xD9, 0x87, 0x20, 0xD9, 0x88, 0xD8, 0xB3, 0xD9, + 0x84, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x84, 0x20, + 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x84, + 0xD9, 0x87, 0xD8, 0xB1, 0xDB, 0x8C, 0xD8, 0xA7, + 0xD9, 0x84, 0x2E, 0x2E, 0xE2, 0x80, 0x94, 0xE2, + 0x80, 0x93, 0x5F, 0x5F, 0x28, 0x29, 0x7B, 0x7D, + 0xE3, 0x80, 0x94, 0xE3, 0x80, 0x95, 0xE3, 0x80, + 0x90, 0xE3, 0x80, 0x91, 0xE3, 0x80, 0x8A, 0xE3, + 0x80, 0x8B, 0xE3, 0x80, 0x88, 0xE3, 0x80, 0x89, + 0xE3, 0x80, 0x8C, 0xE3, 0x80, 0x8D, 0xE3, 0x80, + 0x8E, 0xE3, 0x80, 0x8F, 0x20, 0xCC, 0x85, 0x20, + 0xCC, 0x85, 0x20, 0xCC, 0x85, 0x20, 0xCC, 0x85, + 0x5F, 0x5F, 0x5F, 0x2C, 0xE3, 0x80, 0x81, 0x2E, + 0x3B, 0x3A, 0x3F, 0x21, 0xE2, 0x80, 0x94, 0x28, + 0x29, 0x7B, 0x7D, 0xE3, 0x80, 0x94, 0xE3, 0x80, + 0x95, 0x23, 0x26, 0x2A, 0x2B, 0x2D, 0x3C, 0x3E, + 0x3D, 0x5C, 0x24, 0x25, 0x40, 0x20, 0xD9, 0x8B, + 0xD9, 0x80, 0xD9, 0x8B, 0x20, 0xD9, 0x8C, 0x20, + 0xD9, 0x8D, 0x20, 0xD9, 0x8E, 0xD9, 0x80, 0xD9, + 0x8E, 0x20, 0xD9, 0x8F, 0xD9, 0x80, 0xD9, 0x8F, + 0x20, 0xD9, 0x90, 0xD9, 0x80, 0xD9, 0x90, 0x20, + 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x91, 0x20, 0xD9, + 0x92, 0xD9, 0x80, 0xD9, 0x92, 0xD8, 0xA1, 0xD8, + 0xA7, 0xD9, 0x93, 0xD8, 0xA7, 0xD9, 0x93, 0xD8, + 0xA7, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, + 0x88, 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x94, 0xD8, + 0xA7, 0xD9, 0x95, 0xD8, 0xA7, 0xD9, 0x95, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, + 0xA7, 0xD8, 0xA7, 0xD8, 0xA8, 0xD8, 0xA8, 0xD8, + 0xA8, 0xD8, 0xA8, 0xD8, 0xA9, 0xD8, 0xA9, 0xD8, + 0xAA, 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, + 0xAB, 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, + 0xAC, 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, + 0xAD, 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, + 0xAE, 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, + 0xAF, 0xD8, 0xAF, 0xD8, 0xB0, 0xD8, 0xB0, 0xD8, + 0xB1, 0xD8, 0xB1, 0xD8, 0xB2, 0xD8, 0xB2, 0xD8, + 0xB3, 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, + 0xB4, 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, + 0xB5, 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, + 0xB6, 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, + 0xB7, 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, + 0xB8, 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, + 0xB9, 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, + 0xBA, 0xD8, 0xBA, 0xD8, 0xBA, 0xD8, 0xBA, 0xD9, + 0x81, 0xD9, 0x81, 0xD9, 0x81, 0xD9, 0x81, 0xD9, + 0x82, 0xD9, 0x82, 0xD9, 0x82, 0xD9, 0x82, 0xD9, + 0x83, 0xD9, 0x83, 0xD9, 0x83, 0xD9, 0x83, 0xD9, + 0x84, 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x84, 0xD9, + 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, + 0x86, 0xD9, 0x86, 0xD9, 0x86, 0xD9, 0x86, 0xD9, + 0x87, 0xD9, 0x87, 0xD9, 0x87, 0xD9, 0x87, 0xD9, + 0x88, 0xD9, 0x88, 0xD9, 0x89, 0xD9, 0x89, 0xD9, + 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, + 0x84, 0xD8, 0xA7, 0xD9, 0x93, 0xD9, 0x84, 0xD8, + 0xA7, 0xD9, 0x93, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, + 0x94, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, + 0x84, 0xD8, 0xA7, 0xD9, 0x95, 0xD9, 0x84, 0xD8, + 0xA7, 0xD9, 0x95, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, + 0x84, 0xD8, 0xA7, 0x21, 0x22, 0x23, 0x24, 0x25, + 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, + 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, + 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, + 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, + 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, + 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, + 0x5E, 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, + 0x7E, 0xE2, 0xA6, 0x85, 0xE2, 0xA6, 0x86, 0xE3, + 0x80, 0x82, 0xE3, 0x80, 0x8C, 0xE3, 0x80, 0x8D, + 0xE3, 0x80, 0x81, 0xE3, 0x83, 0xBB, 0xE3, 0x83, + 0xB2, 0xE3, 0x82, 0xA1, 0xE3, 0x82, 0xA3, 0xE3, + 0x82, 0xA5, 0xE3, 0x82, 0xA7, 0xE3, 0x82, 0xA9, + 0xE3, 0x83, 0xA3, 0xE3, 0x83, 0xA5, 0xE3, 0x83, + 0xA7, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0xBC, 0xE3, + 0x82, 0xA2, 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xA6, + 0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xAA, 0xE3, 0x82, + 0xAB, 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, + 0x82, 0xB1, 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0xB5, + 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0xB9, 0xE3, 0x82, + 0xBB, 0xE3, 0x82, 0xBD, 0xE3, 0x82, 0xBF, 0xE3, + 0x83, 0x81, 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x86, + 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x8A, 0xE3, 0x83, + 0x8B, 0xE3, 0x83, 0x8C, 0xE3, 0x83, 0x8D, 0xE3, + 0x83, 0x8E, 0xE3, 0x83, 0x8F, 0xE3, 0x83, 0x92, + 0xE3, 0x83, 0x95, 0xE3, 0x83, 0x98, 0xE3, 0x83, + 0x9B, 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0x9F, 0xE3, + 0x83, 0xA0, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xA2, + 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xA6, 0xE3, 0x83, + 0xA8, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xAA, 0xE3, + 0x83, 0xAB, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xAD, + 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0xB3, 0xE3, 0x82, + 0x99, 0xE3, 0x82, 0x9A, 0xE1, 0x85, 0xA0, 0xE1, + 0x84, 0x80, 0xE1, 0x84, 0x81, 0xE1, 0x86, 0xAA, + 0xE1, 0x84, 0x82, 0xE1, 0x86, 0xAC, 0xE1, 0x86, + 0xAD, 0xE1, 0x84, 0x83, 0xE1, 0x84, 0x84, 0xE1, + 0x84, 0x85, 0xE1, 0x86, 0xB0, 0xE1, 0x86, 0xB1, + 0xE1, 0x86, 0xB2, 0xE1, 0x86, 0xB3, 0xE1, 0x86, + 0xB4, 0xE1, 0x86, 0xB5, 0xE1, 0x84, 0x9A, 0xE1, + 0x84, 0x86, 0xE1, 0x84, 0x87, 0xE1, 0x84, 0x88, + 0xE1, 0x84, 0xA1, 0xE1, 0x84, 0x89, 0xE1, 0x84, + 0x8A, 0xE1, 0x84, 0x8B, 0xE1, 0x84, 0x8C, 0xE1, + 0x84, 0x8D, 0xE1, 0x84, 0x8E, 0xE1, 0x84, 0x8F, + 0xE1, 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, 0x84, + 0x92, 0xE1, 0x85, 0xA1, 0xE1, 0x85, 0xA2, 0xE1, + 0x85, 0xA3, 0xE1, 0x85, 0xA4, 0xE1, 0x85, 0xA5, + 0xE1, 0x85, 0xA6, 0xE1, 0x85, 0xA7, 0xE1, 0x85, + 0xA8, 0xE1, 0x85, 0xA9, 0xE1, 0x85, 0xAA, 0xE1, + 0x85, 0xAB, 0xE1, 0x85, 0xAC, 0xE1, 0x85, 0xAD, + 0xE1, 0x85, 0xAE, 0xE1, 0x85, 0xAF, 0xE1, 0x85, + 0xB0, 0xE1, 0x85, 0xB1, 0xE1, 0x85, 0xB2, 0xE1, + 0x85, 0xB3, 0xE1, 0x85, 0xB4, 0xE1, 0x85, 0xB5, + 0xC2, 0xA2, 0xC2, 0xA3, 0xC2, 0xAC, 0x20, 0xCC, + 0x84, 0xC2, 0xA6, 0xC2, 0xA5, 0xE2, 0x82, 0xA9, + 0xE2, 0x94, 0x82, 0xE2, 0x86, 0x90, 0xE2, 0x86, + 0x91, 0xE2, 0x86, 0x92, 0xE2, 0x86, 0x93, 0xE2, + 0x96, 0xA0, 0xE2, 0x97, 0x8B, 0xF6, 0xF0, 0x9D, + 0x85, 0x97, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, 0xF0, + 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, + 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, + 0xF0, 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x85, + 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, + 0xAF, 0xF6, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, + 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB0, 0xF6, 0xF0, + 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, + 0x9D, 0x85, 0xB1, 0xF6, 0xF0, 0x9D, 0x85, 0x98, + 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB2, + 0xF6, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, 0x85, + 0xA5, 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, + 0x85, 0xA5, 0xF6, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, + 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE, 0xF6, + 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, + 0xF0, 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x86, + 0xB9, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, + 0xAF, 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, + 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, 0x41, 0x42, + 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, + 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, + 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, + 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, + 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + 0x79, 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, + 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, + 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, + 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, + 0x65, 0x66, 0x67, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x43, 0x44, 0x47, 0x4A, 0x4B, 0x4E, + 0x4F, 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x66, + 0x68, 0x69, 0x6A, 0x6B, 0x6D, 0x6E, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, + 0x45, 0x46, 0x47, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, + 0x4F, 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, + 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, + 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, + 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, 0x45, + 0x46, 0x47, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4F, + 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, + 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, + 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, + 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, + 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, + 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, + 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, + 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, + 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, + 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, + 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, + 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, + 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, + 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, + 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, + 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, + 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, + 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, + 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, + 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, + 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, + 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, + 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, + 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, + 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, + 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, + 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, + 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, + 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, + 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, + 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, + 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, + 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, + 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, + 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, + 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, + 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, + 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, + 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, + 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, + 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, + 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, + 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, + 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, + 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, + 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, + 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, + 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, + 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, + 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, + 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, + 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, + 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, + 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, + 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, + 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, + 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, + 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, + 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, + 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, + 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, + 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, + 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, + 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, + 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, + 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, + 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, + 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, + 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, + 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, + 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, + 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, + 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, + 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, 0x80, 0x30, + 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, + 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + 0x39, 0xF6, 0xE4, 0xB8, 0xBD, 0xF6, 0xE4, 0xB8, + 0xB8, 0xF6, 0xE4, 0xB9, 0x81, 0xF6, 0xF0, 0xA0, + 0x84, 0xA2, 0xF6, 0xE4, 0xBD, 0xA0, 0xF6, 0xE4, + 0xBE, 0xAE, 0xF6, 0xE4, 0xBE, 0xBB, 0xF6, 0xE5, + 0x80, 0x82, 0xF6, 0xE5, 0x81, 0xBA, 0xF6, 0xE5, + 0x82, 0x99, 0xF6, 0xE5, 0x83, 0xA7, 0xF6, 0xE5, + 0x83, 0x8F, 0xF6, 0xE3, 0x92, 0x9E, 0xF6, 0xF0, + 0xA0, 0x98, 0xBA, 0xF6, 0xE5, 0x85, 0x8D, 0xF6, + 0xE5, 0x85, 0x94, 0xF6, 0xE5, 0x85, 0xA4, 0xF6, + 0xE5, 0x85, 0xB7, 0xF6, 0xF0, 0xA0, 0x94, 0x9C, + 0xF6, 0xE3, 0x92, 0xB9, 0xF6, 0xE5, 0x85, 0xA7, + 0xF6, 0xE5, 0x86, 0x8D, 0xF6, 0xF0, 0xA0, 0x95, + 0x8B, 0xF6, 0xE5, 0x86, 0x97, 0xF6, 0xE5, 0x86, + 0xA4, 0xF6, 0xE4, 0xBB, 0x8C, 0xF6, 0xE5, 0x86, + 0xAC, 0xF6, 0xE5, 0x86, 0xB5, 0xF6, 0xF0, 0xA9, + 0x87, 0x9F, 0xF6, 0xE5, 0x87, 0xB5, 0xF6, 0xE5, + 0x88, 0x83, 0xF6, 0xE3, 0x93, 0x9F, 0xF6, 0xE5, + 0x88, 0xBB, 0xF6, 0xE5, 0x89, 0x86, 0xF6, 0xE5, + 0x89, 0xB2, 0xF6, 0xE5, 0x89, 0xB7, 0xF6, 0xE3, + 0x94, 0x95, 0xF6, 0xE5, 0x8B, 0x87, 0xF6, 0xE5, + 0x8B, 0x89, 0xF6, 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, + 0x8B, 0xBA, 0xF6, 0xE5, 0x8C, 0x85, 0xF6, 0xE5, + 0x8C, 0x86, 0xF6, 0xE5, 0x8C, 0x97, 0xF6, 0xE5, + 0x8D, 0x89, 0xF6, 0xE5, 0x8D, 0x91, 0xF6, 0xE5, + 0x8D, 0x9A, 0xF6, 0xE5, 0x8D, 0xB3, 0xF6, 0xE5, + 0x8D, 0xBD, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xE5, + 0x8D, 0xBF, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xF0, + 0xA0, 0xA8, 0xAC, 0xF6, 0xE7, 0x81, 0xB0, 0xF6, + 0xE5, 0x8F, 0x8A, 0xF6, 0xE5, 0x8F, 0x9F, 0xF6, + 0xF0, 0xA0, 0xAD, 0xA3, 0xF6, 0xE5, 0x8F, 0xAB, + 0xF6, 0xE5, 0x8F, 0xB1, 0xF6, 0xE5, 0x90, 0x86, + 0xF6, 0xE5, 0x92, 0x9E, 0xF6, 0xE5, 0x90, 0xB8, + 0xF6, 0xE5, 0x91, 0x88, 0xF6, 0xE5, 0x91, 0xA8, + 0xF6, 0xE5, 0x92, 0xA2, 0xF6, 0xE5, 0x93, 0xB6, + 0xF6, 0xE5, 0x94, 0x90, 0xF6, 0xE5, 0x95, 0x93, + 0xF6, 0xE5, 0x95, 0xA3, 0xF6, 0xE5, 0x96, 0x84, + 0xF6, 0xE5, 0x96, 0x84, 0xF6, 0xE5, 0x96, 0x99, + 0xF6, 0xE5, 0x96, 0xAB, 0xF6, 0xE5, 0x96, 0xB3, + 0xF6, 0xE5, 0x97, 0x82, 0xF6, 0xE5, 0x9C, 0x96, + 0xF6, 0xE5, 0x98, 0x86, 0xF6, 0xE5, 0x9C, 0x97, + 0xF6, 0xE5, 0x99, 0x91, 0xF6, 0xE5, 0x99, 0xB4, + 0xF6, 0xE5, 0x88, 0x87, 0xF6, 0xE5, 0xA3, 0xAE, + 0xF6, 0xE5, 0x9F, 0x8E, 0xF6, 0xE5, 0x9F, 0xB4, + 0xF6, 0xE5, 0xA0, 0x8D, 0xF6, 0xE5, 0x9E, 0x8B, + 0xF6, 0xE5, 0xA0, 0xB2, 0xF6, 0xE5, 0xA0, 0xB1, + 0xF6, 0xE5, 0xA2, 0xAC, 0xF6, 0xF0, 0xA1, 0x93, + 0xA4, 0xF6, 0xE5, 0xA3, 0xB2, 0xF6, 0xE5, 0xA3, + 0xB7, 0xF6, 0xE5, 0xA4, 0x86, 0xF6, 0xE5, 0xA4, + 0x9A, 0xF6, 0xE5, 0xA4, 0xA2, 0xF6, 0xE5, 0xA5, + 0xA2, 0xF6, 0xF0, 0xA1, 0x9A, 0xA8, 0xF6, 0xF0, + 0xA1, 0x9B, 0xAA, 0xF6, 0xE5, 0xA7, 0xAC, 0xF6, + 0xE5, 0xA8, 0x9B, 0xF6, 0xE5, 0xA8, 0xA7, 0xF6, + 0xE5, 0xA7, 0x98, 0xF6, 0xE5, 0xA9, 0xA6, 0xF6, + 0xE3, 0x9B, 0xAE, 0xF6, 0xE3, 0x9B, 0xBC, 0xF6, + 0xE5, 0xAC, 0x88, 0xF6, 0xE5, 0xAC, 0xBE, 0xF6, + 0xE5, 0xAC, 0xBE, 0xF6, 0xF0, 0xA1, 0xA7, 0x88, + 0xF6, 0xE5, 0xAF, 0x83, 0xF6, 0xE5, 0xAF, 0x98, + 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, 0xAF, 0xB3, + 0xF6, 0xF0, 0xA1, 0xAC, 0x98, 0xF6, 0xE5, 0xAF, + 0xBF, 0xF6, 0xE5, 0xB0, 0x86, 0xF6, 0xE5, 0xBD, + 0x93, 0xF6, 0xE5, 0xB0, 0xA2, 0xF6, 0xE3, 0x9E, + 0x81, 0xF6, 0xE5, 0xB1, 0xA0, 0xF6, 0xE5, 0xB1, + 0xAE, 0xF6, 0xE5, 0xB3, 0x80, 0xF6, 0xE5, 0xB2, + 0x8D, 0xF6, 0xF0, 0xA1, 0xB7, 0xA4, 0xF6, 0xE5, + 0xB5, 0x83, 0xF6, 0xF0, 0xA1, 0xB7, 0xA6, 0xF6, + 0xE5, 0xB5, 0xAE, 0xF6, 0xE5, 0xB5, 0xAB, 0xF6, + 0xE5, 0xB5, 0xBC, 0xF6, 0xE5, 0xB7, 0xA1, 0xF6, + 0xE5, 0xB7, 0xA2, 0xF6, 0xE3, 0xA0, 0xAF, 0xF6, + 0xE5, 0xB7, 0xBD, 0xF6, 0xE5, 0xB8, 0xA8, 0xF6, + 0xE5, 0xB8, 0xBD, 0xF6, 0xE5, 0xB9, 0xA9, 0xF6, + 0xE3, 0xA1, 0xA2, 0xF6, 0xF0, 0xA2, 0x86, 0x83, + 0xF6, 0xE3, 0xA1, 0xBC, 0xF6, 0xE5, 0xBA, 0xB0, + 0xF6, 0xE5, 0xBA, 0xB3, 0xF6, 0xE5, 0xBA, 0xB6, + 0xF6, 0xE5, 0xBB, 0x8A, 0xF6, 0xF0, 0xAA, 0x8E, + 0x92, 0xF6, 0xE5, 0xBB, 0xBE, 0xF6, 0xF0, 0xA2, + 0x8C, 0xB1, 0xF6, 0xF0, 0xA2, 0x8C, 0xB1, 0xF6, + 0xE8, 0x88, 0x81, 0xF6, 0xE5, 0xBC, 0xA2, 0xF6, + 0xE5, 0xBC, 0xA2, 0xF6, 0xE3, 0xA3, 0x87, 0xF6, + 0xF0, 0xA3, 0x8A, 0xB8, 0xF6, 0xF0, 0xA6, 0x87, + 0x9A, 0xF6, 0xE5, 0xBD, 0xA2, 0xF6, 0xE5, 0xBD, + 0xAB, 0xF6, 0xE3, 0xA3, 0xA3, 0xF6, 0xE5, 0xBE, + 0x9A, 0xF6, 0xE5, 0xBF, 0x8D, 0xF6, 0xE5, 0xBF, + 0x97, 0xF6, 0xE5, 0xBF, 0xB9, 0xF6, 0xE6, 0x82, + 0x81, 0xF6, 0xE3, 0xA4, 0xBA, 0xF6, 0xE3, 0xA4, + 0x9C, 0xF6, 0xE6, 0x82, 0x94, 0xF6, 0xF0, 0xA2, + 0x9B, 0x94, 0xF6, 0xE6, 0x83, 0x87, 0xF6, 0xE6, + 0x85, 0x88, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, + 0x85, 0x8E, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, + 0x85, 0xBA, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, 0xE6, + 0x86, 0xB2, 0xF6, 0xE6, 0x86, 0xA4, 0xF6, 0xE6, + 0x86, 0xAF, 0xF6, 0xE6, 0x87, 0x9E, 0xF6, 0xE6, + 0x87, 0xB2, 0xF6, 0xE6, 0x87, 0xB6, 0xF6, 0xE6, + 0x88, 0x90, 0xF6, 0xE6, 0x88, 0x9B, 0xF6, 0xE6, + 0x89, 0x9D, 0xF6, 0xE6, 0x8A, 0xB1, 0xF6, 0xE6, + 0x8B, 0x94, 0xF6, 0xE6, 0x8D, 0x90, 0xF6, 0xF0, + 0xA2, 0xAC, 0x8C, 0xF6, 0xE6, 0x8C, 0xBD, 0xF6, + 0xE6, 0x8B, 0xBC, 0xF6, 0xE6, 0x8D, 0xA8, 0xF6, + 0xE6, 0x8E, 0x83, 0xF6, 0xE6, 0x8F, 0xA4, 0xF6, + 0xF0, 0xA2, 0xAF, 0xB1, 0xF6, 0xE6, 0x90, 0xA2, + 0xF6, 0xE6, 0x8F, 0x85, 0xF6, 0xE6, 0x8E, 0xA9, + 0xF6, 0xE3, 0xA8, 0xAE, 0xF6, 0xE6, 0x91, 0xA9, + 0xF6, 0xE6, 0x91, 0xBE, 0xF6, 0xE6, 0x92, 0x9D, + 0xF6, 0xE6, 0x91, 0xB7, 0xF6, 0xE3, 0xA9, 0xAC, + 0xF6, 0xE6, 0x95, 0x8F, 0xF6, 0xE6, 0x95, 0xAC, + 0xF6, 0xF0, 0xA3, 0x80, 0x8A, 0xF6, 0xE6, 0x97, + 0xA3, 0xF6, 0xE6, 0x9B, 0xB8, 0xF6, 0xE6, 0x99, + 0x89, 0xF6, 0xE3, 0xAC, 0x99, 0xF6, 0xE6, 0x9A, + 0x91, 0xF6, 0xE3, 0xAC, 0x88, 0xF6, 0xE3, 0xAB, + 0xA4, 0xF6, 0xE5, 0x86, 0x92, 0xF6, 0xE5, 0x86, + 0x95, 0xF6, 0xE6, 0x9C, 0x80, 0xF6, 0xE6, 0x9A, + 0x9C, 0xF6, 0xE8, 0x82, 0xAD, 0xF6, 0xE4, 0x8F, + 0x99, 0xF6, 0xE6, 0x9C, 0x97, 0xF6, 0xE6, 0x9C, + 0x9B, 0xF6, 0xE6, 0x9C, 0xA1, 0xF6, 0xE6, 0x9D, + 0x9E, 0xF6, 0xE6, 0x9D, 0x93, 0xF6, 0xF0, 0xA3, + 0x8F, 0x83, 0xF6, 0xE3, 0xAD, 0x89, 0xF6, 0xE6, + 0x9F, 0xBA, 0xF6, 0xE6, 0x9E, 0x85, 0xF6, 0xE6, + 0xA1, 0x92, 0xF6, 0xE6, 0xA2, 0x85, 0xF6, 0xF0, + 0xA3, 0x91, 0xAD, 0xF6, 0xE6, 0xA2, 0x8E, 0xF6, + 0xE6, 0xA0, 0x9F, 0xF6, 0xE6, 0xA4, 0x94, 0xF6, + 0xE3, 0xAE, 0x9D, 0xF6, 0xE6, 0xA5, 0x82, 0xF6, + 0xE6, 0xA6, 0xA3, 0xF6, 0xE6, 0xA7, 0xAA, 0xF6, + 0xE6, 0xAA, 0xA8, 0xF6, 0xF0, 0xA3, 0x9A, 0xA3, + 0xF6, 0xE6, 0xAB, 0x9B, 0xF6, 0xE3, 0xB0, 0x98, + 0xF6, 0xE6, 0xAC, 0xA1, 0xF6, 0xF0, 0xA3, 0xA2, + 0xA7, 0xF6, 0xE6, 0xAD, 0x94, 0xF6, 0xE3, 0xB1, + 0x8E, 0xF6, 0xE6, 0xAD, 0xB2, 0xF6, 0xE6, 0xAE, + 0x9F, 0xF6, 0xE6, 0xAE, 0xBA, 0xF6, 0xE6, 0xAE, + 0xBB, 0xF6, 0xF0, 0xA3, 0xAA, 0x8D, 0xF6, 0xF0, + 0xA1, 0xB4, 0x8B, 0xF6, 0xF0, 0xA3, 0xAB, 0xBA, + 0xF6, 0xE6, 0xB1, 0x8E, 0xF6, 0xF0, 0xA3, 0xB2, + 0xBC, 0xF6, 0xE6, 0xB2, 0xBF, 0xF6, 0xE6, 0xB3, + 0x8D, 0xF6, 0xE6, 0xB1, 0xA7, 0xF6, 0xE6, 0xB4, + 0x96, 0xF6, 0xE6, 0xB4, 0xBE, 0xF6, 0xE6, 0xB5, + 0xB7, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, 0xB5, + 0xA9, 0xF6, 0xE6, 0xB5, 0xB8, 0xF6, 0xE6, 0xB6, + 0x85, 0xF6, 0xF0, 0xA3, 0xB4, 0x9E, 0xF6, 0xE6, + 0xB4, 0xB4, 0xF6, 0xE6, 0xB8, 0xAF, 0xF6, 0xE6, + 0xB9, 0xAE, 0xF6, 0xE3, 0xB4, 0xB3, 0xF6, 0xE6, + 0xBB, 0x8B, 0xF6, 0xE6, 0xBB, 0x87, 0xF6, 0xF0, + 0xA3, 0xBB, 0x91, 0xF6, 0xE6, 0xB7, 0xB9, 0xF6, + 0xE6, 0xBD, 0xAE, 0xF6, 0xF0, 0xA3, 0xBD, 0x9E, + 0xF6, 0xF0, 0xA3, 0xBE, 0x8E, 0xF6, 0xE6, 0xBF, + 0x86, 0xF6, 0xE7, 0x80, 0xB9, 0xF6, 0xE7, 0x80, + 0x9E, 0xF6, 0xE7, 0x80, 0x9B, 0xF6, 0xE3, 0xB6, + 0x96, 0xF6, 0xE7, 0x81, 0x8A, 0xF6, 0xE7, 0x81, + 0xBD, 0xF6, 0xE7, 0x81, 0xB7, 0xF6, 0xE7, 0x82, + 0xAD, 0xF6, 0xF0, 0xA0, 0x94, 0xA5, 0xF6, 0xE7, + 0x85, 0x85, 0xF6, 0xF0, 0xA4, 0x89, 0xA3, 0xF6, + 0xE7, 0x86, 0x9C, 0xF6, 0xF0, 0xA4, 0x8E, 0xAB, + 0xF6, 0xE7, 0x88, 0xA8, 0xF6, 0xE7, 0x88, 0xB5, + 0xF6, 0xE7, 0x89, 0x90, 0xF6, 0xF0, 0xA4, 0x98, + 0x88, 0xF6, 0xE7, 0x8A, 0x80, 0xF6, 0xE7, 0x8A, + 0x95, 0xF6, 0xF0, 0xA4, 0x9C, 0xB5, 0xF6, 0xF0, + 0xA4, 0xA0, 0x94, 0xF6, 0xE7, 0x8D, 0xBA, 0xF6, + 0xE7, 0x8E, 0x8B, 0xF6, 0xE3, 0xBA, 0xAC, 0xF6, + 0xE7, 0x8E, 0xA5, 0xF6, 0xE3, 0xBA, 0xB8, 0xF6, + 0xE3, 0xBA, 0xB8, 0xF6, 0xE7, 0x91, 0x87, 0xF6, + 0xE7, 0x91, 0x9C, 0xF6, 0xE7, 0x91, 0xB1, 0xF6, + 0xE7, 0x92, 0x85, 0xF6, 0xE7, 0x93, 0x8A, 0xF6, + 0xE3, 0xBC, 0x9B, 0xF6, 0xE7, 0x94, 0xA4, 0xF6, + 0xF0, 0xA4, 0xB0, 0xB6, 0xF6, 0xE7, 0x94, 0xBE, + 0xF6, 0xF0, 0xA4, 0xB2, 0x92, 0xF6, 0xE7, 0x95, + 0xB0, 0xF6, 0xF0, 0xA2, 0x86, 0x9F, 0xF6, 0xE7, + 0x98, 0x90, 0xF6, 0xF0, 0xA4, 0xBE, 0xA1, 0xF6, + 0xF0, 0xA4, 0xBE, 0xB8, 0xF6, 0xF0, 0xA5, 0x81, + 0x84, 0xF6, 0xE3, 0xBF, 0xBC, 0xF6, 0xE4, 0x80, + 0x88, 0xF6, 0xE7, 0x9B, 0xB4, 0xF6, 0xF0, 0xA5, + 0x83, 0xB3, 0xF6, 0xF0, 0xA5, 0x83, 0xB2, 0xF6, + 0xF0, 0xA5, 0x84, 0x99, 0xF6, 0xF0, 0xA5, 0x84, + 0xB3, 0xF6, 0xE7, 0x9C, 0x9E, 0xF6, 0xE7, 0x9C, + 0x9F, 0xF6, 0xE7, 0x9C, 0x9F, 0xF6, 0xE7, 0x9D, + 0x8A, 0xF6, 0xE4, 0x80, 0xB9, 0xF6, 0xE7, 0x9E, + 0x8B, 0xF6, 0xE4, 0x81, 0x86, 0xF6, 0xE4, 0x82, + 0x96, 0xF6, 0xF0, 0xA5, 0x90, 0x9D, 0xF6, 0xE7, + 0xA1, 0x8E, 0xF6, 0xE7, 0xA2, 0x8C, 0xF6, 0xE7, + 0xA3, 0x8C, 0xF6, 0xE4, 0x83, 0xA3, 0xF6, 0xF0, + 0xA5, 0x98, 0xA6, 0xF6, 0xE7, 0xA5, 0x96, 0xF6, + 0xF0, 0xA5, 0x9A, 0x9A, 0xF6, 0xF0, 0xA5, 0x9B, + 0x85, 0xF6, 0xE7, 0xA6, 0x8F, 0xF6, 0xE7, 0xA7, + 0xAB, 0xF6, 0xE4, 0x84, 0xAF, 0xF6, 0xE7, 0xA9, + 0x80, 0xF6, 0xE7, 0xA9, 0x8A, 0xF6, 0xE7, 0xA9, + 0x8F, 0xF6, 0xF0, 0xA5, 0xA5, 0xBC, 0xF6, 0xF0, + 0xA5, 0xAA, 0xA7, 0xF6, 0xF0, 0xA5, 0xAA, 0xA7, + 0xF6, 0xE7, 0xAB, 0xAE, 0xF6, 0xE4, 0x88, 0x82, + 0xF6, 0xF0, 0xA5, 0xAE, 0xAB, 0xF6, 0xE7, 0xAF, + 0x86, 0xF6, 0xE7, 0xAF, 0x89, 0xF6, 0xE4, 0x88, + 0xA7, 0xF6, 0xF0, 0xA5, 0xB2, 0x80, 0xF6, 0xE7, + 0xB3, 0x92, 0xF6, 0xE4, 0x8A, 0xA0, 0xF6, 0xE7, + 0xB3, 0xA8, 0xF6, 0xE7, 0xB3, 0xA3, 0xF6, 0xE7, + 0xB4, 0x80, 0xF6, 0xF0, 0xA5, 0xBE, 0x86, 0xF6, + 0xE7, 0xB5, 0xA3, 0xF6, 0xE4, 0x8C, 0x81, 0xF6, + 0xE7, 0xB7, 0x87, 0xF6, 0xE7, 0xB8, 0x82, 0xF6, + 0xE7, 0xB9, 0x85, 0xF6, 0xE4, 0x8C, 0xB4, 0xF6, + 0xF0, 0xA6, 0x88, 0xA8, 0xF6, 0xF0, 0xA6, 0x89, + 0x87, 0xF6, 0xE4, 0x8D, 0x99, 0xF6, 0xF0, 0xA6, + 0x8B, 0x99, 0xF6, 0xE7, 0xBD, 0xBA, 0xF6, 0xF0, + 0xA6, 0x8C, 0xBE, 0xF6, 0xE7, 0xBE, 0x95, 0xF6, + 0xE7, 0xBF, 0xBA, 0xF6, 0xE8, 0x80, 0x85, 0xF6, + 0xF0, 0xA6, 0x93, 0x9A, 0xF6, 0xF0, 0xA6, 0x94, + 0xA3, 0xF6, 0xE8, 0x81, 0xA0, 0xF6, 0xF0, 0xA6, + 0x96, 0xA8, 0xF6, 0xE8, 0x81, 0xB0, 0xF6, 0xF0, + 0xA3, 0x8D, 0x9F, 0xF6, 0xE4, 0x8F, 0x95, 0xF6, + 0xE8, 0x82, 0xB2, 0xF6, 0xE8, 0x84, 0x83, 0xF6, + 0xE4, 0x90, 0x8B, 0xF6, 0xE8, 0x84, 0xBE, 0xF6, + 0xE5, 0xAA, 0xB5, 0xF6, 0xF0, 0xA6, 0x9E, 0xA7, + 0xF6, 0xF0, 0xA6, 0x9E, 0xB5, 0xF6, 0xF0, 0xA3, + 0x8E, 0x93, 0xF6, 0xF0, 0xA3, 0x8E, 0x9C, 0xF6, + 0xE8, 0x88, 0x81, 0xF6, 0xE8, 0x88, 0x84, 0xF6, + 0xE8, 0xBE, 0x9E, 0xF6, 0xE4, 0x91, 0xAB, 0xF6, + 0xE8, 0x8A, 0x91, 0xF6, 0xE8, 0x8A, 0x8B, 0xF6, + 0xE8, 0x8A, 0x9D, 0xF6, 0xE5, 0x8A, 0xB3, 0xF6, + 0xE8, 0x8A, 0xB1, 0xF6, 0xE8, 0x8A, 0xB3, 0xF6, + 0xE8, 0x8A, 0xBD, 0xF6, 0xE8, 0x8B, 0xA6, 0xF6, + 0xF0, 0xA6, 0xAC, 0xBC, 0xF6, 0xE8, 0x8B, 0xA5, + 0xF6, 0xE8, 0x8C, 0x9D, 0xF6, 0xE8, 0x8D, 0xA3, + 0xF6, 0xE8, 0x8E, 0xAD, 0xF6, 0xE8, 0x8C, 0xA3, + 0xF6, 0xE8, 0x8E, 0xBD, 0xF6, 0xE8, 0x8F, 0xA7, + 0xF6, 0xE8, 0x91, 0x97, 0xF6, 0xE8, 0x8D, 0x93, + 0xF6, 0xE8, 0x8F, 0x8A, 0xF6, 0xE8, 0x8F, 0x8C, + 0xF6, 0xE8, 0x8F, 0x9C, 0xF6, 0xF0, 0xA6, 0xB0, + 0xB6, 0xF6, 0xF0, 0xA6, 0xB5, 0xAB, 0xF6, 0xF0, + 0xA6, 0xB3, 0x95, 0xF6, 0xE4, 0x94, 0xAB, 0xF6, + 0xE8, 0x93, 0xB1, 0xF6, 0xE8, 0x93, 0xB3, 0xF6, + 0xE8, 0x94, 0x96, 0xF6, 0xF0, 0xA7, 0x8F, 0x8A, + 0xF6, 0xE8, 0x95, 0xA4, 0xF6, 0xF0, 0xA6, 0xBC, + 0xAC, 0xF6, 0xE4, 0x95, 0x9D, 0xF6, 0xE4, 0x95, + 0xA1, 0xF6, 0xF0, 0xA6, 0xBE, 0xB1, 0xF6, 0xF0, + 0xA7, 0x83, 0x92, 0xF6, 0xE4, 0x95, 0xAB, 0xF6, + 0xE8, 0x99, 0x90, 0xF6, 0xE8, 0x99, 0x9C, 0xF6, + 0xE8, 0x99, 0xA7, 0xF6, 0xE8, 0x99, 0xA9, 0xF6, + 0xE8, 0x9A, 0xA9, 0xF6, 0xE8, 0x9A, 0x88, 0xF6, + 0xE8, 0x9C, 0x8E, 0xF6, 0xE8, 0x9B, 0xA2, 0xF6, + 0xE8, 0x9D, 0xB9, 0xF6, 0xE8, 0x9C, 0xA8, 0xF6, + 0xE8, 0x9D, 0xAB, 0xF6, 0xE8, 0x9E, 0x86, 0xF6, + 0xE4, 0x97, 0x97, 0xF6, 0xE8, 0x9F, 0xA1, 0xF6, + 0xE8, 0xA0, 0x81, 0xF6, 0xE4, 0x97, 0xB9, 0xF6, + 0xE8, 0xA1, 0xA0, 0xF6, 0xE8, 0xA1, 0xA3, 0xF6, + 0xF0, 0xA7, 0x99, 0xA7, 0xF6, 0xE8, 0xA3, 0x97, + 0xF6, 0xE8, 0xA3, 0x9E, 0xF6, 0xE4, 0x98, 0xB5, + 0xF6, 0xE8, 0xA3, 0xBA, 0xF6, 0xE3, 0x92, 0xBB, + 0xF6, 0xF0, 0xA7, 0xA2, 0xAE, 0xF6, 0xF0, 0xA7, + 0xA5, 0xA6, 0xF6, 0xE4, 0x9A, 0xBE, 0xF6, 0xE4, + 0x9B, 0x87, 0xF6, 0xE8, 0xAA, 0xA0, 0xF6, 0xE8, + 0xAB, 0xAD, 0xF6, 0xE8, 0xAE, 0x8A, 0xF6, 0xE8, + 0xB1, 0x95, 0xF6, 0xF0, 0xA7, 0xB2, 0xA8, 0xF6, + 0xE8, 0xB2, 0xAB, 0xF6, 0xE8, 0xB3, 0x81, 0xF6, + 0xE8, 0xB4, 0x9B, 0xF6, 0xE8, 0xB5, 0xB7, 0xF6, + 0xF0, 0xA7, 0xBC, 0xAF, 0xF6, 0xF0, 0xA0, 0xA0, + 0x84, 0xF6, 0xE8, 0xB7, 0x8B, 0xF6, 0xE8, 0xB6, + 0xBC, 0xF6, 0xE8, 0xB7, 0xB0, 0xF6, 0xF0, 0xA0, + 0xA3, 0x9E, 0xF6, 0xE8, 0xBB, 0x94, 0xF6, 0xE8, + 0xBC, 0xB8, 0xF6, 0xF0, 0xA8, 0x97, 0x92, 0xF6, + 0xF0, 0xA8, 0x97, 0xAD, 0xF6, 0xE9, 0x82, 0x94, + 0xF6, 0xE9, 0x83, 0xB1, 0xF6, 0xE9, 0x84, 0x91, + 0xF6, 0xF0, 0xA8, 0x9C, 0xAE, 0xF6, 0xE9, 0x84, + 0x9B, 0xF6, 0xE9, 0x88, 0xB8, 0xF6, 0xE9, 0x8B, + 0x97, 0xF6, 0xE9, 0x8B, 0x98, 0xF6, 0xE9, 0x89, + 0xBC, 0xF6, 0xE9, 0x8F, 0xB9, 0xF6, 0xE9, 0x90, + 0x95, 0xF6, 0xF0, 0xA8, 0xAF, 0xBA, 0xF6, 0xE9, + 0x96, 0x8B, 0xF6, 0xE4, 0xA6, 0x95, 0xF6, 0xE9, + 0x96, 0xB7, 0xF6, 0xF0, 0xA8, 0xB5, 0xB7, 0xF6, + 0xE4, 0xA7, 0xA6, 0xF6, 0xE9, 0x9B, 0x83, 0xF6, + 0xE5, 0xB6, 0xB2, 0xF6, 0xE9, 0x9C, 0xA3, 0xF6, + 0xF0, 0xA9, 0x85, 0x85, 0xF6, 0xF0, 0xA9, 0x88, + 0x9A, 0xF6, 0xE4, 0xA9, 0xAE, 0xF6, 0xE4, 0xA9, + 0xB6, 0xF6, 0xE9, 0x9F, 0xA0, 0xF6, 0xF0, 0xA9, + 0x90, 0x8A, 0xF6, 0xE4, 0xAA, 0xB2, 0xF6, 0xF0, + 0xA9, 0x92, 0x96, 0xF6, 0xE9, 0xA0, 0x8B, 0xF6, + 0xE9, 0xA0, 0x8B, 0xF6, 0xE9, 0xA0, 0xA9, 0xF6, + 0xF0, 0xA9, 0x96, 0xB6, 0xF6, 0xE9, 0xA3, 0xA2, + 0xF6, 0xE4, 0xAC, 0xB3, 0xF6, 0xE9, 0xA4, 0xA9, + 0xF6, 0xE9, 0xA6, 0xA7, 0xF6, 0xE9, 0xA7, 0x82, + 0xF6, 0xE9, 0xA7, 0xBE, 0xF6, 0xE4, 0xAF, 0x8E, + 0xF6, 0xF0, 0xA9, 0xAC, 0xB0, 0xF6, 0xE9, 0xAC, + 0x92, 0xF6, 0xE9, 0xB1, 0x80, 0xF6, 0xE9, 0xB3, + 0xBD, 0xF6, 0xE4, 0xB3, 0x8E, 0xF6, 0xE4, 0xB3, + 0xAD, 0xF6, 0xE9, 0xB5, 0xA7, 0xF6, 0xF0, 0xAA, + 0x83, 0x8E, 0xF6, 0xE4, 0xB3, 0xB8, 0xF6, 0xF0, + 0xAA, 0x84, 0x85, 0xF6, 0xF0, 0xAA, 0x88, 0x8E, + 0xF6, 0xF0, 0xAA, 0x8A, 0x91, 0xF6, 0xE9, 0xBA, + 0xBB, 0xF6, 0xE4, 0xB5, 0x96, 0xF6, 0xE9, 0xBB, + 0xB9, 0xF6, 0xE9, 0xBB, 0xBE, 0xF6, 0xE9, 0xBC, + 0x85, 0xF6, 0xE9, 0xBC, 0x8F, 0xF6, 0xE9, 0xBC, + 0x96, 0xF6, 0xE9, 0xBC, 0xBB, 0xF6, 0xF0, 0xAA, + 0x98, 0x80, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, + }, + { + 0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84, + 0x32, 0x33, 0x20, 0xCC, 0x81, 0xCE, 0xBC, 0x20, + 0xCC, 0xA7, 0x31, 0x6F, 0x31, 0xE2, 0x81, 0x84, + 0x34, 0x31, 0xE2, 0x81, 0x84, 0x32, 0x33, 0xE2, + 0x81, 0x84, 0x34, 0xF6, 0x41, 0xCC, 0x80, 0xF6, + 0x41, 0xCC, 0x81, 0xF6, 0x41, 0xCC, 0x82, 0xF6, + 0x41, 0xCC, 0x83, 0xF6, 0x41, 0xCC, 0x88, 0xF6, + 0x41, 0xCC, 0x8A, 0xF6, 0x43, 0xCC, 0xA7, 0xF6, + 0x45, 0xCC, 0x80, 0xF6, 0x45, 0xCC, 0x81, 0xF6, + 0x45, 0xCC, 0x82, 0xF6, 0x45, 0xCC, 0x88, 0xF6, + 0x49, 0xCC, 0x80, 0xF6, 0x49, 0xCC, 0x81, 0xF6, + 0x49, 0xCC, 0x82, 0xF6, 0x49, 0xCC, 0x88, 0xF6, + 0x4E, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x80, 0xF6, + 0x4F, 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xF6, + 0x4F, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x88, 0xF6, + 0x55, 0xCC, 0x80, 0xF6, 0x55, 0xCC, 0x81, 0xF6, + 0x55, 0xCC, 0x82, 0xF6, 0x55, 0xCC, 0x88, 0xF6, + 0x59, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x80, 0xF6, + 0x61, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x82, 0xF6, + 0x61, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x88, 0xF6, + 0x61, 0xCC, 0x8A, 0xF6, 0x63, 0xCC, 0xA7, 0xF6, + 0x65, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x81, 0xF6, + 0x65, 0xCC, 0x82, 0xF6, 0x65, 0xCC, 0x88, 0xF6, + 0x69, 0xCC, 0x80, 0xF6, 0x69, 0xCC, 0x81, 0xF6, + 0x69, 0xCC, 0x82, 0xF6, 0x69, 0xCC, 0x88, 0xF6, + 0x6E, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x80, 0xF6, + 0x6F, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, 0xF6, + 0x6F, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x88, 0xF6, + 0x75, 0xCC, 0x80, 0xF6, 0x75, 0xCC, 0x81, 0xF6, + 0x75, 0xCC, 0x82, 0xF6, 0x75, 0xCC, 0x88, 0xF6, + 0x79, 0xCC, 0x81, 0xF6, 0x79, 0xCC, 0x88, 0xF6, + 0x41, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x84, 0xF6, + 0x41, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0x86, 0xF6, + 0x41, 0xCC, 0xA8, 0xF6, 0x61, 0xCC, 0xA8, 0xF6, + 0x43, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0x81, 0xF6, + 0x43, 0xCC, 0x82, 0xF6, 0x63, 0xCC, 0x82, 0xF6, + 0x43, 0xCC, 0x87, 0xF6, 0x63, 0xCC, 0x87, 0xF6, + 0x43, 0xCC, 0x8C, 0xF6, 0x63, 0xCC, 0x8C, 0xF6, + 0x44, 0xCC, 0x8C, 0xF6, 0x64, 0xCC, 0x8C, 0xF6, + 0x45, 0xCC, 0x84, 0xF6, 0x65, 0xCC, 0x84, 0xF6, + 0x45, 0xCC, 0x86, 0xF6, 0x65, 0xCC, 0x86, 0xF6, + 0x45, 0xCC, 0x87, 0xF6, 0x65, 0xCC, 0x87, 0xF6, + 0x45, 0xCC, 0xA8, 0xF6, 0x65, 0xCC, 0xA8, 0xF6, + 0x45, 0xCC, 0x8C, 0xF6, 0x65, 0xCC, 0x8C, 0xF6, + 0x47, 0xCC, 0x82, 0xF6, 0x67, 0xCC, 0x82, 0xF6, + 0x47, 0xCC, 0x86, 0xF6, 0x67, 0xCC, 0x86, 0xF6, + 0x47, 0xCC, 0x87, 0xF6, 0x67, 0xCC, 0x87, 0xF6, + 0x47, 0xCC, 0xA7, 0xF6, 0x67, 0xCC, 0xA7, 0xF6, + 0x48, 0xCC, 0x82, 0xF6, 0x68, 0xCC, 0x82, 0xF6, + 0x49, 0xCC, 0x83, 0xF6, 0x69, 0xCC, 0x83, 0xF6, + 0x49, 0xCC, 0x84, 0xF6, 0x69, 0xCC, 0x84, 0xF6, + 0x49, 0xCC, 0x86, 0xF6, 0x69, 0xCC, 0x86, 0xF6, + 0x49, 0xCC, 0xA8, 0xF6, 0x69, 0xCC, 0xA8, 0xF6, + 0x49, 0xCC, 0x87, 0x49, 0x4A, 0x69, 0x6A, 0xF6, + 0x4A, 0xCC, 0x82, 0xF6, 0x6A, 0xCC, 0x82, 0xF6, + 0x4B, 0xCC, 0xA7, 0xF6, 0x6B, 0xCC, 0xA7, 0xF6, + 0x4C, 0xCC, 0x81, 0xF6, 0x6C, 0xCC, 0x81, 0xF6, + 0x4C, 0xCC, 0xA7, 0xF6, 0x6C, 0xCC, 0xA7, 0xF6, + 0x4C, 0xCC, 0x8C, 0xF6, 0x6C, 0xCC, 0x8C, 0x4C, + 0xC2, 0xB7, 0x6C, 0xC2, 0xB7, 0xF6, 0x4E, 0xCC, + 0x81, 0xF6, 0x6E, 0xCC, 0x81, 0xF6, 0x4E, 0xCC, + 0xA7, 0xF6, 0x6E, 0xCC, 0xA7, 0xF6, 0x4E, 0xCC, + 0x8C, 0xF6, 0x6E, 0xCC, 0x8C, 0xCA, 0xBC, 0x6E, + 0xF6, 0x4F, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, 0x84, + 0xF6, 0x4F, 0xCC, 0x86, 0xF6, 0x6F, 0xCC, 0x86, + 0xF6, 0x4F, 0xCC, 0x8B, 0xF6, 0x6F, 0xCC, 0x8B, + 0xF6, 0x52, 0xCC, 0x81, 0xF6, 0x72, 0xCC, 0x81, + 0xF6, 0x52, 0xCC, 0xA7, 0xF6, 0x72, 0xCC, 0xA7, + 0xF6, 0x52, 0xCC, 0x8C, 0xF6, 0x72, 0xCC, 0x8C, + 0xF6, 0x53, 0xCC, 0x81, 0xF6, 0x73, 0xCC, 0x81, + 0xF6, 0x53, 0xCC, 0x82, 0xF6, 0x73, 0xCC, 0x82, + 0xF6, 0x53, 0xCC, 0xA7, 0xF6, 0x73, 0xCC, 0xA7, + 0xF6, 0x53, 0xCC, 0x8C, 0xF6, 0x73, 0xCC, 0x8C, + 0xF6, 0x54, 0xCC, 0xA7, 0xF6, 0x74, 0xCC, 0xA7, + 0xF6, 0x54, 0xCC, 0x8C, 0xF6, 0x74, 0xCC, 0x8C, + 0xF6, 0x55, 0xCC, 0x83, 0xF6, 0x75, 0xCC, 0x83, + 0xF6, 0x55, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x84, + 0xF6, 0x55, 0xCC, 0x86, 0xF6, 0x75, 0xCC, 0x86, + 0xF6, 0x55, 0xCC, 0x8A, 0xF6, 0x75, 0xCC, 0x8A, + 0xF6, 0x55, 0xCC, 0x8B, 0xF6, 0x75, 0xCC, 0x8B, + 0xF6, 0x55, 0xCC, 0xA8, 0xF6, 0x75, 0xCC, 0xA8, + 0xF6, 0x57, 0xCC, 0x82, 0xF6, 0x77, 0xCC, 0x82, + 0xF6, 0x59, 0xCC, 0x82, 0xF6, 0x79, 0xCC, 0x82, + 0xF6, 0x59, 0xCC, 0x88, 0xF6, 0x5A, 0xCC, 0x81, + 0xF6, 0x7A, 0xCC, 0x81, 0xF6, 0x5A, 0xCC, 0x87, + 0xF6, 0x7A, 0xCC, 0x87, 0xF6, 0x5A, 0xCC, 0x8C, + 0xF6, 0x7A, 0xCC, 0x8C, 0x73, 0xF6, 0x4F, 0xCC, + 0x9B, 0xF6, 0x6F, 0xCC, 0x9B, 0xF6, 0x55, 0xCC, + 0x9B, 0xF6, 0x75, 0xCC, 0x9B, 0x44, 0x5A, 0xCC, + 0x8C, 0x44, 0x7A, 0xCC, 0x8C, 0x64, 0x7A, 0xCC, + 0x8C, 0x4C, 0x4A, 0x4C, 0x6A, 0x6C, 0x6A, 0x4E, + 0x4A, 0x4E, 0x6A, 0x6E, 0x6A, 0xF6, 0x41, 0xCC, + 0x8C, 0xF6, 0x61, 0xCC, 0x8C, 0xF6, 0x49, 0xCC, + 0x8C, 0xF6, 0x69, 0xCC, 0x8C, 0xF6, 0x4F, 0xCC, + 0x8C, 0xF6, 0x6F, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, + 0x8C, 0xF6, 0x75, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, + 0x88, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x88, 0xCC, + 0x84, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x81, 0xF6, + 0x75, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x55, 0xCC, + 0x88, 0xCC, 0x8C, 0xF6, 0x75, 0xCC, 0x88, 0xCC, + 0x8C, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x80, 0xF6, + 0x75, 0xCC, 0x88, 0xCC, 0x80, 0xF6, 0x41, 0xCC, + 0x88, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x88, 0xCC, + 0x84, 0xF6, 0x41, 0xCC, 0x87, 0xCC, 0x84, 0xF6, + 0x61, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0xC3, 0x86, + 0xCC, 0x84, 0xF6, 0xC3, 0xA6, 0xCC, 0x84, 0xF6, + 0x47, 0xCC, 0x8C, 0xF6, 0x67, 0xCC, 0x8C, 0xF6, + 0x4B, 0xCC, 0x8C, 0xF6, 0x6B, 0xCC, 0x8C, 0xF6, + 0x4F, 0xCC, 0xA8, 0xF6, 0x6F, 0xCC, 0xA8, 0xF6, + 0x4F, 0xCC, 0xA8, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, + 0xA8, 0xCC, 0x84, 0xF6, 0xC6, 0xB7, 0xCC, 0x8C, + 0xF6, 0xCA, 0x92, 0xCC, 0x8C, 0xF6, 0x6A, 0xCC, + 0x8C, 0x44, 0x5A, 0x44, 0x7A, 0x64, 0x7A, 0xF6, + 0x47, 0xCC, 0x81, 0xF6, 0x67, 0xCC, 0x81, 0xF6, + 0x4E, 0xCC, 0x80, 0xF6, 0x6E, 0xCC, 0x80, 0xF6, + 0x41, 0xCC, 0x8A, 0xCC, 0x81, 0xF6, 0x61, 0xCC, + 0x8A, 0xCC, 0x81, 0xF6, 0xC3, 0x86, 0xCC, 0x81, + 0xF6, 0xC3, 0xA6, 0xCC, 0x81, 0xF6, 0xC3, 0x98, + 0xCC, 0x81, 0xF6, 0xC3, 0xB8, 0xCC, 0x81, 0xF6, + 0x41, 0xCC, 0x8F, 0xF6, 0x61, 0xCC, 0x8F, 0xF6, + 0x41, 0xCC, 0x91, 0xF6, 0x61, 0xCC, 0x91, 0xF6, + 0x45, 0xCC, 0x8F, 0xF6, 0x65, 0xCC, 0x8F, 0xF6, + 0x45, 0xCC, 0x91, 0xF6, 0x65, 0xCC, 0x91, 0xF6, + 0x49, 0xCC, 0x8F, 0xF6, 0x69, 0xCC, 0x8F, 0xF6, + 0x49, 0xCC, 0x91, 0xF6, 0x69, 0xCC, 0x91, 0xF6, + 0x4F, 0xCC, 0x8F, 0xF6, 0x6F, 0xCC, 0x8F, 0xF6, + 0x4F, 0xCC, 0x91, 0xF6, 0x6F, 0xCC, 0x91, 0xF6, + 0x52, 0xCC, 0x8F, 0xF6, 0x72, 0xCC, 0x8F, 0xF6, + 0x52, 0xCC, 0x91, 0xF6, 0x72, 0xCC, 0x91, 0xF6, + 0x55, 0xCC, 0x8F, 0xF6, 0x75, 0xCC, 0x8F, 0xF6, + 0x55, 0xCC, 0x91, 0xF6, 0x75, 0xCC, 0x91, 0xF6, + 0x53, 0xCC, 0xA6, 0xF6, 0x73, 0xCC, 0xA6, 0xF6, + 0x54, 0xCC, 0xA6, 0xF6, 0x74, 0xCC, 0xA6, 0xF6, + 0x48, 0xCC, 0x8C, 0xF6, 0x68, 0xCC, 0x8C, 0xF6, + 0x41, 0xCC, 0x87, 0xF6, 0x61, 0xCC, 0x87, 0xF6, + 0x45, 0xCC, 0xA7, 0xF6, 0x65, 0xCC, 0xA7, 0xF6, + 0x4F, 0xCC, 0x88, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, + 0x88, 0xCC, 0x84, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, + 0x84, 0xF6, 0x6F, 0xCC, 0x83, 0xCC, 0x84, 0xF6, + 0x4F, 0xCC, 0x87, 0xF6, 0x6F, 0xCC, 0x87, 0xF6, + 0x4F, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, + 0x87, 0xCC, 0x84, 0xF6, 0x59, 0xCC, 0x84, 0xF6, + 0x79, 0xCC, 0x84, 0x68, 0xC9, 0xA6, 0x6A, 0x72, + 0xC9, 0xB9, 0xC9, 0xBB, 0xCA, 0x81, 0x77, 0x79, + 0x20, 0xCC, 0x86, 0x20, 0xCC, 0x87, 0x20, 0xCC, + 0x8A, 0x20, 0xCC, 0xA8, 0x20, 0xCC, 0x83, 0x20, + 0xCC, 0x8B, 0xC9, 0xA3, 0x6C, 0x73, 0x78, 0xCA, + 0x95, 0xF6, 0xCC, 0x80, 0xF6, 0xCC, 0x81, 0xF6, + 0xCC, 0x93, 0xF6, 0xCC, 0x88, 0xCC, 0x81, 0xF6, + 0xCA, 0xB9, 0x20, 0xCD, 0x85, 0xF6, 0x3B, 0x20, + 0xCC, 0x81, 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, + 0x20, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0xCE, 0x91, + 0xCC, 0x81, 0xF6, 0xC2, 0xB7, 0xF6, 0xCE, 0x95, + 0xCC, 0x81, 0xF6, 0xCE, 0x97, 0xCC, 0x81, 0xF6, + 0xCE, 0x99, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, + 0x81, 0xF6, 0xCE, 0xA5, 0xCC, 0x81, 0xF6, 0xCE, + 0xA9, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x88, + 0xCC, 0x81, 0xF6, 0xCE, 0x99, 0xCC, 0x88, 0xF6, + 0xCE, 0xA5, 0xCC, 0x88, 0xF6, 0xCE, 0xB1, 0xCC, + 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x81, 0xF6, 0xCE, + 0xB7, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, + 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, + 0xCE, 0xB9, 0xCC, 0x88, 0xF6, 0xCF, 0x85, 0xCC, + 0x88, 0xF6, 0xCE, 0xBF, 0xCC, 0x81, 0xF6, 0xCF, + 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, 0x81, + 0xCE, 0xB2, 0xCE, 0xB8, 0xCE, 0xA5, 0xF5, 0x05, + 0xCF, 0x92, 0xCC, 0x81, 0xCE, 0xA5, 0xCC, 0x81, + 0xF5, 0x05, 0xCF, 0x92, 0xCC, 0x88, 0xCE, 0xA5, + 0xCC, 0x88, 0xCF, 0x86, 0xCF, 0x80, 0xCE, 0xBA, + 0xCF, 0x81, 0xCF, 0x82, 0xCE, 0x98, 0xCE, 0xB5, + 0xCE, 0xA3, 0xF6, 0xD0, 0x95, 0xCC, 0x80, 0xF6, + 0xD0, 0x95, 0xCC, 0x88, 0xF6, 0xD0, 0x93, 0xCC, + 0x81, 0xF6, 0xD0, 0x86, 0xCC, 0x88, 0xF6, 0xD0, + 0x9A, 0xCC, 0x81, 0xF6, 0xD0, 0x98, 0xCC, 0x80, + 0xF6, 0xD0, 0xA3, 0xCC, 0x86, 0xF6, 0xD0, 0x98, + 0xCC, 0x86, 0xF6, 0xD0, 0xB8, 0xCC, 0x86, 0xF6, + 0xD0, 0xB5, 0xCC, 0x80, 0xF6, 0xD0, 0xB5, 0xCC, + 0x88, 0xF6, 0xD0, 0xB3, 0xCC, 0x81, 0xF6, 0xD1, + 0x96, 0xCC, 0x88, 0xF6, 0xD0, 0xBA, 0xCC, 0x81, + 0xF6, 0xD0, 0xB8, 0xCC, 0x80, 0xF6, 0xD1, 0x83, + 0xCC, 0x86, 0xF6, 0xD1, 0xB4, 0xCC, 0x8F, 0xF6, + 0xD1, 0xB5, 0xCC, 0x8F, 0xF6, 0xD0, 0x96, 0xCC, + 0x86, 0xF6, 0xD0, 0xB6, 0xCC, 0x86, 0xF6, 0xD0, + 0x90, 0xCC, 0x86, 0xF6, 0xD0, 0xB0, 0xCC, 0x86, + 0xF6, 0xD0, 0x90, 0xCC, 0x88, 0xF6, 0xD0, 0xB0, + 0xCC, 0x88, 0xF6, 0xD0, 0x95, 0xCC, 0x86, 0xF6, + 0xD0, 0xB5, 0xCC, 0x86, 0xF6, 0xD3, 0x98, 0xCC, + 0x88, 0xF6, 0xD3, 0x99, 0xCC, 0x88, 0xF6, 0xD0, + 0x96, 0xCC, 0x88, 0xF6, 0xD0, 0xB6, 0xCC, 0x88, + 0xF6, 0xD0, 0x97, 0xCC, 0x88, 0xF6, 0xD0, 0xB7, + 0xCC, 0x88, 0xF6, 0xD0, 0x98, 0xCC, 0x84, 0xF6, + 0xD0, 0xB8, 0xCC, 0x84, 0xF6, 0xD0, 0x98, 0xCC, + 0x88, 0xF6, 0xD0, 0xB8, 0xCC, 0x88, 0xF6, 0xD0, + 0x9E, 0xCC, 0x88, 0xF6, 0xD0, 0xBE, 0xCC, 0x88, + 0xF6, 0xD3, 0xA8, 0xCC, 0x88, 0xF6, 0xD3, 0xA9, + 0xCC, 0x88, 0xF6, 0xD0, 0xAD, 0xCC, 0x88, 0xF6, + 0xD1, 0x8D, 0xCC, 0x88, 0xF6, 0xD0, 0xA3, 0xCC, + 0x84, 0xF6, 0xD1, 0x83, 0xCC, 0x84, 0xF6, 0xD0, + 0xA3, 0xCC, 0x88, 0xF6, 0xD1, 0x83, 0xCC, 0x88, + 0xF6, 0xD0, 0xA3, 0xCC, 0x8B, 0xF6, 0xD1, 0x83, + 0xCC, 0x8B, 0xF6, 0xD0, 0xA7, 0xCC, 0x88, 0xF6, + 0xD1, 0x87, 0xCC, 0x88, 0xF6, 0xD0, 0xAB, 0xCC, + 0x88, 0xF6, 0xD1, 0x8B, 0xCC, 0x88, 0xD5, 0xA5, + 0xD6, 0x82, 0xF6, 0xD8, 0xA7, 0xD9, 0x93, 0xF6, + 0xD8, 0xA7, 0xD9, 0x94, 0xF6, 0xD9, 0x88, 0xD9, + 0x94, 0xF6, 0xD8, 0xA7, 0xD9, 0x95, 0xF6, 0xD9, + 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0xB4, 0xD9, + 0x88, 0xD9, 0xB4, 0xDB, 0x87, 0xD9, 0xB4, 0xD9, + 0x8A, 0xD9, 0xB4, 0xF6, 0xDB, 0x95, 0xD9, 0x94, + 0xF6, 0xDB, 0x81, 0xD9, 0x94, 0xF6, 0xDB, 0x92, + 0xD9, 0x94, 0xF6, 0xE0, 0xA4, 0xA8, 0xE0, 0xA4, + 0xBC, 0xF6, 0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBC, + 0xF6, 0xE0, 0xA4, 0xB3, 0xE0, 0xA4, 0xBC, 0xF6, + 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, + 0xA4, 0x96, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, + 0x97, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x9C, + 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0xA1, 0xE0, + 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0xA2, 0xE0, 0xA4, + 0xBC, 0xF6, 0xE0, 0xA4, 0xAB, 0xE0, 0xA4, 0xBC, + 0xF6, 0xE0, 0xA4, 0xAF, 0xE0, 0xA4, 0xBC, 0xF6, + 0xE0, 0xA7, 0x87, 0xE0, 0xA6, 0xBE, 0xF6, 0xE0, + 0xA7, 0x87, 0xE0, 0xA7, 0x97, 0xF6, 0xE0, 0xA6, + 0xA1, 0xE0, 0xA6, 0xBC, 0xF6, 0xE0, 0xA6, 0xA2, + 0xE0, 0xA6, 0xBC, 0xF6, 0xE0, 0xA6, 0xAF, 0xE0, + 0xA6, 0xBC, 0xF6, 0xE0, 0xA8, 0xB2, 0xE0, 0xA8, + 0xBC, 0xF6, 0xE0, 0xA8, 0xB8, 0xE0, 0xA8, 0xBC, + 0xF6, 0xE0, 0xA8, 0x96, 0xE0, 0xA8, 0xBC, 0xF6, + 0xE0, 0xA8, 0x97, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, + 0xA8, 0x9C, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, + 0xAB, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xAD, 0x87, + 0xE0, 0xAD, 0x96, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, + 0xAC, 0xBE, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, + 0x97, 0xF6, 0xE0, 0xAC, 0xA1, 0xE0, 0xAC, 0xBC, + 0xF6, 0xE0, 0xAC, 0xA2, 0xE0, 0xAC, 0xBC, 0xF6, + 0xE0, 0xAE, 0x92, 0xE0, 0xAF, 0x97, 0xF6, 0xE0, + 0xAF, 0x86, 0xE0, 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, + 0x87, 0xE0, 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, 0x86, + 0xE0, 0xAF, 0x97, 0xF6, 0xE0, 0xB1, 0x86, 0xE0, + 0xB1, 0x96, 0xF6, 0xE0, 0xB2, 0xBF, 0xE0, 0xB3, + 0x95, 0xF6, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x95, + 0xF6, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x96, 0xF6, + 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x82, 0xF6, 0xE0, + 0xB3, 0x86, 0xE0, 0xB3, 0x82, 0xE0, 0xB3, 0x95, + 0xF6, 0xE0, 0xB5, 0x86, 0xE0, 0xB4, 0xBE, 0xF6, + 0xE0, 0xB5, 0x87, 0xE0, 0xB4, 0xBE, 0xF6, 0xE0, + 0xB5, 0x86, 0xE0, 0xB5, 0x97, 0xF6, 0xE0, 0xB7, + 0x99, 0xE0, 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, 0x99, + 0xE0, 0xB7, 0x8F, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, + 0xB7, 0x8F, 0xE0, 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, + 0x99, 0xE0, 0xB7, 0x9F, 0xE0, 0xB9, 0x8D, 0xE0, + 0xB8, 0xB2, 0xE0, 0xBB, 0x8D, 0xE0, 0xBA, 0xB2, + 0xE0, 0xBA, 0xAB, 0xE0, 0xBA, 0x99, 0xE0, 0xBA, + 0xAB, 0xE0, 0xBA, 0xA1, 0xE0, 0xBC, 0x8B, 0xF6, + 0xE0, 0xBD, 0x82, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, + 0xBD, 0x8C, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, + 0x91, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x96, + 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x9B, 0xE0, + 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x80, 0xE0, 0xBE, + 0xB5, 0xF6, 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB2, + 0xF6, 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB4, 0xF6, + 0xE0, 0xBE, 0xB2, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, + 0xB2, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, + 0xE0, 0xBE, 0xB3, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, + 0xB3, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, + 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, + 0xBE, 0x92, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, + 0x9C, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xA1, + 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xA6, 0xE0, + 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xAB, 0xE0, 0xBE, + 0xB7, 0xF6, 0xE0, 0xBE, 0x90, 0xE0, 0xBE, 0xB5, + 0xF6, 0xE1, 0x80, 0xA5, 0xE1, 0x80, 0xAE, 0xE1, + 0x83, 0x9C, 0xF6, 0xE1, 0xAC, 0x85, 0xE1, 0xAC, + 0xB5, 0xF6, 0xE1, 0xAC, 0x87, 0xE1, 0xAC, 0xB5, + 0xF6, 0xE1, 0xAC, 0x89, 0xE1, 0xAC, 0xB5, 0xF6, + 0xE1, 0xAC, 0x8B, 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, + 0xAC, 0x8D, 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, + 0x91, 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, 0xBA, + 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, 0xBC, 0xE1, + 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, 0xBE, 0xE1, 0xAC, + 0xB5, 0xF6, 0xE1, 0xAC, 0xBF, 0xE1, 0xAC, 0xB5, + 0xF6, 0xE1, 0xAD, 0x82, 0xE1, 0xAC, 0xB5, 0x41, + 0xC3, 0x86, 0x42, 0x44, 0x45, 0xC6, 0x8E, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0xC8, 0xA2, 0x50, 0x52, 0x54, 0x55, 0x57, 0x61, + 0xC9, 0x90, 0xC9, 0x91, 0xE1, 0xB4, 0x82, 0x62, + 0x64, 0x65, 0xC9, 0x99, 0xC9, 0x9B, 0xC9, 0x9C, + 0x67, 0x6B, 0x6D, 0xC5, 0x8B, 0x6F, 0xC9, 0x94, + 0xE1, 0xB4, 0x96, 0xE1, 0xB4, 0x97, 0x70, 0x74, + 0x75, 0xE1, 0xB4, 0x9D, 0xC9, 0xAF, 0x76, 0xE1, + 0xB4, 0xA5, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, + 0xCF, 0x86, 0xCF, 0x87, 0x69, 0x72, 0x75, 0x76, + 0xCE, 0xB2, 0xCE, 0xB3, 0xCF, 0x81, 0xCF, 0x86, + 0xCF, 0x87, 0xD0, 0xBD, 0xC9, 0x92, 0x63, 0xC9, + 0x95, 0xC3, 0xB0, 0xC9, 0x9C, 0x66, 0xC9, 0x9F, + 0xC9, 0xA1, 0xC9, 0xA5, 0xC9, 0xA8, 0xC9, 0xA9, + 0xC9, 0xAA, 0xE1, 0xB5, 0xBB, 0xCA, 0x9D, 0xC9, + 0xAD, 0xE1, 0xB6, 0x85, 0xCA, 0x9F, 0xC9, 0xB1, + 0xC9, 0xB0, 0xC9, 0xB2, 0xC9, 0xB3, 0xC9, 0xB4, + 0xC9, 0xB5, 0xC9, 0xB8, 0xCA, 0x82, 0xCA, 0x83, + 0xC6, 0xAB, 0xCA, 0x89, 0xCA, 0x8A, 0xE1, 0xB4, + 0x9C, 0xCA, 0x8B, 0xCA, 0x8C, 0x7A, 0xCA, 0x90, + 0xCA, 0x91, 0xCA, 0x92, 0xCE, 0xB8, 0xF6, 0x41, + 0xCC, 0xA5, 0xF6, 0x61, 0xCC, 0xA5, 0xF6, 0x42, + 0xCC, 0x87, 0xF6, 0x62, 0xCC, 0x87, 0xF6, 0x42, + 0xCC, 0xA3, 0xF6, 0x62, 0xCC, 0xA3, 0xF6, 0x42, + 0xCC, 0xB1, 0xF6, 0x62, 0xCC, 0xB1, 0xF6, 0x43, + 0xCC, 0xA7, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0xA7, + 0xCC, 0x81, 0xF6, 0x44, 0xCC, 0x87, 0xF6, 0x64, + 0xCC, 0x87, 0xF6, 0x44, 0xCC, 0xA3, 0xF6, 0x64, + 0xCC, 0xA3, 0xF6, 0x44, 0xCC, 0xB1, 0xF6, 0x64, + 0xCC, 0xB1, 0xF6, 0x44, 0xCC, 0xA7, 0xF6, 0x64, + 0xCC, 0xA7, 0xF6, 0x44, 0xCC, 0xAD, 0xF6, 0x64, + 0xCC, 0xAD, 0xF6, 0x45, 0xCC, 0x84, 0xCC, 0x80, + 0xF6, 0x65, 0xCC, 0x84, 0xCC, 0x80, 0xF6, 0x45, + 0xCC, 0x84, 0xCC, 0x81, 0xF6, 0x65, 0xCC, 0x84, + 0xCC, 0x81, 0xF6, 0x45, 0xCC, 0xAD, 0xF6, 0x65, + 0xCC, 0xAD, 0xF6, 0x45, 0xCC, 0xB0, 0xF6, 0x65, + 0xCC, 0xB0, 0xF6, 0x45, 0xCC, 0xA7, 0xCC, 0x86, + 0xF6, 0x65, 0xCC, 0xA7, 0xCC, 0x86, 0xF6, 0x46, + 0xCC, 0x87, 0xF6, 0x66, 0xCC, 0x87, 0xF6, 0x47, + 0xCC, 0x84, 0xF6, 0x67, 0xCC, 0x84, 0xF6, 0x48, + 0xCC, 0x87, 0xF6, 0x68, 0xCC, 0x87, 0xF6, 0x48, + 0xCC, 0xA3, 0xF6, 0x68, 0xCC, 0xA3, 0xF6, 0x48, + 0xCC, 0x88, 0xF6, 0x68, 0xCC, 0x88, 0xF6, 0x48, + 0xCC, 0xA7, 0xF6, 0x68, 0xCC, 0xA7, 0xF6, 0x48, + 0xCC, 0xAE, 0xF6, 0x68, 0xCC, 0xAE, 0xF6, 0x49, + 0xCC, 0xB0, 0xF6, 0x69, 0xCC, 0xB0, 0xF6, 0x49, + 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x69, 0xCC, 0x88, + 0xCC, 0x81, 0xF6, 0x4B, 0xCC, 0x81, 0xF6, 0x6B, + 0xCC, 0x81, 0xF6, 0x4B, 0xCC, 0xA3, 0xF6, 0x6B, + 0xCC, 0xA3, 0xF6, 0x4B, 0xCC, 0xB1, 0xF6, 0x6B, + 0xCC, 0xB1, 0xF6, 0x4C, 0xCC, 0xA3, 0xF6, 0x6C, + 0xCC, 0xA3, 0xF6, 0x4C, 0xCC, 0xA3, 0xCC, 0x84, + 0xF6, 0x6C, 0xCC, 0xA3, 0xCC, 0x84, 0xF6, 0x4C, + 0xCC, 0xB1, 0xF6, 0x6C, 0xCC, 0xB1, 0xF6, 0x4C, + 0xCC, 0xAD, 0xF6, 0x6C, 0xCC, 0xAD, 0xF6, 0x4D, + 0xCC, 0x81, 0xF6, 0x6D, 0xCC, 0x81, 0xF6, 0x4D, + 0xCC, 0x87, 0xF6, 0x6D, 0xCC, 0x87, 0xF6, 0x4D, + 0xCC, 0xA3, 0xF6, 0x6D, 0xCC, 0xA3, 0xF6, 0x4E, + 0xCC, 0x87, 0xF6, 0x6E, 0xCC, 0x87, 0xF6, 0x4E, + 0xCC, 0xA3, 0xF6, 0x6E, 0xCC, 0xA3, 0xF6, 0x4E, + 0xCC, 0xB1, 0xF6, 0x6E, 0xCC, 0xB1, 0xF6, 0x4E, + 0xCC, 0xAD, 0xF6, 0x6E, 0xCC, 0xAD, 0xF6, 0x4F, + 0xCC, 0x83, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x83, + 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, 0x88, + 0xF6, 0x6F, 0xCC, 0x83, 0xCC, 0x88, 0xF6, 0x4F, + 0xCC, 0x84, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x84, + 0xCC, 0x80, 0xF6, 0x4F, 0xCC, 0x84, 0xCC, 0x81, + 0xF6, 0x6F, 0xCC, 0x84, 0xCC, 0x81, 0xF6, 0x50, + 0xCC, 0x81, 0xF6, 0x70, 0xCC, 0x81, 0xF6, 0x50, + 0xCC, 0x87, 0xF6, 0x70, 0xCC, 0x87, 0xF6, 0x52, + 0xCC, 0x87, 0xF6, 0x72, 0xCC, 0x87, 0xF6, 0x52, + 0xCC, 0xA3, 0xF6, 0x72, 0xCC, 0xA3, 0xF6, 0x52, + 0xCC, 0xA3, 0xCC, 0x84, 0xF6, 0x72, 0xCC, 0xA3, + 0xCC, 0x84, 0xF6, 0x52, 0xCC, 0xB1, 0xF6, 0x72, + 0xCC, 0xB1, 0xF6, 0x53, 0xCC, 0x87, 0xF6, 0x73, + 0xCC, 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xF6, 0x73, + 0xCC, 0xA3, 0xF6, 0x53, 0xCC, 0x81, 0xCC, 0x87, + 0xF6, 0x73, 0xCC, 0x81, 0xCC, 0x87, 0xF6, 0x53, + 0xCC, 0x8C, 0xCC, 0x87, 0xF6, 0x73, 0xCC, 0x8C, + 0xCC, 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xCC, 0x87, + 0xF6, 0x73, 0xCC, 0xA3, 0xCC, 0x87, 0xF6, 0x54, + 0xCC, 0x87, 0xF6, 0x74, 0xCC, 0x87, 0xF6, 0x54, + 0xCC, 0xA3, 0xF6, 0x74, 0xCC, 0xA3, 0xF6, 0x54, + 0xCC, 0xB1, 0xF6, 0x74, 0xCC, 0xB1, 0xF6, 0x54, + 0xCC, 0xAD, 0xF6, 0x74, 0xCC, 0xAD, 0xF6, 0x55, + 0xCC, 0xA4, 0xF6, 0x75, 0xCC, 0xA4, 0xF6, 0x55, + 0xCC, 0xB0, 0xF6, 0x75, 0xCC, 0xB0, 0xF6, 0x55, + 0xCC, 0xAD, 0xF6, 0x75, 0xCC, 0xAD, 0xF6, 0x55, + 0xCC, 0x83, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x83, + 0xCC, 0x81, 0xF6, 0x55, 0xCC, 0x84, 0xCC, 0x88, + 0xF6, 0x75, 0xCC, 0x84, 0xCC, 0x88, 0xF6, 0x56, + 0xCC, 0x83, 0xF6, 0x76, 0xCC, 0x83, 0xF6, 0x56, + 0xCC, 0xA3, 0xF6, 0x76, 0xCC, 0xA3, 0xF6, 0x57, + 0xCC, 0x80, 0xF6, 0x77, 0xCC, 0x80, 0xF6, 0x57, + 0xCC, 0x81, 0xF6, 0x77, 0xCC, 0x81, 0xF6, 0x57, + 0xCC, 0x88, 0xF6, 0x77, 0xCC, 0x88, 0xF6, 0x57, + 0xCC, 0x87, 0xF6, 0x77, 0xCC, 0x87, 0xF6, 0x57, + 0xCC, 0xA3, 0xF6, 0x77, 0xCC, 0xA3, 0xF6, 0x58, + 0xCC, 0x87, 0xF6, 0x78, 0xCC, 0x87, 0xF6, 0x58, + 0xCC, 0x88, 0xF6, 0x78, 0xCC, 0x88, 0xF6, 0x59, + 0xCC, 0x87, 0xF6, 0x79, 0xCC, 0x87, 0xF6, 0x5A, + 0xCC, 0x82, 0xF6, 0x7A, 0xCC, 0x82, 0xF6, 0x5A, + 0xCC, 0xA3, 0xF6, 0x7A, 0xCC, 0xA3, 0xF6, 0x5A, + 0xCC, 0xB1, 0xF6, 0x7A, 0xCC, 0xB1, 0xF6, 0x68, + 0xCC, 0xB1, 0xF6, 0x74, 0xCC, 0x88, 0xF6, 0x77, + 0xCC, 0x8A, 0xF6, 0x79, 0xCC, 0x8A, 0x61, 0xCA, + 0xBE, 0xF5, 0x05, 0xC5, 0xBF, 0xCC, 0x87, 0x73, + 0xCC, 0x87, 0xF6, 0x41, 0xCC, 0xA3, 0xF6, 0x61, + 0xCC, 0xA3, 0xF6, 0x41, 0xCC, 0x89, 0xF6, 0x61, + 0xCC, 0x89, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x81, + 0xF6, 0x61, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x41, + 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x61, 0xCC, 0x82, + 0xCC, 0x80, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x89, + 0xF6, 0x61, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x41, + 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x82, + 0xCC, 0x83, 0xF6, 0x41, 0xCC, 0xA3, 0xCC, 0x82, + 0xF6, 0x61, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x41, + 0xCC, 0x86, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x86, + 0xCC, 0x81, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x80, + 0xF6, 0x61, 0xCC, 0x86, 0xCC, 0x80, 0xF6, 0x41, + 0xCC, 0x86, 0xCC, 0x89, 0xF6, 0x61, 0xCC, 0x86, + 0xCC, 0x89, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x83, + 0xF6, 0x61, 0xCC, 0x86, 0xCC, 0x83, 0xF6, 0x41, + 0xCC, 0xA3, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0xA3, + 0xCC, 0x86, 0xF6, 0x45, 0xCC, 0xA3, 0xF6, 0x65, + 0xCC, 0xA3, 0xF6, 0x45, 0xCC, 0x89, 0xF6, 0x65, + 0xCC, 0x89, 0xF6, 0x45, 0xCC, 0x83, 0xF6, 0x65, + 0xCC, 0x83, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x81, + 0xF6, 0x65, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x45, + 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x82, + 0xCC, 0x80, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x89, + 0xF6, 0x65, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x45, + 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x65, 0xCC, 0x82, + 0xCC, 0x83, 0xF6, 0x45, 0xCC, 0xA3, 0xCC, 0x82, + 0xF6, 0x65, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x49, + 0xCC, 0x89, 0xF6, 0x69, 0xCC, 0x89, 0xF6, 0x49, + 0xCC, 0xA3, 0xF6, 0x69, 0xCC, 0xA3, 0xF6, 0x4F, + 0xCC, 0xA3, 0xF6, 0x6F, 0xCC, 0xA3, 0xF6, 0x4F, + 0xCC, 0x89, 0xF6, 0x6F, 0xCC, 0x89, 0xF6, 0x4F, + 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, + 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x80, + 0xF6, 0x6F, 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x4F, + 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x6F, 0xCC, 0x82, + 0xCC, 0x89, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x83, + 0xF6, 0x6F, 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x4F, + 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x6F, 0xCC, 0xA3, + 0xCC, 0x82, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x81, + 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, 0x81, 0xF6, 0x4F, + 0xCC, 0x9B, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x9B, + 0xCC, 0x80, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x89, + 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, 0x89, 0xF6, 0x4F, + 0xCC, 0x9B, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x9B, + 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0xA3, + 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, 0x55, + 0xCC, 0xA3, 0xF6, 0x75, 0xCC, 0xA3, 0xF6, 0x55, + 0xCC, 0x89, 0xF6, 0x75, 0xCC, 0x89, 0xF6, 0x55, + 0xCC, 0x9B, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x9B, + 0xCC, 0x81, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x80, + 0xF6, 0x75, 0xCC, 0x9B, 0xCC, 0x80, 0xF6, 0x55, + 0xCC, 0x9B, 0xCC, 0x89, 0xF6, 0x75, 0xCC, 0x9B, + 0xCC, 0x89, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x83, + 0xF6, 0x75, 0xCC, 0x9B, 0xCC, 0x83, 0xF6, 0x55, + 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, 0x75, 0xCC, 0x9B, + 0xCC, 0xA3, 0xF6, 0x59, 0xCC, 0x80, 0xF6, 0x79, + 0xCC, 0x80, 0xF6, 0x59, 0xCC, 0xA3, 0xF6, 0x79, + 0xCC, 0xA3, 0xF6, 0x59, 0xCC, 0x89, 0xF6, 0x79, + 0xCC, 0x89, 0xF6, 0x59, 0xCC, 0x83, 0xF6, 0x79, + 0xCC, 0x83, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xF6, + 0xCE, 0xB1, 0xCC, 0x94, 0xF6, 0xCE, 0xB1, 0xCC, + 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, + 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCC, + 0x81, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, + 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xF6, + 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, + 0x91, 0xCC, 0x93, 0xF6, 0xCE, 0x91, 0xCC, 0x94, + 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xF6, + 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, + 0x91, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0x91, + 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCC, + 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0x91, 0xCC, 0x94, + 0xCD, 0x82, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xF6, + 0xCE, 0xB5, 0xCC, 0x94, 0xF6, 0xCE, 0xB5, 0xCC, + 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x94, + 0xCC, 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xCC, + 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x81, + 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xF6, 0xCE, 0x95, + 0xCC, 0x94, 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xCC, + 0x80, 0xF6, 0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x80, + 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x81, 0xF6, + 0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, + 0xB7, 0xCC, 0x93, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, + 0xF6, 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, 0xF6, + 0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, + 0xB7, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, + 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, + 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, + 0xCD, 0x82, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xF6, + 0xCE, 0x97, 0xCC, 0x94, 0xF6, 0xCE, 0x97, 0xCC, + 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x94, + 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, + 0x81, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x81, + 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, 0xF6, + 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, + 0xB9, 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, + 0xF6, 0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x80, 0xF6, + 0xCE, 0xB9, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, + 0xB9, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, + 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, + 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, + 0xCD, 0x82, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xF6, + 0xCE, 0x99, 0xCC, 0x94, 0xF6, 0xCE, 0x99, 0xCC, + 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x94, + 0xCC, 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xCC, + 0x81, 0xF6, 0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x81, + 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xCD, 0x82, 0xF6, + 0xCE, 0x99, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, + 0xBF, 0xCC, 0x93, 0xF6, 0xCE, 0xBF, 0xCC, 0x94, + 0xF6, 0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x80, 0xF6, + 0xCE, 0xBF, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, + 0xBF, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xBF, + 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, + 0x93, 0xF6, 0xCE, 0x9F, 0xCC, 0x94, 0xF6, 0xCE, + 0x9F, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, + 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, + 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, 0x94, + 0xCC, 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xF6, + 0xCF, 0x85, 0xCC, 0x94, 0xF6, 0xCF, 0x85, 0xCC, + 0x93, 0xCC, 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x94, + 0xCC, 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xCC, + 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x81, + 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xCD, 0x82, 0xF6, + 0xCF, 0x85, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, + 0xA5, 0xCC, 0x94, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, + 0xCC, 0x80, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCC, + 0x81, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCD, 0x82, + 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xF6, 0xCF, 0x89, + 0xCC, 0x94, 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCC, + 0x80, 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80, + 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x81, 0xF6, + 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCF, + 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCF, 0x89, + 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xA9, 0xCC, + 0x93, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xF6, 0xCE, + 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, + 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, + 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, + 0xCC, 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, + 0x82, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82, + 0xF6, 0xCE, 0xB1, 0xCC, 0x80, 0xF6, 0xCE, 0xB1, + 0xCC, 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x80, 0xF6, + 0xCE, 0xB5, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, + 0x80, 0xF6, 0xCE, 0xB7, 0xCC, 0x81, 0xF6, 0xCE, + 0xB9, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, + 0xF6, 0xCE, 0xBF, 0xCC, 0x80, 0xF6, 0xCE, 0xBF, + 0xCC, 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x80, 0xF6, + 0xCF, 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, + 0x80, 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xF6, 0xCE, + 0xB1, 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, + 0xCC, 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, + 0x93, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, + 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, + 0xB1, 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, + 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, + 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xCD, + 0x85, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, + 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCD, + 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x85, + 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xCD, + 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, + 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, + 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, + 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, + 0x93, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x91, + 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, + 0xB7, 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, + 0xCC, 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, + 0x93, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, + 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, + 0xB7, 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, + 0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, + 0xF6, 0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x82, 0xCD, + 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82, + 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCD, + 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x85, + 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x80, 0xCD, + 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80, + 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, + 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, + 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, + 0x93, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x97, + 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCF, + 0x89, 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCF, 0x89, + 0xCC, 0x94, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, + 0x93, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, + 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, + 0x89, 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, + 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, + 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xCD, + 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x82, + 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, + 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x85, + 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xCD, + 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x80, + 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, + 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, + 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, + 0x93, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, + 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, + 0xB1, 0xCC, 0x86, 0xF6, 0xCE, 0xB1, 0xCC, 0x84, + 0xF6, 0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x85, 0xF6, + 0xCE, 0xB1, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, + 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCD, 0x82, + 0xF6, 0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x85, 0xF6, + 0xCE, 0x91, 0xCC, 0x86, 0xF6, 0xCE, 0x91, 0xCC, + 0x84, 0xF6, 0xCE, 0x91, 0xCC, 0x80, 0xF6, 0xCE, + 0x91, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCD, 0x85, + 0x20, 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0x20, 0xCC, + 0x93, 0x20, 0xCD, 0x82, 0xF5, 0x05, 0xC2, 0xA8, + 0xCD, 0x82, 0x20, 0xCC, 0x88, 0xCD, 0x82, 0xF6, + 0xCE, 0xB7, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, + 0xB7, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x81, + 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCD, 0x82, 0xF6, + 0xCE, 0xB7, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, + 0x95, 0xCC, 0x80, 0xF6, 0xCE, 0x95, 0xCC, 0x81, + 0xF6, 0xCE, 0x97, 0xCC, 0x80, 0xF6, 0xCE, 0x97, + 0xCC, 0x81, 0xF6, 0xCE, 0x97, 0xCD, 0x85, 0xF5, + 0x06, 0xE1, 0xBE, 0xBF, 0xCC, 0x80, 0x20, 0xCC, + 0x93, 0xCC, 0x80, 0xF5, 0x06, 0xE1, 0xBE, 0xBF, + 0xCC, 0x81, 0x20, 0xCC, 0x93, 0xCC, 0x81, 0xF5, + 0x06, 0xE1, 0xBE, 0xBF, 0xCD, 0x82, 0x20, 0xCC, + 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x86, + 0xF6, 0xCE, 0xB9, 0xCC, 0x84, 0xF6, 0xCE, 0xB9, + 0xCC, 0x88, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, + 0x88, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCD, 0x82, + 0xF6, 0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x82, 0xF6, + 0xCE, 0x99, 0xCC, 0x86, 0xF6, 0xCE, 0x99, 0xCC, + 0x84, 0xF6, 0xCE, 0x99, 0xCC, 0x80, 0xF6, 0xCE, + 0x99, 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, + 0xCC, 0x80, 0x20, 0xCC, 0x94, 0xCC, 0x80, 0xF5, + 0x06, 0xE1, 0xBF, 0xBE, 0xCC, 0x81, 0x20, 0xCC, + 0x94, 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, + 0xCD, 0x82, 0x20, 0xCC, 0x94, 0xCD, 0x82, 0xF6, + 0xCF, 0x85, 0xCC, 0x86, 0xF6, 0xCF, 0x85, 0xCC, + 0x84, 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x80, + 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, + 0xCF, 0x81, 0xCC, 0x93, 0xF6, 0xCF, 0x81, 0xCC, + 0x94, 0xF6, 0xCF, 0x85, 0xCD, 0x82, 0xF6, 0xCF, + 0x85, 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, 0xA5, + 0xCC, 0x86, 0xF6, 0xCE, 0xA5, 0xCC, 0x84, 0xF6, + 0xCE, 0xA5, 0xCC, 0x80, 0xF6, 0xCE, 0xA5, 0xCC, + 0x81, 0xF6, 0xCE, 0xA1, 0xCC, 0x94, 0xF5, 0x05, + 0xC2, 0xA8, 0xCC, 0x80, 0x20, 0xCC, 0x88, 0xCC, + 0x80, 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, 0x20, + 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x60, 0xF6, 0xCF, + 0x89, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, + 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xCD, + 0x85, 0xF6, 0xCF, 0x89, 0xCD, 0x82, 0xF6, 0xCF, + 0x89, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x9F, + 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, 0x81, 0xF6, + 0xCE, 0xA9, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, + 0x81, 0xF6, 0xCE, 0xA9, 0xCD, 0x85, 0xF5, 0x03, + 0xC2, 0xB4, 0x20, 0xCC, 0x81, 0x20, 0xCC, 0x94, + 0xF5, 0x04, 0xE2, 0x80, 0x82, 0x20, 0xF5, 0x04, + 0xE2, 0x80, 0x83, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0xE2, 0x80, 0x90, + 0x20, 0xCC, 0xB3, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, + 0x2E, 0x20, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, + 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, + 0xB2, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, + 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, + 0x21, 0x21, 0x20, 0xCC, 0x85, 0x3F, 0x3F, 0x3F, + 0x21, 0x21, 0x3F, 0xE2, 0x80, 0xB2, 0xE2, 0x80, + 0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0x20, + 0x30, 0x69, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, + 0x2B, 0xE2, 0x88, 0x92, 0x3D, 0x28, 0x29, 0x6E, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x2B, 0xE2, 0x88, 0x92, 0x3D, 0x28, + 0x29, 0x61, 0x65, 0x6F, 0x78, 0xC9, 0x99, 0x52, + 0x73, 0x61, 0x2F, 0x63, 0x61, 0x2F, 0x73, 0x43, + 0xC2, 0xB0, 0x43, 0x63, 0x2F, 0x6F, 0x63, 0x2F, + 0x75, 0xC6, 0x90, 0xC2, 0xB0, 0x46, 0x67, 0x48, + 0x48, 0x48, 0x68, 0xC4, 0xA7, 0x49, 0x49, 0x4C, + 0x6C, 0x4E, 0x4E, 0x6F, 0x50, 0x51, 0x52, 0x52, + 0x52, 0x53, 0x4D, 0x54, 0x45, 0x4C, 0x54, 0x4D, + 0x5A, 0xF6, 0xCE, 0xA9, 0x5A, 0xF6, 0x4B, 0xF6, + 0x41, 0xCC, 0x8A, 0x42, 0x43, 0x65, 0x45, 0x46, + 0x4D, 0x6F, 0xD7, 0x90, 0xD7, 0x91, 0xD7, 0x92, + 0xD7, 0x93, 0x69, 0x46, 0x41, 0x58, 0xCF, 0x80, + 0xCE, 0xB3, 0xCE, 0x93, 0xCE, 0xA0, 0xE2, 0x88, + 0x91, 0x44, 0x64, 0x65, 0x69, 0x6A, 0x31, 0xE2, + 0x81, 0x84, 0x33, 0x32, 0xE2, 0x81, 0x84, 0x33, + 0x31, 0xE2, 0x81, 0x84, 0x35, 0x32, 0xE2, 0x81, + 0x84, 0x35, 0x33, 0xE2, 0x81, 0x84, 0x35, 0x34, + 0xE2, 0x81, 0x84, 0x35, 0x31, 0xE2, 0x81, 0x84, + 0x36, 0x35, 0xE2, 0x81, 0x84, 0x36, 0x31, 0xE2, + 0x81, 0x84, 0x38, 0x33, 0xE2, 0x81, 0x84, 0x38, + 0x35, 0xE2, 0x81, 0x84, 0x38, 0x37, 0xE2, 0x81, + 0x84, 0x38, 0x31, 0xE2, 0x81, 0x84, 0x49, 0x49, + 0x49, 0x49, 0x49, 0x49, 0x49, 0x56, 0x56, 0x56, + 0x49, 0x56, 0x49, 0x49, 0x56, 0x49, 0x49, 0x49, + 0x49, 0x58, 0x58, 0x58, 0x49, 0x58, 0x49, 0x49, + 0x4C, 0x43, 0x44, 0x4D, 0x69, 0x69, 0x69, 0x69, + 0x69, 0x69, 0x69, 0x76, 0x76, 0x76, 0x69, 0x76, + 0x69, 0x69, 0x76, 0x69, 0x69, 0x69, 0x69, 0x78, + 0x78, 0x78, 0x69, 0x78, 0x69, 0x69, 0x6C, 0x63, + 0x64, 0x6D, 0xF6, 0xE2, 0x86, 0x90, 0xCC, 0xB8, + 0xF6, 0xE2, 0x86, 0x92, 0xCC, 0xB8, 0xF6, 0xE2, + 0x86, 0x94, 0xCC, 0xB8, 0xF6, 0xE2, 0x87, 0x90, + 0xCC, 0xB8, 0xF6, 0xE2, 0x87, 0x94, 0xCC, 0xB8, + 0xF6, 0xE2, 0x87, 0x92, 0xCC, 0xB8, 0xF6, 0xE2, + 0x88, 0x83, 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0x88, + 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0x8B, 0xCC, 0xB8, + 0xF6, 0xE2, 0x88, 0xA3, 0xCC, 0xB8, 0xF6, 0xE2, + 0x88, 0xA5, 0xCC, 0xB8, 0xE2, 0x88, 0xAB, 0xE2, + 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, + 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAE, 0xE2, 0x88, + 0xAE, 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, 0xE2, + 0x88, 0xAE, 0xF6, 0xE2, 0x88, 0xBC, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0x83, 0xCC, 0xB8, 0xF6, 0xE2, + 0x89, 0x85, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x88, + 0xCC, 0xB8, 0xF6, 0x3D, 0xCC, 0xB8, 0xF6, 0xE2, + 0x89, 0xA1, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x8D, + 0xCC, 0xB8, 0xF6, 0x3C, 0xCC, 0xB8, 0xF6, 0x3E, + 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xA4, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0xA5, 0xCC, 0xB8, 0xF6, 0xE2, + 0x89, 0xB2, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB3, + 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB6, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0xB7, 0xCC, 0xB8, 0xF6, 0xE2, + 0x89, 0xBA, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBB, + 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x82, 0xCC, 0xB8, + 0xF6, 0xE2, 0x8A, 0x83, 0xCC, 0xB8, 0xF6, 0xE2, + 0x8A, 0x86, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x87, + 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xA2, 0xCC, 0xB8, + 0xF6, 0xE2, 0x8A, 0xA8, 0xCC, 0xB8, 0xF6, 0xE2, + 0x8A, 0xA9, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xAB, + 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBC, 0xCC, 0xB8, + 0xF6, 0xE2, 0x89, 0xBD, 0xCC, 0xB8, 0xF6, 0xE2, + 0x8A, 0x91, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x92, + 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB2, 0xCC, 0xB8, + 0xF6, 0xE2, 0x8A, 0xB3, 0xCC, 0xB8, 0xF6, 0xE2, + 0x8A, 0xB4, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB5, + 0xCC, 0xB8, 0xF6, 0xE3, 0x80, 0x88, 0xF6, 0xE3, + 0x80, 0x89, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x31, 0x30, 0x31, 0x31, 0x31, + 0x32, 0x31, 0x33, 0x31, 0x34, 0x31, 0x35, 0x31, + 0x36, 0x31, 0x37, 0x31, 0x38, 0x31, 0x39, 0x32, + 0x30, 0x28, 0x31, 0x29, 0x28, 0x32, 0x29, 0x28, + 0x33, 0x29, 0x28, 0x34, 0x29, 0x28, 0x35, 0x29, + 0x28, 0x36, 0x29, 0x28, 0x37, 0x29, 0x28, 0x38, + 0x29, 0x28, 0x39, 0x29, 0x28, 0x31, 0x30, 0x29, + 0x28, 0x31, 0x31, 0x29, 0x28, 0x31, 0x32, 0x29, + 0x28, 0x31, 0x33, 0x29, 0x28, 0x31, 0x34, 0x29, + 0x28, 0x31, 0x35, 0x29, 0x28, 0x31, 0x36, 0x29, + 0x28, 0x31, 0x37, 0x29, 0x28, 0x31, 0x38, 0x29, + 0x28, 0x31, 0x39, 0x29, 0x28, 0x32, 0x30, 0x29, + 0x31, 0x2E, 0x32, 0x2E, 0x33, 0x2E, 0x34, 0x2E, + 0x35, 0x2E, 0x36, 0x2E, 0x37, 0x2E, 0x38, 0x2E, + 0x39, 0x2E, 0x31, 0x30, 0x2E, 0x31, 0x31, 0x2E, + 0x31, 0x32, 0x2E, 0x31, 0x33, 0x2E, 0x31, 0x34, + 0x2E, 0x31, 0x35, 0x2E, 0x31, 0x36, 0x2E, 0x31, + 0x37, 0x2E, 0x31, 0x38, 0x2E, 0x31, 0x39, 0x2E, + 0x32, 0x30, 0x2E, 0x28, 0x61, 0x29, 0x28, 0x62, + 0x29, 0x28, 0x63, 0x29, 0x28, 0x64, 0x29, 0x28, + 0x65, 0x29, 0x28, 0x66, 0x29, 0x28, 0x67, 0x29, + 0x28, 0x68, 0x29, 0x28, 0x69, 0x29, 0x28, 0x6A, + 0x29, 0x28, 0x6B, 0x29, 0x28, 0x6C, 0x29, 0x28, + 0x6D, 0x29, 0x28, 0x6E, 0x29, 0x28, 0x6F, 0x29, + 0x28, 0x70, 0x29, 0x28, 0x71, 0x29, 0x28, 0x72, + 0x29, 0x28, 0x73, 0x29, 0x28, 0x74, 0x29, 0x28, + 0x75, 0x29, 0x28, 0x76, 0x29, 0x28, 0x77, 0x29, + 0x28, 0x78, 0x29, 0x28, 0x79, 0x29, 0x28, 0x7A, + 0x29, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x30, 0xE2, 0x88, + 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, + 0x88, 0xAB, 0x3A, 0x3A, 0x3D, 0x3D, 0x3D, 0x3D, + 0x3D, 0x3D, 0xF6, 0xE2, 0xAB, 0x9D, 0xCC, 0xB8, + 0xE2, 0xB5, 0xA1, 0xE6, 0xAF, 0x8D, 0xE9, 0xBE, + 0x9F, 0xE4, 0xB8, 0x80, 0xE4, 0xB8, 0xA8, 0xE4, + 0xB8, 0xB6, 0xE4, 0xB8, 0xBF, 0xE4, 0xB9, 0x99, + 0xE4, 0xBA, 0x85, 0xE4, 0xBA, 0x8C, 0xE4, 0xBA, + 0xA0, 0xE4, 0xBA, 0xBA, 0xE5, 0x84, 0xBF, 0xE5, + 0x85, 0xA5, 0xE5, 0x85, 0xAB, 0xE5, 0x86, 0x82, + 0xE5, 0x86, 0x96, 0xE5, 0x86, 0xAB, 0xE5, 0x87, + 0xA0, 0xE5, 0x87, 0xB5, 0xE5, 0x88, 0x80, 0xE5, + 0x8A, 0x9B, 0xE5, 0x8B, 0xB9, 0xE5, 0x8C, 0x95, + 0xE5, 0x8C, 0x9A, 0xE5, 0x8C, 0xB8, 0xE5, 0x8D, + 0x81, 0xE5, 0x8D, 0x9C, 0xE5, 0x8D, 0xA9, 0xE5, + 0x8E, 0x82, 0xE5, 0x8E, 0xB6, 0xE5, 0x8F, 0x88, + 0xE5, 0x8F, 0xA3, 0xE5, 0x9B, 0x97, 0xE5, 0x9C, + 0x9F, 0xE5, 0xA3, 0xAB, 0xE5, 0xA4, 0x82, 0xE5, + 0xA4, 0x8A, 0xE5, 0xA4, 0x95, 0xE5, 0xA4, 0xA7, + 0xE5, 0xA5, 0xB3, 0xE5, 0xAD, 0x90, 0xE5, 0xAE, + 0x80, 0xE5, 0xAF, 0xB8, 0xE5, 0xB0, 0x8F, 0xE5, + 0xB0, 0xA2, 0xE5, 0xB0, 0xB8, 0xE5, 0xB1, 0xAE, + 0xE5, 0xB1, 0xB1, 0xE5, 0xB7, 0x9B, 0xE5, 0xB7, + 0xA5, 0xE5, 0xB7, 0xB1, 0xE5, 0xB7, 0xBE, 0xE5, + 0xB9, 0xB2, 0xE5, 0xB9, 0xBA, 0xE5, 0xB9, 0xBF, + 0xE5, 0xBB, 0xB4, 0xE5, 0xBB, 0xBE, 0xE5, 0xBC, + 0x8B, 0xE5, 0xBC, 0x93, 0xE5, 0xBD, 0x90, 0xE5, + 0xBD, 0xA1, 0xE5, 0xBD, 0xB3, 0xE5, 0xBF, 0x83, + 0xE6, 0x88, 0x88, 0xE6, 0x88, 0xB6, 0xE6, 0x89, + 0x8B, 0xE6, 0x94, 0xAF, 0xE6, 0x94, 0xB4, 0xE6, + 0x96, 0x87, 0xE6, 0x96, 0x97, 0xE6, 0x96, 0xA4, + 0xE6, 0x96, 0xB9, 0xE6, 0x97, 0xA0, 0xE6, 0x97, + 0xA5, 0xE6, 0x9B, 0xB0, 0xE6, 0x9C, 0x88, 0xE6, + 0x9C, 0xA8, 0xE6, 0xAC, 0xA0, 0xE6, 0xAD, 0xA2, + 0xE6, 0xAD, 0xB9, 0xE6, 0xAE, 0xB3, 0xE6, 0xAF, + 0x8B, 0xE6, 0xAF, 0x94, 0xE6, 0xAF, 0x9B, 0xE6, + 0xB0, 0x8F, 0xE6, 0xB0, 0x94, 0xE6, 0xB0, 0xB4, + 0xE7, 0x81, 0xAB, 0xE7, 0x88, 0xAA, 0xE7, 0x88, + 0xB6, 0xE7, 0x88, 0xBB, 0xE7, 0x88, 0xBF, 0xE7, + 0x89, 0x87, 0xE7, 0x89, 0x99, 0xE7, 0x89, 0x9B, + 0xE7, 0x8A, 0xAC, 0xE7, 0x8E, 0x84, 0xE7, 0x8E, + 0x89, 0xE7, 0x93, 0x9C, 0xE7, 0x93, 0xA6, 0xE7, + 0x94, 0x98, 0xE7, 0x94, 0x9F, 0xE7, 0x94, 0xA8, + 0xE7, 0x94, 0xB0, 0xE7, 0x96, 0x8B, 0xE7, 0x96, + 0x92, 0xE7, 0x99, 0xB6, 0xE7, 0x99, 0xBD, 0xE7, + 0x9A, 0xAE, 0xE7, 0x9A, 0xBF, 0xE7, 0x9B, 0xAE, + 0xE7, 0x9F, 0x9B, 0xE7, 0x9F, 0xA2, 0xE7, 0x9F, + 0xB3, 0xE7, 0xA4, 0xBA, 0xE7, 0xA6, 0xB8, 0xE7, + 0xA6, 0xBE, 0xE7, 0xA9, 0xB4, 0xE7, 0xAB, 0x8B, + 0xE7, 0xAB, 0xB9, 0xE7, 0xB1, 0xB3, 0xE7, 0xB3, + 0xB8, 0xE7, 0xBC, 0xB6, 0xE7, 0xBD, 0x91, 0xE7, + 0xBE, 0x8A, 0xE7, 0xBE, 0xBD, 0xE8, 0x80, 0x81, + 0xE8, 0x80, 0x8C, 0xE8, 0x80, 0x92, 0xE8, 0x80, + 0xB3, 0xE8, 0x81, 0xBF, 0xE8, 0x82, 0x89, 0xE8, + 0x87, 0xA3, 0xE8, 0x87, 0xAA, 0xE8, 0x87, 0xB3, + 0xE8, 0x87, 0xBC, 0xE8, 0x88, 0x8C, 0xE8, 0x88, + 0x9B, 0xE8, 0x88, 0x9F, 0xE8, 0x89, 0xAE, 0xE8, + 0x89, 0xB2, 0xE8, 0x89, 0xB8, 0xE8, 0x99, 0x8D, + 0xE8, 0x99, 0xAB, 0xE8, 0xA1, 0x80, 0xE8, 0xA1, + 0x8C, 0xE8, 0xA1, 0xA3, 0xE8, 0xA5, 0xBE, 0xE8, + 0xA6, 0x8B, 0xE8, 0xA7, 0x92, 0xE8, 0xA8, 0x80, + 0xE8, 0xB0, 0xB7, 0xE8, 0xB1, 0x86, 0xE8, 0xB1, + 0x95, 0xE8, 0xB1, 0xB8, 0xE8, 0xB2, 0x9D, 0xE8, + 0xB5, 0xA4, 0xE8, 0xB5, 0xB0, 0xE8, 0xB6, 0xB3, + 0xE8, 0xBA, 0xAB, 0xE8, 0xBB, 0x8A, 0xE8, 0xBE, + 0x9B, 0xE8, 0xBE, 0xB0, 0xE8, 0xBE, 0xB5, 0xE9, + 0x82, 0x91, 0xE9, 0x85, 0x89, 0xE9, 0x87, 0x86, + 0xE9, 0x87, 0x8C, 0xE9, 0x87, 0x91, 0xE9, 0x95, + 0xB7, 0xE9, 0x96, 0x80, 0xE9, 0x98, 0x9C, 0xE9, + 0x9A, 0xB6, 0xE9, 0x9A, 0xB9, 0xE9, 0x9B, 0xA8, + 0xE9, 0x9D, 0x91, 0xE9, 0x9D, 0x9E, 0xE9, 0x9D, + 0xA2, 0xE9, 0x9D, 0xA9, 0xE9, 0x9F, 0x8B, 0xE9, + 0x9F, 0xAD, 0xE9, 0x9F, 0xB3, 0xE9, 0xA0, 0x81, + 0xE9, 0xA2, 0xA8, 0xE9, 0xA3, 0x9B, 0xE9, 0xA3, + 0x9F, 0xE9, 0xA6, 0x96, 0xE9, 0xA6, 0x99, 0xE9, + 0xA6, 0xAC, 0xE9, 0xAA, 0xA8, 0xE9, 0xAB, 0x98, + 0xE9, 0xAB, 0x9F, 0xE9, 0xAC, 0xA5, 0xE9, 0xAC, + 0xAF, 0xE9, 0xAC, 0xB2, 0xE9, 0xAC, 0xBC, 0xE9, + 0xAD, 0x9A, 0xE9, 0xB3, 0xA5, 0xE9, 0xB9, 0xB5, + 0xE9, 0xB9, 0xBF, 0xE9, 0xBA, 0xA5, 0xE9, 0xBA, + 0xBB, 0xE9, 0xBB, 0x83, 0xE9, 0xBB, 0x8D, 0xE9, + 0xBB, 0x91, 0xE9, 0xBB, 0xB9, 0xE9, 0xBB, 0xBD, + 0xE9, 0xBC, 0x8E, 0xE9, 0xBC, 0x93, 0xE9, 0xBC, + 0xA0, 0xE9, 0xBC, 0xBB, 0xE9, 0xBD, 0x8A, 0xE9, + 0xBD, 0x92, 0xE9, 0xBE, 0x8D, 0xE9, 0xBE, 0x9C, + 0xE9, 0xBE, 0xA0, 0x20, 0xE3, 0x80, 0x92, 0xE5, + 0x8D, 0x81, 0xE5, 0x8D, 0x84, 0xE5, 0x8D, 0x85, + 0xF6, 0xE3, 0x81, 0x8B, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x81, 0x8D, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x81, 0x8F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, + 0x91, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x93, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x95, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x97, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x81, 0x99, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x81, 0x9B, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x81, 0x9D, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x81, 0x9F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, + 0xA1, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA4, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA6, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA8, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x9A, 0xF6, + 0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x81, 0xB2, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x81, + 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xB5, + 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x81, 0xB8, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xB8, 0xE3, 0x82, + 0x9A, 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x9A, 0xF6, + 0xE3, 0x81, 0x86, 0xE3, 0x82, 0x99, 0x20, 0xE3, + 0x82, 0x99, 0x20, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, + 0x82, 0x9D, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0x88, + 0xE3, 0x82, 0x8A, 0xF6, 0xE3, 0x82, 0xAB, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xAD, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x82, 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, + 0xB7, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xB9, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBB, 0xE3, + 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBD, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x83, 0x81, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x83, 0x84, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x83, 0x86, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, + 0x88, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x8F, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x8F, 0xE3, + 0x82, 0x9A, 0xF6, 0xE3, 0x83, 0x92, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, + 0xF6, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, + 0x83, 0x98, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, + 0x98, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x83, 0x9B, + 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x9B, 0xE3, + 0x82, 0x9A, 0xF6, 0xE3, 0x82, 0xA6, 0xE3, 0x82, + 0x99, 0xF6, 0xE3, 0x83, 0xAF, 0xE3, 0x82, 0x99, + 0xF6, 0xE3, 0x83, 0xB0, 0xE3, 0x82, 0x99, 0xF6, + 0xE3, 0x83, 0xB1, 0xE3, 0x82, 0x99, 0xF6, 0xE3, + 0x83, 0xB2, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, + 0xBD, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xB3, 0xE3, + 0x83, 0x88, 0xE1, 0x84, 0x80, 0xE1, 0x84, 0x81, + 0xE1, 0x86, 0xAA, 0xE1, 0x84, 0x82, 0xE1, 0x86, + 0xAC, 0xE1, 0x86, 0xAD, 0xE1, 0x84, 0x83, 0xE1, + 0x84, 0x84, 0xE1, 0x84, 0x85, 0xE1, 0x86, 0xB0, + 0xE1, 0x86, 0xB1, 0xE1, 0x86, 0xB2, 0xE1, 0x86, + 0xB3, 0xE1, 0x86, 0xB4, 0xE1, 0x86, 0xB5, 0xE1, + 0x84, 0x9A, 0xE1, 0x84, 0x86, 0xE1, 0x84, 0x87, + 0xE1, 0x84, 0x88, 0xE1, 0x84, 0xA1, 0xE1, 0x84, + 0x89, 0xE1, 0x84, 0x8A, 0xE1, 0x84, 0x8B, 0xE1, + 0x84, 0x8C, 0xE1, 0x84, 0x8D, 0xE1, 0x84, 0x8E, + 0xE1, 0x84, 0x8F, 0xE1, 0x84, 0x90, 0xE1, 0x84, + 0x91, 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xA1, 0xE1, + 0x85, 0xA2, 0xE1, 0x85, 0xA3, 0xE1, 0x85, 0xA4, + 0xE1, 0x85, 0xA5, 0xE1, 0x85, 0xA6, 0xE1, 0x85, + 0xA7, 0xE1, 0x85, 0xA8, 0xE1, 0x85, 0xA9, 0xE1, + 0x85, 0xAA, 0xE1, 0x85, 0xAB, 0xE1, 0x85, 0xAC, + 0xE1, 0x85, 0xAD, 0xE1, 0x85, 0xAE, 0xE1, 0x85, + 0xAF, 0xE1, 0x85, 0xB0, 0xE1, 0x85, 0xB1, 0xE1, + 0x85, 0xB2, 0xE1, 0x85, 0xB3, 0xE1, 0x85, 0xB4, + 0xE1, 0x85, 0xB5, 0xE1, 0x85, 0xA0, 0xE1, 0x84, + 0x94, 0xE1, 0x84, 0x95, 0xE1, 0x87, 0x87, 0xE1, + 0x87, 0x88, 0xE1, 0x87, 0x8C, 0xE1, 0x87, 0x8E, + 0xE1, 0x87, 0x93, 0xE1, 0x87, 0x97, 0xE1, 0x87, + 0x99, 0xE1, 0x84, 0x9C, 0xE1, 0x87, 0x9D, 0xE1, + 0x87, 0x9F, 0xE1, 0x84, 0x9D, 0xE1, 0x84, 0x9E, + 0xE1, 0x84, 0xA0, 0xE1, 0x84, 0xA2, 0xE1, 0x84, + 0xA3, 0xE1, 0x84, 0xA7, 0xE1, 0x84, 0xA9, 0xE1, + 0x84, 0xAB, 0xE1, 0x84, 0xAC, 0xE1, 0x84, 0xAD, + 0xE1, 0x84, 0xAE, 0xE1, 0x84, 0xAF, 0xE1, 0x84, + 0xB2, 0xE1, 0x84, 0xB6, 0xE1, 0x85, 0x80, 0xE1, + 0x85, 0x87, 0xE1, 0x85, 0x8C, 0xE1, 0x87, 0xB1, + 0xE1, 0x87, 0xB2, 0xE1, 0x85, 0x97, 0xE1, 0x85, + 0x98, 0xE1, 0x85, 0x99, 0xE1, 0x86, 0x84, 0xE1, + 0x86, 0x85, 0xE1, 0x86, 0x88, 0xE1, 0x86, 0x91, + 0xE1, 0x86, 0x92, 0xE1, 0x86, 0x94, 0xE1, 0x86, + 0x9E, 0xE1, 0x86, 0xA1, 0xE4, 0xB8, 0x80, 0xE4, + 0xBA, 0x8C, 0xE4, 0xB8, 0x89, 0xE5, 0x9B, 0x9B, + 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, 0xAD, 0xE4, 0xB8, + 0x8B, 0xE7, 0x94, 0xB2, 0xE4, 0xB9, 0x99, 0xE4, + 0xB8, 0x99, 0xE4, 0xB8, 0x81, 0xE5, 0xA4, 0xA9, + 0xE5, 0x9C, 0xB0, 0xE4, 0xBA, 0xBA, 0x28, 0xE1, + 0x84, 0x80, 0x29, 0x28, 0xE1, 0x84, 0x82, 0x29, + 0x28, 0xE1, 0x84, 0x83, 0x29, 0x28, 0xE1, 0x84, + 0x85, 0x29, 0x28, 0xE1, 0x84, 0x86, 0x29, 0x28, + 0xE1, 0x84, 0x87, 0x29, 0x28, 0xE1, 0x84, 0x89, + 0x29, 0x28, 0xE1, 0x84, 0x8B, 0x29, 0x28, 0xE1, + 0x84, 0x8C, 0x29, 0x28, 0xE1, 0x84, 0x8E, 0x29, + 0x28, 0xE1, 0x84, 0x8F, 0x29, 0x28, 0xE1, 0x84, + 0x90, 0x29, 0x28, 0xE1, 0x84, 0x91, 0x29, 0x28, + 0xE1, 0x84, 0x92, 0x29, 0x28, 0xE1, 0x84, 0x80, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x82, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x83, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x85, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x86, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x87, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x89, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8B, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8C, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8E, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8F, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x90, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x91, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x92, + 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8C, + 0xE1, 0x85, 0xAE, 0x29, 0x28, 0xE1, 0x84, 0x8B, + 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x8C, 0xE1, 0x85, + 0xA5, 0xE1, 0x86, 0xAB, 0x29, 0x28, 0xE1, 0x84, + 0x8B, 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x92, 0xE1, + 0x85, 0xAE, 0x29, 0x28, 0xE4, 0xB8, 0x80, 0x29, + 0x28, 0xE4, 0xBA, 0x8C, 0x29, 0x28, 0xE4, 0xB8, + 0x89, 0x29, 0x28, 0xE5, 0x9B, 0x9B, 0x29, 0x28, + 0xE4, 0xBA, 0x94, 0x29, 0x28, 0xE5, 0x85, 0xAD, + 0x29, 0x28, 0xE4, 0xB8, 0x83, 0x29, 0x28, 0xE5, + 0x85, 0xAB, 0x29, 0x28, 0xE4, 0xB9, 0x9D, 0x29, + 0x28, 0xE5, 0x8D, 0x81, 0x29, 0x28, 0xE6, 0x9C, + 0x88, 0x29, 0x28, 0xE7, 0x81, 0xAB, 0x29, 0x28, + 0xE6, 0xB0, 0xB4, 0x29, 0x28, 0xE6, 0x9C, 0xA8, + 0x29, 0x28, 0xE9, 0x87, 0x91, 0x29, 0x28, 0xE5, + 0x9C, 0x9F, 0x29, 0x28, 0xE6, 0x97, 0xA5, 0x29, + 0x28, 0xE6, 0xA0, 0xAA, 0x29, 0x28, 0xE6, 0x9C, + 0x89, 0x29, 0x28, 0xE7, 0xA4, 0xBE, 0x29, 0x28, + 0xE5, 0x90, 0x8D, 0x29, 0x28, 0xE7, 0x89, 0xB9, + 0x29, 0x28, 0xE8, 0xB2, 0xA1, 0x29, 0x28, 0xE7, + 0xA5, 0x9D, 0x29, 0x28, 0xE5, 0x8A, 0xB4, 0x29, + 0x28, 0xE4, 0xBB, 0xA3, 0x29, 0x28, 0xE5, 0x91, + 0xBC, 0x29, 0x28, 0xE5, 0xAD, 0xA6, 0x29, 0x28, + 0xE7, 0x9B, 0xA3, 0x29, 0x28, 0xE4, 0xBC, 0x81, + 0x29, 0x28, 0xE8, 0xB3, 0x87, 0x29, 0x28, 0xE5, + 0x8D, 0x94, 0x29, 0x28, 0xE7, 0xA5, 0xAD, 0x29, + 0x28, 0xE4, 0xBC, 0x91, 0x29, 0x28, 0xE8, 0x87, + 0xAA, 0x29, 0x28, 0xE8, 0x87, 0xB3, 0x29, 0x50, + 0x54, 0x45, 0x32, 0x31, 0x32, 0x32, 0x32, 0x33, + 0x32, 0x34, 0x32, 0x35, 0x32, 0x36, 0x32, 0x37, + 0x32, 0x38, 0x32, 0x39, 0x33, 0x30, 0x33, 0x31, + 0x33, 0x32, 0x33, 0x33, 0x33, 0x34, 0x33, 0x35, + 0xE1, 0x84, 0x80, 0xE1, 0x84, 0x82, 0xE1, 0x84, + 0x83, 0xE1, 0x84, 0x85, 0xE1, 0x84, 0x86, 0xE1, + 0x84, 0x87, 0xE1, 0x84, 0x89, 0xE1, 0x84, 0x8B, + 0xE1, 0x84, 0x8C, 0xE1, 0x84, 0x8E, 0xE1, 0x84, + 0x8F, 0xE1, 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, + 0x84, 0x92, 0xE1, 0x84, 0x80, 0xE1, 0x85, 0xA1, + 0xE1, 0x84, 0x82, 0xE1, 0x85, 0xA1, 0xE1, 0x84, + 0x83, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x85, 0xE1, + 0x85, 0xA1, 0xE1, 0x84, 0x86, 0xE1, 0x85, 0xA1, + 0xE1, 0x84, 0x87, 0xE1, 0x85, 0xA1, 0xE1, 0x84, + 0x89, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x8B, 0xE1, + 0x85, 0xA1, 0xE1, 0x84, 0x8C, 0xE1, 0x85, 0xA1, + 0xE1, 0x84, 0x8E, 0xE1, 0x85, 0xA1, 0xE1, 0x84, + 0x8F, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x90, 0xE1, + 0x85, 0xA1, 0xE1, 0x84, 0x91, 0xE1, 0x85, 0xA1, + 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xA1, 0xE1, 0x84, + 0x8E, 0xE1, 0x85, 0xA1, 0xE1, 0x86, 0xB7, 0xE1, + 0x84, 0x80, 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x8C, + 0xE1, 0x85, 0xAE, 0xE1, 0x84, 0x8B, 0xE1, 0x85, + 0xB4, 0xE1, 0x84, 0x8B, 0xE1, 0x85, 0xAE, 0xE4, + 0xB8, 0x80, 0xE4, 0xBA, 0x8C, 0xE4, 0xB8, 0x89, + 0xE5, 0x9B, 0x9B, 0xE4, 0xBA, 0x94, 0xE5, 0x85, + 0xAD, 0xE4, 0xB8, 0x83, 0xE5, 0x85, 0xAB, 0xE4, + 0xB9, 0x9D, 0xE5, 0x8D, 0x81, 0xE6, 0x9C, 0x88, + 0xE7, 0x81, 0xAB, 0xE6, 0xB0, 0xB4, 0xE6, 0x9C, + 0xA8, 0xE9, 0x87, 0x91, 0xE5, 0x9C, 0x9F, 0xE6, + 0x97, 0xA5, 0xE6, 0xA0, 0xAA, 0xE6, 0x9C, 0x89, + 0xE7, 0xA4, 0xBE, 0xE5, 0x90, 0x8D, 0xE7, 0x89, + 0xB9, 0xE8, 0xB2, 0xA1, 0xE7, 0xA5, 0x9D, 0xE5, + 0x8A, 0xB4, 0xE7, 0xA7, 0x98, 0xE7, 0x94, 0xB7, + 0xE5, 0xA5, 0xB3, 0xE9, 0x81, 0xA9, 0xE5, 0x84, + 0xAA, 0xE5, 0x8D, 0xB0, 0xE6, 0xB3, 0xA8, 0xE9, + 0xA0, 0x85, 0xE4, 0xBC, 0x91, 0xE5, 0x86, 0x99, + 0xE6, 0xAD, 0xA3, 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, + 0xAD, 0xE4, 0xB8, 0x8B, 0xE5, 0xB7, 0xA6, 0xE5, + 0x8F, 0xB3, 0xE5, 0x8C, 0xBB, 0xE5, 0xAE, 0x97, + 0xE5, 0xAD, 0xA6, 0xE7, 0x9B, 0xA3, 0xE4, 0xBC, + 0x81, 0xE8, 0xB3, 0x87, 0xE5, 0x8D, 0x94, 0xE5, + 0xA4, 0x9C, 0x33, 0x36, 0x33, 0x37, 0x33, 0x38, + 0x33, 0x39, 0x34, 0x30, 0x34, 0x31, 0x34, 0x32, + 0x34, 0x33, 0x34, 0x34, 0x34, 0x35, 0x34, 0x36, + 0x34, 0x37, 0x34, 0x38, 0x34, 0x39, 0x35, 0x30, + 0x31, 0xE6, 0x9C, 0x88, 0x32, 0xE6, 0x9C, 0x88, + 0x33, 0xE6, 0x9C, 0x88, 0x34, 0xE6, 0x9C, 0x88, + 0x35, 0xE6, 0x9C, 0x88, 0x36, 0xE6, 0x9C, 0x88, + 0x37, 0xE6, 0x9C, 0x88, 0x38, 0xE6, 0x9C, 0x88, + 0x39, 0xE6, 0x9C, 0x88, 0x31, 0x30, 0xE6, 0x9C, + 0x88, 0x31, 0x31, 0xE6, 0x9C, 0x88, 0x31, 0x32, + 0xE6, 0x9C, 0x88, 0x48, 0x67, 0x65, 0x72, 0x67, + 0x65, 0x56, 0x4C, 0x54, 0x44, 0xE3, 0x82, 0xA2, + 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xA6, 0xE3, 0x82, + 0xA8, 0xE3, 0x82, 0xAA, 0xE3, 0x82, 0xAB, 0xE3, + 0x82, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0xB1, + 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0xB5, 0xE3, 0x82, + 0xB7, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xBB, 0xE3, + 0x82, 0xBD, 0xE3, 0x82, 0xBF, 0xE3, 0x83, 0x81, + 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x86, 0xE3, 0x83, + 0x88, 0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8B, 0xE3, + 0x83, 0x8C, 0xE3, 0x83, 0x8D, 0xE3, 0x83, 0x8E, + 0xE3, 0x83, 0x8F, 0xE3, 0x83, 0x92, 0xE3, 0x83, + 0x95, 0xE3, 0x83, 0x98, 0xE3, 0x83, 0x9B, 0xE3, + 0x83, 0x9E, 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xA0, + 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xA2, 0xE3, 0x83, + 0xA4, 0xE3, 0x83, 0xA6, 0xE3, 0x83, 0xA8, 0xE3, + 0x83, 0xA9, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xAB, + 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xAD, 0xE3, 0x83, + 0xAF, 0xE3, 0x83, 0xB0, 0xE3, 0x83, 0xB1, 0xE3, + 0x83, 0xB2, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0x8F, + 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x83, + 0x88, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xAB, 0xE3, + 0x83, 0x95, 0xE3, 0x82, 0xA1, 0xE3, 0x82, 0xA2, + 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x98, 0xE3, 0x82, + 0x9A, 0xE3, 0x82, 0xA2, 0xE3, 0x82, 0xA2, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xA4, + 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0xB3, 0xE3, 0x82, + 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xA4, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, 0x82, 0xA6, + 0xE3, 0x82, 0xA9, 0xE3, 0x83, 0xB3, 0xE3, 0x82, + 0xA8, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xAF, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, + 0xE3, 0x82, 0xA8, 0xE3, 0x83, 0xBC, 0xE3, 0x82, + 0xAB, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAA, 0xE3, + 0x83, 0xB3, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xAA, + 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xA0, 0xE3, 0x82, + 0xAB, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xAA, 0xE3, + 0x82, 0xAB, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0x83, + 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xAB, 0xE3, 0x83, + 0xAD, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, + 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAD, + 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAB, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x9E, 0xE3, + 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xAB, + 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xAD, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0xBC, 0xE3, + 0x82, 0xAD, 0xE3, 0x83, 0xA5, 0xE3, 0x83, 0xAA, + 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAD, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xBF, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAD, + 0xE3, 0x83, 0xAD, 0xE3, 0x82, 0xAD, 0xE3, 0x83, + 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, + 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0xE3, 0x82, 0xAD, + 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xA1, 0xE3, 0x83, + 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0xE3, + 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xAF, + 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, 0x82, + 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9, 0xE3, + 0x83, 0xA0, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0xE3, 0x83, + 0x88, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAF, 0xE3, + 0x83, 0xAB, 0xE3, 0x82, 0xBB, 0xE3, 0x82, 0x99, + 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xAD, 0xE3, 0x82, + 0xAF, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xBC, 0xE3, + 0x83, 0x8D, 0xE3, 0x82, 0xB1, 0xE3, 0x83, 0xBC, + 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xB3, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0x8A, 0xE3, 0x82, 0xB3, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, + 0xE3, 0x82, 0xB5, 0xE3, 0x82, 0xA4, 0xE3, 0x82, + 0xAF, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xB5, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0xA0, 0xE3, 0x82, 0xB7, 0xE3, 0x83, + 0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAF, 0xE3, + 0x82, 0x99, 0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3, + 0xE3, 0x83, 0x81, 0xE3, 0x82, 0xBB, 0xE3, 0x83, + 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xBF, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB9, + 0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0xE3, 0x82, + 0xB7, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, + 0x83, 0xAB, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, + 0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8E, 0xE3, 0x83, + 0x8E, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, + 0x83, 0x8F, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0x84, + 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, 0x83, + 0xBC, 0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3, 0xE3, + 0x83, 0x88, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, + 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x84, 0xE3, 0x83, + 0x8F, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, + 0x83, 0xAC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, + 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xA2, 0xE3, 0x82, + 0xB9, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0xE3, + 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xAF, + 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, + 0x9A, 0xE3, 0x82, 0xB3, 0xE3, 0x83, 0x92, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x95, + 0xE3, 0x82, 0xA1, 0xE3, 0x83, 0xA9, 0xE3, 0x83, + 0x83, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, + 0x83, 0x95, 0xE3, 0x82, 0xA3, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x95, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0x83, 0xE3, 0x82, 0xB7, 0xE3, + 0x82, 0xA7, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x95, + 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x98, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0xBF, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x98, + 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xBD, 0xE3, 0x83, + 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0x8B, 0xE3, + 0x83, 0x92, 0xE3, 0x83, 0x98, 0xE3, 0x83, 0xAB, + 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x98, 0xE3, 0x82, + 0x9A, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xB9, 0xE3, + 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, + 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0x98, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, + 0x82, 0xBF, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, + 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x88, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x99, 0xE3, + 0x83, 0xAB, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x9B, + 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x9B, 0xE3, 0x82, + 0x9A, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x9B, 0xE3, 0x83, + 0xBC, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x9E, 0xE3, + 0x82, 0xA4, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, + 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xA4, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0x83, 0xE3, + 0x83, 0x8F, 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0xAB, + 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0x9E, 0xE3, 0x83, + 0xB3, 0xE3, 0x82, 0xB7, 0xE3, 0x83, 0xA7, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0x9F, 0xE3, 0x82, 0xAF, + 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x9F, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0x9F, 0xE3, + 0x83, 0xAA, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, + 0xA1, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, + 0x83, 0xA1, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0xA1, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, + 0x83, 0xAB, 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xA4, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, + 0x83, 0xA6, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xB3, + 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0x83, 0xE3, 0x83, + 0x88, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xAA, 0xE3, + 0x83, 0xA9, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, + 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x95, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xAC, + 0xE3, 0x83, 0xA0, 0xE3, 0x83, 0xAC, 0xE3, 0x83, + 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xB1, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0xAF, + 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0x30, 0xE7, + 0x82, 0xB9, 0x31, 0xE7, 0x82, 0xB9, 0x32, 0xE7, + 0x82, 0xB9, 0x33, 0xE7, 0x82, 0xB9, 0x34, 0xE7, + 0x82, 0xB9, 0x35, 0xE7, 0x82, 0xB9, 0x36, 0xE7, + 0x82, 0xB9, 0x37, 0xE7, 0x82, 0xB9, 0x38, 0xE7, + 0x82, 0xB9, 0x39, 0xE7, 0x82, 0xB9, 0x31, 0x30, + 0xE7, 0x82, 0xB9, 0x31, 0x31, 0xE7, 0x82, 0xB9, + 0x31, 0x32, 0xE7, 0x82, 0xB9, 0x31, 0x33, 0xE7, + 0x82, 0xB9, 0x31, 0x34, 0xE7, 0x82, 0xB9, 0x31, + 0x35, 0xE7, 0x82, 0xB9, 0x31, 0x36, 0xE7, 0x82, + 0xB9, 0x31, 0x37, 0xE7, 0x82, 0xB9, 0x31, 0x38, + 0xE7, 0x82, 0xB9, 0x31, 0x39, 0xE7, 0x82, 0xB9, + 0x32, 0x30, 0xE7, 0x82, 0xB9, 0x32, 0x31, 0xE7, + 0x82, 0xB9, 0x32, 0x32, 0xE7, 0x82, 0xB9, 0x32, + 0x33, 0xE7, 0x82, 0xB9, 0x32, 0x34, 0xE7, 0x82, + 0xB9, 0x68, 0x50, 0x61, 0x64, 0x61, 0x41, 0x55, + 0x62, 0x61, 0x72, 0x6F, 0x56, 0x70, 0x63, 0x64, + 0x6D, 0x64, 0x6D, 0x32, 0x64, 0x6D, 0x33, 0x49, + 0x55, 0xE5, 0xB9, 0xB3, 0xE6, 0x88, 0x90, 0xE6, + 0x98, 0xAD, 0xE5, 0x92, 0x8C, 0xE5, 0xA4, 0xA7, + 0xE6, 0xAD, 0xA3, 0xE6, 0x98, 0x8E, 0xE6, 0xB2, + 0xBB, 0xE6, 0xA0, 0xAA, 0xE5, 0xBC, 0x8F, 0xE4, + 0xBC, 0x9A, 0xE7, 0xA4, 0xBE, 0x70, 0x41, 0x6E, + 0x41, 0xCE, 0xBC, 0x41, 0x6D, 0x41, 0x6B, 0x41, + 0x4B, 0x42, 0x4D, 0x42, 0x47, 0x42, 0x63, 0x61, + 0x6C, 0x6B, 0x63, 0x61, 0x6C, 0x70, 0x46, 0x6E, + 0x46, 0xCE, 0xBC, 0x46, 0xCE, 0xBC, 0x67, 0x6D, + 0x67, 0x6B, 0x67, 0x48, 0x7A, 0x6B, 0x48, 0x7A, + 0x4D, 0x48, 0x7A, 0x47, 0x48, 0x7A, 0x54, 0x48, + 0x7A, 0xCE, 0xBC, 0x6C, 0x6D, 0x6C, 0x64, 0x6C, + 0x6B, 0x6C, 0x66, 0x6D, 0x6E, 0x6D, 0xCE, 0xBC, + 0x6D, 0x6D, 0x6D, 0x63, 0x6D, 0x6B, 0x6D, 0x6D, + 0x6D, 0x32, 0x63, 0x6D, 0x32, 0x6D, 0x32, 0x6B, + 0x6D, 0x32, 0x6D, 0x6D, 0x33, 0x63, 0x6D, 0x33, + 0x6D, 0x33, 0x6B, 0x6D, 0x33, 0x6D, 0xE2, 0x88, + 0x95, 0x73, 0x6D, 0xE2, 0x88, 0x95, 0x73, 0x32, + 0x50, 0x61, 0x6B, 0x50, 0x61, 0x4D, 0x50, 0x61, + 0x47, 0x50, 0x61, 0x72, 0x61, 0x64, 0x72, 0x61, + 0x64, 0xE2, 0x88, 0x95, 0x73, 0x72, 0x61, 0x64, + 0xE2, 0x88, 0x95, 0x73, 0x32, 0x70, 0x73, 0x6E, + 0x73, 0xCE, 0xBC, 0x73, 0x6D, 0x73, 0x70, 0x56, + 0x6E, 0x56, 0xCE, 0xBC, 0x56, 0x6D, 0x56, 0x6B, + 0x56, 0x4D, 0x56, 0x70, 0x57, 0x6E, 0x57, 0xCE, + 0xBC, 0x57, 0x6D, 0x57, 0x6B, 0x57, 0x4D, 0x57, + 0x6B, 0xCE, 0xA9, 0x4D, 0xCE, 0xA9, 0x61, 0x2E, + 0x6D, 0x2E, 0x42, 0x71, 0x63, 0x63, 0x63, 0x64, + 0x43, 0xE2, 0x88, 0x95, 0x6B, 0x67, 0x43, 0x6F, + 0x2E, 0x64, 0x42, 0x47, 0x79, 0x68, 0x61, 0x48, + 0x50, 0x69, 0x6E, 0x4B, 0x4B, 0x4B, 0x4D, 0x6B, + 0x74, 0x6C, 0x6D, 0x6C, 0x6E, 0x6C, 0x6F, 0x67, + 0x6C, 0x78, 0x6D, 0x62, 0x6D, 0x69, 0x6C, 0x6D, + 0x6F, 0x6C, 0x50, 0x48, 0x70, 0x2E, 0x6D, 0x2E, + 0x50, 0x50, 0x4D, 0x50, 0x52, 0x73, 0x72, 0x53, + 0x76, 0x57, 0x62, 0x56, 0xE2, 0x88, 0x95, 0x6D, + 0x41, 0xE2, 0x88, 0x95, 0x6D, 0x31, 0xE6, 0x97, + 0xA5, 0x32, 0xE6, 0x97, 0xA5, 0x33, 0xE6, 0x97, + 0xA5, 0x34, 0xE6, 0x97, 0xA5, 0x35, 0xE6, 0x97, + 0xA5, 0x36, 0xE6, 0x97, 0xA5, 0x37, 0xE6, 0x97, + 0xA5, 0x38, 0xE6, 0x97, 0xA5, 0x39, 0xE6, 0x97, + 0xA5, 0x31, 0x30, 0xE6, 0x97, 0xA5, 0x31, 0x31, + 0xE6, 0x97, 0xA5, 0x31, 0x32, 0xE6, 0x97, 0xA5, + 0x31, 0x33, 0xE6, 0x97, 0xA5, 0x31, 0x34, 0xE6, + 0x97, 0xA5, 0x31, 0x35, 0xE6, 0x97, 0xA5, 0x31, + 0x36, 0xE6, 0x97, 0xA5, 0x31, 0x37, 0xE6, 0x97, + 0xA5, 0x31, 0x38, 0xE6, 0x97, 0xA5, 0x31, 0x39, + 0xE6, 0x97, 0xA5, 0x32, 0x30, 0xE6, 0x97, 0xA5, + 0x32, 0x31, 0xE6, 0x97, 0xA5, 0x32, 0x32, 0xE6, + 0x97, 0xA5, 0x32, 0x33, 0xE6, 0x97, 0xA5, 0x32, + 0x34, 0xE6, 0x97, 0xA5, 0x32, 0x35, 0xE6, 0x97, + 0xA5, 0x32, 0x36, 0xE6, 0x97, 0xA5, 0x32, 0x37, + 0xE6, 0x97, 0xA5, 0x32, 0x38, 0xE6, 0x97, 0xA5, + 0x32, 0x39, 0xE6, 0x97, 0xA5, 0x33, 0x30, 0xE6, + 0x97, 0xA5, 0x33, 0x31, 0xE6, 0x97, 0xA5, 0x67, + 0x61, 0x6C, 0xF6, 0xE8, 0xB1, 0x88, 0xF6, 0xE6, + 0x9B, 0xB4, 0xF6, 0xE8, 0xBB, 0x8A, 0xF6, 0xE8, + 0xB3, 0x88, 0xF6, 0xE6, 0xBB, 0x91, 0xF6, 0xE4, + 0xB8, 0xB2, 0xF6, 0xE5, 0x8F, 0xA5, 0xF6, 0xE9, + 0xBE, 0x9C, 0xF6, 0xE9, 0xBE, 0x9C, 0xF6, 0xE5, + 0xA5, 0x91, 0xF6, 0xE9, 0x87, 0x91, 0xF6, 0xE5, + 0x96, 0x87, 0xF6, 0xE5, 0xA5, 0x88, 0xF6, 0xE6, + 0x87, 0xB6, 0xF6, 0xE7, 0x99, 0xA9, 0xF6, 0xE7, + 0xBE, 0x85, 0xF6, 0xE8, 0x98, 0xBF, 0xF6, 0xE8, + 0x9E, 0xBA, 0xF6, 0xE8, 0xA3, 0xB8, 0xF6, 0xE9, + 0x82, 0x8F, 0xF6, 0xE6, 0xA8, 0x82, 0xF6, 0xE6, + 0xB4, 0x9B, 0xF6, 0xE7, 0x83, 0x99, 0xF6, 0xE7, + 0x8F, 0x9E, 0xF6, 0xE8, 0x90, 0xBD, 0xF6, 0xE9, + 0x85, 0xAA, 0xF6, 0xE9, 0xA7, 0xB1, 0xF6, 0xE4, + 0xBA, 0x82, 0xF6, 0xE5, 0x8D, 0xB5, 0xF6, 0xE6, + 0xAC, 0x84, 0xF6, 0xE7, 0x88, 0x9B, 0xF6, 0xE8, + 0x98, 0xAD, 0xF6, 0xE9, 0xB8, 0x9E, 0xF6, 0xE5, + 0xB5, 0x90, 0xF6, 0xE6, 0xBF, 0xAB, 0xF6, 0xE8, + 0x97, 0x8D, 0xF6, 0xE8, 0xA5, 0xA4, 0xF6, 0xE6, + 0x8B, 0x89, 0xF6, 0xE8, 0x87, 0x98, 0xF6, 0xE8, + 0xA0, 0x9F, 0xF6, 0xE5, 0xBB, 0x8A, 0xF6, 0xE6, + 0x9C, 0x97, 0xF6, 0xE6, 0xB5, 0xAA, 0xF6, 0xE7, + 0x8B, 0xBC, 0xF6, 0xE9, 0x83, 0x8E, 0xF6, 0xE4, + 0xBE, 0x86, 0xF6, 0xE5, 0x86, 0xB7, 0xF6, 0xE5, + 0x8B, 0x9E, 0xF6, 0xE6, 0x93, 0x84, 0xF6, 0xE6, + 0xAB, 0x93, 0xF6, 0xE7, 0x88, 0x90, 0xF6, 0xE7, + 0x9B, 0xA7, 0xF6, 0xE8, 0x80, 0x81, 0xF6, 0xE8, + 0x98, 0x86, 0xF6, 0xE8, 0x99, 0x9C, 0xF6, 0xE8, + 0xB7, 0xAF, 0xF6, 0xE9, 0x9C, 0xB2, 0xF6, 0xE9, + 0xAD, 0xAF, 0xF6, 0xE9, 0xB7, 0xBA, 0xF6, 0xE7, + 0xA2, 0x8C, 0xF6, 0xE7, 0xA5, 0xBF, 0xF6, 0xE7, + 0xB6, 0xA0, 0xF6, 0xE8, 0x8F, 0x89, 0xF6, 0xE9, + 0x8C, 0x84, 0xF6, 0xE9, 0xB9, 0xBF, 0xF6, 0xE8, + 0xAB, 0x96, 0xF6, 0xE5, 0xA3, 0x9F, 0xF6, 0xE5, + 0xBC, 0x84, 0xF6, 0xE7, 0xB1, 0xA0, 0xF6, 0xE8, + 0x81, 0xBE, 0xF6, 0xE7, 0x89, 0xA2, 0xF6, 0xE7, + 0xA3, 0x8A, 0xF6, 0xE8, 0xB3, 0x82, 0xF6, 0xE9, + 0x9B, 0xB7, 0xF6, 0xE5, 0xA3, 0x98, 0xF6, 0xE5, + 0xB1, 0xA2, 0xF6, 0xE6, 0xA8, 0x93, 0xF6, 0xE6, + 0xB7, 0x9A, 0xF6, 0xE6, 0xBC, 0x8F, 0xF6, 0xE7, + 0xB4, 0xAF, 0xF6, 0xE7, 0xB8, 0xB7, 0xF6, 0xE9, + 0x99, 0x8B, 0xF6, 0xE5, 0x8B, 0x92, 0xF6, 0xE8, + 0x82, 0x8B, 0xF6, 0xE5, 0x87, 0x9C, 0xF6, 0xE5, + 0x87, 0x8C, 0xF6, 0xE7, 0xA8, 0x9C, 0xF6, 0xE7, + 0xB6, 0xBE, 0xF6, 0xE8, 0x8F, 0xB1, 0xF6, 0xE9, + 0x99, 0xB5, 0xF6, 0xE8, 0xAE, 0x80, 0xF6, 0xE6, + 0x8B, 0x8F, 0xF6, 0xE6, 0xA8, 0x82, 0xF6, 0xE8, + 0xAB, 0xBE, 0xF6, 0xE4, 0xB8, 0xB9, 0xF6, 0xE5, + 0xAF, 0xA7, 0xF6, 0xE6, 0x80, 0x92, 0xF6, 0xE7, + 0x8E, 0x87, 0xF6, 0xE7, 0x95, 0xB0, 0xF6, 0xE5, + 0x8C, 0x97, 0xF6, 0xE7, 0xA3, 0xBB, 0xF6, 0xE4, + 0xBE, 0xBF, 0xF6, 0xE5, 0xBE, 0xA9, 0xF6, 0xE4, + 0xB8, 0x8D, 0xF6, 0xE6, 0xB3, 0x8C, 0xF6, 0xE6, + 0x95, 0xB8, 0xF6, 0xE7, 0xB4, 0xA2, 0xF6, 0xE5, + 0x8F, 0x83, 0xF6, 0xE5, 0xA1, 0x9E, 0xF6, 0xE7, + 0x9C, 0x81, 0xF6, 0xE8, 0x91, 0x89, 0xF6, 0xE8, + 0xAA, 0xAA, 0xF6, 0xE6, 0xAE, 0xBA, 0xF6, 0xE8, + 0xBE, 0xB0, 0xF6, 0xE6, 0xB2, 0x88, 0xF6, 0xE6, + 0x8B, 0xBE, 0xF6, 0xE8, 0x8B, 0xA5, 0xF6, 0xE6, + 0x8E, 0xA0, 0xF6, 0xE7, 0x95, 0xA5, 0xF6, 0xE4, + 0xBA, 0xAE, 0xF6, 0xE5, 0x85, 0xA9, 0xF6, 0xE5, + 0x87, 0x89, 0xF6, 0xE6, 0xA2, 0x81, 0xF6, 0xE7, + 0xB3, 0xA7, 0xF6, 0xE8, 0x89, 0xAF, 0xF6, 0xE8, + 0xAB, 0x92, 0xF6, 0xE9, 0x87, 0x8F, 0xF6, 0xE5, + 0x8B, 0xB5, 0xF6, 0xE5, 0x91, 0x82, 0xF6, 0xE5, + 0xA5, 0xB3, 0xF6, 0xE5, 0xBB, 0xAC, 0xF6, 0xE6, + 0x97, 0x85, 0xF6, 0xE6, 0xBF, 0xBE, 0xF6, 0xE7, + 0xA4, 0xAA, 0xF6, 0xE9, 0x96, 0xAD, 0xF6, 0xE9, + 0xA9, 0xAA, 0xF6, 0xE9, 0xBA, 0x97, 0xF6, 0xE9, + 0xBB, 0x8E, 0xF6, 0xE5, 0x8A, 0x9B, 0xF6, 0xE6, + 0x9B, 0x86, 0xF6, 0xE6, 0xAD, 0xB7, 0xF6, 0xE8, + 0xBD, 0xA2, 0xF6, 0xE5, 0xB9, 0xB4, 0xF6, 0xE6, + 0x86, 0x90, 0xF6, 0xE6, 0x88, 0x80, 0xF6, 0xE6, + 0x92, 0x9A, 0xF6, 0xE6, 0xBC, 0xA3, 0xF6, 0xE7, + 0x85, 0x89, 0xF6, 0xE7, 0x92, 0x89, 0xF6, 0xE7, + 0xA7, 0x8A, 0xF6, 0xE7, 0xB7, 0xB4, 0xF6, 0xE8, + 0x81, 0xAF, 0xF6, 0xE8, 0xBC, 0xA6, 0xF6, 0xE8, + 0x93, 0xAE, 0xF6, 0xE9, 0x80, 0xA3, 0xF6, 0xE9, + 0x8D, 0x8A, 0xF6, 0xE5, 0x88, 0x97, 0xF6, 0xE5, + 0x8A, 0xA3, 0xF6, 0xE5, 0x92, 0xBD, 0xF6, 0xE7, + 0x83, 0x88, 0xF6, 0xE8, 0xA3, 0x82, 0xF6, 0xE8, + 0xAA, 0xAA, 0xF6, 0xE5, 0xBB, 0x89, 0xF6, 0xE5, + 0xBF, 0xB5, 0xF6, 0xE6, 0x8D, 0xBB, 0xF6, 0xE6, + 0xAE, 0xAE, 0xF6, 0xE7, 0xB0, 0xBE, 0xF6, 0xE7, + 0x8D, 0xB5, 0xF6, 0xE4, 0xBB, 0xA4, 0xF6, 0xE5, + 0x9B, 0xB9, 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, + 0xB6, 0xBA, 0xF6, 0xE6, 0x80, 0x9C, 0xF6, 0xE7, + 0x8E, 0xB2, 0xF6, 0xE7, 0x91, 0xA9, 0xF6, 0xE7, + 0xBE, 0x9A, 0xF6, 0xE8, 0x81, 0x86, 0xF6, 0xE9, + 0x88, 0xB4, 0xF6, 0xE9, 0x9B, 0xB6, 0xF6, 0xE9, + 0x9D, 0x88, 0xF6, 0xE9, 0xA0, 0x98, 0xF6, 0xE4, + 0xBE, 0x8B, 0xF6, 0xE7, 0xA6, 0xAE, 0xF6, 0xE9, + 0x86, 0xB4, 0xF6, 0xE9, 0x9A, 0xB8, 0xF6, 0xE6, + 0x83, 0xA1, 0xF6, 0xE4, 0xBA, 0x86, 0xF6, 0xE5, + 0x83, 0x9A, 0xF6, 0xE5, 0xAF, 0xAE, 0xF6, 0xE5, + 0xB0, 0xBF, 0xF6, 0xE6, 0x96, 0x99, 0xF6, 0xE6, + 0xA8, 0x82, 0xF6, 0xE7, 0x87, 0x8E, 0xF6, 0xE7, + 0x99, 0x82, 0xF6, 0xE8, 0x93, 0xBC, 0xF6, 0xE9, + 0x81, 0xBC, 0xF6, 0xE9, 0xBE, 0x8D, 0xF6, 0xE6, + 0x9A, 0x88, 0xF6, 0xE9, 0x98, 0xAE, 0xF6, 0xE5, + 0x8A, 0x89, 0xF6, 0xE6, 0x9D, 0xBB, 0xF6, 0xE6, + 0x9F, 0xB3, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, + 0xBA, 0x9C, 0xF6, 0xE7, 0x90, 0x89, 0xF6, 0xE7, + 0x95, 0x99, 0xF6, 0xE7, 0xA1, 0xAB, 0xF6, 0xE7, + 0xB4, 0x90, 0xF6, 0xE9, 0xA1, 0x9E, 0xF6, 0xE5, + 0x85, 0xAD, 0xF6, 0xE6, 0x88, 0xAE, 0xF6, 0xE9, + 0x99, 0xB8, 0xF6, 0xE5, 0x80, 0xAB, 0xF6, 0xE5, + 0xB4, 0x99, 0xF6, 0xE6, 0xB7, 0xAA, 0xF6, 0xE8, + 0xBC, 0xAA, 0xF6, 0xE5, 0xBE, 0x8B, 0xF6, 0xE6, + 0x85, 0x84, 0xF6, 0xE6, 0xA0, 0x97, 0xF6, 0xE7, + 0x8E, 0x87, 0xF6, 0xE9, 0x9A, 0x86, 0xF6, 0xE5, + 0x88, 0xA9, 0xF6, 0xE5, 0x90, 0x8F, 0xF6, 0xE5, + 0xB1, 0xA5, 0xF6, 0xE6, 0x98, 0x93, 0xF6, 0xE6, + 0x9D, 0x8E, 0xF6, 0xE6, 0xA2, 0xA8, 0xF6, 0xE6, + 0xB3, 0xA5, 0xF6, 0xE7, 0x90, 0x86, 0xF6, 0xE7, + 0x97, 0xA2, 0xF6, 0xE7, 0xBD, 0xB9, 0xF6, 0xE8, + 0xA3, 0x8F, 0xF6, 0xE8, 0xA3, 0xA1, 0xF6, 0xE9, + 0x87, 0x8C, 0xF6, 0xE9, 0x9B, 0xA2, 0xF6, 0xE5, + 0x8C, 0xBF, 0xF6, 0xE6, 0xBA, 0xBA, 0xF6, 0xE5, + 0x90, 0x9D, 0xF6, 0xE7, 0x87, 0x90, 0xF6, 0xE7, + 0x92, 0x98, 0xF6, 0xE8, 0x97, 0xBA, 0xF6, 0xE9, + 0x9A, 0xA3, 0xF6, 0xE9, 0xB1, 0x97, 0xF6, 0xE9, + 0xBA, 0x9F, 0xF6, 0xE6, 0x9E, 0x97, 0xF6, 0xE6, + 0xB7, 0x8B, 0xF6, 0xE8, 0x87, 0xA8, 0xF6, 0xE7, + 0xAB, 0x8B, 0xF6, 0xE7, 0xAC, 0xA0, 0xF6, 0xE7, + 0xB2, 0x92, 0xF6, 0xE7, 0x8B, 0x80, 0xF6, 0xE7, + 0x82, 0x99, 0xF6, 0xE8, 0xAD, 0x98, 0xF6, 0xE4, + 0xBB, 0x80, 0xF6, 0xE8, 0x8C, 0xB6, 0xF6, 0xE5, + 0x88, 0xBA, 0xF6, 0xE5, 0x88, 0x87, 0xF6, 0xE5, + 0xBA, 0xA6, 0xF6, 0xE6, 0x8B, 0x93, 0xF6, 0xE7, + 0xB3, 0x96, 0xF6, 0xE5, 0xAE, 0x85, 0xF6, 0xE6, + 0xB4, 0x9E, 0xF6, 0xE6, 0x9A, 0xB4, 0xF6, 0xE8, + 0xBC, 0xBB, 0xF6, 0xE8, 0xA1, 0x8C, 0xF6, 0xE9, + 0x99, 0x8D, 0xF6, 0xE8, 0xA6, 0x8B, 0xF6, 0xE5, + 0xBB, 0x93, 0xF6, 0xE5, 0x85, 0x80, 0xF6, 0xE5, + 0x97, 0x80, 0xF6, 0xE5, 0xA1, 0x9A, 0xF6, 0xE6, + 0x99, 0xB4, 0xF6, 0xE5, 0x87, 0x9E, 0xF6, 0xE7, + 0x8C, 0xAA, 0xF6, 0xE7, 0x9B, 0x8A, 0xF6, 0xE7, + 0xA4, 0xBC, 0xF6, 0xE7, 0xA5, 0x9E, 0xF6, 0xE7, + 0xA5, 0xA5, 0xF6, 0xE7, 0xA6, 0x8F, 0xF6, 0xE9, + 0x9D, 0x96, 0xF6, 0xE7, 0xB2, 0xBE, 0xF6, 0xE7, + 0xBE, 0xBD, 0xF6, 0xE8, 0x98, 0x92, 0xF6, 0xE8, + 0xAB, 0xB8, 0xF6, 0xE9, 0x80, 0xB8, 0xF6, 0xE9, + 0x83, 0xBD, 0xF6, 0xE9, 0xA3, 0xAF, 0xF6, 0xE9, + 0xA3, 0xBC, 0xF6, 0xE9, 0xA4, 0xA8, 0xF6, 0xE9, + 0xB6, 0xB4, 0xF6, 0xE4, 0xBE, 0xAE, 0xF6, 0xE5, + 0x83, 0xA7, 0xF6, 0xE5, 0x85, 0x8D, 0xF6, 0xE5, + 0x8B, 0x89, 0xF6, 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, + 0x8D, 0x91, 0xF6, 0xE5, 0x96, 0x9D, 0xF6, 0xE5, + 0x98, 0x86, 0xF6, 0xE5, 0x99, 0xA8, 0xF6, 0xE5, + 0xA1, 0x80, 0xF6, 0xE5, 0xA2, 0xA8, 0xF6, 0xE5, + 0xB1, 0xA4, 0xF6, 0xE5, 0xB1, 0xAE, 0xF6, 0xE6, + 0x82, 0x94, 0xF6, 0xE6, 0x85, 0xA8, 0xF6, 0xE6, + 0x86, 0x8E, 0xF6, 0xE6, 0x87, 0xB2, 0xF6, 0xE6, + 0x95, 0x8F, 0xF6, 0xE6, 0x97, 0xA2, 0xF6, 0xE6, + 0x9A, 0x91, 0xF6, 0xE6, 0xA2, 0x85, 0xF6, 0xE6, + 0xB5, 0xB7, 0xF6, 0xE6, 0xB8, 0x9A, 0xF6, 0xE6, + 0xBC, 0xA2, 0xF6, 0xE7, 0x85, 0xAE, 0xF6, 0xE7, + 0x88, 0xAB, 0xF6, 0xE7, 0x90, 0xA2, 0xF6, 0xE7, + 0xA2, 0x91, 0xF6, 0xE7, 0xA4, 0xBE, 0xF6, 0xE7, + 0xA5, 0x89, 0xF6, 0xE7, 0xA5, 0x88, 0xF6, 0xE7, + 0xA5, 0x90, 0xF6, 0xE7, 0xA5, 0x96, 0xF6, 0xE7, + 0xA5, 0x9D, 0xF6, 0xE7, 0xA6, 0x8D, 0xF6, 0xE7, + 0xA6, 0x8E, 0xF6, 0xE7, 0xA9, 0x80, 0xF6, 0xE7, + 0xAA, 0x81, 0xF6, 0xE7, 0xAF, 0x80, 0xF6, 0xE7, + 0xB7, 0xB4, 0xF6, 0xE7, 0xB8, 0x89, 0xF6, 0xE7, + 0xB9, 0x81, 0xF6, 0xE7, 0xBD, 0xB2, 0xF6, 0xE8, + 0x80, 0x85, 0xF6, 0xE8, 0x87, 0xAD, 0xF6, 0xE8, + 0x89, 0xB9, 0xF6, 0xE8, 0x89, 0xB9, 0xF6, 0xE8, + 0x91, 0x97, 0xF6, 0xE8, 0xA4, 0x90, 0xF6, 0xE8, + 0xA6, 0x96, 0xF6, 0xE8, 0xAC, 0x81, 0xF6, 0xE8, + 0xAC, 0xB9, 0xF6, 0xE8, 0xB3, 0x93, 0xF6, 0xE8, + 0xB4, 0x88, 0xF6, 0xE8, 0xBE, 0xB6, 0xF6, 0xE9, + 0x80, 0xB8, 0xF6, 0xE9, 0x9B, 0xA3, 0xF6, 0xE9, + 0x9F, 0xBF, 0xF6, 0xE9, 0xA0, 0xBB, 0xF6, 0xE4, + 0xB8, 0xA6, 0xF6, 0xE5, 0x86, 0xB5, 0xF6, 0xE5, + 0x85, 0xA8, 0xF6, 0xE4, 0xBE, 0x80, 0xF6, 0xE5, + 0x85, 0x85, 0xF6, 0xE5, 0x86, 0x80, 0xF6, 0xE5, + 0x8B, 0x87, 0xF6, 0xE5, 0x8B, 0xBA, 0xF6, 0xE5, + 0x96, 0x9D, 0xF6, 0xE5, 0x95, 0x95, 0xF6, 0xE5, + 0x96, 0x99, 0xF6, 0xE5, 0x97, 0xA2, 0xF6, 0xE5, + 0xA1, 0x9A, 0xF6, 0xE5, 0xA2, 0xB3, 0xF6, 0xE5, + 0xA5, 0x84, 0xF6, 0xE5, 0xA5, 0x94, 0xF6, 0xE5, + 0xA9, 0xA2, 0xF6, 0xE5, 0xAC, 0xA8, 0xF6, 0xE5, + 0xBB, 0x92, 0xF6, 0xE5, 0xBB, 0x99, 0xF6, 0xE5, + 0xBD, 0xA9, 0xF6, 0xE5, 0xBE, 0xAD, 0xF6, 0xE6, + 0x83, 0x98, 0xF6, 0xE6, 0x85, 0x8E, 0xF6, 0xE6, + 0x84, 0x88, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, 0xE6, + 0x85, 0xA0, 0xF6, 0xE6, 0x87, 0xB2, 0xF6, 0xE6, + 0x88, 0xB4, 0xF6, 0xE6, 0x8F, 0x84, 0xF6, 0xE6, + 0x90, 0x9C, 0xF6, 0xE6, 0x91, 0x92, 0xF6, 0xE6, + 0x95, 0x96, 0xF6, 0xE6, 0x99, 0xB4, 0xF6, 0xE6, + 0x9C, 0x97, 0xF6, 0xE6, 0x9C, 0x9B, 0xF6, 0xE6, + 0x9D, 0x96, 0xF6, 0xE6, 0xAD, 0xB9, 0xF6, 0xE6, + 0xAE, 0xBA, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, + 0xBB, 0x9B, 0xF6, 0xE6, 0xBB, 0x8B, 0xF6, 0xE6, + 0xBC, 0xA2, 0xF6, 0xE7, 0x80, 0x9E, 0xF6, 0xE7, + 0x85, 0xAE, 0xF6, 0xE7, 0x9E, 0xA7, 0xF6, 0xE7, + 0x88, 0xB5, 0xF6, 0xE7, 0x8A, 0xAF, 0xF6, 0xE7, + 0x8C, 0xAA, 0xF6, 0xE7, 0x91, 0xB1, 0xF6, 0xE7, + 0x94, 0x86, 0xF6, 0xE7, 0x94, 0xBB, 0xF6, 0xE7, + 0x98, 0x9D, 0xF6, 0xE7, 0x98, 0x9F, 0xF6, 0xE7, + 0x9B, 0x8A, 0xF6, 0xE7, 0x9B, 0x9B, 0xF6, 0xE7, + 0x9B, 0xB4, 0xF6, 0xE7, 0x9D, 0x8A, 0xF6, 0xE7, + 0x9D, 0x80, 0xF6, 0xE7, 0xA3, 0x8C, 0xF6, 0xE7, + 0xAA, 0xB1, 0xF6, 0xE7, 0xAF, 0x80, 0xF6, 0xE7, + 0xB1, 0xBB, 0xF6, 0xE7, 0xB5, 0x9B, 0xF6, 0xE7, + 0xB7, 0xB4, 0xF6, 0xE7, 0xBC, 0xBE, 0xF6, 0xE8, + 0x80, 0x85, 0xF6, 0xE8, 0x8D, 0x92, 0xF6, 0xE8, + 0x8F, 0xAF, 0xF6, 0xE8, 0x9D, 0xB9, 0xF6, 0xE8, + 0xA5, 0x81, 0xF6, 0xE8, 0xA6, 0x86, 0xF6, 0xE8, + 0xA6, 0x96, 0xF6, 0xE8, 0xAA, 0xBF, 0xF6, 0xE8, + 0xAB, 0xB8, 0xF6, 0xE8, 0xAB, 0x8B, 0xF6, 0xE8, + 0xAC, 0x81, 0xF6, 0xE8, 0xAB, 0xBE, 0xF6, 0xE8, + 0xAB, 0xAD, 0xF6, 0xE8, 0xAC, 0xB9, 0xF6, 0xE8, + 0xAE, 0x8A, 0xF6, 0xE8, 0xB4, 0x88, 0xF6, 0xE8, + 0xBC, 0xB8, 0xF6, 0xE9, 0x81, 0xB2, 0xF6, 0xE9, + 0x86, 0x99, 0xF6, 0xE9, 0x89, 0xB6, 0xF6, 0xE9, + 0x99, 0xBC, 0xF6, 0xE9, 0x9B, 0xA3, 0xF6, 0xE9, + 0x9D, 0x96, 0xF6, 0xE9, 0x9F, 0x9B, 0xF6, 0xE9, + 0x9F, 0xBF, 0xF6, 0xE9, 0xA0, 0x8B, 0xF6, 0xE9, + 0xA0, 0xBB, 0xF6, 0xE9, 0xAC, 0x92, 0xF6, 0xE9, + 0xBE, 0x9C, 0xF6, 0xF0, 0xA2, 0xA1, 0x8A, 0xF6, + 0xF0, 0xA2, 0xA1, 0x84, 0xF6, 0xF0, 0xA3, 0x8F, + 0x95, 0xF6, 0xE3, 0xAE, 0x9D, 0xF6, 0xE4, 0x80, + 0x98, 0xF6, 0xE4, 0x80, 0xB9, 0xF6, 0xF0, 0xA5, + 0x89, 0x89, 0xF6, 0xF0, 0xA5, 0xB3, 0x90, 0xF6, + 0xF0, 0xA7, 0xBB, 0x93, 0xF6, 0xE9, 0xBD, 0x83, + 0xF6, 0xE9, 0xBE, 0x8E, 0x66, 0x66, 0x66, 0x69, + 0x66, 0x6C, 0x66, 0x66, 0x69, 0x66, 0x66, 0x6C, + 0x73, 0x74, 0x73, 0x74, 0xD5, 0xB4, 0xD5, 0xB6, + 0xD5, 0xB4, 0xD5, 0xA5, 0xD5, 0xB4, 0xD5, 0xAB, + 0xD5, 0xBE, 0xD5, 0xB6, 0xD5, 0xB4, 0xD5, 0xAD, + 0xF6, 0xD7, 0x99, 0xD6, 0xB4, 0xF6, 0xD7, 0xB2, + 0xD6, 0xB7, 0xD7, 0xA2, 0xD7, 0x90, 0xD7, 0x93, + 0xD7, 0x94, 0xD7, 0x9B, 0xD7, 0x9C, 0xD7, 0x9D, + 0xD7, 0xA8, 0xD7, 0xAA, 0x2B, 0xF6, 0xD7, 0xA9, + 0xD7, 0x81, 0xF6, 0xD7, 0xA9, 0xD7, 0x82, 0xF6, + 0xD7, 0xA9, 0xD6, 0xBC, 0xD7, 0x81, 0xF6, 0xD7, + 0xA9, 0xD6, 0xBC, 0xD7, 0x82, 0xF6, 0xD7, 0x90, + 0xD6, 0xB7, 0xF6, 0xD7, 0x90, 0xD6, 0xB8, 0xF6, + 0xD7, 0x90, 0xD6, 0xBC, 0xF6, 0xD7, 0x91, 0xD6, + 0xBC, 0xF6, 0xD7, 0x92, 0xD6, 0xBC, 0xF6, 0xD7, + 0x93, 0xD6, 0xBC, 0xF6, 0xD7, 0x94, 0xD6, 0xBC, + 0xF6, 0xD7, 0x95, 0xD6, 0xBC, 0xF6, 0xD7, 0x96, + 0xD6, 0xBC, 0xF6, 0xD7, 0x98, 0xD6, 0xBC, 0xF6, + 0xD7, 0x99, 0xD6, 0xBC, 0xF6, 0xD7, 0x9A, 0xD6, + 0xBC, 0xF6, 0xD7, 0x9B, 0xD6, 0xBC, 0xF6, 0xD7, + 0x9C, 0xD6, 0xBC, 0xF6, 0xD7, 0x9E, 0xD6, 0xBC, + 0xF6, 0xD7, 0xA0, 0xD6, 0xBC, 0xF6, 0xD7, 0xA1, + 0xD6, 0xBC, 0xF6, 0xD7, 0xA3, 0xD6, 0xBC, 0xF6, + 0xD7, 0xA4, 0xD6, 0xBC, 0xF6, 0xD7, 0xA6, 0xD6, + 0xBC, 0xF6, 0xD7, 0xA7, 0xD6, 0xBC, 0xF6, 0xD7, + 0xA8, 0xD6, 0xBC, 0xF6, 0xD7, 0xA9, 0xD6, 0xBC, + 0xF6, 0xD7, 0xAA, 0xD6, 0xBC, 0xF6, 0xD7, 0x95, + 0xD6, 0xB9, 0xF6, 0xD7, 0x91, 0xD6, 0xBF, 0xF6, + 0xD7, 0x9B, 0xD6, 0xBF, 0xF6, 0xD7, 0xA4, 0xD6, + 0xBF, 0xD7, 0x90, 0xD7, 0x9C, 0xD9, 0xB1, 0xD9, + 0xB1, 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, + 0xBB, 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, + 0xBE, 0xDA, 0x80, 0xDA, 0x80, 0xDA, 0x80, 0xDA, + 0x80, 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, + 0xBA, 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, + 0xBF, 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, + 0xB9, 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, + 0xA4, 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, + 0xA6, 0xDA, 0x84, 0xDA, 0x84, 0xDA, 0x84, 0xDA, + 0x84, 0xDA, 0x83, 0xDA, 0x83, 0xDA, 0x83, 0xDA, + 0x83, 0xDA, 0x86, 0xDA, 0x86, 0xDA, 0x86, 0xDA, + 0x86, 0xDA, 0x87, 0xDA, 0x87, 0xDA, 0x87, 0xDA, + 0x87, 0xDA, 0x8D, 0xDA, 0x8D, 0xDA, 0x8C, 0xDA, + 0x8C, 0xDA, 0x8E, 0xDA, 0x8E, 0xDA, 0x88, 0xDA, + 0x88, 0xDA, 0x98, 0xDA, 0x98, 0xDA, 0x91, 0xDA, + 0x91, 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, + 0xA9, 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, + 0xAF, 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, + 0xB3, 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, + 0xB1, 0xDA, 0xBA, 0xDA, 0xBA, 0xDA, 0xBB, 0xDA, + 0xBB, 0xDA, 0xBB, 0xDA, 0xBB, 0xDB, 0x95, 0xD9, + 0x94, 0xDB, 0x95, 0xD9, 0x94, 0xDB, 0x81, 0xDB, + 0x81, 0xDB, 0x81, 0xDB, 0x81, 0xDA, 0xBE, 0xDA, + 0xBE, 0xDA, 0xBE, 0xDA, 0xBE, 0xDB, 0x92, 0xDB, + 0x92, 0xDB, 0x92, 0xD9, 0x94, 0xDB, 0x92, 0xD9, + 0x94, 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, + 0xAD, 0xDB, 0x87, 0xDB, 0x87, 0xDB, 0x86, 0xDB, + 0x86, 0xDB, 0x88, 0xDB, 0x88, 0xDB, 0x87, 0xD9, + 0xB4, 0xDB, 0x8B, 0xDB, 0x8B, 0xDB, 0x85, 0xDB, + 0x85, 0xDB, 0x89, 0xDB, 0x89, 0xDB, 0x90, 0xDB, + 0x90, 0xDB, 0x90, 0xDB, 0x90, 0xD9, 0x89, 0xD9, + 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, + 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x8A, 0xD9, + 0x94, 0xDB, 0x95, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, + 0x95, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x88, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x8A, 0xD9, + 0x94, 0xDB, 0x87, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, + 0x87, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x86, 0xD9, + 0x8A, 0xD9, 0x94, 0xDB, 0x86, 0xD9, 0x8A, 0xD9, + 0x94, 0xDB, 0x88, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, + 0x88, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x90, 0xD9, + 0x8A, 0xD9, 0x94, 0xDB, 0x90, 0xD9, 0x8A, 0xD9, + 0x94, 0xDB, 0x90, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, + 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xDB, 0x8C, 0xDB, + 0x8C, 0xDB, 0x8C, 0xDB, 0x8C, 0xD9, 0x8A, 0xD9, + 0x94, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, + 0xAD, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xD9, 0x8A, 0xD9, + 0x94, 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, + 0xA8, 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, + 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x89, 0xD8, + 0xA8, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD8, + 0xAA, 0xD8, 0xAD, 0xD8, 0xAA, 0xD8, 0xAE, 0xD8, + 0xAA, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x89, 0xD8, + 0xAA, 0xD9, 0x8A, 0xD8, 0xAB, 0xD8, 0xAC, 0xD8, + 0xAB, 0xD9, 0x85, 0xD8, 0xAB, 0xD9, 0x89, 0xD8, + 0xAB, 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, + 0xAC, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, + 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD8, + 0xAE, 0xD8, 0xAD, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, + 0xB3, 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, + 0xB3, 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, + 0xB5, 0xD8, 0xAD, 0xD8, 0xB5, 0xD9, 0x85, 0xD8, + 0xB6, 0xD8, 0xAC, 0xD8, 0xB6, 0xD8, 0xAD, 0xD8, + 0xB6, 0xD8, 0xAE, 0xD8, 0xB6, 0xD9, 0x85, 0xD8, + 0xB7, 0xD8, 0xAD, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, + 0xB8, 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, + 0xB9, 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, + 0xBA, 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, + 0x81, 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, + 0x81, 0xD9, 0x85, 0xD9, 0x81, 0xD9, 0x89, 0xD9, + 0x81, 0xD9, 0x8A, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, + 0x82, 0xD9, 0x85, 0xD9, 0x82, 0xD9, 0x89, 0xD9, + 0x82, 0xD9, 0x8A, 0xD9, 0x83, 0xD8, 0xA7, 0xD9, + 0x83, 0xD8, 0xAC, 0xD9, 0x83, 0xD8, 0xAD, 0xD9, + 0x83, 0xD8, 0xAE, 0xD9, 0x83, 0xD9, 0x84, 0xD9, + 0x83, 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x89, 0xD9, + 0x83, 0xD9, 0x8A, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, + 0x84, 0xD8, 0xAD, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, + 0x84, 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x89, 0xD9, + 0x84, 0xD9, 0x8A, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, + 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, + 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x89, 0xD9, + 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, + 0x86, 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, + 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x89, 0xD9, + 0x86, 0xD9, 0x8A, 0xD9, 0x87, 0xD8, 0xAC, 0xD9, + 0x87, 0xD9, 0x85, 0xD9, 0x87, 0xD9, 0x89, 0xD9, + 0x87, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, + 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x89, 0xD9, + 0x8A, 0xD9, 0x8A, 0xD8, 0xB0, 0xD9, 0xB0, 0xD8, + 0xB1, 0xD9, 0xB0, 0xD9, 0x89, 0xD9, 0xB0, 0x20, + 0xD9, 0x8C, 0xD9, 0x91, 0x20, 0xD9, 0x8D, 0xD9, + 0x91, 0x20, 0xD9, 0x8E, 0xD9, 0x91, 0x20, 0xD9, + 0x8F, 0xD9, 0x91, 0x20, 0xD9, 0x90, 0xD9, 0x91, + 0x20, 0xD9, 0x91, 0xD9, 0xB0, 0xD9, 0x8A, 0xD9, + 0x94, 0xD8, 0xB1, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, + 0xB2, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, + 0x94, 0xD9, 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, + 0x8A, 0xD8, 0xA8, 0xD8, 0xB1, 0xD8, 0xA8, 0xD8, + 0xB2, 0xD8, 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, + 0x86, 0xD8, 0xA8, 0xD9, 0x89, 0xD8, 0xA8, 0xD9, + 0x8A, 0xD8, 0xAA, 0xD8, 0xB1, 0xD8, 0xAA, 0xD8, + 0xB2, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, + 0x86, 0xD8, 0xAA, 0xD9, 0x89, 0xD8, 0xAA, 0xD9, + 0x8A, 0xD8, 0xAB, 0xD8, 0xB1, 0xD8, 0xAB, 0xD8, + 0xB2, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAB, 0xD9, + 0x86, 0xD8, 0xAB, 0xD9, 0x89, 0xD8, 0xAB, 0xD9, + 0x8A, 0xD9, 0x81, 0xD9, 0x89, 0xD9, 0x81, 0xD9, + 0x8A, 0xD9, 0x82, 0xD9, 0x89, 0xD9, 0x82, 0xD9, + 0x8A, 0xD9, 0x83, 0xD8, 0xA7, 0xD9, 0x83, 0xD9, + 0x84, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x83, 0xD9, + 0x89, 0xD9, 0x83, 0xD9, 0x8A, 0xD9, 0x84, 0xD9, + 0x85, 0xD9, 0x84, 0xD9, 0x89, 0xD9, 0x84, 0xD9, + 0x8A, 0xD9, 0x85, 0xD8, 0xA7, 0xD9, 0x85, 0xD9, + 0x85, 0xD9, 0x86, 0xD8, 0xB1, 0xD9, 0x86, 0xD8, + 0xB2, 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, + 0x86, 0xD9, 0x86, 0xD9, 0x89, 0xD9, 0x86, 0xD9, + 0x8A, 0xD9, 0x89, 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, + 0xB1, 0xD9, 0x8A, 0xD8, 0xB2, 0xD9, 0x8A, 0xD9, + 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, + 0x89, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, + 0x94, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, + 0xAD, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAE, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, + 0x94, 0xD9, 0x87, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, + 0xA8, 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, + 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x87, 0xD8, + 0xAA, 0xD8, 0xAC, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, + 0xAA, 0xD8, 0xAE, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, + 0xAA, 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, + 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, + 0xAD, 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, + 0xAE, 0xD8, 0xAC, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, + 0xB3, 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, + 0xB3, 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, + 0xB5, 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAE, 0xD8, + 0xB5, 0xD9, 0x85, 0xD8, 0xB6, 0xD8, 0xAC, 0xD8, + 0xB6, 0xD8, 0xAD, 0xD8, 0xB6, 0xD8, 0xAE, 0xD8, + 0xB6, 0xD9, 0x85, 0xD8, 0xB7, 0xD8, 0xAD, 0xD8, + 0xB8, 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, + 0xB9, 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, + 0xBA, 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, + 0x81, 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, + 0x81, 0xD9, 0x85, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, + 0x82, 0xD9, 0x85, 0xD9, 0x83, 0xD8, 0xAC, 0xD9, + 0x83, 0xD8, 0xAD, 0xD9, 0x83, 0xD8, 0xAE, 0xD9, + 0x83, 0xD9, 0x84, 0xD9, 0x83, 0xD9, 0x85, 0xD9, + 0x84, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, + 0x84, 0xD8, 0xAE, 0xD9, 0x84, 0xD9, 0x85, 0xD9, + 0x84, 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, + 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, + 0x85, 0xD9, 0x85, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, + 0x86, 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, + 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, + 0x87, 0xD8, 0xAC, 0xD9, 0x87, 0xD9, 0x85, 0xD9, + 0x87, 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, + 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, + 0x94, 0xD9, 0x87, 0xD8, 0xA8, 0xD9, 0x85, 0xD8, + 0xA8, 0xD9, 0x87, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, + 0xAA, 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, + 0xAB, 0xD9, 0x87, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, + 0xB3, 0xD9, 0x87, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, + 0xB4, 0xD9, 0x87, 0xD9, 0x83, 0xD9, 0x84, 0xD9, + 0x83, 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x85, 0xD9, + 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, + 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, + 0x80, 0xD9, 0x8E, 0xD9, 0x91, 0xD9, 0x80, 0xD9, + 0x8F, 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x90, 0xD9, + 0x91, 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, + 0x8A, 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, + 0x8A, 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, + 0x8A, 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, + 0x8A, 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, + 0x8A, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, + 0x8A, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, + 0x8A, 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, + 0x8A, 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, + 0x8A, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, + 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, + 0x85, 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, + 0xB1, 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, + 0xB1, 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, + 0x8A, 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, + 0x8A, 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, + 0x8A, 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, + 0x8A, 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, + 0x8A, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, + 0x8A, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, + 0x8A, 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, + 0x8A, 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, + 0x8A, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, + 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, + 0x85, 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, + 0xB1, 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, + 0xB1, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, + 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, + 0x85, 0xD8, 0xB3, 0xD9, 0x87, 0xD8, 0xB4, 0xD9, + 0x87, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, + 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, 0xD8, + 0xAE, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, + 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB7, 0xD9, + 0x85, 0xD8, 0xB8, 0xD9, 0x85, 0xD8, 0xA7, 0xD9, + 0x8B, 0xD8, 0xA7, 0xD9, 0x8B, 0xD8, 0xAA, 0xD8, + 0xAC, 0xD9, 0x85, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, + 0xAC, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, + 0xAA, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAA, 0xD8, + 0xAE, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, + 0xAC, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, + 0xAA, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, + 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, + 0xAD, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, + 0xAD, 0xD9, 0x85, 0xD9, 0x89, 0xD8, 0xB3, 0xD8, + 0xAD, 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAC, 0xD8, + 0xAD, 0xD8, 0xB3, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, + 0xB3, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, + 0x85, 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, + 0xAC, 0xD8, 0xB3, 0xD9, 0x85, 0xD9, 0x85, 0xD8, + 0xB3, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB5, 0xD8, + 0xAD, 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAD, 0xD8, + 0xAD, 0xD8, 0xB5, 0xD9, 0x85, 0xD9, 0x85, 0xD8, + 0xB4, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB4, 0xD8, + 0xAD, 0xD9, 0x85, 0xD8, 0xB4, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, + 0xB4, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, + 0x85, 0xD9, 0x85, 0xD8, 0xB4, 0xD9, 0x85, 0xD9, + 0x85, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, + 0xB6, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB6, 0xD8, + 0xAE, 0xD9, 0x85, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, + 0xAD, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, + 0xB7, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB7, 0xD9, + 0x85, 0xD9, 0x8A, 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, + 0x85, 0xD8, 0xB9, 0xD9, 0x85, 0xD9, 0x85, 0xD8, + 0xB9, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, + 0x85, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, + 0x85, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, + 0xBA, 0xD9, 0x85, 0xD9, 0x89, 0xD9, 0x81, 0xD8, + 0xAE, 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, + 0x85, 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, + 0x82, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x84, 0xD8, + 0xAD, 0xD9, 0x85, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, + 0x8A, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x89, 0xD9, + 0x84, 0xD8, 0xAC, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, + 0xAC, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, + 0x85, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, 0xD9, + 0x84, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x84, 0xD9, + 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, + 0xAC, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, + 0x85, 0xD8, 0xAD, 0xD9, 0x8A, 0xD9, 0x85, 0xD8, + 0xAC, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, + 0x85, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, + 0x85, 0xD8, 0xAE, 0xD9, 0x85, 0xD9, 0x85, 0xD8, + 0xAC, 0xD8, 0xAE, 0xD9, 0x87, 0xD9, 0x85, 0xD8, + 0xAC, 0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x85, 0xD9, + 0x86, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x86, 0xD8, + 0xAD, 0xD9, 0x89, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, + 0x85, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, + 0x86, 0xD8, 0xAC, 0xD9, 0x89, 0xD9, 0x86, 0xD9, + 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x85, 0xD9, + 0x89, 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x85, 0xD9, + 0x8A, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xA8, 0xD8, + 0xAE, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, + 0xAA, 0xD8, 0xAE, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, + 0xAE, 0xD9, 0x89, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, + 0x8A, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x89, 0xD8, + 0xAC, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, + 0xAD, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, + 0x89, 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, + 0xB5, 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xB4, 0xD8, + 0xAD, 0xD9, 0x8A, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, + 0x8A, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, + 0x84, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, + 0xAD, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, + 0x85, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x82, 0xD9, + 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAD, 0xD9, + 0x8A, 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, + 0x84, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, + 0x85, 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, + 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, + 0x85, 0xD8, 0xAE, 0xD9, 0x8A, 0xD9, 0x84, 0xD8, + 0xAC, 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x85, 0xD9, + 0x85, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, + 0x86, 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, + 0xAD, 0xD9, 0x8A, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, + 0x81, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, + 0xAD, 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, + 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, + 0xB5, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, + 0xAE, 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, + 0x8A, 0xD8, 0xB5, 0xD9, 0x84, 0xDB, 0x92, 0xD9, + 0x82, 0xD9, 0x84, 0xDB, 0x92, 0xD8, 0xA7, 0xD9, + 0x84, 0xD9, 0x84, 0xD9, 0x87, 0xD8, 0xA7, 0xD9, + 0x83, 0xD8, 0xA8, 0xD8, 0xB1, 0xD9, 0x85, 0xD8, + 0xAD, 0xD9, 0x85, 0xD8, 0xAF, 0xD8, 0xB5, 0xD9, + 0x84, 0xD8, 0xB9, 0xD9, 0x85, 0xD8, 0xB1, 0xD8, + 0xB3, 0xD9, 0x88, 0xD9, 0x84, 0xD8, 0xB9, 0xD9, + 0x84, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x88, 0xD8, + 0xB3, 0xD9, 0x84, 0xD9, 0x85, 0xD8, 0xB5, 0xD9, + 0x84, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x84, 0xD9, + 0x89, 0x20, 0xD8, 0xA7, 0xD9, 0x84, 0xD9, 0x84, + 0xD9, 0x87, 0x20, 0xD8, 0xB9, 0xD9, 0x84, 0xD9, + 0x8A, 0xD9, 0x87, 0x20, 0xD9, 0x88, 0xD8, 0xB3, + 0xD9, 0x84, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x84, + 0x20, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, + 0x84, 0xD9, 0x87, 0xD8, 0xB1, 0xDB, 0x8C, 0xD8, + 0xA7, 0xD9, 0x84, 0x2C, 0xE3, 0x80, 0x81, 0xE3, + 0x80, 0x82, 0x3A, 0x3B, 0x21, 0x3F, 0xE3, 0x80, + 0x96, 0xE3, 0x80, 0x97, 0x2E, 0x2E, 0x2E, 0x2E, + 0x2E, 0xE2, 0x80, 0x94, 0xE2, 0x80, 0x93, 0x5F, + 0x5F, 0x28, 0x29, 0x7B, 0x7D, 0xE3, 0x80, 0x94, + 0xE3, 0x80, 0x95, 0xE3, 0x80, 0x90, 0xE3, 0x80, + 0x91, 0xE3, 0x80, 0x8A, 0xE3, 0x80, 0x8B, 0xE3, + 0x80, 0x88, 0xE3, 0x80, 0x89, 0xE3, 0x80, 0x8C, + 0xE3, 0x80, 0x8D, 0xE3, 0x80, 0x8E, 0xE3, 0x80, + 0x8F, 0x5B, 0x5D, 0x20, 0xCC, 0x85, 0x20, 0xCC, + 0x85, 0x20, 0xCC, 0x85, 0x20, 0xCC, 0x85, 0x5F, + 0x5F, 0x5F, 0x2C, 0xE3, 0x80, 0x81, 0x2E, 0x3B, + 0x3A, 0x3F, 0x21, 0xE2, 0x80, 0x94, 0x28, 0x29, + 0x7B, 0x7D, 0xE3, 0x80, 0x94, 0xE3, 0x80, 0x95, + 0x23, 0x26, 0x2A, 0x2B, 0x2D, 0x3C, 0x3E, 0x3D, + 0x5C, 0x24, 0x25, 0x40, 0x20, 0xD9, 0x8B, 0xD9, + 0x80, 0xD9, 0x8B, 0x20, 0xD9, 0x8C, 0x20, 0xD9, + 0x8D, 0x20, 0xD9, 0x8E, 0xD9, 0x80, 0xD9, 0x8E, + 0x20, 0xD9, 0x8F, 0xD9, 0x80, 0xD9, 0x8F, 0x20, + 0xD9, 0x90, 0xD9, 0x80, 0xD9, 0x90, 0x20, 0xD9, + 0x91, 0xD9, 0x80, 0xD9, 0x91, 0x20, 0xD9, 0x92, + 0xD9, 0x80, 0xD9, 0x92, 0xD8, 0xA1, 0xD8, 0xA7, + 0xD9, 0x93, 0xD8, 0xA7, 0xD9, 0x93, 0xD8, 0xA7, + 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, 0x88, + 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x94, 0xD8, 0xA7, + 0xD9, 0x95, 0xD8, 0xA7, 0xD9, 0x95, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xA7, + 0xD8, 0xA7, 0xD8, 0xA8, 0xD8, 0xA8, 0xD8, 0xA8, + 0xD8, 0xA8, 0xD8, 0xA9, 0xD8, 0xA9, 0xD8, 0xAA, + 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, 0xAB, + 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, 0xAC, + 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, 0xAD, + 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, 0xAE, + 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, 0xAF, + 0xD8, 0xAF, 0xD8, 0xB0, 0xD8, 0xB0, 0xD8, 0xB1, + 0xD8, 0xB1, 0xD8, 0xB2, 0xD8, 0xB2, 0xD8, 0xB3, + 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, 0xB4, + 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, 0xB5, + 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, 0xB6, + 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, 0xB7, + 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, 0xB8, + 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, 0xB9, + 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, 0xBA, + 0xD8, 0xBA, 0xD8, 0xBA, 0xD8, 0xBA, 0xD9, 0x81, + 0xD9, 0x81, 0xD9, 0x81, 0xD9, 0x81, 0xD9, 0x82, + 0xD9, 0x82, 0xD9, 0x82, 0xD9, 0x82, 0xD9, 0x83, + 0xD9, 0x83, 0xD9, 0x83, 0xD9, 0x83, 0xD9, 0x84, + 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x85, + 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x86, + 0xD9, 0x86, 0xD9, 0x86, 0xD9, 0x86, 0xD9, 0x87, + 0xD9, 0x87, 0xD9, 0x87, 0xD9, 0x87, 0xD9, 0x88, + 0xD9, 0x88, 0xD9, 0x89, 0xD9, 0x89, 0xD9, 0x8A, + 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x84, + 0xD8, 0xA7, 0xD9, 0x93, 0xD9, 0x84, 0xD8, 0xA7, + 0xD9, 0x93, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, + 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, 0x84, + 0xD8, 0xA7, 0xD9, 0x95, 0xD9, 0x84, 0xD8, 0xA7, + 0xD9, 0x95, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x84, + 0xD8, 0xA7, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, + 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, + 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, + 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, + 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, + 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, + 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, + 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, + 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, + 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, + 0xE2, 0xA6, 0x85, 0xE2, 0xA6, 0x86, 0xE3, 0x80, + 0x82, 0xE3, 0x80, 0x8C, 0xE3, 0x80, 0x8D, 0xE3, + 0x80, 0x81, 0xE3, 0x83, 0xBB, 0xE3, 0x83, 0xB2, + 0xE3, 0x82, 0xA1, 0xE3, 0x82, 0xA3, 0xE3, 0x82, + 0xA5, 0xE3, 0x82, 0xA7, 0xE3, 0x82, 0xA9, 0xE3, + 0x83, 0xA3, 0xE3, 0x83, 0xA5, 0xE3, 0x83, 0xA7, + 0xE3, 0x83, 0x83, 0xE3, 0x83, 0xBC, 0xE3, 0x82, + 0xA2, 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xA6, 0xE3, + 0x82, 0xA8, 0xE3, 0x82, 0xAA, 0xE3, 0x82, 0xAB, + 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x82, + 0xB1, 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0xB5, 0xE3, + 0x82, 0xB7, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xBB, + 0xE3, 0x82, 0xBD, 0xE3, 0x82, 0xBF, 0xE3, 0x83, + 0x81, 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x86, 0xE3, + 0x83, 0x88, 0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8B, + 0xE3, 0x83, 0x8C, 0xE3, 0x83, 0x8D, 0xE3, 0x83, + 0x8E, 0xE3, 0x83, 0x8F, 0xE3, 0x83, 0x92, 0xE3, + 0x83, 0x95, 0xE3, 0x83, 0x98, 0xE3, 0x83, 0x9B, + 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0x9F, 0xE3, 0x83, + 0xA0, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xA2, 0xE3, + 0x83, 0xA4, 0xE3, 0x83, 0xA6, 0xE3, 0x83, 0xA8, + 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xAA, 0xE3, 0x83, + 0xAB, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xAD, 0xE3, + 0x83, 0xAF, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0x99, + 0xE3, 0x82, 0x9A, 0xE1, 0x85, 0xA0, 0xE1, 0x84, + 0x80, 0xE1, 0x84, 0x81, 0xE1, 0x86, 0xAA, 0xE1, + 0x84, 0x82, 0xE1, 0x86, 0xAC, 0xE1, 0x86, 0xAD, + 0xE1, 0x84, 0x83, 0xE1, 0x84, 0x84, 0xE1, 0x84, + 0x85, 0xE1, 0x86, 0xB0, 0xE1, 0x86, 0xB1, 0xE1, + 0x86, 0xB2, 0xE1, 0x86, 0xB3, 0xE1, 0x86, 0xB4, + 0xE1, 0x86, 0xB5, 0xE1, 0x84, 0x9A, 0xE1, 0x84, + 0x86, 0xE1, 0x84, 0x87, 0xE1, 0x84, 0x88, 0xE1, + 0x84, 0xA1, 0xE1, 0x84, 0x89, 0xE1, 0x84, 0x8A, + 0xE1, 0x84, 0x8B, 0xE1, 0x84, 0x8C, 0xE1, 0x84, + 0x8D, 0xE1, 0x84, 0x8E, 0xE1, 0x84, 0x8F, 0xE1, + 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, 0x84, 0x92, + 0xE1, 0x85, 0xA1, 0xE1, 0x85, 0xA2, 0xE1, 0x85, + 0xA3, 0xE1, 0x85, 0xA4, 0xE1, 0x85, 0xA5, 0xE1, + 0x85, 0xA6, 0xE1, 0x85, 0xA7, 0xE1, 0x85, 0xA8, + 0xE1, 0x85, 0xA9, 0xE1, 0x85, 0xAA, 0xE1, 0x85, + 0xAB, 0xE1, 0x85, 0xAC, 0xE1, 0x85, 0xAD, 0xE1, + 0x85, 0xAE, 0xE1, 0x85, 0xAF, 0xE1, 0x85, 0xB0, + 0xE1, 0x85, 0xB1, 0xE1, 0x85, 0xB2, 0xE1, 0x85, + 0xB3, 0xE1, 0x85, 0xB4, 0xE1, 0x85, 0xB5, 0xC2, + 0xA2, 0xC2, 0xA3, 0xC2, 0xAC, 0x20, 0xCC, 0x84, + 0xC2, 0xA6, 0xC2, 0xA5, 0xE2, 0x82, 0xA9, 0xE2, + 0x94, 0x82, 0xE2, 0x86, 0x90, 0xE2, 0x86, 0x91, + 0xE2, 0x86, 0x92, 0xE2, 0x86, 0x93, 0xE2, 0x96, + 0xA0, 0xE2, 0x97, 0x8B, 0xF6, 0xF0, 0x9D, 0x85, + 0x97, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, 0xF0, 0x9D, + 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, 0xF0, + 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, + 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x85, 0x98, + 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, + 0xF6, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, + 0xA5, 0xF0, 0x9D, 0x85, 0xB0, 0xF6, 0xF0, 0x9D, + 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, + 0x85, 0xB1, 0xF6, 0xF0, 0x9D, 0x85, 0x98, 0xF0, + 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB2, 0xF6, + 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, 0x85, 0xA5, + 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, + 0xA5, 0xF6, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, + 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE, 0xF6, 0xF0, + 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, + 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x86, 0xB9, + 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, + 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, + 0xA5, 0xF0, 0x9D, 0x85, 0xAF, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, + 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, + 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, + 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, + 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, + 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, + 0x41, 0x43, 0x44, 0x47, 0x4A, 0x4B, 0x4E, 0x4F, + 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x66, 0x68, + 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, + 0x45, 0x46, 0x47, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, + 0x4F, 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, + 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, + 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, + 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, 0x45, + 0x46, 0x47, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4F, + 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, + 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, + 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, + 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7A, 0xC4, 0xB1, 0xC8, 0xB7, 0xCE, 0x91, 0xCE, + 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, + 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, + 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, + 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, + 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, + 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, + 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, + 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, + 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, + 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, + 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, + 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, + 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, + 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, + 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, + 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, + 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, + 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, + 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, + 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, + 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, + 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, + 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, + 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, + 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, + 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, + 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, + 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, + 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, + 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, + 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, + 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, + 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, + 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, + 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, + 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, + 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, + 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, + 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, + 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, + 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, + 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, + 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, + 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, + 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, + 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, + 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, + 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, + 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, + 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, + 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, + 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, + 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, + 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, + 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, + 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, + 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, + 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, + 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, + 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, + 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, + 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, + 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, + 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, + 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, + 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, + 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, + 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, + 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, + 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, + 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, + 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, + 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, + 0x81, 0xCF, 0x80, 0xCF, 0x9C, 0xCF, 0x9D, 0x30, + 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, + 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + 0x39, 0xF6, 0xE4, 0xB8, 0xBD, 0xF6, 0xE4, 0xB8, + 0xB8, 0xF6, 0xE4, 0xB9, 0x81, 0xF6, 0xF0, 0xA0, + 0x84, 0xA2, 0xF6, 0xE4, 0xBD, 0xA0, 0xF6, 0xE4, + 0xBE, 0xAE, 0xF6, 0xE4, 0xBE, 0xBB, 0xF6, 0xE5, + 0x80, 0x82, 0xF6, 0xE5, 0x81, 0xBA, 0xF6, 0xE5, + 0x82, 0x99, 0xF6, 0xE5, 0x83, 0xA7, 0xF6, 0xE5, + 0x83, 0x8F, 0xF6, 0xE3, 0x92, 0x9E, 0xF6, 0xF0, + 0xA0, 0x98, 0xBA, 0xF6, 0xE5, 0x85, 0x8D, 0xF6, + 0xE5, 0x85, 0x94, 0xF6, 0xE5, 0x85, 0xA4, 0xF6, + 0xE5, 0x85, 0xB7, 0xF6, 0xF0, 0xA0, 0x94, 0x9C, + 0xF6, 0xE3, 0x92, 0xB9, 0xF6, 0xE5, 0x85, 0xA7, + 0xF6, 0xE5, 0x86, 0x8D, 0xF6, 0xF0, 0xA0, 0x95, + 0x8B, 0xF6, 0xE5, 0x86, 0x97, 0xF6, 0xE5, 0x86, + 0xA4, 0xF6, 0xE4, 0xBB, 0x8C, 0xF6, 0xE5, 0x86, + 0xAC, 0xF6, 0xE5, 0x86, 0xB5, 0xF6, 0xF0, 0xA9, + 0x87, 0x9F, 0xF6, 0xE5, 0x87, 0xB5, 0xF6, 0xE5, + 0x88, 0x83, 0xF6, 0xE3, 0x93, 0x9F, 0xF6, 0xE5, + 0x88, 0xBB, 0xF6, 0xE5, 0x89, 0x86, 0xF6, 0xE5, + 0x89, 0xB2, 0xF6, 0xE5, 0x89, 0xB7, 0xF6, 0xE3, + 0x94, 0x95, 0xF6, 0xE5, 0x8B, 0x87, 0xF6, 0xE5, + 0x8B, 0x89, 0xF6, 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, + 0x8B, 0xBA, 0xF6, 0xE5, 0x8C, 0x85, 0xF6, 0xE5, + 0x8C, 0x86, 0xF6, 0xE5, 0x8C, 0x97, 0xF6, 0xE5, + 0x8D, 0x89, 0xF6, 0xE5, 0x8D, 0x91, 0xF6, 0xE5, + 0x8D, 0x9A, 0xF6, 0xE5, 0x8D, 0xB3, 0xF6, 0xE5, + 0x8D, 0xBD, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xE5, + 0x8D, 0xBF, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xF0, + 0xA0, 0xA8, 0xAC, 0xF6, 0xE7, 0x81, 0xB0, 0xF6, + 0xE5, 0x8F, 0x8A, 0xF6, 0xE5, 0x8F, 0x9F, 0xF6, + 0xF0, 0xA0, 0xAD, 0xA3, 0xF6, 0xE5, 0x8F, 0xAB, + 0xF6, 0xE5, 0x8F, 0xB1, 0xF6, 0xE5, 0x90, 0x86, + 0xF6, 0xE5, 0x92, 0x9E, 0xF6, 0xE5, 0x90, 0xB8, + 0xF6, 0xE5, 0x91, 0x88, 0xF6, 0xE5, 0x91, 0xA8, + 0xF6, 0xE5, 0x92, 0xA2, 0xF6, 0xE5, 0x93, 0xB6, + 0xF6, 0xE5, 0x94, 0x90, 0xF6, 0xE5, 0x95, 0x93, + 0xF6, 0xE5, 0x95, 0xA3, 0xF6, 0xE5, 0x96, 0x84, + 0xF6, 0xE5, 0x96, 0x84, 0xF6, 0xE5, 0x96, 0x99, + 0xF6, 0xE5, 0x96, 0xAB, 0xF6, 0xE5, 0x96, 0xB3, + 0xF6, 0xE5, 0x97, 0x82, 0xF6, 0xE5, 0x9C, 0x96, + 0xF6, 0xE5, 0x98, 0x86, 0xF6, 0xE5, 0x9C, 0x97, + 0xF6, 0xE5, 0x99, 0x91, 0xF6, 0xE5, 0x99, 0xB4, + 0xF6, 0xE5, 0x88, 0x87, 0xF6, 0xE5, 0xA3, 0xAE, + 0xF6, 0xE5, 0x9F, 0x8E, 0xF6, 0xE5, 0x9F, 0xB4, + 0xF6, 0xE5, 0xA0, 0x8D, 0xF6, 0xE5, 0x9E, 0x8B, + 0xF6, 0xE5, 0xA0, 0xB2, 0xF6, 0xE5, 0xA0, 0xB1, + 0xF6, 0xE5, 0xA2, 0xAC, 0xF6, 0xF0, 0xA1, 0x93, + 0xA4, 0xF6, 0xE5, 0xA3, 0xB2, 0xF6, 0xE5, 0xA3, + 0xB7, 0xF6, 0xE5, 0xA4, 0x86, 0xF6, 0xE5, 0xA4, + 0x9A, 0xF6, 0xE5, 0xA4, 0xA2, 0xF6, 0xE5, 0xA5, + 0xA2, 0xF6, 0xF0, 0xA1, 0x9A, 0xA8, 0xF6, 0xF0, + 0xA1, 0x9B, 0xAA, 0xF6, 0xE5, 0xA7, 0xAC, 0xF6, + 0xE5, 0xA8, 0x9B, 0xF6, 0xE5, 0xA8, 0xA7, 0xF6, + 0xE5, 0xA7, 0x98, 0xF6, 0xE5, 0xA9, 0xA6, 0xF6, + 0xE3, 0x9B, 0xAE, 0xF6, 0xE3, 0x9B, 0xBC, 0xF6, + 0xE5, 0xAC, 0x88, 0xF6, 0xE5, 0xAC, 0xBE, 0xF6, + 0xE5, 0xAC, 0xBE, 0xF6, 0xF0, 0xA1, 0xA7, 0x88, + 0xF6, 0xE5, 0xAF, 0x83, 0xF6, 0xE5, 0xAF, 0x98, + 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, 0xAF, 0xB3, + 0xF6, 0xF0, 0xA1, 0xAC, 0x98, 0xF6, 0xE5, 0xAF, + 0xBF, 0xF6, 0xE5, 0xB0, 0x86, 0xF6, 0xE5, 0xBD, + 0x93, 0xF6, 0xE5, 0xB0, 0xA2, 0xF6, 0xE3, 0x9E, + 0x81, 0xF6, 0xE5, 0xB1, 0xA0, 0xF6, 0xE5, 0xB1, + 0xAE, 0xF6, 0xE5, 0xB3, 0x80, 0xF6, 0xE5, 0xB2, + 0x8D, 0xF6, 0xF0, 0xA1, 0xB7, 0xA4, 0xF6, 0xE5, + 0xB5, 0x83, 0xF6, 0xF0, 0xA1, 0xB7, 0xA6, 0xF6, + 0xE5, 0xB5, 0xAE, 0xF6, 0xE5, 0xB5, 0xAB, 0xF6, + 0xE5, 0xB5, 0xBC, 0xF6, 0xE5, 0xB7, 0xA1, 0xF6, + 0xE5, 0xB7, 0xA2, 0xF6, 0xE3, 0xA0, 0xAF, 0xF6, + 0xE5, 0xB7, 0xBD, 0xF6, 0xE5, 0xB8, 0xA8, 0xF6, + 0xE5, 0xB8, 0xBD, 0xF6, 0xE5, 0xB9, 0xA9, 0xF6, + 0xE3, 0xA1, 0xA2, 0xF6, 0xF0, 0xA2, 0x86, 0x83, + 0xF6, 0xE3, 0xA1, 0xBC, 0xF6, 0xE5, 0xBA, 0xB0, + 0xF6, 0xE5, 0xBA, 0xB3, 0xF6, 0xE5, 0xBA, 0xB6, + 0xF6, 0xE5, 0xBB, 0x8A, 0xF6, 0xF0, 0xAA, 0x8E, + 0x92, 0xF6, 0xE5, 0xBB, 0xBE, 0xF6, 0xF0, 0xA2, + 0x8C, 0xB1, 0xF6, 0xF0, 0xA2, 0x8C, 0xB1, 0xF6, + 0xE8, 0x88, 0x81, 0xF6, 0xE5, 0xBC, 0xA2, 0xF6, + 0xE5, 0xBC, 0xA2, 0xF6, 0xE3, 0xA3, 0x87, 0xF6, + 0xF0, 0xA3, 0x8A, 0xB8, 0xF6, 0xF0, 0xA6, 0x87, + 0x9A, 0xF6, 0xE5, 0xBD, 0xA2, 0xF6, 0xE5, 0xBD, + 0xAB, 0xF6, 0xE3, 0xA3, 0xA3, 0xF6, 0xE5, 0xBE, + 0x9A, 0xF6, 0xE5, 0xBF, 0x8D, 0xF6, 0xE5, 0xBF, + 0x97, 0xF6, 0xE5, 0xBF, 0xB9, 0xF6, 0xE6, 0x82, + 0x81, 0xF6, 0xE3, 0xA4, 0xBA, 0xF6, 0xE3, 0xA4, + 0x9C, 0xF6, 0xE6, 0x82, 0x94, 0xF6, 0xF0, 0xA2, + 0x9B, 0x94, 0xF6, 0xE6, 0x83, 0x87, 0xF6, 0xE6, + 0x85, 0x88, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, + 0x85, 0x8E, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, + 0x85, 0xBA, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, 0xE6, + 0x86, 0xB2, 0xF6, 0xE6, 0x86, 0xA4, 0xF6, 0xE6, + 0x86, 0xAF, 0xF6, 0xE6, 0x87, 0x9E, 0xF6, 0xE6, + 0x87, 0xB2, 0xF6, 0xE6, 0x87, 0xB6, 0xF6, 0xE6, + 0x88, 0x90, 0xF6, 0xE6, 0x88, 0x9B, 0xF6, 0xE6, + 0x89, 0x9D, 0xF6, 0xE6, 0x8A, 0xB1, 0xF6, 0xE6, + 0x8B, 0x94, 0xF6, 0xE6, 0x8D, 0x90, 0xF6, 0xF0, + 0xA2, 0xAC, 0x8C, 0xF6, 0xE6, 0x8C, 0xBD, 0xF6, + 0xE6, 0x8B, 0xBC, 0xF6, 0xE6, 0x8D, 0xA8, 0xF6, + 0xE6, 0x8E, 0x83, 0xF6, 0xE6, 0x8F, 0xA4, 0xF6, + 0xF0, 0xA2, 0xAF, 0xB1, 0xF6, 0xE6, 0x90, 0xA2, + 0xF6, 0xE6, 0x8F, 0x85, 0xF6, 0xE6, 0x8E, 0xA9, + 0xF6, 0xE3, 0xA8, 0xAE, 0xF6, 0xE6, 0x91, 0xA9, + 0xF6, 0xE6, 0x91, 0xBE, 0xF6, 0xE6, 0x92, 0x9D, + 0xF6, 0xE6, 0x91, 0xB7, 0xF6, 0xE3, 0xA9, 0xAC, + 0xF6, 0xE6, 0x95, 0x8F, 0xF6, 0xE6, 0x95, 0xAC, + 0xF6, 0xF0, 0xA3, 0x80, 0x8A, 0xF6, 0xE6, 0x97, + 0xA3, 0xF6, 0xE6, 0x9B, 0xB8, 0xF6, 0xE6, 0x99, + 0x89, 0xF6, 0xE3, 0xAC, 0x99, 0xF6, 0xE6, 0x9A, + 0x91, 0xF6, 0xE3, 0xAC, 0x88, 0xF6, 0xE3, 0xAB, + 0xA4, 0xF6, 0xE5, 0x86, 0x92, 0xF6, 0xE5, 0x86, + 0x95, 0xF6, 0xE6, 0x9C, 0x80, 0xF6, 0xE6, 0x9A, + 0x9C, 0xF6, 0xE8, 0x82, 0xAD, 0xF6, 0xE4, 0x8F, + 0x99, 0xF6, 0xE6, 0x9C, 0x97, 0xF6, 0xE6, 0x9C, + 0x9B, 0xF6, 0xE6, 0x9C, 0xA1, 0xF6, 0xE6, 0x9D, + 0x9E, 0xF6, 0xE6, 0x9D, 0x93, 0xF6, 0xF0, 0xA3, + 0x8F, 0x83, 0xF6, 0xE3, 0xAD, 0x89, 0xF6, 0xE6, + 0x9F, 0xBA, 0xF6, 0xE6, 0x9E, 0x85, 0xF6, 0xE6, + 0xA1, 0x92, 0xF6, 0xE6, 0xA2, 0x85, 0xF6, 0xF0, + 0xA3, 0x91, 0xAD, 0xF6, 0xE6, 0xA2, 0x8E, 0xF6, + 0xE6, 0xA0, 0x9F, 0xF6, 0xE6, 0xA4, 0x94, 0xF6, + 0xE3, 0xAE, 0x9D, 0xF6, 0xE6, 0xA5, 0x82, 0xF6, + 0xE6, 0xA6, 0xA3, 0xF6, 0xE6, 0xA7, 0xAA, 0xF6, + 0xE6, 0xAA, 0xA8, 0xF6, 0xF0, 0xA3, 0x9A, 0xA3, + 0xF6, 0xE6, 0xAB, 0x9B, 0xF6, 0xE3, 0xB0, 0x98, + 0xF6, 0xE6, 0xAC, 0xA1, 0xF6, 0xF0, 0xA3, 0xA2, + 0xA7, 0xF6, 0xE6, 0xAD, 0x94, 0xF6, 0xE3, 0xB1, + 0x8E, 0xF6, 0xE6, 0xAD, 0xB2, 0xF6, 0xE6, 0xAE, + 0x9F, 0xF6, 0xE6, 0xAE, 0xBA, 0xF6, 0xE6, 0xAE, + 0xBB, 0xF6, 0xF0, 0xA3, 0xAA, 0x8D, 0xF6, 0xF0, + 0xA1, 0xB4, 0x8B, 0xF6, 0xF0, 0xA3, 0xAB, 0xBA, + 0xF6, 0xE6, 0xB1, 0x8E, 0xF6, 0xF0, 0xA3, 0xB2, + 0xBC, 0xF6, 0xE6, 0xB2, 0xBF, 0xF6, 0xE6, 0xB3, + 0x8D, 0xF6, 0xE6, 0xB1, 0xA7, 0xF6, 0xE6, 0xB4, + 0x96, 0xF6, 0xE6, 0xB4, 0xBE, 0xF6, 0xE6, 0xB5, + 0xB7, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, 0xB5, + 0xA9, 0xF6, 0xE6, 0xB5, 0xB8, 0xF6, 0xE6, 0xB6, + 0x85, 0xF6, 0xF0, 0xA3, 0xB4, 0x9E, 0xF6, 0xE6, + 0xB4, 0xB4, 0xF6, 0xE6, 0xB8, 0xAF, 0xF6, 0xE6, + 0xB9, 0xAE, 0xF6, 0xE3, 0xB4, 0xB3, 0xF6, 0xE6, + 0xBB, 0x8B, 0xF6, 0xE6, 0xBB, 0x87, 0xF6, 0xF0, + 0xA3, 0xBB, 0x91, 0xF6, 0xE6, 0xB7, 0xB9, 0xF6, + 0xE6, 0xBD, 0xAE, 0xF6, 0xF0, 0xA3, 0xBD, 0x9E, + 0xF6, 0xF0, 0xA3, 0xBE, 0x8E, 0xF6, 0xE6, 0xBF, + 0x86, 0xF6, 0xE7, 0x80, 0xB9, 0xF6, 0xE7, 0x80, + 0x9E, 0xF6, 0xE7, 0x80, 0x9B, 0xF6, 0xE3, 0xB6, + 0x96, 0xF6, 0xE7, 0x81, 0x8A, 0xF6, 0xE7, 0x81, + 0xBD, 0xF6, 0xE7, 0x81, 0xB7, 0xF6, 0xE7, 0x82, + 0xAD, 0xF6, 0xF0, 0xA0, 0x94, 0xA5, 0xF6, 0xE7, + 0x85, 0x85, 0xF6, 0xF0, 0xA4, 0x89, 0xA3, 0xF6, + 0xE7, 0x86, 0x9C, 0xF6, 0xF0, 0xA4, 0x8E, 0xAB, + 0xF6, 0xE7, 0x88, 0xA8, 0xF6, 0xE7, 0x88, 0xB5, + 0xF6, 0xE7, 0x89, 0x90, 0xF6, 0xF0, 0xA4, 0x98, + 0x88, 0xF6, 0xE7, 0x8A, 0x80, 0xF6, 0xE7, 0x8A, + 0x95, 0xF6, 0xF0, 0xA4, 0x9C, 0xB5, 0xF6, 0xF0, + 0xA4, 0xA0, 0x94, 0xF6, 0xE7, 0x8D, 0xBA, 0xF6, + 0xE7, 0x8E, 0x8B, 0xF6, 0xE3, 0xBA, 0xAC, 0xF6, + 0xE7, 0x8E, 0xA5, 0xF6, 0xE3, 0xBA, 0xB8, 0xF6, + 0xE3, 0xBA, 0xB8, 0xF6, 0xE7, 0x91, 0x87, 0xF6, + 0xE7, 0x91, 0x9C, 0xF6, 0xE7, 0x91, 0xB1, 0xF6, + 0xE7, 0x92, 0x85, 0xF6, 0xE7, 0x93, 0x8A, 0xF6, + 0xE3, 0xBC, 0x9B, 0xF6, 0xE7, 0x94, 0xA4, 0xF6, + 0xF0, 0xA4, 0xB0, 0xB6, 0xF6, 0xE7, 0x94, 0xBE, + 0xF6, 0xF0, 0xA4, 0xB2, 0x92, 0xF6, 0xE7, 0x95, + 0xB0, 0xF6, 0xF0, 0xA2, 0x86, 0x9F, 0xF6, 0xE7, + 0x98, 0x90, 0xF6, 0xF0, 0xA4, 0xBE, 0xA1, 0xF6, + 0xF0, 0xA4, 0xBE, 0xB8, 0xF6, 0xF0, 0xA5, 0x81, + 0x84, 0xF6, 0xE3, 0xBF, 0xBC, 0xF6, 0xE4, 0x80, + 0x88, 0xF6, 0xE7, 0x9B, 0xB4, 0xF6, 0xF0, 0xA5, + 0x83, 0xB3, 0xF6, 0xF0, 0xA5, 0x83, 0xB2, 0xF6, + 0xF0, 0xA5, 0x84, 0x99, 0xF6, 0xF0, 0xA5, 0x84, + 0xB3, 0xF6, 0xE7, 0x9C, 0x9E, 0xF6, 0xE7, 0x9C, + 0x9F, 0xF6, 0xE7, 0x9C, 0x9F, 0xF6, 0xE7, 0x9D, + 0x8A, 0xF6, 0xE4, 0x80, 0xB9, 0xF6, 0xE7, 0x9E, + 0x8B, 0xF6, 0xE4, 0x81, 0x86, 0xF6, 0xE4, 0x82, + 0x96, 0xF6, 0xF0, 0xA5, 0x90, 0x9D, 0xF6, 0xE7, + 0xA1, 0x8E, 0xF6, 0xE7, 0xA2, 0x8C, 0xF6, 0xE7, + 0xA3, 0x8C, 0xF6, 0xE4, 0x83, 0xA3, 0xF6, 0xF0, + 0xA5, 0x98, 0xA6, 0xF6, 0xE7, 0xA5, 0x96, 0xF6, + 0xF0, 0xA5, 0x9A, 0x9A, 0xF6, 0xF0, 0xA5, 0x9B, + 0x85, 0xF6, 0xE7, 0xA6, 0x8F, 0xF6, 0xE7, 0xA7, + 0xAB, 0xF6, 0xE4, 0x84, 0xAF, 0xF6, 0xE7, 0xA9, + 0x80, 0xF6, 0xE7, 0xA9, 0x8A, 0xF6, 0xE7, 0xA9, + 0x8F, 0xF6, 0xF0, 0xA5, 0xA5, 0xBC, 0xF6, 0xF0, + 0xA5, 0xAA, 0xA7, 0xF6, 0xF0, 0xA5, 0xAA, 0xA7, + 0xF6, 0xE7, 0xAB, 0xAE, 0xF6, 0xE4, 0x88, 0x82, + 0xF6, 0xF0, 0xA5, 0xAE, 0xAB, 0xF6, 0xE7, 0xAF, + 0x86, 0xF6, 0xE7, 0xAF, 0x89, 0xF6, 0xE4, 0x88, + 0xA7, 0xF6, 0xF0, 0xA5, 0xB2, 0x80, 0xF6, 0xE7, + 0xB3, 0x92, 0xF6, 0xE4, 0x8A, 0xA0, 0xF6, 0xE7, + 0xB3, 0xA8, 0xF6, 0xE7, 0xB3, 0xA3, 0xF6, 0xE7, + 0xB4, 0x80, 0xF6, 0xF0, 0xA5, 0xBE, 0x86, 0xF6, + 0xE7, 0xB5, 0xA3, 0xF6, 0xE4, 0x8C, 0x81, 0xF6, + 0xE7, 0xB7, 0x87, 0xF6, 0xE7, 0xB8, 0x82, 0xF6, + 0xE7, 0xB9, 0x85, 0xF6, 0xE4, 0x8C, 0xB4, 0xF6, + 0xF0, 0xA6, 0x88, 0xA8, 0xF6, 0xF0, 0xA6, 0x89, + 0x87, 0xF6, 0xE4, 0x8D, 0x99, 0xF6, 0xF0, 0xA6, + 0x8B, 0x99, 0xF6, 0xE7, 0xBD, 0xBA, 0xF6, 0xF0, + 0xA6, 0x8C, 0xBE, 0xF6, 0xE7, 0xBE, 0x95, 0xF6, + 0xE7, 0xBF, 0xBA, 0xF6, 0xE8, 0x80, 0x85, 0xF6, + 0xF0, 0xA6, 0x93, 0x9A, 0xF6, 0xF0, 0xA6, 0x94, + 0xA3, 0xF6, 0xE8, 0x81, 0xA0, 0xF6, 0xF0, 0xA6, + 0x96, 0xA8, 0xF6, 0xE8, 0x81, 0xB0, 0xF6, 0xF0, + 0xA3, 0x8D, 0x9F, 0xF6, 0xE4, 0x8F, 0x95, 0xF6, + 0xE8, 0x82, 0xB2, 0xF6, 0xE8, 0x84, 0x83, 0xF6, + 0xE4, 0x90, 0x8B, 0xF6, 0xE8, 0x84, 0xBE, 0xF6, + 0xE5, 0xAA, 0xB5, 0xF6, 0xF0, 0xA6, 0x9E, 0xA7, + 0xF6, 0xF0, 0xA6, 0x9E, 0xB5, 0xF6, 0xF0, 0xA3, + 0x8E, 0x93, 0xF6, 0xF0, 0xA3, 0x8E, 0x9C, 0xF6, + 0xE8, 0x88, 0x81, 0xF6, 0xE8, 0x88, 0x84, 0xF6, + 0xE8, 0xBE, 0x9E, 0xF6, 0xE4, 0x91, 0xAB, 0xF6, + 0xE8, 0x8A, 0x91, 0xF6, 0xE8, 0x8A, 0x8B, 0xF6, + 0xE8, 0x8A, 0x9D, 0xF6, 0xE5, 0x8A, 0xB3, 0xF6, + 0xE8, 0x8A, 0xB1, 0xF6, 0xE8, 0x8A, 0xB3, 0xF6, + 0xE8, 0x8A, 0xBD, 0xF6, 0xE8, 0x8B, 0xA6, 0xF6, + 0xF0, 0xA6, 0xAC, 0xBC, 0xF6, 0xE8, 0x8B, 0xA5, + 0xF6, 0xE8, 0x8C, 0x9D, 0xF6, 0xE8, 0x8D, 0xA3, + 0xF6, 0xE8, 0x8E, 0xAD, 0xF6, 0xE8, 0x8C, 0xA3, + 0xF6, 0xE8, 0x8E, 0xBD, 0xF6, 0xE8, 0x8F, 0xA7, + 0xF6, 0xE8, 0x91, 0x97, 0xF6, 0xE8, 0x8D, 0x93, + 0xF6, 0xE8, 0x8F, 0x8A, 0xF6, 0xE8, 0x8F, 0x8C, + 0xF6, 0xE8, 0x8F, 0x9C, 0xF6, 0xF0, 0xA6, 0xB0, + 0xB6, 0xF6, 0xF0, 0xA6, 0xB5, 0xAB, 0xF6, 0xF0, + 0xA6, 0xB3, 0x95, 0xF6, 0xE4, 0x94, 0xAB, 0xF6, + 0xE8, 0x93, 0xB1, 0xF6, 0xE8, 0x93, 0xB3, 0xF6, + 0xE8, 0x94, 0x96, 0xF6, 0xF0, 0xA7, 0x8F, 0x8A, + 0xF6, 0xE8, 0x95, 0xA4, 0xF6, 0xF0, 0xA6, 0xBC, + 0xAC, 0xF6, 0xE4, 0x95, 0x9D, 0xF6, 0xE4, 0x95, + 0xA1, 0xF6, 0xF0, 0xA6, 0xBE, 0xB1, 0xF6, 0xF0, + 0xA7, 0x83, 0x92, 0xF6, 0xE4, 0x95, 0xAB, 0xF6, + 0xE8, 0x99, 0x90, 0xF6, 0xE8, 0x99, 0x9C, 0xF6, + 0xE8, 0x99, 0xA7, 0xF6, 0xE8, 0x99, 0xA9, 0xF6, + 0xE8, 0x9A, 0xA9, 0xF6, 0xE8, 0x9A, 0x88, 0xF6, + 0xE8, 0x9C, 0x8E, 0xF6, 0xE8, 0x9B, 0xA2, 0xF6, + 0xE8, 0x9D, 0xB9, 0xF6, 0xE8, 0x9C, 0xA8, 0xF6, + 0xE8, 0x9D, 0xAB, 0xF6, 0xE8, 0x9E, 0x86, 0xF6, + 0xE4, 0x97, 0x97, 0xF6, 0xE8, 0x9F, 0xA1, 0xF6, + 0xE8, 0xA0, 0x81, 0xF6, 0xE4, 0x97, 0xB9, 0xF6, + 0xE8, 0xA1, 0xA0, 0xF6, 0xE8, 0xA1, 0xA3, 0xF6, + 0xF0, 0xA7, 0x99, 0xA7, 0xF6, 0xE8, 0xA3, 0x97, + 0xF6, 0xE8, 0xA3, 0x9E, 0xF6, 0xE4, 0x98, 0xB5, + 0xF6, 0xE8, 0xA3, 0xBA, 0xF6, 0xE3, 0x92, 0xBB, + 0xF6, 0xF0, 0xA7, 0xA2, 0xAE, 0xF6, 0xF0, 0xA7, + 0xA5, 0xA6, 0xF6, 0xE4, 0x9A, 0xBE, 0xF6, 0xE4, + 0x9B, 0x87, 0xF6, 0xE8, 0xAA, 0xA0, 0xF6, 0xE8, + 0xAB, 0xAD, 0xF6, 0xE8, 0xAE, 0x8A, 0xF6, 0xE8, + 0xB1, 0x95, 0xF6, 0xF0, 0xA7, 0xB2, 0xA8, 0xF6, + 0xE8, 0xB2, 0xAB, 0xF6, 0xE8, 0xB3, 0x81, 0xF6, + 0xE8, 0xB4, 0x9B, 0xF6, 0xE8, 0xB5, 0xB7, 0xF6, + 0xF0, 0xA7, 0xBC, 0xAF, 0xF6, 0xF0, 0xA0, 0xA0, + 0x84, 0xF6, 0xE8, 0xB7, 0x8B, 0xF6, 0xE8, 0xB6, + 0xBC, 0xF6, 0xE8, 0xB7, 0xB0, 0xF6, 0xF0, 0xA0, + 0xA3, 0x9E, 0xF6, 0xE8, 0xBB, 0x94, 0xF6, 0xE8, + 0xBC, 0xB8, 0xF6, 0xF0, 0xA8, 0x97, 0x92, 0xF6, + 0xF0, 0xA8, 0x97, 0xAD, 0xF6, 0xE9, 0x82, 0x94, + 0xF6, 0xE9, 0x83, 0xB1, 0xF6, 0xE9, 0x84, 0x91, + 0xF6, 0xF0, 0xA8, 0x9C, 0xAE, 0xF6, 0xE9, 0x84, + 0x9B, 0xF6, 0xE9, 0x88, 0xB8, 0xF6, 0xE9, 0x8B, + 0x97, 0xF6, 0xE9, 0x8B, 0x98, 0xF6, 0xE9, 0x89, + 0xBC, 0xF6, 0xE9, 0x8F, 0xB9, 0xF6, 0xE9, 0x90, + 0x95, 0xF6, 0xF0, 0xA8, 0xAF, 0xBA, 0xF6, 0xE9, + 0x96, 0x8B, 0xF6, 0xE4, 0xA6, 0x95, 0xF6, 0xE9, + 0x96, 0xB7, 0xF6, 0xF0, 0xA8, 0xB5, 0xB7, 0xF6, + 0xE4, 0xA7, 0xA6, 0xF6, 0xE9, 0x9B, 0x83, 0xF6, + 0xE5, 0xB6, 0xB2, 0xF6, 0xE9, 0x9C, 0xA3, 0xF6, + 0xF0, 0xA9, 0x85, 0x85, 0xF6, 0xF0, 0xA9, 0x88, + 0x9A, 0xF6, 0xE4, 0xA9, 0xAE, 0xF6, 0xE4, 0xA9, + 0xB6, 0xF6, 0xE9, 0x9F, 0xA0, 0xF6, 0xF0, 0xA9, + 0x90, 0x8A, 0xF6, 0xE4, 0xAA, 0xB2, 0xF6, 0xF0, + 0xA9, 0x92, 0x96, 0xF6, 0xE9, 0xA0, 0x8B, 0xF6, + 0xE9, 0xA0, 0x8B, 0xF6, 0xE9, 0xA0, 0xA9, 0xF6, + 0xF0, 0xA9, 0x96, 0xB6, 0xF6, 0xE9, 0xA3, 0xA2, + 0xF6, 0xE4, 0xAC, 0xB3, 0xF6, 0xE9, 0xA4, 0xA9, + 0xF6, 0xE9, 0xA6, 0xA7, 0xF6, 0xE9, 0xA7, 0x82, + 0xF6, 0xE9, 0xA7, 0xBE, 0xF6, 0xE4, 0xAF, 0x8E, + 0xF6, 0xF0, 0xA9, 0xAC, 0xB0, 0xF6, 0xE9, 0xAC, + 0x92, 0xF6, 0xE9, 0xB1, 0x80, 0xF6, 0xE9, 0xB3, + 0xBD, 0xF6, 0xE4, 0xB3, 0x8E, 0xF6, 0xE4, 0xB3, + 0xAD, 0xF6, 0xE9, 0xB5, 0xA7, 0xF6, 0xF0, 0xAA, + 0x83, 0x8E, 0xF6, 0xE4, 0xB3, 0xB8, 0xF6, 0xF0, + 0xAA, 0x84, 0x85, 0xF6, 0xF0, 0xAA, 0x88, 0x8E, + 0xF6, 0xF0, 0xAA, 0x8A, 0x91, 0xF6, 0xE9, 0xBA, + 0xBB, 0xF6, 0xE4, 0xB5, 0x96, 0xF6, 0xE9, 0xBB, + 0xB9, 0xF6, 0xE9, 0xBB, 0xBE, 0xF6, 0xE9, 0xBC, + 0x85, 0xF6, 0xE9, 0xBC, 0x8F, 0xF6, 0xE9, 0xBC, + 0x96, 0xF6, 0xE9, 0xBC, 0xBB, 0xF6, 0xF0, 0xAA, + 0x98, 0x80, + }, +}; + +static const uchar_t u8_case_common_b2_tbl[2][2][256] = { + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, 1, 2, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 3, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 4, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + { + { + 0, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, 1, 2, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, 3, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + { + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + 4, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + N_, N_, N_, N_, N_, N_, N_, N_, + }, + + }, + +}; + +static const u8_displacement_t u8_tolower_b3_tbl[2][5][256] = { + { + { /* Third byte table 0. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { 0, 0 }, + { 1, 60 }, { 2, 123 }, { 3, 185 }, { 4, 257 }, + { 5, 321 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 6, 373 }, { 7, 439 }, + { 8, 465 }, { 9, 561 }, { 10, 593 }, { 11, 649 }, + { 12, 703 }, { 13, 749 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 14, 795 }, { 15, 891 }, { 16, 987 }, { 17, 1068 }, + { 18, 1155 }, { 19, 1245 }, { 20, 1299 }, { 21, 1386 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 22, 1443 }, { 23, 1448 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 24, 1496 }, { 25, 1526 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 26, 1574 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 27, 1652 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + }, + { + { /* Third byte table 0. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { 0, 0 }, + { 1, 60 }, { 2, 123 }, { 3, 185 }, { 4, 257 }, + { 5, 321 }, { 6, 383 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 7, 401 }, { 8, 467 }, + { 9, 505 }, { 10, 601 }, { 11, 633 }, { 12, 689 }, + { 13, 753 }, { 14, 803 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 15, 849 }, { 16, 945 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 17, 963 }, { 18, 1059 }, { 19, 1155 }, { 20, 1236 }, + { 21, 1323 }, { 22, 1413 }, { 23, 1467 }, { 24, 1554 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 25, 1611 }, { 26, 1619 }, { 27, 1667 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 28, 1670 }, { 29, 1700 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 30, 1748 }, { 31, 1889 }, { 32, 1911 }, { 33, 2007 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 34, 2061 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 35, 2139 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + }, +}; + +static const uchar_t u8_tolower_b4_tbl[2][36][257] = { + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 46, 48, 50, 52, 54, 56, 58, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 34, 34, 36, 36, 38, 38, 40, + 40, 42, 42, 44, 44, 46, 46, 48, + 48, 49, 49, 51, 51, 53, 53, 55, + 55, 55, 57, 57, 59, 59, 61, 61, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 8, 10, 10, 12, 12, 14, + 14, 16, 16, 18, 18, 20, 20, 22, + 22, 24, 24, 26, 26, 28, 28, 30, + 30, 32, 32, 34, 34, 36, 36, 38, + 38, 40, 40, 42, 42, 44, 44, 46, + 46, 48, 48, 50, 50, 52, 52, 54, + 54, 56, 58, 58, 60, 60, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 4, 6, 6, 8, + 10, 10, 12, 14, 16, 16, 16, 18, + 20, 22, 24, 24, 26, 28, 28, 30, + 32, 34, 34, 34, 34, 36, 38, 38, + 40, 42, 42, 44, 44, 46, 46, 48, + 50, 50, 52, 52, 52, 54, 54, 56, + 58, 58, 60, 62, 64, 64, 66, 66, + 68, 70, 70, 70, 70, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 4, + 6, 8, 8, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 28, 30, + 30, 32, 32, 34, 34, 36, 36, 38, + 38, 40, 40, 42, 42, 44, 44, 46, + 46, 46, 48, 50, 50, 52, 52, 54, + 56, 58, 58, 60, 60, 62, 62, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 34, 34, 36, 36, 38, 38, 40, + 40, 42, 42, 44, 44, 46, 46, 48, + 48, 50, 50, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 2, 4, 6, 8, 8, 10, 10, 12, + 14, 14, 16, 18, 20, 22, 24, 26, + 28, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 48, 50, 52, 54, 56, + 58, 60, 62, 64, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 24, 24, 24, 24, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, + 80, 82, 84, 86, 88, 90, 92, 94, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 34, 34, 36, 36, 38, 38, 40, + 40, 42, 42, 44, 44, 46, 46, 48, + 48, 50, 50, 52, 52, 54, 54, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 14, 16, 16, 18, 18, 20, 20, 22, + 22, 24, 24, 26, 26, 28, 28, 30, + 30, 32, 32, 34, 34, 36, 36, 38, + 38, 40, 40, 42, 42, 44, 44, 46, + 46, 48, 48, 50, 50, 52, 52, 52, + 52, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 18, 20, 22, 24, 26, 28, + 30, 32, 34, 36, 38, 40, 42, 44, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 57, 57, 60, + 60, 63, 63, 66, 66, 69, 69, 72, + 72, 75, 75, 78, 78, 81, 81, 84, + 84, 87, 87, 90, 90, 93, 93, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 57, 57, 60, + 60, 63, 63, 66, 66, 69, 69, 72, + 72, 75, 75, 78, 78, 81, 81, 84, + 84, 87, 87, 90, 90, 93, 93, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, + 33, 36, 36, 39, 39, 42, 42, 45, + 45, 48, 48, 51, 51, 54, 54, 57, + 57, 60, 60, 63, 63, 66, 66, 69, + 69, 72, 72, 75, 75, 78, 78, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 57, 57, 60, + 60, 63, 63, 66, 66, 69, 69, 72, + 72, 75, 75, 78, 78, 81, 81, 84, + 84, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 45, 48, 51, 54, 57, 60, 63, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 69, 72, 75, 78, 81, 84, 87, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 21, 21, 24, 24, 27, 27, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 33, 36, 39, 42, 45, 48, 51, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 75, 78, 81, 84, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 18, 21, 24, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 30, 33, 36, 39, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 45, 48, 51, 54, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 3, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, + 6, 9, 12, 15, 18, 21, 24, 27, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 9, 12, 15, 18, + 21, 24, 27, 30, 33, 36, 39, 42, + 45, 48, 51, 54, 57, 60, 63, 66, + 69, 72, 75, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + }, + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 46, 48, 50, 52, 54, 56, 58, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 34, 34, 36, 36, 38, 38, 40, + 40, 42, 42, 44, 44, 46, 46, 48, + 48, 49, 49, 51, 51, 53, 53, 55, + 55, 55, 57, 57, 59, 59, 61, 61, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 8, 10, 10, 12, 12, 14, + 14, 16, 16, 18, 18, 20, 20, 22, + 22, 24, 24, 26, 26, 28, 28, 30, + 30, 32, 32, 34, 34, 36, 36, 38, + 38, 40, 40, 42, 42, 44, 44, 46, + 46, 48, 48, 50, 50, 52, 52, 54, + 54, 56, 58, 58, 60, 60, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 4, 6, 6, 8, + 10, 10, 12, 14, 16, 16, 16, 18, + 20, 22, 24, 24, 26, 28, 28, 30, + 32, 34, 34, 34, 34, 36, 38, 38, + 40, 42, 42, 44, 44, 46, 46, 48, + 50, 50, 52, 52, 52, 54, 54, 56, + 58, 58, 60, 62, 64, 64, 66, 66, + 68, 70, 70, 70, 70, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 4, + 6, 8, 8, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 28, 30, + 30, 32, 32, 34, 34, 36, 36, 38, + 38, 40, 40, 42, 42, 44, 44, 46, + 46, 46, 48, 50, 50, 52, 52, 54, + 56, 58, 58, 60, 60, 62, 62, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 34, 34, 36, 36, 38, 38, 40, + 40, 42, 42, 44, 44, 46, 46, 48, + 48, 50, 50, 52, 52, 52, 52, 52, + 52, 52, 52, 55, 57, 57, 59, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 6, 8, 10, + 10, 12, 12, 14, 14, 16, 16, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 2, 4, 6, 8, 8, 10, 10, 12, + 14, 14, 16, 18, 20, 22, 24, 26, + 28, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 48, 50, 52, 54, 56, + 58, 60, 62, 64, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 24, 24, 24, 24, 26, 26, 26, + 28, 28, 30, 32, 32, 32, 34, 36, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, + 80, 82, 84, 86, 88, 90, 92, 94, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 34, 34, 36, 36, 38, 38, 40, + 40, 42, 42, 44, 44, 46, 46, 48, + 48, 50, 50, 52, 52, 54, 54, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 4, 6, 6, 8, 8, + 10, 10, 12, 12, 14, 14, 16, 16, + 16, 18, 18, 20, 20, 22, 22, 24, + 24, 26, 26, 28, 28, 30, 30, 32, + 32, 34, 34, 36, 36, 38, 38, 40, + 40, 42, 42, 44, 44, 46, 46, 48, + 48, 50, 50, 52, 52, 54, 54, 56, + 56, 58, 58, 60, 60, 62, 62, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 12, 12, 14, 14, 16, + 16, 18, 18, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 22, 24, 26, 28, 30, 32, + 34, 36, 38, 40, 42, 44, 46, 48, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 57, 57, 60, + 60, 63, 63, 66, 66, 69, 69, 72, + 72, 75, 75, 78, 78, 81, 81, 84, + 84, 87, 87, 90, 90, 93, 93, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 57, 57, 60, + 60, 63, 63, 66, 66, 69, 69, 72, + 72, 75, 75, 78, 78, 81, 81, 84, + 84, 87, 87, 90, 90, 93, 93, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, + 33, 36, 36, 39, 39, 42, 42, 45, + 45, 48, 48, 51, 51, 54, 54, 57, + 57, 60, 60, 63, 63, 66, 66, 69, + 69, 72, 72, 75, 75, 78, 78, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, + 81, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 57, 57, 60, + 60, 63, 63, 66, 66, 69, 69, 72, + 72, 75, 75, 78, 78, 81, 81, 84, + 84, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 45, 48, 51, 54, 57, 60, 63, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 69, 72, 75, 78, 81, 84, 87, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 21, 21, 24, 24, 27, 27, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 33, 36, 39, 42, 45, 48, 51, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 75, 78, 81, 84, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 18, 21, 24, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 30, 33, 36, 39, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 45, 48, 51, 54, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, + 57, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 3, 5, 5, 5, 5, + 5, 5, 5, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, + 6, 9, 12, 15, 18, 21, 24, 27, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 117, + 120, 123, 126, 129, 132, 135, 138, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, + 141, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 5, 8, 10, 10, 10, + 13, 13, 16, 16, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 57, 57, 60, + 60, 63, 63, 66, 66, 69, 69, 72, + 72, 75, 75, 78, 78, 81, 81, 84, + 84, 87, 87, 90, 90, 93, 93, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 3, 6, 6, 9, 9, 12, + 12, 15, 15, 18, 18, 21, 21, 24, + 24, 27, 27, 30, 30, 33, 33, 36, + 36, 39, 39, 42, 42, 45, 45, 48, + 48, 51, 51, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 9, 12, 15, 18, + 21, 24, 27, 30, 33, 36, 39, 42, + 45, 48, 51, 54, 57, 60, 63, 66, + 69, 72, 75, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, + 160, + }, + }, +}; + +static const uchar_t u8_tolower_final_tbl[2][2299] = { + { + 0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3, + 0xC3, 0xA4, 0xC3, 0xA5, 0xC3, 0xA6, 0xC3, 0xA7, + 0xC3, 0xA8, 0xC3, 0xA9, 0xC3, 0xAA, 0xC3, 0xAB, + 0xC3, 0xAC, 0xC3, 0xAD, 0xC3, 0xAE, 0xC3, 0xAF, + 0xC3, 0xB0, 0xC3, 0xB1, 0xC3, 0xB2, 0xC3, 0xB3, + 0xC3, 0xB4, 0xC3, 0xB5, 0xC3, 0xB6, 0xC3, 0xB8, + 0xC3, 0xB9, 0xC3, 0xBA, 0xC3, 0xBB, 0xC3, 0xBC, + 0xC3, 0xBD, 0xC3, 0xBE, 0xC4, 0x81, 0xC4, 0x83, + 0xC4, 0x85, 0xC4, 0x87, 0xC4, 0x89, 0xC4, 0x8B, + 0xC4, 0x8D, 0xC4, 0x8F, 0xC4, 0x91, 0xC4, 0x93, + 0xC4, 0x95, 0xC4, 0x97, 0xC4, 0x99, 0xC4, 0x9B, + 0xC4, 0x9D, 0xC4, 0x9F, 0xC4, 0xA1, 0xC4, 0xA3, + 0xC4, 0xA5, 0xC4, 0xA7, 0xC4, 0xA9, 0xC4, 0xAB, + 0xC4, 0xAD, 0xC4, 0xAF, 0x69, 0xC4, 0xB3, 0xC4, + 0xB5, 0xC4, 0xB7, 0xC4, 0xBA, 0xC4, 0xBC, 0xC4, + 0xBE, 0xC5, 0x80, 0xC5, 0x82, 0xC5, 0x84, 0xC5, + 0x86, 0xC5, 0x88, 0xC5, 0x8B, 0xC5, 0x8D, 0xC5, + 0x8F, 0xC5, 0x91, 0xC5, 0x93, 0xC5, 0x95, 0xC5, + 0x97, 0xC5, 0x99, 0xC5, 0x9B, 0xC5, 0x9D, 0xC5, + 0x9F, 0xC5, 0xA1, 0xC5, 0xA3, 0xC5, 0xA5, 0xC5, + 0xA7, 0xC5, 0xA9, 0xC5, 0xAB, 0xC5, 0xAD, 0xC5, + 0xAF, 0xC5, 0xB1, 0xC5, 0xB3, 0xC5, 0xB5, 0xC5, + 0xB7, 0xC3, 0xBF, 0xC5, 0xBA, 0xC5, 0xBC, 0xC5, + 0xBE, 0xC9, 0x93, 0xC6, 0x83, 0xC6, 0x85, 0xC9, + 0x94, 0xC6, 0x88, 0xC9, 0x96, 0xC9, 0x97, 0xC6, + 0x8C, 0xC7, 0x9D, 0xC9, 0x99, 0xC9, 0x9B, 0xC6, + 0x92, 0xC9, 0xA0, 0xC9, 0xA3, 0xC9, 0xA9, 0xC9, + 0xA8, 0xC6, 0x99, 0xC9, 0xAF, 0xC9, 0xB2, 0xC9, + 0xB5, 0xC6, 0xA1, 0xC6, 0xA3, 0xC6, 0xA5, 0xCA, + 0x80, 0xC6, 0xA8, 0xCA, 0x83, 0xC6, 0xAD, 0xCA, + 0x88, 0xC6, 0xB0, 0xCA, 0x8A, 0xCA, 0x8B, 0xC6, + 0xB4, 0xC6, 0xB6, 0xCA, 0x92, 0xC6, 0xB9, 0xC6, + 0xBD, 0xC7, 0x86, 0xC7, 0x86, 0xC7, 0x89, 0xC7, + 0x89, 0xC7, 0x8C, 0xC7, 0x8C, 0xC7, 0x8E, 0xC7, + 0x90, 0xC7, 0x92, 0xC7, 0x94, 0xC7, 0x96, 0xC7, + 0x98, 0xC7, 0x9A, 0xC7, 0x9C, 0xC7, 0x9F, 0xC7, + 0xA1, 0xC7, 0xA3, 0xC7, 0xA5, 0xC7, 0xA7, 0xC7, + 0xA9, 0xC7, 0xAB, 0xC7, 0xAD, 0xC7, 0xAF, 0xC7, + 0xB3, 0xC7, 0xB3, 0xC7, 0xB5, 0xC6, 0x95, 0xC6, + 0xBF, 0xC7, 0xB9, 0xC7, 0xBB, 0xC7, 0xBD, 0xC7, + 0xBF, 0xC8, 0x81, 0xC8, 0x83, 0xC8, 0x85, 0xC8, + 0x87, 0xC8, 0x89, 0xC8, 0x8B, 0xC8, 0x8D, 0xC8, + 0x8F, 0xC8, 0x91, 0xC8, 0x93, 0xC8, 0x95, 0xC8, + 0x97, 0xC8, 0x99, 0xC8, 0x9B, 0xC8, 0x9D, 0xC8, + 0x9F, 0xC6, 0x9E, 0xC8, 0xA3, 0xC8, 0xA5, 0xC8, + 0xA7, 0xC8, 0xA9, 0xC8, 0xAB, 0xC8, 0xAD, 0xC8, + 0xAF, 0xC8, 0xB1, 0xC8, 0xB3, 0xCE, 0xAC, 0xCE, + 0xAD, 0xCE, 0xAE, 0xCE, 0xAF, 0xCF, 0x8C, 0xCF, + 0x8D, 0xCF, 0x8E, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, + 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, + 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, + 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, + 0xBF, 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x83, 0xCF, + 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, 0xCF, + 0x88, 0xCF, 0x89, 0xCF, 0x8A, 0xCF, 0x8B, 0xCF, + 0x99, 0xCF, 0x9B, 0xCF, 0x9D, 0xCF, 0x9F, 0xCF, + 0xA1, 0xCF, 0xA3, 0xCF, 0xA5, 0xCF, 0xA7, 0xCF, + 0xA9, 0xCF, 0xAB, 0xCF, 0xAD, 0xCF, 0xAF, 0xCE, + 0xB8, 0xD1, 0x90, 0xD1, 0x91, 0xD1, 0x92, 0xD1, + 0x93, 0xD1, 0x94, 0xD1, 0x95, 0xD1, 0x96, 0xD1, + 0x97, 0xD1, 0x98, 0xD1, 0x99, 0xD1, 0x9A, 0xD1, + 0x9B, 0xD1, 0x9C, 0xD1, 0x9D, 0xD1, 0x9E, 0xD1, + 0x9F, 0xD0, 0xB0, 0xD0, 0xB1, 0xD0, 0xB2, 0xD0, + 0xB3, 0xD0, 0xB4, 0xD0, 0xB5, 0xD0, 0xB6, 0xD0, + 0xB7, 0xD0, 0xB8, 0xD0, 0xB9, 0xD0, 0xBA, 0xD0, + 0xBB, 0xD0, 0xBC, 0xD0, 0xBD, 0xD0, 0xBE, 0xD0, + 0xBF, 0xD1, 0x80, 0xD1, 0x81, 0xD1, 0x82, 0xD1, + 0x83, 0xD1, 0x84, 0xD1, 0x85, 0xD1, 0x86, 0xD1, + 0x87, 0xD1, 0x88, 0xD1, 0x89, 0xD1, 0x8A, 0xD1, + 0x8B, 0xD1, 0x8C, 0xD1, 0x8D, 0xD1, 0x8E, 0xD1, + 0x8F, 0xD1, 0xA1, 0xD1, 0xA3, 0xD1, 0xA5, 0xD1, + 0xA7, 0xD1, 0xA9, 0xD1, 0xAB, 0xD1, 0xAD, 0xD1, + 0xAF, 0xD1, 0xB1, 0xD1, 0xB3, 0xD1, 0xB5, 0xD1, + 0xB7, 0xD1, 0xB9, 0xD1, 0xBB, 0xD1, 0xBD, 0xD1, + 0xBF, 0xD2, 0x81, 0xD2, 0x8B, 0xD2, 0x8D, 0xD2, + 0x8F, 0xD2, 0x91, 0xD2, 0x93, 0xD2, 0x95, 0xD2, + 0x97, 0xD2, 0x99, 0xD2, 0x9B, 0xD2, 0x9D, 0xD2, + 0x9F, 0xD2, 0xA1, 0xD2, 0xA3, 0xD2, 0xA5, 0xD2, + 0xA7, 0xD2, 0xA9, 0xD2, 0xAB, 0xD2, 0xAD, 0xD2, + 0xAF, 0xD2, 0xB1, 0xD2, 0xB3, 0xD2, 0xB5, 0xD2, + 0xB7, 0xD2, 0xB9, 0xD2, 0xBB, 0xD2, 0xBD, 0xD2, + 0xBF, 0xD3, 0x82, 0xD3, 0x84, 0xD3, 0x86, 0xD3, + 0x88, 0xD3, 0x8A, 0xD3, 0x8C, 0xD3, 0x8E, 0xD3, + 0x91, 0xD3, 0x93, 0xD3, 0x95, 0xD3, 0x97, 0xD3, + 0x99, 0xD3, 0x9B, 0xD3, 0x9D, 0xD3, 0x9F, 0xD3, + 0xA1, 0xD3, 0xA3, 0xD3, 0xA5, 0xD3, 0xA7, 0xD3, + 0xA9, 0xD3, 0xAB, 0xD3, 0xAD, 0xD3, 0xAF, 0xD3, + 0xB1, 0xD3, 0xB3, 0xD3, 0xB5, 0xD3, 0xB9, 0xD4, + 0x81, 0xD4, 0x83, 0xD4, 0x85, 0xD4, 0x87, 0xD4, + 0x89, 0xD4, 0x8B, 0xD4, 0x8D, 0xD4, 0x8F, 0xD5, + 0xA1, 0xD5, 0xA2, 0xD5, 0xA3, 0xD5, 0xA4, 0xD5, + 0xA5, 0xD5, 0xA6, 0xD5, 0xA7, 0xD5, 0xA8, 0xD5, + 0xA9, 0xD5, 0xAA, 0xD5, 0xAB, 0xD5, 0xAC, 0xD5, + 0xAD, 0xD5, 0xAE, 0xD5, 0xAF, 0xD5, 0xB0, 0xD5, + 0xB1, 0xD5, 0xB2, 0xD5, 0xB3, 0xD5, 0xB4, 0xD5, + 0xB5, 0xD5, 0xB6, 0xD5, 0xB7, 0xD5, 0xB8, 0xD5, + 0xB9, 0xD5, 0xBA, 0xD5, 0xBB, 0xD5, 0xBC, 0xD5, + 0xBD, 0xD5, 0xBE, 0xD5, 0xBF, 0xD6, 0x80, 0xD6, + 0x81, 0xD6, 0x82, 0xD6, 0x83, 0xD6, 0x84, 0xD6, + 0x85, 0xD6, 0x86, 0xE1, 0xB8, 0x81, 0xE1, 0xB8, + 0x83, 0xE1, 0xB8, 0x85, 0xE1, 0xB8, 0x87, 0xE1, + 0xB8, 0x89, 0xE1, 0xB8, 0x8B, 0xE1, 0xB8, 0x8D, + 0xE1, 0xB8, 0x8F, 0xE1, 0xB8, 0x91, 0xE1, 0xB8, + 0x93, 0xE1, 0xB8, 0x95, 0xE1, 0xB8, 0x97, 0xE1, + 0xB8, 0x99, 0xE1, 0xB8, 0x9B, 0xE1, 0xB8, 0x9D, + 0xE1, 0xB8, 0x9F, 0xE1, 0xB8, 0xA1, 0xE1, 0xB8, + 0xA3, 0xE1, 0xB8, 0xA5, 0xE1, 0xB8, 0xA7, 0xE1, + 0xB8, 0xA9, 0xE1, 0xB8, 0xAB, 0xE1, 0xB8, 0xAD, + 0xE1, 0xB8, 0xAF, 0xE1, 0xB8, 0xB1, 0xE1, 0xB8, + 0xB3, 0xE1, 0xB8, 0xB5, 0xE1, 0xB8, 0xB7, 0xE1, + 0xB8, 0xB9, 0xE1, 0xB8, 0xBB, 0xE1, 0xB8, 0xBD, + 0xE1, 0xB8, 0xBF, 0xE1, 0xB9, 0x81, 0xE1, 0xB9, + 0x83, 0xE1, 0xB9, 0x85, 0xE1, 0xB9, 0x87, 0xE1, + 0xB9, 0x89, 0xE1, 0xB9, 0x8B, 0xE1, 0xB9, 0x8D, + 0xE1, 0xB9, 0x8F, 0xE1, 0xB9, 0x91, 0xE1, 0xB9, + 0x93, 0xE1, 0xB9, 0x95, 0xE1, 0xB9, 0x97, 0xE1, + 0xB9, 0x99, 0xE1, 0xB9, 0x9B, 0xE1, 0xB9, 0x9D, + 0xE1, 0xB9, 0x9F, 0xE1, 0xB9, 0xA1, 0xE1, 0xB9, + 0xA3, 0xE1, 0xB9, 0xA5, 0xE1, 0xB9, 0xA7, 0xE1, + 0xB9, 0xA9, 0xE1, 0xB9, 0xAB, 0xE1, 0xB9, 0xAD, + 0xE1, 0xB9, 0xAF, 0xE1, 0xB9, 0xB1, 0xE1, 0xB9, + 0xB3, 0xE1, 0xB9, 0xB5, 0xE1, 0xB9, 0xB7, 0xE1, + 0xB9, 0xB9, 0xE1, 0xB9, 0xBB, 0xE1, 0xB9, 0xBD, + 0xE1, 0xB9, 0xBF, 0xE1, 0xBA, 0x81, 0xE1, 0xBA, + 0x83, 0xE1, 0xBA, 0x85, 0xE1, 0xBA, 0x87, 0xE1, + 0xBA, 0x89, 0xE1, 0xBA, 0x8B, 0xE1, 0xBA, 0x8D, + 0xE1, 0xBA, 0x8F, 0xE1, 0xBA, 0x91, 0xE1, 0xBA, + 0x93, 0xE1, 0xBA, 0x95, 0xE1, 0xBA, 0xA1, 0xE1, + 0xBA, 0xA3, 0xE1, 0xBA, 0xA5, 0xE1, 0xBA, 0xA7, + 0xE1, 0xBA, 0xA9, 0xE1, 0xBA, 0xAB, 0xE1, 0xBA, + 0xAD, 0xE1, 0xBA, 0xAF, 0xE1, 0xBA, 0xB1, 0xE1, + 0xBA, 0xB3, 0xE1, 0xBA, 0xB5, 0xE1, 0xBA, 0xB7, + 0xE1, 0xBA, 0xB9, 0xE1, 0xBA, 0xBB, 0xE1, 0xBA, + 0xBD, 0xE1, 0xBA, 0xBF, 0xE1, 0xBB, 0x81, 0xE1, + 0xBB, 0x83, 0xE1, 0xBB, 0x85, 0xE1, 0xBB, 0x87, + 0xE1, 0xBB, 0x89, 0xE1, 0xBB, 0x8B, 0xE1, 0xBB, + 0x8D, 0xE1, 0xBB, 0x8F, 0xE1, 0xBB, 0x91, 0xE1, + 0xBB, 0x93, 0xE1, 0xBB, 0x95, 0xE1, 0xBB, 0x97, + 0xE1, 0xBB, 0x99, 0xE1, 0xBB, 0x9B, 0xE1, 0xBB, + 0x9D, 0xE1, 0xBB, 0x9F, 0xE1, 0xBB, 0xA1, 0xE1, + 0xBB, 0xA3, 0xE1, 0xBB, 0xA5, 0xE1, 0xBB, 0xA7, + 0xE1, 0xBB, 0xA9, 0xE1, 0xBB, 0xAB, 0xE1, 0xBB, + 0xAD, 0xE1, 0xBB, 0xAF, 0xE1, 0xBB, 0xB1, 0xE1, + 0xBB, 0xB3, 0xE1, 0xBB, 0xB5, 0xE1, 0xBB, 0xB7, + 0xE1, 0xBB, 0xB9, 0xE1, 0xBC, 0x80, 0xE1, 0xBC, + 0x81, 0xE1, 0xBC, 0x82, 0xE1, 0xBC, 0x83, 0xE1, + 0xBC, 0x84, 0xE1, 0xBC, 0x85, 0xE1, 0xBC, 0x86, + 0xE1, 0xBC, 0x87, 0xE1, 0xBC, 0x90, 0xE1, 0xBC, + 0x91, 0xE1, 0xBC, 0x92, 0xE1, 0xBC, 0x93, 0xE1, + 0xBC, 0x94, 0xE1, 0xBC, 0x95, 0xE1, 0xBC, 0xA0, + 0xE1, 0xBC, 0xA1, 0xE1, 0xBC, 0xA2, 0xE1, 0xBC, + 0xA3, 0xE1, 0xBC, 0xA4, 0xE1, 0xBC, 0xA5, 0xE1, + 0xBC, 0xA6, 0xE1, 0xBC, 0xA7, 0xE1, 0xBC, 0xB0, + 0xE1, 0xBC, 0xB1, 0xE1, 0xBC, 0xB2, 0xE1, 0xBC, + 0xB3, 0xE1, 0xBC, 0xB4, 0xE1, 0xBC, 0xB5, 0xE1, + 0xBC, 0xB6, 0xE1, 0xBC, 0xB7, 0xE1, 0xBD, 0x80, + 0xE1, 0xBD, 0x81, 0xE1, 0xBD, 0x82, 0xE1, 0xBD, + 0x83, 0xE1, 0xBD, 0x84, 0xE1, 0xBD, 0x85, 0xE1, + 0xBD, 0x91, 0xE1, 0xBD, 0x93, 0xE1, 0xBD, 0x95, + 0xE1, 0xBD, 0x97, 0xE1, 0xBD, 0xA0, 0xE1, 0xBD, + 0xA1, 0xE1, 0xBD, 0xA2, 0xE1, 0xBD, 0xA3, 0xE1, + 0xBD, 0xA4, 0xE1, 0xBD, 0xA5, 0xE1, 0xBD, 0xA6, + 0xE1, 0xBD, 0xA7, 0xE1, 0xBE, 0x80, 0xE1, 0xBE, + 0x81, 0xE1, 0xBE, 0x82, 0xE1, 0xBE, 0x83, 0xE1, + 0xBE, 0x84, 0xE1, 0xBE, 0x85, 0xE1, 0xBE, 0x86, + 0xE1, 0xBE, 0x87, 0xE1, 0xBE, 0x90, 0xE1, 0xBE, + 0x91, 0xE1, 0xBE, 0x92, 0xE1, 0xBE, 0x93, 0xE1, + 0xBE, 0x94, 0xE1, 0xBE, 0x95, 0xE1, 0xBE, 0x96, + 0xE1, 0xBE, 0x97, 0xE1, 0xBE, 0xA0, 0xE1, 0xBE, + 0xA1, 0xE1, 0xBE, 0xA2, 0xE1, 0xBE, 0xA3, 0xE1, + 0xBE, 0xA4, 0xE1, 0xBE, 0xA5, 0xE1, 0xBE, 0xA6, + 0xE1, 0xBE, 0xA7, 0xE1, 0xBE, 0xB0, 0xE1, 0xBE, + 0xB1, 0xE1, 0xBD, 0xB0, 0xE1, 0xBD, 0xB1, 0xE1, + 0xBE, 0xB3, 0xE1, 0xBD, 0xB2, 0xE1, 0xBD, 0xB3, + 0xE1, 0xBD, 0xB4, 0xE1, 0xBD, 0xB5, 0xE1, 0xBF, + 0x83, 0xE1, 0xBF, 0x90, 0xE1, 0xBF, 0x91, 0xE1, + 0xBD, 0xB6, 0xE1, 0xBD, 0xB7, 0xE1, 0xBF, 0xA0, + 0xE1, 0xBF, 0xA1, 0xE1, 0xBD, 0xBA, 0xE1, 0xBD, + 0xBB, 0xE1, 0xBF, 0xA5, 0xE1, 0xBD, 0xB8, 0xE1, + 0xBD, 0xB9, 0xE1, 0xBD, 0xBC, 0xE1, 0xBD, 0xBD, + 0xE1, 0xBF, 0xB3, 0xCF, 0x89, 0x6B, 0xC3, 0xA5, + 0xE2, 0x85, 0xB0, 0xE2, 0x85, 0xB1, 0xE2, 0x85, + 0xB2, 0xE2, 0x85, 0xB3, 0xE2, 0x85, 0xB4, 0xE2, + 0x85, 0xB5, 0xE2, 0x85, 0xB6, 0xE2, 0x85, 0xB7, + 0xE2, 0x85, 0xB8, 0xE2, 0x85, 0xB9, 0xE2, 0x85, + 0xBA, 0xE2, 0x85, 0xBB, 0xE2, 0x85, 0xBC, 0xE2, + 0x85, 0xBD, 0xE2, 0x85, 0xBE, 0xE2, 0x85, 0xBF, + 0xE2, 0x93, 0x90, 0xE2, 0x93, 0x91, 0xE2, 0x93, + 0x92, 0xE2, 0x93, 0x93, 0xE2, 0x93, 0x94, 0xE2, + 0x93, 0x95, 0xE2, 0x93, 0x96, 0xE2, 0x93, 0x97, + 0xE2, 0x93, 0x98, 0xE2, 0x93, 0x99, 0xE2, 0x93, + 0x9A, 0xE2, 0x93, 0x9B, 0xE2, 0x93, 0x9C, 0xE2, + 0x93, 0x9D, 0xE2, 0x93, 0x9E, 0xE2, 0x93, 0x9F, + 0xE2, 0x93, 0xA0, 0xE2, 0x93, 0xA1, 0xE2, 0x93, + 0xA2, 0xE2, 0x93, 0xA3, 0xE2, 0x93, 0xA4, 0xE2, + 0x93, 0xA5, 0xE2, 0x93, 0xA6, 0xE2, 0x93, 0xA7, + 0xE2, 0x93, 0xA8, 0xE2, 0x93, 0xA9, 0xEF, 0xBD, + 0x81, 0xEF, 0xBD, 0x82, 0xEF, 0xBD, 0x83, 0xEF, + 0xBD, 0x84, 0xEF, 0xBD, 0x85, 0xEF, 0xBD, 0x86, + 0xEF, 0xBD, 0x87, 0xEF, 0xBD, 0x88, 0xEF, 0xBD, + 0x89, 0xEF, 0xBD, 0x8A, 0xEF, 0xBD, 0x8B, 0xEF, + 0xBD, 0x8C, 0xEF, 0xBD, 0x8D, 0xEF, 0xBD, 0x8E, + 0xEF, 0xBD, 0x8F, 0xEF, 0xBD, 0x90, 0xEF, 0xBD, + 0x91, 0xEF, 0xBD, 0x92, 0xEF, 0xBD, 0x93, 0xEF, + 0xBD, 0x94, 0xEF, 0xBD, 0x95, 0xEF, 0xBD, 0x96, + 0xEF, 0xBD, 0x97, 0xEF, 0xBD, 0x98, 0xEF, 0xBD, + 0x99, 0xEF, 0xBD, 0x9A, 0xF0, 0x90, 0x90, 0xA8, + 0xF0, 0x90, 0x90, 0xA9, 0xF0, 0x90, 0x90, 0xAA, + 0xF0, 0x90, 0x90, 0xAB, 0xF0, 0x90, 0x90, 0xAC, + 0xF0, 0x90, 0x90, 0xAD, 0xF0, 0x90, 0x90, 0xAE, + 0xF0, 0x90, 0x90, 0xAF, 0xF0, 0x90, 0x90, 0xB0, + 0xF0, 0x90, 0x90, 0xB1, 0xF0, 0x90, 0x90, 0xB2, + 0xF0, 0x90, 0x90, 0xB3, 0xF0, 0x90, 0x90, 0xB4, + 0xF0, 0x90, 0x90, 0xB5, 0xF0, 0x90, 0x90, 0xB6, + 0xF0, 0x90, 0x90, 0xB7, 0xF0, 0x90, 0x90, 0xB8, + 0xF0, 0x90, 0x90, 0xB9, 0xF0, 0x90, 0x90, 0xBA, + 0xF0, 0x90, 0x90, 0xBB, 0xF0, 0x90, 0x90, 0xBC, + 0xF0, 0x90, 0x90, 0xBD, 0xF0, 0x90, 0x90, 0xBE, + 0xF0, 0x90, 0x90, 0xBF, 0xF0, 0x90, 0x91, 0x80, + 0xF0, 0x90, 0x91, 0x81, 0xF0, 0x90, 0x91, 0x82, + 0xF0, 0x90, 0x91, 0x83, 0xF0, 0x90, 0x91, 0x84, + 0xF0, 0x90, 0x91, 0x85, 0xF0, 0x90, 0x91, 0x86, + 0xF0, 0x90, 0x91, 0x87, 0xF0, 0x90, 0x91, 0x88, + 0xF0, 0x90, 0x91, 0x89, 0xF0, 0x90, 0x91, 0x8A, + 0xF0, 0x90, 0x91, 0x8B, 0xF0, 0x90, 0x91, 0x8C, + 0xF0, 0x90, 0x91, 0x8D, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, + }, + { + 0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3, + 0xC3, 0xA4, 0xC3, 0xA5, 0xC3, 0xA6, 0xC3, 0xA7, + 0xC3, 0xA8, 0xC3, 0xA9, 0xC3, 0xAA, 0xC3, 0xAB, + 0xC3, 0xAC, 0xC3, 0xAD, 0xC3, 0xAE, 0xC3, 0xAF, + 0xC3, 0xB0, 0xC3, 0xB1, 0xC3, 0xB2, 0xC3, 0xB3, + 0xC3, 0xB4, 0xC3, 0xB5, 0xC3, 0xB6, 0xC3, 0xB8, + 0xC3, 0xB9, 0xC3, 0xBA, 0xC3, 0xBB, 0xC3, 0xBC, + 0xC3, 0xBD, 0xC3, 0xBE, 0xC4, 0x81, 0xC4, 0x83, + 0xC4, 0x85, 0xC4, 0x87, 0xC4, 0x89, 0xC4, 0x8B, + 0xC4, 0x8D, 0xC4, 0x8F, 0xC4, 0x91, 0xC4, 0x93, + 0xC4, 0x95, 0xC4, 0x97, 0xC4, 0x99, 0xC4, 0x9B, + 0xC4, 0x9D, 0xC4, 0x9F, 0xC4, 0xA1, 0xC4, 0xA3, + 0xC4, 0xA5, 0xC4, 0xA7, 0xC4, 0xA9, 0xC4, 0xAB, + 0xC4, 0xAD, 0xC4, 0xAF, 0x69, 0xC4, 0xB3, 0xC4, + 0xB5, 0xC4, 0xB7, 0xC4, 0xBA, 0xC4, 0xBC, 0xC4, + 0xBE, 0xC5, 0x80, 0xC5, 0x82, 0xC5, 0x84, 0xC5, + 0x86, 0xC5, 0x88, 0xC5, 0x8B, 0xC5, 0x8D, 0xC5, + 0x8F, 0xC5, 0x91, 0xC5, 0x93, 0xC5, 0x95, 0xC5, + 0x97, 0xC5, 0x99, 0xC5, 0x9B, 0xC5, 0x9D, 0xC5, + 0x9F, 0xC5, 0xA1, 0xC5, 0xA3, 0xC5, 0xA5, 0xC5, + 0xA7, 0xC5, 0xA9, 0xC5, 0xAB, 0xC5, 0xAD, 0xC5, + 0xAF, 0xC5, 0xB1, 0xC5, 0xB3, 0xC5, 0xB5, 0xC5, + 0xB7, 0xC3, 0xBF, 0xC5, 0xBA, 0xC5, 0xBC, 0xC5, + 0xBE, 0xC9, 0x93, 0xC6, 0x83, 0xC6, 0x85, 0xC9, + 0x94, 0xC6, 0x88, 0xC9, 0x96, 0xC9, 0x97, 0xC6, + 0x8C, 0xC7, 0x9D, 0xC9, 0x99, 0xC9, 0x9B, 0xC6, + 0x92, 0xC9, 0xA0, 0xC9, 0xA3, 0xC9, 0xA9, 0xC9, + 0xA8, 0xC6, 0x99, 0xC9, 0xAF, 0xC9, 0xB2, 0xC9, + 0xB5, 0xC6, 0xA1, 0xC6, 0xA3, 0xC6, 0xA5, 0xCA, + 0x80, 0xC6, 0xA8, 0xCA, 0x83, 0xC6, 0xAD, 0xCA, + 0x88, 0xC6, 0xB0, 0xCA, 0x8A, 0xCA, 0x8B, 0xC6, + 0xB4, 0xC6, 0xB6, 0xCA, 0x92, 0xC6, 0xB9, 0xC6, + 0xBD, 0xC7, 0x86, 0xC7, 0x86, 0xC7, 0x89, 0xC7, + 0x89, 0xC7, 0x8C, 0xC7, 0x8C, 0xC7, 0x8E, 0xC7, + 0x90, 0xC7, 0x92, 0xC7, 0x94, 0xC7, 0x96, 0xC7, + 0x98, 0xC7, 0x9A, 0xC7, 0x9C, 0xC7, 0x9F, 0xC7, + 0xA1, 0xC7, 0xA3, 0xC7, 0xA5, 0xC7, 0xA7, 0xC7, + 0xA9, 0xC7, 0xAB, 0xC7, 0xAD, 0xC7, 0xAF, 0xC7, + 0xB3, 0xC7, 0xB3, 0xC7, 0xB5, 0xC6, 0x95, 0xC6, + 0xBF, 0xC7, 0xB9, 0xC7, 0xBB, 0xC7, 0xBD, 0xC7, + 0xBF, 0xC8, 0x81, 0xC8, 0x83, 0xC8, 0x85, 0xC8, + 0x87, 0xC8, 0x89, 0xC8, 0x8B, 0xC8, 0x8D, 0xC8, + 0x8F, 0xC8, 0x91, 0xC8, 0x93, 0xC8, 0x95, 0xC8, + 0x97, 0xC8, 0x99, 0xC8, 0x9B, 0xC8, 0x9D, 0xC8, + 0x9F, 0xC6, 0x9E, 0xC8, 0xA3, 0xC8, 0xA5, 0xC8, + 0xA7, 0xC8, 0xA9, 0xC8, 0xAB, 0xC8, 0xAD, 0xC8, + 0xAF, 0xC8, 0xB1, 0xC8, 0xB3, 0xE2, 0xB1, 0xA5, + 0xC8, 0xBC, 0xC6, 0x9A, 0xE2, 0xB1, 0xA6, 0xC9, + 0x82, 0xC6, 0x80, 0xCA, 0x89, 0xCA, 0x8C, 0xC9, + 0x87, 0xC9, 0x89, 0xC9, 0x8B, 0xC9, 0x8D, 0xC9, + 0x8F, 0xCE, 0xAC, 0xCE, 0xAD, 0xCE, 0xAE, 0xCE, + 0xAF, 0xCF, 0x8C, 0xCF, 0x8D, 0xCF, 0x8E, 0xCE, + 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, + 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, + 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, + 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, + 0x81, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, 0xCF, + 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, 0xCF, + 0x8A, 0xCF, 0x8B, 0xCF, 0x99, 0xCF, 0x9B, 0xCF, + 0x9D, 0xCF, 0x9F, 0xCF, 0xA1, 0xCF, 0xA3, 0xCF, + 0xA5, 0xCF, 0xA7, 0xCF, 0xA9, 0xCF, 0xAB, 0xCF, + 0xAD, 0xCF, 0xAF, 0xCE, 0xB8, 0xCF, 0xB8, 0xCF, + 0xB2, 0xCF, 0xBB, 0xCD, 0xBB, 0xCD, 0xBC, 0xCD, + 0xBD, 0xD1, 0x90, 0xD1, 0x91, 0xD1, 0x92, 0xD1, + 0x93, 0xD1, 0x94, 0xD1, 0x95, 0xD1, 0x96, 0xD1, + 0x97, 0xD1, 0x98, 0xD1, 0x99, 0xD1, 0x9A, 0xD1, + 0x9B, 0xD1, 0x9C, 0xD1, 0x9D, 0xD1, 0x9E, 0xD1, + 0x9F, 0xD0, 0xB0, 0xD0, 0xB1, 0xD0, 0xB2, 0xD0, + 0xB3, 0xD0, 0xB4, 0xD0, 0xB5, 0xD0, 0xB6, 0xD0, + 0xB7, 0xD0, 0xB8, 0xD0, 0xB9, 0xD0, 0xBA, 0xD0, + 0xBB, 0xD0, 0xBC, 0xD0, 0xBD, 0xD0, 0xBE, 0xD0, + 0xBF, 0xD1, 0x80, 0xD1, 0x81, 0xD1, 0x82, 0xD1, + 0x83, 0xD1, 0x84, 0xD1, 0x85, 0xD1, 0x86, 0xD1, + 0x87, 0xD1, 0x88, 0xD1, 0x89, 0xD1, 0x8A, 0xD1, + 0x8B, 0xD1, 0x8C, 0xD1, 0x8D, 0xD1, 0x8E, 0xD1, + 0x8F, 0xD1, 0xA1, 0xD1, 0xA3, 0xD1, 0xA5, 0xD1, + 0xA7, 0xD1, 0xA9, 0xD1, 0xAB, 0xD1, 0xAD, 0xD1, + 0xAF, 0xD1, 0xB1, 0xD1, 0xB3, 0xD1, 0xB5, 0xD1, + 0xB7, 0xD1, 0xB9, 0xD1, 0xBB, 0xD1, 0xBD, 0xD1, + 0xBF, 0xD2, 0x81, 0xD2, 0x8B, 0xD2, 0x8D, 0xD2, + 0x8F, 0xD2, 0x91, 0xD2, 0x93, 0xD2, 0x95, 0xD2, + 0x97, 0xD2, 0x99, 0xD2, 0x9B, 0xD2, 0x9D, 0xD2, + 0x9F, 0xD2, 0xA1, 0xD2, 0xA3, 0xD2, 0xA5, 0xD2, + 0xA7, 0xD2, 0xA9, 0xD2, 0xAB, 0xD2, 0xAD, 0xD2, + 0xAF, 0xD2, 0xB1, 0xD2, 0xB3, 0xD2, 0xB5, 0xD2, + 0xB7, 0xD2, 0xB9, 0xD2, 0xBB, 0xD2, 0xBD, 0xD2, + 0xBF, 0xD3, 0x8F, 0xD3, 0x82, 0xD3, 0x84, 0xD3, + 0x86, 0xD3, 0x88, 0xD3, 0x8A, 0xD3, 0x8C, 0xD3, + 0x8E, 0xD3, 0x91, 0xD3, 0x93, 0xD3, 0x95, 0xD3, + 0x97, 0xD3, 0x99, 0xD3, 0x9B, 0xD3, 0x9D, 0xD3, + 0x9F, 0xD3, 0xA1, 0xD3, 0xA3, 0xD3, 0xA5, 0xD3, + 0xA7, 0xD3, 0xA9, 0xD3, 0xAB, 0xD3, 0xAD, 0xD3, + 0xAF, 0xD3, 0xB1, 0xD3, 0xB3, 0xD3, 0xB5, 0xD3, + 0xB7, 0xD3, 0xB9, 0xD3, 0xBB, 0xD3, 0xBD, 0xD3, + 0xBF, 0xD4, 0x81, 0xD4, 0x83, 0xD4, 0x85, 0xD4, + 0x87, 0xD4, 0x89, 0xD4, 0x8B, 0xD4, 0x8D, 0xD4, + 0x8F, 0xD4, 0x91, 0xD4, 0x93, 0xD5, 0xA1, 0xD5, + 0xA2, 0xD5, 0xA3, 0xD5, 0xA4, 0xD5, 0xA5, 0xD5, + 0xA6, 0xD5, 0xA7, 0xD5, 0xA8, 0xD5, 0xA9, 0xD5, + 0xAA, 0xD5, 0xAB, 0xD5, 0xAC, 0xD5, 0xAD, 0xD5, + 0xAE, 0xD5, 0xAF, 0xD5, 0xB0, 0xD5, 0xB1, 0xD5, + 0xB2, 0xD5, 0xB3, 0xD5, 0xB4, 0xD5, 0xB5, 0xD5, + 0xB6, 0xD5, 0xB7, 0xD5, 0xB8, 0xD5, 0xB9, 0xD5, + 0xBA, 0xD5, 0xBB, 0xD5, 0xBC, 0xD5, 0xBD, 0xD5, + 0xBE, 0xD5, 0xBF, 0xD6, 0x80, 0xD6, 0x81, 0xD6, + 0x82, 0xD6, 0x83, 0xD6, 0x84, 0xD6, 0x85, 0xD6, + 0x86, 0xE2, 0xB4, 0x80, 0xE2, 0xB4, 0x81, 0xE2, + 0xB4, 0x82, 0xE2, 0xB4, 0x83, 0xE2, 0xB4, 0x84, + 0xE2, 0xB4, 0x85, 0xE2, 0xB4, 0x86, 0xE2, 0xB4, + 0x87, 0xE2, 0xB4, 0x88, 0xE2, 0xB4, 0x89, 0xE2, + 0xB4, 0x8A, 0xE2, 0xB4, 0x8B, 0xE2, 0xB4, 0x8C, + 0xE2, 0xB4, 0x8D, 0xE2, 0xB4, 0x8E, 0xE2, 0xB4, + 0x8F, 0xE2, 0xB4, 0x90, 0xE2, 0xB4, 0x91, 0xE2, + 0xB4, 0x92, 0xE2, 0xB4, 0x93, 0xE2, 0xB4, 0x94, + 0xE2, 0xB4, 0x95, 0xE2, 0xB4, 0x96, 0xE2, 0xB4, + 0x97, 0xE2, 0xB4, 0x98, 0xE2, 0xB4, 0x99, 0xE2, + 0xB4, 0x9A, 0xE2, 0xB4, 0x9B, 0xE2, 0xB4, 0x9C, + 0xE2, 0xB4, 0x9D, 0xE2, 0xB4, 0x9E, 0xE2, 0xB4, + 0x9F, 0xE2, 0xB4, 0xA0, 0xE2, 0xB4, 0xA1, 0xE2, + 0xB4, 0xA2, 0xE2, 0xB4, 0xA3, 0xE2, 0xB4, 0xA4, + 0xE2, 0xB4, 0xA5, 0xE1, 0xB8, 0x81, 0xE1, 0xB8, + 0x83, 0xE1, 0xB8, 0x85, 0xE1, 0xB8, 0x87, 0xE1, + 0xB8, 0x89, 0xE1, 0xB8, 0x8B, 0xE1, 0xB8, 0x8D, + 0xE1, 0xB8, 0x8F, 0xE1, 0xB8, 0x91, 0xE1, 0xB8, + 0x93, 0xE1, 0xB8, 0x95, 0xE1, 0xB8, 0x97, 0xE1, + 0xB8, 0x99, 0xE1, 0xB8, 0x9B, 0xE1, 0xB8, 0x9D, + 0xE1, 0xB8, 0x9F, 0xE1, 0xB8, 0xA1, 0xE1, 0xB8, + 0xA3, 0xE1, 0xB8, 0xA5, 0xE1, 0xB8, 0xA7, 0xE1, + 0xB8, 0xA9, 0xE1, 0xB8, 0xAB, 0xE1, 0xB8, 0xAD, + 0xE1, 0xB8, 0xAF, 0xE1, 0xB8, 0xB1, 0xE1, 0xB8, + 0xB3, 0xE1, 0xB8, 0xB5, 0xE1, 0xB8, 0xB7, 0xE1, + 0xB8, 0xB9, 0xE1, 0xB8, 0xBB, 0xE1, 0xB8, 0xBD, + 0xE1, 0xB8, 0xBF, 0xE1, 0xB9, 0x81, 0xE1, 0xB9, + 0x83, 0xE1, 0xB9, 0x85, 0xE1, 0xB9, 0x87, 0xE1, + 0xB9, 0x89, 0xE1, 0xB9, 0x8B, 0xE1, 0xB9, 0x8D, + 0xE1, 0xB9, 0x8F, 0xE1, 0xB9, 0x91, 0xE1, 0xB9, + 0x93, 0xE1, 0xB9, 0x95, 0xE1, 0xB9, 0x97, 0xE1, + 0xB9, 0x99, 0xE1, 0xB9, 0x9B, 0xE1, 0xB9, 0x9D, + 0xE1, 0xB9, 0x9F, 0xE1, 0xB9, 0xA1, 0xE1, 0xB9, + 0xA3, 0xE1, 0xB9, 0xA5, 0xE1, 0xB9, 0xA7, 0xE1, + 0xB9, 0xA9, 0xE1, 0xB9, 0xAB, 0xE1, 0xB9, 0xAD, + 0xE1, 0xB9, 0xAF, 0xE1, 0xB9, 0xB1, 0xE1, 0xB9, + 0xB3, 0xE1, 0xB9, 0xB5, 0xE1, 0xB9, 0xB7, 0xE1, + 0xB9, 0xB9, 0xE1, 0xB9, 0xBB, 0xE1, 0xB9, 0xBD, + 0xE1, 0xB9, 0xBF, 0xE1, 0xBA, 0x81, 0xE1, 0xBA, + 0x83, 0xE1, 0xBA, 0x85, 0xE1, 0xBA, 0x87, 0xE1, + 0xBA, 0x89, 0xE1, 0xBA, 0x8B, 0xE1, 0xBA, 0x8D, + 0xE1, 0xBA, 0x8F, 0xE1, 0xBA, 0x91, 0xE1, 0xBA, + 0x93, 0xE1, 0xBA, 0x95, 0xE1, 0xBA, 0xA1, 0xE1, + 0xBA, 0xA3, 0xE1, 0xBA, 0xA5, 0xE1, 0xBA, 0xA7, + 0xE1, 0xBA, 0xA9, 0xE1, 0xBA, 0xAB, 0xE1, 0xBA, + 0xAD, 0xE1, 0xBA, 0xAF, 0xE1, 0xBA, 0xB1, 0xE1, + 0xBA, 0xB3, 0xE1, 0xBA, 0xB5, 0xE1, 0xBA, 0xB7, + 0xE1, 0xBA, 0xB9, 0xE1, 0xBA, 0xBB, 0xE1, 0xBA, + 0xBD, 0xE1, 0xBA, 0xBF, 0xE1, 0xBB, 0x81, 0xE1, + 0xBB, 0x83, 0xE1, 0xBB, 0x85, 0xE1, 0xBB, 0x87, + 0xE1, 0xBB, 0x89, 0xE1, 0xBB, 0x8B, 0xE1, 0xBB, + 0x8D, 0xE1, 0xBB, 0x8F, 0xE1, 0xBB, 0x91, 0xE1, + 0xBB, 0x93, 0xE1, 0xBB, 0x95, 0xE1, 0xBB, 0x97, + 0xE1, 0xBB, 0x99, 0xE1, 0xBB, 0x9B, 0xE1, 0xBB, + 0x9D, 0xE1, 0xBB, 0x9F, 0xE1, 0xBB, 0xA1, 0xE1, + 0xBB, 0xA3, 0xE1, 0xBB, 0xA5, 0xE1, 0xBB, 0xA7, + 0xE1, 0xBB, 0xA9, 0xE1, 0xBB, 0xAB, 0xE1, 0xBB, + 0xAD, 0xE1, 0xBB, 0xAF, 0xE1, 0xBB, 0xB1, 0xE1, + 0xBB, 0xB3, 0xE1, 0xBB, 0xB5, 0xE1, 0xBB, 0xB7, + 0xE1, 0xBB, 0xB9, 0xE1, 0xBC, 0x80, 0xE1, 0xBC, + 0x81, 0xE1, 0xBC, 0x82, 0xE1, 0xBC, 0x83, 0xE1, + 0xBC, 0x84, 0xE1, 0xBC, 0x85, 0xE1, 0xBC, 0x86, + 0xE1, 0xBC, 0x87, 0xE1, 0xBC, 0x90, 0xE1, 0xBC, + 0x91, 0xE1, 0xBC, 0x92, 0xE1, 0xBC, 0x93, 0xE1, + 0xBC, 0x94, 0xE1, 0xBC, 0x95, 0xE1, 0xBC, 0xA0, + 0xE1, 0xBC, 0xA1, 0xE1, 0xBC, 0xA2, 0xE1, 0xBC, + 0xA3, 0xE1, 0xBC, 0xA4, 0xE1, 0xBC, 0xA5, 0xE1, + 0xBC, 0xA6, 0xE1, 0xBC, 0xA7, 0xE1, 0xBC, 0xB0, + 0xE1, 0xBC, 0xB1, 0xE1, 0xBC, 0xB2, 0xE1, 0xBC, + 0xB3, 0xE1, 0xBC, 0xB4, 0xE1, 0xBC, 0xB5, 0xE1, + 0xBC, 0xB6, 0xE1, 0xBC, 0xB7, 0xE1, 0xBD, 0x80, + 0xE1, 0xBD, 0x81, 0xE1, 0xBD, 0x82, 0xE1, 0xBD, + 0x83, 0xE1, 0xBD, 0x84, 0xE1, 0xBD, 0x85, 0xE1, + 0xBD, 0x91, 0xE1, 0xBD, 0x93, 0xE1, 0xBD, 0x95, + 0xE1, 0xBD, 0x97, 0xE1, 0xBD, 0xA0, 0xE1, 0xBD, + 0xA1, 0xE1, 0xBD, 0xA2, 0xE1, 0xBD, 0xA3, 0xE1, + 0xBD, 0xA4, 0xE1, 0xBD, 0xA5, 0xE1, 0xBD, 0xA6, + 0xE1, 0xBD, 0xA7, 0xE1, 0xBE, 0x80, 0xE1, 0xBE, + 0x81, 0xE1, 0xBE, 0x82, 0xE1, 0xBE, 0x83, 0xE1, + 0xBE, 0x84, 0xE1, 0xBE, 0x85, 0xE1, 0xBE, 0x86, + 0xE1, 0xBE, 0x87, 0xE1, 0xBE, 0x90, 0xE1, 0xBE, + 0x91, 0xE1, 0xBE, 0x92, 0xE1, 0xBE, 0x93, 0xE1, + 0xBE, 0x94, 0xE1, 0xBE, 0x95, 0xE1, 0xBE, 0x96, + 0xE1, 0xBE, 0x97, 0xE1, 0xBE, 0xA0, 0xE1, 0xBE, + 0xA1, 0xE1, 0xBE, 0xA2, 0xE1, 0xBE, 0xA3, 0xE1, + 0xBE, 0xA4, 0xE1, 0xBE, 0xA5, 0xE1, 0xBE, 0xA6, + 0xE1, 0xBE, 0xA7, 0xE1, 0xBE, 0xB0, 0xE1, 0xBE, + 0xB1, 0xE1, 0xBD, 0xB0, 0xE1, 0xBD, 0xB1, 0xE1, + 0xBE, 0xB3, 0xE1, 0xBD, 0xB2, 0xE1, 0xBD, 0xB3, + 0xE1, 0xBD, 0xB4, 0xE1, 0xBD, 0xB5, 0xE1, 0xBF, + 0x83, 0xE1, 0xBF, 0x90, 0xE1, 0xBF, 0x91, 0xE1, + 0xBD, 0xB6, 0xE1, 0xBD, 0xB7, 0xE1, 0xBF, 0xA0, + 0xE1, 0xBF, 0xA1, 0xE1, 0xBD, 0xBA, 0xE1, 0xBD, + 0xBB, 0xE1, 0xBF, 0xA5, 0xE1, 0xBD, 0xB8, 0xE1, + 0xBD, 0xB9, 0xE1, 0xBD, 0xBC, 0xE1, 0xBD, 0xBD, + 0xE1, 0xBF, 0xB3, 0xCF, 0x89, 0x6B, 0xC3, 0xA5, + 0xE2, 0x85, 0x8E, 0xE2, 0x85, 0xB0, 0xE2, 0x85, + 0xB1, 0xE2, 0x85, 0xB2, 0xE2, 0x85, 0xB3, 0xE2, + 0x85, 0xB4, 0xE2, 0x85, 0xB5, 0xE2, 0x85, 0xB6, + 0xE2, 0x85, 0xB7, 0xE2, 0x85, 0xB8, 0xE2, 0x85, + 0xB9, 0xE2, 0x85, 0xBA, 0xE2, 0x85, 0xBB, 0xE2, + 0x85, 0xBC, 0xE2, 0x85, 0xBD, 0xE2, 0x85, 0xBE, + 0xE2, 0x85, 0xBF, 0xE2, 0x86, 0x84, 0xE2, 0x93, + 0x90, 0xE2, 0x93, 0x91, 0xE2, 0x93, 0x92, 0xE2, + 0x93, 0x93, 0xE2, 0x93, 0x94, 0xE2, 0x93, 0x95, + 0xE2, 0x93, 0x96, 0xE2, 0x93, 0x97, 0xE2, 0x93, + 0x98, 0xE2, 0x93, 0x99, 0xE2, 0x93, 0x9A, 0xE2, + 0x93, 0x9B, 0xE2, 0x93, 0x9C, 0xE2, 0x93, 0x9D, + 0xE2, 0x93, 0x9E, 0xE2, 0x93, 0x9F, 0xE2, 0x93, + 0xA0, 0xE2, 0x93, 0xA1, 0xE2, 0x93, 0xA2, 0xE2, + 0x93, 0xA3, 0xE2, 0x93, 0xA4, 0xE2, 0x93, 0xA5, + 0xE2, 0x93, 0xA6, 0xE2, 0x93, 0xA7, 0xE2, 0x93, + 0xA8, 0xE2, 0x93, 0xA9, 0xE2, 0xB0, 0xB0, 0xE2, + 0xB0, 0xB1, 0xE2, 0xB0, 0xB2, 0xE2, 0xB0, 0xB3, + 0xE2, 0xB0, 0xB4, 0xE2, 0xB0, 0xB5, 0xE2, 0xB0, + 0xB6, 0xE2, 0xB0, 0xB7, 0xE2, 0xB0, 0xB8, 0xE2, + 0xB0, 0xB9, 0xE2, 0xB0, 0xBA, 0xE2, 0xB0, 0xBB, + 0xE2, 0xB0, 0xBC, 0xE2, 0xB0, 0xBD, 0xE2, 0xB0, + 0xBE, 0xE2, 0xB0, 0xBF, 0xE2, 0xB1, 0x80, 0xE2, + 0xB1, 0x81, 0xE2, 0xB1, 0x82, 0xE2, 0xB1, 0x83, + 0xE2, 0xB1, 0x84, 0xE2, 0xB1, 0x85, 0xE2, 0xB1, + 0x86, 0xE2, 0xB1, 0x87, 0xE2, 0xB1, 0x88, 0xE2, + 0xB1, 0x89, 0xE2, 0xB1, 0x8A, 0xE2, 0xB1, 0x8B, + 0xE2, 0xB1, 0x8C, 0xE2, 0xB1, 0x8D, 0xE2, 0xB1, + 0x8E, 0xE2, 0xB1, 0x8F, 0xE2, 0xB1, 0x90, 0xE2, + 0xB1, 0x91, 0xE2, 0xB1, 0x92, 0xE2, 0xB1, 0x93, + 0xE2, 0xB1, 0x94, 0xE2, 0xB1, 0x95, 0xE2, 0xB1, + 0x96, 0xE2, 0xB1, 0x97, 0xE2, 0xB1, 0x98, 0xE2, + 0xB1, 0x99, 0xE2, 0xB1, 0x9A, 0xE2, 0xB1, 0x9B, + 0xE2, 0xB1, 0x9C, 0xE2, 0xB1, 0x9D, 0xE2, 0xB1, + 0x9E, 0xE2, 0xB1, 0xA1, 0xC9, 0xAB, 0xE1, 0xB5, + 0xBD, 0xC9, 0xBD, 0xE2, 0xB1, 0xA8, 0xE2, 0xB1, + 0xAA, 0xE2, 0xB1, 0xAC, 0xE2, 0xB1, 0xB6, 0xE2, + 0xB2, 0x81, 0xE2, 0xB2, 0x83, 0xE2, 0xB2, 0x85, + 0xE2, 0xB2, 0x87, 0xE2, 0xB2, 0x89, 0xE2, 0xB2, + 0x8B, 0xE2, 0xB2, 0x8D, 0xE2, 0xB2, 0x8F, 0xE2, + 0xB2, 0x91, 0xE2, 0xB2, 0x93, 0xE2, 0xB2, 0x95, + 0xE2, 0xB2, 0x97, 0xE2, 0xB2, 0x99, 0xE2, 0xB2, + 0x9B, 0xE2, 0xB2, 0x9D, 0xE2, 0xB2, 0x9F, 0xE2, + 0xB2, 0xA1, 0xE2, 0xB2, 0xA3, 0xE2, 0xB2, 0xA5, + 0xE2, 0xB2, 0xA7, 0xE2, 0xB2, 0xA9, 0xE2, 0xB2, + 0xAB, 0xE2, 0xB2, 0xAD, 0xE2, 0xB2, 0xAF, 0xE2, + 0xB2, 0xB1, 0xE2, 0xB2, 0xB3, 0xE2, 0xB2, 0xB5, + 0xE2, 0xB2, 0xB7, 0xE2, 0xB2, 0xB9, 0xE2, 0xB2, + 0xBB, 0xE2, 0xB2, 0xBD, 0xE2, 0xB2, 0xBF, 0xE2, + 0xB3, 0x81, 0xE2, 0xB3, 0x83, 0xE2, 0xB3, 0x85, + 0xE2, 0xB3, 0x87, 0xE2, 0xB3, 0x89, 0xE2, 0xB3, + 0x8B, 0xE2, 0xB3, 0x8D, 0xE2, 0xB3, 0x8F, 0xE2, + 0xB3, 0x91, 0xE2, 0xB3, 0x93, 0xE2, 0xB3, 0x95, + 0xE2, 0xB3, 0x97, 0xE2, 0xB3, 0x99, 0xE2, 0xB3, + 0x9B, 0xE2, 0xB3, 0x9D, 0xE2, 0xB3, 0x9F, 0xE2, + 0xB3, 0xA1, 0xE2, 0xB3, 0xA3, 0xEF, 0xBD, 0x81, + 0xEF, 0xBD, 0x82, 0xEF, 0xBD, 0x83, 0xEF, 0xBD, + 0x84, 0xEF, 0xBD, 0x85, 0xEF, 0xBD, 0x86, 0xEF, + 0xBD, 0x87, 0xEF, 0xBD, 0x88, 0xEF, 0xBD, 0x89, + 0xEF, 0xBD, 0x8A, 0xEF, 0xBD, 0x8B, 0xEF, 0xBD, + 0x8C, 0xEF, 0xBD, 0x8D, 0xEF, 0xBD, 0x8E, 0xEF, + 0xBD, 0x8F, 0xEF, 0xBD, 0x90, 0xEF, 0xBD, 0x91, + 0xEF, 0xBD, 0x92, 0xEF, 0xBD, 0x93, 0xEF, 0xBD, + 0x94, 0xEF, 0xBD, 0x95, 0xEF, 0xBD, 0x96, 0xEF, + 0xBD, 0x97, 0xEF, 0xBD, 0x98, 0xEF, 0xBD, 0x99, + 0xEF, 0xBD, 0x9A, 0xF0, 0x90, 0x90, 0xA8, 0xF0, + 0x90, 0x90, 0xA9, 0xF0, 0x90, 0x90, 0xAA, 0xF0, + 0x90, 0x90, 0xAB, 0xF0, 0x90, 0x90, 0xAC, 0xF0, + 0x90, 0x90, 0xAD, 0xF0, 0x90, 0x90, 0xAE, 0xF0, + 0x90, 0x90, 0xAF, 0xF0, 0x90, 0x90, 0xB0, 0xF0, + 0x90, 0x90, 0xB1, 0xF0, 0x90, 0x90, 0xB2, 0xF0, + 0x90, 0x90, 0xB3, 0xF0, 0x90, 0x90, 0xB4, 0xF0, + 0x90, 0x90, 0xB5, 0xF0, 0x90, 0x90, 0xB6, 0xF0, + 0x90, 0x90, 0xB7, 0xF0, 0x90, 0x90, 0xB8, 0xF0, + 0x90, 0x90, 0xB9, 0xF0, 0x90, 0x90, 0xBA, 0xF0, + 0x90, 0x90, 0xBB, 0xF0, 0x90, 0x90, 0xBC, 0xF0, + 0x90, 0x90, 0xBD, 0xF0, 0x90, 0x90, 0xBE, 0xF0, + 0x90, 0x90, 0xBF, 0xF0, 0x90, 0x91, 0x80, 0xF0, + 0x90, 0x91, 0x81, 0xF0, 0x90, 0x91, 0x82, 0xF0, + 0x90, 0x91, 0x83, 0xF0, 0x90, 0x91, 0x84, 0xF0, + 0x90, 0x91, 0x85, 0xF0, 0x90, 0x91, 0x86, 0xF0, + 0x90, 0x91, 0x87, 0xF0, 0x90, 0x91, 0x88, 0xF0, + 0x90, 0x91, 0x89, 0xF0, 0x90, 0x91, 0x8A, 0xF0, + 0x90, 0x91, 0x8B, 0xF0, 0x90, 0x91, 0x8C, 0xF0, + 0x90, 0x91, 0x8D, 0xF0, 0x90, 0x91, 0x8E, 0xF0, + 0x90, 0x91, 0x8F, + }, +}; + +static const u8_displacement_t u8_toupper_b3_tbl[2][5][256] = { + { + { /* Third byte table 0. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0, 0 }, { 1, 2 }, + { 2, 64 }, { 3, 125 }, { 4, 188 }, { 5, 226 }, + { 6, 288 }, { 7, 338 }, { 8, 364 }, { N_, 0 }, + { N_, 0 }, { 9, 376 }, { 10, 378 }, { 11, 416 }, + { 12, 486 }, { 13, 518 }, { 14, 614 }, { 15, 670 }, + { 16, 724 }, { 17, 740 }, { 18, 802 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 19, 816 }, { 20, 912 }, { 21, 1008 }, { 22, 1092 }, + { 23, 1179 }, { 24, 1269 }, { 25, 1365 }, { 26, 1448 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 27, 1469 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { 28, 1517 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 29, 1595 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 30, 1673 }, { 31, 1769 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + }, + { + { /* Third byte table 0. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { 0, 0 }, { 1, 2 }, + { 2, 64 }, { 3, 125 }, { 4, 188 }, { 5, 230 }, + { 6, 292 }, { 7, 344 }, { 8, 388 }, { N_, 0 }, + { N_, 0 }, { 9, 404 }, { 10, 412 }, { 11, 450 }, + { 12, 524 }, { 13, 556 }, { 14, 652 }, { 15, 708 }, + { 16, 772 }, { 17, 792 }, { 18, 854 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 1. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 19, 868 }, { N_, 0 }, { N_, 0 }, + { 20, 871 }, { 21, 967 }, { 22, 1063 }, { 23, 1147 }, + { 24, 1234 }, { 25, 1324 }, { 26, 1420 }, { 27, 1503 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 2. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 28, 1524 }, { 29, 1575 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { 30, 1578 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 31, 1656 }, { 32, 1704 }, { 33, 1816 }, { 34, 1912 }, + { 35, 1966 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 3. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { 36, 2080 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + { /* Third byte table 4. */ + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { 37, 2158 }, { 38, 2254 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, + }, + }, +}; + +static const uchar_t u8_toupper_b4_tbl[2][39][257] = { + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 46, 48, 50, 52, 54, 56, 58, 60, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 49, 49, 51, 51, 53, 53, + 55, 55, 55, 57, 57, 59, 59, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 50, 50, 52, 52, 54, 54, + 56, 56, 56, 58, 58, 60, 60, 62, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 4, 4, + 4, 6, 6, 6, 6, 8, 8, 8, + 8, 8, 8, 10, 10, 10, 12, 12, + 12, 12, 14, 14, 14, 14, 14, 16, + 16, 16, 18, 18, 20, 20, 22, 22, + 22, 24, 24, 24, 24, 24, 26, 26, + 26, 28, 28, 28, 28, 30, 30, 32, + 32, 32, 34, 34, 34, 34, 36, 36, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, + 4, 6, 8, 8, 10, 12, 12, 14, + 14, 16, 16, 18, 18, 20, 20, 22, + 22, 24, 24, 26, 26, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 48, 50, 52, 52, 54, 54, + 54, 54, 56, 56, 58, 58, 60, 60, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 32, 32, 34, 34, 36, 36, + 38, 38, 40, 40, 42, 42, 44, 44, + 46, 46, 48, 48, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 4, 6, + 8, 8, 10, 10, 12, 12, 12, 12, + 12, 14, 14, 14, 16, 16, 16, 16, + 16, 18, 20, 20, 20, 20, 20, 20, + 22, 22, 22, 24, 24, 24, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 4, 4, 4, 4, + 4, 6, 6, 8, 10, 10, 10, 10, + 10, 10, 10, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 6, + 8, 8, 10, 12, 14, 16, 18, 20, + 22, 24, 26, 28, 30, 32, 34, 36, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 30, 32, 34, 34, 34, 34, 36, 38, + 38, 38, 40, 40, 42, 42, 44, 44, + 46, 46, 48, 48, 50, 50, 52, 52, + 54, 54, 56, 56, 58, 58, 60, 60, + 62, 64, 66, 68, 68, 68, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, + 70, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 64, 66, 66, 68, 68, 70, 70, + 72, 72, 74, 74, 76, 76, 78, 78, + 80, 80, 82, 82, 84, 84, 86, 86, + 88, 88, 90, 90, 92, 92, 94, 94, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 50, 50, 52, 52, 54, 54, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 4, 4, 6, + 6, 8, 8, 10, 10, 12, 12, 14, + 14, 14, 16, 16, 18, 18, 20, 20, + 22, 22, 24, 24, 26, 26, 28, 28, + 30, 30, 32, 32, 34, 34, 36, 36, + 38, 38, 40, 40, 42, 42, 44, 44, + 46, 46, 48, 48, 50, 50, 52, 52, + 52, 52, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 6, 8, 10, 12, + 14, 16, 18, 20, 22, 24, 26, 28, + 30, 32, 34, 36, 38, 40, 42, 44, + 46, 48, 50, 52, 54, 56, 58, 60, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 87, 87, 90, 90, 93, 93, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 87, 87, 90, 90, 93, 93, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 33, 33, 33, 33, 36, 36, 36, 36, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 45, 48, 51, 54, 57, 60, 63, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 69, 72, 75, 78, 81, 84, 87, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 21, 21, 24, 24, 27, 27, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 33, 36, 39, 42, 45, 48, 51, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 57, 60, 63, 66, 69, 72, 75, + 78, 81, 84, 87, 90, 93, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 75, 78, 78, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 6, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 12, 15, 15, 15, 15, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 9, 12, 15, 18, + 21, 24, 27, 30, 33, 36, 39, 42, + 45, 48, 51, 54, 57, 60, 63, 66, + 69, 72, 75, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + }, + }, + { + { /* Fourth byte table 0. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, + }, + { /* Fourth byte table 1. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 46, 48, 50, 52, 54, 56, 58, 60, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 2. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 49, 49, 51, 51, 53, 53, + 55, 55, 55, 57, 57, 59, 59, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, + }, + { /* Fourth byte table 3. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 4, 4, 6, 6, 8, + 8, 10, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 50, 50, 52, 52, 54, 54, + 56, 56, 56, 58, 58, 60, 60, 62, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + 63, + }, + { /* Fourth byte table 4. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 4, 4, 6, 6, + 6, 8, 8, 8, 8, 10, 10, 10, + 10, 10, 10, 12, 12, 12, 14, 14, + 14, 14, 16, 18, 18, 18, 18, 20, + 20, 20, 22, 22, 24, 24, 26, 26, + 26, 28, 28, 28, 28, 28, 30, 30, + 30, 32, 32, 32, 32, 34, 34, 36, + 36, 36, 38, 38, 38, 38, 40, 40, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, + }, + { /* Fourth byte table 5. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, + 4, 6, 8, 8, 10, 12, 12, 14, + 14, 16, 16, 18, 18, 20, 20, 22, + 22, 24, 24, 26, 26, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 48, 50, 52, 52, 54, 54, + 54, 54, 56, 56, 58, 58, 60, 60, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 6. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 32, 32, 34, 34, 36, 36, + 38, 38, 40, 40, 42, 42, 44, 44, + 46, 46, 48, 48, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, + 52, + }, + { /* Fourth byte table 7. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 2, 2, 2, + 4, 4, 6, 6, 8, 8, 10, 10, + 12, 12, 12, 12, 14, 16, 16, 18, + 20, 20, 22, 22, 24, 24, 24, 24, + 24, 26, 26, 26, 28, 28, 28, 28, + 28, 30, 32, 32, 35, 35, 35, 35, + 37, 37, 37, 39, 39, 39, 41, 41, + 41, 41, 41, 41, 41, 41, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, + 44, + }, + { /* Fourth byte table 8. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 4, 4, 4, 4, + 4, 6, 8, 10, 12, 14, 14, 14, + 14, 14, 14, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, + }, + { /* Fourth byte table 9. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 4, 6, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, + }, + { /* Fourth byte table 10. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 6, + 8, 8, 10, 12, 14, 16, 18, 20, + 22, 24, 26, 28, 30, 32, 34, 36, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, + }, + { /* Fourth byte table 11. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 30, 32, 34, 34, 34, 34, 36, 38, + 38, 38, 40, 40, 42, 42, 44, 44, + 46, 46, 48, 48, 50, 50, 52, 52, + 54, 54, 56, 56, 58, 58, 60, 60, + 62, 64, 66, 68, 68, 68, 70, 70, + 70, 72, 72, 72, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, + 74, + }, + { /* Fourth byte table 12. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, + }, + { /* Fourth byte table 13. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62, + 64, 64, 66, 66, 68, 68, 70, 70, + 72, 72, 74, 74, 76, 76, 78, 78, + 80, 80, 82, 82, 84, 84, 86, 86, + 88, 88, 90, 90, 92, 92, 94, 94, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 14. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 50, 50, 52, 52, 54, 54, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, + }, + { /* Fourth byte table 15. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 4, 4, 6, + 6, 8, 8, 10, 10, 12, 12, 14, + 16, 16, 18, 18, 20, 20, 22, 22, + 24, 24, 26, 26, 28, 28, 30, 30, + 32, 32, 34, 34, 36, 36, 38, 38, + 40, 40, 42, 42, 44, 44, 46, 46, + 48, 48, 50, 50, 52, 52, 54, 54, + 56, 56, 58, 58, 60, 60, 62, 62, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + { /* Fourth byte table 16. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 4, 4, 6, 6, + 8, 8, 10, 10, 12, 12, 14, 14, + 16, 16, 18, 18, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, + }, + { /* Fourth byte table 17. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 6, 8, 10, 12, + 14, 16, 18, 20, 22, 24, 26, 28, + 30, 32, 34, 36, 38, 40, 42, 44, + 46, 48, 50, 52, 54, 56, 58, 60, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, + }, + { /* Fourth byte table 18. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, + }, + { /* Fourth byte table 19. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 20. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 87, 87, 90, 90, 93, 93, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 21. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 87, 87, 90, 90, 93, 93, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 22. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 33, 33, 33, 33, 36, 36, 36, 36, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, + 84, + }, + { /* Fourth byte table 23. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, + 87, + }, + { /* Fourth byte table 24. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 45, 48, 51, 54, 57, 60, 63, + 66, 66, 66, 66, 66, 66, 66, 66, + 66, 69, 72, 75, 78, 81, 84, 87, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, + 90, + }, + { /* Fourth byte table 25. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 21, 21, 24, 24, 27, 27, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 33, 36, 39, 42, 45, 48, 51, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 57, 60, 63, 66, 69, 72, 75, + 78, 81, 84, 87, 90, 93, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 26. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 24, 24, 24, 24, 24, 24, 24, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 72, 72, 72, 72, 72, 72, 72, + 72, 75, 78, 78, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, + }, + { /* Fourth byte table 27. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 6, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 12, 15, 15, 15, 15, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, + }, + { /* Fourth byte table 28. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 6, 9, 12, 15, 18, 21, 24, + 27, 30, 33, 36, 39, 42, 45, 48, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, + 51, + }, + { /* Fourth byte table 29. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, + }, + { /* Fourth byte table 30. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, + }, + { /* Fourth byte table 31. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, + }, + { /* Fourth byte table 32. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 93, 93, 96, 96, 96, 96, 98, 100, + 100, 103, 103, 106, 106, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, + 112, + }, + { /* Fourth byte table 33. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 57, 57, + 60, 60, 63, 63, 66, 66, 69, 69, + 72, 72, 75, 75, 78, 78, 81, 81, + 84, 84, 87, 87, 90, 90, 93, 93, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 34. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 6, 6, 9, 9, + 12, 12, 15, 15, 18, 18, 21, 21, + 24, 24, 27, 27, 30, 30, 33, 33, + 36, 36, 39, 39, 42, 42, 45, 45, + 48, 48, 51, 51, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, + }, + { /* Fourth byte table 35. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, 9, 12, 15, 18, 21, + 24, 27, 30, 33, 36, 39, 42, 45, + 48, 51, 54, 57, 60, 63, 66, 69, + 72, 75, 78, 81, 84, 87, 90, 93, + 96, 99, 102, 105, 108, 111, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, + 114, + }, + { /* Fourth byte table 36. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 9, 12, 15, 18, + 21, 24, 27, 30, 33, 36, 39, 42, + 45, 48, 51, 54, 57, 60, 63, 66, + 69, 72, 75, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, + }, + { /* Fourth byte table 37. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, + }, + { /* Fourth byte table 38. */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, + }, + }, +}; + +static const uchar_t u8_toupper_final_tbl[2][2318] = { + { + 0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82, + 0xC3, 0x83, 0xC3, 0x84, 0xC3, 0x85, 0xC3, 0x86, + 0xC3, 0x87, 0xC3, 0x88, 0xC3, 0x89, 0xC3, 0x8A, + 0xC3, 0x8B, 0xC3, 0x8C, 0xC3, 0x8D, 0xC3, 0x8E, + 0xC3, 0x8F, 0xC3, 0x90, 0xC3, 0x91, 0xC3, 0x92, + 0xC3, 0x93, 0xC3, 0x94, 0xC3, 0x95, 0xC3, 0x96, + 0xC3, 0x98, 0xC3, 0x99, 0xC3, 0x9A, 0xC3, 0x9B, + 0xC3, 0x9C, 0xC3, 0x9D, 0xC3, 0x9E, 0xC5, 0xB8, + 0xC4, 0x80, 0xC4, 0x82, 0xC4, 0x84, 0xC4, 0x86, + 0xC4, 0x88, 0xC4, 0x8A, 0xC4, 0x8C, 0xC4, 0x8E, + 0xC4, 0x90, 0xC4, 0x92, 0xC4, 0x94, 0xC4, 0x96, + 0xC4, 0x98, 0xC4, 0x9A, 0xC4, 0x9C, 0xC4, 0x9E, + 0xC4, 0xA0, 0xC4, 0xA2, 0xC4, 0xA4, 0xC4, 0xA6, + 0xC4, 0xA8, 0xC4, 0xAA, 0xC4, 0xAC, 0xC4, 0xAE, + 0x49, 0xC4, 0xB2, 0xC4, 0xB4, 0xC4, 0xB6, 0xC4, + 0xB9, 0xC4, 0xBB, 0xC4, 0xBD, 0xC4, 0xBF, 0xC5, + 0x81, 0xC5, 0x83, 0xC5, 0x85, 0xC5, 0x87, 0xC5, + 0x8A, 0xC5, 0x8C, 0xC5, 0x8E, 0xC5, 0x90, 0xC5, + 0x92, 0xC5, 0x94, 0xC5, 0x96, 0xC5, 0x98, 0xC5, + 0x9A, 0xC5, 0x9C, 0xC5, 0x9E, 0xC5, 0xA0, 0xC5, + 0xA2, 0xC5, 0xA4, 0xC5, 0xA6, 0xC5, 0xA8, 0xC5, + 0xAA, 0xC5, 0xAC, 0xC5, 0xAE, 0xC5, 0xB0, 0xC5, + 0xB2, 0xC5, 0xB4, 0xC5, 0xB6, 0xC5, 0xB9, 0xC5, + 0xBB, 0xC5, 0xBD, 0x53, 0xC6, 0x82, 0xC6, 0x84, + 0xC6, 0x87, 0xC6, 0x8B, 0xC6, 0x91, 0xC7, 0xB6, + 0xC6, 0x98, 0xC8, 0xA0, 0xC6, 0xA0, 0xC6, 0xA2, + 0xC6, 0xA4, 0xC6, 0xA7, 0xC6, 0xAC, 0xC6, 0xAF, + 0xC6, 0xB3, 0xC6, 0xB5, 0xC6, 0xB8, 0xC6, 0xBC, + 0xC7, 0xB7, 0xC7, 0x84, 0xC7, 0x84, 0xC7, 0x87, + 0xC7, 0x87, 0xC7, 0x8A, 0xC7, 0x8A, 0xC7, 0x8D, + 0xC7, 0x8F, 0xC7, 0x91, 0xC7, 0x93, 0xC7, 0x95, + 0xC7, 0x97, 0xC7, 0x99, 0xC7, 0x9B, 0xC6, 0x8E, + 0xC7, 0x9E, 0xC7, 0xA0, 0xC7, 0xA2, 0xC7, 0xA4, + 0xC7, 0xA6, 0xC7, 0xA8, 0xC7, 0xAA, 0xC7, 0xAC, + 0xC7, 0xAE, 0xC7, 0xB1, 0xC7, 0xB1, 0xC7, 0xB4, + 0xC7, 0xB8, 0xC7, 0xBA, 0xC7, 0xBC, 0xC7, 0xBE, + 0xC8, 0x80, 0xC8, 0x82, 0xC8, 0x84, 0xC8, 0x86, + 0xC8, 0x88, 0xC8, 0x8A, 0xC8, 0x8C, 0xC8, 0x8E, + 0xC8, 0x90, 0xC8, 0x92, 0xC8, 0x94, 0xC8, 0x96, + 0xC8, 0x98, 0xC8, 0x9A, 0xC8, 0x9C, 0xC8, 0x9E, + 0xC8, 0xA2, 0xC8, 0xA4, 0xC8, 0xA6, 0xC8, 0xA8, + 0xC8, 0xAA, 0xC8, 0xAC, 0xC8, 0xAE, 0xC8, 0xB0, + 0xC8, 0xB2, 0xC6, 0x81, 0xC6, 0x86, 0xC6, 0x89, + 0xC6, 0x8A, 0xC6, 0x8F, 0xC6, 0x90, 0xC6, 0x93, + 0xC6, 0x94, 0xC6, 0x97, 0xC6, 0x96, 0xC6, 0x9C, + 0xC6, 0x9D, 0xC6, 0x9F, 0xC6, 0xA6, 0xC6, 0xA9, + 0xC6, 0xAE, 0xC6, 0xB1, 0xC6, 0xB2, 0xC6, 0xB7, + 0xCE, 0x99, 0xCE, 0x86, 0xCE, 0x88, 0xCE, 0x89, + 0xCE, 0x8A, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, + 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, + 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, + 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, + 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0xA3, 0xCE, 0xA3, + 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, + 0xCE, 0xA8, 0xCE, 0xA9, 0xCE, 0xAA, 0xCE, 0xAB, + 0xCE, 0x8C, 0xCE, 0x8E, 0xCE, 0x8F, 0xCE, 0x92, + 0xCE, 0x98, 0xCE, 0xA6, 0xCE, 0xA0, 0xCF, 0x98, + 0xCF, 0x9A, 0xCF, 0x9C, 0xCF, 0x9E, 0xCF, 0xA0, + 0xCF, 0xA2, 0xCF, 0xA4, 0xCF, 0xA6, 0xCF, 0xA8, + 0xCF, 0xAA, 0xCF, 0xAC, 0xCF, 0xAE, 0xCE, 0x9A, + 0xCE, 0xA1, 0xCE, 0xA3, 0xCE, 0x95, 0xD0, 0x90, + 0xD0, 0x91, 0xD0, 0x92, 0xD0, 0x93, 0xD0, 0x94, + 0xD0, 0x95, 0xD0, 0x96, 0xD0, 0x97, 0xD0, 0x98, + 0xD0, 0x99, 0xD0, 0x9A, 0xD0, 0x9B, 0xD0, 0x9C, + 0xD0, 0x9D, 0xD0, 0x9E, 0xD0, 0x9F, 0xD0, 0xA0, + 0xD0, 0xA1, 0xD0, 0xA2, 0xD0, 0xA3, 0xD0, 0xA4, + 0xD0, 0xA5, 0xD0, 0xA6, 0xD0, 0xA7, 0xD0, 0xA8, + 0xD0, 0xA9, 0xD0, 0xAA, 0xD0, 0xAB, 0xD0, 0xAC, + 0xD0, 0xAD, 0xD0, 0xAE, 0xD0, 0xAF, 0xD0, 0x80, + 0xD0, 0x81, 0xD0, 0x82, 0xD0, 0x83, 0xD0, 0x84, + 0xD0, 0x85, 0xD0, 0x86, 0xD0, 0x87, 0xD0, 0x88, + 0xD0, 0x89, 0xD0, 0x8A, 0xD0, 0x8B, 0xD0, 0x8C, + 0xD0, 0x8D, 0xD0, 0x8E, 0xD0, 0x8F, 0xD1, 0xA0, + 0xD1, 0xA2, 0xD1, 0xA4, 0xD1, 0xA6, 0xD1, 0xA8, + 0xD1, 0xAA, 0xD1, 0xAC, 0xD1, 0xAE, 0xD1, 0xB0, + 0xD1, 0xB2, 0xD1, 0xB4, 0xD1, 0xB6, 0xD1, 0xB8, + 0xD1, 0xBA, 0xD1, 0xBC, 0xD1, 0xBE, 0xD2, 0x80, + 0xD2, 0x8A, 0xD2, 0x8C, 0xD2, 0x8E, 0xD2, 0x90, + 0xD2, 0x92, 0xD2, 0x94, 0xD2, 0x96, 0xD2, 0x98, + 0xD2, 0x9A, 0xD2, 0x9C, 0xD2, 0x9E, 0xD2, 0xA0, + 0xD2, 0xA2, 0xD2, 0xA4, 0xD2, 0xA6, 0xD2, 0xA8, + 0xD2, 0xAA, 0xD2, 0xAC, 0xD2, 0xAE, 0xD2, 0xB0, + 0xD2, 0xB2, 0xD2, 0xB4, 0xD2, 0xB6, 0xD2, 0xB8, + 0xD2, 0xBA, 0xD2, 0xBC, 0xD2, 0xBE, 0xD3, 0x81, + 0xD3, 0x83, 0xD3, 0x85, 0xD3, 0x87, 0xD3, 0x89, + 0xD3, 0x8B, 0xD3, 0x8D, 0xD3, 0x90, 0xD3, 0x92, + 0xD3, 0x94, 0xD3, 0x96, 0xD3, 0x98, 0xD3, 0x9A, + 0xD3, 0x9C, 0xD3, 0x9E, 0xD3, 0xA0, 0xD3, 0xA2, + 0xD3, 0xA4, 0xD3, 0xA6, 0xD3, 0xA8, 0xD3, 0xAA, + 0xD3, 0xAC, 0xD3, 0xAE, 0xD3, 0xB0, 0xD3, 0xB2, + 0xD3, 0xB4, 0xD3, 0xB8, 0xD4, 0x80, 0xD4, 0x82, + 0xD4, 0x84, 0xD4, 0x86, 0xD4, 0x88, 0xD4, 0x8A, + 0xD4, 0x8C, 0xD4, 0x8E, 0xD4, 0xB1, 0xD4, 0xB2, + 0xD4, 0xB3, 0xD4, 0xB4, 0xD4, 0xB5, 0xD4, 0xB6, + 0xD4, 0xB7, 0xD4, 0xB8, 0xD4, 0xB9, 0xD4, 0xBA, + 0xD4, 0xBB, 0xD4, 0xBC, 0xD4, 0xBD, 0xD4, 0xBE, + 0xD4, 0xBF, 0xD5, 0x80, 0xD5, 0x81, 0xD5, 0x82, + 0xD5, 0x83, 0xD5, 0x84, 0xD5, 0x85, 0xD5, 0x86, + 0xD5, 0x87, 0xD5, 0x88, 0xD5, 0x89, 0xD5, 0x8A, + 0xD5, 0x8B, 0xD5, 0x8C, 0xD5, 0x8D, 0xD5, 0x8E, + 0xD5, 0x8F, 0xD5, 0x90, 0xD5, 0x91, 0xD5, 0x92, + 0xD5, 0x93, 0xD5, 0x94, 0xD5, 0x95, 0xD5, 0x96, + 0xE1, 0xB8, 0x80, 0xE1, 0xB8, 0x82, 0xE1, 0xB8, + 0x84, 0xE1, 0xB8, 0x86, 0xE1, 0xB8, 0x88, 0xE1, + 0xB8, 0x8A, 0xE1, 0xB8, 0x8C, 0xE1, 0xB8, 0x8E, + 0xE1, 0xB8, 0x90, 0xE1, 0xB8, 0x92, 0xE1, 0xB8, + 0x94, 0xE1, 0xB8, 0x96, 0xE1, 0xB8, 0x98, 0xE1, + 0xB8, 0x9A, 0xE1, 0xB8, 0x9C, 0xE1, 0xB8, 0x9E, + 0xE1, 0xB8, 0xA0, 0xE1, 0xB8, 0xA2, 0xE1, 0xB8, + 0xA4, 0xE1, 0xB8, 0xA6, 0xE1, 0xB8, 0xA8, 0xE1, + 0xB8, 0xAA, 0xE1, 0xB8, 0xAC, 0xE1, 0xB8, 0xAE, + 0xE1, 0xB8, 0xB0, 0xE1, 0xB8, 0xB2, 0xE1, 0xB8, + 0xB4, 0xE1, 0xB8, 0xB6, 0xE1, 0xB8, 0xB8, 0xE1, + 0xB8, 0xBA, 0xE1, 0xB8, 0xBC, 0xE1, 0xB8, 0xBE, + 0xE1, 0xB9, 0x80, 0xE1, 0xB9, 0x82, 0xE1, 0xB9, + 0x84, 0xE1, 0xB9, 0x86, 0xE1, 0xB9, 0x88, 0xE1, + 0xB9, 0x8A, 0xE1, 0xB9, 0x8C, 0xE1, 0xB9, 0x8E, + 0xE1, 0xB9, 0x90, 0xE1, 0xB9, 0x92, 0xE1, 0xB9, + 0x94, 0xE1, 0xB9, 0x96, 0xE1, 0xB9, 0x98, 0xE1, + 0xB9, 0x9A, 0xE1, 0xB9, 0x9C, 0xE1, 0xB9, 0x9E, + 0xE1, 0xB9, 0xA0, 0xE1, 0xB9, 0xA2, 0xE1, 0xB9, + 0xA4, 0xE1, 0xB9, 0xA6, 0xE1, 0xB9, 0xA8, 0xE1, + 0xB9, 0xAA, 0xE1, 0xB9, 0xAC, 0xE1, 0xB9, 0xAE, + 0xE1, 0xB9, 0xB0, 0xE1, 0xB9, 0xB2, 0xE1, 0xB9, + 0xB4, 0xE1, 0xB9, 0xB6, 0xE1, 0xB9, 0xB8, 0xE1, + 0xB9, 0xBA, 0xE1, 0xB9, 0xBC, 0xE1, 0xB9, 0xBE, + 0xE1, 0xBA, 0x80, 0xE1, 0xBA, 0x82, 0xE1, 0xBA, + 0x84, 0xE1, 0xBA, 0x86, 0xE1, 0xBA, 0x88, 0xE1, + 0xBA, 0x8A, 0xE1, 0xBA, 0x8C, 0xE1, 0xBA, 0x8E, + 0xE1, 0xBA, 0x90, 0xE1, 0xBA, 0x92, 0xE1, 0xBA, + 0x94, 0xE1, 0xB9, 0xA0, 0xE1, 0xBA, 0xA0, 0xE1, + 0xBA, 0xA2, 0xE1, 0xBA, 0xA4, 0xE1, 0xBA, 0xA6, + 0xE1, 0xBA, 0xA8, 0xE1, 0xBA, 0xAA, 0xE1, 0xBA, + 0xAC, 0xE1, 0xBA, 0xAE, 0xE1, 0xBA, 0xB0, 0xE1, + 0xBA, 0xB2, 0xE1, 0xBA, 0xB4, 0xE1, 0xBA, 0xB6, + 0xE1, 0xBA, 0xB8, 0xE1, 0xBA, 0xBA, 0xE1, 0xBA, + 0xBC, 0xE1, 0xBA, 0xBE, 0xE1, 0xBB, 0x80, 0xE1, + 0xBB, 0x82, 0xE1, 0xBB, 0x84, 0xE1, 0xBB, 0x86, + 0xE1, 0xBB, 0x88, 0xE1, 0xBB, 0x8A, 0xE1, 0xBB, + 0x8C, 0xE1, 0xBB, 0x8E, 0xE1, 0xBB, 0x90, 0xE1, + 0xBB, 0x92, 0xE1, 0xBB, 0x94, 0xE1, 0xBB, 0x96, + 0xE1, 0xBB, 0x98, 0xE1, 0xBB, 0x9A, 0xE1, 0xBB, + 0x9C, 0xE1, 0xBB, 0x9E, 0xE1, 0xBB, 0xA0, 0xE1, + 0xBB, 0xA2, 0xE1, 0xBB, 0xA4, 0xE1, 0xBB, 0xA6, + 0xE1, 0xBB, 0xA8, 0xE1, 0xBB, 0xAA, 0xE1, 0xBB, + 0xAC, 0xE1, 0xBB, 0xAE, 0xE1, 0xBB, 0xB0, 0xE1, + 0xBB, 0xB2, 0xE1, 0xBB, 0xB4, 0xE1, 0xBB, 0xB6, + 0xE1, 0xBB, 0xB8, 0xE1, 0xBC, 0x88, 0xE1, 0xBC, + 0x89, 0xE1, 0xBC, 0x8A, 0xE1, 0xBC, 0x8B, 0xE1, + 0xBC, 0x8C, 0xE1, 0xBC, 0x8D, 0xE1, 0xBC, 0x8E, + 0xE1, 0xBC, 0x8F, 0xE1, 0xBC, 0x98, 0xE1, 0xBC, + 0x99, 0xE1, 0xBC, 0x9A, 0xE1, 0xBC, 0x9B, 0xE1, + 0xBC, 0x9C, 0xE1, 0xBC, 0x9D, 0xE1, 0xBC, 0xA8, + 0xE1, 0xBC, 0xA9, 0xE1, 0xBC, 0xAA, 0xE1, 0xBC, + 0xAB, 0xE1, 0xBC, 0xAC, 0xE1, 0xBC, 0xAD, 0xE1, + 0xBC, 0xAE, 0xE1, 0xBC, 0xAF, 0xE1, 0xBC, 0xB8, + 0xE1, 0xBC, 0xB9, 0xE1, 0xBC, 0xBA, 0xE1, 0xBC, + 0xBB, 0xE1, 0xBC, 0xBC, 0xE1, 0xBC, 0xBD, 0xE1, + 0xBC, 0xBE, 0xE1, 0xBC, 0xBF, 0xE1, 0xBD, 0x88, + 0xE1, 0xBD, 0x89, 0xE1, 0xBD, 0x8A, 0xE1, 0xBD, + 0x8B, 0xE1, 0xBD, 0x8C, 0xE1, 0xBD, 0x8D, 0xE1, + 0xBD, 0x99, 0xE1, 0xBD, 0x9B, 0xE1, 0xBD, 0x9D, + 0xE1, 0xBD, 0x9F, 0xE1, 0xBD, 0xA8, 0xE1, 0xBD, + 0xA9, 0xE1, 0xBD, 0xAA, 0xE1, 0xBD, 0xAB, 0xE1, + 0xBD, 0xAC, 0xE1, 0xBD, 0xAD, 0xE1, 0xBD, 0xAE, + 0xE1, 0xBD, 0xAF, 0xE1, 0xBE, 0xBA, 0xE1, 0xBE, + 0xBB, 0xE1, 0xBF, 0x88, 0xE1, 0xBF, 0x89, 0xE1, + 0xBF, 0x8A, 0xE1, 0xBF, 0x8B, 0xE1, 0xBF, 0x9A, + 0xE1, 0xBF, 0x9B, 0xE1, 0xBF, 0xB8, 0xE1, 0xBF, + 0xB9, 0xE1, 0xBF, 0xAA, 0xE1, 0xBF, 0xAB, 0xE1, + 0xBF, 0xBA, 0xE1, 0xBF, 0xBB, 0xE1, 0xBE, 0x88, + 0xE1, 0xBE, 0x89, 0xE1, 0xBE, 0x8A, 0xE1, 0xBE, + 0x8B, 0xE1, 0xBE, 0x8C, 0xE1, 0xBE, 0x8D, 0xE1, + 0xBE, 0x8E, 0xE1, 0xBE, 0x8F, 0xE1, 0xBE, 0x98, + 0xE1, 0xBE, 0x99, 0xE1, 0xBE, 0x9A, 0xE1, 0xBE, + 0x9B, 0xE1, 0xBE, 0x9C, 0xE1, 0xBE, 0x9D, 0xE1, + 0xBE, 0x9E, 0xE1, 0xBE, 0x9F, 0xE1, 0xBE, 0xA8, + 0xE1, 0xBE, 0xA9, 0xE1, 0xBE, 0xAA, 0xE1, 0xBE, + 0xAB, 0xE1, 0xBE, 0xAC, 0xE1, 0xBE, 0xAD, 0xE1, + 0xBE, 0xAE, 0xE1, 0xBE, 0xAF, 0xE1, 0xBE, 0xB8, + 0xE1, 0xBE, 0xB9, 0xE1, 0xBE, 0xBC, 0xCE, 0x99, + 0xE1, 0xBF, 0x8C, 0xE1, 0xBF, 0x98, 0xE1, 0xBF, + 0x99, 0xE1, 0xBF, 0xA8, 0xE1, 0xBF, 0xA9, 0xE1, + 0xBF, 0xAC, 0xE1, 0xBF, 0xBC, 0xE2, 0x85, 0xA0, + 0xE2, 0x85, 0xA1, 0xE2, 0x85, 0xA2, 0xE2, 0x85, + 0xA3, 0xE2, 0x85, 0xA4, 0xE2, 0x85, 0xA5, 0xE2, + 0x85, 0xA6, 0xE2, 0x85, 0xA7, 0xE2, 0x85, 0xA8, + 0xE2, 0x85, 0xA9, 0xE2, 0x85, 0xAA, 0xE2, 0x85, + 0xAB, 0xE2, 0x85, 0xAC, 0xE2, 0x85, 0xAD, 0xE2, + 0x85, 0xAE, 0xE2, 0x85, 0xAF, 0xE2, 0x92, 0xB6, + 0xE2, 0x92, 0xB7, 0xE2, 0x92, 0xB8, 0xE2, 0x92, + 0xB9, 0xE2, 0x92, 0xBA, 0xE2, 0x92, 0xBB, 0xE2, + 0x92, 0xBC, 0xE2, 0x92, 0xBD, 0xE2, 0x92, 0xBE, + 0xE2, 0x92, 0xBF, 0xE2, 0x93, 0x80, 0xE2, 0x93, + 0x81, 0xE2, 0x93, 0x82, 0xE2, 0x93, 0x83, 0xE2, + 0x93, 0x84, 0xE2, 0x93, 0x85, 0xE2, 0x93, 0x86, + 0xE2, 0x93, 0x87, 0xE2, 0x93, 0x88, 0xE2, 0x93, + 0x89, 0xE2, 0x93, 0x8A, 0xE2, 0x93, 0x8B, 0xE2, + 0x93, 0x8C, 0xE2, 0x93, 0x8D, 0xE2, 0x93, 0x8E, + 0xE2, 0x93, 0x8F, 0xEF, 0xBC, 0xA1, 0xEF, 0xBC, + 0xA2, 0xEF, 0xBC, 0xA3, 0xEF, 0xBC, 0xA4, 0xEF, + 0xBC, 0xA5, 0xEF, 0xBC, 0xA6, 0xEF, 0xBC, 0xA7, + 0xEF, 0xBC, 0xA8, 0xEF, 0xBC, 0xA9, 0xEF, 0xBC, + 0xAA, 0xEF, 0xBC, 0xAB, 0xEF, 0xBC, 0xAC, 0xEF, + 0xBC, 0xAD, 0xEF, 0xBC, 0xAE, 0xEF, 0xBC, 0xAF, + 0xEF, 0xBC, 0xB0, 0xEF, 0xBC, 0xB1, 0xEF, 0xBC, + 0xB2, 0xEF, 0xBC, 0xB3, 0xEF, 0xBC, 0xB4, 0xEF, + 0xBC, 0xB5, 0xEF, 0xBC, 0xB6, 0xEF, 0xBC, 0xB7, + 0xEF, 0xBC, 0xB8, 0xEF, 0xBC, 0xB9, 0xEF, 0xBC, + 0xBA, 0xF0, 0x90, 0x90, 0x80, 0xF0, 0x90, 0x90, + 0x81, 0xF0, 0x90, 0x90, 0x82, 0xF0, 0x90, 0x90, + 0x83, 0xF0, 0x90, 0x90, 0x84, 0xF0, 0x90, 0x90, + 0x85, 0xF0, 0x90, 0x90, 0x86, 0xF0, 0x90, 0x90, + 0x87, 0xF0, 0x90, 0x90, 0x88, 0xF0, 0x90, 0x90, + 0x89, 0xF0, 0x90, 0x90, 0x8A, 0xF0, 0x90, 0x90, + 0x8B, 0xF0, 0x90, 0x90, 0x8C, 0xF0, 0x90, 0x90, + 0x8D, 0xF0, 0x90, 0x90, 0x8E, 0xF0, 0x90, 0x90, + 0x8F, 0xF0, 0x90, 0x90, 0x90, 0xF0, 0x90, 0x90, + 0x91, 0xF0, 0x90, 0x90, 0x92, 0xF0, 0x90, 0x90, + 0x93, 0xF0, 0x90, 0x90, 0x94, 0xF0, 0x90, 0x90, + 0x95, 0xF0, 0x90, 0x90, 0x96, 0xF0, 0x90, 0x90, + 0x97, 0xF0, 0x90, 0x90, 0x98, 0xF0, 0x90, 0x90, + 0x99, 0xF0, 0x90, 0x90, 0x9A, 0xF0, 0x90, 0x90, + 0x9B, 0xF0, 0x90, 0x90, 0x9C, 0xF0, 0x90, 0x90, + 0x9D, 0xF0, 0x90, 0x90, 0x9E, 0xF0, 0x90, 0x90, + 0x9F, 0xF0, 0x90, 0x90, 0xA0, 0xF0, 0x90, 0x90, + 0xA1, 0xF0, 0x90, 0x90, 0xA2, 0xF0, 0x90, 0x90, + 0xA3, 0xF0, 0x90, 0x90, 0xA4, 0xF0, 0x90, 0x90, + 0xA5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + }, + { + 0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82, + 0xC3, 0x83, 0xC3, 0x84, 0xC3, 0x85, 0xC3, 0x86, + 0xC3, 0x87, 0xC3, 0x88, 0xC3, 0x89, 0xC3, 0x8A, + 0xC3, 0x8B, 0xC3, 0x8C, 0xC3, 0x8D, 0xC3, 0x8E, + 0xC3, 0x8F, 0xC3, 0x90, 0xC3, 0x91, 0xC3, 0x92, + 0xC3, 0x93, 0xC3, 0x94, 0xC3, 0x95, 0xC3, 0x96, + 0xC3, 0x98, 0xC3, 0x99, 0xC3, 0x9A, 0xC3, 0x9B, + 0xC3, 0x9C, 0xC3, 0x9D, 0xC3, 0x9E, 0xC5, 0xB8, + 0xC4, 0x80, 0xC4, 0x82, 0xC4, 0x84, 0xC4, 0x86, + 0xC4, 0x88, 0xC4, 0x8A, 0xC4, 0x8C, 0xC4, 0x8E, + 0xC4, 0x90, 0xC4, 0x92, 0xC4, 0x94, 0xC4, 0x96, + 0xC4, 0x98, 0xC4, 0x9A, 0xC4, 0x9C, 0xC4, 0x9E, + 0xC4, 0xA0, 0xC4, 0xA2, 0xC4, 0xA4, 0xC4, 0xA6, + 0xC4, 0xA8, 0xC4, 0xAA, 0xC4, 0xAC, 0xC4, 0xAE, + 0x49, 0xC4, 0xB2, 0xC4, 0xB4, 0xC4, 0xB6, 0xC4, + 0xB9, 0xC4, 0xBB, 0xC4, 0xBD, 0xC4, 0xBF, 0xC5, + 0x81, 0xC5, 0x83, 0xC5, 0x85, 0xC5, 0x87, 0xC5, + 0x8A, 0xC5, 0x8C, 0xC5, 0x8E, 0xC5, 0x90, 0xC5, + 0x92, 0xC5, 0x94, 0xC5, 0x96, 0xC5, 0x98, 0xC5, + 0x9A, 0xC5, 0x9C, 0xC5, 0x9E, 0xC5, 0xA0, 0xC5, + 0xA2, 0xC5, 0xA4, 0xC5, 0xA6, 0xC5, 0xA8, 0xC5, + 0xAA, 0xC5, 0xAC, 0xC5, 0xAE, 0xC5, 0xB0, 0xC5, + 0xB2, 0xC5, 0xB4, 0xC5, 0xB6, 0xC5, 0xB9, 0xC5, + 0xBB, 0xC5, 0xBD, 0x53, 0xC9, 0x83, 0xC6, 0x82, + 0xC6, 0x84, 0xC6, 0x87, 0xC6, 0x8B, 0xC6, 0x91, + 0xC7, 0xB6, 0xC6, 0x98, 0xC8, 0xBD, 0xC8, 0xA0, + 0xC6, 0xA0, 0xC6, 0xA2, 0xC6, 0xA4, 0xC6, 0xA7, + 0xC6, 0xAC, 0xC6, 0xAF, 0xC6, 0xB3, 0xC6, 0xB5, + 0xC6, 0xB8, 0xC6, 0xBC, 0xC7, 0xB7, 0xC7, 0x84, + 0xC7, 0x84, 0xC7, 0x87, 0xC7, 0x87, 0xC7, 0x8A, + 0xC7, 0x8A, 0xC7, 0x8D, 0xC7, 0x8F, 0xC7, 0x91, + 0xC7, 0x93, 0xC7, 0x95, 0xC7, 0x97, 0xC7, 0x99, + 0xC7, 0x9B, 0xC6, 0x8E, 0xC7, 0x9E, 0xC7, 0xA0, + 0xC7, 0xA2, 0xC7, 0xA4, 0xC7, 0xA6, 0xC7, 0xA8, + 0xC7, 0xAA, 0xC7, 0xAC, 0xC7, 0xAE, 0xC7, 0xB1, + 0xC7, 0xB1, 0xC7, 0xB4, 0xC7, 0xB8, 0xC7, 0xBA, + 0xC7, 0xBC, 0xC7, 0xBE, 0xC8, 0x80, 0xC8, 0x82, + 0xC8, 0x84, 0xC8, 0x86, 0xC8, 0x88, 0xC8, 0x8A, + 0xC8, 0x8C, 0xC8, 0x8E, 0xC8, 0x90, 0xC8, 0x92, + 0xC8, 0x94, 0xC8, 0x96, 0xC8, 0x98, 0xC8, 0x9A, + 0xC8, 0x9C, 0xC8, 0x9E, 0xC8, 0xA2, 0xC8, 0xA4, + 0xC8, 0xA6, 0xC8, 0xA8, 0xC8, 0xAA, 0xC8, 0xAC, + 0xC8, 0xAE, 0xC8, 0xB0, 0xC8, 0xB2, 0xC8, 0xBB, + 0xC9, 0x81, 0xC9, 0x86, 0xC9, 0x88, 0xC9, 0x8A, + 0xC9, 0x8C, 0xC9, 0x8E, 0xC6, 0x81, 0xC6, 0x86, + 0xC6, 0x89, 0xC6, 0x8A, 0xC6, 0x8F, 0xC6, 0x90, + 0xC6, 0x93, 0xC6, 0x94, 0xC6, 0x97, 0xC6, 0x96, + 0xE2, 0xB1, 0xA2, 0xC6, 0x9C, 0xC6, 0x9D, 0xC6, + 0x9F, 0xE2, 0xB1, 0xA4, 0xC6, 0xA6, 0xC6, 0xA9, + 0xC6, 0xAE, 0xC9, 0x84, 0xC6, 0xB1, 0xC6, 0xB2, + 0xC9, 0x85, 0xC6, 0xB7, 0xCE, 0x99, 0xCF, 0xBD, + 0xCF, 0xBE, 0xCF, 0xBF, 0xCE, 0x86, 0xCE, 0x88, + 0xCE, 0x89, 0xCE, 0x8A, 0xCE, 0x91, 0xCE, 0x92, + 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, + 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, + 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, + 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0xA3, + 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, + 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xCE, 0xAA, + 0xCE, 0xAB, 0xCE, 0x8C, 0xCE, 0x8E, 0xCE, 0x8F, + 0xCE, 0x92, 0xCE, 0x98, 0xCE, 0xA6, 0xCE, 0xA0, + 0xCF, 0x98, 0xCF, 0x9A, 0xCF, 0x9C, 0xCF, 0x9E, + 0xCF, 0xA0, 0xCF, 0xA2, 0xCF, 0xA4, 0xCF, 0xA6, + 0xCF, 0xA8, 0xCF, 0xAA, 0xCF, 0xAC, 0xCF, 0xAE, + 0xCE, 0x9A, 0xCE, 0xA1, 0xCF, 0xB9, 0xCE, 0x95, + 0xCF, 0xB7, 0xCF, 0xBA, 0xD0, 0x90, 0xD0, 0x91, + 0xD0, 0x92, 0xD0, 0x93, 0xD0, 0x94, 0xD0, 0x95, + 0xD0, 0x96, 0xD0, 0x97, 0xD0, 0x98, 0xD0, 0x99, + 0xD0, 0x9A, 0xD0, 0x9B, 0xD0, 0x9C, 0xD0, 0x9D, + 0xD0, 0x9E, 0xD0, 0x9F, 0xD0, 0xA0, 0xD0, 0xA1, + 0xD0, 0xA2, 0xD0, 0xA3, 0xD0, 0xA4, 0xD0, 0xA5, + 0xD0, 0xA6, 0xD0, 0xA7, 0xD0, 0xA8, 0xD0, 0xA9, + 0xD0, 0xAA, 0xD0, 0xAB, 0xD0, 0xAC, 0xD0, 0xAD, + 0xD0, 0xAE, 0xD0, 0xAF, 0xD0, 0x80, 0xD0, 0x81, + 0xD0, 0x82, 0xD0, 0x83, 0xD0, 0x84, 0xD0, 0x85, + 0xD0, 0x86, 0xD0, 0x87, 0xD0, 0x88, 0xD0, 0x89, + 0xD0, 0x8A, 0xD0, 0x8B, 0xD0, 0x8C, 0xD0, 0x8D, + 0xD0, 0x8E, 0xD0, 0x8F, 0xD1, 0xA0, 0xD1, 0xA2, + 0xD1, 0xA4, 0xD1, 0xA6, 0xD1, 0xA8, 0xD1, 0xAA, + 0xD1, 0xAC, 0xD1, 0xAE, 0xD1, 0xB0, 0xD1, 0xB2, + 0xD1, 0xB4, 0xD1, 0xB6, 0xD1, 0xB8, 0xD1, 0xBA, + 0xD1, 0xBC, 0xD1, 0xBE, 0xD2, 0x80, 0xD2, 0x8A, + 0xD2, 0x8C, 0xD2, 0x8E, 0xD2, 0x90, 0xD2, 0x92, + 0xD2, 0x94, 0xD2, 0x96, 0xD2, 0x98, 0xD2, 0x9A, + 0xD2, 0x9C, 0xD2, 0x9E, 0xD2, 0xA0, 0xD2, 0xA2, + 0xD2, 0xA4, 0xD2, 0xA6, 0xD2, 0xA8, 0xD2, 0xAA, + 0xD2, 0xAC, 0xD2, 0xAE, 0xD2, 0xB0, 0xD2, 0xB2, + 0xD2, 0xB4, 0xD2, 0xB6, 0xD2, 0xB8, 0xD2, 0xBA, + 0xD2, 0xBC, 0xD2, 0xBE, 0xD3, 0x81, 0xD3, 0x83, + 0xD3, 0x85, 0xD3, 0x87, 0xD3, 0x89, 0xD3, 0x8B, + 0xD3, 0x8D, 0xD3, 0x80, 0xD3, 0x90, 0xD3, 0x92, + 0xD3, 0x94, 0xD3, 0x96, 0xD3, 0x98, 0xD3, 0x9A, + 0xD3, 0x9C, 0xD3, 0x9E, 0xD3, 0xA0, 0xD3, 0xA2, + 0xD3, 0xA4, 0xD3, 0xA6, 0xD3, 0xA8, 0xD3, 0xAA, + 0xD3, 0xAC, 0xD3, 0xAE, 0xD3, 0xB0, 0xD3, 0xB2, + 0xD3, 0xB4, 0xD3, 0xB6, 0xD3, 0xB8, 0xD3, 0xBA, + 0xD3, 0xBC, 0xD3, 0xBE, 0xD4, 0x80, 0xD4, 0x82, + 0xD4, 0x84, 0xD4, 0x86, 0xD4, 0x88, 0xD4, 0x8A, + 0xD4, 0x8C, 0xD4, 0x8E, 0xD4, 0x90, 0xD4, 0x92, + 0xD4, 0xB1, 0xD4, 0xB2, 0xD4, 0xB3, 0xD4, 0xB4, + 0xD4, 0xB5, 0xD4, 0xB6, 0xD4, 0xB7, 0xD4, 0xB8, + 0xD4, 0xB9, 0xD4, 0xBA, 0xD4, 0xBB, 0xD4, 0xBC, + 0xD4, 0xBD, 0xD4, 0xBE, 0xD4, 0xBF, 0xD5, 0x80, + 0xD5, 0x81, 0xD5, 0x82, 0xD5, 0x83, 0xD5, 0x84, + 0xD5, 0x85, 0xD5, 0x86, 0xD5, 0x87, 0xD5, 0x88, + 0xD5, 0x89, 0xD5, 0x8A, 0xD5, 0x8B, 0xD5, 0x8C, + 0xD5, 0x8D, 0xD5, 0x8E, 0xD5, 0x8F, 0xD5, 0x90, + 0xD5, 0x91, 0xD5, 0x92, 0xD5, 0x93, 0xD5, 0x94, + 0xD5, 0x95, 0xD5, 0x96, 0xE2, 0xB1, 0xA3, 0xE1, + 0xB8, 0x80, 0xE1, 0xB8, 0x82, 0xE1, 0xB8, 0x84, + 0xE1, 0xB8, 0x86, 0xE1, 0xB8, 0x88, 0xE1, 0xB8, + 0x8A, 0xE1, 0xB8, 0x8C, 0xE1, 0xB8, 0x8E, 0xE1, + 0xB8, 0x90, 0xE1, 0xB8, 0x92, 0xE1, 0xB8, 0x94, + 0xE1, 0xB8, 0x96, 0xE1, 0xB8, 0x98, 0xE1, 0xB8, + 0x9A, 0xE1, 0xB8, 0x9C, 0xE1, 0xB8, 0x9E, 0xE1, + 0xB8, 0xA0, 0xE1, 0xB8, 0xA2, 0xE1, 0xB8, 0xA4, + 0xE1, 0xB8, 0xA6, 0xE1, 0xB8, 0xA8, 0xE1, 0xB8, + 0xAA, 0xE1, 0xB8, 0xAC, 0xE1, 0xB8, 0xAE, 0xE1, + 0xB8, 0xB0, 0xE1, 0xB8, 0xB2, 0xE1, 0xB8, 0xB4, + 0xE1, 0xB8, 0xB6, 0xE1, 0xB8, 0xB8, 0xE1, 0xB8, + 0xBA, 0xE1, 0xB8, 0xBC, 0xE1, 0xB8, 0xBE, 0xE1, + 0xB9, 0x80, 0xE1, 0xB9, 0x82, 0xE1, 0xB9, 0x84, + 0xE1, 0xB9, 0x86, 0xE1, 0xB9, 0x88, 0xE1, 0xB9, + 0x8A, 0xE1, 0xB9, 0x8C, 0xE1, 0xB9, 0x8E, 0xE1, + 0xB9, 0x90, 0xE1, 0xB9, 0x92, 0xE1, 0xB9, 0x94, + 0xE1, 0xB9, 0x96, 0xE1, 0xB9, 0x98, 0xE1, 0xB9, + 0x9A, 0xE1, 0xB9, 0x9C, 0xE1, 0xB9, 0x9E, 0xE1, + 0xB9, 0xA0, 0xE1, 0xB9, 0xA2, 0xE1, 0xB9, 0xA4, + 0xE1, 0xB9, 0xA6, 0xE1, 0xB9, 0xA8, 0xE1, 0xB9, + 0xAA, 0xE1, 0xB9, 0xAC, 0xE1, 0xB9, 0xAE, 0xE1, + 0xB9, 0xB0, 0xE1, 0xB9, 0xB2, 0xE1, 0xB9, 0xB4, + 0xE1, 0xB9, 0xB6, 0xE1, 0xB9, 0xB8, 0xE1, 0xB9, + 0xBA, 0xE1, 0xB9, 0xBC, 0xE1, 0xB9, 0xBE, 0xE1, + 0xBA, 0x80, 0xE1, 0xBA, 0x82, 0xE1, 0xBA, 0x84, + 0xE1, 0xBA, 0x86, 0xE1, 0xBA, 0x88, 0xE1, 0xBA, + 0x8A, 0xE1, 0xBA, 0x8C, 0xE1, 0xBA, 0x8E, 0xE1, + 0xBA, 0x90, 0xE1, 0xBA, 0x92, 0xE1, 0xBA, 0x94, + 0xE1, 0xB9, 0xA0, 0xE1, 0xBA, 0xA0, 0xE1, 0xBA, + 0xA2, 0xE1, 0xBA, 0xA4, 0xE1, 0xBA, 0xA6, 0xE1, + 0xBA, 0xA8, 0xE1, 0xBA, 0xAA, 0xE1, 0xBA, 0xAC, + 0xE1, 0xBA, 0xAE, 0xE1, 0xBA, 0xB0, 0xE1, 0xBA, + 0xB2, 0xE1, 0xBA, 0xB4, 0xE1, 0xBA, 0xB6, 0xE1, + 0xBA, 0xB8, 0xE1, 0xBA, 0xBA, 0xE1, 0xBA, 0xBC, + 0xE1, 0xBA, 0xBE, 0xE1, 0xBB, 0x80, 0xE1, 0xBB, + 0x82, 0xE1, 0xBB, 0x84, 0xE1, 0xBB, 0x86, 0xE1, + 0xBB, 0x88, 0xE1, 0xBB, 0x8A, 0xE1, 0xBB, 0x8C, + 0xE1, 0xBB, 0x8E, 0xE1, 0xBB, 0x90, 0xE1, 0xBB, + 0x92, 0xE1, 0xBB, 0x94, 0xE1, 0xBB, 0x96, 0xE1, + 0xBB, 0x98, 0xE1, 0xBB, 0x9A, 0xE1, 0xBB, 0x9C, + 0xE1, 0xBB, 0x9E, 0xE1, 0xBB, 0xA0, 0xE1, 0xBB, + 0xA2, 0xE1, 0xBB, 0xA4, 0xE1, 0xBB, 0xA6, 0xE1, + 0xBB, 0xA8, 0xE1, 0xBB, 0xAA, 0xE1, 0xBB, 0xAC, + 0xE1, 0xBB, 0xAE, 0xE1, 0xBB, 0xB0, 0xE1, 0xBB, + 0xB2, 0xE1, 0xBB, 0xB4, 0xE1, 0xBB, 0xB6, 0xE1, + 0xBB, 0xB8, 0xE1, 0xBC, 0x88, 0xE1, 0xBC, 0x89, + 0xE1, 0xBC, 0x8A, 0xE1, 0xBC, 0x8B, 0xE1, 0xBC, + 0x8C, 0xE1, 0xBC, 0x8D, 0xE1, 0xBC, 0x8E, 0xE1, + 0xBC, 0x8F, 0xE1, 0xBC, 0x98, 0xE1, 0xBC, 0x99, + 0xE1, 0xBC, 0x9A, 0xE1, 0xBC, 0x9B, 0xE1, 0xBC, + 0x9C, 0xE1, 0xBC, 0x9D, 0xE1, 0xBC, 0xA8, 0xE1, + 0xBC, 0xA9, 0xE1, 0xBC, 0xAA, 0xE1, 0xBC, 0xAB, + 0xE1, 0xBC, 0xAC, 0xE1, 0xBC, 0xAD, 0xE1, 0xBC, + 0xAE, 0xE1, 0xBC, 0xAF, 0xE1, 0xBC, 0xB8, 0xE1, + 0xBC, 0xB9, 0xE1, 0xBC, 0xBA, 0xE1, 0xBC, 0xBB, + 0xE1, 0xBC, 0xBC, 0xE1, 0xBC, 0xBD, 0xE1, 0xBC, + 0xBE, 0xE1, 0xBC, 0xBF, 0xE1, 0xBD, 0x88, 0xE1, + 0xBD, 0x89, 0xE1, 0xBD, 0x8A, 0xE1, 0xBD, 0x8B, + 0xE1, 0xBD, 0x8C, 0xE1, 0xBD, 0x8D, 0xE1, 0xBD, + 0x99, 0xE1, 0xBD, 0x9B, 0xE1, 0xBD, 0x9D, 0xE1, + 0xBD, 0x9F, 0xE1, 0xBD, 0xA8, 0xE1, 0xBD, 0xA9, + 0xE1, 0xBD, 0xAA, 0xE1, 0xBD, 0xAB, 0xE1, 0xBD, + 0xAC, 0xE1, 0xBD, 0xAD, 0xE1, 0xBD, 0xAE, 0xE1, + 0xBD, 0xAF, 0xE1, 0xBE, 0xBA, 0xE1, 0xBE, 0xBB, + 0xE1, 0xBF, 0x88, 0xE1, 0xBF, 0x89, 0xE1, 0xBF, + 0x8A, 0xE1, 0xBF, 0x8B, 0xE1, 0xBF, 0x9A, 0xE1, + 0xBF, 0x9B, 0xE1, 0xBF, 0xB8, 0xE1, 0xBF, 0xB9, + 0xE1, 0xBF, 0xAA, 0xE1, 0xBF, 0xAB, 0xE1, 0xBF, + 0xBA, 0xE1, 0xBF, 0xBB, 0xE1, 0xBE, 0x88, 0xE1, + 0xBE, 0x89, 0xE1, 0xBE, 0x8A, 0xE1, 0xBE, 0x8B, + 0xE1, 0xBE, 0x8C, 0xE1, 0xBE, 0x8D, 0xE1, 0xBE, + 0x8E, 0xE1, 0xBE, 0x8F, 0xE1, 0xBE, 0x98, 0xE1, + 0xBE, 0x99, 0xE1, 0xBE, 0x9A, 0xE1, 0xBE, 0x9B, + 0xE1, 0xBE, 0x9C, 0xE1, 0xBE, 0x9D, 0xE1, 0xBE, + 0x9E, 0xE1, 0xBE, 0x9F, 0xE1, 0xBE, 0xA8, 0xE1, + 0xBE, 0xA9, 0xE1, 0xBE, 0xAA, 0xE1, 0xBE, 0xAB, + 0xE1, 0xBE, 0xAC, 0xE1, 0xBE, 0xAD, 0xE1, 0xBE, + 0xAE, 0xE1, 0xBE, 0xAF, 0xE1, 0xBE, 0xB8, 0xE1, + 0xBE, 0xB9, 0xE1, 0xBE, 0xBC, 0xCE, 0x99, 0xE1, + 0xBF, 0x8C, 0xE1, 0xBF, 0x98, 0xE1, 0xBF, 0x99, + 0xE1, 0xBF, 0xA8, 0xE1, 0xBF, 0xA9, 0xE1, 0xBF, + 0xAC, 0xE1, 0xBF, 0xBC, 0xE2, 0x84, 0xB2, 0xE2, + 0x85, 0xA0, 0xE2, 0x85, 0xA1, 0xE2, 0x85, 0xA2, + 0xE2, 0x85, 0xA3, 0xE2, 0x85, 0xA4, 0xE2, 0x85, + 0xA5, 0xE2, 0x85, 0xA6, 0xE2, 0x85, 0xA7, 0xE2, + 0x85, 0xA8, 0xE2, 0x85, 0xA9, 0xE2, 0x85, 0xAA, + 0xE2, 0x85, 0xAB, 0xE2, 0x85, 0xAC, 0xE2, 0x85, + 0xAD, 0xE2, 0x85, 0xAE, 0xE2, 0x85, 0xAF, 0xE2, + 0x86, 0x83, 0xE2, 0x92, 0xB6, 0xE2, 0x92, 0xB7, + 0xE2, 0x92, 0xB8, 0xE2, 0x92, 0xB9, 0xE2, 0x92, + 0xBA, 0xE2, 0x92, 0xBB, 0xE2, 0x92, 0xBC, 0xE2, + 0x92, 0xBD, 0xE2, 0x92, 0xBE, 0xE2, 0x92, 0xBF, + 0xE2, 0x93, 0x80, 0xE2, 0x93, 0x81, 0xE2, 0x93, + 0x82, 0xE2, 0x93, 0x83, 0xE2, 0x93, 0x84, 0xE2, + 0x93, 0x85, 0xE2, 0x93, 0x86, 0xE2, 0x93, 0x87, + 0xE2, 0x93, 0x88, 0xE2, 0x93, 0x89, 0xE2, 0x93, + 0x8A, 0xE2, 0x93, 0x8B, 0xE2, 0x93, 0x8C, 0xE2, + 0x93, 0x8D, 0xE2, 0x93, 0x8E, 0xE2, 0x93, 0x8F, + 0xE2, 0xB0, 0x80, 0xE2, 0xB0, 0x81, 0xE2, 0xB0, + 0x82, 0xE2, 0xB0, 0x83, 0xE2, 0xB0, 0x84, 0xE2, + 0xB0, 0x85, 0xE2, 0xB0, 0x86, 0xE2, 0xB0, 0x87, + 0xE2, 0xB0, 0x88, 0xE2, 0xB0, 0x89, 0xE2, 0xB0, + 0x8A, 0xE2, 0xB0, 0x8B, 0xE2, 0xB0, 0x8C, 0xE2, + 0xB0, 0x8D, 0xE2, 0xB0, 0x8E, 0xE2, 0xB0, 0x8F, + 0xE2, 0xB0, 0x90, 0xE2, 0xB0, 0x91, 0xE2, 0xB0, + 0x92, 0xE2, 0xB0, 0x93, 0xE2, 0xB0, 0x94, 0xE2, + 0xB0, 0x95, 0xE2, 0xB0, 0x96, 0xE2, 0xB0, 0x97, + 0xE2, 0xB0, 0x98, 0xE2, 0xB0, 0x99, 0xE2, 0xB0, + 0x9A, 0xE2, 0xB0, 0x9B, 0xE2, 0xB0, 0x9C, 0xE2, + 0xB0, 0x9D, 0xE2, 0xB0, 0x9E, 0xE2, 0xB0, 0x9F, + 0xE2, 0xB0, 0xA0, 0xE2, 0xB0, 0xA1, 0xE2, 0xB0, + 0xA2, 0xE2, 0xB0, 0xA3, 0xE2, 0xB0, 0xA4, 0xE2, + 0xB0, 0xA5, 0xE2, 0xB0, 0xA6, 0xE2, 0xB0, 0xA7, + 0xE2, 0xB0, 0xA8, 0xE2, 0xB0, 0xA9, 0xE2, 0xB0, + 0xAA, 0xE2, 0xB0, 0xAB, 0xE2, 0xB0, 0xAC, 0xE2, + 0xB0, 0xAD, 0xE2, 0xB0, 0xAE, 0xE2, 0xB1, 0xA0, + 0xC8, 0xBA, 0xC8, 0xBE, 0xE2, 0xB1, 0xA7, 0xE2, + 0xB1, 0xA9, 0xE2, 0xB1, 0xAB, 0xE2, 0xB1, 0xB5, + 0xE2, 0xB2, 0x80, 0xE2, 0xB2, 0x82, 0xE2, 0xB2, + 0x84, 0xE2, 0xB2, 0x86, 0xE2, 0xB2, 0x88, 0xE2, + 0xB2, 0x8A, 0xE2, 0xB2, 0x8C, 0xE2, 0xB2, 0x8E, + 0xE2, 0xB2, 0x90, 0xE2, 0xB2, 0x92, 0xE2, 0xB2, + 0x94, 0xE2, 0xB2, 0x96, 0xE2, 0xB2, 0x98, 0xE2, + 0xB2, 0x9A, 0xE2, 0xB2, 0x9C, 0xE2, 0xB2, 0x9E, + 0xE2, 0xB2, 0xA0, 0xE2, 0xB2, 0xA2, 0xE2, 0xB2, + 0xA4, 0xE2, 0xB2, 0xA6, 0xE2, 0xB2, 0xA8, 0xE2, + 0xB2, 0xAA, 0xE2, 0xB2, 0xAC, 0xE2, 0xB2, 0xAE, + 0xE2, 0xB2, 0xB0, 0xE2, 0xB2, 0xB2, 0xE2, 0xB2, + 0xB4, 0xE2, 0xB2, 0xB6, 0xE2, 0xB2, 0xB8, 0xE2, + 0xB2, 0xBA, 0xE2, 0xB2, 0xBC, 0xE2, 0xB2, 0xBE, + 0xE2, 0xB3, 0x80, 0xE2, 0xB3, 0x82, 0xE2, 0xB3, + 0x84, 0xE2, 0xB3, 0x86, 0xE2, 0xB3, 0x88, 0xE2, + 0xB3, 0x8A, 0xE2, 0xB3, 0x8C, 0xE2, 0xB3, 0x8E, + 0xE2, 0xB3, 0x90, 0xE2, 0xB3, 0x92, 0xE2, 0xB3, + 0x94, 0xE2, 0xB3, 0x96, 0xE2, 0xB3, 0x98, 0xE2, + 0xB3, 0x9A, 0xE2, 0xB3, 0x9C, 0xE2, 0xB3, 0x9E, + 0xE2, 0xB3, 0xA0, 0xE2, 0xB3, 0xA2, 0xE1, 0x82, + 0xA0, 0xE1, 0x82, 0xA1, 0xE1, 0x82, 0xA2, 0xE1, + 0x82, 0xA3, 0xE1, 0x82, 0xA4, 0xE1, 0x82, 0xA5, + 0xE1, 0x82, 0xA6, 0xE1, 0x82, 0xA7, 0xE1, 0x82, + 0xA8, 0xE1, 0x82, 0xA9, 0xE1, 0x82, 0xAA, 0xE1, + 0x82, 0xAB, 0xE1, 0x82, 0xAC, 0xE1, 0x82, 0xAD, + 0xE1, 0x82, 0xAE, 0xE1, 0x82, 0xAF, 0xE1, 0x82, + 0xB0, 0xE1, 0x82, 0xB1, 0xE1, 0x82, 0xB2, 0xE1, + 0x82, 0xB3, 0xE1, 0x82, 0xB4, 0xE1, 0x82, 0xB5, + 0xE1, 0x82, 0xB6, 0xE1, 0x82, 0xB7, 0xE1, 0x82, + 0xB8, 0xE1, 0x82, 0xB9, 0xE1, 0x82, 0xBA, 0xE1, + 0x82, 0xBB, 0xE1, 0x82, 0xBC, 0xE1, 0x82, 0xBD, + 0xE1, 0x82, 0xBE, 0xE1, 0x82, 0xBF, 0xE1, 0x83, + 0x80, 0xE1, 0x83, 0x81, 0xE1, 0x83, 0x82, 0xE1, + 0x83, 0x83, 0xE1, 0x83, 0x84, 0xE1, 0x83, 0x85, + 0xEF, 0xBC, 0xA1, 0xEF, 0xBC, 0xA2, 0xEF, 0xBC, + 0xA3, 0xEF, 0xBC, 0xA4, 0xEF, 0xBC, 0xA5, 0xEF, + 0xBC, 0xA6, 0xEF, 0xBC, 0xA7, 0xEF, 0xBC, 0xA8, + 0xEF, 0xBC, 0xA9, 0xEF, 0xBC, 0xAA, 0xEF, 0xBC, + 0xAB, 0xEF, 0xBC, 0xAC, 0xEF, 0xBC, 0xAD, 0xEF, + 0xBC, 0xAE, 0xEF, 0xBC, 0xAF, 0xEF, 0xBC, 0xB0, + 0xEF, 0xBC, 0xB1, 0xEF, 0xBC, 0xB2, 0xEF, 0xBC, + 0xB3, 0xEF, 0xBC, 0xB4, 0xEF, 0xBC, 0xB5, 0xEF, + 0xBC, 0xB6, 0xEF, 0xBC, 0xB7, 0xEF, 0xBC, 0xB8, + 0xEF, 0xBC, 0xB9, 0xEF, 0xBC, 0xBA, 0xF0, 0x90, + 0x90, 0x80, 0xF0, 0x90, 0x90, 0x81, 0xF0, 0x90, + 0x90, 0x82, 0xF0, 0x90, 0x90, 0x83, 0xF0, 0x90, + 0x90, 0x84, 0xF0, 0x90, 0x90, 0x85, 0xF0, 0x90, + 0x90, 0x86, 0xF0, 0x90, 0x90, 0x87, 0xF0, 0x90, + 0x90, 0x88, 0xF0, 0x90, 0x90, 0x89, 0xF0, 0x90, + 0x90, 0x8A, 0xF0, 0x90, 0x90, 0x8B, 0xF0, 0x90, + 0x90, 0x8C, 0xF0, 0x90, 0x90, 0x8D, 0xF0, 0x90, + 0x90, 0x8E, 0xF0, 0x90, 0x90, 0x8F, 0xF0, 0x90, + 0x90, 0x90, 0xF0, 0x90, 0x90, 0x91, 0xF0, 0x90, + 0x90, 0x92, 0xF0, 0x90, 0x90, 0x93, 0xF0, 0x90, + 0x90, 0x94, 0xF0, 0x90, 0x90, 0x95, 0xF0, 0x90, + 0x90, 0x96, 0xF0, 0x90, 0x90, 0x97, 0xF0, 0x90, + 0x90, 0x98, 0xF0, 0x90, 0x90, 0x99, 0xF0, 0x90, + 0x90, 0x9A, 0xF0, 0x90, 0x90, 0x9B, 0xF0, 0x90, + 0x90, 0x9C, 0xF0, 0x90, 0x90, 0x9D, 0xF0, 0x90, + 0x90, 0x9E, 0xF0, 0x90, 0x90, 0x9F, 0xF0, 0x90, + 0x90, 0xA0, 0xF0, 0x90, 0x90, 0xA1, 0xF0, 0x90, + 0x90, 0xA2, 0xF0, 0x90, 0x90, 0xA3, 0xF0, 0x90, + 0x90, 0xA4, 0xF0, 0x90, 0x90, 0xA5, 0xF0, 0x90, + 0x90, 0xA6, 0xF0, 0x90, 0x90, 0xA7, + }, +}; + +#undef N_ +#undef FIL_ + +#ifdef __cplusplus +} +#endif + +#endif /* HAVE_UNICODE */ + +#endif /* _SYS_U8_TEXTPREP_DATA_H */ diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h new file mode 100644 index 000000000..5d1c385b0 --- /dev/null +++ b/include/sys/vmsystm.h @@ -0,0 +1,8 @@ +#ifndef _SPL_VMSYSTM_H +#define _SPL_VMSYSTM_H + +#include + +#define physmem num_physpages + +#endif /* SPL_VMSYSTM_H */ diff --git a/include/vm/anon.h b/include/vm/anon.h new file mode 100644 index 000000000..81c585a6a --- /dev/null +++ b/include/vm/anon.h @@ -0,0 +1,4 @@ +#ifndef _SPL_ANON_H +#define _SPL_ANON_H + +#endif /* SPL_ANON_H */ From 77b1fe8fa86809b7d2bc82abfe7e74fc047bedfe Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 6 Mar 2008 23:12:55 +0000 Subject: [PATCH 0026/1062] Add highbit func, Add sloopy atomic declaration which will need to be fixed (eventually) Fill out more of the Solaris VM hooks Adjust the create_thread function git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@26 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kstat.h | 16 +++++++++++++++- include/sys/sysmacros.h | 8 +++++--- include/sys/thread.h | 7 +------ include/sys/vmsystm.h | 34 ++++++++++++++++++++++++++++++++++ modules/spl/spl-generic.c | 31 +++++++++++++++++++++++++++++++ modules/spl/spl-thread.c | 2 +- modules/splat/splat-thread.c | 2 +- 7 files changed, 88 insertions(+), 12 deletions(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index dea7987f5..0b6ce0583 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -131,7 +131,21 @@ kstat_delete(kstat_t *ksp) } /* FIXME - NONE OF THIS IS ATOMIC, IT SHOULD BE. For the moment this is - * OK since it is only used for the noncritical kstat counters */ + * OK since it is only used for the noncritical kstat counters, and we + * are only doing testing on x86_86 platform where the entire counter + * will be updated with one instruction. */ +static __inline__ void +atomic_inc_64(volatile uint64_t *target) +{ + (*target)++; +} + +static __inline__ void +atomic_dec_64(volatile uint64_t *target) +{ + (*target)--; +} + static __inline__ uint64_t atomic_add_64(volatile uint64_t *target, uint64_t delta) { diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 65070d858..1927a060d 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -64,7 +64,7 @@ extern "C" { #define bzero(ptr,size) memset(ptr,0,size) #define bcopy(src,dest,size) memcpy(dest,src,size) #define ASSERT(x) BUG_ON(!(x)) -#define VERIFY(x) +#define VERIFY(x) ASSERT(x) #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE) do { \ const TYPE __left = (TYPE)(LEFT); \ @@ -103,10 +103,12 @@ extern "C" { #endif /* DTRACE_PROBE4 */ #define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) -/* Missing globals - */ +/* Missing globals */ extern int p0; +/* Missing misc functions */ +extern int highbit(unsigned long i); + #define makedevice(maj,min) makedev(maj,min) /* XXX - Borrowed from zfs project libsolcompat/include/sys/sysmacros.h */ diff --git a/include/sys/thread.h b/include/sys/thread.h index d1009ab6d..4532aee5b 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -31,14 +31,9 @@ extern "C" { #define thread_exit() __thread_exit() #define curthread get_current() -/* We just need a valid type to pass around, it's unused */ -typedef struct proc_s { - int foo; -} proc_t; - extern kthread_t *__thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), void *args, - size_t len, proc_t *pp, int state, + size_t len, int *pp, int state, pri_t pri); extern void __thread_exit(void); diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 5d1c385b0..e66872f0c 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -4,5 +4,39 @@ #include #define physmem num_physpages +#define ptob(pages) (pages * PAGE_SIZE) +#define membar_producer() smp_wmb() + +#if 0 +/* The approximate total number of free pages */ +#define freemem 0 + +/* The average number of free pages over the last 5 seconds */ +#define avefree 0 + +/* The average number of free pages over the last 30 seconds */ +#define avefree30 0 + +/* A guess as to how much memory has been promised to + * processes but not yet allocated */ +#define deficit 0 + +/* A guess as to how many page are needed to satisfy + * stalled page creation requests */ +#define needfree 0 + +/* A bootlean the controls the setting of deficit */ +#define desperate + +/* When free memory is above this limit, no paging or swapping is done */ +#define lotsfree 0 + +/* When free memory is above this limit, swapping is not performed */ +#define desfree 0 + +/* Threshold for many low memory tests, e.g. swapping is + * more active below this limit */ +#define minfree 0 +#endif #endif /* SPL_VMSYSTM_H */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 60bebfdc4..1f982f8bd 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -8,6 +8,37 @@ int p0 = 0; EXPORT_SYMBOL(p0); +int +highbit(unsigned long i) +{ + register int h = 1; + + if (i == 0) + return (0); +#if BITS_PER_LONG == 64 + if (i & 0xffffffff00000000ul) { + h += 32; i >>= 32; + } +#endif + if (i & 0xffff0000) { + h += 16; i >>= 16; + } + if (i & 0xff00) { + h += 8; i >>= 8; + } + if (i & 0xf0) { + h += 4; i >>= 4; + } + if (i & 0xc) { + h += 2; i >>= 2; + } + if (i & 0x2) { + h += 1; + } + return (h); +} +EXPORT_SYMBOL(highbit); + static int __init spl_init(void) { printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index 40b1b316f..e6dca2300 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -60,7 +60,7 @@ EXPORT_SYMBOL(__thread_exit); * style callers likely never check for... since it can't fail. */ kthread_t * __thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), - void *args, size_t len, proc_t *pp, int state, pri_t pri) + void *args, size_t len, int *pp, int state, pri_t pri) { thread_priv_t tp; DEFINE_WAIT(wait); diff --git a/modules/splat/splat-thread.c b/modules/splat/splat-thread.c index aff18cd5f..dec251efe 100644 --- a/modules/splat/splat-thread.c +++ b/modules/splat/splat-thread.c @@ -51,7 +51,7 @@ splat_thread_test1(struct file *file, void *arg) spin_lock(&tp.tp_lock); thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work, &tp, 0, - (proc_t *) &p0, TS_RUN, minclsyspri); + &p0, TS_RUN, minclsyspri); /* Must never fail under Solaris, but we check anyway so we can * report an error when this impossible thing happens */ if (thr == NULL) { From ed61a7d05eb95ab453a95baf52d6af7b0c60a132 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 6 Mar 2008 23:42:37 +0000 Subject: [PATCH 0027/1062] Add some missing rw_lock symbols git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@27 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/rwlock.h | 12 ++++++--- include/sys/sysmacros.h | 2 ++ modules/spl/spl-rwlock.c | 53 +++++++++++++++++++++------------------- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 6c55ced98..4498e9562 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -21,10 +21,10 @@ typedef enum { RW_READER } krw_t; -#define RW_READ_HELD(x) (rw_read_held((x))) -#define RW_WRITE_HELD(x) (rw_write_held((x))) -#define RW_LOCK_HELD(x) (rw_lock_held((x))) -#define RW_ISWRITER(x) (rw_iswriter(x)) +#define RW_READ_HELD(x) (__rw_read_held((x))) +#define RW_WRITE_HELD(x) (__rw_write_held((x))) +#define RW_LOCK_HELD(x) (__rw_lock_held((x))) +#define RW_ISWRITER(x) (__rw_iswriter(x)) #define RW_MAGIC 0x3423645a #define RW_POISON 0xa6 @@ -36,6 +36,10 @@ typedef struct { struct task_struct *rw_owner; /* holder of the write lock */ } krwlock_t; +extern int __rw_read_held(krwlock_t *rwlp); +extern int __rw_write_held(krwlock_t *rwlp); +extern int __rw_lock_held(krwlock_t *rwlp); + static __inline__ void rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg) { diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 1927a060d..2c3ec0e4e 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -13,6 +13,8 @@ extern "C" { /* Missing defines. */ +#define FALSE 0 +#define TRUE 1 #define INT32_MAX INT_MAX #define UINT64_MAX (~0ULL) #define NBBY 8 diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c index d74d89e24..fa78d4c14 100644 --- a/modules/spl/spl-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -1,7 +1,33 @@ #include int -rw_lock_held(krwlock_t *rwlp) +__rw_read_held(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + + if (__rw_lock_held(rwlp) && rwlp->rw_owner == NULL) { + return 1; + } + + return 0; +} +EXPORT_SYMBOL(__rw_read_held); + +int +__rw_write_held(krwlock_t *rwlp) +{ + BUG_ON(rwlp->rw_magic != RW_MAGIC); + + if (rwlp->rw_owner == current) { + return 1; + } + + return 0; +} +EXPORT_SYMBOL(__rw_write_held); + +int +__rw_lock_held(krwlock_t *rwlp) { BUG_ON(rwlp->rw_magic != RW_MAGIC); @@ -15,27 +41,4 @@ rw_lock_held(krwlock_t *rwlp) return 0; } - -int -rw_read_held(krwlock_t *rwlp) -{ - BUG_ON(rwlp->rw_magic != RW_MAGIC); - - if (rw_lock_held(rwlp) && rwlp->rw_owner == NULL) { - return 1; - } - - return 0; -} - -int -rw_write_held(krwlock_t *rwlp) -{ - BUG_ON(rwlp->rw_magic != RW_MAGIC); - - if (rwlp->rw_owner == current) { - return 1; - } - - return 0; -} +EXPORT_SYMBOL(__rw_lock_held); From b0dd3380aae2a976d4d3afa4d3b2aff820c36f23 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 7 Mar 2008 00:28:32 +0000 Subject: [PATCH 0028/1062] Minor atomic cleanup, this needs to be done right. Fixed a bug in the timer code Added missing macros git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@28 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/atomic.h | 68 +++++++++++++++++++++++++++++++++++++++++ include/sys/kstat.h | 43 -------------------------- include/sys/sysmacros.h | 10 ++++++ include/sys/timer.h | 2 +- 4 files changed, 79 insertions(+), 44 deletions(-) create mode 100644 include/sys/atomic.h diff --git a/include/sys/atomic.h b/include/sys/atomic.h new file mode 100644 index 000000000..ae2130331 --- /dev/null +++ b/include/sys/atomic.h @@ -0,0 +1,68 @@ +#ifndef _SPL_ATOMIC_H +#define _SPL_ATOMIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +/* FIXME - NONE OF THIS IS ATOMIC, IT SHOULD BE. I think we can + * get by for now since I'm only working on real 64bit systems but + * this will need to be addressed properly. + */ +static __inline__ void +atomic_inc_64(volatile uint64_t *target) +{ + (*target)++; +} + +static __inline__ void +atomic_dec_64(volatile uint64_t *target) +{ + (*target)--; +} + +static __inline__ uint64_t +atomic_add_64(volatile uint64_t *target, uint64_t delta) +{ + uint64_t rc = *target; + *target += delta; + return rc; +} + +static __inline__ uint64_t +atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) +{ + *target += delta; + return *target; +} + +static __inline__ uint64_t +atomic_cas_64(volatile uint64_t *target, uint64_t cmp, + uint64_t newval) +{ + uint64_t rc = *target; + + if (*target == cmp) + *target = newval; + + return rc; +} + +static __inline__ void * +atomic_cas_ptr(volatile void *target, void *cmp, void *newval) +{ + void *rc = (void *)target; + + if (target == cmp) + target = newval; + + return rc; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _SPL_ATOMIC_H */ + diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 0b6ce0583..0b79a41c0 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -130,49 +130,6 @@ kstat_delete(kstat_t *ksp) return; } -/* FIXME - NONE OF THIS IS ATOMIC, IT SHOULD BE. For the moment this is - * OK since it is only used for the noncritical kstat counters, and we - * are only doing testing on x86_86 platform where the entire counter - * will be updated with one instruction. */ -static __inline__ void -atomic_inc_64(volatile uint64_t *target) -{ - (*target)++; -} - -static __inline__ void -atomic_dec_64(volatile uint64_t *target) -{ - (*target)--; -} - -static __inline__ uint64_t -atomic_add_64(volatile uint64_t *target, uint64_t delta) -{ - uint64_t rc = *target; - *target += delta; - return rc; -} - -static __inline__ uint64_t -atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) -{ - *target += delta; - return *target; -} - -static __inline__ uint64_t -atomic_cas_64(volatile uint64_t *target, uint64_t cmp, - uint64_t newval) -{ - uint64_t rc = *target; - - if (*target == cmp) - *target = newval; - - return rc; -} - #ifdef __cplusplus } #endif diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 2c3ec0e4e..a96c47fa4 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -15,14 +15,23 @@ extern "C" { */ #define FALSE 0 #define TRUE 1 + #define INT32_MAX INT_MAX #define UINT64_MAX (~0ULL) #define NBBY 8 #define ENOTSUP ENOTSUPP + #define MAXNAMELEN 256 #define MAXPATHLEN PATH_MAX +#define MAXOFFSET_T 0x7fffffffffffffffl + +#define MAXBSIZE 8192 +#define DEV_BSIZE 512 +#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ + #define __va_list va_list #define max_ncpus 64 +#define _NOTE(x) /* 0..MAX_PRIO-1: Process priority * 0..MAX_RT_PRIO-1: RT priority tasks @@ -65,6 +74,7 @@ extern "C" { */ #define bzero(ptr,size) memset(ptr,0,size) #define bcopy(src,dest,size) memcpy(dest,src,size) +#define bcmp(src,dest,size) memcmp((src), (dest), (size_t)(size)) #define ASSERT(x) BUG_ON(!(x)) #define VERIFY(x) ASSERT(x) diff --git a/include/sys/timer.h b/include/sys/timer.h index 237195d76..7e8c6fd41 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -12,7 +12,7 @@ extern "C" { #define lbolt ((clock_t)jiffies) #define lbolt64 ((int64_t)get_jiffies_64()) -#define delay(ticks) schedule_timeout((long timeout)(ticks)) +#define delay(ticks) schedule_timeout((long)(ticks)) #ifdef __cplusplus } From 3b3ba48fe9a639d5a3cd1b8960deabefd35310be Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 7 Mar 2008 20:48:44 +0000 Subject: [PATCH 0029/1062] Add missing cred.h functions Resolve compiler warning with kmem_free (unused len) Add stub for byteorder.h Add zlib shim for compress2 and uncompress functions git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@29 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/byteorder.h | 4 ++ include/sys/cred.h | 28 +++++++++- include/sys/kmem.h | 8 ++- include/sys/sysmacros.h | 19 +++++-- include/sys/zmod.h | 112 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 163 insertions(+), 8 deletions(-) create mode 100644 include/sys/byteorder.h create mode 100644 include/sys/zmod.h diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h new file mode 100644 index 000000000..3b626163d --- /dev/null +++ b/include/sys/byteorder.h @@ -0,0 +1,4 @@ +#ifndef _SPL_ZMOD_H +#define _SPL_ZMOD_H + +#endif /* SPL_ZMOD_H */ diff --git a/include/sys/cred.h b/include/sys/cred.h index 0935a19fa..401f3130a 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -33,9 +33,35 @@ typedef struct cred { /* auditinfo_addr_t cr_auinfo; audit info */ } cred_t; +#define kcred NULL +#define CRED() NULL + +static __inline__ uid_t +crgetuid(cred_t *cr) +{ + return 0; +} + +static __inline__ gid_t +crgetgid(cred_t *cr) +{ + return 0; +} + +static __inline__ int +crgetngroups(cred_t *cr) +{ + return 0; +} + +static __inline__ gid_t * +crgetgroups(cred_t *cr) +{ + return NULL; +} + #ifdef __cplusplus } #endif #endif /* _SPL_CRED_H */ - diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 7bdd6fe24..c5e559cbd 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -58,7 +58,7 @@ extern unsigned int kmem_alloc_max; #define kmem_free(ptr, size) \ ({ \ - BUG_ON(!ptr); \ + BUG_ON(!ptr || size < 0); \ atomic_sub((size), &kmem_alloc_used); \ memset(ptr, 0x5a, (size)); /* Poison */ \ kfree(ptr); \ @@ -70,7 +70,11 @@ extern unsigned int kmem_alloc_max; #define kmem_alloc(size, flags) kmalloc(size, flags) #define kmem_zalloc(size, flags) kzalloc(size, flags) -#define kmem_free(ptr, size) kfree(ptr) +#define kmem_free(ptr, size) \ +({ \ + BUG_ON(!ptr || size < 0); \ + kfree(ptr); \ +}) #endif /* DEBUG_KMEM */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index a96c47fa4..3bc9f7a37 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -17,7 +17,14 @@ extern "C" { #define TRUE 1 #define INT32_MAX INT_MAX -#define UINT64_MAX (~0ULL) +#define INT32_MIN INT_MIN +#define UINT32_MAX UINT_MAX +#define UINT32_MIN UINT_MIN +#define INT64_MAX LLONG_MAX +#define INT64_MIN LLONG_MIN +#define UINT64_MAX ULLONG_MAX +#define UINT64_MIN ULLONG_MIN + #define NBBY 8 #define ENOTSUP ENOTSUPP @@ -98,22 +105,22 @@ extern "C" { #ifdef DTRACE_PROBE1 #undef DTRACE_PROBE1 #endif /* DTRACE_PROBE1 */ -#define DTRACE_PROBE1(a, b, c) ((void)0) +#define DTRACE_PROBE1(a, b, c) ((void)0) #ifdef DTRACE_PROBE2 #undef DTRACE_PROBE2 #endif /* DTRACE_PROBE2 */ -#define DTRACE_PROBE2(a, b, c, d, e) ((void)0) +#define DTRACE_PROBE2(a, b, c, d, e) ((void)0) #ifdef DTRACE_PROBE3 #undef DTRACE_PROBE3 #endif /* DTRACE_PROBE3 */ -#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0) +#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0) #ifdef DTRACE_PROBE4 #undef DTRACE_PROBE4 #endif /* DTRACE_PROBE4 */ -#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) +#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) /* Missing globals */ extern int p0; @@ -122,6 +129,8 @@ extern int p0; extern int highbit(unsigned long i); #define makedevice(maj,min) makedev(maj,min) +#define zone_dataset_visible(x, y) (1) +#define INGLOBALZONE(z) (1) /* XXX - Borrowed from zfs project libsolcompat/include/sys/sysmacros.h */ /* common macros */ diff --git a/include/sys/zmod.h b/include/sys/zmod.h new file mode 100644 index 000000000..c5216a8fd --- /dev/null +++ b/include/sys/zmod.h @@ -0,0 +1,112 @@ +#ifndef _SPL_ZMOD_H +#define _SPL_ZMOD_H + +#include + +/* NOTE: z_compress_level/z_uncompress are nearly identical copies of + * the compress2/uncompress functions provided by the official zlib + * package available at http://zlib.net/. The only changes made we to + * slightly adapt the functioned called to match the linux kernel + * implementation of zlib. + */ + +/* =========================================================================== + * Compresses the source buffer into the destination buffer. The level + * parameter has the same meaning as in deflateInit. sourceLen is the byte + * length of the source buffer. Upon entry, destLen is the total size of the + * destination buffer, which must be at least 0.1% larger than sourceLen plus + * 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + * + * compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + * memory, Z_BUF_ERROR if there was not enough room in the output buffer, + * Z_STREAM_ERROR if the level parameter is invalid. + */ +static __inline__ int +z_compress_level(Byte *dest, uLong *destLen, const Byte *source, + uLong sourceLen, int level) +{ + z_stream stream; + int err; + + stream.next_in = (Byte *)source; + stream.avail_in = (uInt)sourceLen; +#ifdef MAXSEG_64K + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) + return Z_BUF_ERROR; +#endif + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + + if ((uLong)stream.avail_out != *destLen) + return Z_BUF_ERROR; + + err = zlib_deflateInit(&stream, level); + if (err != Z_OK) + return err; + + err = zlib_deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + zlib_deflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = zlib_deflateEnd(&stream); + return err; +} /* z_compress_level() */ + +/* =========================================================================== + * Decompresses the source buffer into the destination buffer. sourceLen is + * the byte length of the source buffer. Upon entry, destLen is the total + * size of the destination buffer, which must be large enough to hold the + * entire uncompressed data. (The size of the uncompressed data must have + * been saved previously by the compressor and transmitted to the decompressor + * by some mechanism outside the scope of this compression library.) + * Upon exit, destLen is the actual size of the compressed buffer. + * This function can be used to decompress a whole file at once if the + * input file is mmap'ed. + * + * uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + * enough memory, Z_BUF_ERROR if there was not enough room in the output + * buffer, or Z_DATA_ERROR if the input data was corrupted. + */ +static __inline__ int +z_uncompress(Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen) +{ + z_stream stream; + int err; + + stream.next_in = (Byte *)source; + stream.avail_in = (uInt)sourceLen; + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) + return Z_BUF_ERROR; + + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + + if ((uLong)stream.avail_out != *destLen) + return Z_BUF_ERROR; + + err = zlib_inflateInit(&stream); + if (err != Z_OK) + return err; + + err = zlib_inflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + zlib_inflateEnd(&stream); + + if (err == Z_NEED_DICT || + (err == Z_BUF_ERROR && stream.avail_in == 0)) + return Z_DATA_ERROR; + + return err; + } + *destLen = stream.total_out; + + err = zlib_inflateEnd(&stream); + return err; +} /* z_uncompress() */ + +#endif /* SPL_ZMOD_H */ From 0b3cf046cb5b65ccaf22687e105a4380533c0305 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 7 Mar 2008 23:07:02 +0000 Subject: [PATCH 0030/1062] Add the initial vestigates of vnode support git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@30 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/sysmacros.h | 1 + include/sys/vnode.h | 97 +++++++++++++++++++++++ modules/spl/Makefile.in | 1 + modules/spl/spl-vnode.c | 168 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 267 insertions(+) create mode 100644 include/sys/vnode.h create mode 100644 modules/spl/spl-vnode.c diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 3bc9f7a37..b65a5797c 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -131,6 +131,7 @@ extern int highbit(unsigned long i); #define makedevice(maj,min) makedev(maj,min) #define zone_dataset_visible(x, y) (1) #define INGLOBALZONE(z) (1) +#define utsname system_utsname /* XXX - Borrowed from zfs project libsolcompat/include/sys/sysmacros.h */ /* common macros */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h new file mode 100644 index 000000000..9afac4c25 --- /dev/null +++ b/include/sys/vnode.h @@ -0,0 +1,97 @@ +#ifndef _SPL_VNODE_H +#define _SPL_VNODE_H + +#define XVA_MAPSIZE 3 +#define XVA_MAGIC 0x78766174 + +typedef struct vnode { + uint64_t v_size; + int v_fd; + mode_t v_mode; + char *v_path; +} vnode_t; + + +typedef struct xoptattr { + timestruc_t xoa_createtime; /* Create time of file */ + uint8_t xoa_archive; + uint8_t xoa_system; + uint8_t xoa_readonly; + uint8_t xoa_hidden; + uint8_t xoa_nounlink; + uint8_t xoa_immutable; + uint8_t xoa_appendonly; + uint8_t xoa_nodump; + uint8_t xoa_settable; + uint8_t xoa_opaque; + uint8_t xoa_av_quarantined; + uint8_t xoa_av_modified; +} xoptattr_t; + +typedef struct vattr { + uint_t va_mask; /* bit-mask of attributes */ + u_offset_t va_size; /* file size in bytes */ +} vattr_t; + + +typedef struct xvattr { + vattr_t xva_vattr; /* Embedded vattr structure */ + uint32_t xva_magic; /* Magic Number */ + uint32_t xva_mapsize; /* Size of attr bitmap (32-bit words) */ + uint32_t *xva_rtnattrmapp; /* Ptr to xva_rtnattrmap[] */ + uint32_t xva_reqattrmap[XVA_MAPSIZE]; /* Requested attrs */ + uint32_t xva_rtnattrmap[XVA_MAPSIZE]; /* Returned attrs */ + xoptattr_t xva_xoptattrs; /* Optional attributes */ +} xvattr_t; + +typedef struct vsecattr { + uint_t vsa_mask; /* See below */ + int vsa_aclcnt; /* ACL entry count */ + void *vsa_aclentp; /* pointer to ACL entries */ + int vsa_dfaclcnt; /* default ACL entry count */ + void *vsa_dfaclentp; /* pointer to default ACL entries */ + size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ +} vsecattr_t; + +#define AT_TYPE 0x00001 +#define AT_MODE 0x00002 +// #define AT_UID 0x00004 /* Conflicts with linux/auxvec.h */ +// #define AT_GID 0x00008 /* Conflicts with linux/auxvec.h */ +#define AT_FSID 0x00010 +#define AT_NODEID 0x00020 +#define AT_NLINK 0x00040 +#define AT_SIZE 0x00080 +#define AT_ATIME 0x00100 +#define AT_MTIME 0x00200 +#define AT_CTIME 0x00400 +#define AT_RDEV 0x00800 +#define AT_BLKSIZE 0x01000 +#define AT_NBLOCKS 0x02000 +#define AT_SEQ 0x08000 +#define AT_XVATTR 0x10000 + +#define CRCREAT 0 + +#define VOP_CLOSE(vp, f, c, o, cr, ct) 0 +#define VOP_PUTPAGE(vp, of, sz, fl, cr, ct) 0 +#define VOP_GETATTR(vp, vap, fl, cr, ct) ((vap)->va_size = (vp)->v_size, 0) + +#define VOP_FSYNC(vp, f, cr, ct) fsync((vp)->v_fd) + +#define VN_RELE(vp) vn_close(vp) + +extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **vpp, + int x2, int x3); +extern int vn_openat(char *path, int x1, int oflags, int mode, vnode_t **vpp, + int x2, int x3, vnode_t *vp, int fd); +extern int vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len, + offset_t offset, int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp); +extern void vn_close(vnode_t *vp); + +#define vn_remove(path, x1, x2) remove(path) +#define vn_rename(from, to, seg) rename((from), (to)) +#define vn_is_readonly(vp) B_FALSE + +extern vnode_t *rootdir; + +#endif /* SPL_VNODE_H */ diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 09e934e4f..667858aa9 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -13,6 +13,7 @@ spl-objs += spl-kmem.o spl-objs += spl-thread.o spl-objs += spl-taskq.o spl-objs += spl-rwlock.o +spl-objs += spl-vnode.o spl-objs += spl-generic.o splmodule := spl.ko diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c new file mode 100644 index 000000000..5089f8567 --- /dev/null +++ b/modules/spl/spl-vnode.c @@ -0,0 +1,168 @@ +#include +#include "config.h" + +/* + * XXX: currently borrrowed from libsolcompat until this + * can be adapted to the linux kernel interfaces. + */ +#if 0 +/* + * ========================================================================= + * vnode operations + * ========================================================================= + */ +/* + * Note: for the xxxat() versions of these functions, we assume that the + * starting vp is always rootdir (which is true for spa_directory.c, the only + * ZFS consumer of these interfaces). We assert this is true, and then emulate + * them by adding '/' in front of the path. + */ + +/*ARGSUSED*/ +int +vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3) +{ + int fd; + vnode_t *vp; + int old_umask; + char realpath[MAXPATHLEN]; + struct stat64 st; + + /* + * If we're accessing a real disk from userland, we need to use + * the character interface to avoid caching. This is particularly + * important if we're trying to look at a real in-kernel storage + * pool from userland, e.g. via zdb, because otherwise we won't + * see the changes occurring under the segmap cache. + * On the other hand, the stupid character device returns zero + * for its size. So -- gag -- we open the block device to get + * its size, and remember it for subsequent VOP_GETATTR(). + */ +#if defined(__sun__) || defined(__sun) + if (strncmp(path, "/dev/", 5) == 0) { +#else + if (0) { +#endif + char *dsk; + fd = open64(path, O_RDONLY); + if (fd == -1) + return (errno); + if (fstat64(fd, &st) == -1) { + close(fd); + return (errno); + } + close(fd); + (void) sprintf(realpath, "%s", path); + dsk = strstr(path, "/dsk/"); + if (dsk != NULL) + (void) sprintf(realpath + (dsk - path) + 1, "r%s", + dsk + 1); + } else { + (void) sprintf(realpath, "%s", path); + if (!(flags & FCREAT) && stat64(realpath, &st) == -1) + return (errno); + } + +#ifdef __linux__ + if (!(flags & FCREAT) && S_ISBLK(st.st_mode)) { + flags |= O_DIRECT; + if (flags & FWRITE) + flags |= O_EXCL; + } +#endif + + if (flags & FCREAT) + old_umask = umask(0); + + /* + * The construct 'flags - FREAD' conveniently maps combinations of + * FREAD and FWRITE to the corresponding O_RDONLY, O_WRONLY, and O_RDWR. + */ + fd = open64(realpath, flags - FREAD, mode); + + if (flags & FCREAT) + (void) umask(old_umask); + + if (fd == -1) + return (errno); + + if (fstat64(fd, &st) == -1) { + close(fd); + return (errno); + } + + (void) fcntl(fd, F_SETFD, FD_CLOEXEC); + + *vpp = vp = umem_zalloc(sizeof (vnode_t), UMEM_NOFAIL); + + vp->v_fd = fd; + vp->v_size = st.st_size; + vp->v_mode = st.st_mode; + vp->v_path = spa_strdup(path); + + return (0); +} + +/*ARGSUSED*/ +int +vn_openat(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, + int x3, vnode_t *startvp, int fd) +{ + char *realpath = umem_alloc(strlen(path) + 2, UMEM_NOFAIL); + int ret; + + ASSERT(startvp == rootdir); + (void) sprintf(realpath, "/%s", path); + + /* fd ignored for now, need if want to simulate nbmand support */ + ret = vn_open(realpath, x1, flags, mode, vpp, x2, x3); + + umem_free(realpath, strlen(path) + 2); + + return (ret); +} + +/*ARGSUSED*/ +int +vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len, offset_t offset, + int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp) +{ + ssize_t iolen, split; + + if (uio == UIO_READ) { + iolen = pread64(vp->v_fd, addr, len, offset); + } else { + /* + * To simulate partial disk writes, we split writes into two + * system calls so that the process can be killed in between. + */ +#ifdef ZFS_DEBUG + if (!S_ISBLK(vp->v_mode) && !S_ISCHR(vp->v_mode)) { + split = (len > 0 ? rand() % len : 0); + iolen = pwrite64(vp->v_fd, addr, split, offset); + iolen += pwrite64(vp->v_fd, (char *)addr + split, + len - split, offset + split); + } else + iolen = pwrite64(vp->v_fd, addr, len, offset); +#else + iolen = pwrite64(vp->v_fd, addr, len, offset); +#endif + } + + if (iolen < 0) + return (errno); + if (residp) + *residp = len - iolen; + else if (iolen != len) + return (EIO); + return (0); +} + +void +vn_close(vnode_t *vp) +{ + close(vp->v_fd); + spa_strfree(vp->v_path); + umem_free(vp, sizeof (vnode_t)); +} +#endif From 05ae387b5024b6b7014287e09ed9ce74befe91a3 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 8 Mar 2008 00:18:21 +0000 Subject: [PATCH 0031/1062] Add somre debugging support git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@31 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/cmn_err.h | 12 +++++++++++ include/sys/sysmacros.h | 3 ++- include/sys/varargs.h | 2 ++ modules/spl/Makefile.in | 1 + modules/spl/spl-err.c | 45 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 modules/spl/spl-err.c diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h index 44ccefc9f..c76e4f465 100644 --- a/include/sys/cmn_err.h +++ b/include/sys/cmn_err.h @@ -1,4 +1,16 @@ #ifndef _SPL_CMN_ERR_H #define _SPL_CMN_ERR_H +#include + +#define CE_CONT 0 /* continuation */ +#define CE_NOTE 1 /* notice */ +#define CE_WARN 2 /* warning */ +#define CE_PANIC 3 /* panic */ +#define CE_IGNORE 4 /* print nothing */ + +extern void cmn_err(int, const char *, ...); +extern void vcmn_err(int, const char *, __va_list); +extern void vpanic(const char *, __va_list); + #endif /* SPL_CMN_ERR_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index b65a5797c..08d0e1971 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -6,6 +6,7 @@ extern "C" { #endif #include +#include #ifndef _KERNEL #define _KERNEL __KERNEL__ @@ -28,6 +29,7 @@ extern "C" { #define NBBY 8 #define ENOTSUP ENOTSUPP +#define MAXMSGLEN 256 #define MAXNAMELEN 256 #define MAXPATHLEN PATH_MAX #define MAXOFFSET_T 0x7fffffffffffffffl @@ -36,7 +38,6 @@ extern "C" { #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define __va_list va_list #define max_ncpus 64 #define _NOTE(x) diff --git a/include/sys/varargs.h b/include/sys/varargs.h index 5a5444360..056967eaa 100644 --- a/include/sys/varargs.h +++ b/include/sys/varargs.h @@ -1,4 +1,6 @@ #ifndef _SPL_VARARGS_H #define _SPL_VARARGS_H +#define __va_list va_list + #endif /* SPL_VARARGS_H */ diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 667858aa9..1d152e61b 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -14,6 +14,7 @@ spl-objs += spl-thread.o spl-objs += spl-taskq.o spl-objs += spl-rwlock.o spl-objs += spl-vnode.o +spl-objs += spl-err.o spl-objs += spl-generic.o splmodule := spl.ko diff --git a/modules/spl/spl-err.c b/modules/spl/spl-err.c new file mode 100644 index 000000000..6641ff034 --- /dev/null +++ b/modules/spl/spl-err.c @@ -0,0 +1,45 @@ +#include +#include +#include "config.h" + +static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; +static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; + +void +vpanic(const char *fmt, va_list ap) +{ + char msg[MAXMSGLEN]; + + vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); + panic(msg); +} /* vpanic() */ +EXPORT_SYMBOL(vpanic); + +void +cmn_err(int ce, const char *fmt, ...) +{ + char msg[MAXMSGLEN]; + va_list ap; + + va_start(ap, fmt); + vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); + va_end(ap); + + printk("%s", msg); +} /* cmn_err() */ +EXPORT_SYMBOL(cmn_err); + +void +vcmn_err(int ce, const char *fmt, va_list ap) +{ + char msg[MAXMSGLEN]; + + if (ce == CE_PANIC) + vpanic(fmt, ap); + + if (ce != CE_NOTE) { /* suppress noise in stress testing */ + vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); + printk("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); + } +} /* vcmn_err() */ +EXPORT_SYMBOL(vcmn_err); From 12472b242dc32f681a0d30efe97359ce67959e58 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 8 Mar 2008 00:58:32 +0000 Subject: [PATCH 0032/1062] Just filling in more of the env. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@32 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/attr.h | 4 ++++ include/sys/sysmacros.h | 1 + include/sys/systeminfo.h | 4 ++++ include/sys/thread.h | 5 +++-- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 include/sys/attr.h create mode 100644 include/sys/systeminfo.h diff --git a/include/sys/attr.h b/include/sys/attr.h new file mode 100644 index 000000000..47469ced6 --- /dev/null +++ b/include/sys/attr.h @@ -0,0 +1,4 @@ +#ifndef _SPL_ATTR_H +#define _SPL_ATTR_H + +#endif /* SPL_ATTR_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 08d0e1971..ababed0fd 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -39,6 +39,7 @@ extern "C" { #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #define max_ncpus 64 +#define CPU_SEQID smp_processor_id() /* I think... */ #define _NOTE(x) /* 0..MAX_PRIO-1: Process priority diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h new file mode 100644 index 000000000..e297f2a5a --- /dev/null +++ b/include/sys/systeminfo.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SYSTEMINFO_H +#define _SPL_SYSTEMINFO_H + +#endif /* SPL_SYSTEMINFO_H */ diff --git a/include/sys/thread.h b/include/sys/thread.h index 4532aee5b..44e2902a6 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -27,12 +27,13 @@ extern "C" { #endif #define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ - __thread_create(stk, stksize, func, arg, len, pp, state, pri) + __thread_create(stk, stksize, (void (*)(void *))func, \ + arg, len, pp, state, pri) #define thread_exit() __thread_exit() #define curthread get_current() extern kthread_t *__thread_create(caddr_t stk, size_t stksize, - void (*proc)(void *), void *args, + void (*func)(void *), void *args, size_t len, int *pp, int state, pri_t pri); extern void __thread_exit(void); From 6adf99e7d6c179039482e5341a907488d3a33ea7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 10 Mar 2008 17:05:34 +0000 Subject: [PATCH 0033/1062] Add missing headers git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@33 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- FIXME | 2 + include/sys/sysevent/eventdefs.h | 235 +++++++++++++++++++++++++++++++ include/sys/sysmacros.h | 2 + include/sys/uio.h | 8 ++ include/sys/vnode.h | 20 ++- 5 files changed, 266 insertions(+), 1 deletion(-) create mode 100644 include/sys/sysevent/eventdefs.h create mode 100644 include/sys/uio.h diff --git a/FIXME b/FIXME index 4acf67d08..d853e96ac 100644 --- a/FIXME +++ b/FIXME @@ -14,3 +14,5 @@ sys/acl_impl.h _ All borrowed from libsolcompat * Fix failure in rw lock test 6 * Non-atomic 64bit support for kstat.h + +* Write vnode interface diff --git a/include/sys/sysevent/eventdefs.h b/include/sys/sysevent/eventdefs.h new file mode 100644 index 000000000..1cc58d57c --- /dev/null +++ b/include/sys/sysevent/eventdefs.h @@ -0,0 +1,235 @@ +/* + * 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 + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SPL_SYSEVENT_EVENTDEFS_H +#define _SPL_SYSEVENT_EVENTDEFS_H + + + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * eventdefs.h contains public definitions for sysevent types (classes + * and subclasses). All additions/removal/changes are subject + * to PSARC approval. + */ + +/* Sysevent Class definitions */ +#define EC_NONE "EC_none" +#define EC_PRIV "EC_priv" +#define EC_PLATFORM "EC_platform" /* events private to platform */ +#define EC_DR "EC_dr" /* Dynamic reconfiguration event class */ +#define EC_ENV "EC_env" /* Environmental monitor event class */ +#define EC_DOMAIN "EC_domain" /* Domain event class */ +#define EC_AP_DRIVER "EC_ap_driver" /* Alternate Pathing event class */ +#define EC_IPMP "EC_ipmp" /* IP Multipathing event class */ +#define EC_DEV_ADD "EC_dev_add" /* device add event class */ +#define EC_DEV_REMOVE "EC_dev_remove" /* device remove event class */ +#define EC_DEV_BRANCH "EC_dev_branch" /* device tree branch event class */ +#define EC_FM "EC_fm" /* FMA error report event */ +#define EC_ZFS "EC_zfs" /* ZFS event */ + +/* + * The following event class is reserved for exclusive use + * by Sun Cluster software. + */ +#define EC_CLUSTER "EC_Cluster" + +/* + * The following classes are exclusively reserved for use by the + * Solaris Volume Manager (SVM) + */ +#define EC_SVM_CONFIG "EC_SVM_Config" +#define EC_SVM_STATE "EC_SVM_State" + +/* + * EC_SVM_CONFIG subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/svm.h + */ +#define ESC_SVM_CREATE "ESC_SVM_Create" +#define ESC_SVM_DELETE "ESC_SVM_Delete" +#define ESC_SVM_ADD "ESC_SVM_Add" +#define ESC_SVM_REMOVE "ESC_SVM_Remove" +#define ESC_SVM_REPLACE "ESC_SVM_Replace" +#define ESC_SVM_GROW "ESC_SVM_Grow" +#define ESC_SVM_RENAME_SRC "ESC_SVM_Rename_Src" +#define ESC_SVM_RENAME_DST "ESC_SVM_Rename_Dst" +#define ESC_SVM_MEDIATOR_ADD "ESC_SVM_Mediator_Add" +#define ESC_SVM_MEDIATOR_DELETE "ESC_SVM_Mediator_Delete" +#define ESC_SVM_HOST_ADD "ESC_SVM_Host_Add" +#define ESC_SVM_HOST_DELETE "ESC_SVM_Host_Delete" +#define ESC_SVM_DRIVE_ADD "ESC_SVM_Drive_Add" +#define ESC_SVM_DRIVE_DELETE "ESC_SVM_Drive_Delete" +#define ESC_SVM_DETACH "ESC_SVM_Detach" +#define ESC_SVM_DETACHING "ESC_SVM_Detaching" +#define ESC_SVM_ATTACH "ESC_SVM_Attach" +#define ESC_SVM_ATTACHING "ESC_SVM_Attaching" + +/* + * EC_SVM_STATE subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/svm.h + */ +#define ESC_SVM_INIT_START "ESC_SVM_Init_Start" +#define ESC_SVM_INIT_FAILED "ESC_SVM_Init_Failed" +#define ESC_SVM_INIT_FATAL "ESC_SVM_Init_Fatal" +#define ESC_SVM_INIT_SUCCESS "ESC_SVM_Init_Success" +#define ESC_SVM_IOERR "ESC_SVM_Ioerr" +#define ESC_SVM_ERRED "ESC_SVM_Erred" +#define ESC_SVM_LASTERRED "ESC_SVM_Lasterred" +#define ESC_SVM_OK "ESC_SVM_Ok" +#define ESC_SVM_ENABLE "ESC_SVM_Enable" +#define ESC_SVM_RESYNC_START "ESC_SVM_Resync_Start" +#define ESC_SVM_RESYNC_FAILED "ESC_SVM_Resync_Failed" +#define ESC_SVM_RESYNC_SUCCESS "ESC_SVM_Resync_Success" +#define ESC_SVM_RESYNC_DONE "ESC_SVM_Resync_Done" +#define ESC_SVM_HOTSPARED "ESC_SVM_Hotspared" +#define ESC_SVM_HS_FREED "ESC_SVM_HS_Freed" +#define ESC_SVM_HS_CHANGED "ESC_SVM_HS_Changed" +#define ESC_SVM_TAKEOVER "ESC_SVM_Takeover" +#define ESC_SVM_RELEASE "ESC_SVM_Release" +#define ESC_SVM_OPEN_FAIL "ESC_SVM_Open_Fail" +#define ESC_SVM_OFFLINE "ESC_SVM_Offline" +#define ESC_SVM_ONLINE "ESC_SVM_Online" +#define ESC_SVM_CHANGE "ESC_SVM_Change" +#define ESC_SVM_EXCHANGE "ESC_SVM_Exchange" +#define ESC_SVM_REGEN_START "ESC_SVM_Regen_Start" +#define ESC_SVM_REGEN_DONE "ESC_SVM_Regen_Done" +#define ESC_SVM_REGEN_FAILED "ESC_SVM_Regen_Failed" + +/* + * EC_DR subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/dr.h + */ + +/* Attachment point state change */ +#define ESC_DR_AP_STATE_CHANGE "ESC_dr_ap_state_change" +#define ESC_DR_REQ "ESC_dr_req" /* Request DR */ +#define ESC_DR_TARGET_STATE_CHANGE "ESC_dr_target_state_change" + +/* + * EC_ENV subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/env.h + */ +#define ESC_ENV_TEMP "ESC_env_temp" /* Temperature change event subclass */ +#define ESC_ENV_FAN "ESC_env_fan" /* Fan status change event subclass */ +#define ESC_ENV_POWER "ESC_env_power" /* Power supply change event subclass */ +#define ESC_ENV_LED "ESC_env_led" /* LED change event subclass */ + +/* + * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/domain.h + */ + +/* Domain state change */ +#define ESC_DOMAIN_STATE_CHANGE "ESC_domain_state_change" +/* Domain loghost name change */ +#define ESC_DOMAIN_LOGHOST_CHANGE "ESC_domain_loghost_change" + +/* + * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/ap_driver.h + */ + +/* Alternate Pathing path switch */ +#define ESC_AP_DRIVER_PATHSWITCH "ESC_ap_driver_pathswitch" +/* Alternate Pathing database commit */ +#define ESC_AP_DRIVER_COMMIT "ESC_ap_driver_commit" +/* Alternate Pathing physical path status change */ +#define ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE \ + "ESC_ap_driver_phys_path_status_change" + +/* + * EC_IPMP subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/ipmp.h + */ + +/* IPMP group has changed state */ +#define ESC_IPMP_GROUP_STATE "ESC_ipmp_group_state" + +/* IPMP group has been created or removed */ +#define ESC_IPMP_GROUP_CHANGE "ESC_ipmp_group_change" + +/* IPMP group has had an interface added or removed */ +#define ESC_IPMP_GROUP_MEMBER_CHANGE "ESC_ipmp_group_member_change" + +/* Interface within an IPMP group has changed state or type */ +#define ESC_IPMP_IF_CHANGE "ESC_ipmp_if_change" + + +/* + * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes + * (name/value pairs) are found in sys/sysevent/dev.h + */ +#define ESC_DISK "disk" /* disk device */ +#define ESC_NETWORK "network" /* network interface */ +#define ESC_PRINTER "printer" /* printer device */ +#define ESC_LOFI "lofi" /* lofi device */ + +/* + * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs) + * are found in sys/sysevent/dev.h + */ + +/* device tree branch added */ +#define ESC_DEV_BRANCH_ADD "ESC_dev_branch_add" + +/* device tree branch removed */ +#define ESC_DEV_BRANCH_REMOVE "ESC_dev_branch_remove" + +/* FMA Fault and Error event protocol subclass */ +#define ESC_FM_ERROR "ESC_FM_error" +#define ESC_FM_ERROR_REPLAY "ESC_FM_error_replay" + +/* Service processor subclass definitions */ +#define ESC_PLATFORM_SP_RESET "ESC_platform_sp_reset" + +/* + * EC_ACPIEV subclass definitions + */ +#define EC_ACPIEV "EC_acpiev" +#define ESC_ACPIEV_ADD "ESC_acpiev_add" +#define ESC_ACPIEV_REMOVE "ESC_acpiev_remove" +#define ESC_ACPIEV_WARN "ESC_acpiev_warn" +#define ESC_ACPIEV_LOW "ESC_acpiev_low" +#define ESC_ACPIEV_STATE_CHANGE "ESC_acpiev_state_change" + +/* + * ZFS subclass definitions. supporting attributes (name/value paris) are found + * in sys/fs/zfs.h + */ +#define ESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start" +#define ESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish" +#define ESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove" +#define ESC_ZFS_POOL_DESTROY "ESC_ZFS_pool_destroy" +#define ESC_ZFS_VDEV_CLEAR "ESC_ZFS_vdev_clear" +#define ESC_ZFS_VDEV_CHECK "ESC_ZFS_vdev_check" + +#ifdef __cplusplus +} +#endif + +#endif /* _SPL_SYSEVENT_EVENTDEFS_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index ababed0fd..3f559bd0b 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -42,6 +42,8 @@ extern "C" { #define CPU_SEQID smp_processor_id() /* I think... */ #define _NOTE(x) +#define RLIM64_INFINITY RLIM_INFINITY + /* 0..MAX_PRIO-1: Process priority * 0..MAX_RT_PRIO-1: RT priority tasks * MAX_RT_PRIO..MAX_PRIO-1: SCHED_NORMAL tasks diff --git a/include/sys/uio.h b/include/sys/uio.h new file mode 100644 index 000000000..845256dc9 --- /dev/null +++ b/include/sys/uio.h @@ -0,0 +1,8 @@ +#ifndef _SPL_UIO_H +#define _SPL_UIO_H + +typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t; + +#define UIO_SYSSPACE 1 + +#endif /* SPL_UIO_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 9afac4c25..9d3484fcf 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -1,14 +1,32 @@ #ifndef _SPL_VNODE_H #define _SPL_VNODE_H +#include + #define XVA_MAPSIZE 3 #define XVA_MAGIC 0x78766174 +typedef enum vtype { + VNON = 0, + VREG = 1, + VDIR = 2, + VBLK = 3, + VCHR = 4, + VLNK = 5, + VFIFO = 6, + VDOOR = 7, + VPROC = 8, + VSOCK = 9, + VPORT = 10, + VBAD = 11 +} vtype_t; + typedef struct vnode { uint64_t v_size; int v_fd; mode_t v_mode; char *v_path; + vtype_t v_type; } vnode_t; @@ -76,7 +94,7 @@ typedef struct vsecattr { #define VOP_PUTPAGE(vp, of, sz, fl, cr, ct) 0 #define VOP_GETATTR(vp, vap, fl, cr, ct) ((vap)->va_size = (vp)->v_size, 0) -#define VOP_FSYNC(vp, f, cr, ct) fsync((vp)->v_fd) +#define VOP_FSYNC(vp, f, cr, ct) sys_fsync((vp)->v_fd) #define VN_RELE(vp) vn_close(vp) From 4098c921b68edd5ae03f5213f08fd1b99cd05211 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 10 Mar 2008 19:04:14 +0000 Subject: [PATCH 0034/1062] Fix systemic naming mistake git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@34 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/taskq.h | 2 +- include/sys/vfs.h | 4 ++++ modules/splat/splat-taskq.c | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 include/sys/vfs.h diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 2d7583daf..fd4af1232 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -76,7 +76,7 @@ extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); __taskq_create(name, thr, pri, min, max, flags) #define taskq_dispatch(tq, func, priv, flags) \ __taskq_dispatch(tq, func, priv, flags) -#define taskq_destory(tq) destroy_workqueue(tq) +#define taskq_destroy(tq) destroy_workqueue(tq) #define taskq_wait(tq) flush_workqueue(tq) #define taskq_member(tq, kthr) 1 /* XXX -Just be true */ diff --git a/include/sys/vfs.h b/include/sys/vfs.h new file mode 100644 index 000000000..134f4b6bf --- /dev/null +++ b/include/sys/vfs.h @@ -0,0 +1,4 @@ +#ifndef _SPL_ZFS_H +#define _SPL_ZFS_H + +#endif /* SPL_ZFS_H */ diff --git a/modules/splat/splat-taskq.c b/modules/splat/splat-taskq.c index 5abe3a02d..6effc4cab 100644 --- a/modules/splat/splat-taskq.c +++ b/modules/splat/splat-taskq.c @@ -62,7 +62,7 @@ splat_taskq_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test1_func)); - taskq_destory(tq); + taskq_destroy(tq); return -EINVAL; } @@ -71,7 +71,7 @@ splat_taskq_test1(struct file *file, void *arg) taskq_wait(tq); splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' destroying\n", tq_arg.name); - taskq_destory(tq); + taskq_destroy(tq); return (tq_arg.flag) ? 0 : -EINVAL; } @@ -174,7 +174,7 @@ splat_taskq_test2(struct file *file, void *arg) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d; destroying\n", tq_args[i].name, tq_args[i].id); - taskq_destory(tq[i]); + taskq_destroy(tq[i]); if (!rc && tq_args[i].flag != ((i * 2) + 1)) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, From 51f443a0741b5a74ecb078ab16d3eac489c90fd1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 10 Mar 2008 19:25:20 +0000 Subject: [PATCH 0035/1062] Add some typedefs to make it clearer when we passing a function, Add fm_panic define Add another bad atomic hack (need to do this right) git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@35 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/atomic.h | 9 +++++++++ include/sys/cmn_err.h | 2 ++ include/sys/taskq.h | 2 +- include/sys/thread.h | 6 ++++-- modules/spl/spl-thread.c | 4 ++-- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/sys/atomic.h b/include/sys/atomic.h index ae2130331..1f2a4780b 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -10,6 +10,7 @@ extern "C" { * get by for now since I'm only working on real 64bit systems but * this will need to be addressed properly. */ + static __inline__ void atomic_inc_64(volatile uint64_t *target) { @@ -22,6 +23,14 @@ atomic_dec_64(volatile uint64_t *target) (*target)--; } +static __inline__ uint32_t +atomic_add_32(volatile uint32_t *target, int32_t delta) +{ + uint32_t rc = *target; + *target += delta; + return rc; +} + static __inline__ uint64_t atomic_add_64(volatile uint64_t *target, uint64_t delta) { diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h index c76e4f465..62417e83e 100644 --- a/include/sys/cmn_err.h +++ b/include/sys/cmn_err.h @@ -13,4 +13,6 @@ extern void cmn_err(int, const char *, ...); extern void vcmn_err(int, const char *, __va_list); extern void vpanic(const char *, __va_list); +#define fm_panic panic + #endif /* SPL_CMN_ERR_H */ diff --git a/include/sys/taskq.h b/include/sys/taskq.h index fd4af1232..811b99557 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -75,7 +75,7 @@ extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); #define taskq_create(name, thr, pri, min, max, flags) \ __taskq_create(name, thr, pri, min, max, flags) #define taskq_dispatch(tq, func, priv, flags) \ - __taskq_dispatch(tq, func, priv, flags) + __taskq_dispatch(tq, (task_func_t)func, priv, flags) #define taskq_destroy(tq) destroy_workqueue(tq) #define taskq_wait(tq) flush_workqueue(tq) #define taskq_member(tq, kthr) 1 /* XXX -Just be true */ diff --git a/include/sys/thread.h b/include/sys/thread.h index 44e2902a6..c7b104374 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -26,14 +26,16 @@ extern "C" { #define TS_WAIT 0x20 /* No clean linux mapping */ #endif +typedef void (*thread_func_t)(void *); + #define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ - __thread_create(stk, stksize, (void (*)(void *))func, \ + __thread_create(stk, stksize, (thread_func_t)func, \ arg, len, pp, state, pri) #define thread_exit() __thread_exit() #define curthread get_current() extern kthread_t *__thread_create(caddr_t stk, size_t stksize, - void (*func)(void *), void *args, + thread_func_t func, void *args, size_t len, int *pp, int state, pri_t pri); extern void __thread_exit(void); diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index e6dca2300..a2c72f051 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -59,7 +59,7 @@ EXPORT_SYMBOL(__thread_exit); * allocate memory. This is preferable to returning a NULL which Solaris * style callers likely never check for... since it can't fail. */ kthread_t * -__thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), +__thread_create(caddr_t stk, size_t stksize, thread_func_t func, void *args, size_t len, int *pp, int state, pri_t pri) { thread_priv_t tp; @@ -77,7 +77,7 @@ __thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), * we're passing a stack address to a new thread but correct locking was * added to ensure the callee can use the data safely until wake_up(). */ tp.tp_magic = TP_MAGIC; - tp.tp_func = proc; + tp.tp_func = func; tp.tp_args = args; tp.tp_len = len; tp.tp_state = state; From ee4766827a6e19a97fe3cb423ea3220039240c4f Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 10 Mar 2008 21:38:39 +0000 Subject: [PATCH 0036/1062] Remap gethrestime() with #define to new symbol and export that new symbol to avoid direct use of GPL only symbol. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@36 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/time.h | 33 +++++++++++++++++---------------- modules/spl/Makefile.in | 1 + modules/spl/spl-time.c | 11 +++++++++++ 3 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 modules/spl/spl-time.c diff --git a/include/sys/time.h b/include/sys/time.h index 6124a841d..297e6ff74 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -15,14 +15,17 @@ extern "C" { #include extern unsigned long long monotonic_clock(void); +extern void __gethrestime(timestruc_t *); -#define TIME32_MAX INT32_MAX -#define TIME32_MIN INT32_MIN +#define gethrestime(ts) __gethrestime(ts) -#define SEC 1 -#define MILLISEC 1000 -#define MICROSEC 1000000 -#define NANOSEC 1000000000 +#define TIME32_MAX INT32_MAX +#define TIME32_MIN INT32_MIN + +#define SEC 1 +#define MILLISEC 1000 +#define MICROSEC 1000000 +#define NANOSEC 1000000000 #define hz \ ({ \ @@ -30,7 +33,14 @@ extern unsigned long long monotonic_clock(void); HZ; \ }) -#define gethrestime(ts) getnstimeofday((ts)) +static __inline__ time_t +gethrestime_sec(void) +{ + timestruc_t now; + + __gethrestime(&now); + return now.tv_sec; +} static __inline__ hrtime_t gethrtime(void) { @@ -44,15 +54,6 @@ gethrtime(void) { return monotonic_clock(); } -static __inline__ time_t -gethrestime_sec(void) -{ - timestruc_t now; - - gethrestime(&now); - return (now.tv_sec); -} - #ifdef __cplusplus } diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 1d152e61b..78ebdfa0c 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -15,6 +15,7 @@ spl-objs += spl-taskq.o spl-objs += spl-rwlock.o spl-objs += spl-vnode.o spl-objs += spl-err.o +spl-objs += spl-time.o spl-objs += spl-generic.o splmodule := spl.ko diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c new file mode 100644 index 000000000..f0ec4c5a0 --- /dev/null +++ b/modules/spl/spl-time.c @@ -0,0 +1,11 @@ +#include +#include +#include "config.h" + +void +__gethrestime(timestruc_t *ts) +{ + getnstimeofday((struct timespec *)ts); +} + +EXPORT_SYMBOL(__gethrestime); From b123971fc2f951cc95c8f75db68adf05d3a1d1aa Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 11 Mar 2008 02:08:57 +0000 Subject: [PATCH 0037/1062] Two more GPL only symbols moved to helper functions in the spl module. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@37 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/taskq.h | 6 ++++-- modules/spl/spl-taskq.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 811b99557..14ba33280 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -71,13 +71,15 @@ extern void taskq_resume(taskq_t *); extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); +extern void __taskq_destroy(taskq_t *); +extern void __taskq_wait(taskq_t *); #define taskq_create(name, thr, pri, min, max, flags) \ __taskq_create(name, thr, pri, min, max, flags) #define taskq_dispatch(tq, func, priv, flags) \ __taskq_dispatch(tq, (task_func_t)func, priv, flags) -#define taskq_destroy(tq) destroy_workqueue(tq) -#define taskq_wait(tq) flush_workqueue(tq) +#define taskq_destroy(tq) __taskq_destroy(tq) +#define taskq_wait(tq) __taskq_wait(tq) #define taskq_member(tq, kthr) 1 /* XXX -Just be true */ #ifdef __cplusplus diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 0bfae5452..67db1064b 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -78,3 +78,17 @@ __taskq_create(const char *name, int nthreads, pri_t pri, return create_singlethread_workqueue(name); } EXPORT_SYMBOL(__taskq_create); + +void +__taskq_destroy(taskq_t *tq) +{ + destroy_workqueue(tq); +} +EXPORT_SYMBOL(__taskq_destroy); + +void +__taskq_wait(taskq_t *tq) +{ + flush_workqueue(tq); +} +EXPORT_SYMBOL(__taskq_wait); From 9490c148359332d797e4fc250812bd7a5fd131b1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 11 Mar 2008 20:54:40 +0000 Subject: [PATCH 0038/1062] Apply fix from bug239 for rwlock deadlock. Update check.sh script to take V=1 env var so you can run it verbosely as follows if your chasing something: sudo make check V=1 Add new kobj api and needed regression tests to allow reading of files from within the kernel. Normally thats not something I support but the spa layer needs the support for its config file. Add some more missing stub headers git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@38 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/cred.h | 2 +- include/sys/kidmap.h | 4 + include/sys/kobj.h | 29 +++++++ include/sys/rwlock.h | 71 ++++++++++++++++- include/sys/sid.h | 4 + include/sys/sysmacros.h | 1 - include/sys/utsname.h | 8 ++ include/sys/vfs.h | 4 + modules/spl/Makefile.in | 1 + modules/spl/spl-kobj.c | 75 ++++++++++++++++++ modules/splat/Makefile.in | 1 + modules/splat/splat-ctl.c | 2 + modules/splat/splat-internal.h | 4 + modules/splat/splat-kobj.c | 137 +++++++++++++++++++++++++++++++++ scripts/check.sh | 9 ++- 15 files changed, 347 insertions(+), 5 deletions(-) create mode 100644 include/sys/kidmap.h create mode 100644 include/sys/kobj.h create mode 100644 include/sys/sid.h create mode 100644 include/sys/utsname.h create mode 100644 modules/spl/spl-kobj.c create mode 100644 modules/splat/splat-kobj.c diff --git a/include/sys/cred.h b/include/sys/cred.h index 401f3130a..5ed233b0b 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -6,7 +6,7 @@ extern "C" { #endif #include -#include +#include /* XXX - Portions commented out because we really just want to have the type * defined and the contents aren't nearly so important at the moment. */ diff --git a/include/sys/kidmap.h b/include/sys/kidmap.h new file mode 100644 index 000000000..d1c8d913f --- /dev/null +++ b/include/sys/kidmap.h @@ -0,0 +1,4 @@ +#ifndef _SPL_KIDMAP_H +#define _SPL_KIDMAP_H + +#endif /* SPL_KIDMAP_H */ diff --git a/include/sys/kobj.h b/include/sys/kobj.h new file mode 100644 index 000000000..306fcdcfc --- /dev/null +++ b/include/sys/kobj.h @@ -0,0 +1,29 @@ +#ifndef _SPL_KOBJ_H +#define _SPL_KOBJ_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include + +typedef struct _buf { + struct file *fp; +} _buf_t; + +extern void *rootdir; + +extern struct _buf *kobj_open_file(const char *name); +extern void kobj_close_file(struct _buf *file); +extern int kobj_read_file(struct _buf *file, char *buf, + unsigned size, unsigned off); +extern int kobj_get_filesize(struct _buf *file, uint64_t *size); + +#ifdef __cplusplus +} +#endif + +#endif /* SPL_KOBJ_H */ diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 4498e9562..ecee07948 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -36,6 +36,65 @@ typedef struct { struct task_struct *rw_owner; /* holder of the write lock */ } krwlock_t; +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK +struct rwsem_waiter { + struct list_head list; + struct task_struct *task; + unsigned int flags; +#define RWSEM_WAITING_FOR_READ 0x00000001 +#define RWSEM_WAITING_FOR_WRITE 0x00000002 +}; + +/* + * wake a single writer + */ +static inline struct rw_semaphore * +__rwsem_wake_one_writer_locked(struct rw_semaphore *sem) +{ + struct rwsem_waiter *waiter; + struct task_struct *tsk; + + sem->activity = -1; + + waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); + list_del(&waiter->list); + + tsk = waiter->task; + smp_mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); + return sem; +} + +/* + * release a read lock on the semaphore + */ +static void fastcall +__up_read_locked(struct rw_semaphore *sem) +{ + if (--sem->activity == 0 && !list_empty(&sem->wait_list)) + sem = __rwsem_wake_one_writer_locked(sem); +} + +/* + * trylock for writing -- returns 1 if successful, 0 if contention + */ +static int fastcall +__down_write_trylock_locked(struct rw_semaphore *sem) +{ + int ret = 0; + + if (sem->activity == 0 && list_empty(&sem->wait_list)) { + /* granted */ + sem->activity = -1; + ret = 1; + } + + return ret; +} +#endif + extern int __rw_read_held(krwlock_t *rwlp); extern int __rw_write_held(krwlock_t *rwlp); extern int __rw_lock_held(krwlock_t *rwlp); @@ -168,7 +227,7 @@ rw_downgrade(krwlock_t *rwlp) static __inline__ int rw_tryupgrade(krwlock_t *rwlp) { - int result; + int result = 0; BUG_ON(rwlp->rw_magic != RW_MAGIC); spin_lock(&rwlp->rw_sem.wait_lock); @@ -197,6 +256,15 @@ rw_tryupgrade(krwlock_t *rwlp) return 0; } +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + /* Here it should be safe to drop the + * read lock and reacquire it for writing since + * we know there are no waiters */ + __up_read_locked(&rwlp->rw_sem); + + /* returns 1 if success, 0 if contention */ + result = __down_write_trylock_locked(&rwlp->rw_sem); +#else /* Here it should be safe to drop the * read lock and reacquire it for writing since * we know there are no waiters */ @@ -204,6 +272,7 @@ rw_tryupgrade(krwlock_t *rwlp) /* returns 1 if success, 0 if contention */ result = down_write_trylock(&rwlp->rw_sem); +#endif /* Check if upgrade failed. Should not ever happen * if we got to this point */ diff --git a/include/sys/sid.h b/include/sys/sid.h new file mode 100644 index 000000000..937a71ea8 --- /dev/null +++ b/include/sys/sid.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SID_H +#define _SPL_SID_H + +#endif /* SPL_SID_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 3f559bd0b..218f59567 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -135,7 +135,6 @@ extern int highbit(unsigned long i); #define makedevice(maj,min) makedev(maj,min) #define zone_dataset_visible(x, y) (1) #define INGLOBALZONE(z) (1) -#define utsname system_utsname /* XXX - Borrowed from zfs project libsolcompat/include/sys/sysmacros.h */ /* common macros */ diff --git a/include/sys/utsname.h b/include/sys/utsname.h new file mode 100644 index 000000000..7b1563d4b --- /dev/null +++ b/include/sys/utsname.h @@ -0,0 +1,8 @@ +#ifndef _SPL_UTSNAME_H +#define _SPL_UTSNAME_H + +#include + +#define utsname system_utsname + +#endif /* SPL_UTSNAME_H */ diff --git a/include/sys/vfs.h b/include/sys/vfs.h index 134f4b6bf..6bc0a42ae 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -1,4 +1,8 @@ #ifndef _SPL_ZFS_H #define _SPL_ZFS_H +typedef struct vfs_s { + int foo; +} vfs_t; + #endif /* SPL_ZFS_H */ diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 78ebdfa0c..1005d100b 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -16,6 +16,7 @@ spl-objs += spl-rwlock.o spl-objs += spl-vnode.o spl-objs += spl-err.o spl-objs += spl-time.o +spl-objs += spl-kobj.o spl-objs += spl-generic.o splmodule := spl.ko diff --git a/modules/spl/spl-kobj.c b/modules/spl/spl-kobj.c new file mode 100644 index 000000000..ce0625b9f --- /dev/null +++ b/modules/spl/spl-kobj.c @@ -0,0 +1,75 @@ +#include +#include "config.h" + +void *rootdir = NULL; +EXPORT_SYMBOL(rootdir); + +struct _buf * +kobj_open_file(const char *name) +{ + struct _buf *file; + struct file *fp; + + fp = filp_open(name, O_RDONLY, 0644); + if (IS_ERR(fp)) + return ((_buf_t *)-1UL); + + file = kmem_zalloc(sizeof(_buf_t), KM_SLEEP); + file->fp = fp; + + return file; +} /* kobj_open_file() */ +EXPORT_SYMBOL(kobj_open_file); + +void +kobj_close_file(struct _buf *file) +{ + filp_close(file->fp, 0); + kmem_free(file, sizeof(_buf_t)); + + return; +} /* kobj_close_file() */ +EXPORT_SYMBOL(kobj_close_file); + +int +kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off) +{ + loff_t offset = off; + mm_segment_t saved_fs; + int rc; + + if (!file || !file->fp) + return -EINVAL; + + if (!file->fp->f_op || !file->fp->f_op->read) + return -ENOSYS; + + /* Writable user data segment must be briefly increased for this + * process so we can use the user space read call paths to write + * in to memory allocated by the kernel. */ + saved_fs = get_fs(); + set_fs(get_ds()); + rc = file->fp->f_op->read(file->fp, buf, size, &offset); + set_fs(saved_fs); + + return rc; +} /* kobj_read_file() */ +EXPORT_SYMBOL(kobj_read_file); + +int +kobj_get_filesize(struct _buf *file, uint64_t *size) +{ + struct kstat stat; + int rc; + + if (!file || !file->fp || !size) + return -EINVAL; + + rc = vfs_getattr(file->fp->f_vfsmnt, file->fp->f_dentry, &stat); + if (rc) + return rc; + + *size = stat.size; + return rc; +} /* kobj_get_filesize() */ +EXPORT_SYMBOL(kobj_get_filesize); diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index 29cec4581..0c7526f19 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -21,6 +21,7 @@ splat-objs += splat-condvar.o splat-objs += splat-thread.o splat-objs += splat-rwlock.o splat-objs += splat-time.o +splat-objs += splat-kobj.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index 968acc82a..693277c5c 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -591,6 +591,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(thread); SPLAT_SUBSYSTEM_INIT(rwlock); SPLAT_SUBSYSTEM_INIT(time); + SPLAT_SUBSYSTEM_INIT(kobj); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, "splatctl"))) @@ -652,6 +653,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(kobj); SPLAT_SUBSYSTEM_FINI(time); SPLAT_SUBSYSTEM_FINI(rwlock); SPLAT_SUBSYSTEM_FINI(thread); diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 061a9d018..b8e803290 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -32,6 +32,7 @@ #include #include #include +#include #include "splat-ctl.h" @@ -169,6 +170,7 @@ splat_subsystem_t * splat_rwlock_init(void); splat_subsystem_t * splat_taskq_init(void); splat_subsystem_t * splat_thread_init(void); splat_subsystem_t * splat_time_init(void); +splat_subsystem_t * splat_kobj_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -178,6 +180,7 @@ void splat_rwlock_fini(splat_subsystem_t *); void splat_taskq_fini(splat_subsystem_t *); void splat_thread_fini(splat_subsystem_t *); void splat_time_fini(splat_subsystem_t *); +void splat_kobj_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -187,5 +190,6 @@ int splat_rwlock_id(void); int splat_taskq_id(void); int splat_thread_id(void); int splat_time_id(void); +int splat_kobj_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/modules/splat/splat-kobj.c b/modules/splat/splat-kobj.c new file mode 100644 index 000000000..91f591f46 --- /dev/null +++ b/modules/splat/splat-kobj.c @@ -0,0 +1,137 @@ +#include "splat-internal.h" + +#define SPLAT_SUBSYSTEM_KOBJ 0x0900 +#define SPLAT_KOBJ_NAME "kobj" +#define SPLAT_KOBJ_DESC "Kernel File Tests" + +#define SPLAT_KOBJ_TEST1_ID 0x0901 +#define SPLAT_KOBJ_TEST1_NAME "kobj1" +#define SPLAT_KOBJ_TEST1_DESC "File Open/Close Test" + +#define SPLAT_KOBJ_TEST2_ID 0x0902 +#define SPLAT_KOBJ_TEST2_NAME "kobj2" +#define SPLAT_KOBJ_TEST2_DESC "File Size/Read Test" + +#define SPLAT_KOBJ_TEST_FILE "/etc/fstab" + +static int +splat_kobj_test1(struct file *file, void *arg) +{ + struct _buf *f; + + f = kobj_open_file(SPLAT_KOBJ_TEST_FILE); + if (f == (struct _buf *)-1) { + splat_vprint(file, SPLAT_KOBJ_TEST1_NAME, "Failed to open " + "test file: %s\n", SPLAT_KOBJ_TEST_FILE); + return -ENOENT; + } + + kobj_close_file(f); + splat_vprint(file, SPLAT_KOBJ_TEST1_NAME, "Successfully opened and " + "closed test file: %s\n", SPLAT_KOBJ_TEST_FILE); + + return 0; +} /* splat_kobj_test1() */ + +static int +splat_kobj_test2(struct file *file, void *arg) +{ + struct _buf *f; + char *buf; + uint64_t size; + int rc; + + f = kobj_open_file(SPLAT_KOBJ_TEST_FILE); + if (f == (struct _buf *)-1) { + splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed to open " + "test file: %s\n", SPLAT_KOBJ_TEST_FILE); + return -ENOENT; + } + + rc = kobj_get_filesize(f, &size); + if (rc) { + splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed stat of " + "test file: %s (%d)\n", SPLAT_KOBJ_TEST_FILE, rc); + goto out; + } + + buf = kmalloc(size, GFP_KERNEL); + if (!buf) { + rc = -ENOMEM; + splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed to alloc " + "%lld bytes for tmp buffer (%d)\n", size, rc); + goto out; + } + + rc = kobj_read_file(f, buf, size, 0); + if (rc < 0) { + splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed read of " + "test file: %s (%d)\n", SPLAT_KOBJ_TEST_FILE, rc); + goto out2; + } + + /* Validate we read as many bytes as expected based on the stat. This + * isn't a perfect test since we didn't create the file however it is + * pretty unlikely there are garbage characters in your /etc/fstab */ + if (size != (uint64_t)strlen(buf)) { + rc = EFBIG; + splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Stat'ed size " + "(%lld) does not match number of bytes read " + "(%lld)\n", size, (uint64_t)strlen(buf)); + goto out2; + } + + rc = 0; + splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "\n%s\n", buf); + splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Successfully stat'ed " + "and read expected number of bytes (%lld) from test " + "file: %s\n", size, SPLAT_KOBJ_TEST_FILE); +out2: + kfree(buf); +out: + kobj_close_file(f); + + return rc; +} /* splat_kobj_test2() */ + +splat_subsystem_t * +splat_kobj_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_KOBJ_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_KOBJ_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_KOBJ; + + SPLAT_TEST_INIT(sub, SPLAT_KOBJ_TEST1_NAME, SPLAT_KOBJ_TEST1_DESC, + SPLAT_KOBJ_TEST1_ID, splat_kobj_test1); + SPLAT_TEST_INIT(sub, SPLAT_KOBJ_TEST2_NAME, SPLAT_KOBJ_TEST2_DESC, + SPLAT_KOBJ_TEST2_ID, splat_kobj_test2); + + return sub; +} /* splat_kobj_init() */ + +void +splat_kobj_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + + SPLAT_TEST_FINI(sub, SPLAT_KOBJ_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_KOBJ_TEST1_ID); + + kfree(sub); +} /* splat_kobj_fini() */ + +int +splat_kobj_id(void) +{ + return SPLAT_SUBSYSTEM_KOBJ; +} /* splat_kobj_id() */ diff --git a/scripts/check.sh b/scripts/check.sh index d98c67092..5d7123684 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -4,6 +4,7 @@ prog=check.sh spl_module=../modules/spl/spl.ko splat_module=../modules/splat/splat.ko splat_cmd=../cmd/splat +verbose= die() { echo "${prog}: $1" >&2 @@ -14,6 +15,10 @@ warn() { echo "${prog}: $1" >&2 } +if [ -n "$V" ]; then + verbose="-v" +fi + if [ $(id -u) != 0 ]; then die "Must run as root" fi @@ -32,8 +37,8 @@ echo "Loading ${spl_module}" echo "Loading ${splat_module}" /sbin/insmod ${splat_module} || die "Unable to load ${splat_module}" -sleep 5 -$splat_cmd -a +sleep 3 +$splat_cmd -a $verbose echo "Unloading ${splat_module}" /sbin/rmmod ${splat_module} || die "Failed to unload ${splat_module}" From 4b17158506d5f3bb7e71111f5b6287f19bf20190 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 12 Mar 2008 20:52:46 +0000 Subject: [PATCH 0039/1062] - Implemented vnode interfaces and 6 test cases to the test suite. - Re-implmented kobj support based on the vnode support. - Add TESTS option to check.sh, and removed delay after module load. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@39 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- FIXME | 6 +- include/sys/kobj.h | 11 +- include/sys/sysmacros.h | 16 -- include/sys/uio.h | 5 +- include/sys/vnode.h | 155 ++++++----- modules/spl/spl-kobj.c | 51 ++-- modules/spl/spl-vnode.c | 452 +++++++++++++++++++++++---------- modules/splat/Makefile.in | 1 + modules/splat/splat-ctl.c | 2 + modules/splat/splat-internal.h | 3 + modules/splat/splat-kobj.c | 10 +- modules/splat/splat-vnode.c | 372 +++++++++++++++++++++++++++ scripts/check.sh | 10 +- 13 files changed, 830 insertions(+), 264 deletions(-) create mode 100644 modules/splat/splat-vnode.c diff --git a/FIXME b/FIXME index d853e96ac..887616efb 100644 --- a/FIXME +++ b/FIXME @@ -11,8 +11,4 @@ sys/u8_textprep_data - AlL borrowed from libsolcompat sys/acl.h _ All borrowed from libsolcompat sys/acl_impl.h _ All borrowed from libsolcompat -* Fix failure in rw lock test 6 - -* Non-atomic 64bit support for kstat.h - -* Write vnode interface +* Implement solaris style atomic interfaces diff --git a/include/sys/kobj.h b/include/sys/kobj.h index 306fcdcfc..82da951e1 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -5,21 +5,16 @@ extern "C" { #endif -#include -#include -#include -#include +#include typedef struct _buf { - struct file *fp; + vnode_t *vp; } _buf_t; -extern void *rootdir; - extern struct _buf *kobj_open_file(const char *name); extern void kobj_close_file(struct _buf *file); extern int kobj_read_file(struct _buf *file, char *buf, - unsigned size, unsigned off); + ssize_t size, offset_t off); extern int kobj_get_filesize(struct _buf *file, uint64_t *size); #ifdef __cplusplus diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 218f59567..076f26784 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -56,21 +56,6 @@ extern "C" { #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) #define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) -#define kred NULL - -#define FREAD 1 -#define FWRITE 2 -#define FCREAT O_CREAT -#define FTRUNC O_TRUNC -#define FOFFMAX O_LARGEFILE -#define FSYNC O_SYNC -#define FDSYNC O_DSYNC -#define FRSYNC O_RSYNC -#define FEXCL O_EXCL - -#define FNODSYNC 0x10000 /* fsync pseudo flag */ -#define FNOFOLLOW 0x20000 /* don't follow symlinks */ - /* Missing macros */ #define PAGESIZE PAGE_SIZE @@ -136,7 +121,6 @@ extern int highbit(unsigned long i); #define zone_dataset_visible(x, y) (1) #define INGLOBALZONE(z) (1) -/* XXX - Borrowed from zfs project libsolcompat/include/sys/sysmacros.h */ /* common macros */ #ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) diff --git a/include/sys/uio.h b/include/sys/uio.h index 845256dc9..6da4d34ed 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -1,7 +1,10 @@ #ifndef _SPL_UIO_H #define _SPL_UIO_H -typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t; +typedef enum uio_rw { + UIO_READ = 0, + UIO_WRITE = 1, +} uio_rw_t; #define UIO_SYSSPACE 1 diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 9d3484fcf..7583d04d4 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -1,35 +1,94 @@ #ifndef _SPL_VNODE_H #define _SPL_VNODE_H +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define XVA_MAPSIZE 3 #define XVA_MAGIC 0x78766174 +#define FREAD 1 +#define FWRITE 2 +#define FCREAT O_CREAT +#define FTRUNC O_TRUNC +#define FOFFMAX O_LARGEFILE +#define FSYNC O_SYNC +#define FDSYNC O_DSYNC +#define FRSYNC O_RSYNC +#define FEXCL O_EXCL +#define FDIRECT O_DIRECT + +#define FNODSYNC 0x10000 /* fsync pseudo flag */ +#define FNOFOLLOW 0x20000 /* don't follow symlinks */ + +#define AT_TYPE 0x00001 +#define AT_MODE 0x00002 +#undef AT_UID /* Conflicts with linux/auxvec.h */ +#define AT_UID 0x00004 +#undef AT_GID /* Conflicts with linux/auxvec.h */ +#define AT_GID 0x00008 +#define AT_FSID 0x00010 +#define AT_NODEID 0x00020 +#define AT_NLINK 0x00040 +#define AT_SIZE 0x00080 +#define AT_ATIME 0x00100 +#define AT_MTIME 0x00200 +#define AT_CTIME 0x00400 +#define AT_RDEV 0x00800 +#define AT_BLKSIZE 0x01000 +#define AT_NBLOCKS 0x02000 +#define AT_SEQ 0x08000 +#define AT_XVATTR 0x10000 + +#define CRCREAT 0 + typedef enum vtype { - VNON = 0, - VREG = 1, - VDIR = 2, - VBLK = 3, - VCHR = 4, - VLNK = 5, - VFIFO = 6, - VDOOR = 7, - VPROC = 8, - VSOCK = 9, - VPORT = 10, - VBAD = 11 + VNON = 0, + VREG = 1, + VDIR = 2, + VBLK = 3, + VCHR = 4, + VLNK = 5, + VFIFO = 6, + VDOOR = 7, + VPROC = 8, + VSOCK = 9, + VPORT = 10, + VBAD = 11 } vtype_t; typedef struct vnode { - uint64_t v_size; - int v_fd; - mode_t v_mode; - char *v_path; + struct file *v_fp; vtype_t v_type; } vnode_t; +typedef struct vattr { + enum vtype va_type; /* vnode type */ + u_short va_mode; /* acc mode */ + short va_uid; /* owner uid */ + short va_gid; /* owner gid */ + long va_fsid; /* fs id */ + long va_nodeid; /* node # */ + short va_nlink; /* # links */ + u_long va_size; /* file size */ + long va_blocksize; /* block size */ + struct timeval va_atime; /* last acc */ + struct timeval va_mtime; /* last mod */ + struct timeval va_ctime; /* last chg */ + dev_t va_rdev; /* dev */ + long va_blocks; /* space used */ +} vattr_t; +#if 0 typedef struct xoptattr { timestruc_t xoa_createtime; /* Create time of file */ uint8_t xoa_archive; @@ -46,12 +105,6 @@ typedef struct xoptattr { uint8_t xoa_av_modified; } xoptattr_t; -typedef struct vattr { - uint_t va_mask; /* bit-mask of attributes */ - u_offset_t va_size; /* file size in bytes */ -} vattr_t; - - typedef struct xvattr { vattr_t xva_vattr; /* Embedded vattr structure */ uint32_t xva_magic; /* Magic Number */ @@ -70,46 +123,28 @@ typedef struct vsecattr { void *vsa_dfaclentp; /* pointer to default ACL entries */ size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ } vsecattr_t; +#endif -#define AT_TYPE 0x00001 -#define AT_MODE 0x00002 -// #define AT_UID 0x00004 /* Conflicts with linux/auxvec.h */ -// #define AT_GID 0x00008 /* Conflicts with linux/auxvec.h */ -#define AT_FSID 0x00010 -#define AT_NODEID 0x00020 -#define AT_NLINK 0x00040 -#define AT_SIZE 0x00080 -#define AT_ATIME 0x00100 -#define AT_MTIME 0x00200 -#define AT_CTIME 0x00400 -#define AT_RDEV 0x00800 -#define AT_BLKSIZE 0x01000 -#define AT_NBLOCKS 0x02000 -#define AT_SEQ 0x08000 -#define AT_XVATTR 0x10000 +extern int vn_open(const char *path, int seg, int flags, int mode, + vnode_t **vpp, int x1, void *x2); +extern int vn_openat(const char *path, int seg, int flags, int mode, + vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd); +extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, + offset_t off, int seg, int x1, rlim64_t x2, + void *x3, ssize_t *residp); +extern int vn_close(vnode_t *vp, int flags, int x1, int x2, int x3, int x4); +extern int vn_remove(const char *path, int x1, int x2); +extern int vn_rename(const char *path1, const char *path2, int x1); +extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, int x3, void *x4); +extern int vn_fsync(vnode_t *vp, int flags, int x3, int x4); -#define CRCREAT 0 +#define VOP_CLOSE vn_close +#define VN_RELE(vp) +#define VOP_GETATTR vn_getattr +#define VOP_FSYNC vn_fsync +#define VOP_PUTPAGE(vp, of, sz, fl, cr, ct) +#define vn_is_readonly(vp) 0 -#define VOP_CLOSE(vp, f, c, o, cr, ct) 0 -#define VOP_PUTPAGE(vp, of, sz, fl, cr, ct) 0 -#define VOP_GETATTR(vp, vap, fl, cr, ct) ((vap)->va_size = (vp)->v_size, 0) - -#define VOP_FSYNC(vp, f, cr, ct) sys_fsync((vp)->v_fd) - -#define VN_RELE(vp) vn_close(vp) - -extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **vpp, - int x2, int x3); -extern int vn_openat(char *path, int x1, int oflags, int mode, vnode_t **vpp, - int x2, int x3, vnode_t *vp, int fd); -extern int vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len, - offset_t offset, int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp); -extern void vn_close(vnode_t *vp); - -#define vn_remove(path, x1, x2) remove(path) -#define vn_rename(from, to, seg) rename((from), (to)) -#define vn_is_readonly(vp) B_FALSE - -extern vnode_t *rootdir; +extern void *rootdir; #endif /* SPL_VNODE_H */ diff --git a/modules/spl/spl-kobj.c b/modules/spl/spl-kobj.c index ce0625b9f..eb55ad3e1 100644 --- a/modules/spl/spl-kobj.c +++ b/modules/spl/spl-kobj.c @@ -1,21 +1,18 @@ #include #include "config.h" -void *rootdir = NULL; -EXPORT_SYMBOL(rootdir); - struct _buf * kobj_open_file(const char *name) { struct _buf *file; - struct file *fp; + vnode_t *vp; + int rc; - fp = filp_open(name, O_RDONLY, 0644); - if (IS_ERR(fp)) + if ((rc = vn_open(name, UIO_SYSSPACE, FREAD, 0644, &vp, 0, 0))) return ((_buf_t *)-1UL); - file = kmem_zalloc(sizeof(_buf_t), KM_SLEEP); - file->fp = fp; + file = kmalloc(sizeof(_buf_t), GFP_KERNEL); + file->vp = vp; return file; } /* kobj_open_file() */ @@ -24,52 +21,34 @@ EXPORT_SYMBOL(kobj_open_file); void kobj_close_file(struct _buf *file) { - filp_close(file->fp, 0); - kmem_free(file, sizeof(_buf_t)); + VOP_CLOSE(file->vp, 0, 0, 0, 0, 0); + VN_RELE(file->vp); + kfree(file); return; } /* kobj_close_file() */ EXPORT_SYMBOL(kobj_close_file); int -kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off) +kobj_read_file(struct _buf *file, char *buf, ssize_t size, offset_t off) { - loff_t offset = off; - mm_segment_t saved_fs; - int rc; - - if (!file || !file->fp) - return -EINVAL; - - if (!file->fp->f_op || !file->fp->f_op->read) - return -ENOSYS; - - /* Writable user data segment must be briefly increased for this - * process so we can use the user space read call paths to write - * in to memory allocated by the kernel. */ - saved_fs = get_fs(); - set_fs(get_ds()); - rc = file->fp->f_op->read(file->fp, buf, size, &offset); - set_fs(saved_fs); - - return rc; + return vn_rdwr(UIO_READ, file->vp, buf, size, off, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); } /* kobj_read_file() */ EXPORT_SYMBOL(kobj_read_file); int kobj_get_filesize(struct _buf *file, uint64_t *size) { - struct kstat stat; + vattr_t vap; int rc; - if (!file || !file->fp || !size) - return -EINVAL; - - rc = vfs_getattr(file->fp->f_vfsmnt, file->fp->f_dentry, &stat); + rc = VOP_GETATTR(file->vp, &vap, 0, 0, NULL); if (rc) return rc; - *size = stat.size; + *size = vap.va_size; + return rc; } /* kobj_get_filesize() */ EXPORT_SYMBOL(kobj_get_filesize); diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 5089f8567..9024909b8 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -1,168 +1,358 @@ #include +#include #include "config.h" -/* - * XXX: currently borrrowed from libsolcompat until this - * can be adapted to the linux kernel interfaces. - */ -#if 0 -/* - * ========================================================================= - * vnode operations - * ========================================================================= - */ -/* - * Note: for the xxxat() versions of these functions, we assume that the - * starting vp is always rootdir (which is true for spa_directory.c, the only - * ZFS consumer of these interfaces). We assert this is true, and then emulate - * them by adding '/' in front of the path. - */ +void *rootdir = NULL; +EXPORT_SYMBOL(rootdir); -/*ARGSUSED*/ -int -vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3) +static vtype_t +vn_get_sol_type(umode_t mode) { - int fd; + if (S_ISREG(mode)) + return VREG; + + if (S_ISDIR(mode)) + return VDIR; + + if (S_ISCHR(mode)) + return VCHR; + + if (S_ISBLK(mode)) + return VBLK; + + if (S_ISFIFO(mode)) + return VFIFO; + + if (S_ISLNK(mode)) + return VLNK; + + if (S_ISSOCK(mode)) + return VSOCK; + + if (S_ISCHR(mode)) + return VCHR; + + return VNON; +} /* vn_get_sol_type() */ + +int +vn_open(const char *path, int seg, int flags, int mode, + vnode_t **vpp, int x1, void *x2) +{ + struct file *fp; + struct kstat stat; + int rc, saved_umask, flags_rw; vnode_t *vp; - int old_umask; - char realpath[MAXPATHLEN]; - struct stat64 st; - /* - * If we're accessing a real disk from userland, we need to use - * the character interface to avoid caching. This is particularly - * important if we're trying to look at a real in-kernel storage - * pool from userland, e.g. via zdb, because otherwise we won't - * see the changes occurring under the segmap cache. - * On the other hand, the stupid character device returns zero - * for its size. So -- gag -- we open the block device to get - * its size, and remember it for subsequent VOP_GETATTR(). - */ -#if defined(__sun__) || defined(__sun) - if (strncmp(path, "/dev/", 5) == 0) { -#else - if (0) { -#endif - char *dsk; - fd = open64(path, O_RDONLY); - if (fd == -1) - return (errno); - if (fstat64(fd, &st) == -1) { - close(fd); - return (errno); - } - close(fd); - (void) sprintf(realpath, "%s", path); - dsk = strstr(path, "/dsk/"); - if (dsk != NULL) - (void) sprintf(realpath + (dsk - path) + 1, "r%s", - dsk + 1); - } else { - (void) sprintf(realpath, "%s", path); - if (!(flags & FCREAT) && stat64(realpath, &st) == -1) - return (errno); - } + BUG_ON(seg != UIO_SYSSPACE); + BUG_ON(!vpp); + *vpp = NULL; -#ifdef __linux__ - if (!(flags & FCREAT) && S_ISBLK(st.st_mode)) { - flags |= O_DIRECT; - if (flags & FWRITE) - flags |= O_EXCL; + if (!(flags & FCREAT) && (flags & FWRITE)) + flags |= FEXCL; + + flags_rw = flags & (FWRITE | FREAD); + flags &= ~(FWRITE | FREAD); + switch (flags_rw) { + case FWRITE: flags |= O_WRONLY; + case FREAD: flags |= O_RDONLY; + case (FWRITE | FREAD): flags |= O_RDWR; } -#endif if (flags & FCREAT) - old_umask = umask(0); + saved_umask = xchg(¤t->fs->umask, 0); - /* - * The construct 'flags - FREAD' conveniently maps combinations of - * FREAD and FWRITE to the corresponding O_RDONLY, O_WRONLY, and O_RDWR. - */ - fd = open64(realpath, flags - FREAD, mode); + fp = filp_open(path, flags, mode); if (flags & FCREAT) - (void) umask(old_umask); + (void)xchg(¤t->fs->umask, saved_umask); - if (fd == -1) - return (errno); + if (IS_ERR(fp)) + return PTR_ERR(fp); - if (fstat64(fd, &st) == -1) { - close(fd); - return (errno); + rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); + if (rc) { + filp_close(fp, 0); + return rc; } - (void) fcntl(fd, F_SETFD, FD_CLOEXEC); + vp = kmalloc(sizeof(vnode_t), GFP_ATOMIC); + if (!vp) { + filp_close(fp, 0); + return -ENOMEM; + } - *vpp = vp = umem_zalloc(sizeof (vnode_t), UMEM_NOFAIL); + vp->v_type = vn_get_sol_type(stat.mode); + vp->v_fp = fp; + *vpp = vp; - vp->v_fd = fd; - vp->v_size = st.st_size; - vp->v_mode = st.st_mode; - vp->v_path = spa_strdup(path); + return 0; +} /* vn_open() */ +EXPORT_SYMBOL(vn_open); - return (0); -} - -/*ARGSUSED*/ int -vn_openat(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, - int x3, vnode_t *startvp, int fd) +vn_openat(const char *path, int seg, int flags, int mode, + vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd) { - char *realpath = umem_alloc(strlen(path) + 2, UMEM_NOFAIL); - int ret; + char *realpath; + int rc; - ASSERT(startvp == rootdir); - (void) sprintf(realpath, "/%s", path); + BUG_ON(vp != rootdir); - /* fd ignored for now, need if want to simulate nbmand support */ - ret = vn_open(realpath, x1, flags, mode, vpp, x2, x3); + realpath = kmalloc(strlen(path) + 2, GFP_KERNEL); + if (!realpath) + return -ENOMEM; - umem_free(realpath, strlen(path) + 2); + sprintf(realpath, "/%s", path); + rc = vn_open(realpath, seg, flags, mode, vpp, x1, x2); - return (ret); -} + kfree(realpath); + + return rc; +} /* vn_openat() */ +EXPORT_SYMBOL(vn_openat); -/*ARGSUSED*/ int -vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len, offset_t offset, - int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp) +vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, + int seg, int x1, rlim64_t x2, void *x3, ssize_t *residp) { - ssize_t iolen, split; + loff_t offset; + mm_segment_t saved_fs; + struct file *fp; + int rc; - if (uio == UIO_READ) { - iolen = pread64(vp->v_fd, addr, len, offset); + BUG_ON(!(uio == UIO_WRITE || uio == UIO_READ)); + BUG_ON(!vp); + BUG_ON(!vp->v_fp); + BUG_ON(seg != UIO_SYSSPACE); + BUG_ON(x1 != 0); + BUG_ON(x2 != RLIM64_INFINITY); + + offset = off; + fp = vp->v_fp; + + /* Writable user data segment must be briefly increased for this + * process so we can use the user space read call paths to write + * in to memory allocated by the kernel. */ + saved_fs = get_fs(); + set_fs(get_ds()); + + if (uio & UIO_WRITE) + rc = vfs_write(fp, addr, len, &offset); + else + rc = vfs_read(fp, addr, len, &offset); + + set_fs(saved_fs); + + if (rc < 0) + return rc; + + if (residp) { + *residp = len - rc; } else { - /* - * To simulate partial disk writes, we split writes into two - * system calls so that the process can be killed in between. - */ -#ifdef ZFS_DEBUG - if (!S_ISBLK(vp->v_mode) && !S_ISCHR(vp->v_mode)) { - split = (len > 0 ? rand() % len : 0); - iolen = pwrite64(vp->v_fd, addr, split, offset); - iolen += pwrite64(vp->v_fd, (char *)addr + split, - len - split, offset + split); - } else - iolen = pwrite64(vp->v_fd, addr, len, offset); -#else - iolen = pwrite64(vp->v_fd, addr, len, offset); -#endif + if (rc != len) + return -EIO; } - if (iolen < 0) - return (errno); - if (residp) - *residp = len - iolen; - else if (iolen != len) - return (EIO); - return (0); -} + return 0; +} /* vn_rdwr() */ +EXPORT_SYMBOL(vn_rdwr); -void -vn_close(vnode_t *vp) +int +vn_close(vnode_t *vp, int flags, int x1, int x2, int x3, int x4) { - close(vp->v_fd); - spa_strfree(vp->v_path); - umem_free(vp, sizeof (vnode_t)); + int rc; + + BUG_ON(!vp); + BUG_ON(!vp->v_fp); + + rc = filp_close(vp->v_fp, 0); + kfree(vp); + + return rc; +} /* vn_close() */ +EXPORT_SYMBOL(vn_close); + +static struct dentry *lookup_hash(struct nameidata *nd) +{ + return __lookup_hash(&nd->last, nd->dentry, nd); +} /* lookup_hash() */ + +/* Modified do_unlinkat() from linux/fs/namei.c, only uses exported symbols */ +int +vn_remove(const char *path, int x1, int x2) +{ + struct dentry *dentry; + struct nameidata nd; + struct inode *inode = NULL; + int rc = 0; + + rc = path_lookup(path, LOOKUP_PARENT, &nd); + if (rc) + goto exit; + + rc = -EISDIR; + if (nd.last_type != LAST_NORM) + goto exit1; + + mutex_lock_nested(&nd.dentry->d_inode->i_mutex, I_MUTEX_PARENT); + dentry = lookup_hash(&nd); + rc = PTR_ERR(dentry); + if (!IS_ERR(dentry)) { + /* Why not before? Because we want correct rc value */ + if (nd.last.name[nd.last.len]) + goto slashes; + inode = dentry->d_inode; + if (inode) + atomic_inc(&inode->i_count); + rc = vfs_unlink(nd.dentry->d_inode, dentry); +exit2: + dput(dentry); + } + mutex_unlock(&nd.dentry->d_inode->i_mutex); + if (inode) + iput(inode); /* truncate the inode here */ +exit1: + path_release(&nd); +exit: + return rc; + +slashes: + rc = !dentry->d_inode ? -ENOENT : + S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR; + goto exit2; +} /* vn_remove() */ +EXPORT_SYMBOL(vn_remove); + +/* Modified do_rename() from linux/fs/namei.c, only uses exported symbols */ +int +vn_rename(const char *oldname, const char *newname, int x1) +{ + struct dentry * old_dir, * new_dir; + struct dentry * old_dentry, *new_dentry; + struct dentry * trap; + struct nameidata oldnd, newnd; + int rc = 0; + + rc = path_lookup(oldname, LOOKUP_PARENT, &oldnd); + if (rc) + goto exit; + + rc = path_lookup(newname, LOOKUP_PARENT, &newnd); + if (rc) + goto exit1; + + rc = -EXDEV; + if (oldnd.mnt != newnd.mnt) + goto exit2; + + old_dir = oldnd.dentry; + rc = -EBUSY; + if (oldnd.last_type != LAST_NORM) + goto exit2; + + new_dir = newnd.dentry; + if (newnd.last_type != LAST_NORM) + goto exit2; + + trap = lock_rename(new_dir, old_dir); + + old_dentry = lookup_hash(&oldnd); + + rc = PTR_ERR(old_dentry); + if (IS_ERR(old_dentry)) + goto exit3; + + /* source must exist */ + rc = -ENOENT; + if (!old_dentry->d_inode) + goto exit4; + + /* unless the source is a directory trailing slashes give -ENOTDIR */ + if (!S_ISDIR(old_dentry->d_inode->i_mode)) { + rc = -ENOTDIR; + if (oldnd.last.name[oldnd.last.len]) + goto exit4; + if (newnd.last.name[newnd.last.len]) + goto exit4; + } + + /* source should not be ancestor of target */ + rc = -EINVAL; + if (old_dentry == trap) + goto exit4; + + new_dentry = lookup_hash(&newnd); + rc = PTR_ERR(new_dentry); + if (IS_ERR(new_dentry)) + goto exit4; + + /* target should not be an ancestor of source */ + rc = -ENOTEMPTY; + if (new_dentry == trap) + goto exit5; + + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry); +exit5: + dput(new_dentry); +exit4: + dput(old_dentry); +exit3: + unlock_rename(new_dir, old_dir); +exit2: + path_release(&newnd); +exit1: + path_release(&oldnd); +exit: + return rc; } -#endif +EXPORT_SYMBOL(vn_rename); + +int +vn_getattr(vnode_t *vp, vattr_t *vap, int flags, int x3, void *x4) +{ + struct file *fp; + struct kstat stat; + int rc; + + BUG_ON(!vp); + BUG_ON(!vp->v_fp); + BUG_ON(!vap); + + fp = vp->v_fp; + + rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); + if (rc) + return rc; + + vap->va_type = vn_get_sol_type(stat.mode); + vap->va_mode = stat.mode; + vap->va_uid = stat.uid; + vap->va_gid = stat.gid; + vap->va_fsid = 0; + vap->va_nodeid = stat.ino; + vap->va_nlink = stat.nlink; + vap->va_size = stat.size; + vap->va_blocksize = stat.blksize; + vap->va_atime.tv_sec = stat.atime.tv_sec; + vap->va_atime.tv_usec = stat.atime.tv_nsec / NSEC_PER_USEC; + vap->va_mtime.tv_sec = stat.mtime.tv_sec; + vap->va_mtime.tv_usec = stat.mtime.tv_nsec / NSEC_PER_USEC; + vap->va_ctime.tv_sec = stat.ctime.tv_sec; + vap->va_ctime.tv_usec = stat.ctime.tv_nsec / NSEC_PER_USEC; + vap->va_rdev = stat.rdev; + vap->va_blocks = stat.blocks; + + return rc; +} +EXPORT_SYMBOL(vn_getattr); + +int vn_fsync(vnode_t *vp, int flags, int x3, int x4) +{ + BUG_ON(!vp); + BUG_ON(!vp->v_fp); + + return file_fsync(vp->v_fp, vp->v_fp->f_dentry, 0); +} /* vn_fsync() */ +EXPORT_SYMBOL(vn_fsync); diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index 0c7526f19..69f38b1f5 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -21,6 +21,7 @@ splat-objs += splat-condvar.o splat-objs += splat-thread.o splat-objs += splat-rwlock.o splat-objs += splat-time.o +splat-objs += splat-vnode.o splat-objs += splat-kobj.o splatmodule := splat.ko diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index 693277c5c..e9026cd8d 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -591,6 +591,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(thread); SPLAT_SUBSYSTEM_INIT(rwlock); SPLAT_SUBSYSTEM_INIT(time); + SPLAT_SUBSYSTEM_INIT(vnode); SPLAT_SUBSYSTEM_INIT(kobj); dev = MKDEV(SPLAT_MAJOR, 0); @@ -654,6 +655,7 @@ splat_fini(void) unregister_chrdev_region(dev, SPLAT_MINORS); SPLAT_SUBSYSTEM_FINI(kobj); + SPLAT_SUBSYSTEM_FINI(vnode); SPLAT_SUBSYSTEM_FINI(time); SPLAT_SUBSYSTEM_FINI(rwlock); SPLAT_SUBSYSTEM_FINI(thread); diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index b8e803290..aca4b3d38 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -170,6 +170,7 @@ splat_subsystem_t * splat_rwlock_init(void); splat_subsystem_t * splat_taskq_init(void); splat_subsystem_t * splat_thread_init(void); splat_subsystem_t * splat_time_init(void); +splat_subsystem_t * splat_vnode_init(void); splat_subsystem_t * splat_kobj_init(void); void splat_condvar_fini(splat_subsystem_t *); @@ -180,6 +181,7 @@ void splat_rwlock_fini(splat_subsystem_t *); void splat_taskq_fini(splat_subsystem_t *); void splat_thread_fini(splat_subsystem_t *); void splat_time_fini(splat_subsystem_t *); +void splat_vnode_fini(splat_subsystem_t *); void splat_kobj_fini(splat_subsystem_t *); int splat_condvar_id(void); @@ -190,6 +192,7 @@ int splat_rwlock_id(void); int splat_taskq_id(void); int splat_thread_id(void); int splat_time_id(void); +int splat_vnode_id(void); int splat_kobj_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/modules/splat/splat-kobj.c b/modules/splat/splat-kobj.c index 91f591f46..c24057b0e 100644 --- a/modules/splat/splat-kobj.c +++ b/modules/splat/splat-kobj.c @@ -1,15 +1,15 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_KOBJ 0x0900 +#define SPLAT_SUBSYSTEM_KOBJ 0x0a00 #define SPLAT_KOBJ_NAME "kobj" #define SPLAT_KOBJ_DESC "Kernel File Tests" -#define SPLAT_KOBJ_TEST1_ID 0x0901 -#define SPLAT_KOBJ_TEST1_NAME "kobj1" +#define SPLAT_KOBJ_TEST1_ID 0x0a01 +#define SPLAT_KOBJ_TEST1_NAME "open" #define SPLAT_KOBJ_TEST1_DESC "File Open/Close Test" -#define SPLAT_KOBJ_TEST2_ID 0x0902 -#define SPLAT_KOBJ_TEST2_NAME "kobj2" +#define SPLAT_KOBJ_TEST2_ID 0x0a02 +#define SPLAT_KOBJ_TEST2_NAME "size/read" #define SPLAT_KOBJ_TEST2_DESC "File Size/Read Test" #define SPLAT_KOBJ_TEST_FILE "/etc/fstab" diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c new file mode 100644 index 000000000..188448db8 --- /dev/null +++ b/modules/splat/splat-vnode.c @@ -0,0 +1,372 @@ +#include "splat-internal.h" + +#define SPLAT_SUBSYSTEM_VNODE 0x0900 +#define SPLAT_VNODE_NAME "vnode" +#define SPLAT_VNODE_DESC "Kernel Vnode Tests" + +#define SPLAT_VNODE_TEST1_ID 0x0901 +#define SPLAT_VNODE_TEST1_NAME "vn_open" +#define SPLAT_VNODE_TEST1_DESC "Vn_open Test" + +#define SPLAT_VNODE_TEST2_ID 0x0902 +#define SPLAT_VNODE_TEST2_NAME "vn_openat" +#define SPLAT_VNODE_TEST2_DESC "Vn_openat Test" + +#define SPLAT_VNODE_TEST3_ID 0x0903 +#define SPLAT_VNODE_TEST3_NAME "vn_rdwr" +#define SPLAT_VNODE_TEST3_DESC "Vn_rdwrt Test" + +#define SPLAT_VNODE_TEST4_ID 0x0904 +#define SPLAT_VNODE_TEST4_NAME "vn_rename" +#define SPLAT_VNODE_TEST4_DESC "Vn_rename Test" + +#define SPLAT_VNODE_TEST5_ID 0x0905 +#define SPLAT_VNODE_TEST5_NAME "vn_getattr" +#define SPLAT_VNODE_TEST5_DESC "Vn_getattr Test" + +#define SPLAT_VNODE_TEST6_ID 0x0906 +#define SPLAT_VNODE_TEST6_NAME "vn_sync" +#define SPLAT_VNODE_TEST6_DESC "Vn_sync Test" + +#define SPLAT_VNODE_TEST_FILE "/etc/fstab" +#define SPLAT_VNODE_TEST_FILE_AT "etc/fstab" +#define SPLAT_VNODE_TEST_FILE_RW "/tmp/spl.vnode.tmp" +#define SPLAT_VNODE_TEST_FILE_RW1 "/tmp/spl.vnode.tmp.1" +#define SPLAT_VNODE_TEST_FILE_RW2 "/tmp/spl.vnode.tmp.2" + +static int +splat_vnode_test1(struct file *file, void *arg) +{ + vnode_t *vp; + int rc; + + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE, UIO_SYSSPACE, + FREAD, 0644, &vp, 0, 0))) { + splat_vprint(file, SPLAT_VNODE_TEST1_NAME, + "Failed to vn_open test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE, rc); + return rc; + } + + rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); + VN_RELE(vp); + + if (rc) { + splat_vprint(file, SPLAT_VNODE_TEST1_NAME, + "Failed to vn_close test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE, rc); + return rc; + } + + splat_vprint(file, SPLAT_VNODE_TEST1_NAME, "Successfully vn_open'ed " + "and vn_closed test file: %s\n", SPLAT_VNODE_TEST_FILE); + + return rc; +} /* splat_vnode_test1() */ + +static int +splat_vnode_test2(struct file *file, void *arg) +{ + vnode_t *vp; + int rc; + + if ((rc = vn_openat(SPLAT_VNODE_TEST_FILE_AT, UIO_SYSSPACE, + FREAD, 0644, &vp, 0, 0, rootdir, 0))) { + splat_vprint(file, SPLAT_VNODE_TEST2_NAME, + "Failed to vn_openat test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE, rc); + return rc; + } + + rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); + VN_RELE(vp); + + if (rc) { + splat_vprint(file, SPLAT_VNODE_TEST2_NAME, + "Failed to vn_close test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE, rc); + return rc; + } + + splat_vprint(file, SPLAT_VNODE_TEST2_NAME, "Successfully vn_openat'ed " + "and vn_closed test file: %s\n", SPLAT_VNODE_TEST_FILE); + + return rc; +} /* splat_vnode_test2() */ + +static int +splat_vnode_test3(struct file *file, void *arg) +{ + vnode_t *vp; + char buf1[32] = "SPL VNode Interface Test File\n"; + char buf2[32] = ""; + int rc; + + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, + FWRITE | FREAD | FCREAT | FEXCL, + 0644, &vp, 0, 0))) { + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, + "Failed to vn_open test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + return rc; + } + + rc = vn_rdwr(UIO_WRITE, vp, buf1, strlen(buf1), 0, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + if (rc < 0) { + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, + "Failed vn_rdwr write of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + goto out; + } + + rc = vn_rdwr(UIO_READ, vp, buf2, strlen(buf1), 0, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + if (rc < 0) { + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, + "Failed vn_rdwr read of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + goto out; + } + + if (strncmp(buf1, buf2, strlen(buf1))) { + rc = EINVAL; + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, + "Failed strncmp data written does not match " + "data read\nWrote: %sRead: %s\n", buf1, buf2); + goto out; + } + + rc = 0; + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Wrote: %s", buf1); + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Read: %s", buf2); + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Successfully wrote and " + "read expected data pattern to test file: %s\n", + SPLAT_VNODE_TEST_FILE_RW); + +out: + VOP_CLOSE(vp, 0, 0, 0, 0, 0); + VN_RELE(vp); + vn_remove(SPLAT_VNODE_TEST_FILE_RW, 0, 0); + + return rc; +} /* splat_vnode_test3() */ + +static int +splat_vnode_test4(struct file *file, void *arg) +{ + vnode_t *vp; + char buf1[32] = "SPL VNode Interface Test File\n"; + char buf2[32] = ""; + int rc; + + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, + FWRITE | FREAD | FCREAT | FEXCL, 0644, &vp, 0, 0))) { + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, + "Failed to vn_open test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW1, rc); + goto out; + } + + rc = vn_rdwr(UIO_WRITE, vp, buf1, strlen(buf1), 0, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + if (rc < 0) { + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, + "Failed vn_rdwr write of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW1, rc); + goto out2; + } + + VOP_CLOSE(vp, 0, 0, 0, 0, 0); + VN_RELE(vp); + + rc = vn_rename(SPLAT_VNODE_TEST_FILE_RW1,SPLAT_VNODE_TEST_FILE_RW2,0); + if (rc) { + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Failed vn_rename " + "%s -> %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW1, + SPLAT_VNODE_TEST_FILE_RW2, rc); + goto out; + } + + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE, + FREAD | FEXCL, 0644, &vp, 0, 0))) { + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, + "Failed to vn_open test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW2, rc); + goto out; + } + + rc = vn_rdwr(UIO_READ, vp, buf2, strlen(buf1), 0, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + if (rc < 0) { + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, + "Failed vn_rdwr read of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW2, rc); + goto out2; + } + + if (strncmp(buf1, buf2, strlen(buf1))) { + rc = EINVAL; + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, + "Failed strncmp data written does not match " + "data read\nWrote: %sRead: %s\n", buf1, buf2); + goto out2; + } + + rc = 0; + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Wrote to %s: %s", + SPLAT_VNODE_TEST_FILE_RW1, buf1); + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Read from %s: %s", + SPLAT_VNODE_TEST_FILE_RW2, buf2); + splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Successfully renamed " + "test file %s -> %s and verified data pattern\n", + SPLAT_VNODE_TEST_FILE_RW1, SPLAT_VNODE_TEST_FILE_RW2); +out2: + VOP_CLOSE(vp, 0, 0, 0, 0, 0); + VN_RELE(vp); +out: + vn_remove(SPLAT_VNODE_TEST_FILE_RW1, 0, 0); + vn_remove(SPLAT_VNODE_TEST_FILE_RW2, 0, 0); + + return rc; +} /* splat_vnode_test4() */ + +static int +splat_vnode_test5(struct file *file, void *arg) +{ + vnode_t *vp; + vattr_t vap; + int rc; + + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE, UIO_SYSSPACE, + FREAD, 0644, &vp, 0, 0))) { + splat_vprint(file, SPLAT_VNODE_TEST5_NAME, + "Failed to vn_open test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE, rc); + return rc; + } + + rc = VOP_GETATTR(vp, &vap, 0, 0, NULL); + if (rc) { + splat_vprint(file, SPLAT_VNODE_TEST5_NAME, + "Failed to vn_getattr test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE, rc); + goto out; + } + + if (vap.va_type != VREG) { + rc = -EINVAL; + splat_vprint(file, SPLAT_VNODE_TEST5_NAME, + "Failed expected regular file type " + "(%d != VREG): %s (%d)\n", vap.va_type, + SPLAT_VNODE_TEST_FILE, rc); + goto out; + } + + splat_vprint(file, SPLAT_VNODE_TEST1_NAME, "Successfully " + "vn_getattr'ed test file: %s\n", SPLAT_VNODE_TEST_FILE); + +out: + VOP_CLOSE(vp, 0, 0, 0, 0, 0); + VN_RELE(vp); + + return rc; +} /* splat_vnode_test5() */ + +static int +splat_vnode_test6(struct file *file, void *arg) +{ + vnode_t *vp; + char buf[32] = "SPL VNode Interface Test File\n"; + int rc; + + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, + FWRITE | FREAD | FCREAT | FEXCL, 0644, &vp, 0, 0))) { + splat_vprint(file, SPLAT_VNODE_TEST6_NAME, + "Failed to vn_open test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + return rc; + } + + rc = vn_rdwr(UIO_WRITE, vp, buf, strlen(buf), 0, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + if (rc < 0) { + splat_vprint(file, SPLAT_VNODE_TEST6_NAME, + "Failed vn_rdwr write of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + goto out; + } + + rc = vn_fsync(vp, 0, 0, 0); + if (rc) { + splat_vprint(file, SPLAT_VNODE_TEST6_NAME, + "Failed vn_fsync of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + goto out; + } + + rc = 0; + splat_vprint(file, SPLAT_VNODE_TEST6_NAME, "Successfully " + "fsync'ed test file %s\n", SPLAT_VNODE_TEST_FILE_RW); +out: + VOP_CLOSE(vp, 0, 0, 0, 0, 0); + VN_RELE(vp); + vn_remove(SPLAT_VNODE_TEST_FILE_RW, 0, 0); + + return rc; +} /* splat_vnode_test4() */ + +splat_subsystem_t * +splat_vnode_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_VNODE_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_VNODE_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_VNODE; + + SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST1_NAME, SPLAT_VNODE_TEST1_DESC, + SPLAT_VNODE_TEST1_ID, splat_vnode_test1); + SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST2_NAME, SPLAT_VNODE_TEST2_DESC, + SPLAT_VNODE_TEST2_ID, splat_vnode_test2); + SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST3_NAME, SPLAT_VNODE_TEST3_DESC, + SPLAT_VNODE_TEST3_ID, splat_vnode_test3); + SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST4_NAME, SPLAT_VNODE_TEST4_DESC, + SPLAT_VNODE_TEST4_ID, splat_vnode_test4); + SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST5_NAME, SPLAT_VNODE_TEST5_DESC, + SPLAT_VNODE_TEST5_ID, splat_vnode_test5); + SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, + SPLAT_VNODE_TEST6_ID, splat_vnode_test6); + + return sub; +} /* splat_vnode_init() */ + +void +splat_vnode_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + + SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST6_ID); + SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST5_ID); + SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST1_ID); + + kfree(sub); +} /* splat_vnode_fini() */ + +int +splat_vnode_id(void) +{ + return SPLAT_SUBSYSTEM_VNODE; +} /* splat_vnode_id() */ diff --git a/scripts/check.sh b/scripts/check.sh index 5d7123684..3b8b75801 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -19,6 +19,12 @@ if [ -n "$V" ]; then verbose="-v" fi +if [ -n "$TESTS" ]; then + tests="$TESTS" +else + tests="-a" +fi + if [ $(id -u) != 0 ]; then die "Must run as root" fi @@ -37,8 +43,8 @@ echo "Loading ${spl_module}" echo "Loading ${splat_module}" /sbin/insmod ${splat_module} || die "Unable to load ${splat_module}" -sleep 3 -$splat_cmd -a $verbose +while [ ! -c /dev/splatctl ]; do sleep 0.1; done +$splat_cmd $tests $verbose echo "Unloading ${splat_module}" /sbin/rmmod ${splat_module} || die "Failed to unload ${splat_module}" From 2f5d55aac5bfe0931a92f222ebc68c1546b227d9 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 12 Mar 2008 21:33:28 +0000 Subject: [PATCH 0040/1062] Add copyin/copyout mapping Fix some vnode types git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@40 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/sysmacros.h | 3 +++ include/sys/vmsystm.h | 3 +++ include/sys/vnode.h | 9 +++++---- modules/spl/spl-generic.c | 12 ++++++++++++ modules/spl/spl-vnode.c | 9 ++++++--- modules/splat/splat-vnode.c | 8 ++++---- 6 files changed, 33 insertions(+), 11 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 076f26784..e0a3eec0c 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -113,9 +113,12 @@ extern "C" { /* Missing globals */ extern int p0; +extern char hw_serial[11]; /* Missing misc functions */ extern int highbit(unsigned long i); +extern int ddi_strtoul(const char *hw_serial, char **nptr, + int base, unsigned long *result); #define makedevice(maj,min) makedev(maj,min) #define zone_dataset_visible(x, y) (1) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index e66872f0c..bb23da965 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -7,6 +7,9 @@ #define ptob(pages) (pages * PAGE_SIZE) #define membar_producer() smp_wmb() +#define copyin(from, to, size) copy_from_user(to, from, size) +#define copyout(from, to, size) copy_to_user(to, from, size) + #if 0 /* The approximate total number of free pages */ #define freemem 0 diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 7583d04d4..0e5e40174 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -49,7 +49,8 @@ #define AT_SEQ 0x08000 #define AT_XVATTR 0x10000 -#define CRCREAT 0 +#define CRCREAT 0x01 +#define RMFILE 0x02 typedef enum vtype { VNON = 0, @@ -132,11 +133,11 @@ extern int vn_openat(const char *path, int seg, int flags, int mode, extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, int seg, int x1, rlim64_t x2, void *x3, ssize_t *residp); -extern int vn_close(vnode_t *vp, int flags, int x1, int x2, int x3, int x4); -extern int vn_remove(const char *path, int x1, int x2); +extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4); +extern int vn_remove(const char *path, int seg, int flags); extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, int x3, void *x4); -extern int vn_fsync(vnode_t *vp, int flags, int x3, int x4); +extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); #define VOP_CLOSE vn_close #define VN_RELE(vp) diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 1f982f8bd..52d06b827 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -8,6 +8,9 @@ int p0 = 0; EXPORT_SYMBOL(p0); +char hw_serial[11]; +EXPORT_SYMBOL(hw_serial); + int highbit(unsigned long i) { @@ -39,8 +42,17 @@ highbit(unsigned long i) } EXPORT_SYMBOL(highbit); +int +ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) +{ + char *end; + return (*result = simple_strtoul(str, &end, base)); +} +EXPORT_SYMBOL(ddi_strtoul); + static int __init spl_init(void) { + strcpy(hw_serial, "007f0100"); /* loopback */ printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); return 0; } diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 9024909b8..a1f6a680e 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -159,7 +159,7 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, EXPORT_SYMBOL(vn_rdwr); int -vn_close(vnode_t *vp, int flags, int x1, int x2, int x3, int x4) +vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) { int rc; @@ -180,13 +180,16 @@ static struct dentry *lookup_hash(struct nameidata *nd) /* Modified do_unlinkat() from linux/fs/namei.c, only uses exported symbols */ int -vn_remove(const char *path, int x1, int x2) +vn_remove(const char *path, int seg, int flags) { struct dentry *dentry; struct nameidata nd; struct inode *inode = NULL; int rc = 0; + BUG_ON(seg != UIO_SYSSPACE); + BUG_ON(flags != RMFILE); + rc = path_lookup(path, LOOKUP_PARENT, &nd); if (rc) goto exit; @@ -348,7 +351,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, int x3, void *x4) } EXPORT_SYMBOL(vn_getattr); -int vn_fsync(vnode_t *vp, int flags, int x3, int x4) +int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) { BUG_ON(!vp); BUG_ON(!vp->v_fp); diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index 188448db8..402872d6b 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -147,7 +147,7 @@ splat_vnode_test3(struct file *file, void *arg) out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); VN_RELE(vp); - vn_remove(SPLAT_VNODE_TEST_FILE_RW, 0, 0); + vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); return rc; } /* splat_vnode_test3() */ @@ -226,8 +226,8 @@ out2: VOP_CLOSE(vp, 0, 0, 0, 0, 0); VN_RELE(vp); out: - vn_remove(SPLAT_VNODE_TEST_FILE_RW1, 0, 0); - vn_remove(SPLAT_VNODE_TEST_FILE_RW2, 0, 0); + vn_remove(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, RMFILE); + vn_remove(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE, RMFILE); return rc; } /* splat_vnode_test4() */ @@ -312,7 +312,7 @@ splat_vnode_test6(struct file *file, void *arg) out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); VN_RELE(vp); - vn_remove(SPLAT_VNODE_TEST_FILE_RW, 0, 0); + vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); return rc; } /* splat_vnode_test4() */ From 36e6f86146432207789a0e2027edf8d52326bad7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 12 Mar 2008 23:48:28 +0000 Subject: [PATCH 0041/1062] - Add some more missing headers - Map the LE/BE_* byteorder macros to the linux versions - More minor vnodes fixes git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@41 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/byteorder.h | 15 +- include/sys/fm/protocol.h | 4 + include/sys/fm/util.h | 4 + include/sys/sysevent.h | 4 + include/sys/sysevent/eventdefs.h | 231 ------------------------------- include/sys/sysmacros.h | 3 +- include/sys/vnode.h | 26 +++- include/sys/zone.h | 9 ++ modules/spl/spl-vnode.c | 9 +- 9 files changed, 62 insertions(+), 243 deletions(-) create mode 100644 include/sys/fm/protocol.h create mode 100644 include/sys/fm/util.h create mode 100644 include/sys/sysevent.h create mode 100644 include/sys/zone.h diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h index 3b626163d..7e7d04809 100644 --- a/include/sys/byteorder.h +++ b/include/sys/byteorder.h @@ -1,4 +1,13 @@ -#ifndef _SPL_ZMOD_H -#define _SPL_ZMOD_H +#ifndef _SPL_BYTEORDER_H +#define _SPL_BYTEORDER_H -#endif /* SPL_ZMOD_H */ +#include + +#define LE_16(x) cpu_to_le16(x) +#define LE_32(x) cpu_to_le32(x) +#define LE_64(x) cpu_to_le64(x) +#define BE_16(x) cpu_to_be16(x) +#define BE_32(x) cpu_to_be32(x) +#define BE_64(x) cpu_to_be64(x) + +#endif /* SPL_BYTEORDER_H */ diff --git a/include/sys/fm/protocol.h b/include/sys/fm/protocol.h new file mode 100644 index 000000000..ffd8108ba --- /dev/null +++ b/include/sys/fm/protocol.h @@ -0,0 +1,4 @@ +#ifndef _SPL_FM_PROTOCOL_H +#define _SPL_FM_PROTOCOL_H + +#endif /* _SPL_FM_PROTOCOL_H */ diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h new file mode 100644 index 000000000..6c3412f5b --- /dev/null +++ b/include/sys/fm/util.h @@ -0,0 +1,4 @@ +#ifndef _SPL_FM_UTIL_H +#define _SPL_FM_UTIL_H + +#endif /* _SPL_FM_UTIL_H */ diff --git a/include/sys/sysevent.h b/include/sys/sysevent.h new file mode 100644 index 000000000..45c960846 --- /dev/null +++ b/include/sys/sysevent.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SYSEVENT_H +#define _SPL_SYSEVENT_H + +#endif /* _SPL_SYSEVENT_H */ diff --git a/include/sys/sysevent/eventdefs.h b/include/sys/sysevent/eventdefs.h index 1cc58d57c..d7b28f62b 100644 --- a/include/sys/sysevent/eventdefs.h +++ b/include/sys/sysevent/eventdefs.h @@ -1,235 +1,4 @@ -/* - * 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 - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - #ifndef _SPL_SYSEVENT_EVENTDEFS_H #define _SPL_SYSEVENT_EVENTDEFS_H - - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * eventdefs.h contains public definitions for sysevent types (classes - * and subclasses). All additions/removal/changes are subject - * to PSARC approval. - */ - -/* Sysevent Class definitions */ -#define EC_NONE "EC_none" -#define EC_PRIV "EC_priv" -#define EC_PLATFORM "EC_platform" /* events private to platform */ -#define EC_DR "EC_dr" /* Dynamic reconfiguration event class */ -#define EC_ENV "EC_env" /* Environmental monitor event class */ -#define EC_DOMAIN "EC_domain" /* Domain event class */ -#define EC_AP_DRIVER "EC_ap_driver" /* Alternate Pathing event class */ -#define EC_IPMP "EC_ipmp" /* IP Multipathing event class */ -#define EC_DEV_ADD "EC_dev_add" /* device add event class */ -#define EC_DEV_REMOVE "EC_dev_remove" /* device remove event class */ -#define EC_DEV_BRANCH "EC_dev_branch" /* device tree branch event class */ -#define EC_FM "EC_fm" /* FMA error report event */ -#define EC_ZFS "EC_zfs" /* ZFS event */ - -/* - * The following event class is reserved for exclusive use - * by Sun Cluster software. - */ -#define EC_CLUSTER "EC_Cluster" - -/* - * The following classes are exclusively reserved for use by the - * Solaris Volume Manager (SVM) - */ -#define EC_SVM_CONFIG "EC_SVM_Config" -#define EC_SVM_STATE "EC_SVM_State" - -/* - * EC_SVM_CONFIG subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/svm.h - */ -#define ESC_SVM_CREATE "ESC_SVM_Create" -#define ESC_SVM_DELETE "ESC_SVM_Delete" -#define ESC_SVM_ADD "ESC_SVM_Add" -#define ESC_SVM_REMOVE "ESC_SVM_Remove" -#define ESC_SVM_REPLACE "ESC_SVM_Replace" -#define ESC_SVM_GROW "ESC_SVM_Grow" -#define ESC_SVM_RENAME_SRC "ESC_SVM_Rename_Src" -#define ESC_SVM_RENAME_DST "ESC_SVM_Rename_Dst" -#define ESC_SVM_MEDIATOR_ADD "ESC_SVM_Mediator_Add" -#define ESC_SVM_MEDIATOR_DELETE "ESC_SVM_Mediator_Delete" -#define ESC_SVM_HOST_ADD "ESC_SVM_Host_Add" -#define ESC_SVM_HOST_DELETE "ESC_SVM_Host_Delete" -#define ESC_SVM_DRIVE_ADD "ESC_SVM_Drive_Add" -#define ESC_SVM_DRIVE_DELETE "ESC_SVM_Drive_Delete" -#define ESC_SVM_DETACH "ESC_SVM_Detach" -#define ESC_SVM_DETACHING "ESC_SVM_Detaching" -#define ESC_SVM_ATTACH "ESC_SVM_Attach" -#define ESC_SVM_ATTACHING "ESC_SVM_Attaching" - -/* - * EC_SVM_STATE subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/svm.h - */ -#define ESC_SVM_INIT_START "ESC_SVM_Init_Start" -#define ESC_SVM_INIT_FAILED "ESC_SVM_Init_Failed" -#define ESC_SVM_INIT_FATAL "ESC_SVM_Init_Fatal" -#define ESC_SVM_INIT_SUCCESS "ESC_SVM_Init_Success" -#define ESC_SVM_IOERR "ESC_SVM_Ioerr" -#define ESC_SVM_ERRED "ESC_SVM_Erred" -#define ESC_SVM_LASTERRED "ESC_SVM_Lasterred" -#define ESC_SVM_OK "ESC_SVM_Ok" -#define ESC_SVM_ENABLE "ESC_SVM_Enable" -#define ESC_SVM_RESYNC_START "ESC_SVM_Resync_Start" -#define ESC_SVM_RESYNC_FAILED "ESC_SVM_Resync_Failed" -#define ESC_SVM_RESYNC_SUCCESS "ESC_SVM_Resync_Success" -#define ESC_SVM_RESYNC_DONE "ESC_SVM_Resync_Done" -#define ESC_SVM_HOTSPARED "ESC_SVM_Hotspared" -#define ESC_SVM_HS_FREED "ESC_SVM_HS_Freed" -#define ESC_SVM_HS_CHANGED "ESC_SVM_HS_Changed" -#define ESC_SVM_TAKEOVER "ESC_SVM_Takeover" -#define ESC_SVM_RELEASE "ESC_SVM_Release" -#define ESC_SVM_OPEN_FAIL "ESC_SVM_Open_Fail" -#define ESC_SVM_OFFLINE "ESC_SVM_Offline" -#define ESC_SVM_ONLINE "ESC_SVM_Online" -#define ESC_SVM_CHANGE "ESC_SVM_Change" -#define ESC_SVM_EXCHANGE "ESC_SVM_Exchange" -#define ESC_SVM_REGEN_START "ESC_SVM_Regen_Start" -#define ESC_SVM_REGEN_DONE "ESC_SVM_Regen_Done" -#define ESC_SVM_REGEN_FAILED "ESC_SVM_Regen_Failed" - -/* - * EC_DR subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/dr.h - */ - -/* Attachment point state change */ -#define ESC_DR_AP_STATE_CHANGE "ESC_dr_ap_state_change" -#define ESC_DR_REQ "ESC_dr_req" /* Request DR */ -#define ESC_DR_TARGET_STATE_CHANGE "ESC_dr_target_state_change" - -/* - * EC_ENV subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/env.h - */ -#define ESC_ENV_TEMP "ESC_env_temp" /* Temperature change event subclass */ -#define ESC_ENV_FAN "ESC_env_fan" /* Fan status change event subclass */ -#define ESC_ENV_POWER "ESC_env_power" /* Power supply change event subclass */ -#define ESC_ENV_LED "ESC_env_led" /* LED change event subclass */ - -/* - * EC_DOMAIN subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/domain.h - */ - -/* Domain state change */ -#define ESC_DOMAIN_STATE_CHANGE "ESC_domain_state_change" -/* Domain loghost name change */ -#define ESC_DOMAIN_LOGHOST_CHANGE "ESC_domain_loghost_change" - -/* - * EC_AP_DRIVER subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/ap_driver.h - */ - -/* Alternate Pathing path switch */ -#define ESC_AP_DRIVER_PATHSWITCH "ESC_ap_driver_pathswitch" -/* Alternate Pathing database commit */ -#define ESC_AP_DRIVER_COMMIT "ESC_ap_driver_commit" -/* Alternate Pathing physical path status change */ -#define ESC_AP_DRIVER_PHYS_PATH_STATUS_CHANGE \ - "ESC_ap_driver_phys_path_status_change" - -/* - * EC_IPMP subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/ipmp.h - */ - -/* IPMP group has changed state */ -#define ESC_IPMP_GROUP_STATE "ESC_ipmp_group_state" - -/* IPMP group has been created or removed */ -#define ESC_IPMP_GROUP_CHANGE "ESC_ipmp_group_change" - -/* IPMP group has had an interface added or removed */ -#define ESC_IPMP_GROUP_MEMBER_CHANGE "ESC_ipmp_group_member_change" - -/* Interface within an IPMP group has changed state or type */ -#define ESC_IPMP_IF_CHANGE "ESC_ipmp_if_change" - - -/* - * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes - * (name/value pairs) are found in sys/sysevent/dev.h - */ -#define ESC_DISK "disk" /* disk device */ -#define ESC_NETWORK "network" /* network interface */ -#define ESC_PRINTER "printer" /* printer device */ -#define ESC_LOFI "lofi" /* lofi device */ - -/* - * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/dev.h - */ - -/* device tree branch added */ -#define ESC_DEV_BRANCH_ADD "ESC_dev_branch_add" - -/* device tree branch removed */ -#define ESC_DEV_BRANCH_REMOVE "ESC_dev_branch_remove" - -/* FMA Fault and Error event protocol subclass */ -#define ESC_FM_ERROR "ESC_FM_error" -#define ESC_FM_ERROR_REPLAY "ESC_FM_error_replay" - -/* Service processor subclass definitions */ -#define ESC_PLATFORM_SP_RESET "ESC_platform_sp_reset" - -/* - * EC_ACPIEV subclass definitions - */ -#define EC_ACPIEV "EC_acpiev" -#define ESC_ACPIEV_ADD "ESC_acpiev_add" -#define ESC_ACPIEV_REMOVE "ESC_acpiev_remove" -#define ESC_ACPIEV_WARN "ESC_acpiev_warn" -#define ESC_ACPIEV_LOW "ESC_acpiev_low" -#define ESC_ACPIEV_STATE_CHANGE "ESC_acpiev_state_change" - -/* - * ZFS subclass definitions. supporting attributes (name/value paris) are found - * in sys/fs/zfs.h - */ -#define ESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start" -#define ESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish" -#define ESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove" -#define ESC_ZFS_POOL_DESTROY "ESC_ZFS_pool_destroy" -#define ESC_ZFS_VDEV_CLEAR "ESC_ZFS_vdev_clear" -#define ESC_ZFS_VDEV_CHECK "ESC_ZFS_vdev_check" - -#ifdef __cplusplus -} -#endif - #endif /* _SPL_SYSEVENT_EVENTDEFS_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index e0a3eec0c..eeaedf9cb 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -7,6 +7,7 @@ extern "C" { #include #include +#include #ifndef _KERNEL #define _KERNEL __KERNEL__ @@ -121,8 +122,6 @@ extern int ddi_strtoul(const char *hw_serial, char **nptr, int base, unsigned long *result); #define makedevice(maj,min) makedev(maj,min) -#define zone_dataset_visible(x, y) (1) -#define INGLOBALZONE(z) (1) /* common macros */ #ifndef MIN diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 0e5e40174..af678eccc 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -16,6 +16,8 @@ #define XVA_MAPSIZE 3 #define XVA_MAGIC 0x78766174 +#define O_DSYNC 040000000 + #define FREAD 1 #define FWRITE 2 #define FCREAT O_CREAT @@ -52,6 +54,9 @@ #define CRCREAT 0x01 #define RMFILE 0x02 +#define B_INVAL 0x01 +#define B_TRUNC 0x02 + typedef enum vtype { VNON = 0, VREG = 1, @@ -74,6 +79,7 @@ typedef struct vnode { typedef struct vattr { enum vtype va_type; /* vnode type */ + u_int va_mask; /* attribute bit-mask */ u_short va_mode; /* acc mode */ short va_uid; /* owner uid */ short va_gid; /* owner gid */ @@ -89,7 +95,6 @@ typedef struct vattr { long va_blocks; /* space used */ } vattr_t; -#if 0 typedef struct xoptattr { timestruc_t xoa_createtime; /* Create time of file */ uint8_t xoa_archive; @@ -124,7 +129,6 @@ typedef struct vsecattr { void *vsa_dfaclentp; /* pointer to default ACL entries */ size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ } vsecattr_t; -#endif extern int vn_open(const char *path, int seg, int flags, int mode, vnode_t **vpp, int x1, void *x2); @@ -136,14 +140,26 @@ extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4); extern int vn_remove(const char *path, int seg, int flags); extern int vn_rename(const char *path1, const char *path2, int x1); -extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, int x3, void *x4); +extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); +static __inline__ int +vn_rele(vnode_t *vp) +{ + return 0; +} /* vn_rele() */ + +static __inline__ int +vn_putpage(vnode_t *vp, offset_t off, ssize_t size, + int flags, void *x1, void *x2) { + return 0; +} /* vn_putpage() */ + #define VOP_CLOSE vn_close -#define VN_RELE(vp) +#define VN_RELE vn_rele #define VOP_GETATTR vn_getattr #define VOP_FSYNC vn_fsync -#define VOP_PUTPAGE(vp, of, sz, fl, cr, ct) +#define VOP_PUTPAGE vn_putpage #define vn_is_readonly(vp) 0 extern void *rootdir; diff --git a/include/sys/zone.h b/include/sys/zone.h new file mode 100644 index 000000000..d3dd73794 --- /dev/null +++ b/include/sys/zone.h @@ -0,0 +1,9 @@ +#ifndef _SPL_ZONE_H +#define _SPL_ZONE_H + +#include + +#define zone_dataset_visible(x, y) (1) +#define INGLOBALZONE(z) (1) + +#endif /* SPL_ZONE_H */ diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index a1f6a680e..0ec53e73e 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -313,7 +313,7 @@ exit: EXPORT_SYMBOL(vn_rename); int -vn_getattr(vnode_t *vp, vattr_t *vap, int flags, int x3, void *x4) +vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) { struct file *fp; struct kstat stat; @@ -353,9 +353,14 @@ EXPORT_SYMBOL(vn_getattr); int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) { + int datasync = 0; + BUG_ON(!vp); BUG_ON(!vp->v_fp); - return file_fsync(vp->v_fp, vp->v_fp->f_dentry, 0); + if (flags & FDSYNC) + datasync = 1; + + return file_fsync(vp->v_fp, vp->v_fp->f_dentry, datasync); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); From 73e540a0d1cc4fa686de9bd14875cb218d6a9bb1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 13 Mar 2008 19:49:09 +0000 Subject: [PATCH 0042/1062] Drop unicode support, provided in ZFS tree libport Update uio support git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@42 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/ddi.h | 4 + include/sys/kobj.h | 2 + include/sys/types.h | 2 + include/sys/u8_textprep.h | 119 - include/sys/u8_textprep_data.h | 35382 ------------------------------- include/sys/uio.h | 37 +- include/sys/vnode.h | 8 +- 7 files changed, 48 insertions(+), 35506 deletions(-) create mode 100644 include/sys/ddi.h delete mode 100644 include/sys/u8_textprep.h delete mode 100644 include/sys/u8_textprep_data.h diff --git a/include/sys/ddi.h b/include/sys/ddi.h new file mode 100644 index 000000000..186aa5ed2 --- /dev/null +++ b/include/sys/ddi.h @@ -0,0 +1,4 @@ +#ifndef _SPL_DDI_H +#define _SPL_DDI_H + +#endif /* SPL_DDI_H */ diff --git a/include/sys/kobj.h b/include/sys/kobj.h index 82da951e1..2715b4492 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -11,6 +11,8 @@ typedef struct _buf { vnode_t *vp; } _buf_t; +typedef struct _buf buf_t; + extern struct _buf *kobj_open_file(const char *name); extern void kobj_close_file(struct _buf *file); extern int kobj_read_file(struct _buf *file, char *buf, diff --git a/include/sys/types.h b/include/sys/types.h index 87c6a3035..53ba29687 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -28,5 +28,7 @@ typedef unsigned short ushort_t; typedef u_longlong_t len_t; typedef longlong_t diskaddr_t; typedef ushort_t o_mode_t; +typedef uint_t major_t; +typedef uint_t minor_t; #endif /* _SPL_TYPES_H */ diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h deleted file mode 100644 index 37e4e378c..000000000 --- a/include/sys/u8_textprep.h +++ /dev/null @@ -1,119 +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 - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -//#include "dmu_config.h" - -#ifdef HAVE_UNICODE -#include_next -#else - -#ifndef _SYS_U8_TEXTPREP_H -#define _SYS_U8_TEXTPREP_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Unicode encoding conversion functions and their macros. - */ -#define UCONV_IN_BIG_ENDIAN 0x0001 -#define UCONV_OUT_BIG_ENDIAN 0x0002 -#define UCONV_IN_SYSTEM_ENDIAN 0x0004 -#define UCONV_OUT_SYSTEM_ENDIAN 0x0008 -#define UCONV_IN_LITTLE_ENDIAN 0x0010 -#define UCONV_OUT_LITTLE_ENDIAN 0x0020 -#define UCONV_IGNORE_NULL 0x0040 -#define UCONV_IN_ACCEPT_BOM 0x0080 -#define UCONV_OUT_EMIT_BOM 0x0100 - -extern int uconv_u16tou32(const uint16_t *, size_t *, uint32_t *, size_t *, - int); -extern int uconv_u16tou8(const uint16_t *, size_t *, uchar_t *, size_t *, int); -extern int uconv_u32tou16(const uint32_t *, size_t *, uint16_t *, size_t *, - int); -extern int uconv_u32tou8(const uint32_t *, size_t *, uchar_t *, size_t *, int); -extern int uconv_u8tou16(const uchar_t *, size_t *, uint16_t *, size_t *, int); -extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int); - -/* - * UTF-8 text preparation functions and their macros. - * - * Among the macros defined, U8_CANON_DECOMP, U8_COMPAT_DECOMP, and - * U8_CANON_COMP are not public interfaces and must not be used directly - * at the flag input argument. - */ -#define U8_STRCMP_CS (0x00000001) -#define U8_STRCMP_CI_UPPER (0x00000002) -#define U8_STRCMP_CI_LOWER (0x00000004) - -#define U8_CANON_DECOMP (0x00000010) -#define U8_COMPAT_DECOMP (0x00000020) -#define U8_CANON_COMP (0x00000040) - -#define U8_STRCMP_NFD (U8_CANON_DECOMP) -#define U8_STRCMP_NFC (U8_CANON_DECOMP | U8_CANON_COMP) -#define U8_STRCMP_NFKD (U8_COMPAT_DECOMP) -#define U8_STRCMP_NFKC (U8_COMPAT_DECOMP | U8_CANON_COMP) - -#define U8_TEXTPREP_TOUPPER (U8_STRCMP_CI_UPPER) -#define U8_TEXTPREP_TOLOWER (U8_STRCMP_CI_LOWER) - -#define U8_TEXTPREP_NFD (U8_STRCMP_NFD) -#define U8_TEXTPREP_NFC (U8_STRCMP_NFC) -#define U8_TEXTPREP_NFKD (U8_STRCMP_NFKD) -#define U8_TEXTPREP_NFKC (U8_STRCMP_NFKC) - -#define U8_TEXTPREP_IGNORE_NULL (0x00010000) -#define U8_TEXTPREP_IGNORE_INVALID (0x00020000) -#define U8_TEXTPREP_NOWAIT (0x00040000) - -#define U8_UNICODE_320 (0) -#define U8_UNICODE_500 (1) -#define U8_UNICODE_LATEST (U8_UNICODE_500) - -#define U8_VALIDATE_ENTIRE (0x00100000) -#define U8_VALIDATE_CHECK_ADDITIONAL (0x00200000) -#define U8_VALIDATE_UCS2_RANGE (0x00400000) - -#define U8_ILLEGAL_CHAR (-1) -#define U8_OUT_OF_RANGE_CHAR (-2) - -extern int u8_validate(char *, size_t, char **, int, int *); -extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *); -extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t, - int *); - -#ifdef __cplusplus -} -#endif - -#endif /* HAVE_UNICODE */ - -#endif /* _SYS_U8_TEXTPREP_H */ diff --git a/include/sys/u8_textprep_data.h b/include/sys/u8_textprep_data.h deleted file mode 100644 index fa58daacc..000000000 --- a/include/sys/u8_textprep_data.h +++ /dev/null @@ -1,35382 +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 - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ -/* - * COPYRIGHT AND PERMISSION NOTICE - * - * Copyright (c) 1991-2006 Unicode, Inc. All rights reserved. Distributed under - * the Terms of Use in http://www.unicode.org/copyright.html. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of the Unicode data files and any associated documentation (the - * "Data Files") or Unicode software and any associated documentation (the - * "Software") to deal in the Data Files or Software without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, and/or sell copies of the Data Files or Software, and - * to permit persons to whom the Data Files or Software are furnished to do so, - * provided that (a) the above copyright notice(s) and this permission notice - * appear with all copies of the Data Files or Software, (b) both the above - * copyright notice(s) and this permission notice appear in associated - * documentation, and (c) there is clear notice in each modified Data File or - * in the Software as well as in the documentation associated with the Data - * File(s) or Software that the data or software has been modified. - * - * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY - * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR - * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THE DATA FILES OR SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder shall not - * be used in advertising or otherwise to promote the sale, use or other - * dealings in these Data Files or Software without prior written authorization - * of the copyright holder. - * - * Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be - * registered in some jurisdictions. All other trademarks and registered - * trademarks mentioned herein are the property of their respective owners. - */ -/* - * This file has been modified by Sun Microsystems, Inc. - */ - -#include "dmu_config.h" - -#ifdef HAVE_UNICODE -#include_next -#else - -#ifndef _SYS_U8_TEXTPREP_DATA_H -#define _SYS_U8_TEXTPREP_DATA_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * To get to the combining class data, composition mappings, decomposition - * mappings, and case conversion mappings of Unicode, the data structures - * formulated and their meanings are like the following: - * - * Each UTF-8 character is seen as a 4-byte entity so that U+0061 (or 0x61 in - * UTF-8) would be seen as 0x00 0x00 0x00 0x61. Similarly, U+1D15E would be - * 0xF0 0x9D 0x85 0x9E in UTF-8. - * - * The first byte (MSB) value is an index to the b1_tbl, such as - * u8_common_b1_tbl and u8_composition_b1_tbl tables. A b1_tbl has - * indices to b2_tbl tables that have indices to b3_tbl. Each b3_tbl has - * either indices to b4_tbl or indices to b4_tbl and base values for - * displacement calculations later by using the u8_displacement_t type at - * below. Each b4_tbl table then has indices to the final tables. - * - * As an example, if we have a character with code value of U+1D15E which is - * 0xF0 0x9D 0x85 0x9E in UTF-8, the target decomposition character bytes - * that will be mapped by the mapping procedure would be the ones between - * the start_index and the end_index computed as like the following: - * - * b2_tbl_id = u8_common_b1_tbl[0][0xF0]; - * b3_tbl_id = u8_decomp_b2_tbl[0][b2_tbl_id][0x9D]; - * b4_tbl_id = u8_decomp_b3_tbl[0][b3_tbl_id][0x85].tbl_id; - * b4_base = u8_decomp_b3_tbl[0][b3_tbl_id][0x85].base; - * if (b4_tbl_id >= 0x8000) { - * b4_tbl_id -= 0x8000; - * start_index = u8_decomp_b4_16bit_tbl[0][b4_tbl_id][0x9E]; - * end_index = u8_decomp_b4_16bit_tbl[0][b4_tbl_id][0x9E + 1]; - * } else { - * start_index = u8_decomp_b4_tbl[0][b4_tbl_id][0x9E]; - * end_index = u8_decomp_b4_tbl[0][b4_tbl_id][0x9E + 1]; - * } - * - * The start_index and the end_index can be used to retrieve the bytes - * possibly of multiple UTF-8 characters from the final tables. - * - * The "[0]" at the above indicates this is for Unicode Version 3.2.0 data - * as of today. Consequently, the "[1]" indicates another Unicode version - * data and it is Unicode 5.0.0 as of today. - * - * The mapping procedures and the data structures are more or less similar or - * alike among different mappings. You might want to read the u8_textprep.c - * for specific details. - * - * The tool programs created and used to generate the tables in this file are - * saved at PSARC/2007/149/materials/ as tools.tar.gz file. - */ - -/* The following is a component type for the b4_tbl vectors. */ -typedef struct { - uint16_t tbl_id; - uint16_t base; -} u8_displacement_t; - -/* - * The U8_TBL_ELEMENT_NOT_DEF macro indicates a byte that is not defined or - * used. The U8_TBL_ELEMENT_FILLER indicates the end of a UTF-8 character at - * the final tables. - */ -#define U8_TBL_ELEMENT_NOT_DEF (0xff) -#define N_ U8_TBL_ELEMENT_NOT_DEF - -#define U8_TBL_ELEMENT_FILLER (0xf7) -#define FIL_ U8_TBL_ELEMENT_FILLER - -/* - * The common b1_tbl for combining class, decompositions, tolower, and - * toupper case conversion mappings. - */ -static const uchar_t u8_common_b1_tbl[2][256] = { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, -}; - -static const uchar_t u8_combining_class_b2_tbl[2][2][256] = { - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, 2, 3, 4, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 5, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, 6, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, 2, 3, 4, N_, N_, N_, N_, - N_, N_, 5, N_, N_, N_, N_, 6, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 7, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, 8, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - -}; - -static const uchar_t u8_combining_class_b3_tbl[2][9][256] = { - { - { /* Third byte table 0. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 0, 1, N_, N_, - N_, N_, 2, N_, N_, N_, 3, 4, - N_, 5, N_, 6, 7, 8, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 1. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, N_, 19, - N_, 20, N_, 21, N_, 22, N_, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 2. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 32, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 33, N_, N_, 34, - N_, N_, 35, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 3. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, 36, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 4. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 37, N_, 38, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 5. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 39, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 40, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 6. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, 41, 42, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 7. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 8. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - }, - { - { /* Third byte table 0. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 0, 1, N_, N_, - N_, N_, 2, N_, N_, N_, 3, 4, - 5, 6, N_, 7, 8, 9, N_, 10, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 1. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, N_, 21, - N_, 22, 23, 24, N_, 25, N_, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 2. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 35, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, 36, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 37, N_, N_, 38, - N_, N_, 39, N_, 40, N_, N_, N_, - 41, N_, N_, N_, 42, 43, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 44, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 3. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, 45, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 4. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 46, N_, 47, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 5. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 48, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 6. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, 49, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 50, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 7. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 51, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { /* Third byte table 8. */ - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, 52, 53, N_, - N_, 54, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - }, -}; - -/* - * Unlike other b4_tbl, the b4_tbl for combining class data has - * the combining class values not indices to the final tables. - */ -static const uchar_t u8_combining_class_b4_tbl[2][55][256] = { - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 232, 220, 220, - 220, 220, 232, 216, 220, 220, 220, 220, - 220, 202, 202, 220, 220, 220, 220, 202, - 202, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 1, 1, 1, 1, - 1, 220, 220, 220, 220, 230, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 240, 230, 220, - 220, 220, 230, 230, 230, 220, 220, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 234, 234, 233, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 230, 230, 230, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 220, 230, 230, 230, 230, 220, 230, - 230, 230, 222, 220, 230, 230, 230, 230, - 230, 230, 0, 220, 220, 220, 220, 220, - 230, 230, 220, 230, 230, 222, 228, 230, - 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 0, 20, 21, 22, 0, 23, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 24, 25, 0, 230, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 27, 28, 29, 30, 31, - 32, 33, 34, 230, 230, 220, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 35, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 230, 230, - 230, 230, 230, 230, 230, 0, 0, 230, - 230, 230, 230, 220, 230, 0, 0, 230, - 230, 0, 220, 230, 230, 220, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 36, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 220, 230, 230, 220, 230, 230, 220, - 220, 220, 230, 220, 220, 230, 220, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 220, 230, 220, 230, 220, 230, - 220, 230, 230, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 230, 220, 230, 230, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 84, 91, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 103, 103, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 107, 107, 107, 107, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 118, 118, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 122, 122, 122, 122, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 220, 220, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 220, 0, 220, - 0, 216, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 129, 130, 0, 132, 0, 0, 0, - 0, 0, 130, 130, 130, 130, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 130, 0, 230, 230, 9, 0, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 0, 9, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 228, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 1, 1, 230, 230, 230, 230, - 1, 1, 1, 230, 230, 0, 0, 0, - 0, 230, 0, 0, 0, 1, 1, 230, - 220, 230, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 218, 228, 232, 222, 224, 224, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 39. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 26, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 40. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 41. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 216, 216, 1, - 1, 1, 0, 0, 0, 226, 216, 216, - 216, 216, 216, 0, 0, 0, 0, 0, - 0, 0, 0, 220, 220, 220, 220, 220, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 42. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 220, 220, 220, 0, 0, 230, 230, 230, - 230, 230, 220, 220, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 230, 230, 230, 230, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 43. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 44. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 45. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 46. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 47. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 48. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 49. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 50. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 51. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 52. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 53. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 54. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - }, - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 232, 220, 220, - 220, 220, 232, 216, 220, 220, 220, 220, - 220, 202, 202, 220, 220, 220, 220, 202, - 202, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 1, 1, 1, 1, - 1, 220, 220, 220, 220, 230, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 240, 230, 220, - 220, 220, 230, 230, 230, 220, 220, 0, - 230, 230, 230, 220, 220, 220, 220, 230, - 232, 220, 220, 230, 233, 234, 234, 233, - 234, 234, 233, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 230, 230, 230, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 220, 230, 230, 230, 230, 220, 230, - 230, 230, 222, 220, 230, 230, 230, 230, - 230, 230, 220, 220, 220, 220, 220, 220, - 230, 230, 220, 230, 230, 222, 228, 230, - 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 19, 20, 21, 22, 0, 23, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 24, 25, 0, 230, 220, 0, 18, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 230, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 27, 28, 29, 30, 31, - 32, 33, 34, 230, 230, 220, 220, 230, - 230, 230, 230, 230, 220, 230, 230, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 35, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 230, 230, - 230, 230, 230, 230, 230, 0, 0, 230, - 230, 230, 230, 220, 230, 0, 0, 230, - 230, 0, 220, 230, 230, 220, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 36, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 220, 230, 230, 220, 230, 230, 220, - 220, 220, 230, 220, 220, 230, 220, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 220, 230, 220, 230, 220, 230, - 220, 230, 230, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 230, 230, 230, 230, - 230, 230, 220, 230, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 230, 220, 230, 230, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 84, 91, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 103, 103, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 107, 107, 107, 107, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 118, 118, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 122, 122, 122, 122, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 220, 220, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 220, 0, 220, - 0, 216, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 129, 130, 0, 132, 0, 0, 0, - 0, 0, 130, 130, 130, 130, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 130, 0, 230, 230, 9, 0, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 0, 9, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 230, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 39. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 228, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 40. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 222, 230, 220, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 41. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 230, - 220, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 42. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 43. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 220, 230, 230, 230, - 230, 230, 230, 230, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 44. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 220, 230, 230, 230, 230, 230, - 230, 230, 220, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 230, 220, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 45. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 1, 1, 230, 230, 230, 230, - 1, 1, 1, 230, 230, 0, 0, 0, - 0, 230, 0, 0, 0, 1, 1, 230, - 220, 230, 1, 1, 220, 220, 220, 220, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 46. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 218, 228, 232, 222, 224, 224, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 47. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 48. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 49. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 26, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 50. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 51. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 220, 0, 230, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 230, 1, 220, 0, 0, 0, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 52. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 216, 216, 1, - 1, 1, 0, 0, 0, 226, 216, 216, - 216, 216, 216, 0, 0, 0, 0, 0, - 0, 0, 0, 220, 220, 220, 220, 220, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 53. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 220, 220, 220, 0, 0, 230, 230, 230, - 230, 230, 220, 220, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 230, 230, 230, 230, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - { /* Fourth byte table 54. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 230, 230, 230, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, - }, -}; - -static const uchar_t u8_composition_b1_tbl[2][256] = { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, -}; - -static const uchar_t u8_composition_b2_tbl[2][1][256] = { - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, 2, 3, 4, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, 2, 3, 4, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - -}; - -static const u8_displacement_t u8_composition_b3_tbl[2][5][256] = { - { - { /* Third byte table 0. */ - { 0x8000, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0, 2470 }, - { 0x8001, 2491 }, { 1, 2871 }, { 2, 2959 }, - { 3, 3061 }, { 4, 3212 }, { 5, 3226 }, - { N_, 0 }, { 6, 3270 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0x8002, 3277 }, - { 7, 3774 }, { 8, 3949 }, { 9, 4198 }, - { N_, 0 }, { 10, 4265 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 11, 4293 }, { 12, 4312 }, { N_, 0 }, - { 13, 4326 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 14, 4347 }, - { N_, 0 }, { N_, 0 }, { 15, 4374 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 16, 4391 }, - { 17, 4416 }, { 18, 4425 }, { N_, 0 }, - { 19, 4451 }, { 20, 4460 }, { 21, 4469 }, - { N_, 0 }, { 22, 4503 }, { N_, 0 }, - { 23, 4529 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 24, 4563 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 25, 4572 }, { 26, 4588 }, - { 27, 4620 }, { 28, 4666 }, { 0x8003, 4682 }, - { 0x8004, 5254 }, { 29, 5616 }, { 30, 5646 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 31, 5684 }, - { 32, 5708 }, { 33, 5732 }, { 34, 5780 }, - { 35, 5900 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 36, 6012 }, { 37, 6241 }, { 38, 6358 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - }, - { - { /* Third byte table 0. */ - { 0x8000, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0, 2470 }, - { 0x8001, 2491 }, { 1, 2871 }, { 2, 2959 }, - { 3, 3061 }, { 4, 3212 }, { 5, 3226 }, - { N_, 0 }, { 6, 3270 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0x8002, 3277 }, - { 7, 3774 }, { 8, 3949 }, { 9, 4198 }, - { N_, 0 }, { 10, 4265 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 11, 4293 }, { 12, 4312 }, { N_, 0 }, - { 13, 4326 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 14, 4347 }, - { N_, 0 }, { N_, 0 }, { 15, 4374 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 16, 4391 }, - { 17, 4416 }, { 18, 4425 }, { N_, 0 }, - { 19, 4451 }, { 20, 4460 }, { 21, 4469 }, - { N_, 0 }, { 22, 4503 }, { N_, 0 }, - { 23, 4529 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 24, 4563 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 25, 4572 }, { 26, 4662 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 27, 4671 }, { 28, 4687 }, - { 29, 4719 }, { 30, 4765 }, { 0x8003, 4781 }, - { 0x8004, 5353 }, { 31, 5715 }, { 32, 5745 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 33, 5783 }, - { 34, 5807 }, { 35, 5831 }, { 36, 5879 }, - { 37, 5999 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 38, 6111 }, { 39, 6340 }, { 40, 6457 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - }, -}; - -static const uchar_t u8_composition_b4_tbl[2][41][257] = { - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 29, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 73, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 38, 46, 46, 46, 46, - 46, 54, 62, 62, 62, 62, 62, 62, - 62, 70, 78, 86, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 94, 94, 94, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 36, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 108, 144, 144, 144, 144, 144, 144, 144, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 14, 22, 30, 30, 30, 30, 30, 37, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 15, 15, 15, 70, 70, - 70, 70, 112, 133, 154, 154, 154, 162, - 162, 162, 162, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 20, 20, 20, 27, 27, 46, 59, - 66, 91, 91, 98, 98, 98, 98, 105, - 105, 105, 105, 105, 130, 130, 130, 130, - 137, 137, 137, 137, 144, 144, 151, 151, - 151, 164, 164, 164, 171, 171, 190, 203, - 210, 235, 235, 242, 242, 242, 242, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 25, 25, 25, - 32, 32, 32, 32, 39, 39, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 53, - 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 60, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 21, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 14, 14, 14, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 9, 9, 9, 9, 9, 9, - 9, 18, 18, 18, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 25, - 25, 25, 25, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 25, 25, 25, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 16, 16, 16, 16, - 16, 16, 16, 24, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 38, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 8, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 16, - 16, 16, 16, 16, 16, 16, 16, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 16, 16, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 16, 16, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 8, 8, 8, - 8, 16, 16, 16, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 32, 32, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 8, 16, 16, - 16, 24, 24, 24, 24, 24, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 40, 40, 40, 48, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 64, 72, 72, 72, 80, - 88, 88, 88, 96, 104, 112, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 16, 16, 16, 24, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 40, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 56, 56, 56, 56, 56, - 56, 64, 72, 72, 80, 80, 80, 80, - 80, 80, 80, 88, 96, 104, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, - 9, 9, 9, 9, 18, 18, 27, 27, - 36, 36, 45, 45, 54, 54, 63, 63, - 72, 72, 81, 81, 90, 90, 99, 99, - 108, 108, 117, 117, 117, 126, 126, 135, - 135, 144, 144, 144, 144, 144, 144, 144, - 161, 161, 161, 178, 178, 178, 195, 195, - 195, 212, 212, 212, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 18, - 18, 18, 18, 18, 27, 27, 36, 36, - 45, 45, 54, 54, 63, 63, 72, 72, - 81, 81, 90, 90, 99, 99, 108, 108, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 9, 9, 18, 18, 27, - 27, 36, 36, 36, 36, 36, 36, 36, - 53, 53, 53, 70, 70, 70, 87, 87, - 87, 104, 104, 104, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, - 130, 139, 148, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, - }, - { /* Fourth byte table 39. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 40. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - }, - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 29, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 73, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 38, 46, 46, 46, 46, - 46, 54, 62, 62, 62, 62, 62, 62, - 62, 70, 78, 86, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 94, 94, 94, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, - 102, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 36, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 108, 144, 144, 144, 144, 144, 144, 144, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, - 151, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 14, 22, 30, 30, 30, 30, 30, 37, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 15, 15, 15, 70, 70, - 70, 70, 112, 133, 154, 154, 154, 162, - 162, 162, 162, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 20, 20, 20, 27, 27, 46, 59, - 66, 91, 91, 98, 98, 98, 98, 105, - 105, 105, 105, 105, 130, 130, 130, 130, - 137, 137, 137, 137, 144, 144, 151, 151, - 151, 164, 164, 164, 171, 171, 190, 203, - 210, 235, 235, 242, 242, 242, 242, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, - 249, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 25, 25, 25, - 32, 32, 32, 32, 39, 39, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 53, - 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 60, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 21, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 14, 14, 14, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 9, 9, 9, 9, 9, 9, - 9, 18, 18, 18, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 25, - 25, 25, 25, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 25, 25, 25, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, - 34, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 9, - 18, 18, 27, 27, 36, 36, 45, 45, - 45, 45, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 63, 63, 72, 72, 81, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 16, 16, 16, 16, - 16, 16, 16, 24, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 38, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 8, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 16, - 16, 16, 16, 16, 16, 16, 16, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 16, 16, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 16, 16, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 8, 8, 8, - 8, 16, 16, 16, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 32, 32, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 8, 16, 16, - 16, 24, 24, 24, 24, 24, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 40, 40, 40, 48, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 64, 72, 72, 72, 80, - 88, 88, 88, 96, 104, 112, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, - 120, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 16, 16, 16, 24, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 40, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 56, 56, 56, 56, 56, - 56, 64, 72, 72, 80, 80, 80, 80, - 80, 80, 80, 88, 96, 104, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, - 9, 9, 9, 9, 18, 18, 27, 27, - 36, 36, 45, 45, 54, 54, 63, 63, - 72, 72, 81, 81, 90, 90, 99, 99, - 108, 108, 117, 117, 117, 126, 126, 135, - 135, 144, 144, 144, 144, 144, 144, 144, - 161, 161, 161, 178, 178, 178, 195, 195, - 195, 212, 212, 212, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, - 229, - }, - { /* Fourth byte table 39. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 18, - 18, 18, 18, 18, 27, 27, 36, 36, - 45, 45, 54, 54, 63, 63, 72, 72, - 81, 81, 90, 90, 99, 99, 108, 108, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, - }, - { /* Fourth byte table 40. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 9, 9, 18, 18, 27, - 27, 36, 36, 36, 36, 36, 36, 36, - 53, 53, 53, 70, 70, 70, 87, 87, - 87, 104, 104, 104, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, - 130, 139, 148, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, - 166, - }, - }, -}; - -static const uint16_t u8_composition_b4_16bit_tbl[2][5][257] = { - { - { /* Fourth byte 16-bit table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 8, 16, 24, - 24, 24, 124, 146, 177, 219, 327, 335, - 379, 427, 521, 528, 562, 602, 624, 683, - 782, 797, 797, 849, 894, 941, 1061, 1076, - 1118, 1133, 1193, 1233, 1233, 1233, 1233, 1233, - 1233, 1233, 1333, 1355, 1386, 1428, 1536, 1544, - 1588, 1643, 1731, 1744, 1778, 1818, 1840, 1899, - 1998, 2013, 2013, 2065, 2110, 2164, 2284, 2299, - 2348, 2363, 2430, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, - }, - { /* Fourth byte 16-bit table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 29, 29, 36, 43, 56, - 64, 64, 64, 93, 93, 93, 93, 93, - 101, 101, 101, 101, 101, 130, 151, 158, - 158, 165, 165, 165, 165, 190, 190, 190, - 190, 190, 190, 219, 219, 226, 233, 246, - 254, 254, 254, 283, 283, 283, 283, 283, - 291, 291, 291, 291, 291, 320, 341, 348, - 348, 355, 355, 355, 355, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, - }, - { /* Fourth byte 16-bit table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 49, 49, 49, 49, 77, 77, - 112, 112, 160, 160, 160, 160, 160, 160, - 188, 188, 196, 196, 196, 196, 237, 237, - 237, 237, 272, 272, 272, 280, 280, 288, - 288, 288, 344, 344, 344, 344, 372, 372, - 414, 414, 469, 469, 469, 469, 469, 469, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, - }, - { /* Fourth byte 16-bit table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 29, 58, 66, 74, 82, 90, 98, - 106, 135, 164, 172, 180, 188, 196, 204, - 212, 227, 242, 242, 242, 242, 242, 242, - 242, 257, 272, 272, 272, 272, 272, 272, - 272, 301, 330, 338, 346, 354, 362, 370, - 378, 407, 436, 444, 452, 460, 468, 476, - 484, 506, 528, 528, 528, 528, 528, 528, - 528, 550, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, - }, - { /* Fourth byte 16-bit table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 30, 30, 30, 30, 30, 30, - 30, 45, 60, 60, 60, 60, 60, 60, - 60, 82, 104, 104, 104, 104, 104, 104, - 104, 104, 126, 126, 126, 126, 126, 126, - 126, 155, 184, 192, 200, 208, 216, 224, - 232, 261, 290, 298, 306, 314, 322, 330, - 338, 346, 346, 346, 346, 354, 354, 354, - 354, 354, 354, 354, 354, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, - }, - }, - { - { /* Fourth byte 16-bit table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 8, 16, 24, - 24, 24, 124, 146, 177, 219, 327, 335, - 379, 427, 521, 528, 562, 602, 624, 683, - 782, 797, 797, 849, 894, 941, 1061, 1076, - 1118, 1133, 1193, 1233, 1233, 1233, 1233, 1233, - 1233, 1233, 1333, 1355, 1386, 1428, 1536, 1544, - 1588, 1643, 1731, 1744, 1778, 1818, 1840, 1899, - 1998, 2013, 2013, 2065, 2110, 2164, 2284, 2299, - 2348, 2363, 2430, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470, - 2470, - }, - { /* Fourth byte 16-bit table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 29, 29, 36, 43, 56, - 64, 64, 64, 93, 93, 93, 93, 93, - 101, 101, 101, 101, 101, 130, 151, 158, - 158, 165, 165, 165, 165, 190, 190, 190, - 190, 190, 190, 219, 219, 226, 233, 246, - 254, 254, 254, 283, 283, 283, 283, 283, - 291, 291, 291, 291, 291, 320, 341, 348, - 348, 355, 355, 355, 355, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, - 380, - }, - { /* Fourth byte 16-bit table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 49, 49, 49, 49, 77, 77, - 112, 112, 160, 160, 160, 160, 160, 160, - 188, 188, 196, 196, 196, 196, 237, 237, - 237, 237, 272, 272, 272, 280, 280, 288, - 288, 288, 344, 344, 344, 344, 372, 372, - 414, 414, 469, 469, 469, 469, 469, 469, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 497, - 497, - }, - { /* Fourth byte 16-bit table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 29, 58, 66, 74, 82, 90, 98, - 106, 135, 164, 172, 180, 188, 196, 204, - 212, 227, 242, 242, 242, 242, 242, 242, - 242, 257, 272, 272, 272, 272, 272, 272, - 272, 301, 330, 338, 346, 354, 362, 370, - 378, 407, 436, 444, 452, 460, 468, 476, - 484, 506, 528, 528, 528, 528, 528, 528, - 528, 550, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, - 572, - }, - { /* Fourth byte 16-bit table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 30, 30, 30, 30, 30, 30, - 30, 45, 60, 60, 60, 60, 60, 60, - 60, 82, 104, 104, 104, 104, 104, 104, - 104, 104, 126, 126, 126, 126, 126, 126, - 126, 155, 184, 192, 200, 208, 216, 224, - 232, 261, 290, 298, 306, 314, 322, 330, - 338, 346, 346, 346, 346, 354, 354, 354, - 354, 354, 354, 354, 354, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, - 362, - }, - }, -}; - -static const uchar_t u8_composition_final_tbl[2][6623] = { - { - 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_, - 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA0, FIL_, - 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAF, FIL_, - 0x10, 0xCC, 0x86, FIL_, 0xC4, 0x82, FIL_, 0xCC, - 0x87, FIL_, 0xC8, 0xA6, FIL_, 0xCC, 0x8F, FIL_, - 0xC8, 0x80, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x82, - FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x81, FIL_, 0xCC, - 0x80, FIL_, 0xC3, 0x80, FIL_, 0xCC, 0x83, FIL_, - 0xC3, 0x83, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, - 0xA0, FIL_, 0xCC, 0xA5, FIL_, 0xE1, 0xB8, 0x80, - FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x82, FIL_, 0xCC, - 0x84, FIL_, 0xC4, 0x80, FIL_, 0xCC, 0x88, FIL_, - 0xC3, 0x84, FIL_, 0xCC, 0x8A, FIL_, 0xC3, 0x85, - FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x84, FIL_, 0xCC, - 0x89, FIL_, 0xE1, 0xBA, 0xA2, FIL_, 0xCC, 0x8C, - FIL_, 0xC7, 0x8D, FIL_, 0x03, 0xCC, 0x87, FIL_, - 0xE1, 0xB8, 0x82, FIL_, 0xCC, 0xB1, FIL_, 0xE1, - 0xB8, 0x86, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0x84, FIL_, 0x05, 0xCC, 0xA7, FIL_, 0xC3, 0x87, - FIL_, 0xCC, 0x81, FIL_, 0xC4, 0x86, FIL_, 0xCC, - 0x8C, FIL_, 0xC4, 0x8C, FIL_, 0xCC, 0x87, FIL_, - 0xC4, 0x8A, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0x88, - FIL_, 0x06, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0x8E, - FIL_, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0x90, FIL_, - 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x92, FIL_, 0xCC, - 0x87, FIL_, 0xE1, 0xB8, 0x8A, FIL_, 0xCC, 0x8C, - FIL_, 0xC4, 0x8E, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xB8, 0x8C, FIL_, 0x11, 0xCC, 0x80, FIL_, 0xC3, - 0x88, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x89, FIL_, - 0xCC, 0x82, FIL_, 0xC3, 0x8A, FIL_, 0xCC, 0x88, - FIL_, 0xC3, 0x8B, FIL_, 0xCC, 0xA7, FIL_, 0xC8, - 0xA8, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x86, FIL_, - 0xCC, 0x8F, FIL_, 0xC8, 0x84, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBA, 0xBA, FIL_, 0xCC, 0xB0, FIL_, - 0xE1, 0xB8, 0x9A, FIL_, 0xCC, 0xAD, FIL_, 0xE1, - 0xB8, 0x98, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBA, - 0xBC, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0xB8, - FIL_, 0xCC, 0x84, FIL_, 0xC4, 0x92, FIL_, 0xCC, - 0x86, FIL_, 0xC4, 0x94, FIL_, 0xCC, 0x87, FIL_, - 0xC4, 0x96, FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x98, - FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x9A, FIL_, 0x01, - 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9E, FIL_, 0x07, - 0xCC, 0x8C, FIL_, 0xC7, 0xA6, FIL_, 0xCC, 0x87, - FIL_, 0xC4, 0xA0, FIL_, 0xCC, 0x84, FIL_, 0xE1, - 0xB8, 0xA0, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0x9C, - FIL_, 0xCC, 0x81, FIL_, 0xC7, 0xB4, FIL_, 0xCC, - 0xA7, FIL_, 0xC4, 0xA2, FIL_, 0xCC, 0x86, FIL_, - 0xC4, 0x9E, FIL_, 0x07, 0xCC, 0xAE, FIL_, 0xE1, - 0xB8, 0xAA, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB8, - 0xA2, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA6, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0xA4, FIL_, - 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0xA8, FIL_, 0xCC, - 0x8C, FIL_, 0xC8, 0x9E, FIL_, 0xCC, 0x82, FIL_, - 0xC4, 0xA4, FIL_, 0x0F, 0xCC, 0x84, FIL_, 0xC4, - 0xAA, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x8C, FIL_, - 0xCC, 0xA8, FIL_, 0xC4, 0xAE, FIL_, 0xCC, 0x83, - FIL_, 0xC4, 0xA8, FIL_, 0xCC, 0x88, FIL_, 0xC3, - 0x8F, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x8D, FIL_, - 0xCC, 0x8F, FIL_, 0xC8, 0x88, FIL_, 0xCC, 0x86, - FIL_, 0xC4, 0xAC, FIL_, 0xCC, 0x91, FIL_, 0xC8, - 0x8A, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x8F, FIL_, - 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x88, FIL_, 0xCC, - 0x87, FIL_, 0xC4, 0xB0, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xBB, 0x8A, FIL_, 0xCC, 0xB0, FIL_, 0xE1, - 0xB8, 0xAC, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x8E, - FIL_, 0x01, 0xCC, 0x82, FIL_, 0xC4, 0xB4, FIL_, - 0x05, 0xCC, 0x8C, FIL_, 0xC7, 0xA8, FIL_, 0xCC, - 0xB1, FIL_, 0xE1, 0xB8, 0xB4, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xB8, 0xB0, FIL_, 0xCC, 0xA7, FIL_, - 0xC4, 0xB6, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0xB2, FIL_, 0x06, 0xCC, 0xA7, FIL_, 0xC4, 0xBB, - FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0xBD, FIL_, 0xCC, - 0xB1, FIL_, 0xE1, 0xB8, 0xBA, FIL_, 0xCC, 0xA3, - FIL_, 0xE1, 0xB8, 0xB6, FIL_, 0xCC, 0xAD, FIL_, - 0xE1, 0xB8, 0xBC, FIL_, 0xCC, 0x81, FIL_, 0xC4, - 0xB9, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xB8, - 0xBE, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x82, - FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x80, FIL_, - 0x09, 0xCC, 0x80, FIL_, 0xC7, 0xB8, FIL_, 0xCC, - 0xAD, FIL_, 0xE1, 0xB9, 0x8A, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0x84, FIL_, 0xCC, 0xB1, FIL_, - 0xE1, 0xB9, 0x88, FIL_, 0xCC, 0x83, FIL_, 0xC3, - 0x91, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x86, - FIL_, 0xCC, 0x81, FIL_, 0xC5, 0x83, FIL_, 0xCC, - 0xA7, FIL_, 0xC5, 0x85, FIL_, 0xCC, 0x8C, FIL_, - 0xC5, 0x87, FIL_, 0x10, 0xCC, 0xA8, FIL_, 0xC7, - 0xAA, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x8E, FIL_, - 0xCC, 0x80, FIL_, 0xC3, 0x92, FIL_, 0xCC, 0x9B, - FIL_, 0xC6, 0xA0, FIL_, 0xCC, 0x8F, FIL_, 0xC8, - 0x8C, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x93, FIL_, - 0xCC, 0x87, FIL_, 0xC8, 0xAE, FIL_, 0xCC, 0x8C, - FIL_, 0xC7, 0x91, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xBB, 0x8C, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x94, - FIL_, 0xCC, 0x84, FIL_, 0xC5, 0x8C, FIL_, 0xCC, - 0x83, FIL_, 0xC3, 0x95, FIL_, 0xCC, 0x86, FIL_, - 0xC5, 0x8E, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x96, - FIL_, 0xCC, 0x8B, FIL_, 0xC5, 0x90, FIL_, 0xCC, - 0x89, FIL_, 0xE1, 0xBB, 0x8E, FIL_, 0x02, 0xCC, - 0x87, FIL_, 0xE1, 0xB9, 0x96, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0x94, FIL_, 0x08, 0xCC, 0x91, - FIL_, 0xC8, 0x92, FIL_, 0xCC, 0xA7, FIL_, 0xC5, - 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0x98, FIL_, - 0xCC, 0xB1, FIL_, 0xE1, 0xB9, 0x9E, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xB9, 0x9A, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0x98, FIL_, 0xCC, 0x81, FIL_, - 0xC5, 0x94, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x90, - FIL_, 0x07, 0xCC, 0x81, FIL_, 0xC5, 0x9A, FIL_, - 0xCC, 0x82, FIL_, 0xC5, 0x9C, FIL_, 0xCC, 0xA7, - FIL_, 0xC5, 0x9E, FIL_, 0xCC, 0x8C, FIL_, 0xC5, - 0xA0, FIL_, 0xCC, 0xA6, FIL_, 0xC8, 0x98, FIL_, - 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA0, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xB9, 0xA2, FIL_, 0x07, 0xCC, - 0x8C, FIL_, 0xC5, 0xA4, FIL_, 0xCC, 0xB1, FIL_, - 0xE1, 0xB9, 0xAE, FIL_, 0xCC, 0xA6, FIL_, 0xC8, - 0x9A, FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0xA2, FIL_, - 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xAA, FIL_, 0xCC, - 0xAD, FIL_, 0xE1, 0xB9, 0xB0, FIL_, 0xCC, 0xA3, - FIL_, 0xE1, 0xB9, 0xAC, FIL_, 0x13, 0xCC, 0xA8, - FIL_, 0xC5, 0xB2, FIL_, 0xCC, 0x83, FIL_, 0xC5, - 0xA8, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0xAA, FIL_, - 0xCC, 0x81, FIL_, 0xC3, 0x9A, FIL_, 0xCC, 0x86, - FIL_, 0xC5, 0xAC, FIL_, 0xCC, 0x8A, FIL_, 0xC5, - 0xAE, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x99, FIL_, - 0xCC, 0x91, FIL_, 0xC8, 0x96, FIL_, 0xCC, 0x8B, - FIL_, 0xC5, 0xB0, FIL_, 0xCC, 0xA4, FIL_, 0xE1, - 0xB9, 0xB2, FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB9, - 0xB4, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x94, FIL_, - 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB6, FIL_, 0xCC, - 0x9B, FIL_, 0xC6, 0xAF, FIL_, 0xCC, 0x82, FIL_, - 0xC3, 0x9B, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x9C, - FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x93, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xBB, 0xA4, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0xA6, FIL_, 0x02, 0xCC, 0x83, - FIL_, 0xE1, 0xB9, 0xBC, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xB9, 0xBE, FIL_, 0x06, 0xCC, 0x82, FIL_, - 0xC5, 0xB4, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xBA, - 0x84, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xBA, 0x86, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x88, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0x82, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBA, 0x80, FIL_, 0x02, 0xCC, - 0x87, FIL_, 0xE1, 0xBA, 0x8A, FIL_, 0xCC, 0x88, - FIL_, 0xE1, 0xBA, 0x8C, FIL_, 0x09, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0xB6, FIL_, 0xCC, 0x87, FIL_, - 0xE1, 0xBA, 0x8E, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xBB, 0xB4, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x9D, - FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xB2, FIL_, 0xCC, - 0x82, FIL_, 0xC5, 0xB6, FIL_, 0xCC, 0x88, FIL_, - 0xC5, 0xB8, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, - 0xB2, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xB8, - FIL_, 0x06, 0xCC, 0x87, FIL_, 0xC5, 0xBB, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x92, FIL_, 0xCC, - 0x8C, FIL_, 0xC5, 0xBD, FIL_, 0xCC, 0xB1, FIL_, - 0xE1, 0xBA, 0x94, FIL_, 0xCC, 0x82, FIL_, 0xE1, - 0xBA, 0x90, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0xB9, - FIL_, 0x10, 0xCC, 0x8C, FIL_, 0xC7, 0x8E, FIL_, - 0xCC, 0x8F, FIL_, 0xC8, 0x81, FIL_, 0xCC, 0xA8, - FIL_, 0xC4, 0x85, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xBA, 0xA1, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x83, - FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA3, FIL_, - 0xCC, 0x84, FIL_, 0xC4, 0x81, FIL_, 0xCC, 0x91, - FIL_, 0xC8, 0x83, FIL_, 0xCC, 0x8A, FIL_, 0xC3, - 0xA5, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0xA4, FIL_, - 0xCC, 0x83, FIL_, 0xC3, 0xA3, FIL_, 0xCC, 0x82, - FIL_, 0xC3, 0xA2, FIL_, 0xCC, 0x81, FIL_, 0xC3, - 0xA1, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xA0, FIL_, - 0xCC, 0x87, FIL_, 0xC8, 0xA7, FIL_, 0xCC, 0xA5, - FIL_, 0xE1, 0xB8, 0x81, FIL_, 0x03, 0xCC, 0xB1, - FIL_, 0xE1, 0xB8, 0x87, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xB8, 0x85, FIL_, 0xCC, 0x87, FIL_, 0xE1, - 0xB8, 0x83, FIL_, 0x05, 0xCC, 0x87, FIL_, 0xC4, - 0x8B, FIL_, 0xCC, 0xA7, FIL_, 0xC3, 0xA7, FIL_, - 0xCC, 0x82, FIL_, 0xC4, 0x89, FIL_, 0xCC, 0x8C, - FIL_, 0xC4, 0x8D, FIL_, 0xCC, 0x81, FIL_, 0xC4, - 0x87, FIL_, 0x06, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, - 0x93, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x8B, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0x8D, FIL_, - 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0x8F, FIL_, 0xCC, - 0xA7, FIL_, 0xE1, 0xB8, 0x91, FIL_, 0xCC, 0x8C, - FIL_, 0xC4, 0x8F, FIL_, 0x11, 0xCC, 0xA8, FIL_, - 0xC4, 0x99, FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x9B, - FIL_, 0xCC, 0x87, FIL_, 0xC4, 0x97, FIL_, 0xCC, - 0x88, FIL_, 0xC3, 0xAB, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xBA, 0xB9, FIL_, 0xCC, 0xB0, FIL_, 0xE1, - 0xB8, 0x9B, FIL_, 0xCC, 0x84, FIL_, 0xC4, 0x93, - FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x99, FIL_, - 0xCC, 0x83, FIL_, 0xE1, 0xBA, 0xBD, FIL_, 0xCC, - 0x86, FIL_, 0xC4, 0x95, FIL_, 0xCC, 0xA7, FIL_, - 0xC8, 0xA9, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, - 0xBB, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x85, FIL_, - 0xCC, 0x81, FIL_, 0xC3, 0xA9, FIL_, 0xCC, 0x91, - FIL_, 0xC8, 0x87, FIL_, 0xCC, 0x80, FIL_, 0xC3, - 0xA8, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xAA, FIL_, - 0x01, 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9F, FIL_, - 0x07, 0xCC, 0x86, FIL_, 0xC4, 0x9F, FIL_, 0xCC, - 0xA7, FIL_, 0xC4, 0xA3, FIL_, 0xCC, 0x81, FIL_, - 0xC7, 0xB5, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0x9D, - FIL_, 0xCC, 0x87, FIL_, 0xC4, 0xA1, FIL_, 0xCC, - 0x8C, FIL_, 0xC7, 0xA7, FIL_, 0xCC, 0x84, FIL_, - 0xE1, 0xB8, 0xA1, FIL_, 0x08, 0xCC, 0x8C, FIL_, - 0xC8, 0x9F, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0xA5, - FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA7, FIL_, - 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0xA3, FIL_, 0xCC, - 0xB1, FIL_, 0xE1, 0xBA, 0x96, FIL_, 0xCC, 0xA3, - FIL_, 0xE1, 0xB8, 0xA5, FIL_, 0xCC, 0xA7, FIL_, - 0xE1, 0xB8, 0xA9, FIL_, 0xCC, 0xAE, FIL_, 0xE1, - 0xB8, 0xAB, FIL_, 0x0E, 0xCC, 0x81, FIL_, 0xC3, - 0xAD, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xAC, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0x8B, FIL_, 0xCC, - 0x8C, FIL_, 0xC7, 0x90, FIL_, 0xCC, 0x89, FIL_, - 0xE1, 0xBB, 0x89, FIL_, 0xCC, 0x91, FIL_, 0xC8, - 0x8B, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x89, FIL_, - 0xCC, 0x82, FIL_, 0xC3, 0xAE, FIL_, 0xCC, 0xB0, - FIL_, 0xE1, 0xB8, 0xAD, FIL_, 0xCC, 0xA8, FIL_, - 0xC4, 0xAF, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0xAD, - FIL_, 0xCC, 0x84, FIL_, 0xC4, 0xAB, FIL_, 0xCC, - 0x83, FIL_, 0xC4, 0xA9, FIL_, 0xCC, 0x88, FIL_, - 0xC3, 0xAF, FIL_, 0x02, 0xCC, 0x82, FIL_, 0xC4, - 0xB5, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0xB0, FIL_, - 0x05, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0xB3, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xB1, FIL_, 0xCC, - 0xA7, FIL_, 0xC4, 0xB7, FIL_, 0xCC, 0x8C, FIL_, - 0xC7, 0xA9, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, - 0xB5, FIL_, 0x06, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0xB7, FIL_, 0xCC, 0x81, FIL_, 0xC4, 0xBA, FIL_, - 0xCC, 0xA7, FIL_, 0xC4, 0xBC, FIL_, 0xCC, 0x8C, - FIL_, 0xC4, 0xBE, FIL_, 0xCC, 0xB1, FIL_, 0xE1, - 0xB8, 0xBB, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, - 0xBD, FIL_, 0x03, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, - 0x83, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xBF, - FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x81, FIL_, - 0x09, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x87, FIL_, - 0xCC, 0x83, FIL_, 0xC3, 0xB1, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0x85, FIL_, 0xCC, 0xB1, FIL_, - 0xE1, 0xB9, 0x89, FIL_, 0xCC, 0x81, FIL_, 0xC5, - 0x84, FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x86, FIL_, - 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0x8B, FIL_, 0xCC, - 0x8C, FIL_, 0xC5, 0x88, FIL_, 0xCC, 0x80, FIL_, - 0xC7, 0xB9, FIL_, 0x10, 0xCC, 0x89, FIL_, 0xE1, - 0xBB, 0x8F, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0xB3, - FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xB2, FIL_, 0xCC, - 0x87, FIL_, 0xC8, 0xAF, FIL_, 0xCC, 0x8F, FIL_, - 0xC8, 0x8D, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, - 0x8D, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0x8D, FIL_, - 0xCC, 0x8C, FIL_, 0xC7, 0x92, FIL_, 0xCC, 0x86, - FIL_, 0xC5, 0x8F, FIL_, 0xCC, 0x8B, FIL_, 0xC5, - 0x91, FIL_, 0xCC, 0x9B, FIL_, 0xC6, 0xA1, FIL_, - 0xCC, 0x91, FIL_, 0xC8, 0x8F, FIL_, 0xCC, 0xA8, - FIL_, 0xC7, 0xAB, FIL_, 0xCC, 0x88, FIL_, 0xC3, - 0xB6, FIL_, 0xCC, 0x83, FIL_, 0xC3, 0xB5, FIL_, - 0xCC, 0x82, FIL_, 0xC3, 0xB4, FIL_, 0x02, 0xCC, - 0x87, FIL_, 0xE1, 0xB9, 0x97, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0x95, FIL_, 0x08, 0xCC, 0xB1, - FIL_, 0xE1, 0xB9, 0x9F, FIL_, 0xCC, 0x87, FIL_, - 0xE1, 0xB9, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC5, - 0x95, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x91, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x9B, FIL_, 0xCC, - 0x8C, FIL_, 0xC5, 0x99, FIL_, 0xCC, 0x91, FIL_, - 0xC8, 0x93, FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x97, - FIL_, 0x07, 0xCC, 0xA6, FIL_, 0xC8, 0x99, FIL_, - 0xCC, 0x8C, FIL_, 0xC5, 0xA1, FIL_, 0xCC, 0x81, - FIL_, 0xC5, 0x9B, FIL_, 0xCC, 0x87, FIL_, 0xE1, - 0xB9, 0xA1, FIL_, 0xCC, 0x82, FIL_, 0xC5, 0x9D, - FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x9F, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xB9, 0xA3, FIL_, 0x08, 0xCC, - 0x88, FIL_, 0xE1, 0xBA, 0x97, FIL_, 0xCC, 0xAD, - FIL_, 0xE1, 0xB9, 0xB1, FIL_, 0xCC, 0xB1, FIL_, - 0xE1, 0xB9, 0xAF, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xB9, 0xAD, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0xA5, - FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0xA3, FIL_, 0xCC, - 0x87, FIL_, 0xE1, 0xB9, 0xAB, FIL_, 0xCC, 0xA6, - FIL_, 0xC8, 0x9B, FIL_, 0x13, 0xCC, 0x81, FIL_, - 0xC3, 0xBA, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x97, - FIL_, 0xCC, 0x83, FIL_, 0xC5, 0xA9, FIL_, 0xCC, - 0x8F, FIL_, 0xC8, 0x95, FIL_, 0xCC, 0xA8, FIL_, - 0xC5, 0xB3, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xBB, - FIL_, 0xCC, 0x88, FIL_, 0xC3, 0xBC, FIL_, 0xCC, - 0x80, FIL_, 0xC3, 0xB9, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xBB, 0xA5, FIL_, 0xCC, 0xA4, FIL_, 0xE1, - 0xB9, 0xB3, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, - 0xA7, FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB9, 0xB5, - FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB7, FIL_, - 0xCC, 0x9B, FIL_, 0xC6, 0xB0, FIL_, 0xCC, 0x84, - FIL_, 0xC5, 0xAB, FIL_, 0xCC, 0x8B, FIL_, 0xC5, - 0xB1, FIL_, 0xCC, 0x86, FIL_, 0xC5, 0xAD, FIL_, - 0xCC, 0x8C, FIL_, 0xC7, 0x94, FIL_, 0xCC, 0x8A, - FIL_, 0xC5, 0xAF, FIL_, 0x02, 0xCC, 0x83, FIL_, - 0xE1, 0xB9, 0xBD, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xB9, 0xBF, FIL_, 0x07, 0xCC, 0x82, FIL_, 0xC5, - 0xB5, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0x81, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0x83, FIL_, - 0xCC, 0x88, FIL_, 0xE1, 0xBA, 0x85, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xBA, 0x89, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xBA, 0x87, FIL_, 0xCC, 0x8A, FIL_, - 0xE1, 0xBA, 0x98, FIL_, 0x02, 0xCC, 0x87, FIL_, - 0xE1, 0xBA, 0x8B, FIL_, 0xCC, 0x88, FIL_, 0xE1, - 0xBA, 0x8D, FIL_, 0x0A, 0xCC, 0x87, FIL_, 0xE1, - 0xBA, 0x8F, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, - 0xB9, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xB3, - FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0xB7, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xB5, FIL_, 0xCC, - 0x82, FIL_, 0xC5, 0xB7, FIL_, 0xCC, 0x84, FIL_, - 0xC8, 0xB3, FIL_, 0xCC, 0x8A, FIL_, 0xE1, 0xBA, - 0x99, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0xBF, FIL_, - 0xCC, 0x81, FIL_, 0xC3, 0xBD, FIL_, 0x06, 0xCC, - 0x8C, FIL_, 0xC5, 0xBE, FIL_, 0xCC, 0x87, FIL_, - 0xC5, 0xBC, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xBA, - 0x95, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x93, - FIL_, 0xCC, 0x81, FIL_, 0xC5, 0xBA, FIL_, 0xCC, - 0x82, FIL_, 0xE1, 0xBA, 0x91, FIL_, 0x03, 0xCC, - 0x80, FIL_, 0xE1, 0xBF, 0xAD, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBF, 0x81, FIL_, 0xCC, 0x81, FIL_, - 0xCE, 0x85, FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, - 0xBA, 0xA8, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBA, - 0xAA, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xA4, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xA6, FIL_, - 0x01, 0xCC, 0x84, FIL_, 0xC7, 0x9E, FIL_, 0x01, - 0xCC, 0x81, FIL_, 0xC7, 0xBA, FIL_, 0x02, 0xCC, - 0x84, FIL_, 0xC7, 0xA2, FIL_, 0xCC, 0x81, FIL_, - 0xC7, 0xBC, FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, - 0xB8, 0x88, FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, - 0xBA, 0xBE, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, - 0x80, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0x84, - FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x82, FIL_, - 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xAE, FIL_, - 0x04, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0x96, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x90, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBB, 0x92, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0x94, FIL_, 0x03, 0xCC, 0x84, - FIL_, 0xC8, 0xAC, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xB9, 0x8C, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB9, - 0x8E, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAA, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xC7, 0xBE, FIL_, - 0x04, 0xCC, 0x80, FIL_, 0xC7, 0x9B, FIL_, 0xCC, - 0x84, FIL_, 0xC7, 0x95, FIL_, 0xCC, 0x8C, FIL_, - 0xC7, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC7, 0x97, - FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA9, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xA7, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xA5, FIL_, 0xCC, - 0x83, FIL_, 0xE1, 0xBA, 0xAB, FIL_, 0x01, 0xCC, - 0x84, FIL_, 0xC7, 0x9F, FIL_, 0x01, 0xCC, 0x81, - FIL_, 0xC7, 0xBB, FIL_, 0x02, 0xCC, 0x84, FIL_, - 0xC7, 0xA3, FIL_, 0xCC, 0x81, FIL_, 0xC7, 0xBD, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x89, - FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x83, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xBF, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0x81, FIL_, 0xCC, - 0x83, FIL_, 0xE1, 0xBB, 0x85, FIL_, 0x01, 0xCC, - 0x81, FIL_, 0xE1, 0xB8, 0xAF, FIL_, 0x04, 0xCC, - 0x83, FIL_, 0xE1, 0xBB, 0x97, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0x95, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBB, 0x93, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xBB, 0x91, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, - 0xB9, 0x8D, FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xAD, - FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB9, 0x8F, FIL_, - 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAB, FIL_, 0x01, - 0xCC, 0x81, FIL_, 0xC7, 0xBF, FIL_, 0x04, 0xCC, - 0x81, FIL_, 0xC7, 0x98, FIL_, 0xCC, 0x84, FIL_, - 0xC7, 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x9A, - FIL_, 0xCC, 0x80, FIL_, 0xC7, 0x9C, FIL_, 0x04, - 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xB0, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBA, 0xAE, FIL_, 0xCC, 0x83, - FIL_, 0xE1, 0xBA, 0xB4, FIL_, 0xCC, 0x89, FIL_, - 0xE1, 0xBA, 0xB2, FIL_, 0x04, 0xCC, 0x80, FIL_, - 0xE1, 0xBA, 0xB1, FIL_, 0xCC, 0x83, FIL_, 0xE1, - 0xBA, 0xB5, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, - 0xAF, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xB3, - FIL_, 0x02, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x96, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x94, FIL_, - 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x95, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x97, FIL_, 0x02, - 0xCC, 0x80, FIL_, 0xE1, 0xB9, 0x90, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xB9, 0x92, FIL_, 0x02, 0xCC, - 0x80, FIL_, 0xE1, 0xB9, 0x91, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0x93, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA4, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA5, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA6, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA7, FIL_, 0x01, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0xB8, FIL_, 0x01, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0xB9, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xE1, 0xB9, 0xBA, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xE1, 0xB9, 0xBB, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xBA, 0x9B, FIL_, 0x05, 0xCC, 0x80, - FIL_, 0xE1, 0xBB, 0x9C, FIL_, 0xCC, 0x81, FIL_, - 0xE1, 0xBB, 0x9A, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xBB, 0xA2, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, - 0xA0, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x9E, - FIL_, 0x05, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xA1, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x9B, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xA3, FIL_, 0xCC, - 0x89, FIL_, 0xE1, 0xBB, 0x9F, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBB, 0x9D, FIL_, 0x05, 0xCC, 0x83, - FIL_, 0xE1, 0xBB, 0xAE, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xBB, 0xB0, FIL_, 0xCC, 0x89, FIL_, 0xE1, - 0xBB, 0xAC, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, - 0xA8, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xAA, - FIL_, 0x05, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xB1, - FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xAF, FIL_, - 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0xAD, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBB, 0xA9, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBB, 0xAB, FIL_, 0x01, 0xCC, 0x8C, - FIL_, 0xC7, 0xAE, FIL_, 0x01, 0xCC, 0x84, FIL_, - 0xC7, 0xAC, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, - 0xAD, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA0, - FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA1, FIL_, - 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9C, FIL_, - 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9D, FIL_, - 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xB0, FIL_, 0x01, - 0xCC, 0x84, FIL_, 0xC8, 0xB1, FIL_, 0x01, 0xCC, - 0x8C, FIL_, 0xC7, 0xAF, FIL_, 0x07, 0xCC, 0x93, - FIL_, 0xE1, 0xBC, 0x88, FIL_, 0xCC, 0x94, FIL_, - 0xE1, 0xBC, 0x89, FIL_, 0xCC, 0x81, FIL_, 0xCE, - 0x86, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xBC, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBE, 0xBA, FIL_, - 0xCC, 0x84, FIL_, 0xE1, 0xBE, 0xB9, FIL_, 0xCC, - 0x86, FIL_, 0xE1, 0xBE, 0xB8, FIL_, 0x04, 0xCC, - 0x81, FIL_, 0xCE, 0x88, FIL_, 0xCC, 0x94, FIL_, - 0xE1, 0xBC, 0x99, FIL_, 0xCC, 0x93, FIL_, 0xE1, - 0xBC, 0x98, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, - 0x88, FIL_, 0x05, 0xCC, 0x94, FIL_, 0xE1, 0xBC, - 0xA9, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x8A, - FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x89, FIL_, 0xCD, - 0x85, FIL_, 0xE1, 0xBF, 0x8C, FIL_, 0xCC, 0x93, - FIL_, 0xE1, 0xBC, 0xA8, FIL_, 0x07, 0xCC, 0x81, - FIL_, 0xCE, 0x8A, FIL_, 0xCC, 0x88, FIL_, 0xCE, - 0xAA, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0x98, - FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xBF, 0x99, FIL_, - 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0xB8, FIL_, 0xCC, - 0x94, FIL_, 0xE1, 0xBC, 0xB9, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBF, 0x9A, FIL_, 0x04, 0xCC, 0x94, - FIL_, 0xE1, 0xBD, 0x89, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBF, 0xB8, FIL_, 0xCC, 0x81, FIL_, 0xCE, - 0x8C, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, 0x88, - FIL_, 0x01, 0xCC, 0x94, FIL_, 0xE1, 0xBF, 0xAC, - FIL_, 0x06, 0xCC, 0x81, FIL_, 0xCE, 0x8E, FIL_, - 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0xA8, FIL_, 0xCC, - 0x94, FIL_, 0xE1, 0xBD, 0x99, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBF, 0xAA, FIL_, 0xCC, 0x84, FIL_, - 0xE1, 0xBF, 0xA9, FIL_, 0xCC, 0x88, FIL_, 0xCE, - 0xAB, FIL_, 0x05, 0xCC, 0x80, FIL_, 0xE1, 0xBF, - 0xBA, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x8F, FIL_, - 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xBC, FIL_, 0xCC, - 0x94, FIL_, 0xE1, 0xBD, 0xA9, FIL_, 0xCC, 0x93, - FIL_, 0xE1, 0xBD, 0xA8, FIL_, 0x01, 0xCD, 0x85, - FIL_, 0xE1, 0xBE, 0xB4, FIL_, 0x01, 0xCD, 0x85, - FIL_, 0xE1, 0xBF, 0x84, FIL_, 0x08, 0xCC, 0x81, - FIL_, 0xCE, 0xAC, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBD, 0xB0, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, - 0x80, FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0x81, - FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBE, 0xB6, FIL_, - 0xCC, 0x86, FIL_, 0xE1, 0xBE, 0xB0, FIL_, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xB3, FIL_, 0xCC, 0x84, - FIL_, 0xE1, 0xBE, 0xB1, FIL_, 0x04, 0xCC, 0x81, - FIL_, 0xCE, 0xAD, FIL_, 0xCC, 0x94, FIL_, 0xE1, - 0xBC, 0x91, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, - 0xB2, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0x90, - FIL_, 0x06, 0xCC, 0x81, FIL_, 0xCE, 0xAE, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xB4, FIL_, 0xCD, - 0x85, FIL_, 0xE1, 0xBF, 0x83, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBF, 0x86, FIL_, 0xCC, 0x94, FIL_, - 0xE1, 0xBC, 0xA1, FIL_, 0xCC, 0x93, FIL_, 0xE1, - 0xBC, 0xA0, FIL_, 0x08, 0xCD, 0x82, FIL_, 0xE1, - 0xBF, 0x96, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, - 0x90, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0xB0, - FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAF, FIL_, 0xCC, - 0x94, FIL_, 0xE1, 0xBC, 0xB1, FIL_, 0xCC, 0x84, - FIL_, 0xE1, 0xBF, 0x91, FIL_, 0xCC, 0x88, FIL_, - 0xCF, 0x8A, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, - 0xB6, FIL_, 0x04, 0xCC, 0x81, FIL_, 0xCF, 0x8C, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xB8, FIL_, - 0xCC, 0x93, FIL_, 0xE1, 0xBD, 0x80, FIL_, 0xCC, - 0x94, FIL_, 0xE1, 0xBD, 0x81, FIL_, 0x02, 0xCC, - 0x93, FIL_, 0xE1, 0xBF, 0xA4, FIL_, 0xCC, 0x94, - FIL_, 0xE1, 0xBF, 0xA5, FIL_, 0x08, 0xCC, 0x93, - FIL_, 0xE1, 0xBD, 0x90, FIL_, 0xCC, 0x94, FIL_, - 0xE1, 0xBD, 0x91, FIL_, 0xCC, 0x86, FIL_, 0xE1, - 0xBF, 0xA0, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, - 0xA6, FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xBF, 0xA1, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xBA, FIL_, - 0xCC, 0x81, FIL_, 0xCF, 0x8D, FIL_, 0xCC, 0x88, - FIL_, 0xCF, 0x8B, FIL_, 0x06, 0xCC, 0x94, FIL_, - 0xE1, 0xBD, 0xA1, FIL_, 0xCD, 0x85, FIL_, 0xE1, - 0xBF, 0xB3, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, - 0xBC, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0xB6, - FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, 0xA0, FIL_, - 0xCC, 0x81, FIL_, 0xCF, 0x8E, FIL_, 0x03, 0xCD, - 0x82, FIL_, 0xE1, 0xBF, 0x97, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBF, 0x92, FIL_, 0xCC, 0x81, FIL_, - 0xCE, 0x90, FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, - 0xBF, 0xA2, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xB0, - FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0xA7, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB4, FIL_, - 0x02, 0xCC, 0x88, FIL_, 0xCF, 0x94, FIL_, 0xCC, - 0x81, FIL_, 0xCF, 0x93, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xD0, 0x87, FIL_, 0x02, 0xCC, 0x86, FIL_, - 0xD3, 0x90, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x92, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x83, FIL_, - 0x03, 0xCC, 0x86, FIL_, 0xD3, 0x96, FIL_, 0xCC, - 0x80, FIL_, 0xD0, 0x80, FIL_, 0xCC, 0x88, FIL_, - 0xD0, 0x81, FIL_, 0x02, 0xCC, 0x88, FIL_, 0xD3, - 0x9C, FIL_, 0xCC, 0x86, FIL_, 0xD3, 0x81, FIL_, - 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9E, FIL_, 0x04, - 0xCC, 0x80, FIL_, 0xD0, 0x8D, FIL_, 0xCC, 0x88, - FIL_, 0xD3, 0xA4, FIL_, 0xCC, 0x86, FIL_, 0xD0, - 0x99, FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xA2, FIL_, - 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x8C, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xA6, FIL_, 0x04, 0xCC, - 0x86, FIL_, 0xD0, 0x8E, FIL_, 0xCC, 0x8B, FIL_, - 0xD3, 0xB2, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0xB0, - FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xAE, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xB4, FIL_, 0x01, 0xCC, - 0x88, FIL_, 0xD3, 0xB8, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xD3, 0xAC, FIL_, 0x02, 0xCC, 0x86, FIL_, - 0xD3, 0x91, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x93, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x93, FIL_, - 0x03, 0xCC, 0x80, FIL_, 0xD1, 0x90, FIL_, 0xCC, - 0x88, FIL_, 0xD1, 0x91, FIL_, 0xCC, 0x86, FIL_, - 0xD3, 0x97, FIL_, 0x02, 0xCC, 0x88, FIL_, 0xD3, - 0x9D, FIL_, 0xCC, 0x86, FIL_, 0xD3, 0x82, FIL_, - 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9F, FIL_, 0x04, - 0xCC, 0x88, FIL_, 0xD3, 0xA5, FIL_, 0xCC, 0x86, - FIL_, 0xD0, 0xB9, FIL_, 0xCC, 0x80, FIL_, 0xD1, - 0x9D, FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xA3, FIL_, - 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x9C, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xA7, FIL_, 0x04, 0xCC, - 0x84, FIL_, 0xD3, 0xAF, FIL_, 0xCC, 0x86, FIL_, - 0xD1, 0x9E, FIL_, 0xCC, 0x8B, FIL_, 0xD3, 0xB3, - FIL_, 0xCC, 0x88, FIL_, 0xD3, 0xB1, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xB5, FIL_, 0x01, 0xCC, - 0x88, FIL_, 0xD3, 0xB9, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xD3, 0xAD, FIL_, 0x01, 0xCC, 0x88, FIL_, - 0xD1, 0x97, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, - 0xB6, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, 0xB7, - FIL_, 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9A, FIL_, - 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9B, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xAA, FIL_, 0x01, 0xCC, - 0x88, FIL_, 0xD3, 0xAB, FIL_, 0x03, 0xD9, 0x94, - FIL_, 0xD8, 0xA3, FIL_, 0xD9, 0x93, FIL_, 0xD8, - 0xA2, FIL_, 0xD9, 0x95, FIL_, 0xD8, 0xA5, FIL_, - 0x01, 0xD9, 0x94, FIL_, 0xD8, 0xA4, FIL_, 0x01, - 0xD9, 0x94, FIL_, 0xD8, 0xA6, FIL_, 0x01, 0xD9, - 0x94, FIL_, 0xDB, 0x82, FIL_, 0x01, 0xD9, 0x94, - FIL_, 0xDB, 0x93, FIL_, 0x01, 0xD9, 0x94, FIL_, - 0xDB, 0x80, FIL_, 0x01, 0xE0, 0xA4, 0xBC, FIL_, - 0xE0, 0xA4, 0xA9, FIL_, 0x01, 0xE0, 0xA4, 0xBC, - FIL_, 0xE0, 0xA4, 0xB1, FIL_, 0x01, 0xE0, 0xA4, - 0xBC, FIL_, 0xE0, 0xA4, 0xB4, FIL_, 0x02, 0xE0, - 0xA6, 0xBE, FIL_, 0xE0, 0xA7, 0x8B, FIL_, 0xE0, - 0xA7, 0x97, FIL_, 0xE0, 0xA7, 0x8C, FIL_, 0x03, - 0xE0, 0xAD, 0x97, FIL_, 0xE0, 0xAD, 0x8C, FIL_, - 0xE0, 0xAC, 0xBE, FIL_, 0xE0, 0xAD, 0x8B, FIL_, - 0xE0, 0xAD, 0x96, FIL_, 0xE0, 0xAD, 0x88, FIL_, - 0x01, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAE, 0x94, - FIL_, 0x02, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, 0xAF, - 0x8A, FIL_, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAF, - 0x8C, FIL_, 0x01, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, - 0xAF, 0x8B, FIL_, 0x01, 0xE0, 0xB1, 0x96, FIL_, - 0xE0, 0xB1, 0x88, FIL_, 0x01, 0xE0, 0xB3, 0x95, - FIL_, 0xE0, 0xB3, 0x80, FIL_, 0x03, 0xE0, 0xB3, - 0x95, FIL_, 0xE0, 0xB3, 0x87, FIL_, 0xE0, 0xB3, - 0x82, FIL_, 0xE0, 0xB3, 0x8A, FIL_, 0xE0, 0xB3, - 0x96, FIL_, 0xE0, 0xB3, 0x88, FIL_, 0x01, 0xE0, - 0xB3, 0x95, FIL_, 0xE0, 0xB3, 0x8B, FIL_, 0x02, - 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8A, FIL_, - 0xE0, 0xB5, 0x97, FIL_, 0xE0, 0xB5, 0x8C, FIL_, - 0x01, 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8B, - FIL_, 0x03, 0xE0, 0xB7, 0x8F, FIL_, 0xE0, 0xB7, - 0x9C, FIL_, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, 0xB7, - 0x9A, FIL_, 0xE0, 0xB7, 0x9F, FIL_, 0xE0, 0xB7, - 0x9E, FIL_, 0x01, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, - 0xB7, 0x9D, FIL_, 0x01, 0xE1, 0x80, 0xAE, FIL_, - 0xE1, 0x80, 0xA6, FIL_, 0x01, 0xCC, 0x84, FIL_, - 0xE1, 0xB8, 0xB8, FIL_, 0x01, 0xCC, 0x84, FIL_, - 0xE1, 0xB8, 0xB9, FIL_, 0x01, 0xCC, 0x84, FIL_, - 0xE1, 0xB9, 0x9C, FIL_, 0x01, 0xCC, 0x84, FIL_, - 0xE1, 0xB9, 0x9D, FIL_, 0x01, 0xCC, 0x87, FIL_, - 0xE1, 0xB9, 0xA8, FIL_, 0x01, 0xCC, 0x87, FIL_, - 0xE1, 0xB9, 0xA9, FIL_, 0x02, 0xCC, 0x86, FIL_, - 0xE1, 0xBA, 0xB6, FIL_, 0xCC, 0x82, FIL_, 0xE1, - 0xBA, 0xAC, FIL_, 0x02, 0xCC, 0x86, FIL_, 0xE1, - 0xBA, 0xB7, FIL_, 0xCC, 0x82, FIL_, 0xE1, 0xBA, - 0xAD, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, - 0x86, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, - 0x87, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, - 0x98, FIL_, 0x01, 0xCC, 0x82, FIL_, 0xE1, 0xBB, - 0x99, FIL_, 0x04, 0xCC, 0x80, FIL_, 0xE1, 0xBC, - 0x82, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x84, - FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x80, FIL_, - 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0x86, FIL_, 0x04, - 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0x87, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBC, 0x83, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xBC, 0x85, FIL_, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x81, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x82, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x83, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x84, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x85, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x86, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x87, FIL_, 0x04, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x88, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBC, 0x8A, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, - 0x8E, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x8C, - FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x8D, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x8B, FIL_, - 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0x8F, FIL_, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x89, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x8A, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x8B, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x8C, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x8D, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x8E, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x8F, FIL_, 0x02, 0xCC, - 0x80, FIL_, 0xE1, 0xBC, 0x92, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xBC, 0x94, FIL_, 0x02, 0xCC, 0x80, - FIL_, 0xE1, 0xBC, 0x93, FIL_, 0xCC, 0x81, FIL_, - 0xE1, 0xBC, 0x95, FIL_, 0x02, 0xCC, 0x80, FIL_, - 0xE1, 0xBC, 0x9A, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xBC, 0x9C, FIL_, 0x02, 0xCC, 0x80, FIL_, 0xE1, - 0xBC, 0x9B, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, - 0x9D, FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBC, - 0xA6, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x90, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xA4, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xA2, FIL_, 0x04, - 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xA3, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBC, 0xA5, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBC, 0xA7, FIL_, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x91, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x92, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x93, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x94, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x95, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x96, FIL_, 0x01, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0x97, FIL_, 0x04, 0xCD, 0x82, FIL_, - 0xE1, 0xBC, 0xAE, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xBC, 0xAC, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, - 0x98, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xAA, - FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xAF, - FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x99, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xAD, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBC, 0xAB, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x9A, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x9B, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x9C, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x9D, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x9E, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0x9F, FIL_, 0x03, 0xCC, - 0x81, FIL_, 0xE1, 0xBC, 0xB4, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBC, 0xB6, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBC, 0xB2, FIL_, 0x03, 0xCC, 0x81, FIL_, - 0xE1, 0xBC, 0xB5, FIL_, 0xCD, 0x82, FIL_, 0xE1, - 0xBC, 0xB7, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, - 0xB3, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xBC, - 0xBC, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xBA, - FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xBE, FIL_, - 0x03, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xBB, FIL_, - 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xBF, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBC, 0xBD, FIL_, 0x02, 0xCC, - 0x80, FIL_, 0xE1, 0xBD, 0x82, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xBD, 0x84, FIL_, 0x02, 0xCC, 0x80, - FIL_, 0xE1, 0xBD, 0x83, FIL_, 0xCC, 0x81, FIL_, - 0xE1, 0xBD, 0x85, FIL_, 0x02, 0xCC, 0x81, FIL_, - 0xE1, 0xBD, 0x8C, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBD, 0x8A, FIL_, 0x02, 0xCC, 0x81, FIL_, 0xE1, - 0xBD, 0x8D, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, - 0x8B, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xBD, - 0x94, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0x96, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x92, FIL_, - 0x03, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0x97, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x95, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBD, 0x93, FIL_, 0x03, 0xCC, - 0x81, FIL_, 0xE1, 0xBD, 0x9D, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBD, 0x9F, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBD, 0x9B, FIL_, 0x04, 0xCC, 0x81, FIL_, - 0xE1, 0xBD, 0xA4, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBD, 0xA2, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, - 0xA6, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA0, - FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xA7, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0xA5, FIL_, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA1, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBD, 0xA3, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA2, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA3, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA4, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA5, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA6, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA7, FIL_, 0x04, 0xCC, - 0x81, FIL_, 0xE1, 0xBD, 0xAC, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBD, 0xAA, FIL_, 0xCD, 0x82, FIL_, - 0xE1, 0xBD, 0xAE, FIL_, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xA8, FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, - 0xBD, 0xAD, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, - 0xA9, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xAF, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xAB, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAA, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAB, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAC, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAD, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAE, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xAF, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xB2, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0x82, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB2, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xB7, FIL_, - 0x03, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0x8F, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x8D, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBF, 0x8E, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBF, 0x87, FIL_, 0x01, 0xCD, - 0x85, FIL_, 0xE1, 0xBF, 0xB7, FIL_, 0x03, 0xCC, - 0x80, FIL_, 0xE1, 0xBF, 0x9D, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBF, 0x9F, FIL_, 0xCC, 0x81, FIL_, - 0xE1, 0xBF, 0x9E, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x86, 0x9A, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x86, 0x9B, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x86, 0xAE, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x87, 0x8D, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x87, 0x8F, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x87, 0x8E, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x88, 0x84, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x88, 0x89, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x88, 0x8C, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x88, 0xA4, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x88, 0xA6, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0x81, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0x84, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0x87, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0x89, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xAD, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xA2, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xB0, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xB1, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xB4, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xB5, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xB8, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x89, 0xB9, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0x80, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0x81, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xA0, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xA1, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0x84, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0x85, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0x88, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0x89, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xA2, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xA3, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0xAC, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0xAD, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0xAE, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8A, 0xAF, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xAA, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xAB, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xAC, FIL_, 0x01, 0xCC, 0xB8, FIL_, - 0xE2, 0x8B, 0xAD, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x82, 0x94, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x81, 0x8C, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x81, 0x8E, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x90, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x92, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, - 0x94, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x81, 0x96, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x81, 0x98, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x81, 0x9A, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x81, 0x9C, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x81, 0x9E, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xA0, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xA2, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, - 0xA5, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x81, 0xA7, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x81, 0xA9, FIL_, 0x02, 0xE3, 0x82, 0x9A, - FIL_, 0xE3, 0x81, 0xB1, FIL_, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x81, 0xB0, FIL_, 0x02, 0xE3, 0x82, - 0x9A, FIL_, 0xE3, 0x81, 0xB4, FIL_, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x81, 0xB3, FIL_, 0x02, 0xE3, - 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xB7, FIL_, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB6, FIL_, 0x02, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB9, FIL_, - 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xBA, FIL_, - 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xBC, - FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xBD, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, - 0x9E, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x83, 0xB4, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x82, 0xAC, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x82, 0xAE, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x82, 0xB0, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB2, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB4, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB6, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, - 0xB8, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x82, 0xBA, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x82, 0xBC, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x82, 0xBE, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x83, 0x80, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x83, 0x82, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x85, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x87, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, - 0x89, FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x83, 0x90, FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, - 0x83, 0x91, FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x83, 0x93, FIL_, 0xE3, 0x82, 0x9A, FIL_, - 0xE3, 0x83, 0x94, FIL_, 0x02, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x83, 0x96, FIL_, 0xE3, 0x82, 0x9A, - FIL_, 0xE3, 0x83, 0x97, FIL_, 0x02, 0xE3, 0x82, - 0x9A, FIL_, 0xE3, 0x83, 0x9A, FIL_, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x83, 0x99, FIL_, 0x02, 0xE3, - 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x9D, FIL_, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x83, 0x9C, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0xB7, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0xB8, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, - 0xB9, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x83, 0xBA, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x83, 0xBE, FIL_, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - }, - { - 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_, - 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA0, FIL_, - 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAF, FIL_, - 0x10, 0xCC, 0xA5, FIL_, 0xE1, 0xB8, 0x80, FIL_, - 0xCC, 0x87, FIL_, 0xC8, 0xA6, FIL_, 0xCC, 0x83, - FIL_, 0xC3, 0x83, FIL_, 0xCC, 0x91, FIL_, 0xC8, - 0x82, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x80, FIL_, - 0xCC, 0x8A, FIL_, 0xC3, 0x85, FIL_, 0xCC, 0x88, - FIL_, 0xC3, 0x84, FIL_, 0xCC, 0x89, FIL_, 0xE1, - 0xBA, 0xA2, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, - 0xA0, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x8D, FIL_, - 0xCC, 0x80, FIL_, 0xC3, 0x80, FIL_, 0xCC, 0x81, - FIL_, 0xC3, 0x81, FIL_, 0xCC, 0x82, FIL_, 0xC3, - 0x82, FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x84, FIL_, - 0xCC, 0x86, FIL_, 0xC4, 0x82, FIL_, 0xCC, 0x84, - FIL_, 0xC4, 0x80, FIL_, 0x03, 0xCC, 0xB1, FIL_, - 0xE1, 0xB8, 0x86, FIL_, 0xCC, 0x87, FIL_, 0xE1, - 0xB8, 0x82, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0x84, FIL_, 0x05, 0xCC, 0xA7, FIL_, 0xC3, 0x87, - FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x8C, FIL_, 0xCC, - 0x81, FIL_, 0xC4, 0x86, FIL_, 0xCC, 0x82, FIL_, - 0xC4, 0x88, FIL_, 0xCC, 0x87, FIL_, 0xC4, 0x8A, - FIL_, 0x06, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0x90, - FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x8E, FIL_, 0xCC, - 0xB1, FIL_, 0xE1, 0xB8, 0x8E, FIL_, 0xCC, 0xAD, - FIL_, 0xE1, 0xB8, 0x92, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xB8, 0x8C, FIL_, 0xCC, 0x87, FIL_, 0xE1, - 0xB8, 0x8A, FIL_, 0x11, 0xCC, 0x84, FIL_, 0xC4, - 0x92, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x94, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0xB8, FIL_, 0xCC, - 0x91, FIL_, 0xC8, 0x86, FIL_, 0xCC, 0x82, FIL_, - 0xC3, 0x8A, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x84, - FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x98, FIL_, - 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xBA, FIL_, 0xCC, - 0xA7, FIL_, 0xC8, 0xA8, FIL_, 0xCC, 0x8C, FIL_, - 0xC4, 0x9A, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x88, - FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x98, FIL_, 0xCC, - 0x83, FIL_, 0xE1, 0xBA, 0xBC, FIL_, 0xCC, 0x87, - FIL_, 0xC4, 0x96, FIL_, 0xCC, 0x81, FIL_, 0xC3, - 0x89, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x8B, FIL_, - 0xCC, 0xB0, FIL_, 0xE1, 0xB8, 0x9A, FIL_, 0x01, - 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9E, FIL_, 0x07, - 0xCC, 0x8C, FIL_, 0xC7, 0xA6, FIL_, 0xCC, 0x86, - FIL_, 0xC4, 0x9E, FIL_, 0xCC, 0x82, FIL_, 0xC4, - 0x9C, FIL_, 0xCC, 0xA7, FIL_, 0xC4, 0xA2, FIL_, - 0xCC, 0x84, FIL_, 0xE1, 0xB8, 0xA0, FIL_, 0xCC, - 0x81, FIL_, 0xC7, 0xB4, FIL_, 0xCC, 0x87, FIL_, - 0xC4, 0xA0, FIL_, 0x07, 0xCC, 0x87, FIL_, 0xE1, - 0xB8, 0xA2, FIL_, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, - 0xA8, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0xA4, FIL_, - 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA6, FIL_, 0xCC, - 0x8C, FIL_, 0xC8, 0x9E, FIL_, 0xCC, 0xAE, FIL_, - 0xE1, 0xB8, 0xAA, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xB8, 0xA4, FIL_, 0x0F, 0xCC, 0xB0, FIL_, 0xE1, - 0xB8, 0xAC, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x8F, - FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x8C, FIL_, 0xCC, - 0x89, FIL_, 0xE1, 0xBB, 0x88, FIL_, 0xCC, 0xA3, - FIL_, 0xE1, 0xBB, 0x8A, FIL_, 0xCC, 0x91, FIL_, - 0xC8, 0x8A, FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x8F, - FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x8E, FIL_, 0xCC, - 0x81, FIL_, 0xC3, 0x8D, FIL_, 0xCC, 0x83, FIL_, - 0xC4, 0xA8, FIL_, 0xCC, 0x87, FIL_, 0xC4, 0xB0, - FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x88, FIL_, 0xCC, - 0xA8, FIL_, 0xC4, 0xAE, FIL_, 0xCC, 0x86, FIL_, - 0xC4, 0xAC, FIL_, 0xCC, 0x84, FIL_, 0xC4, 0xAA, - FIL_, 0x01, 0xCC, 0x82, FIL_, 0xC4, 0xB4, FIL_, - 0x05, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xB0, FIL_, - 0xCC, 0x8C, FIL_, 0xC7, 0xA8, FIL_, 0xCC, 0xB1, - FIL_, 0xE1, 0xB8, 0xB4, FIL_, 0xCC, 0xA7, FIL_, - 0xC4, 0xB6, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0xB2, FIL_, 0x06, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0xB6, FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0xBD, FIL_, - 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0xBC, FIL_, 0xCC, - 0xB1, FIL_, 0xE1, 0xB8, 0xBA, FIL_, 0xCC, 0xA7, - FIL_, 0xC4, 0xBB, FIL_, 0xCC, 0x81, FIL_, 0xC4, - 0xB9, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xB8, - 0xBE, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x80, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x82, FIL_, - 0x09, 0xCC, 0x83, FIL_, 0xC3, 0x91, FIL_, 0xCC, - 0x81, FIL_, 0xC5, 0x83, FIL_, 0xCC, 0xA7, FIL_, - 0xC5, 0x85, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0x87, - FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x84, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x86, FIL_, 0xCC, - 0xB1, FIL_, 0xE1, 0xB9, 0x88, FIL_, 0xCC, 0xAD, - FIL_, 0xE1, 0xB9, 0x8A, FIL_, 0xCC, 0x80, FIL_, - 0xC7, 0xB8, FIL_, 0x10, 0xCC, 0x89, FIL_, 0xE1, - 0xBB, 0x8E, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0x8C, - FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x94, FIL_, 0xCC, - 0x86, FIL_, 0xC5, 0x8E, FIL_, 0xCC, 0x83, FIL_, - 0xC3, 0x95, FIL_, 0xCC, 0x8B, FIL_, 0xC5, 0x90, - FIL_, 0xCC, 0x88, FIL_, 0xC3, 0x96, FIL_, 0xCC, - 0x9B, FIL_, 0xC6, 0xA0, FIL_, 0xCC, 0x91, FIL_, - 0xC8, 0x8E, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x91, - FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x8C, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xBB, 0x8C, FIL_, 0xCC, 0x80, - FIL_, 0xC3, 0x92, FIL_, 0xCC, 0xA8, FIL_, 0xC7, - 0xAA, FIL_, 0xCC, 0x87, FIL_, 0xC8, 0xAE, FIL_, - 0xCC, 0x81, FIL_, 0xC3, 0x93, FIL_, 0x02, 0xCC, - 0x87, FIL_, 0xE1, 0xB9, 0x96, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0x94, FIL_, 0x08, 0xCC, 0xA7, - FIL_, 0xC5, 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC5, - 0x98, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x92, FIL_, - 0xCC, 0x8F, FIL_, 0xC8, 0x90, FIL_, 0xCC, 0x81, - FIL_, 0xC5, 0x94, FIL_, 0xCC, 0x87, FIL_, 0xE1, - 0xB9, 0x98, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB9, - 0x9E, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x9A, - FIL_, 0x07, 0xCC, 0xA6, FIL_, 0xC8, 0x98, FIL_, - 0xCC, 0x81, FIL_, 0xC5, 0x9A, FIL_, 0xCC, 0x82, - FIL_, 0xC5, 0x9C, FIL_, 0xCC, 0xA7, FIL_, 0xC5, - 0x9E, FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0xA0, FIL_, - 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA0, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xB9, 0xA2, FIL_, 0x07, 0xCC, - 0xA6, FIL_, 0xC8, 0x9A, FIL_, 0xCC, 0x87, FIL_, - 0xE1, 0xB9, 0xAA, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xB9, 0xAC, FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB9, - 0xAE, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB0, - FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0xA2, FIL_, 0xCC, - 0x8C, FIL_, 0xC5, 0xA4, FIL_, 0x13, 0xCC, 0x8A, - FIL_, 0xC5, 0xAE, FIL_, 0xCC, 0x88, FIL_, 0xC3, - 0x9C, FIL_, 0xCC, 0x8B, FIL_, 0xC5, 0xB0, FIL_, - 0xCC, 0xAD, FIL_, 0xE1, 0xB9, 0xB6, FIL_, 0xCC, - 0xA8, FIL_, 0xC5, 0xB2, FIL_, 0xCC, 0x8C, FIL_, - 0xC7, 0x93, FIL_, 0xCC, 0x80, FIL_, 0xC3, 0x99, - FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x94, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xBB, 0xA4, FIL_, 0xCC, 0xA4, - FIL_, 0xE1, 0xB9, 0xB2, FIL_, 0xCC, 0x81, FIL_, - 0xC3, 0x9A, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0x9B, - FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB9, 0xB4, FIL_, - 0xCC, 0x83, FIL_, 0xC5, 0xA8, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0xA6, FIL_, 0xCC, 0x84, FIL_, - 0xC5, 0xAA, FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x96, - FIL_, 0xCC, 0x86, FIL_, 0xC5, 0xAC, FIL_, 0xCC, - 0x9B, FIL_, 0xC6, 0xAF, FIL_, 0x02, 0xCC, 0xA3, - FIL_, 0xE1, 0xB9, 0xBE, FIL_, 0xCC, 0x83, FIL_, - 0xE1, 0xB9, 0xBC, FIL_, 0x06, 0xCC, 0x88, FIL_, - 0xE1, 0xBA, 0x84, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xBA, 0x82, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, - 0x80, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x88, - FIL_, 0xCC, 0x82, FIL_, 0xC5, 0xB4, FIL_, 0xCC, - 0x87, FIL_, 0xE1, 0xBA, 0x86, FIL_, 0x02, 0xCC, - 0x88, FIL_, 0xE1, 0xBA, 0x8C, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xBA, 0x8A, FIL_, 0x09, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0xB6, FIL_, 0xCC, 0xA3, FIL_, - 0xE1, 0xBB, 0xB4, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBB, 0xB2, FIL_, 0xCC, 0x88, FIL_, 0xC5, 0xB8, - FIL_, 0xCC, 0x81, FIL_, 0xC3, 0x9D, FIL_, 0xCC, - 0x83, FIL_, 0xE1, 0xBB, 0xB8, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xBA, 0x8E, FIL_, 0xCC, 0x84, FIL_, - 0xC8, 0xB2, FIL_, 0xCC, 0x82, FIL_, 0xC5, 0xB6, - FIL_, 0x06, 0xCC, 0x82, FIL_, 0xE1, 0xBA, 0x90, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0x92, FIL_, - 0xCC, 0xB1, FIL_, 0xE1, 0xBA, 0x94, FIL_, 0xCC, - 0x8C, FIL_, 0xC5, 0xBD, FIL_, 0xCC, 0x87, FIL_, - 0xC5, 0xBB, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0xB9, - FIL_, 0x10, 0xCC, 0xA3, FIL_, 0xE1, 0xBA, 0xA1, - FIL_, 0xCC, 0xA8, FIL_, 0xC4, 0x85, FIL_, 0xCC, - 0x81, FIL_, 0xC3, 0xA1, FIL_, 0xCC, 0x82, FIL_, - 0xC3, 0xA2, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, - 0xA3, FIL_, 0xCC, 0x83, FIL_, 0xC3, 0xA3, FIL_, - 0xCC, 0x8C, FIL_, 0xC7, 0x8E, FIL_, 0xCC, 0x8A, - FIL_, 0xC3, 0xA5, FIL_, 0xCC, 0x88, FIL_, 0xC3, - 0xA4, FIL_, 0xCC, 0x87, FIL_, 0xC8, 0xA7, FIL_, - 0xCC, 0x91, FIL_, 0xC8, 0x83, FIL_, 0xCC, 0xA5, - FIL_, 0xE1, 0xB8, 0x81, FIL_, 0xCC, 0x84, FIL_, - 0xC4, 0x81, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x81, - FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x83, FIL_, 0xCC, - 0x80, FIL_, 0xC3, 0xA0, FIL_, 0x03, 0xCC, 0xA3, - FIL_, 0xE1, 0xB8, 0x85, FIL_, 0xCC, 0x87, FIL_, - 0xE1, 0xB8, 0x83, FIL_, 0xCC, 0xB1, FIL_, 0xE1, - 0xB8, 0x87, FIL_, 0x05, 0xCC, 0x87, FIL_, 0xC4, - 0x8B, FIL_, 0xCC, 0x8C, FIL_, 0xC4, 0x8D, FIL_, - 0xCC, 0x82, FIL_, 0xC4, 0x89, FIL_, 0xCC, 0x81, - FIL_, 0xC4, 0x87, FIL_, 0xCC, 0xA7, FIL_, 0xC3, - 0xA7, FIL_, 0x06, 0xCC, 0x87, FIL_, 0xE1, 0xB8, - 0x8B, FIL_, 0xCC, 0xA7, FIL_, 0xE1, 0xB8, 0x91, - FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0x8F, FIL_, - 0xCC, 0xA3, FIL_, 0xE1, 0xB8, 0x8D, FIL_, 0xCC, - 0x8C, FIL_, 0xC4, 0x8F, FIL_, 0xCC, 0xAD, FIL_, - 0xE1, 0xB8, 0x93, FIL_, 0x11, 0xCC, 0x80, FIL_, - 0xC3, 0xA8, FIL_, 0xCC, 0x81, FIL_, 0xC3, 0xA9, - FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xAA, FIL_, 0xCC, - 0x88, FIL_, 0xC3, 0xAB, FIL_, 0xCC, 0x84, FIL_, - 0xC4, 0x93, FIL_, 0xCC, 0x86, FIL_, 0xC4, 0x95, - FIL_, 0xCC, 0x87, FIL_, 0xC4, 0x97, FIL_, 0xCC, - 0xA8, FIL_, 0xC4, 0x99, FIL_, 0xCC, 0x8C, FIL_, - 0xC4, 0x9B, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x85, - FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x87, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xBA, 0xB9, FIL_, 0xCC, 0xA7, - FIL_, 0xC8, 0xA9, FIL_, 0xCC, 0x83, FIL_, 0xE1, - 0xBA, 0xBD, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, - 0xBB, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0x99, - FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB8, 0x9B, FIL_, - 0x01, 0xCC, 0x87, FIL_, 0xE1, 0xB8, 0x9F, FIL_, - 0x07, 0xCC, 0x86, FIL_, 0xC4, 0x9F, FIL_, 0xCC, - 0x87, FIL_, 0xC4, 0xA1, FIL_, 0xCC, 0x82, FIL_, - 0xC4, 0x9D, FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xB8, - 0xA1, FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0xA7, FIL_, - 0xCC, 0xA7, FIL_, 0xC4, 0xA3, FIL_, 0xCC, 0x81, - FIL_, 0xC7, 0xB5, FIL_, 0x08, 0xCC, 0xA7, FIL_, - 0xE1, 0xB8, 0xA9, FIL_, 0xCC, 0xB1, FIL_, 0xE1, - 0xBA, 0x96, FIL_, 0xCC, 0x8C, FIL_, 0xC8, 0x9F, - FIL_, 0xCC, 0xAE, FIL_, 0xE1, 0xB8, 0xAB, FIL_, - 0xCC, 0x88, FIL_, 0xE1, 0xB8, 0xA7, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xB8, 0xA5, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xB8, 0xA3, FIL_, 0xCC, 0x82, FIL_, - 0xC4, 0xA5, FIL_, 0x0E, 0xCC, 0x88, FIL_, 0xC3, - 0xAF, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x89, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0x8B, FIL_, - 0xCC, 0x82, FIL_, 0xC3, 0xAE, FIL_, 0xCC, 0x81, - FIL_, 0xC3, 0xAD, FIL_, 0xCC, 0x80, FIL_, 0xC3, - 0xAC, FIL_, 0xCC, 0x83, FIL_, 0xC4, 0xA9, FIL_, - 0xCC, 0x84, FIL_, 0xC4, 0xAB, FIL_, 0xCC, 0x86, - FIL_, 0xC4, 0xAD, FIL_, 0xCC, 0xA8, FIL_, 0xC4, - 0xAF, FIL_, 0xCC, 0xB0, FIL_, 0xE1, 0xB8, 0xAD, - FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x90, FIL_, 0xCC, - 0x91, FIL_, 0xC8, 0x8B, FIL_, 0xCC, 0x8F, FIL_, - 0xC8, 0x89, FIL_, 0x02, 0xCC, 0x8C, FIL_, 0xC7, - 0xB0, FIL_, 0xCC, 0x82, FIL_, 0xC4, 0xB5, FIL_, - 0x05, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0xB5, FIL_, - 0xCC, 0xA7, FIL_, 0xC4, 0xB7, FIL_, 0xCC, 0x8C, - FIL_, 0xC7, 0xA9, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xB8, 0xB1, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0xB3, FIL_, 0x06, 0xCC, 0xA3, FIL_, 0xE1, 0xB8, - 0xB7, FIL_, 0xCC, 0xAD, FIL_, 0xE1, 0xB8, 0xBD, - FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB8, 0xBB, FIL_, - 0xCC, 0xA7, FIL_, 0xC4, 0xBC, FIL_, 0xCC, 0x81, - FIL_, 0xC4, 0xBA, FIL_, 0xCC, 0x8C, FIL_, 0xC4, - 0xBE, FIL_, 0x03, 0xCC, 0x87, FIL_, 0xE1, 0xB9, - 0x81, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x83, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xBF, FIL_, - 0x09, 0xCC, 0x80, FIL_, 0xC7, 0xB9, FIL_, 0xCC, - 0xAD, FIL_, 0xE1, 0xB9, 0x8B, FIL_, 0xCC, 0x83, - FIL_, 0xC3, 0xB1, FIL_, 0xCC, 0x81, FIL_, 0xC5, - 0x84, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0x87, - FIL_, 0xCC, 0xB1, FIL_, 0xE1, 0xB9, 0x89, FIL_, - 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0x85, FIL_, 0xCC, - 0xA7, FIL_, 0xC5, 0x86, FIL_, 0xCC, 0x8C, FIL_, - 0xC5, 0x88, FIL_, 0x10, 0xCC, 0xA3, FIL_, 0xE1, - 0xBB, 0x8D, FIL_, 0xCC, 0x87, FIL_, 0xC8, 0xAF, - FIL_, 0xCC, 0x80, FIL_, 0xC3, 0xB2, FIL_, 0xCC, - 0x91, FIL_, 0xC8, 0x8F, FIL_, 0xCC, 0x89, FIL_, - 0xE1, 0xBB, 0x8F, FIL_, 0xCC, 0x88, FIL_, 0xC3, - 0xB6, FIL_, 0xCC, 0x83, FIL_, 0xC3, 0xB5, FIL_, - 0xCC, 0x81, FIL_, 0xC3, 0xB3, FIL_, 0xCC, 0x8C, - FIL_, 0xC7, 0x92, FIL_, 0xCC, 0xA8, FIL_, 0xC7, - 0xAB, FIL_, 0xCC, 0x9B, FIL_, 0xC6, 0xA1, FIL_, - 0xCC, 0x84, FIL_, 0xC5, 0x8D, FIL_, 0xCC, 0x86, - FIL_, 0xC5, 0x8F, FIL_, 0xCC, 0x8B, FIL_, 0xC5, - 0x91, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xB4, FIL_, - 0xCC, 0x8F, FIL_, 0xC8, 0x8D, FIL_, 0x02, 0xCC, - 0x87, FIL_, 0xE1, 0xB9, 0x97, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0x95, FIL_, 0x08, 0xCC, 0x8C, - FIL_, 0xC5, 0x99, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xB9, 0x9B, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0x95, - FIL_, 0xCC, 0xA7, FIL_, 0xC5, 0x97, FIL_, 0xCC, - 0xB1, FIL_, 0xE1, 0xB9, 0x9F, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0x99, FIL_, 0xCC, 0x91, FIL_, - 0xC8, 0x93, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x91, - FIL_, 0x07, 0xCC, 0xA7, FIL_, 0xC5, 0x9F, FIL_, - 0xCC, 0x82, FIL_, 0xC5, 0x9D, FIL_, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA1, FIL_, 0xCC, 0xA6, FIL_, - 0xC8, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC5, 0x9B, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, 0xA3, FIL_, - 0xCC, 0x8C, FIL_, 0xC5, 0xA1, FIL_, 0x08, 0xCC, - 0xA6, FIL_, 0xC8, 0x9B, FIL_, 0xCC, 0xAD, FIL_, - 0xE1, 0xB9, 0xB1, FIL_, 0xCC, 0xB1, FIL_, 0xE1, - 0xB9, 0xAF, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xB9, - 0xAD, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xAB, - FIL_, 0xCC, 0x8C, FIL_, 0xC5, 0xA5, FIL_, 0xCC, - 0xA7, FIL_, 0xC5, 0xA3, FIL_, 0xCC, 0x88, FIL_, - 0xE1, 0xBA, 0x97, FIL_, 0x13, 0xCC, 0x8A, FIL_, - 0xC5, 0xAF, FIL_, 0xCC, 0x8F, FIL_, 0xC8, 0x95, - FIL_, 0xCC, 0x8C, FIL_, 0xC7, 0x94, FIL_, 0xCC, - 0x80, FIL_, 0xC3, 0xB9, FIL_, 0xCC, 0x9B, FIL_, - 0xC6, 0xB0, FIL_, 0xCC, 0x82, FIL_, 0xC3, 0xBB, - FIL_, 0xCC, 0x81, FIL_, 0xC3, 0xBA, FIL_, 0xCC, - 0x88, FIL_, 0xC3, 0xBC, FIL_, 0xCC, 0x83, FIL_, - 0xC5, 0xA9, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, - 0xA7, FIL_, 0xCC, 0x84, FIL_, 0xC5, 0xAB, FIL_, - 0xCC, 0x86, FIL_, 0xC5, 0xAD, FIL_, 0xCC, 0xAD, - FIL_, 0xE1, 0xB9, 0xB7, FIL_, 0xCC, 0x8B, FIL_, - 0xC5, 0xB1, FIL_, 0xCC, 0xA8, FIL_, 0xC5, 0xB3, - FIL_, 0xCC, 0x91, FIL_, 0xC8, 0x97, FIL_, 0xCC, - 0xA4, FIL_, 0xE1, 0xB9, 0xB3, FIL_, 0xCC, 0xA3, - FIL_, 0xE1, 0xBB, 0xA5, FIL_, 0xCC, 0xB0, FIL_, - 0xE1, 0xB9, 0xB5, FIL_, 0x02, 0xCC, 0x83, FIL_, - 0xE1, 0xB9, 0xBD, FIL_, 0xCC, 0xA3, FIL_, 0xE1, - 0xB9, 0xBF, FIL_, 0x07, 0xCC, 0x8A, FIL_, 0xE1, - 0xBA, 0x98, FIL_, 0xCC, 0x87, FIL_, 0xE1, 0xBA, - 0x87, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0x83, - FIL_, 0xCC, 0x82, FIL_, 0xC5, 0xB5, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBA, 0x81, FIL_, 0xCC, 0xA3, - FIL_, 0xE1, 0xBA, 0x89, FIL_, 0xCC, 0x88, FIL_, - 0xE1, 0xBA, 0x85, FIL_, 0x02, 0xCC, 0x87, FIL_, - 0xE1, 0xBA, 0x8B, FIL_, 0xCC, 0x88, FIL_, 0xE1, - 0xBA, 0x8D, FIL_, 0x0A, 0xCC, 0x87, FIL_, 0xE1, - 0xBA, 0x8F, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, - 0xB5, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0xB7, - FIL_, 0xCC, 0x8A, FIL_, 0xE1, 0xBA, 0x99, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xB3, FIL_, 0xCC, - 0x83, FIL_, 0xE1, 0xBB, 0xB9, FIL_, 0xCC, 0x88, - FIL_, 0xC3, 0xBF, FIL_, 0xCC, 0x81, FIL_, 0xC3, - 0xBD, FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xB3, FIL_, - 0xCC, 0x82, FIL_, 0xC5, 0xB7, FIL_, 0x06, 0xCC, - 0xB1, FIL_, 0xE1, 0xBA, 0x95, FIL_, 0xCC, 0xA3, - FIL_, 0xE1, 0xBA, 0x93, FIL_, 0xCC, 0x82, FIL_, - 0xE1, 0xBA, 0x91, FIL_, 0xCC, 0x81, FIL_, 0xC5, - 0xBA, FIL_, 0xCC, 0x87, FIL_, 0xC5, 0xBC, FIL_, - 0xCC, 0x8C, FIL_, 0xC5, 0xBE, FIL_, 0x03, 0xCC, - 0x80, FIL_, 0xE1, 0xBF, 0xAD, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBF, 0x81, FIL_, 0xCC, 0x81, FIL_, - 0xCE, 0x85, FIL_, 0x04, 0xCC, 0x83, FIL_, 0xE1, - 0xBA, 0xAA, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, - 0xA4, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA8, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBA, 0xA6, FIL_, - 0x01, 0xCC, 0x84, FIL_, 0xC7, 0x9E, FIL_, 0x01, - 0xCC, 0x81, FIL_, 0xC7, 0xBA, FIL_, 0x02, 0xCC, - 0x84, FIL_, 0xC7, 0xA2, FIL_, 0xCC, 0x81, FIL_, - 0xC7, 0xBC, FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, - 0xB8, 0x88, FIL_, 0x04, 0xCC, 0x83, FIL_, 0xE1, - 0xBB, 0x84, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBB, - 0x80, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x82, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xBE, FIL_, - 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0xAE, FIL_, - 0x04, 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x90, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0x92, FIL_, 0xCC, - 0x89, FIL_, 0xE1, 0xBB, 0x94, FIL_, 0xCC, 0x83, - FIL_, 0xE1, 0xBB, 0x96, FIL_, 0x03, 0xCC, 0x84, - FIL_, 0xC8, 0xAC, FIL_, 0xCC, 0x88, FIL_, 0xE1, - 0xB9, 0x8E, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xB9, - 0x8C, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAA, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xC7, 0xBE, FIL_, - 0x04, 0xCC, 0x80, FIL_, 0xC7, 0x9B, FIL_, 0xCC, - 0x84, FIL_, 0xC7, 0x95, FIL_, 0xCC, 0x8C, FIL_, - 0xC7, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xC7, 0x97, - FIL_, 0x04, 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xA5, - FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBA, 0xAB, FIL_, - 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xA9, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBA, 0xA7, FIL_, 0x01, 0xCC, - 0x84, FIL_, 0xC7, 0x9F, FIL_, 0x01, 0xCC, 0x81, - FIL_, 0xC7, 0xBB, FIL_, 0x02, 0xCC, 0x81, FIL_, - 0xC7, 0xBD, FIL_, 0xCC, 0x84, FIL_, 0xC7, 0xA3, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x89, - FIL_, 0x04, 0xCC, 0x89, FIL_, 0xE1, 0xBB, 0x83, - FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0x85, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0x81, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBA, 0xBF, FIL_, 0x01, 0xCC, - 0x81, FIL_, 0xE1, 0xB8, 0xAF, FIL_, 0x04, 0xCC, - 0x80, FIL_, 0xE1, 0xBB, 0x93, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xBB, 0x91, FIL_, 0xCC, 0x83, FIL_, - 0xE1, 0xBB, 0x97, FIL_, 0xCC, 0x89, FIL_, 0xE1, - 0xBB, 0x95, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, - 0xB9, 0x8D, FIL_, 0xCC, 0x88, FIL_, 0xE1, 0xB9, - 0x8F, FIL_, 0xCC, 0x84, FIL_, 0xC8, 0xAD, FIL_, - 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xAB, FIL_, 0x01, - 0xCC, 0x81, FIL_, 0xC7, 0xBF, FIL_, 0x04, 0xCC, - 0x8C, FIL_, 0xC7, 0x9A, FIL_, 0xCC, 0x84, FIL_, - 0xC7, 0x96, FIL_, 0xCC, 0x80, FIL_, 0xC7, 0x9C, - FIL_, 0xCC, 0x81, FIL_, 0xC7, 0x98, FIL_, 0x04, - 0xCC, 0x81, FIL_, 0xE1, 0xBA, 0xAE, FIL_, 0xCC, - 0x83, FIL_, 0xE1, 0xBA, 0xB4, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBA, 0xB2, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBA, 0xB0, FIL_, 0x04, 0xCC, 0x83, FIL_, - 0xE1, 0xBA, 0xB5, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBA, 0xB1, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBA, - 0xAF, FIL_, 0xCC, 0x89, FIL_, 0xE1, 0xBA, 0xB3, - FIL_, 0x02, 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x96, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x94, FIL_, - 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xB8, 0x95, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xB8, 0x97, FIL_, 0x02, - 0xCC, 0x80, FIL_, 0xE1, 0xB9, 0x90, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xB9, 0x92, FIL_, 0x02, 0xCC, - 0x81, FIL_, 0xE1, 0xB9, 0x93, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xB9, 0x91, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA4, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA5, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA6, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xB9, 0xA7, FIL_, 0x01, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0xB8, FIL_, 0x01, 0xCC, 0x81, - FIL_, 0xE1, 0xB9, 0xB9, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xE1, 0xB9, 0xBA, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xE1, 0xB9, 0xBB, FIL_, 0x01, 0xCC, 0x87, - FIL_, 0xE1, 0xBA, 0x9B, FIL_, 0x05, 0xCC, 0x80, - FIL_, 0xE1, 0xBB, 0x9C, FIL_, 0xCC, 0x89, FIL_, - 0xE1, 0xBB, 0x9E, FIL_, 0xCC, 0x83, FIL_, 0xE1, - 0xBB, 0xA0, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, - 0x9A, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xA2, - FIL_, 0x05, 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xA1, - FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xA3, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0x9B, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBB, 0x9D, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0x9F, FIL_, 0x05, 0xCC, 0x81, - FIL_, 0xE1, 0xBB, 0xA8, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBB, 0xAA, FIL_, 0xCC, 0x89, FIL_, 0xE1, - 0xBB, 0xAC, FIL_, 0xCC, 0x83, FIL_, 0xE1, 0xBB, - 0xAE, FIL_, 0xCC, 0xA3, FIL_, 0xE1, 0xBB, 0xB0, - FIL_, 0x05, 0xCC, 0x80, FIL_, 0xE1, 0xBB, 0xAB, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBB, 0xA9, FIL_, - 0xCC, 0x83, FIL_, 0xE1, 0xBB, 0xAF, FIL_, 0xCC, - 0xA3, FIL_, 0xE1, 0xBB, 0xB1, FIL_, 0xCC, 0x89, - FIL_, 0xE1, 0xBB, 0xAD, FIL_, 0x01, 0xCC, 0x8C, - FIL_, 0xC7, 0xAE, FIL_, 0x01, 0xCC, 0x84, FIL_, - 0xC7, 0xAC, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, - 0xAD, FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA0, - FIL_, 0x01, 0xCC, 0x84, FIL_, 0xC7, 0xA1, FIL_, - 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9C, FIL_, - 0x01, 0xCC, 0x86, FIL_, 0xE1, 0xB8, 0x9D, FIL_, - 0x01, 0xCC, 0x84, FIL_, 0xC8, 0xB0, FIL_, 0x01, - 0xCC, 0x84, FIL_, 0xC8, 0xB1, FIL_, 0x01, 0xCC, - 0x8C, FIL_, 0xC7, 0xAF, FIL_, 0x07, 0xCC, 0x93, - FIL_, 0xE1, 0xBC, 0x88, FIL_, 0xCC, 0x81, FIL_, - 0xCE, 0x86, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBE, - 0xB8, FIL_, 0xCC, 0x84, FIL_, 0xE1, 0xBE, 0xB9, - FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0x89, FIL_, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xBC, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBE, 0xBA, FIL_, 0x04, 0xCC, - 0x94, FIL_, 0xE1, 0xBC, 0x99, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBF, 0x88, FIL_, 0xCC, 0x81, FIL_, - 0xCE, 0x88, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBC, - 0x98, FIL_, 0x05, 0xCD, 0x85, FIL_, 0xE1, 0xBF, - 0x8C, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x89, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x8A, FIL_, 0xCC, - 0x93, FIL_, 0xE1, 0xBC, 0xA8, FIL_, 0xCC, 0x94, - FIL_, 0xE1, 0xBC, 0xA9, FIL_, 0x07, 0xCC, 0x80, - FIL_, 0xE1, 0xBF, 0x9A, FIL_, 0xCC, 0x84, FIL_, - 0xE1, 0xBF, 0x99, FIL_, 0xCC, 0x93, FIL_, 0xE1, - 0xBC, 0xB8, FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBC, - 0xB9, FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0x98, - FIL_, 0xCC, 0x81, FIL_, 0xCE, 0x8A, FIL_, 0xCC, - 0x88, FIL_, 0xCE, 0xAA, FIL_, 0x04, 0xCC, 0x81, - FIL_, 0xCE, 0x8C, FIL_, 0xCC, 0x94, FIL_, 0xE1, - 0xBD, 0x89, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, - 0x88, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0xB8, - FIL_, 0x01, 0xCC, 0x94, FIL_, 0xE1, 0xBF, 0xAC, - FIL_, 0x06, 0xCC, 0x94, FIL_, 0xE1, 0xBD, 0x99, - FIL_, 0xCC, 0x86, FIL_, 0xE1, 0xBF, 0xA8, FIL_, - 0xCC, 0x88, FIL_, 0xCE, 0xAB, FIL_, 0xCC, 0x84, - FIL_, 0xE1, 0xBF, 0xA9, FIL_, 0xCC, 0x81, FIL_, - 0xCE, 0x8E, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, - 0xAA, FIL_, 0x05, 0xCC, 0x93, FIL_, 0xE1, 0xBD, - 0xA8, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xBC, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0xBA, FIL_, - 0xCC, 0x94, FIL_, 0xE1, 0xBD, 0xA9, FIL_, 0xCC, - 0x81, FIL_, 0xCE, 0x8F, FIL_, 0x01, 0xCD, 0x85, - FIL_, 0xE1, 0xBE, 0xB4, FIL_, 0x01, 0xCD, 0x85, - FIL_, 0xE1, 0xBF, 0x84, FIL_, 0x08, 0xCD, 0x85, - FIL_, 0xE1, 0xBE, 0xB3, FIL_, 0xCC, 0x84, FIL_, - 0xE1, 0xBE, 0xB1, FIL_, 0xCC, 0x86, FIL_, 0xE1, - 0xBE, 0xB0, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, - 0xB0, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAC, FIL_, - 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0x81, FIL_, 0xCC, - 0x93, FIL_, 0xE1, 0xBC, 0x80, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBE, 0xB6, FIL_, 0x04, 0xCC, 0x93, - FIL_, 0xE1, 0xBC, 0x90, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBD, 0xB2, FIL_, 0xCC, 0x94, FIL_, 0xE1, - 0xBC, 0x91, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAD, - FIL_, 0x06, 0xCC, 0x94, FIL_, 0xE1, 0xBC, 0xA1, - FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAE, FIL_, 0xCD, - 0x85, FIL_, 0xE1, 0xBF, 0x83, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBF, 0x86, FIL_, 0xCC, 0x93, FIL_, - 0xE1, 0xBC, 0xA0, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBD, 0xB4, FIL_, 0x08, 0xCC, 0x88, FIL_, 0xCF, - 0x8A, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xAF, FIL_, - 0xCC, 0x93, FIL_, 0xE1, 0xBC, 0xB0, FIL_, 0xCC, - 0x94, FIL_, 0xE1, 0xBC, 0xB1, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBD, 0xB6, FIL_, 0xCC, 0x86, FIL_, - 0xE1, 0xBF, 0x90, FIL_, 0xCC, 0x84, FIL_, 0xE1, - 0xBF, 0x91, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, - 0x96, FIL_, 0x04, 0xCC, 0x93, FIL_, 0xE1, 0xBD, - 0x80, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xB8, - FIL_, 0xCC, 0x94, FIL_, 0xE1, 0xBD, 0x81, FIL_, - 0xCC, 0x81, FIL_, 0xCF, 0x8C, FIL_, 0x02, 0xCC, - 0x93, FIL_, 0xE1, 0xBF, 0xA4, FIL_, 0xCC, 0x94, - FIL_, 0xE1, 0xBF, 0xA5, FIL_, 0x08, 0xCC, 0x81, - FIL_, 0xCF, 0x8D, FIL_, 0xCC, 0x94, FIL_, 0xE1, - 0xBD, 0x91, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, - 0xA6, FIL_, 0xCC, 0x88, FIL_, 0xCF, 0x8B, FIL_, - 0xCC, 0x84, FIL_, 0xE1, 0xBF, 0xA1, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBD, 0xBA, FIL_, 0xCC, 0x93, - FIL_, 0xE1, 0xBD, 0x90, FIL_, 0xCC, 0x86, FIL_, - 0xE1, 0xBF, 0xA0, FIL_, 0x06, 0xCC, 0x80, FIL_, - 0xE1, 0xBD, 0xBC, FIL_, 0xCC, 0x94, FIL_, 0xE1, - 0xBD, 0xA1, FIL_, 0xCC, 0x93, FIL_, 0xE1, 0xBD, - 0xA0, FIL_, 0xCC, 0x81, FIL_, 0xCF, 0x8E, FIL_, - 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB3, FIL_, 0xCD, - 0x82, FIL_, 0xE1, 0xBF, 0xB6, FIL_, 0x03, 0xCC, - 0x80, FIL_, 0xE1, 0xBF, 0x92, FIL_, 0xCD, 0x82, - FIL_, 0xE1, 0xBF, 0x97, FIL_, 0xCC, 0x81, FIL_, - 0xCE, 0x90, FIL_, 0x03, 0xCD, 0x82, FIL_, 0xE1, - 0xBF, 0xA7, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, - 0xA2, FIL_, 0xCC, 0x81, FIL_, 0xCE, 0xB0, FIL_, - 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB4, FIL_, - 0x02, 0xCC, 0x88, FIL_, 0xCF, 0x94, FIL_, 0xCC, - 0x81, FIL_, 0xCF, 0x93, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xD0, 0x87, FIL_, 0x02, 0xCC, 0x88, FIL_, - 0xD3, 0x92, FIL_, 0xCC, 0x86, FIL_, 0xD3, 0x90, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x83, FIL_, - 0x03, 0xCC, 0x88, FIL_, 0xD0, 0x81, FIL_, 0xCC, - 0x80, FIL_, 0xD0, 0x80, FIL_, 0xCC, 0x86, FIL_, - 0xD3, 0x96, FIL_, 0x02, 0xCC, 0x86, FIL_, 0xD3, - 0x81, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x9C, FIL_, - 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9E, FIL_, 0x04, - 0xCC, 0x84, FIL_, 0xD3, 0xA2, FIL_, 0xCC, 0x88, - FIL_, 0xD3, 0xA4, FIL_, 0xCC, 0x86, FIL_, 0xD0, - 0x99, FIL_, 0xCC, 0x80, FIL_, 0xD0, 0x8D, FIL_, - 0x01, 0xCC, 0x81, FIL_, 0xD0, 0x8C, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xA6, FIL_, 0x04, 0xCC, - 0x8B, FIL_, 0xD3, 0xB2, FIL_, 0xCC, 0x88, FIL_, - 0xD3, 0xB0, FIL_, 0xCC, 0x86, FIL_, 0xD0, 0x8E, - FIL_, 0xCC, 0x84, FIL_, 0xD3, 0xAE, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xB4, FIL_, 0x01, 0xCC, - 0x88, FIL_, 0xD3, 0xB8, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xD3, 0xAC, FIL_, 0x02, 0xCC, 0x86, FIL_, - 0xD3, 0x91, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x93, - FIL_, 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x93, FIL_, - 0x03, 0xCC, 0x80, FIL_, 0xD1, 0x90, FIL_, 0xCC, - 0x86, FIL_, 0xD3, 0x97, FIL_, 0xCC, 0x88, FIL_, - 0xD1, 0x91, FIL_, 0x02, 0xCC, 0x86, FIL_, 0xD3, - 0x82, FIL_, 0xCC, 0x88, FIL_, 0xD3, 0x9D, FIL_, - 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9F, FIL_, 0x04, - 0xCC, 0x86, FIL_, 0xD0, 0xB9, FIL_, 0xCC, 0x88, - FIL_, 0xD3, 0xA5, FIL_, 0xCC, 0x84, FIL_, 0xD3, - 0xA3, FIL_, 0xCC, 0x80, FIL_, 0xD1, 0x9D, FIL_, - 0x01, 0xCC, 0x81, FIL_, 0xD1, 0x9C, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xA7, FIL_, 0x04, 0xCC, - 0x8B, FIL_, 0xD3, 0xB3, FIL_, 0xCC, 0x84, FIL_, - 0xD3, 0xAF, FIL_, 0xCC, 0x86, FIL_, 0xD1, 0x9E, - FIL_, 0xCC, 0x88, FIL_, 0xD3, 0xB1, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xB5, FIL_, 0x01, 0xCC, - 0x88, FIL_, 0xD3, 0xB9, FIL_, 0x01, 0xCC, 0x88, - FIL_, 0xD3, 0xAD, FIL_, 0x01, 0xCC, 0x88, FIL_, - 0xD1, 0x97, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, - 0xB6, FIL_, 0x01, 0xCC, 0x8F, FIL_, 0xD1, 0xB7, - FIL_, 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9A, FIL_, - 0x01, 0xCC, 0x88, FIL_, 0xD3, 0x9B, FIL_, 0x01, - 0xCC, 0x88, FIL_, 0xD3, 0xAA, FIL_, 0x01, 0xCC, - 0x88, FIL_, 0xD3, 0xAB, FIL_, 0x03, 0xD9, 0x94, - FIL_, 0xD8, 0xA3, FIL_, 0xD9, 0x95, FIL_, 0xD8, - 0xA5, FIL_, 0xD9, 0x93, FIL_, 0xD8, 0xA2, FIL_, - 0x01, 0xD9, 0x94, FIL_, 0xD8, 0xA4, FIL_, 0x01, - 0xD9, 0x94, FIL_, 0xD8, 0xA6, FIL_, 0x01, 0xD9, - 0x94, FIL_, 0xDB, 0x82, FIL_, 0x01, 0xD9, 0x94, - FIL_, 0xDB, 0x93, FIL_, 0x01, 0xD9, 0x94, FIL_, - 0xDB, 0x80, FIL_, 0x01, 0xE0, 0xA4, 0xBC, FIL_, - 0xE0, 0xA4, 0xA9, FIL_, 0x01, 0xE0, 0xA4, 0xBC, - FIL_, 0xE0, 0xA4, 0xB1, FIL_, 0x01, 0xE0, 0xA4, - 0xBC, FIL_, 0xE0, 0xA4, 0xB4, FIL_, 0x02, 0xE0, - 0xA6, 0xBE, FIL_, 0xE0, 0xA7, 0x8B, FIL_, 0xE0, - 0xA7, 0x97, FIL_, 0xE0, 0xA7, 0x8C, FIL_, 0x03, - 0xE0, 0xAD, 0x96, FIL_, 0xE0, 0xAD, 0x88, FIL_, - 0xE0, 0xAC, 0xBE, FIL_, 0xE0, 0xAD, 0x8B, FIL_, - 0xE0, 0xAD, 0x97, FIL_, 0xE0, 0xAD, 0x8C, FIL_, - 0x01, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAE, 0x94, - FIL_, 0x02, 0xE0, 0xAF, 0x97, FIL_, 0xE0, 0xAF, - 0x8C, FIL_, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, 0xAF, - 0x8A, FIL_, 0x01, 0xE0, 0xAE, 0xBE, FIL_, 0xE0, - 0xAF, 0x8B, FIL_, 0x01, 0xE0, 0xB1, 0x96, FIL_, - 0xE0, 0xB1, 0x88, FIL_, 0x01, 0xE0, 0xB3, 0x95, - FIL_, 0xE0, 0xB3, 0x80, FIL_, 0x03, 0xE0, 0xB3, - 0x82, FIL_, 0xE0, 0xB3, 0x8A, FIL_, 0xE0, 0xB3, - 0x96, FIL_, 0xE0, 0xB3, 0x88, FIL_, 0xE0, 0xB3, - 0x95, FIL_, 0xE0, 0xB3, 0x87, FIL_, 0x01, 0xE0, - 0xB3, 0x95, FIL_, 0xE0, 0xB3, 0x8B, FIL_, 0x02, - 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8A, FIL_, - 0xE0, 0xB5, 0x97, FIL_, 0xE0, 0xB5, 0x8C, FIL_, - 0x01, 0xE0, 0xB4, 0xBE, FIL_, 0xE0, 0xB5, 0x8B, - FIL_, 0x03, 0xE0, 0xB7, 0x9F, FIL_, 0xE0, 0xB7, - 0x9E, FIL_, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, 0xB7, - 0x9A, FIL_, 0xE0, 0xB7, 0x8F, FIL_, 0xE0, 0xB7, - 0x9C, FIL_, 0x01, 0xE0, 0xB7, 0x8A, FIL_, 0xE0, - 0xB7, 0x9D, FIL_, 0x01, 0xE1, 0x80, 0xAE, FIL_, - 0xE1, 0x80, 0xA6, FIL_, 0x01, 0xE1, 0xAC, 0xB5, - FIL_, 0xE1, 0xAC, 0x86, FIL_, 0x01, 0xE1, 0xAC, - 0xB5, FIL_, 0xE1, 0xAC, 0x88, FIL_, 0x01, 0xE1, - 0xAC, 0xB5, FIL_, 0xE1, 0xAC, 0x8A, FIL_, 0x01, - 0xE1, 0xAC, 0xB5, FIL_, 0xE1, 0xAC, 0x8C, FIL_, - 0x01, 0xE1, 0xAC, 0xB5, FIL_, 0xE1, 0xAC, 0x8E, - FIL_, 0x01, 0xE1, 0xAC, 0xB5, FIL_, 0xE1, 0xAC, - 0x92, FIL_, 0x01, 0xE1, 0xAC, 0xB5, FIL_, 0xE1, - 0xAC, 0xBB, FIL_, 0x01, 0xE1, 0xAC, 0xB5, FIL_, - 0xE1, 0xAC, 0xBD, FIL_, 0x01, 0xE1, 0xAC, 0xB5, - FIL_, 0xE1, 0xAD, 0x80, FIL_, 0x01, 0xE1, 0xAC, - 0xB5, FIL_, 0xE1, 0xAD, 0x81, FIL_, 0x01, 0xE1, - 0xAC, 0xB5, FIL_, 0xE1, 0xAD, 0x83, FIL_, 0x01, - 0xCC, 0x84, FIL_, 0xE1, 0xB8, 0xB8, FIL_, 0x01, - 0xCC, 0x84, FIL_, 0xE1, 0xB8, 0xB9, FIL_, 0x01, - 0xCC, 0x84, FIL_, 0xE1, 0xB9, 0x9C, FIL_, 0x01, - 0xCC, 0x84, FIL_, 0xE1, 0xB9, 0x9D, FIL_, 0x01, - 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA8, FIL_, 0x01, - 0xCC, 0x87, FIL_, 0xE1, 0xB9, 0xA9, FIL_, 0x02, - 0xCC, 0x86, FIL_, 0xE1, 0xBA, 0xB6, FIL_, 0xCC, - 0x82, FIL_, 0xE1, 0xBA, 0xAC, FIL_, 0x02, 0xCC, - 0x82, FIL_, 0xE1, 0xBA, 0xAD, FIL_, 0xCC, 0x86, - FIL_, 0xE1, 0xBA, 0xB7, FIL_, 0x01, 0xCC, 0x82, - FIL_, 0xE1, 0xBB, 0x86, FIL_, 0x01, 0xCC, 0x82, - FIL_, 0xE1, 0xBB, 0x87, FIL_, 0x01, 0xCC, 0x82, - FIL_, 0xE1, 0xBB, 0x98, FIL_, 0x01, 0xCC, 0x82, - FIL_, 0xE1, 0xBB, 0x99, FIL_, 0x04, 0xCD, 0x85, - FIL_, 0xE1, 0xBE, 0x80, FIL_, 0xCD, 0x82, FIL_, - 0xE1, 0xBC, 0x86, FIL_, 0xCC, 0x80, FIL_, 0xE1, - 0xBC, 0x82, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, - 0x84, FIL_, 0x04, 0xCD, 0x82, FIL_, 0xE1, 0xBC, - 0x87, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x85, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x83, FIL_, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x81, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x82, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x83, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x84, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x85, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x86, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x87, FIL_, 0x04, - 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x8C, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBC, 0x8A, FIL_, 0xCD, 0x85, - FIL_, 0xE1, 0xBE, 0x88, FIL_, 0xCD, 0x82, FIL_, - 0xE1, 0xBC, 0x8E, FIL_, 0x04, 0xCC, 0x80, FIL_, - 0xE1, 0xBC, 0x8B, FIL_, 0xCD, 0x82, FIL_, 0xE1, - 0xBC, 0x8F, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, - 0x8D, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x89, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8A, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8B, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8C, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8D, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8E, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x8F, - FIL_, 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x92, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x94, FIL_, - 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x93, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0x95, FIL_, 0x02, - 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0x9A, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBC, 0x9C, FIL_, 0x02, 0xCC, - 0x80, FIL_, 0xE1, 0xBC, 0x9B, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xBC, 0x9D, FIL_, 0x04, 0xCC, 0x80, - FIL_, 0xE1, 0xBC, 0xA2, FIL_, 0xCC, 0x81, FIL_, - 0xE1, 0xBC, 0xA4, FIL_, 0xCD, 0x82, FIL_, 0xE1, - 0xBC, 0xA6, FIL_, 0xCD, 0x85, FIL_, 0xE1, 0xBE, - 0x90, FIL_, 0x04, 0xCD, 0x85, FIL_, 0xE1, 0xBE, - 0x91, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xA5, - FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xA7, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xA3, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x92, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x93, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x94, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x95, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x96, FIL_, 0x01, - 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x97, FIL_, 0x04, - 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xAC, FIL_, 0xCC, - 0x80, FIL_, 0xE1, 0xBC, 0xAA, FIL_, 0xCD, 0x85, - FIL_, 0xE1, 0xBE, 0x98, FIL_, 0xCD, 0x82, FIL_, - 0xE1, 0xBC, 0xAE, FIL_, 0x04, 0xCD, 0x82, FIL_, - 0xE1, 0xBC, 0xAF, FIL_, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0x99, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, - 0xAD, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xAB, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9A, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9B, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9C, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9D, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9E, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0x9F, - FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xB4, - FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xB2, FIL_, - 0xCD, 0x82, FIL_, 0xE1, 0xBC, 0xB6, FIL_, 0x03, - 0xCC, 0x80, FIL_, 0xE1, 0xBC, 0xB3, FIL_, 0xCD, - 0x82, FIL_, 0xE1, 0xBC, 0xB7, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xBC, 0xB5, FIL_, 0x03, 0xCC, 0x81, - FIL_, 0xE1, 0xBC, 0xBC, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBC, 0xBA, FIL_, 0xCD, 0x82, FIL_, 0xE1, - 0xBC, 0xBE, FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, - 0xBC, 0xBB, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBC, - 0xBF, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBC, 0xBD, - FIL_, 0x02, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x82, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x84, FIL_, - 0x02, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x85, FIL_, - 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x83, FIL_, 0x02, - 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x8A, FIL_, 0xCC, - 0x81, FIL_, 0xE1, 0xBD, 0x8C, FIL_, 0x02, 0xCC, - 0x80, FIL_, 0xE1, 0xBD, 0x8B, FIL_, 0xCC, 0x81, - FIL_, 0xE1, 0xBD, 0x8D, FIL_, 0x03, 0xCD, 0x82, - FIL_, 0xE1, 0xBD, 0x96, FIL_, 0xCC, 0x80, FIL_, - 0xE1, 0xBD, 0x92, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xBD, 0x94, FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, - 0xBD, 0x93, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, - 0x97, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x95, - FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0x9B, - FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0x9F, FIL_, - 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0x9D, FIL_, 0x04, - 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xA6, FIL_, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA0, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBD, 0xA2, FIL_, 0xCC, 0x81, FIL_, - 0xE1, 0xBD, 0xA4, FIL_, 0x04, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0xA1, FIL_, 0xCD, 0x82, FIL_, 0xE1, - 0xBD, 0xA7, FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, - 0xA5, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xA3, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA2, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA3, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA4, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA5, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA6, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBE, 0xA7, - FIL_, 0x04, 0xCC, 0x80, FIL_, 0xE1, 0xBD, 0xAA, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBD, 0xAC, FIL_, - 0xCD, 0x82, FIL_, 0xE1, 0xBD, 0xAE, FIL_, 0xCD, - 0x85, FIL_, 0xE1, 0xBE, 0xA8, FIL_, 0x04, 0xCD, - 0x82, FIL_, 0xE1, 0xBD, 0xAF, FIL_, 0xCC, 0x80, - FIL_, 0xE1, 0xBD, 0xAB, FIL_, 0xCD, 0x85, FIL_, - 0xE1, 0xBE, 0xA9, FIL_, 0xCC, 0x81, FIL_, 0xE1, - 0xBD, 0xAD, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xAA, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xAB, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xAC, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xAD, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xAE, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xAF, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xB2, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBF, 0x82, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBF, 0xB2, FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, - 0xBE, 0xB7, FIL_, 0x03, 0xCC, 0x81, FIL_, 0xE1, - 0xBF, 0x8E, FIL_, 0xCC, 0x80, FIL_, 0xE1, 0xBF, - 0x8D, FIL_, 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0x8F, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0x87, - FIL_, 0x01, 0xCD, 0x85, FIL_, 0xE1, 0xBF, 0xB7, - FIL_, 0x03, 0xCC, 0x80, FIL_, 0xE1, 0xBF, 0x9D, - FIL_, 0xCC, 0x81, FIL_, 0xE1, 0xBF, 0x9E, FIL_, - 0xCD, 0x82, FIL_, 0xE1, 0xBF, 0x9F, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x86, 0x9A, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x86, 0x9B, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x86, 0xAE, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x87, 0x8D, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x87, 0x8F, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x87, 0x8E, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0x84, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0x89, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0x8C, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0xA4, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x88, 0xA6, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x81, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x84, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x87, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0x89, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAD, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA2, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB0, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB1, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB4, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB5, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB8, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xB9, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x80, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x81, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA0, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA1, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x84, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x85, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x88, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0x89, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA2, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xA3, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAC, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAD, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAE, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8A, 0xAF, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAA, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAB, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAC, FIL_, 0x01, - 0xCC, 0xB8, FIL_, 0xE2, 0x8B, 0xAD, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0x94, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x8C, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, - 0x8E, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x81, 0x90, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x81, 0x92, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x81, 0x94, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x81, 0x96, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x81, 0x98, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x9A, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0x9C, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, - 0x9E, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x81, 0xA0, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x81, 0xA2, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x81, 0xA5, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x81, 0xA7, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x81, 0xA9, FIL_, 0x02, - 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xB1, FIL_, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB0, FIL_, - 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, 0xB3, - FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, 0xB4, - FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x81, - 0xB6, FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x81, - 0xB7, FIL_, 0x02, 0xE3, 0x82, 0x9A, FIL_, 0xE3, - 0x81, 0xBA, FIL_, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x81, 0xB9, FIL_, 0x02, 0xE3, 0x82, 0x9A, FIL_, - 0xE3, 0x81, 0xBD, FIL_, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x81, 0xBC, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x82, 0x9E, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x83, 0xB4, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x82, 0xAC, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xAE, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xB0, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, - 0xB2, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x82, 0xB4, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x82, 0xB6, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x82, 0xB8, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x82, 0xBA, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x82, 0xBC, FIL_, 0x01, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x82, 0xBE, FIL_, - 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x80, - FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, - 0x82, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x83, 0x85, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x83, 0x87, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x83, 0x89, FIL_, 0x02, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x83, 0x90, FIL_, 0xE3, 0x82, - 0x9A, FIL_, 0xE3, 0x83, 0x91, FIL_, 0x02, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x83, 0x93, FIL_, 0xE3, - 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x94, FIL_, 0x02, - 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x97, FIL_, - 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x96, FIL_, - 0x02, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x83, 0x9A, - FIL_, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, 0x99, - FIL_, 0x02, 0xE3, 0x82, 0x99, FIL_, 0xE3, 0x83, - 0x9C, FIL_, 0xE3, 0x82, 0x9A, FIL_, 0xE3, 0x83, - 0x9D, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, 0xE3, - 0x83, 0xB7, FIL_, 0x01, 0xE3, 0x82, 0x99, FIL_, - 0xE3, 0x83, 0xB8, FIL_, 0x01, 0xE3, 0x82, 0x99, - FIL_, 0xE3, 0x83, 0xB9, FIL_, 0x01, 0xE3, 0x82, - 0x99, FIL_, 0xE3, 0x83, 0xBA, FIL_, 0x01, 0xE3, - 0x82, 0x99, FIL_, 0xE3, 0x83, 0xBE, FIL_, - }, -}; - -static const uchar_t u8_decomp_b2_tbl[2][2][256] = { - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, 2, 3, 4, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 5, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, 6, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 7, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 1, 2, 3, 4, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 5, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, 6, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 7, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - -}; - -static const u8_displacement_t u8_decomp_b3_tbl[2][8][256] = { - { - { /* Third byte table 0. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0, 0 }, - { 1, 35 }, { 2, 247 }, { 3, 474 }, - { 4, 693 }, { 5, 709 }, { 6, 951 }, - { N_, 0 }, { 7, 1139 }, { 8, 1152 }, - { N_, 0 }, { 9, 1177 }, { 10, 1199 }, - { 11, 1295 }, { 12, 1360 }, { 13, 1405 }, - { N_, 0 }, { 14, 1450 }, { N_, 0 }, - { N_, 0 }, { 15, 1620 }, { N_, 0 }, - { 16, 1624 }, { 17, 1649 }, { N_, 0 }, - { 18, 1665 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 19, 1680 }, - { 20, 1701 }, { N_, 0 }, { 21, 1757 }, - { 22, 1792 }, { 23, 1806 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 24, 1834 }, - { 25, 1869 }, { 26, 1876 }, { N_, 0 }, - { 27, 1897 }, { N_, 0 }, { 28, 1904 }, - { N_, 0 }, { 29, 1942 }, { N_, 0 }, - { 30, 1963 }, { 31, 1994 }, { N_, 0 }, - { 32, 2000 }, { 33, 2006 }, { 34, 2018 }, - { 35, 2021 }, { 36, 2109 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 37, 2158 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 0x8000, 2165 }, { 0x8001, 2445 }, - { 0x8002, 2741 }, { 0x8003, 3029 }, { 0x8004, 3337 }, - { 0x8005, 3725 }, { 0x8006, 4053 }, { 0x8007, 4536 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 38, 4895 }, - { 39, 4964 }, { 40, 4999 }, { N_, 0 }, - { 41, 5018 }, { 42, 5098 }, { 43, 5230 }, - { 44, 5248 }, { 45, 5266 }, { 46, 5326 }, - { 47, 5410 }, { 48, 5470 }, { 49, 5518 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 50, 5526 }, { 51, 5596 }, - { 52, 5767 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 53, 5810 }, { 54, 5822 }, { N_, 0 }, - { 55, 5830 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 56, 5836 }, { 57, 5839 }, { 58, 5842 }, - { 59, 6034 }, { 60, 6226 }, { 61, 6418 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 62, 6484 }, - { 63, 6497 }, { 64, 6672 }, { 65, 6770 }, - { 66, 6923 }, { 67, 6968 }, { 68, 7160 }, - { N_, 0 }, { 0x8008, 7247 }, { 69, 7597 }, - { 70, 7773 }, { 71, 7950 }, { 0x8009, 8142 }, - { 0x800A, 8919 }, { 72, 9351 }, { 73, 9522 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 5. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0x800B, 9743 }, - { 0x800C, 9999 }, { 0x800D, 10255 }, { 0x800E, 10511 }, - { 74, 10767 }, { 75, 10967 }, { N_, 0 }, - { N_, 0 }, { 76, 11139 }, { 77, 11303 }, - { 78, 11468 }, { 79, 11576 }, { 0x800F, 11740 }, - { 0x8010, 12006 }, { 0x8011, 12280 }, { 0x8012, 12546 }, - { 80, 12812 }, { 0x8013, 13060 }, { 0x8014, 13348 }, - { 81, 13720 }, { 82, 13898 }, { 83, 13933 }, - { 84, 14045 }, { 85, 14197 }, { 86, 14347 }, - { 87, 14410 }, { 88, 14540 }, { 89, 14729 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 6. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 90, 14829 }, { 91, 14912 }, - { 92, 14969 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 93, 14982 }, { 94, 15046 }, { 95, 15109 }, - { 96, 15163 }, { 97, 15225 }, { 98, 15282 }, - { 99, 15341 }, { 100, 15405 }, { 101, 15469 }, - { 102, 15533 }, { 103, 15597 }, { 104, 15681 }, - { 105, 15812 }, { 106, 15942 }, { 107, 16072 }, - { 108, 16202 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 7. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 0x8015, 16273 }, { 0x8016, 16536 }, - { 0x8017, 16799 }, { 0x8018, 17064 }, { 0x8019, 17329 }, - { 0x801A, 17601 }, { 0x801B, 17878 }, { 0x801C, 18147 }, - { 109, 18419 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - }, - { - { /* Third byte table 0. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0, 0 }, - { 1, 35 }, { 2, 247 }, { 3, 474 }, - { 4, 693 }, { 5, 709 }, { 6, 951 }, - { N_, 0 }, { 7, 1139 }, { 8, 1152 }, - { N_, 0 }, { 9, 1177 }, { 10, 1199 }, - { 11, 1295 }, { 12, 1362 }, { 13, 1407 }, - { N_, 0 }, { 14, 1452 }, { N_, 0 }, - { N_, 0 }, { 15, 1622 }, { N_, 0 }, - { 16, 1626 }, { 17, 1651 }, { N_, 0 }, - { 18, 1667 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 19, 1682 }, - { 20, 1703 }, { N_, 0 }, { 21, 1759 }, - { 22, 1794 }, { 23, 1808 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 24, 1836 }, - { 25, 1871 }, { 26, 1878 }, { N_, 0 }, - { 27, 1899 }, { N_, 0 }, { 28, 1906 }, - { N_, 0 }, { 29, 1944 }, { N_, 0 }, - { 30, 1965 }, { 31, 1996 }, { N_, 0 }, - { 32, 2002 }, { 33, 2008 }, { 34, 2020 }, - { 35, 2023 }, { 36, 2111 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 37, 2160 }, - { N_, 0 }, { N_, 0 }, { 38, 2167 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 39, 2170 }, { 40, 2226 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 41, 2247 }, { 42, 2268 }, { 43, 2340 }, - { N_, 0 }, { 0x8000, 2414 }, { 0x8001, 2694 }, - { 0x8002, 2990 }, { 0x8003, 3278 }, { 0x8004, 3586 }, - { 0x8005, 3974 }, { 0x8006, 4302 }, { 0x8007, 4785 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 44, 5144 }, - { 45, 5213 }, { 46, 5248 }, { N_, 0 }, - { 47, 5273 }, { 48, 5358 }, { 49, 5490 }, - { 50, 5508 }, { 51, 5526 }, { 52, 5586 }, - { 53, 5670 }, { 54, 5730 }, { 55, 5778 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 56, 5786 }, { 57, 5856 }, - { 58, 6027 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 59, 6070 }, { 60, 6082 }, { N_, 0 }, - { 61, 6090 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 62, 6096 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 63, 6099 }, { 64, 6102 }, { 65, 6105 }, - { 66, 6297 }, { 67, 6489 }, { 68, 6681 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 69, 6747 }, - { 70, 6760 }, { 71, 6935 }, { 72, 7033 }, - { 73, 7186 }, { 74, 7231 }, { 75, 7423 }, - { N_, 0 }, { 0x8008, 7510 }, { 76, 7891 }, - { 77, 8103 }, { 78, 8280 }, { 0x8009, 8482 }, - { 0x800A, 9259 }, { 79, 9701 }, { 80, 9872 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 5. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0x800B, 10106 }, - { 0x800C, 10362 }, { 0x800D, 10618 }, { 0x800E, 10874 }, - { 81, 11130 }, { 82, 11330 }, { 0x800F, 11566 }, - { 83, 11822 }, { 84, 11932 }, { 85, 12096 }, - { 86, 12261 }, { 87, 12369 }, { 0x8010, 12533 }, - { 0x8011, 12799 }, { 0x8012, 13073 }, { 0x8013, 13339 }, - { 88, 13605 }, { 0x8014, 13853 }, { 0x8015, 14141 }, - { 89, 14513 }, { 90, 14691 }, { 91, 14746 }, - { 92, 14860 }, { 93, 15012 }, { 94, 15162 }, - { 95, 15225 }, { 96, 15355 }, { 97, 15544 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 6. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 98, 15644 }, { 99, 15727 }, - { 100, 15784 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 101, 15797 }, { 102, 15861 }, { 103, 15924 }, - { 104, 15978 }, { 105, 16041 }, { 106, 16098 }, - { 107, 16157 }, { 108, 16221 }, { 109, 16285 }, - { 110, 16349 }, { 111, 16413 }, { 112, 16501 }, - { 113, 16632 }, { 114, 16762 }, { 115, 16892 }, - { 116, 17022 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - { /* Third byte table 7. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 0x8016, 17097 }, { 0x8017, 17360 }, - { 0x8018, 17623 }, { 0x8019, 17888 }, { 0x801A, 18153 }, - { 0x801B, 18425 }, { 0x801C, 18702 }, { 0x801D, 18971 }, - { 117, 19243 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, - }, - }, -}; - -static const uchar_t u8_decomp_b4_tbl[2][118][257] = { - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 5, 5, 5, 5, 5, - 8, 8, 8, 9, 10, 13, 15, 15, - 15, 18, 19, 20, 20, 25, 30, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 24, - 28, 32, 36, 40, 44, 48, 52, 56, - 60, 60, 64, 68, 72, 76, 80, 84, - 84, 84, 88, 92, 96, 100, 104, 104, - 104, 108, 112, 116, 120, 124, 128, 128, - 132, 136, 140, 144, 148, 152, 156, 160, - 164, 164, 168, 172, 176, 180, 184, 188, - 188, 188, 192, 196, 200, 204, 208, 208, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 64, 64, 68, 72, 76, 80, 84, - 88, 92, 96, 100, 104, 108, 112, 116, - 120, 124, 128, 132, 136, 140, 144, 144, - 144, 148, 152, 156, 160, 164, 168, 172, - 176, 180, 180, 182, 184, 188, 192, 196, - 200, 200, 204, 208, 212, 216, 220, 224, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 3, 7, 11, 15, 19, - 23, 27, 30, 30, 30, 34, 38, 42, - 46, 50, 54, 54, 54, 58, 62, 66, - 70, 74, 78, 82, 86, 90, 94, 98, - 102, 106, 110, 114, 118, 122, 126, 126, - 126, 130, 134, 138, 142, 146, 150, 154, - 158, 162, 166, 170, 174, 178, 182, 186, - 190, 194, 198, 202, 206, 210, 214, 218, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 12, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 8, 12, - 14, 16, 18, 20, 22, 24, 28, 32, - 36, 40, 44, 48, 52, 56, 62, 68, - 74, 80, 86, 92, 98, 104, 104, 110, - 116, 122, 128, 133, 138, 138, 138, 142, - 146, 150, 154, 158, 162, 168, 174, 179, - 184, 188, 190, 192, 194, 198, 202, 202, - 202, 206, 210, 216, 222, 227, 232, 237, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 112, 112, 116, - 120, 120, 120, 120, 120, 120, 120, 124, - 128, 132, 136, 142, 148, 154, 160, 164, - 168, 174, 180, 184, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 3, 4, 5, 7, 9, 11, - 12, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 18, - 18, 20, 21, 22, 23, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 6, 9, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 17, 17, 17, - 17, 17, 17, 20, 20, 20, 20, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 14, 19, - 22, 27, 32, 37, 37, 42, 42, 47, - 52, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 64, 69, 74, 79, 84, - 89, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 5, 10, 15, 20, 25, - 25, 27, 29, 31, 41, 51, 53, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 57, 59, 61, 61, 63, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 10, 15, 15, 15, 15, - 20, 20, 20, 20, 20, 25, 30, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 10, 15, 15, 15, 15, - 20, 20, 20, 20, 20, 25, 30, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 40, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 5, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 15, 20, 25, 30, 30, 30, 35, - 40, 40, 40, 45, 50, 55, 60, 65, - 70, 70, 70, 75, 80, 85, 90, 95, - 100, 100, 100, 105, 110, 115, 120, 125, - 130, 135, 140, 145, 150, 155, 160, 160, - 160, 165, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 5, 10, 15, 20, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 8, - 12, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 5, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 7, 7, 7, 7, 7, - 7, 7, 14, 14, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 14, 21, 28, 35, 42, 49, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 21, 28, 28, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 7, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 14, 21, 21, 21, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 7, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 28, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 7, 7, 7, 7, 7, - 14, 21, 21, 28, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 7, 14, 24, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 14, 14, - 14, 14, 14, 21, 21, 21, 21, 21, - 28, 28, 28, 28, 28, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 49, 49, 56, 63, - 72, 79, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 21, 21, - 21, 21, 21, 28, 28, 28, 28, 28, - 35, 35, 35, 35, 35, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 21, 21, 21, 21, - 21, 21, 24, 24, 24, 24, 24, 24, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 28, 30, 33, - 33, 33, 33, 33, 33, 33, 33, 33, - 34, 34, 34, 34, 40, 49, 49, 55, - 64, 64, 64, 64, 64, 66, 66, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, - }, - { /* Fourth byte table 39. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 2, 4, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 18, 18, 18, 18, 18, 18, 18, 18, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 20, 21, 21, 21, 22, 23, 24, - 25, 26, 27, 28, 31, 32, 33, 34, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 40. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 14, 15, 16, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, - }, - { /* Fourth byte table 41. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 7, 10, 10, 13, 16, - 18, 18, 21, 22, 23, 24, 25, 26, - 28, 29, 30, 31, 32, 32, 33, 35, - 35, 35, 36, 37, 38, 39, 40, 40, - 40, 42, 45, 47, 47, 48, 48, 51, - 51, 52, 52, 54, 58, 59, 60, 60, - 61, 62, 63, 63, 64, 65, 67, 69, - 71, 73, 74, 74, 74, 74, 76, 78, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, - }, - { /* Fourth byte table 42. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 3, 3, 3, 4, 5, - 6, 7, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 13, 18, 23, 28, - 33, 38, 43, 48, 53, 58, 63, 68, - 72, 73, 75, 78, 80, 81, 83, 86, - 90, 92, 93, 95, 98, 99, 100, 101, - 102, 103, 105, 108, 110, 111, 113, 116, - 120, 122, 123, 125, 128, 129, 130, 131, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, - }, - { /* Fourth byte table 43. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 6, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, - }, - { /* Fourth byte table 44. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 6, 12, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, - }, - { /* Fourth byte table 45. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 6, 6, - 6, 6, 12, 12, 12, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 24, 24, 30, - 30, 30, 30, 30, 30, 36, 45, 45, - 51, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, - }, - { /* Fourth byte table 46. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 6, 6, 6, 12, 12, 12, - 18, 18, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 28, 28, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 40, 44, - 48, 54, 60, 60, 60, 66, 72, 72, - 72, 78, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, - }, - { /* Fourth byte table 47. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 12, 12, 18, 24, 24, - 24, 30, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 42, 48, 54, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, - }, - { /* Fourth byte table 48. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 24, 24, 24, - 24, 24, 24, 30, 36, 42, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 49. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 4, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, - }, - { /* Fourth byte table 50. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 11, 13, 15, 17, 19, 21, - 23, 25, 27, 29, 31, 34, 37, 40, - 43, 46, 49, 52, 55, 58, 62, 66, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, - }, - { /* Fourth byte table 51. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 53, 56, 59, 62, 65, 68, - 71, 74, 77, 80, 83, 86, 89, 92, - 95, 98, 101, 104, 107, 110, 113, 116, - 119, 122, 125, 128, 131, 134, 137, 140, - 143, 146, 149, 152, 155, 158, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, - }, - { /* Fourth byte table 52. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, - }, - { /* Fourth byte table 53. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, - }, - { /* Fourth byte table 54. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 5, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, - }, - { /* Fourth byte table 55. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, - }, - { /* Fourth byte table 56. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 57. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 58. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 59. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 60. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 61. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, - }, - { /* Fourth byte table 62. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, - 4, 7, 10, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, - }, - { /* Fourth byte table 63. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 7, 14, - 14, 21, 21, 28, 28, 35, 35, 42, - 42, 49, 49, 56, 56, 63, 63, 70, - 70, 77, 77, 84, 84, 84, 91, 91, - 98, 98, 105, 105, 105, 105, 105, 105, - 105, 112, 119, 119, 126, 133, 133, 140, - 147, 147, 154, 161, 161, 168, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, - }, - { /* Fourth byte table 64. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 7, 7, - 7, 7, 7, 7, 11, 15, 15, 22, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 35, 35, 42, - 42, 49, 49, 56, 56, 63, 63, 70, - 70, 77, 77, 84, 84, 91, 91, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, - }, - { /* Fourth byte table 65. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 14, 14, 14, 21, 21, - 28, 28, 35, 35, 35, 35, 35, 35, - 35, 42, 49, 49, 56, 63, 63, 70, - 77, 77, 84, 91, 91, 98, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 112, 112, 112, - 119, 126, 133, 140, 140, 140, 140, 147, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, - }, - { /* Fourth byte table 66. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 6, 9, 12, 15, 18, - 21, 24, 27, 30, 33, 36, 39, 42, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, - }, - { /* Fourth byte table 67. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 68. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 45, 45, 45, 48, 51, 54, 57, 60, - 63, 66, 69, 72, 75, 78, 81, 84, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 69. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 15, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 22, 24, 26, 28, 30, 32, - 34, 36, 38, 40, 42, 44, 46, 48, - 50, 53, 56, 59, 62, 65, 68, 71, - 74, 77, 80, 83, 86, 89, 92, 98, - 104, 110, 116, 122, 128, 134, 140, 146, - 152, 158, 164, 170, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, - }, - { /* Fourth byte table 70. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 171, 173, 175, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, - }, - { /* Fourth byte table 71. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 41, 46, 51, 51, 51, 51, - 51, 54, 57, 60, 63, 66, 69, 72, - 75, 78, 81, 84, 87, 90, 93, 96, - 99, 102, 105, 108, 111, 114, 117, 120, - 123, 126, 129, 132, 135, 138, 141, 144, - 147, 150, 153, 156, 159, 162, 165, 168, - 171, 174, 177, 180, 183, 186, 189, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 72. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 7, 9, 11, 13, 15, - 17, 20, 24, 26, 28, 31, 34, 36, - 38, 40, 43, 46, 49, 52, 55, 57, - 59, 61, 63, 65, 68, 70, 72, 74, - 77, 80, 82, 85, 88, 91, 93, 96, - 101, 107, 109, 112, 115, 118, 121, 128, - 136, 138, 140, 143, 145, 147, 149, 152, - 154, 156, 158, 160, 162, 165, 167, 169, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, - }, - { /* Fourth byte table 73. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 10, 12, 14, 16, 22, - 25, 27, 29, 31, 33, 35, 37, 39, - 41, 43, 45, 48, 50, 52, 55, 58, - 60, 64, 67, 69, 71, 73, 75, 75, - 75, 79, 83, 87, 91, 95, 99, 103, - 107, 111, 116, 121, 126, 131, 136, 141, - 146, 151, 156, 161, 166, 171, 176, 181, - 186, 191, 196, 201, 206, 211, 216, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, - 221, - }, - { /* Fourth byte table 74. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 56, - 56, 60, 60, 64, 64, 64, 68, 72, - 76, 80, 84, 88, 92, 96, 100, 104, - 104, 108, 108, 112, 112, 112, 116, 120, - 120, 120, 120, 124, 128, 132, 136, 136, - 136, 140, 144, 148, 152, 156, 160, 164, - 168, 172, 176, 180, 184, 188, 192, 196, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, - }, - { /* Fourth byte table 75. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, - 172, - }, - { /* Fourth byte table 76. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 9, 12, 14, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 20, 24, 28, 32, - 36, 36, 36, 36, 36, 36, 41, 41, - 46, 48, 50, 52, 54, 56, 58, 60, - 62, 64, 65, 70, 75, 82, 89, 94, - 99, 104, 109, 114, 119, 124, 129, 134, - 134, 139, 144, 149, 154, 159, 159, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, - }, - { /* Fourth byte table 77. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 10, 15, 20, 20, 25, - 30, 35, 40, 45, 50, 55, 60, 65, - 69, 71, 73, 75, 77, 79, 81, 83, - 85, 87, 89, 91, 93, 95, 97, 99, - 101, 103, 105, 107, 109, 111, 113, 115, - 117, 119, 121, 123, 125, 127, 129, 131, - 133, 135, 137, 139, 141, 143, 145, 147, - 149, 151, 153, 155, 157, 159, 161, 163, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, - }, - { /* Fourth byte table 78. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 66, 68, 70, 72, 76, 80, 82, - 84, 86, 88, 90, 92, 94, 96, 98, - 100, 104, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, - }, - { /* Fourth byte table 79. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 4, 6, 8, - 10, 12, 14, 16, 18, 20, 24, 26, - 28, 30, 32, 34, 36, 38, 40, 42, - 44, 46, 48, 54, 60, 66, 72, 78, - 84, 90, 96, 102, 108, 114, 120, 126, - 132, 138, 144, 150, 156, 158, 160, 162, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, - }, - { /* Fourth byte table 80. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, - }, - { /* Fourth byte table 81. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 54, 60, 68, 76, 84, 92, 100, - 108, 116, 122, 155, 170, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, - }, - { /* Fourth byte table 82. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 5, 8, 9, 10, 11, 12, - 13, 14, 17, 20, 23, 26, 29, 32, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 83. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 15, 15, - 15, 15, 18, 21, 24, 27, 28, 29, - 30, 31, 34, 35, 35, 36, 37, 38, - 39, 42, 43, 44, 45, 46, 49, 52, - 53, 54, 55, 56, 57, 58, 59, 60, - 60, 61, 62, 63, 64, 64, 64, 64, - 64, 67, 71, 74, 74, 77, 77, 80, - 84, 87, 91, 94, 98, 101, 105, 108, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, - }, - { /* Fourth byte table 84. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 6, 10, 14, 18, 22, 26, - 30, 34, 38, 42, 46, 50, 52, 54, - 56, 58, 60, 62, 64, 66, 68, 70, - 72, 74, 76, 78, 80, 82, 84, 86, - 88, 90, 92, 94, 96, 98, 100, 102, - 104, 106, 108, 110, 112, 114, 116, 118, - 120, 122, 124, 126, 128, 130, 132, 134, - 136, 138, 140, 142, 144, 146, 148, 150, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, - }, - { /* Fourth byte table 85. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 66, 68, 70, 72, 74, 76, 78, - 80, 82, 84, 86, 88, 90, 92, 94, - 96, 98, 100, 102, 104, 106, 112, 118, - 124, 130, 136, 142, 146, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, - }, - { /* Fourth byte table 86. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 87. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 34, 37, 40, 43, 46, 49, 52, 55, - 58, 61, 64, 67, 70, 73, 76, 79, - 82, 85, 88, 91, 94, 97, 100, 103, - 106, 109, 112, 115, 118, 121, 124, 127, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 88. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, - }, - { /* Fourth byte table 89. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 6, 9, 12, 15, - 18, 18, 18, 21, 24, 27, 30, 33, - 36, 36, 36, 39, 42, 45, 48, 51, - 54, 54, 54, 57, 60, 63, 63, 63, - 63, 65, 67, 69, 72, 74, 76, 79, - 79, 82, 85, 88, 91, 94, 97, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, - }, - { /* Fourth byte table 90. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, - 18, 31, 44, 57, 70, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, - }, - { /* Fourth byte table 91. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 18, 31, 44, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, - }, - { /* Fourth byte table 92. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, - }, - { /* Fourth byte table 93. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 94. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 95. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 29, 30, - 31, 31, 31, 32, 32, 32, 33, 34, - 34, 34, 35, 36, 37, 38, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 50, 51, 51, 52, 53, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 96. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 2, 3, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 97. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 6, - 7, 8, 9, 10, 10, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 18, 19, - 20, 21, 22, 23, 24, 25, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 53, 54, 55, 56, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, - }, - { /* Fourth byte table 98. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 5, 6, - 6, 6, 6, 7, 8, 9, 10, 11, - 12, 13, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, - }, - { /* Fourth byte table 99. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 100. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 101. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 102. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 103. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 36, 36, 36, - 36, 38, 40, 42, 44, 46, 48, 50, - 52, 54, 56, 58, 60, 62, 64, 66, - 68, 70, 72, 74, 76, 78, 80, 82, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, - }, - { /* Fourth byte table 104. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 5, 7, 9, 11, 13, 15, - 17, 19, 21, 23, 25, 27, 29, 31, - 33, 35, 37, 39, 41, 43, 45, 47, - 49, 51, 53, 55, 58, 60, 62, 64, - 66, 68, 70, 72, 74, 76, 78, 80, - 82, 84, 86, 88, 90, 92, 94, 96, - 98, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 123, 125, 127, 129, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, - }, - { /* Fourth byte table 105. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 45, 47, - 49, 51, 53, 55, 57, 59, 61, 63, - 65, 67, 69, 71, 73, 75, 77, 79, - 81, 83, 85, 87, 89, 91, 93, 95, - 97, 99, 101, 103, 105, 107, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 106. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 33, 35, 37, 39, 41, 43, 45, 47, - 49, 51, 53, 55, 57, 59, 61, 63, - 65, 67, 69, 71, 73, 75, 77, 79, - 81, 83, 85, 87, 89, 91, 93, 95, - 98, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 107. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 21, 23, 25, 27, 29, 31, - 33, 35, 37, 39, 41, 43, 45, 47, - 49, 51, 53, 55, 57, 59, 61, 63, - 65, 67, 69, 71, 73, 75, 77, 79, - 81, 83, 86, 88, 90, 92, 94, 96, - 98, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 108. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 9, 11, 13, 15, - 17, 19, 21, 21, 21, 21, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, - }, - { /* Fourth byte table 109. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 9, 13, 17, 21, 25, 29, - 33, 37, 42, 46, 50, 54, 58, 62, - 66, 71, 75, 80, 85, 90, 94, 98, - 102, 106, 110, 114, 118, 122, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, - }, - { /* Fourth byte table 110. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 111. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 112. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 113. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 114. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 115. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 116. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 117. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - }, - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 5, 5, 5, 5, 5, - 8, 8, 8, 9, 10, 13, 15, 15, - 15, 18, 19, 20, 20, 25, 30, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 24, - 28, 32, 36, 40, 44, 48, 52, 56, - 60, 60, 64, 68, 72, 76, 80, 84, - 84, 84, 88, 92, 96, 100, 104, 104, - 104, 108, 112, 116, 120, 124, 128, 128, - 132, 136, 140, 144, 148, 152, 156, 160, - 164, 164, 168, 172, 176, 180, 184, 188, - 188, 188, 192, 196, 200, 204, 208, 208, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 64, 64, 68, 72, 76, 80, 84, - 88, 92, 96, 100, 104, 108, 112, 116, - 120, 124, 128, 132, 136, 140, 144, 144, - 144, 148, 152, 156, 160, 164, 168, 172, - 176, 180, 180, 182, 184, 188, 192, 196, - 200, 200, 204, 208, 212, 216, 220, 224, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, - 227, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 3, 7, 11, 15, 19, - 23, 27, 30, 30, 30, 34, 38, 42, - 46, 50, 54, 54, 54, 58, 62, 66, - 70, 74, 78, 82, 86, 90, 94, 98, - 102, 106, 110, 114, 118, 122, 126, 126, - 126, 130, 134, 138, 142, 146, 150, 154, - 158, 162, 166, 170, 174, 178, 182, 186, - 190, 194, 198, 202, 206, 210, 214, 218, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, - 219, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 12, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 8, 12, - 14, 16, 18, 20, 22, 24, 28, 32, - 36, 40, 44, 48, 52, 56, 62, 68, - 74, 80, 86, 92, 98, 104, 104, 110, - 116, 122, 128, 133, 138, 138, 138, 142, - 146, 150, 154, 158, 162, 168, 174, 179, - 184, 188, 190, 192, 194, 198, 202, 202, - 202, 206, 210, 216, 222, 227, 232, 237, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 112, 112, 116, - 120, 120, 120, 120, 120, 120, 120, 124, - 128, 132, 136, 142, 148, 154, 160, 164, - 168, 174, 180, 184, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, - 188, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 3, 4, 5, 7, 9, 11, - 12, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 18, - 18, 20, 21, 22, 23, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 6, 9, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 17, 17, 17, - 17, 17, 17, 20, 20, 20, 20, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 14, 19, - 22, 27, 32, 37, 37, 42, 42, 47, - 52, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 64, 69, 74, 79, 84, - 89, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 5, 10, 15, 20, 25, - 25, 27, 29, 31, 41, 51, 53, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 57, 59, 61, 61, 63, 65, 65, - 65, 65, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 67, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 10, 15, 15, 15, 15, - 20, 20, 20, 20, 20, 25, 30, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 10, 15, 15, 15, 15, - 20, 20, 20, 20, 20, 25, 30, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 40, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 5, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 15, 20, 25, 30, 30, 30, 35, - 40, 40, 40, 45, 50, 55, 60, 65, - 70, 70, 70, 75, 80, 85, 90, 95, - 100, 100, 100, 105, 110, 115, 120, 125, - 130, 135, 140, 145, 150, 155, 160, 160, - 160, 165, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, - 170, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 5, 10, 15, 20, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 8, - 12, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 5, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 7, 7, 7, 7, 7, - 7, 7, 14, 14, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 14, 21, 28, 35, 42, 49, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 21, 28, 28, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 7, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 14, 21, 21, 21, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 7, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 28, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 7, 7, 7, 7, 7, - 14, 21, 21, 28, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 14, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 7, 14, 24, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 14, 14, - 14, 14, 14, 21, 21, 21, 21, 21, - 28, 28, 28, 28, 28, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 49, 49, 56, 63, - 72, 79, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 21, 21, - 21, 21, 21, 28, 28, 28, 28, 28, - 35, 35, 35, 35, 35, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, - 49, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 39. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, - 7, 14, 14, 21, 21, 28, 28, 35, - 35, 35, 35, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 49, 49, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 40. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 14, 14, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 41. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 3, 4, - 4, 5, 6, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 16, 17, 19, 20, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 42. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 6, 8, 11, - 12, 13, 14, 16, 18, 20, 21, 21, - 22, 23, 25, 26, 28, 31, 34, 35, - 36, 37, 40, 42, 43, 46, 48, 50, - 52, 54, 56, 57, 58, 59, 60, 62, - 64, 66, 68, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, - }, - { /* Fourth byte table 43. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 3, 5, 7, - 9, 10, 12, 14, 16, 18, 20, 22, - 25, 27, 29, 32, 34, 36, 38, 40, - 42, 44, 46, 48, 50, 52, 54, 56, - 58, 61, 63, 65, 66, 68, 70, 72, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, - }, - { /* Fourth byte table 44. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 21, 21, 21, 21, - 21, 21, 24, 24, 24, 24, 24, 24, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 28, 30, 33, - 33, 33, 33, 33, 33, 33, 33, 33, - 34, 34, 34, 34, 40, 49, 49, 55, - 64, 64, 64, 64, 64, 66, 66, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, - }, - { /* Fourth byte table 45. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 2, 4, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 18, 18, 18, 18, 18, 18, 18, 18, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 19, 20, 21, 21, 21, 22, 23, 24, - 25, 26, 27, 28, 31, 32, 33, 34, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, - }, - { /* Fourth byte table 46. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 14, 15, 16, 17, - 17, 18, 19, 20, 21, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, - 23, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, - }, - { /* Fourth byte table 47. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 7, 10, 10, 13, 16, - 18, 18, 21, 22, 23, 24, 25, 26, - 28, 29, 30, 31, 32, 32, 33, 35, - 35, 35, 36, 37, 38, 39, 40, 40, - 40, 42, 45, 47, 47, 48, 48, 51, - 51, 52, 52, 54, 58, 59, 60, 60, - 61, 62, 63, 63, 64, 65, 67, 69, - 71, 73, 74, 74, 77, 79, 81, 83, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, - 85, - }, - { /* Fourth byte table 48. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 3, 3, 3, 4, 5, - 6, 7, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 13, 18, 23, 28, - 33, 38, 43, 48, 53, 58, 63, 68, - 72, 73, 75, 78, 80, 81, 83, 86, - 90, 92, 93, 95, 98, 99, 100, 101, - 102, 103, 105, 108, 110, 111, 113, 116, - 120, 122, 123, 125, 128, 129, 130, 131, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, - 132, - }, - { /* Fourth byte table 49. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 6, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, - }, - { /* Fourth byte table 50. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 6, 12, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, - }, - { /* Fourth byte table 51. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 6, 6, - 6, 6, 12, 12, 12, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 24, 24, 30, - 30, 30, 30, 30, 30, 36, 45, 45, - 51, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, - }, - { /* Fourth byte table 52. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 6, 6, 6, 12, 12, 12, - 18, 18, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 28, 28, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 40, 44, - 48, 54, 60, 60, 60, 66, 72, 72, - 72, 78, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, - }, - { /* Fourth byte table 53. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 12, 12, 18, 24, 24, - 24, 30, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 42, 48, 54, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, - }, - { /* Fourth byte table 54. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 24, 24, 24, - 24, 24, 24, 30, 36, 42, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 55. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 4, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, - }, - { /* Fourth byte table 56. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 11, 13, 15, 17, 19, 21, - 23, 25, 27, 29, 31, 34, 37, 40, - 43, 46, 49, 52, 55, 58, 62, 66, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, - }, - { /* Fourth byte table 57. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 53, 56, 59, 62, 65, 68, - 71, 74, 77, 80, 83, 86, 89, 92, - 95, 98, 101, 104, 107, 110, 113, 116, - 119, 122, 125, 128, 131, 134, 137, 140, - 143, 146, 149, 152, 155, 158, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, - }, - { /* Fourth byte table 58. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, - }, - { /* Fourth byte table 59. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, - }, - { /* Fourth byte table 60. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 5, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, - }, - { /* Fourth byte table 61. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, - }, - { /* Fourth byte table 62. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 63. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 64. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 65. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 66. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 67. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 68. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, - }, - { /* Fourth byte table 69. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, - 4, 7, 10, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, - }, - { /* Fourth byte table 70. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 7, 14, - 14, 21, 21, 28, 28, 35, 35, 42, - 42, 49, 49, 56, 56, 63, 63, 70, - 70, 77, 77, 84, 84, 84, 91, 91, - 98, 98, 105, 105, 105, 105, 105, 105, - 105, 112, 119, 119, 126, 133, 133, 140, - 147, 147, 154, 161, 161, 168, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, - 175, - }, - { /* Fourth byte table 71. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 7, 7, - 7, 7, 7, 7, 11, 15, 15, 22, - 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 35, 35, 42, - 42, 49, 49, 56, 56, 63, 63, 70, - 70, 77, 77, 84, 84, 91, 91, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, - 98, - }, - { /* Fourth byte table 72. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 7, 14, 14, 14, 21, 21, - 28, 28, 35, 35, 35, 35, 35, 35, - 35, 42, 49, 49, 56, 63, 63, 70, - 77, 77, 84, 91, 91, 98, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 112, 112, 112, - 119, 126, 133, 140, 140, 140, 140, 147, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, - 153, - }, - { /* Fourth byte table 73. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 6, 9, 12, 15, 18, - 21, 24, 27, 30, 33, 36, 39, 42, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, - }, - { /* Fourth byte table 74. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, - 192, - }, - { /* Fourth byte table 75. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 45, 45, 45, 48, 51, 54, 57, 60, - 63, 66, 69, 72, 75, 78, 81, 84, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 76. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 15, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 23, 25, 27, 29, 31, 33, 35, - 37, 39, 41, 43, 45, 47, 49, 51, - 53, 56, 59, 62, 65, 68, 71, 74, - 77, 80, 83, 86, 89, 92, 95, 101, - 107, 113, 119, 125, 131, 137, 143, 149, - 155, 161, 167, 173, 179, 194, 206, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, - 212, - }, - { /* Fourth byte table 77. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 171, 173, 175, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, - 177, - }, - { /* Fourth byte table 78. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 41, 46, 51, 53, 56, 58, - 61, 64, 67, 70, 73, 76, 79, 82, - 85, 88, 91, 94, 97, 100, 103, 106, - 109, 112, 115, 118, 121, 124, 127, 130, - 133, 136, 139, 142, 145, 148, 151, 154, - 157, 160, 163, 166, 169, 172, 175, 178, - 181, 184, 187, 190, 193, 196, 199, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, - 202, - }, - { /* Fourth byte table 79. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 7, 9, 11, 13, 15, - 17, 20, 24, 26, 28, 31, 34, 36, - 38, 40, 43, 46, 49, 52, 55, 57, - 59, 61, 63, 65, 68, 70, 72, 74, - 77, 80, 82, 85, 88, 91, 93, 96, - 101, 107, 109, 112, 115, 118, 121, 128, - 136, 138, 140, 143, 145, 147, 149, 152, - 154, 156, 158, 160, 162, 165, 167, 169, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, - 171, - }, - { /* Fourth byte table 80. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 10, 12, 14, 16, 22, - 25, 27, 29, 31, 33, 35, 37, 39, - 41, 43, 45, 48, 50, 52, 55, 58, - 60, 64, 67, 69, 71, 73, 75, 80, - 85, 89, 93, 97, 101, 105, 109, 113, - 117, 121, 126, 131, 136, 141, 146, 151, - 156, 161, 166, 171, 176, 181, 186, 191, - 196, 201, 206, 211, 216, 221, 226, 231, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, - }, - { /* Fourth byte table 81. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 56, - 56, 60, 60, 64, 64, 64, 68, 72, - 76, 80, 84, 88, 92, 96, 100, 104, - 104, 108, 108, 112, 112, 112, 116, 120, - 120, 120, 120, 124, 128, 132, 136, 136, - 136, 140, 144, 148, 152, 156, 160, 164, - 168, 172, 176, 180, 184, 188, 192, 196, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, - 200, - }, - { /* Fourth byte table 82. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 172, 172, 172, 172, - 172, 176, 180, 184, 188, 192, 196, 200, - 204, 208, 212, 216, 220, 224, 228, 232, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, - }, - { /* Fourth byte table 83. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 65, 70, 75, 79, 83, 87, 92, 97, - 102, 106, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, - 110, - }, - { /* Fourth byte table 84. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 9, 12, 14, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 20, 24, 28, 32, - 36, 36, 36, 36, 36, 36, 41, 41, - 46, 48, 50, 52, 54, 56, 58, 60, - 62, 64, 65, 70, 75, 82, 89, 94, - 99, 104, 109, 114, 119, 124, 129, 134, - 134, 139, 144, 149, 154, 159, 159, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, - }, - { /* Fourth byte table 85. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 10, 15, 20, 20, 25, - 30, 35, 40, 45, 50, 55, 60, 65, - 69, 71, 73, 75, 77, 79, 81, 83, - 85, 87, 89, 91, 93, 95, 97, 99, - 101, 103, 105, 107, 109, 111, 113, 115, - 117, 119, 121, 123, 125, 127, 129, 131, - 133, 135, 137, 139, 141, 143, 145, 147, - 149, 151, 153, 155, 157, 159, 161, 163, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 165, 165, - 165, - }, - { /* Fourth byte table 86. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 66, 68, 70, 72, 76, 80, 82, - 84, 86, 88, 90, 92, 94, 96, 98, - 100, 104, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, - 108, - }, - { /* Fourth byte table 87. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 4, 6, 8, - 10, 12, 14, 16, 18, 20, 24, 26, - 28, 30, 32, 34, 36, 38, 40, 42, - 44, 46, 48, 54, 60, 66, 72, 78, - 84, 90, 96, 102, 108, 114, 120, 126, - 132, 138, 144, 150, 156, 158, 160, 162, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, - 164, - }, - { /* Fourth byte table 88. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, - }, - { /* Fourth byte table 89. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 54, 60, 68, 76, 84, 92, 100, - 108, 116, 122, 155, 170, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, - 178, - }, - { /* Fourth byte table 90. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 4, 7, 8, 9, 10, 11, - 14, 17, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 22, 25, 28, 29, 30, 31, 32, - 33, 34, 37, 40, 43, 46, 49, 52, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, - }, - { /* Fourth byte table 91. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 15, 15, - 16, 17, 20, 23, 26, 29, 30, 31, - 32, 33, 36, 37, 37, 38, 39, 40, - 41, 44, 45, 46, 47, 48, 51, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 62, 63, 64, 65, 66, 66, 66, 66, - 66, 69, 73, 76, 76, 79, 79, 82, - 86, 89, 93, 96, 100, 103, 107, 110, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, - }, - { /* Fourth byte table 92. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 6, 10, 14, 18, 22, 26, - 30, 34, 38, 42, 46, 50, 52, 54, - 56, 58, 60, 62, 64, 66, 68, 70, - 72, 74, 76, 78, 80, 82, 84, 86, - 88, 90, 92, 94, 96, 98, 100, 102, - 104, 106, 108, 110, 112, 114, 116, 118, - 120, 122, 124, 126, 128, 130, 132, 134, - 136, 138, 140, 142, 144, 146, 148, 150, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, - }, - { /* Fourth byte table 93. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 66, 68, 70, 72, 74, 76, 78, - 80, 82, 84, 86, 88, 90, 92, 94, - 96, 98, 100, 102, 104, 106, 112, 118, - 124, 130, 136, 142, 146, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, - 150, - }, - { /* Fourth byte table 94. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 95. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 34, 37, 40, 43, 46, 49, 52, 55, - 58, 61, 64, 67, 70, 73, 76, 79, - 82, 85, 88, 91, 94, 97, 100, 103, - 106, 109, 112, 115, 118, 121, 124, 127, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 96. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 144, 147, 150, 153, 156, 159, 162, 165, - 168, 171, 174, 177, 180, 183, 186, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, - 189, - }, - { /* Fourth byte table 97. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 6, 9, 12, 15, - 18, 18, 18, 21, 24, 27, 30, 33, - 36, 36, 36, 39, 42, 45, 48, 51, - 54, 54, 54, 57, 60, 63, 63, 63, - 63, 65, 67, 69, 72, 74, 76, 79, - 79, 82, 85, 88, 91, 94, 97, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, - 100, - }, - { /* Fourth byte table 98. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, - 18, 31, 44, 57, 70, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, - }, - { /* Fourth byte table 99. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 18, 31, 44, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, - }, - { /* Fourth byte table 100. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, - 13, - }, - { /* Fourth byte table 101. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 102. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 103. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 29, 30, - 31, 31, 31, 32, 32, 32, 33, 34, - 34, 34, 35, 36, 37, 38, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 50, 51, 51, 52, 53, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 104. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 105. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 6, - 7, 8, 9, 10, 10, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 18, 19, - 20, 21, 22, 23, 24, 25, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 53, 54, 55, 56, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, - }, - { /* Fourth byte table 106. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 5, 6, - 6, 6, 6, 7, 8, 9, 10, 11, - 12, 13, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, - }, - { /* Fourth byte table 107. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 108. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 109. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 110. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 111. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 38, 40, 40, - 40, 42, 44, 46, 48, 50, 52, 54, - 56, 58, 60, 62, 64, 66, 68, 70, - 72, 74, 76, 78, 80, 82, 84, 86, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, - 88, - }, - { /* Fourth byte table 112. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 5, 7, 9, 11, 13, 15, - 17, 19, 21, 23, 25, 27, 29, 31, - 33, 35, 37, 39, 41, 43, 45, 47, - 49, 51, 53, 55, 58, 60, 62, 64, - 66, 68, 70, 72, 74, 76, 78, 80, - 82, 84, 86, 88, 90, 92, 94, 96, - 98, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 123, 125, 127, 129, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, - 131, - }, - { /* Fourth byte table 113. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 45, 47, - 49, 51, 53, 55, 57, 59, 61, 63, - 65, 67, 69, 71, 73, 75, 77, 79, - 81, 83, 85, 87, 89, 91, 93, 95, - 97, 99, 101, 103, 105, 107, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 114. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 33, 35, 37, 39, 41, 43, 45, 47, - 49, 51, 53, 55, 57, 59, 61, 63, - 65, 67, 69, 71, 73, 75, 77, 79, - 81, 83, 85, 87, 89, 91, 93, 95, - 98, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 115. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 21, 23, 25, 27, 29, 31, - 33, 35, 37, 39, 41, 43, 45, 47, - 49, 51, 53, 55, 57, 59, 61, 63, - 65, 67, 69, 71, 73, 75, 77, 79, - 81, 83, 86, 88, 90, 92, 94, 96, - 98, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, - 130, - }, - { /* Fourth byte table 116. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 9, 11, 13, 15, - 17, 19, 21, 23, 25, 25, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, - 75, - }, - { /* Fourth byte table 117. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 9, 13, 17, 21, 25, 29, - 33, 37, 42, 46, 50, 54, 58, 62, - 66, 71, 75, 80, 85, 90, 94, 98, - 102, 106, 110, 114, 118, 122, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, - }, - }, -}; - -static const uint16_t u8_decomp_b4_16bit_tbl[2][30][257] = { - { - { /* Fourth byte 16-bit table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 38, 44, 48, 52, 56, 60, 64, - 68, 72, 76, 80, 84, 90, 96, 102, - 108, 112, 116, 120, 124, 130, 136, 140, - 144, 148, 152, 156, 160, 164, 168, 172, - 176, 180, 184, 188, 192, 196, 200, 206, - 212, 216, 220, 224, 228, 232, 236, 240, - 244, 250, 256, 260, 264, 268, 272, 276, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, - }, - { /* Fourth byte 16-bit table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 54, 60, 66, - 72, 78, 84, 90, 96, 100, 104, 108, - 112, 116, 120, 124, 128, 134, 140, 144, - 148, 152, 156, 160, 164, 170, 176, 182, - 188, 194, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 262, 268, 274, 280, 284, 288, 292, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, - }, - { /* Fourth byte 16-bit table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 107, 116, 116, 116, 116, - 116, 120, 124, 128, 132, 138, 144, 150, - 156, 162, 168, 174, 180, 186, 192, 198, - 204, 210, 216, 222, 228, 234, 240, 246, - 252, 256, 260, 264, 268, 272, 276, 282, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, - }, - { /* Fourth byte 16-bit table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 52, 56, 60, 64, 68, 72, 76, - 80, 86, 92, 98, 104, 110, 116, 122, - 128, 134, 140, 146, 152, 158, 164, 170, - 176, 182, 188, 194, 200, 204, 208, 212, - 216, 222, 228, 234, 240, 246, 252, 258, - 264, 270, 276, 280, 284, 288, 292, 296, - 300, 304, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, - }, - { /* Fourth byte 16-bit table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 17, 24, 31, 38, 45, - 52, 57, 62, 69, 76, 83, 90, 97, - 104, 109, 114, 121, 128, 135, 142, 142, - 142, 147, 152, 159, 166, 173, 180, 180, - 180, 185, 190, 197, 204, 211, 218, 225, - 232, 237, 242, 249, 256, 263, 270, 277, - 284, 289, 294, 301, 308, 315, 322, 329, - 336, 341, 346, 353, 360, 367, 374, 381, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, - }, - { /* Fourth byte 16-bit table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 17, 24, 31, 38, 38, - 38, 43, 48, 55, 62, 69, 76, 76, - 76, 81, 86, 93, 100, 107, 114, 121, - 128, 128, 133, 133, 140, 140, 147, 147, - 154, 159, 164, 171, 178, 185, 192, 199, - 206, 211, 216, 223, 230, 237, 244, 251, - 258, 263, 268, 273, 278, 283, 288, 293, - 298, 303, 308, 313, 318, 323, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, - }, - { /* Fourth byte 16-bit table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 14, 23, 32, 41, 50, 59, - 68, 75, 82, 91, 100, 109, 118, 127, - 136, 143, 150, 159, 168, 177, 186, 195, - 204, 211, 218, 227, 236, 245, 254, 263, - 272, 279, 286, 295, 304, 313, 322, 331, - 340, 347, 354, 363, 372, 381, 390, 399, - 408, 413, 418, 425, 430, 437, 437, 442, - 449, 454, 459, 464, 469, 474, 477, 480, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, - }, - { /* Fourth byte 16-bit table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 14, 21, 26, 33, 33, 38, - 45, 50, 55, 60, 65, 70, 82, 94, - 106, 111, 116, 123, 130, 130, 130, 135, - 142, 147, 152, 157, 162, 162, 174, 186, - 198, 203, 208, 215, 222, 227, 232, 237, - 244, 249, 254, 259, 264, 269, 280, 291, - 293, 293, 293, 300, 305, 312, 312, 317, - 324, 329, 334, 339, 344, 349, 356, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, - }, - { /* Fourth byte 16-bit table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 15, 20, 25, 30, 35, - 40, 45, 50, 55, 60, 65, 70, 78, - 86, 94, 102, 110, 118, 126, 134, 142, - 150, 158, 166, 174, 182, 190, 190, 190, - 190, 195, 200, 205, 210, 215, 220, 225, - 230, 235, 240, 245, 250, 255, 260, 265, - 270, 275, 280, 285, 290, 295, 300, 305, - 310, 315, 320, 325, 330, 335, 340, 345, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, 350, 350, 350, 350, 350, 350, 350, - 350, - }, - { /* Fourth byte 16-bit table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 27, 42, 51, 66, 75, 84, - 102, 114, 123, 132, 141, 153, 165, 177, - 189, 201, 213, 225, 243, 249, 267, 285, - 300, 312, 330, 348, 360, 369, 378, 390, - 402, 417, 432, 441, 450, 462, 471, 480, - 486, 492, 501, 510, 528, 540, 555, 573, - 585, 594, 603, 621, 633, 651, 660, 675, - 684, 696, 705, 717, 732, 744, 759, 771, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, - }, - { /* Fourth byte 16-bit table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 24, 33, 45, 54, 63, 72, - 87, 99, 105, 123, 132, 147, 159, 171, - 180, 189, 201, 207, 219, 234, 240, 258, - 267, 271, 275, 279, 283, 287, 291, 295, - 299, 303, 307, 312, 317, 322, 327, 332, - 337, 342, 347, 352, 357, 362, 367, 372, - 377, 382, 385, 387, 389, 392, 394, 396, - 396, 396, 396, 396, 402, 408, 414, 420, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, - 432, - }, - { /* Fourth byte 16-bit table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 34, 38, - 42, 46, 50, 54, 58, 62, 66, 70, - 74, 78, 82, 86, 90, 94, 98, 102, - 106, 110, 114, 118, 122, 126, 130, 134, - 138, 142, 146, 150, 154, 158, 162, 166, - 170, 174, 178, 182, 186, 190, 194, 198, - 202, 206, 210, 214, 218, 222, 226, 230, - 234, 238, 242, 246, 250, 254, 258, 262, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, - }, - { /* Fourth byte 16-bit table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 125, - 130, 135, 140, 145, 150, 156, 162, 168, - 174, 180, 186, 190, 194, 198, 202, 206, - 210, 214, 218, 222, 226, 230, 234, 238, - 242, 246, 250, 254, 258, 262, 266, 270, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, - }, - { /* Fourth byte 16-bit table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 98, 104, 110, 116, 122, 126, 130, 134, - 138, 142, 146, 150, 154, 158, 162, 166, - 170, 174, 178, 182, 186, 190, 194, 198, - 202, 206, 210, 214, 218, 222, 226, 230, - 234, 238, 242, 246, 250, 254, 258, 262, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, - }, - { /* Fourth byte 16-bit table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 130, 136, 140, 144, 148, 152, 156, 160, - 164, 168, 172, 176, 180, 184, 188, 192, - 196, 200, 204, 210, 216, 222, 226, 230, - 234, 238, 242, 246, 250, 254, 258, 262, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, - }, - { /* Fourth byte 16-bit table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 54, 60, 66, 72, 78, 84, 90, - 96, 102, 108, 114, 120, 126, 132, 138, - 144, 150, 156, 162, 168, 174, 180, 186, - 192, 198, 204, 210, 216, 222, 228, 234, - 240, 246, 252, 258, 264, 270, 276, 282, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, - }, - { /* Fourth byte 16-bit table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 54, 60, 66, 72, 78, 84, 90, - 96, 96, 96, 102, 108, 114, 120, 126, - 132, 138, 144, 150, 156, 162, 168, 174, - 180, 186, 192, 198, 204, 210, 216, 222, - 228, 234, 240, 246, 252, 258, 264, 270, - 276, 282, 288, 294, 300, 306, 312, 318, - 324, 330, 336, 342, 348, 354, 360, 366, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, - }, - { /* Fourth byte 16-bit table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 17, 21, 25, 29, - 33, 37, 41, 45, 49, 53, 58, 62, - 66, 70, 74, 79, 83, 87, 91, 96, - 100, 104, 108, 112, 116, 121, 125, 129, - 133, 137, 141, 145, 149, 153, 157, 161, - 165, 169, 173, 177, 181, 185, 189, 193, - 197, 201, 205, 209, 213, 218, 222, 226, - 230, 235, 239, 243, 247, 251, 255, 259, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, - }, - { /* Fourth byte 16-bit table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 105, 109, 113, 117, 121, 125, - 129, 134, 139, 143, 147, 151, 155, 159, - 163, 167, 171, 175, 179, 184, 188, 192, - 196, 200, 205, 209, 213, 217, 221, 225, - 229, 233, 237, 241, 246, 250, 255, 259, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, - }, - { /* Fourth byte 16-bit table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 41, 45, 49, 53, 57, 61, - 66, 70, 75, 80, 84, 88, 92, 96, - 101, 106, 110, 114, 118, 122, 126, 130, - 134, 138, 142, 146, 150, 155, 159, 163, - 167, 171, 175, 179, 183, 187, 191, 195, - 199, 203, 207, 211, 215, 219, 223, 227, - 231, 236, 240, 244, 248, 252, 256, 261, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, - }, - { /* Fourth byte 16-bit table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 45, 49, 53, 57, 61, - 65, 69, 73, 77, 81, 85, 89, 93, - 97, 101, 105, 109, 113, 117, 122, 126, - 130, 134, 138, 142, 147, 151, 155, 159, - 163, 167, 171, 175, 179, 184, 188, 192, - 196, 201, 205, 209, 213, 217, 221, 225, - 230, 235, 240, 244, 249, 253, 257, 261, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, - }, - { /* Fourth byte 16-bit table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 29, - 33, 37, 41, 45, 49, 53, 58, 62, - 66, 71, 76, 80, 84, 88, 92, 96, - 100, 104, 108, 112, 117, 121, 126, 130, - 135, 139, 143, 147, 152, 156, 160, 165, - 170, 174, 178, 182, 186, 190, 194, 198, - 202, 206, 210, 214, 218, 222, 227, 231, - 236, 240, 245, 249, 254, 259, 264, 268, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, - }, - { /* Fourth byte 16-bit table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 9, 14, 19, 24, 28, 32, - 36, 40, 44, 48, 52, 56, 61, 65, - 69, 73, 77, 82, 86, 91, 96, 100, - 104, 108, 112, 116, 120, 125, 130, 135, - 139, 143, 148, 152, 156, 160, 165, 169, - 173, 177, 181, 185, 190, 194, 198, 202, - 206, 210, 214, 219, 224, 228, 233, 237, - 242, 246, 250, 254, 259, 264, 268, 273, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, - }, - { /* Fourth byte 16-bit table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 9, 13, 17, 21, 25, 29, - 34, 39, 44, 49, 53, 57, 61, 65, - 69, 73, 77, 81, 85, 89, 93, 97, - 102, 106, 110, 114, 118, 122, 126, 130, - 134, 138, 142, 146, 150, 155, 160, 165, - 169, 173, 177, 181, 186, 190, 195, 199, - 203, 208, 213, 217, 221, 225, 229, 233, - 237, 241, 245, 249, 253, 257, 261, 265, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, - }, - { /* Fourth byte 16-bit table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 25, 29, - 33, 37, 41, 45, 50, 55, 59, 63, - 67, 71, 75, 79, 84, 88, 92, 96, - 100, 105, 110, 114, 118, 122, 127, 131, - 135, 140, 145, 149, 153, 157, 162, 166, - 170, 174, 178, 182, 186, 190, 195, 199, - 203, 207, 212, 216, 220, 224, 228, 233, - 238, 242, 246, 250, 255, 259, 264, 268, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, - }, - { /* Fourth byte 16-bit table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - }, - { - { /* Fourth byte 16-bit table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 38, 44, 48, 52, 56, 60, 64, - 68, 72, 76, 80, 84, 90, 96, 102, - 108, 112, 116, 120, 124, 130, 136, 140, - 144, 148, 152, 156, 160, 164, 168, 172, - 176, 180, 184, 188, 192, 196, 200, 206, - 212, 216, 220, 224, 228, 232, 236, 240, - 244, 250, 256, 260, 264, 268, 272, 276, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, - 280, - }, - { /* Fourth byte 16-bit table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 54, 60, 66, - 72, 78, 84, 90, 96, 100, 104, 108, - 112, 116, 120, 124, 128, 134, 140, 144, - 148, 152, 156, 160, 164, 170, 176, 182, - 188, 194, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 262, 268, 274, 280, 284, 288, 292, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, - 296, - }, - { /* Fourth byte 16-bit table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 107, 116, 116, 116, 116, - 116, 120, 124, 128, 132, 138, 144, 150, - 156, 162, 168, 174, 180, 186, 192, 198, - 204, 210, 216, 222, 228, 234, 240, 246, - 252, 256, 260, 264, 268, 272, 276, 282, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, - }, - { /* Fourth byte 16-bit table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 52, 56, 60, 64, 68, 72, 76, - 80, 86, 92, 98, 104, 110, 116, 122, - 128, 134, 140, 146, 152, 158, 164, 170, - 176, 182, 188, 194, 200, 204, 208, 212, - 216, 222, 228, 234, 240, 246, 252, 258, - 264, 270, 276, 280, 284, 288, 292, 296, - 300, 304, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 308, - 308, - }, - { /* Fourth byte 16-bit table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 17, 24, 31, 38, 45, - 52, 57, 62, 69, 76, 83, 90, 97, - 104, 109, 114, 121, 128, 135, 142, 142, - 142, 147, 152, 159, 166, 173, 180, 180, - 180, 185, 190, 197, 204, 211, 218, 225, - 232, 237, 242, 249, 256, 263, 270, 277, - 284, 289, 294, 301, 308, 315, 322, 329, - 336, 341, 346, 353, 360, 367, 374, 381, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, - 388, - }, - { /* Fourth byte 16-bit table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 17, 24, 31, 38, 38, - 38, 43, 48, 55, 62, 69, 76, 76, - 76, 81, 86, 93, 100, 107, 114, 121, - 128, 128, 133, 133, 140, 140, 147, 147, - 154, 159, 164, 171, 178, 185, 192, 199, - 206, 211, 216, 223, 230, 237, 244, 251, - 258, 263, 268, 273, 278, 283, 288, 293, - 298, 303, 308, 313, 318, 323, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, - 328, - }, - { /* Fourth byte 16-bit table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 14, 23, 32, 41, 50, 59, - 68, 75, 82, 91, 100, 109, 118, 127, - 136, 143, 150, 159, 168, 177, 186, 195, - 204, 211, 218, 227, 236, 245, 254, 263, - 272, 279, 286, 295, 304, 313, 322, 331, - 340, 347, 354, 363, 372, 381, 390, 399, - 408, 413, 418, 425, 430, 437, 437, 442, - 449, 454, 459, 464, 469, 474, 477, 480, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 483, 483, - 483, - }, - { /* Fourth byte 16-bit table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 14, 21, 26, 33, 33, 38, - 45, 50, 55, 60, 65, 70, 82, 94, - 106, 111, 116, 123, 130, 130, 130, 135, - 142, 147, 152, 157, 162, 162, 174, 186, - 198, 203, 208, 215, 222, 227, 232, 237, - 244, 249, 254, 259, 264, 269, 280, 291, - 293, 293, 293, 300, 305, 312, 312, 317, - 324, 329, 334, 339, 344, 349, 356, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, - 359, - }, - { /* Fourth byte 16-bit table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 10, 15, 20, 25, 30, 35, - 40, 45, 50, 55, 60, 65, 70, 78, - 86, 94, 102, 110, 118, 126, 134, 142, - 150, 158, 166, 174, 182, 190, 207, 221, - 221, 226, 231, 236, 241, 246, 251, 256, - 261, 266, 271, 276, 281, 286, 291, 296, - 301, 306, 311, 316, 321, 326, 331, 336, - 341, 346, 351, 356, 361, 366, 371, 376, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, 381, 381, 381, 381, 381, 381, 381, - 381, - }, - { /* Fourth byte 16-bit table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 27, 42, 51, 66, 75, 84, - 102, 114, 123, 132, 141, 153, 165, 177, - 189, 201, 213, 225, 243, 249, 267, 285, - 300, 312, 330, 348, 360, 369, 378, 390, - 402, 417, 432, 441, 450, 462, 471, 480, - 486, 492, 501, 510, 528, 540, 555, 573, - 585, 594, 603, 621, 633, 651, 660, 675, - 684, 696, 705, 717, 732, 744, 759, 771, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, - 777, - }, - { /* Fourth byte 16-bit table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 24, 33, 45, 54, 63, 72, - 87, 99, 105, 123, 132, 147, 159, 171, - 180, 189, 201, 207, 219, 234, 240, 258, - 267, 271, 275, 279, 283, 287, 291, 295, - 299, 303, 307, 312, 317, 322, 327, 332, - 337, 342, 347, 352, 357, 362, 367, 372, - 377, 382, 385, 387, 389, 392, 394, 396, - 398, 401, 404, 406, 412, 418, 424, 430, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, 442, 442, 442, 442, 442, 442, 442, - 442, - }, - { /* Fourth byte 16-bit table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 164, 168, 172, 176, 180, 184, 188, - 192, 196, 200, 204, 208, 212, 216, 220, - 224, 228, 232, 236, 240, 244, 248, 252, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, - 256, - }, - { /* Fourth byte 16-bit table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 34, 38, - 42, 46, 50, 54, 58, 62, 66, 70, - 74, 78, 82, 86, 90, 94, 98, 102, - 106, 110, 114, 118, 122, 126, 130, 134, - 138, 142, 146, 150, 154, 158, 162, 166, - 170, 174, 178, 182, 186, 190, 194, 198, - 202, 206, 210, 214, 218, 222, 226, 230, - 234, 238, 242, 246, 250, 254, 258, 262, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, - }, - { /* Fourth byte 16-bit table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 125, - 130, 135, 140, 145, 150, 156, 162, 168, - 174, 180, 186, 190, 194, 198, 202, 206, - 210, 214, 218, 222, 226, 230, 234, 238, - 242, 246, 250, 254, 258, 262, 266, 270, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, - 274, - }, - { /* Fourth byte 16-bit table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 98, 104, 110, 116, 122, 126, 130, 134, - 138, 142, 146, 150, 154, 158, 162, 166, - 170, 174, 178, 182, 186, 190, 194, 198, - 202, 206, 210, 214, 218, 222, 226, 230, - 234, 238, 242, 246, 250, 254, 258, 262, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, - }, - { /* Fourth byte 16-bit table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 130, 136, 140, 144, 148, 152, 156, 160, - 164, 168, 172, 176, 180, 184, 188, 192, - 196, 200, 204, 210, 216, 222, 226, 230, - 234, 238, 242, 246, 250, 254, 258, 262, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 266, 266, 266, - 266, - }, - { /* Fourth byte 16-bit table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 54, 60, 66, 72, 78, 84, 90, - 96, 102, 108, 114, 120, 126, 132, 138, - 144, 150, 156, 162, 168, 174, 180, 186, - 192, 198, 204, 210, 216, 222, 228, 234, - 240, 246, 252, 258, 264, 270, 276, 282, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, 288, 288, 288, 288, 288, 288, 288, - 288, - }, - { /* Fourth byte 16-bit table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 12, 18, 24, 30, 36, 42, - 48, 54, 60, 66, 72, 78, 84, 90, - 96, 96, 96, 102, 108, 114, 120, 126, - 132, 138, 144, 150, 156, 162, 168, 174, - 180, 186, 192, 198, 204, 210, 216, 222, - 228, 234, 240, 246, 252, 258, 264, 270, - 276, 282, 288, 294, 300, 306, 312, 318, - 324, 330, 336, 342, 348, 354, 360, 366, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, - 372, - }, - { /* Fourth byte 16-bit table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 17, 21, 25, 29, - 33, 37, 41, 45, 49, 53, 58, 62, - 66, 70, 74, 79, 83, 87, 91, 96, - 100, 104, 108, 112, 116, 121, 125, 129, - 133, 137, 141, 145, 149, 153, 157, 161, - 165, 169, 173, 177, 181, 185, 189, 193, - 197, 201, 205, 209, 213, 218, 222, 226, - 230, 235, 239, 243, 247, 251, 255, 259, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, - }, - { /* Fourth byte 16-bit table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 105, 109, 113, 117, 121, 125, - 129, 134, 139, 143, 147, 151, 155, 159, - 163, 167, 171, 175, 179, 184, 188, 192, - 196, 200, 205, 209, 213, 217, 221, 225, - 229, 233, 237, 241, 246, 250, 255, 259, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, 263, 263, 263, 263, 263, 263, 263, - 263, - }, - { /* Fourth byte 16-bit table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 41, 45, 49, 53, 57, 61, - 66, 70, 75, 80, 84, 88, 92, 96, - 101, 106, 110, 114, 118, 122, 126, 130, - 134, 138, 142, 146, 150, 155, 159, 163, - 167, 171, 175, 179, 183, 187, 191, 195, - 199, 203, 207, 211, 215, 219, 223, 227, - 231, 236, 240, 244, 248, 252, 256, 261, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, - }, - { /* Fourth byte 16-bit table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 45, 49, 53, 57, 61, - 65, 69, 73, 77, 81, 85, 89, 93, - 97, 101, 105, 109, 113, 117, 122, 126, - 130, 134, 138, 142, 147, 151, 155, 159, - 163, 167, 171, 175, 179, 184, 188, 192, - 196, 201, 205, 209, 213, 217, 221, 225, - 230, 235, 240, 244, 249, 253, 257, 261, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 265, - 265, - }, - { /* Fourth byte 16-bit table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 29, - 33, 37, 41, 45, 49, 53, 58, 62, - 66, 71, 76, 80, 84, 88, 92, 96, - 100, 104, 108, 112, 117, 121, 126, 130, - 135, 139, 143, 147, 152, 156, 160, 165, - 170, 174, 178, 182, 186, 190, 194, 198, - 202, 206, 210, 214, 218, 222, 227, 231, - 236, 240, 245, 249, 254, 259, 264, 268, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, - }, - { /* Fourth byte 16-bit table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 9, 14, 19, 24, 28, 32, - 36, 40, 44, 48, 52, 56, 61, 65, - 69, 73, 77, 82, 86, 91, 96, 100, - 104, 108, 112, 116, 120, 125, 130, 135, - 139, 143, 148, 152, 156, 160, 165, 169, - 173, 177, 181, 185, 190, 194, 198, 202, - 206, 210, 214, 219, 224, 228, 233, 237, - 242, 246, 250, 254, 259, 264, 268, 273, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, - 277, - }, - { /* Fourth byte 16-bit table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 9, 13, 17, 21, 25, 29, - 34, 39, 44, 49, 53, 57, 61, 65, - 69, 73, 77, 81, 85, 89, 93, 97, - 102, 106, 110, 114, 118, 122, 126, 130, - 134, 138, 142, 146, 150, 155, 160, 165, - 169, 173, 177, 181, 186, 190, 195, 199, - 203, 208, 213, 217, 221, 225, 229, 233, - 237, 241, 245, 249, 253, 257, 261, 265, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, - 269, - }, - { /* Fourth byte 16-bit table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 25, 29, - 33, 37, 41, 45, 50, 55, 59, 63, - 67, 71, 75, 79, 84, 88, 92, 96, - 100, 105, 110, 114, 118, 122, 127, 131, - 135, 140, 145, 149, 153, 157, 162, 166, - 170, 174, 178, 182, 186, 190, 195, 199, - 203, 207, 212, 216, 220, 224, 228, 233, - 238, 242, 246, 250, 255, 259, 264, 268, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, - 272, - }, - }, -}; - -static const uchar_t u8_decomp_final_tbl[2][19370] = { - { - 0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84, - 0x32, 0x33, 0x20, 0xCC, 0x81, 0xCE, 0xBC, 0x20, - 0xCC, 0xA7, 0x31, 0x6F, 0x31, 0xE2, 0x81, 0x84, - 0x34, 0x31, 0xE2, 0x81, 0x84, 0x32, 0x33, 0xE2, - 0x81, 0x84, 0x34, 0xF6, 0x41, 0xCC, 0x80, 0xF6, - 0x41, 0xCC, 0x81, 0xF6, 0x41, 0xCC, 0x82, 0xF6, - 0x41, 0xCC, 0x83, 0xF6, 0x41, 0xCC, 0x88, 0xF6, - 0x41, 0xCC, 0x8A, 0xF6, 0x43, 0xCC, 0xA7, 0xF6, - 0x45, 0xCC, 0x80, 0xF6, 0x45, 0xCC, 0x81, 0xF6, - 0x45, 0xCC, 0x82, 0xF6, 0x45, 0xCC, 0x88, 0xF6, - 0x49, 0xCC, 0x80, 0xF6, 0x49, 0xCC, 0x81, 0xF6, - 0x49, 0xCC, 0x82, 0xF6, 0x49, 0xCC, 0x88, 0xF6, - 0x4E, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x80, 0xF6, - 0x4F, 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xF6, - 0x4F, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x88, 0xF6, - 0x55, 0xCC, 0x80, 0xF6, 0x55, 0xCC, 0x81, 0xF6, - 0x55, 0xCC, 0x82, 0xF6, 0x55, 0xCC, 0x88, 0xF6, - 0x59, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x80, 0xF6, - 0x61, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x82, 0xF6, - 0x61, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x88, 0xF6, - 0x61, 0xCC, 0x8A, 0xF6, 0x63, 0xCC, 0xA7, 0xF6, - 0x65, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x81, 0xF6, - 0x65, 0xCC, 0x82, 0xF6, 0x65, 0xCC, 0x88, 0xF6, - 0x69, 0xCC, 0x80, 0xF6, 0x69, 0xCC, 0x81, 0xF6, - 0x69, 0xCC, 0x82, 0xF6, 0x69, 0xCC, 0x88, 0xF6, - 0x6E, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x80, 0xF6, - 0x6F, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, 0xF6, - 0x6F, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x88, 0xF6, - 0x75, 0xCC, 0x80, 0xF6, 0x75, 0xCC, 0x81, 0xF6, - 0x75, 0xCC, 0x82, 0xF6, 0x75, 0xCC, 0x88, 0xF6, - 0x79, 0xCC, 0x81, 0xF6, 0x79, 0xCC, 0x88, 0xF6, - 0x41, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x84, 0xF6, - 0x41, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0x86, 0xF6, - 0x41, 0xCC, 0xA8, 0xF6, 0x61, 0xCC, 0xA8, 0xF6, - 0x43, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0x81, 0xF6, - 0x43, 0xCC, 0x82, 0xF6, 0x63, 0xCC, 0x82, 0xF6, - 0x43, 0xCC, 0x87, 0xF6, 0x63, 0xCC, 0x87, 0xF6, - 0x43, 0xCC, 0x8C, 0xF6, 0x63, 0xCC, 0x8C, 0xF6, - 0x44, 0xCC, 0x8C, 0xF6, 0x64, 0xCC, 0x8C, 0xF6, - 0x45, 0xCC, 0x84, 0xF6, 0x65, 0xCC, 0x84, 0xF6, - 0x45, 0xCC, 0x86, 0xF6, 0x65, 0xCC, 0x86, 0xF6, - 0x45, 0xCC, 0x87, 0xF6, 0x65, 0xCC, 0x87, 0xF6, - 0x45, 0xCC, 0xA8, 0xF6, 0x65, 0xCC, 0xA8, 0xF6, - 0x45, 0xCC, 0x8C, 0xF6, 0x65, 0xCC, 0x8C, 0xF6, - 0x47, 0xCC, 0x82, 0xF6, 0x67, 0xCC, 0x82, 0xF6, - 0x47, 0xCC, 0x86, 0xF6, 0x67, 0xCC, 0x86, 0xF6, - 0x47, 0xCC, 0x87, 0xF6, 0x67, 0xCC, 0x87, 0xF6, - 0x47, 0xCC, 0xA7, 0xF6, 0x67, 0xCC, 0xA7, 0xF6, - 0x48, 0xCC, 0x82, 0xF6, 0x68, 0xCC, 0x82, 0xF6, - 0x49, 0xCC, 0x83, 0xF6, 0x69, 0xCC, 0x83, 0xF6, - 0x49, 0xCC, 0x84, 0xF6, 0x69, 0xCC, 0x84, 0xF6, - 0x49, 0xCC, 0x86, 0xF6, 0x69, 0xCC, 0x86, 0xF6, - 0x49, 0xCC, 0xA8, 0xF6, 0x69, 0xCC, 0xA8, 0xF6, - 0x49, 0xCC, 0x87, 0x49, 0x4A, 0x69, 0x6A, 0xF6, - 0x4A, 0xCC, 0x82, 0xF6, 0x6A, 0xCC, 0x82, 0xF6, - 0x4B, 0xCC, 0xA7, 0xF6, 0x6B, 0xCC, 0xA7, 0xF6, - 0x4C, 0xCC, 0x81, 0xF6, 0x6C, 0xCC, 0x81, 0xF6, - 0x4C, 0xCC, 0xA7, 0xF6, 0x6C, 0xCC, 0xA7, 0xF6, - 0x4C, 0xCC, 0x8C, 0xF6, 0x6C, 0xCC, 0x8C, 0x4C, - 0xC2, 0xB7, 0x6C, 0xC2, 0xB7, 0xF6, 0x4E, 0xCC, - 0x81, 0xF6, 0x6E, 0xCC, 0x81, 0xF6, 0x4E, 0xCC, - 0xA7, 0xF6, 0x6E, 0xCC, 0xA7, 0xF6, 0x4E, 0xCC, - 0x8C, 0xF6, 0x6E, 0xCC, 0x8C, 0xCA, 0xBC, 0x6E, - 0xF6, 0x4F, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, 0x84, - 0xF6, 0x4F, 0xCC, 0x86, 0xF6, 0x6F, 0xCC, 0x86, - 0xF6, 0x4F, 0xCC, 0x8B, 0xF6, 0x6F, 0xCC, 0x8B, - 0xF6, 0x52, 0xCC, 0x81, 0xF6, 0x72, 0xCC, 0x81, - 0xF6, 0x52, 0xCC, 0xA7, 0xF6, 0x72, 0xCC, 0xA7, - 0xF6, 0x52, 0xCC, 0x8C, 0xF6, 0x72, 0xCC, 0x8C, - 0xF6, 0x53, 0xCC, 0x81, 0xF6, 0x73, 0xCC, 0x81, - 0xF6, 0x53, 0xCC, 0x82, 0xF6, 0x73, 0xCC, 0x82, - 0xF6, 0x53, 0xCC, 0xA7, 0xF6, 0x73, 0xCC, 0xA7, - 0xF6, 0x53, 0xCC, 0x8C, 0xF6, 0x73, 0xCC, 0x8C, - 0xF6, 0x54, 0xCC, 0xA7, 0xF6, 0x74, 0xCC, 0xA7, - 0xF6, 0x54, 0xCC, 0x8C, 0xF6, 0x74, 0xCC, 0x8C, - 0xF6, 0x55, 0xCC, 0x83, 0xF6, 0x75, 0xCC, 0x83, - 0xF6, 0x55, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x84, - 0xF6, 0x55, 0xCC, 0x86, 0xF6, 0x75, 0xCC, 0x86, - 0xF6, 0x55, 0xCC, 0x8A, 0xF6, 0x75, 0xCC, 0x8A, - 0xF6, 0x55, 0xCC, 0x8B, 0xF6, 0x75, 0xCC, 0x8B, - 0xF6, 0x55, 0xCC, 0xA8, 0xF6, 0x75, 0xCC, 0xA8, - 0xF6, 0x57, 0xCC, 0x82, 0xF6, 0x77, 0xCC, 0x82, - 0xF6, 0x59, 0xCC, 0x82, 0xF6, 0x79, 0xCC, 0x82, - 0xF6, 0x59, 0xCC, 0x88, 0xF6, 0x5A, 0xCC, 0x81, - 0xF6, 0x7A, 0xCC, 0x81, 0xF6, 0x5A, 0xCC, 0x87, - 0xF6, 0x7A, 0xCC, 0x87, 0xF6, 0x5A, 0xCC, 0x8C, - 0xF6, 0x7A, 0xCC, 0x8C, 0x73, 0xF6, 0x4F, 0xCC, - 0x9B, 0xF6, 0x6F, 0xCC, 0x9B, 0xF6, 0x55, 0xCC, - 0x9B, 0xF6, 0x75, 0xCC, 0x9B, 0x44, 0x5A, 0xCC, - 0x8C, 0x44, 0x7A, 0xCC, 0x8C, 0x64, 0x7A, 0xCC, - 0x8C, 0x4C, 0x4A, 0x4C, 0x6A, 0x6C, 0x6A, 0x4E, - 0x4A, 0x4E, 0x6A, 0x6E, 0x6A, 0xF6, 0x41, 0xCC, - 0x8C, 0xF6, 0x61, 0xCC, 0x8C, 0xF6, 0x49, 0xCC, - 0x8C, 0xF6, 0x69, 0xCC, 0x8C, 0xF6, 0x4F, 0xCC, - 0x8C, 0xF6, 0x6F, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, - 0x8C, 0xF6, 0x75, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, - 0x88, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x88, 0xCC, - 0x84, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x81, 0xF6, - 0x75, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x55, 0xCC, - 0x88, 0xCC, 0x8C, 0xF6, 0x75, 0xCC, 0x88, 0xCC, - 0x8C, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x80, 0xF6, - 0x75, 0xCC, 0x88, 0xCC, 0x80, 0xF6, 0x41, 0xCC, - 0x88, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x88, 0xCC, - 0x84, 0xF6, 0x41, 0xCC, 0x87, 0xCC, 0x84, 0xF6, - 0x61, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0xC3, 0x86, - 0xCC, 0x84, 0xF6, 0xC3, 0xA6, 0xCC, 0x84, 0xF6, - 0x47, 0xCC, 0x8C, 0xF6, 0x67, 0xCC, 0x8C, 0xF6, - 0x4B, 0xCC, 0x8C, 0xF6, 0x6B, 0xCC, 0x8C, 0xF6, - 0x4F, 0xCC, 0xA8, 0xF6, 0x6F, 0xCC, 0xA8, 0xF6, - 0x4F, 0xCC, 0xA8, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, - 0xA8, 0xCC, 0x84, 0xF6, 0xC6, 0xB7, 0xCC, 0x8C, - 0xF6, 0xCA, 0x92, 0xCC, 0x8C, 0xF6, 0x6A, 0xCC, - 0x8C, 0x44, 0x5A, 0x44, 0x7A, 0x64, 0x7A, 0xF6, - 0x47, 0xCC, 0x81, 0xF6, 0x67, 0xCC, 0x81, 0xF6, - 0x4E, 0xCC, 0x80, 0xF6, 0x6E, 0xCC, 0x80, 0xF6, - 0x41, 0xCC, 0x8A, 0xCC, 0x81, 0xF6, 0x61, 0xCC, - 0x8A, 0xCC, 0x81, 0xF6, 0xC3, 0x86, 0xCC, 0x81, - 0xF6, 0xC3, 0xA6, 0xCC, 0x81, 0xF6, 0xC3, 0x98, - 0xCC, 0x81, 0xF6, 0xC3, 0xB8, 0xCC, 0x81, 0xF6, - 0x41, 0xCC, 0x8F, 0xF6, 0x61, 0xCC, 0x8F, 0xF6, - 0x41, 0xCC, 0x91, 0xF6, 0x61, 0xCC, 0x91, 0xF6, - 0x45, 0xCC, 0x8F, 0xF6, 0x65, 0xCC, 0x8F, 0xF6, - 0x45, 0xCC, 0x91, 0xF6, 0x65, 0xCC, 0x91, 0xF6, - 0x49, 0xCC, 0x8F, 0xF6, 0x69, 0xCC, 0x8F, 0xF6, - 0x49, 0xCC, 0x91, 0xF6, 0x69, 0xCC, 0x91, 0xF6, - 0x4F, 0xCC, 0x8F, 0xF6, 0x6F, 0xCC, 0x8F, 0xF6, - 0x4F, 0xCC, 0x91, 0xF6, 0x6F, 0xCC, 0x91, 0xF6, - 0x52, 0xCC, 0x8F, 0xF6, 0x72, 0xCC, 0x8F, 0xF6, - 0x52, 0xCC, 0x91, 0xF6, 0x72, 0xCC, 0x91, 0xF6, - 0x55, 0xCC, 0x8F, 0xF6, 0x75, 0xCC, 0x8F, 0xF6, - 0x55, 0xCC, 0x91, 0xF6, 0x75, 0xCC, 0x91, 0xF6, - 0x53, 0xCC, 0xA6, 0xF6, 0x73, 0xCC, 0xA6, 0xF6, - 0x54, 0xCC, 0xA6, 0xF6, 0x74, 0xCC, 0xA6, 0xF6, - 0x48, 0xCC, 0x8C, 0xF6, 0x68, 0xCC, 0x8C, 0xF6, - 0x41, 0xCC, 0x87, 0xF6, 0x61, 0xCC, 0x87, 0xF6, - 0x45, 0xCC, 0xA7, 0xF6, 0x65, 0xCC, 0xA7, 0xF6, - 0x4F, 0xCC, 0x88, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, - 0x88, 0xCC, 0x84, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, - 0x84, 0xF6, 0x6F, 0xCC, 0x83, 0xCC, 0x84, 0xF6, - 0x4F, 0xCC, 0x87, 0xF6, 0x6F, 0xCC, 0x87, 0xF6, - 0x4F, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, - 0x87, 0xCC, 0x84, 0xF6, 0x59, 0xCC, 0x84, 0xF6, - 0x79, 0xCC, 0x84, 0x68, 0xC9, 0xA6, 0x6A, 0x72, - 0xC9, 0xB9, 0xC9, 0xBB, 0xCA, 0x81, 0x77, 0x79, - 0x20, 0xCC, 0x86, 0x20, 0xCC, 0x87, 0x20, 0xCC, - 0x8A, 0x20, 0xCC, 0xA8, 0x20, 0xCC, 0x83, 0x20, - 0xCC, 0x8B, 0xC9, 0xA3, 0x6C, 0x73, 0x78, 0xCA, - 0x95, 0xF6, 0xCC, 0x80, 0xF6, 0xCC, 0x81, 0xF6, - 0xCC, 0x93, 0xF6, 0xCC, 0x88, 0xCC, 0x81, 0xF6, - 0xCA, 0xB9, 0x20, 0xCD, 0x85, 0xF6, 0x3B, 0x20, - 0xCC, 0x81, 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, - 0x20, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0xCE, 0x91, - 0xCC, 0x81, 0xF6, 0xC2, 0xB7, 0xF6, 0xCE, 0x95, - 0xCC, 0x81, 0xF6, 0xCE, 0x97, 0xCC, 0x81, 0xF6, - 0xCE, 0x99, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, - 0x81, 0xF6, 0xCE, 0xA5, 0xCC, 0x81, 0xF6, 0xCE, - 0xA9, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x88, - 0xCC, 0x81, 0xF6, 0xCE, 0x99, 0xCC, 0x88, 0xF6, - 0xCE, 0xA5, 0xCC, 0x88, 0xF6, 0xCE, 0xB1, 0xCC, - 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x81, 0xF6, 0xCE, - 0xB7, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, - 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, - 0xCE, 0xB9, 0xCC, 0x88, 0xF6, 0xCF, 0x85, 0xCC, - 0x88, 0xF6, 0xCE, 0xBF, 0xCC, 0x81, 0xF6, 0xCF, - 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, 0x81, - 0xCE, 0xB2, 0xCE, 0xB8, 0xCE, 0xA5, 0xF5, 0x05, - 0xCF, 0x92, 0xCC, 0x81, 0xCE, 0xA5, 0xCC, 0x81, - 0xF5, 0x05, 0xCF, 0x92, 0xCC, 0x88, 0xCE, 0xA5, - 0xCC, 0x88, 0xCF, 0x86, 0xCF, 0x80, 0xCE, 0xBA, - 0xCF, 0x81, 0xCF, 0x82, 0xCE, 0x98, 0xCE, 0xB5, - 0xF6, 0xD0, 0x95, 0xCC, 0x80, 0xF6, 0xD0, 0x95, - 0xCC, 0x88, 0xF6, 0xD0, 0x93, 0xCC, 0x81, 0xF6, - 0xD0, 0x86, 0xCC, 0x88, 0xF6, 0xD0, 0x9A, 0xCC, - 0x81, 0xF6, 0xD0, 0x98, 0xCC, 0x80, 0xF6, 0xD0, - 0xA3, 0xCC, 0x86, 0xF6, 0xD0, 0x98, 0xCC, 0x86, - 0xF6, 0xD0, 0xB8, 0xCC, 0x86, 0xF6, 0xD0, 0xB5, - 0xCC, 0x80, 0xF6, 0xD0, 0xB5, 0xCC, 0x88, 0xF6, - 0xD0, 0xB3, 0xCC, 0x81, 0xF6, 0xD1, 0x96, 0xCC, - 0x88, 0xF6, 0xD0, 0xBA, 0xCC, 0x81, 0xF6, 0xD0, - 0xB8, 0xCC, 0x80, 0xF6, 0xD1, 0x83, 0xCC, 0x86, - 0xF6, 0xD1, 0xB4, 0xCC, 0x8F, 0xF6, 0xD1, 0xB5, - 0xCC, 0x8F, 0xF6, 0xD0, 0x96, 0xCC, 0x86, 0xF6, - 0xD0, 0xB6, 0xCC, 0x86, 0xF6, 0xD0, 0x90, 0xCC, - 0x86, 0xF6, 0xD0, 0xB0, 0xCC, 0x86, 0xF6, 0xD0, - 0x90, 0xCC, 0x88, 0xF6, 0xD0, 0xB0, 0xCC, 0x88, - 0xF6, 0xD0, 0x95, 0xCC, 0x86, 0xF6, 0xD0, 0xB5, - 0xCC, 0x86, 0xF6, 0xD3, 0x98, 0xCC, 0x88, 0xF6, - 0xD3, 0x99, 0xCC, 0x88, 0xF6, 0xD0, 0x96, 0xCC, - 0x88, 0xF6, 0xD0, 0xB6, 0xCC, 0x88, 0xF6, 0xD0, - 0x97, 0xCC, 0x88, 0xF6, 0xD0, 0xB7, 0xCC, 0x88, - 0xF6, 0xD0, 0x98, 0xCC, 0x84, 0xF6, 0xD0, 0xB8, - 0xCC, 0x84, 0xF6, 0xD0, 0x98, 0xCC, 0x88, 0xF6, - 0xD0, 0xB8, 0xCC, 0x88, 0xF6, 0xD0, 0x9E, 0xCC, - 0x88, 0xF6, 0xD0, 0xBE, 0xCC, 0x88, 0xF6, 0xD3, - 0xA8, 0xCC, 0x88, 0xF6, 0xD3, 0xA9, 0xCC, 0x88, - 0xF6, 0xD0, 0xAD, 0xCC, 0x88, 0xF6, 0xD1, 0x8D, - 0xCC, 0x88, 0xF6, 0xD0, 0xA3, 0xCC, 0x84, 0xF6, - 0xD1, 0x83, 0xCC, 0x84, 0xF6, 0xD0, 0xA3, 0xCC, - 0x88, 0xF6, 0xD1, 0x83, 0xCC, 0x88, 0xF6, 0xD0, - 0xA3, 0xCC, 0x8B, 0xF6, 0xD1, 0x83, 0xCC, 0x8B, - 0xF6, 0xD0, 0xA7, 0xCC, 0x88, 0xF6, 0xD1, 0x87, - 0xCC, 0x88, 0xF6, 0xD0, 0xAB, 0xCC, 0x88, 0xF6, - 0xD1, 0x8B, 0xCC, 0x88, 0xD5, 0xA5, 0xD6, 0x82, - 0xF6, 0xD8, 0xA7, 0xD9, 0x93, 0xF6, 0xD8, 0xA7, - 0xD9, 0x94, 0xF6, 0xD9, 0x88, 0xD9, 0x94, 0xF6, - 0xD8, 0xA7, 0xD9, 0x95, 0xF6, 0xD9, 0x8A, 0xD9, - 0x94, 0xD8, 0xA7, 0xD9, 0xB4, 0xD9, 0x88, 0xD9, - 0xB4, 0xDB, 0x87, 0xD9, 0xB4, 0xD9, 0x8A, 0xD9, - 0xB4, 0xF6, 0xDB, 0x95, 0xD9, 0x94, 0xF6, 0xDB, - 0x81, 0xD9, 0x94, 0xF6, 0xDB, 0x92, 0xD9, 0x94, - 0xF6, 0xE0, 0xA4, 0xA8, 0xE0, 0xA4, 0xBC, 0xF6, - 0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, - 0xA4, 0xB3, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, - 0x95, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x96, - 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x97, 0xE0, - 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x9C, 0xE0, 0xA4, - 0xBC, 0xF6, 0xE0, 0xA4, 0xA1, 0xE0, 0xA4, 0xBC, - 0xF6, 0xE0, 0xA4, 0xA2, 0xE0, 0xA4, 0xBC, 0xF6, - 0xE0, 0xA4, 0xAB, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, - 0xA4, 0xAF, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA7, - 0x87, 0xE0, 0xA6, 0xBE, 0xF6, 0xE0, 0xA7, 0x87, - 0xE0, 0xA7, 0x97, 0xF6, 0xE0, 0xA6, 0xA1, 0xE0, - 0xA6, 0xBC, 0xF6, 0xE0, 0xA6, 0xA2, 0xE0, 0xA6, - 0xBC, 0xF6, 0xE0, 0xA6, 0xAF, 0xE0, 0xA6, 0xBC, - 0xF6, 0xE0, 0xA8, 0xB2, 0xE0, 0xA8, 0xBC, 0xF6, - 0xE0, 0xA8, 0xB8, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, - 0xA8, 0x96, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, - 0x97, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, 0x9C, - 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, 0xAB, 0xE0, - 0xA8, 0xBC, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, - 0x96, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAC, 0xBE, - 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x97, 0xF6, - 0xE0, 0xAC, 0xA1, 0xE0, 0xAC, 0xBC, 0xF6, 0xE0, - 0xAC, 0xA2, 0xE0, 0xAC, 0xBC, 0xF6, 0xE0, 0xAE, - 0x92, 0xE0, 0xAF, 0x97, 0xF6, 0xE0, 0xAF, 0x86, - 0xE0, 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, 0x87, 0xE0, - 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, 0x86, 0xE0, 0xAF, - 0x97, 0xF6, 0xE0, 0xB1, 0x86, 0xE0, 0xB1, 0x96, - 0xF6, 0xE0, 0xB2, 0xBF, 0xE0, 0xB3, 0x95, 0xF6, - 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x95, 0xF6, 0xE0, - 0xB3, 0x86, 0xE0, 0xB3, 0x96, 0xF6, 0xE0, 0xB3, - 0x86, 0xE0, 0xB3, 0x82, 0xF6, 0xE0, 0xB3, 0x86, - 0xE0, 0xB3, 0x82, 0xE0, 0xB3, 0x95, 0xF6, 0xE0, - 0xB5, 0x86, 0xE0, 0xB4, 0xBE, 0xF6, 0xE0, 0xB5, - 0x87, 0xE0, 0xB4, 0xBE, 0xF6, 0xE0, 0xB5, 0x86, - 0xE0, 0xB5, 0x97, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, - 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, 0xB7, - 0x8F, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x8F, - 0xE0, 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, - 0xB7, 0x9F, 0xE0, 0xB9, 0x8D, 0xE0, 0xB8, 0xB2, - 0xE0, 0xBB, 0x8D, 0xE0, 0xBA, 0xB2, 0xE0, 0xBA, - 0xAB, 0xE0, 0xBA, 0x99, 0xE0, 0xBA, 0xAB, 0xE0, - 0xBA, 0xA1, 0xE0, 0xBC, 0x8B, 0xF6, 0xE0, 0xBD, - 0x82, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x8C, - 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x91, 0xE0, - 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x96, 0xE0, 0xBE, - 0xB7, 0xF6, 0xE0, 0xBD, 0x9B, 0xE0, 0xBE, 0xB7, - 0xF6, 0xE0, 0xBD, 0x80, 0xE0, 0xBE, 0xB5, 0xF6, - 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB2, 0xF6, 0xE0, - 0xBD, 0xB1, 0xE0, 0xBD, 0xB4, 0xF6, 0xE0, 0xBE, - 0xB2, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, 0xB2, 0xE0, - 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, 0xBE, - 0xB3, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, 0xB3, 0xE0, - 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, 0xBD, - 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, 0xBE, 0x92, - 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0x9C, 0xE0, - 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xA1, 0xE0, 0xBE, - 0xB7, 0xF6, 0xE0, 0xBE, 0xA6, 0xE0, 0xBE, 0xB7, - 0xF6, 0xE0, 0xBE, 0xAB, 0xE0, 0xBE, 0xB7, 0xF6, - 0xE0, 0xBE, 0x90, 0xE0, 0xBE, 0xB5, 0xF6, 0xE1, - 0x80, 0xA5, 0xE1, 0x80, 0xAE, 0xF6, 0x41, 0xCC, - 0xA5, 0xF6, 0x61, 0xCC, 0xA5, 0xF6, 0x42, 0xCC, - 0x87, 0xF6, 0x62, 0xCC, 0x87, 0xF6, 0x42, 0xCC, - 0xA3, 0xF6, 0x62, 0xCC, 0xA3, 0xF6, 0x42, 0xCC, - 0xB1, 0xF6, 0x62, 0xCC, 0xB1, 0xF6, 0x43, 0xCC, - 0xA7, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0xA7, 0xCC, - 0x81, 0xF6, 0x44, 0xCC, 0x87, 0xF6, 0x64, 0xCC, - 0x87, 0xF6, 0x44, 0xCC, 0xA3, 0xF6, 0x64, 0xCC, - 0xA3, 0xF6, 0x44, 0xCC, 0xB1, 0xF6, 0x64, 0xCC, - 0xB1, 0xF6, 0x44, 0xCC, 0xA7, 0xF6, 0x64, 0xCC, - 0xA7, 0xF6, 0x44, 0xCC, 0xAD, 0xF6, 0x64, 0xCC, - 0xAD, 0xF6, 0x45, 0xCC, 0x84, 0xCC, 0x80, 0xF6, - 0x65, 0xCC, 0x84, 0xCC, 0x80, 0xF6, 0x45, 0xCC, - 0x84, 0xCC, 0x81, 0xF6, 0x65, 0xCC, 0x84, 0xCC, - 0x81, 0xF6, 0x45, 0xCC, 0xAD, 0xF6, 0x65, 0xCC, - 0xAD, 0xF6, 0x45, 0xCC, 0xB0, 0xF6, 0x65, 0xCC, - 0xB0, 0xF6, 0x45, 0xCC, 0xA7, 0xCC, 0x86, 0xF6, - 0x65, 0xCC, 0xA7, 0xCC, 0x86, 0xF6, 0x46, 0xCC, - 0x87, 0xF6, 0x66, 0xCC, 0x87, 0xF6, 0x47, 0xCC, - 0x84, 0xF6, 0x67, 0xCC, 0x84, 0xF6, 0x48, 0xCC, - 0x87, 0xF6, 0x68, 0xCC, 0x87, 0xF6, 0x48, 0xCC, - 0xA3, 0xF6, 0x68, 0xCC, 0xA3, 0xF6, 0x48, 0xCC, - 0x88, 0xF6, 0x68, 0xCC, 0x88, 0xF6, 0x48, 0xCC, - 0xA7, 0xF6, 0x68, 0xCC, 0xA7, 0xF6, 0x48, 0xCC, - 0xAE, 0xF6, 0x68, 0xCC, 0xAE, 0xF6, 0x49, 0xCC, - 0xB0, 0xF6, 0x69, 0xCC, 0xB0, 0xF6, 0x49, 0xCC, - 0x88, 0xCC, 0x81, 0xF6, 0x69, 0xCC, 0x88, 0xCC, - 0x81, 0xF6, 0x4B, 0xCC, 0x81, 0xF6, 0x6B, 0xCC, - 0x81, 0xF6, 0x4B, 0xCC, 0xA3, 0xF6, 0x6B, 0xCC, - 0xA3, 0xF6, 0x4B, 0xCC, 0xB1, 0xF6, 0x6B, 0xCC, - 0xB1, 0xF6, 0x4C, 0xCC, 0xA3, 0xF6, 0x6C, 0xCC, - 0xA3, 0xF6, 0x4C, 0xCC, 0xA3, 0xCC, 0x84, 0xF6, - 0x6C, 0xCC, 0xA3, 0xCC, 0x84, 0xF6, 0x4C, 0xCC, - 0xB1, 0xF6, 0x6C, 0xCC, 0xB1, 0xF6, 0x4C, 0xCC, - 0xAD, 0xF6, 0x6C, 0xCC, 0xAD, 0xF6, 0x4D, 0xCC, - 0x81, 0xF6, 0x6D, 0xCC, 0x81, 0xF6, 0x4D, 0xCC, - 0x87, 0xF6, 0x6D, 0xCC, 0x87, 0xF6, 0x4D, 0xCC, - 0xA3, 0xF6, 0x6D, 0xCC, 0xA3, 0xF6, 0x4E, 0xCC, - 0x87, 0xF6, 0x6E, 0xCC, 0x87, 0xF6, 0x4E, 0xCC, - 0xA3, 0xF6, 0x6E, 0xCC, 0xA3, 0xF6, 0x4E, 0xCC, - 0xB1, 0xF6, 0x6E, 0xCC, 0xB1, 0xF6, 0x4E, 0xCC, - 0xAD, 0xF6, 0x6E, 0xCC, 0xAD, 0xF6, 0x4F, 0xCC, - 0x83, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x83, 0xCC, - 0x81, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, 0x88, 0xF6, - 0x6F, 0xCC, 0x83, 0xCC, 0x88, 0xF6, 0x4F, 0xCC, - 0x84, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x84, 0xCC, - 0x80, 0xF6, 0x4F, 0xCC, 0x84, 0xCC, 0x81, 0xF6, - 0x6F, 0xCC, 0x84, 0xCC, 0x81, 0xF6, 0x50, 0xCC, - 0x81, 0xF6, 0x70, 0xCC, 0x81, 0xF6, 0x50, 0xCC, - 0x87, 0xF6, 0x70, 0xCC, 0x87, 0xF6, 0x52, 0xCC, - 0x87, 0xF6, 0x72, 0xCC, 0x87, 0xF6, 0x52, 0xCC, - 0xA3, 0xF6, 0x72, 0xCC, 0xA3, 0xF6, 0x52, 0xCC, - 0xA3, 0xCC, 0x84, 0xF6, 0x72, 0xCC, 0xA3, 0xCC, - 0x84, 0xF6, 0x52, 0xCC, 0xB1, 0xF6, 0x72, 0xCC, - 0xB1, 0xF6, 0x53, 0xCC, 0x87, 0xF6, 0x73, 0xCC, - 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xF6, 0x73, 0xCC, - 0xA3, 0xF6, 0x53, 0xCC, 0x81, 0xCC, 0x87, 0xF6, - 0x73, 0xCC, 0x81, 0xCC, 0x87, 0xF6, 0x53, 0xCC, - 0x8C, 0xCC, 0x87, 0xF6, 0x73, 0xCC, 0x8C, 0xCC, - 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xCC, 0x87, 0xF6, - 0x73, 0xCC, 0xA3, 0xCC, 0x87, 0xF6, 0x54, 0xCC, - 0x87, 0xF6, 0x74, 0xCC, 0x87, 0xF6, 0x54, 0xCC, - 0xA3, 0xF6, 0x74, 0xCC, 0xA3, 0xF6, 0x54, 0xCC, - 0xB1, 0xF6, 0x74, 0xCC, 0xB1, 0xF6, 0x54, 0xCC, - 0xAD, 0xF6, 0x74, 0xCC, 0xAD, 0xF6, 0x55, 0xCC, - 0xA4, 0xF6, 0x75, 0xCC, 0xA4, 0xF6, 0x55, 0xCC, - 0xB0, 0xF6, 0x75, 0xCC, 0xB0, 0xF6, 0x55, 0xCC, - 0xAD, 0xF6, 0x75, 0xCC, 0xAD, 0xF6, 0x55, 0xCC, - 0x83, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x83, 0xCC, - 0x81, 0xF6, 0x55, 0xCC, 0x84, 0xCC, 0x88, 0xF6, - 0x75, 0xCC, 0x84, 0xCC, 0x88, 0xF6, 0x56, 0xCC, - 0x83, 0xF6, 0x76, 0xCC, 0x83, 0xF6, 0x56, 0xCC, - 0xA3, 0xF6, 0x76, 0xCC, 0xA3, 0xF6, 0x57, 0xCC, - 0x80, 0xF6, 0x77, 0xCC, 0x80, 0xF6, 0x57, 0xCC, - 0x81, 0xF6, 0x77, 0xCC, 0x81, 0xF6, 0x57, 0xCC, - 0x88, 0xF6, 0x77, 0xCC, 0x88, 0xF6, 0x57, 0xCC, - 0x87, 0xF6, 0x77, 0xCC, 0x87, 0xF6, 0x57, 0xCC, - 0xA3, 0xF6, 0x77, 0xCC, 0xA3, 0xF6, 0x58, 0xCC, - 0x87, 0xF6, 0x78, 0xCC, 0x87, 0xF6, 0x58, 0xCC, - 0x88, 0xF6, 0x78, 0xCC, 0x88, 0xF6, 0x59, 0xCC, - 0x87, 0xF6, 0x79, 0xCC, 0x87, 0xF6, 0x5A, 0xCC, - 0x82, 0xF6, 0x7A, 0xCC, 0x82, 0xF6, 0x5A, 0xCC, - 0xA3, 0xF6, 0x7A, 0xCC, 0xA3, 0xF6, 0x5A, 0xCC, - 0xB1, 0xF6, 0x7A, 0xCC, 0xB1, 0xF6, 0x68, 0xCC, - 0xB1, 0xF6, 0x74, 0xCC, 0x88, 0xF6, 0x77, 0xCC, - 0x8A, 0xF6, 0x79, 0xCC, 0x8A, 0x61, 0xCA, 0xBE, - 0xF5, 0x05, 0xC5, 0xBF, 0xCC, 0x87, 0x73, 0xCC, - 0x87, 0xF6, 0x41, 0xCC, 0xA3, 0xF6, 0x61, 0xCC, - 0xA3, 0xF6, 0x41, 0xCC, 0x89, 0xF6, 0x61, 0xCC, - 0x89, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x81, 0xF6, - 0x61, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x41, 0xCC, - 0x82, 0xCC, 0x80, 0xF6, 0x61, 0xCC, 0x82, 0xCC, - 0x80, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x89, 0xF6, - 0x61, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x41, 0xCC, - 0x82, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x82, 0xCC, - 0x83, 0xF6, 0x41, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, - 0x61, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x41, 0xCC, - 0x86, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x86, 0xCC, - 0x81, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x80, 0xF6, - 0x61, 0xCC, 0x86, 0xCC, 0x80, 0xF6, 0x41, 0xCC, - 0x86, 0xCC, 0x89, 0xF6, 0x61, 0xCC, 0x86, 0xCC, - 0x89, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x83, 0xF6, - 0x61, 0xCC, 0x86, 0xCC, 0x83, 0xF6, 0x41, 0xCC, - 0xA3, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0xA3, 0xCC, - 0x86, 0xF6, 0x45, 0xCC, 0xA3, 0xF6, 0x65, 0xCC, - 0xA3, 0xF6, 0x45, 0xCC, 0x89, 0xF6, 0x65, 0xCC, - 0x89, 0xF6, 0x45, 0xCC, 0x83, 0xF6, 0x65, 0xCC, - 0x83, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x81, 0xF6, - 0x65, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x45, 0xCC, - 0x82, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x82, 0xCC, - 0x80, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x89, 0xF6, - 0x65, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x45, 0xCC, - 0x82, 0xCC, 0x83, 0xF6, 0x65, 0xCC, 0x82, 0xCC, - 0x83, 0xF6, 0x45, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, - 0x65, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x49, 0xCC, - 0x89, 0xF6, 0x69, 0xCC, 0x89, 0xF6, 0x49, 0xCC, - 0xA3, 0xF6, 0x69, 0xCC, 0xA3, 0xF6, 0x4F, 0xCC, - 0xA3, 0xF6, 0x6F, 0xCC, 0xA3, 0xF6, 0x4F, 0xCC, - 0x89, 0xF6, 0x6F, 0xCC, 0x89, 0xF6, 0x4F, 0xCC, - 0x82, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, 0xCC, - 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x80, 0xF6, - 0x6F, 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x4F, 0xCC, - 0x82, 0xCC, 0x89, 0xF6, 0x6F, 0xCC, 0x82, 0xCC, - 0x89, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x83, 0xF6, - 0x6F, 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, - 0xA3, 0xCC, 0x82, 0xF6, 0x6F, 0xCC, 0xA3, 0xCC, - 0x82, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x81, 0xF6, - 0x6F, 0xCC, 0x9B, 0xCC, 0x81, 0xF6, 0x4F, 0xCC, - 0x9B, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, - 0x80, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x89, 0xF6, - 0x6F, 0xCC, 0x9B, 0xCC, 0x89, 0xF6, 0x4F, 0xCC, - 0x9B, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, - 0x83, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, - 0x6F, 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, 0x55, 0xCC, - 0xA3, 0xF6, 0x75, 0xCC, 0xA3, 0xF6, 0x55, 0xCC, - 0x89, 0xF6, 0x75, 0xCC, 0x89, 0xF6, 0x55, 0xCC, - 0x9B, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x9B, 0xCC, - 0x81, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x80, 0xF6, - 0x75, 0xCC, 0x9B, 0xCC, 0x80, 0xF6, 0x55, 0xCC, - 0x9B, 0xCC, 0x89, 0xF6, 0x75, 0xCC, 0x9B, 0xCC, - 0x89, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x83, 0xF6, - 0x75, 0xCC, 0x9B, 0xCC, 0x83, 0xF6, 0x55, 0xCC, - 0x9B, 0xCC, 0xA3, 0xF6, 0x75, 0xCC, 0x9B, 0xCC, - 0xA3, 0xF6, 0x59, 0xCC, 0x80, 0xF6, 0x79, 0xCC, - 0x80, 0xF6, 0x59, 0xCC, 0xA3, 0xF6, 0x79, 0xCC, - 0xA3, 0xF6, 0x59, 0xCC, 0x89, 0xF6, 0x79, 0xCC, - 0x89, 0xF6, 0x59, 0xCC, 0x83, 0xF6, 0x79, 0xCC, - 0x83, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xF6, 0xCE, - 0xB1, 0xCC, 0x94, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, - 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, - 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x81, - 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xF6, - 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCE, - 0xB1, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0x91, - 0xCC, 0x93, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xF6, - 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, - 0x91, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0x91, - 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCC, - 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCC, 0x93, - 0xCD, 0x82, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCD, - 0x82, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xF6, 0xCE, - 0xB5, 0xCC, 0x94, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, - 0xCC, 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x94, 0xCC, - 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xCC, 0x81, - 0xF6, 0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x81, 0xF6, - 0xCE, 0x95, 0xCC, 0x93, 0xF6, 0xCE, 0x95, 0xCC, - 0x94, 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x80, - 0xF6, 0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x80, 0xF6, - 0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, - 0x95, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, - 0xCC, 0x93, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xF6, - 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, - 0xB7, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xB7, - 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, - 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, 0x93, - 0xCD, 0x82, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, - 0x82, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xF6, 0xCE, - 0x97, 0xCC, 0x94, 0xF6, 0xCE, 0x97, 0xCC, 0x93, - 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, - 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x81, - 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x81, 0xF6, - 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCE, - 0x97, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xB9, - 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, 0xF6, - 0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, - 0xB9, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, - 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, - 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x93, - 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, 0xCD, - 0x82, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xF6, 0xCE, - 0x99, 0xCC, 0x94, 0xF6, 0xCE, 0x99, 0xCC, 0x93, - 0xCC, 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x94, 0xCC, - 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xCC, 0x81, - 0xF6, 0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x81, 0xF6, - 0xCE, 0x99, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCE, - 0x99, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xBF, - 0xCC, 0x93, 0xF6, 0xCE, 0xBF, 0xCC, 0x94, 0xF6, - 0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, - 0xBF, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xBF, - 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xBF, 0xCC, - 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, 0x93, - 0xF6, 0xCE, 0x9F, 0xCC, 0x94, 0xF6, 0xCE, 0x9F, - 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, - 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, 0x93, - 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, 0x94, 0xCC, - 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xF6, 0xCF, - 0x85, 0xCC, 0x94, 0xF6, 0xCF, 0x85, 0xCC, 0x93, - 0xCC, 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x94, 0xCC, - 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xCC, 0x81, - 0xF6, 0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x81, 0xF6, - 0xCF, 0x85, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCF, - 0x85, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xA5, - 0xCC, 0x94, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCC, - 0x80, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCC, 0x81, - 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCD, 0x82, 0xF6, - 0xCF, 0x89, 0xCC, 0x93, 0xF6, 0xCF, 0x89, 0xCC, - 0x94, 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x80, - 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80, 0xF6, - 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCF, - 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCF, 0x89, - 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCF, 0x89, 0xCC, - 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, - 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xF6, 0xCE, 0xA9, - 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, - 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, - 0xCC, 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, - 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x82, - 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82, 0xF6, - 0xCE, 0xB1, 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, - 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x80, 0xF6, 0xCE, - 0xB5, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, 0x80, - 0xF6, 0xCE, 0xB7, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, - 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, 0xF6, - 0xCE, 0xBF, 0xCC, 0x80, 0xF6, 0xCE, 0xBF, 0xCC, - 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x80, 0xF6, 0xCF, - 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, 0x80, - 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xF6, 0xCE, 0xB1, - 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, - 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, - 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, - 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, - 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, - 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, 0xF6, - 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, - 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, 0xCD, - 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x85, - 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x85, 0xF6, - 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, - 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, 0xCD, - 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x81, - 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCC, - 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, - 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, - 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, - 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, - 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x93, - 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, - 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, - 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, - 0xB7, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, 0xF6, - 0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, - 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82, 0xCD, - 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x85, - 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x85, 0xF6, - 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, - 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80, 0xCD, - 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x81, - 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, - 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, - 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, - 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCF, 0x89, - 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, - 0x94, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x93, - 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, - 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, - 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCF, - 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, 0xF6, - 0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, - 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x82, 0xCD, - 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x85, - 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x85, 0xF6, - 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, - 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x80, 0xCD, - 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x81, - 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, - 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, - 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, - 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, - 0xCC, 0x86, 0xF6, 0xCE, 0xB1, 0xCC, 0x84, 0xF6, - 0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, - 0xB1, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, 0x81, - 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCD, 0x82, 0xF6, - 0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, - 0x91, 0xCC, 0x86, 0xF6, 0xCE, 0x91, 0xCC, 0x84, - 0xF6, 0xCE, 0x91, 0xCC, 0x80, 0xF6, 0xCE, 0x91, - 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCD, 0x85, 0x20, - 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0x20, 0xCC, 0x93, - 0x20, 0xCD, 0x82, 0xF5, 0x05, 0xC2, 0xA8, 0xCD, - 0x82, 0x20, 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, - 0xB7, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, - 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x81, 0xCD, - 0x85, 0xF6, 0xCE, 0xB7, 0xCD, 0x82, 0xF6, 0xCE, - 0xB7, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x95, - 0xCC, 0x80, 0xF6, 0xCE, 0x95, 0xCC, 0x81, 0xF6, - 0xCE, 0x97, 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, - 0x81, 0xF6, 0xCE, 0x97, 0xCD, 0x85, 0xF5, 0x06, - 0xE1, 0xBE, 0xBF, 0xCC, 0x80, 0x20, 0xCC, 0x93, - 0xCC, 0x80, 0xF5, 0x06, 0xE1, 0xBE, 0xBF, 0xCC, - 0x81, 0x20, 0xCC, 0x93, 0xCC, 0x81, 0xF5, 0x06, - 0xE1, 0xBE, 0xBF, 0xCD, 0x82, 0x20, 0xCC, 0x93, - 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x86, 0xF6, - 0xCE, 0xB9, 0xCC, 0x84, 0xF6, 0xCE, 0xB9, 0xCC, - 0x88, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, 0x88, - 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCD, 0x82, 0xF6, - 0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, - 0x99, 0xCC, 0x86, 0xF6, 0xCE, 0x99, 0xCC, 0x84, - 0xF6, 0xCE, 0x99, 0xCC, 0x80, 0xF6, 0xCE, 0x99, - 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, 0xCC, - 0x80, 0x20, 0xCC, 0x94, 0xCC, 0x80, 0xF5, 0x06, - 0xE1, 0xBF, 0xBE, 0xCC, 0x81, 0x20, 0xCC, 0x94, - 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, 0xCD, - 0x82, 0x20, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCF, - 0x85, 0xCC, 0x86, 0xF6, 0xCF, 0x85, 0xCC, 0x84, - 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x80, 0xF6, - 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0xCF, - 0x81, 0xCC, 0x93, 0xF6, 0xCF, 0x81, 0xCC, 0x94, - 0xF6, 0xCF, 0x85, 0xCD, 0x82, 0xF6, 0xCF, 0x85, - 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, 0xA5, 0xCC, - 0x86, 0xF6, 0xCE, 0xA5, 0xCC, 0x84, 0xF6, 0xCE, - 0xA5, 0xCC, 0x80, 0xF6, 0xCE, 0xA5, 0xCC, 0x81, - 0xF6, 0xCE, 0xA1, 0xCC, 0x94, 0xF5, 0x05, 0xC2, - 0xA8, 0xCC, 0x80, 0x20, 0xCC, 0x88, 0xCC, 0x80, - 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, 0x20, 0xCC, - 0x88, 0xCC, 0x81, 0xF6, 0x60, 0xF6, 0xCF, 0x89, - 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCD, - 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xCD, 0x85, - 0xF6, 0xCF, 0x89, 0xCD, 0x82, 0xF6, 0xCF, 0x89, - 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x9F, 0xCC, - 0x80, 0xF6, 0xCE, 0x9F, 0xCC, 0x81, 0xF6, 0xCE, - 0xA9, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, 0x81, - 0xF6, 0xCE, 0xA9, 0xCD, 0x85, 0xF5, 0x03, 0xC2, - 0xB4, 0x20, 0xCC, 0x81, 0x20, 0xCC, 0x94, 0xF5, - 0x04, 0xE2, 0x80, 0x82, 0x20, 0xF5, 0x04, 0xE2, - 0x80, 0x83, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0xE2, 0x80, 0x90, 0x20, - 0xCC, 0xB3, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, - 0x20, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2, - 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, - 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80, - 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0x21, - 0x21, 0x20, 0xCC, 0x85, 0x3F, 0x3F, 0x3F, 0x21, - 0x21, 0x3F, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, - 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0x20, 0x30, - 0x69, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, - 0xE2, 0x88, 0x92, 0x3D, 0x28, 0x29, 0x6E, 0x30, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x2B, 0xE2, 0x88, 0x92, 0x3D, 0x28, 0x29, - 0x52, 0x73, 0x61, 0x2F, 0x63, 0x61, 0x2F, 0x73, - 0x43, 0xC2, 0xB0, 0x43, 0x63, 0x2F, 0x6F, 0x63, - 0x2F, 0x75, 0xC6, 0x90, 0xC2, 0xB0, 0x46, 0x67, - 0x48, 0x48, 0x48, 0x68, 0xC4, 0xA7, 0x49, 0x49, - 0x4C, 0x6C, 0x4E, 0x4E, 0x6F, 0x50, 0x51, 0x52, - 0x52, 0x52, 0x53, 0x4D, 0x54, 0x45, 0x4C, 0x54, - 0x4D, 0x5A, 0xF6, 0xCE, 0xA9, 0x5A, 0xF6, 0x4B, - 0xF6, 0x41, 0xCC, 0x8A, 0x42, 0x43, 0x65, 0x45, - 0x46, 0x4D, 0x6F, 0xD7, 0x90, 0xD7, 0x91, 0xD7, - 0x92, 0xD7, 0x93, 0x69, 0xCE, 0xB3, 0xCE, 0x93, - 0xCE, 0xA0, 0xE2, 0x88, 0x91, 0x44, 0x64, 0x65, - 0x69, 0x6A, 0x31, 0xE2, 0x81, 0x84, 0x33, 0x32, - 0xE2, 0x81, 0x84, 0x33, 0x31, 0xE2, 0x81, 0x84, - 0x35, 0x32, 0xE2, 0x81, 0x84, 0x35, 0x33, 0xE2, - 0x81, 0x84, 0x35, 0x34, 0xE2, 0x81, 0x84, 0x35, - 0x31, 0xE2, 0x81, 0x84, 0x36, 0x35, 0xE2, 0x81, - 0x84, 0x36, 0x31, 0xE2, 0x81, 0x84, 0x38, 0x33, - 0xE2, 0x81, 0x84, 0x38, 0x35, 0xE2, 0x81, 0x84, - 0x38, 0x37, 0xE2, 0x81, 0x84, 0x38, 0x31, 0xE2, - 0x81, 0x84, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x49, 0x56, 0x56, 0x56, 0x49, 0x56, 0x49, 0x49, - 0x56, 0x49, 0x49, 0x49, 0x49, 0x58, 0x58, 0x58, - 0x49, 0x58, 0x49, 0x49, 0x4C, 0x43, 0x44, 0x4D, - 0x69, 0x69, 0x69, 0x69, 0x69, 0x69, 0x69, 0x76, - 0x76, 0x76, 0x69, 0x76, 0x69, 0x69, 0x76, 0x69, - 0x69, 0x69, 0x69, 0x78, 0x78, 0x78, 0x69, 0x78, - 0x69, 0x69, 0x6C, 0x63, 0x64, 0x6D, 0xF6, 0xE2, - 0x86, 0x90, 0xCC, 0xB8, 0xF6, 0xE2, 0x86, 0x92, - 0xCC, 0xB8, 0xF6, 0xE2, 0x86, 0x94, 0xCC, 0xB8, - 0xF6, 0xE2, 0x87, 0x90, 0xCC, 0xB8, 0xF6, 0xE2, - 0x87, 0x94, 0xCC, 0xB8, 0xF6, 0xE2, 0x87, 0x92, - 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0x83, 0xCC, 0xB8, - 0xF6, 0xE2, 0x88, 0x88, 0xCC, 0xB8, 0xF6, 0xE2, - 0x88, 0x8B, 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0xA3, - 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0xA5, 0xCC, 0xB8, - 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, - 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, - 0x88, 0xAE, 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, - 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, 0xF6, 0xE2, - 0x88, 0xBC, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x83, - 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x85, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0x88, 0xCC, 0xB8, 0xF6, 0x3D, - 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xA1, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0x8D, 0xCC, 0xB8, 0xF6, 0x3C, - 0xCC, 0xB8, 0xF6, 0x3E, 0xCC, 0xB8, 0xF6, 0xE2, - 0x89, 0xA4, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xA5, - 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB2, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0xB3, 0xCC, 0xB8, 0xF6, 0xE2, - 0x89, 0xB6, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB7, - 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBA, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0xBB, 0xCC, 0xB8, 0xF6, 0xE2, - 0x8A, 0x82, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x83, - 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x86, 0xCC, 0xB8, - 0xF6, 0xE2, 0x8A, 0x87, 0xCC, 0xB8, 0xF6, 0xE2, - 0x8A, 0xA2, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xA8, - 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xA9, 0xCC, 0xB8, - 0xF6, 0xE2, 0x8A, 0xAB, 0xCC, 0xB8, 0xF6, 0xE2, - 0x89, 0xBC, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBD, - 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x91, 0xCC, 0xB8, - 0xF6, 0xE2, 0x8A, 0x92, 0xCC, 0xB8, 0xF6, 0xE2, - 0x8A, 0xB2, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB3, - 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB4, 0xCC, 0xB8, - 0xF6, 0xE2, 0x8A, 0xB5, 0xCC, 0xB8, 0xF6, 0xE3, - 0x80, 0x88, 0xF6, 0xE3, 0x80, 0x89, 0x31, 0x32, - 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, - 0x30, 0x31, 0x31, 0x31, 0x32, 0x31, 0x33, 0x31, - 0x34, 0x31, 0x35, 0x31, 0x36, 0x31, 0x37, 0x31, - 0x38, 0x31, 0x39, 0x32, 0x30, 0x28, 0x31, 0x29, - 0x28, 0x32, 0x29, 0x28, 0x33, 0x29, 0x28, 0x34, - 0x29, 0x28, 0x35, 0x29, 0x28, 0x36, 0x29, 0x28, - 0x37, 0x29, 0x28, 0x38, 0x29, 0x28, 0x39, 0x29, - 0x28, 0x31, 0x30, 0x29, 0x28, 0x31, 0x31, 0x29, - 0x28, 0x31, 0x32, 0x29, 0x28, 0x31, 0x33, 0x29, - 0x28, 0x31, 0x34, 0x29, 0x28, 0x31, 0x35, 0x29, - 0x28, 0x31, 0x36, 0x29, 0x28, 0x31, 0x37, 0x29, - 0x28, 0x31, 0x38, 0x29, 0x28, 0x31, 0x39, 0x29, - 0x28, 0x32, 0x30, 0x29, 0x31, 0x2E, 0x32, 0x2E, - 0x33, 0x2E, 0x34, 0x2E, 0x35, 0x2E, 0x36, 0x2E, - 0x37, 0x2E, 0x38, 0x2E, 0x39, 0x2E, 0x31, 0x30, - 0x2E, 0x31, 0x31, 0x2E, 0x31, 0x32, 0x2E, 0x31, - 0x33, 0x2E, 0x31, 0x34, 0x2E, 0x31, 0x35, 0x2E, - 0x31, 0x36, 0x2E, 0x31, 0x37, 0x2E, 0x31, 0x38, - 0x2E, 0x31, 0x39, 0x2E, 0x32, 0x30, 0x2E, 0x28, - 0x61, 0x29, 0x28, 0x62, 0x29, 0x28, 0x63, 0x29, - 0x28, 0x64, 0x29, 0x28, 0x65, 0x29, 0x28, 0x66, - 0x29, 0x28, 0x67, 0x29, 0x28, 0x68, 0x29, 0x28, - 0x69, 0x29, 0x28, 0x6A, 0x29, 0x28, 0x6B, 0x29, - 0x28, 0x6C, 0x29, 0x28, 0x6D, 0x29, 0x28, 0x6E, - 0x29, 0x28, 0x6F, 0x29, 0x28, 0x70, 0x29, 0x28, - 0x71, 0x29, 0x28, 0x72, 0x29, 0x28, 0x73, 0x29, - 0x28, 0x74, 0x29, 0x28, 0x75, 0x29, 0x28, 0x76, - 0x29, 0x28, 0x77, 0x29, 0x28, 0x78, 0x29, 0x28, - 0x79, 0x29, 0x28, 0x7A, 0x29, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x30, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, - 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0x3A, 0x3A, - 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0xF6, 0xE2, - 0xAB, 0x9D, 0xCC, 0xB8, 0xE6, 0xAF, 0x8D, 0xE9, - 0xBE, 0x9F, 0xE4, 0xB8, 0x80, 0xE4, 0xB8, 0xA8, - 0xE4, 0xB8, 0xB6, 0xE4, 0xB8, 0xBF, 0xE4, 0xB9, - 0x99, 0xE4, 0xBA, 0x85, 0xE4, 0xBA, 0x8C, 0xE4, - 0xBA, 0xA0, 0xE4, 0xBA, 0xBA, 0xE5, 0x84, 0xBF, - 0xE5, 0x85, 0xA5, 0xE5, 0x85, 0xAB, 0xE5, 0x86, - 0x82, 0xE5, 0x86, 0x96, 0xE5, 0x86, 0xAB, 0xE5, - 0x87, 0xA0, 0xE5, 0x87, 0xB5, 0xE5, 0x88, 0x80, - 0xE5, 0x8A, 0x9B, 0xE5, 0x8B, 0xB9, 0xE5, 0x8C, - 0x95, 0xE5, 0x8C, 0x9A, 0xE5, 0x8C, 0xB8, 0xE5, - 0x8D, 0x81, 0xE5, 0x8D, 0x9C, 0xE5, 0x8D, 0xA9, - 0xE5, 0x8E, 0x82, 0xE5, 0x8E, 0xB6, 0xE5, 0x8F, - 0x88, 0xE5, 0x8F, 0xA3, 0xE5, 0x9B, 0x97, 0xE5, - 0x9C, 0x9F, 0xE5, 0xA3, 0xAB, 0xE5, 0xA4, 0x82, - 0xE5, 0xA4, 0x8A, 0xE5, 0xA4, 0x95, 0xE5, 0xA4, - 0xA7, 0xE5, 0xA5, 0xB3, 0xE5, 0xAD, 0x90, 0xE5, - 0xAE, 0x80, 0xE5, 0xAF, 0xB8, 0xE5, 0xB0, 0x8F, - 0xE5, 0xB0, 0xA2, 0xE5, 0xB0, 0xB8, 0xE5, 0xB1, - 0xAE, 0xE5, 0xB1, 0xB1, 0xE5, 0xB7, 0x9B, 0xE5, - 0xB7, 0xA5, 0xE5, 0xB7, 0xB1, 0xE5, 0xB7, 0xBE, - 0xE5, 0xB9, 0xB2, 0xE5, 0xB9, 0xBA, 0xE5, 0xB9, - 0xBF, 0xE5, 0xBB, 0xB4, 0xE5, 0xBB, 0xBE, 0xE5, - 0xBC, 0x8B, 0xE5, 0xBC, 0x93, 0xE5, 0xBD, 0x90, - 0xE5, 0xBD, 0xA1, 0xE5, 0xBD, 0xB3, 0xE5, 0xBF, - 0x83, 0xE6, 0x88, 0x88, 0xE6, 0x88, 0xB6, 0xE6, - 0x89, 0x8B, 0xE6, 0x94, 0xAF, 0xE6, 0x94, 0xB4, - 0xE6, 0x96, 0x87, 0xE6, 0x96, 0x97, 0xE6, 0x96, - 0xA4, 0xE6, 0x96, 0xB9, 0xE6, 0x97, 0xA0, 0xE6, - 0x97, 0xA5, 0xE6, 0x9B, 0xB0, 0xE6, 0x9C, 0x88, - 0xE6, 0x9C, 0xA8, 0xE6, 0xAC, 0xA0, 0xE6, 0xAD, - 0xA2, 0xE6, 0xAD, 0xB9, 0xE6, 0xAE, 0xB3, 0xE6, - 0xAF, 0x8B, 0xE6, 0xAF, 0x94, 0xE6, 0xAF, 0x9B, - 0xE6, 0xB0, 0x8F, 0xE6, 0xB0, 0x94, 0xE6, 0xB0, - 0xB4, 0xE7, 0x81, 0xAB, 0xE7, 0x88, 0xAA, 0xE7, - 0x88, 0xB6, 0xE7, 0x88, 0xBB, 0xE7, 0x88, 0xBF, - 0xE7, 0x89, 0x87, 0xE7, 0x89, 0x99, 0xE7, 0x89, - 0x9B, 0xE7, 0x8A, 0xAC, 0xE7, 0x8E, 0x84, 0xE7, - 0x8E, 0x89, 0xE7, 0x93, 0x9C, 0xE7, 0x93, 0xA6, - 0xE7, 0x94, 0x98, 0xE7, 0x94, 0x9F, 0xE7, 0x94, - 0xA8, 0xE7, 0x94, 0xB0, 0xE7, 0x96, 0x8B, 0xE7, - 0x96, 0x92, 0xE7, 0x99, 0xB6, 0xE7, 0x99, 0xBD, - 0xE7, 0x9A, 0xAE, 0xE7, 0x9A, 0xBF, 0xE7, 0x9B, - 0xAE, 0xE7, 0x9F, 0x9B, 0xE7, 0x9F, 0xA2, 0xE7, - 0x9F, 0xB3, 0xE7, 0xA4, 0xBA, 0xE7, 0xA6, 0xB8, - 0xE7, 0xA6, 0xBE, 0xE7, 0xA9, 0xB4, 0xE7, 0xAB, - 0x8B, 0xE7, 0xAB, 0xB9, 0xE7, 0xB1, 0xB3, 0xE7, - 0xB3, 0xB8, 0xE7, 0xBC, 0xB6, 0xE7, 0xBD, 0x91, - 0xE7, 0xBE, 0x8A, 0xE7, 0xBE, 0xBD, 0xE8, 0x80, - 0x81, 0xE8, 0x80, 0x8C, 0xE8, 0x80, 0x92, 0xE8, - 0x80, 0xB3, 0xE8, 0x81, 0xBF, 0xE8, 0x82, 0x89, - 0xE8, 0x87, 0xA3, 0xE8, 0x87, 0xAA, 0xE8, 0x87, - 0xB3, 0xE8, 0x87, 0xBC, 0xE8, 0x88, 0x8C, 0xE8, - 0x88, 0x9B, 0xE8, 0x88, 0x9F, 0xE8, 0x89, 0xAE, - 0xE8, 0x89, 0xB2, 0xE8, 0x89, 0xB8, 0xE8, 0x99, - 0x8D, 0xE8, 0x99, 0xAB, 0xE8, 0xA1, 0x80, 0xE8, - 0xA1, 0x8C, 0xE8, 0xA1, 0xA3, 0xE8, 0xA5, 0xBE, - 0xE8, 0xA6, 0x8B, 0xE8, 0xA7, 0x92, 0xE8, 0xA8, - 0x80, 0xE8, 0xB0, 0xB7, 0xE8, 0xB1, 0x86, 0xE8, - 0xB1, 0x95, 0xE8, 0xB1, 0xB8, 0xE8, 0xB2, 0x9D, - 0xE8, 0xB5, 0xA4, 0xE8, 0xB5, 0xB0, 0xE8, 0xB6, - 0xB3, 0xE8, 0xBA, 0xAB, 0xE8, 0xBB, 0x8A, 0xE8, - 0xBE, 0x9B, 0xE8, 0xBE, 0xB0, 0xE8, 0xBE, 0xB5, - 0xE9, 0x82, 0x91, 0xE9, 0x85, 0x89, 0xE9, 0x87, - 0x86, 0xE9, 0x87, 0x8C, 0xE9, 0x87, 0x91, 0xE9, - 0x95, 0xB7, 0xE9, 0x96, 0x80, 0xE9, 0x98, 0x9C, - 0xE9, 0x9A, 0xB6, 0xE9, 0x9A, 0xB9, 0xE9, 0x9B, - 0xA8, 0xE9, 0x9D, 0x91, 0xE9, 0x9D, 0x9E, 0xE9, - 0x9D, 0xA2, 0xE9, 0x9D, 0xA9, 0xE9, 0x9F, 0x8B, - 0xE9, 0x9F, 0xAD, 0xE9, 0x9F, 0xB3, 0xE9, 0xA0, - 0x81, 0xE9, 0xA2, 0xA8, 0xE9, 0xA3, 0x9B, 0xE9, - 0xA3, 0x9F, 0xE9, 0xA6, 0x96, 0xE9, 0xA6, 0x99, - 0xE9, 0xA6, 0xAC, 0xE9, 0xAA, 0xA8, 0xE9, 0xAB, - 0x98, 0xE9, 0xAB, 0x9F, 0xE9, 0xAC, 0xA5, 0xE9, - 0xAC, 0xAF, 0xE9, 0xAC, 0xB2, 0xE9, 0xAC, 0xBC, - 0xE9, 0xAD, 0x9A, 0xE9, 0xB3, 0xA5, 0xE9, 0xB9, - 0xB5, 0xE9, 0xB9, 0xBF, 0xE9, 0xBA, 0xA5, 0xE9, - 0xBA, 0xBB, 0xE9, 0xBB, 0x83, 0xE9, 0xBB, 0x8D, - 0xE9, 0xBB, 0x91, 0xE9, 0xBB, 0xB9, 0xE9, 0xBB, - 0xBD, 0xE9, 0xBC, 0x8E, 0xE9, 0xBC, 0x93, 0xE9, - 0xBC, 0xA0, 0xE9, 0xBC, 0xBB, 0xE9, 0xBD, 0x8A, - 0xE9, 0xBD, 0x92, 0xE9, 0xBE, 0x8D, 0xE9, 0xBE, - 0x9C, 0xE9, 0xBE, 0xA0, 0x20, 0xE3, 0x80, 0x92, - 0xE5, 0x8D, 0x81, 0xE5, 0x8D, 0x84, 0xE5, 0x8D, - 0x85, 0xF6, 0xE3, 0x81, 0x8B, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x81, 0x8D, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x81, 0x8F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x81, 0x91, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, - 0x93, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x95, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x97, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x99, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x81, 0x9B, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x81, 0x9D, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x81, 0x9F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x81, 0xA1, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, - 0xA4, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA6, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA8, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x9A, - 0xF6, 0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, - 0x81, 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, - 0xB5, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x81, 0xB8, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xB8, 0xE3, - 0x82, 0x9A, 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x9A, - 0xF6, 0xE3, 0x81, 0x86, 0xE3, 0x82, 0x99, 0x20, - 0xE3, 0x82, 0x99, 0x20, 0xE3, 0x82, 0x9A, 0xF6, - 0xE3, 0x82, 0x9D, 0xE3, 0x82, 0x99, 0xE3, 0x82, - 0x88, 0xE3, 0x82, 0x8A, 0xF6, 0xE3, 0x82, 0xAB, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xAD, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xAF, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x82, 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x82, 0xB7, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, - 0xB9, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBB, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBD, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBF, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x83, 0x81, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x83, 0x84, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x83, 0x88, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, - 0x8F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x8F, - 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x83, 0x92, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x92, 0xE3, 0x82, - 0x9A, 0xF6, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x9A, 0xF6, - 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x83, - 0x9B, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x9B, - 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x82, 0xA6, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x83, 0xAF, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x83, 0xB0, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x83, 0xB1, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x83, 0xB2, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x83, 0xBD, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xB3, - 0xE3, 0x83, 0x88, 0xE1, 0x84, 0x80, 0xE1, 0x84, - 0x81, 0xE1, 0x86, 0xAA, 0xE1, 0x84, 0x82, 0xE1, - 0x86, 0xAC, 0xE1, 0x86, 0xAD, 0xE1, 0x84, 0x83, - 0xE1, 0x84, 0x84, 0xE1, 0x84, 0x85, 0xE1, 0x86, - 0xB0, 0xE1, 0x86, 0xB1, 0xE1, 0x86, 0xB2, 0xE1, - 0x86, 0xB3, 0xE1, 0x86, 0xB4, 0xE1, 0x86, 0xB5, - 0xE1, 0x84, 0x9A, 0xE1, 0x84, 0x86, 0xE1, 0x84, - 0x87, 0xE1, 0x84, 0x88, 0xE1, 0x84, 0xA1, 0xE1, - 0x84, 0x89, 0xE1, 0x84, 0x8A, 0xE1, 0x84, 0x8B, - 0xE1, 0x84, 0x8C, 0xE1, 0x84, 0x8D, 0xE1, 0x84, - 0x8E, 0xE1, 0x84, 0x8F, 0xE1, 0x84, 0x90, 0xE1, - 0x84, 0x91, 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xA1, - 0xE1, 0x85, 0xA2, 0xE1, 0x85, 0xA3, 0xE1, 0x85, - 0xA4, 0xE1, 0x85, 0xA5, 0xE1, 0x85, 0xA6, 0xE1, - 0x85, 0xA7, 0xE1, 0x85, 0xA8, 0xE1, 0x85, 0xA9, - 0xE1, 0x85, 0xAA, 0xE1, 0x85, 0xAB, 0xE1, 0x85, - 0xAC, 0xE1, 0x85, 0xAD, 0xE1, 0x85, 0xAE, 0xE1, - 0x85, 0xAF, 0xE1, 0x85, 0xB0, 0xE1, 0x85, 0xB1, - 0xE1, 0x85, 0xB2, 0xE1, 0x85, 0xB3, 0xE1, 0x85, - 0xB4, 0xE1, 0x85, 0xB5, 0xE1, 0x85, 0xA0, 0xE1, - 0x84, 0x94, 0xE1, 0x84, 0x95, 0xE1, 0x87, 0x87, - 0xE1, 0x87, 0x88, 0xE1, 0x87, 0x8C, 0xE1, 0x87, - 0x8E, 0xE1, 0x87, 0x93, 0xE1, 0x87, 0x97, 0xE1, - 0x87, 0x99, 0xE1, 0x84, 0x9C, 0xE1, 0x87, 0x9D, - 0xE1, 0x87, 0x9F, 0xE1, 0x84, 0x9D, 0xE1, 0x84, - 0x9E, 0xE1, 0x84, 0xA0, 0xE1, 0x84, 0xA2, 0xE1, - 0x84, 0xA3, 0xE1, 0x84, 0xA7, 0xE1, 0x84, 0xA9, - 0xE1, 0x84, 0xAB, 0xE1, 0x84, 0xAC, 0xE1, 0x84, - 0xAD, 0xE1, 0x84, 0xAE, 0xE1, 0x84, 0xAF, 0xE1, - 0x84, 0xB2, 0xE1, 0x84, 0xB6, 0xE1, 0x85, 0x80, - 0xE1, 0x85, 0x87, 0xE1, 0x85, 0x8C, 0xE1, 0x87, - 0xB1, 0xE1, 0x87, 0xB2, 0xE1, 0x85, 0x97, 0xE1, - 0x85, 0x98, 0xE1, 0x85, 0x99, 0xE1, 0x86, 0x84, - 0xE1, 0x86, 0x85, 0xE1, 0x86, 0x88, 0xE1, 0x86, - 0x91, 0xE1, 0x86, 0x92, 0xE1, 0x86, 0x94, 0xE1, - 0x86, 0x9E, 0xE1, 0x86, 0xA1, 0xE4, 0xB8, 0x80, - 0xE4, 0xBA, 0x8C, 0xE4, 0xB8, 0x89, 0xE5, 0x9B, - 0x9B, 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, 0xAD, 0xE4, - 0xB8, 0x8B, 0xE7, 0x94, 0xB2, 0xE4, 0xB9, 0x99, - 0xE4, 0xB8, 0x99, 0xE4, 0xB8, 0x81, 0xE5, 0xA4, - 0xA9, 0xE5, 0x9C, 0xB0, 0xE4, 0xBA, 0xBA, 0x28, - 0xE1, 0x84, 0x80, 0x29, 0x28, 0xE1, 0x84, 0x82, - 0x29, 0x28, 0xE1, 0x84, 0x83, 0x29, 0x28, 0xE1, - 0x84, 0x85, 0x29, 0x28, 0xE1, 0x84, 0x86, 0x29, - 0x28, 0xE1, 0x84, 0x87, 0x29, 0x28, 0xE1, 0x84, - 0x89, 0x29, 0x28, 0xE1, 0x84, 0x8B, 0x29, 0x28, - 0xE1, 0x84, 0x8C, 0x29, 0x28, 0xE1, 0x84, 0x8E, - 0x29, 0x28, 0xE1, 0x84, 0x8F, 0x29, 0x28, 0xE1, - 0x84, 0x90, 0x29, 0x28, 0xE1, 0x84, 0x91, 0x29, - 0x28, 0xE1, 0x84, 0x92, 0x29, 0x28, 0xE1, 0x84, - 0x80, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x82, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x83, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x85, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x86, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x87, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x89, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x8B, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x8C, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x8E, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x8F, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x90, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x91, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x92, 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, - 0x8C, 0xE1, 0x85, 0xAE, 0x29, 0x28, 0xE4, 0xB8, - 0x80, 0x29, 0x28, 0xE4, 0xBA, 0x8C, 0x29, 0x28, - 0xE4, 0xB8, 0x89, 0x29, 0x28, 0xE5, 0x9B, 0x9B, - 0x29, 0x28, 0xE4, 0xBA, 0x94, 0x29, 0x28, 0xE5, - 0x85, 0xAD, 0x29, 0x28, 0xE4, 0xB8, 0x83, 0x29, - 0x28, 0xE5, 0x85, 0xAB, 0x29, 0x28, 0xE4, 0xB9, - 0x9D, 0x29, 0x28, 0xE5, 0x8D, 0x81, 0x29, 0x28, - 0xE6, 0x9C, 0x88, 0x29, 0x28, 0xE7, 0x81, 0xAB, - 0x29, 0x28, 0xE6, 0xB0, 0xB4, 0x29, 0x28, 0xE6, - 0x9C, 0xA8, 0x29, 0x28, 0xE9, 0x87, 0x91, 0x29, - 0x28, 0xE5, 0x9C, 0x9F, 0x29, 0x28, 0xE6, 0x97, - 0xA5, 0x29, 0x28, 0xE6, 0xA0, 0xAA, 0x29, 0x28, - 0xE6, 0x9C, 0x89, 0x29, 0x28, 0xE7, 0xA4, 0xBE, - 0x29, 0x28, 0xE5, 0x90, 0x8D, 0x29, 0x28, 0xE7, - 0x89, 0xB9, 0x29, 0x28, 0xE8, 0xB2, 0xA1, 0x29, - 0x28, 0xE7, 0xA5, 0x9D, 0x29, 0x28, 0xE5, 0x8A, - 0xB4, 0x29, 0x28, 0xE4, 0xBB, 0xA3, 0x29, 0x28, - 0xE5, 0x91, 0xBC, 0x29, 0x28, 0xE5, 0xAD, 0xA6, - 0x29, 0x28, 0xE7, 0x9B, 0xA3, 0x29, 0x28, 0xE4, - 0xBC, 0x81, 0x29, 0x28, 0xE8, 0xB3, 0x87, 0x29, - 0x28, 0xE5, 0x8D, 0x94, 0x29, 0x28, 0xE7, 0xA5, - 0xAD, 0x29, 0x28, 0xE4, 0xBC, 0x91, 0x29, 0x28, - 0xE8, 0x87, 0xAA, 0x29, 0x28, 0xE8, 0x87, 0xB3, - 0x29, 0x32, 0x31, 0x32, 0x32, 0x32, 0x33, 0x32, - 0x34, 0x32, 0x35, 0x32, 0x36, 0x32, 0x37, 0x32, - 0x38, 0x32, 0x39, 0x33, 0x30, 0x33, 0x31, 0x33, - 0x32, 0x33, 0x33, 0x33, 0x34, 0x33, 0x35, 0xE1, - 0x84, 0x80, 0xE1, 0x84, 0x82, 0xE1, 0x84, 0x83, - 0xE1, 0x84, 0x85, 0xE1, 0x84, 0x86, 0xE1, 0x84, - 0x87, 0xE1, 0x84, 0x89, 0xE1, 0x84, 0x8B, 0xE1, - 0x84, 0x8C, 0xE1, 0x84, 0x8E, 0xE1, 0x84, 0x8F, - 0xE1, 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, 0x84, - 0x92, 0xE1, 0x84, 0x80, 0xE1, 0x85, 0xA1, 0xE1, - 0x84, 0x82, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x83, - 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x85, 0xE1, 0x85, - 0xA1, 0xE1, 0x84, 0x86, 0xE1, 0x85, 0xA1, 0xE1, - 0x84, 0x87, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x89, - 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x8B, 0xE1, 0x85, - 0xA1, 0xE1, 0x84, 0x8C, 0xE1, 0x85, 0xA1, 0xE1, - 0x84, 0x8E, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x8F, - 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x90, 0xE1, 0x85, - 0xA1, 0xE1, 0x84, 0x91, 0xE1, 0x85, 0xA1, 0xE1, - 0x84, 0x92, 0xE1, 0x85, 0xA1, 0xE4, 0xB8, 0x80, - 0xE4, 0xBA, 0x8C, 0xE4, 0xB8, 0x89, 0xE5, 0x9B, - 0x9B, 0xE4, 0xBA, 0x94, 0xE5, 0x85, 0xAD, 0xE4, - 0xB8, 0x83, 0xE5, 0x85, 0xAB, 0xE4, 0xB9, 0x9D, - 0xE5, 0x8D, 0x81, 0xE6, 0x9C, 0x88, 0xE7, 0x81, - 0xAB, 0xE6, 0xB0, 0xB4, 0xE6, 0x9C, 0xA8, 0xE9, - 0x87, 0x91, 0xE5, 0x9C, 0x9F, 0xE6, 0x97, 0xA5, - 0xE6, 0xA0, 0xAA, 0xE6, 0x9C, 0x89, 0xE7, 0xA4, - 0xBE, 0xE5, 0x90, 0x8D, 0xE7, 0x89, 0xB9, 0xE8, - 0xB2, 0xA1, 0xE7, 0xA5, 0x9D, 0xE5, 0x8A, 0xB4, - 0xE7, 0xA7, 0x98, 0xE7, 0x94, 0xB7, 0xE5, 0xA5, - 0xB3, 0xE9, 0x81, 0xA9, 0xE5, 0x84, 0xAA, 0xE5, - 0x8D, 0xB0, 0xE6, 0xB3, 0xA8, 0xE9, 0xA0, 0x85, - 0xE4, 0xBC, 0x91, 0xE5, 0x86, 0x99, 0xE6, 0xAD, - 0xA3, 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, 0xAD, 0xE4, - 0xB8, 0x8B, 0xE5, 0xB7, 0xA6, 0xE5, 0x8F, 0xB3, - 0xE5, 0x8C, 0xBB, 0xE5, 0xAE, 0x97, 0xE5, 0xAD, - 0xA6, 0xE7, 0x9B, 0xA3, 0xE4, 0xBC, 0x81, 0xE8, - 0xB3, 0x87, 0xE5, 0x8D, 0x94, 0xE5, 0xA4, 0x9C, - 0x33, 0x36, 0x33, 0x37, 0x33, 0x38, 0x33, 0x39, - 0x34, 0x30, 0x34, 0x31, 0x34, 0x32, 0x34, 0x33, - 0x34, 0x34, 0x34, 0x35, 0x34, 0x36, 0x34, 0x37, - 0x34, 0x38, 0x34, 0x39, 0x35, 0x30, 0x31, 0xE6, - 0x9C, 0x88, 0x32, 0xE6, 0x9C, 0x88, 0x33, 0xE6, - 0x9C, 0x88, 0x34, 0xE6, 0x9C, 0x88, 0x35, 0xE6, - 0x9C, 0x88, 0x36, 0xE6, 0x9C, 0x88, 0x37, 0xE6, - 0x9C, 0x88, 0x38, 0xE6, 0x9C, 0x88, 0x39, 0xE6, - 0x9C, 0x88, 0x31, 0x30, 0xE6, 0x9C, 0x88, 0x31, - 0x31, 0xE6, 0x9C, 0x88, 0x31, 0x32, 0xE6, 0x9C, - 0x88, 0xE3, 0x82, 0xA2, 0xE3, 0x82, 0xA4, 0xE3, - 0x82, 0xA6, 0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xAA, - 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0xAD, 0xE3, 0x82, - 0xAF, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0xB3, 0xE3, - 0x82, 0xB5, 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0xB9, - 0xE3, 0x82, 0xBB, 0xE3, 0x82, 0xBD, 0xE3, 0x82, - 0xBF, 0xE3, 0x83, 0x81, 0xE3, 0x83, 0x84, 0xE3, - 0x83, 0x86, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x8A, - 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0x8C, 0xE3, 0x83, - 0x8D, 0xE3, 0x83, 0x8E, 0xE3, 0x83, 0x8F, 0xE3, - 0x83, 0x92, 0xE3, 0x83, 0x95, 0xE3, 0x83, 0x98, - 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0x9E, 0xE3, 0x83, - 0x9F, 0xE3, 0x83, 0xA0, 0xE3, 0x83, 0xA1, 0xE3, - 0x83, 0xA2, 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xA6, - 0xE3, 0x83, 0xA8, 0xE3, 0x83, 0xA9, 0xE3, 0x83, - 0xAA, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xAC, 0xE3, - 0x83, 0xAD, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0xB0, - 0xE3, 0x83, 0xB1, 0xE3, 0x83, 0xB2, 0xE3, 0x82, - 0xA2, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, - 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xA2, - 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x95, 0xE3, 0x82, - 0xA1, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xB3, 0xE3, - 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xA2, - 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xBC, 0xE3, 0x83, - 0xAB, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0x8B, 0xE3, - 0x83, 0xB3, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, - 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3, 0xE3, 0x83, - 0x81, 0xE3, 0x82, 0xA6, 0xE3, 0x82, 0xA9, 0xE3, - 0x83, 0xB3, 0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xB9, - 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xBC, 0xE3, 0x83, - 0x88, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xA8, 0xE3, - 0x83, 0xBC, 0xE3, 0x82, 0xAB, 0xE3, 0x83, 0xBC, - 0xE3, 0x82, 0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82, - 0xB9, 0xE3, 0x82, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, - 0x83, 0xA0, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0xA4, - 0xE3, 0x83, 0xAA, 0xE3, 0x82, 0xAB, 0xE3, 0x83, - 0xA9, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, - 0x82, 0xAB, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xAA, - 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAB, 0xE3, 0x82, - 0x99, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3, 0xE3, - 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xB3, - 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xAD, 0xE3, 0x82, - 0x99, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, - 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x8B, - 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAD, 0xE3, 0x83, - 0xA5, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, - 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, - 0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0xBC, 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, - 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, 0x82, 0xAF, - 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9, 0xE3, 0x83, - 0xA0, 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, - 0x83, 0xA1, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, - 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xAD, 0xE3, 0x83, - 0xAD, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0x83, 0xE3, - 0x83, 0x88, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, - 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0xE3, 0x82, - 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9, 0xE3, - 0x83, 0xA0, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, - 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, 0xE3, 0x82, - 0xBB, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xA4, 0xE3, - 0x83, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, - 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x8D, 0xE3, 0x82, - 0xB1, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB9, 0xE3, - 0x82, 0xB3, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x8A, - 0xE3, 0x82, 0xB3, 0xE3, 0x83, 0xBC, 0xE3, 0x83, - 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xB5, 0xE3, - 0x82, 0xA4, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, - 0xE3, 0x82, 0xB5, 0xE3, 0x83, 0xB3, 0xE3, 0x83, - 0x81, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xA0, 0xE3, - 0x82, 0xB7, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xB3, - 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x82, - 0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, - 0x82, 0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, - 0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0xBC, 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x86, 0xE3, - 0x82, 0x99, 0xE3, 0x82, 0xB7, 0xE3, 0x83, 0x88, - 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, - 0x88, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x8A, 0xE3, - 0x83, 0x8E, 0xE3, 0x83, 0x8E, 0xE3, 0x83, 0x83, - 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x8F, 0xE3, 0x82, - 0xA4, 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x8F, 0xE3, - 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xBB, - 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x83, - 0x8F, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, - 0x83, 0x84, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, - 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAC, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, - 0x82, 0xA2, 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x88, - 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, - 0x9A, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, 0xE3, - 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xB3, - 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0xA1, 0xE3, - 0x83, 0xA9, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, - 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x95, 0xE3, 0x82, - 0xA3, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, - 0x83, 0x95, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x83, - 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0xA7, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0x95, 0xE3, 0x83, 0xA9, 0xE3, - 0x83, 0xB3, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0xAF, - 0xE3, 0x82, 0xBF, 0xE3, 0x83, 0xBC, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, - 0x82, 0xBD, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, - 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0x92, 0xE3, 0x83, - 0x98, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x84, 0xE3, - 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3, - 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x98, 0xE3, 0x82, - 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB7, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x99, - 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xBF, 0xE3, 0x83, - 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xA4, 0xE3, - 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x9B, - 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, - 0x88, 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xB3, 0xE3, - 0x83, 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3, - 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, - 0x83, 0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xB3, - 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xA4, 0xE3, 0x82, - 0xAF, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0x9E, 0xE3, - 0x82, 0xA4, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x9E, - 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x8F, 0xE3, 0x83, - 0x9E, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xAF, 0xE3, - 0x83, 0x9E, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xB7, - 0xE3, 0x83, 0xA7, 0xE3, 0x83, 0xB3, 0xE3, 0x83, - 0x9F, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, 0xE3, - 0x83, 0xB3, 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xAA, - 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xAA, 0xE3, 0x83, - 0x8F, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, - 0x83, 0xAB, 0xE3, 0x83, 0xA1, 0xE3, 0x82, 0xAB, - 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA1, 0xE3, 0x82, - 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x88, 0xE3, - 0x83, 0xB3, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xBC, - 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0xE3, 0x83, - 0xA4, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xBC, - 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xA6, 0xE3, 0x82, - 0xA2, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0xAA, 0xE3, - 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, - 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xA9, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, - 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xBC, - 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xA0, 0xE3, - 0x83, 0xAC, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, - 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0xB3, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0x83, 0xE3, - 0x83, 0x88, 0x30, 0xE7, 0x82, 0xB9, 0x31, 0xE7, - 0x82, 0xB9, 0x32, 0xE7, 0x82, 0xB9, 0x33, 0xE7, - 0x82, 0xB9, 0x34, 0xE7, 0x82, 0xB9, 0x35, 0xE7, - 0x82, 0xB9, 0x36, 0xE7, 0x82, 0xB9, 0x37, 0xE7, - 0x82, 0xB9, 0x38, 0xE7, 0x82, 0xB9, 0x39, 0xE7, - 0x82, 0xB9, 0x31, 0x30, 0xE7, 0x82, 0xB9, 0x31, - 0x31, 0xE7, 0x82, 0xB9, 0x31, 0x32, 0xE7, 0x82, - 0xB9, 0x31, 0x33, 0xE7, 0x82, 0xB9, 0x31, 0x34, - 0xE7, 0x82, 0xB9, 0x31, 0x35, 0xE7, 0x82, 0xB9, - 0x31, 0x36, 0xE7, 0x82, 0xB9, 0x31, 0x37, 0xE7, - 0x82, 0xB9, 0x31, 0x38, 0xE7, 0x82, 0xB9, 0x31, - 0x39, 0xE7, 0x82, 0xB9, 0x32, 0x30, 0xE7, 0x82, - 0xB9, 0x32, 0x31, 0xE7, 0x82, 0xB9, 0x32, 0x32, - 0xE7, 0x82, 0xB9, 0x32, 0x33, 0xE7, 0x82, 0xB9, - 0x32, 0x34, 0xE7, 0x82, 0xB9, 0x68, 0x50, 0x61, - 0x64, 0x61, 0x41, 0x55, 0x62, 0x61, 0x72, 0x6F, - 0x56, 0x70, 0x63, 0xE5, 0xB9, 0xB3, 0xE6, 0x88, - 0x90, 0xE6, 0x98, 0xAD, 0xE5, 0x92, 0x8C, 0xE5, - 0xA4, 0xA7, 0xE6, 0xAD, 0xA3, 0xE6, 0x98, 0x8E, - 0xE6, 0xB2, 0xBB, 0xE6, 0xA0, 0xAA, 0xE5, 0xBC, - 0x8F, 0xE4, 0xBC, 0x9A, 0xE7, 0xA4, 0xBE, 0x70, - 0x41, 0x6E, 0x41, 0xCE, 0xBC, 0x41, 0x6D, 0x41, - 0x6B, 0x41, 0x4B, 0x42, 0x4D, 0x42, 0x47, 0x42, - 0x63, 0x61, 0x6C, 0x6B, 0x63, 0x61, 0x6C, 0x70, - 0x46, 0x6E, 0x46, 0xCE, 0xBC, 0x46, 0xCE, 0xBC, - 0x67, 0x6D, 0x67, 0x6B, 0x67, 0x48, 0x7A, 0x6B, - 0x48, 0x7A, 0x4D, 0x48, 0x7A, 0x47, 0x48, 0x7A, - 0x54, 0x48, 0x7A, 0xCE, 0xBC, 0x6C, 0x6D, 0x6C, - 0x64, 0x6C, 0x6B, 0x6C, 0x66, 0x6D, 0x6E, 0x6D, - 0xCE, 0xBC, 0x6D, 0x6D, 0x6D, 0x63, 0x6D, 0x6B, - 0x6D, 0x6D, 0x6D, 0x32, 0x63, 0x6D, 0x32, 0x6D, - 0x32, 0x6B, 0x6D, 0x32, 0x6D, 0x6D, 0x33, 0x63, - 0x6D, 0x33, 0x6D, 0x33, 0x6B, 0x6D, 0x33, 0x6D, - 0xE2, 0x88, 0x95, 0x73, 0x6D, 0xE2, 0x88, 0x95, - 0x73, 0x32, 0x50, 0x61, 0x6B, 0x50, 0x61, 0x4D, - 0x50, 0x61, 0x47, 0x50, 0x61, 0x72, 0x61, 0x64, - 0x72, 0x61, 0x64, 0xE2, 0x88, 0x95, 0x73, 0x72, - 0x61, 0x64, 0xE2, 0x88, 0x95, 0x73, 0x32, 0x70, - 0x73, 0x6E, 0x73, 0xCE, 0xBC, 0x73, 0x6D, 0x73, - 0x70, 0x56, 0x6E, 0x56, 0xCE, 0xBC, 0x56, 0x6D, - 0x56, 0x6B, 0x56, 0x4D, 0x56, 0x70, 0x57, 0x6E, - 0x57, 0xCE, 0xBC, 0x57, 0x6D, 0x57, 0x6B, 0x57, - 0x4D, 0x57, 0x6B, 0xCE, 0xA9, 0x4D, 0xCE, 0xA9, - 0x61, 0x2E, 0x6D, 0x2E, 0x42, 0x71, 0x63, 0x63, - 0x63, 0x64, 0x43, 0xE2, 0x88, 0x95, 0x6B, 0x67, - 0x43, 0x6F, 0x2E, 0x64, 0x42, 0x47, 0x79, 0x68, - 0x61, 0x48, 0x50, 0x69, 0x6E, 0x4B, 0x4B, 0x4B, - 0x4D, 0x6B, 0x74, 0x6C, 0x6D, 0x6C, 0x6E, 0x6C, - 0x6F, 0x67, 0x6C, 0x78, 0x6D, 0x62, 0x6D, 0x69, - 0x6C, 0x6D, 0x6F, 0x6C, 0x50, 0x48, 0x70, 0x2E, - 0x6D, 0x2E, 0x50, 0x50, 0x4D, 0x50, 0x52, 0x73, - 0x72, 0x53, 0x76, 0x57, 0x62, 0x31, 0xE6, 0x97, - 0xA5, 0x32, 0xE6, 0x97, 0xA5, 0x33, 0xE6, 0x97, - 0xA5, 0x34, 0xE6, 0x97, 0xA5, 0x35, 0xE6, 0x97, - 0xA5, 0x36, 0xE6, 0x97, 0xA5, 0x37, 0xE6, 0x97, - 0xA5, 0x38, 0xE6, 0x97, 0xA5, 0x39, 0xE6, 0x97, - 0xA5, 0x31, 0x30, 0xE6, 0x97, 0xA5, 0x31, 0x31, - 0xE6, 0x97, 0xA5, 0x31, 0x32, 0xE6, 0x97, 0xA5, - 0x31, 0x33, 0xE6, 0x97, 0xA5, 0x31, 0x34, 0xE6, - 0x97, 0xA5, 0x31, 0x35, 0xE6, 0x97, 0xA5, 0x31, - 0x36, 0xE6, 0x97, 0xA5, 0x31, 0x37, 0xE6, 0x97, - 0xA5, 0x31, 0x38, 0xE6, 0x97, 0xA5, 0x31, 0x39, - 0xE6, 0x97, 0xA5, 0x32, 0x30, 0xE6, 0x97, 0xA5, - 0x32, 0x31, 0xE6, 0x97, 0xA5, 0x32, 0x32, 0xE6, - 0x97, 0xA5, 0x32, 0x33, 0xE6, 0x97, 0xA5, 0x32, - 0x34, 0xE6, 0x97, 0xA5, 0x32, 0x35, 0xE6, 0x97, - 0xA5, 0x32, 0x36, 0xE6, 0x97, 0xA5, 0x32, 0x37, - 0xE6, 0x97, 0xA5, 0x32, 0x38, 0xE6, 0x97, 0xA5, - 0x32, 0x39, 0xE6, 0x97, 0xA5, 0x33, 0x30, 0xE6, - 0x97, 0xA5, 0x33, 0x31, 0xE6, 0x97, 0xA5, 0xF6, - 0xE8, 0xB1, 0x88, 0xF6, 0xE6, 0x9B, 0xB4, 0xF6, - 0xE8, 0xBB, 0x8A, 0xF6, 0xE8, 0xB3, 0x88, 0xF6, - 0xE6, 0xBB, 0x91, 0xF6, 0xE4, 0xB8, 0xB2, 0xF6, - 0xE5, 0x8F, 0xA5, 0xF6, 0xE9, 0xBE, 0x9C, 0xF6, - 0xE9, 0xBE, 0x9C, 0xF6, 0xE5, 0xA5, 0x91, 0xF6, - 0xE9, 0x87, 0x91, 0xF6, 0xE5, 0x96, 0x87, 0xF6, - 0xE5, 0xA5, 0x88, 0xF6, 0xE6, 0x87, 0xB6, 0xF6, - 0xE7, 0x99, 0xA9, 0xF6, 0xE7, 0xBE, 0x85, 0xF6, - 0xE8, 0x98, 0xBF, 0xF6, 0xE8, 0x9E, 0xBA, 0xF6, - 0xE8, 0xA3, 0xB8, 0xF6, 0xE9, 0x82, 0x8F, 0xF6, - 0xE6, 0xA8, 0x82, 0xF6, 0xE6, 0xB4, 0x9B, 0xF6, - 0xE7, 0x83, 0x99, 0xF6, 0xE7, 0x8F, 0x9E, 0xF6, - 0xE8, 0x90, 0xBD, 0xF6, 0xE9, 0x85, 0xAA, 0xF6, - 0xE9, 0xA7, 0xB1, 0xF6, 0xE4, 0xBA, 0x82, 0xF6, - 0xE5, 0x8D, 0xB5, 0xF6, 0xE6, 0xAC, 0x84, 0xF6, - 0xE7, 0x88, 0x9B, 0xF6, 0xE8, 0x98, 0xAD, 0xF6, - 0xE9, 0xB8, 0x9E, 0xF6, 0xE5, 0xB5, 0x90, 0xF6, - 0xE6, 0xBF, 0xAB, 0xF6, 0xE8, 0x97, 0x8D, 0xF6, - 0xE8, 0xA5, 0xA4, 0xF6, 0xE6, 0x8B, 0x89, 0xF6, - 0xE8, 0x87, 0x98, 0xF6, 0xE8, 0xA0, 0x9F, 0xF6, - 0xE5, 0xBB, 0x8A, 0xF6, 0xE6, 0x9C, 0x97, 0xF6, - 0xE6, 0xB5, 0xAA, 0xF6, 0xE7, 0x8B, 0xBC, 0xF6, - 0xE9, 0x83, 0x8E, 0xF6, 0xE4, 0xBE, 0x86, 0xF6, - 0xE5, 0x86, 0xB7, 0xF6, 0xE5, 0x8B, 0x9E, 0xF6, - 0xE6, 0x93, 0x84, 0xF6, 0xE6, 0xAB, 0x93, 0xF6, - 0xE7, 0x88, 0x90, 0xF6, 0xE7, 0x9B, 0xA7, 0xF6, - 0xE8, 0x80, 0x81, 0xF6, 0xE8, 0x98, 0x86, 0xF6, - 0xE8, 0x99, 0x9C, 0xF6, 0xE8, 0xB7, 0xAF, 0xF6, - 0xE9, 0x9C, 0xB2, 0xF6, 0xE9, 0xAD, 0xAF, 0xF6, - 0xE9, 0xB7, 0xBA, 0xF6, 0xE7, 0xA2, 0x8C, 0xF6, - 0xE7, 0xA5, 0xBF, 0xF6, 0xE7, 0xB6, 0xA0, 0xF6, - 0xE8, 0x8F, 0x89, 0xF6, 0xE9, 0x8C, 0x84, 0xF6, - 0xE9, 0xB9, 0xBF, 0xF6, 0xE8, 0xAB, 0x96, 0xF6, - 0xE5, 0xA3, 0x9F, 0xF6, 0xE5, 0xBC, 0x84, 0xF6, - 0xE7, 0xB1, 0xA0, 0xF6, 0xE8, 0x81, 0xBE, 0xF6, - 0xE7, 0x89, 0xA2, 0xF6, 0xE7, 0xA3, 0x8A, 0xF6, - 0xE8, 0xB3, 0x82, 0xF6, 0xE9, 0x9B, 0xB7, 0xF6, - 0xE5, 0xA3, 0x98, 0xF6, 0xE5, 0xB1, 0xA2, 0xF6, - 0xE6, 0xA8, 0x93, 0xF6, 0xE6, 0xB7, 0x9A, 0xF6, - 0xE6, 0xBC, 0x8F, 0xF6, 0xE7, 0xB4, 0xAF, 0xF6, - 0xE7, 0xB8, 0xB7, 0xF6, 0xE9, 0x99, 0x8B, 0xF6, - 0xE5, 0x8B, 0x92, 0xF6, 0xE8, 0x82, 0x8B, 0xF6, - 0xE5, 0x87, 0x9C, 0xF6, 0xE5, 0x87, 0x8C, 0xF6, - 0xE7, 0xA8, 0x9C, 0xF6, 0xE7, 0xB6, 0xBE, 0xF6, - 0xE8, 0x8F, 0xB1, 0xF6, 0xE9, 0x99, 0xB5, 0xF6, - 0xE8, 0xAE, 0x80, 0xF6, 0xE6, 0x8B, 0x8F, 0xF6, - 0xE6, 0xA8, 0x82, 0xF6, 0xE8, 0xAB, 0xBE, 0xF6, - 0xE4, 0xB8, 0xB9, 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, - 0xE6, 0x80, 0x92, 0xF6, 0xE7, 0x8E, 0x87, 0xF6, - 0xE7, 0x95, 0xB0, 0xF6, 0xE5, 0x8C, 0x97, 0xF6, - 0xE7, 0xA3, 0xBB, 0xF6, 0xE4, 0xBE, 0xBF, 0xF6, - 0xE5, 0xBE, 0xA9, 0xF6, 0xE4, 0xB8, 0x8D, 0xF6, - 0xE6, 0xB3, 0x8C, 0xF6, 0xE6, 0x95, 0xB8, 0xF6, - 0xE7, 0xB4, 0xA2, 0xF6, 0xE5, 0x8F, 0x83, 0xF6, - 0xE5, 0xA1, 0x9E, 0xF6, 0xE7, 0x9C, 0x81, 0xF6, - 0xE8, 0x91, 0x89, 0xF6, 0xE8, 0xAA, 0xAA, 0xF6, - 0xE6, 0xAE, 0xBA, 0xF6, 0xE8, 0xBE, 0xB0, 0xF6, - 0xE6, 0xB2, 0x88, 0xF6, 0xE6, 0x8B, 0xBE, 0xF6, - 0xE8, 0x8B, 0xA5, 0xF6, 0xE6, 0x8E, 0xA0, 0xF6, - 0xE7, 0x95, 0xA5, 0xF6, 0xE4, 0xBA, 0xAE, 0xF6, - 0xE5, 0x85, 0xA9, 0xF6, 0xE5, 0x87, 0x89, 0xF6, - 0xE6, 0xA2, 0x81, 0xF6, 0xE7, 0xB3, 0xA7, 0xF6, - 0xE8, 0x89, 0xAF, 0xF6, 0xE8, 0xAB, 0x92, 0xF6, - 0xE9, 0x87, 0x8F, 0xF6, 0xE5, 0x8B, 0xB5, 0xF6, - 0xE5, 0x91, 0x82, 0xF6, 0xE5, 0xA5, 0xB3, 0xF6, - 0xE5, 0xBB, 0xAC, 0xF6, 0xE6, 0x97, 0x85, 0xF6, - 0xE6, 0xBF, 0xBE, 0xF6, 0xE7, 0xA4, 0xAA, 0xF6, - 0xE9, 0x96, 0xAD, 0xF6, 0xE9, 0xA9, 0xAA, 0xF6, - 0xE9, 0xBA, 0x97, 0xF6, 0xE9, 0xBB, 0x8E, 0xF6, - 0xE5, 0x8A, 0x9B, 0xF6, 0xE6, 0x9B, 0x86, 0xF6, - 0xE6, 0xAD, 0xB7, 0xF6, 0xE8, 0xBD, 0xA2, 0xF6, - 0xE5, 0xB9, 0xB4, 0xF6, 0xE6, 0x86, 0x90, 0xF6, - 0xE6, 0x88, 0x80, 0xF6, 0xE6, 0x92, 0x9A, 0xF6, - 0xE6, 0xBC, 0xA3, 0xF6, 0xE7, 0x85, 0x89, 0xF6, - 0xE7, 0x92, 0x89, 0xF6, 0xE7, 0xA7, 0x8A, 0xF6, - 0xE7, 0xB7, 0xB4, 0xF6, 0xE8, 0x81, 0xAF, 0xF6, - 0xE8, 0xBC, 0xA6, 0xF6, 0xE8, 0x93, 0xAE, 0xF6, - 0xE9, 0x80, 0xA3, 0xF6, 0xE9, 0x8D, 0x8A, 0xF6, - 0xE5, 0x88, 0x97, 0xF6, 0xE5, 0x8A, 0xA3, 0xF6, - 0xE5, 0x92, 0xBD, 0xF6, 0xE7, 0x83, 0x88, 0xF6, - 0xE8, 0xA3, 0x82, 0xF6, 0xE8, 0xAA, 0xAA, 0xF6, - 0xE5, 0xBB, 0x89, 0xF6, 0xE5, 0xBF, 0xB5, 0xF6, - 0xE6, 0x8D, 0xBB, 0xF6, 0xE6, 0xAE, 0xAE, 0xF6, - 0xE7, 0xB0, 0xBE, 0xF6, 0xE7, 0x8D, 0xB5, 0xF6, - 0xE4, 0xBB, 0xA4, 0xF6, 0xE5, 0x9B, 0xB9, 0xF6, - 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, 0xB6, 0xBA, 0xF6, - 0xE6, 0x80, 0x9C, 0xF6, 0xE7, 0x8E, 0xB2, 0xF6, - 0xE7, 0x91, 0xA9, 0xF6, 0xE7, 0xBE, 0x9A, 0xF6, - 0xE8, 0x81, 0x86, 0xF6, 0xE9, 0x88, 0xB4, 0xF6, - 0xE9, 0x9B, 0xB6, 0xF6, 0xE9, 0x9D, 0x88, 0xF6, - 0xE9, 0xA0, 0x98, 0xF6, 0xE4, 0xBE, 0x8B, 0xF6, - 0xE7, 0xA6, 0xAE, 0xF6, 0xE9, 0x86, 0xB4, 0xF6, - 0xE9, 0x9A, 0xB8, 0xF6, 0xE6, 0x83, 0xA1, 0xF6, - 0xE4, 0xBA, 0x86, 0xF6, 0xE5, 0x83, 0x9A, 0xF6, - 0xE5, 0xAF, 0xAE, 0xF6, 0xE5, 0xB0, 0xBF, 0xF6, - 0xE6, 0x96, 0x99, 0xF6, 0xE6, 0xA8, 0x82, 0xF6, - 0xE7, 0x87, 0x8E, 0xF6, 0xE7, 0x99, 0x82, 0xF6, - 0xE8, 0x93, 0xBC, 0xF6, 0xE9, 0x81, 0xBC, 0xF6, - 0xE9, 0xBE, 0x8D, 0xF6, 0xE6, 0x9A, 0x88, 0xF6, - 0xE9, 0x98, 0xAE, 0xF6, 0xE5, 0x8A, 0x89, 0xF6, - 0xE6, 0x9D, 0xBB, 0xF6, 0xE6, 0x9F, 0xB3, 0xF6, - 0xE6, 0xB5, 0x81, 0xF6, 0xE6, 0xBA, 0x9C, 0xF6, - 0xE7, 0x90, 0x89, 0xF6, 0xE7, 0x95, 0x99, 0xF6, - 0xE7, 0xA1, 0xAB, 0xF6, 0xE7, 0xB4, 0x90, 0xF6, - 0xE9, 0xA1, 0x9E, 0xF6, 0xE5, 0x85, 0xAD, 0xF6, - 0xE6, 0x88, 0xAE, 0xF6, 0xE9, 0x99, 0xB8, 0xF6, - 0xE5, 0x80, 0xAB, 0xF6, 0xE5, 0xB4, 0x99, 0xF6, - 0xE6, 0xB7, 0xAA, 0xF6, 0xE8, 0xBC, 0xAA, 0xF6, - 0xE5, 0xBE, 0x8B, 0xF6, 0xE6, 0x85, 0x84, 0xF6, - 0xE6, 0xA0, 0x97, 0xF6, 0xE7, 0x8E, 0x87, 0xF6, - 0xE9, 0x9A, 0x86, 0xF6, 0xE5, 0x88, 0xA9, 0xF6, - 0xE5, 0x90, 0x8F, 0xF6, 0xE5, 0xB1, 0xA5, 0xF6, - 0xE6, 0x98, 0x93, 0xF6, 0xE6, 0x9D, 0x8E, 0xF6, - 0xE6, 0xA2, 0xA8, 0xF6, 0xE6, 0xB3, 0xA5, 0xF6, - 0xE7, 0x90, 0x86, 0xF6, 0xE7, 0x97, 0xA2, 0xF6, - 0xE7, 0xBD, 0xB9, 0xF6, 0xE8, 0xA3, 0x8F, 0xF6, - 0xE8, 0xA3, 0xA1, 0xF6, 0xE9, 0x87, 0x8C, 0xF6, - 0xE9, 0x9B, 0xA2, 0xF6, 0xE5, 0x8C, 0xBF, 0xF6, - 0xE6, 0xBA, 0xBA, 0xF6, 0xE5, 0x90, 0x9D, 0xF6, - 0xE7, 0x87, 0x90, 0xF6, 0xE7, 0x92, 0x98, 0xF6, - 0xE8, 0x97, 0xBA, 0xF6, 0xE9, 0x9A, 0xA3, 0xF6, - 0xE9, 0xB1, 0x97, 0xF6, 0xE9, 0xBA, 0x9F, 0xF6, - 0xE6, 0x9E, 0x97, 0xF6, 0xE6, 0xB7, 0x8B, 0xF6, - 0xE8, 0x87, 0xA8, 0xF6, 0xE7, 0xAB, 0x8B, 0xF6, - 0xE7, 0xAC, 0xA0, 0xF6, 0xE7, 0xB2, 0x92, 0xF6, - 0xE7, 0x8B, 0x80, 0xF6, 0xE7, 0x82, 0x99, 0xF6, - 0xE8, 0xAD, 0x98, 0xF6, 0xE4, 0xBB, 0x80, 0xF6, - 0xE8, 0x8C, 0xB6, 0xF6, 0xE5, 0x88, 0xBA, 0xF6, - 0xE5, 0x88, 0x87, 0xF6, 0xE5, 0xBA, 0xA6, 0xF6, - 0xE6, 0x8B, 0x93, 0xF6, 0xE7, 0xB3, 0x96, 0xF6, - 0xE5, 0xAE, 0x85, 0xF6, 0xE6, 0xB4, 0x9E, 0xF6, - 0xE6, 0x9A, 0xB4, 0xF6, 0xE8, 0xBC, 0xBB, 0xF6, - 0xE8, 0xA1, 0x8C, 0xF6, 0xE9, 0x99, 0x8D, 0xF6, - 0xE8, 0xA6, 0x8B, 0xF6, 0xE5, 0xBB, 0x93, 0xF6, - 0xE5, 0x85, 0x80, 0xF6, 0xE5, 0x97, 0x80, 0xF6, - 0xE5, 0xA1, 0x9A, 0xF6, 0xE6, 0x99, 0xB4, 0xF6, - 0xE5, 0x87, 0x9E, 0xF6, 0xE7, 0x8C, 0xAA, 0xF6, - 0xE7, 0x9B, 0x8A, 0xF6, 0xE7, 0xA4, 0xBC, 0xF6, - 0xE7, 0xA5, 0x9E, 0xF6, 0xE7, 0xA5, 0xA5, 0xF6, - 0xE7, 0xA6, 0x8F, 0xF6, 0xE9, 0x9D, 0x96, 0xF6, - 0xE7, 0xB2, 0xBE, 0xF6, 0xE7, 0xBE, 0xBD, 0xF6, - 0xE8, 0x98, 0x92, 0xF6, 0xE8, 0xAB, 0xB8, 0xF6, - 0xE9, 0x80, 0xB8, 0xF6, 0xE9, 0x83, 0xBD, 0xF6, - 0xE9, 0xA3, 0xAF, 0xF6, 0xE9, 0xA3, 0xBC, 0xF6, - 0xE9, 0xA4, 0xA8, 0xF6, 0xE9, 0xB6, 0xB4, 0xF6, - 0xE4, 0xBE, 0xAE, 0xF6, 0xE5, 0x83, 0xA7, 0xF6, - 0xE5, 0x85, 0x8D, 0xF6, 0xE5, 0x8B, 0x89, 0xF6, - 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, 0x8D, 0x91, 0xF6, - 0xE5, 0x96, 0x9D, 0xF6, 0xE5, 0x98, 0x86, 0xF6, - 0xE5, 0x99, 0xA8, 0xF6, 0xE5, 0xA1, 0x80, 0xF6, - 0xE5, 0xA2, 0xA8, 0xF6, 0xE5, 0xB1, 0xA4, 0xF6, - 0xE5, 0xB1, 0xAE, 0xF6, 0xE6, 0x82, 0x94, 0xF6, - 0xE6, 0x85, 0xA8, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, - 0xE6, 0x87, 0xB2, 0xF6, 0xE6, 0x95, 0x8F, 0xF6, - 0xE6, 0x97, 0xA2, 0xF6, 0xE6, 0x9A, 0x91, 0xF6, - 0xE6, 0xA2, 0x85, 0xF6, 0xE6, 0xB5, 0xB7, 0xF6, - 0xE6, 0xB8, 0x9A, 0xF6, 0xE6, 0xBC, 0xA2, 0xF6, - 0xE7, 0x85, 0xAE, 0xF6, 0xE7, 0x88, 0xAB, 0xF6, - 0xE7, 0x90, 0xA2, 0xF6, 0xE7, 0xA2, 0x91, 0xF6, - 0xE7, 0xA4, 0xBE, 0xF6, 0xE7, 0xA5, 0x89, 0xF6, - 0xE7, 0xA5, 0x88, 0xF6, 0xE7, 0xA5, 0x90, 0xF6, - 0xE7, 0xA5, 0x96, 0xF6, 0xE7, 0xA5, 0x9D, 0xF6, - 0xE7, 0xA6, 0x8D, 0xF6, 0xE7, 0xA6, 0x8E, 0xF6, - 0xE7, 0xA9, 0x80, 0xF6, 0xE7, 0xAA, 0x81, 0xF6, - 0xE7, 0xAF, 0x80, 0xF6, 0xE7, 0xB7, 0xB4, 0xF6, - 0xE7, 0xB8, 0x89, 0xF6, 0xE7, 0xB9, 0x81, 0xF6, - 0xE7, 0xBD, 0xB2, 0xF6, 0xE8, 0x80, 0x85, 0xF6, - 0xE8, 0x87, 0xAD, 0xF6, 0xE8, 0x89, 0xB9, 0xF6, - 0xE8, 0x89, 0xB9, 0xF6, 0xE8, 0x91, 0x97, 0xF6, - 0xE8, 0xA4, 0x90, 0xF6, 0xE8, 0xA6, 0x96, 0xF6, - 0xE8, 0xAC, 0x81, 0xF6, 0xE8, 0xAC, 0xB9, 0xF6, - 0xE8, 0xB3, 0x93, 0xF6, 0xE8, 0xB4, 0x88, 0xF6, - 0xE8, 0xBE, 0xB6, 0xF6, 0xE9, 0x80, 0xB8, 0xF6, - 0xE9, 0x9B, 0xA3, 0xF6, 0xE9, 0x9F, 0xBF, 0xF6, - 0xE9, 0xA0, 0xBB, 0x66, 0x66, 0x66, 0x69, 0x66, - 0x6C, 0x66, 0x66, 0x69, 0x66, 0x66, 0x6C, 0x73, - 0x74, 0x73, 0x74, 0xD5, 0xB4, 0xD5, 0xB6, 0xD5, - 0xB4, 0xD5, 0xA5, 0xD5, 0xB4, 0xD5, 0xAB, 0xD5, - 0xBE, 0xD5, 0xB6, 0xD5, 0xB4, 0xD5, 0xAD, 0xF6, - 0xD7, 0x99, 0xD6, 0xB4, 0xF6, 0xD7, 0xB2, 0xD6, - 0xB7, 0xD7, 0xA2, 0xD7, 0x90, 0xD7, 0x93, 0xD7, - 0x94, 0xD7, 0x9B, 0xD7, 0x9C, 0xD7, 0x9D, 0xD7, - 0xA8, 0xD7, 0xAA, 0x2B, 0xF6, 0xD7, 0xA9, 0xD7, - 0x81, 0xF6, 0xD7, 0xA9, 0xD7, 0x82, 0xF6, 0xD7, - 0xA9, 0xD6, 0xBC, 0xD7, 0x81, 0xF6, 0xD7, 0xA9, - 0xD6, 0xBC, 0xD7, 0x82, 0xF6, 0xD7, 0x90, 0xD6, - 0xB7, 0xF6, 0xD7, 0x90, 0xD6, 0xB8, 0xF6, 0xD7, - 0x90, 0xD6, 0xBC, 0xF6, 0xD7, 0x91, 0xD6, 0xBC, - 0xF6, 0xD7, 0x92, 0xD6, 0xBC, 0xF6, 0xD7, 0x93, - 0xD6, 0xBC, 0xF6, 0xD7, 0x94, 0xD6, 0xBC, 0xF6, - 0xD7, 0x95, 0xD6, 0xBC, 0xF6, 0xD7, 0x96, 0xD6, - 0xBC, 0xF6, 0xD7, 0x98, 0xD6, 0xBC, 0xF6, 0xD7, - 0x99, 0xD6, 0xBC, 0xF6, 0xD7, 0x9A, 0xD6, 0xBC, - 0xF6, 0xD7, 0x9B, 0xD6, 0xBC, 0xF6, 0xD7, 0x9C, - 0xD6, 0xBC, 0xF6, 0xD7, 0x9E, 0xD6, 0xBC, 0xF6, - 0xD7, 0xA0, 0xD6, 0xBC, 0xF6, 0xD7, 0xA1, 0xD6, - 0xBC, 0xF6, 0xD7, 0xA3, 0xD6, 0xBC, 0xF6, 0xD7, - 0xA4, 0xD6, 0xBC, 0xF6, 0xD7, 0xA6, 0xD6, 0xBC, - 0xF6, 0xD7, 0xA7, 0xD6, 0xBC, 0xF6, 0xD7, 0xA8, - 0xD6, 0xBC, 0xF6, 0xD7, 0xA9, 0xD6, 0xBC, 0xF6, - 0xD7, 0xAA, 0xD6, 0xBC, 0xF6, 0xD7, 0x95, 0xD6, - 0xB9, 0xF6, 0xD7, 0x91, 0xD6, 0xBF, 0xF6, 0xD7, - 0x9B, 0xD6, 0xBF, 0xF6, 0xD7, 0xA4, 0xD6, 0xBF, - 0xD7, 0x90, 0xD7, 0x9C, 0xD9, 0xB1, 0xD9, 0xB1, - 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, 0xBB, - 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, 0xBE, - 0xDA, 0x80, 0xDA, 0x80, 0xDA, 0x80, 0xDA, 0x80, - 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, 0xBA, - 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, 0xBF, - 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, 0xB9, - 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, 0xA4, - 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, 0xA6, - 0xDA, 0x84, 0xDA, 0x84, 0xDA, 0x84, 0xDA, 0x84, - 0xDA, 0x83, 0xDA, 0x83, 0xDA, 0x83, 0xDA, 0x83, - 0xDA, 0x86, 0xDA, 0x86, 0xDA, 0x86, 0xDA, 0x86, - 0xDA, 0x87, 0xDA, 0x87, 0xDA, 0x87, 0xDA, 0x87, - 0xDA, 0x8D, 0xDA, 0x8D, 0xDA, 0x8C, 0xDA, 0x8C, - 0xDA, 0x8E, 0xDA, 0x8E, 0xDA, 0x88, 0xDA, 0x88, - 0xDA, 0x98, 0xDA, 0x98, 0xDA, 0x91, 0xDA, 0x91, - 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, 0xA9, - 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, 0xAF, - 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, 0xB3, - 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, 0xB1, - 0xDA, 0xBA, 0xDA, 0xBA, 0xDA, 0xBB, 0xDA, 0xBB, - 0xDA, 0xBB, 0xDA, 0xBB, 0xDB, 0x95, 0xD9, 0x94, - 0xDB, 0x95, 0xD9, 0x94, 0xDB, 0x81, 0xDB, 0x81, - 0xDB, 0x81, 0xDB, 0x81, 0xDA, 0xBE, 0xDA, 0xBE, - 0xDA, 0xBE, 0xDA, 0xBE, 0xDB, 0x92, 0xDB, 0x92, - 0xDB, 0x92, 0xD9, 0x94, 0xDB, 0x92, 0xD9, 0x94, - 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, 0xAD, - 0xDB, 0x87, 0xDB, 0x87, 0xDB, 0x86, 0xDB, 0x86, - 0xDB, 0x88, 0xDB, 0x88, 0xDB, 0x87, 0xD9, 0xB4, - 0xDB, 0x8B, 0xDB, 0x8B, 0xDB, 0x85, 0xDB, 0x85, - 0xDB, 0x89, 0xDB, 0x89, 0xDB, 0x90, 0xDB, 0x90, - 0xDB, 0x90, 0xDB, 0x90, 0xD9, 0x89, 0xD9, 0x89, - 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x8A, - 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x8A, 0xD9, 0x94, - 0xDB, 0x95, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x95, - 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x8A, 0xD9, 0x94, - 0xDB, 0x87, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x87, - 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x86, 0xD9, 0x8A, - 0xD9, 0x94, 0xDB, 0x86, 0xD9, 0x8A, 0xD9, 0x94, - 0xDB, 0x88, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x88, - 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x90, 0xD9, 0x8A, - 0xD9, 0x94, 0xDB, 0x90, 0xD9, 0x8A, 0xD9, 0x94, - 0xDB, 0x90, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, - 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x89, 0xDB, 0x8C, 0xDB, 0x8C, - 0xDB, 0x8C, 0xDB, 0x8C, 0xD9, 0x8A, 0xD9, 0x94, - 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAD, - 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x89, 0xD9, 0x8A, 0xD9, 0x94, - 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, 0xA8, - 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, 0xA8, - 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x89, 0xD8, 0xA8, - 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD8, 0xAA, - 0xD8, 0xAD, 0xD8, 0xAA, 0xD8, 0xAE, 0xD8, 0xAA, - 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x89, 0xD8, 0xAA, - 0xD9, 0x8A, 0xD8, 0xAB, 0xD8, 0xAC, 0xD8, 0xAB, - 0xD9, 0x85, 0xD8, 0xAB, 0xD9, 0x89, 0xD8, 0xAB, - 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, - 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, 0xAD, - 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD8, 0xAE, - 0xD8, 0xAD, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB3, - 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, - 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xB5, - 0xD8, 0xAD, 0xD8, 0xB5, 0xD9, 0x85, 0xD8, 0xB6, - 0xD8, 0xAC, 0xD8, 0xB6, 0xD8, 0xAD, 0xD8, 0xB6, - 0xD8, 0xAE, 0xD8, 0xB6, 0xD9, 0x85, 0xD8, 0xB7, - 0xD8, 0xAD, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xB8, - 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, 0xB9, - 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, 0xBA, - 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, 0x81, - 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, 0x81, - 0xD9, 0x85, 0xD9, 0x81, 0xD9, 0x89, 0xD9, 0x81, - 0xD9, 0x8A, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, 0x82, - 0xD9, 0x85, 0xD9, 0x82, 0xD9, 0x89, 0xD9, 0x82, - 0xD9, 0x8A, 0xD9, 0x83, 0xD8, 0xA7, 0xD9, 0x83, - 0xD8, 0xAC, 0xD9, 0x83, 0xD8, 0xAD, 0xD9, 0x83, - 0xD8, 0xAE, 0xD9, 0x83, 0xD9, 0x84, 0xD9, 0x83, - 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x89, 0xD9, 0x83, - 0xD9, 0x8A, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x84, - 0xD8, 0xAD, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x84, - 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x89, 0xD9, 0x84, - 0xD9, 0x8A, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x85, - 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, 0x85, - 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x89, 0xD9, 0x85, - 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x86, - 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, 0x86, - 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x89, 0xD9, 0x86, - 0xD9, 0x8A, 0xD9, 0x87, 0xD8, 0xAC, 0xD9, 0x87, - 0xD9, 0x85, 0xD9, 0x87, 0xD9, 0x89, 0xD9, 0x87, - 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, 0x8A, - 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x89, 0xD9, 0x8A, - 0xD9, 0x8A, 0xD8, 0xB0, 0xD9, 0xB0, 0xD8, 0xB1, - 0xD9, 0xB0, 0xD9, 0x89, 0xD9, 0xB0, 0x20, 0xD9, - 0x8C, 0xD9, 0x91, 0x20, 0xD9, 0x8D, 0xD9, 0x91, - 0x20, 0xD9, 0x8E, 0xD9, 0x91, 0x20, 0xD9, 0x8F, - 0xD9, 0x91, 0x20, 0xD9, 0x90, 0xD9, 0x91, 0x20, - 0xD9, 0x91, 0xD9, 0xB0, 0xD9, 0x8A, 0xD9, 0x94, - 0xD8, 0xB1, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xB2, - 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, 0x94, - 0xD9, 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x8A, - 0xD8, 0xA8, 0xD8, 0xB1, 0xD8, 0xA8, 0xD8, 0xB2, - 0xD8, 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x86, - 0xD8, 0xA8, 0xD9, 0x89, 0xD8, 0xA8, 0xD9, 0x8A, - 0xD8, 0xAA, 0xD8, 0xB1, 0xD8, 0xAA, 0xD8, 0xB2, - 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x86, - 0xD8, 0xAA, 0xD9, 0x89, 0xD8, 0xAA, 0xD9, 0x8A, - 0xD8, 0xAB, 0xD8, 0xB1, 0xD8, 0xAB, 0xD8, 0xB2, - 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAB, 0xD9, 0x86, - 0xD8, 0xAB, 0xD9, 0x89, 0xD8, 0xAB, 0xD9, 0x8A, - 0xD9, 0x81, 0xD9, 0x89, 0xD9, 0x81, 0xD9, 0x8A, - 0xD9, 0x82, 0xD9, 0x89, 0xD9, 0x82, 0xD9, 0x8A, - 0xD9, 0x83, 0xD8, 0xA7, 0xD9, 0x83, 0xD9, 0x84, - 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x89, - 0xD9, 0x83, 0xD9, 0x8A, 0xD9, 0x84, 0xD9, 0x85, - 0xD9, 0x84, 0xD9, 0x89, 0xD9, 0x84, 0xD9, 0x8A, - 0xD9, 0x85, 0xD8, 0xA7, 0xD9, 0x85, 0xD9, 0x85, - 0xD9, 0x86, 0xD8, 0xB1, 0xD9, 0x86, 0xD8, 0xB2, - 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x86, - 0xD9, 0x86, 0xD9, 0x89, 0xD9, 0x86, 0xD9, 0x8A, - 0xD9, 0x89, 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, 0xB1, - 0xD9, 0x8A, 0xD8, 0xB2, 0xD9, 0x8A, 0xD9, 0x85, - 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, 0x89, - 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x94, - 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAD, - 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAE, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x94, - 0xD9, 0x87, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, 0xA8, - 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, 0xA8, - 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x87, 0xD8, 0xAA, - 0xD8, 0xAC, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAA, - 0xD8, 0xAE, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, - 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAC, - 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, 0xAD, - 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, - 0xD8, 0xAC, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB3, - 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, - 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xB5, - 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAE, 0xD8, 0xB5, - 0xD9, 0x85, 0xD8, 0xB6, 0xD8, 0xAC, 0xD8, 0xB6, - 0xD8, 0xAD, 0xD8, 0xB6, 0xD8, 0xAE, 0xD8, 0xB6, - 0xD9, 0x85, 0xD8, 0xB7, 0xD8, 0xAD, 0xD8, 0xB8, - 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, 0xB9, - 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, 0xBA, - 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, 0x81, - 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, 0x81, - 0xD9, 0x85, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, 0x82, - 0xD9, 0x85, 0xD9, 0x83, 0xD8, 0xAC, 0xD9, 0x83, - 0xD8, 0xAD, 0xD9, 0x83, 0xD8, 0xAE, 0xD9, 0x83, - 0xD9, 0x84, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x84, - 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x84, - 0xD8, 0xAE, 0xD9, 0x84, 0xD9, 0x85, 0xD9, 0x84, - 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x85, - 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, 0x85, - 0xD9, 0x85, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x86, - 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, 0x86, - 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, 0x87, - 0xD8, 0xAC, 0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x87, - 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, 0x8A, - 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x94, - 0xD9, 0x87, 0xD8, 0xA8, 0xD9, 0x85, 0xD8, 0xA8, - 0xD9, 0x87, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, - 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAB, - 0xD9, 0x87, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xB3, - 0xD9, 0x87, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xB4, - 0xD9, 0x87, 0xD9, 0x83, 0xD9, 0x84, 0xD9, 0x83, - 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x85, 0xD9, 0x86, - 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, 0x8A, - 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x80, - 0xD9, 0x8E, 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x8F, - 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x90, 0xD9, 0x91, - 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, 0x8A, - 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, 0x8A, - 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x8A, - 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, 0x8A, - 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, 0x8A, - 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, 0x8A, - 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, 0x8A, - 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x8A, - 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, 0x8A, - 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, - 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, - 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, 0xB1, - 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, 0xB1, - 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, 0x8A, - 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, 0x8A, - 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x8A, - 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, 0x8A, - 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, 0x8A, - 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, 0x8A, - 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, 0x8A, - 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x8A, - 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, 0x8A, - 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, - 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, - 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, 0xB1, - 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, 0xB1, - 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, - 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, - 0xD8, 0xB3, 0xD9, 0x87, 0xD8, 0xB4, 0xD9, 0x87, - 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, 0xAC, - 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, 0xD8, 0xAE, - 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, 0xAD, - 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB7, 0xD9, 0x85, - 0xD8, 0xB8, 0xD9, 0x85, 0xD8, 0xA7, 0xD9, 0x8B, - 0xD8, 0xA7, 0xD9, 0x8B, 0xD8, 0xAA, 0xD8, 0xAC, - 0xD9, 0x85, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAC, - 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, 0xAA, - 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAA, 0xD8, 0xAE, - 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAC, - 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAA, - 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, 0x85, - 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, 0xAD, - 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xAD, - 0xD9, 0x85, 0xD9, 0x89, 0xD8, 0xB3, 0xD8, 0xAD, - 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAC, 0xD8, 0xAD, - 0xD8, 0xB3, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xB3, - 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, 0x85, - 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xAC, - 0xD8, 0xB3, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB3, - 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB5, 0xD8, 0xAD, - 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAD, 0xD8, 0xAD, - 0xD8, 0xB5, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB4, - 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB4, 0xD8, 0xAD, - 0xD9, 0x85, 0xD8, 0xB4, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xB4, - 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, 0x85, - 0xD9, 0x85, 0xD8, 0xB4, 0xD9, 0x85, 0xD9, 0x85, - 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xB6, - 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB6, 0xD8, 0xAE, - 0xD9, 0x85, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, - 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xB7, - 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB7, 0xD9, 0x85, - 0xD9, 0x8A, 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, 0x85, - 0xD8, 0xB9, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB9, - 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, 0x85, - 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x85, - 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xBA, - 0xD9, 0x85, 0xD9, 0x89, 0xD9, 0x81, 0xD8, 0xAE, - 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, 0x85, - 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x82, - 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x84, 0xD8, 0xAD, - 0xD9, 0x85, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x8A, - 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x89, 0xD9, 0x84, - 0xD8, 0xAC, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAC, - 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, - 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, 0xD9, 0x84, - 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x84, 0xD9, 0x85, - 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, - 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x85, - 0xD8, 0xAD, 0xD9, 0x8A, 0xD9, 0x85, 0xD8, 0xAC, - 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x85, - 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, 0x85, - 0xD8, 0xAE, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xAC, - 0xD8, 0xAE, 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, - 0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x86, - 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x86, 0xD8, 0xAD, - 0xD9, 0x89, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, - 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x86, - 0xD8, 0xAC, 0xD9, 0x89, 0xD9, 0x86, 0xD9, 0x85, - 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x89, - 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x8A, - 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xA8, 0xD8, 0xAE, - 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAA, - 0xD8, 0xAE, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAE, - 0xD9, 0x89, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x8A, - 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x89, 0xD8, 0xAC, - 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, 0xAD, - 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x89, - 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xB5, - 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xB4, 0xD8, 0xAD, - 0xD9, 0x8A, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x8A, - 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x84, - 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAD, - 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x85, - 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x82, 0xD9, 0x85, - 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAD, 0xD9, 0x8A, - 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x84, - 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, 0x85, - 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x8A, - 0xD9, 0x86, 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, 0x85, - 0xD8, 0xAE, 0xD9, 0x8A, 0xD9, 0x84, 0xD8, 0xAC, - 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x85, - 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x86, - 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, 0xAD, - 0xD9, 0x8A, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x81, - 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, 0xAD, - 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x85, - 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, 0xB5, - 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, 0xAE, - 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x8A, - 0xD8, 0xB5, 0xD9, 0x84, 0xDB, 0x92, 0xD9, 0x82, - 0xD9, 0x84, 0xDB, 0x92, 0xD8, 0xA7, 0xD9, 0x84, - 0xD9, 0x84, 0xD9, 0x87, 0xD8, 0xA7, 0xD9, 0x83, - 0xD8, 0xA8, 0xD8, 0xB1, 0xD9, 0x85, 0xD8, 0xAD, - 0xD9, 0x85, 0xD8, 0xAF, 0xD8, 0xB5, 0xD9, 0x84, - 0xD8, 0xB9, 0xD9, 0x85, 0xD8, 0xB1, 0xD8, 0xB3, - 0xD9, 0x88, 0xD9, 0x84, 0xD8, 0xB9, 0xD9, 0x84, - 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x88, 0xD8, 0xB3, - 0xD9, 0x84, 0xD9, 0x85, 0xD8, 0xB5, 0xD9, 0x84, - 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x84, 0xD9, 0x89, - 0x20, 0xD8, 0xA7, 0xD9, 0x84, 0xD9, 0x84, 0xD9, - 0x87, 0x20, 0xD8, 0xB9, 0xD9, 0x84, 0xD9, 0x8A, - 0xD9, 0x87, 0x20, 0xD9, 0x88, 0xD8, 0xB3, 0xD9, - 0x84, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x84, 0x20, - 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x84, - 0xD9, 0x87, 0xD8, 0xB1, 0xDB, 0x8C, 0xD8, 0xA7, - 0xD9, 0x84, 0x2E, 0x2E, 0xE2, 0x80, 0x94, 0xE2, - 0x80, 0x93, 0x5F, 0x5F, 0x28, 0x29, 0x7B, 0x7D, - 0xE3, 0x80, 0x94, 0xE3, 0x80, 0x95, 0xE3, 0x80, - 0x90, 0xE3, 0x80, 0x91, 0xE3, 0x80, 0x8A, 0xE3, - 0x80, 0x8B, 0xE3, 0x80, 0x88, 0xE3, 0x80, 0x89, - 0xE3, 0x80, 0x8C, 0xE3, 0x80, 0x8D, 0xE3, 0x80, - 0x8E, 0xE3, 0x80, 0x8F, 0x20, 0xCC, 0x85, 0x20, - 0xCC, 0x85, 0x20, 0xCC, 0x85, 0x20, 0xCC, 0x85, - 0x5F, 0x5F, 0x5F, 0x2C, 0xE3, 0x80, 0x81, 0x2E, - 0x3B, 0x3A, 0x3F, 0x21, 0xE2, 0x80, 0x94, 0x28, - 0x29, 0x7B, 0x7D, 0xE3, 0x80, 0x94, 0xE3, 0x80, - 0x95, 0x23, 0x26, 0x2A, 0x2B, 0x2D, 0x3C, 0x3E, - 0x3D, 0x5C, 0x24, 0x25, 0x40, 0x20, 0xD9, 0x8B, - 0xD9, 0x80, 0xD9, 0x8B, 0x20, 0xD9, 0x8C, 0x20, - 0xD9, 0x8D, 0x20, 0xD9, 0x8E, 0xD9, 0x80, 0xD9, - 0x8E, 0x20, 0xD9, 0x8F, 0xD9, 0x80, 0xD9, 0x8F, - 0x20, 0xD9, 0x90, 0xD9, 0x80, 0xD9, 0x90, 0x20, - 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x91, 0x20, 0xD9, - 0x92, 0xD9, 0x80, 0xD9, 0x92, 0xD8, 0xA1, 0xD8, - 0xA7, 0xD9, 0x93, 0xD8, 0xA7, 0xD9, 0x93, 0xD8, - 0xA7, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, - 0x88, 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x94, 0xD8, - 0xA7, 0xD9, 0x95, 0xD8, 0xA7, 0xD9, 0x95, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, - 0xA7, 0xD8, 0xA7, 0xD8, 0xA8, 0xD8, 0xA8, 0xD8, - 0xA8, 0xD8, 0xA8, 0xD8, 0xA9, 0xD8, 0xA9, 0xD8, - 0xAA, 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, - 0xAB, 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, - 0xAC, 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, - 0xAD, 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, - 0xAE, 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, - 0xAF, 0xD8, 0xAF, 0xD8, 0xB0, 0xD8, 0xB0, 0xD8, - 0xB1, 0xD8, 0xB1, 0xD8, 0xB2, 0xD8, 0xB2, 0xD8, - 0xB3, 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, - 0xB4, 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, - 0xB5, 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, - 0xB6, 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, - 0xB7, 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, - 0xB8, 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, - 0xB9, 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, - 0xBA, 0xD8, 0xBA, 0xD8, 0xBA, 0xD8, 0xBA, 0xD9, - 0x81, 0xD9, 0x81, 0xD9, 0x81, 0xD9, 0x81, 0xD9, - 0x82, 0xD9, 0x82, 0xD9, 0x82, 0xD9, 0x82, 0xD9, - 0x83, 0xD9, 0x83, 0xD9, 0x83, 0xD9, 0x83, 0xD9, - 0x84, 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x84, 0xD9, - 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, - 0x86, 0xD9, 0x86, 0xD9, 0x86, 0xD9, 0x86, 0xD9, - 0x87, 0xD9, 0x87, 0xD9, 0x87, 0xD9, 0x87, 0xD9, - 0x88, 0xD9, 0x88, 0xD9, 0x89, 0xD9, 0x89, 0xD9, - 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, - 0x84, 0xD8, 0xA7, 0xD9, 0x93, 0xD9, 0x84, 0xD8, - 0xA7, 0xD9, 0x93, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, - 0x94, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, - 0x84, 0xD8, 0xA7, 0xD9, 0x95, 0xD9, 0x84, 0xD8, - 0xA7, 0xD9, 0x95, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, - 0x84, 0xD8, 0xA7, 0x21, 0x22, 0x23, 0x24, 0x25, - 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, - 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, - 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, - 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, - 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, - 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, - 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, - 0x5E, 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, - 0x7E, 0xE2, 0xA6, 0x85, 0xE2, 0xA6, 0x86, 0xE3, - 0x80, 0x82, 0xE3, 0x80, 0x8C, 0xE3, 0x80, 0x8D, - 0xE3, 0x80, 0x81, 0xE3, 0x83, 0xBB, 0xE3, 0x83, - 0xB2, 0xE3, 0x82, 0xA1, 0xE3, 0x82, 0xA3, 0xE3, - 0x82, 0xA5, 0xE3, 0x82, 0xA7, 0xE3, 0x82, 0xA9, - 0xE3, 0x83, 0xA3, 0xE3, 0x83, 0xA5, 0xE3, 0x83, - 0xA7, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0xBC, 0xE3, - 0x82, 0xA2, 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xA6, - 0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xAA, 0xE3, 0x82, - 0xAB, 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, - 0x82, 0xB1, 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0xB5, - 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0xB9, 0xE3, 0x82, - 0xBB, 0xE3, 0x82, 0xBD, 0xE3, 0x82, 0xBF, 0xE3, - 0x83, 0x81, 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x86, - 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x8A, 0xE3, 0x83, - 0x8B, 0xE3, 0x83, 0x8C, 0xE3, 0x83, 0x8D, 0xE3, - 0x83, 0x8E, 0xE3, 0x83, 0x8F, 0xE3, 0x83, 0x92, - 0xE3, 0x83, 0x95, 0xE3, 0x83, 0x98, 0xE3, 0x83, - 0x9B, 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0x9F, 0xE3, - 0x83, 0xA0, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xA2, - 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xA6, 0xE3, 0x83, - 0xA8, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xAA, 0xE3, - 0x83, 0xAB, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xAD, - 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0xB3, 0xE3, 0x82, - 0x99, 0xE3, 0x82, 0x9A, 0xE1, 0x85, 0xA0, 0xE1, - 0x84, 0x80, 0xE1, 0x84, 0x81, 0xE1, 0x86, 0xAA, - 0xE1, 0x84, 0x82, 0xE1, 0x86, 0xAC, 0xE1, 0x86, - 0xAD, 0xE1, 0x84, 0x83, 0xE1, 0x84, 0x84, 0xE1, - 0x84, 0x85, 0xE1, 0x86, 0xB0, 0xE1, 0x86, 0xB1, - 0xE1, 0x86, 0xB2, 0xE1, 0x86, 0xB3, 0xE1, 0x86, - 0xB4, 0xE1, 0x86, 0xB5, 0xE1, 0x84, 0x9A, 0xE1, - 0x84, 0x86, 0xE1, 0x84, 0x87, 0xE1, 0x84, 0x88, - 0xE1, 0x84, 0xA1, 0xE1, 0x84, 0x89, 0xE1, 0x84, - 0x8A, 0xE1, 0x84, 0x8B, 0xE1, 0x84, 0x8C, 0xE1, - 0x84, 0x8D, 0xE1, 0x84, 0x8E, 0xE1, 0x84, 0x8F, - 0xE1, 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, 0x84, - 0x92, 0xE1, 0x85, 0xA1, 0xE1, 0x85, 0xA2, 0xE1, - 0x85, 0xA3, 0xE1, 0x85, 0xA4, 0xE1, 0x85, 0xA5, - 0xE1, 0x85, 0xA6, 0xE1, 0x85, 0xA7, 0xE1, 0x85, - 0xA8, 0xE1, 0x85, 0xA9, 0xE1, 0x85, 0xAA, 0xE1, - 0x85, 0xAB, 0xE1, 0x85, 0xAC, 0xE1, 0x85, 0xAD, - 0xE1, 0x85, 0xAE, 0xE1, 0x85, 0xAF, 0xE1, 0x85, - 0xB0, 0xE1, 0x85, 0xB1, 0xE1, 0x85, 0xB2, 0xE1, - 0x85, 0xB3, 0xE1, 0x85, 0xB4, 0xE1, 0x85, 0xB5, - 0xC2, 0xA2, 0xC2, 0xA3, 0xC2, 0xAC, 0x20, 0xCC, - 0x84, 0xC2, 0xA6, 0xC2, 0xA5, 0xE2, 0x82, 0xA9, - 0xE2, 0x94, 0x82, 0xE2, 0x86, 0x90, 0xE2, 0x86, - 0x91, 0xE2, 0x86, 0x92, 0xE2, 0x86, 0x93, 0xE2, - 0x96, 0xA0, 0xE2, 0x97, 0x8B, 0xF6, 0xF0, 0x9D, - 0x85, 0x97, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, 0xF0, - 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, - 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, - 0xF0, 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x85, - 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, - 0xAF, 0xF6, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, - 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB0, 0xF6, 0xF0, - 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, - 0x9D, 0x85, 0xB1, 0xF6, 0xF0, 0x9D, 0x85, 0x98, - 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB2, - 0xF6, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, 0x85, - 0xA5, 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, - 0x85, 0xA5, 0xF6, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, - 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE, 0xF6, - 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, - 0xF0, 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x86, - 0xB9, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, - 0xAF, 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, - 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, 0x41, 0x42, - 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, - 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, - 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, - 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, - 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, - 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, - 0x65, 0x66, 0x67, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x43, 0x44, 0x47, 0x4A, 0x4B, 0x4E, - 0x4F, 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x66, - 0x68, 0x69, 0x6A, 0x6B, 0x6D, 0x6E, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, - 0x45, 0x46, 0x47, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, - 0x4F, 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, - 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, - 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, - 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, 0x45, - 0x46, 0x47, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4F, - 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, - 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, - 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, - 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, - 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, - 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, - 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, - 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, - 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, - 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, - 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, - 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, - 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, - 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, - 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, - 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, - 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, - 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, - 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, - 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, - 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, - 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, - 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, - 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, - 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, - 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, - 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, - 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, - 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, - 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, - 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, - 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, - 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, - 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, - 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, - 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, - 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, - 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, - 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, - 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, - 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, - 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, - 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, - 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, - 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, - 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, - 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, - 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, - 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, - 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, - 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, - 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, - 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, - 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, - 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, - 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, - 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, - 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, - 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, - 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, - 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, - 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, - 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, - 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, - 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, - 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, - 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, - 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, - 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, - 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, - 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, - 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, - 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, - 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, 0x80, 0x30, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, - 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, - 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0xF6, 0xE4, 0xB8, 0xBD, 0xF6, 0xE4, 0xB8, - 0xB8, 0xF6, 0xE4, 0xB9, 0x81, 0xF6, 0xF0, 0xA0, - 0x84, 0xA2, 0xF6, 0xE4, 0xBD, 0xA0, 0xF6, 0xE4, - 0xBE, 0xAE, 0xF6, 0xE4, 0xBE, 0xBB, 0xF6, 0xE5, - 0x80, 0x82, 0xF6, 0xE5, 0x81, 0xBA, 0xF6, 0xE5, - 0x82, 0x99, 0xF6, 0xE5, 0x83, 0xA7, 0xF6, 0xE5, - 0x83, 0x8F, 0xF6, 0xE3, 0x92, 0x9E, 0xF6, 0xF0, - 0xA0, 0x98, 0xBA, 0xF6, 0xE5, 0x85, 0x8D, 0xF6, - 0xE5, 0x85, 0x94, 0xF6, 0xE5, 0x85, 0xA4, 0xF6, - 0xE5, 0x85, 0xB7, 0xF6, 0xF0, 0xA0, 0x94, 0x9C, - 0xF6, 0xE3, 0x92, 0xB9, 0xF6, 0xE5, 0x85, 0xA7, - 0xF6, 0xE5, 0x86, 0x8D, 0xF6, 0xF0, 0xA0, 0x95, - 0x8B, 0xF6, 0xE5, 0x86, 0x97, 0xF6, 0xE5, 0x86, - 0xA4, 0xF6, 0xE4, 0xBB, 0x8C, 0xF6, 0xE5, 0x86, - 0xAC, 0xF6, 0xE5, 0x86, 0xB5, 0xF6, 0xF0, 0xA9, - 0x87, 0x9F, 0xF6, 0xE5, 0x87, 0xB5, 0xF6, 0xE5, - 0x88, 0x83, 0xF6, 0xE3, 0x93, 0x9F, 0xF6, 0xE5, - 0x88, 0xBB, 0xF6, 0xE5, 0x89, 0x86, 0xF6, 0xE5, - 0x89, 0xB2, 0xF6, 0xE5, 0x89, 0xB7, 0xF6, 0xE3, - 0x94, 0x95, 0xF6, 0xE5, 0x8B, 0x87, 0xF6, 0xE5, - 0x8B, 0x89, 0xF6, 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, - 0x8B, 0xBA, 0xF6, 0xE5, 0x8C, 0x85, 0xF6, 0xE5, - 0x8C, 0x86, 0xF6, 0xE5, 0x8C, 0x97, 0xF6, 0xE5, - 0x8D, 0x89, 0xF6, 0xE5, 0x8D, 0x91, 0xF6, 0xE5, - 0x8D, 0x9A, 0xF6, 0xE5, 0x8D, 0xB3, 0xF6, 0xE5, - 0x8D, 0xBD, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xE5, - 0x8D, 0xBF, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xF0, - 0xA0, 0xA8, 0xAC, 0xF6, 0xE7, 0x81, 0xB0, 0xF6, - 0xE5, 0x8F, 0x8A, 0xF6, 0xE5, 0x8F, 0x9F, 0xF6, - 0xF0, 0xA0, 0xAD, 0xA3, 0xF6, 0xE5, 0x8F, 0xAB, - 0xF6, 0xE5, 0x8F, 0xB1, 0xF6, 0xE5, 0x90, 0x86, - 0xF6, 0xE5, 0x92, 0x9E, 0xF6, 0xE5, 0x90, 0xB8, - 0xF6, 0xE5, 0x91, 0x88, 0xF6, 0xE5, 0x91, 0xA8, - 0xF6, 0xE5, 0x92, 0xA2, 0xF6, 0xE5, 0x93, 0xB6, - 0xF6, 0xE5, 0x94, 0x90, 0xF6, 0xE5, 0x95, 0x93, - 0xF6, 0xE5, 0x95, 0xA3, 0xF6, 0xE5, 0x96, 0x84, - 0xF6, 0xE5, 0x96, 0x84, 0xF6, 0xE5, 0x96, 0x99, - 0xF6, 0xE5, 0x96, 0xAB, 0xF6, 0xE5, 0x96, 0xB3, - 0xF6, 0xE5, 0x97, 0x82, 0xF6, 0xE5, 0x9C, 0x96, - 0xF6, 0xE5, 0x98, 0x86, 0xF6, 0xE5, 0x9C, 0x97, - 0xF6, 0xE5, 0x99, 0x91, 0xF6, 0xE5, 0x99, 0xB4, - 0xF6, 0xE5, 0x88, 0x87, 0xF6, 0xE5, 0xA3, 0xAE, - 0xF6, 0xE5, 0x9F, 0x8E, 0xF6, 0xE5, 0x9F, 0xB4, - 0xF6, 0xE5, 0xA0, 0x8D, 0xF6, 0xE5, 0x9E, 0x8B, - 0xF6, 0xE5, 0xA0, 0xB2, 0xF6, 0xE5, 0xA0, 0xB1, - 0xF6, 0xE5, 0xA2, 0xAC, 0xF6, 0xF0, 0xA1, 0x93, - 0xA4, 0xF6, 0xE5, 0xA3, 0xB2, 0xF6, 0xE5, 0xA3, - 0xB7, 0xF6, 0xE5, 0xA4, 0x86, 0xF6, 0xE5, 0xA4, - 0x9A, 0xF6, 0xE5, 0xA4, 0xA2, 0xF6, 0xE5, 0xA5, - 0xA2, 0xF6, 0xF0, 0xA1, 0x9A, 0xA8, 0xF6, 0xF0, - 0xA1, 0x9B, 0xAA, 0xF6, 0xE5, 0xA7, 0xAC, 0xF6, - 0xE5, 0xA8, 0x9B, 0xF6, 0xE5, 0xA8, 0xA7, 0xF6, - 0xE5, 0xA7, 0x98, 0xF6, 0xE5, 0xA9, 0xA6, 0xF6, - 0xE3, 0x9B, 0xAE, 0xF6, 0xE3, 0x9B, 0xBC, 0xF6, - 0xE5, 0xAC, 0x88, 0xF6, 0xE5, 0xAC, 0xBE, 0xF6, - 0xE5, 0xAC, 0xBE, 0xF6, 0xF0, 0xA1, 0xA7, 0x88, - 0xF6, 0xE5, 0xAF, 0x83, 0xF6, 0xE5, 0xAF, 0x98, - 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, 0xAF, 0xB3, - 0xF6, 0xF0, 0xA1, 0xAC, 0x98, 0xF6, 0xE5, 0xAF, - 0xBF, 0xF6, 0xE5, 0xB0, 0x86, 0xF6, 0xE5, 0xBD, - 0x93, 0xF6, 0xE5, 0xB0, 0xA2, 0xF6, 0xE3, 0x9E, - 0x81, 0xF6, 0xE5, 0xB1, 0xA0, 0xF6, 0xE5, 0xB1, - 0xAE, 0xF6, 0xE5, 0xB3, 0x80, 0xF6, 0xE5, 0xB2, - 0x8D, 0xF6, 0xF0, 0xA1, 0xB7, 0xA4, 0xF6, 0xE5, - 0xB5, 0x83, 0xF6, 0xF0, 0xA1, 0xB7, 0xA6, 0xF6, - 0xE5, 0xB5, 0xAE, 0xF6, 0xE5, 0xB5, 0xAB, 0xF6, - 0xE5, 0xB5, 0xBC, 0xF6, 0xE5, 0xB7, 0xA1, 0xF6, - 0xE5, 0xB7, 0xA2, 0xF6, 0xE3, 0xA0, 0xAF, 0xF6, - 0xE5, 0xB7, 0xBD, 0xF6, 0xE5, 0xB8, 0xA8, 0xF6, - 0xE5, 0xB8, 0xBD, 0xF6, 0xE5, 0xB9, 0xA9, 0xF6, - 0xE3, 0xA1, 0xA2, 0xF6, 0xF0, 0xA2, 0x86, 0x83, - 0xF6, 0xE3, 0xA1, 0xBC, 0xF6, 0xE5, 0xBA, 0xB0, - 0xF6, 0xE5, 0xBA, 0xB3, 0xF6, 0xE5, 0xBA, 0xB6, - 0xF6, 0xE5, 0xBB, 0x8A, 0xF6, 0xF0, 0xAA, 0x8E, - 0x92, 0xF6, 0xE5, 0xBB, 0xBE, 0xF6, 0xF0, 0xA2, - 0x8C, 0xB1, 0xF6, 0xF0, 0xA2, 0x8C, 0xB1, 0xF6, - 0xE8, 0x88, 0x81, 0xF6, 0xE5, 0xBC, 0xA2, 0xF6, - 0xE5, 0xBC, 0xA2, 0xF6, 0xE3, 0xA3, 0x87, 0xF6, - 0xF0, 0xA3, 0x8A, 0xB8, 0xF6, 0xF0, 0xA6, 0x87, - 0x9A, 0xF6, 0xE5, 0xBD, 0xA2, 0xF6, 0xE5, 0xBD, - 0xAB, 0xF6, 0xE3, 0xA3, 0xA3, 0xF6, 0xE5, 0xBE, - 0x9A, 0xF6, 0xE5, 0xBF, 0x8D, 0xF6, 0xE5, 0xBF, - 0x97, 0xF6, 0xE5, 0xBF, 0xB9, 0xF6, 0xE6, 0x82, - 0x81, 0xF6, 0xE3, 0xA4, 0xBA, 0xF6, 0xE3, 0xA4, - 0x9C, 0xF6, 0xE6, 0x82, 0x94, 0xF6, 0xF0, 0xA2, - 0x9B, 0x94, 0xF6, 0xE6, 0x83, 0x87, 0xF6, 0xE6, - 0x85, 0x88, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, - 0x85, 0x8E, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, - 0x85, 0xBA, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, 0xE6, - 0x86, 0xB2, 0xF6, 0xE6, 0x86, 0xA4, 0xF6, 0xE6, - 0x86, 0xAF, 0xF6, 0xE6, 0x87, 0x9E, 0xF6, 0xE6, - 0x87, 0xB2, 0xF6, 0xE6, 0x87, 0xB6, 0xF6, 0xE6, - 0x88, 0x90, 0xF6, 0xE6, 0x88, 0x9B, 0xF6, 0xE6, - 0x89, 0x9D, 0xF6, 0xE6, 0x8A, 0xB1, 0xF6, 0xE6, - 0x8B, 0x94, 0xF6, 0xE6, 0x8D, 0x90, 0xF6, 0xF0, - 0xA2, 0xAC, 0x8C, 0xF6, 0xE6, 0x8C, 0xBD, 0xF6, - 0xE6, 0x8B, 0xBC, 0xF6, 0xE6, 0x8D, 0xA8, 0xF6, - 0xE6, 0x8E, 0x83, 0xF6, 0xE6, 0x8F, 0xA4, 0xF6, - 0xF0, 0xA2, 0xAF, 0xB1, 0xF6, 0xE6, 0x90, 0xA2, - 0xF6, 0xE6, 0x8F, 0x85, 0xF6, 0xE6, 0x8E, 0xA9, - 0xF6, 0xE3, 0xA8, 0xAE, 0xF6, 0xE6, 0x91, 0xA9, - 0xF6, 0xE6, 0x91, 0xBE, 0xF6, 0xE6, 0x92, 0x9D, - 0xF6, 0xE6, 0x91, 0xB7, 0xF6, 0xE3, 0xA9, 0xAC, - 0xF6, 0xE6, 0x95, 0x8F, 0xF6, 0xE6, 0x95, 0xAC, - 0xF6, 0xF0, 0xA3, 0x80, 0x8A, 0xF6, 0xE6, 0x97, - 0xA3, 0xF6, 0xE6, 0x9B, 0xB8, 0xF6, 0xE6, 0x99, - 0x89, 0xF6, 0xE3, 0xAC, 0x99, 0xF6, 0xE6, 0x9A, - 0x91, 0xF6, 0xE3, 0xAC, 0x88, 0xF6, 0xE3, 0xAB, - 0xA4, 0xF6, 0xE5, 0x86, 0x92, 0xF6, 0xE5, 0x86, - 0x95, 0xF6, 0xE6, 0x9C, 0x80, 0xF6, 0xE6, 0x9A, - 0x9C, 0xF6, 0xE8, 0x82, 0xAD, 0xF6, 0xE4, 0x8F, - 0x99, 0xF6, 0xE6, 0x9C, 0x97, 0xF6, 0xE6, 0x9C, - 0x9B, 0xF6, 0xE6, 0x9C, 0xA1, 0xF6, 0xE6, 0x9D, - 0x9E, 0xF6, 0xE6, 0x9D, 0x93, 0xF6, 0xF0, 0xA3, - 0x8F, 0x83, 0xF6, 0xE3, 0xAD, 0x89, 0xF6, 0xE6, - 0x9F, 0xBA, 0xF6, 0xE6, 0x9E, 0x85, 0xF6, 0xE6, - 0xA1, 0x92, 0xF6, 0xE6, 0xA2, 0x85, 0xF6, 0xF0, - 0xA3, 0x91, 0xAD, 0xF6, 0xE6, 0xA2, 0x8E, 0xF6, - 0xE6, 0xA0, 0x9F, 0xF6, 0xE6, 0xA4, 0x94, 0xF6, - 0xE3, 0xAE, 0x9D, 0xF6, 0xE6, 0xA5, 0x82, 0xF6, - 0xE6, 0xA6, 0xA3, 0xF6, 0xE6, 0xA7, 0xAA, 0xF6, - 0xE6, 0xAA, 0xA8, 0xF6, 0xF0, 0xA3, 0x9A, 0xA3, - 0xF6, 0xE6, 0xAB, 0x9B, 0xF6, 0xE3, 0xB0, 0x98, - 0xF6, 0xE6, 0xAC, 0xA1, 0xF6, 0xF0, 0xA3, 0xA2, - 0xA7, 0xF6, 0xE6, 0xAD, 0x94, 0xF6, 0xE3, 0xB1, - 0x8E, 0xF6, 0xE6, 0xAD, 0xB2, 0xF6, 0xE6, 0xAE, - 0x9F, 0xF6, 0xE6, 0xAE, 0xBA, 0xF6, 0xE6, 0xAE, - 0xBB, 0xF6, 0xF0, 0xA3, 0xAA, 0x8D, 0xF6, 0xF0, - 0xA1, 0xB4, 0x8B, 0xF6, 0xF0, 0xA3, 0xAB, 0xBA, - 0xF6, 0xE6, 0xB1, 0x8E, 0xF6, 0xF0, 0xA3, 0xB2, - 0xBC, 0xF6, 0xE6, 0xB2, 0xBF, 0xF6, 0xE6, 0xB3, - 0x8D, 0xF6, 0xE6, 0xB1, 0xA7, 0xF6, 0xE6, 0xB4, - 0x96, 0xF6, 0xE6, 0xB4, 0xBE, 0xF6, 0xE6, 0xB5, - 0xB7, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, 0xB5, - 0xA9, 0xF6, 0xE6, 0xB5, 0xB8, 0xF6, 0xE6, 0xB6, - 0x85, 0xF6, 0xF0, 0xA3, 0xB4, 0x9E, 0xF6, 0xE6, - 0xB4, 0xB4, 0xF6, 0xE6, 0xB8, 0xAF, 0xF6, 0xE6, - 0xB9, 0xAE, 0xF6, 0xE3, 0xB4, 0xB3, 0xF6, 0xE6, - 0xBB, 0x8B, 0xF6, 0xE6, 0xBB, 0x87, 0xF6, 0xF0, - 0xA3, 0xBB, 0x91, 0xF6, 0xE6, 0xB7, 0xB9, 0xF6, - 0xE6, 0xBD, 0xAE, 0xF6, 0xF0, 0xA3, 0xBD, 0x9E, - 0xF6, 0xF0, 0xA3, 0xBE, 0x8E, 0xF6, 0xE6, 0xBF, - 0x86, 0xF6, 0xE7, 0x80, 0xB9, 0xF6, 0xE7, 0x80, - 0x9E, 0xF6, 0xE7, 0x80, 0x9B, 0xF6, 0xE3, 0xB6, - 0x96, 0xF6, 0xE7, 0x81, 0x8A, 0xF6, 0xE7, 0x81, - 0xBD, 0xF6, 0xE7, 0x81, 0xB7, 0xF6, 0xE7, 0x82, - 0xAD, 0xF6, 0xF0, 0xA0, 0x94, 0xA5, 0xF6, 0xE7, - 0x85, 0x85, 0xF6, 0xF0, 0xA4, 0x89, 0xA3, 0xF6, - 0xE7, 0x86, 0x9C, 0xF6, 0xF0, 0xA4, 0x8E, 0xAB, - 0xF6, 0xE7, 0x88, 0xA8, 0xF6, 0xE7, 0x88, 0xB5, - 0xF6, 0xE7, 0x89, 0x90, 0xF6, 0xF0, 0xA4, 0x98, - 0x88, 0xF6, 0xE7, 0x8A, 0x80, 0xF6, 0xE7, 0x8A, - 0x95, 0xF6, 0xF0, 0xA4, 0x9C, 0xB5, 0xF6, 0xF0, - 0xA4, 0xA0, 0x94, 0xF6, 0xE7, 0x8D, 0xBA, 0xF6, - 0xE7, 0x8E, 0x8B, 0xF6, 0xE3, 0xBA, 0xAC, 0xF6, - 0xE7, 0x8E, 0xA5, 0xF6, 0xE3, 0xBA, 0xB8, 0xF6, - 0xE3, 0xBA, 0xB8, 0xF6, 0xE7, 0x91, 0x87, 0xF6, - 0xE7, 0x91, 0x9C, 0xF6, 0xE7, 0x91, 0xB1, 0xF6, - 0xE7, 0x92, 0x85, 0xF6, 0xE7, 0x93, 0x8A, 0xF6, - 0xE3, 0xBC, 0x9B, 0xF6, 0xE7, 0x94, 0xA4, 0xF6, - 0xF0, 0xA4, 0xB0, 0xB6, 0xF6, 0xE7, 0x94, 0xBE, - 0xF6, 0xF0, 0xA4, 0xB2, 0x92, 0xF6, 0xE7, 0x95, - 0xB0, 0xF6, 0xF0, 0xA2, 0x86, 0x9F, 0xF6, 0xE7, - 0x98, 0x90, 0xF6, 0xF0, 0xA4, 0xBE, 0xA1, 0xF6, - 0xF0, 0xA4, 0xBE, 0xB8, 0xF6, 0xF0, 0xA5, 0x81, - 0x84, 0xF6, 0xE3, 0xBF, 0xBC, 0xF6, 0xE4, 0x80, - 0x88, 0xF6, 0xE7, 0x9B, 0xB4, 0xF6, 0xF0, 0xA5, - 0x83, 0xB3, 0xF6, 0xF0, 0xA5, 0x83, 0xB2, 0xF6, - 0xF0, 0xA5, 0x84, 0x99, 0xF6, 0xF0, 0xA5, 0x84, - 0xB3, 0xF6, 0xE7, 0x9C, 0x9E, 0xF6, 0xE7, 0x9C, - 0x9F, 0xF6, 0xE7, 0x9C, 0x9F, 0xF6, 0xE7, 0x9D, - 0x8A, 0xF6, 0xE4, 0x80, 0xB9, 0xF6, 0xE7, 0x9E, - 0x8B, 0xF6, 0xE4, 0x81, 0x86, 0xF6, 0xE4, 0x82, - 0x96, 0xF6, 0xF0, 0xA5, 0x90, 0x9D, 0xF6, 0xE7, - 0xA1, 0x8E, 0xF6, 0xE7, 0xA2, 0x8C, 0xF6, 0xE7, - 0xA3, 0x8C, 0xF6, 0xE4, 0x83, 0xA3, 0xF6, 0xF0, - 0xA5, 0x98, 0xA6, 0xF6, 0xE7, 0xA5, 0x96, 0xF6, - 0xF0, 0xA5, 0x9A, 0x9A, 0xF6, 0xF0, 0xA5, 0x9B, - 0x85, 0xF6, 0xE7, 0xA6, 0x8F, 0xF6, 0xE7, 0xA7, - 0xAB, 0xF6, 0xE4, 0x84, 0xAF, 0xF6, 0xE7, 0xA9, - 0x80, 0xF6, 0xE7, 0xA9, 0x8A, 0xF6, 0xE7, 0xA9, - 0x8F, 0xF6, 0xF0, 0xA5, 0xA5, 0xBC, 0xF6, 0xF0, - 0xA5, 0xAA, 0xA7, 0xF6, 0xF0, 0xA5, 0xAA, 0xA7, - 0xF6, 0xE7, 0xAB, 0xAE, 0xF6, 0xE4, 0x88, 0x82, - 0xF6, 0xF0, 0xA5, 0xAE, 0xAB, 0xF6, 0xE7, 0xAF, - 0x86, 0xF6, 0xE7, 0xAF, 0x89, 0xF6, 0xE4, 0x88, - 0xA7, 0xF6, 0xF0, 0xA5, 0xB2, 0x80, 0xF6, 0xE7, - 0xB3, 0x92, 0xF6, 0xE4, 0x8A, 0xA0, 0xF6, 0xE7, - 0xB3, 0xA8, 0xF6, 0xE7, 0xB3, 0xA3, 0xF6, 0xE7, - 0xB4, 0x80, 0xF6, 0xF0, 0xA5, 0xBE, 0x86, 0xF6, - 0xE7, 0xB5, 0xA3, 0xF6, 0xE4, 0x8C, 0x81, 0xF6, - 0xE7, 0xB7, 0x87, 0xF6, 0xE7, 0xB8, 0x82, 0xF6, - 0xE7, 0xB9, 0x85, 0xF6, 0xE4, 0x8C, 0xB4, 0xF6, - 0xF0, 0xA6, 0x88, 0xA8, 0xF6, 0xF0, 0xA6, 0x89, - 0x87, 0xF6, 0xE4, 0x8D, 0x99, 0xF6, 0xF0, 0xA6, - 0x8B, 0x99, 0xF6, 0xE7, 0xBD, 0xBA, 0xF6, 0xF0, - 0xA6, 0x8C, 0xBE, 0xF6, 0xE7, 0xBE, 0x95, 0xF6, - 0xE7, 0xBF, 0xBA, 0xF6, 0xE8, 0x80, 0x85, 0xF6, - 0xF0, 0xA6, 0x93, 0x9A, 0xF6, 0xF0, 0xA6, 0x94, - 0xA3, 0xF6, 0xE8, 0x81, 0xA0, 0xF6, 0xF0, 0xA6, - 0x96, 0xA8, 0xF6, 0xE8, 0x81, 0xB0, 0xF6, 0xF0, - 0xA3, 0x8D, 0x9F, 0xF6, 0xE4, 0x8F, 0x95, 0xF6, - 0xE8, 0x82, 0xB2, 0xF6, 0xE8, 0x84, 0x83, 0xF6, - 0xE4, 0x90, 0x8B, 0xF6, 0xE8, 0x84, 0xBE, 0xF6, - 0xE5, 0xAA, 0xB5, 0xF6, 0xF0, 0xA6, 0x9E, 0xA7, - 0xF6, 0xF0, 0xA6, 0x9E, 0xB5, 0xF6, 0xF0, 0xA3, - 0x8E, 0x93, 0xF6, 0xF0, 0xA3, 0x8E, 0x9C, 0xF6, - 0xE8, 0x88, 0x81, 0xF6, 0xE8, 0x88, 0x84, 0xF6, - 0xE8, 0xBE, 0x9E, 0xF6, 0xE4, 0x91, 0xAB, 0xF6, - 0xE8, 0x8A, 0x91, 0xF6, 0xE8, 0x8A, 0x8B, 0xF6, - 0xE8, 0x8A, 0x9D, 0xF6, 0xE5, 0x8A, 0xB3, 0xF6, - 0xE8, 0x8A, 0xB1, 0xF6, 0xE8, 0x8A, 0xB3, 0xF6, - 0xE8, 0x8A, 0xBD, 0xF6, 0xE8, 0x8B, 0xA6, 0xF6, - 0xF0, 0xA6, 0xAC, 0xBC, 0xF6, 0xE8, 0x8B, 0xA5, - 0xF6, 0xE8, 0x8C, 0x9D, 0xF6, 0xE8, 0x8D, 0xA3, - 0xF6, 0xE8, 0x8E, 0xAD, 0xF6, 0xE8, 0x8C, 0xA3, - 0xF6, 0xE8, 0x8E, 0xBD, 0xF6, 0xE8, 0x8F, 0xA7, - 0xF6, 0xE8, 0x91, 0x97, 0xF6, 0xE8, 0x8D, 0x93, - 0xF6, 0xE8, 0x8F, 0x8A, 0xF6, 0xE8, 0x8F, 0x8C, - 0xF6, 0xE8, 0x8F, 0x9C, 0xF6, 0xF0, 0xA6, 0xB0, - 0xB6, 0xF6, 0xF0, 0xA6, 0xB5, 0xAB, 0xF6, 0xF0, - 0xA6, 0xB3, 0x95, 0xF6, 0xE4, 0x94, 0xAB, 0xF6, - 0xE8, 0x93, 0xB1, 0xF6, 0xE8, 0x93, 0xB3, 0xF6, - 0xE8, 0x94, 0x96, 0xF6, 0xF0, 0xA7, 0x8F, 0x8A, - 0xF6, 0xE8, 0x95, 0xA4, 0xF6, 0xF0, 0xA6, 0xBC, - 0xAC, 0xF6, 0xE4, 0x95, 0x9D, 0xF6, 0xE4, 0x95, - 0xA1, 0xF6, 0xF0, 0xA6, 0xBE, 0xB1, 0xF6, 0xF0, - 0xA7, 0x83, 0x92, 0xF6, 0xE4, 0x95, 0xAB, 0xF6, - 0xE8, 0x99, 0x90, 0xF6, 0xE8, 0x99, 0x9C, 0xF6, - 0xE8, 0x99, 0xA7, 0xF6, 0xE8, 0x99, 0xA9, 0xF6, - 0xE8, 0x9A, 0xA9, 0xF6, 0xE8, 0x9A, 0x88, 0xF6, - 0xE8, 0x9C, 0x8E, 0xF6, 0xE8, 0x9B, 0xA2, 0xF6, - 0xE8, 0x9D, 0xB9, 0xF6, 0xE8, 0x9C, 0xA8, 0xF6, - 0xE8, 0x9D, 0xAB, 0xF6, 0xE8, 0x9E, 0x86, 0xF6, - 0xE4, 0x97, 0x97, 0xF6, 0xE8, 0x9F, 0xA1, 0xF6, - 0xE8, 0xA0, 0x81, 0xF6, 0xE4, 0x97, 0xB9, 0xF6, - 0xE8, 0xA1, 0xA0, 0xF6, 0xE8, 0xA1, 0xA3, 0xF6, - 0xF0, 0xA7, 0x99, 0xA7, 0xF6, 0xE8, 0xA3, 0x97, - 0xF6, 0xE8, 0xA3, 0x9E, 0xF6, 0xE4, 0x98, 0xB5, - 0xF6, 0xE8, 0xA3, 0xBA, 0xF6, 0xE3, 0x92, 0xBB, - 0xF6, 0xF0, 0xA7, 0xA2, 0xAE, 0xF6, 0xF0, 0xA7, - 0xA5, 0xA6, 0xF6, 0xE4, 0x9A, 0xBE, 0xF6, 0xE4, - 0x9B, 0x87, 0xF6, 0xE8, 0xAA, 0xA0, 0xF6, 0xE8, - 0xAB, 0xAD, 0xF6, 0xE8, 0xAE, 0x8A, 0xF6, 0xE8, - 0xB1, 0x95, 0xF6, 0xF0, 0xA7, 0xB2, 0xA8, 0xF6, - 0xE8, 0xB2, 0xAB, 0xF6, 0xE8, 0xB3, 0x81, 0xF6, - 0xE8, 0xB4, 0x9B, 0xF6, 0xE8, 0xB5, 0xB7, 0xF6, - 0xF0, 0xA7, 0xBC, 0xAF, 0xF6, 0xF0, 0xA0, 0xA0, - 0x84, 0xF6, 0xE8, 0xB7, 0x8B, 0xF6, 0xE8, 0xB6, - 0xBC, 0xF6, 0xE8, 0xB7, 0xB0, 0xF6, 0xF0, 0xA0, - 0xA3, 0x9E, 0xF6, 0xE8, 0xBB, 0x94, 0xF6, 0xE8, - 0xBC, 0xB8, 0xF6, 0xF0, 0xA8, 0x97, 0x92, 0xF6, - 0xF0, 0xA8, 0x97, 0xAD, 0xF6, 0xE9, 0x82, 0x94, - 0xF6, 0xE9, 0x83, 0xB1, 0xF6, 0xE9, 0x84, 0x91, - 0xF6, 0xF0, 0xA8, 0x9C, 0xAE, 0xF6, 0xE9, 0x84, - 0x9B, 0xF6, 0xE9, 0x88, 0xB8, 0xF6, 0xE9, 0x8B, - 0x97, 0xF6, 0xE9, 0x8B, 0x98, 0xF6, 0xE9, 0x89, - 0xBC, 0xF6, 0xE9, 0x8F, 0xB9, 0xF6, 0xE9, 0x90, - 0x95, 0xF6, 0xF0, 0xA8, 0xAF, 0xBA, 0xF6, 0xE9, - 0x96, 0x8B, 0xF6, 0xE4, 0xA6, 0x95, 0xF6, 0xE9, - 0x96, 0xB7, 0xF6, 0xF0, 0xA8, 0xB5, 0xB7, 0xF6, - 0xE4, 0xA7, 0xA6, 0xF6, 0xE9, 0x9B, 0x83, 0xF6, - 0xE5, 0xB6, 0xB2, 0xF6, 0xE9, 0x9C, 0xA3, 0xF6, - 0xF0, 0xA9, 0x85, 0x85, 0xF6, 0xF0, 0xA9, 0x88, - 0x9A, 0xF6, 0xE4, 0xA9, 0xAE, 0xF6, 0xE4, 0xA9, - 0xB6, 0xF6, 0xE9, 0x9F, 0xA0, 0xF6, 0xF0, 0xA9, - 0x90, 0x8A, 0xF6, 0xE4, 0xAA, 0xB2, 0xF6, 0xF0, - 0xA9, 0x92, 0x96, 0xF6, 0xE9, 0xA0, 0x8B, 0xF6, - 0xE9, 0xA0, 0x8B, 0xF6, 0xE9, 0xA0, 0xA9, 0xF6, - 0xF0, 0xA9, 0x96, 0xB6, 0xF6, 0xE9, 0xA3, 0xA2, - 0xF6, 0xE4, 0xAC, 0xB3, 0xF6, 0xE9, 0xA4, 0xA9, - 0xF6, 0xE9, 0xA6, 0xA7, 0xF6, 0xE9, 0xA7, 0x82, - 0xF6, 0xE9, 0xA7, 0xBE, 0xF6, 0xE4, 0xAF, 0x8E, - 0xF6, 0xF0, 0xA9, 0xAC, 0xB0, 0xF6, 0xE9, 0xAC, - 0x92, 0xF6, 0xE9, 0xB1, 0x80, 0xF6, 0xE9, 0xB3, - 0xBD, 0xF6, 0xE4, 0xB3, 0x8E, 0xF6, 0xE4, 0xB3, - 0xAD, 0xF6, 0xE9, 0xB5, 0xA7, 0xF6, 0xF0, 0xAA, - 0x83, 0x8E, 0xF6, 0xE4, 0xB3, 0xB8, 0xF6, 0xF0, - 0xAA, 0x84, 0x85, 0xF6, 0xF0, 0xAA, 0x88, 0x8E, - 0xF6, 0xF0, 0xAA, 0x8A, 0x91, 0xF6, 0xE9, 0xBA, - 0xBB, 0xF6, 0xE4, 0xB5, 0x96, 0xF6, 0xE9, 0xBB, - 0xB9, 0xF6, 0xE9, 0xBB, 0xBE, 0xF6, 0xE9, 0xBC, - 0x85, 0xF6, 0xE9, 0xBC, 0x8F, 0xF6, 0xE9, 0xBC, - 0x96, 0xF6, 0xE9, 0xBC, 0xBB, 0xF6, 0xF0, 0xAA, - 0x98, 0x80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - }, - { - 0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84, - 0x32, 0x33, 0x20, 0xCC, 0x81, 0xCE, 0xBC, 0x20, - 0xCC, 0xA7, 0x31, 0x6F, 0x31, 0xE2, 0x81, 0x84, - 0x34, 0x31, 0xE2, 0x81, 0x84, 0x32, 0x33, 0xE2, - 0x81, 0x84, 0x34, 0xF6, 0x41, 0xCC, 0x80, 0xF6, - 0x41, 0xCC, 0x81, 0xF6, 0x41, 0xCC, 0x82, 0xF6, - 0x41, 0xCC, 0x83, 0xF6, 0x41, 0xCC, 0x88, 0xF6, - 0x41, 0xCC, 0x8A, 0xF6, 0x43, 0xCC, 0xA7, 0xF6, - 0x45, 0xCC, 0x80, 0xF6, 0x45, 0xCC, 0x81, 0xF6, - 0x45, 0xCC, 0x82, 0xF6, 0x45, 0xCC, 0x88, 0xF6, - 0x49, 0xCC, 0x80, 0xF6, 0x49, 0xCC, 0x81, 0xF6, - 0x49, 0xCC, 0x82, 0xF6, 0x49, 0xCC, 0x88, 0xF6, - 0x4E, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x80, 0xF6, - 0x4F, 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xF6, - 0x4F, 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x88, 0xF6, - 0x55, 0xCC, 0x80, 0xF6, 0x55, 0xCC, 0x81, 0xF6, - 0x55, 0xCC, 0x82, 0xF6, 0x55, 0xCC, 0x88, 0xF6, - 0x59, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x80, 0xF6, - 0x61, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x82, 0xF6, - 0x61, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x88, 0xF6, - 0x61, 0xCC, 0x8A, 0xF6, 0x63, 0xCC, 0xA7, 0xF6, - 0x65, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x81, 0xF6, - 0x65, 0xCC, 0x82, 0xF6, 0x65, 0xCC, 0x88, 0xF6, - 0x69, 0xCC, 0x80, 0xF6, 0x69, 0xCC, 0x81, 0xF6, - 0x69, 0xCC, 0x82, 0xF6, 0x69, 0xCC, 0x88, 0xF6, - 0x6E, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x80, 0xF6, - 0x6F, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, 0xF6, - 0x6F, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x88, 0xF6, - 0x75, 0xCC, 0x80, 0xF6, 0x75, 0xCC, 0x81, 0xF6, - 0x75, 0xCC, 0x82, 0xF6, 0x75, 0xCC, 0x88, 0xF6, - 0x79, 0xCC, 0x81, 0xF6, 0x79, 0xCC, 0x88, 0xF6, - 0x41, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x84, 0xF6, - 0x41, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0x86, 0xF6, - 0x41, 0xCC, 0xA8, 0xF6, 0x61, 0xCC, 0xA8, 0xF6, - 0x43, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0x81, 0xF6, - 0x43, 0xCC, 0x82, 0xF6, 0x63, 0xCC, 0x82, 0xF6, - 0x43, 0xCC, 0x87, 0xF6, 0x63, 0xCC, 0x87, 0xF6, - 0x43, 0xCC, 0x8C, 0xF6, 0x63, 0xCC, 0x8C, 0xF6, - 0x44, 0xCC, 0x8C, 0xF6, 0x64, 0xCC, 0x8C, 0xF6, - 0x45, 0xCC, 0x84, 0xF6, 0x65, 0xCC, 0x84, 0xF6, - 0x45, 0xCC, 0x86, 0xF6, 0x65, 0xCC, 0x86, 0xF6, - 0x45, 0xCC, 0x87, 0xF6, 0x65, 0xCC, 0x87, 0xF6, - 0x45, 0xCC, 0xA8, 0xF6, 0x65, 0xCC, 0xA8, 0xF6, - 0x45, 0xCC, 0x8C, 0xF6, 0x65, 0xCC, 0x8C, 0xF6, - 0x47, 0xCC, 0x82, 0xF6, 0x67, 0xCC, 0x82, 0xF6, - 0x47, 0xCC, 0x86, 0xF6, 0x67, 0xCC, 0x86, 0xF6, - 0x47, 0xCC, 0x87, 0xF6, 0x67, 0xCC, 0x87, 0xF6, - 0x47, 0xCC, 0xA7, 0xF6, 0x67, 0xCC, 0xA7, 0xF6, - 0x48, 0xCC, 0x82, 0xF6, 0x68, 0xCC, 0x82, 0xF6, - 0x49, 0xCC, 0x83, 0xF6, 0x69, 0xCC, 0x83, 0xF6, - 0x49, 0xCC, 0x84, 0xF6, 0x69, 0xCC, 0x84, 0xF6, - 0x49, 0xCC, 0x86, 0xF6, 0x69, 0xCC, 0x86, 0xF6, - 0x49, 0xCC, 0xA8, 0xF6, 0x69, 0xCC, 0xA8, 0xF6, - 0x49, 0xCC, 0x87, 0x49, 0x4A, 0x69, 0x6A, 0xF6, - 0x4A, 0xCC, 0x82, 0xF6, 0x6A, 0xCC, 0x82, 0xF6, - 0x4B, 0xCC, 0xA7, 0xF6, 0x6B, 0xCC, 0xA7, 0xF6, - 0x4C, 0xCC, 0x81, 0xF6, 0x6C, 0xCC, 0x81, 0xF6, - 0x4C, 0xCC, 0xA7, 0xF6, 0x6C, 0xCC, 0xA7, 0xF6, - 0x4C, 0xCC, 0x8C, 0xF6, 0x6C, 0xCC, 0x8C, 0x4C, - 0xC2, 0xB7, 0x6C, 0xC2, 0xB7, 0xF6, 0x4E, 0xCC, - 0x81, 0xF6, 0x6E, 0xCC, 0x81, 0xF6, 0x4E, 0xCC, - 0xA7, 0xF6, 0x6E, 0xCC, 0xA7, 0xF6, 0x4E, 0xCC, - 0x8C, 0xF6, 0x6E, 0xCC, 0x8C, 0xCA, 0xBC, 0x6E, - 0xF6, 0x4F, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, 0x84, - 0xF6, 0x4F, 0xCC, 0x86, 0xF6, 0x6F, 0xCC, 0x86, - 0xF6, 0x4F, 0xCC, 0x8B, 0xF6, 0x6F, 0xCC, 0x8B, - 0xF6, 0x52, 0xCC, 0x81, 0xF6, 0x72, 0xCC, 0x81, - 0xF6, 0x52, 0xCC, 0xA7, 0xF6, 0x72, 0xCC, 0xA7, - 0xF6, 0x52, 0xCC, 0x8C, 0xF6, 0x72, 0xCC, 0x8C, - 0xF6, 0x53, 0xCC, 0x81, 0xF6, 0x73, 0xCC, 0x81, - 0xF6, 0x53, 0xCC, 0x82, 0xF6, 0x73, 0xCC, 0x82, - 0xF6, 0x53, 0xCC, 0xA7, 0xF6, 0x73, 0xCC, 0xA7, - 0xF6, 0x53, 0xCC, 0x8C, 0xF6, 0x73, 0xCC, 0x8C, - 0xF6, 0x54, 0xCC, 0xA7, 0xF6, 0x74, 0xCC, 0xA7, - 0xF6, 0x54, 0xCC, 0x8C, 0xF6, 0x74, 0xCC, 0x8C, - 0xF6, 0x55, 0xCC, 0x83, 0xF6, 0x75, 0xCC, 0x83, - 0xF6, 0x55, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x84, - 0xF6, 0x55, 0xCC, 0x86, 0xF6, 0x75, 0xCC, 0x86, - 0xF6, 0x55, 0xCC, 0x8A, 0xF6, 0x75, 0xCC, 0x8A, - 0xF6, 0x55, 0xCC, 0x8B, 0xF6, 0x75, 0xCC, 0x8B, - 0xF6, 0x55, 0xCC, 0xA8, 0xF6, 0x75, 0xCC, 0xA8, - 0xF6, 0x57, 0xCC, 0x82, 0xF6, 0x77, 0xCC, 0x82, - 0xF6, 0x59, 0xCC, 0x82, 0xF6, 0x79, 0xCC, 0x82, - 0xF6, 0x59, 0xCC, 0x88, 0xF6, 0x5A, 0xCC, 0x81, - 0xF6, 0x7A, 0xCC, 0x81, 0xF6, 0x5A, 0xCC, 0x87, - 0xF6, 0x7A, 0xCC, 0x87, 0xF6, 0x5A, 0xCC, 0x8C, - 0xF6, 0x7A, 0xCC, 0x8C, 0x73, 0xF6, 0x4F, 0xCC, - 0x9B, 0xF6, 0x6F, 0xCC, 0x9B, 0xF6, 0x55, 0xCC, - 0x9B, 0xF6, 0x75, 0xCC, 0x9B, 0x44, 0x5A, 0xCC, - 0x8C, 0x44, 0x7A, 0xCC, 0x8C, 0x64, 0x7A, 0xCC, - 0x8C, 0x4C, 0x4A, 0x4C, 0x6A, 0x6C, 0x6A, 0x4E, - 0x4A, 0x4E, 0x6A, 0x6E, 0x6A, 0xF6, 0x41, 0xCC, - 0x8C, 0xF6, 0x61, 0xCC, 0x8C, 0xF6, 0x49, 0xCC, - 0x8C, 0xF6, 0x69, 0xCC, 0x8C, 0xF6, 0x4F, 0xCC, - 0x8C, 0xF6, 0x6F, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, - 0x8C, 0xF6, 0x75, 0xCC, 0x8C, 0xF6, 0x55, 0xCC, - 0x88, 0xCC, 0x84, 0xF6, 0x75, 0xCC, 0x88, 0xCC, - 0x84, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x81, 0xF6, - 0x75, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x55, 0xCC, - 0x88, 0xCC, 0x8C, 0xF6, 0x75, 0xCC, 0x88, 0xCC, - 0x8C, 0xF6, 0x55, 0xCC, 0x88, 0xCC, 0x80, 0xF6, - 0x75, 0xCC, 0x88, 0xCC, 0x80, 0xF6, 0x41, 0xCC, - 0x88, 0xCC, 0x84, 0xF6, 0x61, 0xCC, 0x88, 0xCC, - 0x84, 0xF6, 0x41, 0xCC, 0x87, 0xCC, 0x84, 0xF6, - 0x61, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0xC3, 0x86, - 0xCC, 0x84, 0xF6, 0xC3, 0xA6, 0xCC, 0x84, 0xF6, - 0x47, 0xCC, 0x8C, 0xF6, 0x67, 0xCC, 0x8C, 0xF6, - 0x4B, 0xCC, 0x8C, 0xF6, 0x6B, 0xCC, 0x8C, 0xF6, - 0x4F, 0xCC, 0xA8, 0xF6, 0x6F, 0xCC, 0xA8, 0xF6, - 0x4F, 0xCC, 0xA8, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, - 0xA8, 0xCC, 0x84, 0xF6, 0xC6, 0xB7, 0xCC, 0x8C, - 0xF6, 0xCA, 0x92, 0xCC, 0x8C, 0xF6, 0x6A, 0xCC, - 0x8C, 0x44, 0x5A, 0x44, 0x7A, 0x64, 0x7A, 0xF6, - 0x47, 0xCC, 0x81, 0xF6, 0x67, 0xCC, 0x81, 0xF6, - 0x4E, 0xCC, 0x80, 0xF6, 0x6E, 0xCC, 0x80, 0xF6, - 0x41, 0xCC, 0x8A, 0xCC, 0x81, 0xF6, 0x61, 0xCC, - 0x8A, 0xCC, 0x81, 0xF6, 0xC3, 0x86, 0xCC, 0x81, - 0xF6, 0xC3, 0xA6, 0xCC, 0x81, 0xF6, 0xC3, 0x98, - 0xCC, 0x81, 0xF6, 0xC3, 0xB8, 0xCC, 0x81, 0xF6, - 0x41, 0xCC, 0x8F, 0xF6, 0x61, 0xCC, 0x8F, 0xF6, - 0x41, 0xCC, 0x91, 0xF6, 0x61, 0xCC, 0x91, 0xF6, - 0x45, 0xCC, 0x8F, 0xF6, 0x65, 0xCC, 0x8F, 0xF6, - 0x45, 0xCC, 0x91, 0xF6, 0x65, 0xCC, 0x91, 0xF6, - 0x49, 0xCC, 0x8F, 0xF6, 0x69, 0xCC, 0x8F, 0xF6, - 0x49, 0xCC, 0x91, 0xF6, 0x69, 0xCC, 0x91, 0xF6, - 0x4F, 0xCC, 0x8F, 0xF6, 0x6F, 0xCC, 0x8F, 0xF6, - 0x4F, 0xCC, 0x91, 0xF6, 0x6F, 0xCC, 0x91, 0xF6, - 0x52, 0xCC, 0x8F, 0xF6, 0x72, 0xCC, 0x8F, 0xF6, - 0x52, 0xCC, 0x91, 0xF6, 0x72, 0xCC, 0x91, 0xF6, - 0x55, 0xCC, 0x8F, 0xF6, 0x75, 0xCC, 0x8F, 0xF6, - 0x55, 0xCC, 0x91, 0xF6, 0x75, 0xCC, 0x91, 0xF6, - 0x53, 0xCC, 0xA6, 0xF6, 0x73, 0xCC, 0xA6, 0xF6, - 0x54, 0xCC, 0xA6, 0xF6, 0x74, 0xCC, 0xA6, 0xF6, - 0x48, 0xCC, 0x8C, 0xF6, 0x68, 0xCC, 0x8C, 0xF6, - 0x41, 0xCC, 0x87, 0xF6, 0x61, 0xCC, 0x87, 0xF6, - 0x45, 0xCC, 0xA7, 0xF6, 0x65, 0xCC, 0xA7, 0xF6, - 0x4F, 0xCC, 0x88, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, - 0x88, 0xCC, 0x84, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, - 0x84, 0xF6, 0x6F, 0xCC, 0x83, 0xCC, 0x84, 0xF6, - 0x4F, 0xCC, 0x87, 0xF6, 0x6F, 0xCC, 0x87, 0xF6, - 0x4F, 0xCC, 0x87, 0xCC, 0x84, 0xF6, 0x6F, 0xCC, - 0x87, 0xCC, 0x84, 0xF6, 0x59, 0xCC, 0x84, 0xF6, - 0x79, 0xCC, 0x84, 0x68, 0xC9, 0xA6, 0x6A, 0x72, - 0xC9, 0xB9, 0xC9, 0xBB, 0xCA, 0x81, 0x77, 0x79, - 0x20, 0xCC, 0x86, 0x20, 0xCC, 0x87, 0x20, 0xCC, - 0x8A, 0x20, 0xCC, 0xA8, 0x20, 0xCC, 0x83, 0x20, - 0xCC, 0x8B, 0xC9, 0xA3, 0x6C, 0x73, 0x78, 0xCA, - 0x95, 0xF6, 0xCC, 0x80, 0xF6, 0xCC, 0x81, 0xF6, - 0xCC, 0x93, 0xF6, 0xCC, 0x88, 0xCC, 0x81, 0xF6, - 0xCA, 0xB9, 0x20, 0xCD, 0x85, 0xF6, 0x3B, 0x20, - 0xCC, 0x81, 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, - 0x20, 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0xCE, 0x91, - 0xCC, 0x81, 0xF6, 0xC2, 0xB7, 0xF6, 0xCE, 0x95, - 0xCC, 0x81, 0xF6, 0xCE, 0x97, 0xCC, 0x81, 0xF6, - 0xCE, 0x99, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, - 0x81, 0xF6, 0xCE, 0xA5, 0xCC, 0x81, 0xF6, 0xCE, - 0xA9, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x88, - 0xCC, 0x81, 0xF6, 0xCE, 0x99, 0xCC, 0x88, 0xF6, - 0xCE, 0xA5, 0xCC, 0x88, 0xF6, 0xCE, 0xB1, 0xCC, - 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x81, 0xF6, 0xCE, - 0xB7, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, - 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, - 0xCE, 0xB9, 0xCC, 0x88, 0xF6, 0xCF, 0x85, 0xCC, - 0x88, 0xF6, 0xCE, 0xBF, 0xCC, 0x81, 0xF6, 0xCF, - 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, 0x81, - 0xCE, 0xB2, 0xCE, 0xB8, 0xCE, 0xA5, 0xF5, 0x05, - 0xCF, 0x92, 0xCC, 0x81, 0xCE, 0xA5, 0xCC, 0x81, - 0xF5, 0x05, 0xCF, 0x92, 0xCC, 0x88, 0xCE, 0xA5, - 0xCC, 0x88, 0xCF, 0x86, 0xCF, 0x80, 0xCE, 0xBA, - 0xCF, 0x81, 0xCF, 0x82, 0xCE, 0x98, 0xCE, 0xB5, - 0xCE, 0xA3, 0xF6, 0xD0, 0x95, 0xCC, 0x80, 0xF6, - 0xD0, 0x95, 0xCC, 0x88, 0xF6, 0xD0, 0x93, 0xCC, - 0x81, 0xF6, 0xD0, 0x86, 0xCC, 0x88, 0xF6, 0xD0, - 0x9A, 0xCC, 0x81, 0xF6, 0xD0, 0x98, 0xCC, 0x80, - 0xF6, 0xD0, 0xA3, 0xCC, 0x86, 0xF6, 0xD0, 0x98, - 0xCC, 0x86, 0xF6, 0xD0, 0xB8, 0xCC, 0x86, 0xF6, - 0xD0, 0xB5, 0xCC, 0x80, 0xF6, 0xD0, 0xB5, 0xCC, - 0x88, 0xF6, 0xD0, 0xB3, 0xCC, 0x81, 0xF6, 0xD1, - 0x96, 0xCC, 0x88, 0xF6, 0xD0, 0xBA, 0xCC, 0x81, - 0xF6, 0xD0, 0xB8, 0xCC, 0x80, 0xF6, 0xD1, 0x83, - 0xCC, 0x86, 0xF6, 0xD1, 0xB4, 0xCC, 0x8F, 0xF6, - 0xD1, 0xB5, 0xCC, 0x8F, 0xF6, 0xD0, 0x96, 0xCC, - 0x86, 0xF6, 0xD0, 0xB6, 0xCC, 0x86, 0xF6, 0xD0, - 0x90, 0xCC, 0x86, 0xF6, 0xD0, 0xB0, 0xCC, 0x86, - 0xF6, 0xD0, 0x90, 0xCC, 0x88, 0xF6, 0xD0, 0xB0, - 0xCC, 0x88, 0xF6, 0xD0, 0x95, 0xCC, 0x86, 0xF6, - 0xD0, 0xB5, 0xCC, 0x86, 0xF6, 0xD3, 0x98, 0xCC, - 0x88, 0xF6, 0xD3, 0x99, 0xCC, 0x88, 0xF6, 0xD0, - 0x96, 0xCC, 0x88, 0xF6, 0xD0, 0xB6, 0xCC, 0x88, - 0xF6, 0xD0, 0x97, 0xCC, 0x88, 0xF6, 0xD0, 0xB7, - 0xCC, 0x88, 0xF6, 0xD0, 0x98, 0xCC, 0x84, 0xF6, - 0xD0, 0xB8, 0xCC, 0x84, 0xF6, 0xD0, 0x98, 0xCC, - 0x88, 0xF6, 0xD0, 0xB8, 0xCC, 0x88, 0xF6, 0xD0, - 0x9E, 0xCC, 0x88, 0xF6, 0xD0, 0xBE, 0xCC, 0x88, - 0xF6, 0xD3, 0xA8, 0xCC, 0x88, 0xF6, 0xD3, 0xA9, - 0xCC, 0x88, 0xF6, 0xD0, 0xAD, 0xCC, 0x88, 0xF6, - 0xD1, 0x8D, 0xCC, 0x88, 0xF6, 0xD0, 0xA3, 0xCC, - 0x84, 0xF6, 0xD1, 0x83, 0xCC, 0x84, 0xF6, 0xD0, - 0xA3, 0xCC, 0x88, 0xF6, 0xD1, 0x83, 0xCC, 0x88, - 0xF6, 0xD0, 0xA3, 0xCC, 0x8B, 0xF6, 0xD1, 0x83, - 0xCC, 0x8B, 0xF6, 0xD0, 0xA7, 0xCC, 0x88, 0xF6, - 0xD1, 0x87, 0xCC, 0x88, 0xF6, 0xD0, 0xAB, 0xCC, - 0x88, 0xF6, 0xD1, 0x8B, 0xCC, 0x88, 0xD5, 0xA5, - 0xD6, 0x82, 0xF6, 0xD8, 0xA7, 0xD9, 0x93, 0xF6, - 0xD8, 0xA7, 0xD9, 0x94, 0xF6, 0xD9, 0x88, 0xD9, - 0x94, 0xF6, 0xD8, 0xA7, 0xD9, 0x95, 0xF6, 0xD9, - 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0xB4, 0xD9, - 0x88, 0xD9, 0xB4, 0xDB, 0x87, 0xD9, 0xB4, 0xD9, - 0x8A, 0xD9, 0xB4, 0xF6, 0xDB, 0x95, 0xD9, 0x94, - 0xF6, 0xDB, 0x81, 0xD9, 0x94, 0xF6, 0xDB, 0x92, - 0xD9, 0x94, 0xF6, 0xE0, 0xA4, 0xA8, 0xE0, 0xA4, - 0xBC, 0xF6, 0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBC, - 0xF6, 0xE0, 0xA4, 0xB3, 0xE0, 0xA4, 0xBC, 0xF6, - 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, - 0xA4, 0x96, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, - 0x97, 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0x9C, - 0xE0, 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0xA1, 0xE0, - 0xA4, 0xBC, 0xF6, 0xE0, 0xA4, 0xA2, 0xE0, 0xA4, - 0xBC, 0xF6, 0xE0, 0xA4, 0xAB, 0xE0, 0xA4, 0xBC, - 0xF6, 0xE0, 0xA4, 0xAF, 0xE0, 0xA4, 0xBC, 0xF6, - 0xE0, 0xA7, 0x87, 0xE0, 0xA6, 0xBE, 0xF6, 0xE0, - 0xA7, 0x87, 0xE0, 0xA7, 0x97, 0xF6, 0xE0, 0xA6, - 0xA1, 0xE0, 0xA6, 0xBC, 0xF6, 0xE0, 0xA6, 0xA2, - 0xE0, 0xA6, 0xBC, 0xF6, 0xE0, 0xA6, 0xAF, 0xE0, - 0xA6, 0xBC, 0xF6, 0xE0, 0xA8, 0xB2, 0xE0, 0xA8, - 0xBC, 0xF6, 0xE0, 0xA8, 0xB8, 0xE0, 0xA8, 0xBC, - 0xF6, 0xE0, 0xA8, 0x96, 0xE0, 0xA8, 0xBC, 0xF6, - 0xE0, 0xA8, 0x97, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, - 0xA8, 0x9C, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xA8, - 0xAB, 0xE0, 0xA8, 0xBC, 0xF6, 0xE0, 0xAD, 0x87, - 0xE0, 0xAD, 0x96, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, - 0xAC, 0xBE, 0xF6, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, - 0x97, 0xF6, 0xE0, 0xAC, 0xA1, 0xE0, 0xAC, 0xBC, - 0xF6, 0xE0, 0xAC, 0xA2, 0xE0, 0xAC, 0xBC, 0xF6, - 0xE0, 0xAE, 0x92, 0xE0, 0xAF, 0x97, 0xF6, 0xE0, - 0xAF, 0x86, 0xE0, 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, - 0x87, 0xE0, 0xAE, 0xBE, 0xF6, 0xE0, 0xAF, 0x86, - 0xE0, 0xAF, 0x97, 0xF6, 0xE0, 0xB1, 0x86, 0xE0, - 0xB1, 0x96, 0xF6, 0xE0, 0xB2, 0xBF, 0xE0, 0xB3, - 0x95, 0xF6, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x95, - 0xF6, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x96, 0xF6, - 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x82, 0xF6, 0xE0, - 0xB3, 0x86, 0xE0, 0xB3, 0x82, 0xE0, 0xB3, 0x95, - 0xF6, 0xE0, 0xB5, 0x86, 0xE0, 0xB4, 0xBE, 0xF6, - 0xE0, 0xB5, 0x87, 0xE0, 0xB4, 0xBE, 0xF6, 0xE0, - 0xB5, 0x86, 0xE0, 0xB5, 0x97, 0xF6, 0xE0, 0xB7, - 0x99, 0xE0, 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, 0x99, - 0xE0, 0xB7, 0x8F, 0xF6, 0xE0, 0xB7, 0x99, 0xE0, - 0xB7, 0x8F, 0xE0, 0xB7, 0x8A, 0xF6, 0xE0, 0xB7, - 0x99, 0xE0, 0xB7, 0x9F, 0xE0, 0xB9, 0x8D, 0xE0, - 0xB8, 0xB2, 0xE0, 0xBB, 0x8D, 0xE0, 0xBA, 0xB2, - 0xE0, 0xBA, 0xAB, 0xE0, 0xBA, 0x99, 0xE0, 0xBA, - 0xAB, 0xE0, 0xBA, 0xA1, 0xE0, 0xBC, 0x8B, 0xF6, - 0xE0, 0xBD, 0x82, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, - 0xBD, 0x8C, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, - 0x91, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x96, - 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x9B, 0xE0, - 0xBE, 0xB7, 0xF6, 0xE0, 0xBD, 0x80, 0xE0, 0xBE, - 0xB5, 0xF6, 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB2, - 0xF6, 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB4, 0xF6, - 0xE0, 0xBE, 0xB2, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, - 0xB2, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, - 0xE0, 0xBE, 0xB3, 0xE0, 0xBE, 0x80, 0xE0, 0xBE, - 0xB3, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, - 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xF6, 0xE0, - 0xBE, 0x92, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, - 0x9C, 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xA1, - 0xE0, 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xA6, 0xE0, - 0xBE, 0xB7, 0xF6, 0xE0, 0xBE, 0xAB, 0xE0, 0xBE, - 0xB7, 0xF6, 0xE0, 0xBE, 0x90, 0xE0, 0xBE, 0xB5, - 0xF6, 0xE1, 0x80, 0xA5, 0xE1, 0x80, 0xAE, 0xE1, - 0x83, 0x9C, 0xF6, 0xE1, 0xAC, 0x85, 0xE1, 0xAC, - 0xB5, 0xF6, 0xE1, 0xAC, 0x87, 0xE1, 0xAC, 0xB5, - 0xF6, 0xE1, 0xAC, 0x89, 0xE1, 0xAC, 0xB5, 0xF6, - 0xE1, 0xAC, 0x8B, 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, - 0xAC, 0x8D, 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, - 0x91, 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, 0xBA, - 0xE1, 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, 0xBC, 0xE1, - 0xAC, 0xB5, 0xF6, 0xE1, 0xAC, 0xBE, 0xE1, 0xAC, - 0xB5, 0xF6, 0xE1, 0xAC, 0xBF, 0xE1, 0xAC, 0xB5, - 0xF6, 0xE1, 0xAD, 0x82, 0xE1, 0xAC, 0xB5, 0x41, - 0xC3, 0x86, 0x42, 0x44, 0x45, 0xC6, 0x8E, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0xC8, 0xA2, 0x50, 0x52, 0x54, 0x55, 0x57, 0x61, - 0xC9, 0x90, 0xC9, 0x91, 0xE1, 0xB4, 0x82, 0x62, - 0x64, 0x65, 0xC9, 0x99, 0xC9, 0x9B, 0xC9, 0x9C, - 0x67, 0x6B, 0x6D, 0xC5, 0x8B, 0x6F, 0xC9, 0x94, - 0xE1, 0xB4, 0x96, 0xE1, 0xB4, 0x97, 0x70, 0x74, - 0x75, 0xE1, 0xB4, 0x9D, 0xC9, 0xAF, 0x76, 0xE1, - 0xB4, 0xA5, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, - 0xCF, 0x86, 0xCF, 0x87, 0x69, 0x72, 0x75, 0x76, - 0xCE, 0xB2, 0xCE, 0xB3, 0xCF, 0x81, 0xCF, 0x86, - 0xCF, 0x87, 0xD0, 0xBD, 0xC9, 0x92, 0x63, 0xC9, - 0x95, 0xC3, 0xB0, 0xC9, 0x9C, 0x66, 0xC9, 0x9F, - 0xC9, 0xA1, 0xC9, 0xA5, 0xC9, 0xA8, 0xC9, 0xA9, - 0xC9, 0xAA, 0xE1, 0xB5, 0xBB, 0xCA, 0x9D, 0xC9, - 0xAD, 0xE1, 0xB6, 0x85, 0xCA, 0x9F, 0xC9, 0xB1, - 0xC9, 0xB0, 0xC9, 0xB2, 0xC9, 0xB3, 0xC9, 0xB4, - 0xC9, 0xB5, 0xC9, 0xB8, 0xCA, 0x82, 0xCA, 0x83, - 0xC6, 0xAB, 0xCA, 0x89, 0xCA, 0x8A, 0xE1, 0xB4, - 0x9C, 0xCA, 0x8B, 0xCA, 0x8C, 0x7A, 0xCA, 0x90, - 0xCA, 0x91, 0xCA, 0x92, 0xCE, 0xB8, 0xF6, 0x41, - 0xCC, 0xA5, 0xF6, 0x61, 0xCC, 0xA5, 0xF6, 0x42, - 0xCC, 0x87, 0xF6, 0x62, 0xCC, 0x87, 0xF6, 0x42, - 0xCC, 0xA3, 0xF6, 0x62, 0xCC, 0xA3, 0xF6, 0x42, - 0xCC, 0xB1, 0xF6, 0x62, 0xCC, 0xB1, 0xF6, 0x43, - 0xCC, 0xA7, 0xCC, 0x81, 0xF6, 0x63, 0xCC, 0xA7, - 0xCC, 0x81, 0xF6, 0x44, 0xCC, 0x87, 0xF6, 0x64, - 0xCC, 0x87, 0xF6, 0x44, 0xCC, 0xA3, 0xF6, 0x64, - 0xCC, 0xA3, 0xF6, 0x44, 0xCC, 0xB1, 0xF6, 0x64, - 0xCC, 0xB1, 0xF6, 0x44, 0xCC, 0xA7, 0xF6, 0x64, - 0xCC, 0xA7, 0xF6, 0x44, 0xCC, 0xAD, 0xF6, 0x64, - 0xCC, 0xAD, 0xF6, 0x45, 0xCC, 0x84, 0xCC, 0x80, - 0xF6, 0x65, 0xCC, 0x84, 0xCC, 0x80, 0xF6, 0x45, - 0xCC, 0x84, 0xCC, 0x81, 0xF6, 0x65, 0xCC, 0x84, - 0xCC, 0x81, 0xF6, 0x45, 0xCC, 0xAD, 0xF6, 0x65, - 0xCC, 0xAD, 0xF6, 0x45, 0xCC, 0xB0, 0xF6, 0x65, - 0xCC, 0xB0, 0xF6, 0x45, 0xCC, 0xA7, 0xCC, 0x86, - 0xF6, 0x65, 0xCC, 0xA7, 0xCC, 0x86, 0xF6, 0x46, - 0xCC, 0x87, 0xF6, 0x66, 0xCC, 0x87, 0xF6, 0x47, - 0xCC, 0x84, 0xF6, 0x67, 0xCC, 0x84, 0xF6, 0x48, - 0xCC, 0x87, 0xF6, 0x68, 0xCC, 0x87, 0xF6, 0x48, - 0xCC, 0xA3, 0xF6, 0x68, 0xCC, 0xA3, 0xF6, 0x48, - 0xCC, 0x88, 0xF6, 0x68, 0xCC, 0x88, 0xF6, 0x48, - 0xCC, 0xA7, 0xF6, 0x68, 0xCC, 0xA7, 0xF6, 0x48, - 0xCC, 0xAE, 0xF6, 0x68, 0xCC, 0xAE, 0xF6, 0x49, - 0xCC, 0xB0, 0xF6, 0x69, 0xCC, 0xB0, 0xF6, 0x49, - 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x69, 0xCC, 0x88, - 0xCC, 0x81, 0xF6, 0x4B, 0xCC, 0x81, 0xF6, 0x6B, - 0xCC, 0x81, 0xF6, 0x4B, 0xCC, 0xA3, 0xF6, 0x6B, - 0xCC, 0xA3, 0xF6, 0x4B, 0xCC, 0xB1, 0xF6, 0x6B, - 0xCC, 0xB1, 0xF6, 0x4C, 0xCC, 0xA3, 0xF6, 0x6C, - 0xCC, 0xA3, 0xF6, 0x4C, 0xCC, 0xA3, 0xCC, 0x84, - 0xF6, 0x6C, 0xCC, 0xA3, 0xCC, 0x84, 0xF6, 0x4C, - 0xCC, 0xB1, 0xF6, 0x6C, 0xCC, 0xB1, 0xF6, 0x4C, - 0xCC, 0xAD, 0xF6, 0x6C, 0xCC, 0xAD, 0xF6, 0x4D, - 0xCC, 0x81, 0xF6, 0x6D, 0xCC, 0x81, 0xF6, 0x4D, - 0xCC, 0x87, 0xF6, 0x6D, 0xCC, 0x87, 0xF6, 0x4D, - 0xCC, 0xA3, 0xF6, 0x6D, 0xCC, 0xA3, 0xF6, 0x4E, - 0xCC, 0x87, 0xF6, 0x6E, 0xCC, 0x87, 0xF6, 0x4E, - 0xCC, 0xA3, 0xF6, 0x6E, 0xCC, 0xA3, 0xF6, 0x4E, - 0xCC, 0xB1, 0xF6, 0x6E, 0xCC, 0xB1, 0xF6, 0x4E, - 0xCC, 0xAD, 0xF6, 0x6E, 0xCC, 0xAD, 0xF6, 0x4F, - 0xCC, 0x83, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x83, - 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x83, 0xCC, 0x88, - 0xF6, 0x6F, 0xCC, 0x83, 0xCC, 0x88, 0xF6, 0x4F, - 0xCC, 0x84, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x84, - 0xCC, 0x80, 0xF6, 0x4F, 0xCC, 0x84, 0xCC, 0x81, - 0xF6, 0x6F, 0xCC, 0x84, 0xCC, 0x81, 0xF6, 0x50, - 0xCC, 0x81, 0xF6, 0x70, 0xCC, 0x81, 0xF6, 0x50, - 0xCC, 0x87, 0xF6, 0x70, 0xCC, 0x87, 0xF6, 0x52, - 0xCC, 0x87, 0xF6, 0x72, 0xCC, 0x87, 0xF6, 0x52, - 0xCC, 0xA3, 0xF6, 0x72, 0xCC, 0xA3, 0xF6, 0x52, - 0xCC, 0xA3, 0xCC, 0x84, 0xF6, 0x72, 0xCC, 0xA3, - 0xCC, 0x84, 0xF6, 0x52, 0xCC, 0xB1, 0xF6, 0x72, - 0xCC, 0xB1, 0xF6, 0x53, 0xCC, 0x87, 0xF6, 0x73, - 0xCC, 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xF6, 0x73, - 0xCC, 0xA3, 0xF6, 0x53, 0xCC, 0x81, 0xCC, 0x87, - 0xF6, 0x73, 0xCC, 0x81, 0xCC, 0x87, 0xF6, 0x53, - 0xCC, 0x8C, 0xCC, 0x87, 0xF6, 0x73, 0xCC, 0x8C, - 0xCC, 0x87, 0xF6, 0x53, 0xCC, 0xA3, 0xCC, 0x87, - 0xF6, 0x73, 0xCC, 0xA3, 0xCC, 0x87, 0xF6, 0x54, - 0xCC, 0x87, 0xF6, 0x74, 0xCC, 0x87, 0xF6, 0x54, - 0xCC, 0xA3, 0xF6, 0x74, 0xCC, 0xA3, 0xF6, 0x54, - 0xCC, 0xB1, 0xF6, 0x74, 0xCC, 0xB1, 0xF6, 0x54, - 0xCC, 0xAD, 0xF6, 0x74, 0xCC, 0xAD, 0xF6, 0x55, - 0xCC, 0xA4, 0xF6, 0x75, 0xCC, 0xA4, 0xF6, 0x55, - 0xCC, 0xB0, 0xF6, 0x75, 0xCC, 0xB0, 0xF6, 0x55, - 0xCC, 0xAD, 0xF6, 0x75, 0xCC, 0xAD, 0xF6, 0x55, - 0xCC, 0x83, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x83, - 0xCC, 0x81, 0xF6, 0x55, 0xCC, 0x84, 0xCC, 0x88, - 0xF6, 0x75, 0xCC, 0x84, 0xCC, 0x88, 0xF6, 0x56, - 0xCC, 0x83, 0xF6, 0x76, 0xCC, 0x83, 0xF6, 0x56, - 0xCC, 0xA3, 0xF6, 0x76, 0xCC, 0xA3, 0xF6, 0x57, - 0xCC, 0x80, 0xF6, 0x77, 0xCC, 0x80, 0xF6, 0x57, - 0xCC, 0x81, 0xF6, 0x77, 0xCC, 0x81, 0xF6, 0x57, - 0xCC, 0x88, 0xF6, 0x77, 0xCC, 0x88, 0xF6, 0x57, - 0xCC, 0x87, 0xF6, 0x77, 0xCC, 0x87, 0xF6, 0x57, - 0xCC, 0xA3, 0xF6, 0x77, 0xCC, 0xA3, 0xF6, 0x58, - 0xCC, 0x87, 0xF6, 0x78, 0xCC, 0x87, 0xF6, 0x58, - 0xCC, 0x88, 0xF6, 0x78, 0xCC, 0x88, 0xF6, 0x59, - 0xCC, 0x87, 0xF6, 0x79, 0xCC, 0x87, 0xF6, 0x5A, - 0xCC, 0x82, 0xF6, 0x7A, 0xCC, 0x82, 0xF6, 0x5A, - 0xCC, 0xA3, 0xF6, 0x7A, 0xCC, 0xA3, 0xF6, 0x5A, - 0xCC, 0xB1, 0xF6, 0x7A, 0xCC, 0xB1, 0xF6, 0x68, - 0xCC, 0xB1, 0xF6, 0x74, 0xCC, 0x88, 0xF6, 0x77, - 0xCC, 0x8A, 0xF6, 0x79, 0xCC, 0x8A, 0x61, 0xCA, - 0xBE, 0xF5, 0x05, 0xC5, 0xBF, 0xCC, 0x87, 0x73, - 0xCC, 0x87, 0xF6, 0x41, 0xCC, 0xA3, 0xF6, 0x61, - 0xCC, 0xA3, 0xF6, 0x41, 0xCC, 0x89, 0xF6, 0x61, - 0xCC, 0x89, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x81, - 0xF6, 0x61, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x41, - 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x61, 0xCC, 0x82, - 0xCC, 0x80, 0xF6, 0x41, 0xCC, 0x82, 0xCC, 0x89, - 0xF6, 0x61, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x41, - 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x61, 0xCC, 0x82, - 0xCC, 0x83, 0xF6, 0x41, 0xCC, 0xA3, 0xCC, 0x82, - 0xF6, 0x61, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x41, - 0xCC, 0x86, 0xCC, 0x81, 0xF6, 0x61, 0xCC, 0x86, - 0xCC, 0x81, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x80, - 0xF6, 0x61, 0xCC, 0x86, 0xCC, 0x80, 0xF6, 0x41, - 0xCC, 0x86, 0xCC, 0x89, 0xF6, 0x61, 0xCC, 0x86, - 0xCC, 0x89, 0xF6, 0x41, 0xCC, 0x86, 0xCC, 0x83, - 0xF6, 0x61, 0xCC, 0x86, 0xCC, 0x83, 0xF6, 0x41, - 0xCC, 0xA3, 0xCC, 0x86, 0xF6, 0x61, 0xCC, 0xA3, - 0xCC, 0x86, 0xF6, 0x45, 0xCC, 0xA3, 0xF6, 0x65, - 0xCC, 0xA3, 0xF6, 0x45, 0xCC, 0x89, 0xF6, 0x65, - 0xCC, 0x89, 0xF6, 0x45, 0xCC, 0x83, 0xF6, 0x65, - 0xCC, 0x83, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x81, - 0xF6, 0x65, 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x45, - 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x65, 0xCC, 0x82, - 0xCC, 0x80, 0xF6, 0x45, 0xCC, 0x82, 0xCC, 0x89, - 0xF6, 0x65, 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x45, - 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x65, 0xCC, 0x82, - 0xCC, 0x83, 0xF6, 0x45, 0xCC, 0xA3, 0xCC, 0x82, - 0xF6, 0x65, 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x49, - 0xCC, 0x89, 0xF6, 0x69, 0xCC, 0x89, 0xF6, 0x49, - 0xCC, 0xA3, 0xF6, 0x69, 0xCC, 0xA3, 0xF6, 0x4F, - 0xCC, 0xA3, 0xF6, 0x6F, 0xCC, 0xA3, 0xF6, 0x4F, - 0xCC, 0x89, 0xF6, 0x6F, 0xCC, 0x89, 0xF6, 0x4F, - 0xCC, 0x82, 0xCC, 0x81, 0xF6, 0x6F, 0xCC, 0x82, - 0xCC, 0x81, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x80, - 0xF6, 0x6F, 0xCC, 0x82, 0xCC, 0x80, 0xF6, 0x4F, - 0xCC, 0x82, 0xCC, 0x89, 0xF6, 0x6F, 0xCC, 0x82, - 0xCC, 0x89, 0xF6, 0x4F, 0xCC, 0x82, 0xCC, 0x83, - 0xF6, 0x6F, 0xCC, 0x82, 0xCC, 0x83, 0xF6, 0x4F, - 0xCC, 0xA3, 0xCC, 0x82, 0xF6, 0x6F, 0xCC, 0xA3, - 0xCC, 0x82, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x81, - 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, 0x81, 0xF6, 0x4F, - 0xCC, 0x9B, 0xCC, 0x80, 0xF6, 0x6F, 0xCC, 0x9B, - 0xCC, 0x80, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0x89, - 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, 0x89, 0xF6, 0x4F, - 0xCC, 0x9B, 0xCC, 0x83, 0xF6, 0x6F, 0xCC, 0x9B, - 0xCC, 0x83, 0xF6, 0x4F, 0xCC, 0x9B, 0xCC, 0xA3, - 0xF6, 0x6F, 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, 0x55, - 0xCC, 0xA3, 0xF6, 0x75, 0xCC, 0xA3, 0xF6, 0x55, - 0xCC, 0x89, 0xF6, 0x75, 0xCC, 0x89, 0xF6, 0x55, - 0xCC, 0x9B, 0xCC, 0x81, 0xF6, 0x75, 0xCC, 0x9B, - 0xCC, 0x81, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x80, - 0xF6, 0x75, 0xCC, 0x9B, 0xCC, 0x80, 0xF6, 0x55, - 0xCC, 0x9B, 0xCC, 0x89, 0xF6, 0x75, 0xCC, 0x9B, - 0xCC, 0x89, 0xF6, 0x55, 0xCC, 0x9B, 0xCC, 0x83, - 0xF6, 0x75, 0xCC, 0x9B, 0xCC, 0x83, 0xF6, 0x55, - 0xCC, 0x9B, 0xCC, 0xA3, 0xF6, 0x75, 0xCC, 0x9B, - 0xCC, 0xA3, 0xF6, 0x59, 0xCC, 0x80, 0xF6, 0x79, - 0xCC, 0x80, 0xF6, 0x59, 0xCC, 0xA3, 0xF6, 0x79, - 0xCC, 0xA3, 0xF6, 0x59, 0xCC, 0x89, 0xF6, 0x79, - 0xCC, 0x89, 0xF6, 0x59, 0xCC, 0x83, 0xF6, 0x79, - 0xCC, 0x83, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xF6, - 0xCE, 0xB1, 0xCC, 0x94, 0xF6, 0xCE, 0xB1, 0xCC, - 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, - 0xCC, 0x80, 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCC, - 0x81, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, - 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xF6, - 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, - 0x91, 0xCC, 0x93, 0xF6, 0xCE, 0x91, 0xCC, 0x94, - 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xF6, - 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, - 0x91, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0x91, - 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCC, - 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0x91, 0xCC, 0x94, - 0xCD, 0x82, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xF6, - 0xCE, 0xB5, 0xCC, 0x94, 0xF6, 0xCE, 0xB5, 0xCC, - 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x94, - 0xCC, 0x80, 0xF6, 0xCE, 0xB5, 0xCC, 0x93, 0xCC, - 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x81, - 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xF6, 0xCE, 0x95, - 0xCC, 0x94, 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xCC, - 0x80, 0xF6, 0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x80, - 0xF6, 0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x81, 0xF6, - 0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, - 0xB7, 0xCC, 0x93, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, - 0xF6, 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, 0xF6, - 0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, - 0xB7, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, - 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, - 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, - 0xCD, 0x82, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xF6, - 0xCE, 0x97, 0xCC, 0x94, 0xF6, 0xCE, 0x97, 0xCC, - 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x94, - 0xCC, 0x80, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, - 0x81, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x81, - 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, 0xF6, - 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, - 0xB9, 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, - 0xF6, 0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x80, 0xF6, - 0xCE, 0xB9, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, - 0xB9, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, - 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCC, - 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x94, - 0xCD, 0x82, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xF6, - 0xCE, 0x99, 0xCC, 0x94, 0xF6, 0xCE, 0x99, 0xCC, - 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x94, - 0xCC, 0x80, 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xCC, - 0x81, 0xF6, 0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x81, - 0xF6, 0xCE, 0x99, 0xCC, 0x93, 0xCD, 0x82, 0xF6, - 0xCE, 0x99, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, - 0xBF, 0xCC, 0x93, 0xF6, 0xCE, 0xBF, 0xCC, 0x94, - 0xF6, 0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x80, 0xF6, - 0xCE, 0xBF, 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, - 0xBF, 0xCC, 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xBF, - 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, - 0x93, 0xF6, 0xCE, 0x9F, 0xCC, 0x94, 0xF6, 0xCE, - 0x9F, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, - 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, - 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0x9F, 0xCC, 0x94, - 0xCC, 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xF6, - 0xCF, 0x85, 0xCC, 0x94, 0xF6, 0xCF, 0x85, 0xCC, - 0x93, 0xCC, 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x94, - 0xCC, 0x80, 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xCC, - 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x81, - 0xF6, 0xCF, 0x85, 0xCC, 0x93, 0xCD, 0x82, 0xF6, - 0xCF, 0x85, 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, - 0xA5, 0xCC, 0x94, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, - 0xCC, 0x80, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCC, - 0x81, 0xF6, 0xCE, 0xA5, 0xCC, 0x94, 0xCD, 0x82, - 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xF6, 0xCF, 0x89, - 0xCC, 0x94, 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCC, - 0x80, 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80, - 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x81, 0xF6, - 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xF6, 0xCF, - 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xF6, 0xCF, 0x89, - 0xCC, 0x94, 0xCD, 0x82, 0xF6, 0xCE, 0xA9, 0xCC, - 0x93, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xF6, 0xCE, - 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, - 0xCC, 0x94, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, - 0x93, 0xCC, 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, - 0xCC, 0x81, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, - 0x82, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82, - 0xF6, 0xCE, 0xB1, 0xCC, 0x80, 0xF6, 0xCE, 0xB1, - 0xCC, 0x81, 0xF6, 0xCE, 0xB5, 0xCC, 0x80, 0xF6, - 0xCE, 0xB5, 0xCC, 0x81, 0xF6, 0xCE, 0xB7, 0xCC, - 0x80, 0xF6, 0xCE, 0xB7, 0xCC, 0x81, 0xF6, 0xCE, - 0xB9, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, 0x81, - 0xF6, 0xCE, 0xBF, 0xCC, 0x80, 0xF6, 0xCE, 0xBF, - 0xCC, 0x81, 0xF6, 0xCF, 0x85, 0xCC, 0x80, 0xF6, - 0xCF, 0x85, 0xCC, 0x81, 0xF6, 0xCF, 0x89, 0xCC, - 0x80, 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xF6, 0xCE, - 0xB1, 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, - 0xCC, 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, - 0x93, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, - 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, - 0xB1, 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, - 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, - 0xF6, 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xCD, - 0x85, 0xF6, 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, - 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCD, - 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x85, - 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xCD, - 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, - 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x93, 0xCC, - 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, 0x94, - 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x91, 0xCC, - 0x93, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x91, - 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, - 0xB7, 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, - 0xCC, 0x94, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, - 0x93, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, - 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, - 0xB7, 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, - 0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, - 0xF6, 0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x82, 0xCD, - 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82, - 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCD, - 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x85, - 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x80, 0xCD, - 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80, - 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x93, 0xCC, - 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, 0x94, - 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0x97, 0xCC, - 0x93, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x97, - 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCF, - 0x89, 0xCC, 0x93, 0xCD, 0x85, 0xF6, 0xCF, 0x89, - 0xCC, 0x94, 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, - 0x93, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, - 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, - 0x89, 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xF6, - 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, - 0xF6, 0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xCD, - 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x82, - 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, - 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x85, - 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xCD, - 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x80, - 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, - 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, 0x94, - 0xCC, 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, 0xCC, - 0x93, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0xA9, - 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, - 0xB1, 0xCC, 0x86, 0xF6, 0xCE, 0xB1, 0xCC, 0x84, - 0xF6, 0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x85, 0xF6, - 0xCE, 0xB1, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCC, - 0x81, 0xCD, 0x85, 0xF6, 0xCE, 0xB1, 0xCD, 0x82, - 0xF6, 0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x85, 0xF6, - 0xCE, 0x91, 0xCC, 0x86, 0xF6, 0xCE, 0x91, 0xCC, - 0x84, 0xF6, 0xCE, 0x91, 0xCC, 0x80, 0xF6, 0xCE, - 0x91, 0xCC, 0x81, 0xF6, 0xCE, 0x91, 0xCD, 0x85, - 0x20, 0xCC, 0x93, 0xF6, 0xCE, 0xB9, 0x20, 0xCC, - 0x93, 0x20, 0xCD, 0x82, 0xF5, 0x05, 0xC2, 0xA8, - 0xCD, 0x82, 0x20, 0xCC, 0x88, 0xCD, 0x82, 0xF6, - 0xCE, 0xB7, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCE, - 0xB7, 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCC, 0x81, - 0xCD, 0x85, 0xF6, 0xCE, 0xB7, 0xCD, 0x82, 0xF6, - 0xCE, 0xB7, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, - 0x95, 0xCC, 0x80, 0xF6, 0xCE, 0x95, 0xCC, 0x81, - 0xF6, 0xCE, 0x97, 0xCC, 0x80, 0xF6, 0xCE, 0x97, - 0xCC, 0x81, 0xF6, 0xCE, 0x97, 0xCD, 0x85, 0xF5, - 0x06, 0xE1, 0xBE, 0xBF, 0xCC, 0x80, 0x20, 0xCC, - 0x93, 0xCC, 0x80, 0xF5, 0x06, 0xE1, 0xBE, 0xBF, - 0xCC, 0x81, 0x20, 0xCC, 0x93, 0xCC, 0x81, 0xF5, - 0x06, 0xE1, 0xBE, 0xBF, 0xCD, 0x82, 0x20, 0xCC, - 0x93, 0xCD, 0x82, 0xF6, 0xCE, 0xB9, 0xCC, 0x86, - 0xF6, 0xCE, 0xB9, 0xCC, 0x84, 0xF6, 0xCE, 0xB9, - 0xCC, 0x88, 0xCC, 0x80, 0xF6, 0xCE, 0xB9, 0xCC, - 0x88, 0xCC, 0x81, 0xF6, 0xCE, 0xB9, 0xCD, 0x82, - 0xF6, 0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x82, 0xF6, - 0xCE, 0x99, 0xCC, 0x86, 0xF6, 0xCE, 0x99, 0xCC, - 0x84, 0xF6, 0xCE, 0x99, 0xCC, 0x80, 0xF6, 0xCE, - 0x99, 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, - 0xCC, 0x80, 0x20, 0xCC, 0x94, 0xCC, 0x80, 0xF5, - 0x06, 0xE1, 0xBF, 0xBE, 0xCC, 0x81, 0x20, 0xCC, - 0x94, 0xCC, 0x81, 0xF5, 0x06, 0xE1, 0xBF, 0xBE, - 0xCD, 0x82, 0x20, 0xCC, 0x94, 0xCD, 0x82, 0xF6, - 0xCF, 0x85, 0xCC, 0x86, 0xF6, 0xCF, 0x85, 0xCC, - 0x84, 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x80, - 0xF6, 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xF6, - 0xCF, 0x81, 0xCC, 0x93, 0xF6, 0xCF, 0x81, 0xCC, - 0x94, 0xF6, 0xCF, 0x85, 0xCD, 0x82, 0xF6, 0xCF, - 0x85, 0xCC, 0x88, 0xCD, 0x82, 0xF6, 0xCE, 0xA5, - 0xCC, 0x86, 0xF6, 0xCE, 0xA5, 0xCC, 0x84, 0xF6, - 0xCE, 0xA5, 0xCC, 0x80, 0xF6, 0xCE, 0xA5, 0xCC, - 0x81, 0xF6, 0xCE, 0xA1, 0xCC, 0x94, 0xF5, 0x05, - 0xC2, 0xA8, 0xCC, 0x80, 0x20, 0xCC, 0x88, 0xCC, - 0x80, 0xF5, 0x05, 0xC2, 0xA8, 0xCC, 0x81, 0x20, - 0xCC, 0x88, 0xCC, 0x81, 0xF6, 0x60, 0xF6, 0xCF, - 0x89, 0xCC, 0x80, 0xCD, 0x85, 0xF6, 0xCF, 0x89, - 0xCD, 0x85, 0xF6, 0xCF, 0x89, 0xCC, 0x81, 0xCD, - 0x85, 0xF6, 0xCF, 0x89, 0xCD, 0x82, 0xF6, 0xCF, - 0x89, 0xCD, 0x82, 0xCD, 0x85, 0xF6, 0xCE, 0x9F, - 0xCC, 0x80, 0xF6, 0xCE, 0x9F, 0xCC, 0x81, 0xF6, - 0xCE, 0xA9, 0xCC, 0x80, 0xF6, 0xCE, 0xA9, 0xCC, - 0x81, 0xF6, 0xCE, 0xA9, 0xCD, 0x85, 0xF5, 0x03, - 0xC2, 0xB4, 0x20, 0xCC, 0x81, 0x20, 0xCC, 0x94, - 0xF5, 0x04, 0xE2, 0x80, 0x82, 0x20, 0xF5, 0x04, - 0xE2, 0x80, 0x83, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0xE2, 0x80, 0x90, - 0x20, 0xCC, 0xB3, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, - 0x2E, 0x20, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, - 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, - 0xB2, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, - 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, - 0x21, 0x21, 0x20, 0xCC, 0x85, 0x3F, 0x3F, 0x3F, - 0x21, 0x21, 0x3F, 0xE2, 0x80, 0xB2, 0xE2, 0x80, - 0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0x20, - 0x30, 0x69, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, - 0x2B, 0xE2, 0x88, 0x92, 0x3D, 0x28, 0x29, 0x6E, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2B, 0xE2, 0x88, 0x92, 0x3D, 0x28, - 0x29, 0x61, 0x65, 0x6F, 0x78, 0xC9, 0x99, 0x52, - 0x73, 0x61, 0x2F, 0x63, 0x61, 0x2F, 0x73, 0x43, - 0xC2, 0xB0, 0x43, 0x63, 0x2F, 0x6F, 0x63, 0x2F, - 0x75, 0xC6, 0x90, 0xC2, 0xB0, 0x46, 0x67, 0x48, - 0x48, 0x48, 0x68, 0xC4, 0xA7, 0x49, 0x49, 0x4C, - 0x6C, 0x4E, 0x4E, 0x6F, 0x50, 0x51, 0x52, 0x52, - 0x52, 0x53, 0x4D, 0x54, 0x45, 0x4C, 0x54, 0x4D, - 0x5A, 0xF6, 0xCE, 0xA9, 0x5A, 0xF6, 0x4B, 0xF6, - 0x41, 0xCC, 0x8A, 0x42, 0x43, 0x65, 0x45, 0x46, - 0x4D, 0x6F, 0xD7, 0x90, 0xD7, 0x91, 0xD7, 0x92, - 0xD7, 0x93, 0x69, 0x46, 0x41, 0x58, 0xCF, 0x80, - 0xCE, 0xB3, 0xCE, 0x93, 0xCE, 0xA0, 0xE2, 0x88, - 0x91, 0x44, 0x64, 0x65, 0x69, 0x6A, 0x31, 0xE2, - 0x81, 0x84, 0x33, 0x32, 0xE2, 0x81, 0x84, 0x33, - 0x31, 0xE2, 0x81, 0x84, 0x35, 0x32, 0xE2, 0x81, - 0x84, 0x35, 0x33, 0xE2, 0x81, 0x84, 0x35, 0x34, - 0xE2, 0x81, 0x84, 0x35, 0x31, 0xE2, 0x81, 0x84, - 0x36, 0x35, 0xE2, 0x81, 0x84, 0x36, 0x31, 0xE2, - 0x81, 0x84, 0x38, 0x33, 0xE2, 0x81, 0x84, 0x38, - 0x35, 0xE2, 0x81, 0x84, 0x38, 0x37, 0xE2, 0x81, - 0x84, 0x38, 0x31, 0xE2, 0x81, 0x84, 0x49, 0x49, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x56, 0x56, 0x56, - 0x49, 0x56, 0x49, 0x49, 0x56, 0x49, 0x49, 0x49, - 0x49, 0x58, 0x58, 0x58, 0x49, 0x58, 0x49, 0x49, - 0x4C, 0x43, 0x44, 0x4D, 0x69, 0x69, 0x69, 0x69, - 0x69, 0x69, 0x69, 0x76, 0x76, 0x76, 0x69, 0x76, - 0x69, 0x69, 0x76, 0x69, 0x69, 0x69, 0x69, 0x78, - 0x78, 0x78, 0x69, 0x78, 0x69, 0x69, 0x6C, 0x63, - 0x64, 0x6D, 0xF6, 0xE2, 0x86, 0x90, 0xCC, 0xB8, - 0xF6, 0xE2, 0x86, 0x92, 0xCC, 0xB8, 0xF6, 0xE2, - 0x86, 0x94, 0xCC, 0xB8, 0xF6, 0xE2, 0x87, 0x90, - 0xCC, 0xB8, 0xF6, 0xE2, 0x87, 0x94, 0xCC, 0xB8, - 0xF6, 0xE2, 0x87, 0x92, 0xCC, 0xB8, 0xF6, 0xE2, - 0x88, 0x83, 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0x88, - 0xCC, 0xB8, 0xF6, 0xE2, 0x88, 0x8B, 0xCC, 0xB8, - 0xF6, 0xE2, 0x88, 0xA3, 0xCC, 0xB8, 0xF6, 0xE2, - 0x88, 0xA5, 0xCC, 0xB8, 0xE2, 0x88, 0xAB, 0xE2, - 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, - 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAE, 0xE2, 0x88, - 0xAE, 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, 0xE2, - 0x88, 0xAE, 0xF6, 0xE2, 0x88, 0xBC, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0x83, 0xCC, 0xB8, 0xF6, 0xE2, - 0x89, 0x85, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x88, - 0xCC, 0xB8, 0xF6, 0x3D, 0xCC, 0xB8, 0xF6, 0xE2, - 0x89, 0xA1, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0x8D, - 0xCC, 0xB8, 0xF6, 0x3C, 0xCC, 0xB8, 0xF6, 0x3E, - 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xA4, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0xA5, 0xCC, 0xB8, 0xF6, 0xE2, - 0x89, 0xB2, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB3, - 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xB6, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0xB7, 0xCC, 0xB8, 0xF6, 0xE2, - 0x89, 0xBA, 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBB, - 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x82, 0xCC, 0xB8, - 0xF6, 0xE2, 0x8A, 0x83, 0xCC, 0xB8, 0xF6, 0xE2, - 0x8A, 0x86, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x87, - 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xA2, 0xCC, 0xB8, - 0xF6, 0xE2, 0x8A, 0xA8, 0xCC, 0xB8, 0xF6, 0xE2, - 0x8A, 0xA9, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xAB, - 0xCC, 0xB8, 0xF6, 0xE2, 0x89, 0xBC, 0xCC, 0xB8, - 0xF6, 0xE2, 0x89, 0xBD, 0xCC, 0xB8, 0xF6, 0xE2, - 0x8A, 0x91, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0x92, - 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB2, 0xCC, 0xB8, - 0xF6, 0xE2, 0x8A, 0xB3, 0xCC, 0xB8, 0xF6, 0xE2, - 0x8A, 0xB4, 0xCC, 0xB8, 0xF6, 0xE2, 0x8A, 0xB5, - 0xCC, 0xB8, 0xF6, 0xE3, 0x80, 0x88, 0xF6, 0xE3, - 0x80, 0x89, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x31, 0x30, 0x31, 0x31, 0x31, - 0x32, 0x31, 0x33, 0x31, 0x34, 0x31, 0x35, 0x31, - 0x36, 0x31, 0x37, 0x31, 0x38, 0x31, 0x39, 0x32, - 0x30, 0x28, 0x31, 0x29, 0x28, 0x32, 0x29, 0x28, - 0x33, 0x29, 0x28, 0x34, 0x29, 0x28, 0x35, 0x29, - 0x28, 0x36, 0x29, 0x28, 0x37, 0x29, 0x28, 0x38, - 0x29, 0x28, 0x39, 0x29, 0x28, 0x31, 0x30, 0x29, - 0x28, 0x31, 0x31, 0x29, 0x28, 0x31, 0x32, 0x29, - 0x28, 0x31, 0x33, 0x29, 0x28, 0x31, 0x34, 0x29, - 0x28, 0x31, 0x35, 0x29, 0x28, 0x31, 0x36, 0x29, - 0x28, 0x31, 0x37, 0x29, 0x28, 0x31, 0x38, 0x29, - 0x28, 0x31, 0x39, 0x29, 0x28, 0x32, 0x30, 0x29, - 0x31, 0x2E, 0x32, 0x2E, 0x33, 0x2E, 0x34, 0x2E, - 0x35, 0x2E, 0x36, 0x2E, 0x37, 0x2E, 0x38, 0x2E, - 0x39, 0x2E, 0x31, 0x30, 0x2E, 0x31, 0x31, 0x2E, - 0x31, 0x32, 0x2E, 0x31, 0x33, 0x2E, 0x31, 0x34, - 0x2E, 0x31, 0x35, 0x2E, 0x31, 0x36, 0x2E, 0x31, - 0x37, 0x2E, 0x31, 0x38, 0x2E, 0x31, 0x39, 0x2E, - 0x32, 0x30, 0x2E, 0x28, 0x61, 0x29, 0x28, 0x62, - 0x29, 0x28, 0x63, 0x29, 0x28, 0x64, 0x29, 0x28, - 0x65, 0x29, 0x28, 0x66, 0x29, 0x28, 0x67, 0x29, - 0x28, 0x68, 0x29, 0x28, 0x69, 0x29, 0x28, 0x6A, - 0x29, 0x28, 0x6B, 0x29, 0x28, 0x6C, 0x29, 0x28, - 0x6D, 0x29, 0x28, 0x6E, 0x29, 0x28, 0x6F, 0x29, - 0x28, 0x70, 0x29, 0x28, 0x71, 0x29, 0x28, 0x72, - 0x29, 0x28, 0x73, 0x29, 0x28, 0x74, 0x29, 0x28, - 0x75, 0x29, 0x28, 0x76, 0x29, 0x28, 0x77, 0x29, - 0x28, 0x78, 0x29, 0x28, 0x79, 0x29, 0x28, 0x7A, - 0x29, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x30, 0xE2, 0x88, - 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, - 0x88, 0xAB, 0x3A, 0x3A, 0x3D, 0x3D, 0x3D, 0x3D, - 0x3D, 0x3D, 0xF6, 0xE2, 0xAB, 0x9D, 0xCC, 0xB8, - 0xE2, 0xB5, 0xA1, 0xE6, 0xAF, 0x8D, 0xE9, 0xBE, - 0x9F, 0xE4, 0xB8, 0x80, 0xE4, 0xB8, 0xA8, 0xE4, - 0xB8, 0xB6, 0xE4, 0xB8, 0xBF, 0xE4, 0xB9, 0x99, - 0xE4, 0xBA, 0x85, 0xE4, 0xBA, 0x8C, 0xE4, 0xBA, - 0xA0, 0xE4, 0xBA, 0xBA, 0xE5, 0x84, 0xBF, 0xE5, - 0x85, 0xA5, 0xE5, 0x85, 0xAB, 0xE5, 0x86, 0x82, - 0xE5, 0x86, 0x96, 0xE5, 0x86, 0xAB, 0xE5, 0x87, - 0xA0, 0xE5, 0x87, 0xB5, 0xE5, 0x88, 0x80, 0xE5, - 0x8A, 0x9B, 0xE5, 0x8B, 0xB9, 0xE5, 0x8C, 0x95, - 0xE5, 0x8C, 0x9A, 0xE5, 0x8C, 0xB8, 0xE5, 0x8D, - 0x81, 0xE5, 0x8D, 0x9C, 0xE5, 0x8D, 0xA9, 0xE5, - 0x8E, 0x82, 0xE5, 0x8E, 0xB6, 0xE5, 0x8F, 0x88, - 0xE5, 0x8F, 0xA3, 0xE5, 0x9B, 0x97, 0xE5, 0x9C, - 0x9F, 0xE5, 0xA3, 0xAB, 0xE5, 0xA4, 0x82, 0xE5, - 0xA4, 0x8A, 0xE5, 0xA4, 0x95, 0xE5, 0xA4, 0xA7, - 0xE5, 0xA5, 0xB3, 0xE5, 0xAD, 0x90, 0xE5, 0xAE, - 0x80, 0xE5, 0xAF, 0xB8, 0xE5, 0xB0, 0x8F, 0xE5, - 0xB0, 0xA2, 0xE5, 0xB0, 0xB8, 0xE5, 0xB1, 0xAE, - 0xE5, 0xB1, 0xB1, 0xE5, 0xB7, 0x9B, 0xE5, 0xB7, - 0xA5, 0xE5, 0xB7, 0xB1, 0xE5, 0xB7, 0xBE, 0xE5, - 0xB9, 0xB2, 0xE5, 0xB9, 0xBA, 0xE5, 0xB9, 0xBF, - 0xE5, 0xBB, 0xB4, 0xE5, 0xBB, 0xBE, 0xE5, 0xBC, - 0x8B, 0xE5, 0xBC, 0x93, 0xE5, 0xBD, 0x90, 0xE5, - 0xBD, 0xA1, 0xE5, 0xBD, 0xB3, 0xE5, 0xBF, 0x83, - 0xE6, 0x88, 0x88, 0xE6, 0x88, 0xB6, 0xE6, 0x89, - 0x8B, 0xE6, 0x94, 0xAF, 0xE6, 0x94, 0xB4, 0xE6, - 0x96, 0x87, 0xE6, 0x96, 0x97, 0xE6, 0x96, 0xA4, - 0xE6, 0x96, 0xB9, 0xE6, 0x97, 0xA0, 0xE6, 0x97, - 0xA5, 0xE6, 0x9B, 0xB0, 0xE6, 0x9C, 0x88, 0xE6, - 0x9C, 0xA8, 0xE6, 0xAC, 0xA0, 0xE6, 0xAD, 0xA2, - 0xE6, 0xAD, 0xB9, 0xE6, 0xAE, 0xB3, 0xE6, 0xAF, - 0x8B, 0xE6, 0xAF, 0x94, 0xE6, 0xAF, 0x9B, 0xE6, - 0xB0, 0x8F, 0xE6, 0xB0, 0x94, 0xE6, 0xB0, 0xB4, - 0xE7, 0x81, 0xAB, 0xE7, 0x88, 0xAA, 0xE7, 0x88, - 0xB6, 0xE7, 0x88, 0xBB, 0xE7, 0x88, 0xBF, 0xE7, - 0x89, 0x87, 0xE7, 0x89, 0x99, 0xE7, 0x89, 0x9B, - 0xE7, 0x8A, 0xAC, 0xE7, 0x8E, 0x84, 0xE7, 0x8E, - 0x89, 0xE7, 0x93, 0x9C, 0xE7, 0x93, 0xA6, 0xE7, - 0x94, 0x98, 0xE7, 0x94, 0x9F, 0xE7, 0x94, 0xA8, - 0xE7, 0x94, 0xB0, 0xE7, 0x96, 0x8B, 0xE7, 0x96, - 0x92, 0xE7, 0x99, 0xB6, 0xE7, 0x99, 0xBD, 0xE7, - 0x9A, 0xAE, 0xE7, 0x9A, 0xBF, 0xE7, 0x9B, 0xAE, - 0xE7, 0x9F, 0x9B, 0xE7, 0x9F, 0xA2, 0xE7, 0x9F, - 0xB3, 0xE7, 0xA4, 0xBA, 0xE7, 0xA6, 0xB8, 0xE7, - 0xA6, 0xBE, 0xE7, 0xA9, 0xB4, 0xE7, 0xAB, 0x8B, - 0xE7, 0xAB, 0xB9, 0xE7, 0xB1, 0xB3, 0xE7, 0xB3, - 0xB8, 0xE7, 0xBC, 0xB6, 0xE7, 0xBD, 0x91, 0xE7, - 0xBE, 0x8A, 0xE7, 0xBE, 0xBD, 0xE8, 0x80, 0x81, - 0xE8, 0x80, 0x8C, 0xE8, 0x80, 0x92, 0xE8, 0x80, - 0xB3, 0xE8, 0x81, 0xBF, 0xE8, 0x82, 0x89, 0xE8, - 0x87, 0xA3, 0xE8, 0x87, 0xAA, 0xE8, 0x87, 0xB3, - 0xE8, 0x87, 0xBC, 0xE8, 0x88, 0x8C, 0xE8, 0x88, - 0x9B, 0xE8, 0x88, 0x9F, 0xE8, 0x89, 0xAE, 0xE8, - 0x89, 0xB2, 0xE8, 0x89, 0xB8, 0xE8, 0x99, 0x8D, - 0xE8, 0x99, 0xAB, 0xE8, 0xA1, 0x80, 0xE8, 0xA1, - 0x8C, 0xE8, 0xA1, 0xA3, 0xE8, 0xA5, 0xBE, 0xE8, - 0xA6, 0x8B, 0xE8, 0xA7, 0x92, 0xE8, 0xA8, 0x80, - 0xE8, 0xB0, 0xB7, 0xE8, 0xB1, 0x86, 0xE8, 0xB1, - 0x95, 0xE8, 0xB1, 0xB8, 0xE8, 0xB2, 0x9D, 0xE8, - 0xB5, 0xA4, 0xE8, 0xB5, 0xB0, 0xE8, 0xB6, 0xB3, - 0xE8, 0xBA, 0xAB, 0xE8, 0xBB, 0x8A, 0xE8, 0xBE, - 0x9B, 0xE8, 0xBE, 0xB0, 0xE8, 0xBE, 0xB5, 0xE9, - 0x82, 0x91, 0xE9, 0x85, 0x89, 0xE9, 0x87, 0x86, - 0xE9, 0x87, 0x8C, 0xE9, 0x87, 0x91, 0xE9, 0x95, - 0xB7, 0xE9, 0x96, 0x80, 0xE9, 0x98, 0x9C, 0xE9, - 0x9A, 0xB6, 0xE9, 0x9A, 0xB9, 0xE9, 0x9B, 0xA8, - 0xE9, 0x9D, 0x91, 0xE9, 0x9D, 0x9E, 0xE9, 0x9D, - 0xA2, 0xE9, 0x9D, 0xA9, 0xE9, 0x9F, 0x8B, 0xE9, - 0x9F, 0xAD, 0xE9, 0x9F, 0xB3, 0xE9, 0xA0, 0x81, - 0xE9, 0xA2, 0xA8, 0xE9, 0xA3, 0x9B, 0xE9, 0xA3, - 0x9F, 0xE9, 0xA6, 0x96, 0xE9, 0xA6, 0x99, 0xE9, - 0xA6, 0xAC, 0xE9, 0xAA, 0xA8, 0xE9, 0xAB, 0x98, - 0xE9, 0xAB, 0x9F, 0xE9, 0xAC, 0xA5, 0xE9, 0xAC, - 0xAF, 0xE9, 0xAC, 0xB2, 0xE9, 0xAC, 0xBC, 0xE9, - 0xAD, 0x9A, 0xE9, 0xB3, 0xA5, 0xE9, 0xB9, 0xB5, - 0xE9, 0xB9, 0xBF, 0xE9, 0xBA, 0xA5, 0xE9, 0xBA, - 0xBB, 0xE9, 0xBB, 0x83, 0xE9, 0xBB, 0x8D, 0xE9, - 0xBB, 0x91, 0xE9, 0xBB, 0xB9, 0xE9, 0xBB, 0xBD, - 0xE9, 0xBC, 0x8E, 0xE9, 0xBC, 0x93, 0xE9, 0xBC, - 0xA0, 0xE9, 0xBC, 0xBB, 0xE9, 0xBD, 0x8A, 0xE9, - 0xBD, 0x92, 0xE9, 0xBE, 0x8D, 0xE9, 0xBE, 0x9C, - 0xE9, 0xBE, 0xA0, 0x20, 0xE3, 0x80, 0x92, 0xE5, - 0x8D, 0x81, 0xE5, 0x8D, 0x84, 0xE5, 0x8D, 0x85, - 0xF6, 0xE3, 0x81, 0x8B, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x81, 0x8D, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x81, 0x8F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, - 0x91, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x93, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x95, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x81, 0x97, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x81, 0x99, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x81, 0x9B, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x81, 0x9D, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x81, 0x9F, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, - 0xA1, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA4, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA6, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xA8, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x9A, 0xF6, - 0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x81, 0xB2, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x81, - 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xB5, - 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x81, 0xB8, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x81, 0xB8, 0xE3, 0x82, - 0x9A, 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x9A, 0xF6, - 0xE3, 0x81, 0x86, 0xE3, 0x82, 0x99, 0x20, 0xE3, - 0x82, 0x99, 0x20, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, - 0x82, 0x9D, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0x88, - 0xE3, 0x82, 0x8A, 0xF6, 0xE3, 0x82, 0xAB, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xAD, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x82, 0xB5, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, - 0xB7, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xB9, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBB, 0xE3, - 0x82, 0x99, 0xF6, 0xE3, 0x82, 0xBD, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x83, 0x81, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x83, 0x84, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x83, 0x86, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, - 0x88, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x8F, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x8F, 0xE3, - 0x82, 0x9A, 0xF6, 0xE3, 0x83, 0x92, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, - 0xF6, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, - 0x83, 0x98, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, - 0x98, 0xE3, 0x82, 0x9A, 0xF6, 0xE3, 0x83, 0x9B, - 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, 0x9B, 0xE3, - 0x82, 0x9A, 0xF6, 0xE3, 0x82, 0xA6, 0xE3, 0x82, - 0x99, 0xF6, 0xE3, 0x83, 0xAF, 0xE3, 0x82, 0x99, - 0xF6, 0xE3, 0x83, 0xB0, 0xE3, 0x82, 0x99, 0xF6, - 0xE3, 0x83, 0xB1, 0xE3, 0x82, 0x99, 0xF6, 0xE3, - 0x83, 0xB2, 0xE3, 0x82, 0x99, 0xF6, 0xE3, 0x83, - 0xBD, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xB3, 0xE3, - 0x83, 0x88, 0xE1, 0x84, 0x80, 0xE1, 0x84, 0x81, - 0xE1, 0x86, 0xAA, 0xE1, 0x84, 0x82, 0xE1, 0x86, - 0xAC, 0xE1, 0x86, 0xAD, 0xE1, 0x84, 0x83, 0xE1, - 0x84, 0x84, 0xE1, 0x84, 0x85, 0xE1, 0x86, 0xB0, - 0xE1, 0x86, 0xB1, 0xE1, 0x86, 0xB2, 0xE1, 0x86, - 0xB3, 0xE1, 0x86, 0xB4, 0xE1, 0x86, 0xB5, 0xE1, - 0x84, 0x9A, 0xE1, 0x84, 0x86, 0xE1, 0x84, 0x87, - 0xE1, 0x84, 0x88, 0xE1, 0x84, 0xA1, 0xE1, 0x84, - 0x89, 0xE1, 0x84, 0x8A, 0xE1, 0x84, 0x8B, 0xE1, - 0x84, 0x8C, 0xE1, 0x84, 0x8D, 0xE1, 0x84, 0x8E, - 0xE1, 0x84, 0x8F, 0xE1, 0x84, 0x90, 0xE1, 0x84, - 0x91, 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xA1, 0xE1, - 0x85, 0xA2, 0xE1, 0x85, 0xA3, 0xE1, 0x85, 0xA4, - 0xE1, 0x85, 0xA5, 0xE1, 0x85, 0xA6, 0xE1, 0x85, - 0xA7, 0xE1, 0x85, 0xA8, 0xE1, 0x85, 0xA9, 0xE1, - 0x85, 0xAA, 0xE1, 0x85, 0xAB, 0xE1, 0x85, 0xAC, - 0xE1, 0x85, 0xAD, 0xE1, 0x85, 0xAE, 0xE1, 0x85, - 0xAF, 0xE1, 0x85, 0xB0, 0xE1, 0x85, 0xB1, 0xE1, - 0x85, 0xB2, 0xE1, 0x85, 0xB3, 0xE1, 0x85, 0xB4, - 0xE1, 0x85, 0xB5, 0xE1, 0x85, 0xA0, 0xE1, 0x84, - 0x94, 0xE1, 0x84, 0x95, 0xE1, 0x87, 0x87, 0xE1, - 0x87, 0x88, 0xE1, 0x87, 0x8C, 0xE1, 0x87, 0x8E, - 0xE1, 0x87, 0x93, 0xE1, 0x87, 0x97, 0xE1, 0x87, - 0x99, 0xE1, 0x84, 0x9C, 0xE1, 0x87, 0x9D, 0xE1, - 0x87, 0x9F, 0xE1, 0x84, 0x9D, 0xE1, 0x84, 0x9E, - 0xE1, 0x84, 0xA0, 0xE1, 0x84, 0xA2, 0xE1, 0x84, - 0xA3, 0xE1, 0x84, 0xA7, 0xE1, 0x84, 0xA9, 0xE1, - 0x84, 0xAB, 0xE1, 0x84, 0xAC, 0xE1, 0x84, 0xAD, - 0xE1, 0x84, 0xAE, 0xE1, 0x84, 0xAF, 0xE1, 0x84, - 0xB2, 0xE1, 0x84, 0xB6, 0xE1, 0x85, 0x80, 0xE1, - 0x85, 0x87, 0xE1, 0x85, 0x8C, 0xE1, 0x87, 0xB1, - 0xE1, 0x87, 0xB2, 0xE1, 0x85, 0x97, 0xE1, 0x85, - 0x98, 0xE1, 0x85, 0x99, 0xE1, 0x86, 0x84, 0xE1, - 0x86, 0x85, 0xE1, 0x86, 0x88, 0xE1, 0x86, 0x91, - 0xE1, 0x86, 0x92, 0xE1, 0x86, 0x94, 0xE1, 0x86, - 0x9E, 0xE1, 0x86, 0xA1, 0xE4, 0xB8, 0x80, 0xE4, - 0xBA, 0x8C, 0xE4, 0xB8, 0x89, 0xE5, 0x9B, 0x9B, - 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, 0xAD, 0xE4, 0xB8, - 0x8B, 0xE7, 0x94, 0xB2, 0xE4, 0xB9, 0x99, 0xE4, - 0xB8, 0x99, 0xE4, 0xB8, 0x81, 0xE5, 0xA4, 0xA9, - 0xE5, 0x9C, 0xB0, 0xE4, 0xBA, 0xBA, 0x28, 0xE1, - 0x84, 0x80, 0x29, 0x28, 0xE1, 0x84, 0x82, 0x29, - 0x28, 0xE1, 0x84, 0x83, 0x29, 0x28, 0xE1, 0x84, - 0x85, 0x29, 0x28, 0xE1, 0x84, 0x86, 0x29, 0x28, - 0xE1, 0x84, 0x87, 0x29, 0x28, 0xE1, 0x84, 0x89, - 0x29, 0x28, 0xE1, 0x84, 0x8B, 0x29, 0x28, 0xE1, - 0x84, 0x8C, 0x29, 0x28, 0xE1, 0x84, 0x8E, 0x29, - 0x28, 0xE1, 0x84, 0x8F, 0x29, 0x28, 0xE1, 0x84, - 0x90, 0x29, 0x28, 0xE1, 0x84, 0x91, 0x29, 0x28, - 0xE1, 0x84, 0x92, 0x29, 0x28, 0xE1, 0x84, 0x80, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x82, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x83, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x85, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x86, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x87, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x89, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8B, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8C, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8E, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8F, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x90, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x91, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x92, - 0xE1, 0x85, 0xA1, 0x29, 0x28, 0xE1, 0x84, 0x8C, - 0xE1, 0x85, 0xAE, 0x29, 0x28, 0xE1, 0x84, 0x8B, - 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x8C, 0xE1, 0x85, - 0xA5, 0xE1, 0x86, 0xAB, 0x29, 0x28, 0xE1, 0x84, - 0x8B, 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x92, 0xE1, - 0x85, 0xAE, 0x29, 0x28, 0xE4, 0xB8, 0x80, 0x29, - 0x28, 0xE4, 0xBA, 0x8C, 0x29, 0x28, 0xE4, 0xB8, - 0x89, 0x29, 0x28, 0xE5, 0x9B, 0x9B, 0x29, 0x28, - 0xE4, 0xBA, 0x94, 0x29, 0x28, 0xE5, 0x85, 0xAD, - 0x29, 0x28, 0xE4, 0xB8, 0x83, 0x29, 0x28, 0xE5, - 0x85, 0xAB, 0x29, 0x28, 0xE4, 0xB9, 0x9D, 0x29, - 0x28, 0xE5, 0x8D, 0x81, 0x29, 0x28, 0xE6, 0x9C, - 0x88, 0x29, 0x28, 0xE7, 0x81, 0xAB, 0x29, 0x28, - 0xE6, 0xB0, 0xB4, 0x29, 0x28, 0xE6, 0x9C, 0xA8, - 0x29, 0x28, 0xE9, 0x87, 0x91, 0x29, 0x28, 0xE5, - 0x9C, 0x9F, 0x29, 0x28, 0xE6, 0x97, 0xA5, 0x29, - 0x28, 0xE6, 0xA0, 0xAA, 0x29, 0x28, 0xE6, 0x9C, - 0x89, 0x29, 0x28, 0xE7, 0xA4, 0xBE, 0x29, 0x28, - 0xE5, 0x90, 0x8D, 0x29, 0x28, 0xE7, 0x89, 0xB9, - 0x29, 0x28, 0xE8, 0xB2, 0xA1, 0x29, 0x28, 0xE7, - 0xA5, 0x9D, 0x29, 0x28, 0xE5, 0x8A, 0xB4, 0x29, - 0x28, 0xE4, 0xBB, 0xA3, 0x29, 0x28, 0xE5, 0x91, - 0xBC, 0x29, 0x28, 0xE5, 0xAD, 0xA6, 0x29, 0x28, - 0xE7, 0x9B, 0xA3, 0x29, 0x28, 0xE4, 0xBC, 0x81, - 0x29, 0x28, 0xE8, 0xB3, 0x87, 0x29, 0x28, 0xE5, - 0x8D, 0x94, 0x29, 0x28, 0xE7, 0xA5, 0xAD, 0x29, - 0x28, 0xE4, 0xBC, 0x91, 0x29, 0x28, 0xE8, 0x87, - 0xAA, 0x29, 0x28, 0xE8, 0x87, 0xB3, 0x29, 0x50, - 0x54, 0x45, 0x32, 0x31, 0x32, 0x32, 0x32, 0x33, - 0x32, 0x34, 0x32, 0x35, 0x32, 0x36, 0x32, 0x37, - 0x32, 0x38, 0x32, 0x39, 0x33, 0x30, 0x33, 0x31, - 0x33, 0x32, 0x33, 0x33, 0x33, 0x34, 0x33, 0x35, - 0xE1, 0x84, 0x80, 0xE1, 0x84, 0x82, 0xE1, 0x84, - 0x83, 0xE1, 0x84, 0x85, 0xE1, 0x84, 0x86, 0xE1, - 0x84, 0x87, 0xE1, 0x84, 0x89, 0xE1, 0x84, 0x8B, - 0xE1, 0x84, 0x8C, 0xE1, 0x84, 0x8E, 0xE1, 0x84, - 0x8F, 0xE1, 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, - 0x84, 0x92, 0xE1, 0x84, 0x80, 0xE1, 0x85, 0xA1, - 0xE1, 0x84, 0x82, 0xE1, 0x85, 0xA1, 0xE1, 0x84, - 0x83, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x85, 0xE1, - 0x85, 0xA1, 0xE1, 0x84, 0x86, 0xE1, 0x85, 0xA1, - 0xE1, 0x84, 0x87, 0xE1, 0x85, 0xA1, 0xE1, 0x84, - 0x89, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x8B, 0xE1, - 0x85, 0xA1, 0xE1, 0x84, 0x8C, 0xE1, 0x85, 0xA1, - 0xE1, 0x84, 0x8E, 0xE1, 0x85, 0xA1, 0xE1, 0x84, - 0x8F, 0xE1, 0x85, 0xA1, 0xE1, 0x84, 0x90, 0xE1, - 0x85, 0xA1, 0xE1, 0x84, 0x91, 0xE1, 0x85, 0xA1, - 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xA1, 0xE1, 0x84, - 0x8E, 0xE1, 0x85, 0xA1, 0xE1, 0x86, 0xB7, 0xE1, - 0x84, 0x80, 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x8C, - 0xE1, 0x85, 0xAE, 0xE1, 0x84, 0x8B, 0xE1, 0x85, - 0xB4, 0xE1, 0x84, 0x8B, 0xE1, 0x85, 0xAE, 0xE4, - 0xB8, 0x80, 0xE4, 0xBA, 0x8C, 0xE4, 0xB8, 0x89, - 0xE5, 0x9B, 0x9B, 0xE4, 0xBA, 0x94, 0xE5, 0x85, - 0xAD, 0xE4, 0xB8, 0x83, 0xE5, 0x85, 0xAB, 0xE4, - 0xB9, 0x9D, 0xE5, 0x8D, 0x81, 0xE6, 0x9C, 0x88, - 0xE7, 0x81, 0xAB, 0xE6, 0xB0, 0xB4, 0xE6, 0x9C, - 0xA8, 0xE9, 0x87, 0x91, 0xE5, 0x9C, 0x9F, 0xE6, - 0x97, 0xA5, 0xE6, 0xA0, 0xAA, 0xE6, 0x9C, 0x89, - 0xE7, 0xA4, 0xBE, 0xE5, 0x90, 0x8D, 0xE7, 0x89, - 0xB9, 0xE8, 0xB2, 0xA1, 0xE7, 0xA5, 0x9D, 0xE5, - 0x8A, 0xB4, 0xE7, 0xA7, 0x98, 0xE7, 0x94, 0xB7, - 0xE5, 0xA5, 0xB3, 0xE9, 0x81, 0xA9, 0xE5, 0x84, - 0xAA, 0xE5, 0x8D, 0xB0, 0xE6, 0xB3, 0xA8, 0xE9, - 0xA0, 0x85, 0xE4, 0xBC, 0x91, 0xE5, 0x86, 0x99, - 0xE6, 0xAD, 0xA3, 0xE4, 0xB8, 0x8A, 0xE4, 0xB8, - 0xAD, 0xE4, 0xB8, 0x8B, 0xE5, 0xB7, 0xA6, 0xE5, - 0x8F, 0xB3, 0xE5, 0x8C, 0xBB, 0xE5, 0xAE, 0x97, - 0xE5, 0xAD, 0xA6, 0xE7, 0x9B, 0xA3, 0xE4, 0xBC, - 0x81, 0xE8, 0xB3, 0x87, 0xE5, 0x8D, 0x94, 0xE5, - 0xA4, 0x9C, 0x33, 0x36, 0x33, 0x37, 0x33, 0x38, - 0x33, 0x39, 0x34, 0x30, 0x34, 0x31, 0x34, 0x32, - 0x34, 0x33, 0x34, 0x34, 0x34, 0x35, 0x34, 0x36, - 0x34, 0x37, 0x34, 0x38, 0x34, 0x39, 0x35, 0x30, - 0x31, 0xE6, 0x9C, 0x88, 0x32, 0xE6, 0x9C, 0x88, - 0x33, 0xE6, 0x9C, 0x88, 0x34, 0xE6, 0x9C, 0x88, - 0x35, 0xE6, 0x9C, 0x88, 0x36, 0xE6, 0x9C, 0x88, - 0x37, 0xE6, 0x9C, 0x88, 0x38, 0xE6, 0x9C, 0x88, - 0x39, 0xE6, 0x9C, 0x88, 0x31, 0x30, 0xE6, 0x9C, - 0x88, 0x31, 0x31, 0xE6, 0x9C, 0x88, 0x31, 0x32, - 0xE6, 0x9C, 0x88, 0x48, 0x67, 0x65, 0x72, 0x67, - 0x65, 0x56, 0x4C, 0x54, 0x44, 0xE3, 0x82, 0xA2, - 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xA6, 0xE3, 0x82, - 0xA8, 0xE3, 0x82, 0xAA, 0xE3, 0x82, 0xAB, 0xE3, - 0x82, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0xB1, - 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0xB5, 0xE3, 0x82, - 0xB7, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xBB, 0xE3, - 0x82, 0xBD, 0xE3, 0x82, 0xBF, 0xE3, 0x83, 0x81, - 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x86, 0xE3, 0x83, - 0x88, 0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8B, 0xE3, - 0x83, 0x8C, 0xE3, 0x83, 0x8D, 0xE3, 0x83, 0x8E, - 0xE3, 0x83, 0x8F, 0xE3, 0x83, 0x92, 0xE3, 0x83, - 0x95, 0xE3, 0x83, 0x98, 0xE3, 0x83, 0x9B, 0xE3, - 0x83, 0x9E, 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xA0, - 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xA2, 0xE3, 0x83, - 0xA4, 0xE3, 0x83, 0xA6, 0xE3, 0x83, 0xA8, 0xE3, - 0x83, 0xA9, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xAB, - 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xAD, 0xE3, 0x83, - 0xAF, 0xE3, 0x83, 0xB0, 0xE3, 0x83, 0xB1, 0xE3, - 0x83, 0xB2, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0x8F, - 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x83, - 0x88, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xAB, 0xE3, - 0x83, 0x95, 0xE3, 0x82, 0xA1, 0xE3, 0x82, 0xA2, - 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x98, 0xE3, 0x82, - 0x9A, 0xE3, 0x82, 0xA2, 0xE3, 0x82, 0xA2, 0xE3, - 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xA4, - 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0xB3, 0xE3, 0x82, - 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xA4, 0xE3, - 0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, 0x82, 0xA6, - 0xE3, 0x82, 0xA9, 0xE3, 0x83, 0xB3, 0xE3, 0x82, - 0xA8, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xAF, 0xE3, - 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, - 0xE3, 0x82, 0xA8, 0xE3, 0x83, 0xBC, 0xE3, 0x82, - 0xAB, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAA, 0xE3, - 0x83, 0xB3, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xAA, - 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xA0, 0xE3, 0x82, - 0xAB, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xAA, 0xE3, - 0x82, 0xAB, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0x83, - 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xAB, 0xE3, 0x83, - 0xAD, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, - 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAD, - 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAB, 0xE3, 0x82, - 0x99, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x9E, 0xE3, - 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xAB, - 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xAD, 0xE3, 0x82, - 0x99, 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0xBC, 0xE3, - 0x82, 0xAD, 0xE3, 0x83, 0xA5, 0xE3, 0x83, 0xAA, - 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAD, 0xE3, 0x82, - 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xBF, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAD, - 0xE3, 0x83, 0xAD, 0xE3, 0x82, 0xAD, 0xE3, 0x83, - 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, - 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0xE3, 0x82, 0xAD, - 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xA1, 0xE3, 0x83, - 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0xE3, - 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xAF, - 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, 0x82, - 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9, 0xE3, - 0x83, 0xA0, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, - 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0xE3, 0x83, - 0x88, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAF, 0xE3, - 0x83, 0xAB, 0xE3, 0x82, 0xBB, 0xE3, 0x82, 0x99, - 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xAD, 0xE3, 0x82, - 0xAF, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xBC, 0xE3, - 0x83, 0x8D, 0xE3, 0x82, 0xB1, 0xE3, 0x83, 0xBC, - 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xB3, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0x8A, 0xE3, 0x82, 0xB3, 0xE3, - 0x83, 0xBC, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, - 0xE3, 0x82, 0xB5, 0xE3, 0x82, 0xA4, 0xE3, 0x82, - 0xAF, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xB5, 0xE3, - 0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, 0x83, 0xBC, - 0xE3, 0x83, 0xA0, 0xE3, 0x82, 0xB7, 0xE3, 0x83, - 0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAF, 0xE3, - 0x82, 0x99, 0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3, - 0xE3, 0x83, 0x81, 0xE3, 0x82, 0xBB, 0xE3, 0x83, - 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xBF, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB9, - 0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0xE3, 0x82, - 0xB7, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, - 0x83, 0xAB, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, - 0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8E, 0xE3, 0x83, - 0x8E, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, - 0x83, 0x8F, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0x84, - 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, 0x83, - 0xBC, 0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3, 0xE3, - 0x83, 0x88, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, - 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x84, 0xE3, 0x83, - 0x8F, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, - 0x83, 0xAC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, - 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xA2, 0xE3, 0x82, - 0xB9, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0xE3, - 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xAF, - 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, - 0x9A, 0xE3, 0x82, 0xB3, 0xE3, 0x83, 0x92, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x95, - 0xE3, 0x82, 0xA1, 0xE3, 0x83, 0xA9, 0xE3, 0x83, - 0x83, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, - 0x83, 0x95, 0xE3, 0x82, 0xA3, 0xE3, 0x83, 0xBC, - 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x95, 0xE3, 0x82, - 0x99, 0xE3, 0x83, 0x83, 0xE3, 0x82, 0xB7, 0xE3, - 0x82, 0xA7, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x95, - 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xB3, 0xE3, 0x83, - 0x98, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0xBF, 0xE3, - 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x98, - 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xBD, 0xE3, 0x83, - 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0x8B, 0xE3, - 0x83, 0x92, 0xE3, 0x83, 0x98, 0xE3, 0x83, 0xAB, - 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x98, 0xE3, 0x82, - 0x9A, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xB9, 0xE3, - 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, - 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0x98, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, - 0x82, 0xBF, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, - 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3, 0xE3, 0x83, - 0x88, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x99, 0xE3, - 0x83, 0xAB, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0x9B, - 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x9B, 0xE3, 0x82, - 0x9A, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xBC, - 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x9B, 0xE3, 0x83, - 0xBC, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x9E, 0xE3, - 0x82, 0xA4, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, - 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xA4, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0x83, 0xE3, - 0x83, 0x8F, 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0xAB, - 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0x9E, 0xE3, 0x83, - 0xB3, 0xE3, 0x82, 0xB7, 0xE3, 0x83, 0xA7, 0xE3, - 0x83, 0xB3, 0xE3, 0x83, 0x9F, 0xE3, 0x82, 0xAF, - 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3, 0xE3, 0x83, - 0x9F, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0x9F, 0xE3, - 0x83, 0xAA, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, - 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, 0x83, - 0xA1, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, - 0x83, 0xA1, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, - 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, 0xE3, 0x83, - 0xA1, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, - 0x83, 0xAB, 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xBC, - 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0xE3, 0x83, - 0xA4, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0xE3, - 0x83, 0xA6, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xB3, - 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0x83, 0xE3, 0x83, - 0x88, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xAA, 0xE3, - 0x83, 0xA9, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x92, - 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x95, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xAC, - 0xE3, 0x83, 0xA0, 0xE3, 0x83, 0xAC, 0xE3, 0x83, - 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0xB1, 0xE3, - 0x82, 0x99, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0xAF, - 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0x30, 0xE7, - 0x82, 0xB9, 0x31, 0xE7, 0x82, 0xB9, 0x32, 0xE7, - 0x82, 0xB9, 0x33, 0xE7, 0x82, 0xB9, 0x34, 0xE7, - 0x82, 0xB9, 0x35, 0xE7, 0x82, 0xB9, 0x36, 0xE7, - 0x82, 0xB9, 0x37, 0xE7, 0x82, 0xB9, 0x38, 0xE7, - 0x82, 0xB9, 0x39, 0xE7, 0x82, 0xB9, 0x31, 0x30, - 0xE7, 0x82, 0xB9, 0x31, 0x31, 0xE7, 0x82, 0xB9, - 0x31, 0x32, 0xE7, 0x82, 0xB9, 0x31, 0x33, 0xE7, - 0x82, 0xB9, 0x31, 0x34, 0xE7, 0x82, 0xB9, 0x31, - 0x35, 0xE7, 0x82, 0xB9, 0x31, 0x36, 0xE7, 0x82, - 0xB9, 0x31, 0x37, 0xE7, 0x82, 0xB9, 0x31, 0x38, - 0xE7, 0x82, 0xB9, 0x31, 0x39, 0xE7, 0x82, 0xB9, - 0x32, 0x30, 0xE7, 0x82, 0xB9, 0x32, 0x31, 0xE7, - 0x82, 0xB9, 0x32, 0x32, 0xE7, 0x82, 0xB9, 0x32, - 0x33, 0xE7, 0x82, 0xB9, 0x32, 0x34, 0xE7, 0x82, - 0xB9, 0x68, 0x50, 0x61, 0x64, 0x61, 0x41, 0x55, - 0x62, 0x61, 0x72, 0x6F, 0x56, 0x70, 0x63, 0x64, - 0x6D, 0x64, 0x6D, 0x32, 0x64, 0x6D, 0x33, 0x49, - 0x55, 0xE5, 0xB9, 0xB3, 0xE6, 0x88, 0x90, 0xE6, - 0x98, 0xAD, 0xE5, 0x92, 0x8C, 0xE5, 0xA4, 0xA7, - 0xE6, 0xAD, 0xA3, 0xE6, 0x98, 0x8E, 0xE6, 0xB2, - 0xBB, 0xE6, 0xA0, 0xAA, 0xE5, 0xBC, 0x8F, 0xE4, - 0xBC, 0x9A, 0xE7, 0xA4, 0xBE, 0x70, 0x41, 0x6E, - 0x41, 0xCE, 0xBC, 0x41, 0x6D, 0x41, 0x6B, 0x41, - 0x4B, 0x42, 0x4D, 0x42, 0x47, 0x42, 0x63, 0x61, - 0x6C, 0x6B, 0x63, 0x61, 0x6C, 0x70, 0x46, 0x6E, - 0x46, 0xCE, 0xBC, 0x46, 0xCE, 0xBC, 0x67, 0x6D, - 0x67, 0x6B, 0x67, 0x48, 0x7A, 0x6B, 0x48, 0x7A, - 0x4D, 0x48, 0x7A, 0x47, 0x48, 0x7A, 0x54, 0x48, - 0x7A, 0xCE, 0xBC, 0x6C, 0x6D, 0x6C, 0x64, 0x6C, - 0x6B, 0x6C, 0x66, 0x6D, 0x6E, 0x6D, 0xCE, 0xBC, - 0x6D, 0x6D, 0x6D, 0x63, 0x6D, 0x6B, 0x6D, 0x6D, - 0x6D, 0x32, 0x63, 0x6D, 0x32, 0x6D, 0x32, 0x6B, - 0x6D, 0x32, 0x6D, 0x6D, 0x33, 0x63, 0x6D, 0x33, - 0x6D, 0x33, 0x6B, 0x6D, 0x33, 0x6D, 0xE2, 0x88, - 0x95, 0x73, 0x6D, 0xE2, 0x88, 0x95, 0x73, 0x32, - 0x50, 0x61, 0x6B, 0x50, 0x61, 0x4D, 0x50, 0x61, - 0x47, 0x50, 0x61, 0x72, 0x61, 0x64, 0x72, 0x61, - 0x64, 0xE2, 0x88, 0x95, 0x73, 0x72, 0x61, 0x64, - 0xE2, 0x88, 0x95, 0x73, 0x32, 0x70, 0x73, 0x6E, - 0x73, 0xCE, 0xBC, 0x73, 0x6D, 0x73, 0x70, 0x56, - 0x6E, 0x56, 0xCE, 0xBC, 0x56, 0x6D, 0x56, 0x6B, - 0x56, 0x4D, 0x56, 0x70, 0x57, 0x6E, 0x57, 0xCE, - 0xBC, 0x57, 0x6D, 0x57, 0x6B, 0x57, 0x4D, 0x57, - 0x6B, 0xCE, 0xA9, 0x4D, 0xCE, 0xA9, 0x61, 0x2E, - 0x6D, 0x2E, 0x42, 0x71, 0x63, 0x63, 0x63, 0x64, - 0x43, 0xE2, 0x88, 0x95, 0x6B, 0x67, 0x43, 0x6F, - 0x2E, 0x64, 0x42, 0x47, 0x79, 0x68, 0x61, 0x48, - 0x50, 0x69, 0x6E, 0x4B, 0x4B, 0x4B, 0x4D, 0x6B, - 0x74, 0x6C, 0x6D, 0x6C, 0x6E, 0x6C, 0x6F, 0x67, - 0x6C, 0x78, 0x6D, 0x62, 0x6D, 0x69, 0x6C, 0x6D, - 0x6F, 0x6C, 0x50, 0x48, 0x70, 0x2E, 0x6D, 0x2E, - 0x50, 0x50, 0x4D, 0x50, 0x52, 0x73, 0x72, 0x53, - 0x76, 0x57, 0x62, 0x56, 0xE2, 0x88, 0x95, 0x6D, - 0x41, 0xE2, 0x88, 0x95, 0x6D, 0x31, 0xE6, 0x97, - 0xA5, 0x32, 0xE6, 0x97, 0xA5, 0x33, 0xE6, 0x97, - 0xA5, 0x34, 0xE6, 0x97, 0xA5, 0x35, 0xE6, 0x97, - 0xA5, 0x36, 0xE6, 0x97, 0xA5, 0x37, 0xE6, 0x97, - 0xA5, 0x38, 0xE6, 0x97, 0xA5, 0x39, 0xE6, 0x97, - 0xA5, 0x31, 0x30, 0xE6, 0x97, 0xA5, 0x31, 0x31, - 0xE6, 0x97, 0xA5, 0x31, 0x32, 0xE6, 0x97, 0xA5, - 0x31, 0x33, 0xE6, 0x97, 0xA5, 0x31, 0x34, 0xE6, - 0x97, 0xA5, 0x31, 0x35, 0xE6, 0x97, 0xA5, 0x31, - 0x36, 0xE6, 0x97, 0xA5, 0x31, 0x37, 0xE6, 0x97, - 0xA5, 0x31, 0x38, 0xE6, 0x97, 0xA5, 0x31, 0x39, - 0xE6, 0x97, 0xA5, 0x32, 0x30, 0xE6, 0x97, 0xA5, - 0x32, 0x31, 0xE6, 0x97, 0xA5, 0x32, 0x32, 0xE6, - 0x97, 0xA5, 0x32, 0x33, 0xE6, 0x97, 0xA5, 0x32, - 0x34, 0xE6, 0x97, 0xA5, 0x32, 0x35, 0xE6, 0x97, - 0xA5, 0x32, 0x36, 0xE6, 0x97, 0xA5, 0x32, 0x37, - 0xE6, 0x97, 0xA5, 0x32, 0x38, 0xE6, 0x97, 0xA5, - 0x32, 0x39, 0xE6, 0x97, 0xA5, 0x33, 0x30, 0xE6, - 0x97, 0xA5, 0x33, 0x31, 0xE6, 0x97, 0xA5, 0x67, - 0x61, 0x6C, 0xF6, 0xE8, 0xB1, 0x88, 0xF6, 0xE6, - 0x9B, 0xB4, 0xF6, 0xE8, 0xBB, 0x8A, 0xF6, 0xE8, - 0xB3, 0x88, 0xF6, 0xE6, 0xBB, 0x91, 0xF6, 0xE4, - 0xB8, 0xB2, 0xF6, 0xE5, 0x8F, 0xA5, 0xF6, 0xE9, - 0xBE, 0x9C, 0xF6, 0xE9, 0xBE, 0x9C, 0xF6, 0xE5, - 0xA5, 0x91, 0xF6, 0xE9, 0x87, 0x91, 0xF6, 0xE5, - 0x96, 0x87, 0xF6, 0xE5, 0xA5, 0x88, 0xF6, 0xE6, - 0x87, 0xB6, 0xF6, 0xE7, 0x99, 0xA9, 0xF6, 0xE7, - 0xBE, 0x85, 0xF6, 0xE8, 0x98, 0xBF, 0xF6, 0xE8, - 0x9E, 0xBA, 0xF6, 0xE8, 0xA3, 0xB8, 0xF6, 0xE9, - 0x82, 0x8F, 0xF6, 0xE6, 0xA8, 0x82, 0xF6, 0xE6, - 0xB4, 0x9B, 0xF6, 0xE7, 0x83, 0x99, 0xF6, 0xE7, - 0x8F, 0x9E, 0xF6, 0xE8, 0x90, 0xBD, 0xF6, 0xE9, - 0x85, 0xAA, 0xF6, 0xE9, 0xA7, 0xB1, 0xF6, 0xE4, - 0xBA, 0x82, 0xF6, 0xE5, 0x8D, 0xB5, 0xF6, 0xE6, - 0xAC, 0x84, 0xF6, 0xE7, 0x88, 0x9B, 0xF6, 0xE8, - 0x98, 0xAD, 0xF6, 0xE9, 0xB8, 0x9E, 0xF6, 0xE5, - 0xB5, 0x90, 0xF6, 0xE6, 0xBF, 0xAB, 0xF6, 0xE8, - 0x97, 0x8D, 0xF6, 0xE8, 0xA5, 0xA4, 0xF6, 0xE6, - 0x8B, 0x89, 0xF6, 0xE8, 0x87, 0x98, 0xF6, 0xE8, - 0xA0, 0x9F, 0xF6, 0xE5, 0xBB, 0x8A, 0xF6, 0xE6, - 0x9C, 0x97, 0xF6, 0xE6, 0xB5, 0xAA, 0xF6, 0xE7, - 0x8B, 0xBC, 0xF6, 0xE9, 0x83, 0x8E, 0xF6, 0xE4, - 0xBE, 0x86, 0xF6, 0xE5, 0x86, 0xB7, 0xF6, 0xE5, - 0x8B, 0x9E, 0xF6, 0xE6, 0x93, 0x84, 0xF6, 0xE6, - 0xAB, 0x93, 0xF6, 0xE7, 0x88, 0x90, 0xF6, 0xE7, - 0x9B, 0xA7, 0xF6, 0xE8, 0x80, 0x81, 0xF6, 0xE8, - 0x98, 0x86, 0xF6, 0xE8, 0x99, 0x9C, 0xF6, 0xE8, - 0xB7, 0xAF, 0xF6, 0xE9, 0x9C, 0xB2, 0xF6, 0xE9, - 0xAD, 0xAF, 0xF6, 0xE9, 0xB7, 0xBA, 0xF6, 0xE7, - 0xA2, 0x8C, 0xF6, 0xE7, 0xA5, 0xBF, 0xF6, 0xE7, - 0xB6, 0xA0, 0xF6, 0xE8, 0x8F, 0x89, 0xF6, 0xE9, - 0x8C, 0x84, 0xF6, 0xE9, 0xB9, 0xBF, 0xF6, 0xE8, - 0xAB, 0x96, 0xF6, 0xE5, 0xA3, 0x9F, 0xF6, 0xE5, - 0xBC, 0x84, 0xF6, 0xE7, 0xB1, 0xA0, 0xF6, 0xE8, - 0x81, 0xBE, 0xF6, 0xE7, 0x89, 0xA2, 0xF6, 0xE7, - 0xA3, 0x8A, 0xF6, 0xE8, 0xB3, 0x82, 0xF6, 0xE9, - 0x9B, 0xB7, 0xF6, 0xE5, 0xA3, 0x98, 0xF6, 0xE5, - 0xB1, 0xA2, 0xF6, 0xE6, 0xA8, 0x93, 0xF6, 0xE6, - 0xB7, 0x9A, 0xF6, 0xE6, 0xBC, 0x8F, 0xF6, 0xE7, - 0xB4, 0xAF, 0xF6, 0xE7, 0xB8, 0xB7, 0xF6, 0xE9, - 0x99, 0x8B, 0xF6, 0xE5, 0x8B, 0x92, 0xF6, 0xE8, - 0x82, 0x8B, 0xF6, 0xE5, 0x87, 0x9C, 0xF6, 0xE5, - 0x87, 0x8C, 0xF6, 0xE7, 0xA8, 0x9C, 0xF6, 0xE7, - 0xB6, 0xBE, 0xF6, 0xE8, 0x8F, 0xB1, 0xF6, 0xE9, - 0x99, 0xB5, 0xF6, 0xE8, 0xAE, 0x80, 0xF6, 0xE6, - 0x8B, 0x8F, 0xF6, 0xE6, 0xA8, 0x82, 0xF6, 0xE8, - 0xAB, 0xBE, 0xF6, 0xE4, 0xB8, 0xB9, 0xF6, 0xE5, - 0xAF, 0xA7, 0xF6, 0xE6, 0x80, 0x92, 0xF6, 0xE7, - 0x8E, 0x87, 0xF6, 0xE7, 0x95, 0xB0, 0xF6, 0xE5, - 0x8C, 0x97, 0xF6, 0xE7, 0xA3, 0xBB, 0xF6, 0xE4, - 0xBE, 0xBF, 0xF6, 0xE5, 0xBE, 0xA9, 0xF6, 0xE4, - 0xB8, 0x8D, 0xF6, 0xE6, 0xB3, 0x8C, 0xF6, 0xE6, - 0x95, 0xB8, 0xF6, 0xE7, 0xB4, 0xA2, 0xF6, 0xE5, - 0x8F, 0x83, 0xF6, 0xE5, 0xA1, 0x9E, 0xF6, 0xE7, - 0x9C, 0x81, 0xF6, 0xE8, 0x91, 0x89, 0xF6, 0xE8, - 0xAA, 0xAA, 0xF6, 0xE6, 0xAE, 0xBA, 0xF6, 0xE8, - 0xBE, 0xB0, 0xF6, 0xE6, 0xB2, 0x88, 0xF6, 0xE6, - 0x8B, 0xBE, 0xF6, 0xE8, 0x8B, 0xA5, 0xF6, 0xE6, - 0x8E, 0xA0, 0xF6, 0xE7, 0x95, 0xA5, 0xF6, 0xE4, - 0xBA, 0xAE, 0xF6, 0xE5, 0x85, 0xA9, 0xF6, 0xE5, - 0x87, 0x89, 0xF6, 0xE6, 0xA2, 0x81, 0xF6, 0xE7, - 0xB3, 0xA7, 0xF6, 0xE8, 0x89, 0xAF, 0xF6, 0xE8, - 0xAB, 0x92, 0xF6, 0xE9, 0x87, 0x8F, 0xF6, 0xE5, - 0x8B, 0xB5, 0xF6, 0xE5, 0x91, 0x82, 0xF6, 0xE5, - 0xA5, 0xB3, 0xF6, 0xE5, 0xBB, 0xAC, 0xF6, 0xE6, - 0x97, 0x85, 0xF6, 0xE6, 0xBF, 0xBE, 0xF6, 0xE7, - 0xA4, 0xAA, 0xF6, 0xE9, 0x96, 0xAD, 0xF6, 0xE9, - 0xA9, 0xAA, 0xF6, 0xE9, 0xBA, 0x97, 0xF6, 0xE9, - 0xBB, 0x8E, 0xF6, 0xE5, 0x8A, 0x9B, 0xF6, 0xE6, - 0x9B, 0x86, 0xF6, 0xE6, 0xAD, 0xB7, 0xF6, 0xE8, - 0xBD, 0xA2, 0xF6, 0xE5, 0xB9, 0xB4, 0xF6, 0xE6, - 0x86, 0x90, 0xF6, 0xE6, 0x88, 0x80, 0xF6, 0xE6, - 0x92, 0x9A, 0xF6, 0xE6, 0xBC, 0xA3, 0xF6, 0xE7, - 0x85, 0x89, 0xF6, 0xE7, 0x92, 0x89, 0xF6, 0xE7, - 0xA7, 0x8A, 0xF6, 0xE7, 0xB7, 0xB4, 0xF6, 0xE8, - 0x81, 0xAF, 0xF6, 0xE8, 0xBC, 0xA6, 0xF6, 0xE8, - 0x93, 0xAE, 0xF6, 0xE9, 0x80, 0xA3, 0xF6, 0xE9, - 0x8D, 0x8A, 0xF6, 0xE5, 0x88, 0x97, 0xF6, 0xE5, - 0x8A, 0xA3, 0xF6, 0xE5, 0x92, 0xBD, 0xF6, 0xE7, - 0x83, 0x88, 0xF6, 0xE8, 0xA3, 0x82, 0xF6, 0xE8, - 0xAA, 0xAA, 0xF6, 0xE5, 0xBB, 0x89, 0xF6, 0xE5, - 0xBF, 0xB5, 0xF6, 0xE6, 0x8D, 0xBB, 0xF6, 0xE6, - 0xAE, 0xAE, 0xF6, 0xE7, 0xB0, 0xBE, 0xF6, 0xE7, - 0x8D, 0xB5, 0xF6, 0xE4, 0xBB, 0xA4, 0xF6, 0xE5, - 0x9B, 0xB9, 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, - 0xB6, 0xBA, 0xF6, 0xE6, 0x80, 0x9C, 0xF6, 0xE7, - 0x8E, 0xB2, 0xF6, 0xE7, 0x91, 0xA9, 0xF6, 0xE7, - 0xBE, 0x9A, 0xF6, 0xE8, 0x81, 0x86, 0xF6, 0xE9, - 0x88, 0xB4, 0xF6, 0xE9, 0x9B, 0xB6, 0xF6, 0xE9, - 0x9D, 0x88, 0xF6, 0xE9, 0xA0, 0x98, 0xF6, 0xE4, - 0xBE, 0x8B, 0xF6, 0xE7, 0xA6, 0xAE, 0xF6, 0xE9, - 0x86, 0xB4, 0xF6, 0xE9, 0x9A, 0xB8, 0xF6, 0xE6, - 0x83, 0xA1, 0xF6, 0xE4, 0xBA, 0x86, 0xF6, 0xE5, - 0x83, 0x9A, 0xF6, 0xE5, 0xAF, 0xAE, 0xF6, 0xE5, - 0xB0, 0xBF, 0xF6, 0xE6, 0x96, 0x99, 0xF6, 0xE6, - 0xA8, 0x82, 0xF6, 0xE7, 0x87, 0x8E, 0xF6, 0xE7, - 0x99, 0x82, 0xF6, 0xE8, 0x93, 0xBC, 0xF6, 0xE9, - 0x81, 0xBC, 0xF6, 0xE9, 0xBE, 0x8D, 0xF6, 0xE6, - 0x9A, 0x88, 0xF6, 0xE9, 0x98, 0xAE, 0xF6, 0xE5, - 0x8A, 0x89, 0xF6, 0xE6, 0x9D, 0xBB, 0xF6, 0xE6, - 0x9F, 0xB3, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, - 0xBA, 0x9C, 0xF6, 0xE7, 0x90, 0x89, 0xF6, 0xE7, - 0x95, 0x99, 0xF6, 0xE7, 0xA1, 0xAB, 0xF6, 0xE7, - 0xB4, 0x90, 0xF6, 0xE9, 0xA1, 0x9E, 0xF6, 0xE5, - 0x85, 0xAD, 0xF6, 0xE6, 0x88, 0xAE, 0xF6, 0xE9, - 0x99, 0xB8, 0xF6, 0xE5, 0x80, 0xAB, 0xF6, 0xE5, - 0xB4, 0x99, 0xF6, 0xE6, 0xB7, 0xAA, 0xF6, 0xE8, - 0xBC, 0xAA, 0xF6, 0xE5, 0xBE, 0x8B, 0xF6, 0xE6, - 0x85, 0x84, 0xF6, 0xE6, 0xA0, 0x97, 0xF6, 0xE7, - 0x8E, 0x87, 0xF6, 0xE9, 0x9A, 0x86, 0xF6, 0xE5, - 0x88, 0xA9, 0xF6, 0xE5, 0x90, 0x8F, 0xF6, 0xE5, - 0xB1, 0xA5, 0xF6, 0xE6, 0x98, 0x93, 0xF6, 0xE6, - 0x9D, 0x8E, 0xF6, 0xE6, 0xA2, 0xA8, 0xF6, 0xE6, - 0xB3, 0xA5, 0xF6, 0xE7, 0x90, 0x86, 0xF6, 0xE7, - 0x97, 0xA2, 0xF6, 0xE7, 0xBD, 0xB9, 0xF6, 0xE8, - 0xA3, 0x8F, 0xF6, 0xE8, 0xA3, 0xA1, 0xF6, 0xE9, - 0x87, 0x8C, 0xF6, 0xE9, 0x9B, 0xA2, 0xF6, 0xE5, - 0x8C, 0xBF, 0xF6, 0xE6, 0xBA, 0xBA, 0xF6, 0xE5, - 0x90, 0x9D, 0xF6, 0xE7, 0x87, 0x90, 0xF6, 0xE7, - 0x92, 0x98, 0xF6, 0xE8, 0x97, 0xBA, 0xF6, 0xE9, - 0x9A, 0xA3, 0xF6, 0xE9, 0xB1, 0x97, 0xF6, 0xE9, - 0xBA, 0x9F, 0xF6, 0xE6, 0x9E, 0x97, 0xF6, 0xE6, - 0xB7, 0x8B, 0xF6, 0xE8, 0x87, 0xA8, 0xF6, 0xE7, - 0xAB, 0x8B, 0xF6, 0xE7, 0xAC, 0xA0, 0xF6, 0xE7, - 0xB2, 0x92, 0xF6, 0xE7, 0x8B, 0x80, 0xF6, 0xE7, - 0x82, 0x99, 0xF6, 0xE8, 0xAD, 0x98, 0xF6, 0xE4, - 0xBB, 0x80, 0xF6, 0xE8, 0x8C, 0xB6, 0xF6, 0xE5, - 0x88, 0xBA, 0xF6, 0xE5, 0x88, 0x87, 0xF6, 0xE5, - 0xBA, 0xA6, 0xF6, 0xE6, 0x8B, 0x93, 0xF6, 0xE7, - 0xB3, 0x96, 0xF6, 0xE5, 0xAE, 0x85, 0xF6, 0xE6, - 0xB4, 0x9E, 0xF6, 0xE6, 0x9A, 0xB4, 0xF6, 0xE8, - 0xBC, 0xBB, 0xF6, 0xE8, 0xA1, 0x8C, 0xF6, 0xE9, - 0x99, 0x8D, 0xF6, 0xE8, 0xA6, 0x8B, 0xF6, 0xE5, - 0xBB, 0x93, 0xF6, 0xE5, 0x85, 0x80, 0xF6, 0xE5, - 0x97, 0x80, 0xF6, 0xE5, 0xA1, 0x9A, 0xF6, 0xE6, - 0x99, 0xB4, 0xF6, 0xE5, 0x87, 0x9E, 0xF6, 0xE7, - 0x8C, 0xAA, 0xF6, 0xE7, 0x9B, 0x8A, 0xF6, 0xE7, - 0xA4, 0xBC, 0xF6, 0xE7, 0xA5, 0x9E, 0xF6, 0xE7, - 0xA5, 0xA5, 0xF6, 0xE7, 0xA6, 0x8F, 0xF6, 0xE9, - 0x9D, 0x96, 0xF6, 0xE7, 0xB2, 0xBE, 0xF6, 0xE7, - 0xBE, 0xBD, 0xF6, 0xE8, 0x98, 0x92, 0xF6, 0xE8, - 0xAB, 0xB8, 0xF6, 0xE9, 0x80, 0xB8, 0xF6, 0xE9, - 0x83, 0xBD, 0xF6, 0xE9, 0xA3, 0xAF, 0xF6, 0xE9, - 0xA3, 0xBC, 0xF6, 0xE9, 0xA4, 0xA8, 0xF6, 0xE9, - 0xB6, 0xB4, 0xF6, 0xE4, 0xBE, 0xAE, 0xF6, 0xE5, - 0x83, 0xA7, 0xF6, 0xE5, 0x85, 0x8D, 0xF6, 0xE5, - 0x8B, 0x89, 0xF6, 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, - 0x8D, 0x91, 0xF6, 0xE5, 0x96, 0x9D, 0xF6, 0xE5, - 0x98, 0x86, 0xF6, 0xE5, 0x99, 0xA8, 0xF6, 0xE5, - 0xA1, 0x80, 0xF6, 0xE5, 0xA2, 0xA8, 0xF6, 0xE5, - 0xB1, 0xA4, 0xF6, 0xE5, 0xB1, 0xAE, 0xF6, 0xE6, - 0x82, 0x94, 0xF6, 0xE6, 0x85, 0xA8, 0xF6, 0xE6, - 0x86, 0x8E, 0xF6, 0xE6, 0x87, 0xB2, 0xF6, 0xE6, - 0x95, 0x8F, 0xF6, 0xE6, 0x97, 0xA2, 0xF6, 0xE6, - 0x9A, 0x91, 0xF6, 0xE6, 0xA2, 0x85, 0xF6, 0xE6, - 0xB5, 0xB7, 0xF6, 0xE6, 0xB8, 0x9A, 0xF6, 0xE6, - 0xBC, 0xA2, 0xF6, 0xE7, 0x85, 0xAE, 0xF6, 0xE7, - 0x88, 0xAB, 0xF6, 0xE7, 0x90, 0xA2, 0xF6, 0xE7, - 0xA2, 0x91, 0xF6, 0xE7, 0xA4, 0xBE, 0xF6, 0xE7, - 0xA5, 0x89, 0xF6, 0xE7, 0xA5, 0x88, 0xF6, 0xE7, - 0xA5, 0x90, 0xF6, 0xE7, 0xA5, 0x96, 0xF6, 0xE7, - 0xA5, 0x9D, 0xF6, 0xE7, 0xA6, 0x8D, 0xF6, 0xE7, - 0xA6, 0x8E, 0xF6, 0xE7, 0xA9, 0x80, 0xF6, 0xE7, - 0xAA, 0x81, 0xF6, 0xE7, 0xAF, 0x80, 0xF6, 0xE7, - 0xB7, 0xB4, 0xF6, 0xE7, 0xB8, 0x89, 0xF6, 0xE7, - 0xB9, 0x81, 0xF6, 0xE7, 0xBD, 0xB2, 0xF6, 0xE8, - 0x80, 0x85, 0xF6, 0xE8, 0x87, 0xAD, 0xF6, 0xE8, - 0x89, 0xB9, 0xF6, 0xE8, 0x89, 0xB9, 0xF6, 0xE8, - 0x91, 0x97, 0xF6, 0xE8, 0xA4, 0x90, 0xF6, 0xE8, - 0xA6, 0x96, 0xF6, 0xE8, 0xAC, 0x81, 0xF6, 0xE8, - 0xAC, 0xB9, 0xF6, 0xE8, 0xB3, 0x93, 0xF6, 0xE8, - 0xB4, 0x88, 0xF6, 0xE8, 0xBE, 0xB6, 0xF6, 0xE9, - 0x80, 0xB8, 0xF6, 0xE9, 0x9B, 0xA3, 0xF6, 0xE9, - 0x9F, 0xBF, 0xF6, 0xE9, 0xA0, 0xBB, 0xF6, 0xE4, - 0xB8, 0xA6, 0xF6, 0xE5, 0x86, 0xB5, 0xF6, 0xE5, - 0x85, 0xA8, 0xF6, 0xE4, 0xBE, 0x80, 0xF6, 0xE5, - 0x85, 0x85, 0xF6, 0xE5, 0x86, 0x80, 0xF6, 0xE5, - 0x8B, 0x87, 0xF6, 0xE5, 0x8B, 0xBA, 0xF6, 0xE5, - 0x96, 0x9D, 0xF6, 0xE5, 0x95, 0x95, 0xF6, 0xE5, - 0x96, 0x99, 0xF6, 0xE5, 0x97, 0xA2, 0xF6, 0xE5, - 0xA1, 0x9A, 0xF6, 0xE5, 0xA2, 0xB3, 0xF6, 0xE5, - 0xA5, 0x84, 0xF6, 0xE5, 0xA5, 0x94, 0xF6, 0xE5, - 0xA9, 0xA2, 0xF6, 0xE5, 0xAC, 0xA8, 0xF6, 0xE5, - 0xBB, 0x92, 0xF6, 0xE5, 0xBB, 0x99, 0xF6, 0xE5, - 0xBD, 0xA9, 0xF6, 0xE5, 0xBE, 0xAD, 0xF6, 0xE6, - 0x83, 0x98, 0xF6, 0xE6, 0x85, 0x8E, 0xF6, 0xE6, - 0x84, 0x88, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, 0xE6, - 0x85, 0xA0, 0xF6, 0xE6, 0x87, 0xB2, 0xF6, 0xE6, - 0x88, 0xB4, 0xF6, 0xE6, 0x8F, 0x84, 0xF6, 0xE6, - 0x90, 0x9C, 0xF6, 0xE6, 0x91, 0x92, 0xF6, 0xE6, - 0x95, 0x96, 0xF6, 0xE6, 0x99, 0xB4, 0xF6, 0xE6, - 0x9C, 0x97, 0xF6, 0xE6, 0x9C, 0x9B, 0xF6, 0xE6, - 0x9D, 0x96, 0xF6, 0xE6, 0xAD, 0xB9, 0xF6, 0xE6, - 0xAE, 0xBA, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, - 0xBB, 0x9B, 0xF6, 0xE6, 0xBB, 0x8B, 0xF6, 0xE6, - 0xBC, 0xA2, 0xF6, 0xE7, 0x80, 0x9E, 0xF6, 0xE7, - 0x85, 0xAE, 0xF6, 0xE7, 0x9E, 0xA7, 0xF6, 0xE7, - 0x88, 0xB5, 0xF6, 0xE7, 0x8A, 0xAF, 0xF6, 0xE7, - 0x8C, 0xAA, 0xF6, 0xE7, 0x91, 0xB1, 0xF6, 0xE7, - 0x94, 0x86, 0xF6, 0xE7, 0x94, 0xBB, 0xF6, 0xE7, - 0x98, 0x9D, 0xF6, 0xE7, 0x98, 0x9F, 0xF6, 0xE7, - 0x9B, 0x8A, 0xF6, 0xE7, 0x9B, 0x9B, 0xF6, 0xE7, - 0x9B, 0xB4, 0xF6, 0xE7, 0x9D, 0x8A, 0xF6, 0xE7, - 0x9D, 0x80, 0xF6, 0xE7, 0xA3, 0x8C, 0xF6, 0xE7, - 0xAA, 0xB1, 0xF6, 0xE7, 0xAF, 0x80, 0xF6, 0xE7, - 0xB1, 0xBB, 0xF6, 0xE7, 0xB5, 0x9B, 0xF6, 0xE7, - 0xB7, 0xB4, 0xF6, 0xE7, 0xBC, 0xBE, 0xF6, 0xE8, - 0x80, 0x85, 0xF6, 0xE8, 0x8D, 0x92, 0xF6, 0xE8, - 0x8F, 0xAF, 0xF6, 0xE8, 0x9D, 0xB9, 0xF6, 0xE8, - 0xA5, 0x81, 0xF6, 0xE8, 0xA6, 0x86, 0xF6, 0xE8, - 0xA6, 0x96, 0xF6, 0xE8, 0xAA, 0xBF, 0xF6, 0xE8, - 0xAB, 0xB8, 0xF6, 0xE8, 0xAB, 0x8B, 0xF6, 0xE8, - 0xAC, 0x81, 0xF6, 0xE8, 0xAB, 0xBE, 0xF6, 0xE8, - 0xAB, 0xAD, 0xF6, 0xE8, 0xAC, 0xB9, 0xF6, 0xE8, - 0xAE, 0x8A, 0xF6, 0xE8, 0xB4, 0x88, 0xF6, 0xE8, - 0xBC, 0xB8, 0xF6, 0xE9, 0x81, 0xB2, 0xF6, 0xE9, - 0x86, 0x99, 0xF6, 0xE9, 0x89, 0xB6, 0xF6, 0xE9, - 0x99, 0xBC, 0xF6, 0xE9, 0x9B, 0xA3, 0xF6, 0xE9, - 0x9D, 0x96, 0xF6, 0xE9, 0x9F, 0x9B, 0xF6, 0xE9, - 0x9F, 0xBF, 0xF6, 0xE9, 0xA0, 0x8B, 0xF6, 0xE9, - 0xA0, 0xBB, 0xF6, 0xE9, 0xAC, 0x92, 0xF6, 0xE9, - 0xBE, 0x9C, 0xF6, 0xF0, 0xA2, 0xA1, 0x8A, 0xF6, - 0xF0, 0xA2, 0xA1, 0x84, 0xF6, 0xF0, 0xA3, 0x8F, - 0x95, 0xF6, 0xE3, 0xAE, 0x9D, 0xF6, 0xE4, 0x80, - 0x98, 0xF6, 0xE4, 0x80, 0xB9, 0xF6, 0xF0, 0xA5, - 0x89, 0x89, 0xF6, 0xF0, 0xA5, 0xB3, 0x90, 0xF6, - 0xF0, 0xA7, 0xBB, 0x93, 0xF6, 0xE9, 0xBD, 0x83, - 0xF6, 0xE9, 0xBE, 0x8E, 0x66, 0x66, 0x66, 0x69, - 0x66, 0x6C, 0x66, 0x66, 0x69, 0x66, 0x66, 0x6C, - 0x73, 0x74, 0x73, 0x74, 0xD5, 0xB4, 0xD5, 0xB6, - 0xD5, 0xB4, 0xD5, 0xA5, 0xD5, 0xB4, 0xD5, 0xAB, - 0xD5, 0xBE, 0xD5, 0xB6, 0xD5, 0xB4, 0xD5, 0xAD, - 0xF6, 0xD7, 0x99, 0xD6, 0xB4, 0xF6, 0xD7, 0xB2, - 0xD6, 0xB7, 0xD7, 0xA2, 0xD7, 0x90, 0xD7, 0x93, - 0xD7, 0x94, 0xD7, 0x9B, 0xD7, 0x9C, 0xD7, 0x9D, - 0xD7, 0xA8, 0xD7, 0xAA, 0x2B, 0xF6, 0xD7, 0xA9, - 0xD7, 0x81, 0xF6, 0xD7, 0xA9, 0xD7, 0x82, 0xF6, - 0xD7, 0xA9, 0xD6, 0xBC, 0xD7, 0x81, 0xF6, 0xD7, - 0xA9, 0xD6, 0xBC, 0xD7, 0x82, 0xF6, 0xD7, 0x90, - 0xD6, 0xB7, 0xF6, 0xD7, 0x90, 0xD6, 0xB8, 0xF6, - 0xD7, 0x90, 0xD6, 0xBC, 0xF6, 0xD7, 0x91, 0xD6, - 0xBC, 0xF6, 0xD7, 0x92, 0xD6, 0xBC, 0xF6, 0xD7, - 0x93, 0xD6, 0xBC, 0xF6, 0xD7, 0x94, 0xD6, 0xBC, - 0xF6, 0xD7, 0x95, 0xD6, 0xBC, 0xF6, 0xD7, 0x96, - 0xD6, 0xBC, 0xF6, 0xD7, 0x98, 0xD6, 0xBC, 0xF6, - 0xD7, 0x99, 0xD6, 0xBC, 0xF6, 0xD7, 0x9A, 0xD6, - 0xBC, 0xF6, 0xD7, 0x9B, 0xD6, 0xBC, 0xF6, 0xD7, - 0x9C, 0xD6, 0xBC, 0xF6, 0xD7, 0x9E, 0xD6, 0xBC, - 0xF6, 0xD7, 0xA0, 0xD6, 0xBC, 0xF6, 0xD7, 0xA1, - 0xD6, 0xBC, 0xF6, 0xD7, 0xA3, 0xD6, 0xBC, 0xF6, - 0xD7, 0xA4, 0xD6, 0xBC, 0xF6, 0xD7, 0xA6, 0xD6, - 0xBC, 0xF6, 0xD7, 0xA7, 0xD6, 0xBC, 0xF6, 0xD7, - 0xA8, 0xD6, 0xBC, 0xF6, 0xD7, 0xA9, 0xD6, 0xBC, - 0xF6, 0xD7, 0xAA, 0xD6, 0xBC, 0xF6, 0xD7, 0x95, - 0xD6, 0xB9, 0xF6, 0xD7, 0x91, 0xD6, 0xBF, 0xF6, - 0xD7, 0x9B, 0xD6, 0xBF, 0xF6, 0xD7, 0xA4, 0xD6, - 0xBF, 0xD7, 0x90, 0xD7, 0x9C, 0xD9, 0xB1, 0xD9, - 0xB1, 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, 0xBB, 0xD9, - 0xBB, 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, 0xBE, 0xD9, - 0xBE, 0xDA, 0x80, 0xDA, 0x80, 0xDA, 0x80, 0xDA, - 0x80, 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, 0xBA, 0xD9, - 0xBA, 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, 0xBF, 0xD9, - 0xBF, 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, 0xB9, 0xD9, - 0xB9, 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, 0xA4, 0xDA, - 0xA4, 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, 0xA6, 0xDA, - 0xA6, 0xDA, 0x84, 0xDA, 0x84, 0xDA, 0x84, 0xDA, - 0x84, 0xDA, 0x83, 0xDA, 0x83, 0xDA, 0x83, 0xDA, - 0x83, 0xDA, 0x86, 0xDA, 0x86, 0xDA, 0x86, 0xDA, - 0x86, 0xDA, 0x87, 0xDA, 0x87, 0xDA, 0x87, 0xDA, - 0x87, 0xDA, 0x8D, 0xDA, 0x8D, 0xDA, 0x8C, 0xDA, - 0x8C, 0xDA, 0x8E, 0xDA, 0x8E, 0xDA, 0x88, 0xDA, - 0x88, 0xDA, 0x98, 0xDA, 0x98, 0xDA, 0x91, 0xDA, - 0x91, 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, 0xA9, 0xDA, - 0xA9, 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, 0xAF, 0xDA, - 0xAF, 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, 0xB3, 0xDA, - 0xB3, 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, 0xB1, 0xDA, - 0xB1, 0xDA, 0xBA, 0xDA, 0xBA, 0xDA, 0xBB, 0xDA, - 0xBB, 0xDA, 0xBB, 0xDA, 0xBB, 0xDB, 0x95, 0xD9, - 0x94, 0xDB, 0x95, 0xD9, 0x94, 0xDB, 0x81, 0xDB, - 0x81, 0xDB, 0x81, 0xDB, 0x81, 0xDA, 0xBE, 0xDA, - 0xBE, 0xDA, 0xBE, 0xDA, 0xBE, 0xDB, 0x92, 0xDB, - 0x92, 0xDB, 0x92, 0xD9, 0x94, 0xDB, 0x92, 0xD9, - 0x94, 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, 0xAD, 0xDA, - 0xAD, 0xDB, 0x87, 0xDB, 0x87, 0xDB, 0x86, 0xDB, - 0x86, 0xDB, 0x88, 0xDB, 0x88, 0xDB, 0x87, 0xD9, - 0xB4, 0xDB, 0x8B, 0xDB, 0x8B, 0xDB, 0x85, 0xDB, - 0x85, 0xDB, 0x89, 0xDB, 0x89, 0xDB, 0x90, 0xDB, - 0x90, 0xDB, 0x90, 0xDB, 0x90, 0xD9, 0x89, 0xD9, - 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, - 0x8A, 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x8A, 0xD9, - 0x94, 0xDB, 0x95, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, - 0x95, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x88, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x8A, 0xD9, - 0x94, 0xDB, 0x87, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, - 0x87, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x86, 0xD9, - 0x8A, 0xD9, 0x94, 0xDB, 0x86, 0xD9, 0x8A, 0xD9, - 0x94, 0xDB, 0x88, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, - 0x88, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x90, 0xD9, - 0x8A, 0xD9, 0x94, 0xDB, 0x90, 0xD9, 0x8A, 0xD9, - 0x94, 0xDB, 0x90, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, - 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xDB, 0x8C, 0xDB, - 0x8C, 0xDB, 0x8C, 0xDB, 0x8C, 0xD9, 0x8A, 0xD9, - 0x94, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, - 0xAD, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0xD9, 0x8A, 0xD9, - 0x94, 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, - 0xA8, 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, - 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x89, 0xD8, - 0xA8, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD8, - 0xAA, 0xD8, 0xAD, 0xD8, 0xAA, 0xD8, 0xAE, 0xD8, - 0xAA, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x89, 0xD8, - 0xAA, 0xD9, 0x8A, 0xD8, 0xAB, 0xD8, 0xAC, 0xD8, - 0xAB, 0xD9, 0x85, 0xD8, 0xAB, 0xD9, 0x89, 0xD8, - 0xAB, 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, - 0xAC, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, - 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD8, - 0xAE, 0xD8, 0xAD, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, - 0xB3, 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, - 0xB3, 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, - 0xB5, 0xD8, 0xAD, 0xD8, 0xB5, 0xD9, 0x85, 0xD8, - 0xB6, 0xD8, 0xAC, 0xD8, 0xB6, 0xD8, 0xAD, 0xD8, - 0xB6, 0xD8, 0xAE, 0xD8, 0xB6, 0xD9, 0x85, 0xD8, - 0xB7, 0xD8, 0xAD, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, - 0xB8, 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, - 0xB9, 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, - 0xBA, 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, - 0x81, 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, - 0x81, 0xD9, 0x85, 0xD9, 0x81, 0xD9, 0x89, 0xD9, - 0x81, 0xD9, 0x8A, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, - 0x82, 0xD9, 0x85, 0xD9, 0x82, 0xD9, 0x89, 0xD9, - 0x82, 0xD9, 0x8A, 0xD9, 0x83, 0xD8, 0xA7, 0xD9, - 0x83, 0xD8, 0xAC, 0xD9, 0x83, 0xD8, 0xAD, 0xD9, - 0x83, 0xD8, 0xAE, 0xD9, 0x83, 0xD9, 0x84, 0xD9, - 0x83, 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x89, 0xD9, - 0x83, 0xD9, 0x8A, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, - 0x84, 0xD8, 0xAD, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, - 0x84, 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x89, 0xD9, - 0x84, 0xD9, 0x8A, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, - 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, - 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x89, 0xD9, - 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, - 0x86, 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, - 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x89, 0xD9, - 0x86, 0xD9, 0x8A, 0xD9, 0x87, 0xD8, 0xAC, 0xD9, - 0x87, 0xD9, 0x85, 0xD9, 0x87, 0xD9, 0x89, 0xD9, - 0x87, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, - 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x89, 0xD9, - 0x8A, 0xD9, 0x8A, 0xD8, 0xB0, 0xD9, 0xB0, 0xD8, - 0xB1, 0xD9, 0xB0, 0xD9, 0x89, 0xD9, 0xB0, 0x20, - 0xD9, 0x8C, 0xD9, 0x91, 0x20, 0xD9, 0x8D, 0xD9, - 0x91, 0x20, 0xD9, 0x8E, 0xD9, 0x91, 0x20, 0xD9, - 0x8F, 0xD9, 0x91, 0x20, 0xD9, 0x90, 0xD9, 0x91, - 0x20, 0xD9, 0x91, 0xD9, 0xB0, 0xD9, 0x8A, 0xD9, - 0x94, 0xD8, 0xB1, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, - 0xB2, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, - 0x94, 0xD9, 0x89, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, - 0x8A, 0xD8, 0xA8, 0xD8, 0xB1, 0xD8, 0xA8, 0xD8, - 0xB2, 0xD8, 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, - 0x86, 0xD8, 0xA8, 0xD9, 0x89, 0xD8, 0xA8, 0xD9, - 0x8A, 0xD8, 0xAA, 0xD8, 0xB1, 0xD8, 0xAA, 0xD8, - 0xB2, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, - 0x86, 0xD8, 0xAA, 0xD9, 0x89, 0xD8, 0xAA, 0xD9, - 0x8A, 0xD8, 0xAB, 0xD8, 0xB1, 0xD8, 0xAB, 0xD8, - 0xB2, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, 0xAB, 0xD9, - 0x86, 0xD8, 0xAB, 0xD9, 0x89, 0xD8, 0xAB, 0xD9, - 0x8A, 0xD9, 0x81, 0xD9, 0x89, 0xD9, 0x81, 0xD9, - 0x8A, 0xD9, 0x82, 0xD9, 0x89, 0xD9, 0x82, 0xD9, - 0x8A, 0xD9, 0x83, 0xD8, 0xA7, 0xD9, 0x83, 0xD9, - 0x84, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x83, 0xD9, - 0x89, 0xD9, 0x83, 0xD9, 0x8A, 0xD9, 0x84, 0xD9, - 0x85, 0xD9, 0x84, 0xD9, 0x89, 0xD9, 0x84, 0xD9, - 0x8A, 0xD9, 0x85, 0xD8, 0xA7, 0xD9, 0x85, 0xD9, - 0x85, 0xD9, 0x86, 0xD8, 0xB1, 0xD9, 0x86, 0xD8, - 0xB2, 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, - 0x86, 0xD9, 0x86, 0xD9, 0x89, 0xD9, 0x86, 0xD9, - 0x8A, 0xD9, 0x89, 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, - 0xB1, 0xD9, 0x8A, 0xD8, 0xB2, 0xD9, 0x8A, 0xD9, - 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x8A, 0xD9, - 0x89, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, - 0x94, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, - 0xAD, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAE, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, - 0x94, 0xD9, 0x87, 0xD8, 0xA8, 0xD8, 0xAC, 0xD8, - 0xA8, 0xD8, 0xAD, 0xD8, 0xA8, 0xD8, 0xAE, 0xD8, - 0xA8, 0xD9, 0x85, 0xD8, 0xA8, 0xD9, 0x87, 0xD8, - 0xAA, 0xD8, 0xAC, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, - 0xAA, 0xD8, 0xAE, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, - 0xAA, 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, - 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, - 0xAD, 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, - 0xAE, 0xD8, 0xAC, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, - 0xB3, 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, - 0xB3, 0xD8, 0xAE, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, - 0xB5, 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAE, 0xD8, - 0xB5, 0xD9, 0x85, 0xD8, 0xB6, 0xD8, 0xAC, 0xD8, - 0xB6, 0xD8, 0xAD, 0xD8, 0xB6, 0xD8, 0xAE, 0xD8, - 0xB6, 0xD9, 0x85, 0xD8, 0xB7, 0xD8, 0xAD, 0xD8, - 0xB8, 0xD9, 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD8, - 0xB9, 0xD9, 0x85, 0xD8, 0xBA, 0xD8, 0xAC, 0xD8, - 0xBA, 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAC, 0xD9, - 0x81, 0xD8, 0xAD, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, - 0x81, 0xD9, 0x85, 0xD9, 0x82, 0xD8, 0xAD, 0xD9, - 0x82, 0xD9, 0x85, 0xD9, 0x83, 0xD8, 0xAC, 0xD9, - 0x83, 0xD8, 0xAD, 0xD9, 0x83, 0xD8, 0xAE, 0xD9, - 0x83, 0xD9, 0x84, 0xD9, 0x83, 0xD9, 0x85, 0xD9, - 0x84, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, - 0x84, 0xD8, 0xAE, 0xD9, 0x84, 0xD9, 0x85, 0xD9, - 0x84, 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, - 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAE, 0xD9, - 0x85, 0xD9, 0x85, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, - 0x86, 0xD8, 0xAD, 0xD9, 0x86, 0xD8, 0xAE, 0xD9, - 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, - 0x87, 0xD8, 0xAC, 0xD9, 0x87, 0xD9, 0x85, 0xD9, - 0x87, 0xD9, 0xB0, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xAE, 0xD9, - 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, - 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, - 0x94, 0xD9, 0x87, 0xD8, 0xA8, 0xD9, 0x85, 0xD8, - 0xA8, 0xD9, 0x87, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, - 0xAA, 0xD9, 0x87, 0xD8, 0xAB, 0xD9, 0x85, 0xD8, - 0xAB, 0xD9, 0x87, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, - 0xB3, 0xD9, 0x87, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, - 0xB4, 0xD9, 0x87, 0xD9, 0x83, 0xD9, 0x84, 0xD9, - 0x83, 0xD9, 0x85, 0xD9, 0x84, 0xD9, 0x85, 0xD9, - 0x86, 0xD9, 0x85, 0xD9, 0x86, 0xD9, 0x87, 0xD9, - 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, - 0x80, 0xD9, 0x8E, 0xD9, 0x91, 0xD9, 0x80, 0xD9, - 0x8F, 0xD9, 0x91, 0xD9, 0x80, 0xD9, 0x90, 0xD9, - 0x91, 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, - 0x8A, 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, - 0x8A, 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, - 0x8A, 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, - 0x8A, 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, - 0x8A, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, - 0x8A, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, - 0x8A, 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, - 0x8A, 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, - 0x8A, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, - 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, - 0x85, 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, - 0xB1, 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, - 0xB1, 0xD8, 0xB7, 0xD9, 0x89, 0xD8, 0xB7, 0xD9, - 0x8A, 0xD8, 0xB9, 0xD9, 0x89, 0xD8, 0xB9, 0xD9, - 0x8A, 0xD8, 0xBA, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, - 0x8A, 0xD8, 0xB3, 0xD9, 0x89, 0xD8, 0xB3, 0xD9, - 0x8A, 0xD8, 0xB4, 0xD9, 0x89, 0xD8, 0xB4, 0xD9, - 0x8A, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, 0xAD, 0xD9, - 0x8A, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, 0xAE, 0xD9, - 0x8A, 0xD8, 0xB5, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, - 0x8A, 0xD8, 0xB6, 0xD9, 0x89, 0xD8, 0xB6, 0xD9, - 0x8A, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, - 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, - 0x85, 0xD8, 0xB4, 0xD8, 0xB1, 0xD8, 0xB3, 0xD8, - 0xB1, 0xD8, 0xB5, 0xD8, 0xB1, 0xD8, 0xB6, 0xD8, - 0xB1, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, - 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, - 0x85, 0xD8, 0xB3, 0xD9, 0x87, 0xD8, 0xB4, 0xD9, - 0x87, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, - 0xAC, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8, 0xB3, 0xD8, - 0xAE, 0xD8, 0xB4, 0xD8, 0xAC, 0xD8, 0xB4, 0xD8, - 0xAD, 0xD8, 0xB4, 0xD8, 0xAE, 0xD8, 0xB7, 0xD9, - 0x85, 0xD8, 0xB8, 0xD9, 0x85, 0xD8, 0xA7, 0xD9, - 0x8B, 0xD8, 0xA7, 0xD9, 0x8B, 0xD8, 0xAA, 0xD8, - 0xAC, 0xD9, 0x85, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, - 0xAC, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, - 0xAA, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAA, 0xD8, - 0xAE, 0xD9, 0x85, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, - 0xAC, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, - 0xAA, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, - 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, - 0xAD, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, - 0xAD, 0xD9, 0x85, 0xD9, 0x89, 0xD8, 0xB3, 0xD8, - 0xAD, 0xD8, 0xAC, 0xD8, 0xB3, 0xD8, 0xAC, 0xD8, - 0xAD, 0xD8, 0xB3, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, - 0xB3, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, - 0x85, 0xD8, 0xAD, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, - 0xAC, 0xD8, 0xB3, 0xD9, 0x85, 0xD9, 0x85, 0xD8, - 0xB3, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB5, 0xD8, - 0xAD, 0xD8, 0xAD, 0xD8, 0xB5, 0xD8, 0xAD, 0xD8, - 0xAD, 0xD8, 0xB5, 0xD9, 0x85, 0xD9, 0x85, 0xD8, - 0xB4, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB4, 0xD8, - 0xAD, 0xD9, 0x85, 0xD8, 0xB4, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, - 0xB4, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xB4, 0xD9, - 0x85, 0xD9, 0x85, 0xD8, 0xB4, 0xD9, 0x85, 0xD9, - 0x85, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x89, 0xD8, - 0xB6, 0xD8, 0xAE, 0xD9, 0x85, 0xD8, 0xB6, 0xD8, - 0xAE, 0xD9, 0x85, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, - 0xAD, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, - 0xB7, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB7, 0xD9, - 0x85, 0xD9, 0x8A, 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, - 0x85, 0xD8, 0xB9, 0xD9, 0x85, 0xD9, 0x85, 0xD8, - 0xB9, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, - 0x85, 0xD9, 0x89, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, - 0x85, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, - 0xBA, 0xD9, 0x85, 0xD9, 0x89, 0xD9, 0x81, 0xD8, - 0xAE, 0xD9, 0x85, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, - 0x85, 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, - 0x82, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x84, 0xD8, - 0xAD, 0xD9, 0x85, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, - 0x8A, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x89, 0xD9, - 0x84, 0xD8, 0xAC, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, - 0xAC, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, - 0x85, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, 0xD9, - 0x84, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x84, 0xD9, - 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, - 0xAC, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, - 0x85, 0xD8, 0xAD, 0xD9, 0x8A, 0xD9, 0x85, 0xD8, - 0xAC, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, - 0x85, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0xD9, - 0x85, 0xD8, 0xAE, 0xD9, 0x85, 0xD9, 0x85, 0xD8, - 0xAC, 0xD8, 0xAE, 0xD9, 0x87, 0xD9, 0x85, 0xD8, - 0xAC, 0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x85, 0xD9, - 0x86, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x86, 0xD8, - 0xAD, 0xD9, 0x89, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, - 0x85, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, - 0x86, 0xD8, 0xAC, 0xD9, 0x89, 0xD9, 0x86, 0xD9, - 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD9, 0x85, 0xD9, - 0x89, 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x85, 0xD9, - 0x8A, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xA8, 0xD8, - 0xAE, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x89, 0xD8, - 0xAA, 0xD8, 0xAE, 0xD9, 0x8A, 0xD8, 0xAA, 0xD8, - 0xAE, 0xD9, 0x89, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, - 0x8A, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x89, 0xD8, - 0xAC, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xAC, 0xD8, - 0xAD, 0xD9, 0x89, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, - 0x89, 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x89, 0xD8, - 0xB5, 0xD8, 0xAD, 0xD9, 0x8A, 0xD8, 0xB4, 0xD8, - 0xAD, 0xD9, 0x8A, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, - 0x8A, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, - 0x84, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, - 0xAD, 0xD9, 0x8A, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, - 0x85, 0xD9, 0x85, 0xD9, 0x8A, 0xD9, 0x82, 0xD9, - 0x85, 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAD, 0xD9, - 0x8A, 0xD9, 0x82, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, - 0x84, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xB9, 0xD9, - 0x85, 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, - 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, - 0x85, 0xD8, 0xAE, 0xD9, 0x8A, 0xD9, 0x84, 0xD8, - 0xAC, 0xD9, 0x85, 0xD9, 0x83, 0xD9, 0x85, 0xD9, - 0x85, 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, - 0x86, 0xD8, 0xAC, 0xD8, 0xAD, 0xD8, 0xAC, 0xD8, - 0xAD, 0xD9, 0x8A, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x8A, 0xD9, - 0x81, 0xD9, 0x85, 0xD9, 0x8A, 0xD8, 0xA8, 0xD8, - 0xAD, 0xD9, 0x8A, 0xD9, 0x83, 0xD9, 0x85, 0xD9, - 0x85, 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, 0x85, 0xD8, - 0xB5, 0xD9, 0x85, 0xD9, 0x85, 0xD8, 0xB3, 0xD8, - 0xAE, 0xD9, 0x8A, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, - 0x8A, 0xD8, 0xB5, 0xD9, 0x84, 0xDB, 0x92, 0xD9, - 0x82, 0xD9, 0x84, 0xDB, 0x92, 0xD8, 0xA7, 0xD9, - 0x84, 0xD9, 0x84, 0xD9, 0x87, 0xD8, 0xA7, 0xD9, - 0x83, 0xD8, 0xA8, 0xD8, 0xB1, 0xD9, 0x85, 0xD8, - 0xAD, 0xD9, 0x85, 0xD8, 0xAF, 0xD8, 0xB5, 0xD9, - 0x84, 0xD8, 0xB9, 0xD9, 0x85, 0xD8, 0xB1, 0xD8, - 0xB3, 0xD9, 0x88, 0xD9, 0x84, 0xD8, 0xB9, 0xD9, - 0x84, 0xD9, 0x8A, 0xD9, 0x87, 0xD9, 0x88, 0xD8, - 0xB3, 0xD9, 0x84, 0xD9, 0x85, 0xD8, 0xB5, 0xD9, - 0x84, 0xD9, 0x89, 0xD8, 0xB5, 0xD9, 0x84, 0xD9, - 0x89, 0x20, 0xD8, 0xA7, 0xD9, 0x84, 0xD9, 0x84, - 0xD9, 0x87, 0x20, 0xD8, 0xB9, 0xD9, 0x84, 0xD9, - 0x8A, 0xD9, 0x87, 0x20, 0xD9, 0x88, 0xD8, 0xB3, - 0xD9, 0x84, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x84, - 0x20, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, - 0x84, 0xD9, 0x87, 0xD8, 0xB1, 0xDB, 0x8C, 0xD8, - 0xA7, 0xD9, 0x84, 0x2C, 0xE3, 0x80, 0x81, 0xE3, - 0x80, 0x82, 0x3A, 0x3B, 0x21, 0x3F, 0xE3, 0x80, - 0x96, 0xE3, 0x80, 0x97, 0x2E, 0x2E, 0x2E, 0x2E, - 0x2E, 0xE2, 0x80, 0x94, 0xE2, 0x80, 0x93, 0x5F, - 0x5F, 0x28, 0x29, 0x7B, 0x7D, 0xE3, 0x80, 0x94, - 0xE3, 0x80, 0x95, 0xE3, 0x80, 0x90, 0xE3, 0x80, - 0x91, 0xE3, 0x80, 0x8A, 0xE3, 0x80, 0x8B, 0xE3, - 0x80, 0x88, 0xE3, 0x80, 0x89, 0xE3, 0x80, 0x8C, - 0xE3, 0x80, 0x8D, 0xE3, 0x80, 0x8E, 0xE3, 0x80, - 0x8F, 0x5B, 0x5D, 0x20, 0xCC, 0x85, 0x20, 0xCC, - 0x85, 0x20, 0xCC, 0x85, 0x20, 0xCC, 0x85, 0x5F, - 0x5F, 0x5F, 0x2C, 0xE3, 0x80, 0x81, 0x2E, 0x3B, - 0x3A, 0x3F, 0x21, 0xE2, 0x80, 0x94, 0x28, 0x29, - 0x7B, 0x7D, 0xE3, 0x80, 0x94, 0xE3, 0x80, 0x95, - 0x23, 0x26, 0x2A, 0x2B, 0x2D, 0x3C, 0x3E, 0x3D, - 0x5C, 0x24, 0x25, 0x40, 0x20, 0xD9, 0x8B, 0xD9, - 0x80, 0xD9, 0x8B, 0x20, 0xD9, 0x8C, 0x20, 0xD9, - 0x8D, 0x20, 0xD9, 0x8E, 0xD9, 0x80, 0xD9, 0x8E, - 0x20, 0xD9, 0x8F, 0xD9, 0x80, 0xD9, 0x8F, 0x20, - 0xD9, 0x90, 0xD9, 0x80, 0xD9, 0x90, 0x20, 0xD9, - 0x91, 0xD9, 0x80, 0xD9, 0x91, 0x20, 0xD9, 0x92, - 0xD9, 0x80, 0xD9, 0x92, 0xD8, 0xA1, 0xD8, 0xA7, - 0xD9, 0x93, 0xD8, 0xA7, 0xD9, 0x93, 0xD8, 0xA7, - 0xD9, 0x94, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, 0x88, - 0xD9, 0x94, 0xD9, 0x88, 0xD9, 0x94, 0xD8, 0xA7, - 0xD9, 0x95, 0xD8, 0xA7, 0xD9, 0x95, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x8A, - 0xD9, 0x94, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xA7, - 0xD8, 0xA7, 0xD8, 0xA8, 0xD8, 0xA8, 0xD8, 0xA8, - 0xD8, 0xA8, 0xD8, 0xA9, 0xD8, 0xA9, 0xD8, 0xAA, - 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, 0xAA, 0xD8, 0xAB, - 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, 0xAB, 0xD8, 0xAC, - 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, 0xAC, 0xD8, 0xAD, - 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, 0xAD, 0xD8, 0xAE, - 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, 0xAE, 0xD8, 0xAF, - 0xD8, 0xAF, 0xD8, 0xB0, 0xD8, 0xB0, 0xD8, 0xB1, - 0xD8, 0xB1, 0xD8, 0xB2, 0xD8, 0xB2, 0xD8, 0xB3, - 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, 0xB3, 0xD8, 0xB4, - 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, 0xB4, 0xD8, 0xB5, - 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, 0xB5, 0xD8, 0xB6, - 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, 0xB6, 0xD8, 0xB7, - 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, 0xB7, 0xD8, 0xB8, - 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, 0xB8, 0xD8, 0xB9, - 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, 0xB9, 0xD8, 0xBA, - 0xD8, 0xBA, 0xD8, 0xBA, 0xD8, 0xBA, 0xD9, 0x81, - 0xD9, 0x81, 0xD9, 0x81, 0xD9, 0x81, 0xD9, 0x82, - 0xD9, 0x82, 0xD9, 0x82, 0xD9, 0x82, 0xD9, 0x83, - 0xD9, 0x83, 0xD9, 0x83, 0xD9, 0x83, 0xD9, 0x84, - 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x85, - 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x85, 0xD9, 0x86, - 0xD9, 0x86, 0xD9, 0x86, 0xD9, 0x86, 0xD9, 0x87, - 0xD9, 0x87, 0xD9, 0x87, 0xD9, 0x87, 0xD9, 0x88, - 0xD9, 0x88, 0xD9, 0x89, 0xD9, 0x89, 0xD9, 0x8A, - 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x8A, 0xD9, 0x84, - 0xD8, 0xA7, 0xD9, 0x93, 0xD9, 0x84, 0xD8, 0xA7, - 0xD9, 0x93, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, - 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, 0xD9, 0x84, - 0xD8, 0xA7, 0xD9, 0x95, 0xD9, 0x84, 0xD8, 0xA7, - 0xD9, 0x95, 0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x84, - 0xD8, 0xA7, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, - 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, - 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, - 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, - 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, - 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, - 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, - 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, - 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, - 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, - 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, - 0xE2, 0xA6, 0x85, 0xE2, 0xA6, 0x86, 0xE3, 0x80, - 0x82, 0xE3, 0x80, 0x8C, 0xE3, 0x80, 0x8D, 0xE3, - 0x80, 0x81, 0xE3, 0x83, 0xBB, 0xE3, 0x83, 0xB2, - 0xE3, 0x82, 0xA1, 0xE3, 0x82, 0xA3, 0xE3, 0x82, - 0xA5, 0xE3, 0x82, 0xA7, 0xE3, 0x82, 0xA9, 0xE3, - 0x83, 0xA3, 0xE3, 0x83, 0xA5, 0xE3, 0x83, 0xA7, - 0xE3, 0x83, 0x83, 0xE3, 0x83, 0xBC, 0xE3, 0x82, - 0xA2, 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xA6, 0xE3, - 0x82, 0xA8, 0xE3, 0x82, 0xAA, 0xE3, 0x82, 0xAB, - 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x82, - 0xB1, 0xE3, 0x82, 0xB3, 0xE3, 0x82, 0xB5, 0xE3, - 0x82, 0xB7, 0xE3, 0x82, 0xB9, 0xE3, 0x82, 0xBB, - 0xE3, 0x82, 0xBD, 0xE3, 0x82, 0xBF, 0xE3, 0x83, - 0x81, 0xE3, 0x83, 0x84, 0xE3, 0x83, 0x86, 0xE3, - 0x83, 0x88, 0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8B, - 0xE3, 0x83, 0x8C, 0xE3, 0x83, 0x8D, 0xE3, 0x83, - 0x8E, 0xE3, 0x83, 0x8F, 0xE3, 0x83, 0x92, 0xE3, - 0x83, 0x95, 0xE3, 0x83, 0x98, 0xE3, 0x83, 0x9B, - 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0x9F, 0xE3, 0x83, - 0xA0, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xA2, 0xE3, - 0x83, 0xA4, 0xE3, 0x83, 0xA6, 0xE3, 0x83, 0xA8, - 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xAA, 0xE3, 0x83, - 0xAB, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xAD, 0xE3, - 0x83, 0xAF, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0x99, - 0xE3, 0x82, 0x9A, 0xE1, 0x85, 0xA0, 0xE1, 0x84, - 0x80, 0xE1, 0x84, 0x81, 0xE1, 0x86, 0xAA, 0xE1, - 0x84, 0x82, 0xE1, 0x86, 0xAC, 0xE1, 0x86, 0xAD, - 0xE1, 0x84, 0x83, 0xE1, 0x84, 0x84, 0xE1, 0x84, - 0x85, 0xE1, 0x86, 0xB0, 0xE1, 0x86, 0xB1, 0xE1, - 0x86, 0xB2, 0xE1, 0x86, 0xB3, 0xE1, 0x86, 0xB4, - 0xE1, 0x86, 0xB5, 0xE1, 0x84, 0x9A, 0xE1, 0x84, - 0x86, 0xE1, 0x84, 0x87, 0xE1, 0x84, 0x88, 0xE1, - 0x84, 0xA1, 0xE1, 0x84, 0x89, 0xE1, 0x84, 0x8A, - 0xE1, 0x84, 0x8B, 0xE1, 0x84, 0x8C, 0xE1, 0x84, - 0x8D, 0xE1, 0x84, 0x8E, 0xE1, 0x84, 0x8F, 0xE1, - 0x84, 0x90, 0xE1, 0x84, 0x91, 0xE1, 0x84, 0x92, - 0xE1, 0x85, 0xA1, 0xE1, 0x85, 0xA2, 0xE1, 0x85, - 0xA3, 0xE1, 0x85, 0xA4, 0xE1, 0x85, 0xA5, 0xE1, - 0x85, 0xA6, 0xE1, 0x85, 0xA7, 0xE1, 0x85, 0xA8, - 0xE1, 0x85, 0xA9, 0xE1, 0x85, 0xAA, 0xE1, 0x85, - 0xAB, 0xE1, 0x85, 0xAC, 0xE1, 0x85, 0xAD, 0xE1, - 0x85, 0xAE, 0xE1, 0x85, 0xAF, 0xE1, 0x85, 0xB0, - 0xE1, 0x85, 0xB1, 0xE1, 0x85, 0xB2, 0xE1, 0x85, - 0xB3, 0xE1, 0x85, 0xB4, 0xE1, 0x85, 0xB5, 0xC2, - 0xA2, 0xC2, 0xA3, 0xC2, 0xAC, 0x20, 0xCC, 0x84, - 0xC2, 0xA6, 0xC2, 0xA5, 0xE2, 0x82, 0xA9, 0xE2, - 0x94, 0x82, 0xE2, 0x86, 0x90, 0xE2, 0x86, 0x91, - 0xE2, 0x86, 0x92, 0xE2, 0x86, 0x93, 0xE2, 0x96, - 0xA0, 0xE2, 0x97, 0x8B, 0xF6, 0xF0, 0x9D, 0x85, - 0x97, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, 0xF0, 0x9D, - 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF6, 0xF0, - 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, - 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x85, 0x98, - 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, - 0xF6, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, - 0xA5, 0xF0, 0x9D, 0x85, 0xB0, 0xF6, 0xF0, 0x9D, - 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, - 0x85, 0xB1, 0xF6, 0xF0, 0x9D, 0x85, 0x98, 0xF0, - 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB2, 0xF6, - 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, 0x85, 0xA5, - 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, - 0xA5, 0xF6, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, - 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE, 0xF6, 0xF0, - 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, - 0x9D, 0x85, 0xAE, 0xF6, 0xF0, 0x9D, 0x86, 0xB9, - 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, - 0xF6, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, - 0xA5, 0xF0, 0x9D, 0x85, 0xAF, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, - 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, - 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, 0x44, - 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, - 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, - 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, - 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, - 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, - 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, - 0x41, 0x43, 0x44, 0x47, 0x4A, 0x4B, 0x4E, 0x4F, - 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, - 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x66, 0x68, - 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, - 0x45, 0x46, 0x47, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, - 0x4F, 0x50, 0x51, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, - 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, - 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, - 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x44, 0x45, - 0x46, 0x47, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4F, - 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, - 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7A, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, - 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0xC4, 0xB1, 0xC8, 0xB7, 0xCE, 0x91, 0xCE, - 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, - 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, - 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, - 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, - 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, - 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, - 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, - 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, - 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, - 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, - 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, - 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, - 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, - 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, - 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, - 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, - 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, - 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, - 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, - 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, - 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, - 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, - 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, - 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, - 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, - 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, - 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, - 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, - 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, - 0x80, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, - 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, - 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, - 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, - 0xA0, 0xCE, 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, - 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, - 0xA8, 0xCE, 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, - 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, - 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, - 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, - 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, - 0xCF, 0x82, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, - 0xCF, 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, - 0xE2, 0x88, 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, - 0xBA, 0xCF, 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, - 0x91, 0xCE, 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, - 0x95, 0xCE, 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, - 0x99, 0xCE, 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, - 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, - 0xA1, 0xCE, 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, - 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, - 0xA9, 0xE2, 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, - 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, - 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, - 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, - 0xCE, 0xBF, 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, - 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, - 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, - 0x82, 0xCE, 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, - 0x86, 0xCF, 0x81, 0xCF, 0x80, 0xCE, 0x91, 0xCE, - 0x92, 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, - 0x96, 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, - 0x9A, 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, - 0x9E, 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, - 0x98, 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, - 0xA6, 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xE2, - 0x88, 0x87, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, - 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, - 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, - 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, - 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x82, 0xCF, 0x83, - 0xCF, 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, - 0xCF, 0x88, 0xCF, 0x89, 0xE2, 0x88, 0x82, 0xCE, - 0xB5, 0xCE, 0xB8, 0xCE, 0xBA, 0xCF, 0x86, 0xCF, - 0x81, 0xCF, 0x80, 0xCF, 0x9C, 0xCF, 0x9D, 0x30, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, - 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, - 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0xF6, 0xE4, 0xB8, 0xBD, 0xF6, 0xE4, 0xB8, - 0xB8, 0xF6, 0xE4, 0xB9, 0x81, 0xF6, 0xF0, 0xA0, - 0x84, 0xA2, 0xF6, 0xE4, 0xBD, 0xA0, 0xF6, 0xE4, - 0xBE, 0xAE, 0xF6, 0xE4, 0xBE, 0xBB, 0xF6, 0xE5, - 0x80, 0x82, 0xF6, 0xE5, 0x81, 0xBA, 0xF6, 0xE5, - 0x82, 0x99, 0xF6, 0xE5, 0x83, 0xA7, 0xF6, 0xE5, - 0x83, 0x8F, 0xF6, 0xE3, 0x92, 0x9E, 0xF6, 0xF0, - 0xA0, 0x98, 0xBA, 0xF6, 0xE5, 0x85, 0x8D, 0xF6, - 0xE5, 0x85, 0x94, 0xF6, 0xE5, 0x85, 0xA4, 0xF6, - 0xE5, 0x85, 0xB7, 0xF6, 0xF0, 0xA0, 0x94, 0x9C, - 0xF6, 0xE3, 0x92, 0xB9, 0xF6, 0xE5, 0x85, 0xA7, - 0xF6, 0xE5, 0x86, 0x8D, 0xF6, 0xF0, 0xA0, 0x95, - 0x8B, 0xF6, 0xE5, 0x86, 0x97, 0xF6, 0xE5, 0x86, - 0xA4, 0xF6, 0xE4, 0xBB, 0x8C, 0xF6, 0xE5, 0x86, - 0xAC, 0xF6, 0xE5, 0x86, 0xB5, 0xF6, 0xF0, 0xA9, - 0x87, 0x9F, 0xF6, 0xE5, 0x87, 0xB5, 0xF6, 0xE5, - 0x88, 0x83, 0xF6, 0xE3, 0x93, 0x9F, 0xF6, 0xE5, - 0x88, 0xBB, 0xF6, 0xE5, 0x89, 0x86, 0xF6, 0xE5, - 0x89, 0xB2, 0xF6, 0xE5, 0x89, 0xB7, 0xF6, 0xE3, - 0x94, 0x95, 0xF6, 0xE5, 0x8B, 0x87, 0xF6, 0xE5, - 0x8B, 0x89, 0xF6, 0xE5, 0x8B, 0xA4, 0xF6, 0xE5, - 0x8B, 0xBA, 0xF6, 0xE5, 0x8C, 0x85, 0xF6, 0xE5, - 0x8C, 0x86, 0xF6, 0xE5, 0x8C, 0x97, 0xF6, 0xE5, - 0x8D, 0x89, 0xF6, 0xE5, 0x8D, 0x91, 0xF6, 0xE5, - 0x8D, 0x9A, 0xF6, 0xE5, 0x8D, 0xB3, 0xF6, 0xE5, - 0x8D, 0xBD, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xE5, - 0x8D, 0xBF, 0xF6, 0xE5, 0x8D, 0xBF, 0xF6, 0xF0, - 0xA0, 0xA8, 0xAC, 0xF6, 0xE7, 0x81, 0xB0, 0xF6, - 0xE5, 0x8F, 0x8A, 0xF6, 0xE5, 0x8F, 0x9F, 0xF6, - 0xF0, 0xA0, 0xAD, 0xA3, 0xF6, 0xE5, 0x8F, 0xAB, - 0xF6, 0xE5, 0x8F, 0xB1, 0xF6, 0xE5, 0x90, 0x86, - 0xF6, 0xE5, 0x92, 0x9E, 0xF6, 0xE5, 0x90, 0xB8, - 0xF6, 0xE5, 0x91, 0x88, 0xF6, 0xE5, 0x91, 0xA8, - 0xF6, 0xE5, 0x92, 0xA2, 0xF6, 0xE5, 0x93, 0xB6, - 0xF6, 0xE5, 0x94, 0x90, 0xF6, 0xE5, 0x95, 0x93, - 0xF6, 0xE5, 0x95, 0xA3, 0xF6, 0xE5, 0x96, 0x84, - 0xF6, 0xE5, 0x96, 0x84, 0xF6, 0xE5, 0x96, 0x99, - 0xF6, 0xE5, 0x96, 0xAB, 0xF6, 0xE5, 0x96, 0xB3, - 0xF6, 0xE5, 0x97, 0x82, 0xF6, 0xE5, 0x9C, 0x96, - 0xF6, 0xE5, 0x98, 0x86, 0xF6, 0xE5, 0x9C, 0x97, - 0xF6, 0xE5, 0x99, 0x91, 0xF6, 0xE5, 0x99, 0xB4, - 0xF6, 0xE5, 0x88, 0x87, 0xF6, 0xE5, 0xA3, 0xAE, - 0xF6, 0xE5, 0x9F, 0x8E, 0xF6, 0xE5, 0x9F, 0xB4, - 0xF6, 0xE5, 0xA0, 0x8D, 0xF6, 0xE5, 0x9E, 0x8B, - 0xF6, 0xE5, 0xA0, 0xB2, 0xF6, 0xE5, 0xA0, 0xB1, - 0xF6, 0xE5, 0xA2, 0xAC, 0xF6, 0xF0, 0xA1, 0x93, - 0xA4, 0xF6, 0xE5, 0xA3, 0xB2, 0xF6, 0xE5, 0xA3, - 0xB7, 0xF6, 0xE5, 0xA4, 0x86, 0xF6, 0xE5, 0xA4, - 0x9A, 0xF6, 0xE5, 0xA4, 0xA2, 0xF6, 0xE5, 0xA5, - 0xA2, 0xF6, 0xF0, 0xA1, 0x9A, 0xA8, 0xF6, 0xF0, - 0xA1, 0x9B, 0xAA, 0xF6, 0xE5, 0xA7, 0xAC, 0xF6, - 0xE5, 0xA8, 0x9B, 0xF6, 0xE5, 0xA8, 0xA7, 0xF6, - 0xE5, 0xA7, 0x98, 0xF6, 0xE5, 0xA9, 0xA6, 0xF6, - 0xE3, 0x9B, 0xAE, 0xF6, 0xE3, 0x9B, 0xBC, 0xF6, - 0xE5, 0xAC, 0x88, 0xF6, 0xE5, 0xAC, 0xBE, 0xF6, - 0xE5, 0xAC, 0xBE, 0xF6, 0xF0, 0xA1, 0xA7, 0x88, - 0xF6, 0xE5, 0xAF, 0x83, 0xF6, 0xE5, 0xAF, 0x98, - 0xF6, 0xE5, 0xAF, 0xA7, 0xF6, 0xE5, 0xAF, 0xB3, - 0xF6, 0xF0, 0xA1, 0xAC, 0x98, 0xF6, 0xE5, 0xAF, - 0xBF, 0xF6, 0xE5, 0xB0, 0x86, 0xF6, 0xE5, 0xBD, - 0x93, 0xF6, 0xE5, 0xB0, 0xA2, 0xF6, 0xE3, 0x9E, - 0x81, 0xF6, 0xE5, 0xB1, 0xA0, 0xF6, 0xE5, 0xB1, - 0xAE, 0xF6, 0xE5, 0xB3, 0x80, 0xF6, 0xE5, 0xB2, - 0x8D, 0xF6, 0xF0, 0xA1, 0xB7, 0xA4, 0xF6, 0xE5, - 0xB5, 0x83, 0xF6, 0xF0, 0xA1, 0xB7, 0xA6, 0xF6, - 0xE5, 0xB5, 0xAE, 0xF6, 0xE5, 0xB5, 0xAB, 0xF6, - 0xE5, 0xB5, 0xBC, 0xF6, 0xE5, 0xB7, 0xA1, 0xF6, - 0xE5, 0xB7, 0xA2, 0xF6, 0xE3, 0xA0, 0xAF, 0xF6, - 0xE5, 0xB7, 0xBD, 0xF6, 0xE5, 0xB8, 0xA8, 0xF6, - 0xE5, 0xB8, 0xBD, 0xF6, 0xE5, 0xB9, 0xA9, 0xF6, - 0xE3, 0xA1, 0xA2, 0xF6, 0xF0, 0xA2, 0x86, 0x83, - 0xF6, 0xE3, 0xA1, 0xBC, 0xF6, 0xE5, 0xBA, 0xB0, - 0xF6, 0xE5, 0xBA, 0xB3, 0xF6, 0xE5, 0xBA, 0xB6, - 0xF6, 0xE5, 0xBB, 0x8A, 0xF6, 0xF0, 0xAA, 0x8E, - 0x92, 0xF6, 0xE5, 0xBB, 0xBE, 0xF6, 0xF0, 0xA2, - 0x8C, 0xB1, 0xF6, 0xF0, 0xA2, 0x8C, 0xB1, 0xF6, - 0xE8, 0x88, 0x81, 0xF6, 0xE5, 0xBC, 0xA2, 0xF6, - 0xE5, 0xBC, 0xA2, 0xF6, 0xE3, 0xA3, 0x87, 0xF6, - 0xF0, 0xA3, 0x8A, 0xB8, 0xF6, 0xF0, 0xA6, 0x87, - 0x9A, 0xF6, 0xE5, 0xBD, 0xA2, 0xF6, 0xE5, 0xBD, - 0xAB, 0xF6, 0xE3, 0xA3, 0xA3, 0xF6, 0xE5, 0xBE, - 0x9A, 0xF6, 0xE5, 0xBF, 0x8D, 0xF6, 0xE5, 0xBF, - 0x97, 0xF6, 0xE5, 0xBF, 0xB9, 0xF6, 0xE6, 0x82, - 0x81, 0xF6, 0xE3, 0xA4, 0xBA, 0xF6, 0xE3, 0xA4, - 0x9C, 0xF6, 0xE6, 0x82, 0x94, 0xF6, 0xF0, 0xA2, - 0x9B, 0x94, 0xF6, 0xE6, 0x83, 0x87, 0xF6, 0xE6, - 0x85, 0x88, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, - 0x85, 0x8E, 0xF6, 0xE6, 0x85, 0x8C, 0xF6, 0xE6, - 0x85, 0xBA, 0xF6, 0xE6, 0x86, 0x8E, 0xF6, 0xE6, - 0x86, 0xB2, 0xF6, 0xE6, 0x86, 0xA4, 0xF6, 0xE6, - 0x86, 0xAF, 0xF6, 0xE6, 0x87, 0x9E, 0xF6, 0xE6, - 0x87, 0xB2, 0xF6, 0xE6, 0x87, 0xB6, 0xF6, 0xE6, - 0x88, 0x90, 0xF6, 0xE6, 0x88, 0x9B, 0xF6, 0xE6, - 0x89, 0x9D, 0xF6, 0xE6, 0x8A, 0xB1, 0xF6, 0xE6, - 0x8B, 0x94, 0xF6, 0xE6, 0x8D, 0x90, 0xF6, 0xF0, - 0xA2, 0xAC, 0x8C, 0xF6, 0xE6, 0x8C, 0xBD, 0xF6, - 0xE6, 0x8B, 0xBC, 0xF6, 0xE6, 0x8D, 0xA8, 0xF6, - 0xE6, 0x8E, 0x83, 0xF6, 0xE6, 0x8F, 0xA4, 0xF6, - 0xF0, 0xA2, 0xAF, 0xB1, 0xF6, 0xE6, 0x90, 0xA2, - 0xF6, 0xE6, 0x8F, 0x85, 0xF6, 0xE6, 0x8E, 0xA9, - 0xF6, 0xE3, 0xA8, 0xAE, 0xF6, 0xE6, 0x91, 0xA9, - 0xF6, 0xE6, 0x91, 0xBE, 0xF6, 0xE6, 0x92, 0x9D, - 0xF6, 0xE6, 0x91, 0xB7, 0xF6, 0xE3, 0xA9, 0xAC, - 0xF6, 0xE6, 0x95, 0x8F, 0xF6, 0xE6, 0x95, 0xAC, - 0xF6, 0xF0, 0xA3, 0x80, 0x8A, 0xF6, 0xE6, 0x97, - 0xA3, 0xF6, 0xE6, 0x9B, 0xB8, 0xF6, 0xE6, 0x99, - 0x89, 0xF6, 0xE3, 0xAC, 0x99, 0xF6, 0xE6, 0x9A, - 0x91, 0xF6, 0xE3, 0xAC, 0x88, 0xF6, 0xE3, 0xAB, - 0xA4, 0xF6, 0xE5, 0x86, 0x92, 0xF6, 0xE5, 0x86, - 0x95, 0xF6, 0xE6, 0x9C, 0x80, 0xF6, 0xE6, 0x9A, - 0x9C, 0xF6, 0xE8, 0x82, 0xAD, 0xF6, 0xE4, 0x8F, - 0x99, 0xF6, 0xE6, 0x9C, 0x97, 0xF6, 0xE6, 0x9C, - 0x9B, 0xF6, 0xE6, 0x9C, 0xA1, 0xF6, 0xE6, 0x9D, - 0x9E, 0xF6, 0xE6, 0x9D, 0x93, 0xF6, 0xF0, 0xA3, - 0x8F, 0x83, 0xF6, 0xE3, 0xAD, 0x89, 0xF6, 0xE6, - 0x9F, 0xBA, 0xF6, 0xE6, 0x9E, 0x85, 0xF6, 0xE6, - 0xA1, 0x92, 0xF6, 0xE6, 0xA2, 0x85, 0xF6, 0xF0, - 0xA3, 0x91, 0xAD, 0xF6, 0xE6, 0xA2, 0x8E, 0xF6, - 0xE6, 0xA0, 0x9F, 0xF6, 0xE6, 0xA4, 0x94, 0xF6, - 0xE3, 0xAE, 0x9D, 0xF6, 0xE6, 0xA5, 0x82, 0xF6, - 0xE6, 0xA6, 0xA3, 0xF6, 0xE6, 0xA7, 0xAA, 0xF6, - 0xE6, 0xAA, 0xA8, 0xF6, 0xF0, 0xA3, 0x9A, 0xA3, - 0xF6, 0xE6, 0xAB, 0x9B, 0xF6, 0xE3, 0xB0, 0x98, - 0xF6, 0xE6, 0xAC, 0xA1, 0xF6, 0xF0, 0xA3, 0xA2, - 0xA7, 0xF6, 0xE6, 0xAD, 0x94, 0xF6, 0xE3, 0xB1, - 0x8E, 0xF6, 0xE6, 0xAD, 0xB2, 0xF6, 0xE6, 0xAE, - 0x9F, 0xF6, 0xE6, 0xAE, 0xBA, 0xF6, 0xE6, 0xAE, - 0xBB, 0xF6, 0xF0, 0xA3, 0xAA, 0x8D, 0xF6, 0xF0, - 0xA1, 0xB4, 0x8B, 0xF6, 0xF0, 0xA3, 0xAB, 0xBA, - 0xF6, 0xE6, 0xB1, 0x8E, 0xF6, 0xF0, 0xA3, 0xB2, - 0xBC, 0xF6, 0xE6, 0xB2, 0xBF, 0xF6, 0xE6, 0xB3, - 0x8D, 0xF6, 0xE6, 0xB1, 0xA7, 0xF6, 0xE6, 0xB4, - 0x96, 0xF6, 0xE6, 0xB4, 0xBE, 0xF6, 0xE6, 0xB5, - 0xB7, 0xF6, 0xE6, 0xB5, 0x81, 0xF6, 0xE6, 0xB5, - 0xA9, 0xF6, 0xE6, 0xB5, 0xB8, 0xF6, 0xE6, 0xB6, - 0x85, 0xF6, 0xF0, 0xA3, 0xB4, 0x9E, 0xF6, 0xE6, - 0xB4, 0xB4, 0xF6, 0xE6, 0xB8, 0xAF, 0xF6, 0xE6, - 0xB9, 0xAE, 0xF6, 0xE3, 0xB4, 0xB3, 0xF6, 0xE6, - 0xBB, 0x8B, 0xF6, 0xE6, 0xBB, 0x87, 0xF6, 0xF0, - 0xA3, 0xBB, 0x91, 0xF6, 0xE6, 0xB7, 0xB9, 0xF6, - 0xE6, 0xBD, 0xAE, 0xF6, 0xF0, 0xA3, 0xBD, 0x9E, - 0xF6, 0xF0, 0xA3, 0xBE, 0x8E, 0xF6, 0xE6, 0xBF, - 0x86, 0xF6, 0xE7, 0x80, 0xB9, 0xF6, 0xE7, 0x80, - 0x9E, 0xF6, 0xE7, 0x80, 0x9B, 0xF6, 0xE3, 0xB6, - 0x96, 0xF6, 0xE7, 0x81, 0x8A, 0xF6, 0xE7, 0x81, - 0xBD, 0xF6, 0xE7, 0x81, 0xB7, 0xF6, 0xE7, 0x82, - 0xAD, 0xF6, 0xF0, 0xA0, 0x94, 0xA5, 0xF6, 0xE7, - 0x85, 0x85, 0xF6, 0xF0, 0xA4, 0x89, 0xA3, 0xF6, - 0xE7, 0x86, 0x9C, 0xF6, 0xF0, 0xA4, 0x8E, 0xAB, - 0xF6, 0xE7, 0x88, 0xA8, 0xF6, 0xE7, 0x88, 0xB5, - 0xF6, 0xE7, 0x89, 0x90, 0xF6, 0xF0, 0xA4, 0x98, - 0x88, 0xF6, 0xE7, 0x8A, 0x80, 0xF6, 0xE7, 0x8A, - 0x95, 0xF6, 0xF0, 0xA4, 0x9C, 0xB5, 0xF6, 0xF0, - 0xA4, 0xA0, 0x94, 0xF6, 0xE7, 0x8D, 0xBA, 0xF6, - 0xE7, 0x8E, 0x8B, 0xF6, 0xE3, 0xBA, 0xAC, 0xF6, - 0xE7, 0x8E, 0xA5, 0xF6, 0xE3, 0xBA, 0xB8, 0xF6, - 0xE3, 0xBA, 0xB8, 0xF6, 0xE7, 0x91, 0x87, 0xF6, - 0xE7, 0x91, 0x9C, 0xF6, 0xE7, 0x91, 0xB1, 0xF6, - 0xE7, 0x92, 0x85, 0xF6, 0xE7, 0x93, 0x8A, 0xF6, - 0xE3, 0xBC, 0x9B, 0xF6, 0xE7, 0x94, 0xA4, 0xF6, - 0xF0, 0xA4, 0xB0, 0xB6, 0xF6, 0xE7, 0x94, 0xBE, - 0xF6, 0xF0, 0xA4, 0xB2, 0x92, 0xF6, 0xE7, 0x95, - 0xB0, 0xF6, 0xF0, 0xA2, 0x86, 0x9F, 0xF6, 0xE7, - 0x98, 0x90, 0xF6, 0xF0, 0xA4, 0xBE, 0xA1, 0xF6, - 0xF0, 0xA4, 0xBE, 0xB8, 0xF6, 0xF0, 0xA5, 0x81, - 0x84, 0xF6, 0xE3, 0xBF, 0xBC, 0xF6, 0xE4, 0x80, - 0x88, 0xF6, 0xE7, 0x9B, 0xB4, 0xF6, 0xF0, 0xA5, - 0x83, 0xB3, 0xF6, 0xF0, 0xA5, 0x83, 0xB2, 0xF6, - 0xF0, 0xA5, 0x84, 0x99, 0xF6, 0xF0, 0xA5, 0x84, - 0xB3, 0xF6, 0xE7, 0x9C, 0x9E, 0xF6, 0xE7, 0x9C, - 0x9F, 0xF6, 0xE7, 0x9C, 0x9F, 0xF6, 0xE7, 0x9D, - 0x8A, 0xF6, 0xE4, 0x80, 0xB9, 0xF6, 0xE7, 0x9E, - 0x8B, 0xF6, 0xE4, 0x81, 0x86, 0xF6, 0xE4, 0x82, - 0x96, 0xF6, 0xF0, 0xA5, 0x90, 0x9D, 0xF6, 0xE7, - 0xA1, 0x8E, 0xF6, 0xE7, 0xA2, 0x8C, 0xF6, 0xE7, - 0xA3, 0x8C, 0xF6, 0xE4, 0x83, 0xA3, 0xF6, 0xF0, - 0xA5, 0x98, 0xA6, 0xF6, 0xE7, 0xA5, 0x96, 0xF6, - 0xF0, 0xA5, 0x9A, 0x9A, 0xF6, 0xF0, 0xA5, 0x9B, - 0x85, 0xF6, 0xE7, 0xA6, 0x8F, 0xF6, 0xE7, 0xA7, - 0xAB, 0xF6, 0xE4, 0x84, 0xAF, 0xF6, 0xE7, 0xA9, - 0x80, 0xF6, 0xE7, 0xA9, 0x8A, 0xF6, 0xE7, 0xA9, - 0x8F, 0xF6, 0xF0, 0xA5, 0xA5, 0xBC, 0xF6, 0xF0, - 0xA5, 0xAA, 0xA7, 0xF6, 0xF0, 0xA5, 0xAA, 0xA7, - 0xF6, 0xE7, 0xAB, 0xAE, 0xF6, 0xE4, 0x88, 0x82, - 0xF6, 0xF0, 0xA5, 0xAE, 0xAB, 0xF6, 0xE7, 0xAF, - 0x86, 0xF6, 0xE7, 0xAF, 0x89, 0xF6, 0xE4, 0x88, - 0xA7, 0xF6, 0xF0, 0xA5, 0xB2, 0x80, 0xF6, 0xE7, - 0xB3, 0x92, 0xF6, 0xE4, 0x8A, 0xA0, 0xF6, 0xE7, - 0xB3, 0xA8, 0xF6, 0xE7, 0xB3, 0xA3, 0xF6, 0xE7, - 0xB4, 0x80, 0xF6, 0xF0, 0xA5, 0xBE, 0x86, 0xF6, - 0xE7, 0xB5, 0xA3, 0xF6, 0xE4, 0x8C, 0x81, 0xF6, - 0xE7, 0xB7, 0x87, 0xF6, 0xE7, 0xB8, 0x82, 0xF6, - 0xE7, 0xB9, 0x85, 0xF6, 0xE4, 0x8C, 0xB4, 0xF6, - 0xF0, 0xA6, 0x88, 0xA8, 0xF6, 0xF0, 0xA6, 0x89, - 0x87, 0xF6, 0xE4, 0x8D, 0x99, 0xF6, 0xF0, 0xA6, - 0x8B, 0x99, 0xF6, 0xE7, 0xBD, 0xBA, 0xF6, 0xF0, - 0xA6, 0x8C, 0xBE, 0xF6, 0xE7, 0xBE, 0x95, 0xF6, - 0xE7, 0xBF, 0xBA, 0xF6, 0xE8, 0x80, 0x85, 0xF6, - 0xF0, 0xA6, 0x93, 0x9A, 0xF6, 0xF0, 0xA6, 0x94, - 0xA3, 0xF6, 0xE8, 0x81, 0xA0, 0xF6, 0xF0, 0xA6, - 0x96, 0xA8, 0xF6, 0xE8, 0x81, 0xB0, 0xF6, 0xF0, - 0xA3, 0x8D, 0x9F, 0xF6, 0xE4, 0x8F, 0x95, 0xF6, - 0xE8, 0x82, 0xB2, 0xF6, 0xE8, 0x84, 0x83, 0xF6, - 0xE4, 0x90, 0x8B, 0xF6, 0xE8, 0x84, 0xBE, 0xF6, - 0xE5, 0xAA, 0xB5, 0xF6, 0xF0, 0xA6, 0x9E, 0xA7, - 0xF6, 0xF0, 0xA6, 0x9E, 0xB5, 0xF6, 0xF0, 0xA3, - 0x8E, 0x93, 0xF6, 0xF0, 0xA3, 0x8E, 0x9C, 0xF6, - 0xE8, 0x88, 0x81, 0xF6, 0xE8, 0x88, 0x84, 0xF6, - 0xE8, 0xBE, 0x9E, 0xF6, 0xE4, 0x91, 0xAB, 0xF6, - 0xE8, 0x8A, 0x91, 0xF6, 0xE8, 0x8A, 0x8B, 0xF6, - 0xE8, 0x8A, 0x9D, 0xF6, 0xE5, 0x8A, 0xB3, 0xF6, - 0xE8, 0x8A, 0xB1, 0xF6, 0xE8, 0x8A, 0xB3, 0xF6, - 0xE8, 0x8A, 0xBD, 0xF6, 0xE8, 0x8B, 0xA6, 0xF6, - 0xF0, 0xA6, 0xAC, 0xBC, 0xF6, 0xE8, 0x8B, 0xA5, - 0xF6, 0xE8, 0x8C, 0x9D, 0xF6, 0xE8, 0x8D, 0xA3, - 0xF6, 0xE8, 0x8E, 0xAD, 0xF6, 0xE8, 0x8C, 0xA3, - 0xF6, 0xE8, 0x8E, 0xBD, 0xF6, 0xE8, 0x8F, 0xA7, - 0xF6, 0xE8, 0x91, 0x97, 0xF6, 0xE8, 0x8D, 0x93, - 0xF6, 0xE8, 0x8F, 0x8A, 0xF6, 0xE8, 0x8F, 0x8C, - 0xF6, 0xE8, 0x8F, 0x9C, 0xF6, 0xF0, 0xA6, 0xB0, - 0xB6, 0xF6, 0xF0, 0xA6, 0xB5, 0xAB, 0xF6, 0xF0, - 0xA6, 0xB3, 0x95, 0xF6, 0xE4, 0x94, 0xAB, 0xF6, - 0xE8, 0x93, 0xB1, 0xF6, 0xE8, 0x93, 0xB3, 0xF6, - 0xE8, 0x94, 0x96, 0xF6, 0xF0, 0xA7, 0x8F, 0x8A, - 0xF6, 0xE8, 0x95, 0xA4, 0xF6, 0xF0, 0xA6, 0xBC, - 0xAC, 0xF6, 0xE4, 0x95, 0x9D, 0xF6, 0xE4, 0x95, - 0xA1, 0xF6, 0xF0, 0xA6, 0xBE, 0xB1, 0xF6, 0xF0, - 0xA7, 0x83, 0x92, 0xF6, 0xE4, 0x95, 0xAB, 0xF6, - 0xE8, 0x99, 0x90, 0xF6, 0xE8, 0x99, 0x9C, 0xF6, - 0xE8, 0x99, 0xA7, 0xF6, 0xE8, 0x99, 0xA9, 0xF6, - 0xE8, 0x9A, 0xA9, 0xF6, 0xE8, 0x9A, 0x88, 0xF6, - 0xE8, 0x9C, 0x8E, 0xF6, 0xE8, 0x9B, 0xA2, 0xF6, - 0xE8, 0x9D, 0xB9, 0xF6, 0xE8, 0x9C, 0xA8, 0xF6, - 0xE8, 0x9D, 0xAB, 0xF6, 0xE8, 0x9E, 0x86, 0xF6, - 0xE4, 0x97, 0x97, 0xF6, 0xE8, 0x9F, 0xA1, 0xF6, - 0xE8, 0xA0, 0x81, 0xF6, 0xE4, 0x97, 0xB9, 0xF6, - 0xE8, 0xA1, 0xA0, 0xF6, 0xE8, 0xA1, 0xA3, 0xF6, - 0xF0, 0xA7, 0x99, 0xA7, 0xF6, 0xE8, 0xA3, 0x97, - 0xF6, 0xE8, 0xA3, 0x9E, 0xF6, 0xE4, 0x98, 0xB5, - 0xF6, 0xE8, 0xA3, 0xBA, 0xF6, 0xE3, 0x92, 0xBB, - 0xF6, 0xF0, 0xA7, 0xA2, 0xAE, 0xF6, 0xF0, 0xA7, - 0xA5, 0xA6, 0xF6, 0xE4, 0x9A, 0xBE, 0xF6, 0xE4, - 0x9B, 0x87, 0xF6, 0xE8, 0xAA, 0xA0, 0xF6, 0xE8, - 0xAB, 0xAD, 0xF6, 0xE8, 0xAE, 0x8A, 0xF6, 0xE8, - 0xB1, 0x95, 0xF6, 0xF0, 0xA7, 0xB2, 0xA8, 0xF6, - 0xE8, 0xB2, 0xAB, 0xF6, 0xE8, 0xB3, 0x81, 0xF6, - 0xE8, 0xB4, 0x9B, 0xF6, 0xE8, 0xB5, 0xB7, 0xF6, - 0xF0, 0xA7, 0xBC, 0xAF, 0xF6, 0xF0, 0xA0, 0xA0, - 0x84, 0xF6, 0xE8, 0xB7, 0x8B, 0xF6, 0xE8, 0xB6, - 0xBC, 0xF6, 0xE8, 0xB7, 0xB0, 0xF6, 0xF0, 0xA0, - 0xA3, 0x9E, 0xF6, 0xE8, 0xBB, 0x94, 0xF6, 0xE8, - 0xBC, 0xB8, 0xF6, 0xF0, 0xA8, 0x97, 0x92, 0xF6, - 0xF0, 0xA8, 0x97, 0xAD, 0xF6, 0xE9, 0x82, 0x94, - 0xF6, 0xE9, 0x83, 0xB1, 0xF6, 0xE9, 0x84, 0x91, - 0xF6, 0xF0, 0xA8, 0x9C, 0xAE, 0xF6, 0xE9, 0x84, - 0x9B, 0xF6, 0xE9, 0x88, 0xB8, 0xF6, 0xE9, 0x8B, - 0x97, 0xF6, 0xE9, 0x8B, 0x98, 0xF6, 0xE9, 0x89, - 0xBC, 0xF6, 0xE9, 0x8F, 0xB9, 0xF6, 0xE9, 0x90, - 0x95, 0xF6, 0xF0, 0xA8, 0xAF, 0xBA, 0xF6, 0xE9, - 0x96, 0x8B, 0xF6, 0xE4, 0xA6, 0x95, 0xF6, 0xE9, - 0x96, 0xB7, 0xF6, 0xF0, 0xA8, 0xB5, 0xB7, 0xF6, - 0xE4, 0xA7, 0xA6, 0xF6, 0xE9, 0x9B, 0x83, 0xF6, - 0xE5, 0xB6, 0xB2, 0xF6, 0xE9, 0x9C, 0xA3, 0xF6, - 0xF0, 0xA9, 0x85, 0x85, 0xF6, 0xF0, 0xA9, 0x88, - 0x9A, 0xF6, 0xE4, 0xA9, 0xAE, 0xF6, 0xE4, 0xA9, - 0xB6, 0xF6, 0xE9, 0x9F, 0xA0, 0xF6, 0xF0, 0xA9, - 0x90, 0x8A, 0xF6, 0xE4, 0xAA, 0xB2, 0xF6, 0xF0, - 0xA9, 0x92, 0x96, 0xF6, 0xE9, 0xA0, 0x8B, 0xF6, - 0xE9, 0xA0, 0x8B, 0xF6, 0xE9, 0xA0, 0xA9, 0xF6, - 0xF0, 0xA9, 0x96, 0xB6, 0xF6, 0xE9, 0xA3, 0xA2, - 0xF6, 0xE4, 0xAC, 0xB3, 0xF6, 0xE9, 0xA4, 0xA9, - 0xF6, 0xE9, 0xA6, 0xA7, 0xF6, 0xE9, 0xA7, 0x82, - 0xF6, 0xE9, 0xA7, 0xBE, 0xF6, 0xE4, 0xAF, 0x8E, - 0xF6, 0xF0, 0xA9, 0xAC, 0xB0, 0xF6, 0xE9, 0xAC, - 0x92, 0xF6, 0xE9, 0xB1, 0x80, 0xF6, 0xE9, 0xB3, - 0xBD, 0xF6, 0xE4, 0xB3, 0x8E, 0xF6, 0xE4, 0xB3, - 0xAD, 0xF6, 0xE9, 0xB5, 0xA7, 0xF6, 0xF0, 0xAA, - 0x83, 0x8E, 0xF6, 0xE4, 0xB3, 0xB8, 0xF6, 0xF0, - 0xAA, 0x84, 0x85, 0xF6, 0xF0, 0xAA, 0x88, 0x8E, - 0xF6, 0xF0, 0xAA, 0x8A, 0x91, 0xF6, 0xE9, 0xBA, - 0xBB, 0xF6, 0xE4, 0xB5, 0x96, 0xF6, 0xE9, 0xBB, - 0xB9, 0xF6, 0xE9, 0xBB, 0xBE, 0xF6, 0xE9, 0xBC, - 0x85, 0xF6, 0xE9, 0xBC, 0x8F, 0xF6, 0xE9, 0xBC, - 0x96, 0xF6, 0xE9, 0xBC, 0xBB, 0xF6, 0xF0, 0xAA, - 0x98, 0x80, - }, -}; - -static const uchar_t u8_case_common_b2_tbl[2][2][256] = { - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, 1, 2, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 3, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 4, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - { - { - 0, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, 1, 2, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, 3, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - { - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - 4, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - N_, N_, N_, N_, N_, N_, N_, N_, - }, - - }, - -}; - -static const u8_displacement_t u8_tolower_b3_tbl[2][5][256] = { - { - { /* Third byte table 0. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { 0, 0 }, - { 1, 60 }, { 2, 123 }, { 3, 185 }, { 4, 257 }, - { 5, 321 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 6, 373 }, { 7, 439 }, - { 8, 465 }, { 9, 561 }, { 10, 593 }, { 11, 649 }, - { 12, 703 }, { 13, 749 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 14, 795 }, { 15, 891 }, { 16, 987 }, { 17, 1068 }, - { 18, 1155 }, { 19, 1245 }, { 20, 1299 }, { 21, 1386 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 22, 1443 }, { 23, 1448 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 24, 1496 }, { 25, 1526 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 26, 1574 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 27, 1652 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - }, - { - { /* Third byte table 0. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { 0, 0 }, - { 1, 60 }, { 2, 123 }, { 3, 185 }, { 4, 257 }, - { 5, 321 }, { 6, 383 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 7, 401 }, { 8, 467 }, - { 9, 505 }, { 10, 601 }, { 11, 633 }, { 12, 689 }, - { 13, 753 }, { 14, 803 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 15, 849 }, { 16, 945 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 17, 963 }, { 18, 1059 }, { 19, 1155 }, { 20, 1236 }, - { 21, 1323 }, { 22, 1413 }, { 23, 1467 }, { 24, 1554 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 25, 1611 }, { 26, 1619 }, { 27, 1667 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 28, 1670 }, { 29, 1700 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 30, 1748 }, { 31, 1889 }, { 32, 1911 }, { 33, 2007 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 34, 2061 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 35, 2139 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - }, -}; - -static const uchar_t u8_tolower_b4_tbl[2][36][257] = { - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 46, 48, 50, 52, 54, 56, 58, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 34, 34, 36, 36, 38, 38, 40, - 40, 42, 42, 44, 44, 46, 46, 48, - 48, 49, 49, 51, 51, 53, 53, 55, - 55, 55, 57, 57, 59, 59, 61, 61, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 8, 10, 10, 12, 12, 14, - 14, 16, 16, 18, 18, 20, 20, 22, - 22, 24, 24, 26, 26, 28, 28, 30, - 30, 32, 32, 34, 34, 36, 36, 38, - 38, 40, 40, 42, 42, 44, 44, 46, - 46, 48, 48, 50, 50, 52, 52, 54, - 54, 56, 58, 58, 60, 60, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 4, 4, 6, 6, 8, - 10, 10, 12, 14, 16, 16, 16, 18, - 20, 22, 24, 24, 26, 28, 28, 30, - 32, 34, 34, 34, 34, 36, 38, 38, - 40, 42, 42, 44, 44, 46, 46, 48, - 50, 50, 52, 52, 52, 54, 54, 56, - 58, 58, 60, 62, 64, 64, 66, 66, - 68, 70, 70, 70, 70, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 4, 4, - 6, 8, 8, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 28, 30, - 30, 32, 32, 34, 34, 36, 36, 38, - 38, 40, 40, 42, 42, 44, 44, 46, - 46, 46, 48, 50, 50, 52, 52, 54, - 56, 58, 58, 60, 60, 62, 62, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 34, 34, 36, 36, 38, 38, 40, - 40, 42, 42, 44, 44, 46, 46, 48, - 48, 50, 50, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 2, 4, 6, 8, 8, 10, 10, 12, - 14, 14, 16, 18, 20, 22, 24, 26, - 28, 30, 32, 34, 36, 38, 40, 42, - 44, 46, 48, 48, 50, 52, 54, 56, - 58, 60, 62, 64, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 24, 24, 24, 24, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 66, 68, 70, 72, 74, 76, 78, - 80, 82, 84, 86, 88, 90, 92, 94, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 34, 34, 36, 36, 38, 38, 40, - 40, 42, 42, 44, 44, 46, 46, 48, - 48, 50, 50, 52, 52, 54, 54, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 14, 16, 16, 18, 18, 20, 20, 22, - 22, 24, 24, 26, 26, 28, 28, 30, - 30, 32, 32, 34, 34, 36, 36, 38, - 38, 40, 40, 42, 42, 44, 44, 46, - 46, 48, 48, 50, 50, 52, 52, 52, - 52, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 18, 20, 22, 24, 26, 28, - 30, 32, 34, 36, 38, 40, 42, 44, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 57, 57, 60, - 60, 63, 63, 66, 66, 69, 69, 72, - 72, 75, 75, 78, 78, 81, 81, 84, - 84, 87, 87, 90, 90, 93, 93, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 57, 57, 60, - 60, 63, 63, 66, 66, 69, 69, 72, - 72, 75, 75, 78, 78, 81, 81, 84, - 84, 87, 87, 90, 90, 93, 93, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, - 33, 36, 36, 39, 39, 42, 42, 45, - 45, 48, 48, 51, 51, 54, 54, 57, - 57, 60, 60, 63, 63, 66, 66, 69, - 69, 72, 72, 75, 75, 78, 78, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 57, 57, 60, - 60, 63, 63, 66, 66, 69, 69, 72, - 72, 75, 75, 78, 78, 81, 81, 84, - 84, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 45, 48, 51, 54, 57, 60, 63, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 69, 72, 75, 78, 81, 84, 87, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 21, 21, 24, 24, 27, 27, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 33, 36, 39, 42, 45, 48, 51, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 75, 78, 81, 84, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 18, 21, 24, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 30, 33, 36, 39, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 45, 48, 51, 54, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 3, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, - 6, 9, 12, 15, 18, 21, 24, 27, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 6, 9, 12, 15, 18, - 21, 24, 27, 30, 33, 36, 39, 42, - 45, 48, 51, 54, 57, 60, 63, 66, - 69, 72, 75, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, - 152, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - }, - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 46, 48, 50, 52, 54, 56, 58, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, - 60, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 34, 34, 36, 36, 38, 38, 40, - 40, 42, 42, 44, 44, 46, 46, 48, - 48, 49, 49, 51, 51, 53, 53, 55, - 55, 55, 57, 57, 59, 59, 61, 61, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 8, 10, 10, 12, 12, 14, - 14, 16, 16, 18, 18, 20, 20, 22, - 22, 24, 24, 26, 26, 28, 28, 30, - 30, 32, 32, 34, 34, 36, 36, 38, - 38, 40, 40, 42, 42, 44, 44, 46, - 46, 48, 48, 50, 50, 52, 52, 54, - 54, 56, 58, 58, 60, 60, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 4, 4, 6, 6, 8, - 10, 10, 12, 14, 16, 16, 16, 18, - 20, 22, 24, 24, 26, 28, 28, 30, - 32, 34, 34, 34, 34, 36, 38, 38, - 40, 42, 42, 44, 44, 46, 46, 48, - 50, 50, 52, 52, 52, 54, 54, 56, - 58, 58, 60, 62, 64, 64, 66, 66, - 68, 70, 70, 70, 70, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 4, 4, - 6, 8, 8, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 28, 30, - 30, 32, 32, 34, 34, 36, 36, 38, - 38, 40, 40, 42, 42, 44, 44, 46, - 46, 46, 48, 50, 50, 52, 52, 54, - 56, 58, 58, 60, 60, 62, 62, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 34, 34, 36, 36, 38, 38, 40, - 40, 42, 42, 44, 44, 46, 46, 48, - 48, 50, 50, 52, 52, 52, 52, 52, - 52, 52, 52, 55, 57, 57, 59, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 6, 8, 10, - 10, 12, 12, 14, 14, 16, 16, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 2, 4, 6, 8, 8, 10, 10, 12, - 14, 14, 16, 18, 20, 22, 24, 26, - 28, 30, 32, 34, 36, 38, 40, 42, - 44, 46, 48, 48, 50, 52, 54, 56, - 58, 60, 62, 64, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 24, 24, 24, 24, 26, 26, 26, - 28, 28, 30, 32, 32, 32, 34, 36, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 66, 68, 70, 72, 74, 76, 78, - 80, 82, 84, 86, 88, 90, 92, 94, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 34, 34, 36, 36, 38, 38, 40, - 40, 42, 42, 44, 44, 46, 46, 48, - 48, 50, 50, 52, 52, 54, 54, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 4, 6, 6, 8, 8, - 10, 10, 12, 12, 14, 14, 16, 16, - 16, 18, 18, 20, 20, 22, 22, 24, - 24, 26, 26, 28, 28, 30, 30, 32, - 32, 34, 34, 36, 36, 38, 38, 40, - 40, 42, 42, 44, 44, 46, 46, 48, - 48, 50, 50, 52, 52, 54, 54, 56, - 56, 58, 58, 60, 60, 62, 62, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 12, 12, 14, 14, 16, - 16, 18, 18, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 22, 24, 26, 28, 30, 32, - 34, 36, 38, 40, 42, 44, 46, 48, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, - 46, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 57, 57, 60, - 60, 63, 63, 66, 66, 69, 69, 72, - 72, 75, 75, 78, 78, 81, 81, 84, - 84, 87, 87, 90, 90, 93, 93, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 57, 57, 60, - 60, 63, 63, 66, 66, 69, 69, 72, - 72, 75, 75, 78, 78, 81, 81, 84, - 84, 87, 87, 90, 90, 93, 93, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, - 33, 36, 36, 39, 39, 42, 42, 45, - 45, 48, 48, 51, 51, 54, 54, 57, - 57, 60, 60, 63, 63, 66, 66, 69, - 69, 72, 72, 75, 75, 78, 78, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 57, 57, 60, - 60, 63, 63, 66, 66, 69, 69, 72, - 72, 75, 75, 78, 78, 81, 81, 84, - 84, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 45, 48, 51, 54, 57, 60, 63, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 69, 72, 75, 78, 81, 84, 87, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 21, 21, 24, 24, 27, 27, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 33, 36, 39, 42, 45, 48, 51, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 75, 78, 81, 84, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 18, 21, 24, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 30, 33, 36, 39, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 45, 48, 51, 54, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, - 57, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 3, 5, 5, 5, 5, - 5, 5, 5, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, - 6, 9, 12, 15, 18, 21, 24, 27, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 123, 126, 129, 132, 135, 138, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, - 141, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 5, 8, 10, 10, 10, - 13, 13, 16, 16, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 57, 57, 60, - 60, 63, 63, 66, 66, 69, 69, 72, - 72, 75, 75, 78, 78, 81, 81, 84, - 84, 87, 87, 90, 90, 93, 93, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 3, 6, 6, 9, 9, 12, - 12, 15, 15, 18, 18, 21, 21, 24, - 24, 27, 27, 30, 30, 33, 33, 36, - 36, 39, 39, 42, 42, 45, 45, 48, - 48, 51, 51, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 6, 9, 12, 15, 18, - 21, 24, 27, 30, 33, 36, 39, 42, - 45, 48, 51, 54, 57, 60, 63, 66, - 69, 72, 75, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, - 128, 132, 136, 140, 144, 148, 152, 156, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, - }, - }, -}; - -static const uchar_t u8_tolower_final_tbl[2][2299] = { - { - 0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3, - 0xC3, 0xA4, 0xC3, 0xA5, 0xC3, 0xA6, 0xC3, 0xA7, - 0xC3, 0xA8, 0xC3, 0xA9, 0xC3, 0xAA, 0xC3, 0xAB, - 0xC3, 0xAC, 0xC3, 0xAD, 0xC3, 0xAE, 0xC3, 0xAF, - 0xC3, 0xB0, 0xC3, 0xB1, 0xC3, 0xB2, 0xC3, 0xB3, - 0xC3, 0xB4, 0xC3, 0xB5, 0xC3, 0xB6, 0xC3, 0xB8, - 0xC3, 0xB9, 0xC3, 0xBA, 0xC3, 0xBB, 0xC3, 0xBC, - 0xC3, 0xBD, 0xC3, 0xBE, 0xC4, 0x81, 0xC4, 0x83, - 0xC4, 0x85, 0xC4, 0x87, 0xC4, 0x89, 0xC4, 0x8B, - 0xC4, 0x8D, 0xC4, 0x8F, 0xC4, 0x91, 0xC4, 0x93, - 0xC4, 0x95, 0xC4, 0x97, 0xC4, 0x99, 0xC4, 0x9B, - 0xC4, 0x9D, 0xC4, 0x9F, 0xC4, 0xA1, 0xC4, 0xA3, - 0xC4, 0xA5, 0xC4, 0xA7, 0xC4, 0xA9, 0xC4, 0xAB, - 0xC4, 0xAD, 0xC4, 0xAF, 0x69, 0xC4, 0xB3, 0xC4, - 0xB5, 0xC4, 0xB7, 0xC4, 0xBA, 0xC4, 0xBC, 0xC4, - 0xBE, 0xC5, 0x80, 0xC5, 0x82, 0xC5, 0x84, 0xC5, - 0x86, 0xC5, 0x88, 0xC5, 0x8B, 0xC5, 0x8D, 0xC5, - 0x8F, 0xC5, 0x91, 0xC5, 0x93, 0xC5, 0x95, 0xC5, - 0x97, 0xC5, 0x99, 0xC5, 0x9B, 0xC5, 0x9D, 0xC5, - 0x9F, 0xC5, 0xA1, 0xC5, 0xA3, 0xC5, 0xA5, 0xC5, - 0xA7, 0xC5, 0xA9, 0xC5, 0xAB, 0xC5, 0xAD, 0xC5, - 0xAF, 0xC5, 0xB1, 0xC5, 0xB3, 0xC5, 0xB5, 0xC5, - 0xB7, 0xC3, 0xBF, 0xC5, 0xBA, 0xC5, 0xBC, 0xC5, - 0xBE, 0xC9, 0x93, 0xC6, 0x83, 0xC6, 0x85, 0xC9, - 0x94, 0xC6, 0x88, 0xC9, 0x96, 0xC9, 0x97, 0xC6, - 0x8C, 0xC7, 0x9D, 0xC9, 0x99, 0xC9, 0x9B, 0xC6, - 0x92, 0xC9, 0xA0, 0xC9, 0xA3, 0xC9, 0xA9, 0xC9, - 0xA8, 0xC6, 0x99, 0xC9, 0xAF, 0xC9, 0xB2, 0xC9, - 0xB5, 0xC6, 0xA1, 0xC6, 0xA3, 0xC6, 0xA5, 0xCA, - 0x80, 0xC6, 0xA8, 0xCA, 0x83, 0xC6, 0xAD, 0xCA, - 0x88, 0xC6, 0xB0, 0xCA, 0x8A, 0xCA, 0x8B, 0xC6, - 0xB4, 0xC6, 0xB6, 0xCA, 0x92, 0xC6, 0xB9, 0xC6, - 0xBD, 0xC7, 0x86, 0xC7, 0x86, 0xC7, 0x89, 0xC7, - 0x89, 0xC7, 0x8C, 0xC7, 0x8C, 0xC7, 0x8E, 0xC7, - 0x90, 0xC7, 0x92, 0xC7, 0x94, 0xC7, 0x96, 0xC7, - 0x98, 0xC7, 0x9A, 0xC7, 0x9C, 0xC7, 0x9F, 0xC7, - 0xA1, 0xC7, 0xA3, 0xC7, 0xA5, 0xC7, 0xA7, 0xC7, - 0xA9, 0xC7, 0xAB, 0xC7, 0xAD, 0xC7, 0xAF, 0xC7, - 0xB3, 0xC7, 0xB3, 0xC7, 0xB5, 0xC6, 0x95, 0xC6, - 0xBF, 0xC7, 0xB9, 0xC7, 0xBB, 0xC7, 0xBD, 0xC7, - 0xBF, 0xC8, 0x81, 0xC8, 0x83, 0xC8, 0x85, 0xC8, - 0x87, 0xC8, 0x89, 0xC8, 0x8B, 0xC8, 0x8D, 0xC8, - 0x8F, 0xC8, 0x91, 0xC8, 0x93, 0xC8, 0x95, 0xC8, - 0x97, 0xC8, 0x99, 0xC8, 0x9B, 0xC8, 0x9D, 0xC8, - 0x9F, 0xC6, 0x9E, 0xC8, 0xA3, 0xC8, 0xA5, 0xC8, - 0xA7, 0xC8, 0xA9, 0xC8, 0xAB, 0xC8, 0xAD, 0xC8, - 0xAF, 0xC8, 0xB1, 0xC8, 0xB3, 0xCE, 0xAC, 0xCE, - 0xAD, 0xCE, 0xAE, 0xCE, 0xAF, 0xCF, 0x8C, 0xCF, - 0x8D, 0xCF, 0x8E, 0xCE, 0xB1, 0xCE, 0xB2, 0xCE, - 0xB3, 0xCE, 0xB4, 0xCE, 0xB5, 0xCE, 0xB6, 0xCE, - 0xB7, 0xCE, 0xB8, 0xCE, 0xB9, 0xCE, 0xBA, 0xCE, - 0xBB, 0xCE, 0xBC, 0xCE, 0xBD, 0xCE, 0xBE, 0xCE, - 0xBF, 0xCF, 0x80, 0xCF, 0x81, 0xCF, 0x83, 0xCF, - 0x84, 0xCF, 0x85, 0xCF, 0x86, 0xCF, 0x87, 0xCF, - 0x88, 0xCF, 0x89, 0xCF, 0x8A, 0xCF, 0x8B, 0xCF, - 0x99, 0xCF, 0x9B, 0xCF, 0x9D, 0xCF, 0x9F, 0xCF, - 0xA1, 0xCF, 0xA3, 0xCF, 0xA5, 0xCF, 0xA7, 0xCF, - 0xA9, 0xCF, 0xAB, 0xCF, 0xAD, 0xCF, 0xAF, 0xCE, - 0xB8, 0xD1, 0x90, 0xD1, 0x91, 0xD1, 0x92, 0xD1, - 0x93, 0xD1, 0x94, 0xD1, 0x95, 0xD1, 0x96, 0xD1, - 0x97, 0xD1, 0x98, 0xD1, 0x99, 0xD1, 0x9A, 0xD1, - 0x9B, 0xD1, 0x9C, 0xD1, 0x9D, 0xD1, 0x9E, 0xD1, - 0x9F, 0xD0, 0xB0, 0xD0, 0xB1, 0xD0, 0xB2, 0xD0, - 0xB3, 0xD0, 0xB4, 0xD0, 0xB5, 0xD0, 0xB6, 0xD0, - 0xB7, 0xD0, 0xB8, 0xD0, 0xB9, 0xD0, 0xBA, 0xD0, - 0xBB, 0xD0, 0xBC, 0xD0, 0xBD, 0xD0, 0xBE, 0xD0, - 0xBF, 0xD1, 0x80, 0xD1, 0x81, 0xD1, 0x82, 0xD1, - 0x83, 0xD1, 0x84, 0xD1, 0x85, 0xD1, 0x86, 0xD1, - 0x87, 0xD1, 0x88, 0xD1, 0x89, 0xD1, 0x8A, 0xD1, - 0x8B, 0xD1, 0x8C, 0xD1, 0x8D, 0xD1, 0x8E, 0xD1, - 0x8F, 0xD1, 0xA1, 0xD1, 0xA3, 0xD1, 0xA5, 0xD1, - 0xA7, 0xD1, 0xA9, 0xD1, 0xAB, 0xD1, 0xAD, 0xD1, - 0xAF, 0xD1, 0xB1, 0xD1, 0xB3, 0xD1, 0xB5, 0xD1, - 0xB7, 0xD1, 0xB9, 0xD1, 0xBB, 0xD1, 0xBD, 0xD1, - 0xBF, 0xD2, 0x81, 0xD2, 0x8B, 0xD2, 0x8D, 0xD2, - 0x8F, 0xD2, 0x91, 0xD2, 0x93, 0xD2, 0x95, 0xD2, - 0x97, 0xD2, 0x99, 0xD2, 0x9B, 0xD2, 0x9D, 0xD2, - 0x9F, 0xD2, 0xA1, 0xD2, 0xA3, 0xD2, 0xA5, 0xD2, - 0xA7, 0xD2, 0xA9, 0xD2, 0xAB, 0xD2, 0xAD, 0xD2, - 0xAF, 0xD2, 0xB1, 0xD2, 0xB3, 0xD2, 0xB5, 0xD2, - 0xB7, 0xD2, 0xB9, 0xD2, 0xBB, 0xD2, 0xBD, 0xD2, - 0xBF, 0xD3, 0x82, 0xD3, 0x84, 0xD3, 0x86, 0xD3, - 0x88, 0xD3, 0x8A, 0xD3, 0x8C, 0xD3, 0x8E, 0xD3, - 0x91, 0xD3, 0x93, 0xD3, 0x95, 0xD3, 0x97, 0xD3, - 0x99, 0xD3, 0x9B, 0xD3, 0x9D, 0xD3, 0x9F, 0xD3, - 0xA1, 0xD3, 0xA3, 0xD3, 0xA5, 0xD3, 0xA7, 0xD3, - 0xA9, 0xD3, 0xAB, 0xD3, 0xAD, 0xD3, 0xAF, 0xD3, - 0xB1, 0xD3, 0xB3, 0xD3, 0xB5, 0xD3, 0xB9, 0xD4, - 0x81, 0xD4, 0x83, 0xD4, 0x85, 0xD4, 0x87, 0xD4, - 0x89, 0xD4, 0x8B, 0xD4, 0x8D, 0xD4, 0x8F, 0xD5, - 0xA1, 0xD5, 0xA2, 0xD5, 0xA3, 0xD5, 0xA4, 0xD5, - 0xA5, 0xD5, 0xA6, 0xD5, 0xA7, 0xD5, 0xA8, 0xD5, - 0xA9, 0xD5, 0xAA, 0xD5, 0xAB, 0xD5, 0xAC, 0xD5, - 0xAD, 0xD5, 0xAE, 0xD5, 0xAF, 0xD5, 0xB0, 0xD5, - 0xB1, 0xD5, 0xB2, 0xD5, 0xB3, 0xD5, 0xB4, 0xD5, - 0xB5, 0xD5, 0xB6, 0xD5, 0xB7, 0xD5, 0xB8, 0xD5, - 0xB9, 0xD5, 0xBA, 0xD5, 0xBB, 0xD5, 0xBC, 0xD5, - 0xBD, 0xD5, 0xBE, 0xD5, 0xBF, 0xD6, 0x80, 0xD6, - 0x81, 0xD6, 0x82, 0xD6, 0x83, 0xD6, 0x84, 0xD6, - 0x85, 0xD6, 0x86, 0xE1, 0xB8, 0x81, 0xE1, 0xB8, - 0x83, 0xE1, 0xB8, 0x85, 0xE1, 0xB8, 0x87, 0xE1, - 0xB8, 0x89, 0xE1, 0xB8, 0x8B, 0xE1, 0xB8, 0x8D, - 0xE1, 0xB8, 0x8F, 0xE1, 0xB8, 0x91, 0xE1, 0xB8, - 0x93, 0xE1, 0xB8, 0x95, 0xE1, 0xB8, 0x97, 0xE1, - 0xB8, 0x99, 0xE1, 0xB8, 0x9B, 0xE1, 0xB8, 0x9D, - 0xE1, 0xB8, 0x9F, 0xE1, 0xB8, 0xA1, 0xE1, 0xB8, - 0xA3, 0xE1, 0xB8, 0xA5, 0xE1, 0xB8, 0xA7, 0xE1, - 0xB8, 0xA9, 0xE1, 0xB8, 0xAB, 0xE1, 0xB8, 0xAD, - 0xE1, 0xB8, 0xAF, 0xE1, 0xB8, 0xB1, 0xE1, 0xB8, - 0xB3, 0xE1, 0xB8, 0xB5, 0xE1, 0xB8, 0xB7, 0xE1, - 0xB8, 0xB9, 0xE1, 0xB8, 0xBB, 0xE1, 0xB8, 0xBD, - 0xE1, 0xB8, 0xBF, 0xE1, 0xB9, 0x81, 0xE1, 0xB9, - 0x83, 0xE1, 0xB9, 0x85, 0xE1, 0xB9, 0x87, 0xE1, - 0xB9, 0x89, 0xE1, 0xB9, 0x8B, 0xE1, 0xB9, 0x8D, - 0xE1, 0xB9, 0x8F, 0xE1, 0xB9, 0x91, 0xE1, 0xB9, - 0x93, 0xE1, 0xB9, 0x95, 0xE1, 0xB9, 0x97, 0xE1, - 0xB9, 0x99, 0xE1, 0xB9, 0x9B, 0xE1, 0xB9, 0x9D, - 0xE1, 0xB9, 0x9F, 0xE1, 0xB9, 0xA1, 0xE1, 0xB9, - 0xA3, 0xE1, 0xB9, 0xA5, 0xE1, 0xB9, 0xA7, 0xE1, - 0xB9, 0xA9, 0xE1, 0xB9, 0xAB, 0xE1, 0xB9, 0xAD, - 0xE1, 0xB9, 0xAF, 0xE1, 0xB9, 0xB1, 0xE1, 0xB9, - 0xB3, 0xE1, 0xB9, 0xB5, 0xE1, 0xB9, 0xB7, 0xE1, - 0xB9, 0xB9, 0xE1, 0xB9, 0xBB, 0xE1, 0xB9, 0xBD, - 0xE1, 0xB9, 0xBF, 0xE1, 0xBA, 0x81, 0xE1, 0xBA, - 0x83, 0xE1, 0xBA, 0x85, 0xE1, 0xBA, 0x87, 0xE1, - 0xBA, 0x89, 0xE1, 0xBA, 0x8B, 0xE1, 0xBA, 0x8D, - 0xE1, 0xBA, 0x8F, 0xE1, 0xBA, 0x91, 0xE1, 0xBA, - 0x93, 0xE1, 0xBA, 0x95, 0xE1, 0xBA, 0xA1, 0xE1, - 0xBA, 0xA3, 0xE1, 0xBA, 0xA5, 0xE1, 0xBA, 0xA7, - 0xE1, 0xBA, 0xA9, 0xE1, 0xBA, 0xAB, 0xE1, 0xBA, - 0xAD, 0xE1, 0xBA, 0xAF, 0xE1, 0xBA, 0xB1, 0xE1, - 0xBA, 0xB3, 0xE1, 0xBA, 0xB5, 0xE1, 0xBA, 0xB7, - 0xE1, 0xBA, 0xB9, 0xE1, 0xBA, 0xBB, 0xE1, 0xBA, - 0xBD, 0xE1, 0xBA, 0xBF, 0xE1, 0xBB, 0x81, 0xE1, - 0xBB, 0x83, 0xE1, 0xBB, 0x85, 0xE1, 0xBB, 0x87, - 0xE1, 0xBB, 0x89, 0xE1, 0xBB, 0x8B, 0xE1, 0xBB, - 0x8D, 0xE1, 0xBB, 0x8F, 0xE1, 0xBB, 0x91, 0xE1, - 0xBB, 0x93, 0xE1, 0xBB, 0x95, 0xE1, 0xBB, 0x97, - 0xE1, 0xBB, 0x99, 0xE1, 0xBB, 0x9B, 0xE1, 0xBB, - 0x9D, 0xE1, 0xBB, 0x9F, 0xE1, 0xBB, 0xA1, 0xE1, - 0xBB, 0xA3, 0xE1, 0xBB, 0xA5, 0xE1, 0xBB, 0xA7, - 0xE1, 0xBB, 0xA9, 0xE1, 0xBB, 0xAB, 0xE1, 0xBB, - 0xAD, 0xE1, 0xBB, 0xAF, 0xE1, 0xBB, 0xB1, 0xE1, - 0xBB, 0xB3, 0xE1, 0xBB, 0xB5, 0xE1, 0xBB, 0xB7, - 0xE1, 0xBB, 0xB9, 0xE1, 0xBC, 0x80, 0xE1, 0xBC, - 0x81, 0xE1, 0xBC, 0x82, 0xE1, 0xBC, 0x83, 0xE1, - 0xBC, 0x84, 0xE1, 0xBC, 0x85, 0xE1, 0xBC, 0x86, - 0xE1, 0xBC, 0x87, 0xE1, 0xBC, 0x90, 0xE1, 0xBC, - 0x91, 0xE1, 0xBC, 0x92, 0xE1, 0xBC, 0x93, 0xE1, - 0xBC, 0x94, 0xE1, 0xBC, 0x95, 0xE1, 0xBC, 0xA0, - 0xE1, 0xBC, 0xA1, 0xE1, 0xBC, 0xA2, 0xE1, 0xBC, - 0xA3, 0xE1, 0xBC, 0xA4, 0xE1, 0xBC, 0xA5, 0xE1, - 0xBC, 0xA6, 0xE1, 0xBC, 0xA7, 0xE1, 0xBC, 0xB0, - 0xE1, 0xBC, 0xB1, 0xE1, 0xBC, 0xB2, 0xE1, 0xBC, - 0xB3, 0xE1, 0xBC, 0xB4, 0xE1, 0xBC, 0xB5, 0xE1, - 0xBC, 0xB6, 0xE1, 0xBC, 0xB7, 0xE1, 0xBD, 0x80, - 0xE1, 0xBD, 0x81, 0xE1, 0xBD, 0x82, 0xE1, 0xBD, - 0x83, 0xE1, 0xBD, 0x84, 0xE1, 0xBD, 0x85, 0xE1, - 0xBD, 0x91, 0xE1, 0xBD, 0x93, 0xE1, 0xBD, 0x95, - 0xE1, 0xBD, 0x97, 0xE1, 0xBD, 0xA0, 0xE1, 0xBD, - 0xA1, 0xE1, 0xBD, 0xA2, 0xE1, 0xBD, 0xA3, 0xE1, - 0xBD, 0xA4, 0xE1, 0xBD, 0xA5, 0xE1, 0xBD, 0xA6, - 0xE1, 0xBD, 0xA7, 0xE1, 0xBE, 0x80, 0xE1, 0xBE, - 0x81, 0xE1, 0xBE, 0x82, 0xE1, 0xBE, 0x83, 0xE1, - 0xBE, 0x84, 0xE1, 0xBE, 0x85, 0xE1, 0xBE, 0x86, - 0xE1, 0xBE, 0x87, 0xE1, 0xBE, 0x90, 0xE1, 0xBE, - 0x91, 0xE1, 0xBE, 0x92, 0xE1, 0xBE, 0x93, 0xE1, - 0xBE, 0x94, 0xE1, 0xBE, 0x95, 0xE1, 0xBE, 0x96, - 0xE1, 0xBE, 0x97, 0xE1, 0xBE, 0xA0, 0xE1, 0xBE, - 0xA1, 0xE1, 0xBE, 0xA2, 0xE1, 0xBE, 0xA3, 0xE1, - 0xBE, 0xA4, 0xE1, 0xBE, 0xA5, 0xE1, 0xBE, 0xA6, - 0xE1, 0xBE, 0xA7, 0xE1, 0xBE, 0xB0, 0xE1, 0xBE, - 0xB1, 0xE1, 0xBD, 0xB0, 0xE1, 0xBD, 0xB1, 0xE1, - 0xBE, 0xB3, 0xE1, 0xBD, 0xB2, 0xE1, 0xBD, 0xB3, - 0xE1, 0xBD, 0xB4, 0xE1, 0xBD, 0xB5, 0xE1, 0xBF, - 0x83, 0xE1, 0xBF, 0x90, 0xE1, 0xBF, 0x91, 0xE1, - 0xBD, 0xB6, 0xE1, 0xBD, 0xB7, 0xE1, 0xBF, 0xA0, - 0xE1, 0xBF, 0xA1, 0xE1, 0xBD, 0xBA, 0xE1, 0xBD, - 0xBB, 0xE1, 0xBF, 0xA5, 0xE1, 0xBD, 0xB8, 0xE1, - 0xBD, 0xB9, 0xE1, 0xBD, 0xBC, 0xE1, 0xBD, 0xBD, - 0xE1, 0xBF, 0xB3, 0xCF, 0x89, 0x6B, 0xC3, 0xA5, - 0xE2, 0x85, 0xB0, 0xE2, 0x85, 0xB1, 0xE2, 0x85, - 0xB2, 0xE2, 0x85, 0xB3, 0xE2, 0x85, 0xB4, 0xE2, - 0x85, 0xB5, 0xE2, 0x85, 0xB6, 0xE2, 0x85, 0xB7, - 0xE2, 0x85, 0xB8, 0xE2, 0x85, 0xB9, 0xE2, 0x85, - 0xBA, 0xE2, 0x85, 0xBB, 0xE2, 0x85, 0xBC, 0xE2, - 0x85, 0xBD, 0xE2, 0x85, 0xBE, 0xE2, 0x85, 0xBF, - 0xE2, 0x93, 0x90, 0xE2, 0x93, 0x91, 0xE2, 0x93, - 0x92, 0xE2, 0x93, 0x93, 0xE2, 0x93, 0x94, 0xE2, - 0x93, 0x95, 0xE2, 0x93, 0x96, 0xE2, 0x93, 0x97, - 0xE2, 0x93, 0x98, 0xE2, 0x93, 0x99, 0xE2, 0x93, - 0x9A, 0xE2, 0x93, 0x9B, 0xE2, 0x93, 0x9C, 0xE2, - 0x93, 0x9D, 0xE2, 0x93, 0x9E, 0xE2, 0x93, 0x9F, - 0xE2, 0x93, 0xA0, 0xE2, 0x93, 0xA1, 0xE2, 0x93, - 0xA2, 0xE2, 0x93, 0xA3, 0xE2, 0x93, 0xA4, 0xE2, - 0x93, 0xA5, 0xE2, 0x93, 0xA6, 0xE2, 0x93, 0xA7, - 0xE2, 0x93, 0xA8, 0xE2, 0x93, 0xA9, 0xEF, 0xBD, - 0x81, 0xEF, 0xBD, 0x82, 0xEF, 0xBD, 0x83, 0xEF, - 0xBD, 0x84, 0xEF, 0xBD, 0x85, 0xEF, 0xBD, 0x86, - 0xEF, 0xBD, 0x87, 0xEF, 0xBD, 0x88, 0xEF, 0xBD, - 0x89, 0xEF, 0xBD, 0x8A, 0xEF, 0xBD, 0x8B, 0xEF, - 0xBD, 0x8C, 0xEF, 0xBD, 0x8D, 0xEF, 0xBD, 0x8E, - 0xEF, 0xBD, 0x8F, 0xEF, 0xBD, 0x90, 0xEF, 0xBD, - 0x91, 0xEF, 0xBD, 0x92, 0xEF, 0xBD, 0x93, 0xEF, - 0xBD, 0x94, 0xEF, 0xBD, 0x95, 0xEF, 0xBD, 0x96, - 0xEF, 0xBD, 0x97, 0xEF, 0xBD, 0x98, 0xEF, 0xBD, - 0x99, 0xEF, 0xBD, 0x9A, 0xF0, 0x90, 0x90, 0xA8, - 0xF0, 0x90, 0x90, 0xA9, 0xF0, 0x90, 0x90, 0xAA, - 0xF0, 0x90, 0x90, 0xAB, 0xF0, 0x90, 0x90, 0xAC, - 0xF0, 0x90, 0x90, 0xAD, 0xF0, 0x90, 0x90, 0xAE, - 0xF0, 0x90, 0x90, 0xAF, 0xF0, 0x90, 0x90, 0xB0, - 0xF0, 0x90, 0x90, 0xB1, 0xF0, 0x90, 0x90, 0xB2, - 0xF0, 0x90, 0x90, 0xB3, 0xF0, 0x90, 0x90, 0xB4, - 0xF0, 0x90, 0x90, 0xB5, 0xF0, 0x90, 0x90, 0xB6, - 0xF0, 0x90, 0x90, 0xB7, 0xF0, 0x90, 0x90, 0xB8, - 0xF0, 0x90, 0x90, 0xB9, 0xF0, 0x90, 0x90, 0xBA, - 0xF0, 0x90, 0x90, 0xBB, 0xF0, 0x90, 0x90, 0xBC, - 0xF0, 0x90, 0x90, 0xBD, 0xF0, 0x90, 0x90, 0xBE, - 0xF0, 0x90, 0x90, 0xBF, 0xF0, 0x90, 0x91, 0x80, - 0xF0, 0x90, 0x91, 0x81, 0xF0, 0x90, 0x91, 0x82, - 0xF0, 0x90, 0x91, 0x83, 0xF0, 0x90, 0x91, 0x84, - 0xF0, 0x90, 0x91, 0x85, 0xF0, 0x90, 0x91, 0x86, - 0xF0, 0x90, 0x91, 0x87, 0xF0, 0x90, 0x91, 0x88, - 0xF0, 0x90, 0x91, 0x89, 0xF0, 0x90, 0x91, 0x8A, - 0xF0, 0x90, 0x91, 0x8B, 0xF0, 0x90, 0x91, 0x8C, - 0xF0, 0x90, 0x91, 0x8D, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, - }, - { - 0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3, - 0xC3, 0xA4, 0xC3, 0xA5, 0xC3, 0xA6, 0xC3, 0xA7, - 0xC3, 0xA8, 0xC3, 0xA9, 0xC3, 0xAA, 0xC3, 0xAB, - 0xC3, 0xAC, 0xC3, 0xAD, 0xC3, 0xAE, 0xC3, 0xAF, - 0xC3, 0xB0, 0xC3, 0xB1, 0xC3, 0xB2, 0xC3, 0xB3, - 0xC3, 0xB4, 0xC3, 0xB5, 0xC3, 0xB6, 0xC3, 0xB8, - 0xC3, 0xB9, 0xC3, 0xBA, 0xC3, 0xBB, 0xC3, 0xBC, - 0xC3, 0xBD, 0xC3, 0xBE, 0xC4, 0x81, 0xC4, 0x83, - 0xC4, 0x85, 0xC4, 0x87, 0xC4, 0x89, 0xC4, 0x8B, - 0xC4, 0x8D, 0xC4, 0x8F, 0xC4, 0x91, 0xC4, 0x93, - 0xC4, 0x95, 0xC4, 0x97, 0xC4, 0x99, 0xC4, 0x9B, - 0xC4, 0x9D, 0xC4, 0x9F, 0xC4, 0xA1, 0xC4, 0xA3, - 0xC4, 0xA5, 0xC4, 0xA7, 0xC4, 0xA9, 0xC4, 0xAB, - 0xC4, 0xAD, 0xC4, 0xAF, 0x69, 0xC4, 0xB3, 0xC4, - 0xB5, 0xC4, 0xB7, 0xC4, 0xBA, 0xC4, 0xBC, 0xC4, - 0xBE, 0xC5, 0x80, 0xC5, 0x82, 0xC5, 0x84, 0xC5, - 0x86, 0xC5, 0x88, 0xC5, 0x8B, 0xC5, 0x8D, 0xC5, - 0x8F, 0xC5, 0x91, 0xC5, 0x93, 0xC5, 0x95, 0xC5, - 0x97, 0xC5, 0x99, 0xC5, 0x9B, 0xC5, 0x9D, 0xC5, - 0x9F, 0xC5, 0xA1, 0xC5, 0xA3, 0xC5, 0xA5, 0xC5, - 0xA7, 0xC5, 0xA9, 0xC5, 0xAB, 0xC5, 0xAD, 0xC5, - 0xAF, 0xC5, 0xB1, 0xC5, 0xB3, 0xC5, 0xB5, 0xC5, - 0xB7, 0xC3, 0xBF, 0xC5, 0xBA, 0xC5, 0xBC, 0xC5, - 0xBE, 0xC9, 0x93, 0xC6, 0x83, 0xC6, 0x85, 0xC9, - 0x94, 0xC6, 0x88, 0xC9, 0x96, 0xC9, 0x97, 0xC6, - 0x8C, 0xC7, 0x9D, 0xC9, 0x99, 0xC9, 0x9B, 0xC6, - 0x92, 0xC9, 0xA0, 0xC9, 0xA3, 0xC9, 0xA9, 0xC9, - 0xA8, 0xC6, 0x99, 0xC9, 0xAF, 0xC9, 0xB2, 0xC9, - 0xB5, 0xC6, 0xA1, 0xC6, 0xA3, 0xC6, 0xA5, 0xCA, - 0x80, 0xC6, 0xA8, 0xCA, 0x83, 0xC6, 0xAD, 0xCA, - 0x88, 0xC6, 0xB0, 0xCA, 0x8A, 0xCA, 0x8B, 0xC6, - 0xB4, 0xC6, 0xB6, 0xCA, 0x92, 0xC6, 0xB9, 0xC6, - 0xBD, 0xC7, 0x86, 0xC7, 0x86, 0xC7, 0x89, 0xC7, - 0x89, 0xC7, 0x8C, 0xC7, 0x8C, 0xC7, 0x8E, 0xC7, - 0x90, 0xC7, 0x92, 0xC7, 0x94, 0xC7, 0x96, 0xC7, - 0x98, 0xC7, 0x9A, 0xC7, 0x9C, 0xC7, 0x9F, 0xC7, - 0xA1, 0xC7, 0xA3, 0xC7, 0xA5, 0xC7, 0xA7, 0xC7, - 0xA9, 0xC7, 0xAB, 0xC7, 0xAD, 0xC7, 0xAF, 0xC7, - 0xB3, 0xC7, 0xB3, 0xC7, 0xB5, 0xC6, 0x95, 0xC6, - 0xBF, 0xC7, 0xB9, 0xC7, 0xBB, 0xC7, 0xBD, 0xC7, - 0xBF, 0xC8, 0x81, 0xC8, 0x83, 0xC8, 0x85, 0xC8, - 0x87, 0xC8, 0x89, 0xC8, 0x8B, 0xC8, 0x8D, 0xC8, - 0x8F, 0xC8, 0x91, 0xC8, 0x93, 0xC8, 0x95, 0xC8, - 0x97, 0xC8, 0x99, 0xC8, 0x9B, 0xC8, 0x9D, 0xC8, - 0x9F, 0xC6, 0x9E, 0xC8, 0xA3, 0xC8, 0xA5, 0xC8, - 0xA7, 0xC8, 0xA9, 0xC8, 0xAB, 0xC8, 0xAD, 0xC8, - 0xAF, 0xC8, 0xB1, 0xC8, 0xB3, 0xE2, 0xB1, 0xA5, - 0xC8, 0xBC, 0xC6, 0x9A, 0xE2, 0xB1, 0xA6, 0xC9, - 0x82, 0xC6, 0x80, 0xCA, 0x89, 0xCA, 0x8C, 0xC9, - 0x87, 0xC9, 0x89, 0xC9, 0x8B, 0xC9, 0x8D, 0xC9, - 0x8F, 0xCE, 0xAC, 0xCE, 0xAD, 0xCE, 0xAE, 0xCE, - 0xAF, 0xCF, 0x8C, 0xCF, 0x8D, 0xCF, 0x8E, 0xCE, - 0xB1, 0xCE, 0xB2, 0xCE, 0xB3, 0xCE, 0xB4, 0xCE, - 0xB5, 0xCE, 0xB6, 0xCE, 0xB7, 0xCE, 0xB8, 0xCE, - 0xB9, 0xCE, 0xBA, 0xCE, 0xBB, 0xCE, 0xBC, 0xCE, - 0xBD, 0xCE, 0xBE, 0xCE, 0xBF, 0xCF, 0x80, 0xCF, - 0x81, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x85, 0xCF, - 0x86, 0xCF, 0x87, 0xCF, 0x88, 0xCF, 0x89, 0xCF, - 0x8A, 0xCF, 0x8B, 0xCF, 0x99, 0xCF, 0x9B, 0xCF, - 0x9D, 0xCF, 0x9F, 0xCF, 0xA1, 0xCF, 0xA3, 0xCF, - 0xA5, 0xCF, 0xA7, 0xCF, 0xA9, 0xCF, 0xAB, 0xCF, - 0xAD, 0xCF, 0xAF, 0xCE, 0xB8, 0xCF, 0xB8, 0xCF, - 0xB2, 0xCF, 0xBB, 0xCD, 0xBB, 0xCD, 0xBC, 0xCD, - 0xBD, 0xD1, 0x90, 0xD1, 0x91, 0xD1, 0x92, 0xD1, - 0x93, 0xD1, 0x94, 0xD1, 0x95, 0xD1, 0x96, 0xD1, - 0x97, 0xD1, 0x98, 0xD1, 0x99, 0xD1, 0x9A, 0xD1, - 0x9B, 0xD1, 0x9C, 0xD1, 0x9D, 0xD1, 0x9E, 0xD1, - 0x9F, 0xD0, 0xB0, 0xD0, 0xB1, 0xD0, 0xB2, 0xD0, - 0xB3, 0xD0, 0xB4, 0xD0, 0xB5, 0xD0, 0xB6, 0xD0, - 0xB7, 0xD0, 0xB8, 0xD0, 0xB9, 0xD0, 0xBA, 0xD0, - 0xBB, 0xD0, 0xBC, 0xD0, 0xBD, 0xD0, 0xBE, 0xD0, - 0xBF, 0xD1, 0x80, 0xD1, 0x81, 0xD1, 0x82, 0xD1, - 0x83, 0xD1, 0x84, 0xD1, 0x85, 0xD1, 0x86, 0xD1, - 0x87, 0xD1, 0x88, 0xD1, 0x89, 0xD1, 0x8A, 0xD1, - 0x8B, 0xD1, 0x8C, 0xD1, 0x8D, 0xD1, 0x8E, 0xD1, - 0x8F, 0xD1, 0xA1, 0xD1, 0xA3, 0xD1, 0xA5, 0xD1, - 0xA7, 0xD1, 0xA9, 0xD1, 0xAB, 0xD1, 0xAD, 0xD1, - 0xAF, 0xD1, 0xB1, 0xD1, 0xB3, 0xD1, 0xB5, 0xD1, - 0xB7, 0xD1, 0xB9, 0xD1, 0xBB, 0xD1, 0xBD, 0xD1, - 0xBF, 0xD2, 0x81, 0xD2, 0x8B, 0xD2, 0x8D, 0xD2, - 0x8F, 0xD2, 0x91, 0xD2, 0x93, 0xD2, 0x95, 0xD2, - 0x97, 0xD2, 0x99, 0xD2, 0x9B, 0xD2, 0x9D, 0xD2, - 0x9F, 0xD2, 0xA1, 0xD2, 0xA3, 0xD2, 0xA5, 0xD2, - 0xA7, 0xD2, 0xA9, 0xD2, 0xAB, 0xD2, 0xAD, 0xD2, - 0xAF, 0xD2, 0xB1, 0xD2, 0xB3, 0xD2, 0xB5, 0xD2, - 0xB7, 0xD2, 0xB9, 0xD2, 0xBB, 0xD2, 0xBD, 0xD2, - 0xBF, 0xD3, 0x8F, 0xD3, 0x82, 0xD3, 0x84, 0xD3, - 0x86, 0xD3, 0x88, 0xD3, 0x8A, 0xD3, 0x8C, 0xD3, - 0x8E, 0xD3, 0x91, 0xD3, 0x93, 0xD3, 0x95, 0xD3, - 0x97, 0xD3, 0x99, 0xD3, 0x9B, 0xD3, 0x9D, 0xD3, - 0x9F, 0xD3, 0xA1, 0xD3, 0xA3, 0xD3, 0xA5, 0xD3, - 0xA7, 0xD3, 0xA9, 0xD3, 0xAB, 0xD3, 0xAD, 0xD3, - 0xAF, 0xD3, 0xB1, 0xD3, 0xB3, 0xD3, 0xB5, 0xD3, - 0xB7, 0xD3, 0xB9, 0xD3, 0xBB, 0xD3, 0xBD, 0xD3, - 0xBF, 0xD4, 0x81, 0xD4, 0x83, 0xD4, 0x85, 0xD4, - 0x87, 0xD4, 0x89, 0xD4, 0x8B, 0xD4, 0x8D, 0xD4, - 0x8F, 0xD4, 0x91, 0xD4, 0x93, 0xD5, 0xA1, 0xD5, - 0xA2, 0xD5, 0xA3, 0xD5, 0xA4, 0xD5, 0xA5, 0xD5, - 0xA6, 0xD5, 0xA7, 0xD5, 0xA8, 0xD5, 0xA9, 0xD5, - 0xAA, 0xD5, 0xAB, 0xD5, 0xAC, 0xD5, 0xAD, 0xD5, - 0xAE, 0xD5, 0xAF, 0xD5, 0xB0, 0xD5, 0xB1, 0xD5, - 0xB2, 0xD5, 0xB3, 0xD5, 0xB4, 0xD5, 0xB5, 0xD5, - 0xB6, 0xD5, 0xB7, 0xD5, 0xB8, 0xD5, 0xB9, 0xD5, - 0xBA, 0xD5, 0xBB, 0xD5, 0xBC, 0xD5, 0xBD, 0xD5, - 0xBE, 0xD5, 0xBF, 0xD6, 0x80, 0xD6, 0x81, 0xD6, - 0x82, 0xD6, 0x83, 0xD6, 0x84, 0xD6, 0x85, 0xD6, - 0x86, 0xE2, 0xB4, 0x80, 0xE2, 0xB4, 0x81, 0xE2, - 0xB4, 0x82, 0xE2, 0xB4, 0x83, 0xE2, 0xB4, 0x84, - 0xE2, 0xB4, 0x85, 0xE2, 0xB4, 0x86, 0xE2, 0xB4, - 0x87, 0xE2, 0xB4, 0x88, 0xE2, 0xB4, 0x89, 0xE2, - 0xB4, 0x8A, 0xE2, 0xB4, 0x8B, 0xE2, 0xB4, 0x8C, - 0xE2, 0xB4, 0x8D, 0xE2, 0xB4, 0x8E, 0xE2, 0xB4, - 0x8F, 0xE2, 0xB4, 0x90, 0xE2, 0xB4, 0x91, 0xE2, - 0xB4, 0x92, 0xE2, 0xB4, 0x93, 0xE2, 0xB4, 0x94, - 0xE2, 0xB4, 0x95, 0xE2, 0xB4, 0x96, 0xE2, 0xB4, - 0x97, 0xE2, 0xB4, 0x98, 0xE2, 0xB4, 0x99, 0xE2, - 0xB4, 0x9A, 0xE2, 0xB4, 0x9B, 0xE2, 0xB4, 0x9C, - 0xE2, 0xB4, 0x9D, 0xE2, 0xB4, 0x9E, 0xE2, 0xB4, - 0x9F, 0xE2, 0xB4, 0xA0, 0xE2, 0xB4, 0xA1, 0xE2, - 0xB4, 0xA2, 0xE2, 0xB4, 0xA3, 0xE2, 0xB4, 0xA4, - 0xE2, 0xB4, 0xA5, 0xE1, 0xB8, 0x81, 0xE1, 0xB8, - 0x83, 0xE1, 0xB8, 0x85, 0xE1, 0xB8, 0x87, 0xE1, - 0xB8, 0x89, 0xE1, 0xB8, 0x8B, 0xE1, 0xB8, 0x8D, - 0xE1, 0xB8, 0x8F, 0xE1, 0xB8, 0x91, 0xE1, 0xB8, - 0x93, 0xE1, 0xB8, 0x95, 0xE1, 0xB8, 0x97, 0xE1, - 0xB8, 0x99, 0xE1, 0xB8, 0x9B, 0xE1, 0xB8, 0x9D, - 0xE1, 0xB8, 0x9F, 0xE1, 0xB8, 0xA1, 0xE1, 0xB8, - 0xA3, 0xE1, 0xB8, 0xA5, 0xE1, 0xB8, 0xA7, 0xE1, - 0xB8, 0xA9, 0xE1, 0xB8, 0xAB, 0xE1, 0xB8, 0xAD, - 0xE1, 0xB8, 0xAF, 0xE1, 0xB8, 0xB1, 0xE1, 0xB8, - 0xB3, 0xE1, 0xB8, 0xB5, 0xE1, 0xB8, 0xB7, 0xE1, - 0xB8, 0xB9, 0xE1, 0xB8, 0xBB, 0xE1, 0xB8, 0xBD, - 0xE1, 0xB8, 0xBF, 0xE1, 0xB9, 0x81, 0xE1, 0xB9, - 0x83, 0xE1, 0xB9, 0x85, 0xE1, 0xB9, 0x87, 0xE1, - 0xB9, 0x89, 0xE1, 0xB9, 0x8B, 0xE1, 0xB9, 0x8D, - 0xE1, 0xB9, 0x8F, 0xE1, 0xB9, 0x91, 0xE1, 0xB9, - 0x93, 0xE1, 0xB9, 0x95, 0xE1, 0xB9, 0x97, 0xE1, - 0xB9, 0x99, 0xE1, 0xB9, 0x9B, 0xE1, 0xB9, 0x9D, - 0xE1, 0xB9, 0x9F, 0xE1, 0xB9, 0xA1, 0xE1, 0xB9, - 0xA3, 0xE1, 0xB9, 0xA5, 0xE1, 0xB9, 0xA7, 0xE1, - 0xB9, 0xA9, 0xE1, 0xB9, 0xAB, 0xE1, 0xB9, 0xAD, - 0xE1, 0xB9, 0xAF, 0xE1, 0xB9, 0xB1, 0xE1, 0xB9, - 0xB3, 0xE1, 0xB9, 0xB5, 0xE1, 0xB9, 0xB7, 0xE1, - 0xB9, 0xB9, 0xE1, 0xB9, 0xBB, 0xE1, 0xB9, 0xBD, - 0xE1, 0xB9, 0xBF, 0xE1, 0xBA, 0x81, 0xE1, 0xBA, - 0x83, 0xE1, 0xBA, 0x85, 0xE1, 0xBA, 0x87, 0xE1, - 0xBA, 0x89, 0xE1, 0xBA, 0x8B, 0xE1, 0xBA, 0x8D, - 0xE1, 0xBA, 0x8F, 0xE1, 0xBA, 0x91, 0xE1, 0xBA, - 0x93, 0xE1, 0xBA, 0x95, 0xE1, 0xBA, 0xA1, 0xE1, - 0xBA, 0xA3, 0xE1, 0xBA, 0xA5, 0xE1, 0xBA, 0xA7, - 0xE1, 0xBA, 0xA9, 0xE1, 0xBA, 0xAB, 0xE1, 0xBA, - 0xAD, 0xE1, 0xBA, 0xAF, 0xE1, 0xBA, 0xB1, 0xE1, - 0xBA, 0xB3, 0xE1, 0xBA, 0xB5, 0xE1, 0xBA, 0xB7, - 0xE1, 0xBA, 0xB9, 0xE1, 0xBA, 0xBB, 0xE1, 0xBA, - 0xBD, 0xE1, 0xBA, 0xBF, 0xE1, 0xBB, 0x81, 0xE1, - 0xBB, 0x83, 0xE1, 0xBB, 0x85, 0xE1, 0xBB, 0x87, - 0xE1, 0xBB, 0x89, 0xE1, 0xBB, 0x8B, 0xE1, 0xBB, - 0x8D, 0xE1, 0xBB, 0x8F, 0xE1, 0xBB, 0x91, 0xE1, - 0xBB, 0x93, 0xE1, 0xBB, 0x95, 0xE1, 0xBB, 0x97, - 0xE1, 0xBB, 0x99, 0xE1, 0xBB, 0x9B, 0xE1, 0xBB, - 0x9D, 0xE1, 0xBB, 0x9F, 0xE1, 0xBB, 0xA1, 0xE1, - 0xBB, 0xA3, 0xE1, 0xBB, 0xA5, 0xE1, 0xBB, 0xA7, - 0xE1, 0xBB, 0xA9, 0xE1, 0xBB, 0xAB, 0xE1, 0xBB, - 0xAD, 0xE1, 0xBB, 0xAF, 0xE1, 0xBB, 0xB1, 0xE1, - 0xBB, 0xB3, 0xE1, 0xBB, 0xB5, 0xE1, 0xBB, 0xB7, - 0xE1, 0xBB, 0xB9, 0xE1, 0xBC, 0x80, 0xE1, 0xBC, - 0x81, 0xE1, 0xBC, 0x82, 0xE1, 0xBC, 0x83, 0xE1, - 0xBC, 0x84, 0xE1, 0xBC, 0x85, 0xE1, 0xBC, 0x86, - 0xE1, 0xBC, 0x87, 0xE1, 0xBC, 0x90, 0xE1, 0xBC, - 0x91, 0xE1, 0xBC, 0x92, 0xE1, 0xBC, 0x93, 0xE1, - 0xBC, 0x94, 0xE1, 0xBC, 0x95, 0xE1, 0xBC, 0xA0, - 0xE1, 0xBC, 0xA1, 0xE1, 0xBC, 0xA2, 0xE1, 0xBC, - 0xA3, 0xE1, 0xBC, 0xA4, 0xE1, 0xBC, 0xA5, 0xE1, - 0xBC, 0xA6, 0xE1, 0xBC, 0xA7, 0xE1, 0xBC, 0xB0, - 0xE1, 0xBC, 0xB1, 0xE1, 0xBC, 0xB2, 0xE1, 0xBC, - 0xB3, 0xE1, 0xBC, 0xB4, 0xE1, 0xBC, 0xB5, 0xE1, - 0xBC, 0xB6, 0xE1, 0xBC, 0xB7, 0xE1, 0xBD, 0x80, - 0xE1, 0xBD, 0x81, 0xE1, 0xBD, 0x82, 0xE1, 0xBD, - 0x83, 0xE1, 0xBD, 0x84, 0xE1, 0xBD, 0x85, 0xE1, - 0xBD, 0x91, 0xE1, 0xBD, 0x93, 0xE1, 0xBD, 0x95, - 0xE1, 0xBD, 0x97, 0xE1, 0xBD, 0xA0, 0xE1, 0xBD, - 0xA1, 0xE1, 0xBD, 0xA2, 0xE1, 0xBD, 0xA3, 0xE1, - 0xBD, 0xA4, 0xE1, 0xBD, 0xA5, 0xE1, 0xBD, 0xA6, - 0xE1, 0xBD, 0xA7, 0xE1, 0xBE, 0x80, 0xE1, 0xBE, - 0x81, 0xE1, 0xBE, 0x82, 0xE1, 0xBE, 0x83, 0xE1, - 0xBE, 0x84, 0xE1, 0xBE, 0x85, 0xE1, 0xBE, 0x86, - 0xE1, 0xBE, 0x87, 0xE1, 0xBE, 0x90, 0xE1, 0xBE, - 0x91, 0xE1, 0xBE, 0x92, 0xE1, 0xBE, 0x93, 0xE1, - 0xBE, 0x94, 0xE1, 0xBE, 0x95, 0xE1, 0xBE, 0x96, - 0xE1, 0xBE, 0x97, 0xE1, 0xBE, 0xA0, 0xE1, 0xBE, - 0xA1, 0xE1, 0xBE, 0xA2, 0xE1, 0xBE, 0xA3, 0xE1, - 0xBE, 0xA4, 0xE1, 0xBE, 0xA5, 0xE1, 0xBE, 0xA6, - 0xE1, 0xBE, 0xA7, 0xE1, 0xBE, 0xB0, 0xE1, 0xBE, - 0xB1, 0xE1, 0xBD, 0xB0, 0xE1, 0xBD, 0xB1, 0xE1, - 0xBE, 0xB3, 0xE1, 0xBD, 0xB2, 0xE1, 0xBD, 0xB3, - 0xE1, 0xBD, 0xB4, 0xE1, 0xBD, 0xB5, 0xE1, 0xBF, - 0x83, 0xE1, 0xBF, 0x90, 0xE1, 0xBF, 0x91, 0xE1, - 0xBD, 0xB6, 0xE1, 0xBD, 0xB7, 0xE1, 0xBF, 0xA0, - 0xE1, 0xBF, 0xA1, 0xE1, 0xBD, 0xBA, 0xE1, 0xBD, - 0xBB, 0xE1, 0xBF, 0xA5, 0xE1, 0xBD, 0xB8, 0xE1, - 0xBD, 0xB9, 0xE1, 0xBD, 0xBC, 0xE1, 0xBD, 0xBD, - 0xE1, 0xBF, 0xB3, 0xCF, 0x89, 0x6B, 0xC3, 0xA5, - 0xE2, 0x85, 0x8E, 0xE2, 0x85, 0xB0, 0xE2, 0x85, - 0xB1, 0xE2, 0x85, 0xB2, 0xE2, 0x85, 0xB3, 0xE2, - 0x85, 0xB4, 0xE2, 0x85, 0xB5, 0xE2, 0x85, 0xB6, - 0xE2, 0x85, 0xB7, 0xE2, 0x85, 0xB8, 0xE2, 0x85, - 0xB9, 0xE2, 0x85, 0xBA, 0xE2, 0x85, 0xBB, 0xE2, - 0x85, 0xBC, 0xE2, 0x85, 0xBD, 0xE2, 0x85, 0xBE, - 0xE2, 0x85, 0xBF, 0xE2, 0x86, 0x84, 0xE2, 0x93, - 0x90, 0xE2, 0x93, 0x91, 0xE2, 0x93, 0x92, 0xE2, - 0x93, 0x93, 0xE2, 0x93, 0x94, 0xE2, 0x93, 0x95, - 0xE2, 0x93, 0x96, 0xE2, 0x93, 0x97, 0xE2, 0x93, - 0x98, 0xE2, 0x93, 0x99, 0xE2, 0x93, 0x9A, 0xE2, - 0x93, 0x9B, 0xE2, 0x93, 0x9C, 0xE2, 0x93, 0x9D, - 0xE2, 0x93, 0x9E, 0xE2, 0x93, 0x9F, 0xE2, 0x93, - 0xA0, 0xE2, 0x93, 0xA1, 0xE2, 0x93, 0xA2, 0xE2, - 0x93, 0xA3, 0xE2, 0x93, 0xA4, 0xE2, 0x93, 0xA5, - 0xE2, 0x93, 0xA6, 0xE2, 0x93, 0xA7, 0xE2, 0x93, - 0xA8, 0xE2, 0x93, 0xA9, 0xE2, 0xB0, 0xB0, 0xE2, - 0xB0, 0xB1, 0xE2, 0xB0, 0xB2, 0xE2, 0xB0, 0xB3, - 0xE2, 0xB0, 0xB4, 0xE2, 0xB0, 0xB5, 0xE2, 0xB0, - 0xB6, 0xE2, 0xB0, 0xB7, 0xE2, 0xB0, 0xB8, 0xE2, - 0xB0, 0xB9, 0xE2, 0xB0, 0xBA, 0xE2, 0xB0, 0xBB, - 0xE2, 0xB0, 0xBC, 0xE2, 0xB0, 0xBD, 0xE2, 0xB0, - 0xBE, 0xE2, 0xB0, 0xBF, 0xE2, 0xB1, 0x80, 0xE2, - 0xB1, 0x81, 0xE2, 0xB1, 0x82, 0xE2, 0xB1, 0x83, - 0xE2, 0xB1, 0x84, 0xE2, 0xB1, 0x85, 0xE2, 0xB1, - 0x86, 0xE2, 0xB1, 0x87, 0xE2, 0xB1, 0x88, 0xE2, - 0xB1, 0x89, 0xE2, 0xB1, 0x8A, 0xE2, 0xB1, 0x8B, - 0xE2, 0xB1, 0x8C, 0xE2, 0xB1, 0x8D, 0xE2, 0xB1, - 0x8E, 0xE2, 0xB1, 0x8F, 0xE2, 0xB1, 0x90, 0xE2, - 0xB1, 0x91, 0xE2, 0xB1, 0x92, 0xE2, 0xB1, 0x93, - 0xE2, 0xB1, 0x94, 0xE2, 0xB1, 0x95, 0xE2, 0xB1, - 0x96, 0xE2, 0xB1, 0x97, 0xE2, 0xB1, 0x98, 0xE2, - 0xB1, 0x99, 0xE2, 0xB1, 0x9A, 0xE2, 0xB1, 0x9B, - 0xE2, 0xB1, 0x9C, 0xE2, 0xB1, 0x9D, 0xE2, 0xB1, - 0x9E, 0xE2, 0xB1, 0xA1, 0xC9, 0xAB, 0xE1, 0xB5, - 0xBD, 0xC9, 0xBD, 0xE2, 0xB1, 0xA8, 0xE2, 0xB1, - 0xAA, 0xE2, 0xB1, 0xAC, 0xE2, 0xB1, 0xB6, 0xE2, - 0xB2, 0x81, 0xE2, 0xB2, 0x83, 0xE2, 0xB2, 0x85, - 0xE2, 0xB2, 0x87, 0xE2, 0xB2, 0x89, 0xE2, 0xB2, - 0x8B, 0xE2, 0xB2, 0x8D, 0xE2, 0xB2, 0x8F, 0xE2, - 0xB2, 0x91, 0xE2, 0xB2, 0x93, 0xE2, 0xB2, 0x95, - 0xE2, 0xB2, 0x97, 0xE2, 0xB2, 0x99, 0xE2, 0xB2, - 0x9B, 0xE2, 0xB2, 0x9D, 0xE2, 0xB2, 0x9F, 0xE2, - 0xB2, 0xA1, 0xE2, 0xB2, 0xA3, 0xE2, 0xB2, 0xA5, - 0xE2, 0xB2, 0xA7, 0xE2, 0xB2, 0xA9, 0xE2, 0xB2, - 0xAB, 0xE2, 0xB2, 0xAD, 0xE2, 0xB2, 0xAF, 0xE2, - 0xB2, 0xB1, 0xE2, 0xB2, 0xB3, 0xE2, 0xB2, 0xB5, - 0xE2, 0xB2, 0xB7, 0xE2, 0xB2, 0xB9, 0xE2, 0xB2, - 0xBB, 0xE2, 0xB2, 0xBD, 0xE2, 0xB2, 0xBF, 0xE2, - 0xB3, 0x81, 0xE2, 0xB3, 0x83, 0xE2, 0xB3, 0x85, - 0xE2, 0xB3, 0x87, 0xE2, 0xB3, 0x89, 0xE2, 0xB3, - 0x8B, 0xE2, 0xB3, 0x8D, 0xE2, 0xB3, 0x8F, 0xE2, - 0xB3, 0x91, 0xE2, 0xB3, 0x93, 0xE2, 0xB3, 0x95, - 0xE2, 0xB3, 0x97, 0xE2, 0xB3, 0x99, 0xE2, 0xB3, - 0x9B, 0xE2, 0xB3, 0x9D, 0xE2, 0xB3, 0x9F, 0xE2, - 0xB3, 0xA1, 0xE2, 0xB3, 0xA3, 0xEF, 0xBD, 0x81, - 0xEF, 0xBD, 0x82, 0xEF, 0xBD, 0x83, 0xEF, 0xBD, - 0x84, 0xEF, 0xBD, 0x85, 0xEF, 0xBD, 0x86, 0xEF, - 0xBD, 0x87, 0xEF, 0xBD, 0x88, 0xEF, 0xBD, 0x89, - 0xEF, 0xBD, 0x8A, 0xEF, 0xBD, 0x8B, 0xEF, 0xBD, - 0x8C, 0xEF, 0xBD, 0x8D, 0xEF, 0xBD, 0x8E, 0xEF, - 0xBD, 0x8F, 0xEF, 0xBD, 0x90, 0xEF, 0xBD, 0x91, - 0xEF, 0xBD, 0x92, 0xEF, 0xBD, 0x93, 0xEF, 0xBD, - 0x94, 0xEF, 0xBD, 0x95, 0xEF, 0xBD, 0x96, 0xEF, - 0xBD, 0x97, 0xEF, 0xBD, 0x98, 0xEF, 0xBD, 0x99, - 0xEF, 0xBD, 0x9A, 0xF0, 0x90, 0x90, 0xA8, 0xF0, - 0x90, 0x90, 0xA9, 0xF0, 0x90, 0x90, 0xAA, 0xF0, - 0x90, 0x90, 0xAB, 0xF0, 0x90, 0x90, 0xAC, 0xF0, - 0x90, 0x90, 0xAD, 0xF0, 0x90, 0x90, 0xAE, 0xF0, - 0x90, 0x90, 0xAF, 0xF0, 0x90, 0x90, 0xB0, 0xF0, - 0x90, 0x90, 0xB1, 0xF0, 0x90, 0x90, 0xB2, 0xF0, - 0x90, 0x90, 0xB3, 0xF0, 0x90, 0x90, 0xB4, 0xF0, - 0x90, 0x90, 0xB5, 0xF0, 0x90, 0x90, 0xB6, 0xF0, - 0x90, 0x90, 0xB7, 0xF0, 0x90, 0x90, 0xB8, 0xF0, - 0x90, 0x90, 0xB9, 0xF0, 0x90, 0x90, 0xBA, 0xF0, - 0x90, 0x90, 0xBB, 0xF0, 0x90, 0x90, 0xBC, 0xF0, - 0x90, 0x90, 0xBD, 0xF0, 0x90, 0x90, 0xBE, 0xF0, - 0x90, 0x90, 0xBF, 0xF0, 0x90, 0x91, 0x80, 0xF0, - 0x90, 0x91, 0x81, 0xF0, 0x90, 0x91, 0x82, 0xF0, - 0x90, 0x91, 0x83, 0xF0, 0x90, 0x91, 0x84, 0xF0, - 0x90, 0x91, 0x85, 0xF0, 0x90, 0x91, 0x86, 0xF0, - 0x90, 0x91, 0x87, 0xF0, 0x90, 0x91, 0x88, 0xF0, - 0x90, 0x91, 0x89, 0xF0, 0x90, 0x91, 0x8A, 0xF0, - 0x90, 0x91, 0x8B, 0xF0, 0x90, 0x91, 0x8C, 0xF0, - 0x90, 0x91, 0x8D, 0xF0, 0x90, 0x91, 0x8E, 0xF0, - 0x90, 0x91, 0x8F, - }, -}; - -static const u8_displacement_t u8_toupper_b3_tbl[2][5][256] = { - { - { /* Third byte table 0. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0, 0 }, { 1, 2 }, - { 2, 64 }, { 3, 125 }, { 4, 188 }, { 5, 226 }, - { 6, 288 }, { 7, 338 }, { 8, 364 }, { N_, 0 }, - { N_, 0 }, { 9, 376 }, { 10, 378 }, { 11, 416 }, - { 12, 486 }, { 13, 518 }, { 14, 614 }, { 15, 670 }, - { 16, 724 }, { 17, 740 }, { 18, 802 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 19, 816 }, { 20, 912 }, { 21, 1008 }, { 22, 1092 }, - { 23, 1179 }, { 24, 1269 }, { 25, 1365 }, { 26, 1448 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 27, 1469 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { 28, 1517 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 29, 1595 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 30, 1673 }, { 31, 1769 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - }, - { - { /* Third byte table 0. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { 0, 0 }, { 1, 2 }, - { 2, 64 }, { 3, 125 }, { 4, 188 }, { 5, 230 }, - { 6, 292 }, { 7, 344 }, { 8, 388 }, { N_, 0 }, - { N_, 0 }, { 9, 404 }, { 10, 412 }, { 11, 450 }, - { 12, 524 }, { 13, 556 }, { 14, 652 }, { 15, 708 }, - { 16, 772 }, { 17, 792 }, { 18, 854 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 1. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 19, 868 }, { N_, 0 }, { N_, 0 }, - { 20, 871 }, { 21, 967 }, { 22, 1063 }, { 23, 1147 }, - { 24, 1234 }, { 25, 1324 }, { 26, 1420 }, { 27, 1503 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 2. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 28, 1524 }, { 29, 1575 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { 30, 1578 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 31, 1656 }, { 32, 1704 }, { 33, 1816 }, { 34, 1912 }, - { 35, 1966 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 3. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { 36, 2080 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - { /* Third byte table 4. */ - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { 37, 2158 }, { 38, 2254 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, - }, - }, -}; - -static const uchar_t u8_toupper_b4_tbl[2][39][257] = { - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 46, 48, 50, 52, 54, 56, 58, 60, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 49, 49, 51, 51, 53, 53, - 55, 55, 55, 57, 57, 59, 59, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 50, 50, 52, 52, 54, 54, - 56, 56, 56, 58, 58, 60, 60, 62, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 2, 4, 4, - 4, 6, 6, 6, 6, 8, 8, 8, - 8, 8, 8, 10, 10, 10, 12, 12, - 12, 12, 14, 14, 14, 14, 14, 16, - 16, 16, 18, 18, 20, 20, 22, 22, - 22, 24, 24, 24, 24, 24, 26, 26, - 26, 28, 28, 28, 28, 30, 30, 32, - 32, 32, 34, 34, 34, 34, 36, 36, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 4, - 4, 6, 8, 8, 10, 12, 12, 14, - 14, 16, 16, 18, 18, 20, 20, 22, - 22, 24, 24, 26, 26, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 48, 50, 52, 52, 54, 54, - 54, 54, 56, 56, 58, 58, 60, 60, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 32, 32, 34, 34, 36, 36, - 38, 38, 40, 40, 42, 42, 44, 44, - 46, 46, 48, 48, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 4, 4, 6, - 8, 8, 10, 10, 12, 12, 12, 12, - 12, 14, 14, 14, 16, 16, 16, 16, - 16, 18, 20, 20, 20, 20, 20, 20, - 22, 22, 22, 24, 24, 24, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 4, 4, 4, 4, - 4, 6, 6, 8, 10, 10, 10, 10, - 10, 10, 10, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 4, 6, - 8, 8, 10, 12, 14, 16, 18, 20, - 22, 24, 26, 28, 30, 32, 34, 36, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 30, 32, 34, 34, 34, 34, 36, 38, - 38, 38, 40, 40, 42, 42, 44, 44, - 46, 46, 48, 48, 50, 50, 52, 52, - 54, 54, 56, 56, 58, 58, 60, 60, - 62, 64, 66, 68, 68, 68, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, - 70, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 64, 66, 66, 68, 68, 70, 70, - 72, 72, 74, 74, 76, 76, 78, 78, - 80, 80, 82, 82, 84, 84, 86, 86, - 88, 88, 90, 90, 92, 92, 94, 94, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 50, 50, 52, 52, 54, 54, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 2, 4, 4, 6, - 6, 8, 8, 10, 10, 12, 12, 14, - 14, 14, 16, 16, 18, 18, 20, 20, - 22, 22, 24, 24, 26, 26, 28, 28, - 30, 30, 32, 32, 34, 34, 36, 36, - 38, 38, 40, 40, 42, 42, 44, 44, - 46, 46, 48, 48, 50, 50, 52, 52, - 52, 52, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 4, 6, 8, 10, 12, - 14, 16, 18, 20, 22, 24, 26, 28, - 30, 32, 34, 36, 38, 40, 42, 44, - 46, 48, 50, 52, 54, 56, 58, 60, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 87, 87, 90, 90, 93, 93, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 87, 87, 90, 90, 93, 93, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 33, 33, 33, 33, 36, 36, 36, 36, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 45, 48, 51, 54, 57, 60, 63, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 69, 72, 75, 78, 81, 84, 87, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 21, 21, 24, 24, 27, 27, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 33, 36, 39, 42, 45, 48, 51, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 57, 60, 63, 66, 69, 72, 75, - 78, 81, 84, 87, 90, 93, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 75, 78, 78, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 6, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 12, 15, 15, 15, 15, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 6, 9, 12, 15, 18, - 21, 24, 27, 30, 33, 36, 39, 42, - 45, 48, 51, 54, 57, 60, 63, 66, - 69, 72, 75, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, - }, - }, - { - { /* Fourth byte table 0. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, - }, - { /* Fourth byte table 1. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 46, 48, 50, 52, 54, 56, 58, 60, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 2. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 49, 49, 51, 51, 53, 53, - 55, 55, 55, 57, 57, 59, 59, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, - 61, - }, - { /* Fourth byte table 3. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 4, 4, 6, 6, 8, - 8, 10, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 50, 50, 52, 52, 54, 54, - 56, 56, 56, 58, 58, 60, 60, 62, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, - 63, - }, - { /* Fourth byte table 4. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 4, 4, 6, 6, - 6, 8, 8, 8, 8, 10, 10, 10, - 10, 10, 10, 12, 12, 12, 14, 14, - 14, 14, 16, 18, 18, 18, 18, 20, - 20, 20, 22, 22, 24, 24, 26, 26, - 26, 28, 28, 28, 28, 28, 30, 30, - 30, 32, 32, 32, 32, 34, 34, 36, - 36, 36, 38, 38, 38, 38, 40, 40, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, - }, - { /* Fourth byte table 5. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 4, - 4, 6, 8, 8, 10, 12, 12, 14, - 14, 16, 16, 18, 18, 20, 20, 22, - 22, 24, 24, 26, 26, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 48, 50, 52, 52, 54, 54, - 54, 54, 56, 56, 58, 58, 60, 60, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 6. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 32, 32, 34, 34, 36, 36, - 38, 38, 40, 40, 42, 42, 44, 44, - 46, 46, 48, 48, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, - 52, - }, - { /* Fourth byte table 7. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 2, 2, 2, 2, - 4, 4, 6, 6, 8, 8, 10, 10, - 12, 12, 12, 12, 14, 16, 16, 18, - 20, 20, 22, 22, 24, 24, 24, 24, - 24, 26, 26, 26, 28, 28, 28, 28, - 28, 30, 32, 32, 35, 35, 35, 35, - 37, 37, 37, 39, 39, 39, 41, 41, - 41, 41, 41, 41, 41, 41, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 44, - }, - { /* Fourth byte table 8. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 4, 4, 4, 4, - 4, 6, 8, 10, 12, 14, 14, 14, - 14, 14, 14, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, - }, - { /* Fourth byte table 9. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 4, 6, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, - }, - { /* Fourth byte table 10. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 4, 6, - 8, 8, 10, 12, 14, 16, 18, 20, - 22, 24, 26, 28, 30, 32, 34, 36, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 38, - }, - { /* Fourth byte table 11. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 30, 32, 34, 34, 34, 34, 36, 38, - 38, 38, 40, 40, 42, 42, 44, 44, - 46, 46, 48, 48, 50, 50, 52, 52, - 54, 54, 56, 56, 58, 58, 60, 60, - 62, 64, 66, 68, 68, 68, 70, 70, - 70, 72, 72, 72, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, - 74, - }, - { /* Fourth byte table 12. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, - }, - { /* Fourth byte table 13. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62, - 64, 64, 66, 66, 68, 68, 70, 70, - 72, 72, 74, 74, 76, 76, 78, 78, - 80, 80, 82, 82, 84, 84, 86, 86, - 88, 88, 90, 90, 92, 92, 94, 94, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 14. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 50, 50, 52, 52, 54, 54, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, - 56, - }, - { /* Fourth byte table 15. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 2, 4, 4, 6, - 6, 8, 8, 10, 10, 12, 12, 14, - 16, 16, 18, 18, 20, 20, 22, 22, - 24, 24, 26, 26, 28, 28, 30, 30, - 32, 32, 34, 34, 36, 36, 38, 38, - 40, 40, 42, 42, 44, 44, 46, 46, - 48, 48, 50, 50, 52, 52, 54, 54, - 56, 56, 58, 58, 60, 60, 62, 62, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - { /* Fourth byte table 16. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 4, 4, 6, 6, - 8, 8, 10, 10, 12, 12, 14, 14, - 16, 16, 18, 18, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - 20, - }, - { /* Fourth byte table 17. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 4, 6, 8, 10, 12, - 14, 16, 18, 20, 22, 24, 26, 28, - 30, 32, 34, 36, 38, 40, 42, 44, - 46, 48, 50, 52, 54, 56, 58, 60, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, - }, - { /* Fourth byte table 18. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 4, 6, 8, 10, 12, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, - }, - { /* Fourth byte table 19. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 20. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 87, 87, 90, 90, 93, 93, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 21. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 87, 87, 90, 90, 93, 93, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 22. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 33, 33, 33, 33, 36, 36, 36, 36, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, - 84, - }, - { /* Fourth byte table 23. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, - 87, - }, - { /* Fourth byte table 24. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, - 42, 45, 48, 51, 54, 57, 60, 63, - 66, 66, 66, 66, 66, 66, 66, 66, - 66, 69, 72, 75, 78, 81, 84, 87, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 90, - }, - { /* Fourth byte table 25. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 21, 21, 24, 24, 27, 27, - 30, 30, 30, 30, 30, 30, 30, 30, - 30, 33, 36, 39, 42, 45, 48, 51, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 57, 60, 63, 66, 69, 72, 75, - 78, 81, 84, 87, 90, 93, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 26. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 72, 72, 72, 72, 72, 72, 72, - 72, 75, 78, 78, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, - 83, - }, - { /* Fourth byte table 27. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 6, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 12, 15, 15, 15, 15, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, - }, - { /* Fourth byte table 28. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 6, 9, 12, 15, 18, 21, 24, - 27, 30, 33, 36, 39, 42, 45, 48, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, - 51, - }, - { /* Fourth byte table 29. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, - }, - { /* Fourth byte table 30. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, - }, - { /* Fourth byte table 31. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, - }, - { /* Fourth byte table 32. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 93, 93, 96, 96, 96, 96, 98, 100, - 100, 103, 103, 106, 106, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, - }, - { /* Fourth byte table 33. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 57, 57, - 60, 60, 63, 63, 66, 66, 69, 69, - 72, 72, 75, 75, 78, 78, 81, 81, - 84, 84, 87, 87, 90, 90, 93, 93, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 34. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 6, 6, 9, 9, - 12, 12, 15, 15, 18, 18, 21, 21, - 24, 24, 27, 27, 30, 30, 33, 33, - 36, 36, 39, 39, 42, 42, 45, 45, - 48, 48, 51, 51, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, - }, - { /* Fourth byte table 35. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 6, 9, 12, 15, 18, 21, - 24, 27, 30, 33, 36, 39, 42, 45, - 48, 51, 54, 57, 60, 63, 66, 69, - 72, 75, 78, 81, 84, 87, 90, 93, - 96, 99, 102, 105, 108, 111, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, - 114, - }, - { /* Fourth byte table 36. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 6, 9, 12, 15, 18, - 21, 24, 27, 30, 33, 36, 39, 42, - 45, 48, 51, 54, 57, 60, 63, 66, - 69, 72, 75, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, - 78, - }, - { /* Fourth byte table 37. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, - 96, - }, - { /* Fourth byte table 38. */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, - }, - }, -}; - -static const uchar_t u8_toupper_final_tbl[2][2318] = { - { - 0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82, - 0xC3, 0x83, 0xC3, 0x84, 0xC3, 0x85, 0xC3, 0x86, - 0xC3, 0x87, 0xC3, 0x88, 0xC3, 0x89, 0xC3, 0x8A, - 0xC3, 0x8B, 0xC3, 0x8C, 0xC3, 0x8D, 0xC3, 0x8E, - 0xC3, 0x8F, 0xC3, 0x90, 0xC3, 0x91, 0xC3, 0x92, - 0xC3, 0x93, 0xC3, 0x94, 0xC3, 0x95, 0xC3, 0x96, - 0xC3, 0x98, 0xC3, 0x99, 0xC3, 0x9A, 0xC3, 0x9B, - 0xC3, 0x9C, 0xC3, 0x9D, 0xC3, 0x9E, 0xC5, 0xB8, - 0xC4, 0x80, 0xC4, 0x82, 0xC4, 0x84, 0xC4, 0x86, - 0xC4, 0x88, 0xC4, 0x8A, 0xC4, 0x8C, 0xC4, 0x8E, - 0xC4, 0x90, 0xC4, 0x92, 0xC4, 0x94, 0xC4, 0x96, - 0xC4, 0x98, 0xC4, 0x9A, 0xC4, 0x9C, 0xC4, 0x9E, - 0xC4, 0xA0, 0xC4, 0xA2, 0xC4, 0xA4, 0xC4, 0xA6, - 0xC4, 0xA8, 0xC4, 0xAA, 0xC4, 0xAC, 0xC4, 0xAE, - 0x49, 0xC4, 0xB2, 0xC4, 0xB4, 0xC4, 0xB6, 0xC4, - 0xB9, 0xC4, 0xBB, 0xC4, 0xBD, 0xC4, 0xBF, 0xC5, - 0x81, 0xC5, 0x83, 0xC5, 0x85, 0xC5, 0x87, 0xC5, - 0x8A, 0xC5, 0x8C, 0xC5, 0x8E, 0xC5, 0x90, 0xC5, - 0x92, 0xC5, 0x94, 0xC5, 0x96, 0xC5, 0x98, 0xC5, - 0x9A, 0xC5, 0x9C, 0xC5, 0x9E, 0xC5, 0xA0, 0xC5, - 0xA2, 0xC5, 0xA4, 0xC5, 0xA6, 0xC5, 0xA8, 0xC5, - 0xAA, 0xC5, 0xAC, 0xC5, 0xAE, 0xC5, 0xB0, 0xC5, - 0xB2, 0xC5, 0xB4, 0xC5, 0xB6, 0xC5, 0xB9, 0xC5, - 0xBB, 0xC5, 0xBD, 0x53, 0xC6, 0x82, 0xC6, 0x84, - 0xC6, 0x87, 0xC6, 0x8B, 0xC6, 0x91, 0xC7, 0xB6, - 0xC6, 0x98, 0xC8, 0xA0, 0xC6, 0xA0, 0xC6, 0xA2, - 0xC6, 0xA4, 0xC6, 0xA7, 0xC6, 0xAC, 0xC6, 0xAF, - 0xC6, 0xB3, 0xC6, 0xB5, 0xC6, 0xB8, 0xC6, 0xBC, - 0xC7, 0xB7, 0xC7, 0x84, 0xC7, 0x84, 0xC7, 0x87, - 0xC7, 0x87, 0xC7, 0x8A, 0xC7, 0x8A, 0xC7, 0x8D, - 0xC7, 0x8F, 0xC7, 0x91, 0xC7, 0x93, 0xC7, 0x95, - 0xC7, 0x97, 0xC7, 0x99, 0xC7, 0x9B, 0xC6, 0x8E, - 0xC7, 0x9E, 0xC7, 0xA0, 0xC7, 0xA2, 0xC7, 0xA4, - 0xC7, 0xA6, 0xC7, 0xA8, 0xC7, 0xAA, 0xC7, 0xAC, - 0xC7, 0xAE, 0xC7, 0xB1, 0xC7, 0xB1, 0xC7, 0xB4, - 0xC7, 0xB8, 0xC7, 0xBA, 0xC7, 0xBC, 0xC7, 0xBE, - 0xC8, 0x80, 0xC8, 0x82, 0xC8, 0x84, 0xC8, 0x86, - 0xC8, 0x88, 0xC8, 0x8A, 0xC8, 0x8C, 0xC8, 0x8E, - 0xC8, 0x90, 0xC8, 0x92, 0xC8, 0x94, 0xC8, 0x96, - 0xC8, 0x98, 0xC8, 0x9A, 0xC8, 0x9C, 0xC8, 0x9E, - 0xC8, 0xA2, 0xC8, 0xA4, 0xC8, 0xA6, 0xC8, 0xA8, - 0xC8, 0xAA, 0xC8, 0xAC, 0xC8, 0xAE, 0xC8, 0xB0, - 0xC8, 0xB2, 0xC6, 0x81, 0xC6, 0x86, 0xC6, 0x89, - 0xC6, 0x8A, 0xC6, 0x8F, 0xC6, 0x90, 0xC6, 0x93, - 0xC6, 0x94, 0xC6, 0x97, 0xC6, 0x96, 0xC6, 0x9C, - 0xC6, 0x9D, 0xC6, 0x9F, 0xC6, 0xA6, 0xC6, 0xA9, - 0xC6, 0xAE, 0xC6, 0xB1, 0xC6, 0xB2, 0xC6, 0xB7, - 0xCE, 0x99, 0xCE, 0x86, 0xCE, 0x88, 0xCE, 0x89, - 0xCE, 0x8A, 0xCE, 0x91, 0xCE, 0x92, 0xCE, 0x93, - 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, 0xCE, 0x97, - 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, 0xCE, 0x9B, - 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, 0xCE, 0x9F, - 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0xA3, 0xCE, 0xA3, - 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, 0xCE, 0xA7, - 0xCE, 0xA8, 0xCE, 0xA9, 0xCE, 0xAA, 0xCE, 0xAB, - 0xCE, 0x8C, 0xCE, 0x8E, 0xCE, 0x8F, 0xCE, 0x92, - 0xCE, 0x98, 0xCE, 0xA6, 0xCE, 0xA0, 0xCF, 0x98, - 0xCF, 0x9A, 0xCF, 0x9C, 0xCF, 0x9E, 0xCF, 0xA0, - 0xCF, 0xA2, 0xCF, 0xA4, 0xCF, 0xA6, 0xCF, 0xA8, - 0xCF, 0xAA, 0xCF, 0xAC, 0xCF, 0xAE, 0xCE, 0x9A, - 0xCE, 0xA1, 0xCE, 0xA3, 0xCE, 0x95, 0xD0, 0x90, - 0xD0, 0x91, 0xD0, 0x92, 0xD0, 0x93, 0xD0, 0x94, - 0xD0, 0x95, 0xD0, 0x96, 0xD0, 0x97, 0xD0, 0x98, - 0xD0, 0x99, 0xD0, 0x9A, 0xD0, 0x9B, 0xD0, 0x9C, - 0xD0, 0x9D, 0xD0, 0x9E, 0xD0, 0x9F, 0xD0, 0xA0, - 0xD0, 0xA1, 0xD0, 0xA2, 0xD0, 0xA3, 0xD0, 0xA4, - 0xD0, 0xA5, 0xD0, 0xA6, 0xD0, 0xA7, 0xD0, 0xA8, - 0xD0, 0xA9, 0xD0, 0xAA, 0xD0, 0xAB, 0xD0, 0xAC, - 0xD0, 0xAD, 0xD0, 0xAE, 0xD0, 0xAF, 0xD0, 0x80, - 0xD0, 0x81, 0xD0, 0x82, 0xD0, 0x83, 0xD0, 0x84, - 0xD0, 0x85, 0xD0, 0x86, 0xD0, 0x87, 0xD0, 0x88, - 0xD0, 0x89, 0xD0, 0x8A, 0xD0, 0x8B, 0xD0, 0x8C, - 0xD0, 0x8D, 0xD0, 0x8E, 0xD0, 0x8F, 0xD1, 0xA0, - 0xD1, 0xA2, 0xD1, 0xA4, 0xD1, 0xA6, 0xD1, 0xA8, - 0xD1, 0xAA, 0xD1, 0xAC, 0xD1, 0xAE, 0xD1, 0xB0, - 0xD1, 0xB2, 0xD1, 0xB4, 0xD1, 0xB6, 0xD1, 0xB8, - 0xD1, 0xBA, 0xD1, 0xBC, 0xD1, 0xBE, 0xD2, 0x80, - 0xD2, 0x8A, 0xD2, 0x8C, 0xD2, 0x8E, 0xD2, 0x90, - 0xD2, 0x92, 0xD2, 0x94, 0xD2, 0x96, 0xD2, 0x98, - 0xD2, 0x9A, 0xD2, 0x9C, 0xD2, 0x9E, 0xD2, 0xA0, - 0xD2, 0xA2, 0xD2, 0xA4, 0xD2, 0xA6, 0xD2, 0xA8, - 0xD2, 0xAA, 0xD2, 0xAC, 0xD2, 0xAE, 0xD2, 0xB0, - 0xD2, 0xB2, 0xD2, 0xB4, 0xD2, 0xB6, 0xD2, 0xB8, - 0xD2, 0xBA, 0xD2, 0xBC, 0xD2, 0xBE, 0xD3, 0x81, - 0xD3, 0x83, 0xD3, 0x85, 0xD3, 0x87, 0xD3, 0x89, - 0xD3, 0x8B, 0xD3, 0x8D, 0xD3, 0x90, 0xD3, 0x92, - 0xD3, 0x94, 0xD3, 0x96, 0xD3, 0x98, 0xD3, 0x9A, - 0xD3, 0x9C, 0xD3, 0x9E, 0xD3, 0xA0, 0xD3, 0xA2, - 0xD3, 0xA4, 0xD3, 0xA6, 0xD3, 0xA8, 0xD3, 0xAA, - 0xD3, 0xAC, 0xD3, 0xAE, 0xD3, 0xB0, 0xD3, 0xB2, - 0xD3, 0xB4, 0xD3, 0xB8, 0xD4, 0x80, 0xD4, 0x82, - 0xD4, 0x84, 0xD4, 0x86, 0xD4, 0x88, 0xD4, 0x8A, - 0xD4, 0x8C, 0xD4, 0x8E, 0xD4, 0xB1, 0xD4, 0xB2, - 0xD4, 0xB3, 0xD4, 0xB4, 0xD4, 0xB5, 0xD4, 0xB6, - 0xD4, 0xB7, 0xD4, 0xB8, 0xD4, 0xB9, 0xD4, 0xBA, - 0xD4, 0xBB, 0xD4, 0xBC, 0xD4, 0xBD, 0xD4, 0xBE, - 0xD4, 0xBF, 0xD5, 0x80, 0xD5, 0x81, 0xD5, 0x82, - 0xD5, 0x83, 0xD5, 0x84, 0xD5, 0x85, 0xD5, 0x86, - 0xD5, 0x87, 0xD5, 0x88, 0xD5, 0x89, 0xD5, 0x8A, - 0xD5, 0x8B, 0xD5, 0x8C, 0xD5, 0x8D, 0xD5, 0x8E, - 0xD5, 0x8F, 0xD5, 0x90, 0xD5, 0x91, 0xD5, 0x92, - 0xD5, 0x93, 0xD5, 0x94, 0xD5, 0x95, 0xD5, 0x96, - 0xE1, 0xB8, 0x80, 0xE1, 0xB8, 0x82, 0xE1, 0xB8, - 0x84, 0xE1, 0xB8, 0x86, 0xE1, 0xB8, 0x88, 0xE1, - 0xB8, 0x8A, 0xE1, 0xB8, 0x8C, 0xE1, 0xB8, 0x8E, - 0xE1, 0xB8, 0x90, 0xE1, 0xB8, 0x92, 0xE1, 0xB8, - 0x94, 0xE1, 0xB8, 0x96, 0xE1, 0xB8, 0x98, 0xE1, - 0xB8, 0x9A, 0xE1, 0xB8, 0x9C, 0xE1, 0xB8, 0x9E, - 0xE1, 0xB8, 0xA0, 0xE1, 0xB8, 0xA2, 0xE1, 0xB8, - 0xA4, 0xE1, 0xB8, 0xA6, 0xE1, 0xB8, 0xA8, 0xE1, - 0xB8, 0xAA, 0xE1, 0xB8, 0xAC, 0xE1, 0xB8, 0xAE, - 0xE1, 0xB8, 0xB0, 0xE1, 0xB8, 0xB2, 0xE1, 0xB8, - 0xB4, 0xE1, 0xB8, 0xB6, 0xE1, 0xB8, 0xB8, 0xE1, - 0xB8, 0xBA, 0xE1, 0xB8, 0xBC, 0xE1, 0xB8, 0xBE, - 0xE1, 0xB9, 0x80, 0xE1, 0xB9, 0x82, 0xE1, 0xB9, - 0x84, 0xE1, 0xB9, 0x86, 0xE1, 0xB9, 0x88, 0xE1, - 0xB9, 0x8A, 0xE1, 0xB9, 0x8C, 0xE1, 0xB9, 0x8E, - 0xE1, 0xB9, 0x90, 0xE1, 0xB9, 0x92, 0xE1, 0xB9, - 0x94, 0xE1, 0xB9, 0x96, 0xE1, 0xB9, 0x98, 0xE1, - 0xB9, 0x9A, 0xE1, 0xB9, 0x9C, 0xE1, 0xB9, 0x9E, - 0xE1, 0xB9, 0xA0, 0xE1, 0xB9, 0xA2, 0xE1, 0xB9, - 0xA4, 0xE1, 0xB9, 0xA6, 0xE1, 0xB9, 0xA8, 0xE1, - 0xB9, 0xAA, 0xE1, 0xB9, 0xAC, 0xE1, 0xB9, 0xAE, - 0xE1, 0xB9, 0xB0, 0xE1, 0xB9, 0xB2, 0xE1, 0xB9, - 0xB4, 0xE1, 0xB9, 0xB6, 0xE1, 0xB9, 0xB8, 0xE1, - 0xB9, 0xBA, 0xE1, 0xB9, 0xBC, 0xE1, 0xB9, 0xBE, - 0xE1, 0xBA, 0x80, 0xE1, 0xBA, 0x82, 0xE1, 0xBA, - 0x84, 0xE1, 0xBA, 0x86, 0xE1, 0xBA, 0x88, 0xE1, - 0xBA, 0x8A, 0xE1, 0xBA, 0x8C, 0xE1, 0xBA, 0x8E, - 0xE1, 0xBA, 0x90, 0xE1, 0xBA, 0x92, 0xE1, 0xBA, - 0x94, 0xE1, 0xB9, 0xA0, 0xE1, 0xBA, 0xA0, 0xE1, - 0xBA, 0xA2, 0xE1, 0xBA, 0xA4, 0xE1, 0xBA, 0xA6, - 0xE1, 0xBA, 0xA8, 0xE1, 0xBA, 0xAA, 0xE1, 0xBA, - 0xAC, 0xE1, 0xBA, 0xAE, 0xE1, 0xBA, 0xB0, 0xE1, - 0xBA, 0xB2, 0xE1, 0xBA, 0xB4, 0xE1, 0xBA, 0xB6, - 0xE1, 0xBA, 0xB8, 0xE1, 0xBA, 0xBA, 0xE1, 0xBA, - 0xBC, 0xE1, 0xBA, 0xBE, 0xE1, 0xBB, 0x80, 0xE1, - 0xBB, 0x82, 0xE1, 0xBB, 0x84, 0xE1, 0xBB, 0x86, - 0xE1, 0xBB, 0x88, 0xE1, 0xBB, 0x8A, 0xE1, 0xBB, - 0x8C, 0xE1, 0xBB, 0x8E, 0xE1, 0xBB, 0x90, 0xE1, - 0xBB, 0x92, 0xE1, 0xBB, 0x94, 0xE1, 0xBB, 0x96, - 0xE1, 0xBB, 0x98, 0xE1, 0xBB, 0x9A, 0xE1, 0xBB, - 0x9C, 0xE1, 0xBB, 0x9E, 0xE1, 0xBB, 0xA0, 0xE1, - 0xBB, 0xA2, 0xE1, 0xBB, 0xA4, 0xE1, 0xBB, 0xA6, - 0xE1, 0xBB, 0xA8, 0xE1, 0xBB, 0xAA, 0xE1, 0xBB, - 0xAC, 0xE1, 0xBB, 0xAE, 0xE1, 0xBB, 0xB0, 0xE1, - 0xBB, 0xB2, 0xE1, 0xBB, 0xB4, 0xE1, 0xBB, 0xB6, - 0xE1, 0xBB, 0xB8, 0xE1, 0xBC, 0x88, 0xE1, 0xBC, - 0x89, 0xE1, 0xBC, 0x8A, 0xE1, 0xBC, 0x8B, 0xE1, - 0xBC, 0x8C, 0xE1, 0xBC, 0x8D, 0xE1, 0xBC, 0x8E, - 0xE1, 0xBC, 0x8F, 0xE1, 0xBC, 0x98, 0xE1, 0xBC, - 0x99, 0xE1, 0xBC, 0x9A, 0xE1, 0xBC, 0x9B, 0xE1, - 0xBC, 0x9C, 0xE1, 0xBC, 0x9D, 0xE1, 0xBC, 0xA8, - 0xE1, 0xBC, 0xA9, 0xE1, 0xBC, 0xAA, 0xE1, 0xBC, - 0xAB, 0xE1, 0xBC, 0xAC, 0xE1, 0xBC, 0xAD, 0xE1, - 0xBC, 0xAE, 0xE1, 0xBC, 0xAF, 0xE1, 0xBC, 0xB8, - 0xE1, 0xBC, 0xB9, 0xE1, 0xBC, 0xBA, 0xE1, 0xBC, - 0xBB, 0xE1, 0xBC, 0xBC, 0xE1, 0xBC, 0xBD, 0xE1, - 0xBC, 0xBE, 0xE1, 0xBC, 0xBF, 0xE1, 0xBD, 0x88, - 0xE1, 0xBD, 0x89, 0xE1, 0xBD, 0x8A, 0xE1, 0xBD, - 0x8B, 0xE1, 0xBD, 0x8C, 0xE1, 0xBD, 0x8D, 0xE1, - 0xBD, 0x99, 0xE1, 0xBD, 0x9B, 0xE1, 0xBD, 0x9D, - 0xE1, 0xBD, 0x9F, 0xE1, 0xBD, 0xA8, 0xE1, 0xBD, - 0xA9, 0xE1, 0xBD, 0xAA, 0xE1, 0xBD, 0xAB, 0xE1, - 0xBD, 0xAC, 0xE1, 0xBD, 0xAD, 0xE1, 0xBD, 0xAE, - 0xE1, 0xBD, 0xAF, 0xE1, 0xBE, 0xBA, 0xE1, 0xBE, - 0xBB, 0xE1, 0xBF, 0x88, 0xE1, 0xBF, 0x89, 0xE1, - 0xBF, 0x8A, 0xE1, 0xBF, 0x8B, 0xE1, 0xBF, 0x9A, - 0xE1, 0xBF, 0x9B, 0xE1, 0xBF, 0xB8, 0xE1, 0xBF, - 0xB9, 0xE1, 0xBF, 0xAA, 0xE1, 0xBF, 0xAB, 0xE1, - 0xBF, 0xBA, 0xE1, 0xBF, 0xBB, 0xE1, 0xBE, 0x88, - 0xE1, 0xBE, 0x89, 0xE1, 0xBE, 0x8A, 0xE1, 0xBE, - 0x8B, 0xE1, 0xBE, 0x8C, 0xE1, 0xBE, 0x8D, 0xE1, - 0xBE, 0x8E, 0xE1, 0xBE, 0x8F, 0xE1, 0xBE, 0x98, - 0xE1, 0xBE, 0x99, 0xE1, 0xBE, 0x9A, 0xE1, 0xBE, - 0x9B, 0xE1, 0xBE, 0x9C, 0xE1, 0xBE, 0x9D, 0xE1, - 0xBE, 0x9E, 0xE1, 0xBE, 0x9F, 0xE1, 0xBE, 0xA8, - 0xE1, 0xBE, 0xA9, 0xE1, 0xBE, 0xAA, 0xE1, 0xBE, - 0xAB, 0xE1, 0xBE, 0xAC, 0xE1, 0xBE, 0xAD, 0xE1, - 0xBE, 0xAE, 0xE1, 0xBE, 0xAF, 0xE1, 0xBE, 0xB8, - 0xE1, 0xBE, 0xB9, 0xE1, 0xBE, 0xBC, 0xCE, 0x99, - 0xE1, 0xBF, 0x8C, 0xE1, 0xBF, 0x98, 0xE1, 0xBF, - 0x99, 0xE1, 0xBF, 0xA8, 0xE1, 0xBF, 0xA9, 0xE1, - 0xBF, 0xAC, 0xE1, 0xBF, 0xBC, 0xE2, 0x85, 0xA0, - 0xE2, 0x85, 0xA1, 0xE2, 0x85, 0xA2, 0xE2, 0x85, - 0xA3, 0xE2, 0x85, 0xA4, 0xE2, 0x85, 0xA5, 0xE2, - 0x85, 0xA6, 0xE2, 0x85, 0xA7, 0xE2, 0x85, 0xA8, - 0xE2, 0x85, 0xA9, 0xE2, 0x85, 0xAA, 0xE2, 0x85, - 0xAB, 0xE2, 0x85, 0xAC, 0xE2, 0x85, 0xAD, 0xE2, - 0x85, 0xAE, 0xE2, 0x85, 0xAF, 0xE2, 0x92, 0xB6, - 0xE2, 0x92, 0xB7, 0xE2, 0x92, 0xB8, 0xE2, 0x92, - 0xB9, 0xE2, 0x92, 0xBA, 0xE2, 0x92, 0xBB, 0xE2, - 0x92, 0xBC, 0xE2, 0x92, 0xBD, 0xE2, 0x92, 0xBE, - 0xE2, 0x92, 0xBF, 0xE2, 0x93, 0x80, 0xE2, 0x93, - 0x81, 0xE2, 0x93, 0x82, 0xE2, 0x93, 0x83, 0xE2, - 0x93, 0x84, 0xE2, 0x93, 0x85, 0xE2, 0x93, 0x86, - 0xE2, 0x93, 0x87, 0xE2, 0x93, 0x88, 0xE2, 0x93, - 0x89, 0xE2, 0x93, 0x8A, 0xE2, 0x93, 0x8B, 0xE2, - 0x93, 0x8C, 0xE2, 0x93, 0x8D, 0xE2, 0x93, 0x8E, - 0xE2, 0x93, 0x8F, 0xEF, 0xBC, 0xA1, 0xEF, 0xBC, - 0xA2, 0xEF, 0xBC, 0xA3, 0xEF, 0xBC, 0xA4, 0xEF, - 0xBC, 0xA5, 0xEF, 0xBC, 0xA6, 0xEF, 0xBC, 0xA7, - 0xEF, 0xBC, 0xA8, 0xEF, 0xBC, 0xA9, 0xEF, 0xBC, - 0xAA, 0xEF, 0xBC, 0xAB, 0xEF, 0xBC, 0xAC, 0xEF, - 0xBC, 0xAD, 0xEF, 0xBC, 0xAE, 0xEF, 0xBC, 0xAF, - 0xEF, 0xBC, 0xB0, 0xEF, 0xBC, 0xB1, 0xEF, 0xBC, - 0xB2, 0xEF, 0xBC, 0xB3, 0xEF, 0xBC, 0xB4, 0xEF, - 0xBC, 0xB5, 0xEF, 0xBC, 0xB6, 0xEF, 0xBC, 0xB7, - 0xEF, 0xBC, 0xB8, 0xEF, 0xBC, 0xB9, 0xEF, 0xBC, - 0xBA, 0xF0, 0x90, 0x90, 0x80, 0xF0, 0x90, 0x90, - 0x81, 0xF0, 0x90, 0x90, 0x82, 0xF0, 0x90, 0x90, - 0x83, 0xF0, 0x90, 0x90, 0x84, 0xF0, 0x90, 0x90, - 0x85, 0xF0, 0x90, 0x90, 0x86, 0xF0, 0x90, 0x90, - 0x87, 0xF0, 0x90, 0x90, 0x88, 0xF0, 0x90, 0x90, - 0x89, 0xF0, 0x90, 0x90, 0x8A, 0xF0, 0x90, 0x90, - 0x8B, 0xF0, 0x90, 0x90, 0x8C, 0xF0, 0x90, 0x90, - 0x8D, 0xF0, 0x90, 0x90, 0x8E, 0xF0, 0x90, 0x90, - 0x8F, 0xF0, 0x90, 0x90, 0x90, 0xF0, 0x90, 0x90, - 0x91, 0xF0, 0x90, 0x90, 0x92, 0xF0, 0x90, 0x90, - 0x93, 0xF0, 0x90, 0x90, 0x94, 0xF0, 0x90, 0x90, - 0x95, 0xF0, 0x90, 0x90, 0x96, 0xF0, 0x90, 0x90, - 0x97, 0xF0, 0x90, 0x90, 0x98, 0xF0, 0x90, 0x90, - 0x99, 0xF0, 0x90, 0x90, 0x9A, 0xF0, 0x90, 0x90, - 0x9B, 0xF0, 0x90, 0x90, 0x9C, 0xF0, 0x90, 0x90, - 0x9D, 0xF0, 0x90, 0x90, 0x9E, 0xF0, 0x90, 0x90, - 0x9F, 0xF0, 0x90, 0x90, 0xA0, 0xF0, 0x90, 0x90, - 0xA1, 0xF0, 0x90, 0x90, 0xA2, 0xF0, 0x90, 0x90, - 0xA3, 0xF0, 0x90, 0x90, 0xA4, 0xF0, 0x90, 0x90, - 0xA5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - }, - { - 0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82, - 0xC3, 0x83, 0xC3, 0x84, 0xC3, 0x85, 0xC3, 0x86, - 0xC3, 0x87, 0xC3, 0x88, 0xC3, 0x89, 0xC3, 0x8A, - 0xC3, 0x8B, 0xC3, 0x8C, 0xC3, 0x8D, 0xC3, 0x8E, - 0xC3, 0x8F, 0xC3, 0x90, 0xC3, 0x91, 0xC3, 0x92, - 0xC3, 0x93, 0xC3, 0x94, 0xC3, 0x95, 0xC3, 0x96, - 0xC3, 0x98, 0xC3, 0x99, 0xC3, 0x9A, 0xC3, 0x9B, - 0xC3, 0x9C, 0xC3, 0x9D, 0xC3, 0x9E, 0xC5, 0xB8, - 0xC4, 0x80, 0xC4, 0x82, 0xC4, 0x84, 0xC4, 0x86, - 0xC4, 0x88, 0xC4, 0x8A, 0xC4, 0x8C, 0xC4, 0x8E, - 0xC4, 0x90, 0xC4, 0x92, 0xC4, 0x94, 0xC4, 0x96, - 0xC4, 0x98, 0xC4, 0x9A, 0xC4, 0x9C, 0xC4, 0x9E, - 0xC4, 0xA0, 0xC4, 0xA2, 0xC4, 0xA4, 0xC4, 0xA6, - 0xC4, 0xA8, 0xC4, 0xAA, 0xC4, 0xAC, 0xC4, 0xAE, - 0x49, 0xC4, 0xB2, 0xC4, 0xB4, 0xC4, 0xB6, 0xC4, - 0xB9, 0xC4, 0xBB, 0xC4, 0xBD, 0xC4, 0xBF, 0xC5, - 0x81, 0xC5, 0x83, 0xC5, 0x85, 0xC5, 0x87, 0xC5, - 0x8A, 0xC5, 0x8C, 0xC5, 0x8E, 0xC5, 0x90, 0xC5, - 0x92, 0xC5, 0x94, 0xC5, 0x96, 0xC5, 0x98, 0xC5, - 0x9A, 0xC5, 0x9C, 0xC5, 0x9E, 0xC5, 0xA0, 0xC5, - 0xA2, 0xC5, 0xA4, 0xC5, 0xA6, 0xC5, 0xA8, 0xC5, - 0xAA, 0xC5, 0xAC, 0xC5, 0xAE, 0xC5, 0xB0, 0xC5, - 0xB2, 0xC5, 0xB4, 0xC5, 0xB6, 0xC5, 0xB9, 0xC5, - 0xBB, 0xC5, 0xBD, 0x53, 0xC9, 0x83, 0xC6, 0x82, - 0xC6, 0x84, 0xC6, 0x87, 0xC6, 0x8B, 0xC6, 0x91, - 0xC7, 0xB6, 0xC6, 0x98, 0xC8, 0xBD, 0xC8, 0xA0, - 0xC6, 0xA0, 0xC6, 0xA2, 0xC6, 0xA4, 0xC6, 0xA7, - 0xC6, 0xAC, 0xC6, 0xAF, 0xC6, 0xB3, 0xC6, 0xB5, - 0xC6, 0xB8, 0xC6, 0xBC, 0xC7, 0xB7, 0xC7, 0x84, - 0xC7, 0x84, 0xC7, 0x87, 0xC7, 0x87, 0xC7, 0x8A, - 0xC7, 0x8A, 0xC7, 0x8D, 0xC7, 0x8F, 0xC7, 0x91, - 0xC7, 0x93, 0xC7, 0x95, 0xC7, 0x97, 0xC7, 0x99, - 0xC7, 0x9B, 0xC6, 0x8E, 0xC7, 0x9E, 0xC7, 0xA0, - 0xC7, 0xA2, 0xC7, 0xA4, 0xC7, 0xA6, 0xC7, 0xA8, - 0xC7, 0xAA, 0xC7, 0xAC, 0xC7, 0xAE, 0xC7, 0xB1, - 0xC7, 0xB1, 0xC7, 0xB4, 0xC7, 0xB8, 0xC7, 0xBA, - 0xC7, 0xBC, 0xC7, 0xBE, 0xC8, 0x80, 0xC8, 0x82, - 0xC8, 0x84, 0xC8, 0x86, 0xC8, 0x88, 0xC8, 0x8A, - 0xC8, 0x8C, 0xC8, 0x8E, 0xC8, 0x90, 0xC8, 0x92, - 0xC8, 0x94, 0xC8, 0x96, 0xC8, 0x98, 0xC8, 0x9A, - 0xC8, 0x9C, 0xC8, 0x9E, 0xC8, 0xA2, 0xC8, 0xA4, - 0xC8, 0xA6, 0xC8, 0xA8, 0xC8, 0xAA, 0xC8, 0xAC, - 0xC8, 0xAE, 0xC8, 0xB0, 0xC8, 0xB2, 0xC8, 0xBB, - 0xC9, 0x81, 0xC9, 0x86, 0xC9, 0x88, 0xC9, 0x8A, - 0xC9, 0x8C, 0xC9, 0x8E, 0xC6, 0x81, 0xC6, 0x86, - 0xC6, 0x89, 0xC6, 0x8A, 0xC6, 0x8F, 0xC6, 0x90, - 0xC6, 0x93, 0xC6, 0x94, 0xC6, 0x97, 0xC6, 0x96, - 0xE2, 0xB1, 0xA2, 0xC6, 0x9C, 0xC6, 0x9D, 0xC6, - 0x9F, 0xE2, 0xB1, 0xA4, 0xC6, 0xA6, 0xC6, 0xA9, - 0xC6, 0xAE, 0xC9, 0x84, 0xC6, 0xB1, 0xC6, 0xB2, - 0xC9, 0x85, 0xC6, 0xB7, 0xCE, 0x99, 0xCF, 0xBD, - 0xCF, 0xBE, 0xCF, 0xBF, 0xCE, 0x86, 0xCE, 0x88, - 0xCE, 0x89, 0xCE, 0x8A, 0xCE, 0x91, 0xCE, 0x92, - 0xCE, 0x93, 0xCE, 0x94, 0xCE, 0x95, 0xCE, 0x96, - 0xCE, 0x97, 0xCE, 0x98, 0xCE, 0x99, 0xCE, 0x9A, - 0xCE, 0x9B, 0xCE, 0x9C, 0xCE, 0x9D, 0xCE, 0x9E, - 0xCE, 0x9F, 0xCE, 0xA0, 0xCE, 0xA1, 0xCE, 0xA3, - 0xCE, 0xA3, 0xCE, 0xA4, 0xCE, 0xA5, 0xCE, 0xA6, - 0xCE, 0xA7, 0xCE, 0xA8, 0xCE, 0xA9, 0xCE, 0xAA, - 0xCE, 0xAB, 0xCE, 0x8C, 0xCE, 0x8E, 0xCE, 0x8F, - 0xCE, 0x92, 0xCE, 0x98, 0xCE, 0xA6, 0xCE, 0xA0, - 0xCF, 0x98, 0xCF, 0x9A, 0xCF, 0x9C, 0xCF, 0x9E, - 0xCF, 0xA0, 0xCF, 0xA2, 0xCF, 0xA4, 0xCF, 0xA6, - 0xCF, 0xA8, 0xCF, 0xAA, 0xCF, 0xAC, 0xCF, 0xAE, - 0xCE, 0x9A, 0xCE, 0xA1, 0xCF, 0xB9, 0xCE, 0x95, - 0xCF, 0xB7, 0xCF, 0xBA, 0xD0, 0x90, 0xD0, 0x91, - 0xD0, 0x92, 0xD0, 0x93, 0xD0, 0x94, 0xD0, 0x95, - 0xD0, 0x96, 0xD0, 0x97, 0xD0, 0x98, 0xD0, 0x99, - 0xD0, 0x9A, 0xD0, 0x9B, 0xD0, 0x9C, 0xD0, 0x9D, - 0xD0, 0x9E, 0xD0, 0x9F, 0xD0, 0xA0, 0xD0, 0xA1, - 0xD0, 0xA2, 0xD0, 0xA3, 0xD0, 0xA4, 0xD0, 0xA5, - 0xD0, 0xA6, 0xD0, 0xA7, 0xD0, 0xA8, 0xD0, 0xA9, - 0xD0, 0xAA, 0xD0, 0xAB, 0xD0, 0xAC, 0xD0, 0xAD, - 0xD0, 0xAE, 0xD0, 0xAF, 0xD0, 0x80, 0xD0, 0x81, - 0xD0, 0x82, 0xD0, 0x83, 0xD0, 0x84, 0xD0, 0x85, - 0xD0, 0x86, 0xD0, 0x87, 0xD0, 0x88, 0xD0, 0x89, - 0xD0, 0x8A, 0xD0, 0x8B, 0xD0, 0x8C, 0xD0, 0x8D, - 0xD0, 0x8E, 0xD0, 0x8F, 0xD1, 0xA0, 0xD1, 0xA2, - 0xD1, 0xA4, 0xD1, 0xA6, 0xD1, 0xA8, 0xD1, 0xAA, - 0xD1, 0xAC, 0xD1, 0xAE, 0xD1, 0xB0, 0xD1, 0xB2, - 0xD1, 0xB4, 0xD1, 0xB6, 0xD1, 0xB8, 0xD1, 0xBA, - 0xD1, 0xBC, 0xD1, 0xBE, 0xD2, 0x80, 0xD2, 0x8A, - 0xD2, 0x8C, 0xD2, 0x8E, 0xD2, 0x90, 0xD2, 0x92, - 0xD2, 0x94, 0xD2, 0x96, 0xD2, 0x98, 0xD2, 0x9A, - 0xD2, 0x9C, 0xD2, 0x9E, 0xD2, 0xA0, 0xD2, 0xA2, - 0xD2, 0xA4, 0xD2, 0xA6, 0xD2, 0xA8, 0xD2, 0xAA, - 0xD2, 0xAC, 0xD2, 0xAE, 0xD2, 0xB0, 0xD2, 0xB2, - 0xD2, 0xB4, 0xD2, 0xB6, 0xD2, 0xB8, 0xD2, 0xBA, - 0xD2, 0xBC, 0xD2, 0xBE, 0xD3, 0x81, 0xD3, 0x83, - 0xD3, 0x85, 0xD3, 0x87, 0xD3, 0x89, 0xD3, 0x8B, - 0xD3, 0x8D, 0xD3, 0x80, 0xD3, 0x90, 0xD3, 0x92, - 0xD3, 0x94, 0xD3, 0x96, 0xD3, 0x98, 0xD3, 0x9A, - 0xD3, 0x9C, 0xD3, 0x9E, 0xD3, 0xA0, 0xD3, 0xA2, - 0xD3, 0xA4, 0xD3, 0xA6, 0xD3, 0xA8, 0xD3, 0xAA, - 0xD3, 0xAC, 0xD3, 0xAE, 0xD3, 0xB0, 0xD3, 0xB2, - 0xD3, 0xB4, 0xD3, 0xB6, 0xD3, 0xB8, 0xD3, 0xBA, - 0xD3, 0xBC, 0xD3, 0xBE, 0xD4, 0x80, 0xD4, 0x82, - 0xD4, 0x84, 0xD4, 0x86, 0xD4, 0x88, 0xD4, 0x8A, - 0xD4, 0x8C, 0xD4, 0x8E, 0xD4, 0x90, 0xD4, 0x92, - 0xD4, 0xB1, 0xD4, 0xB2, 0xD4, 0xB3, 0xD4, 0xB4, - 0xD4, 0xB5, 0xD4, 0xB6, 0xD4, 0xB7, 0xD4, 0xB8, - 0xD4, 0xB9, 0xD4, 0xBA, 0xD4, 0xBB, 0xD4, 0xBC, - 0xD4, 0xBD, 0xD4, 0xBE, 0xD4, 0xBF, 0xD5, 0x80, - 0xD5, 0x81, 0xD5, 0x82, 0xD5, 0x83, 0xD5, 0x84, - 0xD5, 0x85, 0xD5, 0x86, 0xD5, 0x87, 0xD5, 0x88, - 0xD5, 0x89, 0xD5, 0x8A, 0xD5, 0x8B, 0xD5, 0x8C, - 0xD5, 0x8D, 0xD5, 0x8E, 0xD5, 0x8F, 0xD5, 0x90, - 0xD5, 0x91, 0xD5, 0x92, 0xD5, 0x93, 0xD5, 0x94, - 0xD5, 0x95, 0xD5, 0x96, 0xE2, 0xB1, 0xA3, 0xE1, - 0xB8, 0x80, 0xE1, 0xB8, 0x82, 0xE1, 0xB8, 0x84, - 0xE1, 0xB8, 0x86, 0xE1, 0xB8, 0x88, 0xE1, 0xB8, - 0x8A, 0xE1, 0xB8, 0x8C, 0xE1, 0xB8, 0x8E, 0xE1, - 0xB8, 0x90, 0xE1, 0xB8, 0x92, 0xE1, 0xB8, 0x94, - 0xE1, 0xB8, 0x96, 0xE1, 0xB8, 0x98, 0xE1, 0xB8, - 0x9A, 0xE1, 0xB8, 0x9C, 0xE1, 0xB8, 0x9E, 0xE1, - 0xB8, 0xA0, 0xE1, 0xB8, 0xA2, 0xE1, 0xB8, 0xA4, - 0xE1, 0xB8, 0xA6, 0xE1, 0xB8, 0xA8, 0xE1, 0xB8, - 0xAA, 0xE1, 0xB8, 0xAC, 0xE1, 0xB8, 0xAE, 0xE1, - 0xB8, 0xB0, 0xE1, 0xB8, 0xB2, 0xE1, 0xB8, 0xB4, - 0xE1, 0xB8, 0xB6, 0xE1, 0xB8, 0xB8, 0xE1, 0xB8, - 0xBA, 0xE1, 0xB8, 0xBC, 0xE1, 0xB8, 0xBE, 0xE1, - 0xB9, 0x80, 0xE1, 0xB9, 0x82, 0xE1, 0xB9, 0x84, - 0xE1, 0xB9, 0x86, 0xE1, 0xB9, 0x88, 0xE1, 0xB9, - 0x8A, 0xE1, 0xB9, 0x8C, 0xE1, 0xB9, 0x8E, 0xE1, - 0xB9, 0x90, 0xE1, 0xB9, 0x92, 0xE1, 0xB9, 0x94, - 0xE1, 0xB9, 0x96, 0xE1, 0xB9, 0x98, 0xE1, 0xB9, - 0x9A, 0xE1, 0xB9, 0x9C, 0xE1, 0xB9, 0x9E, 0xE1, - 0xB9, 0xA0, 0xE1, 0xB9, 0xA2, 0xE1, 0xB9, 0xA4, - 0xE1, 0xB9, 0xA6, 0xE1, 0xB9, 0xA8, 0xE1, 0xB9, - 0xAA, 0xE1, 0xB9, 0xAC, 0xE1, 0xB9, 0xAE, 0xE1, - 0xB9, 0xB0, 0xE1, 0xB9, 0xB2, 0xE1, 0xB9, 0xB4, - 0xE1, 0xB9, 0xB6, 0xE1, 0xB9, 0xB8, 0xE1, 0xB9, - 0xBA, 0xE1, 0xB9, 0xBC, 0xE1, 0xB9, 0xBE, 0xE1, - 0xBA, 0x80, 0xE1, 0xBA, 0x82, 0xE1, 0xBA, 0x84, - 0xE1, 0xBA, 0x86, 0xE1, 0xBA, 0x88, 0xE1, 0xBA, - 0x8A, 0xE1, 0xBA, 0x8C, 0xE1, 0xBA, 0x8E, 0xE1, - 0xBA, 0x90, 0xE1, 0xBA, 0x92, 0xE1, 0xBA, 0x94, - 0xE1, 0xB9, 0xA0, 0xE1, 0xBA, 0xA0, 0xE1, 0xBA, - 0xA2, 0xE1, 0xBA, 0xA4, 0xE1, 0xBA, 0xA6, 0xE1, - 0xBA, 0xA8, 0xE1, 0xBA, 0xAA, 0xE1, 0xBA, 0xAC, - 0xE1, 0xBA, 0xAE, 0xE1, 0xBA, 0xB0, 0xE1, 0xBA, - 0xB2, 0xE1, 0xBA, 0xB4, 0xE1, 0xBA, 0xB6, 0xE1, - 0xBA, 0xB8, 0xE1, 0xBA, 0xBA, 0xE1, 0xBA, 0xBC, - 0xE1, 0xBA, 0xBE, 0xE1, 0xBB, 0x80, 0xE1, 0xBB, - 0x82, 0xE1, 0xBB, 0x84, 0xE1, 0xBB, 0x86, 0xE1, - 0xBB, 0x88, 0xE1, 0xBB, 0x8A, 0xE1, 0xBB, 0x8C, - 0xE1, 0xBB, 0x8E, 0xE1, 0xBB, 0x90, 0xE1, 0xBB, - 0x92, 0xE1, 0xBB, 0x94, 0xE1, 0xBB, 0x96, 0xE1, - 0xBB, 0x98, 0xE1, 0xBB, 0x9A, 0xE1, 0xBB, 0x9C, - 0xE1, 0xBB, 0x9E, 0xE1, 0xBB, 0xA0, 0xE1, 0xBB, - 0xA2, 0xE1, 0xBB, 0xA4, 0xE1, 0xBB, 0xA6, 0xE1, - 0xBB, 0xA8, 0xE1, 0xBB, 0xAA, 0xE1, 0xBB, 0xAC, - 0xE1, 0xBB, 0xAE, 0xE1, 0xBB, 0xB0, 0xE1, 0xBB, - 0xB2, 0xE1, 0xBB, 0xB4, 0xE1, 0xBB, 0xB6, 0xE1, - 0xBB, 0xB8, 0xE1, 0xBC, 0x88, 0xE1, 0xBC, 0x89, - 0xE1, 0xBC, 0x8A, 0xE1, 0xBC, 0x8B, 0xE1, 0xBC, - 0x8C, 0xE1, 0xBC, 0x8D, 0xE1, 0xBC, 0x8E, 0xE1, - 0xBC, 0x8F, 0xE1, 0xBC, 0x98, 0xE1, 0xBC, 0x99, - 0xE1, 0xBC, 0x9A, 0xE1, 0xBC, 0x9B, 0xE1, 0xBC, - 0x9C, 0xE1, 0xBC, 0x9D, 0xE1, 0xBC, 0xA8, 0xE1, - 0xBC, 0xA9, 0xE1, 0xBC, 0xAA, 0xE1, 0xBC, 0xAB, - 0xE1, 0xBC, 0xAC, 0xE1, 0xBC, 0xAD, 0xE1, 0xBC, - 0xAE, 0xE1, 0xBC, 0xAF, 0xE1, 0xBC, 0xB8, 0xE1, - 0xBC, 0xB9, 0xE1, 0xBC, 0xBA, 0xE1, 0xBC, 0xBB, - 0xE1, 0xBC, 0xBC, 0xE1, 0xBC, 0xBD, 0xE1, 0xBC, - 0xBE, 0xE1, 0xBC, 0xBF, 0xE1, 0xBD, 0x88, 0xE1, - 0xBD, 0x89, 0xE1, 0xBD, 0x8A, 0xE1, 0xBD, 0x8B, - 0xE1, 0xBD, 0x8C, 0xE1, 0xBD, 0x8D, 0xE1, 0xBD, - 0x99, 0xE1, 0xBD, 0x9B, 0xE1, 0xBD, 0x9D, 0xE1, - 0xBD, 0x9F, 0xE1, 0xBD, 0xA8, 0xE1, 0xBD, 0xA9, - 0xE1, 0xBD, 0xAA, 0xE1, 0xBD, 0xAB, 0xE1, 0xBD, - 0xAC, 0xE1, 0xBD, 0xAD, 0xE1, 0xBD, 0xAE, 0xE1, - 0xBD, 0xAF, 0xE1, 0xBE, 0xBA, 0xE1, 0xBE, 0xBB, - 0xE1, 0xBF, 0x88, 0xE1, 0xBF, 0x89, 0xE1, 0xBF, - 0x8A, 0xE1, 0xBF, 0x8B, 0xE1, 0xBF, 0x9A, 0xE1, - 0xBF, 0x9B, 0xE1, 0xBF, 0xB8, 0xE1, 0xBF, 0xB9, - 0xE1, 0xBF, 0xAA, 0xE1, 0xBF, 0xAB, 0xE1, 0xBF, - 0xBA, 0xE1, 0xBF, 0xBB, 0xE1, 0xBE, 0x88, 0xE1, - 0xBE, 0x89, 0xE1, 0xBE, 0x8A, 0xE1, 0xBE, 0x8B, - 0xE1, 0xBE, 0x8C, 0xE1, 0xBE, 0x8D, 0xE1, 0xBE, - 0x8E, 0xE1, 0xBE, 0x8F, 0xE1, 0xBE, 0x98, 0xE1, - 0xBE, 0x99, 0xE1, 0xBE, 0x9A, 0xE1, 0xBE, 0x9B, - 0xE1, 0xBE, 0x9C, 0xE1, 0xBE, 0x9D, 0xE1, 0xBE, - 0x9E, 0xE1, 0xBE, 0x9F, 0xE1, 0xBE, 0xA8, 0xE1, - 0xBE, 0xA9, 0xE1, 0xBE, 0xAA, 0xE1, 0xBE, 0xAB, - 0xE1, 0xBE, 0xAC, 0xE1, 0xBE, 0xAD, 0xE1, 0xBE, - 0xAE, 0xE1, 0xBE, 0xAF, 0xE1, 0xBE, 0xB8, 0xE1, - 0xBE, 0xB9, 0xE1, 0xBE, 0xBC, 0xCE, 0x99, 0xE1, - 0xBF, 0x8C, 0xE1, 0xBF, 0x98, 0xE1, 0xBF, 0x99, - 0xE1, 0xBF, 0xA8, 0xE1, 0xBF, 0xA9, 0xE1, 0xBF, - 0xAC, 0xE1, 0xBF, 0xBC, 0xE2, 0x84, 0xB2, 0xE2, - 0x85, 0xA0, 0xE2, 0x85, 0xA1, 0xE2, 0x85, 0xA2, - 0xE2, 0x85, 0xA3, 0xE2, 0x85, 0xA4, 0xE2, 0x85, - 0xA5, 0xE2, 0x85, 0xA6, 0xE2, 0x85, 0xA7, 0xE2, - 0x85, 0xA8, 0xE2, 0x85, 0xA9, 0xE2, 0x85, 0xAA, - 0xE2, 0x85, 0xAB, 0xE2, 0x85, 0xAC, 0xE2, 0x85, - 0xAD, 0xE2, 0x85, 0xAE, 0xE2, 0x85, 0xAF, 0xE2, - 0x86, 0x83, 0xE2, 0x92, 0xB6, 0xE2, 0x92, 0xB7, - 0xE2, 0x92, 0xB8, 0xE2, 0x92, 0xB9, 0xE2, 0x92, - 0xBA, 0xE2, 0x92, 0xBB, 0xE2, 0x92, 0xBC, 0xE2, - 0x92, 0xBD, 0xE2, 0x92, 0xBE, 0xE2, 0x92, 0xBF, - 0xE2, 0x93, 0x80, 0xE2, 0x93, 0x81, 0xE2, 0x93, - 0x82, 0xE2, 0x93, 0x83, 0xE2, 0x93, 0x84, 0xE2, - 0x93, 0x85, 0xE2, 0x93, 0x86, 0xE2, 0x93, 0x87, - 0xE2, 0x93, 0x88, 0xE2, 0x93, 0x89, 0xE2, 0x93, - 0x8A, 0xE2, 0x93, 0x8B, 0xE2, 0x93, 0x8C, 0xE2, - 0x93, 0x8D, 0xE2, 0x93, 0x8E, 0xE2, 0x93, 0x8F, - 0xE2, 0xB0, 0x80, 0xE2, 0xB0, 0x81, 0xE2, 0xB0, - 0x82, 0xE2, 0xB0, 0x83, 0xE2, 0xB0, 0x84, 0xE2, - 0xB0, 0x85, 0xE2, 0xB0, 0x86, 0xE2, 0xB0, 0x87, - 0xE2, 0xB0, 0x88, 0xE2, 0xB0, 0x89, 0xE2, 0xB0, - 0x8A, 0xE2, 0xB0, 0x8B, 0xE2, 0xB0, 0x8C, 0xE2, - 0xB0, 0x8D, 0xE2, 0xB0, 0x8E, 0xE2, 0xB0, 0x8F, - 0xE2, 0xB0, 0x90, 0xE2, 0xB0, 0x91, 0xE2, 0xB0, - 0x92, 0xE2, 0xB0, 0x93, 0xE2, 0xB0, 0x94, 0xE2, - 0xB0, 0x95, 0xE2, 0xB0, 0x96, 0xE2, 0xB0, 0x97, - 0xE2, 0xB0, 0x98, 0xE2, 0xB0, 0x99, 0xE2, 0xB0, - 0x9A, 0xE2, 0xB0, 0x9B, 0xE2, 0xB0, 0x9C, 0xE2, - 0xB0, 0x9D, 0xE2, 0xB0, 0x9E, 0xE2, 0xB0, 0x9F, - 0xE2, 0xB0, 0xA0, 0xE2, 0xB0, 0xA1, 0xE2, 0xB0, - 0xA2, 0xE2, 0xB0, 0xA3, 0xE2, 0xB0, 0xA4, 0xE2, - 0xB0, 0xA5, 0xE2, 0xB0, 0xA6, 0xE2, 0xB0, 0xA7, - 0xE2, 0xB0, 0xA8, 0xE2, 0xB0, 0xA9, 0xE2, 0xB0, - 0xAA, 0xE2, 0xB0, 0xAB, 0xE2, 0xB0, 0xAC, 0xE2, - 0xB0, 0xAD, 0xE2, 0xB0, 0xAE, 0xE2, 0xB1, 0xA0, - 0xC8, 0xBA, 0xC8, 0xBE, 0xE2, 0xB1, 0xA7, 0xE2, - 0xB1, 0xA9, 0xE2, 0xB1, 0xAB, 0xE2, 0xB1, 0xB5, - 0xE2, 0xB2, 0x80, 0xE2, 0xB2, 0x82, 0xE2, 0xB2, - 0x84, 0xE2, 0xB2, 0x86, 0xE2, 0xB2, 0x88, 0xE2, - 0xB2, 0x8A, 0xE2, 0xB2, 0x8C, 0xE2, 0xB2, 0x8E, - 0xE2, 0xB2, 0x90, 0xE2, 0xB2, 0x92, 0xE2, 0xB2, - 0x94, 0xE2, 0xB2, 0x96, 0xE2, 0xB2, 0x98, 0xE2, - 0xB2, 0x9A, 0xE2, 0xB2, 0x9C, 0xE2, 0xB2, 0x9E, - 0xE2, 0xB2, 0xA0, 0xE2, 0xB2, 0xA2, 0xE2, 0xB2, - 0xA4, 0xE2, 0xB2, 0xA6, 0xE2, 0xB2, 0xA8, 0xE2, - 0xB2, 0xAA, 0xE2, 0xB2, 0xAC, 0xE2, 0xB2, 0xAE, - 0xE2, 0xB2, 0xB0, 0xE2, 0xB2, 0xB2, 0xE2, 0xB2, - 0xB4, 0xE2, 0xB2, 0xB6, 0xE2, 0xB2, 0xB8, 0xE2, - 0xB2, 0xBA, 0xE2, 0xB2, 0xBC, 0xE2, 0xB2, 0xBE, - 0xE2, 0xB3, 0x80, 0xE2, 0xB3, 0x82, 0xE2, 0xB3, - 0x84, 0xE2, 0xB3, 0x86, 0xE2, 0xB3, 0x88, 0xE2, - 0xB3, 0x8A, 0xE2, 0xB3, 0x8C, 0xE2, 0xB3, 0x8E, - 0xE2, 0xB3, 0x90, 0xE2, 0xB3, 0x92, 0xE2, 0xB3, - 0x94, 0xE2, 0xB3, 0x96, 0xE2, 0xB3, 0x98, 0xE2, - 0xB3, 0x9A, 0xE2, 0xB3, 0x9C, 0xE2, 0xB3, 0x9E, - 0xE2, 0xB3, 0xA0, 0xE2, 0xB3, 0xA2, 0xE1, 0x82, - 0xA0, 0xE1, 0x82, 0xA1, 0xE1, 0x82, 0xA2, 0xE1, - 0x82, 0xA3, 0xE1, 0x82, 0xA4, 0xE1, 0x82, 0xA5, - 0xE1, 0x82, 0xA6, 0xE1, 0x82, 0xA7, 0xE1, 0x82, - 0xA8, 0xE1, 0x82, 0xA9, 0xE1, 0x82, 0xAA, 0xE1, - 0x82, 0xAB, 0xE1, 0x82, 0xAC, 0xE1, 0x82, 0xAD, - 0xE1, 0x82, 0xAE, 0xE1, 0x82, 0xAF, 0xE1, 0x82, - 0xB0, 0xE1, 0x82, 0xB1, 0xE1, 0x82, 0xB2, 0xE1, - 0x82, 0xB3, 0xE1, 0x82, 0xB4, 0xE1, 0x82, 0xB5, - 0xE1, 0x82, 0xB6, 0xE1, 0x82, 0xB7, 0xE1, 0x82, - 0xB8, 0xE1, 0x82, 0xB9, 0xE1, 0x82, 0xBA, 0xE1, - 0x82, 0xBB, 0xE1, 0x82, 0xBC, 0xE1, 0x82, 0xBD, - 0xE1, 0x82, 0xBE, 0xE1, 0x82, 0xBF, 0xE1, 0x83, - 0x80, 0xE1, 0x83, 0x81, 0xE1, 0x83, 0x82, 0xE1, - 0x83, 0x83, 0xE1, 0x83, 0x84, 0xE1, 0x83, 0x85, - 0xEF, 0xBC, 0xA1, 0xEF, 0xBC, 0xA2, 0xEF, 0xBC, - 0xA3, 0xEF, 0xBC, 0xA4, 0xEF, 0xBC, 0xA5, 0xEF, - 0xBC, 0xA6, 0xEF, 0xBC, 0xA7, 0xEF, 0xBC, 0xA8, - 0xEF, 0xBC, 0xA9, 0xEF, 0xBC, 0xAA, 0xEF, 0xBC, - 0xAB, 0xEF, 0xBC, 0xAC, 0xEF, 0xBC, 0xAD, 0xEF, - 0xBC, 0xAE, 0xEF, 0xBC, 0xAF, 0xEF, 0xBC, 0xB0, - 0xEF, 0xBC, 0xB1, 0xEF, 0xBC, 0xB2, 0xEF, 0xBC, - 0xB3, 0xEF, 0xBC, 0xB4, 0xEF, 0xBC, 0xB5, 0xEF, - 0xBC, 0xB6, 0xEF, 0xBC, 0xB7, 0xEF, 0xBC, 0xB8, - 0xEF, 0xBC, 0xB9, 0xEF, 0xBC, 0xBA, 0xF0, 0x90, - 0x90, 0x80, 0xF0, 0x90, 0x90, 0x81, 0xF0, 0x90, - 0x90, 0x82, 0xF0, 0x90, 0x90, 0x83, 0xF0, 0x90, - 0x90, 0x84, 0xF0, 0x90, 0x90, 0x85, 0xF0, 0x90, - 0x90, 0x86, 0xF0, 0x90, 0x90, 0x87, 0xF0, 0x90, - 0x90, 0x88, 0xF0, 0x90, 0x90, 0x89, 0xF0, 0x90, - 0x90, 0x8A, 0xF0, 0x90, 0x90, 0x8B, 0xF0, 0x90, - 0x90, 0x8C, 0xF0, 0x90, 0x90, 0x8D, 0xF0, 0x90, - 0x90, 0x8E, 0xF0, 0x90, 0x90, 0x8F, 0xF0, 0x90, - 0x90, 0x90, 0xF0, 0x90, 0x90, 0x91, 0xF0, 0x90, - 0x90, 0x92, 0xF0, 0x90, 0x90, 0x93, 0xF0, 0x90, - 0x90, 0x94, 0xF0, 0x90, 0x90, 0x95, 0xF0, 0x90, - 0x90, 0x96, 0xF0, 0x90, 0x90, 0x97, 0xF0, 0x90, - 0x90, 0x98, 0xF0, 0x90, 0x90, 0x99, 0xF0, 0x90, - 0x90, 0x9A, 0xF0, 0x90, 0x90, 0x9B, 0xF0, 0x90, - 0x90, 0x9C, 0xF0, 0x90, 0x90, 0x9D, 0xF0, 0x90, - 0x90, 0x9E, 0xF0, 0x90, 0x90, 0x9F, 0xF0, 0x90, - 0x90, 0xA0, 0xF0, 0x90, 0x90, 0xA1, 0xF0, 0x90, - 0x90, 0xA2, 0xF0, 0x90, 0x90, 0xA3, 0xF0, 0x90, - 0x90, 0xA4, 0xF0, 0x90, 0x90, 0xA5, 0xF0, 0x90, - 0x90, 0xA6, 0xF0, 0x90, 0x90, 0xA7, - }, -}; - -#undef N_ -#undef FIL_ - -#ifdef __cplusplus -} -#endif - -#endif /* HAVE_UNICODE */ - -#endif /* _SYS_U8_TEXTPREP_DATA_H */ diff --git a/include/sys/uio.h b/include/sys/uio.h index 6da4d34ed..0ef7aab63 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -1,11 +1,46 @@ #ifndef _SPL_UIO_H #define _SPL_UIO_H +#include +#include +#include + typedef enum uio_rw { UIO_READ = 0, UIO_WRITE = 1, } uio_rw_t; -#define UIO_SYSSPACE 1 +typedef enum uio_seg { + UIO_USERSPACE = 0, + UIO_SYSSPACE = 1, + UIO_USERISPACE =2, +} uio_seg_t; + +typedef struct uio { + struct iovec *uio_iov; /* pointer to array of iovecs */ + int uio_iovcnt; /* number of iovecs */ + offset_t uio_loffset; /* file offset */ + uio_seg_t uio_segflg; /* address space (kernel or user) */ + uint16_t uio_fmode; /* file mode flags */ + uint16_t uio_extflg; /* extended flags */ + offset_t uio_limit; /* u-limit (maximum byte offset) */ + ssize_t uio_resid; /* residual count */ +} uio_t; + +typedef struct aio_req { + uio_t *aio_uio; /* UIO for this request */ + void *aio_private; +} aio_req_t; + +/* XXX: Must be fully implemented when ZVOL is needed, for reference: + * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/move.c + */ +#if 0 +static __inline__ int +uiomove(void *p, size_t n, enum uio_rw rw, struct uio *uio) +{ + return 0; +} +#endif #endif /* SPL_UIO_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index af678eccc..6a1ba0a25 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -130,15 +130,15 @@ typedef struct vsecattr { size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ } vsecattr_t; -extern int vn_open(const char *path, int seg, int flags, int mode, +extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2); -extern int vn_openat(const char *path, int seg, int flags, int mode, +extern int vn_openat(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd); extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, - offset_t off, int seg, int x1, rlim64_t x2, + offset_t off, uio_seg_t seg, int x1, rlim64_t x2, void *x3, ssize_t *residp); extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4); -extern int vn_remove(const char *path, int seg, int flags); +extern int vn_remove(const char *path, uio_seg_t seg, int flags); extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); From 8ddd0ee4154e7e785f07400c113c7465906c97b9 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 13 Mar 2008 20:41:29 +0000 Subject: [PATCH 0043/1062] Add two more missing headers git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@43 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/resource.h | 6 ++++++ include/sys/stat.h | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 include/sys/resource.h create mode 100644 include/sys/stat.h diff --git a/include/sys/resource.h b/include/sys/resource.h new file mode 100644 index 000000000..6488794ff --- /dev/null +++ b/include/sys/resource.h @@ -0,0 +1,6 @@ +#ifndef _SPL_RESOURCE_H +#define _SPL_RESOURCE_H + +#include + +#endif /* SPL_RESOURCE_H */ diff --git a/include/sys/stat.h b/include/sys/stat.h new file mode 100644 index 000000000..7f67064ba --- /dev/null +++ b/include/sys/stat.h @@ -0,0 +1,6 @@ +#ifndef _SPL_STAT_H +#define _SPL_STAT_H + +#include + +#endif /* SPL_STAT_H */ From ea19fbed0538d0e13549ff9753533fe4f9edeffd Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 13 Mar 2008 22:52:23 +0000 Subject: [PATCH 0044/1062] Add missing headers git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@44 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/sunldi.h | 9 +++++++++ include/util/qsort.h | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 include/sys/sunldi.h create mode 100644 include/util/qsort.h diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h new file mode 100644 index 000000000..01e80b54f --- /dev/null +++ b/include/sys/sunldi.h @@ -0,0 +1,9 @@ +#ifndef _SPL_SUNLDI_H +#define _SPL_SUNLDI_H + +/* XXX: ALL TOTALLY BOGUS, JUST PLACE HOLDERS */ +typedef int ddi_devid_t; +typedef int ldi_handle_t; +typedef int ldi_ident_t; + +#endif /* SPL_SUNLDI_H */ diff --git a/include/util/qsort.h b/include/util/qsort.h new file mode 100644 index 000000000..f7bb26847 --- /dev/null +++ b/include/util/qsort.h @@ -0,0 +1,8 @@ +#ifndef _SPL_QSORT_H +#define _SPL_QSORT_H + +#include + +#define qsort(base, num, size, cmp) sort(base, num, size, cmp, NULL) + +#endif /* SPL_QSORT_H */ From af828292e585781b2e186f47074a3e1a3baa5094 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 14 Mar 2008 00:04:01 +0000 Subject: [PATCH 0045/1062] Add missing headers Rework vnodes to be based on the slab cache, just like on Solaris. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@45 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- FIXME | 2 -- include/fs/fs_subr.h | 4 +++ include/sys/file.h | 4 +++ include/sys/mkdev.h | 4 +++ include/sys/mntent.h | 4 +++ include/sys/mode.h | 4 +++ include/sys/pathname.h | 11 ++++++ include/sys/unistd.h | 4 +++ include/sys/vfs_opreg.h | 4 +++ include/sys/vmsystm.h | 3 ++ include/sys/vnode.h | 24 +++++++++++--- include/vm/anon.h | 6 ++-- include/vm/pvn.h | 4 +++ modules/spl/spl-generic.c | 13 ++++++++ modules/spl/spl-vnode.c | 70 +++++++++++++++++++++++++++++++++++---- 15 files changed, 145 insertions(+), 16 deletions(-) create mode 100644 include/fs/fs_subr.h create mode 100644 include/sys/file.h create mode 100644 include/sys/mkdev.h create mode 100644 include/sys/mntent.h create mode 100644 include/sys/mode.h create mode 100644 include/sys/pathname.h create mode 100644 include/sys/unistd.h create mode 100644 include/sys/vfs_opreg.h create mode 100644 include/vm/pvn.h diff --git a/FIXME b/FIXME index 887616efb..0785df5f8 100644 --- a/FIXME +++ b/FIXME @@ -6,8 +6,6 @@ sys/dkio.h - All borrowed from libsolcompat sys/dklabel.h - All borrowed from libsolcompat sys/types32.h - All borrowed from libsolcompat sys/isa_defs.h - AlL borrowed from libsolcompat -sys/u8_textprep.h - AlL borrowed from libsolcompat -sys/u8_textprep_data - AlL borrowed from libsolcompat sys/acl.h _ All borrowed from libsolcompat sys/acl_impl.h _ All borrowed from libsolcompat diff --git a/include/fs/fs_subr.h b/include/fs/fs_subr.h new file mode 100644 index 000000000..2a7307638 --- /dev/null +++ b/include/fs/fs_subr.h @@ -0,0 +1,4 @@ +#ifndef _SPL_FS_FS_SUBR_H +#define _SPL_FS_FS_SUBR_H + +#endif /* SPL_FS_FS_SUBR_H */ diff --git a/include/sys/file.h b/include/sys/file.h new file mode 100644 index 000000000..63d662237 --- /dev/null +++ b/include/sys/file.h @@ -0,0 +1,4 @@ +#ifndef _SPL_FILE_H +#define _SPL_FILE_H + +#endif /* SPL_FILE_H */ diff --git a/include/sys/mkdev.h b/include/sys/mkdev.h new file mode 100644 index 000000000..f92ad08fa --- /dev/null +++ b/include/sys/mkdev.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MKDEV_H +#define _SPL_MKDEV_H + +#endif /* SPL_MKDEV_H */ diff --git a/include/sys/mntent.h b/include/sys/mntent.h new file mode 100644 index 000000000..b124e342b --- /dev/null +++ b/include/sys/mntent.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MNTENT_H +#define _SPL_MNTENT_H + +#endif /* SPL_MNTENT_H */ diff --git a/include/sys/mode.h b/include/sys/mode.h new file mode 100644 index 000000000..7ca1b4889 --- /dev/null +++ b/include/sys/mode.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MODE_H +#define _SPL_MODE_H + +#endif /* SPL_MODE_H */ diff --git a/include/sys/pathname.h b/include/sys/pathname.h new file mode 100644 index 000000000..ffdf585b8 --- /dev/null +++ b/include/sys/pathname.h @@ -0,0 +1,11 @@ +#ifndef _SPL_PATHNAME_H +#define _SPL_PATHNAME_H + +typedef struct pathname { + char *pn_buf; /* underlying storage */ + char *pn_path; /* remaining pathname */ + size_t pn_pathlen; /* remaining length */ + size_t pn_bufsize; /* total size of pn_buf */ +} pathname_t; + +#endif /* SPL_PATHNAME_H */ diff --git a/include/sys/unistd.h b/include/sys/unistd.h new file mode 100644 index 000000000..c6b298a34 --- /dev/null +++ b/include/sys/unistd.h @@ -0,0 +1,4 @@ +#ifndef _SPL_UNISTD_H +#define _SPL_UNISTD_H + +#endif /* SPL_UNISTD_H */ diff --git a/include/sys/vfs_opreg.h b/include/sys/vfs_opreg.h new file mode 100644 index 000000000..8f3f556cb --- /dev/null +++ b/include/sys/vfs_opreg.h @@ -0,0 +1,4 @@ +#ifndef _SPL_OPREG_H +#define _SPL_OPREG_H + +#endif /* SPL_OPREG_H */ diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index bb23da965..443c376c9 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -2,6 +2,9 @@ #define _SPL_VMSYSTM_H #include +#include + +extern vmem_t *zio_alloc_arena; /* arena for zio caches */ #define physmem num_physpages #define ptob(pages) (pages * PAGE_SIZE) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 6a1ba0a25..3ec11abe2 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include @@ -72,11 +74,6 @@ typedef enum vtype { VBAD = 11 } vtype_t; -typedef struct vnode { - struct file *v_fp; - vtype_t v_type; -} vnode_t; - typedef struct vattr { enum vtype va_type; /* vnode type */ u_int va_mask; /* attribute bit-mask */ @@ -130,6 +127,20 @@ typedef struct vsecattr { size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ } vsecattr_t; +typedef struct vnode { + struct file *v_fp; + kmutex_t v_lock; /* protects vnode fields */ + uint_t v_flag; /* vnode flags (see below) */ + uint_t v_count; /* reference count */ + void *v_data; /* private data for fs */ + struct vfs *v_vfsp; /* ptr to containing VFS */ + struct stdata *v_stream; /* associated stream */ + enum vtype v_type; /* vnode type */ + dev_t v_rdev; /* device (VCHR, VBLK) */ +} vnode_t; + +extern vnode_t *vn_alloc(int flag); +void vn_free(vnode_t *vp); extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2); extern int vn_openat(const char *path, uio_seg_t seg, int flags, int mode, @@ -143,6 +154,9 @@ extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); +int vn_init(void); +void vn_fini(void); + static __inline__ int vn_rele(vnode_t *vp) { diff --git a/include/vm/anon.h b/include/vm/anon.h index 81c585a6a..0198e729e 100644 --- a/include/vm/anon.h +++ b/include/vm/anon.h @@ -1,4 +1,4 @@ -#ifndef _SPL_ANON_H -#define _SPL_ANON_H +#ifndef _SPL_VM_ANON_H +#define _SPL_VM_ANON_H -#endif /* SPL_ANON_H */ +#endif /* SPL_VM_ANON_H */ diff --git a/include/vm/pvn.h b/include/vm/pvn.h new file mode 100644 index 000000000..e89ee1748 --- /dev/null +++ b/include/vm/pvn.h @@ -0,0 +1,4 @@ +#ifndef _SPL_VM_PVN_H +#define _SPL_VM_PVN_H + +#endif /* SPL_VM_PVN_H */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 52d06b827..cae4223f3 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -1,4 +1,6 @@ #include +#include +#include #include "config.h" /* @@ -11,6 +13,9 @@ EXPORT_SYMBOL(p0); char hw_serial[11]; EXPORT_SYMBOL(hw_serial); +vmem_t *zio_alloc_arena = NULL; +EXPORT_SYMBOL(zio_alloc_arena); + int highbit(unsigned long i) { @@ -52,13 +57,21 @@ EXPORT_SYMBOL(ddi_strtoul); static int __init spl_init(void) { + int rc; + + rc = vn_init(); + if (rc) + return rc; + strcpy(hw_serial, "007f0100"); /* loopback */ printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); + return 0; } static void spl_fini(void) { + vn_fini(); return; } diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 0ec53e73e..5776de6dd 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -5,6 +5,8 @@ void *rootdir = NULL; EXPORT_SYMBOL(rootdir); +kmem_cache_t *vn_cache; + static vtype_t vn_get_sol_type(umode_t mode) { @@ -35,8 +37,31 @@ vn_get_sol_type(umode_t mode) return VNON; } /* vn_get_sol_type() */ +vnode_t * +vn_alloc(int flag) +{ + vnode_t *vp; + + vp = kmem_cache_alloc(vn_cache, flag); + + if (vp != NULL) { + vp->v_fp = NULL; + vp->v_type = 0; + } + + return (vp); +} /* vn_alloc() */ +EXPORT_SYMBOL(vn_alloc); + +void +vn_free(vnode_t *vp) +{ + kmem_cache_free(vn_cache, vp); +} /* vn_free() */ +EXPORT_SYMBOL(vn_free); + int -vn_open(const char *path, int seg, int flags, int mode, +vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2) { struct file *fp; @@ -76,7 +101,7 @@ vn_open(const char *path, int seg, int flags, int mode, return rc; } - vp = kmalloc(sizeof(vnode_t), GFP_ATOMIC); + vp = vn_alloc(KM_SLEEP); if (!vp) { filp_close(fp, 0); return -ENOMEM; @@ -91,7 +116,7 @@ vn_open(const char *path, int seg, int flags, int mode, EXPORT_SYMBOL(vn_open); int -vn_openat(const char *path, int seg, int flags, int mode, +vn_openat(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd) { char *realpath; @@ -114,7 +139,7 @@ EXPORT_SYMBOL(vn_openat); int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, - int seg, int x1, rlim64_t x2, void *x3, ssize_t *residp) + uio_seg_t seg, int x1, rlim64_t x2, void *x3, ssize_t *residp) { loff_t offset; mm_segment_t saved_fs; @@ -167,7 +192,7 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) BUG_ON(!vp->v_fp); rc = filp_close(vp->v_fp, 0); - kfree(vp); + vn_free(vp); return rc; } /* vn_close() */ @@ -180,7 +205,7 @@ static struct dentry *lookup_hash(struct nameidata *nd) /* Modified do_unlinkat() from linux/fs/namei.c, only uses exported symbols */ int -vn_remove(const char *path, int seg, int flags) +vn_remove(const char *path, uio_seg_t seg, int flags) { struct dentry *dentry; struct nameidata nd; @@ -364,3 +389,36 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) return file_fsync(vp->v_fp, vp->v_fp->f_dentry, datasync); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); + +static int +vn_cache_constructor(void *buf, void *cdrarg, int kmflags) +{ + struct vnode *vp = buf; + + mutex_init(&vp->v_lock, NULL, MUTEX_DEFAULT, NULL); + + return (0); +} /* vn_cache_constructor() */ + +static void +vn_cache_destructor(void *buf, void *cdrarg) +{ + struct vnode *vp = buf; + + mutex_destroy(&vp->v_lock); +} /* vn_cache_destructor() */ + +int +vn_init(void) +{ + vn_cache = kmem_cache_create("vn_cache", sizeof(struct vnode), 64, + vn_cache_constructor, vn_cache_destructor, + NULL, NULL, NULL, 0); + return 0; +} /* vn_init() */ + +void +vn_fini(void) +{ + kmem_cache_destroy(vn_cache); +} /* vn_fini() */ From 79b31f3601af530f64b3f2ae87233b3fa5271df1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 14 Mar 2008 19:04:41 +0000 Subject: [PATCH 0046/1062] Fix KMEM_DEBUG support (enable by default) Add vmem_alloc/vmem_free support (and test case) Add missing time functions git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@46 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- FIXME | 2 ++ include/sys/kmem.h | 48 ++++++++++++++++++++++++++++++++------ include/sys/time.h | 43 ++++++++++++++++++++-------------- include/sys/types.h | 1 + modules/spl/spl-kmem.c | 7 ++++++ modules/spl/spl-time.c | 28 +++++++++++++++++++++- modules/splat/splat-kmem.c | 45 +++++++++++++++++++++++++++++++++-- 7 files changed, 146 insertions(+), 28 deletions(-) diff --git a/FIXME b/FIXME index 0785df5f8..bba628c45 100644 --- a/FIXME +++ b/FIXME @@ -10,3 +10,5 @@ sys/acl.h _ All borrowed from libsolcompat sys/acl_impl.h _ All borrowed from libsolcompat * Implement solaris style atomic interfaces + +* Fully implement vnode support for ZPL layer to intergrate with VFS. diff --git a/include/sys/kmem.h b/include/sys/kmem.h index c5e559cbd..2560b380a 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -5,11 +5,12 @@ extern "C" { #endif -#undef DEBUG_KMEM +#define DEBUG_KMEM #undef DEBUG_KMEM_UNIMPLEMENTED #include #include +#include #include #include /* @@ -23,12 +24,11 @@ extern "C" { #define KM_FLAGS __GFP_BITS_MASK #ifdef DEBUG_KMEM -/* Shim layer memory accounting */ extern atomic_t kmem_alloc_used; extern unsigned int kmem_alloc_max; -#endif +extern atomic_t vmem_alloc_used; +extern unsigned int vmem_alloc_max; -#ifdef DEBUG_KMEM #define __kmem_alloc(size, flags, allocator) \ ({ void *_ptr_; \ \ @@ -58,13 +58,40 @@ extern unsigned int kmem_alloc_max; #define kmem_free(ptr, size) \ ({ \ - BUG_ON(!ptr || size < 0); \ + BUG_ON(!(ptr) || (size) < 0); \ atomic_sub((size), &kmem_alloc_used); \ memset(ptr, 0x5a, (size)); /* Poison */ \ kfree(ptr); \ - (ptr) = (void *)0xdeadbeef; \ }) +#define __vmem_alloc(size, flags) \ +({ void *_ptr_; \ + \ + BUG_ON(flags != KM_SLEEP); \ + \ + _ptr_ = (void *)vmalloc((size)); \ + if (_ptr_ == NULL) { \ + printk("Warning: vmem_alloc(%d, 0x%x) failed at %s:%d " \ + "(%d/%d)\n", (int)(size), (int)(flags), \ + __FILE__, __LINE__, \ + atomic_read(&vmem_alloc_used), vmem_alloc_max); \ + atomic_add((size), &vmem_alloc_used); \ + if (unlikely(atomic_read(&vmem_alloc_used) > vmem_alloc_max)) \ + vmem_alloc_max = atomic_read(&vmem_alloc_used); \ + } \ + \ + _ptr_; \ +}) + +#define vmem_alloc(size, flags) __vmem_alloc(size, flags) + +#define vmem_free(ptr, size) \ +({ \ + BUG_ON(!(ptr) || (size) < 0); \ + atomic_sub((size), &vmem_alloc_used); \ + memset(ptr, 0x5a, (size)); /* Poison */ \ + vfree(ptr); \ +}) #else @@ -72,10 +99,17 @@ extern unsigned int kmem_alloc_max; #define kmem_zalloc(size, flags) kzalloc(size, flags) #define kmem_free(ptr, size) \ ({ \ - BUG_ON(!ptr || size < 0); \ + BUG_ON(!(ptr) || (size) < 0); \ kfree(ptr); \ }) +#define vmem_alloc(size, flags) vmalloc(size) +#define vmem_free(ptr, size) \ +({ \ + BUG_ON(!(ptr) || (size) < 0); \ + vfree(ptr); \ +}) + #endif /* DEBUG_KMEM */ diff --git a/include/sys/time.h b/include/sys/time.h index 297e6ff74..2f03203e6 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -14,11 +14,6 @@ extern "C" { #include #include -extern unsigned long long monotonic_clock(void); -extern void __gethrestime(timestruc_t *); - -#define gethrestime(ts) __gethrestime(ts) - #define TIME32_MAX INT32_MAX #define TIME32_MIN INT32_MIN @@ -27,12 +22,37 @@ extern void __gethrestime(timestruc_t *); #define MICROSEC 1000000 #define NANOSEC 1000000000 +/* Already defined in include/linux/time.h */ +#undef CLOCK_THREAD_CPUTIME_ID +#undef CLOCK_REALTIME +#undef CLOCK_MONOTONIC +#undef CLOCK_PROCESS_CPUTIME_ID + +typedef enum clock_type { + __CLOCK_REALTIME0 = 0, /* obsolete; same as CLOCK_REALTIME */ + CLOCK_VIRTUAL = 1, /* thread's user-level CPU clock */ + CLOCK_THREAD_CPUTIME_ID = 2, /* thread's user+system CPU clock */ + CLOCK_REALTIME = 3, /* wall clock */ + CLOCK_MONOTONIC = 4, /* high resolution monotonic clock */ + CLOCK_PROCESS_CPUTIME_ID = 5, /* process's user+system CPU clock */ + CLOCK_HIGHRES = CLOCK_MONOTONIC, /* alternate name */ + CLOCK_PROF = CLOCK_THREAD_CPUTIME_ID,/* alternate name */ +} clock_type_t; + #define hz \ ({ \ BUG_ON(HZ < 100 || HZ > MICROSEC); \ HZ; \ }) +extern void __gethrestime(timestruc_t *); +extern int __clock_gettime(clock_type_t, timespec_t *); +extern hrtime_t __gethrtime(void); + +#define gethrestime(ts) __gethrestime(ts) +#define clock_gettime(fl, tp) __clock_gettime(fl, tp) +#define gethrtime() __gethrtime() + static __inline__ time_t gethrestime_sec(void) { @@ -42,19 +62,6 @@ gethrestime_sec(void) return now.tv_sec; } -static __inline__ hrtime_t -gethrtime(void) { - /* BUG_ON(cur_timer == timer_none); */ - - /* Solaris expects a long long here but monotonic_clock() returns an - * unsigned long long. Note that monotonic_clock() returns the number - * of nanoseconds passed since kernel initialization. Even for a signed - * long long this will not "go negative" for ~292 years. - */ - return monotonic_clock(); -} - - #ifdef __cplusplus } #endif diff --git a/include/sys/types.h b/include/sys/types.h index 53ba29687..dc660a761 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -23,6 +23,7 @@ typedef struct task_struct kthread_t; typedef struct vmem { } vmem_t; typedef short pri_t; typedef struct timespec timestruc_t; /* definition per SVr4 */ +typedef struct timespec timespec_t; typedef longlong_t hrtime_t; typedef unsigned short ushort_t; typedef u_longlong_t len_t; diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 6442d5824..d3cb2c93a 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -7,6 +7,13 @@ /* Shim layer memory accounting */ atomic_t kmem_alloc_used; unsigned int kmem_alloc_max; +atomic_t vmem_alloc_used; +unsigned int vmem_alloc_max; + +EXPORT_SYMBOL(kmem_alloc_used); +EXPORT_SYMBOL(kmem_alloc_max); +EXPORT_SYMBOL(vmem_alloc_used); +EXPORT_SYMBOL(vmem_alloc_max); #endif /* diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index f0ec4c5a0..64b7f9912 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -7,5 +7,31 @@ __gethrestime(timestruc_t *ts) { getnstimeofday((struct timespec *)ts); } - EXPORT_SYMBOL(__gethrestime); + +int +__clock_gettime(clock_type_t type, timespec_t *tp) +{ + /* Only support CLOCK_REALTIME+__CLOCK_REALTIME0 for now */ + BUG_ON(!((type == CLOCK_REALTIME) || (type == __CLOCK_REALTIME0))); + + getnstimeofday(tp); + return 0; +} +EXPORT_SYMBOL(__clock_gettime); + +/* This function may not be as fast as using monotonic_clock() but it + * should be much more portable, if performance becomes as issue we can + * look at using monotonic_clock() for x86_64 and x86 arches. + */ +hrtime_t +__gethrtime(void) { + timespec_t tv; + hrtime_t rc; + + do_posix_clock_monotonic_gettime(&tv); + rc = (NSEC_PER_SEC * (hrtime_t)tv.tv_sec) + (hrtime_t)tv.tv_nsec; + + return rc; +} +EXPORT_SYMBOL(__gethrtime); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 4b798df38..7115ca42c 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -20,7 +20,13 @@ #define SPLAT_KMEM_TEST4_NAME "slab_reap" #define SPLAT_KMEM_TEST4_DESC "Slab reaping test" +#define SPLAT_KMEM_TEST5_ID 0x0105 +#define SPLAT_KMEM_TEST5_NAME "vmem_alloc" +#define SPLAT_KMEM_TEST5_DESC "Memory allocation test (vmem_alloc)" + #define SPLAT_KMEM_ALLOC_COUNT 10 +#define SPLAT_VMEM_ALLOC_COUNT 10 + /* XXX - This test may fail under tight memory conditions */ static int splat_kmem_test1(struct file *file, void *arg) @@ -29,7 +35,7 @@ splat_kmem_test1(struct file *file, void *arg) int size = PAGE_SIZE; int i, count, rc = 0; - while ((!rc) && (size < (PAGE_SIZE * 16))) { + while ((!rc) && (size <= (PAGE_SIZE * 32))) { count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { @@ -61,7 +67,7 @@ splat_kmem_test2(struct file *file, void *arg) int size = PAGE_SIZE; int i, j, count, rc = 0; - while ((!rc) && (size < (PAGE_SIZE * 16))) { + while ((!rc) && (size <= (PAGE_SIZE * 32))) { count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { @@ -317,6 +323,38 @@ splat_kmem_test4(struct file *file, void *arg) return rc; } +static int +splat_kmem_test5(struct file *file, void *arg) +{ + void *ptr[SPLAT_VMEM_ALLOC_COUNT]; + int size = PAGE_SIZE; + int i, count, rc = 0; + + while ((!rc) && (size <= (PAGE_SIZE * 1024))) { + count = 0; + + for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { + ptr[i] = vmem_alloc(size, KM_SLEEP); + if (ptr[i]) + count++; + } + + for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) + if (ptr[i]) + vmem_free(ptr[i], size); + + splat_vprint(file, SPLAT_KMEM_TEST5_NAME, + "%d byte allocations, %d/%d successful\n", + size, count, SPLAT_VMEM_ALLOC_COUNT); + if (count != SPLAT_VMEM_ALLOC_COUNT) + rc = -ENOMEM; + + size *= 2; + } + + return rc; +} + splat_subsystem_t * splat_kmem_init(void) { @@ -342,6 +380,8 @@ splat_kmem_init(void) SPLAT_KMEM_TEST3_ID, splat_kmem_test3); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST4_NAME, SPLAT_KMEM_TEST4_DESC, SPLAT_KMEM_TEST4_ID, splat_kmem_test4); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST5_NAME, SPLAT_KMEM_TEST5_DESC, + SPLAT_KMEM_TEST5_ID, splat_kmem_test5); return sub; } @@ -350,6 +390,7 @@ void splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST4_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST3_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST2_ID); From c19c06f3b05a220cb638050c0e06578a09ad64ad Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 14 Mar 2008 20:56:26 +0000 Subject: [PATCH 0047/1062] Fix kmem memory accounting Adjust kmem slab interface to make a copy of the slab name before passing it on to the linux slab (we free it latter too) git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@47 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 43 +++++++++++++++++++++----------------- modules/spl/spl-generic.c | 17 +++++++++++++++ modules/spl/spl-kmem.c | 26 ++++++++++++++++++----- modules/splat/splat-kmem.c | 12 +++++++++++ 4 files changed, 74 insertions(+), 24 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 2560b380a..cce2a05e7 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -24,30 +24,32 @@ extern "C" { #define KM_FLAGS __GFP_BITS_MASK #ifdef DEBUG_KMEM -extern atomic_t kmem_alloc_used; -extern unsigned int kmem_alloc_max; -extern atomic_t vmem_alloc_used; -extern unsigned int vmem_alloc_max; +extern atomic64_t kmem_alloc_used; +extern unsigned long kmem_alloc_max; +extern atomic64_t vmem_alloc_used; +extern unsigned long vmem_alloc_max; +extern int kmem_warning_flag; #define __kmem_alloc(size, flags, allocator) \ ({ void *_ptr_; \ \ /* Marked unlikely because we should never be doing this */ \ - if (unlikely((size) > (PAGE_SIZE * 2))) \ + if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ printk("Warning: kmem_alloc(%d, 0x%x) large alloc at %s:%d " \ - "(%d/%d)\n", (int)(size), (int)(flags), \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ - atomic_read(&kmem_alloc_used), kmem_alloc_max); \ + atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ \ _ptr_ = (void *)allocator((size), (flags)); \ if (_ptr_ == NULL) { \ printk("Warning: kmem_alloc(%d, 0x%x) failed at %s:%d " \ - "(%d/%d)\n", (int)(size), (int)(flags), \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ - atomic_read(&kmem_alloc_used), kmem_alloc_max); \ - atomic_add((size), &kmem_alloc_used); \ - if (unlikely(atomic_read(&kmem_alloc_used) > kmem_alloc_max)) \ - kmem_alloc_max = atomic_read(&kmem_alloc_used); \ + atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ + } else { \ + atomic64_add((size), &kmem_alloc_used); \ + if (unlikely(atomic64_read(&kmem_alloc_used)>kmem_alloc_max)) \ + kmem_alloc_max = atomic64_read(&kmem_alloc_used); \ } \ \ _ptr_; \ @@ -59,7 +61,7 @@ extern unsigned int vmem_alloc_max; #define kmem_free(ptr, size) \ ({ \ BUG_ON(!(ptr) || (size) < 0); \ - atomic_sub((size), &kmem_alloc_used); \ + atomic64_sub((size), &kmem_alloc_used); \ memset(ptr, 0x5a, (size)); /* Poison */ \ kfree(ptr); \ }) @@ -72,12 +74,13 @@ extern unsigned int vmem_alloc_max; _ptr_ = (void *)vmalloc((size)); \ if (_ptr_ == NULL) { \ printk("Warning: vmem_alloc(%d, 0x%x) failed at %s:%d " \ - "(%d/%d)\n", (int)(size), (int)(flags), \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ - atomic_read(&vmem_alloc_used), vmem_alloc_max); \ - atomic_add((size), &vmem_alloc_used); \ - if (unlikely(atomic_read(&vmem_alloc_used) > vmem_alloc_max)) \ - vmem_alloc_max = atomic_read(&vmem_alloc_used); \ + atomic64_read(&vmem_alloc_used), vmem_alloc_max); \ + } else { \ + atomic64_add((size), &vmem_alloc_used); \ + if (unlikely(atomic64_read(&vmem_alloc_used)>vmem_alloc_max)) \ + vmem_alloc_max = atomic64_read(&vmem_alloc_used); \ } \ \ _ptr_; \ @@ -88,7 +91,7 @@ extern unsigned int vmem_alloc_max; #define vmem_free(ptr, size) \ ({ \ BUG_ON(!(ptr) || (size) < 0); \ - atomic_sub((size), &vmem_alloc_used); \ + atomic64_sub((size), &vmem_alloc_used); \ memset(ptr, 0x5a, (size)); /* Poison */ \ vfree(ptr); \ }) @@ -186,6 +189,8 @@ typedef int (*kmem_constructor_t)(void *, void *, int); typedef void (*kmem_destructor_t)(void *, void *); typedef void (*kmem_reclaim_t)(void *); +extern int kmem_set_warning(int flag); + extern kmem_cache_t * __kmem_cache_create(char *name, size_t size, size_t align, kmem_constructor_t constructor, diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index cae4223f3..9f48dd1a5 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "config.h" /* @@ -66,12 +67,28 @@ static int __init spl_init(void) strcpy(hw_serial, "007f0100"); /* loopback */ printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); +#ifdef DEBUG_KMEM + atomic64_set(&kmem_alloc_used, 0); + atomic64_set(&vmem_alloc_used, 0); +#endif + return 0; } static void spl_fini(void) { vn_fini(); + +#ifdef DEBUG_KMEM + if (atomic64_read(&kmem_alloc_used) != 0) + printk("Warning: kmem leaked %ld/%ld bytes\n", + atomic_read(&kmem_alloc_used), kmem_alloc_max); + + if (atomic64_read(&vmem_alloc_used) != 0) + printk("Warning: vmem leaked %ld/%ld bytes\n", + atomic_read(&vmem_alloc_used), vmem_alloc_max); +#endif + return; } diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index d3cb2c93a..c8808105b 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -5,16 +5,23 @@ */ #ifdef DEBUG_KMEM /* Shim layer memory accounting */ -atomic_t kmem_alloc_used; -unsigned int kmem_alloc_max; -atomic_t vmem_alloc_used; -unsigned int vmem_alloc_max; +atomic64_t kmem_alloc_used; +unsigned long kmem_alloc_max = 0; +atomic64_t vmem_alloc_used; +unsigned long vmem_alloc_max = 0; +int kmem_warning_flag = 1; EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); EXPORT_SYMBOL(vmem_alloc_used); EXPORT_SYMBOL(vmem_alloc_max); +EXPORT_SYMBOL(kmem_warning_flag); + +int kmem_set_warning(int flag) { return (kmem_warning_flag = !!flag); } +#else +int kmem_set_warning(int flag) { return 0; } #endif +EXPORT_SYMBOL(kmem_set_warning); /* * Slab allocation interfaces @@ -187,11 +194,17 @@ __kmem_cache_create(char *name, size_t size, size_t align, kmem_cache_t *cache; kmem_cache_cb_t *kcc; int shrinker_flag = 0; + char *cache_name; /* FIXME: - Option currently unsupported by shim layer */ BUG_ON(vmp); - cache = kmem_cache_create(name, size, align, flags, + cache_name = kzalloc(strlen(name) + 1, GFP_KERNEL); + if (cache_name == NULL) + return NULL; + + strcpy(cache_name, name); + cache = kmem_cache_create(cache_name, size, align, flags, kmem_cache_generic_constructor, kmem_cache_generic_destructor); if (cache == NULL) @@ -230,6 +243,7 @@ void __kmem_cache_destroy(kmem_cache_t *cache) { kmem_cache_cb_t *kcc; + char *name; spin_lock(&kmem_cache_cb_lock); kcc = kmem_cache_find_cache_cb(cache); @@ -237,8 +251,10 @@ __kmem_cache_destroy(kmem_cache_t *cache) if (kcc == NULL) return; + name = (char *)kmem_cache_name(cache); kmem_cache_destroy(cache); kmem_cache_remove_cache_cb(kcc); + kfree(name); /* Unregister generic shrinker on removal of all caches */ spin_lock(&kmem_cache_cb_lock); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 7115ca42c..f9f6964de 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -35,6 +35,10 @@ splat_kmem_test1(struct file *file, void *arg) int size = PAGE_SIZE; int i, count, rc = 0; + /* We are intentionally going to push kmem_alloc to its max + * allocation size, so suppress the console warnings for now */ + kmem_set_warning(0); + while ((!rc) && (size <= (PAGE_SIZE * 32))) { count = 0; @@ -57,6 +61,8 @@ splat_kmem_test1(struct file *file, void *arg) size *= 2; } + kmem_set_warning(1); + return rc; } @@ -67,6 +73,10 @@ splat_kmem_test2(struct file *file, void *arg) int size = PAGE_SIZE; int i, j, count, rc = 0; + /* We are intentionally going to push kmem_alloc to its max + * allocation size, so suppress the console warnings for now */ + kmem_set_warning(0); + while ((!rc) && (size <= (PAGE_SIZE * 32))) { count = 0; @@ -101,6 +111,8 @@ splat_kmem_test2(struct file *file, void *arg) size *= 2; } + kmem_set_warning(1); + return rc; } From 2bdb28fbe07d0f74c38fb0a3231d8425fdc75777 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 15 Mar 2008 00:05:38 +0000 Subject: [PATCH 0048/1062] Missing headers, more minor fixes git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@48 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/dmu_config.h | 0 include/sys/cred.h | 1 + include/sys/mount.h | 4 ++++ include/sys/sdt.h | 4 ++++ include/sys/vfs.h | 2 +- include/sys/vmsystm.h | 42 ++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 include/dmu_config.h create mode 100644 include/sys/mount.h create mode 100644 include/sys/sdt.h diff --git a/include/dmu_config.h b/include/dmu_config.h new file mode 100644 index 000000000..e69de29bb diff --git a/include/sys/cred.h b/include/sys/cred.h index 5ed233b0b..1e7d3b7c9 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -7,6 +7,7 @@ extern "C" { #include #include +#include /* XXX - Portions commented out because we really just want to have the type * defined and the contents aren't nearly so important at the moment. */ diff --git a/include/sys/mount.h b/include/sys/mount.h new file mode 100644 index 000000000..435dd44c4 --- /dev/null +++ b/include/sys/mount.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MOUNT_H +#define _SPL_MOUNT_H + +#endif /* SPL_MOUNT_H */ diff --git a/include/sys/sdt.h b/include/sys/sdt.h new file mode 100644 index 000000000..1f94f4a1d --- /dev/null +++ b/include/sys/sdt.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SDT_H +#define _SPL_SDT_H + +#endif /* SPL_SDT_H */ diff --git a/include/sys/vfs.h b/include/sys/vfs.h index 6bc0a42ae..e0044f771 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -1,7 +1,7 @@ #ifndef _SPL_ZFS_H #define _SPL_ZFS_H -typedef struct vfs_s { +typedef struct vfs { int foo; } vfs_t; diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 443c376c9..568cb3775 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -3,6 +3,7 @@ #include #include +#include extern vmem_t *zio_alloc_arena; /* arena for zio caches */ @@ -10,8 +11,45 @@ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ #define ptob(pages) (pages * PAGE_SIZE) #define membar_producer() smp_wmb() -#define copyin(from, to, size) copy_from_user(to, from, size) -#define copyout(from, to, size) copy_to_user(to, from, size) +#define xcopyin(from, to, size) copy_from_user(to, from, size) +#define xcopyout(from, to, size) copy_to_user(to, from, size) + +static __inline__ int +copyin(const void *from, void *to, size_t len) +{ + /* On error copyin routine returns -1 */ + if (xcopyin(from, to, len)) + return -1; + + return 0; +} + +static __inline__ int +copyout(const void *from, void *to, size_t len) +{ + /* On error copyout routine returns -1 */ + if (xcopyout(from, to, len)) + return -1; + + return 0; +} + +static __inline__ int +copyinstr(const void *from, void *to, size_t len, size_t *done) +{ + if (len == 0) + return -ENAMETOOLONG; + + if (len < 0) + return -EFAULT; + + /* XXX: Should return ENAMETOOLONG if 'strlen(from) > len' */ + + memset(to, 0, len); + *done = copyin(from, to, len - 1); + + return 0; +} #if 0 /* The approximate total number of free pages */ From 1ec74a114cc4ec5055e7bc45cffda483505d8aba Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 17 Mar 2008 18:29:57 +0000 Subject: [PATCH 0049/1062] Minimal signal handling interface. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@49 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/signal.h | 24 ++++++++++++++++++++++++ include/sys/sysmacros.h | 1 + 2 files changed, 25 insertions(+) create mode 100644 include/sys/signal.h diff --git a/include/sys/signal.h b/include/sys/signal.h new file mode 100644 index 000000000..120329686 --- /dev/null +++ b/include/sys/signal.h @@ -0,0 +1,24 @@ +#ifndef _SPL_SIGNAL_H +#define _SPL_SIGNAL_H + +#define FORREAL 0 /* Usual side-effects */ +#define JUSTLOOKING 1 /* Don't stop the process */ + +/* The "why" argument indicates the allowable side-effects of the call: + * + * FORREAL: Extract the next pending signal from p_sig into p_cursig; + * stop the process if a stop has been requested or if a traced signal + * is pending. + * + * JUSTLOOKING: Don't stop the process, just indicate whether or not + * a signal might be pending (FORREAL is needed to tell for sure). + */ +static __inline__ int +issig(int why) +{ + BUG_ON(!(why == FORREAL || why == JUSTLOOKING)); + + return signal_pending(current); +} + +#endif /* SPL_SIGNAL_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index eeaedf9cb..83e421b6a 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -8,6 +8,7 @@ extern "C" { #include #include #include +#include #ifndef _KERNEL #define _KERNEL __KERNEL__ From 5d86345d3753fd6d873ba40480e1121eb7c28e21 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 18 Mar 2008 04:56:43 +0000 Subject: [PATCH 0050/1062] Initial pass at a file API getf/releasef hooks git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@50 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/file.h | 30 ++++++ include/sys/kmem.h | 3 + include/sys/types.h | 2 + include/sys/vnode.h | 9 ++ modules/spl/Makefile.in | 1 + modules/spl/spl-file.c | 169 +++++++++++++++++++++++++++++++++ modules/spl/spl-generic.c | 27 ++---- modules/spl/spl-kmem.c | 24 +++++ modules/spl/spl-vnode.c | 6 +- modules/splat/Makefile.in | 1 + modules/splat/splat-ctl.c | 2 + modules/splat/splat-file.c | 57 +++++++++++ modules/splat/splat-internal.h | 3 + modules/splat/splat-kobj.c | 6 +- 14 files changed, 317 insertions(+), 23 deletions(-) create mode 100644 modules/spl/spl-file.c create mode 100644 modules/splat/splat-file.c diff --git a/include/sys/file.h b/include/sys/file.h index 63d662237..8b135c4b1 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -1,4 +1,34 @@ #ifndef _SPL_FILE_H #define _SPL_FILE_H +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include + +typedef struct spl_file { + int f_fd; /* linux fd for lookup */ + struct file *f_file; /* linux file struct */ + atomic_t f_ref; /* ref count */ + kmutex_t f_lock; /* struct lock */ + loff_t f_offset; /* offset */ + vnode_t *f_vnode; /* vnode */ + struct list_head f_list; /* list of referenced file_t's */ +} file_t; + +extern file_t *getf(int fd); +extern void releasef(int fd); + +int file_init(void); +void file_fini(void); + +#ifdef __cplusplus +} +#endif + #endif /* SPL_FILE_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index cce2a05e7..39c547185 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -204,6 +204,9 @@ extern __kmem_cache_destroy(kmem_cache_t *cache); void extern __kmem_reap(void); +int kmem_init(void); +void kmem_fini(void); + #define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ __kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) #define kmem_cache_destroy(cache) __kmem_cache_destroy(cache) diff --git a/include/sys/types.h b/include/sys/types.h index dc660a761..0d6a71ca0 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -31,5 +31,7 @@ typedef longlong_t diskaddr_t; typedef ushort_t o_mode_t; typedef uint_t major_t; typedef uint_t minor_t; +typedef uint_t ldi_ident_t; +typedef dev_t dev_info_t; #endif /* _SPL_TYPES_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 3ec11abe2..74a09b9b6 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -1,6 +1,10 @@ #ifndef _SPL_VNODE_H #define _SPL_VNODE_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -30,6 +34,7 @@ #define FRSYNC O_RSYNC #define FEXCL O_EXCL #define FDIRECT O_DIRECT +#define FAPPEND O_APPEND #define FNODSYNC 0x10000 /* fsync pseudo flag */ #define FNOFOLLOW 0x20000 /* don't follow symlinks */ @@ -178,4 +183,8 @@ vn_putpage(vnode_t *vp, offset_t off, ssize_t size, extern void *rootdir; +#ifdef __cplusplus +} +#endif + #endif /* SPL_VNODE_H */ diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 1005d100b..7508a3ebf 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -17,6 +17,7 @@ spl-objs += spl-vnode.o spl-objs += spl-err.o spl-objs += spl-time.o spl-objs += spl-kobj.o +spl-objs += spl-file.o spl-objs += spl-generic.o splmodule := spl.ko diff --git a/modules/spl/spl-file.c b/modules/spl/spl-file.c new file mode 100644 index 000000000..bce421432 --- /dev/null +++ b/modules/spl/spl-file.c @@ -0,0 +1,169 @@ +#include +#include +#include "config.h" + +/* File interface */ + +static spinlock_t file_lock = SPIN_LOCK_UNLOCKED; +static LIST_HEAD(file_list); +static kmem_cache_t *file_cache; + +/* Function must be called while holding the file_lock */ +static file_t * +file_find(int fd) +{ + file_t *fp; + + BUG_ON(!spin_is_locked(&file_lock)); + + list_for_each_entry(fp, &file_list, f_list) { + if (fd == fp->f_fd) { + BUG_ON(atomic_read(&fp->f_ref) == 0); + return fp; + } + } + + return NULL; +} /* file_find() */ + +file_t * +getf(int fd) +{ + file_t *fp; + + /* Already open just take an extra reference */ + spin_lock(&file_lock); + + fp = file_find(fd); + if (fp) { + atomic_inc(&fp->f_ref); + spin_unlock(&file_lock); + return fp; + } + + spin_unlock(&file_lock); + + /* File was not yet opened via the SPL layer create needed bits */ + fp = kmem_cache_alloc(file_cache, 0); + if (fp == NULL) + goto out; + + mutex_enter(&fp->f_lock); + + fp->f_vnode = vn_alloc(KM_SLEEP); + if (fp->f_vnode == NULL) + goto out_mutex; + + /* XXX: Setup needed vnode stop, open file etc */ + + fp->f_file = fget(fd); + if (fp->f_file == NULL) + goto out_vnode; + + fp->f_fd = fd; + atomic_inc(&fp->f_ref); + + spin_lock(&file_lock); + list_add(&fp->f_list, &file_list); + spin_unlock(&file_lock); + + mutex_exit(&fp->f_lock); + return fp; + +out_vnode: + vn_free(fp->f_vnode); +out_mutex: + mutex_exit(&fp->f_lock); + kmem_cache_free(file_cache, fp); +out: + return NULL; +} /* getf() */ +EXPORT_SYMBOL(getf); + +static void releasef_locked(file_t *fp) +{ + BUG_ON(fp->f_file == NULL); + BUG_ON(fp->f_vnode == NULL); + + /* Unlinked from list, no refs, safe to free outside mutex */ + fput(fp->f_file); + vn_free(fp->f_vnode); + + kmem_cache_free(file_cache, fp); +} + +void +releasef(int fd) +{ + file_t *fp; + + spin_lock(&file_lock); + + fp = file_find(fd); + if (fp) { + atomic_dec(&fp->f_ref); + + if (atomic_read(&fp->f_ref) > 0) { + spin_unlock(&file_lock); + return; + } + + list_del(&fp->f_list); + spin_unlock(&file_lock); + releasef_locked(fp); + } + + return; +} /* releasef() */ +EXPORT_SYMBOL(releasef); + +static int +file_cache_constructor(void *buf, void *cdrarg, int kmflags) +{ + file_t *fp = buf; + + atomic_set(&fp->f_ref, 0); + mutex_init(&fp->f_lock, NULL, MUTEX_DEFAULT, NULL); + + return (0); +} /* file_cache_constructor() */ + +static void +file_cache_destructor(void *buf, void *cdrarg) +{ + file_t *fp = buf; + + mutex_destroy(&fp->f_lock); +} /* file_cache_destructor() */ + +int +file_init(void) +{ + file_cache = kmem_cache_create("spl_file_cache", sizeof(file_t), 64, + file_cache_constructor, + file_cache_destructor, + NULL, NULL, NULL, 0); + return 0; +} /* file_init() */ + +void file_fini(void) +{ + file_t *fp, *next_fp; + int leaked = 0; + + spin_lock(&file_lock); + + list_for_each_entry_safe(fp, next_fp, &file_list, f_list) { + list_del(&fp->f_list); + releasef_locked(fp); + leaked++; + } + + kmem_cache_destroy(file_cache); + file_cache = NULL; + spin_unlock(&file_lock); + + if (leaked > 0) + printk("Warning: %d files leaked\n", leaked); + +} /* file_fini() */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 9f48dd1a5..ee107d045 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include "config.h" @@ -60,35 +61,27 @@ static int __init spl_init(void) { int rc; - rc = vn_init(); - if (rc) + if ((rc = vn_init())) + return rc; + + if ((rc = file_init())) + return rc; + + if ((rc = kmem_init())) return rc; strcpy(hw_serial, "007f0100"); /* loopback */ printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); -#ifdef DEBUG_KMEM - atomic64_set(&kmem_alloc_used, 0); - atomic64_set(&vmem_alloc_used, 0); -#endif - return 0; } static void spl_fini(void) { + kmem_fini(); + file_fini(); vn_fini(); -#ifdef DEBUG_KMEM - if (atomic64_read(&kmem_alloc_used) != 0) - printk("Warning: kmem leaked %ld/%ld bytes\n", - atomic_read(&kmem_alloc_used), kmem_alloc_max); - - if (atomic64_read(&vmem_alloc_used) != 0) - printk("Warning: vmem leaked %ld/%ld bytes\n", - atomic_read(&vmem_alloc_used), vmem_alloc_max); -#endif - return; } diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index c8808105b..50eeec132 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -272,3 +272,27 @@ __kmem_reap(void) { kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); } EXPORT_SYMBOL(__kmem_reap); + +int +kmem_init(void) +{ +#ifdef DEBUG_KMEM + atomic64_set(&kmem_alloc_used, 0); + atomic64_set(&vmem_alloc_used, 0); +#endif + return 0; +} + +void +kmem_fini(void) +{ +#ifdef DEBUG_KMEM + if (atomic64_read(&kmem_alloc_used) != 0) + printk("Warning: kmem leaked %ld/%ld bytes\n", + atomic_read(&kmem_alloc_used), kmem_alloc_max); + + if (atomic64_read(&vmem_alloc_used) != 0) + printk("Warning: vmem leaked %ld/%ld bytes\n", + atomic_read(&vmem_alloc_used), vmem_alloc_max); +#endif +} diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 5776de6dd..65cde885d 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -43,7 +43,6 @@ vn_alloc(int flag) vnode_t *vp; vp = kmem_cache_alloc(vn_cache, flag); - if (vp != NULL) { vp->v_fp = NULL; vp->v_type = 0; @@ -411,8 +410,9 @@ vn_cache_destructor(void *buf, void *cdrarg) int vn_init(void) { - vn_cache = kmem_cache_create("vn_cache", sizeof(struct vnode), 64, - vn_cache_constructor, vn_cache_destructor, + vn_cache = kmem_cache_create("spl_vn_cache", sizeof(struct vnode), 64, + vn_cache_constructor, + vn_cache_destructor, NULL, NULL, NULL, 0); return 0; } /* vn_init() */ diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index 69f38b1f5..b437331ad 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -23,6 +23,7 @@ splat-objs += splat-rwlock.o splat-objs += splat-time.o splat-objs += splat-vnode.o splat-objs += splat-kobj.o +splat-objs += splat-file.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index e9026cd8d..8c853fca5 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -593,6 +593,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(time); SPLAT_SUBSYSTEM_INIT(vnode); SPLAT_SUBSYSTEM_INIT(kobj); + SPLAT_SUBSYSTEM_INIT(file); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, "splatctl"))) @@ -654,6 +655,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(file); SPLAT_SUBSYSTEM_FINI(kobj); SPLAT_SUBSYSTEM_FINI(vnode); SPLAT_SUBSYSTEM_FINI(time); diff --git a/modules/splat/splat-file.c b/modules/splat/splat-file.c new file mode 100644 index 000000000..e05f1c5d7 --- /dev/null +++ b/modules/splat/splat-file.c @@ -0,0 +1,57 @@ +#include "splat-internal.h" + +#define SPLAT_SUBSYSTEM_FILE 0x0b00 +#define SPLAT_FILE_NAME "file" +#define SPLAT_FILE_DESC "Kernel File Tests" + +#define SPLAT_FILE_TEST1_ID 0x0b01 +#define SPLAT_FILE_TEST1_NAME "getf" +#define SPLAT_FILE_TEST1_DESC "File getf/releasef Test" + +static int +splat_file_test1(struct file *file, void *arg) +{ + splat_vprint(file, SPLAT_FILE_TEST1_NAME, "WRITE A TEST, %d\n", 0); + + return 0; +} /* splat_file_test1() */ + + +splat_subsystem_t * +splat_file_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_FILE_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_FILE_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_FILE; + + SPLAT_TEST_INIT(sub, SPLAT_FILE_TEST1_NAME, SPLAT_FILE_TEST1_DESC, + SPLAT_FILE_TEST1_ID, splat_file_test1); + + return sub; +} /* splat_file_init() */ + +void +splat_file_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + + SPLAT_TEST_FINI(sub, SPLAT_FILE_TEST1_ID); + + kfree(sub); +} /* splat_file_fini() */ + +int +splat_file_id(void) +{ + return SPLAT_SUBSYSTEM_FILE; +} /* splat_file_id() */ diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index aca4b3d38..4286a9571 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -172,6 +172,7 @@ splat_subsystem_t * splat_thread_init(void); splat_subsystem_t * splat_time_init(void); splat_subsystem_t * splat_vnode_init(void); splat_subsystem_t * splat_kobj_init(void); +splat_subsystem_t * splat_file_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -183,6 +184,7 @@ void splat_thread_fini(splat_subsystem_t *); void splat_time_fini(splat_subsystem_t *); void splat_vnode_fini(splat_subsystem_t *); void splat_kobj_fini(splat_subsystem_t *); +void splat_file_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -194,5 +196,6 @@ int splat_thread_id(void); int splat_time_id(void); int splat_vnode_id(void); int splat_kobj_id(void); +int splat_file_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/modules/splat/splat-kobj.c b/modules/splat/splat-kobj.c index c24057b0e..ad6c8a06c 100644 --- a/modules/splat/splat-kobj.c +++ b/modules/splat/splat-kobj.c @@ -2,15 +2,15 @@ #define SPLAT_SUBSYSTEM_KOBJ 0x0a00 #define SPLAT_KOBJ_NAME "kobj" -#define SPLAT_KOBJ_DESC "Kernel File Tests" +#define SPLAT_KOBJ_DESC "Kernel Kobj Tests" #define SPLAT_KOBJ_TEST1_ID 0x0a01 #define SPLAT_KOBJ_TEST1_NAME "open" -#define SPLAT_KOBJ_TEST1_DESC "File Open/Close Test" +#define SPLAT_KOBJ_TEST1_DESC "Kobj Open/Close Test" #define SPLAT_KOBJ_TEST2_ID 0x0a02 #define SPLAT_KOBJ_TEST2_NAME "size/read" -#define SPLAT_KOBJ_TEST2_DESC "File Size/Read Test" +#define SPLAT_KOBJ_TEST2_DESC "Kobj Size/Read Test" #define SPLAT_KOBJ_TEST_FILE "/etc/fstab" From e4f1d29f89b70a06197f86640c9544ffff07920b Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 18 Mar 2008 23:20:30 +0000 Subject: [PATCH 0051/1062] OK, some pretty substantial rework here. I've merged the spl-file stuff which only inclused the getf()/releasef() in to the vnode area where it will only really be used. These calls allow a user to grab an open file struct given only the known open fd for a particular user context. ZFS makes use of these, but they're a bit tricky to test from within the kernel since you already need the file open and know the fd. So we basically spook the system calls to setup the environment we need for the splat test case and verify given just the know fd we can get the file, create the needed vnode, and then use the vnode interface as usual to read and write from it. While I was hacking away I also noticed a NULL termination issue in the second kobj test case so I fixed that too. In fact, I fixed a few other things as well but all for the best! git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@51 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/file.h | 34 ------ include/sys/kmem.h | 2 +- include/sys/vnode.h | 17 ++- modules/spl/Makefile.in | 1 - modules/spl/spl-file.c | 169 --------------------------- modules/spl/spl-generic.c | 13 +-- modules/spl/spl-kmem.c | 11 +- modules/spl/spl-vnode.c | 208 +++++++++++++++++++++++++++++++-- modules/splat/Makefile.in | 1 - modules/splat/splat-ctl.c | 2 - modules/splat/splat-file.c | 57 --------- modules/splat/splat-internal.h | 3 - modules/splat/splat-kobj.c | 5 +- modules/splat/splat-vnode.c | 125 +++++++++++++++++++- 14 files changed, 350 insertions(+), 298 deletions(-) delete mode 100644 include/sys/file.h delete mode 100644 modules/spl/spl-file.c delete mode 100644 modules/splat/splat-file.c diff --git a/include/sys/file.h b/include/sys/file.h deleted file mode 100644 index 8b135c4b1..000000000 --- a/include/sys/file.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _SPL_FILE_H -#define _SPL_FILE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include - -typedef struct spl_file { - int f_fd; /* linux fd for lookup */ - struct file *f_file; /* linux file struct */ - atomic_t f_ref; /* ref count */ - kmutex_t f_lock; /* struct lock */ - loff_t f_offset; /* offset */ - vnode_t *f_vnode; /* vnode */ - struct list_head f_list; /* list of referenced file_t's */ -} file_t; - -extern file_t *getf(int fd); -extern void releasef(int fd); - -int file_init(void); -void file_fini(void); - -#ifdef __cplusplus -} -#endif - -#endif /* SPL_FILE_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 39c547185..46322105d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -198,7 +198,7 @@ __kmem_cache_create(char *name, size_t size, size_t align, kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); -void +int extern __kmem_cache_destroy(kmem_cache_t *cache); void diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 74a09b9b6..1b9c3b671 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -12,6 +12,7 @@ extern "C" { #include #include #include +#include #include #include #include @@ -133,7 +134,7 @@ typedef struct vsecattr { } vsecattr_t; typedef struct vnode { - struct file *v_fp; + struct file *v_file; kmutex_t v_lock; /* protects vnode fields */ uint_t v_flag; /* vnode flags (see below) */ uint_t v_count; /* reference count */ @@ -144,6 +145,16 @@ typedef struct vnode { dev_t v_rdev; /* device (VCHR, VBLK) */ } vnode_t; +typedef struct vn_file { + int f_fd; /* linux fd for lookup */ + struct file *f_file; /* linux file struct */ + atomic_t f_ref; /* ref count */ + kmutex_t f_lock; /* struct lock */ + loff_t f_offset; /* offset */ + vnode_t *f_vnode; /* vnode */ + struct list_head f_list; /* list of referenced file_t's */ +} file_t; + extern vnode_t *vn_alloc(int flag); void vn_free(vnode_t *vp); extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode, @@ -158,6 +169,8 @@ extern int vn_remove(const char *path, uio_seg_t seg, int flags); extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); +extern file_t *vn_getf(int fd); +extern void vn_releasef(int fd); int vn_init(void); void vn_fini(void); @@ -180,6 +193,8 @@ vn_putpage(vnode_t *vp, offset_t off, ssize_t size, #define VOP_FSYNC vn_fsync #define VOP_PUTPAGE vn_putpage #define vn_is_readonly(vp) 0 +#define getf vn_getf +#define releasef vn_releasef extern void *rootdir; diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 7508a3ebf..1005d100b 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -17,7 +17,6 @@ spl-objs += spl-vnode.o spl-objs += spl-err.o spl-objs += spl-time.o spl-objs += spl-kobj.o -spl-objs += spl-file.o spl-objs += spl-generic.o splmodule := spl.ko diff --git a/modules/spl/spl-file.c b/modules/spl/spl-file.c deleted file mode 100644 index bce421432..000000000 --- a/modules/spl/spl-file.c +++ /dev/null @@ -1,169 +0,0 @@ -#include -#include -#include "config.h" - -/* File interface */ - -static spinlock_t file_lock = SPIN_LOCK_UNLOCKED; -static LIST_HEAD(file_list); -static kmem_cache_t *file_cache; - -/* Function must be called while holding the file_lock */ -static file_t * -file_find(int fd) -{ - file_t *fp; - - BUG_ON(!spin_is_locked(&file_lock)); - - list_for_each_entry(fp, &file_list, f_list) { - if (fd == fp->f_fd) { - BUG_ON(atomic_read(&fp->f_ref) == 0); - return fp; - } - } - - return NULL; -} /* file_find() */ - -file_t * -getf(int fd) -{ - file_t *fp; - - /* Already open just take an extra reference */ - spin_lock(&file_lock); - - fp = file_find(fd); - if (fp) { - atomic_inc(&fp->f_ref); - spin_unlock(&file_lock); - return fp; - } - - spin_unlock(&file_lock); - - /* File was not yet opened via the SPL layer create needed bits */ - fp = kmem_cache_alloc(file_cache, 0); - if (fp == NULL) - goto out; - - mutex_enter(&fp->f_lock); - - fp->f_vnode = vn_alloc(KM_SLEEP); - if (fp->f_vnode == NULL) - goto out_mutex; - - /* XXX: Setup needed vnode stop, open file etc */ - - fp->f_file = fget(fd); - if (fp->f_file == NULL) - goto out_vnode; - - fp->f_fd = fd; - atomic_inc(&fp->f_ref); - - spin_lock(&file_lock); - list_add(&fp->f_list, &file_list); - spin_unlock(&file_lock); - - mutex_exit(&fp->f_lock); - return fp; - -out_vnode: - vn_free(fp->f_vnode); -out_mutex: - mutex_exit(&fp->f_lock); - kmem_cache_free(file_cache, fp); -out: - return NULL; -} /* getf() */ -EXPORT_SYMBOL(getf); - -static void releasef_locked(file_t *fp) -{ - BUG_ON(fp->f_file == NULL); - BUG_ON(fp->f_vnode == NULL); - - /* Unlinked from list, no refs, safe to free outside mutex */ - fput(fp->f_file); - vn_free(fp->f_vnode); - - kmem_cache_free(file_cache, fp); -} - -void -releasef(int fd) -{ - file_t *fp; - - spin_lock(&file_lock); - - fp = file_find(fd); - if (fp) { - atomic_dec(&fp->f_ref); - - if (atomic_read(&fp->f_ref) > 0) { - spin_unlock(&file_lock); - return; - } - - list_del(&fp->f_list); - spin_unlock(&file_lock); - releasef_locked(fp); - } - - return; -} /* releasef() */ -EXPORT_SYMBOL(releasef); - -static int -file_cache_constructor(void *buf, void *cdrarg, int kmflags) -{ - file_t *fp = buf; - - atomic_set(&fp->f_ref, 0); - mutex_init(&fp->f_lock, NULL, MUTEX_DEFAULT, NULL); - - return (0); -} /* file_cache_constructor() */ - -static void -file_cache_destructor(void *buf, void *cdrarg) -{ - file_t *fp = buf; - - mutex_destroy(&fp->f_lock); -} /* file_cache_destructor() */ - -int -file_init(void) -{ - file_cache = kmem_cache_create("spl_file_cache", sizeof(file_t), 64, - file_cache_constructor, - file_cache_destructor, - NULL, NULL, NULL, 0); - return 0; -} /* file_init() */ - -void file_fini(void) -{ - file_t *fp, *next_fp; - int leaked = 0; - - spin_lock(&file_lock); - - list_for_each_entry_safe(fp, next_fp, &file_list, f_list) { - list_del(&fp->f_list); - releasef_locked(fp); - leaked++; - } - - kmem_cache_destroy(file_cache); - file_cache = NULL; - spin_unlock(&file_lock); - - if (leaked > 0) - printk("Warning: %d files leaked\n", leaked); - -} /* file_fini() */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index ee107d045..2773ff689 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include "config.h" @@ -61,15 +60,12 @@ static int __init spl_init(void) { int rc; - if ((rc = vn_init())) - return rc; - - if ((rc = file_init())) - return rc; - if ((rc = kmem_init())) return rc; + if ((rc = vn_init())) + return rc; + strcpy(hw_serial, "007f0100"); /* loopback */ printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); @@ -78,9 +74,8 @@ static int __init spl_init(void) static void spl_fini(void) { - kmem_fini(); - file_fini(); vn_fini(); + kmem_fini(); return; } diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 50eeec132..a1f3b54e2 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -238,21 +238,23 @@ __kmem_cache_create(char *name, size_t size, size_t align, } EXPORT_SYMBOL(__kmem_cache_create); -/* Return codes discarded because Solaris implementation has void return */ -void +/* Return code provided despite Solaris's void return. There should be no + * harm here since the Solaris versions will ignore it anyway. */ +int __kmem_cache_destroy(kmem_cache_t *cache) { kmem_cache_cb_t *kcc; char *name; + int rc; spin_lock(&kmem_cache_cb_lock); kcc = kmem_cache_find_cache_cb(cache); spin_unlock(&kmem_cache_cb_lock); if (kcc == NULL) - return; + return -EINVAL; name = (char *)kmem_cache_name(cache); - kmem_cache_destroy(cache); + rc = kmem_cache_destroy(cache); kmem_cache_remove_cache_cb(kcc); kfree(name); @@ -262,6 +264,7 @@ __kmem_cache_destroy(kmem_cache_t *cache) remove_shrinker(kmem_cache_shrinker); spin_unlock(&kmem_cache_cb_lock); + return rc; } EXPORT_SYMBOL(__kmem_cache_destroy); diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 65cde885d..4ed59d32e 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -5,7 +5,11 @@ void *rootdir = NULL; EXPORT_SYMBOL(rootdir); -kmem_cache_t *vn_cache; +static kmem_cache_t *vn_cache; +static kmem_cache_t *vn_file_cache; + +static spinlock_t vn_file_lock = SPIN_LOCK_UNLOCKED; +static LIST_HEAD(vn_file_list); static vtype_t vn_get_sol_type(umode_t mode) @@ -44,7 +48,7 @@ vn_alloc(int flag) vp = kmem_cache_alloc(vn_cache, flag); if (vp != NULL) { - vp->v_fp = NULL; + vp->v_file = NULL; vp->v_type = 0; } @@ -106,9 +110,11 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, return -ENOMEM; } + mutex_enter(&vp->v_lock); vp->v_type = vn_get_sol_type(stat.mode); - vp->v_fp = fp; + vp->v_file = fp; *vpp = vp; + mutex_exit(&vp->v_lock); return 0; } /* vn_open() */ @@ -147,13 +153,13 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, BUG_ON(!(uio == UIO_WRITE || uio == UIO_READ)); BUG_ON(!vp); - BUG_ON(!vp->v_fp); + BUG_ON(!vp->v_file); BUG_ON(seg != UIO_SYSSPACE); BUG_ON(x1 != 0); BUG_ON(x2 != RLIM64_INFINITY); offset = off; - fp = vp->v_fp; + fp = vp->v_file; /* Writable user data segment must be briefly increased for this * process so we can use the user space read call paths to write @@ -188,9 +194,9 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) int rc; BUG_ON(!vp); - BUG_ON(!vp->v_fp); + BUG_ON(!vp->v_file); - rc = filp_close(vp->v_fp, 0); + rc = filp_close(vp->v_file, 0); vn_free(vp); return rc; @@ -344,10 +350,10 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) int rc; BUG_ON(!vp); - BUG_ON(!vp->v_fp); + BUG_ON(!vp->v_file); BUG_ON(!vap); - fp = vp->v_fp; + fp = vp->v_file; rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) @@ -380,15 +386,143 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) int datasync = 0; BUG_ON(!vp); - BUG_ON(!vp->v_fp); + BUG_ON(!vp->v_file); if (flags & FDSYNC) datasync = 1; - return file_fsync(vp->v_fp, vp->v_fp->f_dentry, datasync); + return file_fsync(vp->v_file, vp->v_file->f_dentry, datasync); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); +/* Function must be called while holding the vn_file_lock */ +static file_t * +file_find(int fd) +{ + file_t *fp; + + BUG_ON(!spin_is_locked(&vn_file_lock)); + + list_for_each_entry(fp, &vn_file_list, f_list) { + if (fd == fp->f_fd) { + BUG_ON(atomic_read(&fp->f_ref) == 0); + return fp; + } + } + + return NULL; +} /* file_find() */ + +file_t * +vn_getf(int fd) +{ + struct kstat stat; + struct file *lfp; + file_t *fp; + vnode_t *vp; + + /* Already open just take an extra reference */ + spin_lock(&vn_file_lock); + + fp = file_find(fd); + if (fp) { + atomic_inc(&fp->f_ref); + spin_unlock(&vn_file_lock); + printk("found file\n"); + return fp; + } + + spin_unlock(&vn_file_lock); + + /* File was not yet opened create the object and setup */ + fp = kmem_cache_alloc(vn_file_cache, 0); + if (fp == NULL) + goto out; + + mutex_enter(&fp->f_lock); + + fp->f_fd = fd; + fp->f_offset = 0; + atomic_inc(&fp->f_ref); + + lfp = fget(fd); + if (lfp == NULL) + goto out_mutex; + + vp = vn_alloc(KM_SLEEP); + if (vp == NULL) + goto out_fget; + + if (vfs_getattr(lfp->f_vfsmnt, lfp->f_dentry, &stat)) + goto out_vnode; + + mutex_enter(&vp->v_lock); + vp->v_type = vn_get_sol_type(stat.mode); + vp->v_file = lfp; + mutex_exit(&vp->v_lock); + + fp->f_vnode = vp; + fp->f_file = lfp; + + /* Put it on the tracking list */ + spin_lock(&vn_file_lock); + list_add(&fp->f_list, &vn_file_list); + spin_unlock(&vn_file_lock); + + mutex_exit(&fp->f_lock); + return fp; + +out_vnode: + printk("out_vnode\n"); + vn_free(vp); +out_fget: + printk("out_fget\n"); + fput(lfp); +out_mutex: + printk("out_mutex\n"); + mutex_exit(&fp->f_lock); + kmem_cache_free(vn_file_cache, fp); +out: + printk("out\n"); + return NULL; +} /* getf() */ +EXPORT_SYMBOL(getf); + +static void releasef_locked(file_t *fp) +{ + BUG_ON(fp->f_file == NULL); + BUG_ON(fp->f_vnode == NULL); + + /* Unlinked from list, no refs, safe to free outside mutex */ + fput(fp->f_file); + vn_free(fp->f_vnode); + + kmem_cache_free(vn_file_cache, fp); +} + +void +vn_releasef(int fd) +{ + file_t *fp; + + spin_lock(&vn_file_lock); + fp = file_find(fd); + if (fp) { + atomic_dec(&fp->f_ref); + if (atomic_read(&fp->f_ref) > 0) { + spin_unlock(&vn_file_lock); + return; + } + + list_del(&fp->f_list); + releasef_locked(fp); + } + spin_unlock(&vn_file_lock); + + return; +} /* releasef() */ +EXPORT_SYMBOL(releasef); + static int vn_cache_constructor(void *buf, void *cdrarg, int kmflags) { @@ -407,6 +541,25 @@ vn_cache_destructor(void *buf, void *cdrarg) mutex_destroy(&vp->v_lock); } /* vn_cache_destructor() */ +static int +vn_file_cache_constructor(void *buf, void *cdrarg, int kmflags) +{ + file_t *fp = buf; + + atomic_set(&fp->f_ref, 0); + mutex_init(&fp->f_lock, NULL, MUTEX_DEFAULT, NULL); + + return (0); +} /* file_cache_constructor() */ + +static void +vn_file_cache_destructor(void *buf, void *cdrarg) +{ + file_t *fp = buf; + + mutex_destroy(&fp->f_lock); +} /* vn_file_cache_destructor() */ + int vn_init(void) { @@ -414,11 +567,42 @@ vn_init(void) vn_cache_constructor, vn_cache_destructor, NULL, NULL, NULL, 0); + + vn_file_cache = kmem_cache_create("spl_vn_file_cache", + sizeof(file_t), 64, + vn_file_cache_constructor, + vn_file_cache_destructor, + NULL, NULL, NULL, 0); return 0; } /* vn_init() */ void vn_fini(void) { - kmem_cache_destroy(vn_cache); + file_t *fp, *next_fp; + int rc, leaked = 0; + + spin_lock(&vn_file_lock); + + list_for_each_entry_safe(fp, next_fp, &vn_file_list, f_list) { + list_del(&fp->f_list); + releasef_locked(fp); + leaked++; + } + + rc = kmem_cache_destroy(vn_file_cache); + if (rc) + printk("Warning leaked vn_file_cache objects\n"); + + vn_file_cache = NULL; + spin_unlock(&vn_file_lock); + + if (leaked > 0) + printk("Warning: %d files leaked\n", leaked); + + rc = kmem_cache_destroy(vn_cache); + if (rc) + printk("Warning leaked vn_cache objects\n"); + + return; } /* vn_fini() */ diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index b437331ad..69f38b1f5 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -23,7 +23,6 @@ splat-objs += splat-rwlock.o splat-objs += splat-time.o splat-objs += splat-vnode.o splat-objs += splat-kobj.o -splat-objs += splat-file.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index 8c853fca5..e9026cd8d 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -593,7 +593,6 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(time); SPLAT_SUBSYSTEM_INIT(vnode); SPLAT_SUBSYSTEM_INIT(kobj); - SPLAT_SUBSYSTEM_INIT(file); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, "splatctl"))) @@ -655,7 +654,6 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); - SPLAT_SUBSYSTEM_FINI(file); SPLAT_SUBSYSTEM_FINI(kobj); SPLAT_SUBSYSTEM_FINI(vnode); SPLAT_SUBSYSTEM_FINI(time); diff --git a/modules/splat/splat-file.c b/modules/splat/splat-file.c deleted file mode 100644 index e05f1c5d7..000000000 --- a/modules/splat/splat-file.c +++ /dev/null @@ -1,57 +0,0 @@ -#include "splat-internal.h" - -#define SPLAT_SUBSYSTEM_FILE 0x0b00 -#define SPLAT_FILE_NAME "file" -#define SPLAT_FILE_DESC "Kernel File Tests" - -#define SPLAT_FILE_TEST1_ID 0x0b01 -#define SPLAT_FILE_TEST1_NAME "getf" -#define SPLAT_FILE_TEST1_DESC "File getf/releasef Test" - -static int -splat_file_test1(struct file *file, void *arg) -{ - splat_vprint(file, SPLAT_FILE_TEST1_NAME, "WRITE A TEST, %d\n", 0); - - return 0; -} /* splat_file_test1() */ - - -splat_subsystem_t * -splat_file_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_FILE_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_FILE_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_FILE; - - SPLAT_TEST_INIT(sub, SPLAT_FILE_TEST1_NAME, SPLAT_FILE_TEST1_DESC, - SPLAT_FILE_TEST1_ID, splat_file_test1); - - return sub; -} /* splat_file_init() */ - -void -splat_file_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - SPLAT_TEST_FINI(sub, SPLAT_FILE_TEST1_ID); - - kfree(sub); -} /* splat_file_fini() */ - -int -splat_file_id(void) -{ - return SPLAT_SUBSYSTEM_FILE; -} /* splat_file_id() */ diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 4286a9571..aca4b3d38 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -172,7 +172,6 @@ splat_subsystem_t * splat_thread_init(void); splat_subsystem_t * splat_time_init(void); splat_subsystem_t * splat_vnode_init(void); splat_subsystem_t * splat_kobj_init(void); -splat_subsystem_t * splat_file_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -184,7 +183,6 @@ void splat_thread_fini(splat_subsystem_t *); void splat_time_fini(splat_subsystem_t *); void splat_vnode_fini(splat_subsystem_t *); void splat_kobj_fini(splat_subsystem_t *); -void splat_file_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -196,6 +194,5 @@ int splat_thread_id(void); int splat_time_id(void); int splat_vnode_id(void); int splat_kobj_id(void); -int splat_file_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/modules/splat/splat-kobj.c b/modules/splat/splat-kobj.c index ad6c8a06c..f6bfa6d00 100644 --- a/modules/splat/splat-kobj.c +++ b/modules/splat/splat-kobj.c @@ -55,7 +55,7 @@ splat_kobj_test2(struct file *file, void *arg) goto out; } - buf = kmalloc(size, GFP_KERNEL); + buf = kmalloc(size + 1, GFP_KERNEL); if (!buf) { rc = -ENOMEM; splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed to alloc " @@ -63,6 +63,7 @@ splat_kobj_test2(struct file *file, void *arg) goto out; } + memset(buf, 0, size + 1); rc = kobj_read_file(f, buf, size, 0); if (rc < 0) { splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed read of " @@ -74,7 +75,7 @@ splat_kobj_test2(struct file *file, void *arg) * isn't a perfect test since we didn't create the file however it is * pretty unlikely there are garbage characters in your /etc/fstab */ if (size != (uint64_t)strlen(buf)) { - rc = EFBIG; + rc = -EFBIG; splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Stat'ed size " "(%lld) does not match number of bytes read " "(%lld)\n", size, (uint64_t)strlen(buf)); diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index 402872d6b..92bbbfc74 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -1,4 +1,5 @@ #include "splat-internal.h" +#include #define SPLAT_SUBSYSTEM_VNODE 0x0900 #define SPLAT_VNODE_NAME "vnode" @@ -28,6 +29,10 @@ #define SPLAT_VNODE_TEST6_NAME "vn_sync" #define SPLAT_VNODE_TEST6_DESC "Vn_sync Test" +#define SPLAT_VNODE_TEST7_ID 0x0907 +#define SPLAT_VNODE_TEST7_NAME "getf" +#define SPLAT_VNODE_TEST7_DESC "getf/releasef Test" + #define SPLAT_VNODE_TEST_FILE "/etc/fstab" #define SPLAT_VNODE_TEST_FILE_AT "etc/fstab" #define SPLAT_VNODE_TEST_FILE_RW "/tmp/spl.vnode.tmp" @@ -130,7 +135,7 @@ splat_vnode_test3(struct file *file, void *arg) } if (strncmp(buf1, buf2, strlen(buf1))) { - rc = EINVAL; + rc = -EINVAL; splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Failed strncmp data written does not match " "data read\nWrote: %sRead: %s\n", buf1, buf2); @@ -315,7 +320,120 @@ out: vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); return rc; -} /* splat_vnode_test4() */ +} /* splat_vnode_test6() */ + +/* Basically a slightly modified version of sys_close() */ +static int +fd_uninstall(int fd) +{ + struct file *fp; + struct files_struct *files = current->files; + struct fdtable *fdt; + + spin_lock(&files->file_lock); + fdt = files_fdtable(files); + + if (fd >= fdt->max_fds) + goto out_unlock; + + fp = fdt->fd[fd]; + if (!fp) + goto out_unlock; + + rcu_assign_pointer(fdt->fd[fd], NULL); + FD_CLR(fd, fdt->close_on_exec); + + /* Dropping the lock here exposes a minor race but it allows me + * to use the existing kernel interfaces for this, and for a test + * case I think that's reasonable. */ + spin_unlock(&files->file_lock); + put_unused_fd(fd); + +out_unlock: + spin_unlock(&files->file_lock); + return -EBADF; +} /* fd_uninstall() */ + +static int +splat_vnode_test7(struct file *file, void *arg) +{ + char buf1[32] = "SPL VNode Interface Test File\n"; + char buf2[32] = ""; + struct file *lfp; + file_t *fp; + int rc, fd; + + /* Prep work needed to test getf/releasef */ + fd = get_unused_fd(); + if (fd < 0) { + splat_vprint(file, SPLAT_VNODE_TEST7_NAME, + "Failed to get unused fd (%d)\n", fd); + return fd; + } + + lfp = filp_open(SPLAT_VNODE_TEST_FILE_RW, O_RDWR|O_CREAT|O_EXCL, 0644); + if (IS_ERR(lfp)) { + put_unused_fd(fd); + rc = PTR_ERR(lfp); + splat_vprint(file, SPLAT_VNODE_TEST7_NAME, + "Failed to filp_open: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + return rc; + } + + /* Pair up the new fd and lfp in the current context, this allows + * getf to lookup the file struct simply by the known open fd */ + fd_install(fd, lfp); + + /* Actual getf()/releasef() test */ + fp = vn_getf(fd); + if (fp == NULL) { + rc = -EINVAL; + splat_vprint(file, SPLAT_VNODE_TEST7_NAME, + "Failed to getf fd %d: (%d)\n", fd, rc); + goto out; + } + + rc = vn_rdwr(UIO_WRITE, fp->f_vnode, buf1, strlen(buf1), 0, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + if (rc < 0) { + splat_vprint(file, SPLAT_VNODE_TEST7_NAME, + "Failed vn_rdwr write of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + goto out; + } + + rc = vn_rdwr(UIO_READ, fp->f_vnode, buf2, strlen(buf1), 0, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + if (rc < 0) { + splat_vprint(file, SPLAT_VNODE_TEST7_NAME, + "Failed vn_rdwr read of test file: %s (%d)\n", + SPLAT_VNODE_TEST_FILE_RW, rc); + goto out; + } + + if (strncmp(buf1, buf2, strlen(buf1))) { + rc = -EINVAL; + splat_vprint(file, SPLAT_VNODE_TEST7_NAME, + "Failed strncmp data written does not match " + "data read\nWrote: %sRead: %s\n", buf1, buf2); + goto out; + } + + rc = 0; + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Wrote: %s", buf1); + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Read: %s", buf2); + splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Successfully wrote and " + "read expected data pattern to test file: %s\n", + SPLAT_VNODE_TEST_FILE_RW); +out: + vn_releasef(fd); + fd_uninstall(fd); + filp_close(lfp, 0); + vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); + + return rc; +} /* splat_vnode_test7() */ splat_subsystem_t * splat_vnode_init(void) @@ -346,6 +464,8 @@ splat_vnode_init(void) SPLAT_VNODE_TEST5_ID, splat_vnode_test5); SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, SPLAT_VNODE_TEST6_ID, splat_vnode_test6); + SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST7_NAME, SPLAT_VNODE_TEST7_DESC, + SPLAT_VNODE_TEST7_ID, splat_vnode_test7); return sub; } /* splat_vnode_init() */ @@ -355,6 +475,7 @@ splat_vnode_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST4_ID); From 4e62fd4104e968a4ee224117e266720f2ec7afbb Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 20 Mar 2008 23:30:15 +0000 Subject: [PATCH 0052/1062] OK, a first reasonable attempt at a solaris module/chdev shim layer. This should handle the absolute minimum I need for ZFS. It will register the chdev with the right callbacks. Then the generic registered linux callback will find the right registered solaris callback for the function and munge the args just right before passing it on. Should work, but untested (just compiled), so I expect bugs. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@52 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/file.h | 4 + include/sys/sunddi.h | 179 ++++++++++++++++++++++ include/sys/sunldi.h | 27 +++- include/sys/types.h | 2 - include/sys/vnode.h | 1 + modules/spl/Makefile.in | 1 + modules/spl/spl-module.c | 297 ++++++++++++++++++++++++++++++++++++ modules/spl/spl-vnode.c | 1 + modules/splat/splat-vnode.c | 4 +- 9 files changed, 508 insertions(+), 8 deletions(-) create mode 100644 include/sys/file.h create mode 100644 modules/spl/spl-module.c diff --git a/include/sys/file.h b/include/sys/file.h new file mode 100644 index 000000000..63d662237 --- /dev/null +++ b/include/sys/file.h @@ -0,0 +1,4 @@ +#ifndef _SPL_FILE_H +#define _SPL_FILE_H + +#endif /* SPL_FILE_H */ diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 541102556..888b84451 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -1,4 +1,183 @@ #ifndef _SPL_SUNDDI_H #define _SPL_SUNDDI_H +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef int ddi_devid_t; + +typedef enum { + DDI_INFO_DEVT2DEVINFO = 0, + DDI_INFO_DEVT2INSTANCE = 1 +} ddi_info_cmd_t; + +typedef enum { + DDI_ATTACH = 0, + DDI_RESUME = 1, + DDI_PM_RESUME = 2 +} ddi_attach_cmd_t; + +typedef enum { + DDI_DETACH = 0, + DDI_SUSPEND = 1, + DDI_PM_SUSPEND = 2, + DDI_HOTPLUG_DETACH = 3 +} ddi_detach_cmd_t; + +typedef enum { + DDI_RESET_FORCE = 0 +} ddi_reset_cmd_t; + +typedef enum { + PROP_LEN = 0, + PROP_LEN_AND_VAL_BUF = 1, + PROP_LEN_AND_VAL_ALLOC = 2, + PROP_EXISTS = 3 +} ddi_prop_op_t; + +typedef void *devmap_cookie_t; +typedef struct as { + uchar_t a_flags; +} as_t; + +typedef struct pollhead { + struct polldat *ph_list; +} pollhead_t; + +typedef struct dev_info { + kmutex_t di_lock; + struct dev_ops *di_ops; + struct cdev *di_cdev; + struct class *di_class; + major_t di_major; + minor_t di_minor; + dev_t di_dev; + unsigned di_minors; + struct list_head di_list; +} dev_info_t; + +typedef struct cb_ops { + int (*cb_open)(dev_t *devp, int flag, int otyp, cred_t *credp); + int (*cb_close)(dev_t dev, int flag, int otyp, cred_t *credp); + int (*cb_strategy)(void *bp); + int (*cb_print)(dev_t dev, char *str); + int (*cb_dump)(dev_t dev, caddr_t addr, daddr_t blkno, int nblk); + int (*cb_read)(dev_t dev, struct uio *uiop, cred_t *credp); + int (*cb_write)(dev_t dev, struct uio *uiop, cred_t *credp); + int (*cb_ioctl)(dev_t dev, int cmd, intptr_t arg, int mode, + cred_t *credp, int *rvalp); + int (*cb_devmap)(dev_t dev, devmap_cookie_t dhp, offset_t off, + size_t len, size_t *maplen, uint_t model); + int (*cb_mmap)(dev_t dev, off_t off, int prot); + int (*cb_segmap)(dev_t dev, off_t off, struct as *asp, + caddr_t *addrp, off_t len, unsigned int prot, + unsigned int maxprot, unsigned int flags, + cred_t *credp); + int (*cb_chpoll)(dev_t dev, short events, int anyyet, + short *reventsp, struct pollhead **phpp); + int (*cb_prop_op)(dev_t dev, dev_info_t *dip, + ddi_prop_op_t prop_op, int mod_flags, + char *name, caddr_t valuep, int *length); + struct streamtab *cb_str; + int cb_flag; + int cb_rev; + int (*cb_aread)(dev_t dev, struct aio_req *aio, cred_t *credp); + int (*cb_awrite)(dev_t dev, struct aio_req *aio, cred_t *credp); +} cb_ops_t; + +typedef struct dev_ops { + int devo_rev; + int devo_refcnt; + + int (*devo_getinfo)(dev_info_t *dip, + ddi_info_cmd_t infocmd, void *arg, void **result); + int (*devo_identify)(dev_info_t *dip); + int (*devo_probe)(dev_info_t *dip); + int (*devo_attach)(dev_info_t *dip, ddi_attach_cmd_t cmd); + int (*devo_detach)(dev_info_t *dip, ddi_detach_cmd_t cmd); + int (*devo_reset)(dev_info_t *dip, ddi_reset_cmd_t cmd); + + struct cb_ops *devo_cb_ops; + struct bus_ops *devo_bus_ops; + int (*devo_power)(dev_info_t *dip, int component, int level); +} dev_ops_t; + +typedef struct mod_ops { + int (*modm_install)(void); + int (*modm_remove)(void); + int (*modm_info)(void); +} mod_ops_t; + +typedef struct modldrv { + struct mod_ops *drv_modops; + char *drv_linkinfo; + struct dev_ops *drv_dev_ops; + struct dev_info *drv_dev_info; +} modldrv_t; + +#define MODREV_1 1 + +#define D_NEW 0x000 +#define D_MP 0x020 +#define D_64BIT 0x200 + +#define DEVO_REV 3 +#define CB_REV 1 + +#define DDI_SUCCESS 0 +#define DDI_FAILURE -1 + +#define DDI_PSEUDO "ddi_pseudo" + +#define nodev NULL +#define nochpoll NULL +#define nulldev NULL +#define mod_driverops NULL +#define ddi_prop_op NULL + +#define getminor MINOR +#define getmajor MAJOR + +#define mod_install(x) 0 +#define mod_remove(x) 0 + +extern int __ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type, + minor_t minor_num, char *node_type, + int flag, struct module *mod); +extern void __ddi_remove_minor_node(dev_info_t *dip, char *name); +extern int __mod_install(struct modlinkage *modlp); +extern int __mod_remove(struct modlinkage *modlp); + +static __inline__ void ddi_report_dev(dev_info_t *d) { } +static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { } + +static __inline__ major_t +ddi_driver_major(dev_info_t *di) +{ + return getminor(di->di_dev); +} + +static __inline__ int +ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, + minor_t minor_num, char *node_type, int flag) +{ + return __ddi_create_minor_node(di, name, spec_type, minor_num, + node_type, flag, THIS_MODULE); + +} + +#undef mod_install +#undef mod_remove + +#define ddi_remove_minor_node __ddi_remove_minor_node +#define mod_install __mod_install +#define mod_remove __mod_remove + #endif /* SPL_SUNDDI_H */ diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index 01e80b54f..f473350be 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -1,9 +1,28 @@ #ifndef _SPL_SUNLDI_H #define _SPL_SUNLDI_H -/* XXX: ALL TOTALLY BOGUS, JUST PLACE HOLDERS */ -typedef int ddi_devid_t; -typedef int ldi_handle_t; -typedef int ldi_ident_t; +#include + +typedef struct modlinkage { + int ml_rev; + struct modlfs *ml_modlfs; + struct modldrv *ml_modldrv; + major_t ml_major; + unsigned ml_minors; + void *pad1; +} modlinkage_t; + +typedef struct ldi_ident { + char li_modname[MAXNAMELEN]; + dev_t li_dev; +} *ldi_ident_t; + +typedef struct ldi_handle { + uint_t lh_type; + struct ldi_ident *lh_ident; +} ldi_handle_t; + +extern int ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip); +extern void ldi_ident_release(ldi_ident_t li); #endif /* SPL_SUNLDI_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 0d6a71ca0..dc660a761 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -31,7 +31,5 @@ typedef longlong_t diskaddr_t; typedef ushort_t o_mode_t; typedef uint_t major_t; typedef uint_t minor_t; -typedef uint_t ldi_ident_t; -typedef dev_t dev_info_t; #endif /* _SPL_TYPES_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 1b9c3b671..4ee7e7895 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -19,6 +19,7 @@ extern "C" { #include #include #include +#include #define XVA_MAPSIZE 3 #define XVA_MAGIC 0x78766174 diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 1005d100b..bcc25be97 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -17,6 +17,7 @@ spl-objs += spl-vnode.o spl-objs += spl-err.o spl-objs += spl-time.o spl-objs += spl-kobj.o +spl-objs += spl-module.o spl-objs += spl-generic.o splmodule := spl.ko diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c new file mode 100644 index 000000000..efe516adb --- /dev/null +++ b/modules/spl/spl-module.c @@ -0,0 +1,297 @@ +#include +#include +#include "config.h" + +static spinlock_t dev_info_lock = SPIN_LOCK_UNLOCKED; +static LIST_HEAD(dev_info_list); + +static struct dev_info * +get_dev_info(dev_t dev) +{ + struct dev_info *di; + + spin_lock(&dev_info_lock); + + list_for_each_entry(di, &dev_info_list, di_list) + if (di->di_dev == dev) + goto out; + + di = NULL; +out: + spin_unlock(&dev_info_lock); + return di; +} + +static int +mod_generic_ioctl(struct inode *ino, struct file *filp, + unsigned int cmd, unsigned long arg) +{ + struct dev_info *di; + int rc, flag = 0, rvalp = 0; + cred_t *cr = NULL; + + di = get_dev_info(MKDEV(imajor(ino), iminor(ino))); + if (di == NULL) + return EINVAL; + + rc = di->di_ops->devo_cb_ops->cb_ioctl(di->di_dev, + (int)cmd,(intptr_t)arg, + flag, cr, &rvalp); + return rc; +} + +int +__ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, + minor_t minor_num, char *node_type, + int flag, struct module *mod) +{ + struct cdev *cdev; + struct dev_ops *dev_ops; + struct cb_ops *cb_ops; + struct file_operations *fops; + int rc; + + BUG_ON(spec_type != S_IFCHR); + BUG_ON(minor_num < di->di_minors); + BUG_ON(strcmp(node_type, DDI_PSEUDO)); + BUG_ON(flag != 0); + + fops = kmalloc(sizeof(struct file_operations), GFP_KERNEL); + if (fops == NULL) + return DDI_FAILURE; + + cdev = cdev_alloc(); + if (cdev == NULL) { + kfree(fops); + return DDI_FAILURE; + } + + cdev->ops = fops; + + mutex_enter(&di->di_lock); + dev_ops = di->di_ops; + BUG_ON(dev_ops == NULL); + cb_ops = di->di_ops->devo_cb_ops; + BUG_ON(cb_ops == NULL); + + /* Setup the fops to cb_ops mapping */ + fops->owner = mod; + if (cb_ops->cb_ioctl) + fops->ioctl = mod_generic_ioctl; + +#if 0 + if (cb_ops->cb_open) + fops->open = mod_generic_open; + + if (cb_ops->cb_close) + fops->release = mod_generic_close; + + if (cb_ops->cb_read) + fops->read = mod_generic_read; + + if (cb_ops->cb_write) + fops->write = mod_generic_write; +#endif + /* XXX: Currently unsupported operations */ + BUG_ON(cb_ops->cb_open != NULL); + BUG_ON(cb_ops->cb_close != NULL); + BUG_ON(cb_ops->cb_read != NULL); + BUG_ON(cb_ops->cb_write != NULL); + BUG_ON(cb_ops->cb_strategy != NULL); + BUG_ON(cb_ops->cb_print != NULL); + BUG_ON(cb_ops->cb_dump != NULL); + BUG_ON(cb_ops->cb_devmap != NULL); + BUG_ON(cb_ops->cb_mmap != NULL); + BUG_ON(cb_ops->cb_segmap != NULL); + BUG_ON(cb_ops->cb_chpoll != NULL); + BUG_ON(cb_ops->cb_prop_op != NULL); + BUG_ON(cb_ops->cb_str != NULL); + BUG_ON(cb_ops->cb_aread != NULL); + BUG_ON(cb_ops->cb_awrite != NULL); + + di->di_minor = minor_num; + di->di_dev = MKDEV(di->di_major, di->di_minor); + + rc = cdev_add(cdev, di->di_dev, 1); + if (rc) { + printk("spl: Error adding cdev, %d\n", rc); + kfree(fops); + cdev_del(cdev); + mutex_exit(&di->di_lock); + return DDI_FAILURE; + } + + di->di_class = class_create(THIS_MODULE, name); + if (IS_ERR(di->di_class)) { + rc = PTR_ERR(di->di_class); + printk("spl: Error creating %s class, %d\n", name, rc); + kfree(fops); + cdev_del(di->di_cdev); + mutex_exit(&di->di_lock); + return DDI_FAILURE; + } + + class_device_create(di->di_class, NULL, di->di_dev, + NULL, "%s%d", name, di->di_minor); + + di->di_cdev = cdev; + + spin_lock(&dev_info_lock); + list_add(&di->di_list, &dev_info_list); + spin_unlock(&dev_info_lock); + + mutex_exit(&di->di_lock); + + return DDI_SUCCESS; +} +EXPORT_SYMBOL(__ddi_create_minor_node); + +static void +___ddi_remove_minor_node(dev_info_t *di, char *name) +{ + class_device_destroy(di->di_class, di->di_dev); + class_destroy(di->di_class); + cdev_del(di->di_cdev); + + spin_lock(&dev_info_lock); + list_del(&di->di_list); + spin_unlock(&dev_info_lock); +} + +void +__ddi_remove_minor_node(dev_info_t *di, char *name) +{ + mutex_enter(&di->di_lock); + ___ddi_remove_minor_node(di, name); + mutex_exit(&di->di_lock); +} +EXPORT_SYMBOL(ddi_remove_minor_node); + +#if 0 +static int +mod_generic_open(struct inode *, struct file *) +{ + open(dev_t *devp, int flag, int otyp, cred_t *credp); +} + +static int +mod_generic_close(struct inode *, struct file *) +{ + close(dev_t dev, int flag, int otyp, cred_t *credp); +} + +static ssize_t +mod_generic_read(struct file *, char __user *, size_t, loff_t *) +{ + read(dev_t dev, struct uio *uiop, cred_t *credp); +} + +static ssize_t +mod_generic_write(struct file *, const char __user *, size_t, loff_t *) +{ + write(dev_t dev, struct uio *uiop, cred_t *credp); +} +#endif + +static struct dev_info * +dev_info_alloc(major_t major, minor_t minors, struct dev_ops *ops) { + struct dev_info *di; + + di = kmalloc(sizeof(struct dev_info), GFP_KERNEL); + if (di == NULL) + return NULL; + + mutex_init(&di->di_lock, NULL, MUTEX_DEFAULT, NULL); + INIT_LIST_HEAD(&di->di_list); + di->di_ops = ops; + di->di_class = NULL; + di->di_cdev = NULL; + di->di_major = major; + di->di_minor = 0; + di->di_minors = minors; + di->di_dev = 0; + + return di; +} + +static void +dev_info_free(struct dev_info *di) +{ + mutex_enter(&di->di_lock); + __ddi_remove_minor_node(di, NULL); + mutex_exit(&di->di_lock); + mutex_destroy(&di->di_lock); + kfree(di); +} + +int +__mod_install(struct modlinkage *modlp) +{ + struct modldrv *drv = modlp->ml_modldrv; + struct dev_info *di; + int rc; + + di = dev_info_alloc(modlp->ml_major, modlp->ml_minors, + drv->drv_dev_ops); + if (di == NULL) + return ENOMEM; + + /* XXX: Really we need to be calling devo_probe if it's available + * and then calling devo_attach for each device discovered. However + * for now we just call it once and let the app sort it out. + */ + rc = drv->drv_dev_ops->devo_attach(di, DDI_ATTACH); + if (rc != DDI_SUCCESS) { + dev_info_free(di); + return rc; + } + + drv->drv_dev_info = di; + + return DDI_SUCCESS; +} +EXPORT_SYMBOL(__mod_install); + +int +__mod_remove(struct modlinkage *modlp) +{ + struct modldrv *drv = modlp->ml_modldrv; + struct dev_info *di = drv->drv_dev_info; + int rc; + + rc = drv->drv_dev_ops->devo_detach(di, DDI_DETACH); + if (rc != DDI_SUCCESS) + return rc; + + dev_info_free(di); + drv->drv_dev_info = NULL; + + return DDI_SUCCESS; +} +EXPORT_SYMBOL(__mod_remove); + +int +ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip) +{ + ldi_ident_t li; + + BUG_ON(modlp == NULL || lip == NULL); + + li = kmalloc(sizeof(struct ldi_ident), GFP_KERNEL); + if (li == NULL) + return ENOMEM; + + li->li_dev = MKDEV(modlp->ml_major, 0); + *lip = li; + + return 0; +} +EXPORT_SYMBOL(ldi_ident_from_mod); + +void +ldi_ident_release(ldi_ident_t lip) +{ + BUG_ON(lip == NULL); + kfree(lip); +} +EXPORT_SYMBOL(ldi_ident_release); diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 4ed59d32e..24ee71293 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -548,6 +548,7 @@ vn_file_cache_constructor(void *buf, void *cdrarg, int kmflags) atomic_set(&fp->f_ref, 0); mutex_init(&fp->f_lock, NULL, MUTEX_DEFAULT, NULL); + INIT_LIST_HEAD(&fp->f_list); return (0); } /* file_cache_constructor() */ diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index 92bbbfc74..8578ea20a 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -30,8 +30,8 @@ #define SPLAT_VNODE_TEST6_DESC "Vn_sync Test" #define SPLAT_VNODE_TEST7_ID 0x0907 -#define SPLAT_VNODE_TEST7_NAME "getf" -#define SPLAT_VNODE_TEST7_DESC "getf/releasef Test" +#define SPLAT_VNODE_TEST7_NAME "vn_getf" +#define SPLAT_VNODE_TEST7_DESC "vn_getf/vn_releasef Test" #define SPLAT_VNODE_TEST_FILE "/etc/fstab" #define SPLAT_VNODE_TEST_FILE_AT "etc/fstab" From 336bb0c0c1e0a6035c62531381001a4a8299e79d Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 21 Mar 2008 19:16:25 +0000 Subject: [PATCH 0053/1062] Two fixes to the module interface. Could be worse! git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@53 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/types32.h | 3 +-- modules/spl/spl-module.c | 35 +++++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/include/sys/types32.h b/include/sys/types32.h index 6df64e713..5b5085659 100644 --- a/include/sys/types32.h +++ b/include/sys/types32.h @@ -26,9 +26,8 @@ #ifndef _SYS_TYPES32_H #define _SYS_TYPES32_H - - #include +#include #ifdef __cplusplus extern "C" { diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index efe516adb..309188ce5 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -52,7 +52,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, int rc; BUG_ON(spec_type != S_IFCHR); - BUG_ON(minor_num < di->di_minors); + BUG_ON(minor_num >= di->di_minors); BUG_ON(strcmp(node_type, DDI_PSEUDO)); BUG_ON(flag != 0); @@ -131,8 +131,14 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, return DDI_FAILURE; } - class_device_create(di->di_class, NULL, di->di_dev, - NULL, "%s%d", name, di->di_minor); + /* Do not append a 0 to devices with minor nums of 0 */ + if (di->di_minor == 0) { + class_device_create(di->di_class, NULL, di->di_dev, + NULL, "%s", name); + } else { + class_device_create(di->di_class, NULL, di->di_dev, + NULL, "%s%d", name, di->di_minor); + } di->di_cdev = cdev; @@ -147,14 +153,23 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, EXPORT_SYMBOL(__ddi_create_minor_node); static void -___ddi_remove_minor_node(dev_info_t *di, char *name) +__ddi_remove_minor_node_locked(dev_info_t *di, char *name) { - class_device_destroy(di->di_class, di->di_dev); - class_destroy(di->di_class); - cdev_del(di->di_cdev); + if (di->di_class) { + class_device_destroy(di->di_class, di->di_dev); + class_destroy(di->di_class); + + di->di_class = NULL; + di->di_dev = 0; + } + + if (di->di_cdev) { + cdev_del(di->di_cdev); + di->di_cdev = NULL; + } spin_lock(&dev_info_lock); - list_del(&di->di_list); + list_del_init(&di->di_list); spin_unlock(&dev_info_lock); } @@ -162,7 +177,7 @@ void __ddi_remove_minor_node(dev_info_t *di, char *name) { mutex_enter(&di->di_lock); - ___ddi_remove_minor_node(di, name); + __ddi_remove_minor_node_locked(di, name); mutex_exit(&di->di_lock); } EXPORT_SYMBOL(ddi_remove_minor_node); @@ -218,7 +233,7 @@ static void dev_info_free(struct dev_info *di) { mutex_enter(&di->di_lock); - __ddi_remove_minor_node(di, NULL); + __ddi_remove_minor_node_locked(di, NULL); mutex_exit(&di->di_lock); mutex_destroy(&di->di_lock); kfree(di); From 8ac547ec4c968620a8a7c3f7bbe5f9163a450638 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 27 Mar 2008 17:58:10 +0000 Subject: [PATCH 0054/1062] Relocated to zfs repo git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@54 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/dmu_config.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 include/dmu_config.h diff --git a/include/dmu_config.h b/include/dmu_config.h deleted file mode 100644 index e69de29bb..000000000 From d429b03d85eee5652a8a3a1c093489a55cf9458d Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 27 Mar 2008 22:06:59 +0000 Subject: [PATCH 0055/1062] - Thinko fix to the SPL module interface - Enhanse the VERIFY() support to output the values which failed to compare as expected before crashing. This make debugging much much much easier. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@55 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/sunddi.h | 2 +- include/sys/sysmacros.h | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 888b84451..59f98061a 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -161,7 +161,7 @@ static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { } static __inline__ major_t ddi_driver_major(dev_info_t *di) { - return getminor(di->di_dev); + return getmajor(di->di_dev); } static __inline__ int diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 83e421b6a..a64950d10 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -76,20 +76,23 @@ extern "C" { #define ASSERT(x) BUG_ON(!(x)) #define VERIFY(x) ASSERT(x) -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE) do { \ - const TYPE __left = (TYPE)(LEFT); \ - const TYPE __right = (TYPE)(RIGHT); \ - if (!(__left OP __right)) \ - BUG(); \ +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) do { \ + const TYPE __left = (TYPE)(LEFT); \ + const TYPE __right = (TYPE)(RIGHT); \ + if (!(__left OP __right)) { \ + printk("Failed VERIFY3(" FMT " " #OP " " FMT ")\n", \ + CAST __left, CAST __right); \ + BUG(); \ + } \ } while (0) -#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t) -#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t) -#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t) +#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t, "%ld", (long)) +#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t, "%lu", (unsigned long)) +#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define ASSERT3S(x, y, z) VERIFY3S(x, y, z) -#define ASSERT3U(x, y, z) VERIFY3U(x, y, z) -#define ASSERT3P(x, y, z) VERIFY3P(x, y, z) +#define ASSERT3S(x, y, z) VERIFY3S(x, y, z) +#define ASSERT3U(x, y, z) VERIFY3U(x, y, z) +#define ASSERT3P(x, y, z) VERIFY3P(x, y, z) /* Dtrace probes do not exist in the linux kernel */ From 4a4295b26736a651a16a2d291868028dbd7cf91b Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 27 Mar 2008 23:40:09 +0000 Subject: [PATCH 0056/1062] Remove minor lingering CDDL tait of copied headers. Required headers rewritten to include minimally what we need. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@56 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- FIXME | 11 - include/sys/acl.h | 337 ++++++---------------------- include/sys/acl_impl.h | 63 +----- include/sys/dkio.h | 481 +--------------------------------------- include/sys/dklabel.h | 270 +---------------------- include/sys/isa_defs.h | 484 +---------------------------------------- include/sys/sid.h | 2 +- include/sys/types32.h | 92 +------- 8 files changed, 86 insertions(+), 1654 deletions(-) diff --git a/FIXME b/FIXME index bba628c45..95c9c76ba 100644 --- a/FIXME +++ b/FIXME @@ -1,14 +1,3 @@ -* We need to revist the following sections to ensure there are no -licensing issues: - -sys/sysmacros.h - Parts borrowed from libsolcompat -sys/dkio.h - All borrowed from libsolcompat -sys/dklabel.h - All borrowed from libsolcompat -sys/types32.h - All borrowed from libsolcompat -sys/isa_defs.h - AlL borrowed from libsolcompat -sys/acl.h _ All borrowed from libsolcompat -sys/acl_impl.h _ All borrowed from libsolcompat - * Implement solaris style atomic interfaces * Fully implement vnode support for ZPL layer to intergrate with VFS. diff --git a/include/sys/acl.h b/include/sys/acl.h index a47ce49af..042d9ca75 100644 --- a/include/sys/acl.h +++ b/include/sys/acl.h @@ -1,289 +1,80 @@ -/* - * 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 - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_ACL_H -#define _SYS_ACL_H - - +#ifndef _SPL_ACL_H +#define _SPL_ACL_H #include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAX_ACL_ENTRIES (1024) /* max entries of each type */ -typedef struct acl { - int a_type; /* the type of ACL entry */ - uid_t a_id; /* the entry in -uid or gid */ - o_mode_t a_perm; /* the permission field */ -} aclent_t; typedef struct ace { - uid_t a_who; /* uid or gid */ - uint32_t a_access_mask; /* read,write,... */ - uint16_t a_flags; /* see below */ - uint16_t a_type; /* allow or deny */ + uid_t a_who; + uint32_t a_access_mask; + uint16_t a_flags; + uint16_t a_type; } ace_t; -typedef struct acl_info acl_t; - -/* - * The following are Defined types for an aclent_t. - */ -#define USER_OBJ (0x01) /* object owner */ -#define USER (0x02) /* additional users */ -#define GROUP_OBJ (0x04) /* owning group of the object */ -#define GROUP (0x08) /* additional groups */ -#define CLASS_OBJ (0x10) /* file group class and mask entry */ -#define OTHER_OBJ (0x20) /* other entry for the object */ -#define ACL_DEFAULT (0x1000) /* default flag */ -/* default object owner */ -#define DEF_USER_OBJ (ACL_DEFAULT | USER_OBJ) -/* default additional users */ -#define DEF_USER (ACL_DEFAULT | USER) -/* default owning group */ -#define DEF_GROUP_OBJ (ACL_DEFAULT | GROUP_OBJ) -/* default additional groups */ -#define DEF_GROUP (ACL_DEFAULT | GROUP) -/* default mask entry */ -#define DEF_CLASS_OBJ (ACL_DEFAULT | CLASS_OBJ) -/* default other entry */ -#define DEF_OTHER_OBJ (ACL_DEFAULT | OTHER_OBJ) - -/* - * The following are defined for ace_t. - */ -#define ACE_READ_DATA 0x00000001 -#define ACE_LIST_DIRECTORY 0x00000001 -#define ACE_WRITE_DATA 0x00000002 -#define ACE_ADD_FILE 0x00000002 -#define ACE_APPEND_DATA 0x00000004 -#define ACE_ADD_SUBDIRECTORY 0x00000004 -#define ACE_READ_NAMED_ATTRS 0x00000008 -#define ACE_WRITE_NAMED_ATTRS 0x00000010 -#define ACE_EXECUTE 0x00000020 -#define ACE_DELETE_CHILD 0x00000040 -#define ACE_READ_ATTRIBUTES 0x00000080 -#define ACE_WRITE_ATTRIBUTES 0x00000100 -#define ACE_DELETE 0x00010000 -#define ACE_READ_ACL 0x00020000 -#define ACE_WRITE_ACL 0x00040000 -#define ACE_WRITE_OWNER 0x00080000 -#define ACE_SYNCHRONIZE 0x00100000 - -#define ACE_FILE_INHERIT_ACE 0x0001 -#define ACE_DIRECTORY_INHERIT_ACE 0x0002 -#define ACE_NO_PROPAGATE_INHERIT_ACE 0x0004 -#define ACE_INHERIT_ONLY_ACE 0x0008 -#define ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x0010 -#define ACE_FAILED_ACCESS_ACE_FLAG 0x0020 -#define ACE_IDENTIFIER_GROUP 0x0040 -#define ACE_INHERITED_ACE 0x0080 -#define ACE_OWNER 0x1000 -#define ACE_GROUP 0x2000 -#define ACE_EVERYONE 0x4000 - -#define ACE_ACCESS_ALLOWED_ACE_TYPE 0x0000 -#define ACE_ACCESS_DENIED_ACE_TYPE 0x0001 -#define ACE_SYSTEM_AUDIT_ACE_TYPE 0x0002 -#define ACE_SYSTEM_ALARM_ACE_TYPE 0x0003 - -#define ACL_AUTO_INHERIT 0x0001 -#define ACL_PROTECTED 0x0002 -#define ACL_DEFAULTED 0x0004 -#define ACL_FLAGS_ALL (ACL_AUTO_INHERIT|ACL_PROTECTED| \ - ACL_DEFAULTED) - -#ifdef _KERNEL - -/* - * These are only applicable in a CIFS context. - */ -#define ACE_ACCESS_ALLOWED_COMPOUND_ACE_TYPE 0x04 -#define ACE_ACCESS_ALLOWED_OBJECT_ACE_TYPE 0x05 -#define ACE_ACCESS_DENIED_OBJECT_ACE_TYPE 0x06 -#define ACE_SYSTEM_AUDIT_OBJECT_ACE_TYPE 0x07 -#define ACE_SYSTEM_ALARM_OBJECT_ACE_TYPE 0x08 -#define ACE_ACCESS_ALLOWED_CALLBACK_ACE_TYPE 0x09 -#define ACE_ACCESS_DENIED_CALLBACK_ACE_TYPE 0x0A -#define ACE_ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE 0x0B -#define ACE_ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE 0x0C -#define ACE_SYSTEM_AUDIT_CALLBACK_ACE_TYPE 0x0D -#define ACE_SYSTEM_ALARM_CALLBACK_ACE_TYPE 0x0E -#define ACE_SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE 0x0F -#define ACE_SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE 0x10 - -#define ACE_ALL_TYPES 0x001F - typedef struct ace_object { - uid_t a_who; /* uid or gid */ - uint32_t a_access_mask; /* read,write,... */ - uint16_t a_flags; /* see below */ - uint16_t a_type; /* allow or deny */ - uint8_t a_obj_type[16]; /* obj type */ - uint8_t a_inherit_obj_type[16]; /* inherit obj */ + uid_t a_who; /* uid or gid */ + uint32_t a_access_mask; /* read,write,... */ + uint16_t a_flags; /* see below */ + uint16_t a_type; /* allow or deny */ + uint8_t a_obj_type[16]; /* obj type */ + uint8_t a_inherit_obj_type[16]; /* inherit obj */ } ace_object_t; -#endif +#define ACE_READ_DATA 0x00000001 +#define ACE_LIST_DIRECTORY 0x00000001 +#define ACE_WRITE_DATA 0x00000002 +#define ACE_ADD_FILE 0x00000002 +#define ACE_APPEND_DATA 0x00000004 +#define ACE_ADD_SUBDIRECTORY 0x00000004 +#define ACE_READ_NAMED_ATTRS 0x00000008 +#define ACE_WRITE_NAMED_ATTRS 0x00000010 +#define ACE_EXECUTE 0x00000020 +#define ACE_DELETE_CHILD 0x00000040 +#define ACE_READ_ATTRIBUTES 0x00000080 +#define ACE_WRITE_ATTRIBUTES 0x00000100 +#define ACE_DELETE 0x00010000 +#define ACE_READ_ACL 0x00020000 +#define ACE_WRITE_ACL 0x00040000 +#define ACE_WRITE_OWNER 0x00080000 +#define ACE_SYNCHRONIZE 0x00100000 -#define ACE_ALL_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \ - ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS| \ - ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES| \ - ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \ - ACE_WRITE_OWNER|ACE_SYNCHRONIZE) +#define ACE_FILE_INHERIT_ACE 0x0001 +#define ACE_DIRECTORY_INHERIT_ACE 0x0002 +#define ACE_NO_PROPAGATE_INHERIT_ACE 0x0004 +#define ACE_INHERIT_ONLY_ACE 0x0008 +#define ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x0010 +#define ACE_FAILED_ACCESS_ACE_FLAG 0x0020 +#define ACE_IDENTIFIER_GROUP 0x0040 +#define ACE_INHERITED_ACE 0x0080 +#define ACE_OWNER 0x1000 +#define ACE_GROUP 0x2000 +#define ACE_EVERYONE 0x4000 -/* - * The following flags are supported by both NFSv4 ACLs and ace_t. - */ -#define ACE_NFSV4_SUP_FLAGS (ACE_FILE_INHERIT_ACE | \ - ACE_DIRECTORY_INHERIT_ACE | \ - ACE_NO_PROPAGATE_INHERIT_ACE | \ - ACE_INHERIT_ONLY_ACE | \ - ACE_IDENTIFIER_GROUP) +#define ACE_ACCESS_ALLOWED_ACE_TYPE 0x0000 +#define ACE_ACCESS_DENIED_ACE_TYPE 0x0001 +#define ACE_SYSTEM_AUDIT_ACE_TYPE 0x0002 +#define ACE_SYSTEM_ALARM_ACE_TYPE 0x0003 -#define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE| \ - ACE_IDENTIFIER_GROUP) -#define ACE_INHERIT_FLAGS (ACE_FILE_INHERIT_ACE| \ - ACE_DIRECTORY_INHERIT_ACE|ACE_NO_PROPAGATE_INHERIT_ACE|ACE_INHERIT_ONLY_ACE) +#define ACL_AUTO_INHERIT 0x0001 +#define ACL_PROTECTED 0x0002 +#define ACL_DEFAULTED 0x0004 +#define ACL_FLAGS_ALL (ACL_AUTO_INHERIT|ACL_PROTECTED|ACL_DEFAULTED) -/* cmd args to acl(2) for aclent_t */ -#define GETACL 1 -#define SETACL 2 -#define GETACLCNT 3 +#define ACE_ACCESS_ALLOWED_COMPOUND_ACE_TYPE 0x04 +#define ACE_ACCESS_ALLOWED_OBJECT_ACE_TYPE 0x05 +#define ACE_ACCESS_DENIED_OBJECT_ACE_TYPE 0x06 +#define ACE_SYSTEM_AUDIT_OBJECT_ACE_TYPE 0x07 +#define ACE_SYSTEM_ALARM_OBJECT_ACE_TYPE 0x08 +#define ACE_ACCESS_ALLOWED_CALLBACK_ACE_TYPE 0x09 +#define ACE_ACCESS_DENIED_CALLBACK_ACE_TYPE 0x0A +#define ACE_ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE 0x0B +#define ACE_ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE 0x0C +#define ACE_SYSTEM_AUDIT_CALLBACK_ACE_TYPE 0x0D +#define ACE_SYSTEM_ALARM_CALLBACK_ACE_TYPE 0x0E +#define ACE_SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE 0x0F +#define ACE_SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE 0x10 -/* cmd's to manipulate ace acls. */ -#define ACE_GETACL 4 -#define ACE_SETACL 5 -#define ACE_GETACLCNT 6 +#define ACE_ALL_TYPES 0x001F -/* minimal acl entries from GETACLCNT */ -#define MIN_ACL_ENTRIES 4 +#define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE|ACE_IDENTIFIER_GROUP) -#if !defined(_KERNEL) - -/* acl check errors */ -#define GRP_ERROR 1 -#define USER_ERROR 2 -#define OTHER_ERROR 3 -#define CLASS_ERROR 4 -#define DUPLICATE_ERROR 5 -#define MISS_ERROR 6 -#define MEM_ERROR 7 -#define ENTRY_ERROR 8 - - -/* - * similar to ufs_acl.h: changed to char type for user commands (tar, cpio) - * Attribute types - */ -#define UFSD_FREE ('0') /* Free entry */ -#define UFSD_ACL ('1') /* Access Control Lists */ -#define UFSD_DFACL ('2') /* reserved for future use */ -#define ACE_ACL ('3') /* ace_t style acls */ - -/* - * flag to [f]acl_get() - * controls whether a trivial acl should be returned. - */ -#define ACL_NO_TRIVIAL 0x2 - - -/* - * Flags to control acl_totext() - */ - -#define ACL_APPEND_ID 0x1 /* append uid/gid to user/group entries */ -#define ACL_COMPACT_FMT 0x2 /* build ACL in ls -V format */ -#define ACL_NORESOLVE 0x4 /* don't do name service lookups */ - -/* - * Legacy aclcheck errors for aclent_t ACLs - */ -#define EACL_GRP_ERROR GRP_ERROR -#define EACL_USER_ERROR USER_ERROR -#define EACL_OTHER_ERROR OTHER_ERROR -#define EACL_CLASS_ERROR CLASS_ERROR -#define EACL_DUPLICATE_ERROR DUPLICATE_ERROR -#define EACL_MISS_ERROR MISS_ERROR -#define EACL_MEM_ERROR MEM_ERROR -#define EACL_ENTRY_ERROR ENTRY_ERROR - -#define EACL_INHERIT_ERROR 9 /* invalid inherit flags */ -#define EACL_FLAGS_ERROR 10 /* unknown flag value */ -#define EACL_PERM_MASK_ERROR 11 /* unknown permission */ -#define EACL_COUNT_ERROR 12 /* invalid acl count */ - -#define EACL_INVALID_SLOT 13 /* invalid acl slot */ -#define EACL_NO_ACL_ENTRY 14 /* Entry doesn't exist */ -#define EACL_DIFF_TYPE 15 /* acls aren't same type */ - -#define EACL_INVALID_USER_GROUP 16 /* need user/group name */ -#define EACL_INVALID_STR 17 /* invalid acl string */ -#define EACL_FIELD_NOT_BLANK 18 /* can't have blank field */ -#define EACL_INVALID_ACCESS_TYPE 19 /* invalid access type */ -#define EACL_UNKNOWN_DATA 20 /* Unrecognized data in ACL */ -#define EACL_MISSING_FIELDS 21 /* missing fields in acl */ - -#define EACL_INHERIT_NOTDIR 22 /* Need dir for inheritance */ - -extern int aclcheck(aclent_t *, int, int *); -extern int acltomode(aclent_t *, int, mode_t *); -extern int aclfrommode(aclent_t *, int, mode_t *); -extern int aclsort(int, int, aclent_t *); -extern char *acltotext(aclent_t *, int); -extern aclent_t *aclfromtext(char *, int *); -extern void acl_free(acl_t *); -extern int acl_get(const char *, int, acl_t **); -extern int facl_get(int, int, acl_t **); -extern int acl_set(const char *, acl_t *acl); -extern int facl_set(int, acl_t *acl); -extern int acl_strip(const char *, uid_t, gid_t, mode_t); -extern int acl_trivial(const char *); -extern char *acl_totext(acl_t *, int); -extern int acl_fromtext(const char *, acl_t **); -extern int acl_check(acl_t *, int); - -#else /* !defined(_KERNEL) */ - -extern void ksort(caddr_t, int, int, int (*)(void *, void *)); -extern int cmp2acls(void *, void *); - -#endif /* !defined(_KERNEL) */ - -#if defined(__STDC__) -extern int acl(const char *path, int cmd, int cnt, void *buf); -extern int facl(int fd, int cmd, int cnt, void *buf); -#else /* !__STDC__ */ -extern int acl(); -extern int facl(); -#endif /* defined(__STDC__) */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_ACL_H */ +#endif /* _SPL_ACL_H */ diff --git a/include/sys/acl_impl.h b/include/sys/acl_impl.h index 5f8f01f2e..0c8698cbd 100644 --- a/include/sys/acl_impl.h +++ b/include/sys/acl_impl.h @@ -1,61 +1,4 @@ -/* - * 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 - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _SPL_ACL_IMPL_H +#define _SPL_ACL_IMPL_H -#ifndef _SYS_ACL_IMPL_H -#define _SYS_ACL_IMPL_H - - - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * acl flags - * - * ACL_AUTO_INHERIT, ACL_PROTECTED and ACL_DEFAULTED - * flags can also be stored in this field. - */ -#define ACL_IS_TRIVIAL 0x10000 -#define ACL_IS_DIR 0x20000 - -typedef enum acl_type { - ACLENT_T = 0, - ACE_T = 1 -} acl_type_t; - -struct acl_info { - acl_type_t acl_type; /* style of acl */ - int acl_cnt; /* number of acl entries */ - int acl_entry_size; /* sizeof acl entry */ - int acl_flags; /* special flags about acl */ - void *acl_aclp; /* the acl */ -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_ACL_IMPL_H */ +#endif /* _SPL_ACL_IMPL_H */ diff --git a/include/sys/dkio.h b/include/sys/dkio.h index 32f786565..efe7fa270 100644 --- a/include/sys/dkio.h +++ b/include/sys/dkio.h @@ -1,192 +1,5 @@ -/* - * 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 - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_DKIO_H -#define _SYS_DKIO_H - - - -#include /* Needed for NDKMAP define */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Structures and definitions for disk io control commands - */ - -/* - * Structures used as data by ioctl calls. - */ - -#define DK_DEVLEN 16 /* device name max length, including */ - /* unit # & NULL (ie - "xyc1") */ - -/* - * Used for controller info - */ -struct dk_cinfo { - char dki_cname[DK_DEVLEN]; /* controller name (no unit #) */ - ushort_t dki_ctype; /* controller type */ - ushort_t dki_flags; /* flags */ - ushort_t dki_cnum; /* controller number */ - uint_t dki_addr; /* controller address */ - uint_t dki_space; /* controller bus type */ - uint_t dki_prio; /* interrupt priority */ - uint_t dki_vec; /* interrupt vector */ - char dki_dname[DK_DEVLEN]; /* drive name (no unit #) */ - uint_t dki_unit; /* unit number */ - uint_t dki_slave; /* slave number */ - ushort_t dki_partition; /* partition number */ - ushort_t dki_maxtransfer; /* max. transfer size in DEV_BSIZE */ -}; - -/* - * Controller types - */ -#define DKC_UNKNOWN 0 -#define DKC_CDROM 1 /* CD-ROM, SCSI or otherwise */ -#define DKC_WDC2880 2 -#define DKC_XXX_0 3 /* unassigned */ -#define DKC_XXX_1 4 /* unassigned */ -#define DKC_DSD5215 5 -#define DKC_ACB4000 7 -#define DKC_MD21 8 -#define DKC_XXX_2 9 /* unassigned */ -#define DKC_NCRFLOPPY 10 -#define DKC_SMSFLOPPY 12 -#define DKC_SCSI_CCS 13 /* SCSI CCS compatible */ -#define DKC_INTEL82072 14 /* native floppy chip */ -#define DKC_MD 16 /* meta-disk (virtual-disk) driver */ -#define DKC_INTEL82077 19 /* 82077 floppy disk controller */ -#define DKC_DIRECT 20 /* Intel direct attached device i.e. IDE */ -#define DKC_PCMCIA_MEM 21 /* PCMCIA memory disk-like type */ -#define DKC_PCMCIA_ATA 22 /* PCMCIA AT Attached type */ -#define DKC_VBD 23 /* virtual block device */ - -/* - * Sun reserves up through 1023 - */ - -#define DKC_CUSTOMER_BASE 1024 - -/* - * Flags - */ -#define DKI_BAD144 0x01 /* use DEC std 144 bad sector fwding */ -#define DKI_MAPTRK 0x02 /* controller does track mapping */ -#define DKI_FMTTRK 0x04 /* formats only full track at a time */ -#define DKI_FMTVOL 0x08 /* formats only full volume at a time */ -#define DKI_FMTCYL 0x10 /* formats only full cylinders at a time */ -#define DKI_HEXUNIT 0x20 /* unit number is printed as 3 hex digits */ -#define DKI_PCMCIA_PFD 0x40 /* PCMCIA pseudo-floppy memory card */ - -/* - * Used for all partitions - */ -struct dk_allmap { - struct dk_map dka_map[NDKMAP]; -}; - -#if defined(_SYSCALL32) -struct dk_allmap32 { - struct dk_map32 dka_map[NDKMAP]; -}; -#endif /* _SYSCALL32 */ - -/* - * Definition of a disk's geometry - */ -struct dk_geom { - unsigned short dkg_ncyl; /* # of data cylinders */ - unsigned short dkg_acyl; /* # of alternate cylinders */ - unsigned short dkg_bcyl; /* cyl offset (for fixed head area) */ - unsigned short dkg_nhead; /* # of heads */ - unsigned short dkg_obs1; /* obsolete */ - unsigned short dkg_nsect; /* # of data sectors per track */ - unsigned short dkg_intrlv; /* interleave factor */ - unsigned short dkg_obs2; /* obsolete */ - unsigned short dkg_obs3; /* obsolete */ - unsigned short dkg_apc; /* alternates per cyl (SCSI only) */ - unsigned short dkg_rpm; /* revolutions per minute */ - unsigned short dkg_pcyl; /* # of physical cylinders */ - unsigned short dkg_write_reinstruct; /* # sectors to skip, writes */ - unsigned short dkg_read_reinstruct; /* # sectors to skip, reads */ - unsigned short dkg_extra[7]; /* for compatible expansion */ -}; - -/* - * These defines are for historic compatibility with old drivers. - */ -#define dkg_bhead dkg_obs1 /* used to be head offset */ -#define dkg_gap1 dkg_obs2 /* used to be gap1 */ -#define dkg_gap2 dkg_obs3 /* used to be gap2 */ - -/* - * Disk io control commands - * Warning: some other ioctls with the DIOC prefix exist elsewhere. - * The Generic DKIOC numbers are from 0 - 50. - * The Floppy Driver uses 51 - 100. - * The Hard Disk (except SCSI) 101 - 106. (these are obsolete) - * The CDROM Driver 151 - 200. - * The USCSI ioctl 201 - 250. - */ -#define DKIOC (0x04 << 8) - -/* - * The following ioctls are generic in nature and need to be - * suported as appropriate by all disk drivers - */ -#define DKIOCGGEOM (DKIOC|1) /* Get geometry */ -#define DKIOCINFO (DKIOC|3) /* Get info */ -#define DKIOCEJECT (DKIOC|6) /* Generic 'eject' */ -#define DKIOCGVTOC (DKIOC|11) /* Get VTOC */ -#define DKIOCSVTOC (DKIOC|12) /* Set VTOC & Write to Disk */ - -/* - * Disk Cache Controls. These ioctls should be supported by - * all disk drivers. - * - * DKIOCFLUSHWRITECACHE when used from user-mode ignores the ioctl - * argument, but it should be passed as NULL to allow for future - * reinterpretation. From user-mode, this ioctl request is synchronous. - * - * When invoked from within the kernel, the arg can be NULL to indicate - * a synchronous request or can be the address of a struct dk_callback - * to request an asynchronous callback when the flush request is complete. - * In this case, the flag to the ioctl must include FKIOCTL and the - * dkc_callback field of the pointed to struct must be non-null or the - * request is made synchronously. - * - * In the callback case: if the ioctl returns 0, a callback WILL be performed. - * If the ioctl returns non-zero, a callback will NOT be performed. - * NOTE: In some cases, the callback may be done BEFORE the ioctl call - * returns. The caller's locking strategy should be prepared for this case. - */ -#define DKIOCFLUSHWRITECACHE (DKIOC|34) /* flush cache to phys medium */ +#ifndef _SPL_DKIO_H +#define _SPL_DKIO_H struct dk_callback { void (*dkc_callback)(void *dkc_cookie, int error); @@ -194,291 +7,7 @@ struct dk_callback { int dkc_flag; }; -/* bit flag definitions for dkc_flag */ -#define FLUSH_VOLATILE 0x1 /* Bit 0: if set, only flush */ - /* volatile cache; otherwise, flush */ - /* volatile and non-volatile cache */ +#define DKIOC (0x04 << 8) +#define DKIOCFLUSHWRITECACHE (DKIOC | 34) -#define DKIOCGETWCE (DKIOC|36) /* Get current write cache */ - /* enablement status */ -#define DKIOCSETWCE (DKIOC|37) /* Enable/Disable write cache */ - -/* - * The following ioctls are used by Sun drivers to communicate - * with their associated format routines. Support of these ioctls - * is not required of foreign drivers - */ -#define DKIOCSGEOM (DKIOC|2) /* Set geometry */ -#define DKIOCSAPART (DKIOC|4) /* Set all partitions */ -#define DKIOCGAPART (DKIOC|5) /* Get all partitions */ -#define DKIOCG_PHYGEOM (DKIOC|32) /* get physical geometry */ -#define DKIOCG_VIRTGEOM (DKIOC|33) /* get virtual geometry */ - -/* - * The following ioctl's are removable media support - */ -#define DKIOCLOCK (DKIOC|7) /* Generic 'lock' */ -#define DKIOCUNLOCK (DKIOC|8) /* Generic 'unlock' */ -#define DKIOCSTATE (DKIOC|13) /* Inquire insert/eject state */ -#define DKIOCREMOVABLE (DKIOC|16) /* is media removable */ - - -/* - * ioctl for hotpluggable devices - */ -#define DKIOCHOTPLUGGABLE (DKIOC|35) /* is hotpluggable */ - -/* - * Ioctl to force driver to re-read the alternate partition and rebuild - * the internal defect map. - */ -#define DKIOCADDBAD (DKIOC|20) /* Re-read the alternate map (IDE) */ -#define DKIOCGETDEF (DKIOC|21) /* read defect list (IDE) */ - -/* - * Used by applications to get disk defect information from IDE - * drives. - */ -#ifdef _SYSCALL32 -struct defect_header32 { - int head; - caddr32_t buffer; -}; -#endif /* _SYSCALL32 */ - -struct defect_header { - int head; - caddr_t buffer; -}; - -#define DKIOCPARTINFO (DKIOC|22) /* Get partition or slice parameters */ - -/* - * Used by applications to get partition or slice information - */ -#ifdef _SYSCALL32 -struct part_info32 { - daddr32_t p_start; - int p_length; -}; -#endif /* _SYSCALL32 */ - -struct part_info { - daddr_t p_start; - int p_length; -}; - -/* The following ioctls are for Optical Memory Device */ -#define DKIOC_EBP_ENABLE (DKIOC|40) /* enable by pass erase on write */ -#define DKIOC_EBP_DISABLE (DKIOC|41) /* disable by pass erase on write */ - -/* - * This state enum is the argument passed to the DKIOCSTATE ioctl. - */ -enum dkio_state { DKIO_NONE, DKIO_EJECTED, DKIO_INSERTED, DKIO_DEV_GONE }; - -#define DKIOCGMEDIAINFO (DKIOC|42) /* get information about the media */ - -/* - * ioctls to read/write mboot info. - */ -#define DKIOCGMBOOT (DKIOC|43) /* get mboot info */ -#define DKIOCSMBOOT (DKIOC|44) /* set mboot info */ - -/* - * ioctl to get the device temperature. - */ -#define DKIOCGTEMPERATURE (DKIOC|45) /* get temperature */ - -/* - * Used for providing the temperature. - */ - -struct dk_temperature { - uint_t dkt_flags; /* Flags */ - short dkt_cur_temp; /* Current disk temperature */ - short dkt_ref_temp; /* reference disk temperature */ -}; - -#define DKT_BYPASS_PM 0x1 -#define DKT_INVALID_TEMP 0xFFFF - - -/* - * Used for Media info or the current profile info - */ -struct dk_minfo { - uint_t dki_media_type; /* Media type or profile info */ - uint_t dki_lbsize; /* Logical blocksize of media */ - diskaddr_t dki_capacity; /* Capacity as # of dki_lbsize blks */ -}; - -/* - * Media types or profiles known - */ -#define DK_UNKNOWN 0x00 /* Media inserted - type unknown */ - - -/* - * SFF 8090 Specification Version 3, media types 0x01 - 0xfffe are retained to - * maintain compatibility with SFF8090. The following define the - * optical media type. - */ -#define DK_REMOVABLE_DISK 0x02 /* Removable Disk */ -#define DK_MO_ERASABLE 0x03 /* MO Erasable */ -#define DK_MO_WRITEONCE 0x04 /* MO Write once */ -#define DK_AS_MO 0x05 /* AS MO */ -#define DK_CDROM 0x08 /* CDROM */ -#define DK_CDR 0x09 /* CD-R */ -#define DK_CDRW 0x0A /* CD-RW */ -#define DK_DVDROM 0x10 /* DVD-ROM */ -#define DK_DVDR 0x11 /* DVD-R */ -#define DK_DVDRAM 0x12 /* DVD_RAM or DVD-RW */ - -/* - * Media types for other rewritable magnetic media - */ -#define DK_FIXED_DISK 0x10001 /* Fixed disk SCSI or otherwise */ -#define DK_FLOPPY 0x10002 /* Floppy media */ -#define DK_ZIP 0x10003 /* IOMEGA ZIP media */ -#define DK_JAZ 0x10004 /* IOMEGA JAZ media */ - -#define DKIOCSETEFI (DKIOC|17) /* Set EFI info */ -#define DKIOCGETEFI (DKIOC|18) /* Get EFI info */ - -#define DKIOCPARTITION (DKIOC|9) /* Get partition info */ - -/* - * Ioctls to get/set volume capabilities related to Logical Volume Managers. - * They include the ability to get/set capabilities and to issue a read to a - * specific underlying device of a replicated device. - */ - -#define DKIOCGETVOLCAP (DKIOC | 25) /* Get volume capabilities */ -#define DKIOCSETVOLCAP (DKIOC | 26) /* Set volume capabilities */ -#define DKIOCDMR (DKIOC | 27) /* Issue a directed read */ - -typedef uint_t volcapinfo_t; - -typedef uint_t volcapset_t; - -#define DKV_ABR_CAP 0x00000001 /* Support Appl.Based Recovery */ -#define DKV_DMR_CAP 0x00000002 /* Support Directed Mirror Read */ - -typedef struct volcap { - volcapinfo_t vc_info; /* Capabilities available */ - volcapset_t vc_set; /* Capabilities set */ -} volcap_t; - -#define VOL_SIDENAME 256 - -typedef struct vol_directed_rd { - int vdr_flags; - offset_t vdr_offset; - size_t vdr_nbytes; - size_t vdr_bytesread; - void *vdr_data; - int vdr_side; - char vdr_side_name[VOL_SIDENAME]; -} vol_directed_rd_t; - -#define DKV_SIDE_INIT (-1) -#define DKV_DMR_NEXT_SIDE 0x00000001 -#define DKV_DMR_DONE 0x00000002 -#define DKV_DMR_ERROR 0x00000004 -#define DKV_DMR_SUCCESS 0x00000008 -#define DKV_DMR_SHORT 0x00000010 - -#ifdef _MULTI_DATAMODEL -#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 -#pragma pack(4) -#endif -typedef struct vol_directed_rd32 { - int32_t vdr_flags; - offset_t vdr_offset; /* 64-bit element on 32-bit alignment */ - size32_t vdr_nbytes; - size32_t vdr_bytesread; - caddr32_t vdr_data; - int32_t vdr_side; - char vdr_side_name[VOL_SIDENAME]; -} vol_directed_rd32_t; -#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 -#pragma pack() -#endif -#endif /* _MULTI_DATAMODEL */ - -/* - * The ioctl is used to fetch disk's device type, vendor ID, - * model number/product ID, firmware revision and serial number together. - * - * Currently there are two device types - DKD_ATA_TYPE which means the - * disk is driven by cmdk/ata or dad/uata driver, and DKD_SCSI_TYPE - * which means the disk is driven by sd/scsi hba driver. - */ -#define DKIOC_GETDISKID (DKIOC|46) - -/* These two labels are for dkd_dtype of dk_disk_id_t */ -#define DKD_ATA_TYPE 0x01 /* ATA disk or legacy mode SATA disk */ -#define DKD_SCSI_TYPE 0x02 /* SCSI disk or native mode SATA disk */ - -#define DKD_ATA_MODEL 40 /* model number length */ -#define DKD_ATA_FWVER 8 /* firmware revision length */ -#define DKD_ATA_SERIAL 20 /* serial number length */ - -#define DKD_SCSI_VENDOR 8 /* vendor ID length */ -#define DKD_SCSI_PRODUCT 16 /* product ID length */ -#define DKD_SCSI_REVLEVEL 4 /* revision level length */ -#define DKD_SCSI_SERIAL 12 /* serial number length */ - -/* - * The argument type for DKIOC_GETDISKID ioctl. - */ -typedef struct dk_disk_id { - uint_t dkd_dtype; - union { - struct { - char dkd_amodel[DKD_ATA_MODEL]; /* 40 bytes */ - char dkd_afwver[DKD_ATA_FWVER]; /* 8 bytes */ - char dkd_aserial[DKD_ATA_SERIAL]; /* 20 bytes */ - } ata_disk_id; - struct { - char dkd_svendor[DKD_SCSI_VENDOR]; /* 8 bytes */ - char dkd_sproduct[DKD_SCSI_PRODUCT]; /* 16 bytes */ - char dkd_sfwver[DKD_SCSI_REVLEVEL]; /* 4 bytes */ - char dkd_sserial[DKD_SCSI_SERIAL]; /* 12 bytes */ - } scsi_disk_id; - } disk_id; -} dk_disk_id_t; - -/* - * The ioctl is used to update the firmware of device. - */ -#define DKIOC_UPDATEFW (DKIOC|47) - -/* The argument type for DKIOC_UPDATEFW ioctl */ -typedef struct dk_updatefw { - caddr_t dku_ptrbuf; /* pointer to firmware buf */ - uint_t dku_size; /* firmware buf length */ - uint8_t dku_type; /* firmware update type */ -} dk_updatefw_t; - -#ifdef _SYSCALL32 -typedef struct dk_updatefw_32 { - caddr32_t dku_ptrbuf; /* pointer to firmware buf */ - uint_t dku_size; /* firmware buf length */ - uint8_t dku_type; /* firmware update type */ -} dk_updatefw_32_t; -#endif /* _SYSCALL32 */ - -/* - * firmware update type - temporary or permanent use - */ -#define FW_TYPE_TEMP 0x0 /* temporary use */ -#define FW_TYPE_PERM 0x1 /* permanent use */ - - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_DKIO_H */ +#endif /* _SPL_DKIO_H */ diff --git a/include/sys/dklabel.h b/include/sys/dklabel.h index 77d5da10e..df6bc4791 100644 --- a/include/sys/dklabel.h +++ b/include/sys/dklabel.h @@ -1,268 +1,4 @@ -/* - * 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 1990-2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _SPL_DKLABEL_H +#define _SPL_DKLABEL_H -#ifndef _SYS_DKLABEL_H -#define _SYS_DKLABEL_H - - - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Miscellaneous defines - */ -#define DKL_MAGIC 0xDABE /* magic number */ -#define FKL_MAGIC 0xff /* magic number for DOS floppies */ - -#if defined(_SUNOS_VTOC_16) -#define NDKMAP 16 /* # of logical partitions */ -#define DK_LABEL_LOC 1 /* location of disk label */ -#elif defined(_SUNOS_VTOC_8) -#define NDKMAP 8 /* # of logical partitions */ -#define DK_LABEL_LOC 0 /* location of disk label */ -#else -#error "No VTOC format defined." -#endif - -#define LEN_DKL_ASCII 128 /* length of dkl_asciilabel */ -#define LEN_DKL_VVOL 8 /* length of v_volume */ -#define DK_LABEL_SIZE 512 /* size of disk label */ -#define DK_MAX_BLOCKS 0x7fffffff /* max # of blocks handled */ - -/* - * Reserve two cylinders on SCSI disks. - * One is for the backup disk label and the other is for the deviceid. - * - * IPI disks only reserve one cylinder, but they will go away soon. - * CDROMs do not reserve any cylinders. - */ -#define DK_ACYL 2 - -/* - * Format of a Sun disk label. - * Resides in cylinder 0, head 0, sector 0. - * - * sizeof (struct dk_label) should be 512 (the current sector size), - * but should the sector size increase, this structure should remain - * at the beginning of the sector. - */ - -/* - * partition headers: section 1 - * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I)) - */ -struct dk_map { - daddr_t dkl_cylno; /* starting cylinder */ - daddr_t dkl_nblk; /* number of blocks; if == 0, */ - /* partition is undefined */ -}; - -/* - * partition headers: section 1 - * Fixed size for on-disk dk_label - */ -struct dk_map32 { - daddr32_t dkl_cylno; /* starting cylinder */ - daddr32_t dkl_nblk; /* number of blocks; if == 0, */ - /* partition is undefined */ -}; - -/* - * partition headers: section 2, - * brought over from AT&T SVr4 vtoc structure. - */ -struct dk_map2 { - uint16_t p_tag; /* ID tag of partition */ - uint16_t p_flag; /* permission flag */ -}; - -struct dkl_partition { - uint16_t p_tag; /* ID tag of partition */ - uint16_t p_flag; /* permision flags */ - daddr32_t p_start; /* start sector no of partition */ - int32_t p_size; /* # of blocks in partition */ -}; - - -/* - * VTOC inclusions from AT&T SVr4 - * Fixed sized types for on-disk VTOC - */ - -struct dk_vtoc { -#if defined(_SUNOS_VTOC_16) - uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */ - uint32_t v_sanity; /* to verify vtoc sanity */ - uint32_t v_version; /* layout version */ - char v_volume[LEN_DKL_VVOL]; /* volume name */ - uint16_t v_sectorsz; /* sector size in bytes */ - uint16_t v_nparts; /* number of partitions */ - uint32_t v_reserved[10]; /* free space */ - struct dkl_partition v_part[NDKMAP]; /* partition headers */ - time32_t timestamp[NDKMAP]; /* partition timestamp (unsupported) */ - char v_asciilabel[LEN_DKL_ASCII]; /* for compatibility */ -#elif defined(_SUNOS_VTOC_8) - uint32_t v_version; /* layout version */ - char v_volume[LEN_DKL_VVOL]; /* volume name */ - uint16_t v_nparts; /* number of partitions */ - struct dk_map2 v_part[NDKMAP]; /* partition hdrs, sec 2 */ - uint32_t v_bootinfo[3]; /* info needed by mboot */ - uint32_t v_sanity; /* to verify vtoc sanity */ - uint32_t v_reserved[10]; /* free space */ - time32_t v_timestamp[NDKMAP]; /* partition timestamp */ -#else -#error "No VTOC format defined." -#endif -}; - -/* - * define the amount of disk label padding needed to make - * the entire structure occupy 512 bytes. - */ -#if defined(_SUNOS_VTOC_16) -#define LEN_DKL_PAD (DK_LABEL_SIZE - \ - ((sizeof (struct dk_vtoc) + \ - (4 * sizeof (uint32_t)) + \ - (12 * sizeof (uint16_t)) + \ - (2 * (sizeof (uint16_t)))))) -#elif defined(_SUNOS_VTOC_8) -#define LEN_DKL_PAD (DK_LABEL_SIZE \ - - ((LEN_DKL_ASCII) + \ - (sizeof (struct dk_vtoc)) + \ - (sizeof (struct dk_map32) * NDKMAP) + \ - (14 * (sizeof (uint16_t))) + \ - (2 * (sizeof (uint16_t))))) -#else -#error "No VTOC format defined." -#endif - - -struct dk_label { -#if defined(_SUNOS_VTOC_16) - struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */ - uint32_t dkl_pcyl; /* # of physical cylinders */ - uint32_t dkl_ncyl; /* # of data cylinders */ - uint16_t dkl_acyl; /* # of alternate cylinders */ - uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */ - uint32_t dkl_nhead; /* # of heads */ - uint32_t dkl_nsect; /* # of data sectors per track */ - uint16_t dkl_intrlv; /* interleave factor */ - uint16_t dkl_skew; /* skew factor */ - uint16_t dkl_apc; /* alternates per cyl (SCSI only) */ - uint16_t dkl_rpm; /* revolutions per minute */ - uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */ - uint16_t dkl_read_reinstruct; /* # sectors to skip, reads */ - uint16_t dkl_extra[4]; /* for compatible expansion */ - char dkl_pad[LEN_DKL_PAD]; /* unused part of 512 bytes */ -#elif defined(_SUNOS_VTOC_8) - char dkl_asciilabel[LEN_DKL_ASCII]; /* for compatibility */ - struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */ - uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */ - uint16_t dkl_read_reinstruct; /* # sectors to skip, reads */ - char dkl_pad[LEN_DKL_PAD]; /* unused part of 512 bytes */ - uint16_t dkl_rpm; /* rotations per minute */ - uint16_t dkl_pcyl; /* # physical cylinders */ - uint16_t dkl_apc; /* alternates per cylinder */ - uint16_t dkl_obs1; /* obsolete */ - uint16_t dkl_obs2; /* obsolete */ - uint16_t dkl_intrlv; /* interleave factor */ - uint16_t dkl_ncyl; /* # of data cylinders */ - uint16_t dkl_acyl; /* # of alternate cylinders */ - uint16_t dkl_nhead; /* # of heads in this partition */ - uint16_t dkl_nsect; /* # of 512 byte sectors per track */ - uint16_t dkl_obs3; /* obsolete */ - uint16_t dkl_obs4; /* obsolete */ - struct dk_map32 dkl_map[NDKMAP]; /* logical partition headers */ -#else -#error "No VTOC format defined." -#endif - uint16_t dkl_magic; /* identifies this label format */ - uint16_t dkl_cksum; /* xor checksum of sector */ -}; - -#if defined(_SUNOS_VTOC_16) -#define dkl_asciilabel dkl_vtoc.v_asciilabel -#define v_timestamp timestamp - -#elif defined(_SUNOS_VTOC_8) - -/* - * These defines are for historic compatibility with old drivers. - */ -#define dkl_gap1 dkl_obs1 /* used to be gap1 */ -#define dkl_gap2 dkl_obs2 /* used to be gap2 */ -#define dkl_bhead dkl_obs3 /* used to be label head offset */ -#define dkl_ppart dkl_obs4 /* used to by physical partition */ -#else -#error "No VTOC format defined." -#endif - -struct fk_label { /* DOS floppy label */ - uchar_t fkl_type; - uchar_t fkl_magich; - uchar_t fkl_magicl; - uchar_t filler; -}; - -/* - * Layout of stored fabricated device id (on-disk) - */ -#define DK_DEVID_BLKSIZE (512) -#define DK_DEVID_SIZE (DK_DEVID_BLKSIZE - ((sizeof (uchar_t) * 7))) -#define DK_DEVID_REV_MSB (0) -#define DK_DEVID_REV_LSB (1) - -struct dk_devid { - uchar_t dkd_rev_hi; /* revision (MSB) */ - uchar_t dkd_rev_lo; /* revision (LSB) */ - uchar_t dkd_flags; /* flags (not used yet) */ - uchar_t dkd_devid[DK_DEVID_SIZE]; /* devid stored here */ - uchar_t dkd_checksum3; /* checksum (MSB) */ - uchar_t dkd_checksum2; - uchar_t dkd_checksum1; - uchar_t dkd_checksum0; /* checksum (LSB) */ -}; - -#define DKD_GETCHKSUM(dkd) ((dkd)->dkd_checksum3 << 24) + \ - ((dkd)->dkd_checksum2 << 16) + \ - ((dkd)->dkd_checksum1 << 8) + \ - ((dkd)->dkd_checksum0) - -#define DKD_FORMCHKSUM(c, dkd) (dkd)->dkd_checksum3 = hibyte(hiword((c))); \ - (dkd)->dkd_checksum2 = lobyte(hiword((c))); \ - (dkd)->dkd_checksum1 = hibyte(loword((c))); \ - (dkd)->dkd_checksum0 = lobyte(loword((c))); -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_DKLABEL_H */ +#endif /* _SPL_DKLABEL_H */ diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index cd2840d0e..3730561da 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -1,482 +1,4 @@ -/* - * 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 _SPL_ISA_DEFS_H +#define _SPL_ISA_DEFS_H -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_ISA_DEFS_H -#define _SYS_ISA_DEFS_H - - - -/* - * This header file serves to group a set of well known defines and to - * set these for each instruction set architecture. These defines may - * be divided into two groups; characteristics of the processor and - * implementation choices for Solaris on a processor. - * - * Processor Characteristics: - * - * _LITTLE_ENDIAN / _BIG_ENDIAN: - * The natural byte order of the processor. A pointer to an int points - * to the least/most significant byte of that int. - * - * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD: - * The processor specific direction of stack growth. A push onto the - * stack increases/decreases the stack pointer, so it stores data at - * successively higher/lower addresses. (Stackless machines ignored - * without regrets). - * - * _LONG_LONG_HTOL / _LONG_LONG_LTOH: - * A pointer to a long long points to the most/least significant long - * within that long long. - * - * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH: - * The C compiler assigns bit fields from the high/low to the low/high end - * of an int (most to least significant vs. least to most significant). - * - * _IEEE_754: - * The processor (or supported implementations of the processor) - * supports the ieee-754 floating point standard. No other floating - * point standards are supported (or significant). Any other supported - * floating point formats are expected to be cased on the ISA processor - * symbol. - * - * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED: - * The C Compiler implements objects of type `char' as `unsigned' or - * `signed' respectively. This is really an implementation choice of - * the compiler writer, but it is specified in the ABI and tends to - * be uniform across compilers for an instruction set architecture. - * Hence, it has the properties of a processor characteristic. - * - * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT / - * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT / - * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT: - * The ABI defines alignment requirements of each of the primitive - * object types. Some, if not all, may be hardware requirements as - * well. The values are expressed in "byte-alignment" units. - * - * _MAX_ALIGNMENT: - * The most stringent alignment requirement as specified by the ABI. - * Equal to the maximum of all the above _XXX_ALIGNMENT values. - * - * _ALIGNMENT_REQUIRED: - * True or false (1 or 0) whether or not the hardware requires the ABI - * alignment. - * - * _LONG_LONG_ALIGNMENT_32 - * The 32-bit ABI supported by a 64-bit kernel may have different - * alignment requirements for primitive object types. The value of this - * identifier is expressed in "byte-alignment" units. - * - * _HAVE_CPUID_INSN - * This indicates that the architecture supports the 'cpuid' - * instruction as defined by Intel. (Intel allows other vendors - * to extend the instruction for their own purposes.) - * - * - * Implementation Choices: - * - * _ILP32 / _LP64: - * This specifies the compiler data type implementation as specified in - * the relevant ABI. The choice between these is strongly influenced - * by the underlying hardware, but is not absolutely tied to it. - * Currently only two data type models are supported: - * - * _ILP32: - * Int/Long/Pointer are 32 bits. This is the historical UNIX - * and Solaris implementation. Due to its historical standing, - * this is the default case. - * - * _LP64: - * Long/Pointer are 64 bits, Int is 32 bits. This is the chosen - * implementation for 64-bit ABIs such as SPARC V9. - * - * _I32LPx: - * A compilation environment where 'int' is 32-bit, and - * longs and pointers are simply the same size. - * - * In all cases, Char is 8 bits and Short is 16 bits. - * - * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16: - * This specifies the form of the disk VTOC (or label): - * - * _SUNOS_VTOC_8: - * This is a VTOC form which is upwardly compatible with the - * SunOS 4.x disk label and allows 8 partitions per disk. - * - * _SUNOS_VTOC_16: - * In this format the incore vtoc image matches the ondisk - * version. It allows 16 slices per disk, and is not - * compatible with the SunOS 4.x disk label. - * - * Note that these are not the only two VTOC forms possible and - * additional forms may be added. One possible form would be the - * SVr4 VTOC form. The symbol for that is reserved now, although - * it is not implemented. - * - * _SVR4_VTOC_16: - * This VTOC form is compatible with the System V Release 4 - * VTOC (as implemented on the SVr4 Intel and 3b ports) with - * 16 partitions per disk. - * - * - * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR - * This describes the type of addresses used by system DMA: - * - * _DMA_USES_PHYSADDR: - * This type of DMA, used in the x86 implementation, - * requires physical addresses for DMA buffers. The 24-bit - * addresses used by some legacy boards is the source of the - * "low-memory" (<16MB) requirement for some devices using DMA. - * - * _DMA_USES_VIRTADDR: - * This method of DMA allows the use of virtual addresses for - * DMA transfers. - * - * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT - * This indicates the presence/absence of an fdisk table. - * - * _FIRMWARE_NEEDS_FDISK - * The fdisk table is required by system firmware. If present, - * it allows a disk to be subdivided into multiple fdisk - * partitions, each of which is equivalent to a separate, - * virtual disk. This enables the co-existence of multiple - * operating systems on a shared hard disk. - * - * _NO_FDISK_PRESENT - * If the fdisk table is absent, it is assumed that the entire - * media is allocated for a single operating system. - * - * _HAVE_TEM_FIRMWARE - * Defined if this architecture has the (fallback) option of - * using prom_* calls for doing I/O if a suitable kernel driver - * is not available to do it. - * - * _DONT_USE_1275_GENERIC_NAMES - * Controls whether or not device tree node names should - * comply with the IEEE 1275 "Generic Names" Recommended - * Practice. With _DONT_USE_GENERIC_NAMES, device-specific - * names identifying the particular device will be used. - * - * __i386_COMPAT - * This indicates whether the i386 ABI is supported as a *non-native* - * mode for the platform. When this symbol is defined: - * - 32-bit xstat-style system calls are enabled - * - 32-bit xmknod-style system calls are enabled - * - 32-bit system calls use i386 sizes -and- alignments - * - * Note that this is NOT defined for the i386 native environment! - * - * __x86 - * This is ONLY a synonym for defined(__i386) || defined(__amd64) - * which is useful only insofar as these two architectures share - * common attributes. Analogous to __sparc. - * - * _PSM_MODULES - * This indicates whether or not the implementation uses PSM - * modules for processor support, reading /etc/mach from inside - * the kernel to extract a list. - * - * _RTC_CONFIG - * This indicates whether or not the implementation uses /etc/rtc_config - * to configure the real-time clock in the kernel. - * - * _UNIX_KRTLD - * This indicates that the implementation uses a dynamically - * linked unix + krtld to form the core kernel image at boot - * time, or (in the absence of this symbol) a prelinked kernel image. - * - * _OBP - * This indicates the firmware interface is OBP. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following set of definitions characterize Solaris on AMD's - * 64-bit systems. - */ -#if defined(__x86_64) || defined(__amd64) - -#if !defined(__amd64) -#define __amd64 /* preferred guard */ -#endif - -#if !defined(__x86) -#define __x86 -#endif - -/* - * Define the appropriate "processor characteristics" - */ -#define _LITTLE_ENDIAN -#define _STACK_GROWS_DOWNWARD -#define _LONG_LONG_LTOH -#define _BIT_FIELDS_LTOH -#define _IEEE_754 -#define _CHAR_IS_SIGNED -#define _BOOL_ALIGNMENT 1 -#define _CHAR_ALIGNMENT 1 -#define _SHORT_ALIGNMENT 2 -#define _INT_ALIGNMENT 4 -#define _FLOAT_ALIGNMENT 4 -#define _FLOAT_COMPLEX_ALIGNMENT 4 -#define _LONG_ALIGNMENT 8 -#define _LONG_LONG_ALIGNMENT 8 -#define _DOUBLE_ALIGNMENT 8 -#define _DOUBLE_COMPLEX_ALIGNMENT 8 -#define _LONG_DOUBLE_ALIGNMENT 16 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 16 -#define _POINTER_ALIGNMENT 8 -#define _MAX_ALIGNMENT 16 -#define _ALIGNMENT_REQUIRED 1 - -/* - * Different alignment constraints for the i386 ABI in compatibility mode - */ -#define _LONG_LONG_ALIGNMENT_32 4 - -/* - * Define the appropriate "implementation choices". - */ -#if !defined(_LP64) -#define _LP64 -#endif -#if !defined(_I32LPx) && defined(_KERNEL) -#define _I32LPx -#endif -#define _MULTI_DATAMODEL -#define _SUNOS_VTOC_16 -#define _DMA_USES_PHYSADDR -#define _FIRMWARE_NEEDS_FDISK -#define __i386_COMPAT -#define _PSM_MODULES -#define _RTC_CONFIG -#define _DONT_USE_1275_GENERIC_NAMES -#define _HAVE_CPUID_INSN - -/* - * The feature test macro __i386 is generic for all processors implementing - * the Intel 386 instruction set or a superset of it. Specifically, this - * includes all members of the 386, 486, and Pentium family of processors. - */ -#elif defined(__i386) || defined(__i386__) - -#if !defined(__i386) -#define __i386 -#endif - -#if !defined(__x86) -#define __x86 -#endif - -/* - * Define the appropriate "processor characteristics" - */ -#define _LITTLE_ENDIAN -#define _STACK_GROWS_DOWNWARD -#define _LONG_LONG_LTOH -#define _BIT_FIELDS_LTOH -#define _IEEE_754 -#define _CHAR_IS_SIGNED -#define _BOOL_ALIGNMENT 1 -#define _CHAR_ALIGNMENT 1 -#define _SHORT_ALIGNMENT 2 -#define _INT_ALIGNMENT 4 -#define _FLOAT_ALIGNMENT 4 -#define _FLOAT_COMPLEX_ALIGNMENT 4 -#define _LONG_ALIGNMENT 4 -#define _LONG_LONG_ALIGNMENT 4 -#define _DOUBLE_ALIGNMENT 4 -#define _DOUBLE_COMPLEX_ALIGNMENT 4 -#define _LONG_DOUBLE_ALIGNMENT 4 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 4 -#define _POINTER_ALIGNMENT 4 -#define _MAX_ALIGNMENT 4 -#define _ALIGNMENT_REQUIRED 0 - -#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT - -/* - * Define the appropriate "implementation choices". - */ -#define _ILP32 -#if !defined(_I32LPx) && defined(_KERNEL) -#define _I32LPx -#endif -#define _SUNOS_VTOC_16 -#define _DMA_USES_PHYSADDR -#define _FIRMWARE_NEEDS_FDISK -#define _PSM_MODULES -#define _RTC_CONFIG -#define _DONT_USE_1275_GENERIC_NAMES -#define _HAVE_CPUID_INSN - -/* - * The following set of definitions characterize the Solaris on SPARC systems. - * - * The symbol __sparc indicates any of the SPARC family of processor - * architectures. This includes SPARC V7, SPARC V8 and SPARC V9. - * - * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined - * by Version 8 of the SPARC Architecture Manual. (SPARC V7 is close enough - * to SPARC V8 for the former to be subsumed into the latter definition.) - * - * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined - * by Version 9 of the SPARC Architecture Manual. - * - * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only - * relevant when the symbol __sparc is defined. - */ -/* - * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added - * to support backwards builds. This workaround should be removed in s10_71. - */ -#elif defined(__sparc) || defined(__sparcv9) || defined(__sparc__) -#if !defined(__sparc) -#define __sparc -#endif - -/* - * You can be 32-bit or 64-bit, but not both at the same time. - */ -#if defined(__sparcv8) && defined(__sparcv9) -#error "SPARC Versions 8 and 9 are mutually exclusive choices" -#endif - -/* - * Existing compilers do not set __sparcv8. Years will transpire before - * the compilers can be depended on to set the feature test macro. In - * the interim, we'll set it here on the basis of historical behaviour; - * if you haven't asked for SPARC V9, then you must've meant SPARC V8. - */ -#if !defined(__sparcv9) && !defined(__sparcv8) -#define __sparcv8 -#endif - -/* - * Define the appropriate "processor characteristics" shared between - * all Solaris on SPARC systems. - */ -#define _BIG_ENDIAN -#define _STACK_GROWS_DOWNWARD -#define _LONG_LONG_HTOL -#define _BIT_FIELDS_HTOL -#define _IEEE_754 -#define _CHAR_IS_SIGNED -#define _BOOL_ALIGNMENT 1 -#define _CHAR_ALIGNMENT 1 -#define _SHORT_ALIGNMENT 2 -#define _INT_ALIGNMENT 4 -#define _FLOAT_ALIGNMENT 4 -#define _FLOAT_COMPLEX_ALIGNMENT 4 -#define _LONG_LONG_ALIGNMENT 8 -#define _DOUBLE_ALIGNMENT 8 -#define _DOUBLE_COMPLEX_ALIGNMENT 8 -#define _ALIGNMENT_REQUIRED 1 - -/* - * Define the appropriate "implementation choices" shared between versions. - */ -#define _SUNOS_VTOC_8 -#define _DMA_USES_VIRTADDR -#define _NO_FDISK_PRESENT -#define _HAVE_TEM_FIRMWARE -#define _OBP - -/* - * The following set of definitions characterize the implementation of - * 32-bit Solaris on SPARC V8 systems. - */ -#if defined(__sparcv8) - -/* - * Define the appropriate "processor characteristics" - */ -#define _LONG_ALIGNMENT 4 -#define _LONG_DOUBLE_ALIGNMENT 8 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 8 -#define _POINTER_ALIGNMENT 4 -#define _MAX_ALIGNMENT 8 - -#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT - -/* - * Define the appropriate "implementation choices" - */ -#define _ILP32 -#if !defined(_I32LPx) && defined(_KERNEL) -#define _I32LPx -#endif - -/* - * The following set of definitions characterize the implementation of - * 64-bit Solaris on SPARC V9 systems. - */ -#elif defined(__sparcv9) - -/* - * Define the appropriate "processor characteristics" - */ -#define _LONG_ALIGNMENT 8 -#define _LONG_DOUBLE_ALIGNMENT 16 -#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 16 -#define _POINTER_ALIGNMENT 8 -#define _MAX_ALIGNMENT 16 - -#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGMENT - -/* - * Define the appropriate "implementation choices" - */ -#if !defined(_LP64) -#define _LP64 -#endif -#if !defined(_I32LPx) -#define _I32LPx -#endif -#define _MULTI_DATAMODEL - -#else -#error "unknown SPARC version" -#endif - -/* - * #error is strictly ansi-C, but works as well as anything for K&R systems. - */ -#else -#error "ISA not supported" -#endif - -#if defined(_ILP32) && defined(_LP64) -#error "Both _ILP32 and _LP64 are defined" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_ISA_DEFS_H */ +#endif /* _SPL_ISA_DEFS_H */ diff --git a/include/sys/sid.h b/include/sys/sid.h index 937a71ea8..530c91a75 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -1,4 +1,4 @@ #ifndef _SPL_SID_H #define _SPL_SID_H -#endif /* SPL_SID_H */ +#endif /* _SPL_SID_H */ diff --git a/include/sys/types32.h b/include/sys/types32.h index 5b5085659..290da02f3 100644 --- a/include/sys/types32.h +++ b/include/sys/types32.h @@ -1,90 +1,12 @@ -/* - * 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 - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_TYPES32_H -#define _SYS_TYPES32_H +#ifndef _SPL_TYPES32_H +#define _SPL_TYPES32_H #include #include -#ifdef __cplusplus -extern "C" { -#endif +typedef uint32_t caddr32_t; +typedef int32_t daddr32_t; +typedef int32_t time32_t; +typedef uint32_t size32_t; -/* - * Interoperability types for programs. Used for: - * - * Crossing between 32-bit and 64-bit domains. - * - * On disk data formats such as filesystem meta data - * and disk label. - * - * Note: Applications should never include this - * header file. - */ -typedef uint32_t caddr32_t; -typedef int32_t daddr32_t; -typedef int32_t off32_t; -typedef uint32_t ino32_t; -typedef int32_t blkcnt32_t; -typedef uint32_t fsblkcnt32_t; -typedef uint32_t fsfilcnt32_t; -typedef int32_t id32_t; -typedef uint32_t major32_t; -typedef uint32_t minor32_t; -typedef int32_t key32_t; -typedef uint32_t mode32_t; -typedef uint32_t uid32_t; -typedef uint32_t gid32_t; -typedef uint32_t nlink32_t; -typedef uint32_t dev32_t; -typedef int32_t pid32_t; -typedef uint32_t size32_t; -typedef int32_t ssize32_t; -typedef int32_t time32_t; -typedef int32_t clock32_t; - -struct timeval32 { - time32_t tv_sec; /* seconds */ - int32_t tv_usec; /* and microseconds */ -}; - -typedef struct timespec32 { - time32_t tv_sec; /* seconds */ - int32_t tv_nsec; /* and nanoseconds */ -} timespec32_t; - -typedef struct timespec32 timestruc32_t; - -typedef struct itimerspec32 { - struct timespec32 it_interval; - struct timespec32 it_value; -} itimerspec32_t; - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_TYPES32_H */ +#endif /* _SPL_TYPES32_H */ From 9f4c835a0efd55139f878c8ed4746cd7da815658 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 28 Mar 2008 18:21:09 +0000 Subject: [PATCH 0057/1062] Correctly functioning 64-bit atomic shim layer. It's not what I would call effecient but it does have the advantage of being correct which is all I need right now. I added a regression test as well. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@57 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/atomic.h | 81 +++++++++++--- modules/spl/Makefile.in | 1 + modules/spl/spl-atomic.c | 10 ++ modules/splat/Makefile.in | 1 + modules/splat/splat-atomic.c | 190 +++++++++++++++++++++++++++++++++ modules/splat/splat-ctl.c | 2 + modules/splat/splat-internal.h | 4 + 7 files changed, 275 insertions(+), 14 deletions(-) create mode 100644 modules/spl/spl-atomic.c create mode 100644 modules/splat/splat-atomic.c diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 1f2a4780b..647d0db9a 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -6,43 +6,90 @@ extern "C" { #endif #include -/* FIXME - NONE OF THIS IS ATOMIC, IT SHOULD BE. I think we can - * get by for now since I'm only working on real 64bit systems but - * this will need to be addressed properly. +#include + +/* XXX: Serialize everything through global locks. This is + * going to be bad for performance, but for now it's the easiest + * way to ensure correct behavior. I don't like it at all. + * It would be nicer to make these function to the atomic linux + * functions, but the normal uint64_t type complicates this. */ +extern spinlock_t atomic64_lock; +extern spinlock_t atomic32_lock; +extern spinlock_t atomic_lock; + +static __inline__ uint32_t +atomic_add_32(volatile uint32_t *target, int32_t delta) +{ + uint32_t rc; + + spin_lock(&atomic32_lock); + rc = *target; + *target += delta; + spin_unlock(&atomic32_lock); + + return rc; +} static __inline__ void atomic_inc_64(volatile uint64_t *target) { + spin_lock(&atomic64_lock); (*target)++; + spin_unlock(&atomic64_lock); } static __inline__ void atomic_dec_64(volatile uint64_t *target) { + spin_lock(&atomic64_lock); (*target)--; -} - -static __inline__ uint32_t -atomic_add_32(volatile uint32_t *target, int32_t delta) -{ - uint32_t rc = *target; - *target += delta; - return rc; + spin_unlock(&atomic64_lock); } static __inline__ uint64_t atomic_add_64(volatile uint64_t *target, uint64_t delta) { - uint64_t rc = *target; + uint64_t rc; + + spin_lock(&atomic64_lock); + rc = *target; *target += delta; + spin_unlock(&atomic64_lock); + + return rc; +} + +static __inline__ uint64_t +atomic_sub_64(volatile uint64_t *target, uint64_t delta) +{ + uint64_t rc; + + spin_lock(&atomic64_lock); + rc = *target; + *target -= delta; + spin_unlock(&atomic64_lock); + return rc; } static __inline__ uint64_t atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) { + spin_lock(&atomic64_lock); *target += delta; + spin_unlock(&atomic64_lock); + + return *target; +} + +static __inline__ uint64_t +atomic_sub_64_nv(volatile uint64_t *target, uint64_t delta) +{ + spin_lock(&atomic64_lock); + *target -= delta; + spin_unlock(&atomic64_lock); + return *target; } @@ -50,10 +97,13 @@ static __inline__ uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval) { - uint64_t rc = *target; + uint64_t rc; + spin_lock(&atomic64_lock); + rc = *target; if (*target == cmp) *target = newval; + spin_unlock(&atomic64_lock); return rc; } @@ -61,10 +111,13 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, static __inline__ void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { - void *rc = (void *)target; + void *rc; + spin_lock(&atomic_lock); + rc = (void *)target; if (target == cmp) target = newval; + spin_unlock(&atomic_lock); return rc; } diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index bcc25be97..7f16904ef 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -19,6 +19,7 @@ spl-objs += spl-time.o spl-objs += spl-kobj.o spl-objs += spl-module.o spl-objs += spl-generic.o +spl-objs += spl-atomic.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/spl/spl-atomic.c b/modules/spl/spl-atomic.c new file mode 100644 index 000000000..fb161c520 --- /dev/null +++ b/modules/spl/spl-atomic.c @@ -0,0 +1,10 @@ +#include + +/* Global atomic lock declarations */ +spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED; +spinlock_t atomic32_lock = SPIN_LOCK_UNLOCKED; +spinlock_t atomic_lock = SPIN_LOCK_UNLOCKED; + +EXPORT_SYMBOL(atomic64_lock); +EXPORT_SYMBOL(atomic32_lock); +EXPORT_SYMBOL(atomic_lock); diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index 69f38b1f5..8c814d3e2 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -23,6 +23,7 @@ splat-objs += splat-rwlock.o splat-objs += splat-time.o splat-objs += splat-vnode.o splat-objs += splat-kobj.o +splat-objs += splat-atomic.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/splat/splat-atomic.c b/modules/splat/splat-atomic.c new file mode 100644 index 000000000..c170cc05e --- /dev/null +++ b/modules/splat/splat-atomic.c @@ -0,0 +1,190 @@ +#include "splat-internal.h" + +#define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 +#define SPLAT_ATOMIC_NAME "atomic" +#define SPLAT_ATOMIC_DESC "Kernel Atomic Tests" + +#define SPLAT_ATOMIC_TEST1_ID 0x0b01 +#define SPLAT_ATOMIC_TEST1_NAME "64-bit" +#define SPLAT_ATOMIC_TEST1_DESC "Validate 64-bit atomic ops" + +#define SPLAT_ATOMIC_TEST_MAGIC 0x43435454UL +#define SPLAT_ATOMIC_INIT_VALUE 10000000UL + +typedef enum { + SPLAT_ATOMIC_INC_64 = 0, + SPLAT_ATOMIC_DEC_64 = 1, + SPLAT_ATOMIC_ADD_64 = 2, + SPLAT_ATOMIC_SUB_64 = 3, + SPLAT_ATOMIC_ADD_64_NV = 4, + SPLAT_ATOMIC_SUB_64_NV = 5, + SPLAT_ATOMIC_COUNT_64 = 6 +} atomic_op_t; + +typedef struct atomic_priv { + unsigned long ap_magic; + struct file *ap_file; + spinlock_t ap_lock; + wait_queue_head_t ap_waitq; + volatile uint64_t ap_atomic; + volatile uint64_t ap_atomic_exited; + atomic_op_t ap_op; + +} atomic_priv_t; + +static void +splat_atomic_work(void *priv) +{ + atomic_priv_t *ap; + atomic_op_t op; + int i; + + ap = (atomic_priv_t *)priv; + ASSERT(ap->ap_magic == SPLAT_ATOMIC_TEST_MAGIC); + + spin_lock(&ap->ap_lock); + op = ap->ap_op; + wake_up(&ap->ap_waitq); + spin_unlock(&ap->ap_lock); + + splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, + "Thread %d successfully started: %lu/%lu\n", op, + (long unsigned)ap->ap_atomic, + (long unsigned)ap->ap_atomic_exited); + + for (i = 0; i < SPLAT_ATOMIC_INIT_VALUE / 10; i++) { + + /* Periodically sleep to mix up the ordering */ + if ((i % (SPLAT_ATOMIC_INIT_VALUE / 100)) == 0) { + splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, + "Thread %d sleeping: %lu/%lu\n", op, + (long unsigned)ap->ap_atomic, + (long unsigned)ap->ap_atomic_exited); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ / 100); + } + + switch (op) { + case SPLAT_ATOMIC_INC_64: + atomic_inc_64(&ap->ap_atomic); + break; + case SPLAT_ATOMIC_DEC_64: + atomic_dec_64(&ap->ap_atomic); + break; + case SPLAT_ATOMIC_ADD_64: + atomic_add_64(&ap->ap_atomic, 3); + break; + case SPLAT_ATOMIC_SUB_64: + atomic_sub_64(&ap->ap_atomic, 3); + break; + case SPLAT_ATOMIC_ADD_64_NV: + atomic_add_64_nv(&ap->ap_atomic, 5); + break; + case SPLAT_ATOMIC_SUB_64_NV: + atomic_sub_64_nv(&ap->ap_atomic, 5); + break; + default: + BUG_ON(1); + } + } + + atomic_inc_64(&ap->ap_atomic_exited); + + splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, + "Thread %d successfully exited: %lu/%lu\n", op, + (long unsigned)ap->ap_atomic, + (long unsigned)ap->ap_atomic_exited); + + thread_exit(); + wake_up(&ap->ap_waitq); +} + +static int +splat_atomic_test1_cond(atomic_priv_t *ap) +{ + return (ap->ap_atomic_exited == SPLAT_ATOMIC_COUNT_64); +} + +static int +splat_atomic_test1(struct file *file, void *arg) +{ + atomic_priv_t ap; + DEFINE_WAIT(wait); + kthread_t *thr; + int i; + + ap.ap_magic = SPLAT_ATOMIC_TEST_MAGIC; + ap.ap_file = file; + spin_lock_init(&ap.ap_lock); + init_waitqueue_head(&ap.ap_waitq); + ap.ap_atomic = SPLAT_ATOMIC_INIT_VALUE; + ap.ap_atomic_exited = 0; + + for (i = 0; i < SPLAT_ATOMIC_COUNT_64; i++) { + spin_lock(&ap.ap_lock); + ap.ap_op = i; + + thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work, + &ap, 0, &p0, TS_RUN, + minclsyspri); + BUG_ON(thr == NULL); + + /* Prepare to wait, the new thread will wake us once it + * has made a copy of the unique private passed data */ + prepare_to_wait(&ap.ap_waitq, &wait, TASK_UNINTERRUPTIBLE); + spin_unlock(&ap.ap_lock); + schedule(); + } + + wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap)); + + if (ap.ap_atomic != SPLAT_ATOMIC_INIT_VALUE) { + splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, + "Final value %lu does not match initial value %lu\n", + (long unsigned)ap.ap_atomic, SPLAT_ATOMIC_INIT_VALUE); + return -EINVAL; + } + + splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, + "Success initial and final values match, %lu == %lu\n", + (long unsigned)ap.ap_atomic, SPLAT_ATOMIC_INIT_VALUE); + + return 0; +} + +splat_subsystem_t * +splat_atomic_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_ATOMIC_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_ATOMIC_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_ATOMIC; + + SPLAT_TEST_INIT(sub, SPLAT_ATOMIC_TEST1_NAME, SPLAT_ATOMIC_TEST1_DESC, + SPLAT_ATOMIC_TEST1_ID, splat_atomic_test1); + + return sub; +} + +void +splat_atomic_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_ATOMIC_TEST1_ID); + + kfree(sub); +} + +int +splat_atomic_id(void) { + return SPLAT_SUBSYSTEM_ATOMIC; +} diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index e9026cd8d..d8245737a 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -593,6 +593,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(time); SPLAT_SUBSYSTEM_INIT(vnode); SPLAT_SUBSYSTEM_INIT(kobj); + SPLAT_SUBSYSTEM_INIT(atomic); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, "splatctl"))) @@ -654,6 +655,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(atomic); SPLAT_SUBSYSTEM_FINI(kobj); SPLAT_SUBSYSTEM_FINI(vnode); SPLAT_SUBSYSTEM_FINI(time); diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index aca4b3d38..61d0fd286 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -33,6 +33,7 @@ #include #include #include +#include #include "splat-ctl.h" @@ -172,6 +173,7 @@ splat_subsystem_t * splat_thread_init(void); splat_subsystem_t * splat_time_init(void); splat_subsystem_t * splat_vnode_init(void); splat_subsystem_t * splat_kobj_init(void); +splat_subsystem_t * splat_atomic_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -183,6 +185,7 @@ void splat_thread_fini(splat_subsystem_t *); void splat_time_fini(splat_subsystem_t *); void splat_vnode_fini(splat_subsystem_t *); void splat_kobj_fini(splat_subsystem_t *); +void splat_atomic_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -194,5 +197,6 @@ int splat_thread_id(void); int splat_time_id(void); int splat_vnode_id(void); int splat_kobj_id(void); +int splat_atomic_id(void); #endif /* _SPLAT_INTERNAL_H */ From e487ee08fb0bf55ac20f9d0779f602b5b543b3bf Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 28 Mar 2008 18:22:29 +0000 Subject: [PATCH 0058/1062] Fixed that. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@58 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- FIXME | 2 -- 1 file changed, 2 deletions(-) diff --git a/FIXME b/FIXME index 95c9c76ba..70cb1beca 100644 --- a/FIXME +++ b/FIXME @@ -1,3 +1 @@ -* Implement solaris style atomic interfaces - * Fully implement vnode support for ZPL layer to intergrate with VFS. From 8d0f1ee907d425e71e34e1aea9c1b5465f8cd4d1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 31 Mar 2008 20:42:36 +0000 Subject: [PATCH 0059/1062] Add some crude debugging support. It leaves alot to be desired, but it should allow more easy kernel debugging for now. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@59 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/debug.h | 7 ++ include/sys/kmem.h | 6 +- include/sys/rwlock.h | 2 +- include/sys/sysmacros.h | 2 +- modules/spl/spl-generic.c | 222 +++++++++++++++++++++++++++++++-- modules/spl/spl-kmem.c | 4 +- modules/spl/spl-thread.c | 2 +- modules/spl/spl-vnode.c | 11 +- modules/splat/splat-internal.h | 36 +++--- 9 files changed, 251 insertions(+), 41 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 02f64c2cf..4a6ed5c3d 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -1,4 +1,11 @@ #ifndef _SPL_DEBUG_H #define _SPL_DEBUG_H +extern unsigned long spl_debug_mask; +extern unsigned long spl_debug_subsys; + +void __dprintf(const char *file, const char *func, int line, const char *fmt, ...); +void spl_set_debug_mask(unsigned long mask); +void spl_set_debug_subsys(unsigned long mask); + #endif /* SPL_DEBUG_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 46322105d..58ae07747 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -35,14 +35,14 @@ extern int kmem_warning_flag; \ /* Marked unlikely because we should never be doing this */ \ if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ - printk("Warning: kmem_alloc(%d, 0x%x) large alloc at %s:%d " \ + printk("spl: Warning kmem_alloc(%d, 0x%x) large alloc at %s:%d " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ \ _ptr_ = (void *)allocator((size), (flags)); \ if (_ptr_ == NULL) { \ - printk("Warning: kmem_alloc(%d, 0x%x) failed at %s:%d " \ + printk("spl: Warning kmem_alloc(%d, 0x%x) failed at %s:%d " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ @@ -73,7 +73,7 @@ extern int kmem_warning_flag; \ _ptr_ = (void *)vmalloc((size)); \ if (_ptr_ == NULL) { \ - printk("Warning: vmem_alloc(%d, 0x%x) failed at %s:%d " \ + printk("spl: Warning vmem_alloc(%d, 0x%x) failed at %s:%d " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ atomic64_read(&vmem_alloc_used), vmem_alloc_max); \ diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index ecee07948..6407e632d 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -236,7 +236,7 @@ rw_tryupgrade(krwlock_t *rwlp) * lock. If there is, then we know we should * not try to upgrade the lock */ if (!list_empty(&rwlp->rw_sem.wait_list)) { - printk(KERN_WARNING "There are threads waiting\n"); + printk("spl: Warning There are threads waiting\n"); spin_unlock(&rwlp->rw_sem.wait_lock); return 0; } diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index a64950d10..d5f8597c2 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -80,7 +80,7 @@ extern "C" { const TYPE __left = (TYPE)(LEFT); \ const TYPE __right = (TYPE)(RIGHT); \ if (!(__left OP __right)) { \ - printk("Failed VERIFY3(" FMT " " #OP " " FMT ")\n", \ + printk("spl: Error VERIFY3(" FMT " " #OP " " FMT ")\n", \ CAST __left, CAST __right); \ BUG(); \ } \ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 2773ff689..3c958f518 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -2,11 +2,24 @@ #include #include #include +#include +#include #include "config.h" /* * Generic support */ +static char spl_debug_buffer[MAXMSGLEN]; +static spinlock_t spl_debug_lock = SPIN_LOCK_UNLOCKED; + +unsigned long spl_debug_mask = 0; +unsigned long spl_debug_subsys = 0xff; +EXPORT_SYMBOL(spl_debug_mask); +EXPORT_SYMBOL(spl_debug_subsys); + +static struct proc_dir_entry *spl_proc_root = NULL; +static struct proc_dir_entry *spl_proc_debug_mask = NULL; +static struct proc_dir_entry *spl_proc_debug_subsys = NULL; int p0 = 0; EXPORT_SYMBOL(p0); @@ -17,6 +30,7 @@ EXPORT_SYMBOL(hw_serial); vmem_t *zio_alloc_arena = NULL; EXPORT_SYMBOL(zio_alloc_arena); + int highbit(unsigned long i) { @@ -56,27 +70,221 @@ ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) } EXPORT_SYMBOL(ddi_strtoul); -static int __init spl_init(void) +/* XXX: Not the most efficient debug function ever. This should be re-done + * as an internal per-cpu in-memory debug log accessable via /proc/. Not as + * a shared global buffer everything gets serialize though. That said I'll + * worry about performance considerations once I've dealt with correctness. + */ +void +__dprintf(const char *file, const char *func, int line, const char *fmt, ...) +{ + char *sfp, *start, *ptr; + struct timeval tv; + va_list ap; + + start = ptr = spl_debug_buffer; + sfp = strrchr(file, '/'); + do_gettimeofday(&tv); + + spin_lock(&spl_debug_lock); + ptr += snprintf(ptr, MAXMSGLEN - 1, + "spl: %lu.%06lu:%d:%u:%s:%d:%s(): ", + tv.tv_sec, tv.tv_usec, current->pid, + smp_processor_id(), + sfp == NULL ? file : sfp + 1, + line, func); + + va_start(ap, fmt); + ptr += vsnprintf(ptr, MAXMSGLEN - (ptr - start) - 1, fmt, ap); + va_end(ap); + + printk("%s", start); + spin_unlock(&spl_debug_lock); +} +EXPORT_SYMBOL(__dprintf); + +static int +spl_proc_rd_generic_ul(char *page, char **start, off_t off, + int count, int *eof, unsigned long val) { int rc; - if ((rc = kmem_init())) - return rc; + *start = page; + *eof = 1; - if ((rc = vn_init())) - return rc; + if (off || count > PAGE_SIZE) + return 0; - strcpy(hw_serial, "007f0100"); /* loopback */ - printk(KERN_INFO "spl: Loaded Solaris Porting Layer v%s\n", VERSION); + spin_lock(&spl_debug_lock); + rc = snprintf(page, PAGE_SIZE, "0x%lx\n", val); + spin_unlock(&spl_debug_lock); + + return rc; +} + +static int +spl_proc_rd_debug_mask(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + return spl_proc_rd_generic_ul(page, start, off, count, + eof, spl_debug_mask); +} + +static int +spl_proc_rd_debug_subsys(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + return spl_proc_rd_generic_ul(page, start, off, count, + eof, spl_debug_subsys); +} + +static int +spl_proc_wr_generic_ul(const char *ubuf, unsigned long count, + unsigned long *val, int base) +{ + char *end, kbuf[32]; + + if (count >= sizeof(kbuf)) + return -EOVERFLOW; + + if (copy_from_user(kbuf, ubuf, count)) + return -EFAULT; + + kbuf[count] = '\0'; + *val = (int)simple_strtoul(kbuf, &end, base); + if (kbuf == end) + return -EINVAL; return 0; } +static int +spl_proc_wr_debug_mask(struct file *file, const char *ubuf, + unsigned long count, void *data, int mode) +{ + unsigned long val; + int rc; + + rc = spl_proc_wr_generic_ul(ubuf, count, &val, 16); + if (rc) + return rc; + + spin_lock(&spl_debug_lock); + spl_debug_mask = val; + spin_unlock(&spl_debug_lock); + + return count; +} + +static int +spl_proc_wr_debug_subsys(struct file *file, const char *ubuf, + unsigned long count, void *data, int mode) +{ + unsigned long val; + int rc; + + rc = spl_proc_wr_generic_ul(ubuf, count, &val, 16); + if (rc) + return rc; + + spin_lock(&spl_debug_lock); + spl_debug_subsys = val; + spin_unlock(&spl_debug_lock); + + return count; +} + +static struct proc_dir_entry * +spl_register_proc_entry(const char *name, mode_t mode, + struct proc_dir_entry *parent, void *data, + void *read_proc, void *write_proc) +{ + struct proc_dir_entry *entry; + + entry = create_proc_entry(name, mode, parent); + if (!entry) + return ERR_PTR(-EINVAL); + + entry->data = data; + entry->read_proc = read_proc; + entry->write_proc = write_proc; + + return entry; +} /* register_proc_entry() */ + +void spl_set_debug_mask(unsigned long mask) { + spin_lock(&spl_debug_lock); + spl_debug_mask = mask; + spin_unlock(&spl_debug_lock); +} +EXPORT_SYMBOL(spl_set_debug_mask); + +void spl_set_debug_subsys(unsigned long mask) { + spin_lock(&spl_debug_lock); + spl_debug_subsys = mask; + spin_unlock(&spl_debug_lock); +} +EXPORT_SYMBOL(spl_set_debug_subsys); + +static int __init spl_init(void) +{ + int rc = 0; + + spl_proc_root = proc_mkdir("spl", NULL); + if (!spl_proc_root) { + printk("spl: Error unable to create /proc/spl/ directory\n"); + return -EINVAL; + } + + spl_proc_debug_mask = spl_register_proc_entry("debug_mask", 0644, + spl_proc_root, NULL, + spl_proc_rd_debug_mask, + spl_proc_wr_debug_mask); + if (IS_ERR(spl_proc_debug_mask)) { + rc = PTR_ERR(spl_proc_debug_mask); + goto out; + } + + spl_proc_debug_subsys = spl_register_proc_entry("debug_subsys", 0644, + spl_proc_root, NULL, + spl_proc_rd_debug_subsys, + spl_proc_wr_debug_subsys); + if (IS_ERR(spl_proc_debug_subsys)) { + rc = PTR_ERR(spl_proc_debug_subsys); + goto out2; + } + + if ((rc = kmem_init())) + goto out2; + + if ((rc = vn_init())) + goto out2; + + strcpy(hw_serial, "007f0100"); /* loopback */ + printk("spl: Loaded Solaris Porting Layer v%s\n", VERSION); + + return 0; +out2: + if (spl_proc_debug_mask) + remove_proc_entry("debug_mask", spl_proc_root); + + if (spl_proc_debug_subsys) + remove_proc_entry("debug_subsys", spl_proc_root); +out: + remove_proc_entry("spl", NULL); + + return rc; +} + static void spl_fini(void) { vn_fini(); kmem_fini(); + remove_proc_entry("debug_subsys", spl_proc_root); + remove_proc_entry("debug_mask", spl_proc_root); + remove_proc_entry("spl", NULL); + return; } diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index a1f3b54e2..08387d0d8 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -291,11 +291,11 @@ kmem_fini(void) { #ifdef DEBUG_KMEM if (atomic64_read(&kmem_alloc_used) != 0) - printk("Warning: kmem leaked %ld/%ld bytes\n", + printk("spl: Warning kmem leaked %ld/%ld bytes\n", atomic_read(&kmem_alloc_used), kmem_alloc_max); if (atomic64_read(&vmem_alloc_used) != 0) - printk("Warning: vmem leaked %ld/%ld bytes\n", + printk("spl: Warning vmem leaked %ld/%ld bytes\n", atomic_read(&vmem_alloc_used), vmem_alloc_max); #endif } diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index a2c72f051..ad90e0720 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -90,7 +90,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, /* Solaris says this must never fail so we try forever */ while ((pid = kernel_thread(thread_generic_wrapper, (void *)&tp, 0)) < 0) - printk(KERN_ERR "Unable to create thread; pid = %ld\n", pid); + printk(KERN_ERR "spl: Error unable to create thread; pid = %ld\n", pid); /* All signals are ignored due to sleeping TASK_UNINTERRUPTIBLE */ for (;;) { diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 24ee71293..401c6e0e8 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -428,7 +428,6 @@ vn_getf(int fd) if (fp) { atomic_inc(&fp->f_ref); spin_unlock(&vn_file_lock); - printk("found file\n"); return fp; } @@ -473,17 +472,13 @@ vn_getf(int fd) return fp; out_vnode: - printk("out_vnode\n"); vn_free(vp); out_fget: - printk("out_fget\n"); fput(lfp); out_mutex: - printk("out_mutex\n"); mutex_exit(&fp->f_lock); kmem_cache_free(vn_file_cache, fp); out: - printk("out\n"); return NULL; } /* getf() */ EXPORT_SYMBOL(getf); @@ -593,17 +588,17 @@ vn_fini(void) rc = kmem_cache_destroy(vn_file_cache); if (rc) - printk("Warning leaked vn_file_cache objects\n"); + printk("spl: Warning leaked vn_file_cache objects\n"); vn_file_cache = NULL; spin_unlock(&vn_file_lock); if (leaked > 0) - printk("Warning: %d files leaked\n", leaked); + printk("spl: Warning %d files leaked\n", leaked); rc = kmem_cache_destroy(vn_cache); if (rc) - printk("Warning leaked vn_cache objects\n"); + printk("spl: Warning leaked vn_cache objects\n"); return; } /* vn_fini() */ diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 61d0fd286..525df5902 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -38,47 +38,47 @@ #include "splat-ctl.h" #define SPLAT_SUBSYSTEM_INIT(type) \ -({ splat_subsystem_t *_sub_; \ +({ splat_subsystem_t *_sub_; \ \ - _sub_ = (splat_subsystem_t *)splat_##type##_init(); \ + _sub_ = (splat_subsystem_t *)splat_##type##_init(); \ if (_sub_ == NULL) { \ - printk(KERN_ERR "Error initializing: " #type "\n"); \ + printk(KERN_ERR "splat: Error initializing: " #type "\n"); \ } else { \ - spin_lock(&splat_module_lock); \ - list_add_tail(&(_sub_->subsystem_list), \ + spin_lock(&splat_module_lock); \ + list_add_tail(&(_sub_->subsystem_list), \ &splat_module_list); \ - spin_unlock(&splat_module_lock); \ + spin_unlock(&splat_module_lock); \ } \ }) #define SPLAT_SUBSYSTEM_FINI(type) \ -({ splat_subsystem_t *_sub_, *_tmp_; \ +({ splat_subsystem_t *_sub_, *_tmp_; \ int _id_, _flag_ = 0; \ \ - _id_ = splat_##type##_id(); \ - spin_lock(&splat_module_lock); \ + _id_ = splat_##type##_id(); \ + spin_lock(&splat_module_lock); \ list_for_each_entry_safe(_sub_, _tmp_, &splat_module_list, \ subsystem_list) { \ if (_sub_->desc.id == _id_) { \ list_del_init(&(_sub_->subsystem_list)); \ - spin_unlock(&splat_module_lock); \ - splat_##type##_fini(_sub_); \ + spin_unlock(&splat_module_lock); \ + splat_##type##_fini(_sub_); \ spin_lock(&splat_module_lock); \ _flag_ = 1; \ } \ } \ - spin_unlock(&splat_module_lock); \ + spin_unlock(&splat_module_lock); \ \ if (!_flag_) \ - printk(KERN_ERR "Error finalizing: " #type "\n"); \ + printk(KERN_ERR "splat: Error finalizing: " #type "\n"); \ }) #define SPLAT_TEST_INIT(sub, n, d, tid, func) \ -({ splat_test_t *_test_; \ +({ splat_test_t *_test_; \ \ - _test_ = (splat_test_t *)kmalloc(sizeof(*_test_), GFP_KERNEL); \ + _test_ = (splat_test_t *)kmalloc(sizeof(*_test_), GFP_KERNEL); \ if (_test_ == NULL) { \ - printk(KERN_ERR "Error initializing: " n "/" #tid" \n");\ + printk(KERN_ERR "splat: Error initializing: " n "/" #tid" \n");\ } else { \ memset(_test_, 0, sizeof(*_test_)); \ strncpy(_test_->desc.name, n, SPLAT_NAME_SIZE); \ @@ -93,7 +93,7 @@ }) #define SPLAT_TEST_FINI(sub, tid) \ -({ splat_test_t *_test_, *_tmp_; \ +({ splat_test_t *_test_, *_tmp_; \ int _flag_ = 0; \ \ spin_lock(&((sub)->test_lock)); \ @@ -107,7 +107,7 @@ spin_unlock(&((sub)->test_lock)); \ \ if (!_flag_) \ - printk(KERN_ERR "Error finalizing: " #tid "\n"); \ + printk(KERN_ERR "splat: Error finalizing: " #tid "\n"); \ }) typedef int (*splat_test_func_t)(struct file *, void *); From 4fd2f7eea565ee473ac433f28c1b309999abbd19 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 31 Mar 2008 23:04:07 +0000 Subject: [PATCH 0060/1062] Add vmem_zalloc support. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@60 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 58ae07747..393775fab 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -35,14 +35,14 @@ extern int kmem_warning_flag; \ /* Marked unlikely because we should never be doing this */ \ if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ - printk("spl: Warning kmem_alloc(%d, 0x%x) large alloc at %s:%d " \ + printk("spl: Warning kmem_alloc(%d, 0x%x) large alloc at %s:%d "\ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ \ _ptr_ = (void *)allocator((size), (flags)); \ if (_ptr_ == NULL) { \ - printk("spl: Warning kmem_alloc(%d, 0x%x) failed at %s:%d " \ + printk("spl: Warning kmem_alloc(%d, 0x%x) failed at %s:%d " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ @@ -55,8 +55,8 @@ extern int kmem_warning_flag; _ptr_; \ }) -#define kmem_alloc(size, flags) __kmem_alloc(size, flags, kmalloc) -#define kmem_zalloc(size, flags) __kmem_alloc(size, flags, kzalloc) +#define kmem_alloc(size, flags) __kmem_alloc((size), (flags), kmalloc) +#define kmem_zalloc(size, flags) __kmem_alloc((size), (flags), kzalloc) #define kmem_free(ptr, size) \ ({ \ @@ -69,11 +69,12 @@ extern int kmem_warning_flag; #define __vmem_alloc(size, flags) \ ({ void *_ptr_; \ \ - BUG_ON(flags != KM_SLEEP); \ + BUG_ON(!(flags & KM_SLEEP)); \ \ - _ptr_ = (void *)vmalloc((size)); \ + _ptr_ = (void *)__vmalloc((size), ((flags) | \ + __GFP_HIGHMEM), PAGE_KERNEL); \ if (_ptr_ == NULL) { \ - printk("spl: Warning vmem_alloc(%d, 0x%x) failed at %s:%d " \ + printk("spl: Warning vmem_alloc(%d, 0x%x) failed at %s:%d " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ atomic64_read(&vmem_alloc_used), vmem_alloc_max); \ @@ -86,7 +87,9 @@ extern int kmem_warning_flag; _ptr_; \ }) -#define vmem_alloc(size, flags) __vmem_alloc(size, flags) +#define vmem_alloc(size, flags) __vmem_alloc((size), (flags)) +#define vmem_zalloc(size, flags) __vmem_alloc((size), ((flags) | \ + __GFP_ZERO)) #define vmem_free(ptr, size) \ ({ \ @@ -98,15 +101,19 @@ extern int kmem_warning_flag; #else -#define kmem_alloc(size, flags) kmalloc(size, flags) -#define kmem_zalloc(size, flags) kzalloc(size, flags) +#define kmem_alloc(size, flags) kmalloc((size), (flags)) +#define kmem_zalloc(size, flags) kzalloc((size), (flags)) #define kmem_free(ptr, size) \ ({ \ BUG_ON(!(ptr) || (size) < 0); \ kfree(ptr); \ }) -#define vmem_alloc(size, flags) vmalloc(size) +#define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ + __GFP_HIGHMEM), PAGE_KERNEL) +#define vmem_zalloc(size, flags) __vmalloc((size), ((flags) | \ + __GFP_HIGHMEM | __GFP_ZERO) \ + PAGE_KERNEL) #define vmem_free(ptr, size) \ ({ \ BUG_ON(!(ptr) || (size) < 0); \ From e966e04fd52e0a80ec191b8f784d84b436877667 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 1 Apr 2008 03:24:17 +0000 Subject: [PATCH 0061/1062] Ensure all file ops pointer are NULL or we may end up calling garbage pointers on open/close etc and get what look like random crashes. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@61 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 309188ce5..59183d864 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -56,7 +56,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, BUG_ON(strcmp(node_type, DDI_PSEUDO)); BUG_ON(flag != 0); - fops = kmalloc(sizeof(struct file_operations), GFP_KERNEL); + fops = kzalloc(sizeof(struct file_operations), GFP_KERNEL); if (fops == NULL) return DDI_FAILURE; From 6a585c61de0f3fa369ed7a011e27f94226232562 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 1 Apr 2008 16:09:18 +0000 Subject: [PATCH 0062/1062] Double large kmalloc warning size to 4 pages. It was 2 pages, and ideally it should be dropped to one page but in the short term we should be able to easily live with 4 page allocations. Fix the nvlist bug, it turns out the user space side of things were packing the nvlists correctly as little endian, and the kernel space side of things due to a missing #define were unpacking them as big endian. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@62 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/isa_defs.h | 64 ++++++++++++++++++++++++++++++++++++++++++ include/sys/kmem.h | 2 +- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 3730561da..57a6d366e 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -1,4 +1,68 @@ #ifndef _SPL_ISA_DEFS_H #define _SPL_ISA_DEFS_H +#ifdef __cplusplus +extern "C" { +#endif + +/* x86_64 arch specific defines */ +#if defined(__x86_64) || defined(__x86_64__) + +#if !defined(__x86_64) +#define __x86_64 +#endif + +#if !defined(__amd64) +#define __amd64 +#endif + +#if !defined(__x86) +#define __x86 +#endif + +#if !defined(_LP64) +#define _LP64 +#endif + +/* i386 arch specific defines */ +#elif defined(__i386) || defined(__i386__) + +#if !defined(__i386) +#define __i386 +#endif + +#if !defined(__x86) +#define __x86 +#endif + +#if !defined(_ILP32) +#define _ILP32 +#endif + +#else /* Currently only x86_64 and i386 arches supported */ +#error "Unsupported ISA type" +#endif + +#if defined(_ILP32) && defined(_LP64) +#error "Both _ILP32 and _LP64 are defined" +#endif + +#include + +#if defined(__LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN) +#define _LITTLE_ENDIAN __LITTLE_ENDIAN +#endif + +#if defined(__BIG_ENDIAN) && !defined(_BIG_ENDIAN) +#define _BIG_ENDIAN __BIG_ENDIAN +#endif + +#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) +#error "Both _LITTLE_ENDIAN and __BIG_ENDIAN are defined" +#endif + +#ifdef __cplusplus +} +#endif + #endif /* _SPL_ISA_DEFS_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 393775fab..a33643f15 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -34,7 +34,7 @@ extern int kmem_warning_flag; ({ void *_ptr_; \ \ /* Marked unlikely because we should never be doing this */ \ - if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ + if (unlikely((size) > (PAGE_SIZE * 4)) && kmem_warning_flag) \ printk("spl: Warning kmem_alloc(%d, 0x%x) large alloc at %s:%d "\ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ From 0998fdd6dba7a360131c2addecc8b2d4dc9b7f4a Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 1 Apr 2008 17:00:06 +0000 Subject: [PATCH 0063/1062] Apparently it's OK for done to be NULL, which was not clear in the Solaris man page. Anyway, since apparently this usage is accectable I've updated the function to handle it. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@63 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/vmsystm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 568cb3775..fb9ff9710 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -37,6 +37,8 @@ copyout(const void *from, void *to, size_t len) static __inline__ int copyinstr(const void *from, void *to, size_t len, size_t *done) { + size_t rc; + if (len == 0) return -ENAMETOOLONG; @@ -46,7 +48,9 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) /* XXX: Should return ENAMETOOLONG if 'strlen(from) > len' */ memset(to, 0, len); - *done = copyin(from, to, len - 1); + rc = copyin(from, to, len - 1); + if (done != NULL) + *done = rc; return 0; } From 0a6fd143fd6d2eaac4c364b1da88bf1ce65618d2 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 3 Apr 2008 16:33:31 +0000 Subject: [PATCH 0064/1062] - Remapped ldi_handle_t to struct block_device * which is much more useful - Added liunx block device headers to sunldi.h - Made __taskq_dispatch safe for interrupt context where it turns out we need to be useing it. - Fixed NULL const/dest bug for kmem slab caches - Places debug __dprintf debugging messages under a spin_lock_irqsave so it's safe to use then in interrupt handlers. For debugging only! git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@64 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/sunldi.h | 11 +++++++---- modules/spl/spl-generic.c | 10 ++++++++-- modules/spl/spl-kmem.c | 8 ++++++-- modules/spl/spl-taskq.c | 5 ++--- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index f473350be..4c9c90d79 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -2,6 +2,12 @@ #define _SPL_SUNLDI_H #include +#include +#include +#include +#include + +#define SECTOR_SIZE 512 typedef struct modlinkage { int ml_rev; @@ -17,10 +23,7 @@ typedef struct ldi_ident { dev_t li_dev; } *ldi_ident_t; -typedef struct ldi_handle { - uint_t lh_type; - struct ldi_ident *lh_ident; -} ldi_handle_t; +typedef struct block_device *ldi_handle_t; extern int ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip); extern void ldi_ident_release(ldi_ident_t li); diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 3c958f518..67511cb60 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -80,13 +80,19 @@ __dprintf(const char *file, const char *func, int line, const char *fmt, ...) { char *sfp, *start, *ptr; struct timeval tv; + unsigned long flags; va_list ap; start = ptr = spl_debug_buffer; sfp = strrchr(file, '/'); do_gettimeofday(&tv); - spin_lock(&spl_debug_lock); + /* XXX: This is particularly bad for performance, but we need to + * disable irqs here or two __dprintf()'s may deadlock on each + * other if one if called from an irq handler. This is yet another + * reason why we really, really, need an internal debug log. + */ + spin_lock_irqsave(&spl_debug_lock, flags); ptr += snprintf(ptr, MAXMSGLEN - 1, "spl: %lu.%06lu:%d:%u:%s:%d:%s(): ", tv.tv_sec, tv.tv_usec, current->pid, @@ -99,7 +105,7 @@ __dprintf(const char *file, const char *func, int line, const char *fmt, ...) va_end(ap); printk("%s", start); - spin_unlock(&spl_debug_lock); + spin_unlock_irqrestore(&spl_debug_lock, flags); } EXPORT_SYMBOL(__dprintf); diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 08387d0d8..1b9eaafe6 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -117,7 +117,9 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla kcc = kmem_cache_find_cache_cb(cache); BUG_ON(!kcc); - kcc->kcc_constructor(ptr, kcc->kcc_private, (int)flags); + if (kcc->kcc_constructor) + kcc->kcc_constructor(ptr, kcc->kcc_private, (int)flags); + spin_unlock(&kmem_cache_cb_lock); /* Linux constructor has no return code, silently eat it */ } @@ -134,7 +136,9 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag BUG_ON(!kcc); /* Solaris destructor takes no flags, silently eat them */ - kcc->kcc_destructor(ptr, kcc->kcc_private); + if (kcc->kcc_destructor) + kcc->kcc_destructor(ptr, kcc->kcc_private); + spin_unlock(&kmem_cache_cb_lock); } diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 67db1064b..d177af9ce 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -37,12 +37,11 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags) taskq_work_wrapper_t *tww; int rc; - - BUG_ON(in_interrupt()); BUG_ON(tq == NULL); BUG_ON(func == NULL); - tww = (taskq_work_wrapper_t *)kmalloc(sizeof(*tww), GFP_KERNEL); + /* Use GFP_ATOMIC since this may be called in interrupt context */ + tww = (taskq_work_wrapper_t *)kmalloc(sizeof(*tww), GFP_ATOMIC); if (!tww) return (taskqid_t)0; From 996faa68697ec79f37e44999b901f07d6c8f94a2 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 3 Apr 2008 21:48:57 +0000 Subject: [PATCH 0065/1062] Correctly implement atomic_cas_ptr() function. Ideally all of these atomic operations will be rewritten anyway with the correct arch specific assembly. But not today. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@65 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/atomic.h | 22 ++++++++++------------ modules/spl/spl-atomic.c | 2 -- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 647d0db9a..c04a5b6b4 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -16,7 +16,6 @@ extern "C" { */ extern spinlock_t atomic64_lock; extern spinlock_t atomic32_lock; -extern spinlock_t atomic_lock; static __inline__ uint32_t atomic_add_32(volatile uint32_t *target, int32_t delta) @@ -94,7 +93,7 @@ atomic_sub_64_nv(volatile uint64_t *target, uint64_t delta) } static __inline__ uint64_t -atomic_cas_64(volatile uint64_t *target, uint64_t cmp, +atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval) { uint64_t rc; @@ -108,19 +107,18 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, return rc; } +#if defined(__x86_64__) +/* XXX: Implement atomic_cas_ptr() in terms of uint64'ts. This + * is of course only safe and correct for 64 bit arches... but + * for now I'm OK with that. + */ static __inline__ void * -atomic_cas_ptr(volatile void *target, void *cmp, void *newval) +atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { - void *rc; - - spin_lock(&atomic_lock); - rc = (void *)target; - if (target == cmp) - target = newval; - spin_unlock(&atomic_lock); - - return rc; + return (void *)atomic_cas_64((volatile uint64_t *)target, + (uint64_t)cmp, (uint64_t)newval); } +#endif #ifdef __cplusplus } diff --git a/modules/spl/spl-atomic.c b/modules/spl/spl-atomic.c index fb161c520..3efa6c133 100644 --- a/modules/spl/spl-atomic.c +++ b/modules/spl/spl-atomic.c @@ -3,8 +3,6 @@ /* Global atomic lock declarations */ spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED; spinlock_t atomic32_lock = SPIN_LOCK_UNLOCKED; -spinlock_t atomic_lock = SPIN_LOCK_UNLOCKED; EXPORT_SYMBOL(atomic64_lock); EXPORT_SYMBOL(atomic32_lock); -EXPORT_SYMBOL(atomic_lock); From 968eccd1d1cb7a43a7f05050d7b645da79966e6d Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 4 Apr 2008 04:44:16 +0000 Subject: [PATCH 0066/1062] Update the thread shim to use the current kernel threading API. We need to use kthread_create() here for a few reasons. First off to old kernel_thread() API functioin will be going away. Secondly, and more importantly if I use kthread_create() we can then properly implement a thread_exit() function which terminates the kernel thread at any point with do_exit(). This fixes our cleanup bug which was caused by dropping a mutex twice after thread_exit() didn't really exit. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@66 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/thread.h | 9 +++++---- modules/spl/spl-thread.c | 25 ++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/sys/thread.h b/include/sys/thread.h index c7b104374..8424070e2 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -8,6 +8,7 @@ extern "C" { #include #include #include +#include #include #include @@ -30,14 +31,14 @@ typedef void (*thread_func_t)(void *); #define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ __thread_create(stk, stksize, (thread_func_t)func, \ - arg, len, pp, state, pri) + #func, arg, len, pp, state, pri) #define thread_exit() __thread_exit() #define curthread get_current() extern kthread_t *__thread_create(caddr_t stk, size_t stksize, - thread_func_t func, void *args, - size_t len, int *pp, int state, - pri_t pri); + thread_func_t func, const char *name, + void *args, size_t len, int *pp, + int state, pri_t pri); extern void __thread_exit(void); #ifdef __cplusplus diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index ad90e0720..1cfa369ba 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -21,11 +21,6 @@ thread_generic_wrapper(void *arg) thread_priv_t *tp = (thread_priv_t *)arg; void (*func)(void *); void *args; - char name[16]; - - /* Use the truncated function name as thread name */ - snprintf(name, sizeof(name), "%s", "kthread"); - daemonize(name); spin_lock(&tp->tp_lock); BUG_ON(tp->tp_magic != TP_MAGIC); @@ -51,6 +46,7 @@ thread_generic_wrapper(void *arg) void __thread_exit(void) { + do_exit(0); return; } EXPORT_SYMBOL(__thread_exit); @@ -60,11 +56,12 @@ EXPORT_SYMBOL(__thread_exit); * style callers likely never check for... since it can't fail. */ kthread_t * __thread_create(caddr_t stk, size_t stksize, thread_func_t func, - void *args, size_t len, int *pp, int state, pri_t pri) + const char *name, void *args, size_t len, int *pp, + int state, pri_t pri) { thread_priv_t tp; DEFINE_WAIT(wait); - long pid; + struct task_struct *tsk; /* Option pp is simply ignored */ /* Variable stack size unsupported */ @@ -88,9 +85,13 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, spin_lock(&tp.tp_lock); - /* Solaris says this must never fail so we try forever */ - while ((pid = kernel_thread(thread_generic_wrapper, (void *)&tp, 0)) < 0) - printk(KERN_ERR "spl: Error unable to create thread; pid = %ld\n", pid); + tsk = kthread_create(thread_generic_wrapper, (void *)&tp, "%s", name); + if (IS_ERR(tsk)) { + printk("spl: Failed to create thread: %ld\n", PTR_ERR(tsk)); + return NULL; + } + + wake_up_process(tsk); /* All signals are ignored due to sleeping TASK_UNINTERRUPTIBLE */ for (;;) { @@ -103,9 +104,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, spin_lock(&tp.tp_lock); } - /* Verify the pid retunred matches the pid in the task struct */ - BUG_ON(pid != (tp.tp_task)->pid); - + BUG_ON(tsk != tp.tp_task); /* Extra paranoia */ spin_unlock(&tp.tp_lock); return (kthread_t *)tp.tp_task; From 728b9dd80074bedef6136b6acf5cb86d707172ea Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 4 Apr 2008 17:08:12 +0000 Subject: [PATCH 0067/1062] - Fix write-only behavior in vn-open() - Ensure we have at least 1 write-only splat test - Fix return codes for vn_* Solaris does not use negative return codes in the kernel. So linux errno's must be inverted. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@67 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-vnode.c | 42 ++++++++++++++++++------------------ modules/splat/splat-atomic.c | 2 +- modules/splat/splat-vnode.c | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 401c6e0e8..10b227761 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -52,7 +52,7 @@ vn_alloc(int flag) vp->v_type = 0; } - return (vp); + return vp; } /* vn_alloc() */ EXPORT_SYMBOL(vn_alloc); @@ -69,9 +69,10 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, { struct file *fp; struct kstat stat; - int rc, saved_umask, flags_rw; + int rc, saved_umask; vnode_t *vp; + BUG_ON(!(flags & (FWRITE | FREAD))); BUG_ON(seg != UIO_SYSSPACE); BUG_ON(!vpp); *vpp = NULL; @@ -79,13 +80,12 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, if (!(flags & FCREAT) && (flags & FWRITE)) flags |= FEXCL; - flags_rw = flags & (FWRITE | FREAD); - flags &= ~(FWRITE | FREAD); - switch (flags_rw) { - case FWRITE: flags |= O_WRONLY; - case FREAD: flags |= O_RDONLY; - case (FWRITE | FREAD): flags |= O_RDWR; - } + /* Note for filp_open() the two low bits must be remapped to mean: + * 01 - read-only -> 00 read-only + * 10 - write-only -> 01 write-only + * 11 - read-write -> 10 read-write + */ + flags--; if (flags & FCREAT) saved_umask = xchg(¤t->fs->umask, 0); @@ -96,18 +96,18 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, (void)xchg(¤t->fs->umask, saved_umask); if (IS_ERR(fp)) - return PTR_ERR(fp); + return -PTR_ERR(fp); rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) { filp_close(fp, 0); - return rc; + return -rc; } vp = vn_alloc(KM_SLEEP); if (!vp) { filp_close(fp, 0); - return -ENOMEM; + return ENOMEM; } mutex_enter(&vp->v_lock); @@ -131,7 +131,7 @@ vn_openat(const char *path, uio_seg_t seg, int flags, int mode, realpath = kmalloc(strlen(path) + 2, GFP_KERNEL); if (!realpath) - return -ENOMEM; + return ENOMEM; sprintf(realpath, "/%s", path); rc = vn_open(realpath, seg, flags, mode, vpp, x1, x2); @@ -175,13 +175,13 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, set_fs(saved_fs); if (rc < 0) - return rc; + return -rc; if (residp) { *residp = len - rc; } else { if (rc != len) - return -EIO; + return EIO; } return 0; @@ -199,7 +199,7 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) rc = filp_close(vp->v_file, 0); vn_free(vp); - return rc; + return -rc; } /* vn_close() */ EXPORT_SYMBOL(vn_close); @@ -248,7 +248,7 @@ exit2: exit1: path_release(&nd); exit: - return rc; + return -rc; slashes: rc = !dentry->d_inode ? -ENOENT : @@ -338,7 +338,7 @@ exit2: exit1: path_release(&oldnd); exit: - return rc; + return -rc; } EXPORT_SYMBOL(vn_rename); @@ -357,7 +357,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) - return rc; + return -rc; vap->va_type = vn_get_sol_type(stat.mode); vap->va_mode = stat.mode; @@ -377,7 +377,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) vap->va_rdev = stat.rdev; vap->va_blocks = stat.blocks; - return rc; + return 0; } EXPORT_SYMBOL(vn_getattr); @@ -391,7 +391,7 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) if (flags & FDSYNC) datasync = 1; - return file_fsync(vp->v_file, vp->v_file->f_dentry, datasync); + return -file_fsync(vp->v_file, vp->v_file->f_dentry, datasync); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); diff --git a/modules/splat/splat-atomic.c b/modules/splat/splat-atomic.c index c170cc05e..43876d78a 100644 --- a/modules/splat/splat-atomic.c +++ b/modules/splat/splat-atomic.c @@ -95,8 +95,8 @@ splat_atomic_work(void *priv) (long unsigned)ap->ap_atomic, (long unsigned)ap->ap_atomic_exited); - thread_exit(); wake_up(&ap->ap_waitq); + thread_exit(); } static int diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index 8578ea20a..c8368b5cb 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -287,7 +287,7 @@ splat_vnode_test6(struct file *file, void *arg) int rc; if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, - FWRITE | FREAD | FCREAT | FEXCL, 0644, &vp, 0, 0))) { + FWRITE | FCREAT | FEXCL, 0644, &vp, 0, 0))) { splat_vprint(file, SPLAT_VNODE_TEST6_NAME, "Failed to vn_open test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); From 79f92663e36969c0b6b1f8520b1171285ae3e1d3 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 7 Apr 2008 23:54:34 +0000 Subject: [PATCH 0068/1062] Fix race in rwlock implementation which can occur when your task is rescheduled to a different cpu after you've taken the lock but before calling RW_LOCK_HELD is called. We need the spinlock to ensure there is a wmb() there. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@68 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/rwlock.h | 4 ++++ modules/spl/spl-rwlock.c | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 6407e632d..83106846c 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -163,6 +163,8 @@ rw_tryenter(krwlock_t *rwlp, krw_t rw) rwlp->rw_owner = current; } break; + default: + BUG_ON(1); } return result; @@ -193,6 +195,8 @@ rw_enter(krwlock_t *rwlp, krw_t rw) BUG_ON(rwlp->rw_owner != NULL); rwlp->rw_owner = current; break; + default: + BUG_ON(1); } } diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c index fa78d4c14..2ca8306f7 100644 --- a/modules/spl/spl-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -29,16 +29,21 @@ EXPORT_SYMBOL(__rw_write_held); int __rw_lock_held(krwlock_t *rwlp) { + int rc = 0; + BUG_ON(rwlp->rw_magic != RW_MAGIC); + spin_lock_irq(&(rwlp->rw_sem.wait_lock)); #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK if (rwlp->rw_sem.activity != 0) { #else if (rwlp->rw_sem.count != 0) { #endif - return 1; + rc = 1; } - return 0; + spin_unlock_irq(&(rwlp->rw_sem.wait_lock)); + + return rc; } EXPORT_SYMBOL(__rw_lock_held); From 115aed0dd8eae514d0cfaa37436a66c52926e3be Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 11 Apr 2008 17:03:57 +0000 Subject: [PATCH 0069/1062] - Add more strict in_atomic() checking to the mutex entry function just to be extra safety and paranoid. - Rewrite the thread shim to take full advantage of the new kernel kthread API. This greatly simplifies things. - Add a new regression test for thread_exit() to ensure it properly terminates a thread immediately without allowing futher execution of the thread. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@69 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/mutex.h | 17 +++++ modules/spl/spl-thread.c | 61 +++++------------- modules/splat/splat-thread.c | 118 +++++++++++++++++++++++++++-------- 3 files changed, 123 insertions(+), 73 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 2db4a7f96..ca76d6ea9 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -6,6 +6,7 @@ extern "C" { #endif #include +#include #include /* See the "Big Theory Statement" in solaris mutex.c. @@ -65,6 +66,14 @@ static __inline__ void mutex_enter(kmutex_t *mp) { BUG_ON(mp->km_magic != KM_MAGIC); + + if (unlikely(in_atomic() && !current->exit_state)) { + dump_stack(); + printk("Scheduling while atomic: %s/0x%08x/%d\n", + current->comm, preempt_count(), current->pid); + BUG(); + } + down(&mp->km_sem); /* Will check in_atomic() for us */ BUG_ON(mp->km_owner != NULL); mp->km_owner = current; @@ -78,6 +87,14 @@ mutex_tryenter(kmutex_t *mp) int result; BUG_ON(mp->km_magic != KM_MAGIC); + + if (unlikely(in_atomic() && !current->exit_state)) { + dump_stack(); + printk("Scheduling while atomic: %s/0x%08x/%d\n", + current->comm, preempt_count(), current->pid); + BUG(); + } + result = down_trylock(&mp->km_sem); /* returns 0 if acquired */ if (result == 0) { BUG_ON(mp->km_owner != NULL); diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index 1cfa369ba..41968d76a 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -1,4 +1,5 @@ #include +#include /* * Thread interfaces @@ -10,9 +11,6 @@ typedef struct thread_priv_s { size_t tp_len; /* Len to be passed to function */ int tp_state; /* State to start thread at */ pri_t tp_pri; /* Priority to start threat at */ - volatile kthread_t *tp_task; /* Task pointer for new thread */ - spinlock_t tp_lock; /* Syncronization lock */ - wait_queue_head_t tp_waitq; /* Syncronization wait queue */ } thread_priv_t; static int @@ -22,21 +20,13 @@ thread_generic_wrapper(void *arg) void (*func)(void *); void *args; - spin_lock(&tp->tp_lock); BUG_ON(tp->tp_magic != TP_MAGIC); func = tp->tp_func; args = tp->tp_args; - tp->tp_task = get_current(); set_current_state(tp->tp_state); - set_user_nice((kthread_t *)tp->tp_task, PRIO_TO_NICE(tp->tp_pri)); + set_user_nice((kthread_t *)get_current(), PRIO_TO_NICE(tp->tp_pri)); + kmem_free(arg, sizeof(thread_priv_t)); - spin_unlock(&tp->tp_lock); - wake_up(&tp->tp_waitq); - - /* DO NOT USE 'ARG' AFTER THIS POINT, EVER, EVER, EVER! - * Local variables are used here because after the calling thread - * has been woken up it will exit and this memory will no longer - * be safe to access since it was declared on the callers stack. */ if (func) func(args); @@ -59,7 +49,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, const char *name, void *args, size_t len, int *pp, int state, pri_t pri) { - thread_priv_t tp; + thread_priv_t *tp; DEFINE_WAIT(wait); struct task_struct *tsk; @@ -68,45 +58,24 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, BUG_ON(stk != NULL); BUG_ON(stk != 0); - /* Variable tp is located on the stack and not the heap because I want - * to minimize any chance of a failure, since the Solaris code is designed - * such that this function cannot fail. This is a little dangerous since - * we're passing a stack address to a new thread but correct locking was - * added to ensure the callee can use the data safely until wake_up(). */ - tp.tp_magic = TP_MAGIC; - tp.tp_func = func; - tp.tp_args = args; - tp.tp_len = len; - tp.tp_state = state; - tp.tp_pri = pri; - tp.tp_task = NULL; - spin_lock_init(&tp.tp_lock); - init_waitqueue_head(&tp.tp_waitq); + tp = kmem_alloc(sizeof(thread_priv_t), KM_SLEEP); + if (tp == NULL) + return NULL; - spin_lock(&tp.tp_lock); + tp->tp_magic = TP_MAGIC; + tp->tp_func = func; + tp->tp_args = args; + tp->tp_len = len; + tp->tp_state = state; + tp->tp_pri = pri; - tsk = kthread_create(thread_generic_wrapper, (void *)&tp, "%s", name); + tsk = kthread_create(thread_generic_wrapper, (void *)tp, "%s", name); if (IS_ERR(tsk)) { printk("spl: Failed to create thread: %ld\n", PTR_ERR(tsk)); return NULL; } wake_up_process(tsk); - - /* All signals are ignored due to sleeping TASK_UNINTERRUPTIBLE */ - for (;;) { - prepare_to_wait(&tp.tp_waitq, &wait, TASK_UNINTERRUPTIBLE); - if (tp.tp_task != NULL) - break; - - spin_unlock(&tp.tp_lock); - schedule(); - spin_lock(&tp.tp_lock); - } - - BUG_ON(tsk != tp.tp_task); /* Extra paranoia */ - spin_unlock(&tp.tp_lock); - - return (kthread_t *)tp.tp_task; + return (kthread_t *)tsk; } EXPORT_SYMBOL(__thread_create); diff --git a/modules/splat/splat-thread.c b/modules/splat/splat-thread.c index dec251efe..3cea573ed 100644 --- a/modules/splat/splat-thread.c +++ b/modules/splat/splat-thread.c @@ -6,7 +6,11 @@ #define SPLAT_THREAD_TEST1_ID 0x0601 #define SPLAT_THREAD_TEST1_NAME "create" -#define SPLAT_THREAD_TEST1_DESC "Validate thread creation and destruction" +#define SPLAT_THREAD_TEST1_DESC "Validate thread creation" + +#define SPLAT_THREAD_TEST2_ID 0x0602 +#define SPLAT_THREAD_TEST2_NAME "exit" +#define SPLAT_THREAD_TEST2_DESC "Validate thread exit" #define SPLAT_THREAD_TEST_MAGIC 0x4488CC00UL @@ -18,24 +22,84 @@ typedef struct thread_priv { int tp_rc; } thread_priv_t; +static int +splat_thread_rc(thread_priv_t *tp, int rc) +{ + int ret; + + spin_lock(&tp->tp_lock); + ret = (tp->tp_rc == rc); + spin_unlock(&tp->tp_lock); + + return ret; +} static void -splat_thread_work(void *priv) +splat_thread_work1(void *priv) { thread_priv_t *tp = (thread_priv_t *)priv; spin_lock(&tp->tp_lock); ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); tp->tp_rc = 1; - spin_unlock(&tp->tp_lock); - wake_up(&tp->tp_waitq); + wake_up(&tp->tp_waitq); thread_exit(); } static int splat_thread_test1(struct file *file, void *arg) +{ + thread_priv_t tp; + DEFINE_WAIT(wait); + kthread_t *thr; + + tp.tp_magic = SPLAT_THREAD_TEST_MAGIC; + tp.tp_file = file; + spin_lock_init(&tp.tp_lock); + init_waitqueue_head(&tp.tp_waitq); + tp.tp_rc = 0; + + thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work1, &tp, 0, + &p0, TS_RUN, minclsyspri); + /* Must never fail under Solaris, but we check anyway since this + * can happen in the linux SPL, we may want to change this behavior */ + if (thr == NULL) + return -ESRCH; + + /* Sleep until the thread sets tp.tp_rc == 1 */ + wait_event(tp.tp_waitq, splat_thread_rc(&tp, 1)); + + splat_vprint(file, SPLAT_THREAD_TEST1_NAME, "%s", + "Thread successfully started properly\n"); + return 0; +} + +static void +splat_thread_work2(void *priv) +{ + thread_priv_t *tp = (thread_priv_t *)priv; + + spin_lock(&tp->tp_lock); + ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); + tp->tp_rc = 1; + spin_unlock(&tp->tp_lock); + + wake_up(&tp->tp_waitq); + thread_exit(); + + /* The following code is unreachable when thread_exit() is + * working properly, which is exactly what we're testing */ + spin_lock(&tp->tp_lock); + tp->tp_rc = 2; + spin_unlock(&tp->tp_lock); + + wake_up(&tp->tp_waitq); +} + +static int +splat_thread_test2(struct file *file, void *arg) { thread_priv_t tp; DEFINE_WAIT(wait); @@ -48,32 +112,29 @@ splat_thread_test1(struct file *file, void *arg) init_waitqueue_head(&tp.tp_waitq); tp.tp_rc = 0; - spin_lock(&tp.tp_lock); - - thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work, &tp, 0, + thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work2, &tp, 0, &p0, TS_RUN, minclsyspri); - /* Must never fail under Solaris, but we check anyway so we can - * report an error when this impossible thing happens */ - if (thr == NULL) { - rc = -ESRCH; - goto out; + /* Must never fail under Solaris, but we check anyway since this + * can happen in the linux SPL, we may want to change this behavior */ + if (thr == NULL) + return -ESRCH; + + /* Sleep until the thread sets tp.tp_rc == 1 */ + wait_event(tp.tp_waitq, splat_thread_rc(&tp, 1)); + + /* Sleep until the thread sets tp.tp_rc == 2, or until we hit + * the timeout. If thread exit is working properly we should + * hit the timeout and never see to.tp_rc == 2. */ + rc = wait_event_timeout(tp.tp_waitq, splat_thread_rc(&tp, 2), HZ / 10); + if (rc > 0) { + rc = -EINVAL; + splat_vprint(file, SPLAT_THREAD_TEST2_NAME, "%s", + "Thread did not exit properly at thread_exit()\n"); + } else { + splat_vprint(file, SPLAT_THREAD_TEST2_NAME, "%s", + "Thread successfully exited at thread_exit()\n"); } - for (;;) { - prepare_to_wait(&tp.tp_waitq, &wait, TASK_UNINTERRUPTIBLE); - if (tp.tp_rc) - break; - - spin_unlock(&tp.tp_lock); - schedule(); - spin_lock(&tp.tp_lock); - } - - splat_vprint(file, SPLAT_THREAD_TEST1_NAME, "%s", - "Thread successfully started and exited cleanly\n"); -out: - spin_unlock(&tp.tp_lock); - return rc; } @@ -96,6 +157,8 @@ splat_thread_init(void) SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC, SPLAT_THREAD_TEST1_ID, splat_thread_test1); + SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC, + SPLAT_THREAD_TEST2_ID, splat_thread_test2); return sub; } @@ -104,6 +167,7 @@ void splat_thread_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST2_ID); SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST1_ID); kfree(sub); From 12ea923056d9d3c54e4a2d1a5095ca11784dd2a5 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 11 Apr 2008 22:49:48 +0000 Subject: [PATCH 0070/1062] Adjust the condition variables to simply sleep uninteruptibly. This way we don't have to contend with superious wakeups which it appears ZFS is not so careful to handle anyway. So this is probably for the best. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@70 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/condvar.h | 99 ++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 68 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 6a2060fd2..3318ec595 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -20,6 +20,7 @@ typedef struct { wait_queue_head_t cv_event; atomic_t cv_waiters; kmutex_t *cv_mutex; /* only for verification purposes */ + spinlock_t cv_lock; } kcondvar_t; typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; @@ -33,13 +34,14 @@ cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) cvp->cv_magic = CV_MAGIC; init_waitqueue_head(&cvp->cv_event); + spin_lock_init(&cvp->cv_lock); atomic_set(&cvp->cv_waiters, 0); cvp->cv_mutex = NULL; cvp->cv_name = NULL; if (name) { - cvp->cv_name = kmalloc(strlen(name) + 1, GFP_KERNEL); - if (cvp->cv_name) + cvp->cv_name = kmalloc(strlen(name) + 1, GFP_KERNEL); + if (cvp->cv_name) strcpy(cvp->cv_name, name); } } @@ -48,6 +50,7 @@ static __inline__ void cv_destroy(kcondvar_t *cvp) { BUG_ON(cvp == NULL); + spin_lock(&cvp->cv_lock); BUG_ON(cvp->cv_magic != CV_MAGIC); BUG_ON(atomic_read(&cvp->cv_waiters) != 0); BUG_ON(waitqueue_active(&cvp->cv_event)); @@ -56,15 +59,16 @@ cv_destroy(kcondvar_t *cvp) kfree(cvp->cv_name); memset(cvp, CV_POISON, sizeof(*cvp)); + spin_unlock(&cvp->cv_lock); } static __inline__ void cv_wait(kcondvar_t *cvp, kmutex_t *mtx) { DEFINE_WAIT(wait); - int flag = 1; BUG_ON(cvp == NULL || mtx == NULL); + spin_lock(&cvp->cv_lock); BUG_ON(cvp->cv_magic != CV_MAGIC); BUG_ON(!mutex_owned(mtx)); @@ -73,37 +77,18 @@ cv_wait(kcondvar_t *cvp, kmutex_t *mtx) /* Ensure the same mutex is used by all callers */ BUG_ON(cvp->cv_mutex != mtx); + spin_unlock(&cvp->cv_lock); - for (;;) { - prepare_to_wait_exclusive(&cvp->cv_event, &wait, - TASK_INTERRUPTIBLE); - /* Must occur after we are added to the list but only once */ - if (flag) { - atomic_inc(&cvp->cv_waiters); - flag = 0; - } + prepare_to_wait_exclusive(&cvp->cv_event, &wait, + TASK_UNINTERRUPTIBLE); + atomic_inc(&cvp->cv_waiters); - /* XXX - The correct thing to do here may be to wake up and - * force the caller to handle the signal. Spurious wakeups - * should already be safely handled by the caller. */ - if (signal_pending(current)) - flush_signals(current); - - /* Mutex should be dropped after prepare_to_wait() this - * ensures we're linked in to the waiters list and avoids the - * race where 'cvp->cv_waiters > 0' but the list is empty. */ - mutex_exit(mtx); - schedule(); - mutex_enter(mtx); - - /* XXX - The correct thing to do here may be to wake up and - * force the caller to handle the signal. Spurious wakeups - * should already be safely handled by the caller. */ - if (signal_pending(current)) - continue; - - break; - } + /* Mutex should be dropped after prepare_to_wait() this + * ensures we're linked in to the waiters list and avoids the + * race where 'cvp->cv_waiters > 0' but the list is empty. */ + mutex_exit(mtx); + schedule(); + mutex_enter(mtx); atomic_dec(&cvp->cv_waiters); finish_wait(&cvp->cv_event, &wait); @@ -117,56 +102,34 @@ cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) { DEFINE_WAIT(wait); clock_t time_left; - int flag = 1; BUG_ON(cvp == NULL || mtx == NULL); + spin_lock(&cvp->cv_lock); BUG_ON(cvp->cv_magic != CV_MAGIC); BUG_ON(!mutex_owned(mtx)); if (cvp->cv_mutex == NULL) cvp->cv_mutex = mtx; + /* Ensure the same mutex is used by all callers */ + BUG_ON(cvp->cv_mutex != mtx); + spin_unlock(&cvp->cv_lock); + /* XXX - Does not handle jiffie wrap properly */ time_left = expire_time - jiffies; if (time_left <= 0) return -1; - /* Ensure the same mutex is used by all callers */ - BUG_ON(cvp->cv_mutex != mtx); + prepare_to_wait_exclusive(&cvp->cv_event, &wait, + TASK_UNINTERRUPTIBLE); + atomic_inc(&cvp->cv_waiters); - for (;;) { - prepare_to_wait_exclusive(&cvp->cv_event, &wait, - TASK_INTERRUPTIBLE); - if (flag) { - atomic_inc(&cvp->cv_waiters); - flag = 0; - } - - /* XXX - The correct thing to do here may be to wake up and - * force the caller to handle the signal. Spurious wakeups - * should already be safely handled by the caller. */ - if (signal_pending(current)) - flush_signals(current); - - /* Mutex should be dropped after prepare_to_wait() this - * ensures we're linked in to the waiters list and avoids the - * race where 'cvp->cv_waiters > 0' but the list is empty. */ - mutex_exit(mtx); - time_left = schedule_timeout(time_left); - mutex_enter(mtx); - - /* XXX - The correct thing to do here may be to wake up and - * force the caller to handle the signal. Spurious wakeups - * should already be safely handled by the caller. */ - if (signal_pending(current)) { - if (time_left > 0) - continue; - - flush_signals(current); - } - - break; - } + /* Mutex should be dropped after prepare_to_wait() this + * ensures we're linked in to the waiters list and avoids the + * race where 'cvp->cv_waiters > 0' but the list is empty. */ + mutex_exit(mtx); + time_left = schedule_timeout(time_left); + mutex_enter(mtx); atomic_dec(&cvp->cv_waiters); finish_wait(&cvp->cv_event, &wait); From f23e92fabf091e3b86005e4dd194702aa8f7535d Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 12 Apr 2008 04:27:59 +0000 Subject: [PATCH 0071/1062] Add hw_serial support based on a usermodehelper which runs at spl module load time can calls hostid. The resolved hostid is then fed back in to a proc entry for latter use. It's not a pretty thing, but it will work for now. The hw_serial is required for things such as 'zpool status' to work. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@71 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-generic.c | 133 +++++++++++++++++++++++++++++++++----- 1 file changed, 116 insertions(+), 17 deletions(-) diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 67511cb60..3faa4b6b3 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "config.h" /* @@ -14,19 +15,23 @@ static spinlock_t spl_debug_lock = SPIN_LOCK_UNLOCKED; unsigned long spl_debug_mask = 0; unsigned long spl_debug_subsys = 0xff; +unsigned long spl_hostid = 0; +char hw_serial[11] = ""; + EXPORT_SYMBOL(spl_debug_mask); EXPORT_SYMBOL(spl_debug_subsys); +EXPORT_SYMBOL(spl_hostid); +EXPORT_SYMBOL(hw_serial); static struct proc_dir_entry *spl_proc_root = NULL; static struct proc_dir_entry *spl_proc_debug_mask = NULL; static struct proc_dir_entry *spl_proc_debug_subsys = NULL; +static struct proc_dir_entry *spl_proc_hostid = NULL; +static struct proc_dir_entry *spl_proc_hw_serial = NULL; int p0 = 0; EXPORT_SYMBOL(p0); -char hw_serial[11]; -EXPORT_SYMBOL(hw_serial); - vmem_t *zio_alloc_arena = NULL; EXPORT_SYMBOL(zio_alloc_arena); @@ -113,35 +118,68 @@ static int spl_proc_rd_generic_ul(char *page, char **start, off_t off, int count, int *eof, unsigned long val) { - int rc; - *start = page; *eof = 1; if (off || count > PAGE_SIZE) return 0; - spin_lock(&spl_debug_lock); - rc = snprintf(page, PAGE_SIZE, "0x%lx\n", val); - spin_unlock(&spl_debug_lock); - - return rc; + return snprintf(page, PAGE_SIZE, "0x%lx\n", val & 0xffffffff); } static int spl_proc_rd_debug_mask(char *page, char **start, off_t off, int count, int *eof, void *data) { - return spl_proc_rd_generic_ul(page, start, off, count, - eof, spl_debug_mask); + int rc; + + spin_lock(&spl_debug_lock); + rc = spl_proc_rd_generic_ul(page, start, off, count, + eof, spl_debug_mask); + spin_unlock(&spl_debug_lock); + + return rc; } static int spl_proc_rd_debug_subsys(char *page, char **start, off_t off, int count, int *eof, void *data) { - return spl_proc_rd_generic_ul(page, start, off, count, - eof, spl_debug_subsys); + int rc; + + spin_lock(&spl_debug_lock); + rc = spl_proc_rd_generic_ul(page, start, off, count, + eof, spl_debug_subsys); + spin_unlock(&spl_debug_lock); + + return rc; +} + +static int +spl_proc_rd_hostid(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + *start = page; + *eof = 1; + + if (off || count > PAGE_SIZE) + return 0; + + return snprintf(page, PAGE_SIZE, "%lx\n", spl_hostid & 0xffffffff); +} + +static int +spl_proc_rd_hw_serial(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + *start = page; + *eof = 1; + + if (off || count > PAGE_SIZE) + return 0; + + strncpy(page, hw_serial, 11); + return strlen(page); } static int @@ -200,6 +238,23 @@ spl_proc_wr_debug_subsys(struct file *file, const char *ubuf, return count; } +static int +spl_proc_wr_hostid(struct file *file, const char *ubuf, + unsigned long count, void *data, int mode) +{ + unsigned long val; + int rc; + + rc = spl_proc_wr_generic_ul(ubuf, count, &val, 16); + if (rc) + return rc; + + spl_hostid = val; + sprintf(hw_serial, "%lu\n", ((long)val >= 0) ? val : -val); + + return count; +} + static struct proc_dir_entry * spl_register_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent, void *data, @@ -235,6 +290,15 @@ EXPORT_SYMBOL(spl_set_debug_subsys); static int __init spl_init(void) { int rc = 0; + char sh_path[] = "/bin/sh"; + char *argv[] = { sh_path, + "-c", + "/usr/bin/hostid >/proc/spl/hostid", + NULL }; + char *envp[] = { "HOME=/", + "TERM=linux", + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", + NULL }; spl_proc_root = proc_mkdir("spl", NULL); if (!spl_proc_root) { @@ -260,16 +324,49 @@ static int __init spl_init(void) goto out2; } + spl_proc_hostid = spl_register_proc_entry("hostid", 0644, + spl_proc_root, NULL, + spl_proc_rd_hostid, + spl_proc_wr_hostid); + if (IS_ERR(spl_proc_hostid)) { + rc = PTR_ERR(spl_proc_hostid); + goto out3; + } + + spl_proc_hw_serial = spl_register_proc_entry("hw_serial", 0444, + spl_proc_root, NULL, + spl_proc_rd_hw_serial, + NULL); + if (IS_ERR(spl_proc_hw_serial)) { + rc = PTR_ERR(spl_proc_hw_serial); + goto out4; + } + if ((rc = kmem_init())) - goto out2; + goto out4; if ((rc = vn_init())) - goto out2; + goto out4; + + /* Doing address resolution in the kernel is tricky and just + * not a good idea in general. So to set the proper 'hw_serial' + * use the usermodehelper support to ask '/bin/sh' to run + * '/usr/bin/hostid' and redirect the result to /proc/spl/hostid + * for us to use. It's a horific solution but it will do. + */ + if ((rc = call_usermodehelper(sh_path, argv, envp, 1))) + goto out4; - strcpy(hw_serial, "007f0100"); /* loopback */ printk("spl: Loaded Solaris Porting Layer v%s\n", VERSION); return 0; + +out4: + if (spl_proc_hw_serial) + remove_proc_entry("hw_serial", spl_proc_root); +out3: + if (spl_proc_hostid) + remove_proc_entry("hostid", spl_proc_root); out2: if (spl_proc_debug_mask) remove_proc_entry("debug_mask", spl_proc_root); @@ -287,6 +384,8 @@ static void spl_fini(void) vn_fini(); kmem_fini(); + remove_proc_entry("hw_serial", spl_proc_root); + remove_proc_entry("hostid", spl_proc_root); remove_proc_entry("debug_subsys", spl_proc_root); remove_proc_entry("debug_mask", spl_proc_root); remove_proc_entry("spl", NULL); From c5fd77fcbf20f19a4690c535be494dcf474a0649 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 14 Apr 2008 18:37:20 +0000 Subject: [PATCH 0072/1062] Just cleanup up an error case to avoid overspamming the console. We get the stack once from the BUG() no reason to dump it twice. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@72 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/mutex.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index ca76d6ea9..068fde1ab 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -68,8 +68,7 @@ mutex_enter(kmutex_t *mp) BUG_ON(mp->km_magic != KM_MAGIC); if (unlikely(in_atomic() && !current->exit_state)) { - dump_stack(); - printk("Scheduling while atomic: %s/0x%08x/%d\n", + printk("May schedule while atomic: %s/0x%08x/%d\n", current->comm, preempt_count(), current->pid); BUG(); } @@ -89,8 +88,7 @@ mutex_tryenter(kmutex_t *mp) BUG_ON(mp->km_magic != KM_MAGIC); if (unlikely(in_atomic() && !current->exit_state)) { - dump_stack(); - printk("Scheduling while atomic: %s/0x%08x/%d\n", + printk("May schedule while atomic: %s/0x%08x/%d\n", current->comm, preempt_count(), current->pid); BUG(); } From d61e12af5af3ca6ba92a1b208e33c4e6cb99c9a3 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 15 Apr 2008 20:53:36 +0000 Subject: [PATCH 0073/1062] - Add some spinlocks to cover all the private data in the mutex. I don't think this should fix anything but it's a good idea regardless. - Drop the lock before calling the construct/destructor for the slab otherwise we can't sleep in a constructor/destructor and for long running functions we may NMI. - Do something braindead, but safe for the console debug logs for now. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@73 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/mutex.h | 58 +++++++++++++++++++++++++++++++-------- modules/spl/spl-generic.c | 25 +++++++++-------- modules/spl/spl-kmem.c | 24 ++++++++++------ 3 files changed, 76 insertions(+), 31 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 068fde1ab..ae8b81a7f 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -29,16 +29,19 @@ typedef struct { char *km_name; struct task_struct *km_owner; struct semaphore km_sem; + spinlock_t km_lock; } kmutex_t; #undef mutex_init static __inline__ void mutex_init(kmutex_t *mp, char *name, int type, void *ibc) { + BUG_ON(mp == NULL); BUG_ON(ibc != NULL); /* XXX - Spin mutexes not needed? */ BUG_ON(type != MUTEX_DEFAULT); /* XXX - Only default type supported? */ mp->km_magic = KM_MAGIC; + spin_lock_init(&mp->km_lock); sema_init(&mp->km_sem, 1); mp->km_owner = NULL; mp->km_name = NULL; @@ -54,49 +57,65 @@ mutex_init(kmutex_t *mp, char *name, int type, void *ibc) static __inline__ void mutex_destroy(kmutex_t *mp) { + BUG_ON(mp == NULL); + spin_lock(&mp->km_lock); BUG_ON(mp->km_magic != KM_MAGIC); if (mp->km_name) kfree(mp->km_name); memset(mp, KM_POISON, sizeof(*mp)); + spin_unlock(&mp->km_lock); } static __inline__ void mutex_enter(kmutex_t *mp) { + BUG_ON(mp == NULL); + spin_lock(&mp->km_lock); BUG_ON(mp->km_magic != KM_MAGIC); if (unlikely(in_atomic() && !current->exit_state)) { printk("May schedule while atomic: %s/0x%08x/%d\n", current->comm, preempt_count(), current->pid); + spin_unlock(&mp->km_lock); BUG(); } - down(&mp->km_sem); /* Will check in_atomic() for us */ + spin_unlock(&mp->km_lock); + + down(&mp->km_sem); + + spin_lock(&mp->km_lock); BUG_ON(mp->km_owner != NULL); mp->km_owner = current; + spin_unlock(&mp->km_lock); } -/* Return 1 if we acquired the mutex, else zero. - */ +/* Return 1 if we acquired the mutex, else zero. */ static __inline__ int mutex_tryenter(kmutex_t *mp) { - int result; + int rc; + BUG_ON(mp == NULL); + spin_lock(&mp->km_lock); BUG_ON(mp->km_magic != KM_MAGIC); if (unlikely(in_atomic() && !current->exit_state)) { printk("May schedule while atomic: %s/0x%08x/%d\n", current->comm, preempt_count(), current->pid); + spin_unlock(&mp->km_lock); BUG(); } - result = down_trylock(&mp->km_sem); /* returns 0 if acquired */ - if (result == 0) { + spin_unlock(&mp->km_lock); + rc = down_trylock(&mp->km_sem); /* returns 0 if acquired */ + if (rc == 0) { + spin_lock(&mp->km_lock); BUG_ON(mp->km_owner != NULL); mp->km_owner = current; + spin_unlock(&mp->km_lock); return 1; } return 0; @@ -105,28 +124,43 @@ mutex_tryenter(kmutex_t *mp) static __inline__ void mutex_exit(kmutex_t *mp) { + BUG_ON(mp == NULL); + spin_lock(&mp->km_lock); BUG_ON(mp->km_magic != KM_MAGIC); BUG_ON(mp->km_owner != current); mp->km_owner = NULL; + spin_unlock(&mp->km_lock); up(&mp->km_sem); } -/* Return 1 if mutex is held by current process, else zero. - */ +/* Return 1 if mutex is held by current process, else zero. */ static __inline__ int mutex_owned(kmutex_t *mp) { + int rc; + + BUG_ON(mp == NULL); + spin_lock(&mp->km_lock); BUG_ON(mp->km_magic != KM_MAGIC); - return (mp->km_owner == current); + rc = (mp->km_owner == current); + spin_unlock(&mp->km_lock); + + return rc; } -/* Return owner if mutex is owned, else NULL. - */ +/* Return owner if mutex is owned, else NULL. */ static __inline__ kthread_t * mutex_owner(kmutex_t *mp) { + kthread_t *thr; + + BUG_ON(mp == NULL); + spin_lock(&mp->km_lock); BUG_ON(mp->km_magic != KM_MAGIC); - return mp->km_owner; + thr = mp->km_owner; + spin_unlock(&mp->km_lock); + + return thr; } #ifdef __cplusplus diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 3faa4b6b3..8cd217cf1 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -10,7 +10,8 @@ /* * Generic support */ -static char spl_debug_buffer[MAXMSGLEN]; +static char spl_debug_buffer1[1024]; +static char spl_debug_buffer2[1024]; static spinlock_t spl_debug_lock = SPIN_LOCK_UNLOCKED; unsigned long spl_debug_mask = 0; @@ -83,12 +84,11 @@ EXPORT_SYMBOL(ddi_strtoul); void __dprintf(const char *file, const char *func, int line, const char *fmt, ...) { - char *sfp, *start, *ptr; + char *sfp; struct timeval tv; unsigned long flags; va_list ap; - start = ptr = spl_debug_buffer; sfp = strrchr(file, '/'); do_gettimeofday(&tv); @@ -98,18 +98,21 @@ __dprintf(const char *file, const char *func, int line, const char *fmt, ...) * reason why we really, really, need an internal debug log. */ spin_lock_irqsave(&spl_debug_lock, flags); - ptr += snprintf(ptr, MAXMSGLEN - 1, - "spl: %lu.%06lu:%d:%u:%s:%d:%s(): ", - tv.tv_sec, tv.tv_usec, current->pid, - smp_processor_id(), - sfp == NULL ? file : sfp + 1, - line, func); + memset(spl_debug_buffer1, 0, 1024); + memset(spl_debug_buffer2, 0, 1024); + + snprintf(spl_debug_buffer1, 1023, + "spl: %lu.%06lu:%d:%u:%s:%d:%s(): ", + tv.tv_sec, tv.tv_usec, current->pid, + smp_processor_id(), + sfp == NULL ? file : sfp + 1, + line, func); va_start(ap, fmt); - ptr += vsnprintf(ptr, MAXMSGLEN - (ptr - start) - 1, fmt, ap); + vsnprintf(spl_debug_buffer2, 1023, fmt, ap); va_end(ap); - printk("%s", start); + printk("%s%s", spl_debug_buffer1, spl_debug_buffer2); spin_unlock_irqrestore(&spl_debug_lock, flags); } EXPORT_SYMBOL(__dprintf); diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 1b9eaafe6..7c88eda5f 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -50,7 +50,6 @@ typedef struct kmem_cache_cb { static spinlock_t kmem_cache_cb_lock = SPIN_LOCK_UNLOCKED; -//static spinlock_t kmem_cache_cb_lock = (spinlock_t) { 1 SPINLOCK_MAGIC_INIT }; static LIST_HEAD(kmem_cache_cb_list); static struct shrinker *kmem_cache_shrinker; @@ -110,17 +109,22 @@ static void kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long flags) { kmem_cache_cb_t *kcc; + kmem_constructor_t constructor; + void *private; spin_lock(&kmem_cache_cb_lock); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); BUG_ON(!kcc); - - if (kcc->kcc_constructor) - kcc->kcc_constructor(ptr, kcc->kcc_private, (int)flags); + constructor = kcc->kcc_constructor; + private = kcc->kcc_private; spin_unlock(&kmem_cache_cb_lock); + + if (constructor) + constructor(ptr, private, (int)flags); + /* Linux constructor has no return code, silently eat it */ } @@ -128,18 +132,22 @@ static void kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flags) { kmem_cache_cb_t *kcc; + kmem_destructor_t destructor; + void *private; spin_lock(&kmem_cache_cb_lock); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); BUG_ON(!kcc); - - /* Solaris destructor takes no flags, silently eat them */ - if (kcc->kcc_destructor) - kcc->kcc_destructor(ptr, kcc->kcc_private); + destructor = kcc->kcc_destructor; + private = kcc->kcc_private; spin_unlock(&kmem_cache_cb_lock); + + /* Solaris destructor takes no flags, silently eat them */ + if (destructor) + destructor(ptr, private); } /* XXX - Arguments are ignored */ From 55152ebbb46fb8e382ed18e58cc570c61e224c21 Mon Sep 17 00:00:00 2001 From: wartens2 Date: Wed, 16 Apr 2008 16:37:51 +0000 Subject: [PATCH 0074/1062] * modules/spl/spl-kmem.c : Make sure to disable interrupts when necessary to avoid deadlocks. We were seeing the deadlock when calling kmem_cache_generic_constructor() and then an interrupt forced us to end up calling kmem_cache_generic_destructor() which caused our deadlock. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@74 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 8 ++++++++ modules/spl/spl-kmem.c | 35 +++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index b21cdf2fa..da2f6da4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-04-16 Herb Wartens + + * modules/spl/spl-kmem.c : Make sure to disable interrupts + when necessary to avoid deadlocks. We were seeing the deadlock + when calling kmem_cache_generic_constructor() and then an interrupt + forced us to end up calling kmem_cache_generic_destructor() + which caused our deadlock. + 2008-02-26 Brian Behlendorf : Initial commit of the solaris porting layer (spl). Included diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 7c88eda5f..95eb696a6 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -77,6 +77,7 @@ kmem_cache_add_cache_cb(kmem_cache_t *cache, void *priv, void *vmp) { kmem_cache_cb_t *kcc; + unsigned long flags; kcc = (kmem_cache_cb_t *)kmalloc(sizeof(*kcc), GFP_KERNEL); if (kcc) { @@ -86,9 +87,9 @@ kmem_cache_add_cache_cb(kmem_cache_t *cache, kcc->kcc_reclaim = reclaim; kcc->kcc_private = priv; kcc->kcc_vmp = vmp; - spin_lock(&kmem_cache_cb_lock); + spin_lock_irqsave(&kmem_cache_cb_lock, flags); list_add(&kcc->kcc_list, &kmem_cache_cb_list); - spin_unlock(&kmem_cache_cb_lock); + spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); } return kcc; @@ -97,9 +98,11 @@ kmem_cache_add_cache_cb(kmem_cache_t *cache, static void kmem_cache_remove_cache_cb(kmem_cache_cb_t *kcc) { - spin_lock(&kmem_cache_cb_lock); + unsigned long flags; + + spin_lock_irqsave(&kmem_cache_cb_lock, flags); list_del(&kcc->kcc_list); - spin_unlock(&kmem_cache_cb_lock); + spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); if (kcc) kfree(kcc); @@ -110,9 +113,10 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla { kmem_cache_cb_t *kcc; kmem_constructor_t constructor; + unsigned long irqflags; void *private; - spin_lock(&kmem_cache_cb_lock); + spin_lock_irqsave(&kmem_cache_cb_lock, irqflags); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); @@ -120,7 +124,7 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla constructor = kcc->kcc_constructor; private = kcc->kcc_private; - spin_unlock(&kmem_cache_cb_lock); + spin_unlock_irqrestore(&kmem_cache_cb_lock, irqflags); if (constructor) constructor(ptr, private, (int)flags); @@ -133,9 +137,10 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag { kmem_cache_cb_t *kcc; kmem_destructor_t destructor; + unsigned long irqflags; void *private; - spin_lock(&kmem_cache_cb_lock); + spin_lock_irqsave(&kmem_cache_cb_lock, irqflags); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); @@ -143,7 +148,7 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag destructor = kcc->kcc_destructor; private = kcc->kcc_private; - spin_unlock(&kmem_cache_cb_lock); + spin_unlock_irqrestore(&kmem_cache_cb_lock, irqflags); /* Solaris destructor takes no flags, silently eat them */ if (destructor) @@ -155,6 +160,7 @@ static int kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) { kmem_cache_cb_t *kcc; + unsigned long flags; int total = 0; /* Under linux a shrinker is not tightly coupled with a slab @@ -164,7 +170,7 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * function in the shim layer for all slab caches. And we always * attempt to shrink all caches when this generic shrinker is called. */ - spin_lock(&kmem_cache_cb_lock); + spin_lock_irqsave(&kmem_cache_cb_lock, flags); list_for_each_entry(kcc, &kmem_cache_cb_list, kcc_list) { /* Under linux the desired number and gfp type of objects @@ -185,7 +191,7 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * was registered with the generic shrinker. This should fake out * the linux VM when it attempts to shrink caches. */ - spin_unlock(&kmem_cache_cb_lock); + spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); return total; } @@ -257,11 +263,12 @@ __kmem_cache_destroy(kmem_cache_t *cache) { kmem_cache_cb_t *kcc; char *name; + unsigned long flags; int rc; - spin_lock(&kmem_cache_cb_lock); + spin_lock_irqsave(&kmem_cache_cb_lock, flags); kcc = kmem_cache_find_cache_cb(cache); - spin_unlock(&kmem_cache_cb_lock); + spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); if (kcc == NULL) return -EINVAL; @@ -271,11 +278,11 @@ __kmem_cache_destroy(kmem_cache_t *cache) kfree(name); /* Unregister generic shrinker on removal of all caches */ - spin_lock(&kmem_cache_cb_lock); + spin_lock_irqsave(&kmem_cache_cb_lock, flags); if (list_empty(&kmem_cache_cb_list)) remove_shrinker(kmem_cache_shrinker); - spin_unlock(&kmem_cache_cb_lock); + spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); return rc; } EXPORT_SYMBOL(__kmem_cache_destroy); From 57d1b1885897c9b079a6355a6d54d684ad003d46 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 18 Apr 2008 23:39:58 +0000 Subject: [PATCH 0075/1062] First commit of lustre style internal debug support. These changes bring over everything lustre had for debugging with two exceptions. I dropped by the debug daemon and upcalls just because it made things a little easier. They can be readded easily enough if we feel they are needed. Everything compiles and seems to work on first inspection but I suspect there are a handful of issues still lingering which I'll be sorting out right away. I just wanted to get all these changes commited and safe. I'm getting a little paranoid about losing them. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@75 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- cmd/Makefile.am | 7 +- cmd/spl.c | 217 +++++++ include/sys/debug.h | 313 ++++++++- include/sys/proc.h | 9 + include/sys/sysmacros.h | 26 +- modules/spl/Makefile.in | 2 + modules/spl/spl-debug.c | 1293 +++++++++++++++++++++++++++++++++++++ modules/spl/spl-generic.c | 356 ++-------- modules/spl/spl-proc.c | 574 ++++++++++++++++ modules/spl/spl-vnode.c | 4 +- 10 files changed, 2464 insertions(+), 337 deletions(-) create mode 100644 cmd/spl.c create mode 100644 include/sys/proc.h create mode 100644 modules/spl/spl-debug.c create mode 100644 modules/spl/spl-proc.c diff --git a/cmd/Makefile.am b/cmd/Makefile.am index d3d747797..3d1a39297 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -1,7 +1,10 @@ DEFAULT_INCLUDES = -I. -I.. -I../lib -AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow +AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow -D__USE_LARGEFILE64 + +sbin_PROGRAMS = spl splat + +spl_SOURCES = spl.c -sbin_PROGRAMS = splat splat_SOURCES = splat.c splat_LDFLAGS = $(top_builddir)/lib/libcommon.la diff --git a/cmd/spl.c b/cmd/spl.c new file mode 100644 index 000000000..866bc8905 --- /dev/null +++ b/cmd/spl.c @@ -0,0 +1,217 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "../include/spl-ctl.h" + +static int spl_debug_mask = ~0; +static int spl_debug_subsystem = ~0; + +/* all strings nul-terminated; only the struct and hdr need to be freed */ +struct dbg_line { + struct spl_debug_header *hdr; + char *file; + char *fn; + char *text; +}; + +static int +cmp_rec(const void *p1, const void *p2) +{ + struct dbg_line *d1 = *(struct dbg_line **)p1; + struct dbg_line *d2 = *(struct dbg_line **)p2; + + if (d1->hdr->ph_sec < d2->hdr->ph_sec) + return -1; + + if (d1->hdr->ph_sec == d2->hdr->ph_sec && + d1->hdr->ph_usec < d2->hdr->ph_usec) + return -1; + + if (d1->hdr->ph_sec == d2->hdr->ph_sec && + d1->hdr->ph_usec == d2->hdr->ph_usec) + return 0; + + return 1; +} + +static void +print_rec(struct dbg_line **linev, int used, FILE *out) +{ + int i; + + for (i = 0; i < used; i++) { + struct dbg_line *line = linev[i]; + struct spl_debug_header *hdr = line->hdr; + + fprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:(%s:%u:%s()) %s", + hdr->ph_subsys, hdr->ph_mask, hdr->ph_cpu_id, + hdr->ph_sec, (unsigned long long)hdr->ph_usec, + hdr->ph_stack, hdr->ph_pid, line->file, + hdr->ph_line_num, line->fn, line->text); + free(line->hdr); + free(line); + } + + free(linev); +} + +static int +add_rec(struct dbg_line *line, struct dbg_line ***linevp, int *lenp, int used) +{ + struct dbg_line **linev = *linevp; + + if (used == *lenp) { + int nlen = *lenp + 512; + int nsize = nlen * sizeof(struct dbg_line *); + + linev = *linevp ? realloc(*linevp, nsize) : malloc(nsize); + if (!linev) + return 0; + *linevp = linev; + *lenp = nlen; + } + linev[used] = line; + return 1; +} + +static int +parse_buffer(FILE *in, FILE *out) +{ + struct dbg_line *line; + struct spl_debug_header *hdr; + char buf[4097], *p; + unsigned long dropped = 0, kept = 0; + struct dbg_line **linev = NULL; + const int phl = sizeof(hdr->ph_len); + const int phf = sizeof(hdr->ph_flags); + int rc, linev_len = 0; + + while (1) { + rc = fread(buf, phl + phf, 1, in); + if (rc <= 0) + break; + + hdr = (void *)buf; + if (hdr->ph_len == 0) + break; + if (hdr->ph_len > 4094) { + fprintf(stderr, "unexpected large record: %d bytes. " + "aborting.\n", hdr->ph_len); + break; + } + + rc = fread(buf + phl + phf, 1, hdr->ph_len - phl - phf, in); + if (rc <= 0) + break; + + if (hdr->ph_mask && + (!(spl_debug_subsystem & hdr->ph_subsys) || + (!(spl_debug_mask & hdr->ph_mask)))) { + dropped++; + continue; + } + + line = malloc(sizeof(*line)); + if (line == NULL) { + fprintf(stderr, "malloc failed; printing accumulated " + "records and exiting.\n"); + break; + } + + line->hdr = malloc(hdr->ph_len + 1); + if (line->hdr == NULL) { + free(line); + fprintf(stderr, "malloc failed; printing accumulated " + "records and exiting.\n"); + break; + } + + p = (void *)line->hdr; + memcpy(line->hdr, buf, hdr->ph_len); + p[hdr->ph_len] = '\0'; + + p += sizeof(*hdr); + line->file = p; + p += strlen(line->file) + 1; + line->fn = p; + p += strlen(line->fn) + 1; + line->text = p; + + if (!add_rec(line, &linev, &linev_len, kept)) { + fprintf(stderr, "malloc failed; printing accumulated " + "records and exiting.\n"); + break; + } + kept++; + } + + if (linev) { + qsort(linev, kept, sizeof(struct dbg_line *), cmp_rec); + print_rec(linev, kept, out); + } + + printf("Debug log: %lu lines, %lu kept, %lu dropped.\n", + dropped + kept, kept, dropped); + return 0; +} + +int +main(int argc, char *argv[]) +{ + int fdin, fdout; + FILE *in, *out = stdout; + int rc, o_lf = 0; + + if (argc > 3 || argc < 2) { + fprintf(stderr, "usage: %s [output]\n", argv[0]); + return 0; + } + +#ifdef __USE_LARGEFILE64 + o_lf = O_LARGEFILE; +#endif + + fdin = open(argv[1], O_RDONLY | o_lf); + if (fdin == -1) { + fprintf(stderr, "open(%s) failed: %s\n", argv[1], + strerror(errno)); + return 1; + } + in = fdopen(fdin, "r"); + if (in == NULL) { + fprintf(stderr, "fopen(%s) failed: %s\n", argv[1], + strerror(errno)); + close(fdin); + return 1; + } + if (argc > 2) { + fdout = open(argv[2], O_CREAT | O_TRUNC | O_WRONLY | o_lf, 0600); + if (fdout == -1) { + fprintf(stderr, "open(%s) failed: %s\n", argv[2], + strerror(errno)); + fclose(in); + return 1; + } + out = fdopen(fdout, "w"); + if (out == NULL) { + fprintf(stderr, "fopen(%s) failed: %s\n", argv[2], + strerror(errno)); + fclose(in); + close(fdout); + return 1; + } + } + + rc = parse_buffer(in, out); + + fclose(in); + if (out != stdout) + fclose(out); + + return rc; +} diff --git a/include/sys/debug.h b/include/sys/debug.h index 4a6ed5c3d..a670c0374 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -1,11 +1,318 @@ #ifndef _SPL_DEBUG_H #define _SPL_DEBUG_H +#include /* THREAD_SIZE */ +#include + extern unsigned long spl_debug_mask; extern unsigned long spl_debug_subsys; -void __dprintf(const char *file, const char *func, int line, const char *fmt, ...); -void spl_set_debug_mask(unsigned long mask); -void spl_set_debug_subsys(unsigned long mask); +#define S_UNDEFINED 0x00000001 +#define S_ATOMIC 0x00000002 +#define S_KOBJ 0x00000004 +#define S_VNODE 0x00000008 +#define S_TIME 0x00000010 +#define S_RWLOCK 0x00000020 +#define S_THREAD 0x00000040 +#define S_CONDVAR 0x00000080 +#define S_MUTEX 0x00000100 +#define S_RNG 0x00000200 +#define S_TASKQ 0x00000400 +#define S_KMEM 0x00000800 +#define S_DEBUG 0x00001000 +#define S_GENERIC 0x00002000 +#define S_PROC 0x00004000 + +#define D_TRACE 0x00000001 +#define D_INFO 0x00000002 +#define D_WARNING 0x00000004 +#define D_ERROR 0x00000008 +#define D_EMERG 0x00000010 +#define D_CONSOLE 0x00000020 +#define D_IOCTL 0x00000040 +#define D_DPRINTF 0x00000080 +#define D_OTHER 0x00000100 + +#define D_CANTMASK (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE) +#define DEBUG_SUBSYSTEM S_UNDEFINED + +int debug_init(void); +void debug_fini(void); +int spl_debug_mask2str(char *str, int size, unsigned long mask, int is_subsys); +int spl_debug_str2mask(unsigned long *mask, const char *str, int is_subsys); + +extern unsigned long spl_debug_subsys; +extern unsigned long spl_debug_mask; +extern unsigned long spl_debug_printk; +extern int spl_debug_mb; +extern unsigned int spl_debug_binary; +extern unsigned int spl_debug_catastrophe; +extern unsigned int spl_debug_panic_on_bug; +extern char spl_debug_file_path[PATH_MAX]; +extern unsigned int spl_console_ratelimit; +extern long spl_console_max_delay; +extern long spl_console_min_delay; +extern unsigned int spl_console_backoff; +extern unsigned int spl_debug_stack; + +#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) +#define TCD_STOCK_PAGES (TCD_MAX_PAGES) +#define TRACE_CONSOLE_BUFFER_SIZE 1024 + +#define SPL_DEFAULT_MAX_DELAY (600 * HZ) +#define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2) +#define SPL_DEFAULT_BACKOFF 2 + +typedef struct { + unsigned long cdls_next; + int cdls_count; + long cdls_delay; +} spl_debug_limit_state_t; + +/* Three trace data types */ +typedef enum { + TCD_TYPE_PROC, + TCD_TYPE_SOFTIRQ, + TCD_TYPE_IRQ, + TCD_TYPE_MAX +} tcd_type_t; + +union trace_data_union { + struct trace_cpu_data { + /* pages with trace records not yet processed by tracefiled */ + struct list_head tcd_pages; + /* number of pages on ->tcd_pages */ + unsigned long tcd_cur_pages; + /* Max number of pages allowed on ->tcd_pages */ + unsigned long tcd_max_pages; + + /* + * preallocated pages to write trace records into. Pages from + * ->tcd_stock_pages are moved to ->tcd_pages by spl_debug_msg(). + * + * This list is necessary, because on some platforms it's + * impossible to perform efficient atomic page allocation in a + * non-blockable context. + * + * Such platforms fill ->tcd_stock_pages "on occasion", when + * tracing code is entered in blockable context. + * + * trace_get_tage_try() tries to get a page from + * ->tcd_stock_pages first and resorts to atomic page + * allocation only if this queue is empty. ->tcd_stock_pages + * is replenished when tracing code is entered in blocking + * context (darwin-tracefile.c:trace_get_tcd()). We try to + * maintain TCD_STOCK_PAGES (40 by default) pages in this + * queue. Atomic allocation is only required if more than + * TCD_STOCK_PAGES pagesful are consumed by trace records all + * emitted in non-blocking contexts. Which is quite unlikely. + */ + struct list_head tcd_stock_pages; + /* number of pages on ->tcd_stock_pages */ + unsigned long tcd_cur_stock_pages; + + unsigned short tcd_shutting_down; + unsigned short tcd_cpu; + unsigned short tcd_type; + /* The factors to share debug memory. */ + unsigned short tcd_pages_factor; + } tcd; + char __pad[L1_CACHE_ALIGN(sizeof(struct trace_cpu_data))]; +}; + +extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; + +#define tcd_for_each(tcd, i, j) \ + for (i = 0; trace_data[i] != NULL; i++) \ + for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ + j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) + +#define tcd_for_each_type_lock(tcd, i) \ + for (i = 0; trace_data[i] && \ + (tcd = &(*trace_data[i])[smp_processor_id()].tcd) && \ + trace_lock_tcd(tcd); trace_unlock_tcd(tcd), i++) + +struct trace_page { + struct page * page; /* page itself */ + struct list_head linkage; /* Used by lists in trace_data_union */ + unsigned int used; /* number of bytes used within this page */ + unsigned short cpu; /* cpu that owns this page */ + unsigned short type; /* type(context) of this page */ +}; + +struct page_collection { + struct list_head pc_pages; + spinlock_t pc_lock; + int pc_want_daemon_pages; +}; + +/* ASSERTION that is safe to use within the debug system */ +#define __ASSERT(cond) \ +do { \ + if (unlikely(!(cond))) { \ + printk(KERN_ERR "ASSERTION("#cond") failed"); \ + BUG(); \ + } \ +} while (0) + +#define __ASSERT_TAGE_INVARIANT(tage) \ +do { \ + __ASSERT(tage != NULL); \ + __ASSERT(tage->page != NULL); \ + __ASSERT(tage->used <= PAGE_SIZE); \ + __ASSERT(page_count(tage->page) > 0); \ +} while(0) + +/* ASSERTION that will debug log used outside the debug sysytem */ +#define ASSERT(cond) \ +do { \ + if (unlikely(!(cond))) { \ + spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ + __FILE__, __FUNCTION__, __LINE__, \ + "ASSERTION(" #cond ") failed\n"); \ + spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); \ + } \ +} while (0) + +#define ASSERTF(cond, fmt, a...) \ +do { \ + if (unlikely(!(cond))) { \ + spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ + __FILE__, __FUNCTION__, __LINE__, \ + "ASSERTION(" #cond ") failed:" fmt, \ + ## a); \ + spl_debug_bug(__FILE__, __FUNCTION__, __LINE__) \ + } \ +} while (0) + +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ +do { \ + const TYPE __left = (TYPE)(LEFT); \ + const TYPE __right = (TYPE)(RIGHT); \ + if (!(__left OP __right)) { \ + spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ + __FILE__, __FUNCTION__, __LINE__, \ + "VERIFY3(" FMT " " #OP " " FMT ")\n", \ + CAST __left, CAST __right); \ + spl_debug_bug(__FILE__, __FUNCTION__, __LINE__) \ + } \ +} while (0) + +#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%ld", (long)) +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%lu", (unsigned long)) +#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) + +#define ASSERT3S(x,y,z) VERIFY3S(x, y, z) +#define ASSERT3U(x,y,z) VERIFY3U(x, y, z) +#define ASSERT3P(x,y,z) VERIFY3P(x, y, z) + +#define VERIFY(x) ASSERT(x) +#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); + +#define spl_debug_msg(cdls, subsys, mask, file, fn, line, format, a...) \ + spl_debug_vmsg(cdls, subsys, mask, file, fn, \ + line, NULL, NULL, format, ##a) + +#ifdef __ia64__ +#define CDEBUG_STACK() (THREAD_SIZE - \ + ((unsigned long)__builtin_dwarf_cfa() & \ + (THREAD_SIZE - 1))) +#else +#define CDEBUG_STACK() (THREAD_SIZE - \ + ((unsigned long)__builtin_frame_address(0) & \ + (THREAD_SIZE - 1))) +# endif /* __ia64__ */ + +#define __CHECK_STACK(file, func, line) \ +do { \ + unsigned long _stack = CDEBUG_STACK(); \ + \ + if (_stack > (3*THREAD_SIZE/4) && _stack > spl_debug_stack) { \ + spl_debug_stack = _stack; \ + spl_debug_msg(NULL, D_TRACE, D_WARNING, \ + file, func, line, \ + "Exceeded maximum safe stack " \ + "%lu/%lu\n", _stack, THREAD_SIZE); \ + __ASSERT(0); \ + } \ +} while (0) + +#define CHECK_STACK()__CHECK_STACK(__FILE__, __func__, __LINE__) + +#define __CDEBUG(cdls, subsys, mask, format, a...) \ +do { \ + CHECK_STACK(); \ + \ + if (((mask) & D_CANTMASK) != 0 || \ + ((spl_debug_mask & (mask)) != 0 && \ + (spl_debug_subsys & (subsys)) != 0)) \ + spl_debug_msg(cdls, subsys, mask, \ + __FILE__, __FUNCTION__, __LINE__, \ + format, ## a); \ +} while (0) + +#define CDEBUG(mask, format, a...) \ + __CDEBUG(NULL, DEBUG_SUBSYSTEM, mask, format, ## a) + +#define __CDEBUG_LIMIT(subsys, mask, format, a...) \ +do { \ + static spl_debug_limit_state_t cdls; \ + \ + __CDEBUG(&cdls, subsys, mask, format, ## a); \ +} while (0) + +#define CDEBUG_LIMIT(mask, format, a...) \ + __CDEBUG_LIMIT(DEBUG_SUBSYSTEM, mask, format, ## a) + +#define dprintf(fmt, a...) CDEBUG_LIMIT(D_INFO, fmt, ## a) +#define CWARN(fmt, a...) CDEBUG_LIMIT(D_WARNING, fmt, ## a) +#define CERROR(fmt, a...) CDEBUG_LIMIT(D_ERROR, fmt, ## a) +#define CEMERG(fmt, a...) CDEBUG_LIMIT(D_EMERG, fmt, ## a) +#define CONSOLE(mask, fmt, a...) CDEBUG(D_CONSOLE | (mask), fmt, ## a) + +#define GOTO(label, rc) \ +do { \ + long GOTO__ret = (long)(rc); \ + CDEBUG(D_TRACE,"Process leaving via %s (rc=%lu : %ld : %lx)\n", \ + #label, (unsigned long)GOTO__ret, (signed long)GOTO__ret,\ + (signed long)GOTO__ret); \ + goto label; \ +} while (0) + +#define RETURN(rc) \ +do { \ + typeof(rc) RETURN__ret = (rc); \ + CDEBUG(D_TRACE, "Process leaving (rc=%lu : %ld : %lx)\n", \ + (long)RETURN__ret, (long)RETURN__ret, (long)RETURN__ret);\ + return RETURN__ret; \ +} while (0) + +#define ENTRY \ +do { \ + CDEBUG(D_TRACE, "Process entered\n"); \ +} while (0) + +#define EXIT \ +do { \ + CDEBUG(D_TRACE, "Process leaving\n"); \ +} while(0) + +extern int spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, + const char *file, const char *fn, const int line, + const char *format1, va_list args, const char *format2, ...); + +extern unsigned long spl_debug_set_mask(unsigned long mask); +extern unsigned long spl_debug_get_mask(void); +extern unsigned long spl_debug_set_subsys(unsigned long mask); +extern unsigned long spl_debug_get_subsys(void); +extern int spl_debug_set_mb(int mb); +extern int spl_debug_get_mb(void); + +extern int spl_debug_dumplog(void); +extern void spl_debug_dumpstack(struct task_struct *tsk); +extern void spl_debug_bug(char *file, const char *func, const int line); + +extern int spl_debug_clear_buffer(void); +extern int spl_debug_mark_buffer(char *text); #endif /* SPL_DEBUG_H */ diff --git a/include/sys/proc.h b/include/sys/proc.h new file mode 100644 index 000000000..e77ea5fb2 --- /dev/null +++ b/include/sys/proc.h @@ -0,0 +1,9 @@ +#ifndef _SPL_PROC_H +#define _SPL_PROC_H + +#include + +int proc_init(void); +void proc_fini(void); + +#endif /* SPL_PROC_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index d5f8597c2..62a51aa38 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -6,6 +6,7 @@ extern "C" { #endif #include +#include #include #include #include @@ -73,26 +74,6 @@ extern "C" { #define bzero(ptr,size) memset(ptr,0,size) #define bcopy(src,dest,size) memcpy(dest,src,size) #define bcmp(src,dest,size) memcmp((src), (dest), (size_t)(size)) -#define ASSERT(x) BUG_ON(!(x)) -#define VERIFY(x) ASSERT(x) - -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) do { \ - const TYPE __left = (TYPE)(LEFT); \ - const TYPE __right = (TYPE)(RIGHT); \ - if (!(__left OP __right)) { \ - printk("spl: Error VERIFY3(" FMT " " #OP " " FMT ")\n", \ - CAST __left, CAST __right); \ - BUG(); \ - } \ -} while (0) - -#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t, "%ld", (long)) -#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t, "%lu", (unsigned long)) -#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) - -#define ASSERT3S(x, y, z) VERIFY3S(x, y, z) -#define ASSERT3U(x, y, z) VERIFY3U(x, y, z) -#define ASSERT3P(x, y, z) VERIFY3P(x, y, z) /* Dtrace probes do not exist in the linux kernel */ @@ -117,12 +98,13 @@ extern "C" { #define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) /* Missing globals */ +extern unsigned long spl_hostid; +extern char spl_hw_serial[11]; extern int p0; -extern char hw_serial[11]; /* Missing misc functions */ extern int highbit(unsigned long i); -extern int ddi_strtoul(const char *hw_serial, char **nptr, +extern int ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result); #define makedevice(maj,min) makedev(maj,min) diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 7f16904ef..ff283dfd6 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -9,6 +9,8 @@ CPPFLAGS += @KERNELCPPFLAGS@ # Solaris porting layer module obj-m := spl.o +spl-objs += spl-debug.o +spl-objs += spl-proc.o spl-objs += spl-kmem.o spl-objs += spl-thread.o spl-objs += spl-taskq.o diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c new file mode 100644 index 000000000..f36a1c39e --- /dev/null +++ b/modules/spl/spl-debug.c @@ -0,0 +1,1293 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * Copyright (C) 2004 Cluster File Systems, Inc. + * Author: Zach Brown + * Author: Phil Schwan + * Author: Brian Behlendorf + * + * This file was originally part of Lustre, http://www.lustre.org. + * but has subsequently been adapted for use in the SPL in + * accordance with the GPL. + * + * SPL is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * SPL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with SPL; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "config.h" + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_DEBUG + +unsigned long spl_debug_subsys = ~0; +EXPORT_SYMBOL(spl_debug_subsys); +module_param(spl_debug_subsys, long, 0644); +MODULE_PARM_DESC(spl_debug_subsys, "Subsystem debugging level mask."); + +unsigned long spl_debug_mask = (D_EMERG | D_ERROR | D_WARNING | D_CONSOLE); +EXPORT_SYMBOL(spl_debug_mask); +module_param(spl_debug_mask, long, 0644); +MODULE_PARM_DESC(spl_debug_mask, "Debugging level mask."); + +unsigned long spl_debug_printk = D_CANTMASK; +EXPORT_SYMBOL(spl_debug_printk); +module_param(spl_debug_printk, long, 0644); +MODULE_PARM_DESC(spl_debug_printk, "Console printk level mask."); + +int spl_debug_mb = -1; +EXPORT_SYMBOL(spl_debug_mb); +module_param(spl_debug_mb, int, 0644); +MODULE_PARM_DESC(spl_debug_mb, "Total debug buffer size."); + +unsigned int spl_debug_binary = 1; +EXPORT_SYMBOL(spl_debug_binary); + +unsigned int spl_debug_catastrophe; +EXPORT_SYMBOL(spl_debug_catastrophe); + +unsigned int spl_debug_panic_on_bug = 1; +EXPORT_SYMBOL(spl_debug_panic_on_bug); +module_param(spl_debug_panic_on_bug, int, 0644); +MODULE_PARM_DESC(spl_debug_panic_on_bug, "Panic on BUG"); + +static char spl_debug_file_name[PATH_MAX]; +char spl_debug_file_path[PATH_MAX] = "/var/dumps/spl-log"; + +unsigned int spl_console_ratelimit = 1; +EXPORT_SYMBOL(spl_console_ratelimit); + +long spl_console_max_delay; +EXPORT_SYMBOL(spl_console_max_delay); + +long spl_console_min_delay; +EXPORT_SYMBOL(spl_console_min_delay); + +unsigned int spl_console_backoff = SPL_DEFAULT_BACKOFF; +EXPORT_SYMBOL(spl_console_backoff); + +unsigned int spl_debug_stack; +EXPORT_SYMBOL(spl_debug_stack); + +static int spl_panic_in_progress; + +union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS] __cacheline_aligned; +char *trace_console_buffers[NR_CPUS][3]; +struct rw_semaphore trace_sem; +atomic_t trace_tage_allocated = ATOMIC_INIT(0); + +static int panic_notifier(struct notifier_block *, unsigned long, void *); +static int spl_debug_dump_all_pages(char *); +static void trace_fini(void); + + +/* Memory percentage breakdown by type */ +static unsigned int pages_factor[TCD_TYPE_MAX] = { + 80, /* 80% pages for TCD_TYPE_PROC */ + 10, /* 10% pages for TCD_TYPE_SOFTIRQ */ + 10 /* 10% pages for TCD_TYPE_IRQ */ +}; + +static struct notifier_block spl_panic_notifier = { + notifier_call: panic_notifier, + next: NULL, + priority: 10000 +}; + +const char * +spl_debug_subsys2str(int subsys) +{ + switch (subsys) { + default: + return NULL; + case S_UNDEFINED: + return "undefined"; + case S_ATOMIC: + return "atomic"; + case S_KOBJ: + return "kobj"; + case S_VNODE: + return "vnode"; + case S_TIME: + return "time"; + case S_RWLOCK: + return "rwlock"; + case S_THREAD: + return "thread"; + case S_CONDVAR: + return "condvar"; + case S_MUTEX: + return "mutex"; + case S_RNG: + return "rng"; + case S_TASKQ: + return "taskq"; + case S_KMEM: + return "kmem"; + } +} + +const char * +spl_debug_dbg2str(int debug) +{ + switch (debug) { + default: + return NULL; + case D_TRACE: + return "trace"; + case D_INFO: + return "info"; + case D_WARNING: + return "warning"; + case D_ERROR: + return "error"; + case D_EMERG: + return "emerg"; + case D_CONSOLE: + return "console"; + case D_IOCTL: + return "ioctl"; + case D_DPRINTF: + return "dprintf"; + case D_OTHER: + return "other"; + } +} + +int +spl_debug_mask2str(char *str, int size, unsigned long mask, int is_subsys) +{ + const char *(*fn)(int bit) = is_subsys ? spl_debug_subsys2str : + spl_debug_dbg2str; + const char *token; + int i, bit, len = 0; + + if (mask == 0) { /* "0" */ + if (size > 0) + str[0] = '0'; + len = 1; + } else { /* space-separated tokens */ + for (i = 0; i < 32; i++) { + bit = 1 << i; + + if ((mask & bit) == 0) + continue; + + token = fn(bit); + if (token == NULL) /* unused bit */ + continue; + + if (len > 0) { /* separator? */ + if (len < size) + str[len] = ' '; + len++; + } + + while (*token != 0) { + if (len < size) + str[len] = *token; + token++; + len++; + } + } + } + + /* terminate 'str' */ + if (len < size) + str[len] = 0; + else + str[size - 1] = 0; + + return len; +} + +static int +spl_debug_token2mask(int *mask, const char *str, int len, int is_subsys) +{ + const char *(*fn)(int bit) = is_subsys ? spl_debug_subsys2str : + spl_debug_dbg2str; + const char *token; + int i, j, bit; + + /* match against known tokens */ + for (i = 0; i < 32; i++) { + bit = 1 << i; + + token = fn(bit); + if (token == NULL) /* unused? */ + continue; + + /* strcasecmp */ + for (j = 0; ; j++) { + if (j == len) { /* end of token */ + if (token[j] == 0) { + *mask = bit; + return 0; + } + break; + } + + if (token[j] == 0) + break; + + if (str[j] == token[j]) + continue; + + if (str[j] < 'A' || 'Z' < str[j]) + break; + + if (str[j] - 'A' + 'a' != token[j]) + break; + } + } + + return -EINVAL; /* no match */ +} + +int +spl_debug_str2mask(unsigned long *mask, const char *str, int is_subsys) +{ + char op = 0; + int m = 0, matched, n, t; + + /* Allow a number for backwards compatibility */ + for (n = strlen(str); n > 0; n--) + if (!isspace(str[n-1])) + break; + matched = n; + + if ((t = sscanf(str, "%i%n", &m, &matched)) >= 1 && matched == n) { + *mask = m; + return 0; + } + + /* must be a list of debug tokens or numbers separated by + * whitespace and optionally an operator ('+' or '-'). If an operator + * appears first in , '*mask' is used as the starting point + * (relative), otherwise 0 is used (absolute). An operator applies to + * all following tokens up to the next operator. */ + matched = 0; + while (*str != 0) { + while (isspace(*str)) /* skip whitespace */ + str++; + + if (*str == 0) + break; + + if (*str == '+' || *str == '-') { + op = *str++; + + /* op on first token == relative */ + if (!matched) + m = *mask; + + while (isspace(*str)) /* skip whitespace */ + str++; + + if (*str == 0) /* trailing op */ + return -EINVAL; + } + + /* find token length */ + for (n = 0; str[n] != 0 && !isspace(str[n]); n++); + + /* match token */ + if (spl_debug_token2mask(&t, str, n, is_subsys) != 0) + return -EINVAL; + + matched = 1; + if (op == '-') + m &= ~t; + else + m |= t; + + str += n; + } + + if (!matched) + return -EINVAL; + + *mask = m; + return 0; +} + +typedef struct dumplog_priv { + wait_queue_head_t dp_waitq; + pid_t dp_pid; + atomic_t dp_flag; +} dumplog_priv_t; + +static void +spl_debug_dumplog_internal(dumplog_priv_t *dp) +{ + void *journal_info; + + journal_info = current->journal_info; + current->journal_info = NULL; + + snprintf(spl_debug_file_name, sizeof(spl_debug_file_path) - 1, + "%s.%ld.%ld", spl_debug_file_path, + get_seconds(), (long)dp->dp_pid); + printk(KERN_ALERT "SPL: dumping log to %s\n", spl_debug_file_name); + spl_debug_dump_all_pages(spl_debug_file_name); + + current->journal_info = journal_info; +} + +static int +spl_debug_dumplog_thread(void *arg) +{ + dumplog_priv_t *dp = (dumplog_priv_t *)arg; + + spl_debug_dumplog_internal(dp); + atomic_set(&dp->dp_flag, 1); + wake_up(&dp->dp_waitq); + do_exit(0); + + return 0; /* Unreachable */ +} + +int +spl_debug_dumplog(void) +{ + struct task_struct *tsk; + dumplog_priv_t dp; + ENTRY; + + init_waitqueue_head(&dp.dp_waitq); + dp.dp_pid = current->pid; + atomic_set(&dp.dp_flag, 0); + + tsk = kthread_create(spl_debug_dumplog_thread,(void *)&dp,"spl_debug"); + if (tsk == NULL) + RETURN(-ENOMEM); + + wake_up_process(tsk); + wait_event(dp.dp_waitq, atomic_read(&dp.dp_flag)); + + RETURN(0); +} +EXPORT_SYMBOL(spl_debug_dumplog); + +static char * +trace_get_console_buffer(void) +{ + int cpu = get_cpu(); + int idx; + + if (in_irq()) { + idx = 0; + } else if (in_softirq()) { + idx = 1; + } else { + idx = 2; + } + + return trace_console_buffers[cpu][idx]; +} + +static void +trace_put_console_buffer(char *buffer) +{ + put_cpu(); +} + +static struct trace_cpu_data * +trace_get_tcd(void) +{ + int cpu; + + cpu = get_cpu(); + if (in_irq()) + return &(*trace_data[TCD_TYPE_IRQ])[cpu].tcd; + else if (in_softirq()) + return &(*trace_data[TCD_TYPE_SOFTIRQ])[cpu].tcd; + + return &(*trace_data[TCD_TYPE_PROC])[cpu].tcd; +} + +static void +trace_put_tcd (struct trace_cpu_data *tcd) +{ + put_cpu(); +} + +static int +trace_lock_tcd(struct trace_cpu_data *tcd) +{ + __ASSERT(tcd->tcd_type < TCD_TYPE_MAX); + + if (tcd->tcd_type == TCD_TYPE_IRQ) + local_irq_disable(); + else if (tcd->tcd_type == TCD_TYPE_SOFTIRQ) + local_bh_disable(); + + return 1; +} + +static void +trace_unlock_tcd(struct trace_cpu_data *tcd) +{ + __ASSERT(tcd->tcd_type < TCD_TYPE_MAX); + + if (tcd->tcd_type == TCD_TYPE_IRQ) + local_irq_enable(); + else if (tcd->tcd_type == TCD_TYPE_SOFTIRQ) + local_bh_enable(); +} + +static void +trace_set_debug_header(struct spl_debug_header *header, int subsys, + int mask, const int line, unsigned long stack) +{ + struct timeval tv; + + do_gettimeofday(&tv); + + header->ph_subsys = subsys; + header->ph_mask = mask; + header->ph_cpu_id = smp_processor_id(); + header->ph_sec = (__u32)tv.tv_sec; + header->ph_usec = tv.tv_usec; + header->ph_stack = stack; + header->ph_pid = current->pid; + header->ph_line_num = line; + + return; +} + +static void +trace_print_to_console(struct spl_debug_header *hdr, int mask, const char *buf, + int len, const char *file, const char *fn) +{ + char *prefix = "SPL", *ptype = NULL; + + if ((mask & D_EMERG) != 0) { + prefix = "SPLError"; + ptype = KERN_EMERG; + } else if ((mask & D_ERROR) != 0) { + prefix = "SPLError"; + ptype = KERN_ERR; + } else if ((mask & D_WARNING) != 0) { + prefix = "SPL"; + ptype = KERN_WARNING; + } else if ((mask & (D_CONSOLE | spl_debug_printk)) != 0) { + prefix = "SPL"; + ptype = KERN_INFO; + } + + if ((mask & D_CONSOLE) != 0) { + printk("%s%s: %.*s", ptype, prefix, len, buf); + } else { + printk("%s%s: %d:(%s:%d:%s()) %.*s", ptype, prefix, hdr->ph_pid, + file, hdr->ph_line_num, fn, len, buf); + } + + return; +} + +static int +trace_max_debug_mb(void) +{ + return MAX(512, ((num_physpages >> (20 - PAGE_SHIFT)) * 80) / 100); +} + +static void +trace_call_on_all_cpus(void (*fn)(void *arg), void *arg) +{ + cpumask_t mask, cpus_allowed = current->cpus_allowed; + int cpu; + + for_each_online_cpu(cpu) { + cpus_clear(mask); + cpu_set(cpu, mask); + set_cpus_allowed(current, mask); + + fn(arg); + + set_cpus_allowed(current, cpus_allowed); + } +} + +static struct trace_page * +tage_alloc(int gfp) +{ + struct page *page; + struct trace_page *tage; + + page = alloc_pages(gfp | __GFP_NOWARN, 0); + if (page == NULL) + return NULL; + + tage = kmalloc(sizeof(*tage), gfp); + if (tage == NULL) { + __free_pages(page, 0); + return NULL; + } + + tage->page = page; + atomic_inc(&trace_tage_allocated); + + return tage; +} + +static void +tage_free(struct trace_page *tage) +{ + __ASSERT(tage != NULL); + __ASSERT(tage->page != NULL); + + __free_pages(tage->page, 0); + kfree(tage); + atomic_dec(&trace_tage_allocated); +} + +static struct trace_page * +tage_from_list(struct list_head *list) +{ + return list_entry(list, struct trace_page, linkage); +} + +static void +tage_to_tail(struct trace_page *tage, struct list_head *queue) +{ + __ASSERT(tage != NULL); + __ASSERT(queue != NULL); + + list_move_tail(&tage->linkage, queue); +} + +/* try to return a page that has 'len' bytes left at the end */ +static struct trace_page * +trace_get_tage_try(struct trace_cpu_data *tcd, unsigned long len) +{ + struct trace_page *tage; + + if (tcd->tcd_cur_pages > 0) { + __ASSERT(!list_empty(&tcd->tcd_pages)); + tage = tage_from_list(tcd->tcd_pages.prev); + if (tage->used + len <= PAGE_SIZE) + return tage; + } + + if (tcd->tcd_cur_pages < tcd->tcd_max_pages) { + if (tcd->tcd_cur_stock_pages > 0) { + tage = tage_from_list(tcd->tcd_stock_pages.prev); + tcd->tcd_cur_stock_pages--; + list_del_init(&tage->linkage); + } else { + tage = tage_alloc(GFP_ATOMIC); + if (tage == NULL) { + printk(KERN_WARNING + "failure to allocate a tage (%ld)\n", + tcd->tcd_cur_pages); + return NULL; + } + } + + tage->used = 0; + tage->cpu = smp_processor_id(); + tage->type = tcd->tcd_type; + list_add_tail(&tage->linkage, &tcd->tcd_pages); + tcd->tcd_cur_pages++; + + return tage; + } + + return NULL; +} + +/* return a page that has 'len' bytes left at the end */ +static struct trace_page * +trace_get_tage(struct trace_cpu_data *tcd, unsigned long len) +{ + struct trace_page *tage; + + __ASSERT(len <= PAGE_SIZE); + + tage = trace_get_tage_try(tcd, len); + if (tage) + return tage; + + if (tcd->tcd_cur_pages > 0) { + tage = tage_from_list(tcd->tcd_pages.next); + tage->used = 0; + tage_to_tail(tage, &tcd->tcd_pages); + } + + return tage; +} + +int +spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, + const char *file, const char *fn, const int line, + const char *format1, va_list args, const char *format2, ...) +{ + struct trace_cpu_data *tcd = NULL; + struct spl_debug_header header; + struct trace_page *tage; + /* string_buf is used only if tcd != NULL, and is always set then */ + char *string_buf = NULL; + char *debug_buf; + int known_size; + int needed = 85; /* average message length */ + int max_nob; + va_list ap; + int i; + int remain; + + if (strchr(file, '/')) + file = strrchr(file, '/') + 1; + + trace_set_debug_header(&header, subsys, mask, line, CDEBUG_STACK()); + + tcd = trace_get_tcd(); + if (tcd == NULL) + goto console; + + if (tcd->tcd_shutting_down) { + trace_put_tcd(tcd); + tcd = NULL; + goto console; + } + + known_size = strlen(file) + 1; + if (fn) + known_size += strlen(fn) + 1; + + if (spl_debug_binary) + known_size += sizeof(header); + + /* '2' used because vsnprintf returns real size required for output + * _without_ terminating NULL. */ + for (i = 0; i < 2; i++) { + tage = trace_get_tage(tcd, needed + known_size + 1); + if (tage == NULL) { + if (needed + known_size > PAGE_SIZE) + mask |= D_ERROR; + + trace_put_tcd(tcd); + tcd = NULL; + goto console; + } + + string_buf = (char *)page_address(tage->page) + + tage->used + known_size; + + max_nob = PAGE_SIZE - tage->used - known_size; + if (max_nob <= 0) { + printk(KERN_EMERG "negative max_nob: %i\n", max_nob); + mask |= D_ERROR; + trace_put_tcd(tcd); + tcd = NULL; + goto console; + } + + needed = 0; + if (format1) { + va_copy(ap, args); + needed = vsnprintf(string_buf, max_nob, format1, ap); + va_end(ap); + } + + if (format2) { + remain = max_nob - needed; + if (remain < 0) + remain = 0; + + va_start(ap, format2); + needed += vsnprintf(string_buf+needed, remain, format2, ap); + va_end(ap); + } + + if (needed < max_nob) + break; + } + + if (unlikely(*(string_buf + needed - 1) != '\n')) + printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n", + file, line, fn); + + header.ph_len = known_size + needed; + debug_buf = (char *)page_address(tage->page) + tage->used; + + if (spl_debug_binary) { + memcpy(debug_buf, &header, sizeof(header)); + tage->used += sizeof(header); + debug_buf += sizeof(header); + } + + strcpy(debug_buf, file); + tage->used += strlen(file) + 1; + debug_buf += strlen(file) + 1; + + if (fn) { + strcpy(debug_buf, fn); + tage->used += strlen(fn) + 1; + debug_buf += strlen(fn) + 1; + } + + __ASSERT(debug_buf == string_buf); + + tage->used += needed; + __ASSERT (tage->used <= PAGE_SIZE); + +console: + if ((mask & spl_debug_printk) == 0) { + /* no console output requested */ + if (tcd != NULL) + trace_put_tcd(tcd); + return 1; + } + + if (cdls != NULL) { + if (spl_console_ratelimit && cdls->cdls_next != 0 && + !time_before(cdls->cdls_next, jiffies)) { + /* skipping a console message */ + cdls->cdls_count++; + if (tcd != NULL) + trace_put_tcd(tcd); + return 1; + } + + if (time_before(cdls->cdls_next + spl_console_max_delay + + (10 * HZ), jiffies)) { + /* last timeout was a long time ago */ + cdls->cdls_delay /= spl_console_backoff * 4; + } else { + cdls->cdls_delay *= spl_console_backoff; + + if (cdls->cdls_delay < spl_console_min_delay) + cdls->cdls_delay = spl_console_min_delay; + else if (cdls->cdls_delay > spl_console_max_delay) + cdls->cdls_delay = spl_console_max_delay; + } + + /* ensure cdls_next is never zero after it's been seen */ + cdls->cdls_next = (jiffies + cdls->cdls_delay) | 1; + } + + if (tcd != NULL) { + trace_print_to_console(&header, mask, string_buf, needed, file, fn); + trace_put_tcd(tcd); + } else { + string_buf = trace_get_console_buffer(); + + needed = 0; + if (format1 != NULL) { + va_copy(ap, args); + needed = vsnprintf(string_buf, TRACE_CONSOLE_BUFFER_SIZE, format1, ap); + va_end(ap); + } + if (format2 != NULL) { + remain = TRACE_CONSOLE_BUFFER_SIZE - needed; + if (remain > 0) { + va_start(ap, format2); + needed += vsnprintf(string_buf+needed, remain, format2, ap); + va_end(ap); + } + } + trace_print_to_console(&header, mask, + string_buf, needed, file, fn); + + trace_put_console_buffer(string_buf); + } + + if (cdls != NULL && cdls->cdls_count != 0) { + string_buf = trace_get_console_buffer(); + + needed = snprintf(string_buf, TRACE_CONSOLE_BUFFER_SIZE, + "Skipped %d previous similar message%s\n", + cdls->cdls_count, (cdls->cdls_count > 1) ? "s" : ""); + + trace_print_to_console(&header, mask, + string_buf, needed, file, fn); + + trace_put_console_buffer(string_buf); + cdls->cdls_count = 0; + } + + return 0; +} +EXPORT_SYMBOL(spl_debug_vmsg); + +/* Do the collect_pages job on a single CPU: assumes that all other + * CPUs have been stopped during a panic. If this isn't true for + * some arch, this will have to be implemented separately in each arch. + */ +static void +panic_collect_pages(struct page_collection *pc) +{ + struct trace_cpu_data *tcd; + int i, j; + + tcd_for_each(tcd, i, j) { + list_splice_init(&tcd->tcd_pages, &pc->pc_pages); + tcd->tcd_cur_pages = 0; + } +} + +static void +collect_pages_on_cpu(void *info) +{ + struct trace_cpu_data *tcd; + struct page_collection *pc = info; + int i; + + spin_lock(&pc->pc_lock); + tcd_for_each_type_lock(tcd, i) { + list_splice_init(&tcd->tcd_pages, &pc->pc_pages); + tcd->tcd_cur_pages = 0; + } + spin_unlock(&pc->pc_lock); +} + +static void +collect_pages(struct page_collection *pc) +{ + INIT_LIST_HEAD(&pc->pc_pages); + + if (spl_panic_in_progress) + panic_collect_pages(pc); + else + trace_call_on_all_cpus(collect_pages_on_cpu, pc); +} + +static void +put_pages_back_on_cpu(void *info) +{ + struct page_collection *pc = info; + struct trace_cpu_data *tcd; + struct list_head *cur_head; + struct trace_page *tage; + struct trace_page *tmp; + int i; + + spin_lock(&pc->pc_lock); + tcd_for_each_type_lock(tcd, i) { + cur_head = tcd->tcd_pages.next; + + list_for_each_entry_safe(tage, tmp, &pc->pc_pages, linkage) { + + __ASSERT_TAGE_INVARIANT(tage); + + if (tage->cpu != smp_processor_id() || tage->type != i) + continue; + + tage_to_tail(tage, cur_head); + tcd->tcd_cur_pages++; + } + } + spin_unlock(&pc->pc_lock); +} + +static void +put_pages_back(struct page_collection *pc) +{ + if (!spl_panic_in_progress) + trace_call_on_all_cpus(put_pages_back_on_cpu, pc); +} + +static struct file * +trace_filp_open (const char *name, int flags, int mode, int *err) +{ + struct file *filp = NULL; + int rc; + + filp = filp_open(name, flags, mode); + if (IS_ERR(filp)) { + rc = PTR_ERR(filp); + printk(KERN_ERR "SPL: Can't open %s file: %d\n", name, rc); + if (err) + *err = rc; + filp = NULL; + } + return filp; +} + +#define trace_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) +#define trace_filp_fsync(fp) (fp)->f_op->fsync((fp),(fp)->f_dentry,1) +#define trace_filp_close(f) filp_close(f, NULL) +#define trace_filp_poff(f) (&(f)->f_pos) + +static int +spl_debug_dump_all_pages(char *filename) +{ + struct page_collection pc; + struct file *filp; + struct trace_page *tage; + struct trace_page *tmp; + mm_segment_t oldfs; + int rc = 0; + + down_write(&trace_sem); + + filp = trace_filp_open(filename, O_CREAT|O_EXCL|O_WRONLY|O_LARGEFILE, + 0600, &rc); + if (filp == NULL) { + if (rc != -EEXIST) + printk(KERN_ERR "SPL: Can't open %s for dump: %d\n", + filename, rc); + goto out; + } + + spin_lock_init(&pc.pc_lock); + collect_pages(&pc); + if (list_empty(&pc.pc_pages)) { + rc = 0; + goto close; + } + + oldfs = get_fs(); + set_fs(get_ds()); + + list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { + __ASSERT_TAGE_INVARIANT(tage); + + rc = trace_filp_write(filp, page_address(tage->page), + tage->used, trace_filp_poff(filp)); + if (rc != (int)tage->used) { + printk(KERN_WARNING "SPL: Wanted to write %u " + "but wrote %d\n", tage->used, rc); + put_pages_back(&pc); + __ASSERT(list_empty(&pc.pc_pages)); + break; + } + list_del(&tage->linkage); + tage_free(tage); + } + + set_fs(oldfs); + + rc = trace_filp_fsync(filp); + if (rc) + printk(KERN_ERR "SPL: Unable to sync: %d\n", rc); + close: + trace_filp_close(filp); + out: + up_write(&trace_sem); + + return rc; +} + +static void +spl_debug_flush_pages(void) +{ + struct page_collection pc; + struct trace_page *tage; + struct trace_page *tmp; + + spin_lock_init(&pc.pc_lock); + + collect_pages(&pc); + list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { + __ASSERT_TAGE_INVARIANT(tage); + list_del(&tage->linkage); + tage_free(tage); + } +} + +unsigned long +spl_debug_set_mask(unsigned long mask) { + spl_debug_mask = mask; + return 0; +} +EXPORT_SYMBOL(spl_debug_set_mask); + +unsigned long +spl_debug_get_mask(void) { + return spl_debug_mask; +} +EXPORT_SYMBOL(spl_debug_get_mask); + +unsigned long +spl_debug_set_subsys(unsigned long subsys) { + spl_debug_subsys = subsys; + return 0; +} +EXPORT_SYMBOL(spl_debug_set_subsys); + +unsigned long +spl_debug_get_subsys(void) { + return spl_debug_subsys; +} +EXPORT_SYMBOL(spl_debug_get_subsys); + +int +spl_debug_set_mb(int mb) +{ + int i, j, pages; + int limit = trace_max_debug_mb(); + struct trace_cpu_data *tcd; + + if (mb < num_possible_cpus()) { + printk(KERN_ERR "SPL: Refusing to set debug buffer size to " + "%dMB - lower limit is %d\n", mb, num_possible_cpus()); + return -EINVAL; + } + + if (mb > limit) { + printk(KERN_ERR "SPL: Refusing to set debug buffer size to " + "%dMB - upper limit is %d\n", mb, limit); + return -EINVAL; + } + + mb /= num_possible_cpus(); + pages = mb << (20 - PAGE_SHIFT); + + down_write(&trace_sem); + + tcd_for_each(tcd, i, j) + tcd->tcd_max_pages = (pages * tcd->tcd_pages_factor) / 100; + + up_write(&trace_sem); + + return 0; +} +EXPORT_SYMBOL(spl_debug_set_mb); + +int +spl_debug_get_mb(void) +{ + int i, j; + struct trace_cpu_data *tcd; + int total_pages = 0; + + down_read(&trace_sem); + + tcd_for_each(tcd, i, j) + total_pages += tcd->tcd_max_pages; + + up_read(&trace_sem); + + return (total_pages >> (20 - PAGE_SHIFT)) + 1; +} +EXPORT_SYMBOL(spl_debug_get_mb); + +void spl_debug_dumpstack(struct task_struct *tsk) +{ + extern void show_task(struct task_struct *); + + if (tsk == NULL) + tsk = current; + + CWARN("showing stack for process %d\n", tsk->pid); + show_task(tsk); +} +EXPORT_SYMBOL(spl_debug_dumpstack); + +void spl_debug_bug(char *file, const char *func, const int line) +{ + spl_debug_catastrophe = 1; + spl_debug_msg(NULL, 0, D_EMERG, file, func, line, "SPL BUG\n"); + + if (in_interrupt()) { + panic("SPL BUG in interrupt.\n"); + /* not reached */ + } + + /* Ensure all debug pages and dumped by current cpu */ + if (spl_debug_panic_on_bug) + spl_panic_in_progress = 1; + + spl_debug_dumpstack(NULL); + spl_debug_dumplog(); + + if (spl_debug_panic_on_bug) + panic("SPL BUG"); + + set_task_state(current, TASK_UNINTERRUPTIBLE); + while (1) + schedule(); +} +EXPORT_SYMBOL(spl_debug_bug); + +int +spl_debug_clear_buffer(void) +{ + spl_debug_flush_pages(); + return 0; +} +EXPORT_SYMBOL(spl_debug_clear_buffer); + +int +spl_debug_mark_buffer(char *text) +{ + CDEBUG(D_WARNING, "*************************************\n"); + CDEBUG(D_WARNING, "DEBUG MARKER: %s\n", text); + CDEBUG(D_WARNING, "*************************************\n"); + + return 0; +} +EXPORT_SYMBOL(spl_debug_mark_buffer); + +static int +panic_notifier(struct notifier_block *self, + unsigned long unused1, void *unused2) +{ + if (spl_panic_in_progress) + return 0; + + spl_panic_in_progress = 1; + mb(); + + if (!in_interrupt()) { + while (current->lock_depth >= 0) + unlock_kernel(); + + spl_debug_dumplog_internal((void *)(long)current->pid); + } + + return 0; +} + +static int +trace_init(int max_pages) +{ + struct trace_cpu_data *tcd; + int i, j; + + init_rwsem(&trace_sem); + + /* initialize trace_data */ + memset(trace_data, 0, sizeof(trace_data)); + for (i = 0; i < TCD_TYPE_MAX; i++) { + trace_data[i] = kmalloc(sizeof(union trace_data_union) * + NR_CPUS, GFP_KERNEL); + if (trace_data[i] == NULL) + goto out; + } + + tcd_for_each(tcd, i, j) { + tcd->tcd_pages_factor = pages_factor[i]; + tcd->tcd_type = i; + tcd->tcd_cpu = j; + INIT_LIST_HEAD(&tcd->tcd_pages); + INIT_LIST_HEAD(&tcd->tcd_stock_pages); + tcd->tcd_cur_pages = 0; + tcd->tcd_cur_stock_pages = 0; + tcd->tcd_max_pages = (max_pages * pages_factor[i]) / 100; + tcd->tcd_shutting_down = 0; + } + + for (i = 0; i < num_possible_cpus(); i++) { + for (j = 0; j < 3; j++) { + trace_console_buffers[i][j] = + kmalloc(TRACE_CONSOLE_BUFFER_SIZE, + GFP_KERNEL); + + if (trace_console_buffers[i][j] == NULL) + goto out; + } + } + + return 0; +out: + trace_fini(); + printk(KERN_ERR "SPL: Insufficient memory for debug logs\n"); + return -ENOMEM; +} + +int +debug_init(void) +{ + int rc, max = spl_debug_mb; + + spl_console_max_delay = SPL_DEFAULT_MAX_DELAY; + spl_console_min_delay = SPL_DEFAULT_MIN_DELAY; + + /* If spl_debug_mb is set to an invalid value or uninitialized + * then just make the total buffers smp_num_cpus TCD_MAX_PAGES */ + if (max > (num_physpages >> (20 - 2 - PAGE_SHIFT)) / 5 || + max >= 512 || max < 0) { + max = TCD_MAX_PAGES; + } else { + max = (max / num_online_cpus()) << (20 - PAGE_SHIFT); + } + + rc = trace_init(max); + if (rc) + return rc; + + atomic_notifier_chain_register(&panic_notifier_list, + &spl_panic_notifier); + return rc; +} + +static void +trace_cleanup_on_cpu(void *info) +{ + struct trace_cpu_data *tcd; + struct trace_page *tage; + struct trace_page *tmp; + int i; + + tcd_for_each_type_lock(tcd, i) { + tcd->tcd_shutting_down = 1; + + list_for_each_entry_safe(tage, tmp, &tcd->tcd_pages, linkage) { + __ASSERT_TAGE_INVARIANT(tage); + + list_del(&tage->linkage); + tage_free(tage); + } + tcd->tcd_cur_pages = 0; + } +} + +static void +trace_fini(void) +{ + int i, j; + + trace_call_on_all_cpus(trace_cleanup_on_cpu, NULL); + + for (i = 0; i < num_possible_cpus(); i++) { + for (j = 0; j < 3; j++) { + if (trace_console_buffers[i][j] != NULL) { + kfree(trace_console_buffers[i][j]); + trace_console_buffers[i][j] = NULL; + } + } + } + + for (i = 0; trace_data[i] != NULL; i++) { + kfree(trace_data[i]); + trace_data[i] = NULL; + } +} + +void +debug_fini(void) +{ + atomic_notifier_chain_unregister(&panic_notifier_list, + &spl_panic_notifier); + trace_fini(); + + return; +} diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 8cd217cf1..252e9788d 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -3,32 +3,21 @@ #include #include #include -#include +#include #include #include "config.h" -/* - * Generic support - */ -static char spl_debug_buffer1[1024]; -static char spl_debug_buffer2[1024]; -static spinlock_t spl_debug_lock = SPIN_LOCK_UNLOCKED; +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_GENERIC -unsigned long spl_debug_mask = 0; -unsigned long spl_debug_subsys = 0xff; unsigned long spl_hostid = 0; -char hw_serial[11] = ""; - -EXPORT_SYMBOL(spl_debug_mask); -EXPORT_SYMBOL(spl_debug_subsys); EXPORT_SYMBOL(spl_hostid); -EXPORT_SYMBOL(hw_serial); -static struct proc_dir_entry *spl_proc_root = NULL; -static struct proc_dir_entry *spl_proc_debug_mask = NULL; -static struct proc_dir_entry *spl_proc_debug_subsys = NULL; -static struct proc_dir_entry *spl_proc_hostid = NULL; -static struct proc_dir_entry *spl_proc_hw_serial = NULL; +char spl_hw_serial[11] = ""; +EXPORT_SYMBOL(spl_hw_serial); int p0 = 0; EXPORT_SYMBOL(p0); @@ -36,14 +25,14 @@ EXPORT_SYMBOL(p0); vmem_t *zio_alloc_arena = NULL; EXPORT_SYMBOL(zio_alloc_arena); - int highbit(unsigned long i) { register int h = 1; + ENTRY; if (i == 0) - return (0); + RETURN(0); #if BITS_PER_LONG == 64 if (i & 0xffffffff00000000ul) { h += 32; i >>= 32; @@ -64,7 +53,7 @@ highbit(unsigned long i) if (i & 0x2) { h += 1; } - return (h); + RETURN(h); } EXPORT_SYMBOL(highbit); @@ -76,324 +65,75 @@ ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) } EXPORT_SYMBOL(ddi_strtoul); -/* XXX: Not the most efficient debug function ever. This should be re-done - * as an internal per-cpu in-memory debug log accessable via /proc/. Not as - * a shared global buffer everything gets serialize though. That said I'll - * worry about performance considerations once I've dealt with correctness. - */ -void -__dprintf(const char *file, const char *func, int line, const char *fmt, ...) -{ - char *sfp; - struct timeval tv; - unsigned long flags; - va_list ap; - - sfp = strrchr(file, '/'); - do_gettimeofday(&tv); - - /* XXX: This is particularly bad for performance, but we need to - * disable irqs here or two __dprintf()'s may deadlock on each - * other if one if called from an irq handler. This is yet another - * reason why we really, really, need an internal debug log. - */ - spin_lock_irqsave(&spl_debug_lock, flags); - memset(spl_debug_buffer1, 0, 1024); - memset(spl_debug_buffer2, 0, 1024); - - snprintf(spl_debug_buffer1, 1023, - "spl: %lu.%06lu:%d:%u:%s:%d:%s(): ", - tv.tv_sec, tv.tv_usec, current->pid, - smp_processor_id(), - sfp == NULL ? file : sfp + 1, - line, func); - - va_start(ap, fmt); - vsnprintf(spl_debug_buffer2, 1023, fmt, ap); - va_end(ap); - - printk("%s%s", spl_debug_buffer1, spl_debug_buffer2); - spin_unlock_irqrestore(&spl_debug_lock, flags); -} -EXPORT_SYMBOL(__dprintf); - static int -spl_proc_rd_generic_ul(char *page, char **start, off_t off, - int count, int *eof, unsigned long val) +set_hostid(void) { - *start = page; - *eof = 1; - - if (off || count > PAGE_SIZE) - return 0; - - return snprintf(page, PAGE_SIZE, "0x%lx\n", val & 0xffffffff); -} - -static int -spl_proc_rd_debug_mask(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int rc; - - spin_lock(&spl_debug_lock); - rc = spl_proc_rd_generic_ul(page, start, off, count, - eof, spl_debug_mask); - spin_unlock(&spl_debug_lock); - - return rc; -} - -static int -spl_proc_rd_debug_subsys(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int rc; - - spin_lock(&spl_debug_lock); - rc = spl_proc_rd_generic_ul(page, start, off, count, - eof, spl_debug_subsys); - spin_unlock(&spl_debug_lock); - - return rc; -} - -static int -spl_proc_rd_hostid(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - *start = page; - *eof = 1; - - if (off || count > PAGE_SIZE) - return 0; - - return snprintf(page, PAGE_SIZE, "%lx\n", spl_hostid & 0xffffffff); -} - -static int -spl_proc_rd_hw_serial(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - *start = page; - *eof = 1; - - if (off || count > PAGE_SIZE) - return 0; - - strncpy(page, hw_serial, 11); - return strlen(page); -} - -static int -spl_proc_wr_generic_ul(const char *ubuf, unsigned long count, - unsigned long *val, int base) -{ - char *end, kbuf[32]; - - if (count >= sizeof(kbuf)) - return -EOVERFLOW; - - if (copy_from_user(kbuf, ubuf, count)) - return -EFAULT; - - kbuf[count] = '\0'; - *val = (int)simple_strtoul(kbuf, &end, base); - if (kbuf == end) - return -EINVAL; - - return 0; -} - -static int -spl_proc_wr_debug_mask(struct file *file, const char *ubuf, - unsigned long count, void *data, int mode) -{ - unsigned long val; - int rc; - - rc = spl_proc_wr_generic_ul(ubuf, count, &val, 16); - if (rc) - return rc; - - spin_lock(&spl_debug_lock); - spl_debug_mask = val; - spin_unlock(&spl_debug_lock); - - return count; -} - -static int -spl_proc_wr_debug_subsys(struct file *file, const char *ubuf, - unsigned long count, void *data, int mode) -{ - unsigned long val; - int rc; - - rc = spl_proc_wr_generic_ul(ubuf, count, &val, 16); - if (rc) - return rc; - - spin_lock(&spl_debug_lock); - spl_debug_subsys = val; - spin_unlock(&spl_debug_lock); - - return count; -} - -static int -spl_proc_wr_hostid(struct file *file, const char *ubuf, - unsigned long count, void *data, int mode) -{ - unsigned long val; - int rc; - - rc = spl_proc_wr_generic_ul(ubuf, count, &val, 16); - if (rc) - return rc; - - spl_hostid = val; - sprintf(hw_serial, "%lu\n", ((long)val >= 0) ? val : -val); - - return count; -} - -static struct proc_dir_entry * -spl_register_proc_entry(const char *name, mode_t mode, - struct proc_dir_entry *parent, void *data, - void *read_proc, void *write_proc) -{ - struct proc_dir_entry *entry; - - entry = create_proc_entry(name, mode, parent); - if (!entry) - return ERR_PTR(-EINVAL); - - entry->data = data; - entry->read_proc = read_proc; - entry->write_proc = write_proc; - - return entry; -} /* register_proc_entry() */ - -void spl_set_debug_mask(unsigned long mask) { - spin_lock(&spl_debug_lock); - spl_debug_mask = mask; - spin_unlock(&spl_debug_lock); -} -EXPORT_SYMBOL(spl_set_debug_mask); - -void spl_set_debug_subsys(unsigned long mask) { - spin_lock(&spl_debug_lock); - spl_debug_subsys = mask; - spin_unlock(&spl_debug_lock); -} -EXPORT_SYMBOL(spl_set_debug_subsys); - -static int __init spl_init(void) -{ - int rc = 0; char sh_path[] = "/bin/sh"; char *argv[] = { sh_path, "-c", - "/usr/bin/hostid >/proc/spl/hostid", + "/usr/bin/hostid >/proc/sys/spl/hostid", NULL }; char *envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; - spl_proc_root = proc_mkdir("spl", NULL); - if (!spl_proc_root) { - printk("spl: Error unable to create /proc/spl/ directory\n"); - return -EINVAL; - } + /* Doing address resolution in the kernel is tricky and just + * not a good idea in general. So to set the proper 'spl_hw_serial' + * use the usermodehelper support to ask '/bin/sh' to run + * '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid + * for us to use. It's a horific solution but it will do for now. + */ + return call_usermodehelper(sh_path, argv, envp, 1); +} - spl_proc_debug_mask = spl_register_proc_entry("debug_mask", 0644, - spl_proc_root, NULL, - spl_proc_rd_debug_mask, - spl_proc_wr_debug_mask); - if (IS_ERR(spl_proc_debug_mask)) { - rc = PTR_ERR(spl_proc_debug_mask); - goto out; - } +static int __init spl_init(void) +{ + int rc = 0; + ENTRY; - spl_proc_debug_subsys = spl_register_proc_entry("debug_subsys", 0644, - spl_proc_root, NULL, - spl_proc_rd_debug_subsys, - spl_proc_wr_debug_subsys); - if (IS_ERR(spl_proc_debug_subsys)) { - rc = PTR_ERR(spl_proc_debug_subsys); - goto out2; - } - - spl_proc_hostid = spl_register_proc_entry("hostid", 0644, - spl_proc_root, NULL, - spl_proc_rd_hostid, - spl_proc_wr_hostid); - if (IS_ERR(spl_proc_hostid)) { - rc = PTR_ERR(spl_proc_hostid); - goto out3; - } - - spl_proc_hw_serial = spl_register_proc_entry("hw_serial", 0444, - spl_proc_root, NULL, - spl_proc_rd_hw_serial, - NULL); - if (IS_ERR(spl_proc_hw_serial)) { - rc = PTR_ERR(spl_proc_hw_serial); - goto out4; - } + if ((rc = debug_init())) + RETURN(rc); if ((rc = kmem_init())) - goto out4; + GOTO(out , rc); if ((rc = vn_init())) - goto out4; + GOTO(out2, rc); - /* Doing address resolution in the kernel is tricky and just - * not a good idea in general. So to set the proper 'hw_serial' - * use the usermodehelper support to ask '/bin/sh' to run - * '/usr/bin/hostid' and redirect the result to /proc/spl/hostid - * for us to use. It's a horific solution but it will do. - */ - if ((rc = call_usermodehelper(sh_path, argv, envp, 1))) - goto out4; + if ((rc = proc_init())) + GOTO(out3, rc); - printk("spl: Loaded Solaris Porting Layer v%s\n", VERSION); - - return 0; + if ((rc = set_hostid())) + GOTO(out4, rc = -EADDRNOTAVAIL); + CWARN("Loaded Solaris Porting Layer v%s\n", VERSION); + RETURN(rc); out4: - if (spl_proc_hw_serial) - remove_proc_entry("hw_serial", spl_proc_root); + proc_fini(); out3: - if (spl_proc_hostid) - remove_proc_entry("hostid", spl_proc_root); + vn_fini(); out2: - if (spl_proc_debug_mask) - remove_proc_entry("debug_mask", spl_proc_root); - - if (spl_proc_debug_subsys) - remove_proc_entry("debug_subsys", spl_proc_root); + kmem_fini(); out: - remove_proc_entry("spl", NULL); + debug_fini(); - return rc; + printk("SPL: Failed to Load Solaris Porting Layer v%s, " + "rc = %d\n", VERSION, rc); + RETURN(rc); } static void spl_fini(void) { + ENTRY; + + CWARN("Unloaded Solaris Porting Layer v%s\n", VERSION); + proc_fini(); vn_fini(); kmem_fini(); + debug_fini(); - remove_proc_entry("hw_serial", spl_proc_root); - remove_proc_entry("hostid", spl_proc_root); - remove_proc_entry("debug_subsys", spl_proc_root); - remove_proc_entry("debug_mask", spl_proc_root); - remove_proc_entry("spl", NULL); - - return; + EXIT; } module_init(spl_init); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c new file mode 100644 index 000000000..89ffc2baa --- /dev/null +++ b/modules/spl/spl-proc.c @@ -0,0 +1,574 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "config.h" + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_PROC + +static struct ctl_table_header *spl_header = NULL; +static unsigned long table_min = 0; +static unsigned long table_max = ~0; + +#define CTL_SPL 0x87 +enum { + CTL_DEBUG_SUBSYS = 1, /* Debug subsystem */ + CTL_DEBUG_MASK, /* Debug mask */ + CTL_DEBUG_PRINTK, /* Force all messages to console */ + CTL_DEBUG_MB, /* Debug buffer size */ + CTL_DEBUG_BINARY, /* Include binary data in buffer */ + CTL_DEBUG_CATASTROPHE, /* Set if we have BUG'd or panic'd */ + CTL_DEBUG_PANIC_ON_BUG, /* Set if we should panic on BUG */ + CTL_DEBUG_PATH, /* Dump log location */ + CTL_DEBUG_DUMP, /* Dump debug buffer to file */ + CTL_DEBUG_FORCE_BUG, /* Hook to force a BUG */ + CTL_CONSOLE_RATELIMIT, /* Ratelimit console messages */ + CTL_CONSOLE_MAX_DELAY_CS, /* Max delay at which we skip messages */ + CTL_CONSOLE_MIN_DELAY_CS, /* Init delay at which we skip messages */ + CTL_CONSOLE_BACKOFF, /* Delay increase factor */ + CTL_STACK_SIZE, /* Max observed stack size */ +#ifdef DEBUG_KMEM + CTL_KMEM_KMEMUSED, /* Crrently alloc'd kmem bytes */ + CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ + CTL_KMEM_VMEMUSED, /* Currently alloc'd vmem bytes */ + CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ +#endif + CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ + CTL_HW_SERIAL, /* Hardware serial number from hostid */ +}; + +static int +proc_copyin_string(char *kbuffer, int kbuffer_size, + const char *ubuffer, int ubuffer_size) +{ + int size; + + if (ubuffer_size > kbuffer_size) + return -EOVERFLOW; + + if (copy_from_user((void *)kbuffer, (void *)ubuffer, ubuffer_size)) + return -EFAULT; + + /* strip trailing whitespace */ + size = strnlen(kbuffer, ubuffer_size); + while (size-- >= 0) + if (!isspace(kbuffer[size])) + break; + + /* empty string */ + if (size < 0) + return -EINVAL; + + /* no space to terminate */ + if (size == kbuffer_size) + return -EOVERFLOW; + + kbuffer[size + 1] = 0; + return 0; +} + +static int +proc_copyout_string(char *ubuffer, int ubuffer_size, + const char *kbuffer, char *append) +{ + /* NB if 'append' != NULL, it's a single character to append to the + * copied out string - usually "\n", for /proc entries and + * (i.e. a terminating zero byte) for sysctl entries + */ + int size = MIN(strlen(kbuffer), ubuffer_size); + + if (copy_to_user(ubuffer, kbuffer, size)) + return -EFAULT; + + if (append != NULL && size < ubuffer_size) { + if (copy_to_user(ubuffer + size, append, 1)) + return -EFAULT; + + size++; + } + + return size; +} + +static int +proc_dobitmasks(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + unsigned long *mask = table->data; + int is_subsys = (mask == &spl_debug_subsys) ? 1 : 0; + int is_printk = (mask == &spl_debug_printk) ? 1 : 0; + int size = 512, rc; + char *str; + ENTRY; + + str = kmem_alloc(size, KM_SLEEP); + if (str == NULL) + RETURN(-ENOMEM); + + if (write) { + rc = proc_copyin_string(str, size, buffer, *lenp); + if (rc < 0) + RETURN(rc); + + rc = spl_debug_str2mask(mask, str, is_subsys); + /* Always print BUG/ASSERT to console, so keep this mask */ + if (is_printk) + *mask |= D_EMERG; + + *ppos += *lenp; + } else { + rc = spl_debug_mask2str(str, size, *mask, is_subsys); + if (*ppos >= rc) + rc = 0; + else + rc = proc_copyout_string(buffer, *lenp, + str + *ppos, "\n"); + if (rc >= 0) { + *lenp = rc; + *ppos += rc; + } + } + + kmem_free(str, size); + RETURN(rc); +} + +static int +proc_debug_mb(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + char str[32]; + int rc, len; + ENTRY; + + if (write) { + rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); + if (rc < 0) + RETURN(rc); + + rc = spl_debug_set_mb(simple_strtoul(str, NULL, 0)); + *ppos += *lenp; + } else { + len = snprintf(str, sizeof(str), "%d", spl_debug_get_mb()); + if (*ppos >= len) + rc = 0; + else + rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + + if (rc >= 0) { + *lenp = rc; + *ppos += rc; + } + } + + RETURN(rc); +} + +static int +proc_dump_kernel(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + ENTRY; + + if (write) { + spl_debug_dumplog(); + *ppos += *lenp; + } else { + *lenp = 0; + } + + RETURN(0); +} + +static int +proc_force_bug(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + ENTRY; + + if (write) { + CERROR("Crashing due to forced BUG\n"); + BUG(); + /* Unreachable */ + } else { + *lenp = 0; + } + + RETURN(0); +} + +static int +proc_console_max_delay_cs(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + int rc, max_delay_cs; + struct ctl_table dummy = *table; + long d; + ENTRY; + + dummy.data = &max_delay_cs; + dummy.proc_handler = &proc_dointvec; + + if (write) { + max_delay_cs = 0; + rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + if (rc < 0) + RETURN(rc); + + if (max_delay_cs <= 0) + RETURN(-EINVAL); + + d = (max_delay_cs * HZ) / 100; + if (d == 0 || d < spl_console_min_delay) + RETURN(-EINVAL); + + spl_console_max_delay = d; + } else { + max_delay_cs = (spl_console_max_delay * 100) / HZ; + rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + } + + RETURN(rc); +} + +static int +proc_console_min_delay_cs(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + int rc, min_delay_cs; + struct ctl_table dummy = *table; + long d; + ENTRY; + + dummy.data = &min_delay_cs; + dummy.proc_handler = &proc_dointvec; + + if (write) { + min_delay_cs = 0; + rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + if (rc < 0) + RETURN(rc); + + if (min_delay_cs <= 0) + RETURN(-EINVAL); + + d = (min_delay_cs * HZ) / 100; + if (d == 0 || d > spl_console_max_delay) + RETURN(-EINVAL); + + spl_console_min_delay = d; + } else { + min_delay_cs = (spl_console_min_delay * 100) / HZ; + rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + } + + RETURN(rc); +} + +static int +proc_console_backoff(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + int rc, backoff; + struct ctl_table dummy = *table; + ENTRY; + + dummy.data = &backoff; + dummy.proc_handler = &proc_dointvec; + + if (write) { + backoff = 0; + rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + if (rc < 0) + RETURN(rc); + + if (backoff <= 0) + RETURN(-EINVAL); + + spl_console_backoff = backoff; + } else { + backoff = spl_console_backoff; + rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + } + + RETURN(rc); +} + +static int +proc_doatomic64(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + int rc = 0; + unsigned long min = 0, max = ~0, val; + struct ctl_table dummy = *table; + ENTRY; + + dummy.data = &val; + dummy.proc_handler = &proc_dointvec; + dummy.extra1 = &min; + dummy.extra2 = &max; + + if (write) { + *ppos += *lenp; + } else { + val = atomic_read((atomic64_t *)table->data); + rc = proc_doulongvec_minmax(&dummy, write, filp, + buffer, lenp, ppos); + } + + RETURN(rc); +} + +static int +proc_dohostid(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + int len, rc = 0; + unsigned long val; + char *end, str[32]; + ENTRY; + + if (write) { + /* We can't use proc_doulongvec_minmax() in the write + * case hear because hostid while a hex value has no + * leading 0x which confuses the helper function. */ + rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); + if (rc < 0) + RETURN(rc); + + val = simple_strtoul(str, &end, 16); + if (str == end) + RETURN(-EINVAL); + + spl_hostid = val; + sprintf(spl_hw_serial, "%lu", ((long)val >= 0) ? val : -val); + *ppos += *lenp; + } else { + len = snprintf(str, sizeof(str), "%lx", spl_hostid); + if (*ppos >= len) + rc = 0; + else + rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + + if (rc >= 0) { + *lenp = rc; + *ppos += rc; + } + } + + RETURN(rc); +} + +static struct ctl_table spl_table[] = { + /* NB No .strategy entries have been provided since + * sysctl(8) prefers to go via /proc for portability. + */ + { + .ctl_name = CTL_DEBUG_SUBSYS, + .procname = "debug_subsystem", + .data = &spl_debug_subsys, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = &proc_dobitmasks + }, + { + .ctl_name = CTL_DEBUG_MASK, + .procname = "debug_mask", + .data = &spl_debug_mask, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = &proc_dobitmasks + }, + { + .ctl_name = CTL_DEBUG_PRINTK, + .procname = "debug_printk", + .data = &spl_debug_printk, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = &proc_dobitmasks + }, + { + .ctl_name = CTL_DEBUG_MB, + .procname = "debug_mb", + .mode = 0644, + .proc_handler = &proc_debug_mb, + }, + { + .ctl_name = CTL_DEBUG_BINARY, + .procname = "debug_binary", + .data = &spl_debug_binary, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_DEBUG_CATASTROPHE, + .procname = "catastrophe", + .data = &spl_debug_catastrophe, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_DEBUG_PANIC_ON_BUG, + .procname = "panic_on_bug", + .data = &spl_debug_panic_on_bug, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, + { + .ctl_name = CTL_DEBUG_PATH, + .procname = "debug_path", + .data = spl_debug_file_path, + .maxlen = sizeof(spl_debug_file_path), + .mode = 0644, + .proc_handler = &proc_dostring, + }, + { + .ctl_name = CTL_DEBUG_DUMP, + .procname = "debug_dump", + .mode = 0200, + .proc_handler = &proc_dump_kernel, + }, + { .ctl_name = CTL_DEBUG_FORCE_BUG, + .procname = "force_bug", + .mode = 0200, + .proc_handler = &proc_force_bug, + }, + { + .ctl_name = CTL_CONSOLE_RATELIMIT, + .procname = "console_ratelimit", + .data = &spl_console_ratelimit, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_CONSOLE_MAX_DELAY_CS, + .procname = "console_max_delay_centisecs", + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_console_max_delay_cs, + }, + { + .ctl_name = CTL_CONSOLE_MIN_DELAY_CS, + .procname = "console_min_delay_centisecs", + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_console_min_delay_cs, + }, + { + .ctl_name = CTL_CONSOLE_BACKOFF, + .procname = "console_backoff", + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_console_backoff, + }, + { + .ctl_name = CTL_STACK_SIZE, + .procname = "stack_max", + .data = &spl_debug_stack, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, +#ifdef DEBUG_KMEM + { + .ctl_name = CTL_KMEM_KMEMUSED, + .procname = "kmem_used", + .data = &kmem_alloc_used, + .maxlen = sizeof(atomic64_t), + .mode = 0444, + .proc_handler = &proc_doatomic64, + }, + { + .ctl_name = CTL_KMEM_KMEMMAX, + .procname = "kmem_max", + .data = &kmem_alloc_max, + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doulongvec_minmax, + }, + { + .ctl_name = CTL_KMEM_VMEMUSED, + .procname = "vmem_used", + .data = &vmem_alloc_used, + .maxlen = sizeof(atomic64_t), + .mode = 0444, + .proc_handler = &proc_doatomic64, + }, + { + .ctl_name = CTL_KMEM_VMEMMAX, + .procname = "vmem_max", + .data = &vmem_alloc_max, + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doulongvec_minmax, + }, +#endif + { + .ctl_name = CTL_HOSTID, + .procname = "hostid", + .data = &spl_hostid, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = &proc_dohostid, + }, + { + .ctl_name = CTL_HW_SERIAL, + .procname = "hw_serial", + .data = spl_hw_serial, + .maxlen = sizeof(spl_hw_serial), + .mode = 0444, + .proc_handler = &proc_dostring, + }, + { 0 }, +}; + +static struct ctl_table spl_dir_table[] = { + { + .ctl_name = CTL_SPL, + .procname = "spl", + .mode = 0555, + .child = spl_table, + }, + {0} +}; + +int +proc_init(void) +{ + ENTRY; + +#ifdef CONFIG_SYSCTL + spl_header = register_sysctl_table(spl_dir_table, 0); + if (spl_header == NULL) + RETURN(-EUNATCH); +#endif + RETURN(0); +} + +void +proc_fini(void) +{ + ENTRY; + +#ifdef CONFIG_SYSCTL + ASSERT(spl_header != NULL); + unregister_sysctl_table(spl_header); +#endif + EXIT; +} diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 10b227761..2ac34237b 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -588,7 +588,7 @@ vn_fini(void) rc = kmem_cache_destroy(vn_file_cache); if (rc) - printk("spl: Warning leaked vn_file_cache objects\n"); + printk("spl: Warning leaked vn_file_cache objects, %d\n", rc); vn_file_cache = NULL; spin_unlock(&vn_file_lock); @@ -598,7 +598,7 @@ vn_fini(void) rc = kmem_cache_destroy(vn_cache); if (rc) - printk("spl: Warning leaked vn_cache objects\n"); + printk("spl: Warning leaked vn_cache objects, %d\n", rc); return; } /* vn_fini() */ From ce86265693be95e6e2213c18c0d310088c8dccbb Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 18 Apr 2008 23:42:45 +0000 Subject: [PATCH 0076/1062] Whoops need this! git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@76 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/spl-ctl.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 include/spl-ctl.h diff --git a/include/spl-ctl.h b/include/spl-ctl.h new file mode 100644 index 000000000..a20442a8c --- /dev/null +++ b/include/spl-ctl.h @@ -0,0 +1,21 @@ +#ifndef _DEBUG_CTL_H +#define _DEBUG_CTL_H + +/* Contains shared definitions which both the userspace + * and kernelspace portions of splat must agree on. + */ + +typedef struct spl_debug_header { + int ph_len; + int ph_flags; + int ph_subsys; + int ph_mask; + int ph_cpu_id; + int ph_sec; + long ph_usec; + int ph_stack; + int ph_pid; + int ph_line_num; +} spl_debug_header_t; + +#endif /* _DEBUG_CTL_H */ From 2fae1b3d0af1caa2aaa77552a0c96f121016381d Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 19 Apr 2008 00:02:11 +0000 Subject: [PATCH 0077/1062] Frist minor batch of fixes. Catch a dropped ;, and use SBUG instead of BUG. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@77 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/debug.h | 7 ++++--- modules/spl/spl-proc.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index a670c0374..13c030c9e 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -146,12 +146,14 @@ struct page_collection { int pc_want_daemon_pages; }; +#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); + /* ASSERTION that is safe to use within the debug system */ #define __ASSERT(cond) \ do { \ if (unlikely(!(cond))) { \ printk(KERN_ERR "ASSERTION("#cond") failed"); \ - BUG(); \ + SBUG(); \ } \ } while (0) @@ -194,7 +196,7 @@ do { \ __FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" FMT " " #OP " " FMT ")\n", \ CAST __left, CAST __right); \ - spl_debug_bug(__FILE__, __FUNCTION__, __LINE__) \ + spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); \ } \ } while (0) @@ -207,7 +209,6 @@ do { \ #define ASSERT3P(x,y,z) VERIFY3P(x, y, z) #define VERIFY(x) ASSERT(x) -#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); #define spl_debug_msg(cdls, subsys, mask, file, fn, line, format, a...) \ spl_debug_vmsg(cdls, subsys, mask, file, fn, \ diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 89ffc2baa..14b19b6ca 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -195,8 +195,8 @@ proc_force_bug(struct ctl_table *table, int write, struct file *filp, ENTRY; if (write) { - CERROR("Crashing due to forced BUG\n"); - BUG(); + CERROR("Crashing due to forced SBUG\n"); + SBUG(); /* Unreachable */ } else { *lenp = 0; From 937879f11db15a4842306f9da4b4a3e60cf073b7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 21 Apr 2008 17:29:47 +0000 Subject: [PATCH 0078/1062] Update SPL to use new debug infrastructure. This means: - Replacing all BUG_ON()'s with proper ASSERT()'s - Using ENTRY,EXIT,GOTO, and RETURN macro to instument call paths git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@78 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/callb.h | 2 +- include/sys/condvar.h | 40 +++++----- include/sys/debug.h | 72 ++++++++++------- include/sys/kmem.h | 11 +-- include/sys/mutex.h | 37 ++++----- include/sys/random.h | 4 +- include/sys/rwlock.h | 50 +++++++----- include/sys/signal.h | 2 +- include/sys/sysmacros.h | 4 +- include/sys/time.h | 2 +- modules/spl/spl-atomic.c | 6 ++ modules/spl/spl-debug.c | 6 +- modules/spl/spl-err.c | 10 ++- modules/spl/spl-generic.c | 12 +-- modules/spl/spl-kmem.c | 46 +++++++---- modules/spl/spl-kobj.c | 25 ++++-- modules/spl/spl-module.c | 89 ++++++++++++--------- modules/spl/spl-proc.c | 12 +-- modules/spl/spl-rwlock.c | 31 ++++---- modules/spl/spl-taskq.c | 29 ++++--- modules/spl/spl-thread.c | 24 ++++-- modules/spl/spl-time.c | 8 +- modules/spl/spl-vnode.c | 159 ++++++++++++++++++++++---------------- 23 files changed, 410 insertions(+), 271 deletions(-) diff --git a/include/sys/callb.h b/include/sys/callb.h index 053ddf500..39cdf9622 100644 --- a/include/sys/callb.h +++ b/include/sys/callb.h @@ -11,7 +11,7 @@ extern "C" { #define DEBUG_CALLB #ifndef DEBUG_CALLB -#define CALLB_CPR_ASSERT(cp) BUG_ON(!(MUTEX_HELD((cp)->cc_lockp))); +#define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); #else #define CALLB_CPR_ASSERT(cp) #endif diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 3318ec595..fd845d9c1 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -28,9 +28,9 @@ typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; static __inline__ void cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) { - BUG_ON(cvp == NULL); - BUG_ON(type != CV_DEFAULT); - BUG_ON(arg != NULL); + ASSERT(cvp); + ASSERT(type == CV_DEFAULT); + ASSERT(arg == NULL); cvp->cv_magic = CV_MAGIC; init_waitqueue_head(&cvp->cv_event); @@ -49,11 +49,11 @@ cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) static __inline__ void cv_destroy(kcondvar_t *cvp) { - BUG_ON(cvp == NULL); + ASSERT(cvp); + ASSERT(cvp->cv_magic == CV_MAGIC); spin_lock(&cvp->cv_lock); - BUG_ON(cvp->cv_magic != CV_MAGIC); - BUG_ON(atomic_read(&cvp->cv_waiters) != 0); - BUG_ON(waitqueue_active(&cvp->cv_event)); + ASSERT(atomic_read(&cvp->cv_waiters) == 0); + ASSERT(!waitqueue_active(&cvp->cv_event)); if (cvp->cv_name) kfree(cvp->cv_name); @@ -67,16 +67,17 @@ cv_wait(kcondvar_t *cvp, kmutex_t *mtx) { DEFINE_WAIT(wait); - BUG_ON(cvp == NULL || mtx == NULL); + ASSERT(cvp); + ASSERT(mtx); + ASSERT(cvp->cv_magic == CV_MAGIC); spin_lock(&cvp->cv_lock); - BUG_ON(cvp->cv_magic != CV_MAGIC); - BUG_ON(!mutex_owned(mtx)); + ASSERT(mutex_owned(mtx)); if (cvp->cv_mutex == NULL) cvp->cv_mutex = mtx; /* Ensure the same mutex is used by all callers */ - BUG_ON(cvp->cv_mutex != mtx); + ASSERT(cvp->cv_mutex == mtx); spin_unlock(&cvp->cv_lock); prepare_to_wait_exclusive(&cvp->cv_event, &wait, @@ -103,16 +104,17 @@ cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) DEFINE_WAIT(wait); clock_t time_left; - BUG_ON(cvp == NULL || mtx == NULL); + ASSERT(cvp); + ASSERT(mtx); + ASSERT(cvp->cv_magic == CV_MAGIC); spin_lock(&cvp->cv_lock); - BUG_ON(cvp->cv_magic != CV_MAGIC); - BUG_ON(!mutex_owned(mtx)); + ASSERT(mutex_owned(mtx)); if (cvp->cv_mutex == NULL) cvp->cv_mutex = mtx; /* Ensure the same mutex is used by all callers */ - BUG_ON(cvp->cv_mutex != mtx); + ASSERT(cvp->cv_mutex == mtx); spin_unlock(&cvp->cv_lock); /* XXX - Does not handle jiffie wrap properly */ @@ -140,8 +142,8 @@ cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) static __inline__ void cv_signal(kcondvar_t *cvp) { - BUG_ON(cvp == NULL); - BUG_ON(cvp->cv_magic != CV_MAGIC); + ASSERT(cvp); + ASSERT(cvp->cv_magic == CV_MAGIC); /* All waiters are added with WQ_FLAG_EXCLUSIVE so only one * waiter will be set runable with each call to wake_up(). @@ -154,8 +156,8 @@ cv_signal(kcondvar_t *cvp) static __inline__ void cv_broadcast(kcondvar_t *cvp) { - BUG_ON(cvp == NULL); - BUG_ON(cvp->cv_magic != CV_MAGIC); + ASSERT(cvp); + ASSERT(cvp->cv_magic == CV_MAGIC); /* Wake_up_all() will wake up all waiters even those which * have the WQ_FLAG_EXCLUSIVE flag set. */ diff --git a/include/sys/debug.h b/include/sys/debug.h index 13c030c9e..12585e00f 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -22,6 +22,7 @@ extern unsigned long spl_debug_subsys; #define S_DEBUG 0x00001000 #define S_GENERIC 0x00002000 #define S_PROC 0x00004000 +#define S_MODULE 0x00008000 #define D_TRACE 0x00000001 #define D_INFO 0x00000002 @@ -148,9 +149,47 @@ struct page_collection { #define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); +#ifdef __ia64__ +#define CDEBUG_STACK() (THREAD_SIZE - \ + ((unsigned long)__builtin_dwarf_cfa() & \ + (THREAD_SIZE - 1))) +#else +#define CDEBUG_STACK() (THREAD_SIZE - \ + ((unsigned long)__builtin_frame_address(0) & \ + (THREAD_SIZE - 1))) +# endif /* __ia64__ */ + +#define __CHECK_STACK(file, func, line) \ +do { \ + unsigned long _stack = CDEBUG_STACK(); \ + unsigned long _soft_limit = (9 * THREAD_SIZE) / 10; \ + \ + if (unlikely(_stack > _soft_limit && _stack > spl_debug_stack)){\ + spl_debug_stack = _stack; \ + if (_stack <= THREAD_SIZE) { \ + spl_debug_msg(NULL, D_TRACE, D_WARNING, \ + file, func, line, "Warning " \ + "exceeded 90%% of maximum safe " \ + "stack size (%lu/%lu)\n", \ + _stack, THREAD_SIZE); \ + } else { \ + spl_debug_msg(NULL, D_TRACE, D_WARNING, \ + file, func, line, "Error " \ + "exceeded maximum safe stack " \ + "size (%lu/%lu)\n", \ + _stack, THREAD_SIZE); \ + SBUG(); \ + } \ + } \ +} while (0) + +#define CHECK_STACK()__CHECK_STACK(__FILE__, __func__, __LINE__) + /* ASSERTION that is safe to use within the debug system */ #define __ASSERT(cond) \ do { \ + CHECK_STACK(); \ + \ if (unlikely(!(cond))) { \ printk(KERN_ERR "ASSERTION("#cond") failed"); \ SBUG(); \ @@ -168,6 +207,8 @@ do { \ /* ASSERTION that will debug log used outside the debug sysytem */ #define ASSERT(cond) \ do { \ + CHECK_STACK(); \ + \ if (unlikely(!(cond))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ @@ -178,6 +219,8 @@ do { \ #define ASSERTF(cond, fmt, a...) \ do { \ + CHECK_STACK(); \ + \ if (unlikely(!(cond))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ @@ -191,6 +234,9 @@ do { \ do { \ const TYPE __left = (TYPE)(LEFT); \ const TYPE __right = (TYPE)(RIGHT); \ + \ + CHECK_STACK(); \ + \ if (!(__left OP __right)) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ @@ -214,32 +260,6 @@ do { \ spl_debug_vmsg(cdls, subsys, mask, file, fn, \ line, NULL, NULL, format, ##a) -#ifdef __ia64__ -#define CDEBUG_STACK() (THREAD_SIZE - \ - ((unsigned long)__builtin_dwarf_cfa() & \ - (THREAD_SIZE - 1))) -#else -#define CDEBUG_STACK() (THREAD_SIZE - \ - ((unsigned long)__builtin_frame_address(0) & \ - (THREAD_SIZE - 1))) -# endif /* __ia64__ */ - -#define __CHECK_STACK(file, func, line) \ -do { \ - unsigned long _stack = CDEBUG_STACK(); \ - \ - if (_stack > (3*THREAD_SIZE/4) && _stack > spl_debug_stack) { \ - spl_debug_stack = _stack; \ - spl_debug_msg(NULL, D_TRACE, D_WARNING, \ - file, func, line, \ - "Exceeded maximum safe stack " \ - "%lu/%lu\n", _stack, THREAD_SIZE); \ - __ASSERT(0); \ - } \ -} while (0) - -#define CHECK_STACK()__CHECK_STACK(__FILE__, __func__, __LINE__) - #define __CDEBUG(cdls, subsys, mask, format, a...) \ do { \ CHECK_STACK(); \ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index a33643f15..7af10f9a4 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -13,6 +13,7 @@ extern "C" { #include #include #include +#include /* * Memory allocation interfaces */ @@ -60,7 +61,7 @@ extern int kmem_warning_flag; #define kmem_free(ptr, size) \ ({ \ - BUG_ON(!(ptr) || (size) < 0); \ + ASSERT((ptr) || (size > 0)); \ atomic64_sub((size), &kmem_alloc_used); \ memset(ptr, 0x5a, (size)); /* Poison */ \ kfree(ptr); \ @@ -69,7 +70,7 @@ extern int kmem_warning_flag; #define __vmem_alloc(size, flags) \ ({ void *_ptr_; \ \ - BUG_ON(!(flags & KM_SLEEP)); \ + ASSERT(flags & KM_SLEEP); \ \ _ptr_ = (void *)__vmalloc((size), ((flags) | \ __GFP_HIGHMEM), PAGE_KERNEL); \ @@ -93,7 +94,7 @@ extern int kmem_warning_flag; #define vmem_free(ptr, size) \ ({ \ - BUG_ON(!(ptr) || (size) < 0); \ + ASSERT((ptr) || (size > 0)); \ atomic64_sub((size), &vmem_alloc_used); \ memset(ptr, 0x5a, (size)); /* Poison */ \ vfree(ptr); \ @@ -105,7 +106,7 @@ extern int kmem_warning_flag; #define kmem_zalloc(size, flags) kzalloc((size), (flags)) #define kmem_free(ptr, size) \ ({ \ - BUG_ON(!(ptr) || (size) < 0); \ + ASSERT((ptr) || (size > 0)); \ kfree(ptr); \ }) @@ -116,7 +117,7 @@ extern int kmem_warning_flag; PAGE_KERNEL) #define vmem_free(ptr, size) \ ({ \ - BUG_ON(!(ptr) || (size) < 0); \ + ASSERT((ptr) || (size > 0)); \ vfree(ptr); \ }) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index ae8b81a7f..1f99c4d0d 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -36,9 +36,9 @@ typedef struct { static __inline__ void mutex_init(kmutex_t *mp, char *name, int type, void *ibc) { - BUG_ON(mp == NULL); - BUG_ON(ibc != NULL); /* XXX - Spin mutexes not needed? */ - BUG_ON(type != MUTEX_DEFAULT); /* XXX - Only default type supported? */ + ASSERT(mp); + ASSERT(ibc == NULL); /* XXX - Spin mutexes not needed */ + ASSERT(type == MUTEX_DEFAULT); /* XXX - Only default type supported */ mp->km_magic = KM_MAGIC; spin_lock_init(&mp->km_lock); @@ -57,9 +57,9 @@ mutex_init(kmutex_t *mp, char *name, int type, void *ibc) static __inline__ void mutex_destroy(kmutex_t *mp) { - BUG_ON(mp == NULL); + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); - BUG_ON(mp->km_magic != KM_MAGIC); if (mp->km_name) kfree(mp->km_name); @@ -71,9 +71,9 @@ mutex_destroy(kmutex_t *mp) static __inline__ void mutex_enter(kmutex_t *mp) { - BUG_ON(mp == NULL); + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); - BUG_ON(mp->km_magic != KM_MAGIC); if (unlikely(in_atomic() && !current->exit_state)) { printk("May schedule while atomic: %s/0x%08x/%d\n", @@ -87,7 +87,7 @@ mutex_enter(kmutex_t *mp) down(&mp->km_sem); spin_lock(&mp->km_lock); - BUG_ON(mp->km_owner != NULL); + ASSERT(mp->km_owner == NULL); mp->km_owner = current; spin_unlock(&mp->km_lock); } @@ -98,9 +98,9 @@ mutex_tryenter(kmutex_t *mp) { int rc; - BUG_ON(mp == NULL); + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); - BUG_ON(mp->km_magic != KM_MAGIC); if (unlikely(in_atomic() && !current->exit_state)) { printk("May schedule while atomic: %s/0x%08x/%d\n", @@ -113,7 +113,7 @@ mutex_tryenter(kmutex_t *mp) rc = down_trylock(&mp->km_sem); /* returns 0 if acquired */ if (rc == 0) { spin_lock(&mp->km_lock); - BUG_ON(mp->km_owner != NULL); + ASSERT(mp->km_owner == NULL); mp->km_owner = current; spin_unlock(&mp->km_lock); return 1; @@ -124,10 +124,11 @@ mutex_tryenter(kmutex_t *mp) static __inline__ void mutex_exit(kmutex_t *mp) { - BUG_ON(mp == NULL); + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); - BUG_ON(mp->km_magic != KM_MAGIC); - BUG_ON(mp->km_owner != current); + + ASSERT(mp->km_owner == current); mp->km_owner = NULL; spin_unlock(&mp->km_lock); up(&mp->km_sem); @@ -139,9 +140,9 @@ mutex_owned(kmutex_t *mp) { int rc; - BUG_ON(mp == NULL); + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); - BUG_ON(mp->km_magic != KM_MAGIC); rc = (mp->km_owner == current); spin_unlock(&mp->km_lock); @@ -154,9 +155,9 @@ mutex_owner(kmutex_t *mp) { kthread_t *thr; - BUG_ON(mp == NULL); + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); - BUG_ON(mp->km_magic != KM_MAGIC); thr = mp->km_owner; spin_unlock(&mp->km_lock); diff --git a/include/sys/random.h b/include/sys/random.h index b7f83ce1a..400aaa91f 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -17,7 +17,7 @@ extern "C" { static __inline__ int random_get_bytes(uint8_t *ptr, size_t len) { - BUG_ON(len < 0); + ASSERT(len >= 0); get_random_bytes((void *)ptr,(int)len); return 0; } @@ -26,7 +26,7 @@ random_get_bytes(uint8_t *ptr, size_t len) static __inline__ int random_get_pseudo_bytes(uint8_t *ptr, size_t len) { - BUG_ON(len < 0); + ASSERT(len >= 0); get_random_bytes((void *)ptr,(int)len); return 0; } diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 83106846c..8fd34e9c6 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -102,8 +102,9 @@ extern int __rw_lock_held(krwlock_t *rwlp); static __inline__ void rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg) { - BUG_ON(type != RW_DEFAULT); /* XXX no irq handler use */ - BUG_ON(arg != NULL); /* XXX no irq handler use */ + ASSERT(type == RW_DEFAULT); /* XXX no irq handler use */ + ASSERT(arg == NULL); /* XXX no irq handler use */ + rwlp->rw_magic = RW_MAGIC; rwlp->rw_owner = NULL; /* no one holds the write lock yet */ init_rwsem(&rwlp->rw_sem); @@ -119,11 +120,11 @@ rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg) static __inline__ void rw_destroy(krwlock_t *rwlp) { - BUG_ON(rwlp == NULL); - BUG_ON(rwlp->rw_magic != RW_MAGIC); - BUG_ON(rwlp->rw_owner != NULL); + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + ASSERT(rwlp->rw_owner == NULL); spin_lock(&rwlp->rw_sem.wait_lock); - BUG_ON(!list_empty(&rwlp->rw_sem.wait_list)); + ASSERT(list_empty(&rwlp->rw_sem.wait_list)); spin_unlock(&rwlp->rw_sem.wait_lock); if (rwlp->rw_name) @@ -139,7 +140,9 @@ rw_tryenter(krwlock_t *rwlp, krw_t rw) { int result; - BUG_ON(rwlp->rw_magic != RW_MAGIC); + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + switch (rw) { /* these functions return 1 if success, 0 if contention */ case RW_READER: @@ -159,12 +162,12 @@ rw_tryenter(krwlock_t *rwlp, krw_t rw) if (result) { /* there better not be anyone else * holding the write lock here */ - BUG_ON(rwlp->rw_owner != NULL); + ASSERT(rwlp->rw_owner == NULL); rwlp->rw_owner = current; } break; default: - BUG_ON(1); + SBUG(); } return result; @@ -173,7 +176,9 @@ rw_tryenter(krwlock_t *rwlp, krw_t rw) static __inline__ void rw_enter(krwlock_t *rwlp, krw_t rw) { - BUG_ON(rwlp->rw_magic != RW_MAGIC); + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + switch (rw) { case RW_READER: /* Here the Solaris code would block @@ -192,18 +197,19 @@ rw_enter(krwlock_t *rwlp, krw_t rw) /* there better not be anyone else * holding the write lock here */ - BUG_ON(rwlp->rw_owner != NULL); + ASSERT(rwlp->rw_owner == NULL); rwlp->rw_owner = current; break; default: - BUG_ON(1); + SBUG(); } } static __inline__ void rw_exit(krwlock_t *rwlp) { - BUG_ON(rwlp->rw_magic != RW_MAGIC); + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); /* rw_owner is held by current * thread iff it is a writer */ @@ -218,8 +224,10 @@ rw_exit(krwlock_t *rwlp) static __inline__ void rw_downgrade(krwlock_t *rwlp) { - BUG_ON(rwlp->rw_magic != RW_MAGIC); - BUG_ON(rwlp->rw_owner != current); + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + ASSERT(rwlp->rw_owner == current); + rwlp->rw_owner = NULL; downgrade_write(&rwlp->rw_sem); } @@ -232,7 +240,9 @@ static __inline__ int rw_tryupgrade(krwlock_t *rwlp) { int result = 0; - BUG_ON(rwlp->rw_magic != RW_MAGIC); + + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); spin_lock(&rwlp->rw_sem.wait_lock); @@ -280,8 +290,8 @@ rw_tryupgrade(krwlock_t *rwlp) /* Check if upgrade failed. Should not ever happen * if we got to this point */ - BUG_ON(!result); - BUG_ON(rwlp->rw_owner != NULL); + ASSERT(result); + ASSERT(rwlp->rw_owner == NULL); rwlp->rw_owner = current; spin_unlock(&rwlp->rw_sem.wait_lock); return 1; @@ -290,7 +300,9 @@ rw_tryupgrade(krwlock_t *rwlp) static __inline__ kthread_t * rw_owner(krwlock_t *rwlp) { - BUG_ON(rwlp->rw_magic != RW_MAGIC); + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + return rwlp->rw_owner; } diff --git a/include/sys/signal.h b/include/sys/signal.h index 120329686..e40b483e2 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -16,7 +16,7 @@ static __inline__ int issig(int why) { - BUG_ON(!(why == FORREAL || why == JUSTLOOKING)); + ASSERT(why == FORREAL || why == JUSTLOOKING); return signal_pending(current); } diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 62a51aa38..0cafd7122 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -98,8 +98,8 @@ extern "C" { #define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) /* Missing globals */ -extern unsigned long spl_hostid; -extern char spl_hw_serial[11]; +extern long spl_hostid; +extern char hw_serial[11]; extern int p0; /* Missing misc functions */ diff --git a/include/sys/time.h b/include/sys/time.h index 2f03203e6..44a0ec3c9 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -41,7 +41,7 @@ typedef enum clock_type { #define hz \ ({ \ - BUG_ON(HZ < 100 || HZ > MICROSEC); \ + ASSERT(HZ >= 100 && HZ <= MICROSEC); \ HZ; \ }) diff --git a/modules/spl/spl-atomic.c b/modules/spl/spl-atomic.c index 3efa6c133..e22503fbc 100644 --- a/modules/spl/spl-atomic.c +++ b/modules/spl/spl-atomic.c @@ -1,5 +1,11 @@ #include +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_ATOMIC + /* Global atomic lock declarations */ spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED; spinlock_t atomic32_lock = SPIN_LOCK_UNLOCKED; diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index f36a1c39e..e4344fdd5 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -1104,10 +1104,10 @@ EXPORT_SYMBOL(spl_debug_dumpstack); void spl_debug_bug(char *file, const char *func, const int line) { spl_debug_catastrophe = 1; - spl_debug_msg(NULL, 0, D_EMERG, file, func, line, "SPL BUG\n"); + spl_debug_msg(NULL, 0, D_EMERG, file, func, line, "SBUG\n"); if (in_interrupt()) { - panic("SPL BUG in interrupt.\n"); + panic("SBUG in interrupt.\n"); /* not reached */ } @@ -1119,7 +1119,7 @@ void spl_debug_bug(char *file, const char *func, const int line) spl_debug_dumplog(); if (spl_debug_panic_on_bug) - panic("SPL BUG"); + panic("SBUG"); set_task_state(current, TASK_UNINTERRUPTIBLE); while (1) diff --git a/modules/spl/spl-err.c b/modules/spl/spl-err.c index 6641ff034..b9a957fc9 100644 --- a/modules/spl/spl-err.c +++ b/modules/spl/spl-err.c @@ -2,6 +2,12 @@ #include #include "config.h" +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_GENERIC + static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; @@ -25,7 +31,7 @@ cmn_err(int ce, const char *fmt, ...) vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); va_end(ap); - printk("%s", msg); + CERROR("%s", msg); } /* cmn_err() */ EXPORT_SYMBOL(cmn_err); @@ -39,7 +45,7 @@ vcmn_err(int ce, const char *fmt, va_list ap) if (ce != CE_NOTE) { /* suppress noise in stress testing */ vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); - printk("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); + CERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); } } /* vcmn_err() */ EXPORT_SYMBOL(vcmn_err); diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 252e9788d..3729a7859 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -13,11 +13,11 @@ #define DEBUG_SUBSYSTEM S_GENERIC -unsigned long spl_hostid = 0; +long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); -char spl_hw_serial[11] = ""; -EXPORT_SYMBOL(spl_hw_serial); +char hw_serial[11] = ""; +EXPORT_SYMBOL(hw_serial); int p0 = 0; EXPORT_SYMBOL(p0); @@ -79,7 +79,7 @@ set_hostid(void) NULL }; /* Doing address resolution in the kernel is tricky and just - * not a good idea in general. So to set the proper 'spl_hw_serial' + * not a good idea in general. So to set the proper 'hw_serial' * use the usermodehelper support to ask '/bin/sh' to run * '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid * for us to use. It's a horific solution but it will do for now. @@ -107,7 +107,7 @@ static int __init spl_init(void) if ((rc = set_hostid())) GOTO(out4, rc = -EADDRNOTAVAIL); - CWARN("Loaded Solaris Porting Layer v%s\n", VERSION); + printk("SPL: Loaded Solaris Porting Layer v%s\n", VERSION); RETURN(rc); out4: proc_fini(); @@ -127,7 +127,7 @@ static void spl_fini(void) { ENTRY; - CWARN("Unloaded Solaris Porting Layer v%s\n", VERSION); + printk("SPL: Unloaded Solaris Porting Layer v%s\n", VERSION); proc_fini(); vn_fini(); kmem_fini(); diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 95eb696a6..69e9ca7c4 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -1,5 +1,11 @@ #include +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_KMEM + /* * Memory allocation interfaces */ @@ -120,7 +126,8 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); - BUG_ON(!kcc); + ASSERT(kcc); + constructor = kcc->kcc_constructor; private = kcc->kcc_private; @@ -144,7 +151,8 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); - BUG_ON(!kcc); + ASSERT(kcc); + destructor = kcc->kcc_destructor; private = kcc->kcc_private; @@ -213,20 +221,21 @@ __kmem_cache_create(char *name, size_t size, size_t align, kmem_cache_cb_t *kcc; int shrinker_flag = 0; char *cache_name; + ENTRY; - /* FIXME: - Option currently unsupported by shim layer */ - BUG_ON(vmp); + /* XXX: - Option currently unsupported by shim layer */ + ASSERT(!vmp); cache_name = kzalloc(strlen(name) + 1, GFP_KERNEL); if (cache_name == NULL) - return NULL; + RETURN(NULL); strcpy(cache_name, name); cache = kmem_cache_create(cache_name, size, align, flags, kmem_cache_generic_constructor, kmem_cache_generic_destructor); if (cache == NULL) - return NULL; + RETURN(NULL); /* Register shared shrinker function on initial cache create */ spin_lock(&kmem_cache_cb_lock); @@ -236,7 +245,7 @@ __kmem_cache_create(char *name, size_t size, size_t align, if (kmem_cache_shrinker == NULL) { kmem_cache_destroy(cache); spin_unlock(&kmem_cache_cb_lock); - return NULL; + RETURN(NULL); } } @@ -249,10 +258,10 @@ __kmem_cache_create(char *name, size_t size, size_t align, remove_shrinker(kmem_cache_shrinker); kmem_cache_destroy(cache); - return NULL; + RETURN(NULL); } - return cache; + RETURN(cache); } EXPORT_SYMBOL(__kmem_cache_create); @@ -265,12 +274,13 @@ __kmem_cache_destroy(kmem_cache_t *cache) char *name; unsigned long flags; int rc; + ENTRY; spin_lock_irqsave(&kmem_cache_cb_lock, flags); kcc = kmem_cache_find_cache_cb(cache); spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); if (kcc == NULL) - return -EINVAL; + RETURN(-EINVAL); name = (char *)kmem_cache_name(cache); rc = kmem_cache_destroy(cache); @@ -283,38 +293,44 @@ __kmem_cache_destroy(kmem_cache_t *cache) remove_shrinker(kmem_cache_shrinker); spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); - return rc; + RETURN(rc); } EXPORT_SYMBOL(__kmem_cache_destroy); void -__kmem_reap(void) { +__kmem_reap(void) +{ + ENTRY; /* Since there's no easy hook in to linux to force all the registered * shrinkers to run we just run the ones registered for this shim */ kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); + EXIT; } EXPORT_SYMBOL(__kmem_reap); int kmem_init(void) { + ENTRY; #ifdef DEBUG_KMEM atomic64_set(&kmem_alloc_used, 0); atomic64_set(&vmem_alloc_used, 0); #endif - return 0; + RETURN(0); } void kmem_fini(void) { + ENTRY; #ifdef DEBUG_KMEM if (atomic64_read(&kmem_alloc_used) != 0) - printk("spl: Warning kmem leaked %ld/%ld bytes\n", + CWARN("kmem leaked %ld/%ld bytes\n", atomic_read(&kmem_alloc_used), kmem_alloc_max); if (atomic64_read(&vmem_alloc_used) != 0) - printk("spl: Warning vmem leaked %ld/%ld bytes\n", + CWARN("vmem leaked %ld/%ld bytes\n", atomic_read(&vmem_alloc_used), vmem_alloc_max); #endif + EXIT; } diff --git a/modules/spl/spl-kobj.c b/modules/spl/spl-kobj.c index eb55ad3e1..76897246d 100644 --- a/modules/spl/spl-kobj.c +++ b/modules/spl/spl-kobj.c @@ -1,39 +1,47 @@ #include #include "config.h" +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_KOBJ + struct _buf * kobj_open_file(const char *name) { struct _buf *file; vnode_t *vp; int rc; + ENTRY; if ((rc = vn_open(name, UIO_SYSSPACE, FREAD, 0644, &vp, 0, 0))) - return ((_buf_t *)-1UL); + RETURN((_buf_t *)-1UL); file = kmalloc(sizeof(_buf_t), GFP_KERNEL); file->vp = vp; - return file; + RETURN(file); } /* kobj_open_file() */ EXPORT_SYMBOL(kobj_open_file); void kobj_close_file(struct _buf *file) { + ENTRY; VOP_CLOSE(file->vp, 0, 0, 0, 0, 0); VN_RELE(file->vp); kfree(file); - - return; + EXIT; } /* kobj_close_file() */ EXPORT_SYMBOL(kobj_close_file); int kobj_read_file(struct _buf *file, char *buf, ssize_t size, offset_t off) { - return vn_rdwr(UIO_READ, file->vp, buf, size, off, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); + ENTRY; + RETURN(vn_rdwr(UIO_READ, file->vp, buf, size, off, + UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL)); } /* kobj_read_file() */ EXPORT_SYMBOL(kobj_read_file); @@ -42,13 +50,14 @@ kobj_get_filesize(struct _buf *file, uint64_t *size) { vattr_t vap; int rc; + ENTRY; rc = VOP_GETATTR(file->vp, &vap, 0, 0, NULL); if (rc) - return rc; + RETURN(rc); *size = vap.va_size; - return rc; + RETURN(rc); } /* kobj_get_filesize() */ EXPORT_SYMBOL(kobj_get_filesize); diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 59183d864..cd3bc88ef 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -2,6 +2,12 @@ #include #include "config.h" +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_MODULE + static spinlock_t dev_info_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(dev_info_list); @@ -50,29 +56,30 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, struct cb_ops *cb_ops; struct file_operations *fops; int rc; + ENTRY; - BUG_ON(spec_type != S_IFCHR); - BUG_ON(minor_num >= di->di_minors); - BUG_ON(strcmp(node_type, DDI_PSEUDO)); - BUG_ON(flag != 0); + ASSERT(spec_type == S_IFCHR); + ASSERT(minor_num < di->di_minors); + ASSERT(!strcmp(node_type, DDI_PSEUDO)); + ASSERT(flag == 0); fops = kzalloc(sizeof(struct file_operations), GFP_KERNEL); if (fops == NULL) - return DDI_FAILURE; + RETURN(DDI_FAILURE); cdev = cdev_alloc(); if (cdev == NULL) { kfree(fops); - return DDI_FAILURE; + RETURN(DDI_FAILURE); } cdev->ops = fops; mutex_enter(&di->di_lock); dev_ops = di->di_ops; - BUG_ON(dev_ops == NULL); + ASSERT(dev_ops); cb_ops = di->di_ops->devo_cb_ops; - BUG_ON(cb_ops == NULL); + ASSERT(cb_ops); /* Setup the fops to cb_ops mapping */ fops->owner = mod; @@ -93,42 +100,42 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, fops->write = mod_generic_write; #endif /* XXX: Currently unsupported operations */ - BUG_ON(cb_ops->cb_open != NULL); - BUG_ON(cb_ops->cb_close != NULL); - BUG_ON(cb_ops->cb_read != NULL); - BUG_ON(cb_ops->cb_write != NULL); - BUG_ON(cb_ops->cb_strategy != NULL); - BUG_ON(cb_ops->cb_print != NULL); - BUG_ON(cb_ops->cb_dump != NULL); - BUG_ON(cb_ops->cb_devmap != NULL); - BUG_ON(cb_ops->cb_mmap != NULL); - BUG_ON(cb_ops->cb_segmap != NULL); - BUG_ON(cb_ops->cb_chpoll != NULL); - BUG_ON(cb_ops->cb_prop_op != NULL); - BUG_ON(cb_ops->cb_str != NULL); - BUG_ON(cb_ops->cb_aread != NULL); - BUG_ON(cb_ops->cb_awrite != NULL); + ASSERT(cb_ops->cb_open == NULL); + ASSERT(cb_ops->cb_close == NULL); + ASSERT(cb_ops->cb_read == NULL); + ASSERT(cb_ops->cb_write == NULL); + ASSERT(cb_ops->cb_strategy == NULL); + ASSERT(cb_ops->cb_print == NULL); + ASSERT(cb_ops->cb_dump == NULL); + ASSERT(cb_ops->cb_devmap == NULL); + ASSERT(cb_ops->cb_mmap == NULL); + ASSERT(cb_ops->cb_segmap == NULL); + ASSERT(cb_ops->cb_chpoll == NULL); + ASSERT(cb_ops->cb_prop_op == NULL); + ASSERT(cb_ops->cb_str == NULL); + ASSERT(cb_ops->cb_aread == NULL); + ASSERT(cb_ops->cb_awrite == NULL); di->di_minor = minor_num; di->di_dev = MKDEV(di->di_major, di->di_minor); rc = cdev_add(cdev, di->di_dev, 1); if (rc) { - printk("spl: Error adding cdev, %d\n", rc); + CERROR("Error adding cdev, %d\n", rc); kfree(fops); cdev_del(cdev); mutex_exit(&di->di_lock); - return DDI_FAILURE; + RETURN(DDI_FAILURE); } di->di_class = class_create(THIS_MODULE, name); if (IS_ERR(di->di_class)) { rc = PTR_ERR(di->di_class); - printk("spl: Error creating %s class, %d\n", name, rc); + CERROR("Error creating %s class, %d\n", name, rc); kfree(fops); cdev_del(di->di_cdev); mutex_exit(&di->di_lock); - return DDI_FAILURE; + RETURN(DDI_FAILURE); } /* Do not append a 0 to devices with minor nums of 0 */ @@ -148,7 +155,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, mutex_exit(&di->di_lock); - return DDI_SUCCESS; + RETURN(DDI_SUCCESS); } EXPORT_SYMBOL(__ddi_create_minor_node); @@ -176,9 +183,11 @@ __ddi_remove_minor_node_locked(dev_info_t *di, char *name) void __ddi_remove_minor_node(dev_info_t *di, char *name) { + ENTRY; mutex_enter(&di->di_lock); __ddi_remove_minor_node_locked(di, name); mutex_exit(&di->di_lock); + EXIT; } EXPORT_SYMBOL(ddi_remove_minor_node); @@ -245,11 +254,12 @@ __mod_install(struct modlinkage *modlp) struct modldrv *drv = modlp->ml_modldrv; struct dev_info *di; int rc; + ENTRY; di = dev_info_alloc(modlp->ml_major, modlp->ml_minors, drv->drv_dev_ops); if (di == NULL) - return ENOMEM; + RETURN(ENOMEM); /* XXX: Really we need to be calling devo_probe if it's available * and then calling devo_attach for each device discovered. However @@ -258,12 +268,12 @@ __mod_install(struct modlinkage *modlp) rc = drv->drv_dev_ops->devo_attach(di, DDI_ATTACH); if (rc != DDI_SUCCESS) { dev_info_free(di); - return rc; + RETURN(rc); } drv->drv_dev_info = di; - return DDI_SUCCESS; + RETURN(DDI_SUCCESS); } EXPORT_SYMBOL(__mod_install); @@ -273,15 +283,16 @@ __mod_remove(struct modlinkage *modlp) struct modldrv *drv = modlp->ml_modldrv; struct dev_info *di = drv->drv_dev_info; int rc; + ENTRY; rc = drv->drv_dev_ops->devo_detach(di, DDI_DETACH); if (rc != DDI_SUCCESS) - return rc; + RETURN(rc); dev_info_free(di); drv->drv_dev_info = NULL; - return DDI_SUCCESS; + RETURN(DDI_SUCCESS); } EXPORT_SYMBOL(__mod_remove); @@ -289,24 +300,28 @@ int ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip) { ldi_ident_t li; + ENTRY; - BUG_ON(modlp == NULL || lip == NULL); + ASSERT(modlp); + ASSERT(lip); li = kmalloc(sizeof(struct ldi_ident), GFP_KERNEL); if (li == NULL) - return ENOMEM; + RETURN(ENOMEM); li->li_dev = MKDEV(modlp->ml_major, 0); *lip = li; - return 0; + RETURN(0); } EXPORT_SYMBOL(ldi_ident_from_mod); void ldi_ident_release(ldi_ident_t lip) { - BUG_ON(lip == NULL); + ENTRY; + ASSERT(lip); kfree(lip); + EXIT; } EXPORT_SYMBOL(ldi_ident_release); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 14b19b6ca..f3fb793a2 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -332,7 +332,7 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) { int len, rc = 0; - unsigned long val; + int32_t val; char *end, str[32]; ENTRY; @@ -344,12 +344,12 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, if (rc < 0) RETURN(rc); - val = simple_strtoul(str, &end, 16); + val = simple_strtol(str, &end, 16); if (str == end) RETURN(-EINVAL); - spl_hostid = val; - sprintf(spl_hw_serial, "%lu", ((long)val >= 0) ? val : -val); + spl_hostid = (long)val; + sprintf(hw_serial, "%u", (val >= 0) ? val : -val); *ppos += *lenp; } else { len = snprintf(str, sizeof(str), "%lx", spl_hostid); @@ -530,8 +530,8 @@ static struct ctl_table spl_table[] = { { .ctl_name = CTL_HW_SERIAL, .procname = "hw_serial", - .data = spl_hw_serial, - .maxlen = sizeof(spl_hw_serial), + .data = hw_serial, + .maxlen = sizeof(hw_serial), .mode = 0444, .proc_handler = &proc_dostring, }, diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c index 2ca8306f7..ba5b33b07 100644 --- a/modules/spl/spl-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -1,28 +1,26 @@ #include +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_RWLOCK + int __rw_read_held(krwlock_t *rwlp) { - BUG_ON(rwlp->rw_magic != RW_MAGIC); - - if (__rw_lock_held(rwlp) && rwlp->rw_owner == NULL) { - return 1; - } - - return 0; + ENTRY; + ASSERT(rwlp->rw_magic == RW_MAGIC); + RETURN(__rw_lock_held(rwlp) && rwlp->rw_owner == NULL); } EXPORT_SYMBOL(__rw_read_held); int __rw_write_held(krwlock_t *rwlp) { - BUG_ON(rwlp->rw_magic != RW_MAGIC); - - if (rwlp->rw_owner == current) { - return 1; - } - - return 0; + ENTRY; + ASSERT(rwlp->rw_magic == RW_MAGIC); + RETURN(rwlp->rw_owner == current); } EXPORT_SYMBOL(__rw_write_held); @@ -30,8 +28,9 @@ int __rw_lock_held(krwlock_t *rwlp) { int rc = 0; + ENTRY; - BUG_ON(rwlp->rw_magic != RW_MAGIC); + ASSERT(rwlp->rw_magic == RW_MAGIC); spin_lock_irq(&(rwlp->rw_sem.wait_lock)); #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK @@ -44,6 +43,6 @@ __rw_lock_held(krwlock_t *rwlp) spin_unlock_irq(&(rwlp->rw_sem.wait_lock)); - return rc; + RETURN(rc); } EXPORT_SYMBOL(__rw_lock_held); diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index d177af9ce..4869daa3d 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -1,5 +1,11 @@ #include +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_TASKQ + /* * Task queue interface * @@ -21,8 +27,8 @@ taskq_work_handler(void *priv) { taskq_work_wrapper_t *tww = priv; - BUG_ON(tww == NULL); - BUG_ON(tww->tww_func == NULL); + ASSERT(tww); + ASSERT(tww->tww_func); /* Call the real function and free the wrapper */ tww->tww_func(tww->tww_priv); @@ -36,14 +42,15 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags) struct workqueue_struct *wq = tq; taskq_work_wrapper_t *tww; int rc; + ENTRY; - BUG_ON(tq == NULL); - BUG_ON(func == NULL); + ASSERT(tq); + ASSERT(func); /* Use GFP_ATOMIC since this may be called in interrupt context */ tww = (taskq_work_wrapper_t *)kmalloc(sizeof(*tww), GFP_ATOMIC); if (!tww) - return (taskqid_t)0; + RETURN((taskqid_t)0); INIT_WORK(&(tww->tww_work), taskq_work_handler, tww); tww->tww_func = func; @@ -52,10 +59,10 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags) rc = queue_work(wq, &(tww->tww_work)); if (!rc) { kfree(tww); - return (taskqid_t)0; + RETURN((taskqid_t)0); } - return (taskqid_t)wq; + RETURN((taskqid_t)wq); } EXPORT_SYMBOL(__taskq_dispatch); @@ -73,21 +80,25 @@ __taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { /* NOTE: Linux workqueue names are limited to 10 chars */ - - return create_singlethread_workqueue(name); + ENTRY; + RETURN(create_singlethread_workqueue(name)); } EXPORT_SYMBOL(__taskq_create); void __taskq_destroy(taskq_t *tq) { + ENTRY; destroy_workqueue(tq); + EXIT; } EXPORT_SYMBOL(__taskq_destroy); void __taskq_wait(taskq_t *tq) { + ENTRY; flush_workqueue(tq); + EXIT; } EXPORT_SYMBOL(__taskq_wait); diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index 41968d76a..e073bb2b6 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -1,6 +1,12 @@ #include #include +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_THREAD + /* * Thread interfaces */ @@ -20,7 +26,7 @@ thread_generic_wrapper(void *arg) void (*func)(void *); void *args; - BUG_ON(tp->tp_magic != TP_MAGIC); + ASSERT(tp->tp_magic == TP_MAGIC); func = tp->tp_func; args = tp->tp_args; set_current_state(tp->tp_state); @@ -36,8 +42,10 @@ thread_generic_wrapper(void *arg) void __thread_exit(void) { + ENTRY; + EXIT; do_exit(0); - return; + /* Unreachable */ } EXPORT_SYMBOL(__thread_exit); @@ -52,15 +60,15 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, thread_priv_t *tp; DEFINE_WAIT(wait); struct task_struct *tsk; + ENTRY; /* Option pp is simply ignored */ /* Variable stack size unsupported */ - BUG_ON(stk != NULL); - BUG_ON(stk != 0); + ASSERT(stk == NULL); tp = kmem_alloc(sizeof(thread_priv_t), KM_SLEEP); if (tp == NULL) - return NULL; + RETURN(NULL); tp->tp_magic = TP_MAGIC; tp->tp_func = func; @@ -71,11 +79,11 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tsk = kthread_create(thread_generic_wrapper, (void *)tp, "%s", name); if (IS_ERR(tsk)) { - printk("spl: Failed to create thread: %ld\n", PTR_ERR(tsk)); - return NULL; + CERROR("Failed to create thread: %ld\n", PTR_ERR(tsk)); + RETURN(NULL); } wake_up_process(tsk); - return (kthread_t *)tsk; + RETURN((kthread_t *)tsk); } EXPORT_SYMBOL(__thread_create); diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index 64b7f9912..c12c3d9bb 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -2,6 +2,12 @@ #include #include "config.h" +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_TIME + void __gethrestime(timestruc_t *ts) { @@ -13,7 +19,7 @@ int __clock_gettime(clock_type_t type, timespec_t *tp) { /* Only support CLOCK_REALTIME+__CLOCK_REALTIME0 for now */ - BUG_ON(!((type == CLOCK_REALTIME) || (type == __CLOCK_REALTIME0))); + ASSERT((type == CLOCK_REALTIME) || (type == __CLOCK_REALTIME0)); getnstimeofday(tp); return 0; diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 2ac34237b..a310222d6 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -2,6 +2,13 @@ #include #include "config.h" + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_VNODE + void *rootdir = NULL; EXPORT_SYMBOL(rootdir); @@ -45,6 +52,7 @@ vnode_t * vn_alloc(int flag) { vnode_t *vp; + ENTRY; vp = kmem_cache_alloc(vn_cache, flag); if (vp != NULL) { @@ -52,14 +60,16 @@ vn_alloc(int flag) vp->v_type = 0; } - return vp; + RETURN(vp); } /* vn_alloc() */ EXPORT_SYMBOL(vn_alloc); void vn_free(vnode_t *vp) { + ENTRY; kmem_cache_free(vn_cache, vp); + EXIT; } /* vn_free() */ EXPORT_SYMBOL(vn_free); @@ -71,10 +81,11 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, struct kstat stat; int rc, saved_umask; vnode_t *vp; + ENTRY; - BUG_ON(!(flags & (FWRITE | FREAD))); - BUG_ON(seg != UIO_SYSSPACE); - BUG_ON(!vpp); + ASSERT(flags & (FWRITE | FREAD)); + ASSERT(seg == UIO_SYSSPACE); + ASSERT(vpp); *vpp = NULL; if (!(flags & FCREAT) && (flags & FWRITE)) @@ -96,18 +107,18 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, (void)xchg(¤t->fs->umask, saved_umask); if (IS_ERR(fp)) - return -PTR_ERR(fp); + RETURN(-PTR_ERR(fp)); rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) { filp_close(fp, 0); - return -rc; + RETURN(-rc); } vp = vn_alloc(KM_SLEEP); if (!vp) { filp_close(fp, 0); - return ENOMEM; + RETURN(ENOMEM); } mutex_enter(&vp->v_lock); @@ -116,7 +127,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, *vpp = vp; mutex_exit(&vp->v_lock); - return 0; + RETURN(0); } /* vn_open() */ EXPORT_SYMBOL(vn_open); @@ -126,19 +137,20 @@ vn_openat(const char *path, uio_seg_t seg, int flags, int mode, { char *realpath; int rc; + ENTRY; - BUG_ON(vp != rootdir); + ASSERT(vp == rootdir); realpath = kmalloc(strlen(path) + 2, GFP_KERNEL); if (!realpath) - return ENOMEM; + RETURN(ENOMEM); sprintf(realpath, "/%s", path); rc = vn_open(realpath, seg, flags, mode, vpp, x1, x2); kfree(realpath); - return rc; + RETURN(rc); } /* vn_openat() */ EXPORT_SYMBOL(vn_openat); @@ -150,13 +162,14 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, mm_segment_t saved_fs; struct file *fp; int rc; + ENTRY; - BUG_ON(!(uio == UIO_WRITE || uio == UIO_READ)); - BUG_ON(!vp); - BUG_ON(!vp->v_file); - BUG_ON(seg != UIO_SYSSPACE); - BUG_ON(x1 != 0); - BUG_ON(x2 != RLIM64_INFINITY); + ASSERT(uio == UIO_WRITE || uio == UIO_READ); + ASSERT(vp); + ASSERT(vp->v_file); + ASSERT(seg == UIO_SYSSPACE); + ASSERT(x1 == 0); + ASSERT(x2 == RLIM64_INFINITY); offset = off; fp = vp->v_file; @@ -175,16 +188,16 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, set_fs(saved_fs); if (rc < 0) - return -rc; + RETURN(-rc); if (residp) { *residp = len - rc; } else { if (rc != len) - return EIO; + RETURN(EIO); } - return 0; + RETURN(0); } /* vn_rdwr() */ EXPORT_SYMBOL(vn_rdwr); @@ -192,14 +205,15 @@ int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) { int rc; + ENTRY; - BUG_ON(!vp); - BUG_ON(!vp->v_file); + ASSERT(vp); + ASSERT(vp->v_file); rc = filp_close(vp->v_file, 0); vn_free(vp); - return -rc; + RETURN(-rc); } /* vn_close() */ EXPORT_SYMBOL(vn_close); @@ -216,17 +230,18 @@ vn_remove(const char *path, uio_seg_t seg, int flags) struct nameidata nd; struct inode *inode = NULL; int rc = 0; + ENTRY; - BUG_ON(seg != UIO_SYSSPACE); - BUG_ON(flags != RMFILE); + ASSERT(seg == UIO_SYSSPACE); + ASSERT(flags == RMFILE); rc = path_lookup(path, LOOKUP_PARENT, &nd); if (rc) - goto exit; + GOTO(exit, rc); rc = -EISDIR; if (nd.last_type != LAST_NORM) - goto exit1; + GOTO(exit1, rc); mutex_lock_nested(&nd.dentry->d_inode->i_mutex, I_MUTEX_PARENT); dentry = lookup_hash(&nd); @@ -234,7 +249,8 @@ vn_remove(const char *path, uio_seg_t seg, int flags) if (!IS_ERR(dentry)) { /* Why not before? Because we want correct rc value */ if (nd.last.name[nd.last.len]) - goto slashes; + GOTO(slashes, rc); + inode = dentry->d_inode; if (inode) atomic_inc(&inode->i_count); @@ -248,12 +264,12 @@ exit2: exit1: path_release(&nd); exit: - return -rc; + RETURN(-rc); slashes: rc = !dentry->d_inode ? -ENOENT : S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR; - goto exit2; + GOTO(exit2, rc); } /* vn_remove() */ EXPORT_SYMBOL(vn_remove); @@ -266,27 +282,28 @@ vn_rename(const char *oldname, const char *newname, int x1) struct dentry * trap; struct nameidata oldnd, newnd; int rc = 0; + ENTRY; rc = path_lookup(oldname, LOOKUP_PARENT, &oldnd); if (rc) - goto exit; + GOTO(exit, rc); rc = path_lookup(newname, LOOKUP_PARENT, &newnd); if (rc) - goto exit1; + GOTO(exit1, rc); rc = -EXDEV; if (oldnd.mnt != newnd.mnt) - goto exit2; + GOTO(exit2, rc); old_dir = oldnd.dentry; rc = -EBUSY; if (oldnd.last_type != LAST_NORM) - goto exit2; + GOTO(exit2, rc); new_dir = newnd.dentry; if (newnd.last_type != LAST_NORM) - goto exit2; + GOTO(exit2, rc); trap = lock_rename(new_dir, old_dir); @@ -294,36 +311,36 @@ vn_rename(const char *oldname, const char *newname, int x1) rc = PTR_ERR(old_dentry); if (IS_ERR(old_dentry)) - goto exit3; + GOTO(exit3, rc); /* source must exist */ rc = -ENOENT; if (!old_dentry->d_inode) - goto exit4; + GOTO(exit4, rc); /* unless the source is a directory trailing slashes give -ENOTDIR */ if (!S_ISDIR(old_dentry->d_inode->i_mode)) { rc = -ENOTDIR; if (oldnd.last.name[oldnd.last.len]) - goto exit4; + GOTO(exit4, rc); if (newnd.last.name[newnd.last.len]) - goto exit4; + GOTO(exit4, rc); } /* source should not be ancestor of target */ rc = -EINVAL; if (old_dentry == trap) - goto exit4; + GOTO(exit4, rc); new_dentry = lookup_hash(&newnd); rc = PTR_ERR(new_dentry); if (IS_ERR(new_dentry)) - goto exit4; + GOTO(exit4, rc); /* target should not be an ancestor of source */ rc = -ENOTEMPTY; if (new_dentry == trap) - goto exit5; + GOTO(exit5, rc); rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); @@ -338,7 +355,7 @@ exit2: exit1: path_release(&oldnd); exit: - return -rc; + RETURN(-rc); } EXPORT_SYMBOL(vn_rename); @@ -348,16 +365,17 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) struct file *fp; struct kstat stat; int rc; + ENTRY; - BUG_ON(!vp); - BUG_ON(!vp->v_file); - BUG_ON(!vap); + ASSERT(vp); + ASSERT(vp->v_file); + ASSERT(vap); fp = vp->v_file; rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) - return -rc; + RETURN(-rc); vap->va_type = vn_get_sol_type(stat.mode); vap->va_mode = stat.mode; @@ -377,21 +395,22 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) vap->va_rdev = stat.rdev; vap->va_blocks = stat.blocks; - return 0; + RETURN(0); } EXPORT_SYMBOL(vn_getattr); int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) { int datasync = 0; + ENTRY; - BUG_ON(!vp); - BUG_ON(!vp->v_file); + ASSERT(vp); + ASSERT(vp->v_file); if (flags & FDSYNC) datasync = 1; - return -file_fsync(vp->v_file, vp->v_file->f_dentry, datasync); + RETURN(-file_fsync(vp->v_file, vp->v_file->f_dentry, datasync)); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); @@ -401,11 +420,11 @@ file_find(int fd) { file_t *fp; - BUG_ON(!spin_is_locked(&vn_file_lock)); + ASSERT(spin_is_locked(&vn_file_lock)); list_for_each_entry(fp, &vn_file_list, f_list) { if (fd == fp->f_fd) { - BUG_ON(atomic_read(&fp->f_ref) == 0); + ASSERT(atomic_read(&fp->f_ref) != 0); return fp; } } @@ -420,6 +439,8 @@ vn_getf(int fd) struct file *lfp; file_t *fp; vnode_t *vp; + int rc = 0; + ENTRY; /* Already open just take an extra reference */ spin_lock(&vn_file_lock); @@ -428,7 +449,7 @@ vn_getf(int fd) if (fp) { atomic_inc(&fp->f_ref); spin_unlock(&vn_file_lock); - return fp; + RETURN(fp); } spin_unlock(&vn_file_lock); @@ -436,7 +457,7 @@ vn_getf(int fd) /* File was not yet opened create the object and setup */ fp = kmem_cache_alloc(vn_file_cache, 0); if (fp == NULL) - goto out; + GOTO(out, rc); mutex_enter(&fp->f_lock); @@ -446,14 +467,14 @@ vn_getf(int fd) lfp = fget(fd); if (lfp == NULL) - goto out_mutex; + GOTO(out_mutex, rc); vp = vn_alloc(KM_SLEEP); if (vp == NULL) - goto out_fget; + GOTO(out_fget, rc); if (vfs_getattr(lfp->f_vfsmnt, lfp->f_dentry, &stat)) - goto out_vnode; + GOTO(out_vnode, rc); mutex_enter(&vp->v_lock); vp->v_type = vn_get_sol_type(stat.mode); @@ -469,7 +490,7 @@ vn_getf(int fd) spin_unlock(&vn_file_lock); mutex_exit(&fp->f_lock); - return fp; + RETURN(fp); out_vnode: vn_free(vp); @@ -479,14 +500,14 @@ out_mutex: mutex_exit(&fp->f_lock); kmem_cache_free(vn_file_cache, fp); out: - return NULL; + RETURN(NULL); } /* getf() */ EXPORT_SYMBOL(getf); static void releasef_locked(file_t *fp) { - BUG_ON(fp->f_file == NULL); - BUG_ON(fp->f_vnode == NULL); + ASSERT(fp->f_file); + ASSERT(fp->f_vnode); /* Unlinked from list, no refs, safe to free outside mutex */ fput(fp->f_file); @@ -499,6 +520,7 @@ void vn_releasef(int fd) { file_t *fp; + ENTRY; spin_lock(&vn_file_lock); fp = file_find(fd); @@ -506,6 +528,7 @@ vn_releasef(int fd) atomic_dec(&fp->f_ref); if (atomic_read(&fp->f_ref) > 0) { spin_unlock(&vn_file_lock); + EXIT; return; } @@ -514,6 +537,7 @@ vn_releasef(int fd) } spin_unlock(&vn_file_lock); + EXIT; return; } /* releasef() */ EXPORT_SYMBOL(releasef); @@ -559,6 +583,7 @@ vn_file_cache_destructor(void *buf, void *cdrarg) int vn_init(void) { + ENTRY; vn_cache = kmem_cache_create("spl_vn_cache", sizeof(struct vnode), 64, vn_cache_constructor, vn_cache_destructor, @@ -569,7 +594,7 @@ vn_init(void) vn_file_cache_constructor, vn_file_cache_destructor, NULL, NULL, NULL, 0); - return 0; + RETURN(0); } /* vn_init() */ void @@ -577,6 +602,7 @@ vn_fini(void) { file_t *fp, *next_fp; int rc, leaked = 0; + ENTRY; spin_lock(&vn_file_lock); @@ -588,17 +614,18 @@ vn_fini(void) rc = kmem_cache_destroy(vn_file_cache); if (rc) - printk("spl: Warning leaked vn_file_cache objects, %d\n", rc); + CWARN("Warning leaked vn_file_cache objects, %d\n", rc); vn_file_cache = NULL; spin_unlock(&vn_file_lock); if (leaked > 0) - printk("spl: Warning %d files leaked\n", leaked); + CWARN("Warning %d files leaked\n", leaked); rc = kmem_cache_destroy(vn_cache); if (rc) - printk("spl: Warning leaked vn_cache objects, %d\n", rc); + CWARN("Warning leaked vn_cache objects, %d\n", rc); + EXIT; return; } /* vn_fini() */ From 892d51061e041e48e36267d33bdb3bb575c6768e Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 21 Apr 2008 18:08:33 +0000 Subject: [PATCH 0079/1062] Handful of minor stack checking fixes git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@79 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- cmd/spl.c | 4 ++-- include/sys/debug.h | 6 +++--- modules/spl/spl-debug.c | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cmd/spl.c b/cmd/spl.c index 866bc8905..ad2c81b4a 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -48,10 +48,10 @@ print_rec(struct dbg_line **linev, int used, FILE *out) struct dbg_line *line = linev[i]; struct spl_debug_header *hdr = line->hdr; - fprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:(%s:%u:%s()) %s", + fprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:%u:(%s:%u:%s()) %s", hdr->ph_subsys, hdr->ph_mask, hdr->ph_cpu_id, hdr->ph_sec, (unsigned long long)hdr->ph_usec, - hdr->ph_stack, hdr->ph_pid, line->file, + hdr->ph_stack, hdr->ph_pid, hdr->ph_stack, line->file, hdr->ph_line_num, line->fn, line->text); free(line->hdr); free(line); diff --git a/include/sys/debug.h b/include/sys/debug.h index 12585e00f..720e4136e 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -172,6 +172,8 @@ do { \ "exceeded 90%% of maximum safe " \ "stack size (%lu/%lu)\n", \ _stack, THREAD_SIZE); \ + spl_debug_dumpstack(NULL); \ + spl_debug_dumplog(); \ } else { \ spl_debug_msg(NULL, D_TRACE, D_WARNING, \ file, func, line, "Error " \ @@ -183,13 +185,11 @@ do { \ } \ } while (0) -#define CHECK_STACK()__CHECK_STACK(__FILE__, __func__, __LINE__) +#define CHECK_STACK() __CHECK_STACK(__FILE__, __func__, __LINE__) /* ASSERTION that is safe to use within the debug system */ #define __ASSERT(cond) \ do { \ - CHECK_STACK(); \ - \ if (unlikely(!(cond))) { \ printk(KERN_ERR "ASSERTION("#cond") failed"); \ SBUG(); \ diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index e4344fdd5..b5771a2aa 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -504,8 +504,9 @@ trace_print_to_console(struct spl_debug_header *hdr, int mask, const char *buf, if ((mask & D_CONSOLE) != 0) { printk("%s%s: %.*s", ptype, prefix, len, buf); } else { - printk("%s%s: %d:(%s:%d:%s()) %.*s", ptype, prefix, hdr->ph_pid, - file, hdr->ph_line_num, fn, len, buf); + printk("%s%s: %d:%d:(%s:%d:%s()) %.*s", ptype, prefix, + hdr->ph_pid, hdr->ph_stack, file, + hdr->ph_line_num, fn, len, buf); } return; @@ -1096,7 +1097,7 @@ void spl_debug_dumpstack(struct task_struct *tsk) if (tsk == NULL) tsk = current; - CWARN("showing stack for process %d\n", tsk->pid); + printk(KERN_ERR "SPL: Showing stack for process %d\n", tsk->pid); show_task(tsk); } EXPORT_SYMBOL(spl_debug_dumpstack); From a8ac0b89668dabce252a80e10785cac876e98a34 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 21 Apr 2008 18:16:04 +0000 Subject: [PATCH 0080/1062] Whoops, missed an instance where we could recursively stack check... bad. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@80 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index b5771a2aa..868be23f1 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -377,7 +377,6 @@ spl_debug_dumplog(void) { struct task_struct *tsk; dumplog_priv_t dp; - ENTRY; init_waitqueue_head(&dp.dp_waitq); dp.dp_pid = current->pid; @@ -385,12 +384,12 @@ spl_debug_dumplog(void) tsk = kthread_create(spl_debug_dumplog_thread,(void *)&dp,"spl_debug"); if (tsk == NULL) - RETURN(-ENOMEM); + return -ENOMEM; wake_up_process(tsk); wait_event(dp.dp_waitq, atomic_read(&dp.dp_flag)); - RETURN(0); + return 0; } EXPORT_SYMBOL(spl_debug_dumplog); From e5bbd245e351f3973017ce7c6006db206e4c1960 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 21 Apr 2008 18:43:02 +0000 Subject: [PATCH 0081/1062] Added 4 missing subsystem flags git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@81 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-debug.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index 868be23f1..47d0c854e 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -149,6 +149,14 @@ spl_debug_subsys2str(int subsys) return "taskq"; case S_KMEM: return "kmem"; + case S_DEBUG: + return "debug"; + case S_GENERIC: + return "generic"; + case S_PROC: + return "proc"; + case S_MODULE: + return "module"; } } From 7fea96c04f87a02efc27207629d13f9b2a14ac55 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 21 Apr 2008 22:44:11 +0000 Subject: [PATCH 0082/1062] More fixes to ensure we get good debug logs even if we're in the process of destroying the stacks. Threshhold set fairly aggressively top 80% of stack usage. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@82 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/debug.h | 52 ++++++++++++++++++---------------- modules/spl/spl-debug.c | 62 ++++++++++++++++++++++------------------- modules/spl/spl-proc.c | 2 +- 3 files changed, 63 insertions(+), 53 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 720e4136e..8f3fcd94b 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -64,6 +64,16 @@ extern unsigned int spl_debug_stack; #define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2) #define SPL_DEFAULT_BACKOFF 2 +#define DL_NOTHREAD 0x0001 /* Do not create a new thread */ +#define DL_SINGLE_CPU 0x0002 /* Collect pages from this CPU */ + +typedef struct dumplog_priv { + wait_queue_head_t dp_waitq; + pid_t dp_pid; + int dp_flags; + atomic_t dp_done; +} dumplog_priv_t; + typedef struct { unsigned long cdls_next; int cdls_count; @@ -147,7 +157,7 @@ struct page_collection { int pc_want_daemon_pages; }; -#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); +#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); #ifdef __ia64__ #define CDEBUG_STACK() (THREAD_SIZE - \ @@ -159,29 +169,24 @@ struct page_collection { (THREAD_SIZE - 1))) # endif /* __ia64__ */ +/* DL_NOTHREAD and DL_SINGLE_CPU flags are passed to spl_debug_bug() + * because we have over run our stack and likely damaged at least one + * other unknown threads stack. We must finish generating the needed + * debug info within this thread context because once we yeild the CPU + * its very likely the system will crash. + */ #define __CHECK_STACK(file, func, line) \ do { \ unsigned long _stack = CDEBUG_STACK(); \ - unsigned long _soft_limit = (9 * THREAD_SIZE) / 10; \ + unsigned long _soft_limit = (8 * THREAD_SIZE) / 10; \ \ if (unlikely(_stack > _soft_limit && _stack > spl_debug_stack)){\ spl_debug_stack = _stack; \ - if (_stack <= THREAD_SIZE) { \ - spl_debug_msg(NULL, D_TRACE, D_WARNING, \ - file, func, line, "Warning " \ - "exceeded 90%% of maximum safe " \ - "stack size (%lu/%lu)\n", \ - _stack, THREAD_SIZE); \ - spl_debug_dumpstack(NULL); \ - spl_debug_dumplog(); \ - } else { \ - spl_debug_msg(NULL, D_TRACE, D_WARNING, \ - file, func, line, "Error " \ - "exceeded maximum safe stack " \ - "size (%lu/%lu)\n", \ - _stack, THREAD_SIZE); \ - SBUG(); \ - } \ + spl_debug_msg(NULL, D_TRACE, D_WARNING, \ + file, func, line, "Error exceeded " \ + "maximum safe stack size (%lu/%lu)\n", \ + _stack, THREAD_SIZE); \ + spl_debug_bug(file, func, line, DL_SINGLE_CPU); \ } \ } while (0) @@ -213,7 +218,7 @@ do { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ "ASSERTION(" #cond ") failed\n"); \ - spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); \ + SBUG(); \ } \ } while (0) @@ -226,7 +231,7 @@ do { \ __FILE__, __FUNCTION__, __LINE__, \ "ASSERTION(" #cond ") failed:" fmt, \ ## a); \ - spl_debug_bug(__FILE__, __FUNCTION__, __LINE__) \ + SBUG(); \ } \ } while (0) @@ -242,7 +247,7 @@ do { \ __FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" FMT " " #OP " " FMT ")\n", \ CAST __left, CAST __right); \ - spl_debug_bug(__FILE__, __FUNCTION__, __LINE__); \ + SBUG(); \ } \ } while (0) @@ -285,7 +290,6 @@ do { \ #define CDEBUG_LIMIT(mask, format, a...) \ __CDEBUG_LIMIT(DEBUG_SUBSYSTEM, mask, format, ## a) -#define dprintf(fmt, a...) CDEBUG_LIMIT(D_INFO, fmt, ## a) #define CWARN(fmt, a...) CDEBUG_LIMIT(D_WARNING, fmt, ## a) #define CERROR(fmt, a...) CDEBUG_LIMIT(D_ERROR, fmt, ## a) #define CEMERG(fmt, a...) CDEBUG_LIMIT(D_EMERG, fmt, ## a) @@ -329,9 +333,9 @@ extern unsigned long spl_debug_get_subsys(void); extern int spl_debug_set_mb(int mb); extern int spl_debug_get_mb(void); -extern int spl_debug_dumplog(void); +extern int spl_debug_dumplog(int flags); extern void spl_debug_dumpstack(struct task_struct *tsk); -extern void spl_debug_bug(char *file, const char *func, const int line); +extern void spl_debug_bug(char *file, const char *func, const int line, int flags); extern int spl_debug_clear_buffer(void); extern int spl_debug_mark_buffer(char *text); diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index 47d0c854e..8c60ea2de 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -102,7 +102,7 @@ struct rw_semaphore trace_sem; atomic_t trace_tage_allocated = ATOMIC_INIT(0); static int panic_notifier(struct notifier_block *, unsigned long, void *); -static int spl_debug_dump_all_pages(char *); +static int spl_debug_dump_all_pages(dumplog_priv_t *dp, char *); static void trace_fini(void); @@ -344,12 +344,6 @@ spl_debug_str2mask(unsigned long *mask, const char *str, int is_subsys) return 0; } -typedef struct dumplog_priv { - wait_queue_head_t dp_waitq; - pid_t dp_pid; - atomic_t dp_flag; -} dumplog_priv_t; - static void spl_debug_dumplog_internal(dumplog_priv_t *dp) { @@ -362,7 +356,7 @@ spl_debug_dumplog_internal(dumplog_priv_t *dp) "%s.%ld.%ld", spl_debug_file_path, get_seconds(), (long)dp->dp_pid); printk(KERN_ALERT "SPL: dumping log to %s\n", spl_debug_file_name); - spl_debug_dump_all_pages(spl_debug_file_name); + spl_debug_dump_all_pages(dp, spl_debug_file_name); current->journal_info = journal_info; } @@ -373,29 +367,36 @@ spl_debug_dumplog_thread(void *arg) dumplog_priv_t *dp = (dumplog_priv_t *)arg; spl_debug_dumplog_internal(dp); - atomic_set(&dp->dp_flag, 1); + atomic_set(&dp->dp_done, 1); wake_up(&dp->dp_waitq); do_exit(0); return 0; /* Unreachable */ } +/* When flag is set do not use a new thread for the debug dump */ int -spl_debug_dumplog(void) +spl_debug_dumplog(int flags) { struct task_struct *tsk; dumplog_priv_t dp; - init_waitqueue_head(&dp.dp_waitq); - dp.dp_pid = current->pid; - atomic_set(&dp.dp_flag, 0); + init_waitqueue_head(&dp.dp_waitq); + dp.dp_pid = current->pid; + dp.dp_flags = flags; + atomic_set(&dp.dp_done, 0); - tsk = kthread_create(spl_debug_dumplog_thread,(void *)&dp,"spl_debug"); - if (tsk == NULL) - return -ENOMEM; + if (dp.dp_flags & DL_NOTHREAD) { + spl_debug_dumplog_internal(&dp); + } else { - wake_up_process(tsk); - wait_event(dp.dp_waitq, atomic_read(&dp.dp_flag)); + tsk = kthread_create(spl_debug_dumplog_thread,(void *)&dp,"spl_debug"); + if (tsk == NULL) + return -ENOMEM; + + wake_up_process(tsk); + wait_event(dp.dp_waitq, atomic_read(&dp.dp_done)); + } return 0; } @@ -849,7 +850,7 @@ EXPORT_SYMBOL(spl_debug_vmsg); * some arch, this will have to be implemented separately in each arch. */ static void -panic_collect_pages(struct page_collection *pc) +collect_pages_from_single_cpu(struct page_collection *pc) { struct trace_cpu_data *tcd; int i, j; @@ -876,12 +877,12 @@ collect_pages_on_cpu(void *info) } static void -collect_pages(struct page_collection *pc) +collect_pages(dumplog_priv_t *dp, struct page_collection *pc) { INIT_LIST_HEAD(&pc->pc_pages); - if (spl_panic_in_progress) - panic_collect_pages(pc); + if (spl_panic_in_progress || dp->dp_flags & DL_SINGLE_CPU) + collect_pages_from_single_cpu(pc); else trace_call_on_all_cpus(collect_pages_on_cpu, pc); } @@ -944,7 +945,7 @@ trace_filp_open (const char *name, int flags, int mode, int *err) #define trace_filp_poff(f) (&(f)->f_pos) static int -spl_debug_dump_all_pages(char *filename) +spl_debug_dump_all_pages(dumplog_priv_t *dp, char *filename) { struct page_collection pc; struct file *filp; @@ -965,7 +966,7 @@ spl_debug_dump_all_pages(char *filename) } spin_lock_init(&pc.pc_lock); - collect_pages(&pc); + collect_pages(dp, &pc); if (list_empty(&pc.pc_pages)) { rc = 0; goto close; @@ -1006,13 +1007,18 @@ spl_debug_dump_all_pages(char *filename) static void spl_debug_flush_pages(void) { + dumplog_priv_t dp; struct page_collection pc; struct trace_page *tage; struct trace_page *tmp; spin_lock_init(&pc.pc_lock); + init_waitqueue_head(&dp.dp_waitq); + dp.dp_pid = current->pid; + dp.dp_flags = 0; + atomic_set(&dp.dp_done, 0); - collect_pages(&pc); + collect_pages(&dp, &pc); list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { __ASSERT_TAGE_INVARIANT(tage); list_del(&tage->linkage); @@ -1109,7 +1115,7 @@ void spl_debug_dumpstack(struct task_struct *tsk) } EXPORT_SYMBOL(spl_debug_dumpstack); -void spl_debug_bug(char *file, const char *func, const int line) +void spl_debug_bug(char *file, const char *func, const int line, int flags) { spl_debug_catastrophe = 1; spl_debug_msg(NULL, 0, D_EMERG, file, func, line, "SBUG\n"); @@ -1124,7 +1130,7 @@ void spl_debug_bug(char *file, const char *func, const int line) spl_panic_in_progress = 1; spl_debug_dumpstack(NULL); - spl_debug_dumplog(); + spl_debug_dumplog(flags); if (spl_debug_panic_on_bug) panic("SBUG"); @@ -1168,7 +1174,7 @@ panic_notifier(struct notifier_block *self, while (current->lock_depth >= 0) unlock_kernel(); - spl_debug_dumplog_internal((void *)(long)current->pid); + spl_debug_dumplog(DL_NOTHREAD | DL_SINGLE_CPU); } return 0; diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index f3fb793a2..1f97b3667 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -179,7 +179,7 @@ proc_dump_kernel(struct ctl_table *table, int write, struct file *filp, ENTRY; if (write) { - spl_debug_dumplog(); + spl_debug_dumplog(0); *ppos += *lenp; } else { *lenp = 0; From b831734a4360aa7ae34a36e55bbe6a1c9a40b01e Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 22 Apr 2008 16:55:26 +0000 Subject: [PATCH 0083/1062] Stack usage is my enemy. Trade cpu cycles in the debug code to ensure I never add anything to the stack I don't absolutely need. All this debug code could be removed from a production build anyway so I'm not so worried about the performance impact. We may also consider revisting the mutex and condvar implementation to ensure no additional stack is used there. Initial indications are I have reduced the worst case stack usage to 9080 bytes. Still to large for the default 8k stacks so I have been forced to run with 16k stacks until I can reduce the worst offenders. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@83 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/splat-ctl.h | 4 +- include/sys/debug.h | 102 +++++++++++++++++++++---------------------- include/sys/sunddi.h | 11 ++--- 3 files changed, 55 insertions(+), 62 deletions(-) diff --git a/include/splat-ctl.h b/include/splat-ctl.h index d905340fb..5be5e3a4a 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -52,8 +52,8 @@ typedef struct splat_cmd { /* Valid configuration commands */ #define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ #define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ -#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ -#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ +#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ +#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ #define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ #define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ diff --git a/include/sys/debug.h b/include/sys/debug.h index 8f3fcd94b..ab881c5bf 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -56,16 +56,16 @@ extern long spl_console_min_delay; extern unsigned int spl_console_backoff; extern unsigned int spl_debug_stack; -#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) -#define TCD_STOCK_PAGES (TCD_MAX_PAGES) -#define TRACE_CONSOLE_BUFFER_SIZE 1024 +#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) +#define TCD_STOCK_PAGES (TCD_MAX_PAGES) +#define TRACE_CONSOLE_BUFFER_SIZE 1024 -#define SPL_DEFAULT_MAX_DELAY (600 * HZ) -#define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2) -#define SPL_DEFAULT_BACKOFF 2 +#define SPL_DEFAULT_MAX_DELAY (600 * HZ) +#define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2) +#define SPL_DEFAULT_BACKOFF 2 #define DL_NOTHREAD 0x0001 /* Do not create a new thread */ -#define DL_SINGLE_CPU 0x0002 /* Collect pages from this CPU */ +#define DL_SINGLE_CPU 0x0002 /* Collect pages from this CPU */ typedef struct dumplog_priv { wait_queue_head_t dp_waitq; @@ -157,7 +157,7 @@ struct page_collection { int pc_want_daemon_pages; }; -#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); +#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); #ifdef __ia64__ #define CDEBUG_STACK() (THREAD_SIZE - \ @@ -169,85 +169,83 @@ struct page_collection { (THREAD_SIZE - 1))) # endif /* __ia64__ */ -/* DL_NOTHREAD and DL_SINGLE_CPU flags are passed to spl_debug_bug() - * because we have over run our stack and likely damaged at least one - * other unknown threads stack. We must finish generating the needed - * debug info within this thread context because once we yeild the CPU - * its very likely the system will crash. +/* DL_SINGLE_CPU flag is passed to spl_debug_bug() because we are about + * to over run our stack and likely damage at least one other unknown + * thread stack. We must finish generating the needed debug info within + * this thread context because once we yeild the CPU its very likely + * the system will crash. */ #define __CHECK_STACK(file, func, line) \ do { \ - unsigned long _stack = CDEBUG_STACK(); \ - unsigned long _soft_limit = (8 * THREAD_SIZE) / 10; \ + if (unlikely(CDEBUG_STACK() > spl_debug_stack)) { \ + spl_debug_stack = CDEBUG_STACK(); \ \ - if (unlikely(_stack > _soft_limit && _stack > spl_debug_stack)){\ - spl_debug_stack = _stack; \ - spl_debug_msg(NULL, D_TRACE, D_WARNING, \ - file, func, line, "Error exceeded " \ - "maximum safe stack size (%lu/%lu)\n", \ - _stack, THREAD_SIZE); \ - spl_debug_bug(file, func, line, DL_SINGLE_CPU); \ + if (unlikely(CDEBUG_STACK() > (4 * THREAD_SIZE) / 5)) { \ + spl_debug_msg(NULL, D_TRACE, D_WARNING, \ + file, func, line, "Error " \ + "exceeded maximum safe stack " \ + "size (%lu/%lu)\n", \ + CDEBUG_STACK(), THREAD_SIZE); \ + spl_debug_bug(file, func, line, DL_SINGLE_CPU); \ + } \ } \ } while (0) #define CHECK_STACK() __CHECK_STACK(__FILE__, __func__, __LINE__) /* ASSERTION that is safe to use within the debug system */ -#define __ASSERT(cond) \ -do { \ - if (unlikely(!(cond))) { \ - printk(KERN_ERR "ASSERTION("#cond") failed"); \ - SBUG(); \ - } \ +#define __ASSERT(cond) \ +do { \ + if (unlikely(!(cond))) { \ + printk(KERN_ERR "ASSERTION(" #cond ") failed"); \ + SBUG(); \ + } \ } while (0) -#define __ASSERT_TAGE_INVARIANT(tage) \ -do { \ - __ASSERT(tage != NULL); \ - __ASSERT(tage->page != NULL); \ - __ASSERT(tage->used <= PAGE_SIZE); \ - __ASSERT(page_count(tage->page) > 0); \ +#define __ASSERT_TAGE_INVARIANT(tage) \ +do { \ + __ASSERT(tage != NULL); \ + __ASSERT(tage->page != NULL); \ + __ASSERT(tage->used <= PAGE_SIZE); \ + __ASSERT(page_count(tage->page) > 0); \ } while(0) /* ASSERTION that will debug log used outside the debug sysytem */ #define ASSERT(cond) \ do { \ - CHECK_STACK(); \ - \ + CHECK_STACK(); \ + \ if (unlikely(!(cond))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ "ASSERTION(" #cond ") failed\n"); \ - SBUG(); \ - } \ + SBUG(); \ + } \ } while (0) #define ASSERTF(cond, fmt, a...) \ do { \ - CHECK_STACK(); \ - \ + CHECK_STACK(); \ + \ if (unlikely(!(cond))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ "ASSERTION(" #cond ") failed:" fmt, \ ## a); \ - SBUG(); \ + SBUG(); \ } \ } while (0) #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ do { \ - const TYPE __left = (TYPE)(LEFT); \ - const TYPE __right = (TYPE)(RIGHT); \ - \ - CHECK_STACK(); \ - \ - if (!(__left OP __right)) { \ + CHECK_STACK(); \ + \ + if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" FMT " " #OP " " FMT ")\n", \ - CAST __left, CAST __right); \ - SBUG(); \ + CAST (LEFT), CAST (RIGHT)); \ + SBUG(); \ } \ } while (0) @@ -259,7 +257,7 @@ do { \ #define ASSERT3U(x,y,z) VERIFY3U(x, y, z) #define ASSERT3P(x,y,z) VERIFY3P(x, y, z) -#define VERIFY(x) ASSERT(x) +#define VERIFY(x) ASSERT(x) #define spl_debug_msg(cdls, subsys, mask, file, fn, line, format, a...) \ spl_debug_vmsg(cdls, subsys, mask, file, fn, \ @@ -323,8 +321,8 @@ do { \ } while(0) extern int spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, - const char *file, const char *fn, const int line, - const char *format1, va_list args, const char *format2, ...); + const char *file, const char *fn, const int line, + const char *format1, va_list args, const char *format2, ...); extern unsigned long spl_debug_set_mask(unsigned long mask); extern unsigned long spl_debug_get_mask(void); diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 59f98061a..c3f3e38cc 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -142,8 +142,9 @@ typedef struct modldrv { #define mod_driverops NULL #define ddi_prop_op NULL -#define getminor MINOR -#define getmajor MAJOR +#define getminor(x) (x) +#define getmajor(x) (x) +#define ddi_driver_major(di) getmajor(di->di_dev) #define mod_install(x) 0 #define mod_remove(x) 0 @@ -158,12 +159,6 @@ extern int __mod_remove(struct modlinkage *modlp); static __inline__ void ddi_report_dev(dev_info_t *d) { } static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { } -static __inline__ major_t -ddi_driver_major(dev_info_t *di) -{ - return getmajor(di->di_dev); -} - static __inline__ int ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, minor_t minor_num, char *node_type, int flag) From 7e4e211333888ab99f32a75691e1f146597832ca Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 22 Apr 2008 20:10:55 +0000 Subject: [PATCH 0084/1062] Give it a real version for a tag git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@84 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- configure.ac | 2 +- scripts/spl.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 454e643a9..6502dcec0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.0.1) +AM_INIT_AUTOMAKE(spl, 0.2.0) AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL diff --git a/scripts/spl.spec b/scripts/spl.spec index 1ce524865..80d6a170c 100644 --- a/scripts/spl.spec +++ b/scripts/spl.spec @@ -1,6 +1,6 @@ # spl %define name spl -%define version 0.0.1 +%define version 0.2.0 Summary: Solaris Porting Layer Name: %{name} From 18c9eadf976dda5c4b36f86290e674ec3e85f7dc Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 22 Apr 2008 22:22:02 +0000 Subject: [PATCH 0085/1062] Be careful to never use any of the debug infrastructure either before the debug subsystem is fully set up, or after the debug subsystem has been torn down. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@86 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-generic.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 3729a7859..be244cd7a 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -90,10 +90,9 @@ set_hostid(void) static int __init spl_init(void) { int rc = 0; - ENTRY; if ((rc = debug_init())) - RETURN(rc); + return rc; if ((rc = kmem_init())) GOTO(out , rc); @@ -120,7 +119,7 @@ out: printk("SPL: Failed to Load Solaris Porting Layer v%s, " "rc = %d\n", VERSION, rc); - RETURN(rc); + return rc; } static void spl_fini(void) @@ -132,8 +131,6 @@ static void spl_fini(void) vn_fini(); kmem_fini(); debug_fini(); - - EXIT; } module_init(spl_init); From 6e605b6e5824c300b9e1953fe4ac9c8fc15d695f Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 23 Apr 2008 21:19:47 +0000 Subject: [PATCH 0086/1062] Minor improvement to taskq handling. This is a small step towards dynamic taskqs which still need to be fully implemented. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@87 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/debug.h | 2 +- modules/spl/spl-taskq.c | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index ab881c5bf..64aa1808f 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -198,7 +198,7 @@ do { \ do { \ if (unlikely(!(cond))) { \ printk(KERN_ERR "ASSERTION(" #cond ") failed"); \ - SBUG(); \ + BUG(); \ } \ } while (0) diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 4869daa3d..d26b40db8 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -66,10 +66,14 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags) } EXPORT_SYMBOL(__taskq_dispatch); -/* XXX - Most args ignored until we decide if it's worth the effort - * to emulate the solaris notion of dynamic thread pools. For - * now we simply serialize everything through one thread which - * may come back to bite us as a performance issue. +/* XXX - We must fully implement dynamic workqueues since they make a + * significant impact in terms of performance. For now I've made + * a trivial compromise. If you ask for one thread you get one + * thread, if you ask for more than that you get one per core. + * It's unclear if you ever really need/want more than one per-core + * anyway. More analysis is required. + * + * name - Workqueue names are limited to 10 chars * pri - Ignore priority * min - Ignored until this is a dynamic thread pool * max - Ignored until this is a dynamic thread pool @@ -79,9 +83,15 @@ taskq_t * __taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { - /* NOTE: Linux workqueue names are limited to 10 chars */ + taskq_t *tq; ENTRY; - RETURN(create_singlethread_workqueue(name)); + + if (nthreads == 1) + tq = create_singlethread_workqueue(name); + else + tq = create_workqueue(name); + + return tq; } EXPORT_SYMBOL(__taskq_create); From 8100fe56f1d249afbb0232ac0a8ee6d598ad9e5f Mon Sep 17 00:00:00 2001 From: wartens2 Date: Thu, 24 Apr 2008 17:07:56 +0000 Subject: [PATCH 0087/1062] Make sure that when calling __vmem_alloc that we do not have __GFP_ZERO set. Once the memory is allocated then zero out the memory if __GFP_ZERO is passed to __vmem_alloc. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@88 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 7af10f9a4..a02bdcbff 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -72,14 +72,17 @@ extern int kmem_warning_flag; \ ASSERT(flags & KM_SLEEP); \ \ - _ptr_ = (void *)__vmalloc((size), ((flags) | \ - __GFP_HIGHMEM), PAGE_KERNEL); \ + _ptr_ = (void *)__vmalloc((size), (((flags) | \ + __GFP_HIGHMEM) & \ + ~__GFP_ZERO), PAGE_KERNEL); \ if (_ptr_ == NULL) { \ printk("spl: Warning vmem_alloc(%d, 0x%x) failed at %s:%d " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ __FILE__, __LINE__, \ atomic64_read(&vmem_alloc_used), vmem_alloc_max); \ } else { \ + if (flags & __GFP_ZERO) \ + memset(_ptr_, 0, (size)); \ atomic64_add((size), &vmem_alloc_used); \ if (unlikely(atomic64_read(&vmem_alloc_used)>vmem_alloc_max)) \ vmem_alloc_max = atomic64_read(&vmem_alloc_used); \ From 1bac409fa3a7c0b4e09e43776ac063ef50efcfd6 Mon Sep 17 00:00:00 2001 From: wartens2 Date: Thu, 24 Apr 2008 17:24:02 +0000 Subject: [PATCH 0088/1062] Forgot to update the ChangeLog. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@89 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index da2f6da4b..e00188f63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-24 Herb Wartens + + * include/sys/kmem.h : Make sure that when calling __vmem_alloc + that we do not have __GFP_ZERO set. Once the memory is allocated + then zero out the memory if __GFP_ZERO is passed to + __vmem_alloc. + 2008-04-16 Herb Wartens * modules/spl/spl-kmem.c : Make sure to disable interrupts From 3561541c244da5ff6b0ded99a22bd1541bdb2a11 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 24 Apr 2008 17:41:23 +0000 Subject: [PATCH 0089/1062] Prep for 0.2.1 tag Minor fixes to headers to use debug macros Added /proc/sys/spl/version git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@90 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 6 ++++++ configure.ac | 2 +- include/sys/kmem.h | 37 ++++++++++++++++++++++--------------- include/sys/mutex.h | 14 ++++++++------ include/sys/rwlock.h | 1 - include/sys/sysmacros.h | 1 + modules/spl/spl-generic.c | 2 ++ modules/spl/spl-proc.c | 11 ++++++++++- 8 files changed, 50 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index e00188f63..0106bbd5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-24 Brian Behlendorf + + * : Tag spl-0.2.1 + + * modules/spl/spl-proc.c : Add /proc/sys/spl/version. + 2008-04-24 Herb Wartens * include/sys/kmem.h : Make sure that when calling __vmem_alloc diff --git a/configure.ac b/configure.ac index 6502dcec0..be8271b6b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.2.0) +AM_INIT_AUTOMAKE(spl, 0.2.1) AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL diff --git a/include/sys/kmem.h b/include/sys/kmem.h index a02bdcbff..c355fdc3c 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -36,17 +36,21 @@ extern int kmem_warning_flag; \ /* Marked unlikely because we should never be doing this */ \ if (unlikely((size) > (PAGE_SIZE * 4)) && kmem_warning_flag) \ - printk("spl: Warning kmem_alloc(%d, 0x%x) large alloc at %s:%d "\ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - __FILE__, __LINE__, \ - atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ + "kmem_alloc(%d, 0x%x) large alloc at %s:%d " \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ + __FILE__, __LINE__, \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ \ _ptr_ = (void *)allocator((size), (flags)); \ if (_ptr_ == NULL) { \ - printk("spl: Warning kmem_alloc(%d, 0x%x) failed at %s:%d " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - __FILE__, __LINE__, \ - atomic64_read(&kmem_alloc_used), kmem_alloc_max); \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ + "kmem_alloc(%d, 0x%x) failed at %s:%d " \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ + __FILE__, __LINE__, \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ } else { \ atomic64_add((size), &kmem_alloc_used); \ if (unlikely(atomic64_read(&kmem_alloc_used)>kmem_alloc_max)) \ @@ -72,17 +76,20 @@ extern int kmem_warning_flag; \ ASSERT(flags & KM_SLEEP); \ \ - _ptr_ = (void *)__vmalloc((size), (((flags) | \ - __GFP_HIGHMEM) & \ - ~__GFP_ZERO), PAGE_KERNEL); \ + _ptr_ = (void *)__vmalloc((size), \ + (((flags) | __GFP_HIGHMEM) & ~__GFP_ZERO), \ + PAGE_KERNEL); \ if (_ptr_ == NULL) { \ - printk("spl: Warning vmem_alloc(%d, 0x%x) failed at %s:%d " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - __FILE__, __LINE__, \ - atomic64_read(&vmem_alloc_used), vmem_alloc_max); \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ + "vmem_alloc(%d, 0x%x) failed at %s:%d " \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ + __FILE__, __LINE__, \ + atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ } else { \ if (flags & __GFP_ZERO) \ memset(_ptr_, 0, (size)); \ + \ atomic64_add((size), &vmem_alloc_used); \ if (unlikely(atomic64_read(&vmem_alloc_used)>vmem_alloc_max)) \ vmem_alloc_max = atomic64_read(&vmem_alloc_used); \ diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 1f99c4d0d..d7036b566 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -76,10 +76,11 @@ mutex_enter(kmutex_t *mp) spin_lock(&mp->km_lock); if (unlikely(in_atomic() && !current->exit_state)) { - printk("May schedule while atomic: %s/0x%08x/%d\n", - current->comm, preempt_count(), current->pid); spin_unlock(&mp->km_lock); - BUG(); + __CDEBUG_LIMIT(S_MUTEX, D_ERROR, + "May schedule while atomic: %s/0x%08x/%d\n", + current->comm, preempt_count(), current->pid); + SBUG(); } spin_unlock(&mp->km_lock); @@ -103,10 +104,11 @@ mutex_tryenter(kmutex_t *mp) spin_lock(&mp->km_lock); if (unlikely(in_atomic() && !current->exit_state)) { - printk("May schedule while atomic: %s/0x%08x/%d\n", - current->comm, preempt_count(), current->pid); spin_unlock(&mp->km_lock); - BUG(); + __CDEBUG_LIMIT(S_MUTEX, D_ERROR, + "May schedule while atomic: %s/0x%08x/%d\n", + current->comm, preempt_count(), current->pid); + SBUG(); } spin_unlock(&mp->km_lock); diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 8fd34e9c6..cd6e46081 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -250,7 +250,6 @@ rw_tryupgrade(krwlock_t *rwlp) * lock. If there is, then we know we should * not try to upgrade the lock */ if (!list_empty(&rwlp->rw_sem.wait_list)) { - printk("spl: Warning There are threads waiting\n"); spin_unlock(&rwlp->rw_sem.wait_lock); return 0; } diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 0cafd7122..6f19f5a3e 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -98,6 +98,7 @@ extern "C" { #define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) /* Missing globals */ +extern char spl_version[16]; extern long spl_hostid; extern char hw_serial[11]; extern int p0; diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index be244cd7a..1aadb990e 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -13,6 +13,8 @@ #define DEBUG_SUBSYSTEM S_GENERIC +char spl_version[16] = "SPL v" VERSION; + long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 1f97b3667..94dd937a1 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -20,7 +20,8 @@ static unsigned long table_max = ~0; #define CTL_SPL 0x87 enum { - CTL_DEBUG_SUBSYS = 1, /* Debug subsystem */ + CTL_VERSION = 1, /* Version */ + CTL_DEBUG_SUBSYS, /* Debug subsystem */ CTL_DEBUG_MASK, /* Debug mask */ CTL_DEBUG_PRINTK, /* Force all messages to console */ CTL_DEBUG_MB, /* Debug buffer size */ @@ -371,6 +372,14 @@ static struct ctl_table spl_table[] = { /* NB No .strategy entries have been provided since * sysctl(8) prefers to go via /proc for portability. */ + { + .ctl_name = CTL_VERSION, + .procname = "version", + .data = spl_version, + .maxlen = sizeof(spl_version), + .mode = 0444, + .proc_handler = &proc_dostring, + }, { .ctl_name = CTL_DEBUG_SUBSYS, .procname = "debug_subsystem", From 839d8b438e1d877fb4a625eed51f556433cbd6b6 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 24 Apr 2008 20:21:07 +0000 Subject: [PATCH 0090/1062] Update kmem.h to properly use new debug subsystem. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@92 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 33 +++++++++++++++++++++++---------- scripts/spl.spec | 2 +- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index c355fdc3c..73965c58b 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -36,25 +36,28 @@ extern int kmem_warning_flag; \ /* Marked unlikely because we should never be doing this */ \ if (unlikely((size) > (PAGE_SIZE * 4)) && kmem_warning_flag) \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "kmem_alloc(%d, 0x%x) large alloc at %s:%d " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - __FILE__, __LINE__, \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning large " \ + "kmem_alloc(%d, 0x%x) (%ld/%ld)\n", \ + (int)(size), (int)(flags), \ atomic64_read(&kmem_alloc_used), \ kmem_alloc_max); \ \ _ptr_ = (void *)allocator((size), (flags)); \ if (_ptr_ == NULL) { \ __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "kmem_alloc(%d, 0x%x) failed at %s:%d " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - __FILE__, __LINE__, \ + "kmem_alloc(%d, 0x%x) failed (%ld/%ld)\n", \ + (int)(size), (int)(flags), \ atomic64_read(&kmem_alloc_used), \ kmem_alloc_max); \ } else { \ atomic64_add((size), &kmem_alloc_used); \ if (unlikely(atomic64_read(&kmem_alloc_used)>kmem_alloc_max)) \ kmem_alloc_max = atomic64_read(&kmem_alloc_used); \ + \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x)'d " \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ } \ \ _ptr_; \ @@ -67,6 +70,9 @@ extern int kmem_warning_flag; ({ \ ASSERT((ptr) || (size > 0)); \ atomic64_sub((size), &kmem_alloc_used); \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%d)'d (%ld/%ld)\n", \ + (int)(size), atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ memset(ptr, 0x5a, (size)); /* Poison */ \ kfree(ptr); \ }) @@ -81,9 +87,8 @@ extern int kmem_warning_flag; PAGE_KERNEL); \ if (_ptr_ == NULL) { \ __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "vmem_alloc(%d, 0x%x) failed at %s:%d " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - __FILE__, __LINE__, \ + "vmem_alloc(%d, 0x%x) failed (%ld/%ld)\n", \ + (int)(size), (int)(flags), \ atomic64_read(&vmem_alloc_used), \ vmem_alloc_max); \ } else { \ @@ -93,6 +98,11 @@ extern int kmem_warning_flag; atomic64_add((size), &vmem_alloc_used); \ if (unlikely(atomic64_read(&vmem_alloc_used)>vmem_alloc_max)) \ vmem_alloc_max = atomic64_read(&vmem_alloc_used); \ + \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(%d, 0x%x)'d " \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ + atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ } \ \ _ptr_; \ @@ -106,6 +116,9 @@ extern int kmem_warning_flag; ({ \ ASSERT((ptr) || (size > 0)); \ atomic64_sub((size), &vmem_alloc_used); \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%d)'d (%ld/%ld)\n", \ + (int)(size), atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ memset(ptr, 0x5a, (size)); /* Poison */ \ vfree(ptr); \ }) diff --git a/scripts/spl.spec b/scripts/spl.spec index 80d6a170c..f4f1f8a8b 100644 --- a/scripts/spl.spec +++ b/scripts/spl.spec @@ -1,6 +1,6 @@ # spl %define name spl -%define version 0.2.0 +%define version 0.2.1 Summary: Solaris Porting Layer Name: %{name} From bcd68186d8009957b751720a801e4c16bb272e83 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 25 Apr 2008 22:10:47 +0000 Subject: [PATCH 0091/1062] New an improved taskq implementation for the SPL. It allows a configurable number of threads like the Solaris version and almost all of the options are supported. Unfortunately, it appears to have made absolutely no difference to our performance numbers. I need to keep looking for where we are bottle necking. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@93 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/condvar.h | 18 +- include/sys/mutex.h | 20 +- include/sys/taskq.h | 103 ++++---- modules/spl/spl-taskq.c | 462 ++++++++++++++++++++++++++++++------ modules/splat/splat-taskq.c | 18 +- 5 files changed, 483 insertions(+), 138 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index fd845d9c1..2878b68a8 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -28,6 +28,7 @@ typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; static __inline__ void cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) { + ENTRY; ASSERT(cvp); ASSERT(type == CV_DEFAULT); ASSERT(arg == NULL); @@ -44,11 +45,14 @@ cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) if (cvp->cv_name) strcpy(cvp->cv_name, name); } + + EXIT; } static __inline__ void cv_destroy(kcondvar_t *cvp) { + ENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); spin_lock(&cvp->cv_lock); @@ -60,12 +64,14 @@ cv_destroy(kcondvar_t *cvp) memset(cvp, CV_POISON, sizeof(*cvp)); spin_unlock(&cvp->cv_lock); + EXIT; } static __inline__ void cv_wait(kcondvar_t *cvp, kmutex_t *mtx) { DEFINE_WAIT(wait); + ENTRY; ASSERT(cvp); ASSERT(mtx); @@ -93,6 +99,7 @@ cv_wait(kcondvar_t *cvp, kmutex_t *mtx) atomic_dec(&cvp->cv_waiters); finish_wait(&cvp->cv_event, &wait); + EXIT; } /* 'expire_time' argument is an absolute wall clock time in jiffies. @@ -103,6 +110,7 @@ cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) { DEFINE_WAIT(wait); clock_t time_left; + ENTRY; ASSERT(cvp); ASSERT(mtx); @@ -120,7 +128,7 @@ cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) /* XXX - Does not handle jiffie wrap properly */ time_left = expire_time - jiffies; if (time_left <= 0) - return -1; + RETURN(-1); prepare_to_wait_exclusive(&cvp->cv_event, &wait, TASK_UNINTERRUPTIBLE); @@ -136,12 +144,13 @@ cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) atomic_dec(&cvp->cv_waiters); finish_wait(&cvp->cv_event, &wait); - return (time_left > 0 ? time_left : -1); + RETURN(time_left > 0 ? time_left : -1); } static __inline__ void cv_signal(kcondvar_t *cvp) { + ENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); @@ -151,6 +160,8 @@ cv_signal(kcondvar_t *cvp) * the wait queue to ensure we don't race waking up processes. */ if (atomic_read(&cvp->cv_waiters) > 0) wake_up(&cvp->cv_event); + + EXIT; } static __inline__ void @@ -158,10 +169,13 @@ cv_broadcast(kcondvar_t *cvp) { ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); + ENTRY; /* Wake_up_all() will wake up all waiters even those which * have the WQ_FLAG_EXCLUSIVE flag set. */ if (atomic_read(&cvp->cv_waiters) > 0) wake_up_all(&cvp->cv_event); + + EXIT; } #endif /* _SPL_CONDVAR_H */ diff --git a/include/sys/mutex.h b/include/sys/mutex.h index d7036b566..045842d72 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -36,6 +36,7 @@ typedef struct { static __inline__ void mutex_init(kmutex_t *mp, char *name, int type, void *ibc) { + ENTRY; ASSERT(mp); ASSERT(ibc == NULL); /* XXX - Spin mutexes not needed */ ASSERT(type == MUTEX_DEFAULT); /* XXX - Only default type supported */ @@ -51,12 +52,14 @@ mutex_init(kmutex_t *mp, char *name, int type, void *ibc) if (mp->km_name) strcpy(mp->km_name, name); } + EXIT; } #undef mutex_destroy static __inline__ void mutex_destroy(kmutex_t *mp) { + ENTRY; ASSERT(mp); ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); @@ -66,11 +69,13 @@ mutex_destroy(kmutex_t *mp) memset(mp, KM_POISON, sizeof(*mp)); spin_unlock(&mp->km_lock); + EXIT; } static __inline__ void mutex_enter(kmutex_t *mp) { + ENTRY; ASSERT(mp); ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); @@ -91,6 +96,7 @@ mutex_enter(kmutex_t *mp) ASSERT(mp->km_owner == NULL); mp->km_owner = current; spin_unlock(&mp->km_lock); + EXIT; } /* Return 1 if we acquired the mutex, else zero. */ @@ -98,6 +104,7 @@ static __inline__ int mutex_tryenter(kmutex_t *mp) { int rc; + ENTRY; ASSERT(mp); ASSERT(mp->km_magic == KM_MAGIC); @@ -118,14 +125,16 @@ mutex_tryenter(kmutex_t *mp) ASSERT(mp->km_owner == NULL); mp->km_owner = current; spin_unlock(&mp->km_lock); - return 1; + RETURN(1); } - return 0; + + RETURN(0); } static __inline__ void mutex_exit(kmutex_t *mp) { + ENTRY; ASSERT(mp); ASSERT(mp->km_magic == KM_MAGIC); spin_lock(&mp->km_lock); @@ -134,6 +143,7 @@ mutex_exit(kmutex_t *mp) mp->km_owner = NULL; spin_unlock(&mp->km_lock); up(&mp->km_sem); + EXIT; } /* Return 1 if mutex is held by current process, else zero. */ @@ -141,6 +151,7 @@ static __inline__ int mutex_owned(kmutex_t *mp) { int rc; + ENTRY; ASSERT(mp); ASSERT(mp->km_magic == KM_MAGIC); @@ -148,7 +159,7 @@ mutex_owned(kmutex_t *mp) rc = (mp->km_owner == current); spin_unlock(&mp->km_lock); - return rc; + RETURN(rc); } /* Return owner if mutex is owned, else NULL. */ @@ -156,6 +167,7 @@ static __inline__ kthread_t * mutex_owner(kmutex_t *mp) { kthread_t *thr; + ENTRY; ASSERT(mp); ASSERT(mp->km_magic == KM_MAGIC); @@ -163,7 +175,7 @@ mutex_owner(kmutex_t *mp) thr = mp->km_owner; spin_unlock(&mp->km_lock); - return thr; + RETURN(thr); } #ifdef __cplusplus diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 14ba33280..ae8fbdb7b 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -5,82 +5,75 @@ extern "C" { #endif -/* - * Task Queues - As of linux 2.6.x task queues have been replaced by a - * similar construct called work queues. The big difference on the linux - * side is that functions called from work queues run in process context - * and not interrupt context. - * - * One nice feature of Solaris which does not exist in linux work - * queues in the notion of a dynamic work queue. Rather than implementing - * this in the shim layer I'm hardcoding one-thread per work queue. - * - * XXX - This may end up being a significant performance penalty which - * forces us to implement dynamic workqueues. Which is all very doable - * with a little effort. - */ #include -#include #include #include #include +#include #include +#include -#undef DEBUG_TASKQ_UNIMPLEMENTED +#define TASKQ_NAMELEN 31 -#define TASKQ_NAMELEN 31 -#define taskq_t workq_t +#define TASKQ_PREPOPULATE 0x00000001 +#define TASKQ_CPR_SAFE 0x00000002 +#define TASKQ_DYNAMIC 0x00000004 -typedef struct workqueue_struct workq_t; typedef unsigned long taskqid_t; -typedef void (*task_func_t)(void *); - -/* - * Public flags for taskq_create(): bit range 0-15 - */ -#define TASKQ_PREPOPULATE 0x0000 /* XXX - Workqueues fully populate */ -#define TASKQ_CPR_SAFE 0x0000 /* XXX - No analog */ -#define TASKQ_DYNAMIC 0x0000 /* XXX - Worksqueues not dynamic */ +typedef void (task_func_t)(void *); /* * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as - * KM_SLEEP/KM_NOSLEEP. + * KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly + * large so as not to conflict with already used GFP_* defines. */ -#define TQ_SLEEP 0x00 /* XXX - Workqueues don't support */ -#define TQ_NOSLEEP 0x00 /* these sorts of flags. They */ -#define TQ_NOQUEUE 0x00 /* always run in application */ -#define TQ_NOALLOC 0x00 /* context and can sleep. */ +#define TQ_SLEEP KM_SLEEP +#define TQ_NOSLEEP KM_NOSLEEP +#define TQ_NOQUEUE 0x01000000 +#define TQ_NOALLOC 0x02000000 +#define TQ_NEW 0x04000000 +#define TQ_ACTIVE 0x80000000 +typedef struct task { + spinlock_t t_lock; + struct list_head t_list; + taskqid_t t_id; + task_func_t *t_func; + void *t_arg; +} task_t; -#ifdef DEBUG_TASKQ_UNIMPLEMENTED -static __inline__ void taskq_init(void) { -#error "taskq_init() not implemented" -} - -static __inline__ taskq_t * -taskq_create_instance(const char *, int, int, pri_t, int, int, uint_t) { -#error "taskq_create_instance() not implemented" -} - -extern void nulltask(void *); -extern void taskq_suspend(taskq_t *); -extern int taskq_suspended(taskq_t *); -extern void taskq_resume(taskq_t *); - -#endif /* DEBUG_TASKQ_UNIMPLEMENTED */ +typedef struct taskq { + spinlock_t tq_lock; /* protects taskq_t */ + struct task_struct **tq_threads; /* thread pointers */ + const char *tq_name; /* taskq name */ + int tq_nactive; /* # of active threads */ + int tq_nthreads; /* # of total threads */ + int tq_pri; /* priority */ + int tq_minalloc; /* min task_t pool size */ + int tq_maxalloc; /* max task_t pool size */ + int tq_nalloc; /* cur task_t pool size */ + uint_t tq_flags; /* flags */ + taskqid_t tq_next_id; /* next pend/work id */ + taskqid_t tq_lowest_id; /* lowest pend/work id */ + struct list_head tq_free_list; /* free task_t's */ + struct list_head tq_work_list; /* work task_t's */ + struct list_head tq_pend_list; /* pending task_t's */ + wait_queue_head_t tq_work_waitq; /* new work waitq */ + wait_queue_head_t tq_wait_waitq; /* wait waitq */ +} taskq_t; extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); extern void __taskq_destroy(taskq_t *); extern void __taskq_wait(taskq_t *); +extern int __taskq_member(taskq_t *, void *); -#define taskq_create(name, thr, pri, min, max, flags) \ - __taskq_create(name, thr, pri, min, max, flags) -#define taskq_dispatch(tq, func, priv, flags) \ - __taskq_dispatch(tq, (task_func_t)func, priv, flags) -#define taskq_destroy(tq) __taskq_destroy(tq) -#define taskq_wait(tq) __taskq_wait(tq) -#define taskq_member(tq, kthr) 1 /* XXX -Just be true */ +#define taskq_member(tq, t) __taskq_member(tq, t) +#define taskq_wait_id(tq, id) __taskq_wait_id(tq, id) +#define taskq_wait(tq) __taskq_wait(tq) +#define taskq_dispatch(tq, f, p, fl) __taskq_dispatch(tq, f, p, fl) +#define taskq_create(n, th, p, mi, ma, fl) __taskq_create(n, th, p, mi, ma, fl) +#define taskq_destroy(tq) __taskq_destroy(tq) #ifdef __cplusplus } diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index d26b40db8..ad9be695b 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -6,109 +6,427 @@ #define DEBUG_SUBSYSTEM S_TASKQ -/* - * Task queue interface - * - * The taskq_work_wrapper functions are used to manage the work_structs - * which must be submitted to linux. The shim layer allocates a wrapper - * structure for all items which contains a pointer to itself as well as - * the real work to be performed. When the work item run the generic - * handle is called which calls the real work function and then using - * the self pointer frees the work_struct. +/* NOTE: Must be called with tq->tq_lock held, returns a list_t which + * is not attached to the free, work, or pending taskq lists. */ -typedef struct taskq_work_wrapper { - struct work_struct tww_work; - task_func_t tww_func; - void * tww_priv; -} taskq_work_wrapper_t; - -static void -taskq_work_handler(void *priv) +static task_t * +task_alloc(taskq_t *tq, uint_t flags) { - taskq_work_wrapper_t *tww = priv; + task_t *t; + int count = 0; + ENTRY; - ASSERT(tww); - ASSERT(tww->tww_func); + ASSERT(tq); + ASSERT(flags & (TQ_SLEEP | TQ_NOSLEEP)); /* One set */ + ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ + ASSERT(spin_is_locked(&tq->tq_lock)); +retry: + /* Aquire task_t's from free list if available */ + if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { + t = list_entry(tq->tq_free_list.next, task_t, t_list); + list_del_init(&t->t_list); + RETURN(t); + } - /* Call the real function and free the wrapper */ - tww->tww_func(tww->tww_priv); - kfree(tww); + /* Free list is empty and memory allocs are prohibited */ + if (flags & TQ_NOALLOC) + RETURN(NULL); + + /* Hit maximum task_t pool size */ + if (tq->tq_nalloc >= tq->tq_maxalloc) { + if (flags & TQ_NOSLEEP) + RETURN(NULL); + + /* Sleep periodically polling the free list for an available + * task_t. If a full second passes and we have not found + * one gives up and return a NULL to the caller. */ + if (flags & TQ_SLEEP) { + spin_unlock_irq(&tq->tq_lock); + schedule_timeout(HZ / 100); + spin_lock_irq(&tq->tq_lock); + if (count < 100) + GOTO(retry, count++); + + RETURN(NULL); + } + + /* Unreachable, TQ_SLEEP xor TQ_NOSLEEP */ + SBUG(); + } + + spin_unlock_irq(&tq->tq_lock); + t = kmem_alloc(sizeof(task_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); + spin_lock_irq(&tq->tq_lock); + + if (t) { + spin_lock_init(&t->t_lock); + INIT_LIST_HEAD(&t->t_list); + t->t_id = 0; + t->t_func = NULL; + t->t_arg = NULL; + tq->tq_nalloc++; + } + + RETURN(t); } -/* XXX - All flags currently ignored */ -taskqid_t -__taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags) +/* NOTE: Must be called with tq->tq_lock held, expectes the task_t + * to already be removed from the free, work, or pending taskq lists. + */ +static void +task_free(taskq_t *tq, task_t *t) +{ + ENTRY; + + ASSERT(tq); + ASSERT(t); + ASSERT(spin_is_locked(&tq->tq_lock)); + ASSERT(list_empty(&t->t_list)); + + kmem_free(t, sizeof(task_t)); + tq->tq_nalloc--; + + EXIT; +} + +/* NOTE: Must be called with tq->tq_lock held, either destroyes the + * task_t if too many exist or moves it to the free list for later use. + */ +static void +task_done(taskq_t *tq, task_t *t) { - struct workqueue_struct *wq = tq; - taskq_work_wrapper_t *tww; - int rc; ENTRY; + ASSERT(tq); + ASSERT(t); + ASSERT(spin_is_locked(&tq->tq_lock)); + + list_del_init(&t->t_list); + + if (tq->tq_nalloc <= tq->tq_minalloc) { + t->t_id = 0; + t->t_func = NULL; + t->t_arg = NULL; + list_add(&t->t_list, &tq->tq_free_list); + } else { + task_free(tq, t); + } + + EXIT; +} + +/* Taskqid's are handed out in a monotonically increasing fashion per + * taskq_t. We don't handle taskqid wrapping yet, but fortuntely it isi + * a 64-bit value so this is probably never going to happen. The lowest + * pending taskqid is stored in the taskq_t to make it easy for any + * taskq_wait()'ers to know if the tasks they're waiting for have + * completed. Unfortunately, tq_task_lowest is kept up to date is + * a pretty brain dead way, something more clever should be done. + */ +static int +taskq_wait_check(taskq_t *tq, taskqid_t id) +{ + RETURN(tq->tq_lowest_id >= id); +} + +/* Expected to wait for all previously scheduled tasks to complete. We do + * not need to wait for tasked scheduled after this call to complete. In + * otherwords we do not need to drain the entire taskq. */ +void +__taskq_wait_id(taskq_t *tq, taskqid_t id) +{ + ENTRY; + ASSERT(tq); + + wait_event(tq->tq_wait_waitq, taskq_wait_check(tq, id)); + + EXIT; +} +EXPORT_SYMBOL(__taskq_wait_id); + +void +__taskq_wait(taskq_t *tq) +{ + taskqid_t id; + ENTRY; + ASSERT(tq); + + spin_lock_irq(&tq->tq_lock); + id = tq->tq_next_id; + spin_unlock_irq(&tq->tq_lock); + + __taskq_wait_id(tq, id); + + EXIT; + +} +EXPORT_SYMBOL(__taskq_wait); + +int +__taskq_member(taskq_t *tq, void *t) +{ + int i; + ENTRY; + + ASSERT(tq); + ASSERT(t); + + for (i = 0; i < tq->tq_nthreads; i++) + if (tq->tq_threads[i] == (struct task_struct *)t) + RETURN(1); + + RETURN(0); +} +EXPORT_SYMBOL(__taskq_member); + +taskqid_t +__taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) +{ + task_t *t; + taskqid_t rc = 0; + ENTRY; ASSERT(tq); ASSERT(func); + if (unlikely(in_atomic() && (flags & TQ_SLEEP))) { + CERROR("May schedule while atomic: %s/0x%08x/%d\n", + current->comm, preempt_count(), current->pid); + SBUG(); + } - /* Use GFP_ATOMIC since this may be called in interrupt context */ - tww = (taskq_work_wrapper_t *)kmalloc(sizeof(*tww), GFP_ATOMIC); - if (!tww) - RETURN((taskqid_t)0); + spin_lock_irq(&tq->tq_lock); - INIT_WORK(&(tww->tww_work), taskq_work_handler, tww); - tww->tww_func = func; - tww->tww_priv = priv; + /* Taskq being destroyed and all tasks drained */ + if (!(tq->tq_flags & TQ_ACTIVE)) + GOTO(out, rc = 0); - rc = queue_work(wq, &(tww->tww_work)); - if (!rc) { - kfree(tww); - RETURN((taskqid_t)0); - } + /* Do not queue the task unless there is idle thread for it */ + ASSERT(tq->tq_nactive <= tq->tq_nthreads); + if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) + GOTO(out, rc = 0); - RETURN((taskqid_t)wq); + if ((t = task_alloc(tq, flags)) == NULL) + GOTO(out, rc = 0); + + + spin_lock(&t->t_lock); + list_add(&t->t_list, &tq->tq_pend_list); + t->t_id = rc = tq->tq_next_id; + tq->tq_next_id++; + t->t_func = func; + t->t_arg = arg; + spin_unlock(&t->t_lock); + + wake_up(&tq->tq_work_waitq); +out: + spin_unlock_irq(&tq->tq_lock); + RETURN(rc); } EXPORT_SYMBOL(__taskq_dispatch); -/* XXX - We must fully implement dynamic workqueues since they make a - * significant impact in terms of performance. For now I've made - * a trivial compromise. If you ask for one thread you get one - * thread, if you ask for more than that you get one per core. - * It's unclear if you ever really need/want more than one per-core - * anyway. More analysis is required. - * - * name - Workqueue names are limited to 10 chars - * pri - Ignore priority - * min - Ignored until this is a dynamic thread pool - * max - Ignored until this is a dynamic thread pool - * flags - Ignored until this is a dynamic thread_pool - */ +/* NOTE: Must be called with tq->tq_lock held */ +static taskqid_t +taskq_lowest_id(taskq_t *tq) +{ + taskqid_t lowest_id = ~0; + task_t *t; + ENTRY; + + ASSERT(tq); + ASSERT(spin_is_locked(&tq->tq_lock)); + + list_for_each_entry(t, &tq->tq_pend_list, t_list) + if (t->t_id < lowest_id) + lowest_id = t->t_id; + + list_for_each_entry(t, &tq->tq_work_list, t_list) + if (t->t_id < lowest_id) + lowest_id = t->t_id; + + RETURN(lowest_id); +} + +static int +taskq_thread(void *args) +{ + DECLARE_WAITQUEUE(wait, current); + sigset_t blocked; + taskqid_t id; + taskq_t *tq = args; + task_t *t; + ENTRY; + + ASSERT(tq); + current->flags |= PF_NOFREEZE; + + sigfillset(&blocked); + sigprocmask(SIG_BLOCK, &blocked, NULL); + flush_signals(current); + + spin_lock_irq(&tq->tq_lock); + tq->tq_nthreads++; + wake_up(&tq->tq_wait_waitq); + set_current_state(TASK_INTERRUPTIBLE); + + while (!kthread_should_stop()) { + + add_wait_queue(&tq->tq_work_waitq, &wait); + if (list_empty(&tq->tq_pend_list)) { + spin_unlock_irq(&tq->tq_lock); + schedule(); + spin_lock_irq(&tq->tq_lock); + } else { + __set_current_state(TASK_RUNNING); + } + + remove_wait_queue(&tq->tq_work_waitq, &wait); + if (!list_empty(&tq->tq_pend_list)) { + t = list_entry(tq->tq_pend_list.next, task_t, t_list); + list_del_init(&t->t_list); + list_add(&t->t_list, &tq->tq_work_list); + tq->tq_nactive++; + spin_unlock_irq(&tq->tq_lock); + + /* Perform the requested task */ + t->t_func(t->t_arg); + + spin_lock_irq(&tq->tq_lock); + tq->tq_nactive--; + id = t->t_id; + task_done(tq, t); + + /* Update the lowest remaining taskqid yet to run */ + if (tq->tq_lowest_id == id) { + tq->tq_lowest_id = taskq_lowest_id(tq); + ASSERT(tq->tq_lowest_id > id); + } + + wake_up_all(&tq->tq_wait_waitq); + } + + set_current_state(TASK_INTERRUPTIBLE); + + } + + __set_current_state(TASK_RUNNING); + tq->tq_nthreads--; + spin_unlock_irq(&tq->tq_lock); + + RETURN(0); +} + taskq_t * __taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { - taskq_t *tq; - ENTRY; + taskq_t *tq; + struct task_struct *t; + int rc = 0, i, j = 0; + ENTRY; - if (nthreads == 1) - tq = create_singlethread_workqueue(name); - else - tq = create_workqueue(name); + ASSERT(name != NULL); + ASSERT(pri <= maxclsyspri); + ASSERT(minalloc >= 0); + ASSERT(maxalloc <= INT_MAX); + ASSERT(!(flags & (TASKQ_CPR_SAFE | TASKQ_DYNAMIC))); /* Unsupported */ - return tq; + tq = kmem_alloc(sizeof(*tq), KM_SLEEP); + if (tq == NULL) + RETURN(NULL); + + tq->tq_threads = kmem_alloc(nthreads * sizeof(t), KM_SLEEP); + if (tq->tq_threads == NULL) { + kmem_free(tq, sizeof(*tq)); + RETURN(NULL); + } + + spin_lock_init(&tq->tq_lock); + spin_lock_irq(&tq->tq_lock); + tq->tq_name = name; + tq->tq_nactive = 0; + tq->tq_nthreads = 0; + tq->tq_pri = pri; + tq->tq_minalloc = minalloc; + tq->tq_maxalloc = maxalloc; + tq->tq_nalloc = 0; + tq->tq_flags = (flags | TQ_ACTIVE); + tq->tq_next_id = 1; + tq->tq_lowest_id = 1; + INIT_LIST_HEAD(&tq->tq_free_list); + INIT_LIST_HEAD(&tq->tq_work_list); + INIT_LIST_HEAD(&tq->tq_pend_list); + init_waitqueue_head(&tq->tq_work_waitq); + init_waitqueue_head(&tq->tq_wait_waitq); + + if (flags & TASKQ_PREPOPULATE) + for (i = 0; i < minalloc; i++) + task_done(tq, task_alloc(tq, TQ_SLEEP | TQ_NEW)); + + spin_unlock_irq(&tq->tq_lock); + + for (i = 0; i < nthreads; i++) { + t = kthread_create(taskq_thread, tq, "%s/%d", name, i); + if (t) { + tq->tq_threads[i] = t; + kthread_bind(t, i % num_online_cpus()); + set_user_nice(t, PRIO_TO_NICE(pri)); + wake_up_process(t); + j++; + } else { + tq->tq_threads[i] = NULL; + rc = 1; + } + } + + /* Wait for all threads to be started before potential destroy */ + wait_event(tq->tq_wait_waitq, tq->tq_nthreads == j); + + if (rc) { + __taskq_destroy(tq); + tq = NULL; + } + + RETURN(tq); } EXPORT_SYMBOL(__taskq_create); void __taskq_destroy(taskq_t *tq) { + task_t *t; + int i, nthreads; ENTRY; - destroy_workqueue(tq); + + ASSERT(tq); + spin_lock_irq(&tq->tq_lock); + tq->tq_flags &= ~TQ_ACTIVE; + spin_unlock_irq(&tq->tq_lock); + + /* TQ_ACTIVE cleared prevents new tasks being added to pending */ + __taskq_wait(tq); + + nthreads = tq->tq_nthreads; + for (i = 0; i < nthreads; i++) + if (tq->tq_threads[i]) + kthread_stop(tq->tq_threads[i]); + + spin_lock_irq(&tq->tq_lock); + + while (!list_empty(&tq->tq_free_list)) { + t = list_entry(tq->tq_free_list.next, task_t, t_list); + list_del_init(&t->t_list); + task_free(tq, t); + } + + ASSERT(tq->tq_nthreads == 0); + ASSERT(tq->tq_nalloc == 0); + ASSERT(list_empty(&tq->tq_free_list)); + ASSERT(list_empty(&tq->tq_work_list)); + ASSERT(list_empty(&tq->tq_pend_list)); + + spin_unlock_irq(&tq->tq_lock); + kmem_free(tq->tq_threads, nthreads * sizeof(task_t *)); + kmem_free(tq, sizeof(taskq_t)); + EXIT; } EXPORT_SYMBOL(__taskq_destroy); - -void -__taskq_wait(taskq_t *tq) -{ - ENTRY; - flush_workqueue(tq); - EXIT; -} -EXPORT_SYMBOL(__taskq_wait); diff --git a/modules/splat/splat-taskq.c b/modules/splat/splat-taskq.c index 6effc4cab..b4d07c95d 100644 --- a/modules/splat/splat-taskq.c +++ b/modules/splat/splat-taskq.c @@ -43,7 +43,8 @@ splat_taskq_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' creating\n", SPLAT_TASKQ_TEST1_NAME); - if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, 0, 0, 0, 0)) == NULL) { + if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST1_NAME); @@ -58,7 +59,8 @@ splat_taskq_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatching\n", tq_arg.name, sym2str(splat_taskq_test1_func)); - if ((id = taskq_dispatch(tq, splat_taskq_test1_func, &tq_arg, 0)) == 0) { + if ((id = taskq_dispatch(tq, splat_taskq_test1_func, + &tq_arg, TQ_SLEEP)) == 0) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test1_func)); @@ -109,6 +111,8 @@ splat_taskq_test2_func2(void *arg) } #define TEST2_TASKQS 8 +#define TEST2_THREADS_PER_TASKQ 4 + static int splat_taskq_test2(struct file *file, void *arg) { taskq_t *tq[TEST2_TASKQS] = { NULL }; @@ -121,7 +125,9 @@ splat_taskq_test2(struct file *file, void *arg) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' " "creating\n", SPLAT_TASKQ_TEST2_NAME, i); if ((tq[i] = taskq_create(SPLAT_TASKQ_TEST2_NAME, - 1, 0, 0, 0, 0)) == NULL) { + TEST2_THREADS_PER_TASKQ, + maxclsyspri, 50, INT_MAX, + TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' create failed\n", SPLAT_TASKQ_TEST2_NAME, i); @@ -139,7 +145,8 @@ splat_taskq_test2(struct file *file, void *arg) { tq_args[i].name, tq_args[i].id, sym2str(splat_taskq_test2_func1)); if ((id = taskq_dispatch( - tq[i], splat_taskq_test2_func1, &tq_args[i], 0)) == 0) { + tq[i], splat_taskq_test2_func1, + &tq_args[i], TQ_SLEEP)) == 0) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch " "failed\n", tq_args[i].name, tq_args[i].id, @@ -153,7 +160,8 @@ splat_taskq_test2(struct file *file, void *arg) { tq_args[i].name, tq_args[i].id, sym2str(splat_taskq_test2_func2)); if ((id = taskq_dispatch( - tq[i], splat_taskq_test2_func2, &tq_args[i], 0)) == 0) { + tq[i], splat_taskq_test2_func2, + &tq_args[i], TQ_SLEEP)) == 0) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch failed\n", tq_args[i].name, tq_args[i].id, From 9ab1ac14ad955800ca070abc11dd031244efb65f Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 5 May 2008 20:18:49 +0000 Subject: [PATCH 0092/1062] Commit adaptive mutexes. This seems to have introduced some new crashes but it's not clear to me yet if these are a problem with the mutex implementation or ZFSs usage of it. Minor taskq fixes to add new tasks to the end of the pending list. Minor enhansements to the debug infrastructure. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@94 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 7 ++ include/sys/debug.h | 11 +- include/sys/kmem.h | 16 +-- include/sys/mutex.h | 217 ++++++++++---------------------- modules/spl/Makefile.in | 1 + modules/spl/spl-generic.c | 18 ++- modules/spl/spl-mutex.c | 256 ++++++++++++++++++++++++++++++++++++++ modules/spl/spl-proc.c | 234 +++++++++++++++++++++++++++++----- modules/spl/spl-taskq.c | 6 +- 9 files changed, 563 insertions(+), 203 deletions(-) create mode 100644 modules/spl/spl-mutex.c diff --git a/ChangeLog b/ChangeLog index 0106bbd5e..a65d6b15d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-26 Brian Behlendorf + + * include/sys/mutex.h : Implemented a close approximation + of adaptive mutexes. These changes however required me to + export a new symbol from the kernel proper 'task_curr()' + which means we are now dependant on a patched kernel. + 2008-04-24 Brian Behlendorf * : Tag spl-0.2.1 diff --git a/include/sys/debug.h b/include/sys/debug.h index 64aa1808f..39585ba19 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -310,16 +310,19 @@ do { \ return RETURN__ret; \ } while (0) -#define ENTRY \ +#define __ENTRY(subsys) \ do { \ - CDEBUG(D_TRACE, "Process entered\n"); \ + __CDEBUG(NULL, subsys, D_TRACE, "Process entered\n"); \ } while (0) -#define EXIT \ +#define __EXIT(subsys) \ do { \ - CDEBUG(D_TRACE, "Process leaving\n"); \ + __CDEBUG(NULL, subsys, D_TRACE, "Process leaving\n"); \ } while(0) +#define ENTRY __ENTRY(DEBUG_SUBSYSTEM) +#define EXIT __EXIT(DEBUG_SUBSYSTEM) + extern int spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, const char *file, const char *fn, const int line, const char *format1, va_list args, const char *format2, ...); diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 73965c58b..cc56ddd36 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -54,9 +54,9 @@ extern int kmem_warning_flag; if (unlikely(atomic64_read(&kmem_alloc_used)>kmem_alloc_max)) \ kmem_alloc_max = atomic64_read(&kmem_alloc_used); \ \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x)'d " \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x) = %p " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ - atomic64_read(&kmem_alloc_used), \ + _ptr_, atomic64_read(&kmem_alloc_used), \ kmem_alloc_max); \ } \ \ @@ -70,8 +70,8 @@ extern int kmem_warning_flag; ({ \ ASSERT((ptr) || (size > 0)); \ atomic64_sub((size), &kmem_alloc_used); \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%d)'d (%ld/%ld)\n", \ - (int)(size), atomic64_read(&kmem_alloc_used), \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%p, %d) (%ld/%ld)\n", \ + (ptr), (int)(size), atomic64_read(&kmem_alloc_used), \ kmem_alloc_max); \ memset(ptr, 0x5a, (size)); /* Poison */ \ kfree(ptr); \ @@ -99,9 +99,9 @@ extern int kmem_warning_flag; if (unlikely(atomic64_read(&vmem_alloc_used)>vmem_alloc_max)) \ vmem_alloc_max = atomic64_read(&vmem_alloc_used); \ \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(%d, 0x%x)'d " \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(%d, 0x%x) = %p " \ "(%ld/%ld)\n", (int)(size), (int)(flags), \ - atomic64_read(&vmem_alloc_used), \ + _ptr_, atomic64_read(&vmem_alloc_used), \ vmem_alloc_max); \ } \ \ @@ -116,8 +116,8 @@ extern int kmem_warning_flag; ({ \ ASSERT((ptr) || (size > 0)); \ atomic64_sub((size), &vmem_alloc_used); \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%d)'d (%ld/%ld)\n", \ - (int)(size), atomic64_read(&vmem_alloc_used), \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%p, %d) (%ld/%ld)\n", \ + (ptr), (int)(size), atomic64_read(&vmem_alloc_used), \ vmem_alloc_max); \ memset(ptr, 0x5a, (size)); /* Poison */ \ vfree(ptr); \ diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 045842d72..fd787bb9d 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -8,175 +8,86 @@ extern "C" { #include #include #include +#include -/* See the "Big Theory Statement" in solaris mutex.c. - * - * Spin mutexes apparently aren't needed by zfs so we assert - * if ibc is non-zero. - * - * Our impementation of adaptive mutexes aren't really adaptive. - * They go to sleep every time. - */ +//#define DEBUG_MUTEX +#undef DEBUG_MUTEX #define MUTEX_DEFAULT 0 -#define MUTEX_HELD(x) (mutex_owned(x)) +#define MUTEX_SPIN 1 +#define MUTEX_ADAPTIVE 2 + +#define MUTEX_ENTER_TOTAL 0 +#define MUTEX_ENTER_NOT_HELD 1 +#define MUTEX_ENTER_SPIN 2 +#define MUTEX_ENTER_SLEEP 3 +#define MUTEX_TRYENTER_TOTAL 4 +#define MUTEX_TRYENTER_NOT_HELD 5 +#define MUTEX_STATS_SIZE 6 #define KM_MAGIC 0x42424242 #define KM_POISON 0x84 typedef struct { - int km_magic; + int32_t km_magic; + int16_t km_type; + int16_t km_name_size; char *km_name; struct task_struct *km_owner; - struct semaphore km_sem; - spinlock_t km_lock; + struct semaphore *km_sem; +#ifdef DEBUG_MUTEX + int *km_stats; + struct list_head km_list; +#endif } kmutex_t; +extern int mutex_spin_max; + +#ifdef DEBUG_MUTEX +extern int mutex_stats[MUTEX_STATS_SIZE]; +extern struct mutex mutex_stats_lock; +extern struct list_head mutex_stats_list; +#define MUTEX_STAT_INC(stats, stat) ((stats)[stat]++) +#else +#define MUTEX_STAT_INC(stats, stat) +#endif + +int spl_mutex_init(void); +void spl_mutex_fini(void); + +extern void __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc); +extern void __spl_mutex_destroy(kmutex_t *mp); +extern int __mutex_tryenter(kmutex_t *mp); +extern void __mutex_enter(kmutex_t *mp); +extern void __mutex_exit(kmutex_t *mp); +extern int __mutex_owned(kmutex_t *mp); +extern kthread_t *__spl_mutex_owner(kmutex_t *mp); + #undef mutex_init -static __inline__ void -mutex_init(kmutex_t *mp, char *name, int type, void *ibc) -{ - ENTRY; - ASSERT(mp); - ASSERT(ibc == NULL); /* XXX - Spin mutexes not needed */ - ASSERT(type == MUTEX_DEFAULT); /* XXX - Only default type supported */ - - mp->km_magic = KM_MAGIC; - spin_lock_init(&mp->km_lock); - sema_init(&mp->km_sem, 1); - mp->km_owner = NULL; - mp->km_name = NULL; - - if (name) { - mp->km_name = kmalloc(strlen(name) + 1, GFP_KERNEL); - if (mp->km_name) - strcpy(mp->km_name, name); - } - EXIT; -} - #undef mutex_destroy -static __inline__ void -mutex_destroy(kmutex_t *mp) -{ - ENTRY; - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - spin_lock(&mp->km_lock); - if (mp->km_name) - kfree(mp->km_name); +#define mutex_init(mp, name, type, ibc) \ +({ \ + __ENTRY(S_MUTEX); \ + if ((name) == NULL) \ + __spl_mutex_init(mp, #mp, type, ibc); \ + else \ + __spl_mutex_init(mp, name, type, ibc); \ + __EXIT(S_MUTEX); \ +}) +#define mutex_destroy(mp) \ +({ \ + __ENTRY(S_MUTEX); \ + __spl_mutex_destroy(mp); \ + __EXIT(S_MUTEX); \ +}) - memset(mp, KM_POISON, sizeof(*mp)); - spin_unlock(&mp->km_lock); - EXIT; -} - -static __inline__ void -mutex_enter(kmutex_t *mp) -{ - ENTRY; - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - spin_lock(&mp->km_lock); - - if (unlikely(in_atomic() && !current->exit_state)) { - spin_unlock(&mp->km_lock); - __CDEBUG_LIMIT(S_MUTEX, D_ERROR, - "May schedule while atomic: %s/0x%08x/%d\n", - current->comm, preempt_count(), current->pid); - SBUG(); - } - - spin_unlock(&mp->km_lock); - - down(&mp->km_sem); - - spin_lock(&mp->km_lock); - ASSERT(mp->km_owner == NULL); - mp->km_owner = current; - spin_unlock(&mp->km_lock); - EXIT; -} - -/* Return 1 if we acquired the mutex, else zero. */ -static __inline__ int -mutex_tryenter(kmutex_t *mp) -{ - int rc; - ENTRY; - - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - spin_lock(&mp->km_lock); - - if (unlikely(in_atomic() && !current->exit_state)) { - spin_unlock(&mp->km_lock); - __CDEBUG_LIMIT(S_MUTEX, D_ERROR, - "May schedule while atomic: %s/0x%08x/%d\n", - current->comm, preempt_count(), current->pid); - SBUG(); - } - - spin_unlock(&mp->km_lock); - rc = down_trylock(&mp->km_sem); /* returns 0 if acquired */ - if (rc == 0) { - spin_lock(&mp->km_lock); - ASSERT(mp->km_owner == NULL); - mp->km_owner = current; - spin_unlock(&mp->km_lock); - RETURN(1); - } - - RETURN(0); -} - -static __inline__ void -mutex_exit(kmutex_t *mp) -{ - ENTRY; - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - spin_lock(&mp->km_lock); - - ASSERT(mp->km_owner == current); - mp->km_owner = NULL; - spin_unlock(&mp->km_lock); - up(&mp->km_sem); - EXIT; -} - -/* Return 1 if mutex is held by current process, else zero. */ -static __inline__ int -mutex_owned(kmutex_t *mp) -{ - int rc; - ENTRY; - - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - spin_lock(&mp->km_lock); - rc = (mp->km_owner == current); - spin_unlock(&mp->km_lock); - - RETURN(rc); -} - -/* Return owner if mutex is owned, else NULL. */ -static __inline__ kthread_t * -mutex_owner(kmutex_t *mp) -{ - kthread_t *thr; - ENTRY; - - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - spin_lock(&mp->km_lock); - thr = mp->km_owner; - spin_unlock(&mp->km_lock); - - RETURN(thr); -} +#define mutex_tryenter(mp) __mutex_tryenter(mp) +#define mutex_enter(mp) __mutex_enter(mp) +#define mutex_exit(mp) __mutex_exit(mp) +#define mutex_owned(mp) __mutex_owned(mp) +#define mutex_owner(mp) __spl_mutex_owner(mp) +#define MUTEX_HELD(mp) mutex_owned(mp) #ifdef __cplusplus } diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index ff283dfd6..bd2a5f9f2 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -22,6 +22,7 @@ spl-objs += spl-kobj.o spl-objs += spl-module.o spl-objs += spl-generic.o spl-objs += spl-atomic.o +spl-objs += spl-mutex.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 1aadb990e..99497dd51 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -99,21 +100,26 @@ static int __init spl_init(void) if ((rc = kmem_init())) GOTO(out , rc); - if ((rc = vn_init())) - GOTO(out2, rc); + if ((rc = spl_mutex_init())) + GOTO(out2 , rc); - if ((rc = proc_init())) + if ((rc = vn_init())) GOTO(out3, rc); + if ((rc = proc_init())) + GOTO(out4, rc); + if ((rc = set_hostid())) - GOTO(out4, rc = -EADDRNOTAVAIL); + GOTO(out5, rc = -EADDRNOTAVAIL); printk("SPL: Loaded Solaris Porting Layer v%s\n", VERSION); RETURN(rc); -out4: +out5: proc_fini(); -out3: +out4: vn_fini(); +out3: + spl_mutex_fini(); out2: kmem_fini(); out: diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c new file mode 100644 index 000000000..06a8f316b --- /dev/null +++ b/modules/spl/spl-mutex.c @@ -0,0 +1,256 @@ +#include + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_MUTEX + +/* Mutex implementation based on those found in Solaris. This means + * they the MUTEX_DEFAULT type is an adaptive mutex. When calling + * mutex_enter() your process will spin waiting for the lock if it's + * likely the lock will be free'd shortly. If it looks like the + * lock will be held for a longer time we schedule and sleep waiting + * for it. This determination is made by checking if the holder of + * the lock is currently running on cpu or sleeping waiting to be + * scheduled. If the holder is currently running it's likely the + * lock will be shortly dropped. + * + * XXX: This is basically a rough implementation to see if this + * helps our performance. If it does a more careful implementation + * should be done, perhaps in assembly. + */ + +/* 0: Never spin when trying to aquire lock + * -1: Spin until aquired or holder yeilds without dropping lock + * 1-MAX_INT: Spin for N attempts before sleeping for lock + */ +int mutex_spin_max = 100; + +#ifdef DEBUG_MUTEX +int mutex_stats[MUTEX_STATS_SIZE] = { 0 }; +DEFINE_MUTEX(mutex_stats_lock); +LIST_HEAD(mutex_stats_list); +#endif + +void +__spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) +{ + ASSERT(mp); + ASSERT(name); + ASSERT(ibc == NULL); + ASSERT(mp->km_magic != KM_MAGIC); /* Never double init */ + + mp->km_magic = KM_MAGIC; + mp->km_owner = NULL; + mp->km_name = NULL; + mp->km_name_size = strlen(name) + 1; + + switch (type) { + case MUTEX_DEFAULT: + mp->km_type = MUTEX_ADAPTIVE; + break; + case MUTEX_SPIN: + case MUTEX_ADAPTIVE: + mp->km_type = type; + break; + default: + SBUG(); + } + + /* Semaphore kmem_alloc'ed to keep struct size down (<64b) */ + mp->km_sem = kmem_alloc(sizeof(struct semaphore), KM_SLEEP); + if (mp->km_sem == NULL) + return; + + mp->km_name = kmem_alloc(mp->km_name_size, KM_SLEEP); + if (mp->km_name == NULL) { + kmem_free(mp->km_sem, sizeof(struct semaphore)); + return; + } + + sema_init(mp->km_sem, 1); + strcpy(mp->km_name, name); + +#ifdef DEBUG_MUTEX + mp->km_stats = kmem_zalloc(sizeof(int) * MUTEX_STATS_SIZE, KM_SLEEP); + if (mp->km_stats == NULL) { + kmem_free(mp->km_name, mp->km_name_size); + kmem_free(mp->km_sem, sizeof(struct semaphore)); + return; + } + + mutex_lock(&mutex_stats_lock); + list_add_tail(&mp->km_list, &mutex_stats_list); + mutex_unlock(&mutex_stats_lock); +#endif +} +EXPORT_SYMBOL(__spl_mutex_init); + +void +__spl_mutex_destroy(kmutex_t *mp) +{ + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); + +#ifdef DEBUG_MUTEX + mutex_lock(&mutex_stats_lock); + list_del_init(&mp->km_list); + mutex_unlock(&mutex_stats_lock); + + kmem_free(mp->km_stats, sizeof(int) * MUTEX_STATS_SIZE); +#endif + kmem_free(mp->km_name, mp->km_name_size); + kmem_free(mp->km_sem, sizeof(struct semaphore)); + + memset(mp, KM_POISON, sizeof(*mp)); +} +EXPORT_SYMBOL(__spl_mutex_destroy); + +/* Return 1 if we acquired the mutex, else zero. */ +int +__mutex_tryenter(kmutex_t *mp) +{ + int rc; + ENTRY; + + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); + MUTEX_STAT_INC(mutex_stats, MUTEX_TRYENTER_TOTAL); + MUTEX_STAT_INC(mp->km_stats, MUTEX_TRYENTER_TOTAL); + + rc = down_trylock(mp->km_sem); + if (rc == 0) { + ASSERT(mp->km_owner == NULL); + mp->km_owner = current; + MUTEX_STAT_INC(mutex_stats, MUTEX_TRYENTER_NOT_HELD); + MUTEX_STAT_INC(mp->km_stats, MUTEX_TRYENTER_NOT_HELD); + } + + RETURN(!rc); +} +EXPORT_SYMBOL(__mutex_tryenter); + +static void +mutex_enter_adaptive(kmutex_t *mp) +{ + struct task_struct *owner; + int count = 0; + + /* Lock is not held so we expect to aquire the lock */ + if ((owner = mp->km_owner) == NULL) { + down(mp->km_sem); + MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_NOT_HELD); + MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_NOT_HELD); + } else { + /* The lock is held by a currently running task which + * we expect will drop the lock before leaving the + * head of the runqueue. So the ideal thing to do + * is spin until we aquire the lock and avoid a + * context switch. However it is also possible the + * task holding the lock yields the processor with + * out dropping lock. In which case, we know it's + * going to be a while so we stop spinning and go + * to sleep waiting for the lock to be available. + * This should strike the optimum balance between + * spinning and sleeping waiting for a lock. + */ + while (task_curr(owner) && (count <= mutex_spin_max)) { + if (down_trylock(mp->km_sem) == 0) { + MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_SPIN); + MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_SPIN); + GOTO(out, count); + } + count++; + } + + /* The lock is held by a sleeping task so it's going to + * cost us minimally one context switch. We might as + * well sleep and yield the processor to other tasks. + */ + down(mp->km_sem); + MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_SLEEP); + MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_SLEEP); + } +out: + MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_TOTAL); + MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_TOTAL); +} + +void +__mutex_enter(kmutex_t *mp) +{ + ENTRY; + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); + + switch (mp->km_type) { + case MUTEX_SPIN: + while (down_trylock(mp->km_sem)); + MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_SPIN); + MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_SPIN); + break; + case MUTEX_ADAPTIVE: + mutex_enter_adaptive(mp); + break; + } + + ASSERT(mp->km_owner == NULL); + mp->km_owner = current; + + EXIT; +} +EXPORT_SYMBOL(__mutex_enter); + +void +__mutex_exit(kmutex_t *mp) +{ + ENTRY; + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); + ASSERT(mp->km_owner == current); + mp->km_owner = NULL; + up(mp->km_sem); + EXIT; +} +EXPORT_SYMBOL(__mutex_exit); + +/* Return 1 if mutex is held by current process, else zero. */ +int +__mutex_owned(kmutex_t *mp) +{ + ENTRY; + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); + RETURN(mp->km_owner == current); +} +EXPORT_SYMBOL(__mutex_owned); + +/* Return owner if mutex is owned, else NULL. */ +kthread_t * +__spl_mutex_owner(kmutex_t *mp) +{ + ENTRY; + ASSERT(mp); + ASSERT(mp->km_magic == KM_MAGIC); + RETURN(mp->km_owner); +} +EXPORT_SYMBOL(__spl_mutex_owner); + +int +spl_mutex_init(void) +{ + ENTRY; + RETURN(0); +} + +void +spl_mutex_fini(void) +{ + ENTRY; +#ifdef DEBUG_MUTEX + ASSERT(list_empty(&mutex_stats_list)); +#endif + EXIT; +} + diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 94dd937a1..64423c186 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -3,8 +3,10 @@ #include #include #include +#include #include #include +#include #include #include "config.h" @@ -18,10 +20,17 @@ static struct ctl_table_header *spl_header = NULL; static unsigned long table_min = 0; static unsigned long table_max = ~0; -#define CTL_SPL 0x87 +#define CTL_SPL 0x87 +#define CTL_SPL_DEBUG 0x88 +#define CTL_SPL_MUTEX 0x89 +#define CTL_SPL_KMEM 0x90 + enum { CTL_VERSION = 1, /* Version */ - CTL_DEBUG_SUBSYS, /* Debug subsystem */ + CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ + CTL_HW_SERIAL, /* Hardware serial number from hostid */ + + CTL_DEBUG_SUBSYS, /* Debug subsystem */ CTL_DEBUG_MASK, /* Debug mask */ CTL_DEBUG_PRINTK, /* Force all messages to console */ CTL_DEBUG_MB, /* Debug buffer size */ @@ -31,19 +40,23 @@ enum { CTL_DEBUG_PATH, /* Dump log location */ CTL_DEBUG_DUMP, /* Dump debug buffer to file */ CTL_DEBUG_FORCE_BUG, /* Hook to force a BUG */ - CTL_CONSOLE_RATELIMIT, /* Ratelimit console messages */ + CTL_DEBUG_STACK_SIZE, /* Max observed stack size */ + + CTL_CONSOLE_RATELIMIT, /* Ratelimit console messages */ CTL_CONSOLE_MAX_DELAY_CS, /* Max delay at which we skip messages */ CTL_CONSOLE_MIN_DELAY_CS, /* Init delay at which we skip messages */ CTL_CONSOLE_BACKOFF, /* Delay increase factor */ - CTL_STACK_SIZE, /* Max observed stack size */ + #ifdef DEBUG_KMEM CTL_KMEM_KMEMUSED, /* Crrently alloc'd kmem bytes */ CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ CTL_KMEM_VMEMUSED, /* Currently alloc'd vmem bytes */ CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ #endif - CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ - CTL_HW_SERIAL, /* Hardware serial number from hostid */ + + CTL_MUTEX_STATS, /* Global mutex statistics */ + CTL_MUTEX_STATS_PER, /* Per mutex statistics */ + CTL_MUTEX_SPIN_MAX, /* Maximum mutex spin iterations */ }; static int @@ -368,21 +381,107 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } -static struct ctl_table spl_table[] = { - /* NB No .strategy entries have been provided since - * sysctl(8) prefers to go via /proc for portability. - */ - { - .ctl_name = CTL_VERSION, - .procname = "version", - .data = spl_version, - .maxlen = sizeof(spl_version), - .mode = 0444, - .proc_handler = &proc_dostring, - }, +#ifdef DEBUG_MUTEX +static void +mutex_seq_show_headers(struct seq_file *f) +{ + seq_printf(f, "%-36s %-4s %-16s\t" + "e_tot\te_nh\te_sp\te_sl\tte_tot\tte_nh\n", + "name", "type", "owner"); +} + +static int +mutex_seq_show(struct seq_file *f, void *p) +{ + kmutex_t *mp = p; + char t = 'X'; + int i; + + ASSERT(mp->km_magic == KM_MAGIC); + + switch (mp->km_type) { + case MUTEX_DEFAULT: t = 'D'; break; + case MUTEX_SPIN: t = 'S'; break; + case MUTEX_ADAPTIVE: t = 'A'; break; + default: + SBUG(); + } + seq_printf(f, "%-36s %c ", mp->km_name, t); + if (mp->km_owner) + seq_printf(f, "%p\t", mp->km_owner); + else + seq_printf(f, "%-16s\t", ""); + + for (i = 0; i < MUTEX_STATS_SIZE; i++) + seq_printf(f, "%d%c", mp->km_stats[i], + (i + 1 == MUTEX_STATS_SIZE) ? '\n' : '\t'); + + return 0; +} + +static void * +mutex_seq_start(struct seq_file *f, loff_t *pos) +{ + struct list_head *p; + loff_t n = *pos; + ENTRY; + + mutex_lock(&mutex_stats_lock); + if (!n) + mutex_seq_show_headers(f); + + p = mutex_stats_list.next; + while (n--) { + p = p->next; + if (p == &mutex_stats_list) + RETURN(NULL); + } + + RETURN(list_entry(p, kmutex_t, km_list)); +} + +static void * +mutex_seq_next(struct seq_file *f, void *p, loff_t *pos) +{ + kmutex_t *mp = p; + ENTRY; + + ++*pos; + RETURN((mp->km_list.next == &mutex_stats_list) ? + NULL : list_entry(mp->km_list.next, kmutex_t, km_list)); +} + +static void +mutex_seq_stop(struct seq_file *f, void *v) +{ + mutex_unlock(&mutex_stats_lock); +} + +static struct seq_operations mutex_seq_ops = { + .show = mutex_seq_show, + .start = mutex_seq_start, + .next = mutex_seq_next, + .stop = mutex_seq_stop, +}; + +static int +proc_mutex_open(struct inode *inode, struct file *filp) +{ + return seq_open(filp, &mutex_seq_ops); +} + +static struct file_operations proc_mutex_operations = { + .open = proc_mutex_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; +#endif /* DEBUG_MUTEX */ + +static struct ctl_table spl_debug_table[] = { { .ctl_name = CTL_DEBUG_SUBSYS, - .procname = "debug_subsystem", + .procname = "subsystem", .data = &spl_debug_subsys, .maxlen = sizeof(unsigned long), .mode = 0644, @@ -390,7 +489,7 @@ static struct ctl_table spl_table[] = { }, { .ctl_name = CTL_DEBUG_MASK, - .procname = "debug_mask", + .procname = "mask", .data = &spl_debug_mask, .maxlen = sizeof(unsigned long), .mode = 0644, @@ -398,7 +497,7 @@ static struct ctl_table spl_table[] = { }, { .ctl_name = CTL_DEBUG_PRINTK, - .procname = "debug_printk", + .procname = "printk", .data = &spl_debug_printk, .maxlen = sizeof(unsigned long), .mode = 0644, @@ -406,13 +505,13 @@ static struct ctl_table spl_table[] = { }, { .ctl_name = CTL_DEBUG_MB, - .procname = "debug_mb", + .procname = "mb", .mode = 0644, .proc_handler = &proc_debug_mb, }, { .ctl_name = CTL_DEBUG_BINARY, - .procname = "debug_binary", + .procname = "binary", .data = &spl_debug_binary, .maxlen = sizeof(int), .mode = 0644, @@ -436,7 +535,7 @@ static struct ctl_table spl_table[] = { }, { .ctl_name = CTL_DEBUG_PATH, - .procname = "debug_path", + .procname = "path", .data = spl_debug_file_path, .maxlen = sizeof(spl_debug_file_path), .mode = 0644, @@ -444,7 +543,7 @@ static struct ctl_table spl_table[] = { }, { .ctl_name = CTL_DEBUG_DUMP, - .procname = "debug_dump", + .procname = "dump", .mode = 0200, .proc_handler = &proc_dump_kernel, }, @@ -483,14 +582,40 @@ static struct ctl_table spl_table[] = { .proc_handler = &proc_console_backoff, }, { - .ctl_name = CTL_STACK_SIZE, + .ctl_name = CTL_DEBUG_STACK_SIZE, .procname = "stack_max", .data = &spl_debug_stack, .maxlen = sizeof(int), .mode = 0444, .proc_handler = &proc_dointvec, }, + {0}, +}; + +#ifdef DEBUG_MUTEX +static struct ctl_table spl_mutex_table[] = { + { + .ctl_name = CTL_MUTEX_STATS, + .procname = "stats", + .data = &mutex_stats, + .maxlen = sizeof(int) * MUTEX_STATS_SIZE, + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_MUTEX_SPIN_MAX, + .procname = "spin_max", + .data = &mutex_spin_max, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + {0}, +}; +#endif /* DEBUG_MUTEX */ + #ifdef DEBUG_KMEM +static struct ctl_table spl_kmem_table[] = { { .ctl_name = CTL_KMEM_KMEMUSED, .procname = "kmem_used", @@ -527,7 +652,22 @@ static struct ctl_table spl_table[] = { .mode = 0444, .proc_handler = &proc_doulongvec_minmax, }, -#endif + {0}, +}; +#endif /* DEBUG_MUTEX */ + +static struct ctl_table spl_table[] = { + /* NB No .strategy entries have been provided since + * sysctl(8) prefers to go via /proc for portability. + */ + { + .ctl_name = CTL_VERSION, + .procname = "version", + .data = spl_version, + .maxlen = sizeof(spl_version), + .mode = 0444, + .proc_handler = &proc_dostring, + }, { .ctl_name = CTL_HOSTID, .procname = "hostid", @@ -544,10 +684,32 @@ static struct ctl_table spl_table[] = { .mode = 0444, .proc_handler = &proc_dostring, }, + { + .ctl_name = CTL_SPL_DEBUG, + .procname = "debug", + .mode = 0555, + .child = spl_debug_table, + }, +#ifdef DEBUG_MUTEX + { + .ctl_name = CTL_SPL_MUTEX, + .procname = "mutex", + .mode = 0555, + .child = spl_mutex_table, + }, +#endif +#ifdef DEBUG_KMEM + { + .ctl_name = CTL_SPL_KMEM, + .procname = "kmem", + .mode = 0555, + .child = spl_kmem_table, + }, +#endif { 0 }, }; -static struct ctl_table spl_dir_table[] = { +static struct ctl_table spl_dir[] = { { .ctl_name = CTL_SPL, .procname = "spl", @@ -563,9 +725,22 @@ proc_init(void) ENTRY; #ifdef CONFIG_SYSCTL - spl_header = register_sysctl_table(spl_dir_table, 0); + spl_header = register_sysctl_table(spl_dir, 0); if (spl_header == NULL) RETURN(-EUNATCH); + +#ifdef DEBUG_MUTEX + { + struct proc_dir_entry *entry = create_proc_entry("mutex_stats", + 0444, NULL); + if (entry) { + entry->proc_fops = &proc_mutex_operations; + } else { + unregister_sysctl_table(spl_header); + RETURN(-EUNATCH); + } + } +#endif /* DEBUG_MUTEX */ #endif RETURN(0); } @@ -577,6 +752,7 @@ proc_fini(void) #ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); + remove_proc_entry("mutex_stats", NULL); unregister_sysctl_table(spl_header); #endif EXIT; diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index ad9be695b..70deb0aea 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -106,7 +106,7 @@ task_done(taskq_t *tq, task_t *t) t->t_id = 0; t->t_func = NULL; t->t_arg = NULL; - list_add(&t->t_list, &tq->tq_free_list); + list_add_tail(&t->t_list, &tq->tq_free_list); } else { task_free(tq, t); } @@ -209,7 +209,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) spin_lock(&t->t_lock); - list_add(&t->t_list, &tq->tq_pend_list); + list_add_tail(&t->t_list, &tq->tq_pend_list); t->t_id = rc = tq->tq_next_id; tq->tq_next_id++; t->t_func = func; @@ -282,7 +282,7 @@ taskq_thread(void *args) if (!list_empty(&tq->tq_pend_list)) { t = list_entry(tq->tq_pend_list.next, task_t, t_list); list_del_init(&t->t_list); - list_add(&t->t_list, &tq->tq_work_list); + list_add_tail(&t->t_list, &tq->tq_work_list); tq->tq_nactive++; spin_unlock_irq(&tq->tq_lock); From d6a26c6a328f811deee16a567b176cd5bcb882e4 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 6 May 2008 20:38:28 +0000 Subject: [PATCH 0093/1062] Lots of fixes here: - Detailed kmem memory allocation tracking. We can now get on spl module unload a list of all memory allocations which were not free'd and where the original alloc was. E.g. SPL: 15554:632:(spl-kmem.c:442:kmem_fini()) kmem leaked 90/319332 bytes SPL: 15554:648:(spl-kmem.c:451:kmem_fini()) address size data func:line SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff8100734b68b8 32 0100000001005a5a __spl_mutex_init:70 SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff8100734b6148 13 &tl->tl_lock __spl_mutex_init:74 SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff81007ac43730 32 0100000001005a5a __spl_mutex_init:70 SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff81007ac437d8 13 &tl->tl_lock __spl_mutex_init:74 - Shift to using rwsems in kmem implmentation, to simply locking and improve concurency. - Shift to using rwsems in mutex implementation, additionally ensure we never sleep in the init function if non-zero preempt_count or interrupts are disabled as can happen in a slab cache ctor/dtor. - Other minor formating fixes and such. TODO: - Finish the vmem memory allocation tracking - Vet all other SPL primatives for potential sleeping during *_init. I suspect the rwlock implemenation does this and should be fixes just like the mutex implemenation. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@95 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 126 ++++++++++++++++---- modules/spl/spl-kmem.c | 209 +++++++++++++++++++++++++++------ modules/spl/spl-mutex.c | 30 +++-- modules/spl/spl-proc.c | 4 +- modules/splat/splat-internal.h | 4 +- modules/splat/splat-kmem.c | 7 +- 6 files changed, 302 insertions(+), 78 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index cc56ddd36..098f16bd0 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -13,6 +13,9 @@ extern "C" { #include #include #include +#include +#include +#include #include /* * Memory allocation interfaces @@ -31,33 +34,97 @@ extern atomic64_t vmem_alloc_used; extern unsigned long vmem_alloc_max; extern int kmem_warning_flag; +#define KMEM_HASH_BITS 10 +#define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) + +extern struct hlist_head kmem_table[KMEM_TABLE_SIZE]; +extern struct list_head kmem_list; +extern spinlock_t kmem_lock; + +typedef struct kmem_debug { + struct hlist_node kd_hlist; /* Hash node linkage */ + struct list_head kd_list; /* List of all allocations */ + void *kd_addr; /* Allocation pointer */ + size_t kd_size; /* Allocation size */ + const char *kd_func; /* Allocation function */ + int kd_line; /* Allocation line */ +} kmem_debug_t; + +static __inline__ kmem_debug_t * +__kmem_del_init(void *addr) +{ + struct hlist_head *head; + struct hlist_node *node; + struct kmem_debug *p; + unsigned long flags; + + spin_lock_irqsave(&kmem_lock, flags); + head = &kmem_table[hash_ptr(addr, KMEM_HASH_BITS)]; + hlist_for_each_entry_rcu(p, node, head, kd_hlist) { + if (p->kd_addr == addr) { + hlist_del_init(&p->kd_hlist); + list_del_init(&p->kd_list); + spin_unlock_irqrestore(&kmem_lock, flags); + return p; + } + } + + spin_unlock_irqrestore(&kmem_lock, flags); + return NULL; +} + #define __kmem_alloc(size, flags, allocator) \ -({ void *_ptr_; \ +({ void *_ptr_ = NULL; \ + kmem_debug_t *_dptr_; \ + unsigned long _flags_; \ \ - /* Marked unlikely because we should never be doing this */ \ - if (unlikely((size) > (PAGE_SIZE * 4)) && kmem_warning_flag) \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning large " \ - "kmem_alloc(%d, 0x%x) (%ld/%ld)\n", \ - (int)(size), (int)(flags), \ - atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - \ - _ptr_ = (void *)allocator((size), (flags)); \ - if (_ptr_ == NULL) { \ + _dptr_ = (kmem_debug_t *)kmalloc(sizeof(kmem_debug_t), (flags)); \ + if (_dptr_ == NULL) { \ __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "kmem_alloc(%d, 0x%x) failed (%ld/%ld)\n", \ - (int)(size), (int)(flags), \ - atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ + "kmem_alloc(%d, 0x%x) debug failed\n", \ + sizeof(kmem_debug_t), (int)(flags)); \ } else { \ - atomic64_add((size), &kmem_alloc_used); \ - if (unlikely(atomic64_read(&kmem_alloc_used)>kmem_alloc_max)) \ - kmem_alloc_max = atomic64_read(&kmem_alloc_used); \ - \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x) = %p " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - _ptr_, atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ + /* Marked unlikely because we should never be doing this */ \ + if (unlikely((size) > (PAGE_SIZE * 4)) && kmem_warning_flag) \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning large " \ + "kmem_alloc(%d, 0x%x) (%ld/%ld)\n", \ + (int)(size), (int)(flags), \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ + \ + _ptr_ = (void *)allocator((size), (flags)); \ + if (_ptr_ == NULL) { \ + kfree(_dptr_); \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ + "kmem_alloc(%d, 0x%x) failed (%ld/" \ + "%ld)\n", (int)(size), (int)(flags), \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ + } else { \ + atomic64_add((size), &kmem_alloc_used); \ + if (unlikely(atomic64_read(&kmem_alloc_used) > \ + kmem_alloc_max)) \ + kmem_alloc_max = \ + atomic64_read(&kmem_alloc_used); \ + \ + INIT_HLIST_NODE(&_dptr_->kd_hlist); \ + INIT_LIST_HEAD(&_dptr_->kd_list); \ + _dptr_->kd_addr = _ptr_; \ + _dptr_->kd_size = (size); \ + _dptr_->kd_func = __FUNCTION__; \ + _dptr_->kd_line = __LINE__; \ + spin_lock_irqsave(&kmem_lock, _flags_); \ + hlist_add_head_rcu(&_dptr_->kd_hlist, \ + &kmem_table[hash_ptr(_ptr_, KMEM_HASH_BITS)]);\ + list_add_tail(&_dptr_->kd_list, &kmem_list); \ + spin_unlock_irqrestore(&kmem_lock, _flags_); \ + \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(" \ + "%d, 0x%x) = %p (%ld/%ld)\n", \ + (int)(size), (int)(flags), _ptr_, \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ + } \ } \ \ _ptr_; \ @@ -68,12 +135,23 @@ extern int kmem_warning_flag; #define kmem_free(ptr, size) \ ({ \ + kmem_debug_t *_dptr_; \ ASSERT((ptr) || (size > 0)); \ + \ + _dptr_ = __kmem_del_init(ptr); \ + ASSERT(_dptr_); /* Must exist in hash due to kmem_alloc() */ \ + ASSERTF(_dptr_->kd_size == (size), "kd_size (%d) != size (%d), " \ + "kd_func = %s, kd_line = %d\n", _dptr_->kd_size, (size), \ + _dptr_->kd_func, _dptr_->kd_line); /* Size must match */ \ atomic64_sub((size), &kmem_alloc_used); \ __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%p, %d) (%ld/%ld)\n", \ (ptr), (int)(size), atomic64_read(&kmem_alloc_used), \ kmem_alloc_max); \ - memset(ptr, 0x5a, (size)); /* Poison */ \ + \ + memset(_dptr_, 0x5a, sizeof(kmem_debug_t)); \ + kfree(_dptr_); \ + \ + memset(ptr, 0x5a, (size)); \ kfree(ptr); \ }) diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 69e9ca7c4..7384a79f2 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -17,12 +17,20 @@ atomic64_t vmem_alloc_used; unsigned long vmem_alloc_max = 0; int kmem_warning_flag = 1; +spinlock_t kmem_lock; +struct hlist_head kmem_table[KMEM_TABLE_SIZE]; +struct list_head kmem_list; + EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); EXPORT_SYMBOL(vmem_alloc_used); EXPORT_SYMBOL(vmem_alloc_max); EXPORT_SYMBOL(kmem_warning_flag); +EXPORT_SYMBOL(kmem_lock); +EXPORT_SYMBOL(kmem_table); +EXPORT_SYMBOL(kmem_list); + int kmem_set_warning(int flag) { return (kmem_warning_flag = !!flag); } #else int kmem_set_warning(int flag) { return 0; } @@ -44,7 +52,11 @@ EXPORT_SYMBOL(kmem_set_warning); * solaris style callback is needed. There is some overhead in this * operation which isn't horibile but it needs to be kept in mind. */ +#define KCC_MAGIC 0x7a7a7a7a +#define KCC_POISON 0x77 + typedef struct kmem_cache_cb { + int kcc_magic; struct list_head kcc_list; kmem_cache_t * kcc_cache; kmem_constructor_t kcc_constructor; @@ -52,14 +64,14 @@ typedef struct kmem_cache_cb { kmem_reclaim_t kcc_reclaim; void * kcc_private; void * kcc_vmp; + atomic_t kcc_ref; } kmem_cache_cb_t; - -static spinlock_t kmem_cache_cb_lock = SPIN_LOCK_UNLOCKED; -static LIST_HEAD(kmem_cache_cb_list); +static struct rw_semaphore kmem_cache_cb_sem; +static struct list_head kmem_cache_cb_list; static struct shrinker *kmem_cache_shrinker; -/* Function must be called while holding the kmem_cache_cb_lock +/* Function must be called while holding the kmem_cache_cb_sem * Because kmem_cache_t is an opaque datatype we're forced to * match pointers to identify specific cache entires. */ @@ -67,6 +79,9 @@ static kmem_cache_cb_t * kmem_cache_find_cache_cb(kmem_cache_t *cache) { kmem_cache_cb_t *kcc; +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + ASSERT(rwsem_is_locked(&kmem_cache_cb_sem)); +#endif list_for_each_entry(kcc, &kmem_cache_cb_list, kcc_list) if (cache == kcc->kcc_cache) @@ -83,19 +98,20 @@ kmem_cache_add_cache_cb(kmem_cache_t *cache, void *priv, void *vmp) { kmem_cache_cb_t *kcc; - unsigned long flags; kcc = (kmem_cache_cb_t *)kmalloc(sizeof(*kcc), GFP_KERNEL); if (kcc) { + kcc->kcc_magic = KCC_MAGIC; kcc->kcc_cache = cache; kcc->kcc_constructor = constructor; kcc->kcc_destructor = destructor; kcc->kcc_reclaim = reclaim; kcc->kcc_private = priv; kcc->kcc_vmp = vmp; - spin_lock_irqsave(&kmem_cache_cb_lock, flags); + atomic_set(&kcc->kcc_ref, 0); + down_write(&kmem_cache_cb_sem); list_add(&kcc->kcc_list, &kmem_cache_cb_list); - spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); + up_write(&kmem_cache_cb_sem); } return kcc; @@ -104,14 +120,15 @@ kmem_cache_add_cache_cb(kmem_cache_t *cache, static void kmem_cache_remove_cache_cb(kmem_cache_cb_t *kcc) { - unsigned long flags; - - spin_lock_irqsave(&kmem_cache_cb_lock, flags); + down_write(&kmem_cache_cb_sem); + ASSERT(atomic_read(&kcc->kcc_ref) == 0); list_del(&kcc->kcc_list); - spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); + up_write(&kmem_cache_cb_sem); - if (kcc) - kfree(kcc); + if (kcc){ + memset(kcc, KCC_POISON, sizeof(*kcc)); + kfree(kcc); + } } static void @@ -119,23 +136,36 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla { kmem_cache_cb_t *kcc; kmem_constructor_t constructor; - unsigned long irqflags; void *private; - spin_lock_irqsave(&kmem_cache_cb_lock, irqflags); + /* Ensure constructor verifies are not passed to the registered + * constructors. This may not be safe due to the Solaris constructor + * not being aware of how to handle the SLAB_CTOR_VERIFY flag + */ + if (flags & SLAB_CTOR_VERIFY) + return; + + /* We can be called with interrupts disabled so it is critical that + * this function and the registered constructor never sleep. + */ + while (!down_read_trylock(&kmem_cache_cb_sem)); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); ASSERT(kcc); + ASSERT(kcc->kcc_magic == KCC_MAGIC); + atomic_inc(&kcc->kcc_ref); constructor = kcc->kcc_constructor; private = kcc->kcc_private; - spin_unlock_irqrestore(&kmem_cache_cb_lock, irqflags); + up_read(&kmem_cache_cb_sem); if (constructor) constructor(ptr, private, (int)flags); + atomic_dec(&kcc->kcc_ref); + /* Linux constructor has no return code, silently eat it */ } @@ -144,23 +174,29 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag { kmem_cache_cb_t *kcc; kmem_destructor_t destructor; - unsigned long irqflags; void *private; - spin_lock_irqsave(&kmem_cache_cb_lock, irqflags); + /* We can be called with interrupts disabled so it is critical that + * this function and the registered constructor never sleep. + */ + while (!down_read_trylock(&kmem_cache_cb_sem)); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); ASSERT(kcc); + ASSERT(kcc->kcc_magic == KCC_MAGIC); + atomic_inc(&kcc->kcc_ref); destructor = kcc->kcc_destructor; private = kcc->kcc_private; - spin_unlock_irqrestore(&kmem_cache_cb_lock, irqflags); + up_read(&kmem_cache_cb_sem); /* Solaris destructor takes no flags, silently eat them */ if (destructor) destructor(ptr, private); + + atomic_dec(&kcc->kcc_ref); } /* XXX - Arguments are ignored */ @@ -168,7 +204,6 @@ static int kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) { kmem_cache_cb_t *kcc; - unsigned long flags; int total = 0; /* Under linux a shrinker is not tightly coupled with a slab @@ -178,9 +213,23 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * function in the shim layer for all slab caches. And we always * attempt to shrink all caches when this generic shrinker is called. */ - spin_lock_irqsave(&kmem_cache_cb_lock, flags); + down_read(&kmem_cache_cb_sem); list_for_each_entry(kcc, &kmem_cache_cb_list, kcc_list) { + ASSERT(kcc); + ASSERT(kcc->kcc_magic == KCC_MAGIC); + + /* Take a reference on the cache in question. If that + * cache is contended simply skip it, it may already be + * in the process of a reclaim or the ctor/dtor may be + * running in either case it's best to skip it. + */ + atomic_inc(&kcc->kcc_ref); + if (atomic_read(&kcc->kcc_ref) > 1) { + atomic_dec(&kcc->kcc_ref); + continue; + } + /* Under linux the desired number and gfp type of objects * is passed to the reclaiming function as a sugested reclaim * target. I do not pass these args on because reclaim @@ -190,6 +239,7 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) if (kcc->kcc_reclaim) kcc->kcc_reclaim(kcc->kcc_private); + atomic_dec(&kcc->kcc_ref); total += 1; } @@ -199,7 +249,8 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * was registered with the generic shrinker. This should fake out * the linux VM when it attempts to shrink caches. */ - spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); + up_read(&kmem_cache_cb_sem); + return total; } @@ -238,18 +289,18 @@ __kmem_cache_create(char *name, size_t size, size_t align, RETURN(NULL); /* Register shared shrinker function on initial cache create */ - spin_lock(&kmem_cache_cb_lock); + down_read(&kmem_cache_cb_sem); if (list_empty(&kmem_cache_cb_list)) { kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, kmem_cache_generic_shrinker); if (kmem_cache_shrinker == NULL) { kmem_cache_destroy(cache); - spin_unlock(&kmem_cache_cb_lock); + up_read(&kmem_cache_cb_sem); RETURN(NULL); } } - spin_unlock(&kmem_cache_cb_lock); + up_read(&kmem_cache_cb_sem); kcc = kmem_cache_add_cache_cb(cache, constructor, destructor, reclaim, priv, vmp); @@ -272,27 +323,31 @@ __kmem_cache_destroy(kmem_cache_t *cache) { kmem_cache_cb_t *kcc; char *name; - unsigned long flags; int rc; ENTRY; - spin_lock_irqsave(&kmem_cache_cb_lock, flags); + down_read(&kmem_cache_cb_sem); kcc = kmem_cache_find_cache_cb(cache); - spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); - if (kcc == NULL) + if (kcc == NULL) { + up_read(&kmem_cache_cb_sem); RETURN(-EINVAL); + } + atomic_inc(&kcc->kcc_ref); + up_read(&kmem_cache_cb_sem); name = (char *)kmem_cache_name(cache); rc = kmem_cache_destroy(cache); + + atomic_dec(&kcc->kcc_ref); kmem_cache_remove_cache_cb(kcc); kfree(name); /* Unregister generic shrinker on removal of all caches */ - spin_lock_irqsave(&kmem_cache_cb_lock, flags); + down_read(&kmem_cache_cb_sem); if (list_empty(&kmem_cache_cb_list)) remove_shrinker(kmem_cache_shrinker); - spin_unlock_irqrestore(&kmem_cache_cb_lock, flags); + up_read(&kmem_cache_cb_sem); RETURN(rc); } EXPORT_SYMBOL(__kmem_cache_destroy); @@ -312,25 +367,101 @@ int kmem_init(void) { ENTRY; + + init_rwsem(&kmem_cache_cb_sem); + INIT_LIST_HEAD(&kmem_cache_cb_list); #ifdef DEBUG_KMEM - atomic64_set(&kmem_alloc_used, 0); - atomic64_set(&vmem_alloc_used, 0); + { + int i; + atomic64_set(&kmem_alloc_used, 0); + atomic64_set(&vmem_alloc_used, 0); + + spin_lock_init(&kmem_lock); + INIT_LIST_HEAD(&kmem_list); + + for (i = 0; i < KMEM_TABLE_SIZE; i++) + INIT_HLIST_HEAD(&kmem_table[i]); + } #endif RETURN(0); } +static char *sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) +{ + int size = ((len - 1) < kd->kd_size) ? (len - 1) : kd->kd_size; + int i, flag = 1; + + ASSERT(str != NULL && len >= 17); + memset(str, 0, len); + + /* Check for a fully printable string, and while we are at + * it place the printable characters in the passed buffer. */ + for (i = 0; i < size; i++) { + str[i] = ((char *)(kd->kd_addr))[i]; + if (isprint(str[i])) { + continue; + } else { + /* Minimum number of printable characters found + * to make it worthwhile to print this as ascii. */ + if (i > min) + break; + + flag = 0; + break; + } + + } + + if (!flag) { + sprintf(str, "%02x%02x%02x%02x%02x%02x%02x%02x", + *((uint8_t *)kd->kd_addr), + *((uint8_t *)kd->kd_addr + 2), + *((uint8_t *)kd->kd_addr + 4), + *((uint8_t *)kd->kd_addr + 6), + *((uint8_t *)kd->kd_addr + 8), + *((uint8_t *)kd->kd_addr + 10), + *((uint8_t *)kd->kd_addr + 12), + *((uint8_t *)kd->kd_addr + 14)); + } + + return str; +} + void kmem_fini(void) { ENTRY; #ifdef DEBUG_KMEM - if (atomic64_read(&kmem_alloc_used) != 0) - CWARN("kmem leaked %ld/%ld bytes\n", - atomic_read(&kmem_alloc_used), kmem_alloc_max); + { + unsigned long flags; + kmem_debug_t *kd; + char str[17]; - if (atomic64_read(&vmem_alloc_used) != 0) - CWARN("vmem leaked %ld/%ld bytes\n", - atomic_read(&vmem_alloc_used), vmem_alloc_max); + if (atomic64_read(&kmem_alloc_used) != 0) + CWARN("kmem leaked %ld/%ld bytes\n", + atomic_read(&kmem_alloc_used), kmem_alloc_max); + + /* Display all unreclaimed memory addresses, including the + * allocation size and the first few bytes of what's located + * at that address to aid in debugging. Performance is not + * a serious concern here since it is module unload time. */ + spin_lock_irqsave(&kmem_lock, flags); + if (!list_empty(&kmem_list)) + CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", + "address", "size", "data", "func", "line"); + + list_for_each_entry(kd, &kmem_list, kd_list) { + CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", + kd->kd_addr, kd->kd_size, + sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); + } + spin_unlock_irqrestore(&kmem_lock, flags); + + if (atomic64_read(&vmem_alloc_used) != 0) + CWARN("vmem leaked %ld/%ld bytes\n", + atomic_read(&vmem_alloc_used), vmem_alloc_max); + } #endif EXIT; } diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 06a8f316b..5949283e6 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -29,13 +29,15 @@ int mutex_spin_max = 100; #ifdef DEBUG_MUTEX int mutex_stats[MUTEX_STATS_SIZE] = { 0 }; -DEFINE_MUTEX(mutex_stats_lock); +struct rw_semaphore mutex_stats_sem; LIST_HEAD(mutex_stats_list); #endif void __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) { + int flags = KM_SLEEP; + ASSERT(mp); ASSERT(name); ASSERT(ibc == NULL); @@ -58,12 +60,18 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) SBUG(); } + /* We may be called when there is a non-zero preempt_count or + * interrupts are disabled is which case we must not sleep. + */ + if (current_thread_info()->preempt_count || irqs_disabled()) + flags = KM_NOSLEEP; + /* Semaphore kmem_alloc'ed to keep struct size down (<64b) */ - mp->km_sem = kmem_alloc(sizeof(struct semaphore), KM_SLEEP); + mp->km_sem = kmem_alloc(sizeof(struct semaphore), flags); if (mp->km_sem == NULL) return; - mp->km_name = kmem_alloc(mp->km_name_size, KM_SLEEP); + mp->km_name = kmem_alloc(mp->km_name_size, flags); if (mp->km_name == NULL) { kmem_free(mp->km_sem, sizeof(struct semaphore)); return; @@ -73,16 +81,19 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) strcpy(mp->km_name, name); #ifdef DEBUG_MUTEX - mp->km_stats = kmem_zalloc(sizeof(int) * MUTEX_STATS_SIZE, KM_SLEEP); + mp->km_stats = kmem_zalloc(sizeof(int) * MUTEX_STATS_SIZE, flags); if (mp->km_stats == NULL) { kmem_free(mp->km_name, mp->km_name_size); kmem_free(mp->km_sem, sizeof(struct semaphore)); return; } - mutex_lock(&mutex_stats_lock); + /* We may be called when there is a non-zero preempt_count or + * interrupts are disabled is which case we must not sleep. + */ + while (!down_write_trylock(&mutex_stats_sem)); list_add_tail(&mp->km_list, &mutex_stats_list); - mutex_unlock(&mutex_stats_lock); + up_write(&mutex_stats_sem); #endif } EXPORT_SYMBOL(__spl_mutex_init); @@ -94,9 +105,12 @@ __spl_mutex_destroy(kmutex_t *mp) ASSERT(mp->km_magic == KM_MAGIC); #ifdef DEBUG_MUTEX - mutex_lock(&mutex_stats_lock); + /* We may be called when there is a non-zero preempt_count or + * interrupts are disabled is which case we must not sleep. + */ + while (!down_write_trylock(&mutex_stats_sem)); list_del_init(&mp->km_list); - mutex_unlock(&mutex_stats_lock); + up_write(&mutex_stats_sem); kmem_free(mp->km_stats, sizeof(int) * MUTEX_STATS_SIZE); #endif diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 64423c186..61fb38532 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -426,7 +426,7 @@ mutex_seq_start(struct seq_file *f, loff_t *pos) loff_t n = *pos; ENTRY; - mutex_lock(&mutex_stats_lock); + down_read(&mutex_stats_sem); if (!n) mutex_seq_show_headers(f); @@ -454,7 +454,7 @@ mutex_seq_next(struct seq_file *f, void *p, loff_t *pos) static void mutex_seq_stop(struct seq_file *f, void *v) { - mutex_unlock(&mutex_stats_lock); + up_read(&mutex_stats_sem); } static struct seq_operations mutex_seq_ops = { diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 525df5902..25b2dd78c 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -138,7 +138,7 @@ typedef struct splat_info { #define sym2str(sym) (char *)(#sym) #define splat_print(file, format, args...) \ -({ splat_info_t *_info_ = (splat_info_t *)file->private_data; \ +({ splat_info_t *_info_ = (splat_info_t *)file->private_data; \ int _rc_; \ \ ASSERT(_info_); \ @@ -160,7 +160,7 @@ typedef struct splat_info { _rc_; \ }) -#define splat_vprint(file, test, format, args...) \ +#define splat_vprint(file, test, format, args...) \ splat_print(file, "%*s: " format, SPLAT_NAME_SIZE, test, args) splat_subsystem_t * splat_condvar_init(void); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index f9f6964de..9491a081a 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -148,7 +148,7 @@ splat_kmem_test34_constructor(void *ptr, void *priv, int flags) kcd->kcd_flag = 1; if (kcp) { - kcd->kcd_magic = kcp->kcp_magic; + kcd->kcd_magic = kcp->kcp_magic; kcp->kcp_count++; } } @@ -258,8 +258,8 @@ splat_kmem_test4_reclaim(void *priv) int i; splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST4_NAME, - "Reaping %d objects from '%s'\n", - SPLAT_KMEM_OBJ_RECLAIM, SPLAT_KMEM_CACHE_NAME); + "Reaping %d objects from '%s'\n", + SPLAT_KMEM_OBJ_RECLAIM, SPLAT_KMEM_CACHE_NAME); for (i = 0; i < SPLAT_KMEM_OBJ_RECLAIM; i++) { if (kcp->kcp_kcd[i]) { kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); @@ -306,6 +306,7 @@ splat_kmem_test4(struct file *file, void *arg) } max = kcp.kcp_count; + ASSERT(max > 0); /* Force shrinker to run */ kmem_reap(); From e8b31e84825d14d98930f165707687fad961b88a Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 6 May 2008 23:00:49 +0000 Subject: [PATCH 0094/1062] - Updated rwlock's to reside in a .c file instead of a static inline - Updated rwlock's so they can be safely initialized in ctors. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@96 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/mutex.h | 10 +- include/sys/rwlock.h | 305 ++++----------------------------------- modules/spl/spl-rwlock.c | 287 ++++++++++++++++++++++++++++++++++++ 3 files changed, 320 insertions(+), 282 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index fd787bb9d..dc78edbbc 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -68,20 +68,12 @@ extern kthread_t *__spl_mutex_owner(kmutex_t *mp); #define mutex_init(mp, name, type, ibc) \ ({ \ - __ENTRY(S_MUTEX); \ if ((name) == NULL) \ __spl_mutex_init(mp, #mp, type, ibc); \ else \ __spl_mutex_init(mp, name, type, ibc); \ - __EXIT(S_MUTEX); \ }) -#define mutex_destroy(mp) \ -({ \ - __ENTRY(S_MUTEX); \ - __spl_mutex_destroy(mp); \ - __EXIT(S_MUTEX); \ -}) - +#define mutex_destroy(mp) __spl_mutex_destroy(mp) #define mutex_tryenter(mp) __mutex_tryenter(mp) #define mutex_enter(mp) __mutex_enter(mp) #define mutex_exit(mp) __mutex_exit(mp) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index cd6e46081..a4b6ce6d7 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -1,13 +1,14 @@ #ifndef _SPL_RWLOCK_H -#define _SPL_RWLOCK_H +#define _SPL_RWLOCK_H #include #include #include #include #include +#include -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -21,292 +22,50 @@ typedef enum { RW_READER } krw_t; -#define RW_READ_HELD(x) (__rw_read_held((x))) -#define RW_WRITE_HELD(x) (__rw_write_held((x))) -#define RW_LOCK_HELD(x) (__rw_lock_held((x))) -#define RW_ISWRITER(x) (__rw_iswriter(x)) #define RW_MAGIC 0x3423645a #define RW_POISON 0xa6 typedef struct { - int rw_magic; + int32_t rw_magic; + int32_t rw_name_size; char *rw_name; struct rw_semaphore rw_sem; struct task_struct *rw_owner; /* holder of the write lock */ } krwlock_t; -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK -struct rwsem_waiter { - struct list_head list; - struct task_struct *task; - unsigned int flags; -#define RWSEM_WAITING_FOR_READ 0x00000001 -#define RWSEM_WAITING_FOR_WRITE 0x00000002 -}; - -/* - * wake a single writer - */ -static inline struct rw_semaphore * -__rwsem_wake_one_writer_locked(struct rw_semaphore *sem) -{ - struct rwsem_waiter *waiter; - struct task_struct *tsk; - - sem->activity = -1; - - waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); - list_del(&waiter->list); - - tsk = waiter->task; - smp_mb(); - waiter->task = NULL; - wake_up_process(tsk); - put_task_struct(tsk); - return sem; -} - -/* - * release a read lock on the semaphore - */ -static void fastcall -__up_read_locked(struct rw_semaphore *sem) -{ - if (--sem->activity == 0 && !list_empty(&sem->wait_list)) - sem = __rwsem_wake_one_writer_locked(sem); -} - -/* - * trylock for writing -- returns 1 if successful, 0 if contention - */ -static int fastcall -__down_write_trylock_locked(struct rw_semaphore *sem) -{ - int ret = 0; - - if (sem->activity == 0 && list_empty(&sem->wait_list)) { - /* granted */ - sem->activity = -1; - ret = 1; - } - - return ret; -} -#endif - +extern void __rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg); +extern void __rw_destroy(krwlock_t *rwlp); +extern int __rw_tryenter(krwlock_t *rwlp, krw_t rw); +extern void __rw_enter(krwlock_t *rwlp, krw_t rw); +extern void __rw_exit(krwlock_t *rwlp); +extern void __rw_downgrade(krwlock_t *rwlp); +extern int __rw_tryupgrade(krwlock_t *rwlp); +extern kthread_t *__rw_owner(krwlock_t *rwlp); extern int __rw_read_held(krwlock_t *rwlp); extern int __rw_write_held(krwlock_t *rwlp); extern int __rw_lock_held(krwlock_t *rwlp); -static __inline__ void -rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg) -{ - ASSERT(type == RW_DEFAULT); /* XXX no irq handler use */ - ASSERT(arg == NULL); /* XXX no irq handler use */ +#define rw_init(rwlp, name, type, arg) \ +({ \ + if ((name) == NULL) \ + __rw_init(rwlp, #rwlp, type, arg); \ + else \ + __rw_init(rwlp, name, type, arg); \ +}) +#define rw_destroy(rwlp) __rw_destroy(rwlp) +#define rw_tryenter(rwlp, rw) __rw_tryenter(rwlp, rw) +#define rw_enter(rwlp, rw) __rw_enter(rwlp, rw) +#define rw_exit(rwlp) __rw_exit(rwlp) +#define rw_downgrade(rwlp) __rw_downgrade(rwlp) +#define rw_tryupgrade(rwlp) __rw_tryupgrade(rwlp) +#define rw_owner(rwlp) __rw_owner(rwlp) +#define RW_READ_HELD(rwlp) __rw_read_held(rwlp) +#define RW_WRITE_HELD(rwlp) __rw_write_held(rwlp) +#define RW_LOCK_HELD(rwlp) __rw_lock_held(rwlp) - rwlp->rw_magic = RW_MAGIC; - rwlp->rw_owner = NULL; /* no one holds the write lock yet */ - init_rwsem(&rwlp->rw_sem); - rwlp->rw_name = NULL; - - if (name) { - rwlp->rw_name = kmalloc(strlen(name) + 1, GFP_KERNEL); - if (rwlp->rw_name) - strcpy(rwlp->rw_name, name); - } -} - -static __inline__ void -rw_destroy(krwlock_t *rwlp) -{ - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - ASSERT(rwlp->rw_owner == NULL); - spin_lock(&rwlp->rw_sem.wait_lock); - ASSERT(list_empty(&rwlp->rw_sem.wait_list)); - spin_unlock(&rwlp->rw_sem.wait_lock); - - if (rwlp->rw_name) - kfree(rwlp->rw_name); - - memset(rwlp, RW_POISON, sizeof(krwlock_t)); -} - -/* Return 0 if the lock could not be obtained without blocking. - */ -static __inline__ int -rw_tryenter(krwlock_t *rwlp, krw_t rw) -{ - int result; - - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - switch (rw) { - /* these functions return 1 if success, 0 if contention */ - case RW_READER: - /* Here the Solaris code would return 0 - * if there were any write waiters. Specifically - * thinking about the case where readers may have - * the lock and we would also allow this thread - * to grab the read lock with a writer waiting in the - * queue. This doesn't seem like a correctness - * issue, so just call down_read_trylock() - * for the test. We may have to revisit this if - * it becomes an issue */ - result = down_read_trylock(&rwlp->rw_sem); - break; - case RW_WRITER: - result = down_write_trylock(&rwlp->rw_sem); - if (result) { - /* there better not be anyone else - * holding the write lock here */ - ASSERT(rwlp->rw_owner == NULL); - rwlp->rw_owner = current; - } - break; - default: - SBUG(); - } - - return result; -} - -static __inline__ void -rw_enter(krwlock_t *rwlp, krw_t rw) -{ - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - switch (rw) { - case RW_READER: - /* Here the Solaris code would block - * if there were any write waiters. Specifically - * thinking about the case where readers may have - * the lock and we would also allow this thread - * to grab the read lock with a writer waiting in the - * queue. This doesn't seem like a correctness - * issue, so just call down_read() - * for the test. We may have to revisit this if - * it becomes an issue */ - down_read(&rwlp->rw_sem); - break; - case RW_WRITER: - down_write(&rwlp->rw_sem); - - /* there better not be anyone else - * holding the write lock here */ - ASSERT(rwlp->rw_owner == NULL); - rwlp->rw_owner = current; - break; - default: - SBUG(); - } -} - -static __inline__ void -rw_exit(krwlock_t *rwlp) -{ - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - /* rw_owner is held by current - * thread iff it is a writer */ - if (rwlp->rw_owner == current) { - rwlp->rw_owner = NULL; - up_write(&rwlp->rw_sem); - } else { - up_read(&rwlp->rw_sem); - } -} - -static __inline__ void -rw_downgrade(krwlock_t *rwlp) -{ - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - ASSERT(rwlp->rw_owner == current); - - rwlp->rw_owner = NULL; - downgrade_write(&rwlp->rw_sem); -} - -/* Return 0 if unable to perform the upgrade. - * Might be wise to fix the caller - * to acquire the write lock first? - */ -static __inline__ int -rw_tryupgrade(krwlock_t *rwlp) -{ - int result = 0; - - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - spin_lock(&rwlp->rw_sem.wait_lock); - - /* Check if there is anyone waiting for the - * lock. If there is, then we know we should - * not try to upgrade the lock */ - if (!list_empty(&rwlp->rw_sem.wait_list)) { - spin_unlock(&rwlp->rw_sem.wait_lock); - return 0; - } -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - /* Note that activity is protected by - * the wait_lock. Don't try to upgrade - * if there are multiple readers currently - * holding the lock */ - if (rwlp->rw_sem.activity > 1) { -#else - /* Don't try to upgrade - * if there are multiple readers currently - * holding the lock */ - if ((rwlp->rw_sem.count & RWSEM_ACTIVE_MASK) > 1) { -#endif - spin_unlock(&rwlp->rw_sem.wait_lock); - return 0; - } - -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - /* Here it should be safe to drop the - * read lock and reacquire it for writing since - * we know there are no waiters */ - __up_read_locked(&rwlp->rw_sem); - - /* returns 1 if success, 0 if contention */ - result = __down_write_trylock_locked(&rwlp->rw_sem); -#else - /* Here it should be safe to drop the - * read lock and reacquire it for writing since - * we know there are no waiters */ - up_read(&rwlp->rw_sem); - - /* returns 1 if success, 0 if contention */ - result = down_write_trylock(&rwlp->rw_sem); -#endif - - /* Check if upgrade failed. Should not ever happen - * if we got to this point */ - ASSERT(result); - ASSERT(rwlp->rw_owner == NULL); - rwlp->rw_owner = current; - spin_unlock(&rwlp->rw_sem.wait_lock); - return 1; -} - -static __inline__ kthread_t * -rw_owner(krwlock_t *rwlp) -{ - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - return rwlp->rw_owner; -} - -#ifdef __cplusplus +#ifdef __cplusplus } #endif -#endif /* _SPL_RWLOCK_H */ +#endif /* _SPL_RWLOCK_H */ diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c index ba5b33b07..3a28f2c81 100644 --- a/modules/spl/spl-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -6,10 +6,295 @@ #define DEBUG_SUBSYSTEM S_RWLOCK +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK +struct rwsem_waiter { + struct list_head list; + struct task_struct *task; + unsigned int flags; +#define RWSEM_WAITING_FOR_READ 0x00000001 +#define RWSEM_WAITING_FOR_WRITE 0x00000002 +}; +/* wake a single writer */ +static struct rw_semaphore * +__rwsem_wake_one_writer_locked(struct rw_semaphore *sem) +{ + struct rwsem_waiter *waiter; + struct task_struct *tsk; + + sem->activity = -1; + + waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); + list_del(&waiter->list); + + tsk = waiter->task; + smp_mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); + return sem; +} + +/* release a read lock on the semaphore */ +static void +__up_read_locked(struct rw_semaphore *sem) +{ + if (--sem->activity == 0 && !list_empty(&sem->wait_list)) + sem = __rwsem_wake_one_writer_locked(sem); +} + +/* trylock for writing -- returns 1 if successful, 0 if contention */ +static int +__down_write_trylock_locked(struct rw_semaphore *sem) +{ + int ret = 0; + + if (sem->activity == 0 && list_empty(&sem->wait_list)) { + /* granted */ + sem->activity = -1; + ret = 1; + } + + return ret; +} +#endif + +void +__rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg) +{ + int flags = KM_SLEEP; + + ASSERT(rwlp); + ASSERT(name); + ASSERT(type == RW_DEFAULT); /* XXX no irq handler use */ + ASSERT(arg == NULL); /* XXX no irq handler use */ + + rwlp->rw_magic = RW_MAGIC; + rwlp->rw_owner = NULL; + rwlp->rw_name = NULL; + rwlp->rw_name_size = strlen(name) + 1; + + /* We may be called when there is a non-zero preempt_count or + * interrupts are disabled is which case we must not sleep. + */ + if (current_thread_info()->preempt_count || irqs_disabled()) + flags = KM_NOSLEEP; + + rwlp->rw_name = kmem_alloc(rwlp->rw_name_size, flags); + if (rwlp->rw_name == NULL) + return; + + init_rwsem(&rwlp->rw_sem); + strcpy(rwlp->rw_name, name); +} +EXPORT_SYMBOL(__rw_init); + +void +__rw_destroy(krwlock_t *rwlp) +{ + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + ASSERT(rwlp->rw_owner == NULL); + spin_lock(&rwlp->rw_sem.wait_lock); + ASSERT(list_empty(&rwlp->rw_sem.wait_list)); + spin_unlock(&rwlp->rw_sem.wait_lock); + + kmem_free(rwlp->rw_name, rwlp->rw_name_size); + + memset(rwlp, RW_POISON, sizeof(krwlock_t)); +} +EXPORT_SYMBOL(__rw_destroy); + +/* Return 0 if the lock could not be obtained without blocking. */ +int +__rw_tryenter(krwlock_t *rwlp, krw_t rw) +{ + int rc = 0; + ENTRY; + + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + + switch (rw) { + /* these functions return 1 if success, 0 if contention */ + case RW_READER: + /* Here the Solaris code would return 0 + * if there were any write waiters. Specifically + * thinking about the case where readers may have + * the lock and we would also allow this thread + * to grab the read lock with a writer waiting in the + * queue. This doesn't seem like a correctness + * issue, so just call down_read_trylock() + * for the test. We may have to revisit this if + * it becomes an issue */ + rc = down_read_trylock(&rwlp->rw_sem); + break; + case RW_WRITER: + rc = down_write_trylock(&rwlp->rw_sem); + if (rc) { + /* there better not be anyone else + * holding the write lock here */ + ASSERT(rwlp->rw_owner == NULL); + rwlp->rw_owner = current; + } + break; + default: + SBUG(); + } + + RETURN(rc); +} +EXPORT_SYMBOL(__rw_tryenter); + +void +__rw_enter(krwlock_t *rwlp, krw_t rw) +{ + ENTRY; + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + + switch (rw) { + case RW_READER: + /* Here the Solaris code would block + * if there were any write waiters. Specifically + * thinking about the case where readers may have + * the lock and we would also allow this thread + * to grab the read lock with a writer waiting in the + * queue. This doesn't seem like a correctness + * issue, so just call down_read() + * for the test. We may have to revisit this if + * it becomes an issue */ + down_read(&rwlp->rw_sem); + break; + case RW_WRITER: + down_write(&rwlp->rw_sem); + + /* there better not be anyone else + * holding the write lock here */ + ASSERT(rwlp->rw_owner == NULL); + rwlp->rw_owner = current; + break; + default: + SBUG(); + } + EXIT; +} +EXPORT_SYMBOL(__rw_enter); + +void +__rw_exit(krwlock_t *rwlp) +{ + ENTRY; + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + + /* rw_owner is held by current + * thread iff it is a writer */ + if (rwlp->rw_owner == current) { + rwlp->rw_owner = NULL; + up_write(&rwlp->rw_sem); + } else { + up_read(&rwlp->rw_sem); + } + EXIT; +} +EXPORT_SYMBOL(__rw_exit); + +void +__rw_downgrade(krwlock_t *rwlp) +{ + ENTRY; + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + ASSERT(rwlp->rw_owner == current); + + rwlp->rw_owner = NULL; + downgrade_write(&rwlp->rw_sem); + EXIT; +} +EXPORT_SYMBOL(__rw_downgrade); + +/* Return 0 if unable to perform the upgrade. + * Might be wise to fix the caller + * to acquire the write lock first? + */ +int +__rw_tryupgrade(krwlock_t *rwlp) +{ + int rc = 0; + ENTRY; + + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + + spin_lock(&rwlp->rw_sem.wait_lock); + + /* Check if there is anyone waiting for the + * lock. If there is, then we know we should + * not try to upgrade the lock */ + if (!list_empty(&rwlp->rw_sem.wait_list)) { + spin_unlock(&rwlp->rw_sem.wait_lock); + RETURN(0); + } +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + /* Note that activity is protected by + * the wait_lock. Don't try to upgrade + * if there are multiple readers currently + * holding the lock */ + if (rwlp->rw_sem.activity > 1) { +#else + /* Don't try to upgrade + * if there are multiple readers currently + * holding the lock */ + if ((rwlp->rw_sem.count & RWSEM_ACTIVE_MASK) > 1) { +#endif + spin_unlock(&rwlp->rw_sem.wait_lock); + RETURN(0); + } + +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + /* Here it should be safe to drop the + * read lock and reacquire it for writing since + * we know there are no waiters */ + __up_read_locked(&rwlp->rw_sem); + + /* returns 1 if success, 0 if contention */ + rc = __down_write_trylock_locked(&rwlp->rw_sem); +#else + /* Here it should be safe to drop the + * read lock and reacquire it for writing since + * we know there are no waiters */ + up_read(&rwlp->rw_sem); + + /* returns 1 if success, 0 if contention */ + rc = down_write_trylock(&rwlp->rw_sem); +#endif + + /* Check if upgrade failed. Should not ever happen + * if we got to this point */ + ASSERT(rc); + ASSERT(rwlp->rw_owner == NULL); + rwlp->rw_owner = current; + spin_unlock(&rwlp->rw_sem.wait_lock); + + RETURN(1); +} +EXPORT_SYMBOL(__rw_tryupgrade); + +kthread_t * +__rw_owner(krwlock_t *rwlp) +{ + ENTRY; + ASSERT(rwlp); + ASSERT(rwlp->rw_magic == RW_MAGIC); + RETURN(rwlp->rw_owner); +} +EXPORT_SYMBOL(__rw_owner); + int __rw_read_held(krwlock_t *rwlp) { ENTRY; + ASSERT(rwlp); ASSERT(rwlp->rw_magic == RW_MAGIC); RETURN(__rw_lock_held(rwlp) && rwlp->rw_owner == NULL); } @@ -19,6 +304,7 @@ int __rw_write_held(krwlock_t *rwlp) { ENTRY; + ASSERT(rwlp); ASSERT(rwlp->rw_magic == RW_MAGIC); RETURN(rwlp->rw_owner == current); } @@ -30,6 +316,7 @@ __rw_lock_held(krwlock_t *rwlp) int rc = 0; ENTRY; + ASSERT(rwlp); ASSERT(rwlp->rw_magic == RW_MAGIC); spin_lock_irq(&(rwlp->rw_sem.wait_lock)); From 4f86a887d88ef2d28fb14a020f91e0cd8757ed21 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 6 May 2008 23:19:27 +0000 Subject: [PATCH 0095/1062] Remaining issues fixed after reenabled mutex debugging. - Ensure the mutex_stats_sem and mutex_stats_list are initialized - Only spin if you have to in mutex_init git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@97 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/mutex.h | 5 ++--- modules/spl/spl-mutex.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index dc78edbbc..23c23409b 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -10,8 +10,7 @@ extern "C" { #include #include -//#define DEBUG_MUTEX -#undef DEBUG_MUTEX +#define DEBUG_MUTEX #define MUTEX_DEFAULT 0 #define MUTEX_SPIN 1 @@ -45,7 +44,7 @@ extern int mutex_spin_max; #ifdef DEBUG_MUTEX extern int mutex_stats[MUTEX_STATS_SIZE]; -extern struct mutex mutex_stats_lock; +extern struct rw_semaphore mutex_stats_sem; extern struct list_head mutex_stats_list; #define MUTEX_STAT_INC(stats, stat) ((stats)[stat]++) #else diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 5949283e6..c6d83eb21 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -30,7 +30,7 @@ int mutex_spin_max = 100; #ifdef DEBUG_MUTEX int mutex_stats[MUTEX_STATS_SIZE] = { 0 }; struct rw_semaphore mutex_stats_sem; -LIST_HEAD(mutex_stats_list); +struct list_head mutex_stats_list; #endif void @@ -91,8 +91,13 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) /* We may be called when there is a non-zero preempt_count or * interrupts are disabled is which case we must not sleep. */ - while (!down_write_trylock(&mutex_stats_sem)); + if (flags == KM_SLEEP) + down_write(&mutex_stats_sem); + else + while (!down_write_trylock(&mutex_stats_sem)); + list_add_tail(&mp->km_list, &mutex_stats_list); + up_write(&mutex_stats_sem); #endif } @@ -255,6 +260,10 @@ int spl_mutex_init(void) { ENTRY; +#ifdef DEBUG_MUTEX + init_rwsem(&mutex_stats_sem); + INIT_LIST_HEAD(&mutex_stats_list); +#endif RETURN(0); } From 404992e31ab16e5d128f73c6d716952a4eda463f Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 7 May 2008 17:58:22 +0000 Subject: [PATCH 0096/1062] - Relocate 'stats_per' in to proper /proc/sys/spl/mutex/ directory - Shift to spinlock for mutex list addition and removal git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@98 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/mutex.h | 2 +- modules/spl/spl-mutex.c | 23 ++++--------- modules/spl/spl-proc.c | 76 ++++++++++++++++++++++++++++++++--------- 3 files changed, 67 insertions(+), 34 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 23c23409b..58d1bf629 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -44,7 +44,7 @@ extern int mutex_spin_max; #ifdef DEBUG_MUTEX extern int mutex_stats[MUTEX_STATS_SIZE]; -extern struct rw_semaphore mutex_stats_sem; +extern spinlock_t mutex_stats_lock; extern struct list_head mutex_stats_list; #define MUTEX_STAT_INC(stats, stat) ((stats)[stat]++) #else diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index c6d83eb21..1eabda610 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -29,7 +29,7 @@ int mutex_spin_max = 100; #ifdef DEBUG_MUTEX int mutex_stats[MUTEX_STATS_SIZE] = { 0 }; -struct rw_semaphore mutex_stats_sem; +spinlock_t mutex_stats_lock; struct list_head mutex_stats_list; #endif @@ -88,17 +88,9 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) return; } - /* We may be called when there is a non-zero preempt_count or - * interrupts are disabled is which case we must not sleep. - */ - if (flags == KM_SLEEP) - down_write(&mutex_stats_sem); - else - while (!down_write_trylock(&mutex_stats_sem)); - + spin_lock(&mutex_stats_lock); list_add_tail(&mp->km_list, &mutex_stats_list); - - up_write(&mutex_stats_sem); + spin_unlock(&mutex_stats_lock); #endif } EXPORT_SYMBOL(__spl_mutex_init); @@ -110,12 +102,9 @@ __spl_mutex_destroy(kmutex_t *mp) ASSERT(mp->km_magic == KM_MAGIC); #ifdef DEBUG_MUTEX - /* We may be called when there is a non-zero preempt_count or - * interrupts are disabled is which case we must not sleep. - */ - while (!down_write_trylock(&mutex_stats_sem)); + spin_lock(&mutex_stats_lock); list_del_init(&mp->km_list); - up_write(&mutex_stats_sem); + spin_unlock(&mutex_stats_lock); kmem_free(mp->km_stats, sizeof(int) * MUTEX_STATS_SIZE); #endif @@ -261,7 +250,7 @@ spl_mutex_init(void) { ENTRY; #ifdef DEBUG_MUTEX - init_rwsem(&mutex_stats_sem); + spin_lock_init(&mutex_stats_lock); INIT_LIST_HEAD(&mutex_stats_list); #endif RETURN(0); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 61fb38532..1b9787a79 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -16,9 +16,20 @@ #define DEBUG_SUBSYSTEM S_PROC -static struct ctl_table_header *spl_header = NULL; +#ifdef DEBUG_KMEM static unsigned long table_min = 0; static unsigned long table_max = ~0; +#endif + +#ifdef CONFIG_SYSCTL +static struct ctl_table_header *spl_header = NULL; +static struct proc_dir_entry *proc_sys = NULL; +static struct proc_dir_entry *proc_sys_spl = NULL; +#ifdef DEBUG_MUTEX +static struct proc_dir_entry *proc_sys_spl_mutex = NULL; +static struct proc_dir_entry *proc_sys_spl_mutex_stats = NULL; +#endif +#endif #define CTL_SPL 0x87 #define CTL_SPL_DEBUG 0x88 @@ -426,7 +437,7 @@ mutex_seq_start(struct seq_file *f, loff_t *pos) loff_t n = *pos; ENTRY; - down_read(&mutex_stats_sem); + spin_lock(&mutex_stats_lock); if (!n) mutex_seq_show_headers(f); @@ -454,7 +465,7 @@ mutex_seq_next(struct seq_file *f, void *p, loff_t *pos) static void mutex_seq_stop(struct seq_file *f, void *v) { - up_read(&mutex_stats_sem); + spin_unlock(&mutex_stats_lock); } static struct seq_operations mutex_seq_ops = { @@ -719,9 +730,31 @@ static struct ctl_table spl_dir[] = { {0} }; +static int +proc_dir_entry_match(int len, const char *name, struct proc_dir_entry *de) +{ + if (de->namelen != len) + return 0; + + return !memcmp(name, de->name, len); +} + +static struct proc_dir_entry * +proc_dir_entry_find(struct proc_dir_entry *root, const char *str) +{ + struct proc_dir_entry *de; + + for (de = root->subdir; de; de = de->next) + if (proc_dir_entry_match(strlen(str), str, de)) + return de; + + return NULL; +} + int proc_init(void) { + int rc = 0; ENTRY; #ifdef CONFIG_SYSCTL @@ -729,20 +762,31 @@ proc_init(void) if (spl_header == NULL) RETURN(-EUNATCH); + proc_sys = proc_dir_entry_find(&proc_root, "sys"); + if (proc_sys == NULL) + GOTO(out, rc = -EUNATCH); + + proc_sys_spl = proc_dir_entry_find(proc_sys, "spl"); + if (proc_sys_spl == NULL) + GOTO(out, rc = -EUNATCH); + #ifdef DEBUG_MUTEX - { - struct proc_dir_entry *entry = create_proc_entry("mutex_stats", - 0444, NULL); - if (entry) { - entry->proc_fops = &proc_mutex_operations; - } else { - unregister_sysctl_table(spl_header); - RETURN(-EUNATCH); - } - } + proc_sys_spl_mutex = proc_dir_entry_find(proc_sys_spl, "mutex"); + if (proc_sys_spl_mutex == NULL) + GOTO(out, rc = -EUNATCH); + + proc_sys_spl_mutex_stats = create_proc_entry("stats_per", 0444, + proc_sys_spl_mutex); + if (proc_sys_spl_mutex_stats == NULL) + GOTO(out, rc = -EUNATCH); + + proc_sys_spl_mutex_stats->proc_fops = &proc_mutex_operations; #endif /* DEBUG_MUTEX */ -#endif - RETURN(0); + RETURN(rc); +out: + unregister_sysctl_table(spl_header); +#endif /* CONFIG_SYSCTL */ + RETURN(rc); } void @@ -752,7 +796,7 @@ proc_fini(void) #ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); - remove_proc_entry("mutex_stats", NULL); + remove_proc_entry("stats_per", proc_sys_spl_mutex); unregister_sysctl_table(spl_header); #endif EXIT; From 13cdca65ec6882df57ec06f8f9be14b2b3668a5d Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 7 May 2008 18:54:32 +0000 Subject: [PATCH 0097/1062] Add vmem memory accounting git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@99 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 95 ++++++++++++++++++++++++++++++------------ modules/spl/spl-kmem.c | 41 ++++++++++++++---- 2 files changed, 103 insertions(+), 33 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 098f16bd0..98470e867 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -41,6 +41,13 @@ extern struct hlist_head kmem_table[KMEM_TABLE_SIZE]; extern struct list_head kmem_list; extern spinlock_t kmem_lock; +#define VMEM_HASH_BITS 10 +#define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) + +extern struct hlist_head vmem_table[VMEM_TABLE_SIZE]; +extern struct list_head vmem_list; +extern spinlock_t vmem_lock; + typedef struct kmem_debug { struct hlist_node kd_hlist; /* Hash node linkage */ struct list_head kd_list; /* List of all allocations */ @@ -51,25 +58,25 @@ typedef struct kmem_debug { } kmem_debug_t; static __inline__ kmem_debug_t * -__kmem_del_init(void *addr) +__kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) { struct hlist_head *head; struct hlist_node *node; struct kmem_debug *p; unsigned long flags; - spin_lock_irqsave(&kmem_lock, flags); - head = &kmem_table[hash_ptr(addr, KMEM_HASH_BITS)]; + spin_lock_irqsave(lock, flags); + head = &table[hash_ptr(addr, bits)]; hlist_for_each_entry_rcu(p, node, head, kd_hlist) { if (p->kd_addr == addr) { hlist_del_init(&p->kd_hlist); list_del_init(&p->kd_list); - spin_unlock_irqrestore(&kmem_lock, flags); + spin_unlock_irqrestore(lock, flags); return p; } } - spin_unlock_irqrestore(&kmem_lock, flags); + spin_unlock_irqrestore(lock, flags); return NULL; } @@ -138,7 +145,7 @@ __kmem_del_init(void *addr) kmem_debug_t *_dptr_; \ ASSERT((ptr) || (size > 0)); \ \ - _dptr_ = __kmem_del_init(ptr); \ + _dptr_ = __kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr);\ ASSERT(_dptr_); /* Must exist in hash due to kmem_alloc() */ \ ASSERTF(_dptr_->kd_size == (size), "kd_size (%d) != size (%d), " \ "kd_func = %s, kd_line = %d\n", _dptr_->kd_size, (size), \ @@ -156,31 +163,56 @@ __kmem_del_init(void *addr) }) #define __vmem_alloc(size, flags) \ -({ void *_ptr_; \ +({ void *_ptr_ = NULL; \ + kmem_debug_t *_dptr_; \ + unsigned long _flags_; \ \ - ASSERT(flags & KM_SLEEP); \ + ASSERT((flags) & KM_SLEEP); \ \ - _ptr_ = (void *)__vmalloc((size), \ - (((flags) | __GFP_HIGHMEM) & ~__GFP_ZERO), \ - PAGE_KERNEL); \ - if (_ptr_ == NULL) { \ + _dptr_ = (kmem_debug_t *)kmalloc(sizeof(kmem_debug_t), (flags)); \ + if (_dptr_ == NULL) { \ __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "vmem_alloc(%d, 0x%x) failed (%ld/%ld)\n", \ - (int)(size), (int)(flags), \ - atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ + "vmem_alloc(%d, 0x%x) debug failed\n", \ + sizeof(kmem_debug_t), (int)(flags)); \ } else { \ - if (flags & __GFP_ZERO) \ - memset(_ptr_, 0, (size)); \ + _ptr_ = (void *)__vmalloc((size), (((flags) | \ + __GFP_HIGHMEM) & ~__GFP_ZERO), \ + PAGE_KERNEL); \ + if (_ptr_ == NULL) { \ + kfree(_dptr_); \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ + "vmem_alloc(%d, 0x%x) failed (%ld/" \ + "%ld)\n", (int)(size), (int)(flags), \ + atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ + } else { \ + if (flags & __GFP_ZERO) \ + memset(_ptr_, 0, (size)); \ \ - atomic64_add((size), &vmem_alloc_used); \ - if (unlikely(atomic64_read(&vmem_alloc_used)>vmem_alloc_max)) \ - vmem_alloc_max = atomic64_read(&vmem_alloc_used); \ + atomic64_add((size), &vmem_alloc_used); \ + if (unlikely(atomic64_read(&vmem_alloc_used) > \ + vmem_alloc_max)) \ + vmem_alloc_max = \ + atomic64_read(&vmem_alloc_used); \ + \ + INIT_HLIST_NODE(&_dptr_->kd_hlist); \ + INIT_LIST_HEAD(&_dptr_->kd_list); \ + _dptr_->kd_addr = _ptr_; \ + _dptr_->kd_size = (size); \ + _dptr_->kd_func = __FUNCTION__; \ + _dptr_->kd_line = __LINE__; \ + spin_lock_irqsave(&vmem_lock, _flags_); \ + hlist_add_head_rcu(&_dptr_->kd_hlist, \ + &vmem_table[hash_ptr(_ptr_, VMEM_HASH_BITS)]);\ + list_add_tail(&_dptr_->kd_list, &vmem_list); \ + spin_unlock_irqrestore(&vmem_lock, _flags_); \ \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(%d, 0x%x) = %p " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - _ptr_, atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(" \ + "%d, 0x%x) = %p (%ld/%ld)\n", \ + (int)(size), (int)(flags), _ptr_, \ + atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ + } \ } \ \ _ptr_; \ @@ -192,12 +224,23 @@ __kmem_del_init(void *addr) #define vmem_free(ptr, size) \ ({ \ + kmem_debug_t *_dptr_; \ ASSERT((ptr) || (size > 0)); \ + \ + _dptr_ = __kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr);\ + ASSERT(_dptr_); /* Must exist in hash due to vmem_alloc() */ \ + ASSERTF(_dptr_->kd_size == (size), "kd_size (%d) != size (%d), " \ + "kd_func = %s, kd_line = %d\n", _dptr_->kd_size, (size), \ + _dptr_->kd_func, _dptr_->kd_line); /* Size must match */ \ atomic64_sub((size), &vmem_alloc_used); \ __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%p, %d) (%ld/%ld)\n", \ (ptr), (int)(size), atomic64_read(&vmem_alloc_used), \ vmem_alloc_max); \ - memset(ptr, 0x5a, (size)); /* Poison */ \ + \ + memset(_dptr_, 0x5a, sizeof(kmem_debug_t)); \ + kfree(_dptr_); \ + \ + memset(ptr, 0x5a, (size)); \ vfree(ptr); \ }) diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 7384a79f2..75a421ac7 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -21,6 +21,10 @@ spinlock_t kmem_lock; struct hlist_head kmem_table[KMEM_TABLE_SIZE]; struct list_head kmem_list; +spinlock_t vmem_lock; +struct hlist_head vmem_table[VMEM_TABLE_SIZE]; +struct list_head vmem_list; + EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); EXPORT_SYMBOL(vmem_alloc_used); @@ -31,6 +35,10 @@ EXPORT_SYMBOL(kmem_lock); EXPORT_SYMBOL(kmem_table); EXPORT_SYMBOL(kmem_list); +EXPORT_SYMBOL(vmem_lock); +EXPORT_SYMBOL(vmem_table); +EXPORT_SYMBOL(vmem_list); + int kmem_set_warning(int flag) { return (kmem_warning_flag = !!flag); } #else int kmem_set_warning(int flag) { return 0; } @@ -381,6 +389,12 @@ kmem_init(void) for (i = 0; i < KMEM_TABLE_SIZE; i++) INIT_HLIST_HEAD(&kmem_table[i]); + + spin_lock_init(&vmem_lock); + INIT_LIST_HEAD(&vmem_list); + + for (i = 0; i < VMEM_TABLE_SIZE; i++) + INIT_HLIST_HEAD(&vmem_table[i]); } #endif RETURN(0); @@ -437,30 +451,43 @@ kmem_fini(void) kmem_debug_t *kd; char str[17]; - if (atomic64_read(&kmem_alloc_used) != 0) - CWARN("kmem leaked %ld/%ld bytes\n", - atomic_read(&kmem_alloc_used), kmem_alloc_max); - /* Display all unreclaimed memory addresses, including the * allocation size and the first few bytes of what's located * at that address to aid in debugging. Performance is not * a serious concern here since it is module unload time. */ + if (atomic64_read(&kmem_alloc_used) != 0) + CWARN("kmem leaked %ld/%ld bytes\n", + atomic_read(&kmem_alloc_used), kmem_alloc_max); + spin_lock_irqsave(&kmem_lock, flags); if (!list_empty(&kmem_list)) CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", "address", "size", "data", "func", "line"); - list_for_each_entry(kd, &kmem_list, kd_list) { + list_for_each_entry(kd, &kmem_list, kd_list) CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", - kd->kd_addr, kd->kd_size, + kd->kd_addr, kd->kd_size, sprintf_addr(kd, str, 17, 8), kd->kd_func, kd->kd_line); - } + spin_unlock_irqrestore(&kmem_lock, flags); if (atomic64_read(&vmem_alloc_used) != 0) CWARN("vmem leaked %ld/%ld bytes\n", atomic_read(&vmem_alloc_used), vmem_alloc_max); + + spin_lock_irqsave(&vmem_lock, flags); + if (!list_empty(&vmem_list)) + CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", + "address", "size", "data", "func", "line"); + + list_for_each_entry(kd, &vmem_list, kd_list) + CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", + kd->kd_addr, kd->kd_size, + sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); + + spin_unlock_irqrestore(&vmem_lock, flags); } #endif EXIT; From 427a782d7dde286857044515efa99d465ccf2516 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 7 May 2008 19:33:01 +0000 Subject: [PATCH 0098/1062] Decrease of kmem warnign threshold back to 2 pages, no worse than a stack. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@100 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 98470e867..d67e4f2a2 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -91,8 +91,9 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) "kmem_alloc(%d, 0x%x) debug failed\n", \ sizeof(kmem_debug_t), (int)(flags)); \ } else { \ - /* Marked unlikely because we should never be doing this */ \ - if (unlikely((size) > (PAGE_SIZE * 4)) && kmem_warning_flag) \ + /* Marked unlikely because we should never be doing this, */ \ + /* we tolerate to up 2 pages but a single page is best. */ \ + if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning large " \ "kmem_alloc(%d, 0x%x) (%ld/%ld)\n", \ (int)(size), (int)(flags), \ From d4c540de38a669851ccfde7a2d094621757c5995 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 7 May 2008 20:12:44 +0000 Subject: [PATCH 0099/1062] Same deal as ZFS, we're quite stable now so tag it. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@101 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- configure.ac | 2 +- scripts/spl.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index be8271b6b..b47ad7af5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.2.1) +AM_INIT_AUTOMAKE(spl, 0.2.2) AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL diff --git a/scripts/spl.spec b/scripts/spl.spec index f4f1f8a8b..31ea18fc6 100644 --- a/scripts/spl.spec +++ b/scripts/spl.spec @@ -1,6 +1,6 @@ # spl %define name spl -%define version 0.2.1 +%define version 0.2.2 Summary: Solaris Porting Layer Name: %{name} From 04a479f7066ccdaa23a6546955303b172f4a6909 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 8 May 2008 23:21:47 +0000 Subject: [PATCH 0100/1062] Add an almost feature complete implemenation of kstat. I chose not to support a few flags (we assert if they are used), and I did not add the libkstat interface and instead exported everything to proc for easy access. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@103 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kstat.h | 209 +++++++++-------- include/sys/proc.h | 17 ++ modules/spl/Makefile.in | 1 + modules/spl/spl-generic.c | 9 +- modules/spl/spl-kstat.c | 470 ++++++++++++++++++++++++++++++++++++++ modules/spl/spl-proc.c | 64 ++++-- 6 files changed, 662 insertions(+), 108 deletions(-) create mode 100644 modules/spl/spl-kstat.c diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 0b79a41c0..1ce084729 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -5,130 +5,151 @@ extern "C" { #endif +#define DEBUG_KSTAT + #include #include #include +#include +#include -/* XXX - The minimum functionality here is stubbed out but nothing works. */ +#define KSTAT_STRLEN 31 -#define KSTAT_STRLEN 31 /* 30 chars + NULL; must be 16 * n - 1 */ - -#define KSTAT_TYPE_RAW 0 /* can be anything */ - /* ks_ndata >= 1 */ -#define KSTAT_TYPE_NAMED 1 /* name/value pair */ - /* ks_ndata >= 1 */ -#define KSTAT_TYPE_INTR 2 /* interrupt statistics */ - /* ks_ndata == 1 */ -#define KSTAT_TYPE_IO 3 /* I/O statistics */ - /* ks_ndata == 1 */ -#define KSTAT_TYPE_TIMER 4 /* event timer */ - /* ks_ndata >= 1 */ +/* For reference valid classes are: + * disk, tape, net, controller, vm, kvm, hat, streams, kstat, misc + */ +#define KSTAT_TYPE_RAW 0 /* can be anything; ks_ndata >= 1 */ +#define KSTAT_TYPE_NAMED 1 /* name/value pair; ks_ndata >= 1 */ +#define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */ +#define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */ +#define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */ #define KSTAT_NUM_TYPES 5 - #define KSTAT_DATA_CHAR 0 #define KSTAT_DATA_INT32 1 #define KSTAT_DATA_UINT32 2 #define KSTAT_DATA_INT64 3 #define KSTAT_DATA_UINT64 4 +#define KSTAT_DATA_LONG 5 +#define KSTAT_DATA_ULONG 6 +#define KSTAT_DATA_STRING 7 +#define KSTAT_NUM_DATAS 8 + +#define KSTAT_INTR_HARD 0 +#define KSTAT_INTR_SOFT 1 +#define KSTAT_INTR_WATCHDOG 2 +#define KSTAT_INTR_SPURIOUS 3 +#define KSTAT_INTR_MULTSVC 4 +#define KSTAT_NUM_INTRS 5 + +#define KSTAT_FLAG_VIRTUAL 0x01 +#define KSTAT_FLAG_VAR_SIZE 0x02 +#define KSTAT_FLAG_WRITABLE 0x04 +#define KSTAT_FLAG_PERSISTENT 0x08 +#define KSTAT_FLAG_DORMANT 0x10 +#define KSTAT_FLAG_UNSUPPORTED (KSTAT_FLAG_VAR_SIZE | KSTAT_FLAG_WRITABLE | \ + KSTAT_FLAG_PERSISTENT | KSTAT_FLAG_DORMANT) -#define KSTAT_FLAG_VIRTUAL 0x01 -#define KSTAT_FLAG_VAR_SIZE 0x02 -#define KSTAT_FLAG_WRITABLE 0x04 -#define KSTAT_FLAG_PERSISTENT 0x08 -#define KSTAT_FLAG_DORMANT 0x10 -#define KSTAT_FLAG_INVALID 0x2 +#define KS_MAGIC 0x9d9d9d9d - -typedef int kid_t; /* unique kstat id */ +typedef int kid_t; /* unique kstat id */ typedef struct kstat_s { - /* - * Fields relevant to both kernel and user - */ - hrtime_t ks_crtime; /* creation time (from gethrtime()) */ - struct kstat_s *ks_next; /* kstat chain linkage */ - kid_t ks_kid; /* unique kstat ID */ - char ks_module[KSTAT_STRLEN]; /* provider module name */ - uchar_t ks_resv; /* reserved, currently just padding */ - int ks_instance; /* provider module's instance */ - char ks_name[KSTAT_STRLEN]; /* kstat name */ - uchar_t ks_type; /* kstat data type */ - char ks_class[KSTAT_STRLEN]; /* kstat class */ - uchar_t ks_flags; /* kstat flags */ - void *ks_data; /* kstat type-specific data */ - uint_t ks_ndata; /* # of type-specific data records */ - size_t ks_data_size; /* total size of kstat data section */ - hrtime_t ks_snaptime; /* time of last data shapshot */ - /* - * Fields relevant to kernel only - */ - int (*ks_update)(struct kstat *, int); /* dynamic update */ - void *ks_private; /* arbitrary provider-private data */ - int (*ks_snapshot)(struct kstat *, void *, int); - void *ks_lock; /* protects this kstat's data */ + int ks_magic; /* magic value */ + kid_t ks_kid; /* unique kstat ID */ + hrtime_t ks_crtime; /* creation time */ + hrtime_t ks_snaptime; /* last access time */ + char ks_module[KSTAT_STRLEN+1]; /* provider module name */ + int ks_instance; /* provider module instance */ + char ks_name[KSTAT_STRLEN+1]; /* kstat name */ + char ks_class[KSTAT_STRLEN+1]; /* kstat class */ + uchar_t ks_type; /* kstat data type */ + uchar_t ks_flags; /* kstat flags */ + void *ks_data; /* kstat type-specific data */ + uint_t ks_ndata; /* # of type-specific data records */ + size_t ks_data_size; /* size of kstat data section */ + struct proc_dir_entry *ks_proc; /* proc linkage */ + spinlock_t ks_lock; /* kstat data lock */ + struct list_head ks_list; /* kstat linkage */ } kstat_t; typedef struct kstat_named_s { - char name[KSTAT_STRLEN]; /* name of counter */ - uchar_t data_type; /* data type */ + char name[KSTAT_STRLEN]; /* name of counter */ + uchar_t data_type; /* data type */ union { - char c[16]; /* enough for 128-bit ints */ - int32_t i32; - uint32_t ui32; + char c[16]; /* 128-bit int */ + int32_t i32; /* 32-bit signed int */ + uint32_t ui32; /* 32-bit unsigned int */ + int64_t i64; /* 64-bit signed int */ + uint64_t ui64; /* 64-bit unsigned int */ + long l; /* native signed long */ + ulong_t ul; /* native unsigned long */ struct { union { - char *ptr; /* NULL-term string */ - char __pad[8]; /* 64-bit padding */ + char *ptr; /* NULL-term string */ + char __pad[8]; /* 64-bit padding */ } addr; - uint32_t len; /* # bytes for strlen + '\0' */ - } str; -/* - * The int64_t and uint64_t types are not valid for a maximally conformant - * 32-bit compilation environment (cc -Xc) using compilers prior to the - * introduction of C99 conforming compiler (reference ISO/IEC 9899:1990). - * In these cases, the visibility of i64 and ui64 is only permitted for - * 64-bit compilation environments or 32-bit non-maximally conformant - * C89 or C90 ANSI C compilation environments (cc -Xt and cc -Xa). In the - * C99 ANSI C compilation environment, the long long type is supported. - * The _INT64_TYPE is defined by the implementation (see sys/int_types.h). - */ - int64_t i64; - uint64_t ui64; - long l; - ulong_t ul; - - /* These structure members are obsolete */ - - longlong_t ll; - u_longlong_t ull; - float f; - double d; - } value; /* value of counter */ + uint32_t len; /* # bytes for strlen + '\0' */ + } string; + } value; } kstat_named_t; +#define KSTAT_NAMED_STR_PTR(knptr) ((knptr)->value.string.addr.ptr) +#define KSTAT_NAMED_STR_BUFLEN(knptr) ((knptr)->value.string.len) -static __inline__ kstat_t * -kstat_create(const char *ks_module, int ks_instance, const char *ks_name, - const char *ks_class, uchar_t ks_type, uint_t ks_ndata, - uchar_t ks_flags) -{ - return NULL; -} +typedef struct kstat_intr { + uint_t intrs[KSTAT_NUM_INTRS]; +} kstat_intr_t; -static __inline__ void -kstat_install(kstat_t *ksp) -{ - return; -} +typedef struct kstat_io { + u_longlong_t nread; /* number of bytes read */ + u_longlong_t nwritten; /* number of bytes written */ + uint_t reads; /* number of read operations */ + uint_t writes; /* number of write operations */ + hrtime_t wtime; /* cumulative wait (pre-service) time */ + hrtime_t wlentime; /* cumulative wait length*time product*/ + hrtime_t wlastupdate; /* last time wait queue changed */ + hrtime_t rtime; /* cumulative run (service) time */ + hrtime_t rlentime; /* cumulative run length*time product */ + hrtime_t rlastupdate; /* last time run queue changed */ + uint_t wcnt; /* count of elements in wait state */ + uint_t rcnt; /* count of elements in run state */ +} kstat_io_t; -static __inline__ void -kstat_delete(kstat_t *ksp) -{ - return; -} +typedef struct kstat_timer { + char name[KSTAT_STRLEN+1]; /* event name */ + u_longlong_t num_events; /* number of events */ + hrtime_t elapsed_time; /* cumulative elapsed time */ + hrtime_t min_time; /* shortest event duration */ + hrtime_t max_time; /* longest event duration */ + hrtime_t start_time; /* previous event start time */ + hrtime_t stop_time; /* previous event stop time */ +} kstat_timer_t; + +int kstat_init(void); +void kstat_fini(void); + +#ifdef DEBUG_KSTAT +extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, + const char *ks_name, const char *ks_class, + uchar_t ks_type, uint_t ks_ndata, + uchar_t ks_flags); +extern void __kstat_install(kstat_t *ksp); +extern void __kstat_delete(kstat_t *ksp); + +#define kstat_create(m,i,n,c,t,s,f) __kstat_create(m,i,n,c,t,s,f) +#define kstat_install(k) __kstat_install(k) +#define kstat_delete(k) __kstat_delete(k) + +#else + +#define kstat_create(m,i,n,c,t,s,f) (NULL) +#define kstat_install(k) ((void)0) +#define kstat_delete(k) ((void)0) + +#endif /* DEBUG_KSTAT */ #ifdef __cplusplus } diff --git a/include/sys/proc.h b/include/sys/proc.h index e77ea5fb2..e76e4dbfa 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -2,6 +2,23 @@ #define _SPL_PROC_H #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef DEBUG_KSTAT +extern struct proc_dir_entry *proc_sys_spl_kstat; +struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, + const char *str); +int proc_dir_entries(struct proc_dir_entry *root); +#endif int proc_init(void); void proc_fini(void); diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index bd2a5f9f2..230de9166 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -23,6 +23,7 @@ spl-objs += spl-module.o spl-objs += spl-generic.o spl-objs += spl-atomic.o spl-objs += spl-mutex.o +spl-objs += spl-kstat.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 99497dd51..0ca0061ab 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "config.h" @@ -109,11 +110,16 @@ static int __init spl_init(void) if ((rc = proc_init())) GOTO(out4, rc); + if ((rc = kstat_init())) + GOTO(out5, rc); + if ((rc = set_hostid())) - GOTO(out5, rc = -EADDRNOTAVAIL); + GOTO(out6, rc = -EADDRNOTAVAIL); printk("SPL: Loaded Solaris Porting Layer v%s\n", VERSION); RETURN(rc); +out6: + kstat_fini(); out5: proc_fini(); out4: @@ -135,6 +141,7 @@ static void spl_fini(void) ENTRY; printk("SPL: Unloaded Solaris Porting Layer v%s\n", VERSION); + kstat_fini(); proc_fini(); vn_fini(); kmem_fini(); diff --git a/modules/spl/spl-kstat.c b/modules/spl/spl-kstat.c new file mode 100644 index 000000000..3f547c601 --- /dev/null +++ b/modules/spl/spl-kstat.c @@ -0,0 +1,470 @@ +#include + +#ifdef DEBUG_KSTAT + +static spinlock_t kstat_lock; +static struct list_head kstat_list; +static kid_t kstat_id; + +static void +kstat_seq_show_headers(struct seq_file *f) +{ + kstat_t *ksp = (kstat_t *)f->private; + ASSERT(ksp->ks_magic == KS_MAGIC); + + seq_printf(f, "%d %d 0x%02x %d %d %lld %lld\n", + ksp->ks_kid, ksp->ks_type, ksp->ks_flags, + ksp->ks_ndata, (int)ksp->ks_data_size, + ksp->ks_crtime, ksp->ks_snaptime); + + switch (ksp->ks_type) { + case KSTAT_TYPE_RAW: + seq_printf(f, "raw data"); + break; + case KSTAT_TYPE_NAMED: + seq_printf(f, "%-31s %-4s %s\n", + "name", "type", "data"); + break; + case KSTAT_TYPE_INTR: + seq_printf(f, "%-8s %-8s %-8s %-8s %-8s\n", + "hard", "soft", "watchdog", + "spurious", "multsvc"); + break; + case KSTAT_TYPE_IO: + seq_printf(f, + "%-8s %-8s %-8s %-8s %-8s %-8s " + "%-8s %-8s %-8s %-8s %-8s %-8s\n", + "nread", "nwritten", "reads", "writes", + "wtime", "wlentime", "wupdate", + "rtime", "rlentime", "rupdate", + "wcnt", "rcnt"); + break; + case KSTAT_TYPE_TIMER: + seq_printf(f, + "%-31s %-8s " + "%-8s %-8s %-8s %-8s %-8s\n", + "name", "events", "elapsed", + "min", "max", "start", "stop"); + break; + default: + SBUG(); /* Unreachable */ + } +} + +static int +kstat_seq_show_raw(struct seq_file *f, unsigned char *p, int l) +{ + int i, j; + + for (i = 0; ; i++) { + seq_printf(f, "%03x:", i); + + for (j = 0; j < 16; j++) { + if (i * 16 + j >= l) { + seq_printf(f, "\n"); + goto out; + } + + seq_printf(f, " %02x", (unsigned char)p[i * 16 + j]); + } + seq_printf(f, "\n"); + } +out: + return 0; +} + +static int +kstat_seq_show_named(struct seq_file *f, kstat_named_t *knp) +{ + seq_printf(f, "%-31s %-4d ", knp->name, knp->data_type); + + switch (knp->data_type) { + case KSTAT_DATA_CHAR: + knp->value.c[15] = '\0'; /* NULL terminate */ + seq_printf(f, "%-16s", knp->value.c); + break; + /* XXX - We need to be more careful able what tokens are + * used for each arch, for now this is correct for x86_64. + */ + case KSTAT_DATA_INT32: + seq_printf(f, "%d", knp->value.i32); + break; + case KSTAT_DATA_UINT32: + seq_printf(f, "%u", knp->value.ui32); + break; + case KSTAT_DATA_INT64: + seq_printf(f, "%d", (int)knp->value.i64); + break; + case KSTAT_DATA_UINT64: + seq_printf(f, "%u", (unsigned int)knp->value.ui64); + break; + case KSTAT_DATA_LONG: + seq_printf(f, "%ld", knp->value.l); + break; + case KSTAT_DATA_ULONG: + seq_printf(f, "%lu", knp->value.l); + break; + case KSTAT_DATA_STRING: + KSTAT_NAMED_STR_PTR(knp) + [KSTAT_NAMED_STR_BUFLEN(knp)-1] = '\0'; + seq_printf(f, "%s", KSTAT_NAMED_STR_PTR(knp)); + break; + default: + SBUG(); /* Unreachable */ + } + + seq_printf(f, "\n"); + + return 0; +} + +static int +kstat_seq_show_intr(struct seq_file *f, kstat_intr_t *kip) +{ + seq_printf(f, "%-8u %-8u %-8u %-8u %-8u\n", + kip->intrs[KSTAT_INTR_HARD], + kip->intrs[KSTAT_INTR_SOFT], + kip->intrs[KSTAT_INTR_WATCHDOG], + kip->intrs[KSTAT_INTR_SPURIOUS], + kip->intrs[KSTAT_INTR_MULTSVC]); + + return 0; +} + +static int +kstat_seq_show_io(struct seq_file *f, kstat_io_t *kip) +{ + seq_printf(f, + "%-8llu %-8llu %-8u %-8u %-8lld %-8lld " + "%-8lld %-8lld %-8lld %-8lld %-8u %-8u\n", + kip->nread, kip->nwritten, + kip->reads, kip->writes, + kip->wtime, kip->wlentime, kip->wlastupdate, + kip->rtime, kip->wlentime, kip->rlastupdate, + kip->wcnt, kip->rcnt); + + return 0; +} + +static int +kstat_seq_show_timer(struct seq_file *f, kstat_timer_t *ktp) +{ + seq_printf(f, + "%-31s %-8llu %-8lld %-8lld %-8lld %-8lld %-8lld\n", + ktp->name, ktp->num_events, ktp->elapsed_time, + ktp->min_time, ktp->max_time, + ktp->start_time, ktp->stop_time); + + return 0; +} + +static int +kstat_seq_show(struct seq_file *f, void *p) +{ + kstat_t *ksp = (kstat_t *)f->private; + int rc = 0; + + ASSERT(ksp->ks_magic == KS_MAGIC); + + switch (ksp->ks_type) { + case KSTAT_TYPE_RAW: + ASSERT(ksp->ks_ndata == 1); + rc = kstat_seq_show_raw(f, ksp->ks_data, + ksp->ks_data_size); + break; + case KSTAT_TYPE_NAMED: + rc = kstat_seq_show_named(f, (kstat_named_t *)p); + break; + case KSTAT_TYPE_INTR: + rc = kstat_seq_show_intr(f, (kstat_intr_t *)p); + break; + case KSTAT_TYPE_IO: + rc = kstat_seq_show_io(f, (kstat_io_t *)p); + break; + case KSTAT_TYPE_TIMER: + rc = kstat_seq_show_timer(f, (kstat_timer_t *)p); + break; + default: + SBUG(); /* Unreachable */ + } + + return rc; +} + +static void * +kstat_seq_data_addr(kstat_t *ksp, loff_t n) +{ + void *rc = NULL; + ENTRY; + + switch (ksp->ks_type) { + case KSTAT_TYPE_RAW: + rc = ksp->ks_data; + break; + case KSTAT_TYPE_NAMED: + rc = ksp->ks_data + n * sizeof(kstat_named_t); + break; + case KSTAT_TYPE_INTR: + rc = ksp->ks_data + n * sizeof(kstat_intr_t); + break; + case KSTAT_TYPE_IO: + rc = ksp->ks_data + n * sizeof(kstat_io_t); + break; + case KSTAT_TYPE_TIMER: + rc = ksp->ks_data + n * sizeof(kstat_timer_t); + break; + default: + SBUG(); /* Unreachable */ + } + + RETURN(rc); +} + +static void * +kstat_seq_start(struct seq_file *f, loff_t *pos) +{ + loff_t n = *pos; + kstat_t *ksp = (kstat_t *)f->private; + ASSERT(ksp->ks_magic == KS_MAGIC); + ENTRY; + + spin_lock(&ksp->ks_lock); + ksp->ks_snaptime = gethrtime(); + + if (!n) + kstat_seq_show_headers(f); + + if (n >= ksp->ks_ndata) + RETURN(NULL); + + RETURN(kstat_seq_data_addr(ksp, n)); +} + +static void * +kstat_seq_next(struct seq_file *f, void *p, loff_t *pos) +{ + kstat_t *ksp = (kstat_t *)f->private; + ASSERT(ksp->ks_magic == KS_MAGIC); + ENTRY; + + ++*pos; + if (*pos >= ksp->ks_ndata) + RETURN(NULL); + + RETURN(kstat_seq_data_addr(ksp, *pos)); +} + +static void +kstat_seq_stop(struct seq_file *f, void *v) +{ + kstat_t *ksp = (kstat_t *)f->private; + ASSERT(ksp->ks_magic == KS_MAGIC); + + spin_unlock(&ksp->ks_lock); +} + +static struct seq_operations kstat_seq_ops = { + .show = kstat_seq_show, + .start = kstat_seq_start, + .next = kstat_seq_next, + .stop = kstat_seq_stop, +}; + +static int +proc_kstat_open(struct inode *inode, struct file *filp) +{ + struct seq_file *f; + int rc; + + rc = seq_open(filp, &kstat_seq_ops); + if (rc) + return rc; + + f = filp->private_data; + f->private = PDE(inode)->data; + + return rc; +} + +static struct file_operations proc_kstat_operations = { + .open = proc_kstat_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + +kstat_t * +__kstat_create(const char *ks_module, int ks_instance, const char *ks_name, + const char *ks_class, uchar_t ks_type, uint_t ks_ndata, + uchar_t ks_flags) +{ + kstat_t *ksp; + + ASSERT(ks_module); + ASSERT(ks_instance == 0); + ASSERT(ks_name); + ASSERT(!(ks_flags & KSTAT_FLAG_UNSUPPORTED)); + + if ((ks_type == KSTAT_TYPE_INTR) || (ks_type == KSTAT_TYPE_IO)) + ASSERT(ks_ndata == 1); + + ksp = kmem_zalloc(sizeof(*ksp), KM_SLEEP); + if (ksp == NULL) + return ksp; + + spin_lock(&kstat_lock); + ksp->ks_kid = kstat_id; + kstat_id++; + spin_unlock(&kstat_lock); + + ksp->ks_magic = KS_MAGIC; + spin_lock_init(&ksp->ks_lock); + INIT_LIST_HEAD(&ksp->ks_list); + + ksp->ks_crtime = gethrtime(); + ksp->ks_snaptime = ksp->ks_crtime; + strncpy(ksp->ks_module, ks_module, KSTAT_STRLEN); + ksp->ks_instance = ks_instance; + strncpy(ksp->ks_name, ks_name, KSTAT_STRLEN); + strncpy(ksp->ks_class, ks_class, KSTAT_STRLEN); + ksp->ks_type = ks_type; + ksp->ks_flags = ks_flags; + + switch (ksp->ks_type) { + case KSTAT_TYPE_RAW: + ksp->ks_ndata = 1; + ksp->ks_data_size = ks_ndata; + break; + case KSTAT_TYPE_NAMED: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof(kstat_named_t); + break; + case KSTAT_TYPE_INTR: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof(kstat_intr_t); + break; + case KSTAT_TYPE_IO: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof(kstat_io_t); + break; + case KSTAT_TYPE_TIMER: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof(kstat_timer_t); + break; + default: + SBUG(); /* Unreachable */ + } + + if (ksp->ks_flags & KSTAT_FLAG_VIRTUAL) { + ksp->ks_data = NULL; + } else { + ksp->ks_data = kmem_alloc(ksp->ks_data_size, KM_SLEEP); + if (ksp->ks_data == NULL) { + kmem_free(ksp, sizeof(*ksp)); + ksp = NULL; + } + } + + return ksp; +} +EXPORT_SYMBOL(__kstat_create); + +void +__kstat_install(kstat_t *ksp) +{ + struct proc_dir_entry *de_module, *de_name; + kstat_t *tmp; + int rc = 0; + ENTRY; + + spin_lock(&kstat_lock); + + /* Item may only be added to the list once */ + list_for_each_entry(tmp, &kstat_list, ks_list) { + if (tmp == ksp) { + spin_unlock(&kstat_lock); + GOTO(out, rc = -EEXIST); + } + } + + list_add_tail(&ksp->ks_list, &kstat_list); + spin_unlock(&kstat_lock); + + de_module = proc_dir_entry_find(proc_sys_spl_kstat, ksp->ks_module); + if (de_module == NULL) { + de_module = proc_mkdir(ksp->ks_module, proc_sys_spl_kstat); + if (de_module == NULL) + GOTO(out, rc = -EUNATCH); + } + + de_name = create_proc_entry(ksp->ks_name, 0444, de_module); + if (de_name == NULL) + GOTO(out, rc = -EUNATCH); + + spin_lock(&ksp->ks_lock); + ksp->ks_proc = de_name; + de_name->proc_fops = &proc_kstat_operations; + de_name->data = (void *)ksp; + spin_unlock(&ksp->ks_lock); +out: + if (rc) { + spin_lock(&kstat_lock); + list_del_init(&ksp->ks_list); + spin_unlock(&kstat_lock); + } + + EXIT; +} +EXPORT_SYMBOL(__kstat_install); + +void +__kstat_delete(kstat_t *ksp) +{ + struct proc_dir_entry *de_module; + + spin_lock(&kstat_lock); + list_del_init(&ksp->ks_list); + spin_unlock(&kstat_lock); + + if (ksp->ks_proc) { + de_module = ksp->ks_proc->parent; + remove_proc_entry(ksp->ks_name, de_module); + + /* Remove top level module directory if it's empty */ + if (proc_dir_entries(de_module) == 0) + remove_proc_entry(de_module->name, de_module->parent); + } + + if (!(ksp->ks_flags & KSTAT_FLAG_VIRTUAL)) + kmem_free(ksp->ks_data, ksp->ks_data_size); + + kmem_free(ksp, sizeof(*ksp)); + + return; +} +EXPORT_SYMBOL(__kstat_delete); + +#endif /* DEBUG_KSTAT */ + +int +kstat_init(void) +{ + ENTRY; +#ifdef DEBUG_KSTAT + spin_lock_init(&kstat_lock); + INIT_LIST_HEAD(&kstat_list); + kstat_id = 0; +#endif /* DEBUG_KSTAT */ + RETURN(0); +} + +void +kstat_fini(void) +{ + ENTRY; +#ifdef DEBUG_KSTAT + ASSERT(list_empty(&kstat_list)); +#endif /* DEBUG_KSTAT */ + EXIT; +} + diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 1b9787a79..07e18102a 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -1,14 +1,4 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "config.h" +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -29,12 +19,19 @@ static struct proc_dir_entry *proc_sys_spl = NULL; static struct proc_dir_entry *proc_sys_spl_mutex = NULL; static struct proc_dir_entry *proc_sys_spl_mutex_stats = NULL; #endif +#ifdef DEBUG_KMEM +static struct proc_dir_entry *proc_sys_spl_kmem = NULL; +#endif +#ifdef DEBUG_KSTAT +struct proc_dir_entry *proc_sys_spl_kstat = NULL; +#endif #endif #define CTL_SPL 0x87 #define CTL_SPL_DEBUG 0x88 #define CTL_SPL_MUTEX 0x89 #define CTL_SPL_KMEM 0x90 +#define CTL_SPL_KSTAT 0x91 enum { CTL_VERSION = 1, /* Version */ @@ -665,7 +662,13 @@ static struct ctl_table spl_kmem_table[] = { }, {0}, }; -#endif /* DEBUG_MUTEX */ +#endif /* DEBUG_KMEM */ + +#ifdef DEBUG_KSTAT +static struct ctl_table spl_kstat_table[] = { + {0}, +}; +#endif /* DEBUG_KSTAT */ static struct ctl_table spl_table[] = { /* NB No .strategy entries have been provided since @@ -716,6 +719,14 @@ static struct ctl_table spl_table[] = { .mode = 0555, .child = spl_kmem_table, }, +#endif +#ifdef DEBUG_KSTAT + { + .ctl_name = CTL_SPL_KSTAT, + .procname = "kstat", + .mode = 0555, + .child = spl_kstat_table, + }, #endif { 0 }, }; @@ -739,7 +750,7 @@ proc_dir_entry_match(int len, const char *name, struct proc_dir_entry *de) return !memcmp(name, de->name, len); } -static struct proc_dir_entry * +struct proc_dir_entry * proc_dir_entry_find(struct proc_dir_entry *root, const char *str) { struct proc_dir_entry *de; @@ -751,6 +762,18 @@ proc_dir_entry_find(struct proc_dir_entry *root, const char *str) return NULL; } +int +proc_dir_entries(struct proc_dir_entry *root) +{ + struct proc_dir_entry *de; + int i = 0; + + for (de = root->subdir; de; de = de->next) + i++; + + return i; +} + int proc_init(void) { @@ -782,7 +805,22 @@ proc_init(void) proc_sys_spl_mutex_stats->proc_fops = &proc_mutex_operations; #endif /* DEBUG_MUTEX */ + +#ifdef DEBUG_KMEM + proc_sys_spl_kmem = proc_dir_entry_find(proc_sys_spl, "kmem"); + if (proc_sys_spl_kmem == NULL) + GOTO(out2, rc = -EUNATCH); +#endif /* DEBUG_KMEM */ + +#ifdef DEBUG_KSTAT + proc_sys_spl_kstat = proc_dir_entry_find(proc_sys_spl, "kstat"); + if (proc_sys_spl_kstat == NULL) + GOTO(out2, rc = -EUNATCH); +#endif /* DEBUG_KSTAT */ + RETURN(rc); +out2: + remove_proc_entry("stats_per", proc_sys_spl_mutex); out: unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ From 5c2bb9b2c314bcac7579b13a99127eb7050a7b90 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 9 May 2008 21:21:33 +0000 Subject: [PATCH 0101/1062] Stability hack. Under Solaris when KM_SLEEP is set kmem_cache_alloc() may not fail. To get this behavior I'd added a retry to the shim layer even though it is abusive to the VM, at least it should prevent the crash. Additionally I added a proc counter so I can easily check how often this is happening. It should be fairly rare, but likely will get worse and worse the longer the machine has been up. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@104 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 12 ++++++------ modules/spl/spl-kmem.c | 28 ++++++++++++++++++++++++++++ modules/spl/spl-proc.c | 9 +++++++++ 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index d67e4f2a2..1dfc0bf1e 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -32,7 +32,9 @@ extern atomic64_t kmem_alloc_used; extern unsigned long kmem_alloc_max; extern atomic64_t vmem_alloc_used; extern unsigned long vmem_alloc_max; + extern int kmem_warning_flag; +extern atomic64_t kmem_cache_alloc_failed; #define KMEM_HASH_BITS 10 #define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) @@ -351,11 +353,9 @@ __kmem_cache_create(char *name, size_t size, size_t align, kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); -int -extern __kmem_cache_destroy(kmem_cache_t *cache); - -void -extern __kmem_reap(void); +extern int __kmem_cache_destroy(kmem_cache_t *cache); +extern void *__kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags); +extern void __kmem_reap(void); int kmem_init(void); void kmem_fini(void); @@ -363,7 +363,7 @@ void kmem_fini(void); #define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ __kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) #define kmem_cache_destroy(cache) __kmem_cache_destroy(cache) -#define kmem_cache_alloc(cache, flags) kmem_cache_alloc(cache, flags) +#define kmem_cache_alloc(cache, flags) __kmem_cache_alloc(cache, flags) #define kmem_cache_free(cache, ptr) kmem_cache_free(cache, ptr) #define kmem_cache_reap_now(cache) kmem_cache_shrink(cache) #define kmem_reap() __kmem_reap() diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 75a421ac7..80c4488b1 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -16,6 +16,7 @@ unsigned long kmem_alloc_max = 0; atomic64_t vmem_alloc_used; unsigned long vmem_alloc_max = 0; int kmem_warning_flag = 1; +atomic64_t kmem_cache_alloc_failed; spinlock_t kmem_lock; struct hlist_head kmem_table[KMEM_TABLE_SIZE]; @@ -268,6 +269,7 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) */ #undef kmem_cache_create #undef kmem_cache_destroy +#undef kmem_cache_alloc kmem_cache_t * __kmem_cache_create(char *name, size_t size, size_t align, @@ -360,6 +362,30 @@ __kmem_cache_destroy(kmem_cache_t *cache) } EXPORT_SYMBOL(__kmem_cache_destroy); +/* Under Solaris if the KM_SLEEP flag is passed we absolutely must + * sleep until we are allocated the memory. Under Linux you can still + * get a memory allocation failure, so I'm forced to keep requesting + * the memory even if the system is under substantial memory pressure + * of fragmentation prevents the allocation from succeeded. This is + * not the correct fix, or even a good one. But it will do for now. + */ +void * +__kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags) +{ + void *rc; + ENTRY; + +restart: + rc = kmem_cache_alloc(cache, flags); + if ((rc == NULL) && (flags & KM_SLEEP)) { + atomic64_inc(&kmem_cache_alloc_failed); + GOTO(restart, rc); + } + + RETURN(rc); +} +EXPORT_SYMBOL(__kmem_cache_alloc); + void __kmem_reap(void) { @@ -395,6 +421,8 @@ kmem_init(void) for (i = 0; i < VMEM_TABLE_SIZE; i++) INIT_HLIST_HEAD(&vmem_table[i]); + + atomic64_set(&kmem_cache_alloc_failed, 0); } #endif RETURN(0); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 07e18102a..a8d3485a6 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -60,6 +60,7 @@ enum { CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ CTL_KMEM_VMEMUSED, /* Currently alloc'd vmem bytes */ CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ + CTL_KMEM_ALLOC_FAILED, /* Cache allocation failed */ #endif CTL_MUTEX_STATS, /* Global mutex statistics */ @@ -660,6 +661,14 @@ static struct ctl_table spl_kmem_table[] = { .mode = 0444, .proc_handler = &proc_doulongvec_minmax, }, + { + .ctl_name = CTL_KMEM_ALLOC_FAILED, + .procname = "kmem_alloc_failed", + .data = &kmem_cache_alloc_failed, + .maxlen = sizeof(atomic64_t), + .mode = 0444, + .proc_handler = &proc_doatomic64, + }, {0}, }; #endif /* DEBUG_KMEM */ From c6dc93d6a8814198165e28364c2941cd55a071a6 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 9 May 2008 22:53:20 +0000 Subject: [PATCH 0102/1062] By default disable extra KMEM and MUTEX debugging to aid performance. They can easily be re-enabled when new stability issues are uncovered. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@105 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 26 +++++++++++--------------- include/sys/mutex.h | 3 ++- modules/spl/spl-kmem.c | 7 ++++++- modules/spl/spl-mutex.c | 6 ++++++ modules/spl/spl-proc.c | 6 ++++++ 5 files changed, 31 insertions(+), 17 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 1dfc0bf1e..319c800b6 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -5,7 +5,8 @@ extern "C" { #endif -#define DEBUG_KMEM +//#define DEBUG_KMEM +#undef DEBUG_KMEM #undef DEBUG_KMEM_UNIMPLEMENTED #include @@ -247,30 +248,25 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) vfree(ptr); \ }) -#else +#else /* DEBUG_KMEM */ #define kmem_alloc(size, flags) kmalloc((size), (flags)) #define kmem_zalloc(size, flags) kzalloc((size), (flags)) -#define kmem_free(ptr, size) \ -({ \ - ASSERT((ptr) || (size > 0)); \ - kfree(ptr); \ -}) +#define kmem_free(ptr, size) kfree(ptr) #define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ - __GFP_HIGHMEM), PAGE_KERNEL) -#define vmem_zalloc(size, flags) __vmalloc((size), ((flags) | \ - __GFP_HIGHMEM | __GFP_ZERO) \ - PAGE_KERNEL) -#define vmem_free(ptr, size) \ + __GFP_HIGHMEM), PAGE_KERNEL) +#define vmem_zalloc(size, flags) \ ({ \ - ASSERT((ptr) || (size > 0)); \ - vfree(ptr); \ + void *_ptr_ = __vmalloc((size),((flags)|__GFP_HIGHMEM),PAGE_KERNEL); \ + if (_ptr_) \ + memset(_ptr_, 0, (size)); \ + _ptr_; \ }) +#define vmem_free(ptr, size) vfree(ptr) #endif /* DEBUG_KMEM */ - #ifdef DEBUG_KMEM_UNIMPLEMENTED static __inline__ void * kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 58d1bf629..b54f495b9 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -10,7 +10,8 @@ extern "C" { #include #include -#define DEBUG_MUTEX +//#define DEBUG_MUTEX +#undef DEBUG_MUTEX #define MUTEX_DEFAULT 0 #define MUTEX_SPIN 1 diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 80c4488b1..f82c1c240 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -378,7 +378,9 @@ __kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags) restart: rc = kmem_cache_alloc(cache, flags); if ((rc == NULL) && (flags & KM_SLEEP)) { +#ifdef DEBUG_KMEM atomic64_inc(&kmem_cache_alloc_failed); +#endif /* DEBUG_KMEM */ GOTO(restart, rc); } @@ -428,7 +430,9 @@ kmem_init(void) RETURN(0); } -static char *sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) +#ifdef DEBUG_KMEM +static char * +sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) { int size = ((len - 1) < kd->kd_size) ? (len - 1) : kd->kd_size; int i, flag = 1; @@ -468,6 +472,7 @@ static char *sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) return str; } +#endif /* DEBUG_KMEM */ void kmem_fini(void) diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 1eabda610..d9f3c0759 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -88,6 +88,12 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) return; } + /* XXX - This appears to be a much more contended lock than I + * would have expected. To run with this debugging enabled and + * get reasonable performance we may need to be more clever and + * do something like hash the mutex ptr on to one of several + * lists to ease this single point of contention. + */ spin_lock(&mutex_stats_lock); list_add_tail(&mp->km_list, &mutex_stats_list); spin_unlock(&mutex_stats_lock); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index a8d3485a6..4a7dcec96 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -325,6 +325,7 @@ proc_console_backoff(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } +#ifdef DEBUG_KMEM static int proc_doatomic64(struct ctl_table *table, int write, struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) @@ -349,6 +350,7 @@ proc_doatomic64(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } +#endif /* DEBUG_KMEM */ static int proc_dohostid(struct ctl_table *table, int write, struct file *filp, @@ -829,7 +831,9 @@ proc_init(void) RETURN(rc); out2: +#ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_sys_spl_mutex); +#endif /* DEBUG_MUTEX */ out: unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ @@ -843,7 +847,9 @@ proc_fini(void) #ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); +#ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_sys_spl_mutex); +#endif /* DEBUG_MUTEX */ unregister_sysctl_table(spl_header); #endif EXIT; From 8464443f8d57a56da6cf4aac727374b8fbd9cd1a Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 12 May 2008 16:53:41 +0000 Subject: [PATCH 0103/1062] Add a comment so I remember to fix this. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@106 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 319c800b6..d630024ae 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -37,6 +37,11 @@ extern unsigned long vmem_alloc_max; extern int kmem_warning_flag; extern atomic64_t kmem_cache_alloc_failed; +/* XXX - Not to surprisingly with debugging enabled the xmem_locks are very + * highly contended particularly on xfree(). If we want to run with this + * detailed debugging enabled for anything other than debugging we need to + * minimize the contention by moving to a lock per xmem_table entry model. + */ #define KMEM_HASH_BITS 10 #define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) From a97df54e839fa7f823fdca2a814427c9e4db204f Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 12 May 2008 18:54:08 +0000 Subject: [PATCH 0104/1062] Enhanse the thread interface to do something quasi inteligent with the function name passed to be used as a thread name. Leaving the trailing _thread is just redundant so just strip it this make the thread names far more readable. Use a strncpy in spl-mutex just to be safe. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@107 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-mutex.c | 2 +- modules/spl/spl-thread.c | 25 +++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index d9f3c0759..8ca1286e9 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -78,7 +78,7 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) } sema_init(mp->km_sem, 1); - strcpy(mp->km_name, name); + strncpy(mp->km_name, name, mp->km_name_size); #ifdef DEBUG_MUTEX mp->km_stats = kmem_zalloc(sizeof(int) * MUTEX_STATS_SIZE, flags); diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index e073bb2b6..de4f03898 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -12,6 +12,8 @@ */ typedef struct thread_priv_s { unsigned long tp_magic; /* Magic */ + int tp_name_size; /* Name size */ + char *tp_name; /* Name (without _thread suffix) */ void (*tp_func)(void *); /* Registered function */ void *tp_args; /* Args to be passed to function */ size_t tp_len; /* Len to be passed to function */ @@ -31,7 +33,8 @@ thread_generic_wrapper(void *arg) args = tp->tp_args; set_current_state(tp->tp_state); set_user_nice((kthread_t *)get_current(), PRIO_TO_NICE(tp->tp_pri)); - kmem_free(arg, sizeof(thread_priv_t)); + kmem_free(tp->tp_name, tp->tp_name_size); + kmem_free(tp, sizeof(thread_priv_t)); if (func) func(args); @@ -60,6 +63,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, thread_priv_t *tp; DEFINE_WAIT(wait); struct task_struct *tsk; + char *p; ENTRY; /* Option pp is simply ignored */ @@ -71,13 +75,30 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, RETURN(NULL); tp->tp_magic = TP_MAGIC; + tp->tp_name_size = strlen(name) + 1; + + tp->tp_name = kmem_alloc(tp->tp_name_size, KM_SLEEP); + if (tp->tp_name == NULL) { + kmem_free(tp, sizeof(thread_priv_t)); + RETURN(NULL); + } + + strncpy(tp->tp_name, name, tp->tp_name_size); + + /* Strip trailing "_thread" from passed name which will be the func + * name since the exposed API has no parameter for passing a name. + */ + p = strstr(tp->tp_name, "_thread"); + if (p) + p[0] = '\0'; + tp->tp_func = func; tp->tp_args = args; tp->tp_len = len; tp->tp_state = state; tp->tp_pri = pri; - tsk = kthread_create(thread_generic_wrapper, (void *)tp, "%s", name); + tsk = kthread_create(thread_generic_wrapper, (void *)tp, tp->tp_name); if (IS_ERR(tsk)) { CERROR("Failed to create thread: %ld\n", PTR_ERR(tsk)); RETURN(NULL); From 4efd41189af62958f2aa5cf48941dd718d563d11 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 15 May 2008 17:10:30 +0000 Subject: [PATCH 0105/1062] Rework condition variable implementation to be consistent with other primitive implementations. Additionally ensure that GFP_ATOMIC is use for allocations when in interrupt context. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@108 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/condvar.h | 174 +++++-------------------------------- modules/spl/Makefile.in | 1 + modules/spl/spl-condvar.c | 175 ++++++++++++++++++++++++++++++++++++++ modules/spl/spl-kmem.c | 11 +++ 4 files changed, 209 insertions(+), 152 deletions(-) create mode 100644 modules/spl/spl-condvar.c diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 2878b68a8..ce9a19147 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -7,6 +7,7 @@ extern "C" { #include #include +#include /* The kcondvar_t struct is protected by mutex taken externally before * calling any of the wait/signal funs, and passed into the wait funs. @@ -17,165 +18,34 @@ extern "C" { typedef struct { int cv_magic; char *cv_name; + int cv_name_size; wait_queue_head_t cv_event; atomic_t cv_waiters; - kmutex_t *cv_mutex; /* only for verification purposes */ + kmutex_t *cv_mutex; spinlock_t cv_lock; } kcondvar_t; typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; -static __inline__ void -cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) -{ - ENTRY; - ASSERT(cvp); - ASSERT(type == CV_DEFAULT); - ASSERT(arg == NULL); +extern void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg); +extern void __cv_destroy(kcondvar_t *cvp); +extern void __cv_wait(kcondvar_t *cvp, kmutex_t *mp); +extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, + clock_t expire_time); +extern void __cv_signal(kcondvar_t *cvp); +extern void __cv_broadcast(kcondvar_t *cvp); - cvp->cv_magic = CV_MAGIC; - init_waitqueue_head(&cvp->cv_event); - spin_lock_init(&cvp->cv_lock); - atomic_set(&cvp->cv_waiters, 0); - cvp->cv_mutex = NULL; - cvp->cv_name = NULL; +#define cv_init(cvp, name, type, arg) \ +({ \ + if ((name) == NULL) \ + __cv_init(cvp, #cvp, type, arg); \ + else \ + __cv_init(cvp, name, type, arg); \ +}) +#define cv_destroy(cvp) __cv_destroy(cvp) +#define cv_wait(cvp, mp) __cv_wait(cvp, mp) +#define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) +#define cv_signal(cvp) __cv_signal(cvp) +#define cv_broadcast(cvp) __cv_broadcast(cvp) - if (name) { - cvp->cv_name = kmalloc(strlen(name) + 1, GFP_KERNEL); - if (cvp->cv_name) - strcpy(cvp->cv_name, name); - } - - EXIT; -} - -static __inline__ void -cv_destroy(kcondvar_t *cvp) -{ - ENTRY; - ASSERT(cvp); - ASSERT(cvp->cv_magic == CV_MAGIC); - spin_lock(&cvp->cv_lock); - ASSERT(atomic_read(&cvp->cv_waiters) == 0); - ASSERT(!waitqueue_active(&cvp->cv_event)); - - if (cvp->cv_name) - kfree(cvp->cv_name); - - memset(cvp, CV_POISON, sizeof(*cvp)); - spin_unlock(&cvp->cv_lock); - EXIT; -} - -static __inline__ void -cv_wait(kcondvar_t *cvp, kmutex_t *mtx) -{ - DEFINE_WAIT(wait); - ENTRY; - - ASSERT(cvp); - ASSERT(mtx); - ASSERT(cvp->cv_magic == CV_MAGIC); - spin_lock(&cvp->cv_lock); - ASSERT(mutex_owned(mtx)); - - if (cvp->cv_mutex == NULL) - cvp->cv_mutex = mtx; - - /* Ensure the same mutex is used by all callers */ - ASSERT(cvp->cv_mutex == mtx); - spin_unlock(&cvp->cv_lock); - - prepare_to_wait_exclusive(&cvp->cv_event, &wait, - TASK_UNINTERRUPTIBLE); - atomic_inc(&cvp->cv_waiters); - - /* Mutex should be dropped after prepare_to_wait() this - * ensures we're linked in to the waiters list and avoids the - * race where 'cvp->cv_waiters > 0' but the list is empty. */ - mutex_exit(mtx); - schedule(); - mutex_enter(mtx); - - atomic_dec(&cvp->cv_waiters); - finish_wait(&cvp->cv_event, &wait); - EXIT; -} - -/* 'expire_time' argument is an absolute wall clock time in jiffies. - * Return value is time left (expire_time - now) or -1 if timeout occurred. - */ -static __inline__ clock_t -cv_timedwait(kcondvar_t *cvp, kmutex_t *mtx, clock_t expire_time) -{ - DEFINE_WAIT(wait); - clock_t time_left; - ENTRY; - - ASSERT(cvp); - ASSERT(mtx); - ASSERT(cvp->cv_magic == CV_MAGIC); - spin_lock(&cvp->cv_lock); - ASSERT(mutex_owned(mtx)); - - if (cvp->cv_mutex == NULL) - cvp->cv_mutex = mtx; - - /* Ensure the same mutex is used by all callers */ - ASSERT(cvp->cv_mutex == mtx); - spin_unlock(&cvp->cv_lock); - - /* XXX - Does not handle jiffie wrap properly */ - time_left = expire_time - jiffies; - if (time_left <= 0) - RETURN(-1); - - prepare_to_wait_exclusive(&cvp->cv_event, &wait, - TASK_UNINTERRUPTIBLE); - atomic_inc(&cvp->cv_waiters); - - /* Mutex should be dropped after prepare_to_wait() this - * ensures we're linked in to the waiters list and avoids the - * race where 'cvp->cv_waiters > 0' but the list is empty. */ - mutex_exit(mtx); - time_left = schedule_timeout(time_left); - mutex_enter(mtx); - - atomic_dec(&cvp->cv_waiters); - finish_wait(&cvp->cv_event, &wait); - - RETURN(time_left > 0 ? time_left : -1); -} - -static __inline__ void -cv_signal(kcondvar_t *cvp) -{ - ENTRY; - ASSERT(cvp); - ASSERT(cvp->cv_magic == CV_MAGIC); - - /* All waiters are added with WQ_FLAG_EXCLUSIVE so only one - * waiter will be set runable with each call to wake_up(). - * Additionally wake_up() holds a spin_lock assoicated with - * the wait queue to ensure we don't race waking up processes. */ - if (atomic_read(&cvp->cv_waiters) > 0) - wake_up(&cvp->cv_event); - - EXIT; -} - -static __inline__ void -cv_broadcast(kcondvar_t *cvp) -{ - ASSERT(cvp); - ASSERT(cvp->cv_magic == CV_MAGIC); - ENTRY; - - /* Wake_up_all() will wake up all waiters even those which - * have the WQ_FLAG_EXCLUSIVE flag set. */ - if (atomic_read(&cvp->cv_waiters) > 0) - wake_up_all(&cvp->cv_event); - - EXIT; -} #endif /* _SPL_CONDVAR_H */ diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 230de9166..1bb979c45 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -24,6 +24,7 @@ spl-objs += spl-generic.o spl-objs += spl-atomic.o spl-objs += spl-mutex.o spl-objs += spl-kstat.o +spl-objs += spl-condvar.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/spl/spl-condvar.c b/modules/spl/spl-condvar.c new file mode 100644 index 000000000..15bf8ab58 --- /dev/null +++ b/modules/spl/spl-condvar.c @@ -0,0 +1,175 @@ +#include + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_CONDVAR + +void +__cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) +{ + int flags = KM_SLEEP; + + ENTRY; + ASSERT(cvp); + ASSERT(name); + ASSERT(type == CV_DEFAULT); + ASSERT(arg == NULL); + + cvp->cv_magic = CV_MAGIC; + init_waitqueue_head(&cvp->cv_event); + spin_lock_init(&cvp->cv_lock); + atomic_set(&cvp->cv_waiters, 0); + cvp->cv_mutex = NULL; + cvp->cv_name = NULL; + cvp->cv_name_size = strlen(name) + 1; + + /* We may be called when there is a non-zero preempt_count or + * interrupts are disabled is which case we must not sleep. + */ + if (current_thread_info()->preempt_count || irqs_disabled()) + flags = KM_NOSLEEP; + + cvp->cv_name = kmem_alloc(cvp->cv_name_size, flags); + if (cvp->cv_name) + strcpy(cvp->cv_name, name); + + EXIT; +} +EXPORT_SYMBOL(__cv_init); + +void +__cv_destroy(kcondvar_t *cvp) +{ + ENTRY; + ASSERT(cvp); + ASSERT(cvp->cv_magic == CV_MAGIC); + spin_lock(&cvp->cv_lock); + ASSERT(atomic_read(&cvp->cv_waiters) == 0); + ASSERT(!waitqueue_active(&cvp->cv_event)); + + if (cvp->cv_name) + kmem_free(cvp->cv_name, cvp->cv_name_size); + + memset(cvp, CV_POISON, sizeof(*cvp)); + spin_unlock(&cvp->cv_lock); + EXIT; +} +EXPORT_SYMBOL(__cv_destroy); + +void +__cv_wait(kcondvar_t *cvp, kmutex_t *mp) +{ + DEFINE_WAIT(wait); + ENTRY; + + ASSERT(cvp); + ASSERT(mp); + ASSERT(cvp->cv_magic == CV_MAGIC); + spin_lock(&cvp->cv_lock); + ASSERT(mutex_owned(mp)); + + if (cvp->cv_mutex == NULL) + cvp->cv_mutex = mp; + + /* Ensure the same mutex is used by all callers */ + ASSERT(cvp->cv_mutex == mp); + spin_unlock(&cvp->cv_lock); + + prepare_to_wait_exclusive(&cvp->cv_event, &wait, + TASK_UNINTERRUPTIBLE); + atomic_inc(&cvp->cv_waiters); + + /* Mutex should be dropped after prepare_to_wait() this + * ensures we're linked in to the waiters list and avoids the + * race where 'cvp->cv_waiters > 0' but the list is empty. */ + mutex_exit(mp); + schedule(); + mutex_enter(mp); + + atomic_dec(&cvp->cv_waiters); + finish_wait(&cvp->cv_event, &wait); + EXIT; +} +EXPORT_SYMBOL(__cv_wait); + +/* 'expire_time' argument is an absolute wall clock time in jiffies. + * Return value is time left (expire_time - now) or -1 if timeout occurred. + */ +clock_t +__cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) +{ + DEFINE_WAIT(wait); + clock_t time_left; + ENTRY; + + ASSERT(cvp); + ASSERT(mp); + ASSERT(cvp->cv_magic == CV_MAGIC); + spin_lock(&cvp->cv_lock); + ASSERT(mutex_owned(mp)); + + if (cvp->cv_mutex == NULL) + cvp->cv_mutex = mp; + + /* Ensure the same mutex is used by all callers */ + ASSERT(cvp->cv_mutex == mp); + spin_unlock(&cvp->cv_lock); + + /* XXX - Does not handle jiffie wrap properly */ + time_left = expire_time - jiffies; + if (time_left <= 0) + RETURN(-1); + + prepare_to_wait_exclusive(&cvp->cv_event, &wait, + TASK_UNINTERRUPTIBLE); + atomic_inc(&cvp->cv_waiters); + + /* Mutex should be dropped after prepare_to_wait() this + * ensures we're linked in to the waiters list and avoids the + * race where 'cvp->cv_waiters > 0' but the list is empty. */ + mutex_exit(mp); + time_left = schedule_timeout(time_left); + mutex_enter(mp); + + atomic_dec(&cvp->cv_waiters); + finish_wait(&cvp->cv_event, &wait); + + RETURN(time_left > 0 ? time_left : -1); +} +EXPORT_SYMBOL(__cv_timedwait); + +void +__cv_signal(kcondvar_t *cvp) +{ + ENTRY; + ASSERT(cvp); + ASSERT(cvp->cv_magic == CV_MAGIC); + + /* All waiters are added with WQ_FLAG_EXCLUSIVE so only one + * waiter will be set runable with each call to wake_up(). + * Additionally wake_up() holds a spin_lock assoicated with + * the wait queue to ensure we don't race waking up processes. */ + if (atomic_read(&cvp->cv_waiters) > 0) + wake_up(&cvp->cv_event); + + EXIT; +} +EXPORT_SYMBOL(__cv_signal); + +void +__cv_broadcast(kcondvar_t *cvp) +{ + ASSERT(cvp); + ASSERT(cvp->cv_magic == CV_MAGIC); + ENTRY; + + /* Wake_up_all() will wake up all waiters even those which + * have the WQ_FLAG_EXCLUSIVE flag set. */ + if (atomic_read(&cvp->cv_waiters) > 0) + wake_up_all(&cvp->cv_event); + + EXIT; +} +EXPORT_SYMBOL(__cv_broadcast); diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index f82c1c240..7337432eb 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -147,6 +147,8 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla kmem_constructor_t constructor; void *private; + ASSERT(flags & SLAB_CTOR_CONSTRUCTOR); + /* Ensure constructor verifies are not passed to the registered * constructors. This may not be safe due to the Solaris constructor * not being aware of how to handle the SLAB_CTOR_VERIFY flag @@ -154,6 +156,11 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla if (flags & SLAB_CTOR_VERIFY) return; + if (flags & SLAB_CTOR_ATOMIC) + flags = KM_NOSLEEP; + else + flags = KM_SLEEP; + /* We can be called with interrupts disabled so it is critical that * this function and the registered constructor never sleep. */ @@ -185,6 +192,9 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag kmem_destructor_t destructor; void *private; + /* No valid destructor flags */ + ASSERT(flags == 0); + /* We can be called with interrupts disabled so it is critical that * this function and the registered constructor never sleep. */ @@ -286,6 +296,7 @@ __kmem_cache_create(char *name, size_t size, size_t align, /* XXX: - Option currently unsupported by shim layer */ ASSERT(!vmp); + ASSERT(flags == 0); cache_name = kzalloc(strlen(name) + 1, GFP_KERNEL); if (cache_name == NULL) From 56f924533023e39edfda09cf1a9c47b4abfe57c7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 15 May 2008 17:32:41 +0000 Subject: [PATCH 0106/1062] Disable adaptive mutexs by default (always sleep), and while I'm at it add a module option for easy tuning. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@109 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-mutex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 8ca1286e9..7fce77e8e 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -25,7 +25,7 @@ * -1: Spin until aquired or holder yeilds without dropping lock * 1-MAX_INT: Spin for N attempts before sleeping for lock */ -int mutex_spin_max = 100; +int mutex_spin_max = 0; #ifdef DEBUG_MUTEX int mutex_stats[MUTEX_STATS_SIZE] = { 0 }; @@ -272,3 +272,5 @@ spl_mutex_fini(void) EXIT; } +module_param(mutex_spin_max, int, 0644); +MODULE_PARM_DESC(mutex_spin_max, "Spin a maximum of N times to aquire lock"); From 6ab69573ffc79db6fcd0539218e96ded41fcafc1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 15 May 2008 23:39:19 +0000 Subject: [PATCH 0107/1062] SPL additions to increase support for updated ZFS build git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@110 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/buf.h | 4 ++++ include/sys/dumphdr.h | 4 ++++ include/sys/kmem.h | 2 +- include/sys/sunddi.h | 11 +++++++++++ include/sys/vmsystm.h | 11 ++++------- 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 include/sys/buf.h create mode 100644 include/sys/dumphdr.h diff --git a/include/sys/buf.h b/include/sys/buf.h new file mode 100644 index 000000000..b6627301f --- /dev/null +++ b/include/sys/buf.h @@ -0,0 +1,4 @@ +#ifndef _SPL_BUF_H +#define _SPL_BUF_H + +#endif /* SPL_BUF_H */ diff --git a/include/sys/dumphdr.h b/include/sys/dumphdr.h new file mode 100644 index 000000000..fe4087317 --- /dev/null +++ b/include/sys/dumphdr.h @@ -0,0 +1,4 @@ +#ifndef _SPL_DUMPHDR_H +#define _SPL_DUMPHDR_H + +#endif /* SPL_DUMPHDR_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index d630024ae..1f9bb221d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -24,7 +24,7 @@ extern "C" { #define KM_SLEEP GFP_KERNEL #define KM_NOSLEEP GFP_ATOMIC #undef KM_PANIC /* No linux analog */ -#define KM_PUSHPAGE (GFP_KERNEL | GFP_HIGH) +#define KM_PUSHPAGE (GFP_KERNEL | __GFP_HIGH) #define KM_VMFLAGS GFP_LEVEL_MASK #define KM_FLAGS __GFP_BITS_MASK diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index c3f3e38cc..660fd0293 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -146,6 +146,17 @@ typedef struct modldrv { #define getmajor(x) (x) #define ddi_driver_major(di) getmajor(di->di_dev) +#define DDI_DEV_T_NONE ((dev_t)-1) +#define DDI_DEV_T_ANY ((dev_t)-2) +#define DDI_MAJOR_T_UNKNOWN ((major_t)0) + +#define DDI_PROP_DONTPASS 0x0001 +#define DDI_PROP_CANSLEEP 0x0002 + +#define ddi_prop_lookup_string(x1,x2,x3,x4,x5) (*x5 = NULL) +#define ddi_prop_free(x) (void)0 +#define ddi_root_node() (void)0 + #define mod_install(x) 0 #define mod_remove(x) 0 diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index fb9ff9710..09f88d750 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -2,12 +2,16 @@ #define _SPL_VMSYSTM_H #include +#include #include #include extern vmem_t *zio_alloc_arena; /* arena for zio caches */ #define physmem num_physpages +#define freemem nr_free_pages() /* Expensive on linux, + cheap on solaris */ +#define minfree 0 #define ptob(pages) (pages * PAGE_SIZE) #define membar_producer() smp_wmb() @@ -56,9 +60,6 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) } #if 0 -/* The approximate total number of free pages */ -#define freemem 0 - /* The average number of free pages over the last 5 seconds */ #define avefree 0 @@ -81,10 +82,6 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) /* When free memory is above this limit, swapping is not performed */ #define desfree 0 - -/* Threshold for many low memory tests, e.g. swapping is - * more active below this limit */ -#define minfree 0 #endif #endif /* SPL_VMSYSTM_H */ From cc7449ccd612ed8567e7a8a8574ea6df1d5faa7d Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 19 May 2008 02:49:12 +0000 Subject: [PATCH 0108/1062] - Properly fix the debug support for all the ASSERT's, VERIFIES, etc can be compiled out when doing performance runs. - Bite the bullet and fully autoconfize the debug options in the configure time parameters. By default all the debug support is disable in the core SPL build, but available to modules which enable it when building against the SPL. To enable particular SPL debug support use the follow configure options: --enable-debug Internal ASSERTs --enable-debug-kmem Detailed memory accounting --enable-debug-mutex Detailed mutex tracking --enable-debug_kstat Kstat info exported to /proc --enable-debug-callb Additional callb debug git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@111 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- configure.ac | 231 +++++++++++++++++++++++++++++------------ include/sys/callb.h | 7 +- include/sys/debug.h | 48 ++++++++- include/sys/kmem.h | 2 - include/sys/kstat.h | 2 - include/sys/mutex.h | 3 - modules/spl/spl-err.c | 2 + modules/spl/spl-proc.c | 2 + 8 files changed, 213 insertions(+), 84 deletions(-) diff --git a/configure.ac b/configure.ac index b47ad7af5..a1b051c0f 100644 --- a/configure.ac +++ b/configure.ac @@ -8,99 +8,194 @@ AC_PROG_INSTALL AC_PROG_CC AC_PROG_LIBTOOL -ver=`uname -r` kernelsrc= kernelbuild= -AC_ARG_WITH(kernel, - [ --with-linux=PATH Path to kernel source ], - [kernelsrc="$withval"; kernelbuild="$withval"]) -AC_ARG_WITH(kernel-build, - [ --with-linux-obj=PATH Path to kernel build objects ], - [kernelbuild="$withval"]) -AC_MSG_CHECKING([kernel source directory]) -if test -z "$kernelsrc"; then - kernelbuild= - sourcelink=/lib/modules/${ver}/source - buildlink=/lib/modules/${ver}/build +AC_DEFUN([SPL_AC_KERNEL], [ + ver=`uname -r` - if test -e $sourcelink; then - kernelsrc=`(cd $sourcelink; /bin/pwd)` - fi - if test -e $buildlink; then - kernelbuild=`(cd $buildlink; /bin/pwd)` - fi + AC_ARG_WITH([linux], + AS_HELP_STRING([--with-linux=PATH], + [Path to kernel source]), + [kernelsrc="$withval"; kernelbuild="$withval"]) + + AC_ARG_WITH([linux-build], + AS_HELP_STRING([--with-linux-obj=PATH], + [Path to kernel build objects]), + [kernelbuild="$withval"]) + + AC_MSG_CHECKING([kernel source directory]) if test -z "$kernelsrc"; then - kernelsrc=$kernelbuild - fi - if test -z "$kernelsrc" -o -z "$kernelbuild"; then - AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([ + kernelbuild= + sourcelink=/lib/modules/${ver}/source + buildlink=/lib/modules/${ver}/build + + if test -e $sourcelink; then + kernelsrc=`(cd $sourcelink; /bin/pwd)` + fi + if test -e $buildlink; then + kernelbuild=`(cd $buildlink; /bin/pwd)` + fi + if test -z "$kernelsrc"; then + kernelsrc=$kernelbuild + fi + if test -z "$kernelsrc" -o -z "$kernelbuild"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([ *** Please specify the location of the kernel source *** with the '--with-kernel=PATH' option]) + fi fi -fi -AC_MSG_RESULT([$kernelsrc]) -AC_MSG_CHECKING([kernel build directory]) -AC_MSG_RESULT([$kernelbuild]) + AC_MSG_RESULT([$kernelsrc]) + AC_MSG_CHECKING([kernel build directory]) + AC_MSG_RESULT([$kernelbuild]) -AC_MSG_CHECKING([kernel source version]) -if test -r $kernelbuild/include/linux/version.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then + AC_MSG_CHECKING([kernel source version]) + if test -r $kernelbuild/include/linux/version.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` -elif test -r $kernelbuild/include/linux/utsrelease.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then + elif test -r $kernelbuild/include/linux/utsrelease.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` -fi + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + fi -if test -z "$kernsrcver"; then - AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([ + if test -z "$kernsrcver"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([ *** Cannot determine the version of the linux kernel source. *** Please prepare the kernel before running this script]) -fi + fi -AC_MSG_RESULT([$kernsrcver]) -kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver -AC_SUBST(kernelsrc) -AC_SUBST(kmoduledir) + AC_MSG_RESULT([$kernsrcver]) + kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver + AC_SUBST(kernelsrc) + AC_SUBST(kmoduledir) +]) -# -# Each version of the kernel provides a slightly different -# ABI, so figure out what we have to work with and adapt. -# -AC_MSG_CHECKING([if kernel defines kzalloc function]) -if egrep -qw "kzalloc" $kernelsrc/include/linux/slab.h; then - AC_DEFINE(HAVE_KZALLOC, 1, [kzalloc() is defined]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi +AC_DEFUN([SPL_AC_DEBUG], [ + AC_MSG_CHECKING([whether debugging is enabled]) + AC_ARG_ENABLE( [debug], + AS_HELP_STRING([--enable-debug], + [Enable generic debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" + else + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + AC_DEFINE([NDEBUG], [1], + [Define to 1 to disable debug tracing]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) +AC_DEFUN([SPL_AC_DEBUG_KMEM], [ + AC_MSG_CHECKING([whether kmem debugging is enabled]) + AC_ARG_ENABLE( [debug-kmem], + AS_HELP_STRING([--enable-debug-kmem], + [Enable kmem debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kmem]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + AC_DEFINE([DEBUG_KMEM], [1], + [Define to 1 to enable kmem debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) -AC_MSG_CHECKING([if kernel has mutex.h ]) -if test -f $kernelsrc/include/linux/mutex.h; then - AC_DEFINE(HAVE_MUTEX_H, 1, [kernel has mutex.h]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi +AC_DEFUN([SPL_AC_DEBUG_MUTEX], [ + AC_MSG_CHECKING([whether mutex debugging is enabled]) + AC_ARG_ENABLE( [debug-mutex], + AS_HELP_STRING([--enable-debug-mutex], + [Enable mutex debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-mutex]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" + AC_DEFINE([DEBUG_MUTEX], [1], + [Define to 1 to enable mutex debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +AC_DEFUN([SPL_AC_DEBUG_KSTAT], [ + AC_MSG_CHECKING([whether kstat debugging is enabled]) + AC_ARG_ENABLE( [debug-kstat], + AS_HELP_STRING([--enable-debug-kstat], + [Enable kstat debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kstat]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" + AC_DEFINE([DEBUG_KSTAT], [1], + [Define to 1 to enable kstat debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +AC_DEFUN([SPL_AC_DEBUG_CALLB], [ + AC_MSG_CHECKING([whether callb debugging is enabled]) + AC_ARG_ENABLE( [debug-callb], + AS_HELP_STRING([--enable-debug-callb], + [Enable callb debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-callb]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" + AC_DEFINE([DEBUG_CALLB], [1], + [Define to 1 to enable callb debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +SPL_AC_KERNEL +SPL_AC_DEBUG +SPL_AC_DEBUG_KMEM +SPL_AC_DEBUG_MUTEX +SPL_AC_DEBUG_KSTAT +SPL_AC_DEBUG_CALLB TOPDIR=`/bin/pwd` # Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build KERNELMAKE_PARAMS= -KERNELCPPFLAGS="-I$TOPDIR -I$TOPDIR/include" +KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" if test "$kernelbuild" != "$kernelsrc"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" diff --git a/include/sys/callb.h b/include/sys/callb.h index 39cdf9622..0857d6d8a 100644 --- a/include/sys/callb.h +++ b/include/sys/callb.h @@ -8,15 +8,12 @@ extern "C" { #include #include -#define DEBUG_CALLB - -#ifndef DEBUG_CALLB +#ifdef DEBUG_CALLB #define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); #else -#define CALLB_CPR_ASSERT(cp) +#define CALLB_CPR_ASSERT(cp) (void)0 #endif - typedef struct callb_cpr { kmutex_t *cc_lockp; } callb_cpr_t; diff --git a/include/sys/debug.h b/include/sys/debug.h index 39585ba19..b972e5e88 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -1,6 +1,10 @@ #ifndef _SPL_DEBUG_H #define _SPL_DEBUG_H +#ifdef __cplusplus +extern "C" { +#endif + #include /* THREAD_SIZE */ #include @@ -159,6 +163,37 @@ struct page_collection { #define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); +#ifdef NDEBUG + +#define CDEBUG_STACK() (0) +#define CDEBUG(mask, format, a...) ((void)0) +#define CWARN(fmt, a...) ((void)0) +#define CERROR(fmt, a...) ((void)0) +#define CEMERG(fmt, a...) ((void)0) +#define CONSOLE(mask, fmt, a...) ((void)0) + +#define ENTRY ((void)0) +#define EXIT ((void)0) +#define RETURN(x) return (x) +#define GOTO(x, y) { ((void)(y)); goto x; } + +#define __ASSERT(x) ((void)0) +#define __ASSERT_TAGE_INVARIANT(x) ((void)0) +#define ASSERT(x) ((void)0) +#define VERIFY(x) ((void)(x)) + +#define VERIFY3_IMPL(x, y, z, t, f, c) if (x == z) ((void)0) + +#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%ld", (long)) +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%lu", (unsigned long)) +#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) + +#define ASSERT3S(x,y,z) VERIFY3S(x, y, z) +#define ASSERT3U(x,y,z) VERIFY3U(x, y, z) +#define ASSERT3P(x,y,z) VERIFY3P(x, y, z) + +#else /* NDEBUG */ + #ifdef __ia64__ #define CDEBUG_STACK() (THREAD_SIZE - \ ((unsigned long)__builtin_dwarf_cfa() & \ @@ -259,10 +294,6 @@ do { \ #define VERIFY(x) ASSERT(x) -#define spl_debug_msg(cdls, subsys, mask, file, fn, line, format, a...) \ - spl_debug_vmsg(cdls, subsys, mask, file, fn, \ - line, NULL, NULL, format, ##a) - #define __CDEBUG(cdls, subsys, mask, format, a...) \ do { \ CHECK_STACK(); \ @@ -322,6 +353,11 @@ do { \ #define ENTRY __ENTRY(DEBUG_SUBSYSTEM) #define EXIT __EXIT(DEBUG_SUBSYSTEM) +#endif /* NDEBUG */ + +#define spl_debug_msg(cdls, subsys, mask, file, fn, line, format, a...) \ + spl_debug_vmsg(cdls, subsys, mask, file, fn, \ + line, NULL, NULL, format, ##a) extern int spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, const char *file, const char *fn, const int line, @@ -341,4 +377,8 @@ extern void spl_debug_bug(char *file, const char *func, const int line, int flag extern int spl_debug_clear_buffer(void); extern int spl_debug_mark_buffer(char *text); +#ifdef __cplusplus +} +#endif + #endif /* SPL_DEBUG_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 1f9bb221d..cab6a75ef 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -5,8 +5,6 @@ extern "C" { #endif -//#define DEBUG_KMEM -#undef DEBUG_KMEM #undef DEBUG_KMEM_UNIMPLEMENTED #include diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 1ce084729..9e0f7009b 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -5,8 +5,6 @@ extern "C" { #endif -#define DEBUG_KSTAT - #include #include #include diff --git a/include/sys/mutex.h b/include/sys/mutex.h index b54f495b9..916ef025c 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -10,9 +10,6 @@ extern "C" { #include #include -//#define DEBUG_MUTEX -#undef DEBUG_MUTEX - #define MUTEX_DEFAULT 0 #define MUTEX_SPIN 1 #define MUTEX_ADAPTIVE 2 diff --git a/modules/spl/spl-err.c b/modules/spl/spl-err.c index b9a957fc9..5f225fad3 100644 --- a/modules/spl/spl-err.c +++ b/modules/spl/spl-err.c @@ -8,8 +8,10 @@ #define DEBUG_SUBSYSTEM S_GENERIC +#ifndef NDEBUG static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; +#endif void vpanic(const char *fmt, va_list ap) diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 4a7dcec96..074bc3656 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -830,7 +830,9 @@ proc_init(void) #endif /* DEBUG_KSTAT */ RETURN(rc); +#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) out2: +#endif #ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_sys_spl_mutex); #endif /* DEBUG_MUTEX */ From b2585b36d353dd537dcbe08992c2384214d6f103 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 21 May 2008 21:11:47 +0000 Subject: [PATCH 0109/1062] Prep for for 0.3.0 tag, this is the tag which was used for all the performance results to date. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@112 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 6 ++++++ configure.ac | 4 ++-- scripts/spl.spec | 28 ---------------------------- 3 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 scripts/spl.spec diff --git a/ChangeLog b/ChangeLog index a65d6b15d..5f5e2fe11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-21 Brian Behlendorf + + * : Tag spl-0.3.0 + + * configure.ac: Improved autotools support. + 2008-04-26 Brian Behlendorf * include/sys/mutex.h : Implemented a close approximation diff --git a/configure.ac b/configure.ac index a1b051c0f..af47481b3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.2.2) +AM_INIT_AUTOMAKE(spl, 0.3.0) AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL @@ -19,7 +19,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ [Path to kernel source]), [kernelsrc="$withval"; kernelbuild="$withval"]) - AC_ARG_WITH([linux-build], + AC_ARG_WITH([linux-obj], AS_HELP_STRING([--with-linux-obj=PATH], [Path to kernel build objects]), [kernelbuild="$withval"]) diff --git a/scripts/spl.spec b/scripts/spl.spec deleted file mode 100644 index 31ea18fc6..000000000 --- a/scripts/spl.spec +++ /dev/null @@ -1,28 +0,0 @@ -# spl -%define name spl -%define version 0.2.2 - -Summary: Solaris Porting Layer -Name: %{name} -Version: %{version} -Release: 1 -Copyright: GPL -Group: Utilities/System -BuildRoot: /tmp/%{name}-%{version} -Source: %{name}-%{version}.tar.gz - -%description -Abstration layer to provide Solaris style primatives in the linux kernel. - -%prep -%setup -q -./configure - -%build -rm -rf $RPM_BUILD_ROOT -make - -%install -make install "DESTDIR=$RPM_BUILD_ROOT" - -%files From 715f6251462d89be6473a37d0829f31cbb7b63a8 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 26 May 2008 04:38:26 +0000 Subject: [PATCH 0110/1062] Go through and add a header with the proper UCRL number. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@114 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- AUTHORS | 3 + COPYING | 340 +++++++++++++++++++++++++++++++++ DISCLAIMER | 22 +++ FIXME | 1 - INSTALL | 238 +++++++++++++++++++++++ cmd/spl.c | 26 +++ cmd/splat.c | 28 ++- cmd/splat.h | 26 +++ configure.ac | 26 +++ include/spl-ctl.h | 26 +++ include/splat-ctl.h | 26 +++ include/sys/atomic.h | 26 +++ include/sys/condvar.h | 26 +++ include/sys/debug.h | 26 +++ include/sys/kmem.h | 26 +++ include/sys/kobj.h | 26 +++ include/sys/kstat.h | 26 +++ include/sys/mutex.h | 26 +++ include/sys/proc.h | 26 +++ include/sys/random.h | 26 +++ include/sys/rwlock.h | 26 +++ include/sys/signal.h | 26 +++ include/sys/sunddi.h | 26 +++ include/sys/sunldi.h | 26 +++ include/sys/sysmacros.h | 26 +++ include/sys/taskq.h | 26 +++ include/sys/thread.h | 26 +++ include/sys/time.h | 26 +++ include/sys/timer.h | 26 +++ include/sys/vmsystm.h | 30 ++- include/sys/vnode.h | 26 +++ include/sys/zmod.h | 26 +++ modules/spl/spl-atomic.c | 26 +++ modules/spl/spl-condvar.c | 26 +++ modules/spl/spl-debug.c | 45 +++-- modules/spl/spl-err.c | 26 +++ modules/spl/spl-generic.c | 26 +++ modules/spl/spl-kmem.c | 26 +++ modules/spl/spl-kobj.c | 26 +++ modules/spl/spl-kstat.c | 26 +++ modules/spl/spl-module.c | 26 +++ modules/spl/spl-mutex.c | 26 +++ modules/spl/spl-proc.c | 26 +++ modules/spl/spl-rwlock.c | 26 +++ modules/spl/spl-taskq.c | 26 +++ modules/spl/spl-thread.c | 26 +++ modules/spl/spl-time.c | 26 +++ modules/spl/spl-vnode.c | 26 +++ modules/splat/Makefile.in | 2 +- modules/splat/splat-atomic.c | 26 +++ modules/splat/splat-condvar.c | 26 +++ modules/splat/splat-ctl.c | 44 ++++- modules/splat/splat-internal.h | 26 +++ modules/splat/splat-kmem.c | 26 +++ modules/splat/splat-kobj.c | 26 +++ modules/splat/splat-mutex.c | 26 +++ modules/splat/splat-random.c | 26 +++ modules/splat/splat-rwlock.c | 26 +++ modules/splat/splat-taskq.c | 26 +++ modules/splat/splat-thread.c | 26 +++ modules/splat/splat-time.c | 26 +++ modules/splat/splat-vnode.c | 26 +++ 62 files changed, 2071 insertions(+), 34 deletions(-) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 DISCLAIMER delete mode 100644 FIXME create mode 100644 INSTALL diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..8beef8bac --- /dev/null +++ b/AUTHORS @@ -0,0 +1,3 @@ +Brian Behlendorf , +Herb Wartens , +Jim Garlick diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..3912109b5 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/DISCLAIMER b/DISCLAIMER new file mode 100644 index 000000000..86778c593 --- /dev/null +++ b/DISCLAIMER @@ -0,0 +1,22 @@ +This notice is required to be provided under our contract with the +U.S. Department of Energy (DOE). This work was produced at the +Lawrence Livermore National Laboratory under Contract with the DOE. + +Neither the United States Government nor the Lawrence Livermore National +Security, LLC. nor any of their employees, makes any warranty, express +or implied, or assumes any liability or responsibility for the accuracy, +completeness, or usefulness of any information, apparatus, product, +or process disclosed, or represents that its use would not infringe +privately-owned rights. + +Also, reference herein to any specific commercial products, process, +or services by trade name, trademark, manufacturer or otherwise does +not necessarily constitute or imply its endorsement, recommendation, +or favoring by the United States Government or the Lawrence Livermore +National Security, LLC. The views and opinions of authors expressed +herein do not necessarily state or reflect those of the United States +Government or the Lawrence Livermore National Security, LLC., and +shall not be used for advertising or product endorsement purposes. + +The precise terms and conditions for copying, distribution and +modification are specified in the file "COPYING". diff --git a/FIXME b/FIXME deleted file mode 100644 index 70cb1beca..000000000 --- a/FIXME +++ /dev/null @@ -1 +0,0 @@ -* Fully implement vnode support for ZPL layer to intergrate with VFS. diff --git a/INSTALL b/INSTALL new file mode 100644 index 000000000..fbf3a78e8 --- /dev/null +++ b/INSTALL @@ -0,0 +1,238 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 0. `cd' to the directory containing the package's source code and type + `sh ./autogen.sh' to generate the configure script for your package. + + 1. Type `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/cmd/spl.c b/cmd/spl.c index ad2c81b4a..c9eb652e4 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include #include diff --git a/cmd/splat.c b/cmd/splat.c index d0d8e4a8e..9b2bb417a 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -1,4 +1,30 @@ -/* Solaris Porting Layer Aggressive Test (SPLAT) userspace interface */ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* Solaris Porting LAyer Tests (SPLAT) userspace interface */ #include #include diff --git a/cmd/splat.h b/cmd/splat.h index e4419def5..17cc166a6 100644 --- a/cmd/splat.h +++ b/cmd/splat.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPLAT_H #define _SPLAT_H diff --git a/configure.ac b/configure.ac index af47481b3..035944894 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + AC_INIT AC_CANONICAL_SYSTEM diff --git a/include/spl-ctl.h b/include/spl-ctl.h index a20442a8c..9cc8ab86a 100644 --- a/include/spl-ctl.h +++ b/include/spl-ctl.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _DEBUG_CTL_H #define _DEBUG_CTL_H diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 5be5e3a4a..bd7fdb658 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPLAT_CTL_H #define _SPLAT_CTL_H diff --git a/include/sys/atomic.h b/include/sys/atomic.h index c04a5b6b4..7bb915611 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_ATOMIC_H #define _SPL_ATOMIC_H diff --git a/include/sys/condvar.h b/include/sys/condvar.h index ce9a19147..40b6e4948 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_CONDVAR_H #define _SPL_CONDVAR_H diff --git a/include/sys/debug.h b/include/sys/debug.h index b972e5e88..84278e2e1 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_DEBUG_H #define _SPL_DEBUG_H diff --git a/include/sys/kmem.h b/include/sys/kmem.h index cab6a75ef..f61ace213 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_KMEM_H #define _SPL_KMEM_H diff --git a/include/sys/kobj.h b/include/sys/kobj.h index 2715b4492..8d79a0fbf 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_KOBJ_H #define _SPL_KOBJ_H diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 9e0f7009b..bfae7bd15 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_KSTAT_H #define _SPL_KSTAT_H diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 916ef025c..7ce807a29 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_MUTEX_H #define _SPL_MUTEX_H diff --git a/include/sys/proc.h b/include/sys/proc.h index e76e4dbfa..9944c74f9 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_PROC_H #define _SPL_PROC_H diff --git a/include/sys/random.h b/include/sys/random.h index 400aaa91f..de386b634 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_RANDOM_H #define _SPL_RANDOM_H diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index a4b6ce6d7..2e8624191 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_RWLOCK_H #define _SPL_RWLOCK_H diff --git a/include/sys/signal.h b/include/sys/signal.h index e40b483e2..4b1e82115 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_SIGNAL_H #define _SPL_SIGNAL_H diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 660fd0293..a80ae454d 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_SUNDDI_H #define _SPL_SUNDDI_H diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index 4c9c90d79..c0875725c 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_SUNLDI_H #define _SPL_SUNLDI_H diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 6f19f5a3e..c55b070ac 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_SYSMACROS_H #define _SPL_SYSMACROS_H diff --git a/include/sys/taskq.h b/include/sys/taskq.h index ae8fbdb7b..11b1cbbfb 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_TASKQ_H #define _SPL_TASKQ_H diff --git a/include/sys/thread.h b/include/sys/thread.h index 8424070e2..745f93e2b 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_THREAD_H #define _SPL_THREAD_H diff --git a/include/sys/time.h b/include/sys/time.h index 44a0ec3c9..408edf97e 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_TIME_H #define _SPL_TIME_H diff --git a/include/sys/timer.h b/include/sys/timer.h index 7e8c6fd41..b7aff1184 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_TIMER_H #define _SPL_TIMER_H diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 09f88d750..f0688393c 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_VMSYSTM_H #define _SPL_VMSYSTM_H @@ -9,8 +35,8 @@ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ #define physmem num_physpages -#define freemem nr_free_pages() /* Expensive on linux, - cheap on solaris */ +#define freemem nr_free_pages() // Expensive on linux, + // cheap on solaris #define minfree 0 #define ptob(pages) (pages * PAGE_SIZE) #define membar_producer() smp_wmb() diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 4ee7e7895..9123d7a13 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_VNODE_H #define _SPL_VNODE_H diff --git a/include/sys/zmod.h b/include/sys/zmod.h index c5216a8fd..428904ea7 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_ZMOD_H #define _SPL_ZMOD_H diff --git a/modules/spl/spl-atomic.c b/modules/spl/spl-atomic.c index e22503fbc..40cdb06cc 100644 --- a/modules/spl/spl-atomic.c +++ b/modules/spl/spl-atomic.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-condvar.c b/modules/spl/spl-condvar.c index 15bf8ab58..79a047b19 100644 --- a/modules/spl/spl-condvar.c +++ b/modules/spl/spl-condvar.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index 8c60ea2de..656df9614 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -1,27 +1,34 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: +/* + * This file is part of the SPL: Solaris Porting Layer. * - * Copyright (C) 2004 Cluster File Systems, Inc. - * Author: Zach Brown - * Author: Phil Schwan - * Author: Brian Behlendorf + * This file was originally part of Lustre, http://www.lustre.org. + * but has subsequently been adapted for use in the SPL in + * accordance with the GPL. * - * This file was originally part of Lustre, http://www.lustre.org. - * but has subsequently been adapted for use in the SPL in - * accordance with the GPL. + * Copyright (C) 2004 Cluster File Systems, Inc. + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Zach Brown + * Phil Schwan + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 * - * SPL is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * SPL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. * - * You should have received a copy of the GNU General Public License - * along with SPL; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include diff --git a/modules/spl/spl-err.c b/modules/spl/spl-err.c index 5f225fad3..67aea5f0d 100644 --- a/modules/spl/spl-err.c +++ b/modules/spl/spl-err.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include #include "config.h" diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 0ca0061ab..ac6cbf719 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include #include diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 7337432eb..284258803 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-kobj.c b/modules/spl/spl-kobj.c index 76897246d..5a08c15dd 100644 --- a/modules/spl/spl-kobj.c +++ b/modules/spl/spl-kobj.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include "config.h" diff --git a/modules/spl/spl-kstat.c b/modules/spl/spl-kstat.c index 3f547c601..4f4dc884f 100644 --- a/modules/spl/spl-kstat.c +++ b/modules/spl/spl-kstat.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_KSTAT diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index cd3bc88ef..f58616cf9 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include #include "config.h" diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 7fce77e8e..8fb561471 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 074bc3656..00ec5cf42 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c index 3a28f2c81..d599e04e1 100644 --- a/modules/spl/spl-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 70deb0aea..9c820b7c1 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #ifdef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index de4f03898..7a9ad4cb3 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index c12c3d9bb..966e9a5a1 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include #include "config.h" diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index a310222d6..4492e7797 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include #include #include "config.h" diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index 8c814d3e2..1a48a788e 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -9,7 +9,7 @@ DISTFILES = Makefile.in \ CPPFLAGS += @KERNELCPPFLAGS@ -# Solaris porting layer aggressive tests +# Solaris Porting LAyer Tests obj-m := splat.o splat-objs += splat-ctl.o diff --git a/modules/splat/splat-atomic.c b/modules/splat/splat-atomic.c index 43876d78a..4de5ef033 100644 --- a/modules/splat/splat-atomic.c +++ b/modules/splat/splat-atomic.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 diff --git a/modules/splat/splat-condvar.c b/modules/splat/splat-condvar.c index d1b49303f..276798818 100644 --- a/modules/splat/splat-condvar.c +++ b/modules/splat/splat-condvar.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_CONDVAR 0x0500 diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index d8245737a..ea234a296 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -1,7 +1,33 @@ /* - * My intent is to create a loadable 'splat' (solaris porting layer - * aggressive test) module which can be used as an access point to - * run in kernel Solaris ABI regression tests. This provides a + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* + * My intent is to create a loadable 'splat' (Solaris Porting LAyer + * Tests) module which can be used as an access point to run + * in kernel Solaris ABI regression tests. This provides a * nice mechanism to validate the shim primates are working properly. * * The basic design is the splat module is that it is constructed of @@ -12,8 +38,6 @@ * called when the splat module is removed. Each test can then be * run by making an ioctl() call from a userspace control application * to pick the subsystem and test which should be run. - * - * Author: Brian Behlendorf */ #include "splat-internal.h" @@ -630,8 +654,8 @@ splat_init(void) NULL, "splatctl"); #endif - printk(KERN_INFO "splat: Loaded Solaris Porting Layer " - "Aggressive Tests v%s\n", VERSION); + printk(KERN_INFO "splat: Loaded Solaris Porting LAyer " + "Tests v%s\n", VERSION); return 0; error: printk(KERN_ERR "splat: Error registering splat device, %d\n", rc); @@ -668,13 +692,13 @@ splat_fini(void) SPLAT_SUBSYSTEM_FINI(kmem); ASSERT(list_empty(&splat_module_list)); - printk(KERN_INFO "splat: Unloaded Solaris Porting Layer " - "Aggressive Tests v%s\n", VERSION); + printk(KERN_INFO "splat: Unloaded Solaris Porting LAyer " + "Tests v%s\n", VERSION); } module_init(splat_init); module_exit(splat_fini); MODULE_AUTHOR("Lawrence Livermore National Labs"); -MODULE_DESCRIPTION("Solaris Porting Layer Aggresive Tests"); +MODULE_DESCRIPTION("Solaris Porting LAyer Tests"); MODULE_LICENSE("GPL"); diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 25b2dd78c..af5fc6e57 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPLAT_INTERNAL_H #define _SPLAT_INTERNAL_H diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 9491a081a..277a9afe0 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_KMEM 0x0100 diff --git a/modules/splat/splat-kobj.c b/modules/splat/splat-kobj.c index f6bfa6d00..2137ab02a 100644 --- a/modules/splat/splat-kobj.c +++ b/modules/splat/splat-kobj.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_KOBJ 0x0a00 diff --git a/modules/splat/splat-mutex.c b/modules/splat/splat-mutex.c index 94760a185..d15903e58 100644 --- a/modules/splat/splat-mutex.c +++ b/modules/splat/splat-mutex.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_MUTEX 0x0400 diff --git a/modules/splat/splat-random.c b/modules/splat/splat-random.c index a3e29eef6..c96dd480c 100644 --- a/modules/splat/splat-random.c +++ b/modules/splat/splat-random.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_KRNG 0x0300 diff --git a/modules/splat/splat-rwlock.c b/modules/splat/splat-rwlock.c index 3148a02f8..b1db12ea8 100644 --- a/modules/splat/splat-rwlock.c +++ b/modules/splat/splat-rwlock.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_RWLOCK 0x0700 diff --git a/modules/splat/splat-taskq.c b/modules/splat/splat-taskq.c index b4d07c95d..4d349f071 100644 --- a/modules/splat/splat-taskq.c +++ b/modules/splat/splat-taskq.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_TASKQ 0x0200 diff --git a/modules/splat/splat-thread.c b/modules/splat/splat-thread.c index 3cea573ed..330c3ae10 100644 --- a/modules/splat/splat-thread.c +++ b/modules/splat/splat-thread.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_THREAD 0x0600 diff --git a/modules/splat/splat-time.c b/modules/splat/splat-time.c index 99568c982..1aa13e520 100644 --- a/modules/splat/splat-time.c +++ b/modules/splat/splat-time.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #define SPLAT_SUBSYSTEM_TIME 0x0800 diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index c8368b5cb..a72dac94b 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -1,3 +1,29 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "splat-internal.h" #include From 65a045dace36f9083b728aef731a56b789287a2a Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 26 May 2008 05:01:15 +0000 Subject: [PATCH 0111/1062] Make a tag just for release to CEA, this has the URCL git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@115 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5f5e2fe11..7d4520553 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-21 Brian Behlendorf + + * : Tag spl-0.3.1 + + * : License headers including URCL added for release. + 2008-05-21 Brian Behlendorf * : Tag spl-0.3.0 diff --git a/configure.ac b/configure.ac index 035944894..587620158 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.3.0) +AM_INIT_AUTOMAKE(spl, 0.3.1) AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL From 57d862349b074974825e1228b7b51ac72e4ba2b3 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 2 Jun 2008 17:28:49 +0000 Subject: [PATCH 0112/1062] Breaking the world for a little bit. If anyone is going to continue working on this branch for the next few days I suggested you work off of the 0.3.1 tag. The following changes are fairly extensive and are designed to make the SPL compatible with all kernels in the range of 2.6.18-2.6.25. There were 13 relevant API changes between these releases and I have added the needed autoconf tests to check for them. However, this has not all been tested extensively. I'll sort of the breakage on Fedora Core 9 and RHEL5 this week. SPL_AC_TYPE_UINTPTR_T SPL_AC_TYPE_KMEM_CACHE_T SPL_AC_KMEM_CACHE_DESTROY_INT SPL_AC_ATOMIC_PANIC_NOTIFIER SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_KMEM_CACHE_T SPL_AC_KMEM_CACHE_CREATE_DTOR SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR SPL_AC_SET_SHRINKER SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@119 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 5 + autoconf/spl-build.m4 | 541 ++++++++++++++++++++++++++++++++++++ autogen.sh | 4 +- configure.ac | 194 ++----------- include/sys/kmem.h | 13 +- include/sys/proc.h | 9 + include/sys/sysmacros.h | 12 + include/sys/types.h | 10 +- include/sys/vnode.h | 9 + lib/list.c | 2 +- modules/Makefile.in | 4 +- modules/spl/Makefile.in | 2 +- modules/spl/spl-debug.c | 14 +- modules/spl/spl-err.c | 1 - modules/spl/spl-generic.c | 3 +- modules/spl/spl-kmem.c | 93 ++++++- modules/spl/spl-kobj.c | 1 - modules/spl/spl-module.c | 1 - modules/spl/spl-mutex.c | 5 + modules/spl/spl-proc.c | 72 ++++- modules/spl/spl-time.c | 1 - modules/spl/spl-vnode.c | 40 +-- modules/splat/Makefile.in | 3 +- modules/splat/splat-ctl.c | 1 - modules/splat/splat-mutex.c | 16 +- 25 files changed, 809 insertions(+), 247 deletions(-) create mode 100644 autoconf/spl-build.m4 diff --git a/ChangeLog b/ChangeLog index 7d4520553..6ce192e2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-25 Brian Behlendorf + + * configure.ac, autoconf/* : Initial pass at resolving + API changes introduced by kernels newer than 2.6.18. + 2008-05-21 Brian Behlendorf * : Tag spl-0.3.1 diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 new file mode 100644 index 000000000..d2d476d4f --- /dev/null +++ b/autoconf/spl-build.m4 @@ -0,0 +1,541 @@ +AC_DEFUN([SPL_AC_KERNEL], [ + ver=`uname -r` + + AC_ARG_WITH([linux], + AS_HELP_STRING([--with-linux=PATH], + [Path to kernel source]), + [kernelsrc="$withval"; kernelbuild="$withval"]) + + AC_ARG_WITH([linux-obj], + AS_HELP_STRING([--with-linux-obj=PATH], + [Path to kernel build objects]), + [kernelbuild="$withval"]) + + AC_MSG_CHECKING([kernel source directory]) + if test -z "$kernelsrc"; then + kernelbuild= + sourcelink=/lib/modules/${ver}/source + buildlink=/lib/modules/${ver}/build + + if test -e $sourcelink; then + kernelsrc=`(cd $sourcelink; /bin/pwd)` + fi + if test -e $buildlink; then + kernelbuild=`(cd $buildlink; /bin/pwd)` + fi + if test -z "$kernelsrc"; then + kernelsrc=$kernelbuild + fi + if test -z "$kernelsrc" -o -z "$kernelbuild"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([ + *** Please specify the location of the kernel source + *** with the '--with-kernel=PATH' option]) + fi + fi + + AC_MSG_RESULT([$kernelsrc]) + AC_MSG_CHECKING([kernel build directory]) + AC_MSG_RESULT([$kernelbuild]) + + AC_MSG_CHECKING([kernel source version]) + if test -r $kernelbuild/include/linux/version.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + elif test -r $kernelbuild/include/linux/utsrelease.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + fi + + if test -z "$kernsrcver"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([ + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script]) + fi + + AC_MSG_RESULT([$kernsrcver]) + + kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver + LINUX=${kernelsrc} + LINUX_OBJ=${kernelbuild} + + AC_SUBST(LINUX) + AC_SUBST(LINUX_OBJ) + AC_SUBST(kmoduledir) +]) + +AC_DEFUN([SPL_AC_DEBUG], [ + AC_MSG_CHECKING([whether debugging is enabled]) + AC_ARG_ENABLE( [debug], + AS_HELP_STRING([--enable-debug], + [Enable generic debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" + else + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + AC_DEFINE([NDEBUG], [1], + [Define to 1 to disable debug tracing]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +AC_DEFUN([SPL_AC_DEBUG_KMEM], [ + AC_MSG_CHECKING([whether kmem debugging is enabled]) + AC_ARG_ENABLE( [debug-kmem], + AS_HELP_STRING([--enable-debug-kmem], + [Enable kmem debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kmem]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + AC_DEFINE([DEBUG_KMEM], [1], + [Define to 1 to enable kmem debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +AC_DEFUN([SPL_AC_DEBUG_MUTEX], [ + AC_MSG_CHECKING([whether mutex debugging is enabled]) + AC_ARG_ENABLE( [debug-mutex], + AS_HELP_STRING([--enable-debug-mutex], + [Enable mutex debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-mutex]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" + AC_DEFINE([DEBUG_MUTEX], [1], + [Define to 1 to enable mutex debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +AC_DEFUN([SPL_AC_DEBUG_KSTAT], [ + AC_MSG_CHECKING([whether kstat debugging is enabled]) + AC_ARG_ENABLE( [debug-kstat], + AS_HELP_STRING([--enable-debug-kstat], + [Enable kstat debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kstat]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" + AC_DEFINE([DEBUG_KSTAT], [1], + [Define to 1 to enable kstat debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +AC_DEFUN([SPL_AC_DEBUG_CALLB], [ + AC_MSG_CHECKING([whether callb debugging is enabled]) + AC_ARG_ENABLE( [debug-callb], + AS_HELP_STRING([--enable-debug-callb], + [Enable callb debug support (default off)]), + [ case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-callb]) ;; + esac ] + ) + if test "$spl_ac_debug" = yes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" + AC_DEFINE([DEBUG_CALLB], [1], + [Define to 1 to enable callb debugging]) + fi + AC_MSG_RESULT([${spl_ac_debug=no}]) +]) + +dnl # +dnl # SPL_LINUX_CONFTEST +dnl # +AC_DEFUN([SPL_LINUX_CONFTEST], [ +cat >conftest.c <<_ACEOF +$1 +_ACEOF +]) + +dnl # +dnl # SPL_LANG_PROGRAM(C)([PROLOGUE], [BODY]) +dnl # +m4_define([SPL_LANG_PROGRAM], [ +$1 +int +main (void) +{ +dnl Do *not* indent the following line: there may be CPP directives. +dnl Don't move the `;' right after for the same reason. +$2 + ; + return 0; +} +]) + +dnl # +dnl # SPL_LINUX_COMPILE_IFELSE / like AC_COMPILE_IFELSE +dnl # +AC_DEFUN([SPL_LINUX_COMPILE_IFELSE], [ +m4_ifvaln([$1], [SPL_LINUX_CONFTEST([$1])])dnl +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +dnl AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" -f $PWD/build/Makefile LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM SUBDIRS=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], +AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], + [$4], + [_AC_MSG_LOG_CONFTEST +m4_ifvaln([$5],[$5])dnl])dnl +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko m4_ifval([$1], [build/conftest.c conftest.c])[]dnl +]) + +dnl # +dnl # SPL_LINUX_TRY_COMPILE like AC_TRY_COMPILE +dnl # +AC_DEFUN([SPL_LINUX_TRY_COMPILE], + [SPL_LINUX_COMPILE_IFELSE( + [AC_LANG_SOURCE([SPL_LANG_PROGRAM([[$1]], [[$2]])])], + [modules], + [test -s build/conftest.o], + [$3], [$4]) +]) + +dnl # +dnl # SPL_LINUX_CONFIG +dnl # +AC_DEFUN([SPL_LINUX_CONFIG], + [AC_MSG_CHECKING([whether Linux was built with CONFIG_$1]) + SPL_LINUX_TRY_COMPILE([ + #ifndef AUTOCONF_INCLUDED + #include + #endif + ],[ + #ifndef CONFIG_$1 + #error CONFIG_$1 not #defined + #endif + ],[ + AC_MSG_RESULT([yes]) + $2 + ],[ + AC_MSG_RESULT([no]) + $3 + ]) +]) + +dnl # +dnl # SPL_CHECK_SYMBOL_EXPORT +dnl # check symbol exported or not +dnl # +AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], + [AC_MSG_CHECKING([whether symbol $1 is exported]) + grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in $2; do + grep -q -E "EXPORT_SYMBOL.*($1)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + AC_MSG_RESULT([no]) + $4 + else + AC_MSG_RESULT([yes]) + $3 + fi + else + AC_MSG_RESULT([yes]) + $3 + fi +]) + +dnl # +dnl # 2.6.x API change +dnl # check if uintptr_t typedef is defined +dnl # +AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], + [AC_MSG_CHECKING([whether kernel defines uintptr_t]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + uintptr_t *ptr; + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_UINTPTR_T, 1, + [kernel defines uintptr_t]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + +dnl # +dnl # 2.6.x API change +dnl # check if kmem_cache_t typedef is defined +dnl # +AC_DEFUN([SPL_AC_TYPE_KMEM_CACHE_T], + [AC_MSG_CHECKING([whether kernel defines kmem_cache_t]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + kmem_cache_t *cache; + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_KMEM_CACHE_T, 1, + [kernel defines kmem_cache_t]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + +dnl # +dnl # 2.6.19 API change +dnl # kmem_cache_destroy() return void instead of int +dnl # +AC_DEFUN([SPL_AC_KMEM_CACHE_DESTROY_INT], + [AC_MSG_CHECKING([whether kmem_cache_destroy() returns int]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + int i = kmem_cache_destroy(NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_DESTROY_INT, 1, + [kmem_cache_destroy() returns int]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.19 API change +dnl # panic_notifier_list use atomic_notifier operations +dnl # + +AC_DEFUN([SPL_AC_ATOMIC_PANIC_NOTIFIER], + [AC_MSG_CHECKING([whether panic_notifier_list is atomic]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + struct atomic_notifier_head panic_notifier_list; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ATOMIC_PANIC_NOTIFIER, 1, + [panic_notifier_list is atomic]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.20 API change +dnl # INIT_WORK use 2 args and not store data inside +dnl # +AC_DEFUN([SPL_AC_3ARGS_INIT_WORK], + [AC_MSG_CHECKING([whether INIT_WORK wants 3 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct work_struct work; + + INIT_WORK(&work, NULL, NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1, + [INIT_WORK wants 3 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.21 api change. +dnl # 'register_sysctl_table' use only one argument instead of two +dnl # +AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], + [AC_MSG_CHECKING([whether register_sysctl_table() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + return register_sysctl_table(NULL,0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1, + [register_sysctl_table() wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.21 API change +dnl # Use struct kmem_cache for missing kmem_cache_t +dnl # +AC_DEFUN([SPL_AC_KMEM_CACHE_T], [ + AC_MSG_CHECKING([whether kernel has kmem_cache_t]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + kmem_cache_t *cachep = NULL; + kmem_cache_free(cachep, NULL); + + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_KMEM_CACHE_T, 1, + [kernel has struct kmem_cache_t]) + ],[ + AC_MSG_RESULT([no]) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + +dnl # +dnl # 2.6.23 API change +dnl # Slab no longer accepts a dtor argument +dnl # +AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_DTOR], + [AC_MSG_CHECKING([whether kmem_cache_create() has dtor arg]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + kmem_cache_create(NULL, 0, 0, 0, NULL, NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_CREATE_DTOR, 1, + [kmem_cache_create() has dtor arg]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.x API change +dnl # Slab ctor no longer takes 3 args +dnl # +AC_DEFUN([SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR], + [AC_MSG_CHECKING([whether slab ctor wants 3 args]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + void (*ctor)(void *,struct kmem_cache *,unsigned long) = NULL; + + #ifdef HAVE_KMEM_CACHE_CREATE_DTOR + kmem_cache_create(NULL, 0, 0, 0, ctor, NULL); + #else + kmem_cache_create(NULL, 0, 0, 0, ctor); + #endif + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARG_KMEM_CACHE_CREATE_CTOR, 1, + [slab ctor wants 3 args]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + +dnl # +dnl # 2.6.x API change +dnl # Old set_shrinker API replaced with register_shrinker +dnl # +AC_DEFUN([SPL_AC_SET_SHRINKER], [ + AC_MSG_CHECKING([whether set_shrinker() available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + return set_shrinker(DEFAULT_SEEKS, NULL); + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_SET_SHRINKER, 1, + [set_shrinker() available]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + +dnl # +dnl # 2.6.x API change +dnl # struct path entry added to struct nameidata +dnl # +AC_DEFUN([SPL_AC_PATH_IN_NAMEIDATA], + [AC_MSG_CHECKING([whether struct path used in struct nameidata]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct nameidata nd; + + nd.path.mnt = NULL; + nd.path.dentry = NULL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PATH_IN_NAMEIDATA, 1, + [struct path used in struct nameidata]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # Custom SPL patch may export this system it is not required +dnl # +AC_DEFUN([SPL_AC_TASK_CURR], [ + SPL_CHECK_SYMBOL_EXPORT([task_curr], [kernel/sched.c], + [AC_DEFINE(HAVE_TASK_CURR, 1, [task_curr() exported])], + []) +]) + +dnl # +dnl # 2.6.x API change +dnl # Use CTL_UNNUMBERED when binary sysctl is not required +dnl # +AC_DEFUN([SPL_AC_CTL_UNNUMBERED], + [AC_MSG_CHECKING([whether unnumbered sysctl support exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + #ifndef CTL_UNNUMBERED + #error CTL_UNNUMBERED undefined + #endif + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CTL_UNNUMBERED, 1, + [unnumbered sysctl support exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/autogen.sh b/autogen.sh index bf452fdca..abd43903a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,8 +3,8 @@ find . -type d -name .deps | xargs rm -rf rm -rf config.guess config.sub ltmain.sh libtoolize --automake -aclocal 2>/dev/null && +aclocal -I autoconf 2>/dev/null && autoheader && -automake --add-missing --include-deps # 2>/dev/null && +automake --add-missing --include-deps 2>/dev/null autoconf diff --git a/configure.ac b/configure.ac index 587620158..df210ee52 100644 --- a/configure.ac +++ b/configure.ac @@ -28,187 +28,14 @@ AC_INIT AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(spl, 0.3.1) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([spl_config.h]) AC_PROG_INSTALL AC_PROG_CC AC_PROG_LIBTOOL -kernelsrc= -kernelbuild= - -AC_DEFUN([SPL_AC_KERNEL], [ - ver=`uname -r` - - AC_ARG_WITH([linux], - AS_HELP_STRING([--with-linux=PATH], - [Path to kernel source]), - [kernelsrc="$withval"; kernelbuild="$withval"]) - - AC_ARG_WITH([linux-obj], - AS_HELP_STRING([--with-linux-obj=PATH], - [Path to kernel build objects]), - [kernelbuild="$withval"]) - - AC_MSG_CHECKING([kernel source directory]) - if test -z "$kernelsrc"; then - kernelbuild= - sourcelink=/lib/modules/${ver}/source - buildlink=/lib/modules/${ver}/build - - if test -e $sourcelink; then - kernelsrc=`(cd $sourcelink; /bin/pwd)` - fi - if test -e $buildlink; then - kernelbuild=`(cd $buildlink; /bin/pwd)` - fi - if test -z "$kernelsrc"; then - kernelsrc=$kernelbuild - fi - if test -z "$kernelsrc" -o -z "$kernelbuild"; then - AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([ - *** Please specify the location of the kernel source - *** with the '--with-kernel=PATH' option]) - fi - fi - - AC_MSG_RESULT([$kernelsrc]) - AC_MSG_CHECKING([kernel build directory]) - AC_MSG_RESULT([$kernelbuild]) - - AC_MSG_CHECKING([kernel source version]) - if test -r $kernelbuild/include/linux/version.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - - elif test -r $kernelbuild/include/linux/utsrelease.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - fi - - if test -z "$kernsrcver"; then - AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([ - *** Cannot determine the version of the linux kernel source. - *** Please prepare the kernel before running this script]) - fi - - AC_MSG_RESULT([$kernsrcver]) - kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver - AC_SUBST(kernelsrc) - AC_SUBST(kmoduledir) -]) - -AC_DEFUN([SPL_AC_DEBUG], [ - AC_MSG_CHECKING([whether debugging is enabled]) - AC_ARG_ENABLE( [debug], - AS_HELP_STRING([--enable-debug], - [Enable generic debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;; - esac ] - ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" - else - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" - AC_DEFINE([NDEBUG], [1], - [Define to 1 to disable debug tracing]) - fi - AC_MSG_RESULT([${spl_ac_debug=no}]) -]) - -AC_DEFUN([SPL_AC_DEBUG_KMEM], [ - AC_MSG_CHECKING([whether kmem debugging is enabled]) - AC_ARG_ENABLE( [debug-kmem], - AS_HELP_STRING([--enable-debug-kmem], - [Enable kmem debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kmem]) ;; - esac ] - ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" - AC_DEFINE([DEBUG_KMEM], [1], - [Define to 1 to enable kmem debugging]) - fi - AC_MSG_RESULT([${spl_ac_debug=no}]) -]) - -AC_DEFUN([SPL_AC_DEBUG_MUTEX], [ - AC_MSG_CHECKING([whether mutex debugging is enabled]) - AC_ARG_ENABLE( [debug-mutex], - AS_HELP_STRING([--enable-debug-mutex], - [Enable mutex debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-mutex]) ;; - esac ] - ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" - AC_DEFINE([DEBUG_MUTEX], [1], - [Define to 1 to enable mutex debugging]) - fi - AC_MSG_RESULT([${spl_ac_debug=no}]) -]) - -AC_DEFUN([SPL_AC_DEBUG_KSTAT], [ - AC_MSG_CHECKING([whether kstat debugging is enabled]) - AC_ARG_ENABLE( [debug-kstat], - AS_HELP_STRING([--enable-debug-kstat], - [Enable kstat debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kstat]) ;; - esac ] - ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" - AC_DEFINE([DEBUG_KSTAT], [1], - [Define to 1 to enable kstat debugging]) - fi - AC_MSG_RESULT([${spl_ac_debug=no}]) -]) - -AC_DEFUN([SPL_AC_DEBUG_CALLB], [ - AC_MSG_CHECKING([whether callb debugging is enabled]) - AC_ARG_ENABLE( [debug-callb], - AS_HELP_STRING([--enable-debug-callb], - [Enable callb debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-callb]) ;; - esac ] - ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" - AC_DEFINE([DEBUG_CALLB], [1], - [Define to 1 to enable callb debugging]) - fi - AC_MSG_RESULT([${spl_ac_debug=no}]) -]) +LINUX= +LINUX_OBJ= SPL_AC_KERNEL SPL_AC_DEBUG @@ -216,6 +43,19 @@ SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_MUTEX SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB +SPL_AC_TYPE_UINTPTR_T +SPL_AC_TYPE_KMEM_CACHE_T +SPL_AC_KMEM_CACHE_DESTROY_INT +SPL_AC_ATOMIC_PANIC_NOTIFIER +SPL_AC_3ARGS_INIT_WORK +SPL_AC_2ARGS_REGISTER_SYSCTL +SPL_AC_KMEM_CACHE_T +SPL_AC_KMEM_CACHE_CREATE_DTOR +SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR +SPL_AC_SET_SHRINKER +SPL_AC_PATH_IN_NAMEIDATA +SPL_AC_TASK_CURR +SPL_AC_CTL_UNNUMBERED TOPDIR=`/bin/pwd` @@ -223,7 +63,7 @@ TOPDIR=`/bin/pwd` KERNELMAKE_PARAMS= KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" -if test "$kernelbuild" != "$kernelsrc"; then +if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" fi diff --git a/include/sys/kmem.h b/include/sys/kmem.h index f61ace213..0b1b53687 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -41,6 +41,7 @@ extern "C" { #include #include #include +#include #include /* * Memory allocation interfaces @@ -316,15 +317,6 @@ kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) #define KMC_REAP_CHUNK 256 #define KMC_DEFAULT_SEEKS DEFAULT_SEEKS -/* Defined by linux slab.h - * typedef struct kmem_cache_s kmem_cache_t; - */ - -/* No linux analog - * extern int kmem_ready; - * extern pgcnt_t kmem_reapahead; - */ - #ifdef DEBUG_KMEM_UNIMPLEMENTED static __inline__ void kmem_init(void) { #error "kmem_init() not implemented" @@ -380,6 +372,7 @@ __kmem_cache_create(char *name, size_t size, size_t align, extern int __kmem_cache_destroy(kmem_cache_t *cache); extern void *__kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags); +extern void __kmem_cache_free(kmem_cache_t *cache, void *obj); extern void __kmem_reap(void); int kmem_init(void); @@ -389,7 +382,7 @@ void kmem_fini(void); __kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) #define kmem_cache_destroy(cache) __kmem_cache_destroy(cache) #define kmem_cache_alloc(cache, flags) __kmem_cache_alloc(cache, flags) -#define kmem_cache_free(cache, ptr) kmem_cache_free(cache, ptr) +#define kmem_cache_free(cache, obj) __kmem_cache_free(cache, obj) #define kmem_cache_reap_now(cache) kmem_cache_shrink(cache) #define kmem_reap() __kmem_reap() diff --git a/include/sys/proc.h b/include/sys/proc.h index 9944c74f9..0316a45fd 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -39,6 +39,15 @@ #include #include +#ifdef CONFIG_SYSCTL +#ifdef HAVE_2ARGS_REGISTER_SYSCTL +#define spl_register_sysctl_table(t, a) register_sysctl_table(t, a) +#else +#define spl_register_sysctl_table(t, a) register_sysctl_table(t) +#endif /* HAVE_2ARGS_REGISTER_SYSCTL */ +#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t) +#endif /* CONFIG_SYSCTL */ + #ifdef DEBUG_KSTAT extern struct proc_dir_entry *proc_sys_spl_kstat; struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index c55b070ac..95f7f8a3b 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -197,6 +197,18 @@ extern int ddi_strtoul(const char *str, char **nptr, #define offsetof(s, m) ((size_t)(&(((s *)0)->m))) #endif +#ifdef HAVE_3ARGS_INIT_WORK + +#define spl_init_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), (void *)(d)) +#define spl_get_work_data(type,field,data) (data) + +#else + +#define spl_init_work(wq,cb,d) INIT_WORK((wq), (void *)(cb)); +#define spl_get_work_data(type,field,data) container_of(data,type,field) + +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/types.h b/include/sys/types.h index dc660a761..c2ad9837d 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -7,9 +7,17 @@ extern "C" { #include #include +#include "spl_config.h" + +#ifndef HAVE_UINTPTR_T +typedef unsigned long uintptr_t; +#endif + +#ifndef HAVE_KMEM_CACHE_T +typedef struct kmem_cache kmem_cache_t; +#endif typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; -typedef unsigned long uintptr_t; typedef unsigned long intptr_t; typedef unsigned long ulong_t; typedef unsigned int uint_t; diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 9123d7a13..eca33f4b1 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -40,6 +40,7 @@ extern "C" { #include #include #include +#include #include #include #include @@ -92,6 +93,14 @@ extern "C" { #define B_INVAL 0x01 #define B_TRUNC 0x02 +#ifdef HAVE_PATH_IN_NAMEIDATA +# define nd_dentry path.dentry +# define nd_mnt path.mnt +#else +# define nd_dentry dentry +# define nd_mnt mnt +#endif + typedef enum vtype { VNON = 0, VREG = 1, diff --git a/lib/list.c b/lib/list.c index 88af47c40..ee6b33a83 100644 --- a/lib/list.c +++ b/lib/list.c @@ -26,7 +26,7 @@ #ifdef HAVE_CONFIG_H -# include "config.h" +# include "spl_config.h" #endif /* HAVE_CONFIG_H */ #ifdef WITH_PTHREADS diff --git a/modules/Makefile.in b/modules/Makefile.in index cbc84403c..86f8951ae 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -2,9 +2,9 @@ subdir-m += spl subdir-m += splat all: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules + $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules install uninstall clean distclean maintainer-clean distdir: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ check: diff --git a/modules/spl/Makefile.in b/modules/spl/Makefile.in index 1bb979c45..f92945b00 100644 --- a/modules/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -4,7 +4,7 @@ MODULES := spl DISTFILES = Makefile.in \ spl-kmem.c spl-rwlock.c spl-taskq.c \ spl-thread.c spl-generic.c -CPPFLAGS += @KERNELCPPFLAGS@ +EXTRA_CFLAGS = @KERNELCPPFLAGS@ # Solaris porting layer module obj-m := spl.o diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index 656df9614..1fd38e30a 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -44,7 +44,6 @@ #include #include #include -#include "config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -1118,7 +1117,7 @@ void spl_debug_dumpstack(struct task_struct *tsk) tsk = current; printk(KERN_ERR "SPL: Showing stack for process %d\n", tsk->pid); - show_task(tsk); + dump_stack(); } EXPORT_SYMBOL(spl_debug_dumpstack); @@ -1255,8 +1254,13 @@ debug_init(void) if (rc) return rc; +#ifdef HAVE_ATOMIC_PANIC_NOTIFIER atomic_notifier_chain_register(&panic_notifier_list, &spl_panic_notifier); +#else + notifier_chain_register(&panic_notifier_list, + &spl_panic_notifier); +#endif return rc; } @@ -1306,8 +1310,14 @@ trace_fini(void) void debug_fini(void) { +#ifdef HAVE_ATOMIC_PANIC_NOTIFIER atomic_notifier_chain_unregister(&panic_notifier_list, &spl_panic_notifier); +#else + notifier_chain_unregister(&panic_notifier_list, + &spl_panic_notifier); +#endif + trace_fini(); return; diff --git a/modules/spl/spl-err.c b/modules/spl/spl-err.c index 67aea5f0d..c4508dfa2 100644 --- a/modules/spl/spl-err.c +++ b/modules/spl/spl-err.c @@ -26,7 +26,6 @@ #include #include -#include "config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index ac6cbf719..721772762 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -33,7 +33,6 @@ #include #include #include -#include "config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -101,7 +100,7 @@ set_hostid(void) char sh_path[] = "/bin/sh"; char *argv[] = { sh_path, "-c", - "/usr/bin/hostid >/proc/sys/spl/hostid", + "/usr/bin/hostid >/proc/sys/kernel/spl/hostid", NULL }; char *envp[] = { "HOME=/", "TERM=linux", diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 284258803..6de620303 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -104,7 +104,15 @@ typedef struct kmem_cache_cb { static struct rw_semaphore kmem_cache_cb_sem; static struct list_head kmem_cache_cb_list; +#ifdef HAVE_SET_SHRINKER static struct shrinker *kmem_cache_shrinker; +#else +static int kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask); +static struct shrinker kmem_cache_shrinker = { + .shrink = kmem_cache_generic_shrinker, + .seeks = KMC_DEFAULT_SEEKS, +}; +#endif /* Function must be called while holding the kmem_cache_cb_sem * Because kmem_cache_t is an opaque datatype we're forced to @@ -166,19 +174,21 @@ kmem_cache_remove_cache_cb(kmem_cache_cb_t *kcc) } } +#ifdef HAVE_3ARG_KMEM_CACHE_CREATE_CTOR static void -kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long flags) +kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, + unsigned long flags) { kmem_cache_cb_t *kcc; kmem_constructor_t constructor; void *private; - ASSERT(flags & SLAB_CTOR_CONSTRUCTOR); - /* Ensure constructor verifies are not passed to the registered * constructors. This may not be safe due to the Solaris constructor * not being aware of how to handle the SLAB_CTOR_VERIFY flag */ + ASSERT(flags & SLAB_CTOR_CONSTRUCTOR); + if (flags & SLAB_CTOR_VERIFY) return; @@ -186,7 +196,15 @@ kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, unsigned long fla flags = KM_NOSLEEP; else flags = KM_SLEEP; - +#else +static void +kmem_cache_generic_constructor(kmem_cache_t *cache, void *ptr) +{ + kmem_cache_cb_t *kcc; + kmem_constructor_t constructor; + void *private; + int flags = KM_NOSLEEP; +#endif /* We can be called with interrupts disabled so it is critical that * this function and the registered constructor never sleep. */ @@ -244,7 +262,7 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag atomic_dec(&kcc->kcc_ref); } -/* XXX - Arguments are ignored */ +/* Arguments are ignored */ static int kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) { @@ -306,6 +324,7 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) #undef kmem_cache_create #undef kmem_cache_destroy #undef kmem_cache_alloc +#undef kmem_cache_free kmem_cache_t * __kmem_cache_create(char *name, size_t size, size_t align, @@ -329,23 +348,32 @@ __kmem_cache_create(char *name, size_t size, size_t align, RETURN(NULL); strcpy(cache_name, name); + +#ifdef HAVE_KMEM_CACHE_CREATE_DTOR cache = kmem_cache_create(cache_name, size, align, flags, kmem_cache_generic_constructor, kmem_cache_generic_destructor); +#else + cache = kmem_cache_create(cache_name, size, align, flags, NULL); +#endif if (cache == NULL) RETURN(NULL); /* Register shared shrinker function on initial cache create */ down_read(&kmem_cache_cb_sem); if (list_empty(&kmem_cache_cb_list)) { - kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, - kmem_cache_generic_shrinker); +#ifdef HAVE_SET_SHRINKER + kmem_cache_shrinker = + set_shrinker(KMC_DEFAULT_SEEKS, + kmem_cache_generic_shrinker); if (kmem_cache_shrinker == NULL) { kmem_cache_destroy(cache); up_read(&kmem_cache_cb_sem); RETURN(NULL); } - +#else + register_shrinker(&kmem_cache_shrinker); +#endif } up_read(&kmem_cache_cb_sem); @@ -353,7 +381,11 @@ __kmem_cache_create(char *name, size_t size, size_t align, reclaim, priv, vmp); if (kcc == NULL) { if (shrinker_flag) /* New shrinker registered must be removed */ +#ifdef HAVE_SET_SHRINKER remove_shrinker(kmem_cache_shrinker); +#else + unregister_shrinker(&kmem_cache_shrinker); +#endif kmem_cache_destroy(cache); RETURN(NULL); @@ -383,7 +415,13 @@ __kmem_cache_destroy(kmem_cache_t *cache) up_read(&kmem_cache_cb_sem); name = (char *)kmem_cache_name(cache); + +#ifdef HAVE_KMEM_CACHE_DESTROY_INT rc = kmem_cache_destroy(cache); +#else + kmem_cache_destroy(cache); + rc = 0; +#endif atomic_dec(&kcc->kcc_ref); kmem_cache_remove_cache_cb(kcc); @@ -392,7 +430,11 @@ __kmem_cache_destroy(kmem_cache_t *cache) /* Unregister generic shrinker on removal of all caches */ down_read(&kmem_cache_cb_sem); if (list_empty(&kmem_cache_cb_list)) - remove_shrinker(kmem_cache_shrinker); +#ifdef HAVE_SET_SHRINKER + remove_shrinker(kmem_cache_shrinker); +#else + unregister_shrinker(&kmem_cache_shrinker); +#endif up_read(&kmem_cache_cb_sem); RETURN(rc); @@ -409,22 +451,45 @@ EXPORT_SYMBOL(__kmem_cache_destroy); void * __kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags) { - void *rc; + void *obj; ENTRY; restart: - rc = kmem_cache_alloc(cache, flags); - if ((rc == NULL) && (flags & KM_SLEEP)) { + obj = kmem_cache_alloc(cache, flags); + if ((obj == NULL) && (flags & KM_SLEEP)) { #ifdef DEBUG_KMEM atomic64_inc(&kmem_cache_alloc_failed); #endif /* DEBUG_KMEM */ - GOTO(restart, rc); + GOTO(restart, obj); } - RETURN(rc); +/* When destructor support is removed we must be careful not to + * use the provided constructor which will end up being called + * more often than the destructor which we only call on free. Thus + * we many call the proper constructor when there is no destructor. + */ +#ifndef HAVE_KMEM_CACHE_CREATE_DTOR +#ifdef HAVE_3ARG_KMEM_CACHE_CREATE_CTOR + kmem_cache_generic_constructor(obj, cache, flags); +#else + kmem_cache_generic_constructor(cache, obj); +#endif +#endif + + RETURN(obj); } EXPORT_SYMBOL(__kmem_cache_alloc); +void +__kmem_cache_free(kmem_cache_t *cache, void *obj) +{ +#ifndef HAVE_KMEM_CACHE_CREATE_DTOR + kmem_cache_generic_destructor(obj, cache, 0); +#endif + kmem_cache_free(cache, obj); +} +EXPORT_SYMBOL(__kmem_cache_free); + void __kmem_reap(void) { diff --git a/modules/spl/spl-kobj.c b/modules/spl/spl-kobj.c index 5a08c15dd..28ff74e7c 100644 --- a/modules/spl/spl-kobj.c +++ b/modules/spl/spl-kobj.c @@ -25,7 +25,6 @@ */ #include -#include "config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index f58616cf9..a1c31e182 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -26,7 +26,6 @@ #include #include -#include "config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 8fb561471..82aff155f 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -171,6 +171,11 @@ __mutex_tryenter(kmutex_t *mp) } EXPORT_SYMBOL(__mutex_tryenter); +#ifndef HAVE_TASK_CURR +#define task_curr(owner) 0 +#endif + + static void mutex_enter_adaptive(kmutex_t *mp) { diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 00ec5cf42..dd87bf007 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -39,8 +39,10 @@ static unsigned long table_max = ~0; #ifdef CONFIG_SYSCTL static struct ctl_table_header *spl_header = NULL; +#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) static struct proc_dir_entry *proc_sys = NULL; static struct proc_dir_entry *proc_sys_spl = NULL; +#endif #ifdef DEBUG_MUTEX static struct proc_dir_entry *proc_sys_spl_mutex = NULL; static struct proc_dir_entry *proc_sys_spl_mutex_stats = NULL; @@ -53,6 +55,49 @@ struct proc_dir_entry *proc_sys_spl_kstat = NULL; #endif #endif +#ifdef HAVE_CTL_UNNUMBERED + +#define CTL_SPL CTL_UNNUMBERED +#define CTL_SPL_DEBUG CTL_UNNUMBERED +#define CTL_SPL_MUTEX CTL_UNNUMBERED +#define CTL_SPL_KMEM CTL_UNNUMBERED +#define CTL_SPL_KSTAT CTL_UNNUMBERED + +#define CTL_VERSION CTL_UNNUMBERED /* Version */ +#define CTL_HOSTID CTL_UNNUMBERED /* Host id by /usr/bin/hostid */ +#define CTL_HW_SERIAL CTL_UNNUMBERED /* HW serial number by hostid */ + +#define CTL_DEBUG_SUBSYS CTL_UNNUMBERED /* Debug subsystem */ +#define CTL_DEBUG_MASK CTL_UNNUMBERED /* Debug mask */ +#define CTL_DEBUG_PRINTK CTL_UNNUMBERED /* All messages to console */ +#define CTL_DEBUG_MB CTL_UNNUMBERED /* Debug buffer size */ +#define CTL_DEBUG_BINARY CTL_UNNUMBERED /* Binary data in buffer */ +#define CTL_DEBUG_CATASTROPHE CTL_UNNUMBERED /* Set if BUG'd or panic'd */ +#define CTL_DEBUG_PANIC_ON_BUG CTL_UNNUMBERED /* Should panic on BUG */ +#define CTL_DEBUG_PATH CTL_UNNUMBERED /* Dump log location */ +#define CTL_DEBUG_DUMP CTL_UNNUMBERED /* Dump debug buffer to file */ +#define CTL_DEBUG_FORCE_BUG CTL_UNNUMBERED /* Hook to force a BUG */ +#define CTL_DEBUG_STACK_SIZE CTL_UNNUMBERED /* Max observed stack size */ + +#define CTL_CONSOLE_RATELIMIT CTL_UNNUMBERED /* Ratelimit console messages */ +#define CTL_CONSOLE_MAX_DELAY_CS CTL_UNNUMBERED /* Max delay skip messages */ +#define CTL_CONSOLE_MIN_DELAY_CS CTL_UNNUMBERED /* Init delay skip messages */ +#define CTL_CONSOLE_BACKOFF CTL_UNNUMBERED /* Delay increase factor */ + +#ifdef DEBUG_KMEM +#define CTL_KMEM_KMEMUSED CTL_UNNUMBERED /* Alloc'd kmem bytes */ +#define CTL_KMEM_KMEMMAX CTL_UNNUMBERED /* Max alloc'd by kmem bytes */ +#define CTL_KMEM_VMEMUSED CTL_UNNUMBERED /* Alloc'd vmem bytes */ +#define CTL_KMEM_VMEMMAX CTL_UNNUMBERED /* Max alloc'd by vmem bytes */ +#define CTL_KMEM_ALLOC_FAILED CTL_UNNUMBERED /* Cache allocations failed */ +#endif + +#define CTL_MUTEX_STATS CTL_UNNUMBERED /* Global mutex statistics */ +#define CTL_MUTEX_STATS_PER CTL_UNNUMBERED /* Per mutex statistics */ +#define CTL_MUTEX_SPIN_MAX CTL_UNNUMBERED /* Max mutex spin iterations */ + +#else /* HAVE_CTL_UNNUMBERED */ + #define CTL_SPL 0x87 #define CTL_SPL_DEBUG 0x88 #define CTL_SPL_MUTEX 0x89 @@ -82,9 +127,9 @@ enum { CTL_CONSOLE_BACKOFF, /* Delay increase factor */ #ifdef DEBUG_KMEM - CTL_KMEM_KMEMUSED, /* Crrently alloc'd kmem bytes */ + CTL_KMEM_KMEMUSED, /* Alloc'd kmem bytes */ CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ - CTL_KMEM_VMEMUSED, /* Currently alloc'd vmem bytes */ + CTL_KMEM_VMEMUSED, /* Alloc'd vmem bytes */ CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ CTL_KMEM_ALLOC_FAILED, /* Cache allocation failed */ #endif @@ -93,6 +138,7 @@ enum { CTL_MUTEX_STATS_PER, /* Per mutex statistics */ CTL_MUTEX_SPIN_MAX, /* Maximum mutex spin iterations */ }; +#endif /* HAVE_CTL_UNNUMBERED */ static int proc_copyin_string(char *kbuffer, int kbuffer_size, @@ -775,7 +821,17 @@ static struct ctl_table spl_dir[] = { .mode = 0555, .child = spl_table, }, - {0} + { 0 } +}; + +static struct ctl_table spl_root[] = { + { + .ctl_name = CTL_KERN, + .procname = "kernel", + .mode = 0555, + .child = spl_dir, + }, + { 0 } }; static int @@ -818,10 +874,11 @@ proc_init(void) ENTRY; #ifdef CONFIG_SYSCTL - spl_header = register_sysctl_table(spl_dir, 0); + spl_header = spl_register_sysctl_table(spl_root, 0); if (spl_header == NULL) RETURN(-EUNATCH); +#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) proc_sys = proc_dir_entry_find(&proc_root, "sys"); if (proc_sys == NULL) GOTO(out, rc = -EUNATCH); @@ -829,6 +886,7 @@ proc_init(void) proc_sys_spl = proc_dir_entry_find(proc_sys, "spl"); if (proc_sys_spl == NULL) GOTO(out, rc = -EUNATCH); +#endif #ifdef DEBUG_MUTEX proc_sys_spl_mutex = proc_dir_entry_find(proc_sys_spl, "mutex"); @@ -862,8 +920,10 @@ out2: #ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_sys_spl_mutex); #endif /* DEBUG_MUTEX */ +#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) out: - unregister_sysctl_table(spl_header); +#endif + spl_unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ RETURN(rc); } @@ -878,7 +938,7 @@ proc_fini(void) #ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_sys_spl_mutex); #endif /* DEBUG_MUTEX */ - unregister_sysctl_table(spl_header); + spl_unregister_sysctl_table(spl_header); #endif EXIT; } diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index 966e9a5a1..a2cfd6e46 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -26,7 +26,6 @@ #include #include -#include "config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 4492e7797..7ff35a8f6 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -26,7 +26,6 @@ #include #include -#include "config.h" #ifdef DEBUG_SUBSYSTEM @@ -105,7 +104,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, { struct file *fp; struct kstat stat; - int rc, saved_umask; + int rc, saved_umask = 0; vnode_t *vp; ENTRY; @@ -243,11 +242,17 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) } /* vn_close() */ EXPORT_SYMBOL(vn_close); -static struct dentry *lookup_hash(struct nameidata *nd) +static struct dentry *vn_lookup_hash(struct nameidata *nd) { - return __lookup_hash(&nd->last, nd->dentry, nd); + return lookup_one_len(nd->last.name, nd->nd_dentry, nd->last.len); } /* lookup_hash() */ +static void vn_path_release(struct nameidata *nd) +{ + dput(nd->nd_dentry); + mntput(nd->nd_mnt); +} + /* Modified do_unlinkat() from linux/fs/namei.c, only uses exported symbols */ int vn_remove(const char *path, uio_seg_t seg, int flags) @@ -269,8 +274,8 @@ vn_remove(const char *path, uio_seg_t seg, int flags) if (nd.last_type != LAST_NORM) GOTO(exit1, rc); - mutex_lock_nested(&nd.dentry->d_inode->i_mutex, I_MUTEX_PARENT); - dentry = lookup_hash(&nd); + mutex_lock_nested(&nd.nd_dentry->d_inode->i_mutex, I_MUTEX_PARENT); + dentry = vn_lookup_hash(&nd); rc = PTR_ERR(dentry); if (!IS_ERR(dentry)) { /* Why not before? Because we want correct rc value */ @@ -280,15 +285,15 @@ vn_remove(const char *path, uio_seg_t seg, int flags) inode = dentry->d_inode; if (inode) atomic_inc(&inode->i_count); - rc = vfs_unlink(nd.dentry->d_inode, dentry); + rc = vfs_unlink(nd.nd_dentry->d_inode, dentry); exit2: dput(dentry); } - mutex_unlock(&nd.dentry->d_inode->i_mutex); + mutex_unlock(&nd.nd_dentry->d_inode->i_mutex); if (inode) iput(inode); /* truncate the inode here */ exit1: - path_release(&nd); + vn_path_release(&nd); exit: RETURN(-rc); @@ -319,21 +324,21 @@ vn_rename(const char *oldname, const char *newname, int x1) GOTO(exit1, rc); rc = -EXDEV; - if (oldnd.mnt != newnd.mnt) + if (oldnd.nd_mnt != newnd.nd_mnt) GOTO(exit2, rc); - old_dir = oldnd.dentry; + old_dir = oldnd.nd_dentry; rc = -EBUSY; if (oldnd.last_type != LAST_NORM) GOTO(exit2, rc); - new_dir = newnd.dentry; + new_dir = newnd.nd_dentry; if (newnd.last_type != LAST_NORM) GOTO(exit2, rc); trap = lock_rename(new_dir, old_dir); - old_dentry = lookup_hash(&oldnd); + old_dentry = vn_lookup_hash(&oldnd); rc = PTR_ERR(old_dentry); if (IS_ERR(old_dentry)) @@ -358,7 +363,7 @@ vn_rename(const char *oldname, const char *newname, int x1) if (old_dentry == trap) GOTO(exit4, rc); - new_dentry = lookup_hash(&newnd); + new_dentry = vn_lookup_hash(&newnd); rc = PTR_ERR(new_dentry); if (IS_ERR(new_dentry)) GOTO(exit4, rc); @@ -377,9 +382,9 @@ exit4: exit3: unlock_rename(new_dir, old_dir); exit2: - path_release(&newnd); + vn_path_release(&newnd); exit1: - path_release(&oldnd); + vn_path_release(&oldnd); exit: RETURN(-rc); } @@ -610,7 +615,8 @@ int vn_init(void) { ENTRY; - vn_cache = kmem_cache_create("spl_vn_cache", sizeof(struct vnode), 64, + vn_cache = kmem_cache_create("spl_vn_cache", + sizeof(struct vnode), 64, vn_cache_constructor, vn_cache_destructor, NULL, NULL, NULL, 0); diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index 1a48a788e..eaab508a9 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -6,8 +6,7 @@ DISTFILES = Makefile.in \ splat-time.c splat-condvar.c splat-mutex.c \ splat-rwlock.c splat-thread.c \ splat-ctl.c splat-internal.h - -CPPFLAGS += @KERNELCPPFLAGS@ +EXTRA_CFLAGS = @KERNELCPPFLAGS@ # Solaris Porting LAyer Tests obj-m := splat.o diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index ea234a296..f29a98dfa 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -41,7 +41,6 @@ */ #include "splat-internal.h" -#include #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #include diff --git a/modules/splat/splat-mutex.c b/modules/splat/splat-mutex.c index d15903e58..640f8f407 100644 --- a/modules/splat/splat-mutex.c +++ b/modules/splat/splat-mutex.c @@ -59,7 +59,7 @@ typedef struct mutex_priv { int mp_rc; } mutex_priv_t; - +#ifdef HAVE_3ARGS_INIT_WORK static void splat_mutex_test1_work(void *priv) { @@ -71,14 +71,16 @@ splat_mutex_test1_work(void *priv) if (!mutex_tryenter(&mp->mp_mtx)) mp->mp_rc = -EBUSY; } +#endif static int splat_mutex_test1(struct file *file, void *arg) { + int rc = 0; +#ifdef HAVE_3ARGS_INIT_WORK struct workqueue_struct *wq; struct work_struct work; mutex_priv_t *mp; - int rc = 0; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); if (mp == NULL) @@ -141,10 +143,11 @@ out: destroy_workqueue(wq); out2: kfree(mp); - +#endif return rc; } +#ifdef HAVE_3ARGS_INIT_WORK static void splat_mutex_test2_work(void *priv) { @@ -162,13 +165,16 @@ splat_mutex_test2_work(void *priv) mp->mp_rc = rc + 1; mutex_exit(&mp->mp_mtx); } +#endif static int splat_mutex_test2(struct file *file, void *arg) { + int rc = 0; +#ifdef HAVE_3ARGS_INIT_WORK struct workqueue_struct *wq; mutex_priv_t *mp; - int i, rc = 0; + int i; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); if (mp == NULL) @@ -220,7 +226,7 @@ splat_mutex_test2(struct file *file, void *arg) destroy_workqueue(wq); out: kfree(mp); - +#endif return rc; } From f93f7c8dbe6b7bfd778f96f73f4f6e5c5e107254 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 2 Jun 2008 18:41:30 +0000 Subject: [PATCH 0113/1062] This should have been part of the previous autoconf commit. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@120 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- build/Makefile | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/Makefile diff --git a/build/Makefile b/build/Makefile new file mode 100644 index 000000000..f84b8e9cc --- /dev/null +++ b/build/Makefile @@ -0,0 +1 @@ +obj-m := conftest.o From fe81cb1c435e59c2f2a1d0ea210b24230cc8f22b Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 2 Jun 2008 19:45:04 +0000 Subject: [PATCH 0114/1062] Add the minimal set of kernel patches need to for the SPL. Hopefully even these will not be needed over the next few weeks. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@121 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- patches/16kstack-x86_64.patch | 13 +++++++++++++ patches/task-curr-export.patch | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 patches/16kstack-x86_64.patch create mode 100644 patches/task-curr-export.patch diff --git a/patches/16kstack-x86_64.patch b/patches/16kstack-x86_64.patch new file mode 100644 index 000000000..330cedddf --- /dev/null +++ b/patches/16kstack-x86_64.patch @@ -0,0 +1,13 @@ +Index: linux+rh+chaos/include/asm-x86_64/page.h +=================================================================== +--- linux+rh+chaos.orig/include/asm-x86_64/page.h ++++ linux+rh+chaos/include/asm-x86_64/page.h +@@ -10,7 +10,7 @@ + #define PAGE_MASK (~(PAGE_SIZE-1)) + #define PHYSICAL_PAGE_MASK (~(PAGE_SIZE-1) & __PHYSICAL_MASK) + +-#define THREAD_ORDER 1 ++#define THREAD_ORDER 2 + #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) + #define CURRENT_MASK (~(THREAD_SIZE-1)) + diff --git a/patches/task-curr-export.patch b/patches/task-curr-export.patch new file mode 100644 index 000000000..53007d2ba --- /dev/null +++ b/patches/task-curr-export.patch @@ -0,0 +1,12 @@ +Index: linux+rh+chaos/kernel/sched.c +=================================================================== +--- linux+rh+chaos.orig/kernel/sched.c ++++ linux+rh+chaos/kernel/sched.c +@@ -1038,6 +1038,7 @@ inline int task_curr(const struct task_s + { + return cpu_curr(task_cpu(p)) == p; + } ++EXPORT_SYMBOL(task_curr); + + /* Used instead of source_load when we know the type == 0 */ + unsigned long weighted_cpuload(const int cpu) From 684f787474561bb28e1217c5ae2d897aa80e1d87 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 3 Jun 2008 20:58:55 +0000 Subject: [PATCH 0115/1062] Fix missing return resulting in a double unlock of &files->file_lock and a hang on subsequent sys_close. I'm not quite sure why the Fedora kernel caught this bug the Chaos kernel did not, but I'm glad! Convert remaining BUG_ON's to ASSERTs git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@122 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/splat/splat-atomic.c | 4 ++-- modules/splat/splat-vnode.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/splat/splat-atomic.c b/modules/splat/splat-atomic.c index 4de5ef033..05afdb64b 100644 --- a/modules/splat/splat-atomic.c +++ b/modules/splat/splat-atomic.c @@ -110,7 +110,7 @@ splat_atomic_work(void *priv) atomic_sub_64_nv(&ap->ap_atomic, 5); break; default: - BUG_ON(1); + SBUG(); } } @@ -153,7 +153,7 @@ splat_atomic_test1(struct file *file, void *arg) thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work, &ap, 0, &p0, TS_RUN, minclsyspri); - BUG_ON(thr == NULL); + ASSERT(thr); /* Prepare to wait, the new thread will wake us once it * has made a copy of the unique private passed data */ diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index a72dac94b..6f9750388 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -374,6 +374,7 @@ fd_uninstall(int fd) * case I think that's reasonable. */ spin_unlock(&files->file_lock); put_unused_fd(fd); + return 0; out_unlock: spin_unlock(&files->file_lock); From 691d2bd73332fcff869860b3e6a2e37a04f737f2 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 3 Jun 2008 21:20:18 +0000 Subject: [PATCH 0116/1062] Update utsname to use proper compatible interface to avoid API issues. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@123 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/utsname.h | 4 +++- modules/spl/spl-generic.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/sys/utsname.h b/include/sys/utsname.h index 7b1563d4b..d4b9dc8ae 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -3,6 +3,8 @@ #include -#define utsname system_utsname +extern struct new_utsname *__utsname(void); + +#define utsname (*__utsname()) #endif /* SPL_UTSNAME_H */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 721772762..3027c7108 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #ifdef DEBUG_SUBSYSTEM @@ -94,6 +95,12 @@ ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) } EXPORT_SYMBOL(ddi_strtoul); +struct new_utsname *__utsname(void) +{ + return init_utsname(); +} +EXPORT_SYMBOL(__utsname); + static int set_hostid(void) { From c30df9c8630b3b05cfbbf5c1700030f47e5b77c7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 4 Jun 2008 06:00:46 +0000 Subject: [PATCH 0117/1062] Fixes: 1) Ensure mutex_init() never fails in the case of ENOMEM by retrying forever. I don't think I've ever seen this happen but it was clear after code inspection that if it did we would immediately crash. 2) Enable full debugging in check.sh for sanity tests. Might as well get as much debug as we can in the case of a failure. 3) Reworked list of kmem caches tracked by SPL in to a hash with the key based on the address of the kmem_cache_t. This should speed up the constructor/destructor/shrinker lookup needed now for newer kernel which removed the destructor support. 4) Updated kmem_cache_create to handle the case where CONFIG_SLUB is defined. The slub would occasionally merge slab caches which resulted in non-unique keys for our hash lookup in 3). To fix this we detect if the slub is enabled and then set the needed flag to prevent this merging from ever occuring. 5) New kernels removed the proc_dir_entry pointer from items registered by sysctl. This means we can no long be sneaky and manually insert things in to the sysctl tree simply by walking the proc tree. So I'm forced to create a seperate tree for all the things I can't easily support via sysctl interface. I don't like it but it will do for now. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@124 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 11 +++ configure.ac | 1 + include/sys/debug.h | 2 +- include/sys/mutex.h | 7 +- include/sys/proc.h | 2 +- modules/spl/spl-kmem.c | 144 ++++++++++++++++++++++++---------------- modules/spl/spl-kstat.c | 4 +- modules/spl/spl-mutex.c | 14 ++-- modules/spl/spl-proc.c | 89 +++++++++++++------------ scripts/check.sh | 3 +- 10 files changed, 163 insertions(+), 114 deletions(-) diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index d2d476d4f..db0960695 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -280,6 +280,17 @@ AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], fi ]) +dnl # +dnl # 2.6.x API change +dnl # Slab can now be implemented in terms of the Slub which provides +dnl # slightly different semantics in terms of merged caches. +dnl # +AC_DEFUN([SPL_AC_SLUB], [ + SPL_LINUX_CONFIG([SLUB], + [AC_DEFINE(HAVE_SLUB, 1, [slub support configured])], + []) +]) + dnl # dnl # 2.6.x API change dnl # check if uintptr_t typedef is defined diff --git a/configure.ac b/configure.ac index df210ee52..21e901d66 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,7 @@ SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_MUTEX SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB +SPL_AC_SLUB SPL_AC_TYPE_UINTPTR_T SPL_AC_TYPE_KMEM_CACHE_T SPL_AC_KMEM_CACHE_DESTROY_INT diff --git a/include/sys/debug.h b/include/sys/debug.h index 84278e2e1..7385b357c 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -291,7 +291,7 @@ do { \ if (unlikely(!(cond))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ - "ASSERTION(" #cond ") failed:" fmt, \ + "ASSERTION(" #cond ") failed: " fmt, \ ## a); \ SBUG(); \ } \ diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 7ce807a29..a26b2116a 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -78,7 +78,7 @@ extern struct list_head mutex_stats_list; int spl_mutex_init(void); void spl_mutex_fini(void); -extern void __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc); +extern int __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc); extern void __spl_mutex_destroy(kmutex_t *mp); extern int __mutex_tryenter(kmutex_t *mp); extern void __mutex_enter(kmutex_t *mp); @@ -91,10 +91,11 @@ extern kthread_t *__spl_mutex_owner(kmutex_t *mp); #define mutex_init(mp, name, type, ibc) \ ({ \ + /* May never fail or all subsequent mutex_* calls will ASSERT */\ if ((name) == NULL) \ - __spl_mutex_init(mp, #mp, type, ibc); \ + while(__spl_mutex_init(mp, #mp, type, ibc)); \ else \ - __spl_mutex_init(mp, name, type, ibc); \ + while(__spl_mutex_init(mp, name, type, ibc)); \ }) #define mutex_destroy(mp) __spl_mutex_destroy(mp) #define mutex_tryenter(mp) __mutex_tryenter(mp) diff --git a/include/sys/proc.h b/include/sys/proc.h index 0316a45fd..c6e4a13cf 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -49,7 +49,7 @@ #endif /* CONFIG_SYSCTL */ #ifdef DEBUG_KSTAT -extern struct proc_dir_entry *proc_sys_spl_kstat; +extern struct proc_dir_entry *proc_spl_kstat; struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, const char *str); int proc_dir_entries(struct proc_dir_entry *root); diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 6de620303..b254bba34 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -92,6 +92,7 @@ EXPORT_SYMBOL(kmem_set_warning); typedef struct kmem_cache_cb { int kcc_magic; + struct hlist_node kcc_hlist; struct list_head kcc_list; kmem_cache_t * kcc_cache; kmem_constructor_t kcc_constructor; @@ -102,8 +103,13 @@ typedef struct kmem_cache_cb { atomic_t kcc_ref; } kmem_cache_cb_t; -static struct rw_semaphore kmem_cache_cb_sem; -static struct list_head kmem_cache_cb_list; +#define KMEM_CACHE_HASH_BITS 10 +#define KMEM_CACHE_TABLE_SIZE (1 << KMEM_CACHE_HASH_BITS) + +struct hlist_head kmem_cache_table[KMEM_CACHE_TABLE_SIZE]; +struct list_head kmem_cache_list; +static struct rw_semaphore kmem_cache_sem; + #ifdef HAVE_SET_SHRINKER static struct shrinker *kmem_cache_shrinker; #else @@ -114,20 +120,23 @@ static struct shrinker kmem_cache_shrinker = { }; #endif -/* Function must be called while holding the kmem_cache_cb_sem +/* Function must be called while holding the kmem_cache_sem * Because kmem_cache_t is an opaque datatype we're forced to * match pointers to identify specific cache entires. */ static kmem_cache_cb_t * kmem_cache_find_cache_cb(kmem_cache_t *cache) { + struct hlist_head *head; + struct hlist_node *node; kmem_cache_cb_t *kcc; #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - ASSERT(rwsem_is_locked(&kmem_cache_cb_sem)); + ASSERT(rwsem_is_locked(&kmem_cache_sem)); #endif - list_for_each_entry(kcc, &kmem_cache_cb_list, kcc_list) - if (cache == kcc->kcc_cache) + head = &kmem_cache_table[hash_ptr(cache, KMEM_CACHE_HASH_BITS)]; + hlist_for_each_entry_rcu(kcc, node, head, kcc_hlist) + if (kcc->kcc_cache == cache) return kcc; return NULL; @@ -152,9 +161,11 @@ kmem_cache_add_cache_cb(kmem_cache_t *cache, kcc->kcc_private = priv; kcc->kcc_vmp = vmp; atomic_set(&kcc->kcc_ref, 0); - down_write(&kmem_cache_cb_sem); - list_add(&kcc->kcc_list, &kmem_cache_cb_list); - up_write(&kmem_cache_cb_sem); + down_write(&kmem_cache_sem); + hlist_add_head_rcu(&kcc->kcc_hlist, &kmem_cache_table[ + hash_ptr(cache, KMEM_CACHE_HASH_BITS)]); + list_add_tail(&kcc->kcc_list, &kmem_cache_list); + up_write(&kmem_cache_sem); } return kcc; @@ -163,12 +174,13 @@ kmem_cache_add_cache_cb(kmem_cache_t *cache, static void kmem_cache_remove_cache_cb(kmem_cache_cb_t *kcc) { - down_write(&kmem_cache_cb_sem); + down_write(&kmem_cache_sem); ASSERT(atomic_read(&kcc->kcc_ref) == 0); - list_del(&kcc->kcc_list); - up_write(&kmem_cache_cb_sem); + hlist_del_init(&kcc->kcc_hlist); + list_del_init(&kcc->kcc_list); + up_write(&kmem_cache_sem); - if (kcc){ + if (kcc) { memset(kcc, KCC_POISON, sizeof(*kcc)); kfree(kcc); } @@ -208,7 +220,7 @@ kmem_cache_generic_constructor(kmem_cache_t *cache, void *ptr) /* We can be called with interrupts disabled so it is critical that * this function and the registered constructor never sleep. */ - while (!down_read_trylock(&kmem_cache_cb_sem)); + while (!down_read_trylock(&kmem_cache_sem)); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); @@ -219,7 +231,7 @@ kmem_cache_generic_constructor(kmem_cache_t *cache, void *ptr) constructor = kcc->kcc_constructor; private = kcc->kcc_private; - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); if (constructor) constructor(ptr, private, (int)flags); @@ -242,7 +254,7 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag /* We can be called with interrupts disabled so it is critical that * this function and the registered constructor never sleep. */ - while (!down_read_trylock(&kmem_cache_cb_sem)); + while (!down_read_trylock(&kmem_cache_sem)); /* Callback list must be in sync with linux slab caches */ kcc = kmem_cache_find_cache_cb(cache); @@ -253,7 +265,7 @@ kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flag destructor = kcc->kcc_destructor; private = kcc->kcc_private; - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); /* Solaris destructor takes no flags, silently eat them */ if (destructor) @@ -276,9 +288,9 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * function in the shim layer for all slab caches. And we always * attempt to shrink all caches when this generic shrinker is called. */ - down_read(&kmem_cache_cb_sem); + down_read(&kmem_cache_sem); - list_for_each_entry(kcc, &kmem_cache_cb_list, kcc_list) { + list_for_each_entry(kcc, &kmem_cache_list, kcc_list) { ASSERT(kcc); ASSERT(kcc->kcc_magic == KCC_MAGIC); @@ -312,7 +324,7 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * was registered with the generic shrinker. This should fake out * the linux VM when it attempts to shrink caches. */ - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); return total; } @@ -349,6 +361,25 @@ __kmem_cache_create(char *name, size_t size, size_t align, strcpy(cache_name, name); + /* When your slab is implemented in terms of the slub it + * is possible similarly sized slab caches will be merged. + * For our implementation we must make sure this never + * happens because we require a unique cache address to + * use as a hash key when looking up the constructor, + * destructor, and shrinker registered for each unique + * type of slab cache. Passing any of the following flags + * will prevent the slub merging. + * + * SLAB_RED_ZONE + * SLAB_POISON + * SLAB_STORE_USER + * SLAB_TRACE + * SLAB_DESTROY_BY_RCU + */ +#ifdef HAVE_SLUB + flags |= SLAB_STORE_USER; +#endif + #ifdef HAVE_KMEM_CACHE_CREATE_DTOR cache = kmem_cache_create(cache_name, size, align, flags, kmem_cache_generic_constructor, @@ -360,22 +391,21 @@ __kmem_cache_create(char *name, size_t size, size_t align, RETURN(NULL); /* Register shared shrinker function on initial cache create */ - down_read(&kmem_cache_cb_sem); - if (list_empty(&kmem_cache_cb_list)) { + down_read(&kmem_cache_sem); + if (list_empty(&kmem_cache_list)) { #ifdef HAVE_SET_SHRINKER - kmem_cache_shrinker = - set_shrinker(KMC_DEFAULT_SEEKS, - kmem_cache_generic_shrinker); + kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, + kmem_cache_generic_shrinker); if (kmem_cache_shrinker == NULL) { kmem_cache_destroy(cache); - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); RETURN(NULL); } #else register_shrinker(&kmem_cache_shrinker); #endif } - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); kcc = kmem_cache_add_cache_cb(cache, constructor, destructor, reclaim, priv, vmp); @@ -405,14 +435,14 @@ __kmem_cache_destroy(kmem_cache_t *cache) int rc; ENTRY; - down_read(&kmem_cache_cb_sem); + down_read(&kmem_cache_sem); kcc = kmem_cache_find_cache_cb(cache); if (kcc == NULL) { - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); RETURN(-EINVAL); } atomic_inc(&kcc->kcc_ref); - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); name = (char *)kmem_cache_name(cache); @@ -428,15 +458,15 @@ __kmem_cache_destroy(kmem_cache_t *cache) kfree(name); /* Unregister generic shrinker on removal of all caches */ - down_read(&kmem_cache_cb_sem); - if (list_empty(&kmem_cache_cb_list)) + down_read(&kmem_cache_sem); + if (list_empty(&kmem_cache_list)) #ifdef HAVE_SET_SHRINKER remove_shrinker(kmem_cache_shrinker); #else unregister_shrinker(&kmem_cache_shrinker); #endif - up_read(&kmem_cache_cb_sem); + up_read(&kmem_cache_sem); RETURN(rc); } EXPORT_SYMBOL(__kmem_cache_destroy); @@ -463,18 +493,18 @@ restart: GOTO(restart, obj); } -/* When destructor support is removed we must be careful not to - * use the provided constructor which will end up being called - * more often than the destructor which we only call on free. Thus - * we many call the proper constructor when there is no destructor. - */ + /* When destructor support is removed we must be careful not to + * use the provided constructor which will end up being called + * more often than the destructor which we only call on free. Thus + * we many call the proper constructor when there is no destructor. + */ #ifndef HAVE_KMEM_CACHE_CREATE_DTOR #ifdef HAVE_3ARG_KMEM_CACHE_CREATE_CTOR kmem_cache_generic_constructor(obj, cache, flags); #else kmem_cache_generic_constructor(cache, obj); -#endif -#endif +#endif /* HAVE_KMEM_CACHE_CREATE_DTOR */ +#endif /* HAVE_3ARG_KMEM_CACHE_CREATE_CTOR */ RETURN(obj); } @@ -504,30 +534,32 @@ EXPORT_SYMBOL(__kmem_reap); int kmem_init(void) { + int i; ENTRY; - init_rwsem(&kmem_cache_cb_sem); - INIT_LIST_HEAD(&kmem_cache_cb_list); + init_rwsem(&kmem_cache_sem); + INIT_LIST_HEAD(&kmem_cache_list); + + for (i = 0; i < KMEM_CACHE_TABLE_SIZE; i++) + INIT_HLIST_HEAD(&kmem_cache_table[i]); + #ifdef DEBUG_KMEM - { - int i; - atomic64_set(&kmem_alloc_used, 0); - atomic64_set(&vmem_alloc_used, 0); + atomic64_set(&kmem_alloc_used, 0); + atomic64_set(&vmem_alloc_used, 0); - spin_lock_init(&kmem_lock); - INIT_LIST_HEAD(&kmem_list); + spin_lock_init(&kmem_lock); + INIT_LIST_HEAD(&kmem_list); - for (i = 0; i < KMEM_TABLE_SIZE; i++) - INIT_HLIST_HEAD(&kmem_table[i]); + for (i = 0; i < KMEM_TABLE_SIZE; i++) + INIT_HLIST_HEAD(&kmem_table[i]); - spin_lock_init(&vmem_lock); - INIT_LIST_HEAD(&vmem_list); + spin_lock_init(&vmem_lock); + INIT_LIST_HEAD(&vmem_list); - for (i = 0; i < VMEM_TABLE_SIZE; i++) - INIT_HLIST_HEAD(&vmem_table[i]); + for (i = 0; i < VMEM_TABLE_SIZE; i++) + INIT_HLIST_HEAD(&vmem_table[i]); - atomic64_set(&kmem_cache_alloc_failed, 0); - } + atomic64_set(&kmem_cache_alloc_failed, 0); #endif RETURN(0); } diff --git a/modules/spl/spl-kstat.c b/modules/spl/spl-kstat.c index 4f4dc884f..ae4e15570 100644 --- a/modules/spl/spl-kstat.c +++ b/modules/spl/spl-kstat.c @@ -416,9 +416,9 @@ __kstat_install(kstat_t *ksp) list_add_tail(&ksp->ks_list, &kstat_list); spin_unlock(&kstat_lock); - de_module = proc_dir_entry_find(proc_sys_spl_kstat, ksp->ks_module); + de_module = proc_dir_entry_find(proc_spl_kstat, ksp->ks_module); if (de_module == NULL) { - de_module = proc_mkdir(ksp->ks_module, proc_sys_spl_kstat); + de_module = proc_mkdir(ksp->ks_module, proc_spl_kstat); if (de_module == NULL) GOTO(out, rc = -EUNATCH); } diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 82aff155f..e7ec41cf4 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -59,7 +59,7 @@ spinlock_t mutex_stats_lock; struct list_head mutex_stats_list; #endif -void +int __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) { int flags = KM_SLEEP; @@ -69,8 +69,6 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) ASSERT(ibc == NULL); ASSERT(mp->km_magic != KM_MAGIC); /* Never double init */ - mp->km_magic = KM_MAGIC; - mp->km_owner = NULL; mp->km_name = NULL; mp->km_name_size = strlen(name) + 1; @@ -95,12 +93,12 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) /* Semaphore kmem_alloc'ed to keep struct size down (<64b) */ mp->km_sem = kmem_alloc(sizeof(struct semaphore), flags); if (mp->km_sem == NULL) - return; + return -ENOMEM; mp->km_name = kmem_alloc(mp->km_name_size, flags); if (mp->km_name == NULL) { kmem_free(mp->km_sem, sizeof(struct semaphore)); - return; + return -ENOMEM; } sema_init(mp->km_sem, 1); @@ -111,7 +109,7 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) if (mp->km_stats == NULL) { kmem_free(mp->km_name, mp->km_name_size); kmem_free(mp->km_sem, sizeof(struct semaphore)); - return; + return -ENOMEM; } /* XXX - This appears to be a much more contended lock than I @@ -124,6 +122,10 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) list_add_tail(&mp->km_list, &mutex_stats_list); spin_unlock(&mutex_stats_lock); #endif + mp->km_magic = KM_MAGIC; + mp->km_owner = NULL; + + return 0; } EXPORT_SYMBOL(__spl_mutex_init); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index dd87bf007..f1b01247c 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -39,21 +39,21 @@ static unsigned long table_max = ~0; #ifdef CONFIG_SYSCTL static struct ctl_table_header *spl_header = NULL; +#endif /* CONFIG_SYSCTL */ + #if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) -static struct proc_dir_entry *proc_sys = NULL; -static struct proc_dir_entry *proc_sys_spl = NULL; -#endif +static struct proc_dir_entry *proc_spl = NULL; #ifdef DEBUG_MUTEX -static struct proc_dir_entry *proc_sys_spl_mutex = NULL; -static struct proc_dir_entry *proc_sys_spl_mutex_stats = NULL; -#endif +static struct proc_dir_entry *proc_spl_mutex = NULL; +static struct proc_dir_entry *proc_spl_mutex_stats = NULL; +#endif /* DEBUG_MUTEX */ #ifdef DEBUG_KMEM -static struct proc_dir_entry *proc_sys_spl_kmem = NULL; -#endif +static struct proc_dir_entry *proc_spl_kmem = NULL; +#endif /* DEBUG_KMEM */ #ifdef DEBUG_KSTAT -struct proc_dir_entry *proc_sys_spl_kstat = NULL; -#endif -#endif +struct proc_dir_entry *proc_spl_kstat = NULL; +#endif /* DEBUG_KSTAT */ +#endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ #ifdef HAVE_CTL_UNNUMBERED @@ -877,54 +877,50 @@ proc_init(void) spl_header = spl_register_sysctl_table(spl_root, 0); if (spl_header == NULL) RETURN(-EUNATCH); +#endif /* CONFIG_SYSCTL */ #if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) - proc_sys = proc_dir_entry_find(&proc_root, "sys"); - if (proc_sys == NULL) + proc_spl = proc_mkdir("spl", NULL); + if (proc_spl == NULL) GOTO(out, rc = -EUNATCH); - proc_sys_spl = proc_dir_entry_find(proc_sys, "spl"); - if (proc_sys_spl == NULL) - GOTO(out, rc = -EUNATCH); -#endif - #ifdef DEBUG_MUTEX - proc_sys_spl_mutex = proc_dir_entry_find(proc_sys_spl, "mutex"); - if (proc_sys_spl_mutex == NULL) + proc_spl_mutex = proc_mkdir("mutex", proc_spl); + if (proc_spl_mutex == NULL) GOTO(out, rc = -EUNATCH); - proc_sys_spl_mutex_stats = create_proc_entry("stats_per", 0444, - proc_sys_spl_mutex); - if (proc_sys_spl_mutex_stats == NULL) + proc_spl_mutex_stats = create_proc_entry("stats_per", 0444, + proc_spl_mutex); + if (proc_spl_mutex_stats == NULL) GOTO(out, rc = -EUNATCH); - proc_sys_spl_mutex_stats->proc_fops = &proc_mutex_operations; + proc_spl_mutex_stats->proc_fops = &proc_mutex_operations; #endif /* DEBUG_MUTEX */ #ifdef DEBUG_KMEM - proc_sys_spl_kmem = proc_dir_entry_find(proc_sys_spl, "kmem"); - if (proc_sys_spl_kmem == NULL) - GOTO(out2, rc = -EUNATCH); + proc_spl_kmem = proc_mkdir("kmem", proc_spl); + if (proc_spl_kmem == NULL) + GOTO(out, rc = -EUNATCH); #endif /* DEBUG_KMEM */ #ifdef DEBUG_KSTAT - proc_sys_spl_kstat = proc_dir_entry_find(proc_sys_spl, "kstat"); - if (proc_sys_spl_kstat == NULL) - GOTO(out2, rc = -EUNATCH); + proc_spl_kstat = proc_mkdir("kstat", proc_spl); + if (proc_spl_kstat == NULL) + GOTO(out, rc = -EUNATCH); #endif /* DEBUG_KSTAT */ - RETURN(rc); -#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) -out2: -#endif -#ifdef DEBUG_MUTEX - remove_proc_entry("stats_per", proc_sys_spl_mutex); -#endif /* DEBUG_MUTEX */ -#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) out: -#endif - spl_unregister_sysctl_table(spl_header); + if (rc) { + remove_proc_entry("kstat", proc_spl); + remove_proc_entry("kmem", proc_spl); + remove_proc_entry("stats_per", proc_spl_mutex); + remove_proc_entry("mutex", proc_spl); +#ifdef CONFIG_SYSCTL + spl_unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ + } +#endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ + RETURN(rc); } @@ -933,12 +929,17 @@ proc_fini(void) { ENTRY; +#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) + remove_proc_entry("kstat", proc_spl); + remove_proc_entry("kmem", proc_spl); + remove_proc_entry("stats_per", proc_spl_mutex); + remove_proc_entry("mutex", proc_spl); +#endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ + #ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); -#ifdef DEBUG_MUTEX - remove_proc_entry("stats_per", proc_sys_spl_mutex); -#endif /* DEBUG_MUTEX */ spl_unregister_sysctl_table(spl_header); -#endif +#endif /* CONFIG_SYSCTL */ + EXIT; } diff --git a/scripts/check.sh b/scripts/check.sh index 3b8b75801..3029bf895 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -37,8 +37,9 @@ if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then die "Source tree must be built, run 'make'" fi +spl_module_params="spl_debug_mask=-1 spl_debug_subsys=-1" echo "Loading ${spl_module}" -/sbin/insmod ${spl_module} || die "Failed to load ${spl_module}" +/sbin/insmod ${spl_module} ${spl_module_params} || die "Failed to load ${spl_module}" echo "Loading ${splat_module}" /sbin/insmod ${splat_module} || die "Unable to load ${splat_module}" From a02118a89d5121b7c81827d4fdba770136896b35 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 4 Jun 2008 06:09:16 +0000 Subject: [PATCH 0118/1062] Whoops, fix a minor proc issue which slipped through with the recent changes. Ensure the top level spl is removed. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@125 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-proc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index f1b01247c..927fe86d3 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -915,6 +915,7 @@ out: remove_proc_entry("kmem", proc_spl); remove_proc_entry("stats_per", proc_spl_mutex); remove_proc_entry("mutex", proc_spl); + remove_proc_entry("spl", NULL); #ifdef CONFIG_SYSCTL spl_unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ @@ -934,6 +935,7 @@ proc_fini(void) remove_proc_entry("kmem", proc_spl); remove_proc_entry("stats_per", proc_spl_mutex); remove_proc_entry("mutex", proc_spl); + remove_proc_entry("spl", NULL); #endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ #ifdef CONFIG_SYSCTL From 475cdc788e2ab926b4604724f3c7b4c65d5c1345 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 4 Jun 2008 21:09:25 +0000 Subject: [PATCH 0119/1062] Just use CONFIG_SLUB to detect SLUB use Add ASSERTF to the NDEBUG build Fix minor issue with various debug build flags git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@126 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 66 ++++++++++++++++++++---------------------- configure.ac | 1 - include/sys/debug.h | 2 ++ modules/spl/spl-kmem.c | 2 +- 4 files changed, 35 insertions(+), 36 deletions(-) diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index db0960695..d77c7aa80 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -81,19 +81,20 @@ AC_DEFUN([SPL_AC_DEBUG], [ [Enable generic debug support (default off)]), [ case "$enableval" in yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; + no) spl_ac_debug=no ;; *) AC_MSG_RESULT([Error!]) AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;; esac ] ) if test "$spl_ac_debug" = yes; then + AC_MSG_RESULT([yes]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" else - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + AC_MSG_RESULT([no]) AC_DEFINE([NDEBUG], [1], [Define to 1 to disable debug tracing]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" fi - AC_MSG_RESULT([${spl_ac_debug=no}]) ]) AC_DEFUN([SPL_AC_DEBUG_KMEM], [ @@ -102,18 +103,20 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM], [ AS_HELP_STRING([--enable-debug-kmem], [Enable kmem debug support (default off)]), [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; + yes) spl_ac_debug_kmem=yes ;; + no) spl_ac_debug_kmem=no ;; *) AC_MSG_RESULT([Error!]) AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kmem]) ;; esac ] ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + if test "$spl_ac_debug_kmem" = yes; then + AC_MSG_RESULT([yes]) AC_DEFINE([DEBUG_KMEM], [1], [Define to 1 to enable kmem debugging]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + else + AC_MSG_RESULT([no]) fi - AC_MSG_RESULT([${spl_ac_debug=no}]) ]) AC_DEFUN([SPL_AC_DEBUG_MUTEX], [ @@ -122,18 +125,20 @@ AC_DEFUN([SPL_AC_DEBUG_MUTEX], [ AS_HELP_STRING([--enable-debug-mutex], [Enable mutex debug support (default off)]), [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; + yes) spl_ac_debug_mutex=yes ;; + no) spl_ac_debug_mutex=no ;; *) AC_MSG_RESULT([Error!]) AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-mutex]) ;; esac ] ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" + if test "$spl_ac_debug_mutex" = yes; then + AC_MSG_RESULT([yes]) AC_DEFINE([DEBUG_MUTEX], [1], [Define to 1 to enable mutex debugging]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" + else + AC_MSG_RESULT([no]) fi - AC_MSG_RESULT([${spl_ac_debug=no}]) ]) AC_DEFUN([SPL_AC_DEBUG_KSTAT], [ @@ -142,18 +147,20 @@ AC_DEFUN([SPL_AC_DEBUG_KSTAT], [ AS_HELP_STRING([--enable-debug-kstat], [Enable kstat debug support (default off)]), [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; + yes) spl_ac_debug_kstat=yes ;; + no) spl_ac_debug_kstat=no ;; *) AC_MSG_RESULT([Error!]) AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kstat]) ;; esac ] ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" + if test "$spl_ac_debug_kstat" = yes; then + AC_MSG_RESULT([yes]) AC_DEFINE([DEBUG_KSTAT], [1], [Define to 1 to enable kstat debugging]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" + else + AC_MSG_RESULT([no]) fi - AC_MSG_RESULT([${spl_ac_debug=no}]) ]) AC_DEFUN([SPL_AC_DEBUG_CALLB], [ @@ -162,18 +169,20 @@ AC_DEFUN([SPL_AC_DEBUG_CALLB], [ AS_HELP_STRING([--enable-debug-callb], [Enable callb debug support (default off)]), [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; + yes) spl_ac_debug_callb=yes ;; + no) spl_ac_debug_callb=no ;; *) AC_MSG_RESULT([Error!]) AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-callb]) ;; esac ] ) - if test "$spl_ac_debug" = yes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" + if test "$spl_ac_debug_callb" = yes; then + AC_MSG_RESULT([yes]) AC_DEFINE([DEBUG_CALLB], [1], [Define to 1 to enable callb debugging]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" + else + AC_MSG_RESULT([no]) fi - AC_MSG_RESULT([${spl_ac_debug=no}]) ]) dnl # @@ -280,17 +289,6 @@ AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], fi ]) -dnl # -dnl # 2.6.x API change -dnl # Slab can now be implemented in terms of the Slub which provides -dnl # slightly different semantics in terms of merged caches. -dnl # -AC_DEFUN([SPL_AC_SLUB], [ - SPL_LINUX_CONFIG([SLUB], - [AC_DEFINE(HAVE_SLUB, 1, [slub support configured])], - []) -]) - dnl # dnl # 2.6.x API change dnl # check if uintptr_t typedef is defined diff --git a/configure.ac b/configure.ac index 21e901d66..df210ee52 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,6 @@ SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_MUTEX SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB -SPL_AC_SLUB SPL_AC_TYPE_UINTPTR_T SPL_AC_TYPE_KMEM_CACHE_T SPL_AC_KMEM_CACHE_DESTROY_INT diff --git a/include/sys/debug.h b/include/sys/debug.h index 7385b357c..53050fc61 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -192,6 +192,7 @@ struct page_collection { #ifdef NDEBUG #define CDEBUG_STACK() (0) +#define __CDEBUG_LIMIT(x, y, z, a...) ((void)0) #define CDEBUG(mask, format, a...) ((void)0) #define CWARN(fmt, a...) ((void)0) #define CERROR(fmt, a...) ((void)0) @@ -206,6 +207,7 @@ struct page_collection { #define __ASSERT(x) ((void)0) #define __ASSERT_TAGE_INVARIANT(x) ((void)0) #define ASSERT(x) ((void)0) +#define ASSERTF(x, y, z...) ((void)0) #define VERIFY(x) ((void)(x)) #define VERIFY3_IMPL(x, y, z, t, f, c) if (x == z) ((void)0) diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index b254bba34..029414f21 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -376,7 +376,7 @@ __kmem_cache_create(char *name, size_t size, size_t align, * SLAB_TRACE * SLAB_DESTROY_BY_RCU */ -#ifdef HAVE_SLUB +#ifdef CONFIG_SLUB flags |= SLAB_STORE_USER; #endif From 3ce1bc96f9c21b8ee22562fc175d8fb59e86a51d Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 4 Jun 2008 21:25:57 +0000 Subject: [PATCH 0120/1062] Fix some bad grammer git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@127 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 029414f21..d7643067a 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -496,7 +496,7 @@ restart: /* When destructor support is removed we must be careful not to * use the provided constructor which will end up being called * more often than the destructor which we only call on free. Thus - * we many call the proper constructor when there is no destructor. + * we call the proper constructor when there is no destructor. */ #ifndef HAVE_KMEM_CACHE_CREATE_DTOR #ifdef HAVE_3ARG_KMEM_CACHE_CREATE_CTOR From 41cf38df92127eba2b0f51812bcd16279daa42bf Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 4 Jun 2008 22:52:13 +0000 Subject: [PATCH 0121/1062] Add missing () to quiet warnings in NDEBUG case git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@128 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 53050fc61..41ce043fe 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -210,7 +210,7 @@ struct page_collection { #define ASSERTF(x, y, z...) ((void)0) #define VERIFY(x) ((void)(x)) -#define VERIFY3_IMPL(x, y, z, t, f, c) if (x == z) ((void)0) +#define VERIFY3_IMPL(x, y, z, t, f, c) if ((x) == (z)) ((void)0) #define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%ld", (long)) #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%lu", (unsigned long)) From c58f753ddb2e8079a349d50682a73513f433315d Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 4 Jun 2008 23:28:29 +0000 Subject: [PATCH 0122/1062] Prep for 0.3.2 tag git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@129 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 10 ++++++++++ configure.ac | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6ce192e2c..edf8c1fa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-06-04 Brian Behlendorf + + * : Tag spl-0.3.2 + + * : Extensive improvements to the build system to detect kernel + API changes so we can flexibly build with a wider range of kernel + versions. The code has now been testing with the 2.6.18-32chaos + and 2.6.25.3-18.fc9 kernels, however we should also be compatible + with other kernels in the range of 2.6.18-2.6.25. + 2008-05-25 Brian Behlendorf * configure.ac, autoconf/* : Initial pass at resolving diff --git a/configure.ac b/configure.ac index df210ee52..1ec695319 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.3.1) +AM_INIT_AUTOMAKE(spl, 0.3.2) AC_CONFIG_HEADERS([spl_config.h]) AC_PROG_INSTALL From cfe5749941bafbc0bfc069aff00fa0b930d741fa Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 6 Jun 2008 23:11:34 +0000 Subject: [PATCH 0123/1062] Minor tweak to ensure kstat values are printed correctly on x86_64 at least Additionally fix a minor typo in the .ul ULONG case. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@131 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-kstat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/spl/spl-kstat.c b/modules/spl/spl-kstat.c index ae4e15570..bb6e9a504 100644 --- a/modules/spl/spl-kstat.c +++ b/modules/spl/spl-kstat.c @@ -119,16 +119,16 @@ kstat_seq_show_named(struct seq_file *f, kstat_named_t *knp) seq_printf(f, "%u", knp->value.ui32); break; case KSTAT_DATA_INT64: - seq_printf(f, "%d", (int)knp->value.i64); + seq_printf(f, "%lld", (signed long long)knp->value.i64); break; case KSTAT_DATA_UINT64: - seq_printf(f, "%u", (unsigned int)knp->value.ui64); + seq_printf(f, "%llu", (unsigned long long)knp->value.ui64); break; case KSTAT_DATA_LONG: seq_printf(f, "%ld", knp->value.l); break; case KSTAT_DATA_ULONG: - seq_printf(f, "%lu", knp->value.l); + seq_printf(f, "%lu", knp->value.ul); break; case KSTAT_DATA_STRING: KSTAT_NAMED_STR_PTR(knp) From 2fb9b26a85ce63dab740821382f1208c8fed6262 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 13 Jun 2008 23:41:06 +0000 Subject: [PATCH 0124/1062] * : modules/sys/kmem-slab.c : Re-implemented the slab to no longer be based on the linux slab but to be its own complete implementation. The new slab behaves much more like the Solaris slab than the Linux slab. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@132 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 7 + include/sys/kmem.h | 119 ++++- include/sys/types.h | 1 + modules/spl/spl-generic.c | 7 +- modules/spl/spl-kmem.c | 1041 ++++++++++++++++++++---------------- modules/spl/spl-vnode.c | 11 +- modules/splat/splat-kmem.c | 554 +++++++++++-------- 7 files changed, 1023 insertions(+), 717 deletions(-) diff --git a/ChangeLog b/ChangeLog index edf8c1fa8..6e3c3aceb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-13 Brian Behlendorf + + * : modules/sys/kmem-slab.c : Re-implemented the slab to no + longer be based on the linux slab but to be it's own complete + implementation. The new slab behaves much more like the + Solaris slab than the Linux slab. + 2008-06-04 Brian Behlendorf * : Tag spl-0.3.2 diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 0b1b53687..082db032a 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -308,11 +308,11 @@ kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) /* * Slab allocation interfaces */ -#undef KMC_NOTOUCH /* No linux analog */ +#undef KMC_NOTOUCH /* XXX: Unsupported */ #define KMC_NODEBUG 0x00000000 /* Default behavior */ -#define KMC_NOMAGAZINE /* No linux analog */ -#define KMC_NOHASH /* No linux analog */ -#define KMC_QCACHE /* No linux analog */ +#define KMC_NOMAGAZINE /* XXX: Unsupported */ +#define KMC_NOHASH /* XXX: Unsupported */ +#define KMC_QCACHE /* XXX: Unsupported */ #define KMC_REAP_CHUNK 256 #define KMC_DEFAULT_SEEKS DEFAULT_SEEKS @@ -342,7 +342,7 @@ static __inline__ size_t kmem_maxavail(void) { #error "kmem_maxavail() not implemented" } -static __inline__ uint64_t kmem_cache_stat(kmem_cache_t *cache) { +static __inline__ uint64_t kmem_cache_stat(spl_kmem_cache_t *cache) { #error "kmem_cache_stat() not implemented" } #endif /* DEBUG_KMEM_UNIMPLEMENTED */ @@ -357,34 +357,101 @@ kmem_debugging(void) return 0; } -typedef int (*kmem_constructor_t)(void *, void *, int); -typedef void (*kmem_destructor_t)(void *, void *); -typedef void (*kmem_reclaim_t)(void *); - extern int kmem_set_warning(int flag); -extern kmem_cache_t * -__kmem_cache_create(char *name, size_t size, size_t align, - kmem_constructor_t constructor, - kmem_destructor_t destructor, - kmem_reclaim_t reclaim, + +#define SKO_MAGIC 0x20202020 +#define SKS_MAGIC 0x22222222 +#define SKC_MAGIC 0x2c2c2c2c + +#define SPL_KMEM_CACHE_HASH_BITS 12 /* 4k, sized for 1000's of objs */ +#define SPL_KMEM_CACHE_HASH_ELTS (1 << SPL_KMEM_CACHE_HASH_BITS) +#define SPL_KMEM_CACHE_HASH_SIZE (sizeof(struct hlist_head) * \ + SPL_KMEM_CACHE_HASH_ELTS) + +#define SPL_KMEM_CACHE_DELAY 5 +#define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 + +typedef int (*spl_kmem_ctor_t)(void *, void *, int); +typedef void (*spl_kmem_dtor_t)(void *, void *); +typedef void (*spl_kmem_reclaim_t)(void *); + +typedef struct spl_kmem_obj { + uint32_t sko_magic; /* Sanity magic */ + uint32_t sko_flags; /* Per object flags */ + void *sko_addr; /* Buffer address */ + struct spl_kmem_slab *sko_slab; /* Owned by slab */ + struct list_head sko_list; /* Free object list linkage */ + struct hlist_node sko_hlist; /* Used object hash linkage */ +} spl_kmem_obj_t; + +typedef struct spl_kmem_slab { + uint32_t sks_magic; /* Sanity magic */ + uint32_t sks_objs; /* Objects per slab */ + struct spl_kmem_cache *sks_cache; /* Owned by cache */ + struct list_head sks_list; /* Slab list linkage */ + struct list_head sks_free_list; /* Free object list */ + unsigned long sks_age; /* Last modify jiffie */ + atomic_t sks_ref; /* Ref count used objects */ +} spl_kmem_slab_t; + +typedef struct spl_kmem_cache { + uint32_t skc_magic; /* Sanity magic */ + uint32_t skc_name_size; /* Name length */ + char *skc_name; /* Name string */ + spl_kmem_ctor_t skc_ctor; /* Constructor */ + spl_kmem_dtor_t skc_dtor; /* Destructor */ + spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ + void *skc_private; /* Private data */ + void *skc_vmp; /* Unused */ + uint32_t skc_flags; /* Flags */ + uint32_t skc_obj_size; /* Object size */ + uint32_t skc_chunk_size; /* sizeof(*obj) + alignment */ + uint32_t skc_slab_size; /* slab size */ + uint32_t skc_max_chunks; /* max chunks per slab */ + uint32_t skc_delay; /* slab reclaim interval */ + uint32_t skc_hash_bits; /* Hash table bits */ + uint32_t skc_hash_size; /* Hash table size */ + uint32_t skc_hash_elts; /* Hash table elements */ + struct hlist_head *skc_hash; /* Hash table address */ + struct list_head skc_list; /* List of caches linkage */ + struct list_head skc_complete_list;/* Completely alloc'ed */ + struct list_head skc_partial_list; /* Partially alloc'ed */ + struct rw_semaphore skc_sem; /* Cache semaphore */ + uint64_t skc_slab_fail; /* Slab alloc failures */ + uint64_t skc_slab_create;/* Slab creates */ + uint64_t skc_slab_destroy;/* Slab destroys */ + uint64_t skc_slab_total; /* Slab total */ + uint64_t skc_slab_alloc; /* Slab alloc */ + uint64_t skc_slab_max; /* Slab max */ + uint64_t skc_obj_total; /* Obj total */ + uint64_t skc_obj_alloc; /* Obj alloc */ + uint64_t skc_obj_max; /* Obj max */ + uint64_t skc_hash_depth; /* Hash depth */ + uint64_t skc_hash_max; /* Hash depth max */ +} spl_kmem_cache_t; + +extern spl_kmem_cache_t * +spl_kmem_cache_create(char *name, size_t size, size_t align, + spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); -extern int __kmem_cache_destroy(kmem_cache_t *cache); -extern void *__kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags); -extern void __kmem_cache_free(kmem_cache_t *cache, void *obj); -extern void __kmem_reap(void); +extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); +extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); +extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); +extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc); +extern void spl_kmem_reap(void); -int kmem_init(void); -void kmem_fini(void); +int spl_kmem_init(void); +void spl_kmem_fini(void); #define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ - __kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) -#define kmem_cache_destroy(cache) __kmem_cache_destroy(cache) -#define kmem_cache_alloc(cache, flags) __kmem_cache_alloc(cache, flags) -#define kmem_cache_free(cache, obj) __kmem_cache_free(cache, obj) -#define kmem_cache_reap_now(cache) kmem_cache_shrink(cache) -#define kmem_reap() __kmem_reap() + spl_kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) +#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) +#define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) +#define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) +#define kmem_cache_reap_now(skc) spl_kmem_cache_reap_now(skc) +#define kmem_reap() spl_kmem_reap() #ifdef __cplusplus } diff --git a/include/sys/types.h b/include/sys/types.h index c2ad9837d..c60bfb208 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -16,6 +16,7 @@ typedef unsigned long uintptr_t; #ifndef HAVE_KMEM_CACHE_T typedef struct kmem_cache kmem_cache_t; #endif +#define kmem_cache_t spl_kmem_cache_t typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; typedef unsigned long intptr_t; diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 3027c7108..7a073ee52 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -130,7 +130,7 @@ static int __init spl_init(void) if ((rc = debug_init())) return rc; - if ((rc = kmem_init())) + if ((rc = spl_kmem_init())) GOTO(out , rc); if ((rc = spl_mutex_init())) @@ -159,7 +159,7 @@ out4: out3: spl_mutex_fini(); out2: - kmem_fini(); + spl_kmem_fini(); out: debug_fini(); @@ -176,7 +176,8 @@ static void spl_fini(void) kstat_fini(); proc_fini(); vn_fini(); - kmem_fini(); + spl_mutex_fini(); + spl_kmem_fini(); debug_fini(); } diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index d7643067a..e52f19935 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -33,7 +33,13 @@ #define DEBUG_SUBSYSTEM S_KMEM /* - * Memory allocation interfaces + * Memory allocation interfaces and debugging for basic kmem_* + * and vmem_* style memory allocation. When DEBUG_KMEM is enable + * all allocations will be tracked when they are allocated and + * freed. When the SPL module is unload a list of all leaked + * addresses and where they were allocated will be dumped to the + * console. Enabling this feature has a significant impant on + * performance but it makes finding memory leaks staight forward. */ #ifdef DEBUG_KMEM /* Shim layer memory accounting */ @@ -75,211 +81,511 @@ EXPORT_SYMBOL(kmem_set_warning); /* * Slab allocation interfaces * - * While the linux slab implementation was inspired by solaris they - * have made some changes to the API which complicates this shim - * layer. For one thing the same symbol names are used with different - * arguments for the prototypes. To deal with this we must use the - * preprocessor to re-order arguments. Happily for us standard C says, - * "Macro's appearing in their own expansion are not reexpanded" so - * this does not result in an infinite recursion. Additionally the - * function pointers registered by solarias differ from those used - * by linux so a lookup and mapping from linux style callback to a - * solaris style callback is needed. There is some overhead in this - * operation which isn't horibile but it needs to be kept in mind. + * While the Linux slab implementation was inspired by the Solaris + * implemenation I cannot use it to emulate the Solaris APIs. I + * require two features which are not provided by the Linux slab. + * + * 1) Constructors AND destructors. Recent versions of the Linux + * kernel have removed support for destructors. This is a deal + * breaker for the SPL which contains particularly expensive + * initializers for mutex's, condition variables, etc. We also + * require a minimal level of cleaner for these data types unlike + * may Linux data type which do need to be explicitly destroyed. + * + * 2) Virtual address backed slab. Callers of the Solaris slab + * expect it to work well for both small are very large allocations. + * Because of memory fragmentation the Linux slab which is backed + * by kmalloc'ed memory performs very badly when confronted with + * large numbers of large allocations. Basing the slab on the + * virtual address space removes the need for contigeous pages + * and greatly improve performance for large allocations. + * + * For these reasons, the SPL has its own slab implementation with + * the needed features. It is not as highly optimized as either the + * Solaris or Linux slabs, but it should get me most of what is + * needed until it can be optimized or obsoleted by another approach. + * + * One serious concern I do have about this method is the relatively + * small virtual address space on 32bit arches. This will seriously + * constrain the size of the slab caches and their performance. + * + * XXX: Refactor the below code in to smaller functions. This works + * for a first pass but each function is doing to much. + * + * XXX: Implement SPL proc interface to export full per cache stats. + * + * XXX: Implement work requests to keep an eye on each cache and + * shrink them via slab_reclaim() when they are wasting lots + * of space. Currently this process is driven by the reapers. + * + * XXX: Implement proper small cache object support by embedding + * the spl_kmem_slab_t, spl_kmem_obj_t's, and objects in the + * allocated for a particular slab. + * + * XXX: Implement a resizable used object hash. Currently the hash + * is statically sized for thousands of objects but it should + * grow based on observed worst case slab depth. + * + * XXX: Improve the partial slab list by carefully maintaining a + * strict ordering of fullest to emptiest slabs based on + * the slab reference count. This gaurentees the when freeing + * slabs back to the system we need only linearly traverse the + * last N slabs in the list to discover all the freeable slabs. + * + * XXX: NUMA awareness for optionally allocating memory close to a + * particular core. This can be adventageous if you know the slab + * object will be short lived and primarily accessed from one core. + * + * XXX: Slab coloring may also yield performance improvements and would + * be desirable to implement. */ -#define KCC_MAGIC 0x7a7a7a7a -#define KCC_POISON 0x77 -typedef struct kmem_cache_cb { - int kcc_magic; - struct hlist_node kcc_hlist; - struct list_head kcc_list; - kmem_cache_t * kcc_cache; - kmem_constructor_t kcc_constructor; - kmem_destructor_t kcc_destructor; - kmem_reclaim_t kcc_reclaim; - void * kcc_private; - void * kcc_vmp; - atomic_t kcc_ref; -} kmem_cache_cb_t; +/* Ensure the __kmem_cache_create/__kmem_cache_destroy macros are + * removed here to prevent a recursive substitution, we want to call + * the native linux version. + */ +#undef kmem_cache_t +#undef kmem_cache_create +#undef kmem_cache_destroy +#undef kmem_cache_alloc +#undef kmem_cache_free -#define KMEM_CACHE_HASH_BITS 10 -#define KMEM_CACHE_TABLE_SIZE (1 << KMEM_CACHE_HASH_BITS) - -struct hlist_head kmem_cache_table[KMEM_CACHE_TABLE_SIZE]; -struct list_head kmem_cache_list; -static struct rw_semaphore kmem_cache_sem; +static struct list_head spl_kmem_cache_list; /* List of caches */ +static struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ +static kmem_cache_t *spl_slab_cache; /* Cache for slab structs */ +static kmem_cache_t *spl_obj_cache; /* Cache for obj structs */ #ifdef HAVE_SET_SHRINKER -static struct shrinker *kmem_cache_shrinker; +static struct shrinker *spl_kmem_cache_shrinker; #else static int kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask); -static struct shrinker kmem_cache_shrinker = { +static struct shrinker spl_kmem_cache_shrinker = { .shrink = kmem_cache_generic_shrinker, .seeks = KMC_DEFAULT_SEEKS, }; #endif -/* Function must be called while holding the kmem_cache_sem - * Because kmem_cache_t is an opaque datatype we're forced to - * match pointers to identify specific cache entires. +static spl_kmem_slab_t * +slab_alloc(spl_kmem_cache_t *skc, int flags) { + spl_kmem_slab_t *sks; + spl_kmem_obj_t *sko, *n; + int i; + ENTRY; + + sks = kmem_cache_alloc(spl_slab_cache, flags); + if (sks == NULL) + RETURN(sks); + + sks->sks_magic = SKS_MAGIC; + sks->sks_objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; + sks->sks_age = jiffies; + sks->sks_cache = skc; + INIT_LIST_HEAD(&sks->sks_list); + INIT_LIST_HEAD(&sks->sks_free_list); + atomic_set(&sks->sks_ref, 0); + + for (i = 0; i < sks->sks_objs; i++) { + sko = kmem_cache_alloc(spl_obj_cache, flags); + if (sko == NULL) { +out_alloc: + /* Unable to fully construct slab, objects, + * and object data buffers unwind everything. + */ + list_for_each_entry_safe(sko, n, &sks->sks_free_list, + sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + vmem_free(sko->sko_addr, skc->skc_obj_size); + list_del(&sko->sko_list); + kmem_cache_free(spl_obj_cache, sko); + } + + kmem_cache_free(spl_slab_cache, sks); + GOTO(out, sks = NULL); + } + + sko->sko_addr = vmem_alloc(skc->skc_obj_size, flags); + if (sko->sko_addr == NULL) { + kmem_cache_free(spl_obj_cache, sko); + GOTO(out_alloc, sks = NULL); + } + + sko->sko_magic = SKO_MAGIC; + sko->sko_flags = 0; + sko->sko_slab = sks; + INIT_LIST_HEAD(&sko->sko_list); + INIT_HLIST_NODE(&sko->sko_hlist); + list_add(&sko->sko_list, &sks->sks_free_list); + } +out: + RETURN(sks); +} + +/* Removes slab from complete or partial list, so it must + * be called with the 'skc->skc_sem' semaphore held. + * */ +static void +slab_free(spl_kmem_slab_t *sks) { + spl_kmem_cache_t *skc; + spl_kmem_obj_t *sko, *n; + int i = 0; + ENTRY; + + ASSERT(sks->sks_magic == SKS_MAGIC); + ASSERT(atomic_read(&sks->sks_ref) == 0); + skc = sks->sks_cache; + skc->skc_obj_total -= sks->sks_objs; + skc->skc_slab_total--; + +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + ASSERT(rwsem_is_locked(&skc->skc_sem)); +#endif + + list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + + /* Run destructors for being freed */ + if (skc->skc_dtor) + skc->skc_dtor(sko->sko_addr, skc->skc_private); + + vmem_free(sko->sko_addr, skc->skc_obj_size); + list_del(&sko->sko_list); + kmem_cache_free(spl_obj_cache, sko); + i++; + } + + ASSERT(sks->sks_objs == i); + list_del(&sks->sks_list); + kmem_cache_free(spl_slab_cache, sks); + + EXIT; +} + +static int +__slab_reclaim(spl_kmem_cache_t *skc) +{ + spl_kmem_slab_t *sks, *m; + int rc = 0; + ENTRY; + +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + ASSERT(rwsem_is_locked(&skc->skc_sem)); +#endif + /* + * Free empty slabs which have not been touched in skc_delay + * seconds. This delay time is important to avoid thrashing. + * Empty slabs will be at the end of the skc_partial_list. + */ + list_for_each_entry_safe_reverse(sks, m, &skc->skc_partial_list, + sks_list) { + if (atomic_read(&sks->sks_ref) > 0) + break; + + if (time_after(jiffies, sks->sks_age + skc->skc_delay * HZ)) { + slab_free(sks); + rc++; + } + } + + /* Returns number of slabs reclaimed */ + RETURN(rc); +} + +static int +slab_reclaim(spl_kmem_cache_t *skc) +{ + int rc; + ENTRY; + + down_write(&skc->skc_sem); + rc = __slab_reclaim(skc); + up_write(&skc->skc_sem); + + RETURN(rc); +} + +spl_kmem_cache_t * +spl_kmem_cache_create(char *name, size_t size, size_t align, + spl_kmem_ctor_t ctor, + spl_kmem_dtor_t dtor, + spl_kmem_reclaim_t reclaim, + void *priv, void *vmp, int flags) +{ + spl_kmem_cache_t *skc; + int i, kmem_flags = KM_SLEEP; + ENTRY; + + /* We may be called when there is a non-zero preempt_count or + * interrupts are disabled is which case we must not sleep. + */ + if (current_thread_info()->preempt_count || irqs_disabled()) + kmem_flags = KM_NOSLEEP; + + /* Allocate new cache memory and initialize. */ + skc = (spl_kmem_cache_t *)kmem_alloc(sizeof(*skc), kmem_flags); + if (skc == NULL) + RETURN(NULL); + + skc->skc_magic = SKC_MAGIC; + + skc->skc_name_size = strlen(name) + 1; + skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, kmem_flags); + if (skc->skc_name == NULL) { + kmem_free(skc, sizeof(*skc)); + RETURN(NULL); + } + strncpy(skc->skc_name, name, skc->skc_name_size); + + skc->skc_ctor = ctor; + skc->skc_dtor = dtor; + skc->skc_reclaim = reclaim; + skc->skc_private = priv; + skc->skc_vmp = vmp; + skc->skc_flags = flags; + skc->skc_obj_size = size; + skc->skc_chunk_size = 0; /* XXX: Needed only when implementing */ + skc->skc_slab_size = 0; /* small slab object optimizations */ + skc->skc_max_chunks = 0; /* which are yet supported. */ + skc->skc_delay = SPL_KMEM_CACHE_DELAY; + + skc->skc_hash_bits = SPL_KMEM_CACHE_HASH_BITS; + skc->skc_hash_size = SPL_KMEM_CACHE_HASH_SIZE; + skc->skc_hash_elts = SPL_KMEM_CACHE_HASH_ELTS; + skc->skc_hash = (struct hlist_head *) + kmem_alloc(skc->skc_hash_size, kmem_flags); + if (skc->skc_hash == NULL) { + kmem_free(skc->skc_name, skc->skc_name_size); + kmem_free(skc, sizeof(*skc)); + } + + for (i = 0; i < skc->skc_hash_elts; i++) + INIT_HLIST_HEAD(&skc->skc_hash[i]); + + INIT_LIST_HEAD(&skc->skc_list); + INIT_LIST_HEAD(&skc->skc_complete_list); + INIT_LIST_HEAD(&skc->skc_partial_list); + init_rwsem(&skc->skc_sem); + skc->skc_slab_fail = 0; + skc->skc_slab_create = 0; + skc->skc_slab_destroy = 0; + skc->skc_slab_total = 0; + skc->skc_slab_alloc = 0; + skc->skc_slab_max = 0; + skc->skc_obj_total = 0; + skc->skc_obj_alloc = 0; + skc->skc_obj_max = 0; + skc->skc_hash_depth = 0; + skc->skc_hash_max = 0; + + down_write(&spl_kmem_cache_sem); + list_add_tail(&skc->skc_list, &spl_kmem_cache_list); + up_write(&spl_kmem_cache_sem); + + RETURN(skc); +} +EXPORT_SYMBOL(spl_kmem_cache_create); + +/* The caller must ensure there are no racing calls to + * spl_kmem_cache_alloc() for this spl_kmem_cache_t when + * it is being destroyed. */ -static kmem_cache_cb_t * -kmem_cache_find_cache_cb(kmem_cache_t *cache) +void +spl_kmem_cache_destroy(spl_kmem_cache_t *skc) +{ + spl_kmem_slab_t *sks, *m; + ENTRY; + + down_write(&spl_kmem_cache_sem); + list_del_init(&skc->skc_list); + up_write(&spl_kmem_cache_sem); + + down_write(&skc->skc_sem); + + /* Validate there are no objects in use and free all the + * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. + */ + ASSERT(list_empty(&skc->skc_complete_list)); + + list_for_each_entry_safe(sks, m, &skc->skc_partial_list, sks_list) + slab_free(sks); + + kmem_free(skc->skc_hash, skc->skc_hash_size); + kmem_free(skc->skc_name, skc->skc_name_size); + kmem_free(skc, sizeof(*skc)); + up_write(&skc->skc_sem); + + EXIT; +} +EXPORT_SYMBOL(spl_kmem_cache_destroy); + +/* The kernel provided hash_ptr() function behaves exceptionally badly + * when all the addresses are page aligned which is likely the case + * here. To avoid this issue shift off the low order non-random bits. + */ +static unsigned long +spl_hash_ptr(void *ptr, unsigned int bits) +{ + return hash_long((unsigned long)ptr >> PAGE_SHIFT, bits); +} + +void * +spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) +{ + spl_kmem_slab_t *sks; + spl_kmem_obj_t *sko; + void *obj; + unsigned long key; + ENTRY; + + down_write(&skc->skc_sem); +restart: + /* Check for available objects from the partial slabs */ + if (!list_empty(&skc->skc_partial_list)) { + sks = list_first_entry(&skc->skc_partial_list, + spl_kmem_slab_t, sks_list); + ASSERT(sks->sks_magic == SKS_MAGIC); + ASSERT(atomic_read(&sks->sks_ref) < sks->sks_objs); + ASSERT(!list_empty(&sks->sks_free_list)); + + sko = list_first_entry(&sks->sks_free_list, + spl_kmem_obj_t, sko_list); + ASSERT(sko->sko_magic == SKO_MAGIC); + ASSERT(sko->sko_addr != NULL); + + /* Remove from sks_free_list, add to used hash */ + list_del_init(&sko->sko_list); + key = spl_hash_ptr(sko->sko_addr, skc->skc_hash_bits); + hlist_add_head_rcu(&sko->sko_hlist, &skc->skc_hash[key]); + + sks->sks_age = jiffies; + atomic_inc(&sks->sks_ref); + skc->skc_obj_alloc++; + + if (skc->skc_obj_alloc > skc->skc_obj_max) + skc->skc_obj_max = skc->skc_obj_alloc; + + if (atomic_read(&sks->sks_ref) == 1) { + skc->skc_slab_alloc++; + + if (skc->skc_slab_alloc > skc->skc_slab_max) + skc->skc_slab_max = skc->skc_slab_alloc; + } + + /* Move slab to skc_complete_list when full */ + if (atomic_read(&sks->sks_ref) == sks->sks_objs) { + list_del(&sks->sks_list); + list_add(&sks->sks_list, &skc->skc_complete_list); + } + + GOTO(out_lock, obj = sko->sko_addr); + } + + up_write(&skc->skc_sem); + + /* No available objects create a new slab. Since this is an + * expensive operation we do it without holding the semaphore + * and only briefly aquire it when we link in the fully + * allocated and constructed slab. + */ + + /* Under Solaris if the KM_SLEEP flag is passed we may never + * fail, so sleep as long as needed. Additionally, since we are + * using vmem_alloc() KM_NOSLEEP is not an option and we must + * fail. Shifting to allocating our own pages and mapping the + * virtual address space may allow us to bypass this issue. + */ + if (!flags) + flags |= KM_SLEEP; + + if (flags & KM_SLEEP) + flags |= __GFP_NOFAIL; + else + GOTO(out, obj = NULL); + + sks = slab_alloc(skc, flags); + if (sks == NULL) + GOTO(out, obj = NULL); + + /* Run all the constructors now that the slab is fully allocated */ + list_for_each_entry(sko, &sks->sks_free_list, sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + + if (skc->skc_ctor) + skc->skc_ctor(sko->sko_addr, skc->skc_private, flags); + } + + /* Link the newly created slab in to the skc_partial_list, + * and retry the allocation which will now succeed. + */ + down_write(&skc->skc_sem); + skc->skc_slab_total++; + skc->skc_obj_total += sks->sks_objs; + list_add_tail(&sks->sks_list, &skc->skc_partial_list); + GOTO(restart, obj = NULL); + +out_lock: + up_write(&skc->skc_sem); +out: + RETURN(obj); +} +EXPORT_SYMBOL(spl_kmem_cache_alloc); + +void +spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) { struct hlist_head *head; struct hlist_node *node; - kmem_cache_cb_t *kcc; -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - ASSERT(rwsem_is_locked(&kmem_cache_sem)); -#endif + spl_kmem_slab_t *sks = NULL; + spl_kmem_obj_t *sko = NULL; + ENTRY; - head = &kmem_cache_table[hash_ptr(cache, KMEM_CACHE_HASH_BITS)]; - hlist_for_each_entry_rcu(kcc, node, head, kcc_hlist) - if (kcc->kcc_cache == cache) - return kcc; + down_write(&skc->skc_sem); - return NULL; -} - -static kmem_cache_cb_t * -kmem_cache_add_cache_cb(kmem_cache_t *cache, - kmem_constructor_t constructor, - kmem_destructor_t destructor, - kmem_reclaim_t reclaim, - void *priv, void *vmp) -{ - kmem_cache_cb_t *kcc; - - kcc = (kmem_cache_cb_t *)kmalloc(sizeof(*kcc), GFP_KERNEL); - if (kcc) { - kcc->kcc_magic = KCC_MAGIC; - kcc->kcc_cache = cache; - kcc->kcc_constructor = constructor; - kcc->kcc_destructor = destructor; - kcc->kcc_reclaim = reclaim; - kcc->kcc_private = priv; - kcc->kcc_vmp = vmp; - atomic_set(&kcc->kcc_ref, 0); - down_write(&kmem_cache_sem); - hlist_add_head_rcu(&kcc->kcc_hlist, &kmem_cache_table[ - hash_ptr(cache, KMEM_CACHE_HASH_BITS)]); - list_add_tail(&kcc->kcc_list, &kmem_cache_list); - up_write(&kmem_cache_sem); - } - - return kcc; -} - -static void -kmem_cache_remove_cache_cb(kmem_cache_cb_t *kcc) -{ - down_write(&kmem_cache_sem); - ASSERT(atomic_read(&kcc->kcc_ref) == 0); - hlist_del_init(&kcc->kcc_hlist); - list_del_init(&kcc->kcc_list); - up_write(&kmem_cache_sem); - - if (kcc) { - memset(kcc, KCC_POISON, sizeof(*kcc)); - kfree(kcc); + head = &skc->skc_hash[spl_hash_ptr(obj, skc->skc_hash_bits)]; + hlist_for_each_entry_rcu(sko, node, head, sko_hlist) { + if (sko->sko_addr == obj) { + ASSERT(sko->sko_magic == SKO_MAGIC); + sks = sko->sko_slab; + break; + } } -} -#ifdef HAVE_3ARG_KMEM_CACHE_CREATE_CTOR -static void -kmem_cache_generic_constructor(void *ptr, kmem_cache_t *cache, - unsigned long flags) -{ - kmem_cache_cb_t *kcc; - kmem_constructor_t constructor; - void *private; + ASSERT(sko != NULL); /* Obj must be in hash */ + ASSERT(sks != NULL); /* Obj must reference slab */ + ASSERT(sks->sks_cache == skc); + hlist_del_init(&sko->sko_hlist); + list_add(&sko->sko_list, &sks->sks_free_list); - /* Ensure constructor verifies are not passed to the registered - * constructors. This may not be safe due to the Solaris constructor - * not being aware of how to handle the SLAB_CTOR_VERIFY flag + sks->sks_age = jiffies; + atomic_dec(&sks->sks_ref); + skc->skc_obj_alloc--; + + /* Move slab to skc_partial_list when no longer full. Slabs + * are added to the kead to keep the partial list is quasi + * full sorted order. Fuller at the head, emptier at the tail. */ - ASSERT(flags & SLAB_CTOR_CONSTRUCTOR); + if (atomic_read(&sks->sks_ref) == (sks->sks_objs - 1)) { + list_del(&sks->sks_list); + list_add(&sks->sks_list, &skc->skc_partial_list); + } - if (flags & SLAB_CTOR_VERIFY) - return; - - if (flags & SLAB_CTOR_ATOMIC) - flags = KM_NOSLEEP; - else - flags = KM_SLEEP; -#else -static void -kmem_cache_generic_constructor(kmem_cache_t *cache, void *ptr) -{ - kmem_cache_cb_t *kcc; - kmem_constructor_t constructor; - void *private; - int flags = KM_NOSLEEP; -#endif - /* We can be called with interrupts disabled so it is critical that - * this function and the registered constructor never sleep. + /* Move emply slabs to the end of the partial list so + * they can be easily found and freed during reclamation. */ - while (!down_read_trylock(&kmem_cache_sem)); + if (atomic_read(&sks->sks_ref) == 0) { + list_del(&sks->sks_list); + list_add_tail(&sks->sks_list, &skc->skc_partial_list); + skc->skc_slab_alloc--; + } - /* Callback list must be in sync with linux slab caches */ - kcc = kmem_cache_find_cache_cb(cache); - ASSERT(kcc); - ASSERT(kcc->kcc_magic == KCC_MAGIC); - atomic_inc(&kcc->kcc_ref); - - constructor = kcc->kcc_constructor; - private = kcc->kcc_private; - - up_read(&kmem_cache_sem); - - if (constructor) - constructor(ptr, private, (int)flags); - - atomic_dec(&kcc->kcc_ref); - - /* Linux constructor has no return code, silently eat it */ + __slab_reclaim(skc); + up_write(&skc->skc_sem); } +EXPORT_SYMBOL(spl_kmem_cache_free); -static void -kmem_cache_generic_destructor(void *ptr, kmem_cache_t *cache, unsigned long flags) -{ - kmem_cache_cb_t *kcc; - kmem_destructor_t destructor; - void *private; - - /* No valid destructor flags */ - ASSERT(flags == 0); - - /* We can be called with interrupts disabled so it is critical that - * this function and the registered constructor never sleep. - */ - while (!down_read_trylock(&kmem_cache_sem)); - - /* Callback list must be in sync with linux slab caches */ - kcc = kmem_cache_find_cache_cb(cache); - ASSERT(kcc); - ASSERT(kcc->kcc_magic == KCC_MAGIC); - atomic_inc(&kcc->kcc_ref); - - destructor = kcc->kcc_destructor; - private = kcc->kcc_private; - - up_read(&kmem_cache_sem); - - /* Solaris destructor takes no flags, silently eat them */ - if (destructor) - destructor(ptr, private); - - atomic_dec(&kcc->kcc_ref); -} - -/* Arguments are ignored */ static int kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) { - kmem_cache_cb_t *kcc; - int total = 0; + spl_kmem_cache_t *skc; /* Under linux a shrinker is not tightly coupled with a slab * cache. In fact linux always systematically trys calling all @@ -288,264 +594,77 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * function in the shim layer for all slab caches. And we always * attempt to shrink all caches when this generic shrinker is called. */ - down_read(&kmem_cache_sem); + down_read(&spl_kmem_cache_sem); - list_for_each_entry(kcc, &kmem_cache_list, kcc_list) { - ASSERT(kcc); - ASSERT(kcc->kcc_magic == KCC_MAGIC); + list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) + spl_kmem_cache_reap_now(skc); - /* Take a reference on the cache in question. If that - * cache is contended simply skip it, it may already be - * in the process of a reclaim or the ctor/dtor may be - * running in either case it's best to skip it. - */ - atomic_inc(&kcc->kcc_ref); - if (atomic_read(&kcc->kcc_ref) > 1) { - atomic_dec(&kcc->kcc_ref); - continue; - } + up_read(&spl_kmem_cache_sem); - /* Under linux the desired number and gfp type of objects - * is passed to the reclaiming function as a sugested reclaim - * target. I do not pass these args on because reclaim - * policy is entirely up to the owner under solaris. We only - * pass on the pre-registered private data. - */ - if (kcc->kcc_reclaim) - kcc->kcc_reclaim(kcc->kcc_private); - - atomic_dec(&kcc->kcc_ref); - total += 1; - } - - /* Under linux we should return the remaining number of entires in - * the cache. Unfortunately, I don't see an easy way to safely - * emulate this behavior so I'm returning one entry per cache which - * was registered with the generic shrinker. This should fake out - * the linux VM when it attempts to shrink caches. + /* XXX: Under linux we should return the remaining number of + * entries in the cache. We should do this as well. */ - up_read(&kmem_cache_sem); - - return total; + return 1; } -/* Ensure the __kmem_cache_create/__kmem_cache_destroy macros are - * removed here to prevent a recursive substitution, we want to call - * the native linux version. - */ -#undef kmem_cache_create -#undef kmem_cache_destroy -#undef kmem_cache_alloc -#undef kmem_cache_free - -kmem_cache_t * -__kmem_cache_create(char *name, size_t size, size_t align, - kmem_constructor_t constructor, - kmem_destructor_t destructor, - kmem_reclaim_t reclaim, - void *priv, void *vmp, int flags) -{ - kmem_cache_t *cache; - kmem_cache_cb_t *kcc; - int shrinker_flag = 0; - char *cache_name; - ENTRY; - - /* XXX: - Option currently unsupported by shim layer */ - ASSERT(!vmp); - ASSERT(flags == 0); - - cache_name = kzalloc(strlen(name) + 1, GFP_KERNEL); - if (cache_name == NULL) - RETURN(NULL); - - strcpy(cache_name, name); - - /* When your slab is implemented in terms of the slub it - * is possible similarly sized slab caches will be merged. - * For our implementation we must make sure this never - * happens because we require a unique cache address to - * use as a hash key when looking up the constructor, - * destructor, and shrinker registered for each unique - * type of slab cache. Passing any of the following flags - * will prevent the slub merging. - * - * SLAB_RED_ZONE - * SLAB_POISON - * SLAB_STORE_USER - * SLAB_TRACE - * SLAB_DESTROY_BY_RCU - */ -#ifdef CONFIG_SLUB - flags |= SLAB_STORE_USER; -#endif - -#ifdef HAVE_KMEM_CACHE_CREATE_DTOR - cache = kmem_cache_create(cache_name, size, align, flags, - kmem_cache_generic_constructor, - kmem_cache_generic_destructor); -#else - cache = kmem_cache_create(cache_name, size, align, flags, NULL); -#endif - if (cache == NULL) - RETURN(NULL); - - /* Register shared shrinker function on initial cache create */ - down_read(&kmem_cache_sem); - if (list_empty(&kmem_cache_list)) { -#ifdef HAVE_SET_SHRINKER - kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, - kmem_cache_generic_shrinker); - if (kmem_cache_shrinker == NULL) { - kmem_cache_destroy(cache); - up_read(&kmem_cache_sem); - RETURN(NULL); - } -#else - register_shrinker(&kmem_cache_shrinker); -#endif - } - up_read(&kmem_cache_sem); - - kcc = kmem_cache_add_cache_cb(cache, constructor, destructor, - reclaim, priv, vmp); - if (kcc == NULL) { - if (shrinker_flag) /* New shrinker registered must be removed */ -#ifdef HAVE_SET_SHRINKER - remove_shrinker(kmem_cache_shrinker); -#else - unregister_shrinker(&kmem_cache_shrinker); -#endif - - kmem_cache_destroy(cache); - RETURN(NULL); - } - - RETURN(cache); -} -EXPORT_SYMBOL(__kmem_cache_create); - -/* Return code provided despite Solaris's void return. There should be no - * harm here since the Solaris versions will ignore it anyway. */ -int -__kmem_cache_destroy(kmem_cache_t *cache) -{ - kmem_cache_cb_t *kcc; - char *name; - int rc; - ENTRY; - - down_read(&kmem_cache_sem); - kcc = kmem_cache_find_cache_cb(cache); - if (kcc == NULL) { - up_read(&kmem_cache_sem); - RETURN(-EINVAL); - } - atomic_inc(&kcc->kcc_ref); - up_read(&kmem_cache_sem); - - name = (char *)kmem_cache_name(cache); - -#ifdef HAVE_KMEM_CACHE_DESTROY_INT - rc = kmem_cache_destroy(cache); -#else - kmem_cache_destroy(cache); - rc = 0; -#endif - - atomic_dec(&kcc->kcc_ref); - kmem_cache_remove_cache_cb(kcc); - kfree(name); - - /* Unregister generic shrinker on removal of all caches */ - down_read(&kmem_cache_sem); - if (list_empty(&kmem_cache_list)) -#ifdef HAVE_SET_SHRINKER - remove_shrinker(kmem_cache_shrinker); -#else - unregister_shrinker(&kmem_cache_shrinker); -#endif - - up_read(&kmem_cache_sem); - RETURN(rc); -} -EXPORT_SYMBOL(__kmem_cache_destroy); - -/* Under Solaris if the KM_SLEEP flag is passed we absolutely must - * sleep until we are allocated the memory. Under Linux you can still - * get a memory allocation failure, so I'm forced to keep requesting - * the memory even if the system is under substantial memory pressure - * of fragmentation prevents the allocation from succeeded. This is - * not the correct fix, or even a good one. But it will do for now. - */ -void * -__kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags) -{ - void *obj; - ENTRY; - -restart: - obj = kmem_cache_alloc(cache, flags); - if ((obj == NULL) && (flags & KM_SLEEP)) { -#ifdef DEBUG_KMEM - atomic64_inc(&kmem_cache_alloc_failed); -#endif /* DEBUG_KMEM */ - GOTO(restart, obj); - } - - /* When destructor support is removed we must be careful not to - * use the provided constructor which will end up being called - * more often than the destructor which we only call on free. Thus - * we call the proper constructor when there is no destructor. - */ -#ifndef HAVE_KMEM_CACHE_CREATE_DTOR -#ifdef HAVE_3ARG_KMEM_CACHE_CREATE_CTOR - kmem_cache_generic_constructor(obj, cache, flags); -#else - kmem_cache_generic_constructor(cache, obj); -#endif /* HAVE_KMEM_CACHE_CREATE_DTOR */ -#endif /* HAVE_3ARG_KMEM_CACHE_CREATE_CTOR */ - - RETURN(obj); -} -EXPORT_SYMBOL(__kmem_cache_alloc); - void -__kmem_cache_free(kmem_cache_t *cache, void *obj) -{ -#ifndef HAVE_KMEM_CACHE_CREATE_DTOR - kmem_cache_generic_destructor(obj, cache, 0); -#endif - kmem_cache_free(cache, obj); -} -EXPORT_SYMBOL(__kmem_cache_free); - -void -__kmem_reap(void) +spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) { ENTRY; - /* Since there's no easy hook in to linux to force all the registered - * shrinkers to run we just run the ones registered for this shim */ - kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); + ASSERT(skc && skc->skc_magic == SKC_MAGIC); + + if (skc->skc_reclaim) + skc->skc_reclaim(skc->skc_private); + + slab_reclaim(skc); EXIT; } -EXPORT_SYMBOL(__kmem_reap); +EXPORT_SYMBOL(spl_kmem_cache_reap_now); + +void +spl_kmem_reap(void) +{ + kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); +} +EXPORT_SYMBOL(spl_kmem_reap); int -kmem_init(void) +spl_kmem_init(void) { - int i; + int rc = 0; ENTRY; - init_rwsem(&kmem_cache_sem); - INIT_LIST_HEAD(&kmem_cache_list); + init_rwsem(&spl_kmem_cache_sem); + INIT_LIST_HEAD(&spl_kmem_cache_list); - for (i = 0; i < KMEM_CACHE_TABLE_SIZE; i++) - INIT_HLIST_HEAD(&kmem_cache_table[i]); + spl_slab_cache = NULL; + spl_obj_cache = NULL; + + spl_slab_cache = kmem_cache_create("spl_slab_cache", + sizeof(spl_kmem_slab_t), + 0, 0, NULL); + if (spl_slab_cache == NULL) + GOTO(out_cache, rc = -ENOMEM); + + spl_obj_cache = kmem_cache_create("spl_obj_cache", + sizeof(spl_kmem_obj_t), + 0, 0, NULL); + if (spl_obj_cache == NULL) + GOTO(out_cache, rc = -ENOMEM); + +#ifdef HAVE_SET_SHRINKER + spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, shrinker); + if (spl_kmem_cache_shrinker == NULL) + GOTO(out_cache, rc = -ENOMEM); +#else + register_shrinker(&spl_kmem_cache_shrinker); +#endif #ifdef DEBUG_KMEM + { int i; atomic64_set(&kmem_alloc_used, 0); atomic64_set(&vmem_alloc_used, 0); + atomic64_set(&kmem_cache_alloc_failed, 0); spin_lock_init(&kmem_lock); INIT_LIST_HEAD(&kmem_list); @@ -558,10 +677,18 @@ kmem_init(void) for (i = 0; i < VMEM_TABLE_SIZE; i++) INIT_HLIST_HEAD(&vmem_table[i]); - - atomic64_set(&kmem_cache_alloc_failed, 0); + } #endif - RETURN(0); + RETURN(rc); + +out_cache: + if (spl_obj_cache) + (void)kmem_cache_destroy(spl_obj_cache); + + if (spl_slab_cache) + (void)kmem_cache_destroy(spl_slab_cache); + + RETURN(rc); } #ifdef DEBUG_KMEM @@ -609,53 +736,61 @@ sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) #endif /* DEBUG_KMEM */ void -kmem_fini(void) +spl_kmem_fini(void) { - ENTRY; #ifdef DEBUG_KMEM - { - unsigned long flags; - kmem_debug_t *kd; - char str[17]; + unsigned long flags; + kmem_debug_t *kd; + char str[17]; - /* Display all unreclaimed memory addresses, including the - * allocation size and the first few bytes of what's located - * at that address to aid in debugging. Performance is not - * a serious concern here since it is module unload time. */ - if (atomic64_read(&kmem_alloc_used) != 0) - CWARN("kmem leaked %ld/%ld bytes\n", - atomic_read(&kmem_alloc_used), kmem_alloc_max); + /* Display all unreclaimed memory addresses, including the + * allocation size and the first few bytes of what's located + * at that address to aid in debugging. Performance is not + * a serious concern here since it is module unload time. */ + if (atomic64_read(&kmem_alloc_used) != 0) + CWARN("kmem leaked %ld/%ld bytes\n", + atomic_read(&kmem_alloc_used), kmem_alloc_max); - spin_lock_irqsave(&kmem_lock, flags); - if (!list_empty(&kmem_list)) - CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", - "address", "size", "data", "func", "line"); + spin_lock_irqsave(&kmem_lock, flags); + if (!list_empty(&kmem_list)) + CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", + "address", "size", "data", "func", "line"); - list_for_each_entry(kd, &kmem_list, kd_list) - CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", - kd->kd_addr, kd->kd_size, - sprintf_addr(kd, str, 17, 8), - kd->kd_func, kd->kd_line); + list_for_each_entry(kd, &kmem_list, kd_list) + CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", + kd->kd_addr, kd->kd_size, + sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); - spin_unlock_irqrestore(&kmem_lock, flags); + spin_unlock_irqrestore(&kmem_lock, flags); - if (atomic64_read(&vmem_alloc_used) != 0) - CWARN("vmem leaked %ld/%ld bytes\n", - atomic_read(&vmem_alloc_used), vmem_alloc_max); + if (atomic64_read(&vmem_alloc_used) != 0) + CWARN("vmem leaked %ld/%ld bytes\n", + atomic_read(&vmem_alloc_used), vmem_alloc_max); - spin_lock_irqsave(&vmem_lock, flags); - if (!list_empty(&vmem_list)) - CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", - "address", "size", "data", "func", "line"); + spin_lock_irqsave(&vmem_lock, flags); + if (!list_empty(&vmem_list)) + CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", + "address", "size", "data", "func", "line"); - list_for_each_entry(kd, &vmem_list, kd_list) - CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", - kd->kd_addr, kd->kd_size, - sprintf_addr(kd, str, 17, 8), - kd->kd_func, kd->kd_line); + list_for_each_entry(kd, &vmem_list, kd_list) + CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", + kd->kd_addr, kd->kd_size, + sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); - spin_unlock_irqrestore(&vmem_lock, flags); - } + spin_unlock_irqrestore(&vmem_lock, flags); #endif + ENTRY; + +#ifdef HAVE_SET_SHRINKER + remove_shrinker(spl_kmem_cache_shrinker); +#else + unregister_shrinker(&spl_kmem_cache_shrinker); +#endif + + (void)kmem_cache_destroy(spl_obj_cache); + (void)kmem_cache_destroy(spl_slab_cache); + EXIT; } diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 7ff35a8f6..f6dbc00c3 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -633,7 +633,7 @@ void vn_fini(void) { file_t *fp, *next_fp; - int rc, leaked = 0; + int leaked = 0; ENTRY; spin_lock(&vn_file_lock); @@ -644,19 +644,14 @@ vn_fini(void) leaked++; } - rc = kmem_cache_destroy(vn_file_cache); - if (rc) - CWARN("Warning leaked vn_file_cache objects, %d\n", rc); - + kmem_cache_destroy(vn_file_cache); vn_file_cache = NULL; spin_unlock(&vn_file_lock); if (leaked > 0) CWARN("Warning %d files leaked\n", leaked); - rc = kmem_cache_destroy(vn_cache); - if (rc) - CWARN("Warning leaked vn_cache objects, %d\n", rc); + kmem_cache_destroy(vn_cache); EXIT; return; diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 277a9afe0..7342052c1 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -39,16 +39,24 @@ #define SPLAT_KMEM_TEST2_DESC "Memory allocation test (kmem_zalloc)" #define SPLAT_KMEM_TEST3_ID 0x0103 -#define SPLAT_KMEM_TEST3_NAME "slab_alloc" -#define SPLAT_KMEM_TEST3_DESC "Slab constructor/destructor test" +#define SPLAT_KMEM_TEST3_NAME "vmem_alloc" +#define SPLAT_KMEM_TEST3_DESC "Memory allocation test (vmem_alloc)" #define SPLAT_KMEM_TEST4_ID 0x0104 -#define SPLAT_KMEM_TEST4_NAME "slab_reap" -#define SPLAT_KMEM_TEST4_DESC "Slab reaping test" +#define SPLAT_KMEM_TEST4_NAME "vmem_zalloc" +#define SPLAT_KMEM_TEST4_DESC "Memory allocation test (vmem_zalloc)" #define SPLAT_KMEM_TEST5_ID 0x0105 -#define SPLAT_KMEM_TEST5_NAME "vmem_alloc" -#define SPLAT_KMEM_TEST5_DESC "Memory allocation test (vmem_alloc)" +#define SPLAT_KMEM_TEST5_NAME "kmem_cache1" +#define SPLAT_KMEM_TEST5_DESC "Slab ctor/dtor test (small)" + +#define SPLAT_KMEM_TEST6_ID 0x0106 +#define SPLAT_KMEM_TEST6_NAME "kmem_cache2" +#define SPLAT_KMEM_TEST6_DESC "Slab ctor/dtor test (large)" + +#define SPLAT_KMEM_TEST7_ID 0x0107 +#define SPLAT_KMEM_TEST7_NAME "kmem_reap" +#define SPLAT_KMEM_TEST7_DESC "Slab reaping test" #define SPLAT_KMEM_ALLOC_COUNT 10 #define SPLAT_VMEM_ALLOC_COUNT 10 @@ -142,228 +150,8 @@ splat_kmem_test2(struct file *file, void *arg) return rc; } -#define SPLAT_KMEM_TEST_MAGIC 0x004488CCUL -#define SPLAT_KMEM_CACHE_NAME "kmem_test" -#define SPLAT_KMEM_CACHE_SIZE 256 -#define SPLAT_KMEM_OBJ_COUNT 128 -#define SPLAT_KMEM_OBJ_RECLAIM 64 - -typedef struct kmem_cache_data { - char kcd_buf[SPLAT_KMEM_CACHE_SIZE]; - unsigned long kcd_magic; - int kcd_flag; -} kmem_cache_data_t; - -typedef struct kmem_cache_priv { - unsigned long kcp_magic; - struct file *kcp_file; - kmem_cache_t *kcp_cache; - kmem_cache_data_t *kcp_kcd[SPLAT_KMEM_OBJ_COUNT]; - int kcp_count; - int kcp_rc; -} kmem_cache_priv_t; - -static int -splat_kmem_test34_constructor(void *ptr, void *priv, int flags) -{ - kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; - - if (kcd) { - memset(kcd->kcd_buf, 0xaa, SPLAT_KMEM_CACHE_SIZE); - kcd->kcd_flag = 1; - - if (kcp) { - kcd->kcd_magic = kcp->kcp_magic; - kcp->kcp_count++; - } - } - - return 0; -} - -static void -splat_kmem_test34_destructor(void *ptr, void *priv) -{ - kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; - - if (kcd) { - memset(kcd->kcd_buf, 0xbb, SPLAT_KMEM_CACHE_SIZE); - kcd->kcd_flag = 0; - - if (kcp) - kcp->kcp_count--; - } - - return; -} - static int splat_kmem_test3(struct file *file, void *arg) -{ - kmem_cache_t *cache = NULL; - kmem_cache_data_t *kcd = NULL; - kmem_cache_priv_t kcp; - int rc = 0, max; - - kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; - kcp.kcp_file = file; - kcp.kcp_count = 0; - kcp.kcp_rc = 0; - - cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, sizeof(*kcd), 0, - splat_kmem_test34_constructor, - splat_kmem_test34_destructor, - NULL, &kcp, NULL, 0); - if (!cache) { - splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - return -ENOMEM; - } - - kcd = kmem_cache_alloc(cache, 0); - if (!kcd) { - splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; - } - - if (!kcd->kcd_flag) { - splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "Failed to run contructor for '%s'\n", - SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; - } - - if (kcd->kcd_magic != kcp.kcp_magic) { - splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "Failed to pass private data to constructor " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; - } - - max = kcp.kcp_count; - - /* Destructor's run lazily so it hard to check correctness here. - * We assume if it doesn't crash the free worked properly */ - kmem_cache_free(cache, kcd); - - /* Destroy the entire cache which will force destructors to - * run and we can verify one was called for every object */ - kmem_cache_destroy(cache); - if (kcp.kcp_count) { - splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "Failed to run destructor on all slab objects " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - } - - splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "%d allocated/destroyed objects for '%s'\n", - max, SPLAT_KMEM_CACHE_NAME); - - return rc; - -out_free: - if (kcd) - kmem_cache_free(cache, kcd); - - kmem_cache_destroy(cache); - return rc; -} - -static void -splat_kmem_test4_reclaim(void *priv) -{ - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; - int i; - - splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST4_NAME, - "Reaping %d objects from '%s'\n", - SPLAT_KMEM_OBJ_RECLAIM, SPLAT_KMEM_CACHE_NAME); - for (i = 0; i < SPLAT_KMEM_OBJ_RECLAIM; i++) { - if (kcp->kcp_kcd[i]) { - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); - kcp->kcp_kcd[i] = NULL; - } - } - - return; -} - -static int -splat_kmem_test4(struct file *file, void *arg) -{ - kmem_cache_t *cache; - kmem_cache_priv_t kcp; - int i, rc = 0, max, reclaim_percent, target_percent; - - kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; - kcp.kcp_file = file; - kcp.kcp_count = 0; - kcp.kcp_rc = 0; - - cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, - sizeof(kmem_cache_data_t), 0, - splat_kmem_test34_constructor, - splat_kmem_test34_destructor, - splat_kmem_test4_reclaim, &kcp, NULL, 0); - if (!cache) { - splat_vprint(file, SPLAT_KMEM_TEST4_NAME, - "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - return -ENOMEM; - } - - kcp.kcp_cache = cache; - - for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { - /* All allocations need not succeed */ - kcp.kcp_kcd[i] = kmem_cache_alloc(cache, 0); - if (!kcp.kcp_kcd[i]) { - splat_vprint(file, SPLAT_KMEM_TEST4_NAME, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); - } - } - - max = kcp.kcp_count; - ASSERT(max > 0); - - /* Force shrinker to run */ - kmem_reap(); - - /* Reclaim reclaimed objects, this ensure the destructors are run */ - kmem_cache_reap_now(cache); - - reclaim_percent = ((kcp.kcp_count * 100) / max); - target_percent = (((SPLAT_KMEM_OBJ_COUNT - SPLAT_KMEM_OBJ_RECLAIM) * 100) / - SPLAT_KMEM_OBJ_COUNT); - splat_vprint(file, SPLAT_KMEM_TEST4_NAME, - "%d%% (%d/%d) of previous size, target of " - "%d%%-%d%% for '%s'\n", reclaim_percent, kcp.kcp_count, - max, target_percent - 10, target_percent + 10, - SPLAT_KMEM_CACHE_NAME); - if ((reclaim_percent < target_percent - 10) || - (reclaim_percent > target_percent + 10)) - rc = -EINVAL; - - /* Cleanup our mess */ - for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) - if (kcp.kcp_kcd[i]) - kmem_cache_free(cache, kcp.kcp_kcd[i]); - - kmem_cache_destroy(cache); - - return rc; -} - -static int -splat_kmem_test5(struct file *file, void *arg) { void *ptr[SPLAT_VMEM_ALLOC_COUNT]; int size = PAGE_SIZE; @@ -382,7 +170,7 @@ splat_kmem_test5(struct file *file, void *arg) if (ptr[i]) vmem_free(ptr[i], size); - splat_vprint(file, SPLAT_KMEM_TEST5_NAME, + splat_vprint(file, SPLAT_KMEM_TEST3_NAME, "%d byte allocations, %d/%d successful\n", size, count, SPLAT_VMEM_ALLOC_COUNT); if (count != SPLAT_VMEM_ALLOC_COUNT) @@ -394,6 +182,312 @@ splat_kmem_test5(struct file *file, void *arg) return rc; } +static int +splat_kmem_test4(struct file *file, void *arg) +{ + void *ptr[SPLAT_VMEM_ALLOC_COUNT]; + int size = PAGE_SIZE; + int i, j, count, rc = 0; + + while ((!rc) && (size <= (PAGE_SIZE * 1024))) { + count = 0; + + for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { + ptr[i] = vmem_zalloc(size, KM_SLEEP); + if (ptr[i]) + count++; + } + + /* Ensure buffer has been zero filled */ + for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { + for (j = 0; j < size; j++) { + if (((char *)ptr[i])[j] != '\0') { + splat_vprint(file, SPLAT_KMEM_TEST4_NAME, + "%d-byte allocation was " + "not zeroed\n", size); + rc = -EFAULT; + } + } + } + + for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) + if (ptr[i]) + vmem_free(ptr[i], size); + + splat_vprint(file, SPLAT_KMEM_TEST4_NAME, + "%d byte allocations, %d/%d successful\n", + size, count, SPLAT_VMEM_ALLOC_COUNT); + if (count != SPLAT_VMEM_ALLOC_COUNT) + rc = -ENOMEM; + + size *= 2; + } + + return rc; +} + +#define SPLAT_KMEM_TEST_MAGIC 0x004488CCUL +#define SPLAT_KMEM_CACHE_NAME "kmem_test" +#define SPLAT_KMEM_OBJ_COUNT 128 +#define SPLAT_KMEM_OBJ_RECLAIM 16 + +typedef struct kmem_cache_data { + unsigned long kcd_magic; + int kcd_flag; + char kcd_buf[0]; +} kmem_cache_data_t; + +typedef struct kmem_cache_priv { + unsigned long kcp_magic; + struct file *kcp_file; + kmem_cache_t *kcp_cache; + kmem_cache_data_t *kcp_kcd[SPLAT_KMEM_OBJ_COUNT]; + int kcp_size; + int kcp_count; + int kcp_rc; +} kmem_cache_priv_t; + +static int +splat_kmem_cache_test_constructor(void *ptr, void *priv, int flags) +{ + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; + kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; + + if (kcd) { + if (kcp) { + kcd->kcd_magic = kcp->kcp_magic; + kcp->kcp_count++; + } + + memset(kcd->kcd_buf, 0xaa, kcp->kcp_size - (sizeof *kcd)); + kcd->kcd_flag = 1; + } + + return 0; +} + +static void +splat_kmem_cache_test_destructor(void *ptr, void *priv) +{ + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; + kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; + + if (kcd) { + if (kcp) { + kcd->kcd_magic = 0; + kcp->kcp_count--; + } + + memset(kcd->kcd_buf, 0xbb, kcp->kcp_size - (sizeof *kcd)); + kcd->kcd_flag = 0; + } + + return; +} + +static int +splat_kmem_cache_size_test(struct file *file, void *arg, + char *name, int size, int flags) +{ + kmem_cache_t *cache = NULL; + kmem_cache_data_t *kcd = NULL; + kmem_cache_priv_t kcp; + int rc = 0, max; + + kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; + kcp.kcp_file = file; + kcp.kcp_size = size; + kcp.kcp_count = 0; + kcp.kcp_rc = 0; + + cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp.kcp_size, 0, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + NULL, &kcp, NULL, flags); + if (!cache) { + splat_vprint(file, name, + "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + kcd = kmem_cache_alloc(cache, KM_SLEEP); + if (!kcd) { + splat_vprint(file, name, + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + if (!kcd->kcd_flag) { + splat_vprint(file, name, + "Failed to run contructor for '%s'\n", + SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + if (kcd->kcd_magic != kcp.kcp_magic) { + splat_vprint(file, name, + "Failed to pass private data to constructor " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + max = kcp.kcp_count; + kmem_cache_free(cache, kcd); + + /* Destroy the entire cache which will force destructors to + * run and we can verify one was called for every object */ + kmem_cache_destroy(cache); + if (kcp.kcp_count) { + splat_vprint(file, name, + "Failed to run destructor on all slab objects " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + } + + splat_vprint(file, name, + "Successfully ran ctors/dtors for %d elements in '%s'\n", + max, SPLAT_KMEM_CACHE_NAME); + + return rc; + +out_free: + if (kcd) + kmem_cache_free(cache, kcd); + + kmem_cache_destroy(cache); + return rc; +} + +static int +splat_kmem_test5(struct file *file, void *arg) +{ + return splat_kmem_cache_size_test(file, arg, SPLAT_KMEM_TEST5_NAME, + sizeof(kmem_cache_data_t) * 1, 0); +} + +static int +splat_kmem_test6(struct file *file, void *arg) +{ + return splat_kmem_cache_size_test(file, arg, SPLAT_KMEM_TEST6_NAME, + sizeof(kmem_cache_data_t) * 1024, 0); +} + +static void +splat_kmem_cache_test_reclaim(void *priv) +{ + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; + int i, count; + + count = min(SPLAT_KMEM_OBJ_RECLAIM, kcp->kcp_count); + splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST7_NAME, + "Reaping %d objects from '%s'\n", count, + SPLAT_KMEM_CACHE_NAME); + + for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { + if (kcp->kcp_kcd[i]) { + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); + kcp->kcp_kcd[i] = NULL; + + if (--count == 0) + break; + } + } + + return; +} + +static int +splat_kmem_test7(struct file *file, void *arg) +{ + kmem_cache_t *cache; + kmem_cache_priv_t kcp; + int i, rc = 0; + + kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; + kcp.kcp_file = file; + kcp.kcp_size = 256; + kcp.kcp_count = 0; + kcp.kcp_rc = 0; + + cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp.kcp_size, 0, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + splat_kmem_cache_test_reclaim, + &kcp, NULL, 0); + if (!cache) { + splat_vprint(file, SPLAT_KMEM_TEST7_NAME, + "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + kcp.kcp_cache = cache; + + for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { + /* All allocations need not succeed */ + kcp.kcp_kcd[i] = kmem_cache_alloc(cache, KM_SLEEP); + if (!kcp.kcp_kcd[i]) { + splat_vprint(file, SPLAT_KMEM_TEST7_NAME, + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); + } + } + + ASSERT(kcp.kcp_count > 0); + + /* Request the slab cache free any objects it can. For a few reasons + * this may not immediately result in more free memory even if objects + * are freed. First off, due to fragmentation we may not be able to + * reclaim any slabs. Secondly, even if we do we fully clear some + * slabs we will not want to immedately reclaim all of them because + * we may contend with cache allocs and thrash. What we want to see + * is slab size decrease more gradually as it becomes clear they + * will not be needed. This should be acheivable in less than minute + * if it takes longer than this something has gone wrong. + */ + for (i = 0; i < 60; i++) { + kmem_cache_reap_now(cache); + splat_vprint(file, SPLAT_KMEM_TEST7_NAME, + "%s cache objects %d, slabs %u/%u objs %u/%u\n", + SPLAT_KMEM_CACHE_NAME, kcp.kcp_count, + (unsigned)cache->skc_slab_alloc, + (unsigned)cache->skc_slab_total, + (unsigned)cache->skc_obj_alloc, + (unsigned)cache->skc_obj_total); + + if (cache->skc_obj_total == 0) + break; + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + } + + if (cache->skc_obj_total == 0) { + splat_vprint(file, SPLAT_KMEM_TEST7_NAME, + "Successfully created %d objects " + "in cache %s and reclaimed them\n", + SPLAT_KMEM_OBJ_COUNT, SPLAT_KMEM_CACHE_NAME); + } else { + splat_vprint(file, SPLAT_KMEM_TEST7_NAME, + "Failed to reclaim %u/%d objects from cache %s\n", + (unsigned)cache->skc_obj_total, SPLAT_KMEM_OBJ_COUNT, + SPLAT_KMEM_CACHE_NAME); + rc = -ENOMEM; + } + + /* Cleanup our mess (for failure case of time expiring) */ + for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) + if (kcp.kcp_kcd[i]) + kmem_cache_free(cache, kcp.kcp_kcd[i]); + + kmem_cache_destroy(cache); + + return rc; +} + splat_subsystem_t * splat_kmem_init(void) { @@ -421,6 +515,10 @@ splat_kmem_init(void) SPLAT_KMEM_TEST4_ID, splat_kmem_test4); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST5_NAME, SPLAT_KMEM_TEST5_DESC, SPLAT_KMEM_TEST5_ID, splat_kmem_test5); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST6_NAME, SPLAT_KMEM_TEST6_DESC, + SPLAT_KMEM_TEST6_ID, splat_kmem_test6); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST7_NAME, SPLAT_KMEM_TEST7_DESC, + SPLAT_KMEM_TEST7_ID, splat_kmem_test7); return sub; } @@ -429,6 +527,8 @@ void splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST7_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST4_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST3_ID); From 5cbd57fa91076a8001dff0fb6e864147d3a7c286 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 13 Jun 2008 23:56:26 +0000 Subject: [PATCH 0125/1062] Fix minor chaos/fc9 kernel discrepencies in build git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@133 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 8 ++++++++ modules/spl/spl-kmem.c | 20 +++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 082db032a..e3810eb2f 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -453,6 +453,14 @@ void spl_kmem_fini(void); #define kmem_cache_reap_now(skc) spl_kmem_cache_reap_now(skc) #define kmem_reap() spl_kmem_reap() +#ifdef HAVE_KMEM_CACHE_CREATE_DTOR +#define __kmem_cache_create(name, size, align, flags, ctor, dtor) \ + kmem_cache_create(name, size, align, flags, ctor, dtor) +#else +#define __kmem_cache_create(name, size, align, flags, ctor, dtor) \ + kmem_cache_create(name, size, align, flags, ctor) +#endif /* HAVE_KMEM_CACHE_CREATE_DTOR */ + #ifdef __cplusplus } #endif diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index e52f19935..24d53a6c2 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -427,6 +427,11 @@ spl_hash_ptr(void *ptr, unsigned int bits) return hash_long((unsigned long)ptr >> PAGE_SHIFT, bits); } +#ifndef list_first_entry +#define list_first_entry(ptr, type, member) \ + list_entry((ptr)->next, type, member) +#endif + void * spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) { @@ -640,20 +645,21 @@ spl_kmem_init(void) spl_slab_cache = NULL; spl_obj_cache = NULL; - spl_slab_cache = kmem_cache_create("spl_slab_cache", - sizeof(spl_kmem_slab_t), - 0, 0, NULL); + spl_slab_cache = __kmem_cache_create("spl_slab_cache", + sizeof(spl_kmem_slab_t), + 0, 0, NULL, NULL); if (spl_slab_cache == NULL) GOTO(out_cache, rc = -ENOMEM); - spl_obj_cache = kmem_cache_create("spl_obj_cache", - sizeof(spl_kmem_obj_t), - 0, 0, NULL); + spl_obj_cache = __kmem_cache_create("spl_obj_cache", + sizeof(spl_kmem_obj_t), + 0, 0, NULL, NULL); if (spl_obj_cache == NULL) GOTO(out_cache, rc = -ENOMEM); #ifdef HAVE_SET_SHRINKER - spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, shrinker); + spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, + kmem_cache_generic_shrinker); if (spl_kmem_cache_shrinker == NULL) GOTO(out_cache, rc = -ENOMEM); #else From 44b8f1769f532ecc9e469511a469f58f0c065877 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 23 Jun 2008 23:54:52 +0000 Subject: [PATCH 0126/1062] Add another kmem test to check for lock contention in the slab allocator. I have serious contention issues here and I needed a way to easily measure how much the following batch of changes will improve things. Currently things are quite bad when the allocator is highly contended, and interestingly it seems to get worse in a non-linear fashion... I'm not sure why yet. I'll figure it out tomorrow. kmem:kmem_lock Pass kmem_lock: time (sec) slabs objs kmem_lock: tot/max/calc tot/max/calc kmem_lock: 0.061000000 75/60/64 2400/1894/2048 kmem_lock: 0.157000000 134/125/128 4288/3974/4096 kmem_lock: 0.471000000 263/249/256 8416/7962/8192 kmem_lock: 2.526000000 518/499/512 16576/15957/16384 kmem_lock: 14.393000000 990/978/1024 31680/31270/32768 git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@134 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/splat/splat-kmem.c | 158 +++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 7342052c1..0d774231d 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -58,9 +58,31 @@ #define SPLAT_KMEM_TEST7_NAME "kmem_reap" #define SPLAT_KMEM_TEST7_DESC "Slab reaping test" +#define SPLAT_KMEM_TEST8_ID 0x0108 +#define SPLAT_KMEM_TEST8_NAME "kmem_lock" +#define SPLAT_KMEM_TEST8_DESC "Slab locking test" + #define SPLAT_KMEM_ALLOC_COUNT 10 #define SPLAT_VMEM_ALLOC_COUNT 10 +/* Not exported from the kernel, but we need it for timespec_sub. Be very + * * careful here we are using the kernel prototype, so that must not change. + * */ +void +set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) +{ + while (nsec >= NSEC_PER_SEC) { + nsec -= NSEC_PER_SEC; + ++sec; + } + while (nsec < 0) { + nsec += NSEC_PER_SEC; + --sec; + } + ts->tv_sec = sec; + ts->tv_nsec = nsec; +} + /* XXX - This test may fail under tight memory conditions */ static int splat_kmem_test1(struct file *file, void *arg) @@ -242,8 +264,12 @@ typedef struct kmem_cache_priv { struct file *kcp_file; kmem_cache_t *kcp_cache; kmem_cache_data_t *kcp_kcd[SPLAT_KMEM_OBJ_COUNT]; + spinlock_t kcp_lock; + wait_queue_head_t kcp_waitq; int kcp_size; int kcp_count; + int kcp_threads; + int kcp_alloc; int kcp_rc; } kmem_cache_priv_t; @@ -488,6 +514,135 @@ splat_kmem_test7(struct file *file, void *arg) return rc; } +static void +splat_kmem_test8_thread(void *arg) +{ + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)arg; + int count = kcp->kcp_alloc, rc = 0, i; + void **objs; + + ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); + + objs = vmem_zalloc(count * sizeof(void *), KM_SLEEP); + if (!objs) { + rc = -ENOMEM; + goto out; + } + + for (i = 0; i < count; i++) { + objs[i] = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); + if (!objs[i]) { + splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST8_NAME, + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); + rc = -ENOMEM; + goto out_free; + } + } + +out_free: + for (i = 0; i < count; i++) + if (objs[i]) + kmem_cache_free(kcp->kcp_cache, objs[i]); + + vmem_free(objs, count * sizeof(void *)); +out: + spin_lock(&kcp->kcp_lock); + kcp->kcp_threads--; + if (!kcp->kcp_rc) + kcp->kcp_rc = rc; + spin_unlock(&kcp->kcp_lock); + + wake_up(&kcp->kcp_waitq); + thread_exit(); +} + +static int +splat_kmem_test8_count(kmem_cache_priv_t *kcp, int threads) +{ + int ret; + + spin_lock(&kcp->kcp_lock); + ret = (kcp->kcp_threads == threads); + spin_unlock(&kcp->kcp_lock); + + return ret; +} + +/* This test will always pass and is simply here so I can easily + * eyeball the slab cache locking overhead to ensure it is reasonable. + */ +static int +splat_kmem_test8(struct file *file, void *arg) +{ + kmem_cache_priv_t kcp; + kthread_t *thr; + struct timespec start, stop, delta; + int alloc, i; + + kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; + kcp.kcp_file = file; + + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%s", + "time (sec)\tslabs \tobjs\n"); + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%s", + " \ttot/max/calc\ttot/max/calc\n"); + + for (alloc = 64; alloc <= 1024; alloc *= 2) { + kcp.kcp_size = 256; + kcp.kcp_count = 0; + kcp.kcp_threads = 0; + kcp.kcp_alloc = alloc; + kcp.kcp_rc = 0; + spin_lock_init(&kcp.kcp_lock); + init_waitqueue_head(&kcp.kcp_waitq); + + + kcp.kcp_cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, + kcp.kcp_size, 0, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + NULL, &kcp, NULL, 0); + if (!kcp.kcp_cache) { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Unable to create '%s' cache\n", + SPLAT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + start = current_kernel_time(); + + for (i = 0; i < 32; i++) { + thr = thread_create(NULL, 0, splat_kmem_test8_thread, + &kcp, 0, &p0, TS_RUN, minclsyspri); + ASSERT(thr != NULL); + kcp.kcp_threads++; + } + + /* Sleep until the thread sets kcp.kcp_threads == 0 */ + wait_event(kcp.kcp_waitq, splat_kmem_test8_count(&kcp, 0)); + stop = current_kernel_time(); + delta = timespec_sub(stop, start); + + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%2ld.%09ld\t" + "%lu/%lu/%lu\t%lu/%lu/%lu\n", + delta.tv_sec, delta.tv_nsec, + (unsigned long)kcp.kcp_cache->skc_slab_total, + (unsigned long)kcp.kcp_cache->skc_slab_max, + (unsigned long)(kcp.kcp_alloc * 32 / SPL_KMEM_CACHE_OBJ_PER_SLAB), + (unsigned long)kcp.kcp_cache->skc_obj_total, + (unsigned long)kcp.kcp_cache->skc_obj_max, + (unsigned long)(kcp.kcp_alloc * 32)); + + kmem_cache_destroy(kcp.kcp_cache); + + if (kcp.kcp_rc) + break; + } + + return kcp.kcp_rc; +} + splat_subsystem_t * splat_kmem_init(void) { @@ -519,6 +674,8 @@ splat_kmem_init(void) SPLAT_KMEM_TEST6_ID, splat_kmem_test6); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST7_NAME, SPLAT_KMEM_TEST7_DESC, SPLAT_KMEM_TEST7_ID, splat_kmem_test7); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST8_NAME, SPLAT_KMEM_TEST8_DESC, + SPLAT_KMEM_TEST8_ID, splat_kmem_test8); return sub; } @@ -527,6 +684,7 @@ void splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST8_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST5_ID); From d46630e0f316a39899fa8ee02365e015303f2a5d Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 24 Jun 2008 17:18:15 +0000 Subject: [PATCH 0127/1062] The first locking issue was due to the semaphore I used. I was trying to be overly clever and the context switch when the semaphore was busy was destroying performance. Converting to a simple spin lock bough me a factor of 50 or so. That said it's still not good enough. Tests show bad performance and we are still CPU bound. The logical fix is I need to implement per-cpu hot caches to minimize the SMP contention. Linux and Solaris both have this, I was hoping to do without but it looks like that's not to be. kmem_lock: time (sec) slabs objs hash kmem_lock: tot/max/calc tot/max/calc size/depth kmem_lock: 0.022000000 7/6/64 224/177/2048 32768/1 kmem_lock: 0.039000000 13/13/128 416/404/4096 32768/1 kmem_lock: 0.079000000 23/21/256 736/672/8192 32768/1 kmem_lock: 0.158000000 48/47/512 1536/1504/16384 32768/1 kmem_lock: 0.345000000 105/105/1024 3360/3358/32768 32768/2 kmem_lock: 0.760000000 202/200/2048 6464/6400/65536 32768/3 git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@135 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 16 ++++++------- modules/spl/spl-kmem.c | 48 +++++++++++++++++++++----------------- modules/splat/splat-kmem.c | 12 ++++++---- 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index e3810eb2f..fb0c22e3a 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -364,7 +364,7 @@ extern int kmem_set_warning(int flag); #define SKS_MAGIC 0x22222222 #define SKC_MAGIC 0x2c2c2c2c -#define SPL_KMEM_CACHE_HASH_BITS 12 /* 4k, sized for 1000's of objs */ +#define SPL_KMEM_CACHE_HASH_BITS 12 #define SPL_KMEM_CACHE_HASH_ELTS (1 << SPL_KMEM_CACHE_HASH_BITS) #define SPL_KMEM_CACHE_HASH_SIZE (sizeof(struct hlist_head) * \ SPL_KMEM_CACHE_HASH_ELTS) @@ -417,16 +417,16 @@ typedef struct spl_kmem_cache { struct list_head skc_list; /* List of caches linkage */ struct list_head skc_complete_list;/* Completely alloc'ed */ struct list_head skc_partial_list; /* Partially alloc'ed */ - struct rw_semaphore skc_sem; /* Cache semaphore */ + spinlock_t skc_lock; /* Cache lock */ uint64_t skc_slab_fail; /* Slab alloc failures */ uint64_t skc_slab_create;/* Slab creates */ uint64_t skc_slab_destroy;/* Slab destroys */ - uint64_t skc_slab_total; /* Slab total */ - uint64_t skc_slab_alloc; /* Slab alloc */ - uint64_t skc_slab_max; /* Slab max */ - uint64_t skc_obj_total; /* Obj total */ - uint64_t skc_obj_alloc; /* Obj alloc */ - uint64_t skc_obj_max; /* Obj max */ + uint64_t skc_slab_total; /* Slab total current */ + uint64_t skc_slab_alloc; /* Slab alloc current */ + uint64_t skc_slab_max; /* Slab max historic */ + uint64_t skc_obj_total; /* Obj total current */ + uint64_t skc_obj_alloc; /* Obj alloc current */ + uint64_t skc_obj_max; /* Obj max historic */ uint64_t skc_hash_depth; /* Hash depth */ uint64_t skc_hash_max; /* Hash depth max */ } spl_kmem_cache_t; diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 24d53a6c2..ec12aca21 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -221,7 +221,7 @@ out: } /* Removes slab from complete or partial list, so it must - * be called with the 'skc->skc_sem' semaphore held. + * be called with the 'skc->skc_lock' held. * */ static void slab_free(spl_kmem_slab_t *sks) { @@ -236,9 +236,9 @@ slab_free(spl_kmem_slab_t *sks) { skc->skc_obj_total -= sks->sks_objs; skc->skc_slab_total--; -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - ASSERT(rwsem_is_locked(&skc->skc_sem)); -#endif +//#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + ASSERT(spin_is_locked(&skc->skc_lock)); +//#endif list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { ASSERT(sko->sko_magic == SKO_MAGIC); @@ -267,9 +267,9 @@ __slab_reclaim(spl_kmem_cache_t *skc) int rc = 0; ENTRY; -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - ASSERT(rwsem_is_locked(&skc->skc_sem)); -#endif +//#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + ASSERT(spin_is_locked(&skc->skc_lock)); +//#endif /* * Free empty slabs which have not been touched in skc_delay * seconds. This delay time is important to avoid thrashing. @@ -296,9 +296,9 @@ slab_reclaim(spl_kmem_cache_t *skc) int rc; ENTRY; - down_write(&skc->skc_sem); + spin_lock(&skc->skc_lock); rc = __slab_reclaim(skc); - up_write(&skc->skc_sem); + spin_unlock(&skc->skc_lock); RETURN(rc); } @@ -363,7 +363,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, INIT_LIST_HEAD(&skc->skc_list); INIT_LIST_HEAD(&skc->skc_complete_list); INIT_LIST_HEAD(&skc->skc_partial_list); - init_rwsem(&skc->skc_sem); + spin_lock_init(&skc->skc_lock); skc->skc_slab_fail = 0; skc->skc_slab_create = 0; skc->skc_slab_destroy = 0; @@ -398,7 +398,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) list_del_init(&skc->skc_list); up_write(&spl_kmem_cache_sem); - down_write(&skc->skc_sem); + spin_lock(&skc->skc_lock); /* Validate there are no objects in use and free all the * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. @@ -411,7 +411,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) kmem_free(skc->skc_hash, skc->skc_hash_size); kmem_free(skc->skc_name, skc->skc_name_size); kmem_free(skc, sizeof(*skc)); - up_write(&skc->skc_sem); + spin_unlock(&skc->skc_lock); EXIT; } @@ -441,7 +441,7 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) unsigned long key; ENTRY; - down_write(&skc->skc_sem); + spin_lock(&skc->skc_lock); restart: /* Check for available objects from the partial slabs */ if (!list_empty(&skc->skc_partial_list)) { @@ -459,7 +459,7 @@ restart: /* Remove from sks_free_list, add to used hash */ list_del_init(&sko->sko_list); key = spl_hash_ptr(sko->sko_addr, skc->skc_hash_bits); - hlist_add_head_rcu(&sko->sko_hlist, &skc->skc_hash[key]); + hlist_add_head(&sko->sko_hlist, &skc->skc_hash[key]); sks->sks_age = jiffies; atomic_inc(&sks->sks_ref); @@ -484,7 +484,7 @@ restart: GOTO(out_lock, obj = sko->sko_addr); } - up_write(&skc->skc_sem); + spin_unlock(&skc->skc_lock); /* No available objects create a new slab. Since this is an * expensive operation we do it without holding the semaphore @@ -521,14 +521,14 @@ restart: /* Link the newly created slab in to the skc_partial_list, * and retry the allocation which will now succeed. */ - down_write(&skc->skc_sem); + spin_lock(&skc->skc_lock); skc->skc_slab_total++; skc->skc_obj_total += sks->sks_objs; list_add_tail(&sks->sks_list, &skc->skc_partial_list); GOTO(restart, obj = NULL); out_lock: - up_write(&skc->skc_sem); + spin_unlock(&skc->skc_lock); out: RETURN(obj); } @@ -537,16 +537,20 @@ EXPORT_SYMBOL(spl_kmem_cache_alloc); void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) { - struct hlist_head *head; struct hlist_node *node; spl_kmem_slab_t *sks = NULL; spl_kmem_obj_t *sko = NULL; + unsigned long key = spl_hash_ptr(obj, skc->skc_hash_bits); + int i = 0; ENTRY; - down_write(&skc->skc_sem); + spin_lock(&skc->skc_lock); + + hlist_for_each_entry(sko, node, &skc->skc_hash[key], sko_hlist) { + + if (unlikely((++i) > skc->skc_hash_depth)) + skc->skc_hash_depth = i; - head = &skc->skc_hash[spl_hash_ptr(obj, skc->skc_hash_bits)]; - hlist_for_each_entry_rcu(sko, node, head, sko_hlist) { if (sko->sko_addr == obj) { ASSERT(sko->sko_magic == SKO_MAGIC); sks = sko->sko_slab; @@ -583,7 +587,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) } __slab_reclaim(skc); - up_write(&skc->skc_sem); + spin_unlock(&skc->skc_lock); } EXPORT_SYMBOL(spl_kmem_cache_free); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 0d774231d..51fa6f0ef 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -584,11 +584,11 @@ splat_kmem_test8(struct file *file, void *arg) kcp.kcp_file = file; splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%s", - "time (sec)\tslabs \tobjs\n"); + "time (sec)\tslabs \tobjs \thash\n"); splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%s", - " \ttot/max/calc\ttot/max/calc\n"); + " \ttot/max/calc\ttot/max/calc\tsize/depth\n"); - for (alloc = 64; alloc <= 1024; alloc *= 2) { + for (alloc = 64; alloc <= 4096; alloc *= 2) { kcp.kcp_size = 256; kcp.kcp_count = 0; kcp.kcp_threads = 0; @@ -625,14 +625,16 @@ splat_kmem_test8(struct file *file, void *arg) delta = timespec_sub(stop, start); splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%2ld.%09ld\t" - "%lu/%lu/%lu\t%lu/%lu/%lu\n", + "%lu/%lu/%lu\t%lu/%lu/%lu\t%lu/%lu\n", delta.tv_sec, delta.tv_nsec, (unsigned long)kcp.kcp_cache->skc_slab_total, (unsigned long)kcp.kcp_cache->skc_slab_max, (unsigned long)(kcp.kcp_alloc * 32 / SPL_KMEM_CACHE_OBJ_PER_SLAB), (unsigned long)kcp.kcp_cache->skc_obj_total, (unsigned long)kcp.kcp_cache->skc_obj_max, - (unsigned long)(kcp.kcp_alloc * 32)); + (unsigned long)(kcp.kcp_alloc * 32), + (unsigned long)kcp.kcp_cache->skc_hash_size, + (unsigned long)kcp.kcp_cache->skc_hash_depth); kmem_cache_destroy(kcp.kcp_cache); From 4afaaefa050f02b6b993468aafdfc457dd508b2a Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 25 Jun 2008 20:57:45 +0000 Subject: [PATCH 0128/1062] Implement per-cpu local caches. This seems to have bough me another factor of 10x improvement on SMP system due to reduced lock contention. This may put me in the ballpark of what is needed. We can still further improve things on NUMA systems by creating an additional L3 cache per memory node instead of the current global pool. With luck this won't be needed. I should also take another look at the locking now that everything is working. There's a good chance I can tighten it up a little bit and improve things a little more. kmem_lock: time (sec) slabs objs hash kmem_lock: tot/max/calc tot/max/calc size/depth kmem_lock: 0.000999926 6/6/1 192/192/32 32768/0 kmem_lock: 0.000999926 4/4/2 128/128/64 32768/0 kmem_lock: 0.000999926 4/4/4 128/128/128 32768/0 kmem_lock: 0.000999926 4/4/8 128/128/256 32768/0 kmem_lock: 0.000999926 4/4/16 128/128/512 32768/0 kmem_lock: 0.000999926 4/4/32 128/128/1024 32768/0 kmem_lock: 0.000999926 4/4/64 128/128/2048 32768/0 kmem_lock: 0.000999926 8/8/128 256/256/4096 32768/0 kmem_lock: 0.003999704 24/23/256 768/736/8192 32768/1 kmem_lock: 0.012999038 44/41/512 1408/1312/16384 32768/1 kmem_lock: 0.051996153 96/93/1024 3072/2976/32768 32768/2 kmem_lock: 0.181986536 187/184/2048 5984/5888/65536 32768/3 kmem_lock: 0.655951469 342/339/4096 10944/10848/131072 32768/4 git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@136 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 19 +- modules/spl/spl-kmem.c | 553 ++++++++++++++++++++++++++----------- modules/spl/spl-proc.c | 4 + modules/spl/spl-vnode.c | 2 +- modules/splat/splat-kmem.c | 18 +- 5 files changed, 427 insertions(+), 169 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index fb0c22e3a..25269335d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -360,6 +360,7 @@ kmem_debugging(void) extern int kmem_set_warning(int flag); +#define SKM_MAGIC 0x2e2e2e2e #define SKO_MAGIC 0x20202020 #define SKS_MAGIC 0x22222222 #define SKC_MAGIC 0x2c2c2c2c @@ -376,6 +377,15 @@ typedef int (*spl_kmem_ctor_t)(void *, void *, int); typedef void (*spl_kmem_dtor_t)(void *, void *); typedef void (*spl_kmem_reclaim_t)(void *); +typedef struct spl_kmem_magazine { + uint32_t skm_magic; /* Sanity magic */ + uint32_t skm_avail; /* Available objects */ + uint32_t skm_size; /* Magazine size */ + uint32_t skm_refill; /* Batch refill size */ + unsigned long skm_age; /* Last cache access */ + void *skm_objs[0]; /* Object pointers */ +} spl_kmem_magazine_t; + typedef struct spl_kmem_obj { uint32_t sko_magic; /* Sanity magic */ uint32_t sko_flags; /* Per object flags */ @@ -392,13 +402,16 @@ typedef struct spl_kmem_slab { struct list_head sks_list; /* Slab list linkage */ struct list_head sks_free_list; /* Free object list */ unsigned long sks_age; /* Last modify jiffie */ - atomic_t sks_ref; /* Ref count used objects */ + uint32_t sks_ref; /* Ref count used objects */ } spl_kmem_slab_t; typedef struct spl_kmem_cache { uint32_t skc_magic; /* Sanity magic */ uint32_t skc_name_size; /* Name length */ char *skc_name; /* Name string */ + spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */ + uint32_t skc_mag_size; /* Magazine size */ + uint32_t skc_mag_refill; /* Magazine refill count */ spl_kmem_ctor_t skc_ctor; /* Constructor */ spl_kmem_dtor_t skc_dtor; /* Destructor */ spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ @@ -427,8 +440,8 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_total; /* Obj total current */ uint64_t skc_obj_alloc; /* Obj alloc current */ uint64_t skc_obj_max; /* Obj max historic */ - uint64_t skc_hash_depth; /* Hash depth */ - uint64_t skc_hash_max; /* Hash depth max */ + uint64_t skc_hash_depth; /* Lazy hash depth */ + uint64_t skc_hash_count; /* Hash entries current */ } spl_kmem_cache_t; extern spl_kmem_cache_t * diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index ec12aca21..708b01cc5 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -109,13 +109,10 @@ EXPORT_SYMBOL(kmem_set_warning); * small virtual address space on 32bit arches. This will seriously * constrain the size of the slab caches and their performance. * - * XXX: Refactor the below code in to smaller functions. This works - * for a first pass but each function is doing to much. - * * XXX: Implement SPL proc interface to export full per cache stats. * * XXX: Implement work requests to keep an eye on each cache and - * shrink them via slab_reclaim() when they are wasting lots + * shrink them via spl_slab_reclaim() when they are wasting lots * of space. Currently this process is driven by the reapers. * * XXX: Implement proper small cache object support by embedding @@ -138,6 +135,8 @@ EXPORT_SYMBOL(kmem_set_warning); * * XXX: Slab coloring may also yield performance improvements and would * be desirable to implement. + * + * XXX: Proper hardware cache alignment would be good too. */ /* Ensure the __kmem_cache_create/__kmem_cache_destroy macros are @@ -155,18 +154,22 @@ static struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ static kmem_cache_t *spl_slab_cache; /* Cache for slab structs */ static kmem_cache_t *spl_obj_cache; /* Cache for obj structs */ +static int spl_cache_flush(spl_kmem_cache_t *skc, + spl_kmem_magazine_t *skm, int flush); + #ifdef HAVE_SET_SHRINKER static struct shrinker *spl_kmem_cache_shrinker; #else -static int kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask); +static int spl_kmem_cache_generic_shrinker(int nr_to_scan, + unsigned int gfp_mask); static struct shrinker spl_kmem_cache_shrinker = { - .shrink = kmem_cache_generic_shrinker, + .shrink = spl_kmem_cache_generic_shrinker, .seeks = KMC_DEFAULT_SEEKS, }; #endif static spl_kmem_slab_t * -slab_alloc(spl_kmem_cache_t *skc, int flags) { +spl_slab_alloc(spl_kmem_cache_t *skc, int flags) { spl_kmem_slab_t *sks; spl_kmem_obj_t *sko, *n; int i; @@ -182,7 +185,7 @@ slab_alloc(spl_kmem_cache_t *skc, int flags) { sks->sks_cache = skc; INIT_LIST_HEAD(&sks->sks_list); INIT_LIST_HEAD(&sks->sks_free_list); - atomic_set(&sks->sks_ref, 0); + sks->sks_ref = 0; for (i = 0; i < sks->sks_objs; i++) { sko = kmem_cache_alloc(spl_obj_cache, flags); @@ -224,21 +227,19 @@ out: * be called with the 'skc->skc_lock' held. * */ static void -slab_free(spl_kmem_slab_t *sks) { +spl_slab_free(spl_kmem_slab_t *sks) { spl_kmem_cache_t *skc; spl_kmem_obj_t *sko, *n; int i = 0; ENTRY; ASSERT(sks->sks_magic == SKS_MAGIC); - ASSERT(atomic_read(&sks->sks_ref) == 0); + ASSERT(sks->sks_ref == 0); skc = sks->sks_cache; skc->skc_obj_total -= sks->sks_objs; skc->skc_slab_total--; -//#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK ASSERT(spin_is_locked(&skc->skc_lock)); -//#endif list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { ASSERT(sko->sko_magic == SKO_MAGIC); @@ -261,15 +262,13 @@ slab_free(spl_kmem_slab_t *sks) { } static int -__slab_reclaim(spl_kmem_cache_t *skc) +__spl_slab_reclaim(spl_kmem_cache_t *skc) { spl_kmem_slab_t *sks, *m; int rc = 0; ENTRY; -//#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK ASSERT(spin_is_locked(&skc->skc_lock)); -//#endif /* * Free empty slabs which have not been touched in skc_delay * seconds. This delay time is important to avoid thrashing. @@ -277,11 +276,11 @@ __slab_reclaim(spl_kmem_cache_t *skc) */ list_for_each_entry_safe_reverse(sks, m, &skc->skc_partial_list, sks_list) { - if (atomic_read(&sks->sks_ref) > 0) + if (sks->sks_ref > 0) break; if (time_after(jiffies, sks->sks_age + skc->skc_delay * HZ)) { - slab_free(sks); + spl_slab_free(sks); rc++; } } @@ -291,18 +290,110 @@ __slab_reclaim(spl_kmem_cache_t *skc) } static int -slab_reclaim(spl_kmem_cache_t *skc) +spl_slab_reclaim(spl_kmem_cache_t *skc) { int rc; ENTRY; spin_lock(&skc->skc_lock); - rc = __slab_reclaim(skc); + rc = __spl_slab_reclaim(skc); spin_unlock(&skc->skc_lock); RETURN(rc); } +static int +spl_magazine_size(spl_kmem_cache_t *skc) +{ + int size; + ENTRY; + + /* Guesses for reasonable magazine sizes, they + * should really adapt based on observed usage. */ + if (skc->skc_obj_size > (PAGE_SIZE * 256)) + size = 1; + else if (skc->skc_obj_size > (PAGE_SIZE * 32)) + size = 4; + else if (skc->skc_obj_size > (PAGE_SIZE)) + size = 16; + else if (skc->skc_obj_size > (PAGE_SIZE / 4)) + size = 32; + else if (skc->skc_obj_size > (PAGE_SIZE / 16)) + size = 64; + else + size = 128; + + RETURN(size); +} + +static spl_kmem_magazine_t * +spl_magazine_alloc(spl_kmem_cache_t *skc, int node) +{ + spl_kmem_magazine_t *skm; + int size = sizeof(spl_kmem_magazine_t) + + sizeof(void *) * skc->skc_mag_size; + ENTRY; + + skm = kmalloc_node(size, GFP_KERNEL, node); + if (skm) { + skm->skm_magic = SKM_MAGIC; + skm->skm_avail = 0; + skm->skm_size = skc->skc_mag_size; + skm->skm_refill = skc->skc_mag_refill; + skm->skm_age = jiffies; + } + + RETURN(skm); +} + +static void +spl_magazine_free(spl_kmem_magazine_t *skm) +{ + ENTRY; + ASSERT(skm->skm_magic == SKM_MAGIC); + ASSERT(skm->skm_avail == 0); + kfree(skm); + EXIT; +} + +static int +spl_magazine_create(spl_kmem_cache_t *skc) +{ + int i; + ENTRY; + + skc->skc_mag_size = spl_magazine_size(skc); + skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; + + for_each_online_cpu(i) { + skc->skc_mag[i] = spl_magazine_alloc(skc, cpu_to_node(i)); + if (!skc->skc_mag[i]) { + for (i--; i >= 0; i--) + spl_magazine_free(skc->skc_mag[i]); + + RETURN(-ENOMEM); + } + } + + RETURN(0); +} + +static void +spl_magazine_destroy(spl_kmem_cache_t *skc) +{ + spl_kmem_magazine_t *skm; + int i; + ENTRY; + + for_each_online_cpu(i) { + skm = skc->skc_mag[i]; + (void)spl_cache_flush(skc, skm, skm->skm_avail); + spl_magazine_free(skm); + } + + EXIT; +} + spl_kmem_cache_t * spl_kmem_cache_create(char *name, size_t size, size_t align, spl_kmem_ctor_t ctor, @@ -311,7 +402,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, void *priv, void *vmp, int flags) { spl_kmem_cache_t *skc; - int i, kmem_flags = KM_SLEEP; + int i, rc, kmem_flags = KM_SLEEP; ENTRY; /* We may be called when there is a non-zero preempt_count or @@ -326,7 +417,6 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, RETURN(NULL); skc->skc_magic = SKC_MAGIC; - skc->skc_name_size = strlen(name) + 1; skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, kmem_flags); if (skc->skc_name == NULL) { @@ -355,6 +445,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (skc->skc_hash == NULL) { kmem_free(skc->skc_name, skc->skc_name_size); kmem_free(skc, sizeof(*skc)); + RETURN(NULL); } for (i = 0; i < skc->skc_hash_elts; i++) @@ -374,7 +465,15 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_alloc = 0; skc->skc_obj_max = 0; skc->skc_hash_depth = 0; - skc->skc_hash_max = 0; + skc->skc_hash_count = 0; + + rc = spl_magazine_create(skc); + if (rc) { + kmem_free(skc->skc_hash, skc->skc_hash_size); + kmem_free(skc->skc_name, skc->skc_name_size); + kmem_free(skc, sizeof(*skc)); + RETURN(NULL); + } down_write(&spl_kmem_cache_sem); list_add_tail(&skc->skc_list, &spl_kmem_cache_list); @@ -385,8 +484,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, EXPORT_SYMBOL(spl_kmem_cache_create); /* The caller must ensure there are no racing calls to - * spl_kmem_cache_alloc() for this spl_kmem_cache_t when - * it is being destroyed. + * spl_kmem_cache_alloc() for this spl_kmem_cache_t. */ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) @@ -398,20 +496,22 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) list_del_init(&skc->skc_list); up_write(&spl_kmem_cache_sem); + spl_magazine_destroy(skc); spin_lock(&skc->skc_lock); /* Validate there are no objects in use and free all the - * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. - */ + * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ ASSERT(list_empty(&skc->skc_complete_list)); + ASSERTF(skc->skc_hash_count == 0, "skc->skc_hash_count=%d\n", + skc->skc_hash_count); list_for_each_entry_safe(sks, m, &skc->skc_partial_list, sks_list) - slab_free(sks); + spl_slab_free(sks); kmem_free(skc->skc_hash, skc->skc_hash_size); kmem_free(skc->skc_name, skc->skc_name_size); - kmem_free(skc, sizeof(*skc)); spin_unlock(&skc->skc_lock); + kmem_free(skc, sizeof(*skc)); EXIT; } @@ -427,88 +527,92 @@ spl_hash_ptr(void *ptr, unsigned int bits) return hash_long((unsigned long)ptr >> PAGE_SHIFT, bits); } -#ifndef list_first_entry -#define list_first_entry(ptr, type, member) \ - list_entry((ptr)->next, type, member) -#endif +static spl_kmem_obj_t * +spl_hash_obj(spl_kmem_cache_t *skc, void *obj) +{ + struct hlist_node *node; + spl_kmem_obj_t *sko = NULL; + unsigned long key = spl_hash_ptr(obj, skc->skc_hash_bits); + int i = 0; -void * -spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) + ASSERT(spin_is_locked(&skc->skc_lock)); + + hlist_for_each_entry(sko, node, &skc->skc_hash[key], sko_hlist) { + + if (unlikely((++i) > skc->skc_hash_depth)) + skc->skc_hash_depth = i; + + if (sko->sko_addr == obj) { + ASSERT(sko->sko_magic == SKO_MAGIC); + RETURN(sko); + } + } + + RETURN(NULL); +} + +static void * +spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) +{ + spl_kmem_obj_t *sko; + unsigned long key; + + ASSERT(spin_is_locked(&skc->skc_lock)); + + sko = list_entry((&sks->sks_free_list)->next,spl_kmem_obj_t,sko_list); + ASSERT(sko->sko_magic == SKO_MAGIC); + ASSERT(sko->sko_addr != NULL); + + /* Remove from sks_free_list and add to used hash */ + list_del_init(&sko->sko_list); + key = spl_hash_ptr(sko->sko_addr, skc->skc_hash_bits); + hlist_add_head(&sko->sko_hlist, &skc->skc_hash[key]); + + sks->sks_age = jiffies; + sks->sks_ref++; + skc->skc_obj_alloc++; + skc->skc_hash_count++; + + /* Track max obj usage statistics */ + if (skc->skc_obj_alloc > skc->skc_obj_max) + skc->skc_obj_max = skc->skc_obj_alloc; + + /* Track max slab usage statistics */ + if (sks->sks_ref == 1) { + skc->skc_slab_alloc++; + + if (skc->skc_slab_alloc > skc->skc_slab_max) + skc->skc_slab_max = skc->skc_slab_alloc; + } + + return sko->sko_addr; +} + +/* No available objects create a new slab. Since this is an + * expensive operation we do it without holding the spinlock + * and only briefly aquire it when we link in the fully + * allocated and constructed slab. + */ +static spl_kmem_slab_t * +spl_cache_grow(spl_kmem_cache_t *skc, int flags) { spl_kmem_slab_t *sks; spl_kmem_obj_t *sko; - void *obj; - unsigned long key; ENTRY; - spin_lock(&skc->skc_lock); -restart: - /* Check for available objects from the partial slabs */ - if (!list_empty(&skc->skc_partial_list)) { - sks = list_first_entry(&skc->skc_partial_list, - spl_kmem_slab_t, sks_list); - ASSERT(sks->sks_magic == SKS_MAGIC); - ASSERT(atomic_read(&sks->sks_ref) < sks->sks_objs); - ASSERT(!list_empty(&sks->sks_free_list)); - - sko = list_first_entry(&sks->sks_free_list, - spl_kmem_obj_t, sko_list); - ASSERT(sko->sko_magic == SKO_MAGIC); - ASSERT(sko->sko_addr != NULL); - - /* Remove from sks_free_list, add to used hash */ - list_del_init(&sko->sko_list); - key = spl_hash_ptr(sko->sko_addr, skc->skc_hash_bits); - hlist_add_head(&sko->sko_hlist, &skc->skc_hash[key]); - - sks->sks_age = jiffies; - atomic_inc(&sks->sks_ref); - skc->skc_obj_alloc++; - - if (skc->skc_obj_alloc > skc->skc_obj_max) - skc->skc_obj_max = skc->skc_obj_alloc; - - if (atomic_read(&sks->sks_ref) == 1) { - skc->skc_slab_alloc++; - - if (skc->skc_slab_alloc > skc->skc_slab_max) - skc->skc_slab_max = skc->skc_slab_alloc; - } - - /* Move slab to skc_complete_list when full */ - if (atomic_read(&sks->sks_ref) == sks->sks_objs) { - list_del(&sks->sks_list); - list_add(&sks->sks_list, &skc->skc_complete_list); - } - - GOTO(out_lock, obj = sko->sko_addr); + if (flags & __GFP_WAIT) { + flags |= __GFP_NOFAIL; + might_sleep(); + local_irq_enable(); } - spin_unlock(&skc->skc_lock); + sks = spl_slab_alloc(skc, flags); + if (sks == NULL) { + if (flags & __GFP_WAIT) + local_irq_disable(); - /* No available objects create a new slab. Since this is an - * expensive operation we do it without holding the semaphore - * and only briefly aquire it when we link in the fully - * allocated and constructed slab. - */ - - /* Under Solaris if the KM_SLEEP flag is passed we may never - * fail, so sleep as long as needed. Additionally, since we are - * using vmem_alloc() KM_NOSLEEP is not an option and we must - * fail. Shifting to allocating our own pages and mapping the - * virtual address space may allow us to bypass this issue. - */ - if (!flags) - flags |= KM_SLEEP; - - if (flags & KM_SLEEP) - flags |= __GFP_NOFAIL; - else - GOTO(out, obj = NULL); - - sks = slab_alloc(skc, flags); - if (sks == NULL) - GOTO(out, obj = NULL); + RETURN(NULL); + } /* Run all the constructors now that the slab is fully allocated */ list_for_each_entry(sko, &sks->sks_free_list, sko_list) { @@ -518,18 +622,171 @@ restart: skc->skc_ctor(sko->sko_addr, skc->skc_private, flags); } - /* Link the newly created slab in to the skc_partial_list, - * and retry the allocation which will now succeed. - */ + if (flags & __GFP_WAIT) + local_irq_disable(); + + /* Link the new empty slab in to the end of skc_partial_list */ spin_lock(&skc->skc_lock); skc->skc_slab_total++; skc->skc_obj_total += sks->sks_objs; list_add_tail(&sks->sks_list, &skc->skc_partial_list); - GOTO(restart, obj = NULL); + spin_unlock(&skc->skc_lock); + + RETURN(sks); +} + +static int +spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) +{ + spl_kmem_slab_t *sks; + int refill = skm->skm_refill; + ENTRY; + + /* XXX: Check for refill bouncing by age perhaps */ + + spin_lock(&skc->skc_lock); + while (refill > 0) { + /* No slabs available we must grow the cache */ + if (list_empty(&skc->skc_partial_list)) { + spin_unlock(&skc->skc_lock); + sks = spl_cache_grow(skc, flags); + if (!sks) + GOTO(out, refill); + + /* Rescheduled to different CPU skm is not local */ + if (skm != skc->skc_mag[smp_processor_id()]) + GOTO(out, refill); + + spin_lock(&skc->skc_lock); + continue; + } + + /* Grab the next available slab */ + sks = list_entry((&skc->skc_partial_list)->next, + spl_kmem_slab_t, sks_list); + ASSERT(sks->sks_magic == SKS_MAGIC); + ASSERT(sks->sks_ref < sks->sks_objs); + ASSERT(!list_empty(&sks->sks_free_list)); + + /* Consume as many objects as needed to refill the requested + * cache. We must be careful to lock here because our local + * magazine may not be local anymore due to spl_cache_grow. */ + while ((sks->sks_ref < sks->sks_objs) && (refill-- > 0)) + skm->skm_objs[skm->skm_avail++]=spl_cache_obj(skc,sks); + + /* Move slab to skc_complete_list when full */ + if (sks->sks_ref == sks->sks_objs) { + list_del(&sks->sks_list); + list_add(&sks->sks_list, &skc->skc_complete_list); + } + } -out_lock: spin_unlock(&skc->skc_lock); out: + /* Returns the number of entries added to cache */ + RETURN(skm->skm_refill - refill); +} + +static void +spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) +{ + spl_kmem_slab_t *sks = NULL; + spl_kmem_obj_t *sko = NULL; + ENTRY; + + ASSERT(spin_is_locked(&skc->skc_lock)); + + sko = spl_hash_obj(skc, obj); + ASSERTF(sko, "Obj %p missing from in-use hash (%d) for cache %s\n", + obj, skc->skc_hash_count, skc->skc_name); + + sks = sko->sko_slab; + ASSERTF(sks, "Obj %p/%p linked to invalid slab for cache %s\n", + obj, sko, skc->skc_name); + + ASSERT(sks->sks_cache == skc); + hlist_del_init(&sko->sko_hlist); + list_add(&sko->sko_list, &sks->sks_free_list); + + sks->sks_age = jiffies; + sks->sks_ref--; + skc->skc_obj_alloc--; + skc->skc_hash_count--; + + /* Move slab to skc_partial_list when no longer full. Slabs + * are added to the head to keep the partial list is quasi-full + * sorted order. Fuller at the head, emptier at the tail. */ + if (sks->sks_ref == (sks->sks_objs - 1)) { + list_del(&sks->sks_list); + list_add(&sks->sks_list, &skc->skc_partial_list); + } + + /* Move emply slabs to the end of the partial list so + * they can be easily found and freed during reclamation. */ + if (sks->sks_ref == 0) { + list_del(&sks->sks_list); + list_add_tail(&sks->sks_list, &skc->skc_partial_list); + skc->skc_slab_alloc--; + } + + EXIT; +} + +static int +spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) +{ + int i, count = MIN(flush, skm->skm_avail); + ENTRY; + + + spin_lock(&skc->skc_lock); + for (i = 0; i < count; i++) + spl_cache_shrink(skc, skm->skm_objs[i]); + + __spl_slab_reclaim(skc); + skm->skm_avail -= count; + memmove(skm->skm_objs, &(skm->skm_objs[count]), + sizeof(void *) * skm->skm_avail); + + spin_unlock(&skc->skc_lock); + + RETURN(count); +} + +void * +spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) +{ + spl_kmem_magazine_t *skm; + unsigned long irq_flags; + void *obj = NULL; + ENTRY; + + ASSERT(flags & KM_SLEEP); + local_irq_save(irq_flags); + +restart: + /* Safe to update per-cpu structure without lock, but + * in the restart case we must be careful to reaquire + * the local magazine since this may have changed + * when we need to grow the cache. */ + skm = skc->skc_mag[smp_processor_id()]; + + if (likely(skm->skm_avail)) { + /* Object available in CPU cache, use it */ + obj = skm->skm_objs[--skm->skm_avail]; + skm->skm_age = jiffies; + } else { + /* Per-CPU cache empty, directly allocate from + * the slab and refill the per-CPU cache. */ + (void)spl_cache_refill(skc, skm, flags); + GOTO(restart, obj = NULL); + } + + local_irq_restore(irq_flags); + + /* Pre-emptively migrate object to CPU L1 cache */ + prefetchw(obj); + RETURN(obj); } EXPORT_SYMBOL(spl_kmem_cache_alloc); @@ -537,62 +794,33 @@ EXPORT_SYMBOL(spl_kmem_cache_alloc); void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) { - struct hlist_node *node; - spl_kmem_slab_t *sks = NULL; - spl_kmem_obj_t *sko = NULL; - unsigned long key = spl_hash_ptr(obj, skc->skc_hash_bits); - int i = 0; + spl_kmem_magazine_t *skm; + unsigned long flags; ENTRY; - spin_lock(&skc->skc_lock); + local_irq_save(flags); - hlist_for_each_entry(sko, node, &skc->skc_hash[key], sko_hlist) { + /* Safe to update per-cpu structure without lock, but + * no remote memory allocation tracking is being performed + * it is entirely possible to allocate an object from one + * CPU cache and return it to another. */ + skm = skc->skc_mag[smp_processor_id()]; - if (unlikely((++i) > skc->skc_hash_depth)) - skc->skc_hash_depth = i; + /* Per-CPU cache full, flush it to make space */ + if (unlikely(skm->skm_avail >= skm->skm_size)) + (void)spl_cache_flush(skc, skm, skm->skm_refill); - if (sko->sko_addr == obj) { - ASSERT(sko->sko_magic == SKO_MAGIC); - sks = sko->sko_slab; - break; - } - } + /* Available space in cache, use it */ + skm->skm_objs[skm->skm_avail++] = obj; - ASSERT(sko != NULL); /* Obj must be in hash */ - ASSERT(sks != NULL); /* Obj must reference slab */ - ASSERT(sks->sks_cache == skc); - hlist_del_init(&sko->sko_hlist); - list_add(&sko->sko_list, &sks->sks_free_list); + local_irq_restore(flags); - sks->sks_age = jiffies; - atomic_dec(&sks->sks_ref); - skc->skc_obj_alloc--; - - /* Move slab to skc_partial_list when no longer full. Slabs - * are added to the kead to keep the partial list is quasi - * full sorted order. Fuller at the head, emptier at the tail. - */ - if (atomic_read(&sks->sks_ref) == (sks->sks_objs - 1)) { - list_del(&sks->sks_list); - list_add(&sks->sks_list, &skc->skc_partial_list); - } - - /* Move emply slabs to the end of the partial list so - * they can be easily found and freed during reclamation. - */ - if (atomic_read(&sks->sks_ref) == 0) { - list_del(&sks->sks_list); - list_add_tail(&sks->sks_list, &skc->skc_partial_list); - skc->skc_slab_alloc--; - } - - __slab_reclaim(skc); - spin_unlock(&skc->skc_lock); + EXIT; } EXPORT_SYMBOL(spl_kmem_cache_free); static int -kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) +spl_kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) { spl_kmem_cache_t *skc; @@ -619,13 +847,24 @@ kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) { + spl_kmem_magazine_t *skm; + int i; ENTRY; ASSERT(skc && skc->skc_magic == SKC_MAGIC); if (skc->skc_reclaim) skc->skc_reclaim(skc->skc_private); - slab_reclaim(skc); + /* Ensure per-CPU caches which are idle gradually flush */ + for_each_online_cpu(i) { + skm = skc->skc_mag[i]; + + if (time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) + (void)spl_cache_flush(skc, skm, skm->skm_refill); + } + + spl_slab_reclaim(skc); + EXIT; } EXPORT_SYMBOL(spl_kmem_cache_reap_now); @@ -633,7 +872,7 @@ EXPORT_SYMBOL(spl_kmem_cache_reap_now); void spl_kmem_reap(void) { - kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); + spl_kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); } EXPORT_SYMBOL(spl_kmem_reap); @@ -663,7 +902,7 @@ spl_kmem_init(void) #ifdef HAVE_SET_SHRINKER spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, - kmem_cache_generic_shrinker); + spl_kmem_cache_generic_shrinker); if (spl_kmem_cache_shrinker == NULL) GOTO(out_cache, rc = -ENOMEM); #else @@ -703,7 +942,7 @@ out_cache: #ifdef DEBUG_KMEM static char * -sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) +spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) { int size = ((len - 1) < kd->kd_size) ? (len - 1) : kd->kd_size; int i, flag = 1; @@ -769,7 +1008,7 @@ spl_kmem_fini(void) list_for_each_entry(kd, &kmem_list, kd_list) CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", kd->kd_addr, kd->kd_size, - sprintf_addr(kd, str, 17, 8), + spl_sprintf_addr(kd, str, 17, 8), kd->kd_func, kd->kd_line); spin_unlock_irqrestore(&kmem_lock, flags); @@ -786,7 +1025,7 @@ spl_kmem_fini(void) list_for_each_entry(kd, &vmem_list, kd_list) CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", kd->kd_addr, kd->kd_size, - sprintf_addr(kd, str, 17, 8), + spl_sprintf_addr(kd, str, 17, 8), kd->kd_func, kd->kd_line); spin_unlock_irqrestore(&vmem_lock, flags); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 927fe86d3..8ef1698dc 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -913,7 +913,9 @@ out: if (rc) { remove_proc_entry("kstat", proc_spl); remove_proc_entry("kmem", proc_spl); +#ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_spl_mutex); +#endif remove_proc_entry("mutex", proc_spl); remove_proc_entry("spl", NULL); #ifdef CONFIG_SYSCTL @@ -933,7 +935,9 @@ proc_fini(void) #if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) remove_proc_entry("kstat", proc_spl); remove_proc_entry("kmem", proc_spl); +#ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_spl_mutex); +#endif remove_proc_entry("mutex", proc_spl); remove_proc_entry("spl", NULL); #endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index f6dbc00c3..678d94682 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -486,7 +486,7 @@ vn_getf(int fd) spin_unlock(&vn_file_lock); /* File was not yet opened create the object and setup */ - fp = kmem_cache_alloc(vn_file_cache, 0); + fp = kmem_cache_alloc(vn_file_cache, KM_SLEEP); if (fp == NULL) GOTO(out, rc); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 51fa6f0ef..3f059aa22 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -525,6 +525,9 @@ splat_kmem_test8_thread(void *arg) objs = vmem_zalloc(count * sizeof(void *), KM_SLEEP); if (!objs) { + splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST8_NAME, + "Unable to alloc objp array for cache '%s'\n", + kcp->kcp_cache->skc_name); rc = -ENOMEM; goto out; } @@ -533,14 +536,13 @@ splat_kmem_test8_thread(void *arg) objs[i] = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); if (!objs[i]) { splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST8_NAME, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); + "Unable to allocate from cache '%s'\n", + kcp->kcp_cache->skc_name); rc = -ENOMEM; - goto out_free; + break; } } -out_free: for (i = 0; i < count; i++) if (objs[i]) kmem_cache_free(kcp->kcp_cache, objs[i]); @@ -578,6 +580,7 @@ splat_kmem_test8(struct file *file, void *arg) kmem_cache_priv_t kcp; kthread_t *thr; struct timespec start, stop, delta; + char cache_name[16]; int alloc, i; kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; @@ -588,7 +591,7 @@ splat_kmem_test8(struct file *file, void *arg) splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%s", " \ttot/max/calc\ttot/max/calc\tsize/depth\n"); - for (alloc = 64; alloc <= 4096; alloc *= 2) { + for (alloc = 1; alloc <= 4096; alloc *= 2) { kcp.kcp_size = 256; kcp.kcp_count = 0; kcp.kcp_threads = 0; @@ -597,9 +600,8 @@ splat_kmem_test8(struct file *file, void *arg) spin_lock_init(&kcp.kcp_lock); init_waitqueue_head(&kcp.kcp_waitq); - - kcp.kcp_cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, - kcp.kcp_size, 0, + sprintf(cache_name, "%s-%d", SPLAT_KMEM_CACHE_NAME, alloc); + kcp.kcp_cache = kmem_cache_create(cache_name, kcp.kcp_size, 0, splat_kmem_cache_test_constructor, splat_kmem_cache_test_destructor, NULL, &kcp, NULL, 0); From e9d7a2bef56cf159d0f876efc38209a496dd0b66 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 26 Jun 2008 19:49:42 +0000 Subject: [PATCH 0129/1062] Fix for memory corruption caused by overruning the magazine when repopulating it. Plus I fixed a few more suble races in that part of the code which were catching me. Finally I fixed a small race in kmem_test8. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@137 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 2 +- modules/spl/spl-kmem.c | 151 ++++++++++++++++++++++--------------- modules/splat/splat-kmem.c | 3 +- 3 files changed, 94 insertions(+), 62 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 25269335d..2208151d7 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -49,7 +49,7 @@ extern "C" { #define KM_SLEEP GFP_KERNEL #define KM_NOSLEEP GFP_ATOMIC #undef KM_PANIC /* No linux analog */ -#define KM_PUSHPAGE (GFP_KERNEL | __GFP_HIGH) +#define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) #define KM_VMFLAGS GFP_LEVEL_MASK #define KM_FLAGS __GFP_BITS_MASK diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 708b01cc5..453360d6c 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -319,9 +319,9 @@ spl_magazine_size(spl_kmem_cache_t *skc) else if (skc->skc_obj_size > (PAGE_SIZE / 4)) size = 32; else if (skc->skc_obj_size > (PAGE_SIZE / 16)) - size = 64; + size = 48; else - size = 128; + size = 64; RETURN(size); } @@ -408,12 +408,12 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, /* We may be called when there is a non-zero preempt_count or * interrupts are disabled is which case we must not sleep. */ - if (current_thread_info()->preempt_count || irqs_disabled()) + if (current_thread_info()->preempt_count || irqs_disabled()) kmem_flags = KM_NOSLEEP; /* Allocate new cache memory and initialize. */ - skc = (spl_kmem_cache_t *)kmem_alloc(sizeof(*skc), kmem_flags); - if (skc == NULL) + skc = (spl_kmem_cache_t *)kmem_alloc(sizeof(*skc), kmem_flags); + if (skc == NULL) RETURN(NULL); skc->skc_magic = SKC_MAGIC; @@ -425,9 +425,9 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, } strncpy(skc->skc_name, name, skc->skc_name_size); - skc->skc_ctor = ctor; - skc->skc_dtor = dtor; - skc->skc_reclaim = reclaim; + skc->skc_ctor = ctor; + skc->skc_dtor = dtor; + skc->skc_reclaim = reclaim; skc->skc_private = priv; skc->skc_vmp = vmp; skc->skc_flags = flags; @@ -455,9 +455,9 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, INIT_LIST_HEAD(&skc->skc_complete_list); INIT_LIST_HEAD(&skc->skc_partial_list); spin_lock_init(&skc->skc_lock); - skc->skc_slab_fail = 0; - skc->skc_slab_create = 0; - skc->skc_slab_destroy = 0; + skc->skc_slab_fail = 0; + skc->skc_slab_create = 0; + skc->skc_slab_destroy = 0; skc->skc_slab_total = 0; skc->skc_slab_alloc = 0; skc->skc_slab_max = 0; @@ -476,10 +476,10 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, } down_write(&spl_kmem_cache_sem); - list_add_tail(&skc->skc_list, &spl_kmem_cache_list); + list_add_tail(&skc->skc_list, &spl_kmem_cache_list); up_write(&spl_kmem_cache_sem); - RETURN(skc); + RETURN(skc); } EXPORT_SYMBOL(spl_kmem_cache_create); @@ -492,9 +492,11 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) spl_kmem_slab_t *sks, *m; ENTRY; - down_write(&spl_kmem_cache_sem); - list_del_init(&skc->skc_list); - up_write(&spl_kmem_cache_sem); + ASSERT(skc->skc_magic == SKC_MAGIC); + + down_write(&spl_kmem_cache_sem); + list_del_init(&skc->skc_list); + up_write(&spl_kmem_cache_sem); spl_magazine_destroy(skc); spin_lock(&skc->skc_lock); @@ -505,7 +507,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) ASSERTF(skc->skc_hash_count == 0, "skc->skc_hash_count=%d\n", skc->skc_hash_count); - list_for_each_entry_safe(sks, m, &skc->skc_partial_list, sks_list) + list_for_each_entry_safe(sks, m, &skc->skc_partial_list, sks_list) spl_slab_free(sks); kmem_free(skc->skc_hash, skc->skc_hash_size); @@ -530,19 +532,20 @@ spl_hash_ptr(void *ptr, unsigned int bits) static spl_kmem_obj_t * spl_hash_obj(spl_kmem_cache_t *skc, void *obj) { - struct hlist_node *node; + struct hlist_node *node; spl_kmem_obj_t *sko = NULL; unsigned long key = spl_hash_ptr(obj, skc->skc_hash_bits); int i = 0; + ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); - hlist_for_each_entry(sko, node, &skc->skc_hash[key], sko_hlist) { + hlist_for_each_entry(sko, node, &skc->skc_hash[key], sko_hlist) { if (unlikely((++i) > skc->skc_hash_depth)) skc->skc_hash_depth = i; - if (sko->sko_addr == obj) { + if (sko->sko_addr == obj) { ASSERT(sko->sko_magic == SKO_MAGIC); RETURN(sko); } @@ -557,6 +560,8 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) spl_kmem_obj_t *sko; unsigned long key; + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); sko = list_entry((&sks->sks_free_list)->next,spl_kmem_obj_t,sko_list); @@ -596,12 +601,14 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) static spl_kmem_slab_t * spl_cache_grow(spl_kmem_cache_t *skc, int flags) { - spl_kmem_slab_t *sks; + spl_kmem_slab_t *sks; spl_kmem_obj_t *sko; ENTRY; - if (flags & __GFP_WAIT) { - flags |= __GFP_NOFAIL; + ASSERT(skc->skc_magic == SKC_MAGIC); + + if (flags & __GFP_WAIT) { +// flags |= __GFP_NOFAIL; /* XXX: Solaris assumes this */ might_sleep(); local_irq_enable(); } @@ -622,7 +629,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) skc->skc_ctor(sko->sko_addr, skc->skc_private, flags); } - if (flags & __GFP_WAIT) + if (flags & __GFP_WAIT) local_irq_disable(); /* Link the new empty slab in to the end of skc_partial_list */ @@ -638,11 +645,15 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) static int spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) { - spl_kmem_slab_t *sks; - int refill = skm->skm_refill; + spl_kmem_slab_t *sks; + int rc = 0, refill; ENTRY; + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skm->skm_magic == SKM_MAGIC); + /* XXX: Check for refill bouncing by age perhaps */ + refill = MIN(skm->skm_refill, skm->skm_size - skm->skm_avail); spin_lock(&skc->skc_lock); while (refill > 0) { @@ -651,11 +662,16 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) spin_unlock(&skc->skc_lock); sks = spl_cache_grow(skc, flags); if (!sks) - GOTO(out, refill); + GOTO(out, rc); /* Rescheduled to different CPU skm is not local */ if (skm != skc->skc_mag[smp_processor_id()]) - GOTO(out, refill); + GOTO(out, rc); + + /* Potentially rescheduled to the same CPU but + * allocations may have occured from this CPU while + * we were sleeping so recalculate max refill. */ + refill = MIN(refill, skm->skm_size - skm->skm_avail); spin_lock(&skc->skc_lock); continue; @@ -669,10 +685,12 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) ASSERT(!list_empty(&sks->sks_free_list)); /* Consume as many objects as needed to refill the requested - * cache. We must be careful to lock here because our local - * magazine may not be local anymore due to spl_cache_grow. */ - while ((sks->sks_ref < sks->sks_objs) && (refill-- > 0)) + * cache. We must also be careful not to overfill it. */ + while (sks->sks_ref < sks->sks_objs && refill-- > 0 && ++rc) { + ASSERT(skm->skm_avail < skm->skm_size); + ASSERT(rc < skm->skm_size); skm->skm_objs[skm->skm_avail++]=spl_cache_obj(skc,sks); + } /* Move slab to skc_complete_list when full */ if (sks->sks_ref == sks->sks_objs) { @@ -684,16 +702,17 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) spin_unlock(&skc->skc_lock); out: /* Returns the number of entries added to cache */ - RETURN(skm->skm_refill - refill); + RETURN(rc); } static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) { - spl_kmem_slab_t *sks = NULL; + spl_kmem_slab_t *sks = NULL; spl_kmem_obj_t *sko = NULL; ENTRY; + ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); sko = spl_hash_obj(skc, obj); @@ -738,14 +757,16 @@ spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) int i, count = MIN(flush, skm->skm_avail); ENTRY; + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skm->skm_magic == SKM_MAGIC); spin_lock(&skc->skc_lock); for (i = 0; i < count; i++) spl_cache_shrink(skc, skm->skm_objs[i]); - __spl_slab_reclaim(skc); - skm->skm_avail -= count; - memmove(skm->skm_objs, &(skm->skm_objs[count]), +// __spl_slab_reclaim(skc); + skm->skm_avail -= count; + memmove(skm->skm_objs, &(skm->skm_objs[count]), sizeof(void *) * skm->skm_avail); spin_unlock(&skc->skc_lock); @@ -759,9 +780,11 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) spl_kmem_magazine_t *skm; unsigned long irq_flags; void *obj = NULL; + int id; ENTRY; - ASSERT(flags & KM_SLEEP); + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(flags & KM_SLEEP); /* XXX: KM_NOSLEEP not yet supported */ local_irq_save(irq_flags); restart: @@ -769,7 +792,12 @@ restart: * in the restart case we must be careful to reaquire * the local magazine since this may have changed * when we need to grow the cache. */ + id = smp_processor_id(); + ASSERTF(id < 4, "cache=%p smp_processor_id=%d\n", skc, id); skm = skc->skc_mag[smp_processor_id()]; + ASSERTF(skm->skm_magic == SKM_MAGIC, "%x != %x: %s/%p/%p %x/%x/%x\n", + skm->skm_magic, SKM_MAGIC, skc->skc_name, skc, skm, + skm->skm_size, skm->skm_refill, skm->skm_avail); if (likely(skm->skm_avail)) { /* Object available in CPU cache, use it */ @@ -798,6 +826,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) unsigned long flags; ENTRY; + ASSERT(skc->skc_magic == SKC_MAGIC); local_irq_save(flags); /* Safe to update per-cpu structure without lock, but @@ -805,10 +834,12 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) * it is entirely possible to allocate an object from one * CPU cache and return it to another. */ skm = skc->skc_mag[smp_processor_id()]; + ASSERT(skm->skm_magic == SKM_MAGIC); /* Per-CPU cache full, flush it to make space */ if (unlikely(skm->skm_avail >= skm->skm_size)) (void)spl_cache_flush(skc, skm, skm->skm_refill); + (void)spl_cache_flush(skc, skm, 1); /* Available space in cache, use it */ skm->skm_objs[skm->skm_avail++] = obj; @@ -822,7 +853,7 @@ EXPORT_SYMBOL(spl_kmem_cache_free); static int spl_kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) { - spl_kmem_cache_t *skc; + spl_kmem_cache_t *skc; /* Under linux a shrinker is not tightly coupled with a slab * cache. In fact linux always systematically trys calling all @@ -831,12 +862,12 @@ spl_kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) * function in the shim layer for all slab caches. And we always * attempt to shrink all caches when this generic shrinker is called. */ - down_read(&spl_kmem_cache_sem); + down_read(&spl_kmem_cache_sem); - list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) + list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) spl_kmem_cache_reap_now(skc); - up_read(&spl_kmem_cache_sem); + up_read(&spl_kmem_cache_sem); /* XXX: Under linux we should return the remaining number of * entries in the cache. We should do this as well. @@ -850,7 +881,8 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) spl_kmem_magazine_t *skm; int i; ENTRY; - ASSERT(skc && skc->skc_magic == SKC_MAGIC); + + ASSERT(skc->skc_magic == SKC_MAGIC); if (skc->skc_reclaim) skc->skc_reclaim(skc->skc_private); @@ -879,8 +911,8 @@ EXPORT_SYMBOL(spl_kmem_reap); int spl_kmem_init(void) { - int rc = 0; - ENTRY; + int rc = 0; + ENTRY; init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); @@ -944,28 +976,27 @@ out_cache: static char * spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) { - int size = ((len - 1) < kd->kd_size) ? (len - 1) : kd->kd_size; + int size = ((len - 1) < kd->kd_size) ? (len - 1) : kd->kd_size; int i, flag = 1; ASSERT(str != NULL && len >= 17); - memset(str, 0, len); + memset(str, 0, len); /* Check for a fully printable string, and while we are at * it place the printable characters in the passed buffer. */ for (i = 0; i < size; i++) { - str[i] = ((char *)(kd->kd_addr))[i]; - if (isprint(str[i])) { - continue; - } else { - /* Minimum number of printable characters found - * to make it worthwhile to print this as ascii. */ - if (i > min) - break; - - flag = 0; - break; - } + str[i] = ((char *)(kd->kd_addr))[i]; + if (isprint(str[i])) { + continue; + } else { + /* Minimum number of printable characters found + * to make it worthwhile to print this as ascii. */ + if (i > min) + break; + flag = 0; + break; + } } if (!flag) { @@ -1038,8 +1069,8 @@ spl_kmem_fini(void) unregister_shrinker(&spl_kmem_cache_shrinker); #endif - (void)kmem_cache_destroy(spl_obj_cache); - (void)kmem_cache_destroy(spl_slab_cache); + (void)kmem_cache_destroy(spl_obj_cache); + (void)kmem_cache_destroy(spl_slab_cache); EXIT; } diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 3f059aa22..43221ea48 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -553,9 +553,10 @@ out: kcp->kcp_threads--; if (!kcp->kcp_rc) kcp->kcp_rc = rc; - spin_unlock(&kcp->kcp_lock); wake_up(&kcp->kcp_waitq); + spin_unlock(&kcp->kcp_lock); + thread_exit(); } From ff449ac40691903c7f49cb89b1a02696b6c37aa7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Fri, 27 Jun 2008 21:40:11 +0000 Subject: [PATCH 0130/1062] Further slab improvements, I'm getting close to something which works well for the expected workloads. Improvement in this commit include: - Added DEBUG_KMEM_TRACKING #define which can optionally be set when DEBUG_KMEM is defined to do per allocation tracking. This allows us to get all the lightweight kmem debugging enabled by default which is pretty light weight, and only when looking for a memory leak we can briefly enable the per alloc tracking. - Added set_normalized_timespec() in to SPL to simply using the timespec() primatives from within a module. - Added per-spinlock cycle counters to the slab in an attempt to run down a lock contention issue. The contended lock was in vmalloc() but I'm going to leave the cycle counters in place for a little while until I'm convinced there arn't other locking improvement possible in the slab. - Added a proc interface to the slab to export per slab cache statistics to /proc/spl/kmem/slab for analysis. - Reworked spl_slab_alloc() function to allocate from kmem for small allocation and vmem for large allocations. This improved things considerably but futher work is needed. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@138 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 120 ++++++++++++++++++++++++-- modules/spl/spl-kmem.c | 172 ++++++++++++++++++++++++------------- modules/spl/spl-proc.c | 128 +++++++++++++++++++++++++-- modules/spl/spl-time.c | 19 ++++ modules/splat/splat-kmem.c | 17 ---- 5 files changed, 359 insertions(+), 97 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 2208151d7..47ac72e77 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -32,6 +32,7 @@ extern "C" { #endif #undef DEBUG_KMEM_UNIMPLEMENTED +#undef DEBUG_KMEM_TRACKING /* Per-allocation memory tracking */ #include #include @@ -58,10 +59,9 @@ extern atomic64_t kmem_alloc_used; extern unsigned long kmem_alloc_max; extern atomic64_t vmem_alloc_used; extern unsigned long vmem_alloc_max; - extern int kmem_warning_flag; -extern atomic64_t kmem_cache_alloc_failed; +#ifdef DEBUG_KMEM_TRACKING /* XXX - Not to surprisingly with debugging enabled the xmem_locks are very * highly contended particularly on xfree(). If we want to run with this * detailed debugging enabled for anything other than debugging we need to @@ -171,9 +171,6 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) _ptr_; \ }) -#define kmem_alloc(size, flags) __kmem_alloc((size), (flags), kmalloc) -#define kmem_zalloc(size, flags) __kmem_alloc((size), (flags), kzalloc) - #define kmem_free(ptr, size) \ ({ \ kmem_debug_t *_dptr_; \ @@ -252,10 +249,6 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) _ptr_; \ }) -#define vmem_alloc(size, flags) __vmem_alloc((size), (flags)) -#define vmem_zalloc(size, flags) __vmem_alloc((size), ((flags) | \ - __GFP_ZERO)) - #define vmem_free(ptr, size) \ ({ \ kmem_debug_t *_dptr_; \ @@ -278,6 +271,108 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) vfree(ptr); \ }) +#else /* DEBUG_KMEM_TRACKING */ + +#define __kmem_alloc(size, flags, allocator) \ +({ void *_ptr_ = NULL; \ + \ + /* Marked unlikely because we should never be doing this, */ \ + /* we tolerate to up 2 pages but a single page is best. */ \ + if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning large " \ + "kmem_alloc(%d, 0x%x) (%ld/%ld)\n", \ + (int)(size), (int)(flags), \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ + \ + _ptr_ = (void *)allocator((size), (flags)); \ + if (_ptr_ == NULL) { \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ + "kmem_alloc(%d, 0x%x) failed (%ld/" \ + "%ld)\n", (int)(size), (int)(flags), \ + atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ + } else { \ + atomic64_add((size), &kmem_alloc_used); \ + if (unlikely(atomic64_read(&kmem_alloc_used) > \ + kmem_alloc_max)) \ + kmem_alloc_max = \ + atomic64_read(&kmem_alloc_used); \ + \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x) = %p " \ + "(%ld/%ld)\n", (int)(size), (int)(flags), \ + _ptr_, atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ + } \ + \ + _ptr_; \ +}) + +#define kmem_free(ptr, size) \ +({ \ + ASSERT((ptr) || (size > 0)); \ + \ + atomic64_sub((size), &kmem_alloc_used); \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%p, %d) (%ld/%ld)\n", \ + (ptr), (int)(size), atomic64_read(&kmem_alloc_used), \ + kmem_alloc_max); \ + memset(ptr, 0x5a, (size)); \ + kfree(ptr); \ +}) + +#define __vmem_alloc(size, flags) \ +({ void *_ptr_ = NULL; \ + \ + ASSERT((flags) & KM_SLEEP); \ + \ + _ptr_ = (void *)__vmalloc((size), (((flags) | \ + __GFP_HIGHMEM) & ~__GFP_ZERO), PAGE_KERNEL);\ + if (_ptr_ == NULL) { \ + __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ + "vmem_alloc(%d, 0x%x) failed (%ld/" \ + "%ld)\n", (int)(size), (int)(flags), \ + atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ + } else { \ + if (flags & __GFP_ZERO) \ + memset(_ptr_, 0, (size)); \ + \ + atomic64_add((size), &vmem_alloc_used); \ + if (unlikely(atomic64_read(&vmem_alloc_used) > \ + vmem_alloc_max)) \ + vmem_alloc_max = \ + atomic64_read(&vmem_alloc_used); \ + \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(" \ + "%d, 0x%x) = %p (%ld/%ld)\n", \ + (int)(size), (int)(flags), _ptr_, \ + atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ + } \ + \ + _ptr_; \ +}) + +#define vmem_free(ptr, size) \ +({ \ + ASSERT((ptr) || (size > 0)); \ + \ + atomic64_sub((size), &vmem_alloc_used); \ + __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%p, %d) (%ld/%ld)\n", \ + (ptr), (int)(size), atomic64_read(&vmem_alloc_used), \ + vmem_alloc_max); \ + memset(ptr, 0x5a, (size)); \ + vfree(ptr); \ +}) + +#endif /* DEBUG_KMEM_TRACKING */ + +#define kmem_alloc(size, flags) __kmem_alloc((size), (flags), kmalloc) +#define kmem_zalloc(size, flags) __kmem_alloc((size), (flags), kzalloc) + +#define vmem_alloc(size, flags) __vmem_alloc((size), (flags)) +#define vmem_zalloc(size, flags) __vmem_alloc((size), ((flags) | __GFP_ZERO)) + #else /* DEBUG_KMEM */ #define kmem_alloc(size, flags) kmalloc((size), (flags)) @@ -359,6 +454,8 @@ kmem_debugging(void) extern int kmem_set_warning(int flag); +extern struct list_head spl_kmem_cache_list; +extern struct rw_semaphore spl_kmem_cache_sem; #define SKM_MAGIC 0x2e2e2e2e #define SKO_MAGIC 0x20202020 @@ -442,6 +539,11 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_max; /* Obj max historic */ uint64_t skc_hash_depth; /* Lazy hash depth */ uint64_t skc_hash_count; /* Hash entries current */ + cycles_t skc_lock_reclaim; + cycles_t skc_lock_destroy; + cycles_t skc_lock_grow; + cycles_t skc_lock_refill; + cycles_t skc_lock_flush; } spl_kmem_cache_t; extern spl_kmem_cache_t * diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 453360d6c..0ee04a287 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -48,8 +48,14 @@ unsigned long kmem_alloc_max = 0; atomic64_t vmem_alloc_used; unsigned long vmem_alloc_max = 0; int kmem_warning_flag = 1; -atomic64_t kmem_cache_alloc_failed; +EXPORT_SYMBOL(kmem_alloc_used); +EXPORT_SYMBOL(kmem_alloc_max); +EXPORT_SYMBOL(vmem_alloc_used); +EXPORT_SYMBOL(vmem_alloc_max); +EXPORT_SYMBOL(kmem_warning_flag); + +#ifdef DEBUG_KMEM_TRACKING spinlock_t kmem_lock; struct hlist_head kmem_table[KMEM_TABLE_SIZE]; struct list_head kmem_list; @@ -58,12 +64,6 @@ spinlock_t vmem_lock; struct hlist_head vmem_table[VMEM_TABLE_SIZE]; struct list_head vmem_list; -EXPORT_SYMBOL(kmem_alloc_used); -EXPORT_SYMBOL(kmem_alloc_max); -EXPORT_SYMBOL(vmem_alloc_used); -EXPORT_SYMBOL(vmem_alloc_max); -EXPORT_SYMBOL(kmem_warning_flag); - EXPORT_SYMBOL(kmem_lock); EXPORT_SYMBOL(kmem_table); EXPORT_SYMBOL(kmem_list); @@ -71,6 +71,7 @@ EXPORT_SYMBOL(kmem_list); EXPORT_SYMBOL(vmem_lock); EXPORT_SYMBOL(vmem_table); EXPORT_SYMBOL(vmem_list); +#endif int kmem_set_warning(int flag) { return (kmem_warning_flag = !!flag); } #else @@ -109,8 +110,6 @@ EXPORT_SYMBOL(kmem_set_warning); * small virtual address space on 32bit arches. This will seriously * constrain the size of the slab caches and their performance. * - * XXX: Implement SPL proc interface to export full per cache stats. - * * XXX: Implement work requests to keep an eye on each cache and * shrink them via spl_slab_reclaim() when they are wasting lots * of space. Currently this process is driven by the reapers. @@ -149,10 +148,10 @@ EXPORT_SYMBOL(kmem_set_warning); #undef kmem_cache_alloc #undef kmem_cache_free -static struct list_head spl_kmem_cache_list; /* List of caches */ -static struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ -static kmem_cache_t *spl_slab_cache; /* Cache for slab structs */ -static kmem_cache_t *spl_obj_cache; /* Cache for obj structs */ +struct list_head spl_kmem_cache_list; /* List of caches */ +struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ +static kmem_cache_t *spl_slab_cache; /* Cache for slab structs */ +static kmem_cache_t *spl_obj_cache; /* Cache for obj structs */ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush); @@ -206,7 +205,17 @@ out_alloc: GOTO(out, sks = NULL); } - sko->sko_addr = vmem_alloc(skc->skc_obj_size, flags); + /* Objects less than a page can use kmem_alloc() and avoid + * the locking overhead in __get_vm_area_node() when locking + * for a free address. For objects over a page we use + * vmem_alloc() because it is usually worth paying this + * overhead to avoid the need to find contigeous pages. + * This should give us the best of both worlds. */ + if (skc->skc_obj_size <= PAGE_SIZE) + sko->sko_addr = kmem_alloc(skc->skc_obj_size, flags); + else + sko->sko_addr = vmem_alloc(skc->skc_obj_size, flags); + if (sko->sko_addr == NULL) { kmem_cache_free(spl_obj_cache, sko); GOTO(out_alloc, sks = NULL); @@ -248,7 +257,11 @@ spl_slab_free(spl_kmem_slab_t *sks) { if (skc->skc_dtor) skc->skc_dtor(sko->sko_addr, skc->skc_private); - vmem_free(sko->sko_addr, skc->skc_obj_size); + if (skc->skc_obj_size <= PAGE_SIZE) + kmem_free(sko->sko_addr, skc->skc_obj_size); + else + vmem_free(sko->sko_addr, skc->skc_obj_size); + list_del(&sko->sko_list); kmem_cache_free(spl_obj_cache, sko); i++; @@ -292,13 +305,18 @@ __spl_slab_reclaim(spl_kmem_cache_t *skc) static int spl_slab_reclaim(spl_kmem_cache_t *skc) { + cycles_t start; int rc; ENTRY; spin_lock(&skc->skc_lock); + start = get_cycles(); rc = __spl_slab_reclaim(skc); spin_unlock(&skc->skc_lock); + if (unlikely((get_cycles() - start) > skc->skc_lock_reclaim)) + skc->skc_lock_reclaim = get_cycles() - start; + RETURN(rc); } @@ -311,17 +329,15 @@ spl_magazine_size(spl_kmem_cache_t *skc) /* Guesses for reasonable magazine sizes, they * should really adapt based on observed usage. */ if (skc->skc_obj_size > (PAGE_SIZE * 256)) - size = 1; - else if (skc->skc_obj_size > (PAGE_SIZE * 32)) size = 4; - else if (skc->skc_obj_size > (PAGE_SIZE)) + else if (skc->skc_obj_size > (PAGE_SIZE * 32)) size = 16; - else if (skc->skc_obj_size > (PAGE_SIZE / 4)) - size = 32; - else if (skc->skc_obj_size > (PAGE_SIZE / 16)) - size = 48; - else + else if (skc->skc_obj_size > (PAGE_SIZE)) size = 64; + else if (skc->skc_obj_size > (PAGE_SIZE / 4)) + size = 128; + else + size = 512; RETURN(size); } @@ -412,7 +428,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, kmem_flags = KM_NOSLEEP; /* Allocate new cache memory and initialize. */ - skc = (spl_kmem_cache_t *)kmem_alloc(sizeof(*skc), kmem_flags); + skc = (spl_kmem_cache_t *)kmem_zalloc(sizeof(*skc), kmem_flags); if (skc == NULL) RETURN(NULL); @@ -441,7 +457,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_hash_size = SPL_KMEM_CACHE_HASH_SIZE; skc->skc_hash_elts = SPL_KMEM_CACHE_HASH_ELTS; skc->skc_hash = (struct hlist_head *) - kmem_alloc(skc->skc_hash_size, kmem_flags); + vmem_alloc(skc->skc_hash_size, kmem_flags); if (skc->skc_hash == NULL) { kmem_free(skc->skc_name, skc->skc_name_size); kmem_free(skc, sizeof(*skc)); @@ -466,10 +482,15 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_max = 0; skc->skc_hash_depth = 0; skc->skc_hash_count = 0; + skc->skc_lock_reclaim = 0; + skc->skc_lock_destroy = 0; + skc->skc_lock_grow = 0; + skc->skc_lock_refill = 0; + skc->skc_lock_flush = 0; rc = spl_magazine_create(skc); if (rc) { - kmem_free(skc->skc_hash, skc->skc_hash_size); + vmem_free(skc->skc_hash, skc->skc_hash_size); kmem_free(skc->skc_name, skc->skc_name_size); kmem_free(skc, sizeof(*skc)); RETURN(NULL); @@ -490,6 +511,7 @@ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { spl_kmem_slab_t *sks, *m; + cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -500,6 +522,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) spl_magazine_destroy(skc); spin_lock(&skc->skc_lock); + start = get_cycles(); /* Validate there are no objects in use and free all the * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ @@ -510,9 +533,13 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) list_for_each_entry_safe(sks, m, &skc->skc_partial_list, sks_list) spl_slab_free(sks); - kmem_free(skc->skc_hash, skc->skc_hash_size); + vmem_free(skc->skc_hash, skc->skc_hash_size); kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); + + if (unlikely((get_cycles() - start) > skc->skc_lock_destroy)) + skc->skc_lock_destroy = get_cycles() - start; + kmem_free(skc, sizeof(*skc)); EXIT; @@ -603,6 +630,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) { spl_kmem_slab_t *sks; spl_kmem_obj_t *sko; + cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -634,11 +662,16 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) /* Link the new empty slab in to the end of skc_partial_list */ spin_lock(&skc->skc_lock); + start = get_cycles(); skc->skc_slab_total++; skc->skc_obj_total += sks->sks_objs; list_add_tail(&sks->sks_list, &skc->skc_partial_list); spin_unlock(&skc->skc_lock); + if (unlikely((get_cycles() - start) > skc->skc_lock_grow)) + skc->skc_lock_grow = get_cycles() - start; + + RETURN(sks); } @@ -647,6 +680,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) { spl_kmem_slab_t *sks; int rc = 0, refill; + cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -656,10 +690,16 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) refill = MIN(skm->skm_refill, skm->skm_size - skm->skm_avail); spin_lock(&skc->skc_lock); + start = get_cycles(); + while (refill > 0) { /* No slabs available we must grow the cache */ if (list_empty(&skc->skc_partial_list)) { spin_unlock(&skc->skc_lock); + + if (unlikely((get_cycles() - start) > skc->skc_lock_refill)) + skc->skc_lock_refill = get_cycles() - start; + sks = spl_cache_grow(skc, flags); if (!sks) GOTO(out, rc); @@ -674,6 +714,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) refill = MIN(refill, skm->skm_size - skm->skm_avail); spin_lock(&skc->skc_lock); + start = get_cycles(); continue; } @@ -700,6 +741,9 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) } spin_unlock(&skc->skc_lock); + + if (unlikely((get_cycles() - start) > skc->skc_lock_refill)) + skc->skc_lock_refill = get_cycles() - start; out: /* Returns the number of entries added to cache */ RETURN(rc); @@ -716,8 +760,8 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) ASSERT(spin_is_locked(&skc->skc_lock)); sko = spl_hash_obj(skc, obj); - ASSERTF(sko, "Obj %p missing from in-use hash (%d) for cache %s\n", - obj, skc->skc_hash_count, skc->skc_name); + ASSERTF(sko, "Obj %p missing from in-use hash (%d/%d) for cache %s\n", + obj, skc->skc_hash_depth, skc->skc_hash_count, skc->skc_name); sks = sko->sko_slab; ASSERTF(sks, "Obj %p/%p linked to invalid slab for cache %s\n", @@ -755,12 +799,15 @@ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) { int i, count = MIN(flush, skm->skm_avail); + cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); spin_lock(&skc->skc_lock); + start = get_cycles(); + for (i = 0; i < count; i++) spl_cache_shrink(skc, skm->skm_objs[i]); @@ -771,6 +818,9 @@ spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) spin_unlock(&skc->skc_lock); + if (unlikely((get_cycles() - start) > skc->skc_lock_flush)) + skc->skc_lock_flush = get_cycles() - start; + RETURN(count); } @@ -942,11 +992,11 @@ spl_kmem_init(void) #endif #ifdef DEBUG_KMEM - { int i; atomic64_set(&kmem_alloc_used, 0); atomic64_set(&vmem_alloc_used, 0); - atomic64_set(&kmem_cache_alloc_failed, 0); +#ifdef DEBUG_KMEM_TRACKING + { int i; spin_lock_init(&kmem_lock); INIT_LIST_HEAD(&kmem_list); @@ -959,6 +1009,7 @@ spl_kmem_init(void) for (i = 0; i < VMEM_TABLE_SIZE; i++) INIT_HLIST_HEAD(&vmem_table[i]); } +#endif #endif RETURN(rc); @@ -972,7 +1023,7 @@ out_cache: RETURN(rc); } -#ifdef DEBUG_KMEM +#if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) static char * spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) { @@ -1013,16 +1064,35 @@ spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) return str; } -#endif /* DEBUG_KMEM */ + +static void +spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) +{ + unsigned long flags; + kmem_debug_t *kd; + char str[17]; + + spin_lock_irqsave(lock, flags); + if (!list_empty(list)) + CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", + "address", "size", "data", "func", "line"); + + list_for_each_entry(kd, list, kd_list) + CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", + kd->kd_addr, kd->kd_size, + spl_sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); + + spin_unlock_irqrestore(lock, flags); +} +#else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ +#define spl_kmem_fini_tracking(list, lock) +#endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ void spl_kmem_fini(void) { #ifdef DEBUG_KMEM - unsigned long flags; - kmem_debug_t *kd; - char str[17]; - /* Display all unreclaimed memory addresses, including the * allocation size and the first few bytes of what's located * at that address to aid in debugging. Performance is not @@ -1031,36 +1101,14 @@ spl_kmem_fini(void) CWARN("kmem leaked %ld/%ld bytes\n", atomic_read(&kmem_alloc_used), kmem_alloc_max); - spin_lock_irqsave(&kmem_lock, flags); - if (!list_empty(&kmem_list)) - CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", - "address", "size", "data", "func", "line"); - - list_for_each_entry(kd, &kmem_list, kd_list) - CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", - kd->kd_addr, kd->kd_size, - spl_sprintf_addr(kd, str, 17, 8), - kd->kd_func, kd->kd_line); - - spin_unlock_irqrestore(&kmem_lock, flags); if (atomic64_read(&vmem_alloc_used) != 0) CWARN("vmem leaked %ld/%ld bytes\n", atomic_read(&vmem_alloc_used), vmem_alloc_max); - spin_lock_irqsave(&vmem_lock, flags); - if (!list_empty(&vmem_list)) - CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", - "address", "size", "data", "func", "line"); - - list_for_each_entry(kd, &vmem_list, kd_list) - CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", - kd->kd_addr, kd->kd_size, - spl_sprintf_addr(kd, str, 17, 8), - kd->kd_func, kd->kd_line); - - spin_unlock_irqrestore(&vmem_lock, flags); -#endif + spl_kmem_fini_tracking(&kmem_list, &kmem_lock); + spl_kmem_fini_tracking(&vmem_list, &vmem_lock); +#endif /* DEBUG_KMEM */ ENTRY; #ifdef HAVE_SET_SHRINKER diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 8ef1698dc..e5f87d2d1 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -49,6 +49,7 @@ static struct proc_dir_entry *proc_spl_mutex_stats = NULL; #endif /* DEBUG_MUTEX */ #ifdef DEBUG_KMEM static struct proc_dir_entry *proc_spl_kmem = NULL; +static struct proc_dir_entry *proc_spl_kmem_slab = NULL; #endif /* DEBUG_KMEM */ #ifdef DEBUG_KSTAT struct proc_dir_entry *proc_spl_kstat = NULL; @@ -131,7 +132,6 @@ enum { CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ CTL_KMEM_VMEMUSED, /* Alloc'd vmem bytes */ CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ - CTL_KMEM_ALLOC_FAILED, /* Cache allocation failed */ #endif CTL_MUTEX_STATS, /* Global mutex statistics */ @@ -561,6 +561,112 @@ static struct file_operations proc_mutex_operations = { }; #endif /* DEBUG_MUTEX */ +#ifdef DEBUG_KMEM +static void +slab_seq_show_headers(struct seq_file *f) +{ + seq_printf(f, "%-36s\n", "name"); +} + +static int +slab_seq_show(struct seq_file *f, void *p) +{ + spl_kmem_cache_t *skc = p; + + ASSERT(skc->skc_magic == SKC_MAGIC); + + spin_lock(&skc->skc_lock); + seq_printf(f, "%-36s ", skc->skc_name); + seq_printf(f, "%u %u %u - %u %u %u - " + "%lu %lu %lu - %lu %lu %lu - %lu %lu %lu - %lu %lu - " + "%llu %llu %llu %llu %llu\n", + (unsigned)skc->skc_obj_size, + (unsigned)skc->skc_chunk_size, + (unsigned)skc->skc_slab_size, + (unsigned)skc->skc_hash_bits, + (unsigned)skc->skc_hash_size, + (unsigned)skc->skc_hash_elts, + (long unsigned)skc->skc_slab_fail, + (long unsigned)skc->skc_slab_create, + (long unsigned)skc->skc_slab_destroy, + (long unsigned)skc->skc_slab_total, + (long unsigned)skc->skc_slab_alloc, + (long unsigned)skc->skc_slab_max, + (long unsigned)skc->skc_obj_total, + (long unsigned)skc->skc_obj_alloc, + (long unsigned)skc->skc_obj_max, + (long unsigned)skc->skc_hash_depth, + (long unsigned)skc->skc_hash_count, + (long long unsigned)skc->skc_lock_reclaim, + (long long unsigned)skc->skc_lock_destroy, + (long long unsigned)skc->skc_lock_grow, + (long long unsigned)skc->skc_lock_refill, + (long long unsigned)skc->skc_lock_flush); + + spin_unlock(&skc->skc_lock); + + return 0; +} + +static void * +slab_seq_start(struct seq_file *f, loff_t *pos) +{ + struct list_head *p; + loff_t n = *pos; + ENTRY; + + down_read(&spl_kmem_cache_sem); + if (!n) + slab_seq_show_headers(f); + + p = spl_kmem_cache_list.next; + while (n--) { + p = p->next; + if (p == &spl_kmem_cache_list) + RETURN(NULL); + } + + RETURN(list_entry(p, spl_kmem_cache_t, skc_list)); +} + +static void * +slab_seq_next(struct seq_file *f, void *p, loff_t *pos) +{ + spl_kmem_cache_t *skc = p; + ENTRY; + + ++*pos; + RETURN((skc->skc_list.next == &spl_kmem_cache_list) ? + NULL : list_entry(skc->skc_list.next, spl_kmem_cache_t, skc_list)); +} + +static void +slab_seq_stop(struct seq_file *f, void *v) +{ + up_read(&spl_kmem_cache_sem); +} + +static struct seq_operations slab_seq_ops = { + .show = slab_seq_show, + .start = slab_seq_start, + .next = slab_seq_next, + .stop = slab_seq_stop, +}; + +static int +proc_slab_open(struct inode *inode, struct file *filp) +{ + return seq_open(filp, &slab_seq_ops); +} + +static struct file_operations proc_slab_operations = { + .open = proc_slab_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; +#endif /* DEBUG_KMEM */ + static struct ctl_table spl_debug_table[] = { { .ctl_name = CTL_DEBUG_SUBSYS, @@ -735,14 +841,6 @@ static struct ctl_table spl_kmem_table[] = { .mode = 0444, .proc_handler = &proc_doulongvec_minmax, }, - { - .ctl_name = CTL_KMEM_ALLOC_FAILED, - .procname = "kmem_alloc_failed", - .data = &kmem_cache_alloc_failed, - .maxlen = sizeof(atomic64_t), - .mode = 0444, - .proc_handler = &proc_doatomic64, - }, {0}, }; #endif /* DEBUG_KMEM */ @@ -901,6 +999,12 @@ proc_init(void) proc_spl_kmem = proc_mkdir("kmem", proc_spl); if (proc_spl_kmem == NULL) GOTO(out, rc = -EUNATCH); + + proc_spl_kmem_slab = create_proc_entry("slab", 0444, proc_spl_kmem); + if (proc_spl_kmem_slab == NULL) + GOTO(out, rc = -EUNATCH); + + proc_spl_kmem_slab->proc_fops = &proc_slab_operations; #endif /* DEBUG_KMEM */ #ifdef DEBUG_KSTAT @@ -912,6 +1016,9 @@ proc_init(void) out: if (rc) { remove_proc_entry("kstat", proc_spl); +#ifdef DEBUG_KMEM + remove_proc_entry("slab", proc_spl_kmem); +#endif remove_proc_entry("kmem", proc_spl); #ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_spl_mutex); @@ -934,6 +1041,9 @@ proc_fini(void) #if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) remove_proc_entry("kstat", proc_spl); +#ifdef DEBUG_KMEM + remove_proc_entry("slab", proc_spl_kmem); +#endif remove_proc_entry("kmem", proc_spl); #ifdef DEBUG_MUTEX remove_proc_entry("stats_per", proc_spl_mutex); diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index a2cfd6e46..b2cb12186 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -66,3 +66,22 @@ __gethrtime(void) { return rc; } EXPORT_SYMBOL(__gethrtime); + +/* Not exported from the kernel, but we need it for timespec_sub. Be very + * careful here we are using the kernel prototype, so that must not change. + */ +void +set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) +{ + while (nsec >= NSEC_PER_SEC) { + nsec -= NSEC_PER_SEC; + ++sec; + } + while (nsec < 0) { + nsec += NSEC_PER_SEC; + --sec; + } + ts->tv_sec = sec; + ts->tv_nsec = nsec; +} +EXPORT_SYMBOL(set_normalized_timespec); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 43221ea48..de9b36841 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -65,23 +65,6 @@ #define SPLAT_KMEM_ALLOC_COUNT 10 #define SPLAT_VMEM_ALLOC_COUNT 10 -/* Not exported from the kernel, but we need it for timespec_sub. Be very - * * careful here we are using the kernel prototype, so that must not change. - * */ -void -set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) -{ - while (nsec >= NSEC_PER_SEC) { - nsec -= NSEC_PER_SEC; - ++sec; - } - while (nsec < 0) { - nsec += NSEC_PER_SEC; - --sec; - } - ts->tv_sec = sec; - ts->tv_nsec = nsec; -} /* XXX - This test may fail under tight memory conditions */ static int From fece7c99bf18c04993b679c6fca0dd4669361716 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 28 Jun 2008 05:04:46 +0000 Subject: [PATCH 0131/1062] Victory! I've reworked caches with large objects which are based by vmalloc()'ed memory. I now alloc a slab which is roughly 32*spl_obj_size and in this block of memory I place the slab descriptor, slab object descriptors, and objects themselves. This greatly reduces vmalloc lock contention. Still some minor cleanup remains and fine tuning but it's working pretty well. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@139 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 1 - modules/spl/spl-kmem.c | 234 ++++++++++++++++++++++++++----------- modules/splat/splat-kmem.c | 50 +++++--- 3 files changed, 198 insertions(+), 87 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 47ac72e77..3c1770052 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -485,7 +485,6 @@ typedef struct spl_kmem_magazine { typedef struct spl_kmem_obj { uint32_t sko_magic; /* Sanity magic */ - uint32_t sko_flags; /* Per object flags */ void *sko_addr; /* Buffer address */ struct spl_kmem_slab *sko_slab; /* Owned by slab */ struct list_head sko_list; /* Free object list linkage */ diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 0ee04a287..be20c5b44 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -167,17 +167,9 @@ static struct shrinker spl_kmem_cache_shrinker = { }; #endif -static spl_kmem_slab_t * -spl_slab_alloc(spl_kmem_cache_t *skc, int flags) { - spl_kmem_slab_t *sks; - spl_kmem_obj_t *sko, *n; - int i; - ENTRY; - - sks = kmem_cache_alloc(spl_slab_cache, flags); - if (sks == NULL) - RETURN(sks); - +static void +spl_slab_init(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) +{ sks->sks_magic = SKS_MAGIC; sks->sks_objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; sks->sks_age = jiffies; @@ -185,91 +177,201 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) { INIT_LIST_HEAD(&sks->sks_list); INIT_LIST_HEAD(&sks->sks_free_list); sks->sks_ref = 0; +} +static int +spl_slab_alloc_kmem(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks, int flags) +{ + spl_kmem_obj_t *sko, *n; + int i, rc = 0; + + /* This is based on the linux slab cache for now simply because + * it means I get slab coloring, hardware cache alignment, etc + * for free. There's no reason we can't do this ourselves. And + * we probably should at in the future. For now I'll just + * leverage the existing linux slab here. */ for (i = 0; i < sks->sks_objs; i++) { sko = kmem_cache_alloc(spl_obj_cache, flags); if (sko == NULL) { -out_alloc: - /* Unable to fully construct slab, objects, - * and object data buffers unwind everything. - */ - list_for_each_entry_safe(sko, n, &sks->sks_free_list, - sko_list) { - ASSERT(sko->sko_magic == SKO_MAGIC); - vmem_free(sko->sko_addr, skc->skc_obj_size); - list_del(&sko->sko_list); - kmem_cache_free(spl_obj_cache, sko); - } - - kmem_cache_free(spl_slab_cache, sks); - GOTO(out, sks = NULL); + rc = -ENOMEM; + break; } - /* Objects less than a page can use kmem_alloc() and avoid - * the locking overhead in __get_vm_area_node() when locking - * for a free address. For objects over a page we use - * vmem_alloc() because it is usually worth paying this - * overhead to avoid the need to find contigeous pages. - * This should give us the best of both worlds. */ - if (skc->skc_obj_size <= PAGE_SIZE) - sko->sko_addr = kmem_alloc(skc->skc_obj_size, flags); - else - sko->sko_addr = vmem_alloc(skc->skc_obj_size, flags); - + sko->sko_addr = kmem_alloc(skc->skc_obj_size, flags); if (sko->sko_addr == NULL) { kmem_cache_free(spl_obj_cache, sko); - GOTO(out_alloc, sks = NULL); + rc = -ENOMEM; + break; } sko->sko_magic = SKO_MAGIC; - sko->sko_flags = 0; sko->sko_slab = sks; INIT_LIST_HEAD(&sko->sko_list); INIT_HLIST_NODE(&sko->sko_hlist); list_add(&sko->sko_list, &sks->sks_free_list); } + + /* Unable to fully construct slab, unwind everything */ + if (rc) { + list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + kmem_free(sko->sko_addr, skc->skc_obj_size); + list_del(&sko->sko_list); + kmem_cache_free(spl_obj_cache, sko); + } + } + + RETURN(rc); +} + +static spl_kmem_slab_t * +spl_slab_alloc_vmem(spl_kmem_cache_t *skc, int flags) +{ + spl_kmem_slab_t *sks; + spl_kmem_obj_t *sko, *sko_base; + void *slab, *obj, *obj_base; + int i, size; + + /* For large vmem_alloc'ed buffers it's important that we pack the + * spl_kmem_obj_t structure and the actual objects in to one large + * virtual address zone to minimize the number of calls to + * vmalloc(). Mapping the virtual address in done under a single + * global lock which walks a list of all virtual zones. So doing + * lots of allocations simply results in lock contention and a + * longer list of mapped addresses. It is far better to do a + * few large allocations and then subdivide it ourselves. The + * large vmem_alloc'ed space is divied as follows: + * + * 1 slab struct: sizeof(spl_kmem_slab_t) + * N obj structs: sizeof(spl_kmem_obj_t) * skc->skc_objs + * N objects: skc->skc_obj_size * skc->skc_objs + * + * XXX: It would probably be a good idea to more carefully + * align the starts of these objects in memory. + */ + size = sizeof(spl_kmem_slab_t) + SPL_KMEM_CACHE_OBJ_PER_SLAB * + (skc->skc_obj_size + sizeof(spl_kmem_obj_t)); + + slab = vmem_alloc(size, flags); + if (slab == NULL) + RETURN(NULL); + + sks = (spl_kmem_slab_t *)slab; + spl_slab_init(skc, sks); + + sko_base = (spl_kmem_obj_t *)(slab + sizeof(spl_kmem_slab_t)); + obj_base = (void *)sko_base + sizeof(spl_kmem_obj_t) * sks->sks_objs; + + for (i = 0; i < sks->sks_objs; i++) { + sko = &sko_base[i]; + obj = obj_base + skc->skc_obj_size * i; + sko->sko_addr = obj; + sko->sko_magic = SKO_MAGIC; + sko->sko_slab = sks; + INIT_LIST_HEAD(&sko->sko_list); + INIT_HLIST_NODE(&sko->sko_hlist); + list_add_tail(&sko->sko_list, &sks->sks_free_list); + } + + RETURN(sks); +} + +static spl_kmem_slab_t * +spl_slab_alloc(spl_kmem_cache_t *skc, int flags) { + spl_kmem_slab_t *sks; + spl_kmem_obj_t *sko; + int rc; + ENTRY; + + /* Objects less than a page can use kmem_alloc() and avoid + * the locking overhead in __get_vm_area_node() when locking + * for a free address. For objects over a page we use + * vmem_alloc() because it is usually worth paying this + * overhead to avoid the need to find contigeous pages. + * This should give us the best of both worlds. */ + if (skc->skc_obj_size <= PAGE_SIZE) { + sks = kmem_cache_alloc(spl_slab_cache, flags); + if (sks == NULL) + GOTO(out, sks = NULL); + + spl_slab_init(skc, sks); + + rc = spl_slab_alloc_kmem(skc, sks, flags); + if (rc) { + kmem_cache_free(spl_slab_cache, sks); + GOTO(out, sks = NULL); + } + } else { + sks = spl_slab_alloc_vmem(skc, flags); + if (sks == NULL) + GOTO(out, sks = NULL); + } + + ASSERT(sks); + list_for_each_entry(sko, &sks->sks_free_list, sko_list) + if (skc->skc_ctor) + skc->skc_ctor(sko->sko_addr, skc->skc_private, flags); out: RETURN(sks); } +static void +spl_slab_free_kmem(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) +{ + spl_kmem_obj_t *sko, *n; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(sks->sks_magic == SKS_MAGIC); + + list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + kmem_free(sko->sko_addr, skc->skc_obj_size); + list_del(&sko->sko_list); + kmem_cache_free(spl_obj_cache, sko); + } + + kmem_cache_free(spl_slab_cache, sks); +} + +static void +spl_slab_free_vmem(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) +{ + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(sks->sks_magic == SKS_MAGIC); + + vmem_free(sks, SPL_KMEM_CACHE_OBJ_PER_SLAB * + (skc->skc_obj_size + sizeof(spl_kmem_obj_t))); +} + /* Removes slab from complete or partial list, so it must * be called with the 'skc->skc_lock' held. - * */ + */ static void spl_slab_free(spl_kmem_slab_t *sks) { spl_kmem_cache_t *skc; spl_kmem_obj_t *sko, *n; - int i = 0; ENTRY; ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(sks->sks_ref == 0); - skc = sks->sks_cache; - skc->skc_obj_total -= sks->sks_objs; - skc->skc_slab_total--; + skc = sks->sks_cache; + ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); - list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { - ASSERT(sko->sko_magic == SKO_MAGIC); + skc->skc_obj_total -= sks->sks_objs; + skc->skc_slab_total--; + list_del(&sks->sks_list); - /* Run destructors for being freed */ + /* Run destructors slab is being released */ + list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) if (skc->skc_dtor) skc->skc_dtor(sko->sko_addr, skc->skc_private); - if (skc->skc_obj_size <= PAGE_SIZE) - kmem_free(sko->sko_addr, skc->skc_obj_size); - else - vmem_free(sko->sko_addr, skc->skc_obj_size); - - list_del(&sko->sko_list); - kmem_cache_free(spl_obj_cache, sko); - i++; - } - - ASSERT(sks->sks_objs == i); - list_del(&sks->sks_list); - kmem_cache_free(spl_slab_cache, sks); + if (skc->skc_obj_size <= PAGE_SIZE) + spl_slab_free_kmem(skc, sks); + else + spl_slab_free_vmem(skc, sks); EXIT; } @@ -629,14 +731,13 @@ static spl_kmem_slab_t * spl_cache_grow(spl_kmem_cache_t *skc, int flags) { spl_kmem_slab_t *sks; - spl_kmem_obj_t *sko; cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); if (flags & __GFP_WAIT) { -// flags |= __GFP_NOFAIL; /* XXX: Solaris assumes this */ + flags |= __GFP_NOFAIL; might_sleep(); local_irq_enable(); } @@ -649,14 +750,6 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) RETURN(NULL); } - /* Run all the constructors now that the slab is fully allocated */ - list_for_each_entry(sko, &sks->sks_free_list, sko_list) { - ASSERT(sko->sko_magic == SKO_MAGIC); - - if (skc->skc_ctor) - skc->skc_ctor(sko->sko_addr, skc->skc_private, flags); - } - if (flags & __GFP_WAIT) local_irq_disable(); @@ -697,7 +790,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) if (list_empty(&skc->skc_partial_list)) { spin_unlock(&skc->skc_lock); - if (unlikely((get_cycles() - start) > skc->skc_lock_refill)) + if (unlikely((get_cycles()-start)>skc->skc_lock_refill)) skc->skc_lock_refill = get_cycles() - start; sks = spl_cache_grow(skc, flags); @@ -861,6 +954,7 @@ restart: } local_irq_restore(irq_flags); + ASSERT(obj); /* Pre-emptively migrate object to CPU L1 cache */ prefetchw(obj); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index de9b36841..49715152d 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -559,36 +559,36 @@ splat_kmem_test8_count(kmem_cache_priv_t *kcp, int threads) * eyeball the slab cache locking overhead to ensure it is reasonable. */ static int -splat_kmem_test8(struct file *file, void *arg) +splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) { kmem_cache_priv_t kcp; kthread_t *thr; struct timespec start, stop, delta; - char cache_name[16]; - int alloc, i; + char cache_name[32]; + int i, j, threads = 32; kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; kcp.kcp_file = file; - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%s", + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %s", "name", "time (sec)\tslabs \tobjs \thash\n"); - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%s", + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %s", "", " \ttot/max/calc\ttot/max/calc\tsize/depth\n"); - for (alloc = 1; alloc <= 4096; alloc *= 2) { - kcp.kcp_size = 256; + for (i = 1; i <= count; i *= 2) { + kcp.kcp_size = size; kcp.kcp_count = 0; kcp.kcp_threads = 0; - kcp.kcp_alloc = alloc; + kcp.kcp_alloc = i; kcp.kcp_rc = 0; spin_lock_init(&kcp.kcp_lock); init_waitqueue_head(&kcp.kcp_waitq); - sprintf(cache_name, "%s-%d", SPLAT_KMEM_CACHE_NAME, alloc); + sprintf(cache_name, "%s-%d-%d", SPLAT_KMEM_CACHE_NAME, size, i); kcp.kcp_cache = kmem_cache_create(cache_name, kcp.kcp_size, 0, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - NULL, &kcp, NULL, 0); + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + NULL, &kcp, NULL, 0); if (!kcp.kcp_cache) { splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Unable to create '%s' cache\n", @@ -598,7 +598,7 @@ splat_kmem_test8(struct file *file, void *arg) start = current_kernel_time(); - for (i = 0; i < 32; i++) { + for (j = 0; j < threads; j++) { thr = thread_create(NULL, 0, splat_kmem_test8_thread, &kcp, 0, &p0, TS_RUN, minclsyspri); ASSERT(thr != NULL); @@ -610,15 +610,17 @@ splat_kmem_test8(struct file *file, void *arg) stop = current_kernel_time(); delta = timespec_sub(stop, start); - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%2ld.%09ld\t" + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %2ld.%09ld\t" "%lu/%lu/%lu\t%lu/%lu/%lu\t%lu/%lu\n", + kcp.kcp_cache->skc_name, delta.tv_sec, delta.tv_nsec, (unsigned long)kcp.kcp_cache->skc_slab_total, (unsigned long)kcp.kcp_cache->skc_slab_max, - (unsigned long)(kcp.kcp_alloc * 32 / SPL_KMEM_CACHE_OBJ_PER_SLAB), + (unsigned long)(kcp.kcp_alloc * threads / + SPL_KMEM_CACHE_OBJ_PER_SLAB), (unsigned long)kcp.kcp_cache->skc_obj_total, (unsigned long)kcp.kcp_cache->skc_obj_max, - (unsigned long)(kcp.kcp_alloc * 32), + (unsigned long)(kcp.kcp_alloc * threads), (unsigned long)kcp.kcp_cache->skc_hash_size, (unsigned long)kcp.kcp_cache->skc_hash_depth); @@ -631,6 +633,22 @@ splat_kmem_test8(struct file *file, void *arg) return kcp.kcp_rc; } +static int +splat_kmem_test8(struct file *file, void *arg) +{ + int i, rc = 0; + + /* Run through slab cache with objects size from + * 16-1Mb in 4x multiples with 1024 objects each */ + for (i = 16; i <= 1024*1024; i *= 4) { + rc = splat_kmem_test8_sc(file, arg, i, 1024); + if (rc) + break; + } + + return rc; +} + splat_subsystem_t * splat_kmem_init(void) { From 1c3832576db0f692ec066b4059feb4a9a695a575 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sat, 28 Jun 2008 20:03:11 +0000 Subject: [PATCH 0132/1062] Remove stray call to spl_cache_free() and remove all the cycle count which was costing me overhead. It was hurting performance pretty badly for heavily used caches. I'm also thinking the hash may be hurting me as well and it might be worth sticking a pointer in to a little space after the alloced object. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@140 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 5 ----- modules/spl/spl-kmem.c | 40 ---------------------------------------- modules/spl/spl-proc.c | 10 ++-------- 3 files changed, 2 insertions(+), 53 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 3c1770052..b90e3fdaf 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -538,11 +538,6 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_max; /* Obj max historic */ uint64_t skc_hash_depth; /* Lazy hash depth */ uint64_t skc_hash_count; /* Hash entries current */ - cycles_t skc_lock_reclaim; - cycles_t skc_lock_destroy; - cycles_t skc_lock_grow; - cycles_t skc_lock_refill; - cycles_t skc_lock_flush; } spl_kmem_cache_t; extern spl_kmem_cache_t * diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index be20c5b44..369876108 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -114,10 +114,6 @@ EXPORT_SYMBOL(kmem_set_warning); * shrink them via spl_slab_reclaim() when they are wasting lots * of space. Currently this process is driven by the reapers. * - * XXX: Implement proper small cache object support by embedding - * the spl_kmem_slab_t, spl_kmem_obj_t's, and objects in the - * allocated for a particular slab. - * * XXX: Implement a resizable used object hash. Currently the hash * is statically sized for thousands of objects but it should * grow based on observed worst case slab depth. @@ -407,18 +403,13 @@ __spl_slab_reclaim(spl_kmem_cache_t *skc) static int spl_slab_reclaim(spl_kmem_cache_t *skc) { - cycles_t start; int rc; ENTRY; spin_lock(&skc->skc_lock); - start = get_cycles(); rc = __spl_slab_reclaim(skc); spin_unlock(&skc->skc_lock); - if (unlikely((get_cycles() - start) > skc->skc_lock_reclaim)) - skc->skc_lock_reclaim = get_cycles() - start; - RETURN(rc); } @@ -584,11 +575,6 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_max = 0; skc->skc_hash_depth = 0; skc->skc_hash_count = 0; - skc->skc_lock_reclaim = 0; - skc->skc_lock_destroy = 0; - skc->skc_lock_grow = 0; - skc->skc_lock_refill = 0; - skc->skc_lock_flush = 0; rc = spl_magazine_create(skc); if (rc) { @@ -613,7 +599,6 @@ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { spl_kmem_slab_t *sks, *m; - cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -624,7 +609,6 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) spl_magazine_destroy(skc); spin_lock(&skc->skc_lock); - start = get_cycles(); /* Validate there are no objects in use and free all the * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ @@ -639,9 +623,6 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); - if (unlikely((get_cycles() - start) > skc->skc_lock_destroy)) - skc->skc_lock_destroy = get_cycles() - start; - kmem_free(skc, sizeof(*skc)); EXIT; @@ -731,7 +712,6 @@ static spl_kmem_slab_t * spl_cache_grow(spl_kmem_cache_t *skc, int flags) { spl_kmem_slab_t *sks; - cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -755,16 +735,11 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) /* Link the new empty slab in to the end of skc_partial_list */ spin_lock(&skc->skc_lock); - start = get_cycles(); skc->skc_slab_total++; skc->skc_obj_total += sks->sks_objs; list_add_tail(&sks->sks_list, &skc->skc_partial_list); spin_unlock(&skc->skc_lock); - if (unlikely((get_cycles() - start) > skc->skc_lock_grow)) - skc->skc_lock_grow = get_cycles() - start; - - RETURN(sks); } @@ -773,7 +748,6 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) { spl_kmem_slab_t *sks; int rc = 0, refill; - cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -783,16 +757,12 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) refill = MIN(skm->skm_refill, skm->skm_size - skm->skm_avail); spin_lock(&skc->skc_lock); - start = get_cycles(); while (refill > 0) { /* No slabs available we must grow the cache */ if (list_empty(&skc->skc_partial_list)) { spin_unlock(&skc->skc_lock); - if (unlikely((get_cycles()-start)>skc->skc_lock_refill)) - skc->skc_lock_refill = get_cycles() - start; - sks = spl_cache_grow(skc, flags); if (!sks) GOTO(out, rc); @@ -807,7 +777,6 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) refill = MIN(refill, skm->skm_size - skm->skm_avail); spin_lock(&skc->skc_lock); - start = get_cycles(); continue; } @@ -834,9 +803,6 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) } spin_unlock(&skc->skc_lock); - - if (unlikely((get_cycles() - start) > skc->skc_lock_refill)) - skc->skc_lock_refill = get_cycles() - start; out: /* Returns the number of entries added to cache */ RETURN(rc); @@ -892,14 +858,12 @@ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) { int i, count = MIN(flush, skm->skm_avail); - cycles_t start; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); spin_lock(&skc->skc_lock); - start = get_cycles(); for (i = 0; i < count; i++) spl_cache_shrink(skc, skm->skm_objs[i]); @@ -911,9 +875,6 @@ spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) spin_unlock(&skc->skc_lock); - if (unlikely((get_cycles() - start) > skc->skc_lock_flush)) - skc->skc_lock_flush = get_cycles() - start; - RETURN(count); } @@ -983,7 +944,6 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) /* Per-CPU cache full, flush it to make space */ if (unlikely(skm->skm_avail >= skm->skm_size)) (void)spl_cache_flush(skc, skm, skm->skm_refill); - (void)spl_cache_flush(skc, skm, 1); /* Available space in cache, use it */ skm->skm_objs[skm->skm_avail++] = obj; diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index e5f87d2d1..f2685f39b 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -578,8 +578,7 @@ slab_seq_show(struct seq_file *f, void *p) spin_lock(&skc->skc_lock); seq_printf(f, "%-36s ", skc->skc_name); seq_printf(f, "%u %u %u - %u %u %u - " - "%lu %lu %lu - %lu %lu %lu - %lu %lu %lu - %lu %lu - " - "%llu %llu %llu %llu %llu\n", + "%lu %lu %lu - %lu %lu %lu - %lu %lu %lu - %lu %lu\n", (unsigned)skc->skc_obj_size, (unsigned)skc->skc_chunk_size, (unsigned)skc->skc_slab_size, @@ -596,12 +595,7 @@ slab_seq_show(struct seq_file *f, void *p) (long unsigned)skc->skc_obj_alloc, (long unsigned)skc->skc_obj_max, (long unsigned)skc->skc_hash_depth, - (long unsigned)skc->skc_hash_count, - (long long unsigned)skc->skc_lock_reclaim, - (long long unsigned)skc->skc_lock_destroy, - (long long unsigned)skc->skc_lock_grow, - (long long unsigned)skc->skc_lock_refill, - (long long unsigned)skc->skc_lock_flush); + (long unsigned)skc->skc_hash_count); spin_unlock(&skc->skc_lock); From a1502d76aef90d32ac779c1ae3cf89a80d9d591d Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 1 Jul 2008 03:28:54 +0000 Subject: [PATCH 0133/1062] - Remove hash functionality from slab in favor of direct lookups based of the spl_kmem_obj_t tacked on the end of each object. This actually isn't so back because we are now allocing large chunks for the slab and partitioning it ourselves. So there's not a ton of wasted space. We may suffer a performance hit however due to alignment issues. - Remove remaining depenancies on the linux slab implementation. We're standing on our own now for better or worse. - Rework slabs to be either kmem or vmem based. If neither KMC_VMEM of KMC_KMEM are specified we make a decent guess about what will work best for their based on the object size. Additionally we provide a kmem_virt() function caller can use to see if they have a virtual or physical address. - Minor fixups in the test suite. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@141 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 32 +-- modules/spl/spl-kmem.c | 512 ++++++++++++++----------------------- modules/spl/spl-proc.c | 12 +- modules/splat/splat-kmem.c | 43 +++- 4 files changed, 241 insertions(+), 358 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index b90e3fdaf..9397caa0a 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -403,11 +403,14 @@ kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) /* * Slab allocation interfaces */ -#undef KMC_NOTOUCH /* XXX: Unsupported */ -#define KMC_NODEBUG 0x00000000 /* Default behavior */ -#define KMC_NOMAGAZINE /* XXX: Unsupported */ -#define KMC_NOHASH /* XXX: Unsupported */ -#define KMC_QCACHE /* XXX: Unsupported */ +#define KMC_NOTOUCH 0x00000001 +#define KMC_NODEBUG 0x00000002 /* Default behavior */ +#define KMC_NOMAGAZINE 0x00000004 /* XXX: No disable support available */ +#define KMC_NOHASH 0x00000008 /* XXX: No hash available */ +#define KMC_QCACHE 0x00000010 /* XXX: Unsupported */ +#define KMC_KMEM 0x00000100 /* Use kmem cache */ +#define KMC_VMEM 0x00000200 /* Use vmem cache */ +#define KMC_OFFSLAB 0x00000400 /* Objects not on slab */ #define KMC_REAP_CHUNK 256 #define KMC_DEFAULT_SEEKS DEFAULT_SEEKS @@ -462,11 +465,6 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SKS_MAGIC 0x22222222 #define SKC_MAGIC 0x2c2c2c2c -#define SPL_KMEM_CACHE_HASH_BITS 12 -#define SPL_KMEM_CACHE_HASH_ELTS (1 << SPL_KMEM_CACHE_HASH_BITS) -#define SPL_KMEM_CACHE_HASH_SIZE (sizeof(struct hlist_head) * \ - SPL_KMEM_CACHE_HASH_ELTS) - #define SPL_KMEM_CACHE_DELAY 5 #define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 @@ -488,7 +486,6 @@ typedef struct spl_kmem_obj { void *sko_addr; /* Buffer address */ struct spl_kmem_slab *sko_slab; /* Owned by slab */ struct list_head sko_list; /* Free object list linkage */ - struct hlist_node sko_hlist; /* Used object hash linkage */ } spl_kmem_obj_t; typedef struct spl_kmem_slab { @@ -515,14 +512,9 @@ typedef struct spl_kmem_cache { void *skc_vmp; /* Unused */ uint32_t skc_flags; /* Flags */ uint32_t skc_obj_size; /* Object size */ - uint32_t skc_chunk_size; /* sizeof(*obj) + alignment */ - uint32_t skc_slab_size; /* slab size */ - uint32_t skc_max_chunks; /* max chunks per slab */ + uint32_t skc_slab_objs; /* Objects per slab */ + uint32_t skc_slab_size; /* Slab size */ uint32_t skc_delay; /* slab reclaim interval */ - uint32_t skc_hash_bits; /* Hash table bits */ - uint32_t skc_hash_size; /* Hash table size */ - uint32_t skc_hash_elts; /* Hash table elements */ - struct hlist_head *skc_hash; /* Hash table address */ struct list_head skc_list; /* List of caches linkage */ struct list_head skc_complete_list;/* Completely alloc'ed */ struct list_head skc_partial_list; /* Partially alloc'ed */ @@ -536,8 +528,6 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_total; /* Obj total current */ uint64_t skc_obj_alloc; /* Obj alloc current */ uint64_t skc_obj_max; /* Obj max historic */ - uint64_t skc_hash_depth; /* Lazy hash depth */ - uint64_t skc_hash_count; /* Hash entries current */ } spl_kmem_cache_t; extern spl_kmem_cache_t * @@ -561,6 +551,8 @@ void spl_kmem_fini(void); #define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) #define kmem_cache_reap_now(skc) spl_kmem_cache_reap_now(skc) #define kmem_reap() spl_kmem_reap() +#define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ + ((ptr) < (void *)VMALLOC_END)) #ifdef HAVE_KMEM_CACHE_CREATE_DTOR #define __kmem_cache_create(name, size, align, flags, ctor, dtor) \ diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 369876108..3be038d5e 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -114,10 +114,6 @@ EXPORT_SYMBOL(kmem_set_warning); * shrink them via spl_slab_reclaim() when they are wasting lots * of space. Currently this process is driven by the reapers. * - * XXX: Implement a resizable used object hash. Currently the hash - * is statically sized for thousands of objects but it should - * grow based on observed worst case slab depth. - * * XXX: Improve the partial slab list by carefully maintaining a * strict ordering of fullest to emptiest slabs based on * the slab reference count. This gaurentees the when freeing @@ -134,20 +130,8 @@ EXPORT_SYMBOL(kmem_set_warning); * XXX: Proper hardware cache alignment would be good too. */ -/* Ensure the __kmem_cache_create/__kmem_cache_destroy macros are - * removed here to prevent a recursive substitution, we want to call - * the native linux version. - */ -#undef kmem_cache_t -#undef kmem_cache_create -#undef kmem_cache_destroy -#undef kmem_cache_alloc -#undef kmem_cache_free - struct list_head spl_kmem_cache_list; /* List of caches */ struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ -static kmem_cache_t *spl_slab_cache; /* Cache for slab structs */ -static kmem_cache_t *spl_obj_cache; /* Cache for obj structs */ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush); @@ -163,180 +147,119 @@ static struct shrinker spl_kmem_cache_shrinker = { }; #endif -static void -spl_slab_init(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) +static void * +kv_alloc(spl_kmem_cache_t *skc, int size, int flags) { + void *ptr; + + if (skc->skc_flags & KMC_KMEM) { + if (size > (2 * PAGE_SIZE)) { + ptr = (void *)__get_free_pages(flags, get_order(size)); + } else + ptr = kmem_alloc(size, flags); + } else { + ptr = vmem_alloc(size, flags); + } + + return ptr; +} + +static void +kv_free(spl_kmem_cache_t *skc, void *ptr, int size) +{ + if (skc->skc_flags & KMC_KMEM) { + if (size > (2 * PAGE_SIZE)) + free_pages((unsigned long)ptr, get_order(size)); + else + kmem_free(ptr, size); + } else { + vmem_free(ptr, size); + } +} + +static spl_kmem_slab_t * +spl_slab_alloc(spl_kmem_cache_t *skc, int flags) +{ + spl_kmem_slab_t *sks; + spl_kmem_obj_t *sko, *n; + void *base, *obj; + int i, size, rc = 0; + + /* It's important that we pack the spl_kmem_obj_t structure + * and the actual objects in to one large address space + * to minimize the number of calls to the allocator. It + * is far better to do a few large allocations and then + * subdivide it ourselves. Now which allocator we use + * requires balancling a few trade offs. + * + * For small objects we use kmem_alloc() because as long + * as you are only requesting a small number of pages + * (ideally just one) its cheap. However, when you start + * requesting multiple pages kmem_alloc() get increasingly + * expensive since it requires contigeous pages. For this + * reason we shift to vmem_alloc() for slabs of large + * objects which removes the need for contigeous pages. + * We do not use vmem_alloc() in all cases because there + * is significant locking overhead in __get_vm_area_node(). + * This function takes a single global lock when aquiring + * an available virtual address range which serialize all + * vmem_alloc()'s for all slab caches. Using slightly + * different allocation functions for small and large + * objects should give us the best of both worlds. + * + * sks struct: sizeof(spl_kmem_slab_t) + * obj data: skc->skc_obj_size + * obj struct: sizeof(spl_kmem_obj_t) + * + * + * XXX: It would probably be a good idea to more carefully + * align these data structures in memory. + */ + base = kv_alloc(skc, skc->skc_slab_size, flags); + if (base == NULL) + RETURN(NULL); + + sks = (spl_kmem_slab_t *)base; sks->sks_magic = SKS_MAGIC; - sks->sks_objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; + sks->sks_objs = skc->skc_slab_objs; sks->sks_age = jiffies; sks->sks_cache = skc; INIT_LIST_HEAD(&sks->sks_list); INIT_LIST_HEAD(&sks->sks_free_list); sks->sks_ref = 0; -} - -static int -spl_slab_alloc_kmem(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks, int flags) -{ - spl_kmem_obj_t *sko, *n; - int i, rc = 0; - - /* This is based on the linux slab cache for now simply because - * it means I get slab coloring, hardware cache alignment, etc - * for free. There's no reason we can't do this ourselves. And - * we probably should at in the future. For now I'll just - * leverage the existing linux slab here. */ - for (i = 0; i < sks->sks_objs; i++) { - sko = kmem_cache_alloc(spl_obj_cache, flags); - if (sko == NULL) { - rc = -ENOMEM; - break; - } - - sko->sko_addr = kmem_alloc(skc->skc_obj_size, flags); - if (sko->sko_addr == NULL) { - kmem_cache_free(spl_obj_cache, sko); - rc = -ENOMEM; - break; - } - - sko->sko_magic = SKO_MAGIC; - sko->sko_slab = sks; - INIT_LIST_HEAD(&sko->sko_list); - INIT_HLIST_NODE(&sko->sko_hlist); - list_add(&sko->sko_list, &sks->sks_free_list); - } - - /* Unable to fully construct slab, unwind everything */ - if (rc) { - list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { - ASSERT(sko->sko_magic == SKO_MAGIC); - kmem_free(sko->sko_addr, skc->skc_obj_size); - list_del(&sko->sko_list); - kmem_cache_free(spl_obj_cache, sko); - } - } - - RETURN(rc); -} - -static spl_kmem_slab_t * -spl_slab_alloc_vmem(spl_kmem_cache_t *skc, int flags) -{ - spl_kmem_slab_t *sks; - spl_kmem_obj_t *sko, *sko_base; - void *slab, *obj, *obj_base; - int i, size; - - /* For large vmem_alloc'ed buffers it's important that we pack the - * spl_kmem_obj_t structure and the actual objects in to one large - * virtual address zone to minimize the number of calls to - * vmalloc(). Mapping the virtual address in done under a single - * global lock which walks a list of all virtual zones. So doing - * lots of allocations simply results in lock contention and a - * longer list of mapped addresses. It is far better to do a - * few large allocations and then subdivide it ourselves. The - * large vmem_alloc'ed space is divied as follows: - * - * 1 slab struct: sizeof(spl_kmem_slab_t) - * N obj structs: sizeof(spl_kmem_obj_t) * skc->skc_objs - * N objects: skc->skc_obj_size * skc->skc_objs - * - * XXX: It would probably be a good idea to more carefully - * align the starts of these objects in memory. - */ - size = sizeof(spl_kmem_slab_t) + SPL_KMEM_CACHE_OBJ_PER_SLAB * - (skc->skc_obj_size + sizeof(spl_kmem_obj_t)); - - slab = vmem_alloc(size, flags); - if (slab == NULL) - RETURN(NULL); - - sks = (spl_kmem_slab_t *)slab; - spl_slab_init(skc, sks); - - sko_base = (spl_kmem_obj_t *)(slab + sizeof(spl_kmem_slab_t)); - obj_base = (void *)sko_base + sizeof(spl_kmem_obj_t) * sks->sks_objs; + size = sizeof(spl_kmem_obj_t) + skc->skc_obj_size; for (i = 0; i < sks->sks_objs; i++) { - sko = &sko_base[i]; - obj = obj_base + skc->skc_obj_size * i; + if (skc->skc_flags & KMC_OFFSLAB) { + obj = kv_alloc(skc, size, flags); + if (!obj) + GOTO(out, rc = -ENOMEM); + } else { + obj = base + sizeof(spl_kmem_slab_t) + i * size; + } + + sko = obj + skc->skc_obj_size; sko->sko_addr = obj; sko->sko_magic = SKO_MAGIC; sko->sko_slab = sks; INIT_LIST_HEAD(&sko->sko_list); - INIT_HLIST_NODE(&sko->sko_hlist); list_add_tail(&sko->sko_list, &sks->sks_free_list); } - RETURN(sks); -} - -static spl_kmem_slab_t * -spl_slab_alloc(spl_kmem_cache_t *skc, int flags) { - spl_kmem_slab_t *sks; - spl_kmem_obj_t *sko; - int rc; - ENTRY; - - /* Objects less than a page can use kmem_alloc() and avoid - * the locking overhead in __get_vm_area_node() when locking - * for a free address. For objects over a page we use - * vmem_alloc() because it is usually worth paying this - * overhead to avoid the need to find contigeous pages. - * This should give us the best of both worlds. */ - if (skc->skc_obj_size <= PAGE_SIZE) { - sks = kmem_cache_alloc(spl_slab_cache, flags); - if (sks == NULL) - GOTO(out, sks = NULL); - - spl_slab_init(skc, sks); - - rc = spl_slab_alloc_kmem(skc, sks, flags); - if (rc) { - kmem_cache_free(spl_slab_cache, sks); - GOTO(out, sks = NULL); - } - } else { - sks = spl_slab_alloc_vmem(skc, flags); - if (sks == NULL) - GOTO(out, sks = NULL); - } - - ASSERT(sks); list_for_each_entry(sko, &sks->sks_free_list, sko_list) if (skc->skc_ctor) skc->skc_ctor(sko->sko_addr, skc->skc_private, flags); out: - RETURN(sks); -} + if (rc) { + if (skc->skc_flags & KMC_OFFSLAB) + list_for_each_entry_safe(sko,n,&sks->sks_free_list,sko_list) + kv_free(skc, sko->sko_addr, size); -static void -spl_slab_free_kmem(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) -{ - spl_kmem_obj_t *sko, *n; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(sks->sks_magic == SKS_MAGIC); - - list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { - ASSERT(sko->sko_magic == SKO_MAGIC); - kmem_free(sko->sko_addr, skc->skc_obj_size); - list_del(&sko->sko_list); - kmem_cache_free(spl_obj_cache, sko); + kv_free(skc, base, skc->skc_slab_size); + sks = NULL; } - kmem_cache_free(spl_slab_cache, sks); -} - -static void -spl_slab_free_vmem(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) -{ - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(sks->sks_magic == SKS_MAGIC); - - vmem_free(sks, SPL_KMEM_CACHE_OBJ_PER_SLAB * - (skc->skc_obj_size + sizeof(spl_kmem_obj_t))); + RETURN(sks); } /* Removes slab from complete or partial list, so it must @@ -346,6 +269,7 @@ static void spl_slab_free(spl_kmem_slab_t *sks) { spl_kmem_cache_t *skc; spl_kmem_obj_t *sko, *n; + int size; ENTRY; ASSERT(sks->sks_magic == SKS_MAGIC); @@ -358,17 +282,20 @@ spl_slab_free(spl_kmem_slab_t *sks) { skc->skc_obj_total -= sks->sks_objs; skc->skc_slab_total--; list_del(&sks->sks_list); + size = sizeof(spl_kmem_obj_t) + skc->skc_obj_size; /* Run destructors slab is being released */ - list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) + list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + if (skc->skc_dtor) skc->skc_dtor(sko->sko_addr, skc->skc_private); - if (skc->skc_obj_size <= PAGE_SIZE) - spl_slab_free_kmem(skc, sks); - else - spl_slab_free_vmem(skc, sks); + if (skc->skc_flags & KMC_OFFSLAB) + kv_free(skc, sko->sko_addr, size); + } + kv_free(skc, sks, skc->skc_slab_size); EXIT; } @@ -449,7 +376,8 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) skm->skm_avail = 0; skm->skm_size = skc->skc_mag_size; skm->skm_refill = skc->skc_mag_refill; - skm->skm_age = jiffies; + if (!(skc->skc_flags & KMC_NOTOUCH)) + skm->skm_age = jiffies; } RETURN(skm); @@ -511,9 +439,14 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, void *priv, void *vmp, int flags) { spl_kmem_cache_t *skc; - int i, rc, kmem_flags = KM_SLEEP; + uint32_t slab_max, slab_size, slab_objs; + int rc, kmem_flags = KM_SLEEP; ENTRY; + ASSERTF(!(flags & KMC_NOMAGAZINE), "Bad KMC_NOMAGAZINE (%x)\n", flags); + ASSERTF(!(flags & KMC_NOHASH), "Bad KMC_NOHASH (%x)\n", flags); + ASSERTF(!(flags & KMC_QCACHE), "Bad KMC_QCACHE (%x)\n", flags); + /* We may be called when there is a non-zero preempt_count or * interrupts are disabled is which case we must not sleep. */ @@ -541,25 +474,8 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_vmp = vmp; skc->skc_flags = flags; skc->skc_obj_size = size; - skc->skc_chunk_size = 0; /* XXX: Needed only when implementing */ - skc->skc_slab_size = 0; /* small slab object optimizations */ - skc->skc_max_chunks = 0; /* which are yet supported. */ skc->skc_delay = SPL_KMEM_CACHE_DELAY; - skc->skc_hash_bits = SPL_KMEM_CACHE_HASH_BITS; - skc->skc_hash_size = SPL_KMEM_CACHE_HASH_SIZE; - skc->skc_hash_elts = SPL_KMEM_CACHE_HASH_ELTS; - skc->skc_hash = (struct hlist_head *) - vmem_alloc(skc->skc_hash_size, kmem_flags); - if (skc->skc_hash == NULL) { - kmem_free(skc->skc_name, skc->skc_name_size); - kmem_free(skc, sizeof(*skc)); - RETURN(NULL); - } - - for (i = 0; i < skc->skc_hash_elts; i++) - INIT_HLIST_HEAD(&skc->skc_hash[i]); - INIT_LIST_HEAD(&skc->skc_list); INIT_LIST_HEAD(&skc->skc_complete_list); INIT_LIST_HEAD(&skc->skc_partial_list); @@ -573,12 +489,37 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_total = 0; skc->skc_obj_alloc = 0; skc->skc_obj_max = 0; - skc->skc_hash_depth = 0; - skc->skc_hash_count = 0; + + /* If none passed select a cache type based on object size */ + if (!(skc->skc_flags & (KMC_KMEM | KMC_VMEM))) { + if (skc->skc_obj_size < (PAGE_SIZE / 8)) { + skc->skc_flags |= KMC_KMEM; + } else { + skc->skc_flags |= KMC_VMEM; + } + } + + /* Size slabs properly so ensure they are not too large */ + slab_max = ((uint64_t)1 << (MAX_ORDER - 1)) * PAGE_SIZE; + if (skc->skc_flags & KMC_OFFSLAB) { + skc->skc_slab_objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; + skc->skc_slab_size = sizeof(spl_kmem_slab_t); + ASSERT(skc->skc_obj_size < slab_max); + } else { + slab_objs = SPL_KMEM_CACHE_OBJ_PER_SLAB + 1; + + do { + slab_objs--; + slab_size = sizeof(spl_kmem_slab_t) + slab_objs * + (skc->skc_obj_size+sizeof(spl_kmem_obj_t)); + } while (slab_size > slab_max); + + skc->skc_slab_objs = slab_objs; + skc->skc_slab_size = slab_size; + } rc = spl_magazine_create(skc); if (rc) { - vmem_free(skc->skc_hash, skc->skc_hash_size); kmem_free(skc->skc_name, skc->skc_name_size); kmem_free(skc, sizeof(*skc)); RETURN(NULL); @@ -592,9 +533,6 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, } EXPORT_SYMBOL(spl_kmem_cache_create); -/* The caller must ensure there are no racing calls to - * spl_kmem_cache_alloc() for this spl_kmem_cache_t. - */ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { @@ -613,13 +551,15 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) /* Validate there are no objects in use and free all the * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ ASSERT(list_empty(&skc->skc_complete_list)); - ASSERTF(skc->skc_hash_count == 0, "skc->skc_hash_count=%d\n", - skc->skc_hash_count); + ASSERT(skc->skc_slab_alloc == 0); + ASSERT(skc->skc_obj_alloc == 0); list_for_each_entry_safe(sks, m, &skc->skc_partial_list, sks_list) spl_slab_free(sks); - vmem_free(skc->skc_hash, skc->skc_hash_size); + ASSERT(skc->skc_slab_total == 0); + ASSERT(skc->skc_obj_total == 0); + kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); @@ -629,64 +569,25 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) } EXPORT_SYMBOL(spl_kmem_cache_destroy); -/* The kernel provided hash_ptr() function behaves exceptionally badly - * when all the addresses are page aligned which is likely the case - * here. To avoid this issue shift off the low order non-random bits. - */ -static unsigned long -spl_hash_ptr(void *ptr, unsigned int bits) -{ - return hash_long((unsigned long)ptr >> PAGE_SHIFT, bits); -} - -static spl_kmem_obj_t * -spl_hash_obj(spl_kmem_cache_t *skc, void *obj) -{ - struct hlist_node *node; - spl_kmem_obj_t *sko = NULL; - unsigned long key = spl_hash_ptr(obj, skc->skc_hash_bits); - int i = 0; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); - - hlist_for_each_entry(sko, node, &skc->skc_hash[key], sko_hlist) { - - if (unlikely((++i) > skc->skc_hash_depth)) - skc->skc_hash_depth = i; - - if (sko->sko_addr == obj) { - ASSERT(sko->sko_magic == SKO_MAGIC); - RETURN(sko); - } - } - - RETURN(NULL); -} - static void * spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) { spl_kmem_obj_t *sko; - unsigned long key; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); - sko = list_entry((&sks->sks_free_list)->next,spl_kmem_obj_t,sko_list); + sko = list_entry(sks->sks_free_list.next, spl_kmem_obj_t, sko_list); ASSERT(sko->sko_magic == SKO_MAGIC); ASSERT(sko->sko_addr != NULL); - /* Remove from sks_free_list and add to used hash */ + /* Remove from sks_free_list */ list_del_init(&sko->sko_list); - key = spl_hash_ptr(sko->sko_addr, skc->skc_hash_bits); - hlist_add_head(&sko->sko_hlist, &skc->skc_hash[key]); sks->sks_age = jiffies; sks->sks_ref++; skc->skc_obj_alloc++; - skc->skc_hash_count++; /* Track max obj usage statistics */ if (skc->skc_obj_alloc > skc->skc_obj_max) @@ -818,22 +719,17 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); - sko = spl_hash_obj(skc, obj); - ASSERTF(sko, "Obj %p missing from in-use hash (%d/%d) for cache %s\n", - obj, skc->skc_hash_depth, skc->skc_hash_count, skc->skc_name); + sko = obj + skc->skc_obj_size; + ASSERT(sko->sko_magic == SKO_MAGIC); sks = sko->sko_slab; - ASSERTF(sks, "Obj %p/%p linked to invalid slab for cache %s\n", - obj, sko, skc->skc_name); - + ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(sks->sks_cache == skc); - hlist_del_init(&sko->sko_hlist); list_add(&sko->sko_list, &sks->sks_free_list); sks->sks_age = jiffies; sks->sks_ref--; skc->skc_obj_alloc--; - skc->skc_hash_count--; /* Move slab to skc_partial_list when no longer full. Slabs * are added to the head to keep the partial list is quasi-full @@ -906,7 +802,8 @@ restart: if (likely(skm->skm_avail)) { /* Object available in CPU cache, use it */ obj = skm->skm_objs[--skm->skm_avail]; - skm->skm_age = jiffies; + if (!(skc->skc_flags & KMC_NOTOUCH)) + skm->skm_age = jiffies; } else { /* Per-CPU cache empty, directly allocate from * the slab and refill the per-CPU cache. */ @@ -1012,71 +909,6 @@ spl_kmem_reap(void) } EXPORT_SYMBOL(spl_kmem_reap); -int -spl_kmem_init(void) -{ - int rc = 0; - ENTRY; - - init_rwsem(&spl_kmem_cache_sem); - INIT_LIST_HEAD(&spl_kmem_cache_list); - - spl_slab_cache = NULL; - spl_obj_cache = NULL; - - spl_slab_cache = __kmem_cache_create("spl_slab_cache", - sizeof(spl_kmem_slab_t), - 0, 0, NULL, NULL); - if (spl_slab_cache == NULL) - GOTO(out_cache, rc = -ENOMEM); - - spl_obj_cache = __kmem_cache_create("spl_obj_cache", - sizeof(spl_kmem_obj_t), - 0, 0, NULL, NULL); - if (spl_obj_cache == NULL) - GOTO(out_cache, rc = -ENOMEM); - -#ifdef HAVE_SET_SHRINKER - spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, - spl_kmem_cache_generic_shrinker); - if (spl_kmem_cache_shrinker == NULL) - GOTO(out_cache, rc = -ENOMEM); -#else - register_shrinker(&spl_kmem_cache_shrinker); -#endif - -#ifdef DEBUG_KMEM - atomic64_set(&kmem_alloc_used, 0); - atomic64_set(&vmem_alloc_used, 0); - -#ifdef DEBUG_KMEM_TRACKING - { int i; - spin_lock_init(&kmem_lock); - INIT_LIST_HEAD(&kmem_list); - - for (i = 0; i < KMEM_TABLE_SIZE; i++) - INIT_HLIST_HEAD(&kmem_table[i]); - - spin_lock_init(&vmem_lock); - INIT_LIST_HEAD(&vmem_list); - - for (i = 0; i < VMEM_TABLE_SIZE; i++) - INIT_HLIST_HEAD(&vmem_table[i]); - } -#endif -#endif - RETURN(rc); - -out_cache: - if (spl_obj_cache) - (void)kmem_cache_destroy(spl_obj_cache); - - if (spl_slab_cache) - (void)kmem_cache_destroy(spl_slab_cache); - - RETURN(rc); -} - #if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) static char * spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) @@ -1119,12 +951,28 @@ spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) return str; } +static int +spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) +{ + int i; + ENTRY; + + spin_lock_init(lock); + INIT_LIST_HEAD(list); + + for (i = 0; i < size; i++) + INIT_HLIST_HEAD(&kmem_table[i]); + + RETURN(0); +} + static void spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) { unsigned long flags; kmem_debug_t *kd; char str[17]; + ENTRY; spin_lock_irqsave(lock, flags); if (!list_empty(list)) @@ -1138,11 +986,42 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) kd->kd_func, kd->kd_line); spin_unlock_irqrestore(lock, flags); + EXIT; } #else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ +#define spl_kmem_init_tracking(list, lock, size) #define spl_kmem_fini_tracking(list, lock) #endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ +int +spl_kmem_init(void) +{ + int rc = 0; + ENTRY; + + init_rwsem(&spl_kmem_cache_sem); + INIT_LIST_HEAD(&spl_kmem_cache_list); + +#ifdef HAVE_SET_SHRINKER + spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, + spl_kmem_cache_generic_shrinker); + if (spl_kmem_cache_shrinker == NULL) + GOTO(out, rc = -ENOMEM); +#else + register_shrinker(&spl_kmem_cache_shrinker); +#endif + +#ifdef DEBUG_KMEM + atomic64_set(&kmem_alloc_used, 0); + atomic64_set(&vmem_alloc_used, 0); + + spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); + spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); +#endif +out: + RETURN(rc); +} + void spl_kmem_fini(void) { @@ -1171,8 +1050,5 @@ spl_kmem_fini(void) unregister_shrinker(&spl_kmem_cache_shrinker); #endif - (void)kmem_cache_destroy(spl_obj_cache); - (void)kmem_cache_destroy(spl_slab_cache); - EXIT; } diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index f2685f39b..01983433d 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -577,14 +577,10 @@ slab_seq_show(struct seq_file *f, void *p) spin_lock(&skc->skc_lock); seq_printf(f, "%-36s ", skc->skc_name); - seq_printf(f, "%u %u %u - %u %u %u - " - "%lu %lu %lu - %lu %lu %lu - %lu %lu %lu - %lu %lu\n", + seq_printf(f, "%u %u %u - %lu %lu %lu - %lu %lu %lu - %lu %lu %lu\n", (unsigned)skc->skc_obj_size, - (unsigned)skc->skc_chunk_size, + (unsigned)skc->skc_slab_objs, (unsigned)skc->skc_slab_size, - (unsigned)skc->skc_hash_bits, - (unsigned)skc->skc_hash_size, - (unsigned)skc->skc_hash_elts, (long unsigned)skc->skc_slab_fail, (long unsigned)skc->skc_slab_create, (long unsigned)skc->skc_slab_destroy, @@ -593,9 +589,7 @@ slab_seq_show(struct seq_file *f, void *p) (long unsigned)skc->skc_slab_max, (long unsigned)skc->skc_obj_total, (long unsigned)skc->skc_obj_alloc, - (long unsigned)skc->skc_obj_max, - (long unsigned)skc->skc_hash_depth, - (long unsigned)skc->skc_hash_count); + (long unsigned)skc->skc_obj_max); spin_unlock(&skc->skc_lock); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 49715152d..af28c717c 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -371,18 +371,40 @@ out_free: return rc; } +/* Validate small object cache behavior for dynamic/kmem/vmem caches */ static int splat_kmem_test5(struct file *file, void *arg) { - return splat_kmem_cache_size_test(file, arg, SPLAT_KMEM_TEST5_NAME, - sizeof(kmem_cache_data_t) * 1, 0); + char *name = SPLAT_KMEM_TEST5_NAME; + int rc; + + rc = splat_kmem_cache_size_test(file, arg, name, 128, 0); + if (rc) + return rc; + + rc = splat_kmem_cache_size_test(file, arg, name, 128, KMC_KMEM); + if (rc) + return rc; + + return splat_kmem_cache_size_test(file, arg, name, 128, KMC_VMEM); } +/* Validate large object cache behavior for dynamic/kmem/vmem caches */ static int splat_kmem_test6(struct file *file, void *arg) { - return splat_kmem_cache_size_test(file, arg, SPLAT_KMEM_TEST6_NAME, - sizeof(kmem_cache_data_t) * 1024, 0); + char *name = SPLAT_KMEM_TEST6_NAME; + int rc; + + rc = splat_kmem_cache_size_test(file, arg, name, 128 * 1024, 0); + if (rc) + return rc; + + rc = splat_kmem_cache_size_test(file, arg, name, 128 * 1024, KMC_KMEM); + if (rc) + return rc; + + return splat_kmem_cache_size_test(file, arg, name, 128 * 1028, KMC_VMEM); } static void @@ -533,11 +555,12 @@ splat_kmem_test8_thread(void *arg) vmem_free(objs, count * sizeof(void *)); out: spin_lock(&kcp->kcp_lock); - kcp->kcp_threads--; if (!kcp->kcp_rc) kcp->kcp_rc = rc; - wake_up(&kcp->kcp_waitq); + if (--kcp->kcp_threads == 0) + wake_up(&kcp->kcp_waitq); + spin_unlock(&kcp->kcp_lock); thread_exit(); @@ -573,7 +596,7 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %s", "name", "time (sec)\tslabs \tobjs \thash\n"); splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %s", "", - " \ttot/max/calc\ttot/max/calc\tsize/depth\n"); + " \ttot/max/calc\ttot/max/calc\n"); for (i = 1; i <= count; i *= 2) { kcp.kcp_size = size; @@ -611,7 +634,7 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) delta = timespec_sub(stop, start); splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %2ld.%09ld\t" - "%lu/%lu/%lu\t%lu/%lu/%lu\t%lu/%lu\n", + "%lu/%lu/%lu\t%lu/%lu/%lu\n", kcp.kcp_cache->skc_name, delta.tv_sec, delta.tv_nsec, (unsigned long)kcp.kcp_cache->skc_slab_total, @@ -620,9 +643,7 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) SPL_KMEM_CACHE_OBJ_PER_SLAB), (unsigned long)kcp.kcp_cache->skc_obj_total, (unsigned long)kcp.kcp_cache->skc_obj_max, - (unsigned long)(kcp.kcp_alloc * threads), - (unsigned long)kcp.kcp_cache->skc_hash_size, - (unsigned long)kcp.kcp_cache->skc_hash_depth); + (unsigned long)(kcp.kcp_alloc * threads)); kmem_cache_destroy(kcp.kcp_cache); From 3ba97a6743ee69ada9032cc4b111bca25989638a Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 1 Jul 2008 03:42:24 +0000 Subject: [PATCH 0134/1062] Update info to prep for a tag. If all goes well I'll have something I'm not too embarased to distrubute tommorow. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@142 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 9 +++++++++ configure.ac | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6e3c3aceb..d33a2fd3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-06-30 Brian Behlendorf + + * : Tag spl-0.3.3 + + * : modules/sys/kmem-slab.c : Refined SPL slab to include + per-cpu caches, removed internal hash, other general + performance improvements. Much work remain but it's pretty + good for an initial implementation. + 2008-06-13 Brian Behlendorf * : modules/sys/kmem-slab.c : Re-implemented the slab to no diff --git a/configure.ac b/configure.ac index 1ec695319..17a782a2b 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.3.2) +AM_INIT_AUTOMAKE(spl, 0.3.3) AC_CONFIG_HEADERS([spl_config.h]) AC_PROG_INSTALL From f78a933f8ad5fa39c8af08d4ff792a387b906baf Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 1 Jul 2008 04:06:09 +0000 Subject: [PATCH 0135/1062] Two easy fixes I caught with debug enabled git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@143 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-kmem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 3be038d5e..fc238a397 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -619,8 +619,8 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) if (flags & __GFP_WAIT) { flags |= __GFP_NOFAIL; - might_sleep(); local_irq_enable(); + might_sleep(); } sks = spl_slab_alloc(skc, flags); @@ -1006,7 +1006,7 @@ spl_kmem_init(void) spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, spl_kmem_cache_generic_shrinker); if (spl_kmem_cache_shrinker == NULL) - GOTO(out, rc = -ENOMEM); + RETURN(rc = -ENOMEM); #else register_shrinker(&spl_kmem_cache_shrinker); #endif @@ -1018,7 +1018,6 @@ spl_kmem_init(void) spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); #endif -out: RETURN(rc); } From 97f274d46d8eb330f806cd445cfd186446aeb1de Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 7 Jul 2008 22:15:04 +0000 Subject: [PATCH 0136/1062] Fix race in kmem_locking test Reduce max memory usage for kmem_locking tests (for low memory machines) git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@145 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/splat/splat-kmem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index af28c717c..27e27a5c8 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -572,10 +572,10 @@ splat_kmem_test8_count(kmem_cache_priv_t *kcp, int threads) int ret; spin_lock(&kcp->kcp_lock); - ret = (kcp->kcp_threads == threads); - spin_unlock(&kcp->kcp_lock); + ret = (kcp->kcp_threads == threads); + spin_unlock(&kcp->kcp_lock); - return ret; + return ret; } /* This test will always pass and is simply here so I can easily @@ -625,7 +625,9 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) thr = thread_create(NULL, 0, splat_kmem_test8_thread, &kcp, 0, &p0, TS_RUN, minclsyspri); ASSERT(thr != NULL); + spin_lock(&kcp.kcp_lock); kcp.kcp_threads++; + spin_unlock(&kcp.kcp_lock); } /* Sleep until the thread sets kcp.kcp_threads == 0 */ @@ -662,7 +664,7 @@ splat_kmem_test8(struct file *file, void *arg) /* Run through slab cache with objects size from * 16-1Mb in 4x multiples with 1024 objects each */ for (i = 16; i <= 1024*1024; i *= 4) { - rc = splat_kmem_test8_sc(file, arg, i, 1024); + rc = splat_kmem_test8_sc(file, arg, i, 256); if (rc) break; } From 5587df4d8ea903cd0a6b0e61e6b1abf969e10681 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 9 Jul 2008 19:11:29 +0000 Subject: [PATCH 0137/1062] Trivial commit to remove whitespace git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@146 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- INSTALL | 1 - 1 file changed, 1 deletion(-) diff --git a/INSTALL b/INSTALL index fbf3a78e8..cd052060d 100644 --- a/INSTALL +++ b/INSTALL @@ -235,4 +235,3 @@ configuration-related scripts to be executed by `/bin/bash'. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - From 73035a29eb2cea265de650e26be3cc5a0e3efcb0 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 4 Aug 2008 23:59:08 +0000 Subject: [PATCH 0138/1062] Apply Ricardo's spl-02-condvar-poison.patch Fix too early memory poisoning on condvars. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@147 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-condvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/spl/spl-condvar.c b/modules/spl/spl-condvar.c index 79a047b19..163f2a1de 100644 --- a/modules/spl/spl-condvar.c +++ b/modules/spl/spl-condvar.c @@ -78,8 +78,8 @@ __cv_destroy(kcondvar_t *cvp) if (cvp->cv_name) kmem_free(cvp->cv_name, cvp->cv_name_size); - memset(cvp, CV_POISON, sizeof(*cvp)); spin_unlock(&cvp->cv_lock); + memset(cvp, CV_POISON, sizeof(*cvp)); EXIT; } EXPORT_SYMBOL(__cv_destroy); From 7afde631f6483cc5e2da95a84a98085e7453cf52 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 5 Aug 2008 04:16:09 +0000 Subject: [PATCH 0139/1062] Start bringing in Ricardo's spl-00-rhel4-compat.patch, a few chunks at a time as I audit it. This chunk finishes moving the SPL entirely off the linux slab on to the SPL implementation. It differs slightly from the proposed version in that the spl continues to export to all the Solaris types and functions. These do conflict with the Linux slab so a module usings these interfaces must not include the SPL slab if they also intend to use the linux slab. Or they must explcitly #undef the macros which remap the functioin to their spl_* equivilants. A nice side of effect of dropping the entire linux slab is we don't need to autoconf checks anymore. They kept messing with the slab API endlessly! git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@148 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 109 ---------------------------------------- configure.ac | 5 -- include/sys/kmem.h | 1 + include/sys/types.h | 5 -- modules/spl/spl-vnode.c | 4 +- 5 files changed, 3 insertions(+), 121 deletions(-) diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index d77c7aa80..2f09fa87e 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -308,44 +308,6 @@ AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], ]) ]) -dnl # -dnl # 2.6.x API change -dnl # check if kmem_cache_t typedef is defined -dnl # -AC_DEFUN([SPL_AC_TYPE_KMEM_CACHE_T], - [AC_MSG_CHECKING([whether kernel defines kmem_cache_t]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - kmem_cache_t *cache; - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_KMEM_CACHE_T, 1, - [kernel defines kmem_cache_t]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) - -dnl # -dnl # 2.6.19 API change -dnl # kmem_cache_destroy() return void instead of int -dnl # -AC_DEFUN([SPL_AC_KMEM_CACHE_DESTROY_INT], - [AC_MSG_CHECKING([whether kmem_cache_destroy() returns int]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - int i = kmem_cache_destroy(NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_DESTROY_INT, 1, - [kmem_cache_destroy() returns int]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.19 API change dnl # panic_notifier_list use atomic_notifier operations @@ -407,77 +369,6 @@ AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], ]) ]) -dnl # -dnl # 2.6.21 API change -dnl # Use struct kmem_cache for missing kmem_cache_t -dnl # -AC_DEFUN([SPL_AC_KMEM_CACHE_T], [ - AC_MSG_CHECKING([whether kernel has kmem_cache_t]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - kmem_cache_t *cachep = NULL; - kmem_cache_free(cachep, NULL); - - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_KMEM_CACHE_T, 1, - [kernel has struct kmem_cache_t]) - ],[ - AC_MSG_RESULT([no]) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 2.6.23 API change -dnl # Slab no longer accepts a dtor argument -dnl # -AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_DTOR], - [AC_MSG_CHECKING([whether kmem_cache_create() has dtor arg]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - kmem_cache_create(NULL, 0, 0, 0, NULL, NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_CREATE_DTOR, 1, - [kmem_cache_create() has dtor arg]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.x API change -dnl # Slab ctor no longer takes 3 args -dnl # -AC_DEFUN([SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR], - [AC_MSG_CHECKING([whether slab ctor wants 3 args]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - void (*ctor)(void *,struct kmem_cache *,unsigned long) = NULL; - - #ifdef HAVE_KMEM_CACHE_CREATE_DTOR - kmem_cache_create(NULL, 0, 0, 0, ctor, NULL); - #else - kmem_cache_create(NULL, 0, 0, 0, ctor); - #endif - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARG_KMEM_CACHE_CREATE_CTOR, 1, - [slab ctor wants 3 args]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - dnl # dnl # 2.6.x API change dnl # Old set_shrinker API replaced with register_shrinker diff --git a/configure.ac b/configure.ac index 17a782a2b..c4d424ea0 100644 --- a/configure.ac +++ b/configure.ac @@ -44,14 +44,9 @@ SPL_AC_DEBUG_MUTEX SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB SPL_AC_TYPE_UINTPTR_T -SPL_AC_TYPE_KMEM_CACHE_T -SPL_AC_KMEM_CACHE_DESTROY_INT SPL_AC_ATOMIC_PANIC_NOTIFIER SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL -SPL_AC_KMEM_CACHE_T -SPL_AC_KMEM_CACHE_CREATE_DTOR -SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR SPL_AC_SET_SHRINKER SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 9397caa0a..dd1514fb9 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -529,6 +529,7 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_alloc; /* Obj alloc current */ uint64_t skc_obj_max; /* Obj max historic */ } spl_kmem_cache_t; +#define kmem_cache_t spl_kmem_cache_t extern spl_kmem_cache_t * spl_kmem_cache_create(char *name, size_t size, size_t align, diff --git a/include/sys/types.h b/include/sys/types.h index c60bfb208..eba23eae0 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -13,11 +13,6 @@ extern "C" { typedef unsigned long uintptr_t; #endif -#ifndef HAVE_KMEM_CACHE_T -typedef struct kmem_cache kmem_cache_t; -#endif -#define kmem_cache_t spl_kmem_cache_t - typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; typedef unsigned long intptr_t; typedef unsigned long ulong_t; diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 678d94682..bf9b3e97c 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -37,8 +37,8 @@ void *rootdir = NULL; EXPORT_SYMBOL(rootdir); -static kmem_cache_t *vn_cache; -static kmem_cache_t *vn_file_cache; +static spl_kmem_cache_t *vn_cache; +static spl_kmem_cache_t *vn_file_cache; static spinlock_t vn_file_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(vn_file_list); From 877a32e91eb69b15744aa85ad22db385bd522b60 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 6 Aug 2008 04:52:39 +0000 Subject: [PATCH 0140/1062] Pull in fls64 compat changes from spl-00-rhel4-compat.patch, to allow greater compatibility with kernels pre 2.6.16. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@149 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 18 ++++++++++++++++++ configure.ac | 1 + include/linux/bitops_compat.c | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 include/linux/bitops_compat.c diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index 2f09fa87e..b311902e9 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -439,3 +439,21 @@ AC_DEFUN([SPL_AC_CTL_UNNUMBERED], AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.16 API change. +dnl # Check if 'fls64()' is available +dnl # +AC_DEFUN([SPL_AC_FLS64], + [AC_MSG_CHECKING([whether fls64() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + return fls64(0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FLS64, 1, [fls64() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure.ac b/configure.ac index c4d424ea0..99d341a66 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,7 @@ SPL_AC_SET_SHRINKER SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED +SPL_AC_FLS64 TOPDIR=`/bin/pwd` diff --git a/include/linux/bitops_compat.c b/include/linux/bitops_compat.c new file mode 100644 index 000000000..8e1e25809 --- /dev/null +++ b/include/linux/bitops_compat.c @@ -0,0 +1,19 @@ +#ifndef _SPL_BITOPS_COMPAT_H +#define _SPL_BITOPS_COMPAT_H + +#include + +#ifndef HAVE_FLS64 + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(h) + 32; + return fls(x); +} + +#endif /* HAVE_FLS64 */ + +#endif /* _SPL_BITOPS_COMPAT_H */ + From 46c685d0c47df8c6271c8914a03d256a5b1f7bd3 Mon Sep 17 00:00:00 2001 From: behlendo Date: Sun, 10 Aug 2008 03:50:36 +0000 Subject: [PATCH 0141/1062] Add class / device portability code. Two autoconf tests were added to cover the 3 possible APIs from 2.6.9 to 2.6.26. We attempt to use the newest interfaces and if not available fallback to the oldest. This a rework of some changes proposed by Ricardo for RHEL4. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@150 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 28 ++++++++++++++++++ configure.ac | 2 ++ include/spl-device.h | 53 ++++++++++++++++++++++++++++++++++ include/splat-ctl.h | 1 + include/sys/sunddi.h | 4 +-- modules/spl/spl-module.c | 14 ++++----- modules/splat/splat-ctl.c | 43 +++++---------------------- modules/splat/splat-internal.h | 2 ++ 8 files changed, 103 insertions(+), 44 deletions(-) create mode 100644 include/spl-device.h diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index b311902e9..cb782f9d4 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -457,3 +457,31 @@ AC_DEFUN([SPL_AC_FLS64], AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.18 API change, check whether device_create() is available. +dnl # Device_create() was introduced in 2.6.18 and depricated +dnl # class_device_create() which was fully removed in 2.6.26. +dnl # +AC_DEFUN([SPL_AC_DEVICE_CREATE], [ + SPL_CHECK_SYMBOL_EXPORT( + [device_create], + [drivers/base/core.c], + [AC_DEFINE(HAVE_DEVICE_CREATE, 1, + [device_create() is available])], + []) +]) + +dnl # +dnl # 2.6.13 API change, check whether class_device_create() is available. +dnl # Class_device_create() was introduced in 2.6.13 and depricated +dnl # class_simple_device_add() which was fully removed in 2.6.13. +dnl # +AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], [ + SPL_CHECK_SYMBOL_EXPORT( + [class_device_create], + [drivers/base/class.c], + [AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1, + [class_device_create() is available])], + []) +]) diff --git a/configure.ac b/configure.ac index 99d341a66..1e8c4c0f5 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,8 @@ SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED SPL_AC_FLS64 +SPL_AC_DEVICE_CREATE +SPL_AC_CLASS_DEVICE_CREATE TOPDIR=`/bin/pwd` diff --git a/include/spl-device.h b/include/spl-device.h new file mode 100644 index 000000000..2bbd299b8 --- /dev/null +++ b/include/spl-device.h @@ -0,0 +1,53 @@ +#ifndef _SPL_DEVICE_H +#define _SPL_DEVICE_H + +#include + +/* + * Preferred API from 2.6.18 to 2.6.26+ + */ +#ifdef HAVE_DEVICE_CREATE + +typedef struct class spl_class; + +#define spl_class_create(mod, name) class_create(mod, name) +#define spl_class_destroy(cls) class_destroy(cls) +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ + device_create(cls, parent, devt, fmt, ## args) +#define spl_device_destroy(cls, devt) device_destroy(cls, devt) + +/* + * Preferred API from 2.6.13 to 2.6.17 + * Depricated in 2.6.18 + * Removed in 2.6.26 + */ +#else +#ifdef HAVE_CLASS_DEVICE_CREATE + +typedef struct class spl_class; + +#define spl_class_create(mod, name) class_create(mod, name) +#define spl_class_destroy(cls) class_destroy(cls) +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ + class_device_create(cls, parent, devt, device, fmt, ## args) +#define spl_device_destroy(cls, devt) class_device_destroy(cls, devt) + +/* + * Prefered API from 2.6.0 to 2.6.12 + * Depricated in 2.6.13 + * Removed in 2.6.13 + */ +#else /* Legacy API */ + +typedef struct class_simple spl_class; + +#define spl_class_create(mod, name) class_simple_create(mod, name) +#define spl_class_destroy(cls) class_simple_destroy(cls) +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ + class_simple_device_add(cls, devt, device, fmt, ## args) +#define spl_device_destroy(cls, devt) class_simple_device_remove(devt) + +#endif +#endif + +#endif /* _SPL_DEVICE_H */ diff --git a/include/splat-ctl.h b/include/splat-ctl.h index bd7fdb658..7f2c6d94d 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -33,6 +33,7 @@ #define SPLAT_MAJOR 229 /* XXX - Arbitrary */ #define SPLAT_MINORS 1 +#define SPLAT_NAME "splatctl" #define SPLAT_DEV "/dev/splatctl" #define SPLAT_NAME_SIZE 12 diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index a80ae454d..764ae3820 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -35,7 +35,7 @@ #include #include #include -#include +#include typedef int ddi_devid_t; @@ -81,7 +81,7 @@ typedef struct dev_info { kmutex_t di_lock; struct dev_ops *di_ops; struct cdev *di_cdev; - struct class *di_class; + spl_class *di_class; major_t di_major; minor_t di_minor; dev_t di_dev; diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index a1c31e182..19c5db2cd 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -153,7 +153,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, RETURN(DDI_FAILURE); } - di->di_class = class_create(THIS_MODULE, name); + di->di_class = spl_class_create(THIS_MODULE, name); if (IS_ERR(di->di_class)) { rc = PTR_ERR(di->di_class); CERROR("Error creating %s class, %d\n", name, rc); @@ -165,11 +165,11 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, /* Do not append a 0 to devices with minor nums of 0 */ if (di->di_minor == 0) { - class_device_create(di->di_class, NULL, di->di_dev, - NULL, "%s", name); + spl_device_create(di->di_class, NULL, di->di_dev, + NULL, "%s", name); } else { - class_device_create(di->di_class, NULL, di->di_dev, - NULL, "%s%d", name, di->di_minor); + spl_device_create(di->di_class, NULL, di->di_dev, + NULL, "%s%d", name, di->di_minor); } di->di_cdev = cdev; @@ -188,8 +188,8 @@ static void __ddi_remove_minor_node_locked(dev_info_t *di, char *name) { if (di->di_class) { - class_device_destroy(di->di_class, di->di_dev); - class_destroy(di->di_class); + spl_device_destroy(di->di_class, di->di_dev); + spl_class_destroy(di->di_class); di->di_class = NULL; di->di_dev = 0; diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index f29a98dfa..0c8b673d9 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -42,18 +42,7 @@ #include "splat-internal.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -#include -#endif - -#include - - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -static struct class_simple *splat_class; -#else -static struct class *splat_class; -#endif +static spl_class *splat_class; static struct list_head splat_module_list; static spinlock_t splat_module_lock; @@ -594,7 +583,7 @@ static struct file_operations splat_fops = { static struct cdev splat_cdev = { .owner = THIS_MODULE, - .kobj = { .name = "splatctl", }, + .kobj = { .name = SPLAT_NAME, }, }; static int __init @@ -619,7 +608,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(atomic); dev = MKDEV(SPLAT_MAJOR, 0); - if ((rc = register_chrdev_region(dev, SPLAT_MINORS, "splatctl"))) + if ((rc = register_chrdev_region(dev, SPLAT_MINORS, SPLAT_NAME))) goto error; /* Support for registering a character driver */ @@ -632,11 +621,7 @@ splat_init(void) } /* Support for udev make driver info available in sysfs */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) - splat_class = class_simple_create(THIS_MODULE, "splat"); -#else - splat_class = class_create(THIS_MODULE, "splat"); -#endif + splat_class = spl_class_create(THIS_MODULE, "splat"); if (IS_ERR(splat_class)) { rc = PTR_ERR(splat_class); printk(KERN_ERR "splat: Error creating splat class, %d\n", rc); @@ -645,13 +630,8 @@ splat_init(void) goto error; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) - class_simple_device_add(splat_class, MKDEV(SPLAT_MAJOR, 0), - NULL, "splatctl"); -#else - class_device_create(splat_class, NULL, MKDEV(SPLAT_MAJOR, 0), - NULL, "splatctl"); -#endif + spl_device_create(splat_class, NULL, MKDEV(SPLAT_MAJOR, 0), + NULL, SPLAT_NAME); printk(KERN_INFO "splat: Loaded Solaris Porting LAyer " "Tests v%s\n", VERSION); @@ -666,15 +646,8 @@ splat_fini(void) { dev_t dev = MKDEV(SPLAT_MAJOR, 0); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) - class_simple_device_remove(dev); - class_simple_destroy(splat_class); - devfs_remove("splat/splatctl"); - devfs_remove("splat"); -#else - class_device_destroy(splat_class, dev); - class_destroy(splat_class); -#endif + spl_device_destroy(splat_class, dev); + spl_class_destroy(splat_class); cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index af5fc6e57..8a7447685 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -60,7 +60,9 @@ #include #include #include +#include +#include "spl-device.h" #include "splat-ctl.h" #define SPLAT_SUBSYSTEM_INIT(type) \ From 86149aa255dcfb145bb4f2ad66b80dce4d620f34 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 11 Aug 2008 16:11:37 +0000 Subject: [PATCH 0142/1062] Resolve incomplete type when building against 2.6.26 git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@151 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/splat/splat-vnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index 6f9750388..768401143 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -26,6 +26,7 @@ #include "splat-internal.h" #include +#include #define SPLAT_SUBSYSTEM_VNODE 0x0900 #define SPLAT_VNODE_NAME "vnode" From 6a6cafbe8dd1e33530e726ee7d1c3acc340c6c15 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 11 Aug 2008 17:20:11 +0000 Subject: [PATCH 0143/1062] Pull in timespec, list, and type compat changes to support building against a wider range of kernels. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@152 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 92 +++++++++++++++++++++++++++++++------ configure.ac | 3 ++ include/linux/list_compat.h | 27 +++++++++++ include/linux/time_compat.h | 21 +++++++++ include/sys/types.h | 8 ++++ modules/spl/spl-time.c | 9 +++- 6 files changed, 145 insertions(+), 15 deletions(-) create mode 100644 include/linux/list_compat.h create mode 100644 include/linux/time_compat.h diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index cb782f9d4..ada13247b 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -289,6 +289,8 @@ AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], fi ]) + + dnl # dnl # 2.6.x API change dnl # check if uintptr_t typedef is defined @@ -445,17 +447,17 @@ dnl # 2.6.16 API change. dnl # Check if 'fls64()' is available dnl # AC_DEFUN([SPL_AC_FLS64], - [AC_MSG_CHECKING([whether fls64() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - return fls64(0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FLS64, 1, [fls64() is available]) - ],[ - AC_MSG_RESULT(no) - ]) + [AC_MSG_CHECKING([whether fls64() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + return fls64(0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FLS64, 1, [fls64() is available]) + ],[ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -469,7 +471,7 @@ AC_DEFUN([SPL_AC_DEVICE_CREATE], [ [drivers/base/core.c], [AC_DEFINE(HAVE_DEVICE_CREATE, 1, [device_create() is available])], - []) + []) ]) dnl # @@ -483,5 +485,69 @@ AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], [ [drivers/base/class.c], [AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1, [class_device_create() is available])], - []) + []) ]) + +dnl # +dnl # 2.6.26 API change, set_normalized_timespec() is exported. +dnl # +AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], [ + SPL_CHECK_SYMBOL_EXPORT( + [class_device_create], + [drivers/base/class.c], + [AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1, + [class_device_create() is available])], + []) +]) + +dnl # +dnl # 2.6.26 API change, set_normalized_timespec() is exported. +dnl # +AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT], [ + SPL_CHECK_SYMBOL_EXPORT( + [set_normalized_timespec], + [kernel/time.c], + [AC_DEFINE(HAVE_SET_NORMALIZED_TIMESPEC_EXPORT, 1, + [set_normalized_timespec() is available as export])], + []) +]) + +dnl # +dnl # 2.6.16 API change, set_normalize_timespec() moved to time.c +dnl # previously it was available in time.h as an inline. +dnl # +AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE], + [AC_MSG_CHECKING([whether set_normalized_timespec() is an inline]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + void set_normalized_timespec(struct timespec *ts, + time_t sec, long nsec) { } + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SET_NORMALIZED_TIMESPEC_INLINE, 1, + [set_normalized_timespec() is available as inline]) + ]) +]) + +dnl # +dnl # 2.6.18 API change, +dnl # timespec_sub() inline function available in linux/time.h +dnl # +AC_DEFUN([SPL_AC_TIMESPEC_SUB], + [AC_MSG_CHECKING([whether timespec_sub() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct timespec a, b, c = { 0 }; + c = timespec_sub(a, b); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_TIMESPEC_SUB, 1, [timespec_sub() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + diff --git a/configure.ac b/configure.ac index 1e8c4c0f5..f93208115 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,9 @@ SPL_AC_CTL_UNNUMBERED SPL_AC_FLS64 SPL_AC_DEVICE_CREATE SPL_AC_CLASS_DEVICE_CREATE +SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT +SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE +SPL_AC_TIMESPEC_SUB TOPDIR=`/bin/pwd` diff --git a/include/linux/list_compat.h b/include/linux/list_compat.h new file mode 100644 index 000000000..e5daa0410 --- /dev/null +++ b/include/linux/list_compat.h @@ -0,0 +1,27 @@ +#ifndef _SPL_LIST_COMPAT_H +#define _SPL_LIST_COMPAT_H + +#include + +#ifndef list_for_each_entry_safe_reverse + +/** + * list_for_each_entry_safe_reverse + * @pos: the type * to use as a loop cursor. + * @n: another type * to use as temporary storage + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + * + * Iterate backwards over list of given type, safe against removal + * of list entry. + */ +#define list_for_each_entry_safe_reverse(pos, n, head, member) \ + for (pos = list_entry((head)->prev, typeof(*pos), member), \ + n = list_entry(pos->member.prev, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.prev, typeof(*n), member)) + +#endif /* list_for_each_entry_safe_reverse */ + +#endif /* SPL_LIST_COMPAT_H */ + diff --git a/include/linux/time_compat.h b/include/linux/time_compat.h new file mode 100644 index 000000000..1b4727dcd --- /dev/null +++ b/include/linux/time_compat.h @@ -0,0 +1,21 @@ +#ifndef _SPL_TIME_COMPAT_H +#define _SPL_TIME_COMPAT_H + +#include + +/* timespec_sub() API changes + * 2.6.18 - 2.6.x: Inline function provided by linux/time.h + */ +#ifndef HAVE_TIMESPEC_SUB +static inline struct timespec +timespec_sub(struct timespec lhs, struct timespec rhs) +{ + struct timespec ts_delta; + set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, + lhs.tv_nsec - rhs.tv_nsec); + return ts_delta; +} +#endif /* HAVE_TIMESPEC_SUB */ + +#endif /* _SPL_TIME_COMPAT_H */ + diff --git a/include/sys/types.h b/include/sys/types.h index eba23eae0..1dec7b8d0 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -13,6 +13,14 @@ extern "C" { typedef unsigned long uintptr_t; #endif +#ifndef ULLONG_MAX +#define ULLONG_MAX (~0ULL) +#endif + +#ifndef LLONG_MAX +#define LLONG_MAX ((long long)(~0ULL>>1)) +#endif + typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; typedef unsigned long intptr_t; typedef unsigned long ulong_t; diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index b2cb12186..c8cd048d5 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -67,9 +67,13 @@ __gethrtime(void) { } EXPORT_SYMBOL(__gethrtime); -/* Not exported from the kernel, but we need it for timespec_sub. Be very - * careful here we are using the kernel prototype, so that must not change. +/* set_normalized_timespec() API changes + * 2.6.0 - 2.6.15: Inline function provided by linux/time.h + * 2.6.16 - 2.6.25: Function prototypedefined but not exported + * 2.6.26 - 2.6.x: Function defined and exported */ +#if !defined(HAVE_SET_NORMALIZED_TIMESPEC_INLINE) && \ + !defined(HAVE_SET_NORMALIZED_TIMESPEC_EXPORT) void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) { @@ -85,3 +89,4 @@ set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) ts->tv_nsec = nsec; } EXPORT_SYMBOL(set_normalized_timespec); +#endif From 86de8532a9106c28167eac07f1fd32758e5555dd Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 11 Aug 2008 17:56:40 +0000 Subject: [PATCH 0144/1062] More 2.6.26 compat changes git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@153 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 35 ++++++++++++++++--- configure.ac | 1 + .../{bitops_compat.c => bitops_compat.h} | 0 include/linux/file_compat.h | 9 +++++ modules/splat/splat-internal.h | 6 ++++ modules/splat/splat-vnode.c | 1 - 6 files changed, 46 insertions(+), 6 deletions(-) rename include/linux/{bitops_compat.c => bitops_compat.h} (100%) create mode 100644 include/linux/file_compat.h diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index ada13247b..be0fa2479 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -289,7 +289,25 @@ AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], fi ]) - +dnl # +dnl # SPL_CHECK_HEADER +dnl # check whether header exists and define HAVE_$2_HEADER +dnl # +AC_DEFUN([SPL_CHECK_HEADER], + [AC_MSG_CHECKING([whether header $1 exists]) + SPL_LINUX_TRY_COMPILE([ + #include <$1> + ],[ + return 0; + ],[ + AC_DEFINE(HAVE_$2_HEADER, 1, [$1 exists]) + AC_MSG_RESULT(yes) + $3 + ],[ + AC_MSG_RESULT(no) + $4 + ]) +]) dnl # dnl # 2.6.x API change @@ -516,8 +534,8 @@ dnl # dnl # 2.6.16 API change, set_normalize_timespec() moved to time.c dnl # previously it was available in time.h as an inline. dnl # -AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE], - [AC_MSG_CHECKING([whether set_normalized_timespec() is an inline]) +AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE], [ + AC_MSG_CHECKING([whether set_normalized_timespec() is an inline]) SPL_LINUX_TRY_COMPILE([ #include ],[ @@ -536,8 +554,8 @@ dnl # dnl # 2.6.18 API change, dnl # timespec_sub() inline function available in linux/time.h dnl # -AC_DEFUN([SPL_AC_TIMESPEC_SUB], - [AC_MSG_CHECKING([whether timespec_sub() is available]) +AC_DEFUN([SPL_AC_TIMESPEC_SUB], [ + AC_MSG_CHECKING([whether timespec_sub() is available]) SPL_LINUX_TRY_COMPILE([ #include ],[ @@ -551,3 +569,10 @@ AC_DEFUN([SPL_AC_TIMESPEC_SUB], ]) ]) +dnl # +dnl # 2.6,26 API change +dnl # Definition of struct fdtable relocated to linux/fdtable.h +dnl # +AC_DEFUN([SPL_AC_FDTABLE_HEADER], [ + SPL_CHECK_HEADER([linux/fdtable.h], [FDTABLE], [], []) +]) diff --git a/configure.ac b/configure.ac index f93208115..58d469e1b 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,7 @@ SPL_AC_CLASS_DEVICE_CREATE SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB +SPL_AC_FDTABLE_HEADER TOPDIR=`/bin/pwd` diff --git a/include/linux/bitops_compat.c b/include/linux/bitops_compat.h similarity index 100% rename from include/linux/bitops_compat.c rename to include/linux/bitops_compat.h diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h new file mode 100644 index 000000000..c63be0348 --- /dev/null +++ b/include/linux/file_compat.h @@ -0,0 +1,9 @@ +#ifndef _SPL_FILE_COMPAT_H +#define _SPL_FILE_COMPAT_H + +#ifdef HAVE_FDTABLE_HEADER +#include +#endif + +#endif /* SPL_FILE_COMPAT_H */ + diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 8a7447685..a9c8e434f 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include @@ -62,6 +63,11 @@ #include #include +#include +#include +#include +#include + #include "spl-device.h" #include "splat-ctl.h" diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index 768401143..6f9750388 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -26,7 +26,6 @@ #include "splat-internal.h" #include -#include #define SPLAT_SUBSYSTEM_VNODE 0x0900 #define SPLAT_VNODE_NAME "vnode" From 322640b7b5a5336e4681d77778736339164a4501 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 11 Aug 2008 19:10:14 +0000 Subject: [PATCH 0145/1062] Include linux/uaccess.h compat changes. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@154 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 10 +++++++++- configure.ac | 1 + include/linux/uaccess_compat.h | 11 +++++++++++ include/sys/proc.h | 1 - include/sys/types.h | 6 ++++++ include/sys/vnode.h | 1 - modules/splat/splat-internal.h | 5 ----- 7 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 include/linux/uaccess_compat.h diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index be0fa2479..84827cf9c 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -570,9 +570,17 @@ AC_DEFUN([SPL_AC_TIMESPEC_SUB], [ ]) dnl # -dnl # 2.6,26 API change +dnl # 2.6.26 API change dnl # Definition of struct fdtable relocated to linux/fdtable.h dnl # AC_DEFUN([SPL_AC_FDTABLE_HEADER], [ SPL_CHECK_HEADER([linux/fdtable.h], [FDTABLE], [], []) ]) + +dnl # +dnl # 2.6.18 API change +dnl # Added linux/uaccess.h +dnl # +AC_DEFUN([SPL_AC_UACCESS_HEADER], [ + SPL_CHECK_HEADER([linux/uaccess.h], [UACCESS], [], []) +]) diff --git a/configure.ac b/configure.ac index 58d469e1b..3a0823752 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB SPL_AC_FDTABLE_HEADER +SPL_AC_UACCESS_HEADER TOPDIR=`/bin/pwd` diff --git a/include/linux/uaccess_compat.h b/include/linux/uaccess_compat.h new file mode 100644 index 000000000..a1bfa52a5 --- /dev/null +++ b/include/linux/uaccess_compat.h @@ -0,0 +1,11 @@ +#ifndef _SPL_UACCESS_COMPAT_H +#define _SPL_UACCESS_COMPAT_H + +#ifdef HAVE_UACCESS_HEADER +#include +#else +#include +#endif + +#endif /* _SPL_UACCESS_COMPAT_H */ + diff --git a/include/sys/proc.h b/include/sys/proc.h index c6e4a13cf..ab2425ce8 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/include/sys/types.h b/include/sys/types.h index 1dec7b8d0..6336bb6de 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -9,6 +9,12 @@ extern "C" { #include #include "spl_config.h" +#include +#include +#include +#include +#include + #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; #endif diff --git a/include/sys/vnode.h b/include/sys/vnode.h index eca33f4b1..7ff14692c 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -34,7 +34,6 @@ extern "C" { #include #include #include -#include #include #include #include diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index a9c8e434f..bda56f1bc 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -63,11 +63,6 @@ #include #include -#include -#include -#include -#include - #include "spl-device.h" #include "splat-ctl.h" From 3d061e9d1092364be132fc3f6c478add94b4e482 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 11 Aug 2008 22:13:47 +0000 Subject: [PATCH 0146/1062] Commit bulk of remaining 2.6.9 and 2.6.26 compat changes. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@155 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 129 +++++++++++++++++++++++++++++------- configure.ac | 5 ++ include/sys/kmem.h | 39 +++++++---- include/sys/taskq.h | 9 --- modules/spl/spl-debug.c | 3 +- modules/spl/spl-generic.c | 6 +- modules/spl/spl-kmem.c | 2 +- modules/spl/spl-taskq.c | 53 +++++++++------ modules/spl/spl-thread.c | 2 +- modules/spl/spl-time.c | 36 +++++----- modules/spl/spl-vnode.c | 14 +++- modules/splat/splat-vnode.c | 17 ++++- 12 files changed, 222 insertions(+), 93 deletions(-) diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index 84827cf9c..e12a2e3eb 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -310,7 +310,7 @@ AC_DEFUN([SPL_CHECK_HEADER], ]) dnl # -dnl # 2.6.x API change +dnl # 2.6.24 API change, dnl # check if uintptr_t typedef is defined dnl # AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], @@ -329,7 +329,7 @@ AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], ]) dnl # -dnl # 2.6.19 API change +dnl # 2.6.19 API change, dnl # panic_notifier_list use atomic_notifier operations dnl # @@ -350,7 +350,7 @@ AC_DEFUN([SPL_AC_ATOMIC_PANIC_NOTIFIER], ]) dnl # -dnl # 2.6.20 API change +dnl # 2.6.20 API change, dnl # INIT_WORK use 2 args and not store data inside dnl # AC_DEFUN([SPL_AC_3ARGS_INIT_WORK], @@ -371,7 +371,7 @@ AC_DEFUN([SPL_AC_3ARGS_INIT_WORK], ]) dnl # -dnl # 2.6.21 api change. +dnl # 2.6.21 API change, dnl # 'register_sysctl_table' use only one argument instead of two dnl # AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], @@ -390,7 +390,7 @@ AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], ]) dnl # -dnl # 2.6.x API change +dnl # 2.6.23 API change dnl # Old set_shrinker API replaced with register_shrinker dnl # AC_DEFUN([SPL_AC_SET_SHRINKER], [ @@ -409,7 +409,7 @@ AC_DEFUN([SPL_AC_SET_SHRINKER], [ ]) dnl # -dnl # 2.6.x API change +dnl # 2.6.25 API change, dnl # struct path entry added to struct nameidata dnl # AC_DEFUN([SPL_AC_PATH_IN_NAMEIDATA], @@ -440,7 +440,7 @@ AC_DEFUN([SPL_AC_TASK_CURR], [ ]) dnl # -dnl # 2.6.x API change +dnl # 2.6.19 API change, dnl # Use CTL_UNNUMBERED when binary sysctl is not required dnl # AC_DEFUN([SPL_AC_CTL_UNNUMBERED], @@ -506,18 +506,6 @@ AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], [ []) ]) -dnl # -dnl # 2.6.26 API change, set_normalized_timespec() is exported. -dnl # -AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], [ - SPL_CHECK_SYMBOL_EXPORT( - [class_device_create], - [drivers/base/class.c], - [AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1, - [class_device_create() is available])], - []) -]) - dnl # dnl # 2.6.26 API change, set_normalized_timespec() is exported. dnl # @@ -540,7 +528,7 @@ AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE], [ #include ],[ void set_normalized_timespec(struct timespec *ts, - time_t sec, long nsec) { } + time_t sec, long nsec); ],[ AC_MSG_RESULT(no) ],[ @@ -570,17 +558,110 @@ AC_DEFUN([SPL_AC_TIMESPEC_SUB], [ ]) dnl # -dnl # 2.6.26 API change -dnl # Definition of struct fdtable relocated to linux/fdtable.h +dnl # 2.6.19 API change, +dnl # check if init_utsname() is available in linux/utsname.h +dnl # +AC_DEFUN([SPL_AC_INIT_UTSNAME], [ + AC_MSG_CHECKING([whether init_utsname() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct new_utsname *a = init_utsname(); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INIT_UTSNAME, 1, [init_utsname() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.26 API change, +dnl # definition of struct fdtable relocated to linux/fdtable.h dnl # AC_DEFUN([SPL_AC_FDTABLE_HEADER], [ SPL_CHECK_HEADER([linux/fdtable.h], [FDTABLE], [], []) ]) dnl # -dnl # 2.6.18 API change -dnl # Added linux/uaccess.h +dnl # 2.6.14 API change, +dnl # check whether 'files_fdtable()' exists +dnl # +AC_DEFUN([SPL_AC_FILES_FDTABLE], [ + AC_MSG_CHECKING([whether files_fdtable() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + #ifdef HAVE_FDTABLE_HEADER + #include + #endif + ],[ + struct files_struct *files = current->files; + struct fdtable *fdt = files_fdtable(files); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FILES_FDTABLE, 1, [files_fdtable() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.18 API change, +dnl # added linux/uaccess.h dnl # AC_DEFUN([SPL_AC_UACCESS_HEADER], [ SPL_CHECK_HEADER([linux/uaccess.h], [UACCESS], [], []) ]) + +dnl # +dnl # 2.6.12 API change, +dnl # check whether 'kmalloc_node()' is available. +dnl # +AC_DEFUN([SPL_AC_KMALLOC_NODE], [ + AC_MSG_CHECKING([whether kmalloc_node() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + void *a = kmalloc_node(1, GFP_KERNEL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMALLOC_NODE, 1, [kmalloc_node() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.9 API change, +dnl # check whether 'monotonic_clock()' is available it may +dnl # be available for some archs but not others. +dnl # +AC_DEFUN([SPL_AC_MONOTONIC_CLOCK], [ + SPL_CHECK_SYMBOL_EXPORT( + [monotonic_clock], + [], + [AC_DEFINE(HAVE_MONOTONIC_CLOCK, 1, + [monotonic_clock() is available])], + []) +]) + +dnl # +dnl # 2.6.16 API change, +dnl # check whether 'struct inode' has i_mutex +dnl # +AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ + AC_MSG_CHECKING([whether struct inode has i_mutex]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + struct inode i; + mutex_init(&i.i_mutex); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_I_MUTEX, 1, [struct inode has i_mutex]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure.ac b/configure.ac index 3a0823752..74b043b32 100644 --- a/configure.ac +++ b/configure.ac @@ -57,8 +57,13 @@ SPL_AC_CLASS_DEVICE_CREATE SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB +SPL_AC_INIT_UTSNAME SPL_AC_FDTABLE_HEADER +SPL_AC_FILES_FDTABLE SPL_AC_UACCESS_HEADER +SPL_AC_KMALLOC_NODE +SPL_AC_MONOTONIC_CLOCK +SPL_AC_INODE_I_MUTEX TOPDIR=`/bin/pwd` diff --git a/include/sys/kmem.h b/include/sys/kmem.h index dd1514fb9..1ca2c261a 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -54,6 +54,13 @@ extern "C" { #define KM_VMFLAGS GFP_LEVEL_MASK #define KM_FLAGS __GFP_BITS_MASK +/* + * Used internally, the kernel does not need to support this flag + */ +#ifndef __GFP_ZERO +#define __GFP_ZERO 0x8000 +#endif + #ifdef DEBUG_KMEM extern atomic64_t kmem_alloc_used; extern unsigned long kmem_alloc_max; @@ -113,7 +120,7 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) return NULL; } -#define __kmem_alloc(size, flags, allocator) \ +#define __kmem_alloc(size, flags, allocator, args...) \ ({ void *_ptr_ = NULL; \ kmem_debug_t *_dptr_; \ unsigned long _flags_; \ @@ -133,7 +140,7 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) atomic64_read(&kmem_alloc_used), \ kmem_alloc_max); \ \ - _ptr_ = (void *)allocator((size), (flags)); \ + _ptr_ = (void *)allocator((size), (flags), ## args); \ if (_ptr_ == NULL) { \ kfree(_dptr_); \ __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ @@ -273,7 +280,7 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) #else /* DEBUG_KMEM_TRACKING */ -#define __kmem_alloc(size, flags, allocator) \ +#define __kmem_alloc(size, flags, allocator, args...) \ ({ void *_ptr_ = NULL; \ \ /* Marked unlikely because we should never be doing this, */ \ @@ -285,7 +292,7 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) atomic64_read(&kmem_alloc_used), \ kmem_alloc_max); \ \ - _ptr_ = (void *)allocator((size), (flags)); \ + _ptr_ = (void *)allocator((size), (flags), ## args); \ if (_ptr_ == NULL) { \ __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ "kmem_alloc(%d, 0x%x) failed (%ld/" \ @@ -370,6 +377,14 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) #define kmem_alloc(size, flags) __kmem_alloc((size), (flags), kmalloc) #define kmem_zalloc(size, flags) __kmem_alloc((size), (flags), kzalloc) +#ifdef HAVE_KMALLOC_NODE +#define kmem_alloc_node(size, flags, node) \ + __kmem_alloc((size), (flags), kmalloc_node, node) +#else +#define kmem_alloc_node(size, flags, node) \ + __kmem_alloc((size), (flags), kmalloc) +#endif + #define vmem_alloc(size, flags) __vmem_alloc((size), (flags)) #define vmem_zalloc(size, flags) __vmem_alloc((size), ((flags) | __GFP_ZERO)) @@ -379,6 +394,14 @@ __kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) #define kmem_zalloc(size, flags) kzalloc((size), (flags)) #define kmem_free(ptr, size) kfree(ptr) +#ifdef HAVE_KMALLOC_NODE +#define kmem_alloc_node(size, flags, node) \ + kmalloc_node((size), (flags), (node)) +#else +#define kmem_alloc_node(size, flags, node) \ + kmalloc((size), (flags)) +#endif + #define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ __GFP_HIGHMEM), PAGE_KERNEL) #define vmem_zalloc(size, flags) \ @@ -555,14 +578,6 @@ void spl_kmem_fini(void); #define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ ((ptr) < (void *)VMALLOC_END)) -#ifdef HAVE_KMEM_CACHE_CREATE_DTOR -#define __kmem_cache_create(name, size, align, flags, ctor, dtor) \ - kmem_cache_create(name, size, align, flags, ctor, dtor) -#else -#define __kmem_cache_create(name, size, align, flags, ctor, dtor) \ - kmem_cache_create(name, size, align, flags, ctor) -#endif /* HAVE_KMEM_CACHE_CREATE_DTOR */ - #ifdef __cplusplus } #endif diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 11b1cbbfb..fbcc5556d 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -37,7 +37,6 @@ extern "C" { #include #include #include -#include #define TASKQ_NAMELEN 31 @@ -60,14 +59,6 @@ typedef void (task_func_t)(void *); #define TQ_NEW 0x04000000 #define TQ_ACTIVE 0x80000000 -typedef struct task { - spinlock_t t_lock; - struct list_head t_list; - taskqid_t t_id; - task_func_t *t_func; - void *t_arg; -} task_t; - typedef struct taskq { spinlock_t tq_lock; /* protects taskq_t */ struct task_struct **tq_threads; /* thread pointers */ diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index 1fd38e30a..99f61d74f 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -375,7 +376,7 @@ spl_debug_dumplog_thread(void *arg) spl_debug_dumplog_internal(dp); atomic_set(&dp->dp_done, 1); wake_up(&dp->dp_waitq); - do_exit(0); + complete_and_exit(NULL, 0); return 0; /* Unreachable */ } diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 7a073ee52..7a818add8 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -59,7 +59,7 @@ int highbit(unsigned long i) { register int h = 1; - ENTRY; + ENTRY; if (i == 0) RETURN(0); @@ -97,7 +97,11 @@ EXPORT_SYMBOL(ddi_strtoul); struct new_utsname *__utsname(void) { +#ifdef HAVE_INIT_UTSNAME return init_utsname(); +#else + return &system_utsname; +#endif } EXPORT_SYMBOL(__utsname); diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index fc238a397..208f11b8e 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -370,7 +370,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) sizeof(void *) * skc->skc_mag_size; ENTRY; - skm = kmalloc_node(size, GFP_KERNEL, node); + skm = kmem_alloc_node(size, GFP_KERNEL, node); if (skm) { skm->skm_magic = SKM_MAGIC; skm->skm_avail = 0; diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 9c820b7c1..21d63c875 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -25,6 +25,7 @@ */ #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -32,39 +33,47 @@ #define DEBUG_SUBSYSTEM S_TASKQ +typedef struct spl_task { + spinlock_t t_lock; + struct list_head t_list; + taskqid_t t_id; + task_func_t *t_func; + void *t_arg; +} spl_task_t; + /* NOTE: Must be called with tq->tq_lock held, returns a list_t which * is not attached to the free, work, or pending taskq lists. */ -static task_t * +static spl_task_t * task_alloc(taskq_t *tq, uint_t flags) { - task_t *t; + spl_task_t *t; int count = 0; ENTRY; ASSERT(tq); ASSERT(flags & (TQ_SLEEP | TQ_NOSLEEP)); /* One set */ ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ - ASSERT(spin_is_locked(&tq->tq_lock)); + ASSERT(spin_is_locked(&tq->tq_lock)); retry: - /* Aquire task_t's from free list if available */ + /* Aquire spl_task_t's from free list if available */ if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { - t = list_entry(tq->tq_free_list.next, task_t, t_list); - list_del_init(&t->t_list); - RETURN(t); + t = list_entry(tq->tq_free_list.next, spl_task_t, t_list); + list_del_init(&t->t_list); + RETURN(t); } /* Free list is empty and memory allocs are prohibited */ if (flags & TQ_NOALLOC) RETURN(NULL); - /* Hit maximum task_t pool size */ + /* Hit maximum spl_task_t pool size */ if (tq->tq_nalloc >= tq->tq_maxalloc) { if (flags & TQ_NOSLEEP) RETURN(NULL); /* Sleep periodically polling the free list for an available - * task_t. If a full second passes and we have not found + * spl_task_t. If a full second passes and we have not found * one gives up and return a NULL to the caller. */ if (flags & TQ_SLEEP) { spin_unlock_irq(&tq->tq_lock); @@ -81,7 +90,7 @@ retry: } spin_unlock_irq(&tq->tq_lock); - t = kmem_alloc(sizeof(task_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); + t = kmem_alloc(sizeof(spl_task_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); spin_lock_irq(&tq->tq_lock); if (t) { @@ -96,11 +105,11 @@ retry: RETURN(t); } -/* NOTE: Must be called with tq->tq_lock held, expectes the task_t +/* NOTE: Must be called with tq->tq_lock held, expectes the spl_task_t * to already be removed from the free, work, or pending taskq lists. */ static void -task_free(taskq_t *tq, task_t *t) +task_free(taskq_t *tq, spl_task_t *t) { ENTRY; @@ -109,17 +118,17 @@ task_free(taskq_t *tq, task_t *t) ASSERT(spin_is_locked(&tq->tq_lock)); ASSERT(list_empty(&t->t_list)); - kmem_free(t, sizeof(task_t)); + kmem_free(t, sizeof(spl_task_t)); tq->tq_nalloc--; EXIT; } /* NOTE: Must be called with tq->tq_lock held, either destroyes the - * task_t if too many exist or moves it to the free list for later use. + * spl_task_t if too many exist or moves it to the free list for later use. */ static void -task_done(taskq_t *tq, task_t *t) +task_done(taskq_t *tq, spl_task_t *t) { ENTRY; ASSERT(tq); @@ -207,7 +216,7 @@ EXPORT_SYMBOL(__taskq_member); taskqid_t __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { - task_t *t; + spl_task_t *t; taskqid_t rc = 0; ENTRY; @@ -254,7 +263,7 @@ static taskqid_t taskq_lowest_id(taskq_t *tq) { taskqid_t lowest_id = ~0; - task_t *t; + spl_task_t *t; ENTRY; ASSERT(tq); @@ -278,7 +287,7 @@ taskq_thread(void *args) sigset_t blocked; taskqid_t id; taskq_t *tq = args; - task_t *t; + spl_task_t *t; ENTRY; ASSERT(tq); @@ -306,7 +315,7 @@ taskq_thread(void *args) remove_wait_queue(&tq->tq_work_waitq, &wait); if (!list_empty(&tq->tq_pend_list)) { - t = list_entry(tq->tq_pend_list.next, task_t, t_list); + t = list_entry(tq->tq_pend_list.next, spl_task_t, t_list); list_del_init(&t->t_list); list_add_tail(&t->t_list, &tq->tq_work_list); tq->tq_nactive++; @@ -418,7 +427,7 @@ EXPORT_SYMBOL(__taskq_create); void __taskq_destroy(taskq_t *tq) { - task_t *t; + spl_task_t *t; int i, nthreads; ENTRY; @@ -438,7 +447,7 @@ __taskq_destroy(taskq_t *tq) spin_lock_irq(&tq->tq_lock); while (!list_empty(&tq->tq_free_list)) { - t = list_entry(tq->tq_free_list.next, task_t, t_list); + t = list_entry(tq->tq_free_list.next, spl_task_t, t_list); list_del_init(&t->t_list); task_free(tq, t); } @@ -450,7 +459,7 @@ __taskq_destroy(taskq_t *tq) ASSERT(list_empty(&tq->tq_pend_list)); spin_unlock_irq(&tq->tq_lock); - kmem_free(tq->tq_threads, nthreads * sizeof(task_t *)); + kmem_free(tq->tq_threads, nthreads * sizeof(spl_task_t *)); kmem_free(tq, sizeof(taskq_t)); EXIT; diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index 7a9ad4cb3..62d2fa329 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -73,7 +73,7 @@ __thread_exit(void) { ENTRY; EXIT; - do_exit(0); + complete_and_exit(NULL, 0); /* Unreachable */ } EXPORT_SYMBOL(__thread_exit); diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index c8cd048d5..93945ddbc 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -27,6 +27,10 @@ #include #include +#ifdef HAVE_MONOTONIC_CLOCK +extern unsigned long long monotonic_clock(void); +#endif + #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM #endif @@ -36,27 +40,26 @@ void __gethrestime(timestruc_t *ts) { - getnstimeofday((struct timespec *)ts); + struct timeval tv; + + do_gettimeofday(&tv); + ts->tv_sec = tv.tv_sec; + ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC; } EXPORT_SYMBOL(__gethrestime); -int -__clock_gettime(clock_type_t type, timespec_t *tp) -{ - /* Only support CLOCK_REALTIME+__CLOCK_REALTIME0 for now */ - ASSERT((type == CLOCK_REALTIME) || (type == __CLOCK_REALTIME0)); - - getnstimeofday(tp); - return 0; -} -EXPORT_SYMBOL(__clock_gettime); - -/* This function may not be as fast as using monotonic_clock() but it - * should be much more portable, if performance becomes as issue we can - * look at using monotonic_clock() for x86_64 and x86 arches. +/* Use monotonic_clock() by default. It's faster and is available on older + * kernels, but few architectures have them, so we must fallback to + * do_posix_clock_monotonic_gettime(). */ hrtime_t __gethrtime(void) { +#ifdef HAVE_MONOTONIC_CLOCK + unsigned long long res = monotonic_clock(); + + /* Deal with signed/unsigned mismatch */ + return (hrtime_t)(res & ~(1ULL << (BITS_PER_LONG - 1))); +#else timespec_t tv; hrtime_t rc; @@ -64,12 +67,13 @@ __gethrtime(void) { rc = (NSEC_PER_SEC * (hrtime_t)tv.tv_sec) + (hrtime_t)tv.tv_nsec; return rc; +#endif } EXPORT_SYMBOL(__gethrtime); /* set_normalized_timespec() API changes * 2.6.0 - 2.6.15: Inline function provided by linux/time.h - * 2.6.16 - 2.6.25: Function prototypedefined but not exported + * 2.6.16 - 2.6.25: Function prototype defined but not exported * 2.6.26 - 2.6.x: Function defined and exported */ #if !defined(HAVE_SET_NORMALIZED_TIMESPEC_INLINE) && \ diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index bf9b3e97c..17336a1a2 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -261,10 +261,10 @@ vn_remove(const char *path, uio_seg_t seg, int flags) struct nameidata nd; struct inode *inode = NULL; int rc = 0; - ENTRY; + ENTRY; - ASSERT(seg == UIO_SYSSPACE); - ASSERT(flags == RMFILE); + ASSERT(seg == UIO_SYSSPACE); + ASSERT(flags == RMFILE); rc = path_lookup(path, LOOKUP_PARENT, &nd); if (rc) @@ -274,7 +274,11 @@ vn_remove(const char *path, uio_seg_t seg, int flags) if (nd.last_type != LAST_NORM) GOTO(exit1, rc); +#ifdef HAVE_INODE_I_MUTEX mutex_lock_nested(&nd.nd_dentry->d_inode->i_mutex, I_MUTEX_PARENT); +#else + down(&nd.nd_dentry->d_inode->i_sem); +#endif dentry = vn_lookup_hash(&nd); rc = PTR_ERR(dentry); if (!IS_ERR(dentry)) { @@ -289,7 +293,11 @@ vn_remove(const char *path, uio_seg_t seg, int flags) exit2: dput(dentry); } +#ifdef HAVE_INODE_I_MUTEX mutex_unlock(&nd.nd_dentry->d_inode->i_mutex); +#else + up(&nd.nd_dentry->d_inode->i_sem); +#endif if (inode) iput(inode); /* truncate the inode here */ exit1: diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index 6f9750388..c85b6165a 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -357,6 +357,7 @@ fd_uninstall(int fd) struct fdtable *fdt; spin_lock(&files->file_lock); +#ifdef HAVE_FILES_FDTABLE fdt = files_fdtable(files); if (fd >= fdt->max_fds) @@ -368,10 +369,20 @@ fd_uninstall(int fd) rcu_assign_pointer(fdt->fd[fd], NULL); FD_CLR(fd, fdt->close_on_exec); +#else + if (fd >= files->max_fds) + goto out_unlock; - /* Dropping the lock here exposes a minor race but it allows me - * to use the existing kernel interfaces for this, and for a test - * case I think that's reasonable. */ + fp = files->fd[fd]; + if (!fp) + goto out_unlock; + + files->fd[fd] = NULL; + FD_CLR(fd, files->close_on_exec); +#endif + /* Dropping the lock here exposes a minor race but it allows me + * to use the existing kernel interfaces for this, and for a test + * case I think that's reasonable. */ spin_unlock(&files->file_lock); put_unused_fd(fd); return 0; From b61a6e8bdc5ca52a09ff02a6ce2e92742725f8cc Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 11 Aug 2008 22:42:04 +0000 Subject: [PATCH 0147/1062] Pull in initial 32-bit support patches. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@156 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 18 ++++++++++++++++ configure.ac | 1 + include/sys/atomic.h | 26 ++++++++++++++++++++++- include/sys/div64.h | 44 +++++++++++++++++++++++++++++++++++++++ modules/spl/spl-generic.c | 24 +++++++++++++++++++++ 5 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 include/sys/div64.h diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index e12a2e3eb..33465b6bb 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -665,3 +665,21 @@ AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.14 API change, +dnl # check whether 'div64_64()' is available +dnl # +AC_DEFUN([SPL_AC_DIV64_64], [ + AC_MSG_CHECKING([whether div64_64() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + uint64_t i = div64_64(1ULL, 1ULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DIV64_64, 1, [div64_64() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure.ac b/configure.ac index 74b043b32..f32db79da 100644 --- a/configure.ac +++ b/configure.ac @@ -64,6 +64,7 @@ SPL_AC_UACCESS_HEADER SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX +SPL_AC_DIV64_64 TOPDIR=`/bin/pwd` diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 7bb915611..cd0eb3b0a 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -33,6 +33,7 @@ extern "C" { #include #include +#include /* XXX: Serialize everything through global locks. This is * going to be bad for performance, but for now it's the easiest @@ -133,7 +134,23 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, return rc; } -#if defined(__x86_64__) +static __inline__ uint32_t +atomic_cas_32(volatile uint32_t *target, uint32_t cmp, + uint32_t newval) +{ + uint32_t rc; + + spin_lock(&atomic32_lock); + rc = *target; + if (*target == cmp) + *target = newval; + + spin_unlock(&atomic32_lock); + + return rc; +} + +#ifdef _LP64 /* XXX: Implement atomic_cas_ptr() in terms of uint64'ts. This * is of course only safe and correct for 64 bit arches... but * for now I'm OK with that. @@ -144,6 +161,13 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval) return (void *)atomic_cas_64((volatile uint64_t *)target, (uint64_t)cmp, (uint64_t)newval); } +#else +static __inline__ void * +atomic_cas_ptr(volatile void *target, void *cmp, void *newval) +{ + return (void *)atomic_cas_32((volatile uint32_t *)target, + (uint32_t)cmp, (uint32_t)newval); +} #endif #ifdef __cplusplus diff --git a/include/sys/div64.h b/include/sys/div64.h new file mode 100644 index 000000000..cb62cd3c5 --- /dev/null +++ b/include/sys/div64.h @@ -0,0 +1,44 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Sun Microsystems, Inc. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _SPL_DIV64_H +#define _SPL_DIV64_H + +#include + +#ifndef HAVE_DIV64_64 +#if BITS_PER_LONG == 32 + +extern uint64_t spl_div64_64(uint64_t dividend, uint64_t divisor); +#define div64_64(a,b) spl_div64_64(a,b) + +#else /* BITS_PER_LONG == 32 */ + +static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) +{ + return dividend / divisor; +} + +#endif /* BITS_PER_LONG == 32 */ +#endif /* HAVE_DIV64_64 */ + +#define roundup64(x, y) (div64_64((x) + ((y) - 1), (y)) * (y)) + +#endif /* _SPL_DIV64_H */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 7a818add8..afaefb6b4 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -87,6 +87,30 @@ highbit(unsigned long i) } EXPORT_SYMBOL(highbit); +/* + * Implementation of div64_64(), for kernels that don't have it. + * + * Taken from a 2.6.24 kernel. + */ +uint64_t spl_div64_64(uint64_t dividend, uint64_t divisor) +{ + uint32_t high, d; + + high = divisor >> 32; + if (high) { + unsigned int shift = fls(high); + + d = divisor >> shift; + dividend >>= shift; + } else + d = divisor; + + do_div(dividend, d); + + return dividend; +} +EXPORT_SYMBOL(spl_div64_64); + int ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) { From 25557fd8842deca017f8da05da22e1352389f736 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 11 Aug 2008 23:47:44 +0000 Subject: [PATCH 0148/1062] Sigh more compat fixes, this is almost right for 2.6.9 - 2.6.26 kernels. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@157 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 7 ++++--- include/spl-device.h | 20 +++++++++++++------- include/sys/sunddi.h | 1 + modules/spl/spl-module.c | 12 +++++++----- modules/splat/splat-ctl.c | 8 +++++--- modules/splat/splat-vnode.c | 3 ++- 6 files changed, 32 insertions(+), 19 deletions(-) diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index 33465b6bb..e13c5b875 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -526,10 +526,11 @@ AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE], [ AC_MSG_CHECKING([whether set_normalized_timespec() is an inline]) SPL_LINUX_TRY_COMPILE([ #include - ],[ void set_normalized_timespec(struct timespec *ts, - time_t sec, long nsec); - ],[ + time_t sec, long nsec) { } + ], + [], + [ AC_MSG_RESULT(no) ],[ AC_MSG_RESULT(yes) diff --git a/include/spl-device.h b/include/spl-device.h index 2bbd299b8..d18aedf07 100644 --- a/include/spl-device.h +++ b/include/spl-device.h @@ -9,12 +9,14 @@ #ifdef HAVE_DEVICE_CREATE typedef struct class spl_class; +typedef struct device spl_device; #define spl_class_create(mod, name) class_create(mod, name) #define spl_class_destroy(cls) class_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ device_create(cls, parent, devt, fmt, ## args) -#define spl_device_destroy(cls, devt) device_destroy(cls, devt) +#define spl_device_destroy(cls, cls_dev, devt) \ + device_destroy(cls, devt) /* * Preferred API from 2.6.13 to 2.6.17 @@ -25,12 +27,14 @@ typedef struct class spl_class; #ifdef HAVE_CLASS_DEVICE_CREATE typedef struct class spl_class; +typedef struct class_device spl_device; #define spl_class_create(mod, name) class_create(mod, name) #define spl_class_destroy(cls) class_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ - class_device_create(cls, parent, devt, device, fmt, ## args) -#define spl_device_destroy(cls, devt) class_device_destroy(cls, devt) +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ + class_device_create(cls, devt, device, fmt, ## args) +#define spl_device_destroy(cls, cls_dev, devt) \ + class_device_unregister(cls_dev) /* * Prefered API from 2.6.0 to 2.6.12 @@ -40,12 +44,14 @@ typedef struct class spl_class; #else /* Legacy API */ typedef struct class_simple spl_class; +typedef struct class_device spl_class_device; #define spl_class_create(mod, name) class_simple_create(mod, name) #define spl_class_destroy(cls) class_simple_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ class_simple_device_add(cls, devt, device, fmt, ## args) -#define spl_device_destroy(cls, devt) class_simple_device_remove(devt) +#define spl_device_destroy(cls, cls_dev, devt) \ + class_simple_device_remove(devt) #endif #endif diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 764ae3820..bbfd412da 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -82,6 +82,7 @@ typedef struct dev_info { struct dev_ops *di_ops; struct cdev *di_cdev; spl_class *di_class; + spl_device *di_device; major_t di_major; minor_t di_minor; dev_t di_dev; diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 19c5db2cd..18f57fdf1 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -165,11 +165,13 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, /* Do not append a 0 to devices with minor nums of 0 */ if (di->di_minor == 0) { - spl_device_create(di->di_class, NULL, di->di_dev, - NULL, "%s", name); + di->di_device = spl_device_create(di->di_class, NULL, + di->di_dev, NULL, + "%s", name); } else { - spl_device_create(di->di_class, NULL, di->di_dev, - NULL, "%s%d", name, di->di_minor); + di->di_device = spl_device_create(di->di_class, NULL, + di->di_dev, NULL, + "%s%d", name, di->di_minor); } di->di_cdev = cdev; @@ -188,7 +190,7 @@ static void __ddi_remove_minor_node_locked(dev_info_t *di, char *name) { if (di->di_class) { - spl_device_destroy(di->di_class, di->di_dev); + spl_device_destroy(di->di_class, di->di_device, di->di_dev); spl_class_destroy(di->di_class); di->di_class = NULL; diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index 0c8b673d9..b82c85f9c 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -43,6 +43,7 @@ #include "splat-internal.h" static spl_class *splat_class; +static spl_device *splat_device; static struct list_head splat_module_list; static spinlock_t splat_module_lock; @@ -630,8 +631,9 @@ splat_init(void) goto error; } - spl_device_create(splat_class, NULL, MKDEV(SPLAT_MAJOR, 0), - NULL, SPLAT_NAME); + splat_device = spl_device_create(splat_class, NULL, + MKDEV(SPLAT_MAJOR, 0), + NULL, SPLAT_NAME); printk(KERN_INFO "splat: Loaded Solaris Porting LAyer " "Tests v%s\n", VERSION); @@ -646,7 +648,7 @@ splat_fini(void) { dev_t dev = MKDEV(SPLAT_MAJOR, 0); - spl_device_destroy(splat_class, dev); + spl_device_destroy(splat_class, splat_device, dev); spl_class_destroy(splat_class); cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); diff --git a/modules/splat/splat-vnode.c b/modules/splat/splat-vnode.c index c85b6165a..413651dac 100644 --- a/modules/splat/splat-vnode.c +++ b/modules/splat/splat-vnode.c @@ -354,10 +354,10 @@ fd_uninstall(int fd) { struct file *fp; struct files_struct *files = current->files; +#ifdef HAVE_FILES_FDTABLE struct fdtable *fdt; spin_lock(&files->file_lock); -#ifdef HAVE_FILES_FDTABLE fdt = files_fdtable(files); if (fd >= fdt->max_fds) @@ -370,6 +370,7 @@ fd_uninstall(int fd) rcu_assign_pointer(fdt->fd[fd], NULL); FD_CLR(fd, fdt->close_on_exec); #else + spin_lock(&files->file_lock); if (fd >= files->max_fds) goto out_unlock; From e73187714d0a6b726d059e3aef426bc7a8efeea4 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 12 Aug 2008 05:18:41 +0000 Subject: [PATCH 0149/1062] Minor tweak to handle systems with restrictive udev rules or older systems which are not using udev at all. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@158 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- scripts/check.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/check.sh b/scripts/check.sh index 3029bf895..81f2fdde3 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -44,7 +44,21 @@ echo "Loading ${spl_module}" echo "Loading ${splat_module}" /sbin/insmod ${splat_module} || die "Unable to load ${splat_module}" -while [ ! -c /dev/splatctl ]; do sleep 0.1; done +# Wait a maximum of 3 seconds for udev to detect the new splatctl +# device, if we do not see the character device file created assume +# udev is not running and manually create the character device. +for i in `seq 1 50`; do + sleep 0.1 + + if [ -c /dev/splatctl ]; then + break + fi + + if [ $i -eq 50 ]; then + mknod /dev/splatctl c 229 0 + fi +done + $splat_cmd $tests $verbose echo "Unloading ${splat_module}" From d50bd9e22179ec4c687bcb0d296a90c8039eeaae Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 3 Nov 2008 19:53:23 +0000 Subject: [PATCH 0150/1062] Reviewed and applied spl-00-rm-gpl-symbol-notifier_chain.patch from Ricardo which removes a dependency on the GPL-only symbol needed for a panic time notifier. This funcationality was never used and this improves our portability. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@159 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 90 ++++++++++++++++------------------------- configure.ac | 1 - modules/spl/spl-debug.c | 47 +-------------------- 3 files changed, 35 insertions(+), 103 deletions(-) diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index e13c5b875..61d11e8ff 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -230,10 +230,10 @@ dnl # SPL_LINUX_TRY_COMPILE like AC_TRY_COMPILE dnl # AC_DEFUN([SPL_LINUX_TRY_COMPILE], [SPL_LINUX_COMPILE_IFELSE( - [AC_LANG_SOURCE([SPL_LANG_PROGRAM([[$1]], [[$2]])])], - [modules], - [test -s build/conftest.o], - [$3], [$4]) + [AC_LANG_SOURCE([SPL_LANG_PROGRAM([[$1]], [[$2]])])], + [modules], + [test -s build/conftest.o], + [$3], [$4]) ]) dnl # @@ -296,7 +296,7 @@ dnl # AC_DEFUN([SPL_CHECK_HEADER], [AC_MSG_CHECKING([whether header $1 exists]) SPL_LINUX_TRY_COMPILE([ - #include <$1> + #include <$1> ],[ return 0; ],[ @@ -316,36 +316,15 @@ dnl # AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], [AC_MSG_CHECKING([whether kernel defines uintptr_t]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ - uintptr_t *ptr; + uintptr_t *ptr; ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_UINTPTR_T, 1, + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_UINTPTR_T, 1, [kernel defines uintptr_t]) ],[ - AC_MSG_RESULT([no]) - ]) -]) - -dnl # -dnl # 2.6.19 API change, -dnl # panic_notifier_list use atomic_notifier operations -dnl # - -AC_DEFUN([SPL_AC_ATOMIC_PANIC_NOTIFIER], - [AC_MSG_CHECKING([whether panic_notifier_list is atomic]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - struct atomic_notifier_head panic_notifier_list; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ATOMIC_PANIC_NOTIFIER, 1, - [panic_notifier_list is atomic]) - ],[ - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) ]) ]) @@ -356,17 +335,16 @@ dnl # AC_DEFUN([SPL_AC_3ARGS_INIT_WORK], [AC_MSG_CHECKING([whether INIT_WORK wants 3 args]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ - struct work_struct work; - - INIT_WORK(&work, NULL, NULL); + struct work_struct work; + INIT_WORK(&work, NULL, NULL); ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1, - [INIT_WORK wants 3 args]) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1, + [INIT_WORK wants 3 args]) ],[ - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) ]) ]) @@ -377,15 +355,15 @@ dnl # AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], [AC_MSG_CHECKING([whether register_sysctl_table() wants 2 args]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ - return register_sysctl_table(NULL,0); + return register_sysctl_table(NULL,0); ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1, - [register_sysctl_table() wants 2 args]) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1, + [register_sysctl_table() wants 2 args]) ],[ - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) ]) ]) @@ -415,18 +393,18 @@ dnl # AC_DEFUN([SPL_AC_PATH_IN_NAMEIDATA], [AC_MSG_CHECKING([whether struct path used in struct nameidata]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ - struct nameidata nd; + struct nameidata nd; nd.path.mnt = NULL; nd.path.dentry = NULL; ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PATH_IN_NAMEIDATA, 1, - [struct path used in struct nameidata]) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PATH_IN_NAMEIDATA, 1, + [struct path used in struct nameidata]) ],[ - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) ]) ]) @@ -446,17 +424,17 @@ dnl # AC_DEFUN([SPL_AC_CTL_UNNUMBERED], [AC_MSG_CHECKING([whether unnumbered sysctl support exists]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ #ifndef CTL_UNNUMBERED #error CTL_UNNUMBERED undefined #endif ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CTL_UNNUMBERED, 1, - [unnumbered sysctl support exists]) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CTL_UNNUMBERED, 1, + [unnumbered sysctl support exists]) ],[ - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) ]) ]) diff --git a/configure.ac b/configure.ac index f32db79da..047ab89b1 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,6 @@ SPL_AC_DEBUG_MUTEX SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB SPL_AC_TYPE_UINTPTR_T -SPL_AC_ATOMIC_PANIC_NOTIFIER SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SET_SHRINKER diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index 99f61d74f..c6a0b52f4 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -108,7 +107,6 @@ char *trace_console_buffers[NR_CPUS][3]; struct rw_semaphore trace_sem; atomic_t trace_tage_allocated = ATOMIC_INIT(0); -static int panic_notifier(struct notifier_block *, unsigned long, void *); static int spl_debug_dump_all_pages(dumplog_priv_t *dp, char *); static void trace_fini(void); @@ -120,12 +118,6 @@ static unsigned int pages_factor[TCD_TYPE_MAX] = { 10 /* 10% pages for TCD_TYPE_IRQ */ }; -static struct notifier_block spl_panic_notifier = { - notifier_call: panic_notifier, - next: NULL, - priority: 10000 -}; - const char * spl_debug_subsys2str(int subsys) { @@ -1167,26 +1159,6 @@ spl_debug_mark_buffer(char *text) } EXPORT_SYMBOL(spl_debug_mark_buffer); -static int -panic_notifier(struct notifier_block *self, - unsigned long unused1, void *unused2) -{ - if (spl_panic_in_progress) - return 0; - - spl_panic_in_progress = 1; - mb(); - - if (!in_interrupt()) { - while (current->lock_depth >= 0) - unlock_kernel(); - - spl_debug_dumplog(DL_NOTHREAD | DL_SINGLE_CPU); - } - - return 0; -} - static int trace_init(int max_pages) { @@ -1255,14 +1227,7 @@ debug_init(void) if (rc) return rc; -#ifdef HAVE_ATOMIC_PANIC_NOTIFIER - atomic_notifier_chain_register(&panic_notifier_list, - &spl_panic_notifier); -#else - notifier_chain_register(&panic_notifier_list, - &spl_panic_notifier); -#endif - return rc; + return rc; } static void @@ -1311,15 +1276,5 @@ trace_fini(void) void debug_fini(void) { -#ifdef HAVE_ATOMIC_PANIC_NOTIFIER - atomic_notifier_chain_unregister(&panic_notifier_list, - &spl_panic_notifier); -#else - notifier_chain_unregister(&panic_notifier_list, - &spl_panic_notifier); -#endif - trace_fini(); - - return; } From f6c81c5ea7ba171bdb9e6d3a29c9e2a7fa6896ad Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 3 Nov 2008 20:07:20 +0000 Subject: [PATCH 0151/1062] Reviewed and applied spl-01-rm-gpl-symbol-set_cpus_allowed.patch from Ricardo which removes a dependency on the GPL-only symbol set_cpus_allowed(). Using this symbol is simpler but in the name of portability we are adopting a spinlock based solution here to remove this dependency. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@160 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/debug.h | 13 +++- modules/spl/spl-debug.c | 142 +++++++++++++++++++--------------------- 2 files changed, 79 insertions(+), 76 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 41ce043fe..1c25083f3 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -157,6 +157,15 @@ union trace_data_union { unsigned short tcd_type; /* The factors to share debug memory. */ unsigned short tcd_pages_factor; + + /* + * This spinlock is needed to workaround the problem of + * set_cpus_allowed() being GPL-only. Since we cannot + * schedule a thread on a specific CPU when dumping the + * pages, we must use the spinlock for mutual exclusion. + */ + spinlock_t tcd_lock; + unsigned long tcd_lock_flags; } tcd; char __pad[L1_CACHE_ALIGN(sizeof(struct trace_cpu_data))]; }; @@ -168,9 +177,9 @@ extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) -#define tcd_for_each_type_lock(tcd, i) \ +#define tcd_for_each_type_lock(tcd, i, cpu) \ for (i = 0; trace_data[i] && \ - (tcd = &(*trace_data[i])[smp_processor_id()].tcd) && \ + (tcd = &(*trace_data[i])[cpu].tcd) && \ trace_lock_tcd(tcd); trace_unlock_tcd(tcd), i++) struct trace_page { diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index c6a0b52f4..d4964dd6e 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -424,35 +425,12 @@ trace_put_console_buffer(char *buffer) put_cpu(); } -static struct trace_cpu_data * -trace_get_tcd(void) -{ - int cpu; - - cpu = get_cpu(); - if (in_irq()) - return &(*trace_data[TCD_TYPE_IRQ])[cpu].tcd; - else if (in_softirq()) - return &(*trace_data[TCD_TYPE_SOFTIRQ])[cpu].tcd; - - return &(*trace_data[TCD_TYPE_PROC])[cpu].tcd; -} - -static void -trace_put_tcd (struct trace_cpu_data *tcd) -{ - put_cpu(); -} - static int trace_lock_tcd(struct trace_cpu_data *tcd) { __ASSERT(tcd->tcd_type < TCD_TYPE_MAX); - if (tcd->tcd_type == TCD_TYPE_IRQ) - local_irq_disable(); - else if (tcd->tcd_type == TCD_TYPE_SOFTIRQ) - local_bh_disable(); + spin_lock_irqsave(&tcd->tcd_lock, tcd->tcd_lock_flags); return 1; } @@ -462,10 +440,34 @@ trace_unlock_tcd(struct trace_cpu_data *tcd) { __ASSERT(tcd->tcd_type < TCD_TYPE_MAX); - if (tcd->tcd_type == TCD_TYPE_IRQ) - local_irq_enable(); - else if (tcd->tcd_type == TCD_TYPE_SOFTIRQ) - local_bh_enable(); + spin_unlock_irqrestore(&tcd->tcd_lock, tcd->tcd_lock_flags); +} + +static struct trace_cpu_data * +trace_get_tcd(void) +{ + int cpu; + struct trace_cpu_data *tcd; + + cpu = get_cpu(); + if (in_irq()) + tcd = &(*trace_data[TCD_TYPE_IRQ])[cpu].tcd; + else if (in_softirq()) + tcd = &(*trace_data[TCD_TYPE_SOFTIRQ])[cpu].tcd; + else + tcd = &(*trace_data[TCD_TYPE_PROC])[cpu].tcd; + + trace_lock_tcd(tcd); + + return tcd; +} + +static void +trace_put_tcd (struct trace_cpu_data *tcd) +{ + trace_unlock_tcd(tcd); + + put_cpu(); } static void @@ -525,23 +527,6 @@ trace_max_debug_mb(void) return MAX(512, ((num_physpages >> (20 - PAGE_SHIFT)) * 80) / 100); } -static void -trace_call_on_all_cpus(void (*fn)(void *arg), void *arg) -{ - cpumask_t mask, cpus_allowed = current->cpus_allowed; - int cpu; - - for_each_online_cpu(cpu) { - cpus_clear(mask); - cpu_set(cpu, mask); - set_cpus_allowed(current, mask); - - fn(arg); - - set_cpus_allowed(current, cpus_allowed); - } -} - static struct trace_page * tage_alloc(int gfp) { @@ -861,16 +846,17 @@ collect_pages_from_single_cpu(struct page_collection *pc) } static void -collect_pages_on_cpu(void *info) +collect_pages_on_all_cpus(struct page_collection *pc) { struct trace_cpu_data *tcd; - struct page_collection *pc = info; - int i; + int i, cpu; spin_lock(&pc->pc_lock); - tcd_for_each_type_lock(tcd, i) { - list_splice_init(&tcd->tcd_pages, &pc->pc_pages); - tcd->tcd_cur_pages = 0; + for_each_possible_cpu(cpu) { + tcd_for_each_type_lock(tcd, i, cpu) { + list_splice_init(&tcd->tcd_pages, &pc->pc_pages); + tcd->tcd_cur_pages = 0; + } } spin_unlock(&pc->pc_lock); } @@ -883,34 +869,38 @@ collect_pages(dumplog_priv_t *dp, struct page_collection *pc) if (spl_panic_in_progress || dp->dp_flags & DL_SINGLE_CPU) collect_pages_from_single_cpu(pc); else - trace_call_on_all_cpus(collect_pages_on_cpu, pc); + collect_pages_on_all_cpus(pc); } static void -put_pages_back_on_cpu(void *info) +put_pages_back_on_all_cpus(struct page_collection *pc) { - struct page_collection *pc = info; struct trace_cpu_data *tcd; struct list_head *cur_head; struct trace_page *tage; struct trace_page *tmp; - int i; + int i, cpu; spin_lock(&pc->pc_lock); - tcd_for_each_type_lock(tcd, i) { - cur_head = tcd->tcd_pages.next; - list_for_each_entry_safe(tage, tmp, &pc->pc_pages, linkage) { + for_each_possible_cpu(cpu) { + tcd_for_each_type_lock(tcd, i, cpu) { + cur_head = tcd->tcd_pages.next; - __ASSERT_TAGE_INVARIANT(tage); + list_for_each_entry_safe(tage, tmp, &pc->pc_pages, + linkage) { - if (tage->cpu != smp_processor_id() || tage->type != i) - continue; + __ASSERT_TAGE_INVARIANT(tage); - tage_to_tail(tage, cur_head); - tcd->tcd_cur_pages++; + if (tage->cpu != cpu || tage->type != i) + continue; + + tage_to_tail(tage, cur_head); + tcd->tcd_cur_pages++; + } } } + spin_unlock(&pc->pc_lock); } @@ -918,7 +908,7 @@ static void put_pages_back(struct page_collection *pc) { if (!spl_panic_in_progress) - trace_call_on_all_cpus(put_pages_back_on_cpu, pc); + put_pages_back_on_all_cpus(pc); } static struct file * @@ -1177,6 +1167,7 @@ trace_init(int max_pages) } tcd_for_each(tcd, i, j) { + spin_lock_init(&tcd->tcd_lock); tcd->tcd_pages_factor = pages_factor[i]; tcd->tcd_type = i; tcd->tcd_cpu = j; @@ -1231,23 +1222,26 @@ debug_init(void) } static void -trace_cleanup_on_cpu(void *info) +trace_cleanup_on_all_cpus(void) { struct trace_cpu_data *tcd; struct trace_page *tage; struct trace_page *tmp; - int i; + int i, cpu; - tcd_for_each_type_lock(tcd, i) { - tcd->tcd_shutting_down = 1; + for_each_possible_cpu(cpu) { + tcd_for_each_type_lock(tcd, i, cpu) { + tcd->tcd_shutting_down = 1; - list_for_each_entry_safe(tage, tmp, &tcd->tcd_pages, linkage) { - __ASSERT_TAGE_INVARIANT(tage); + list_for_each_entry_safe(tage, tmp, &tcd->tcd_pages, + linkage) { + __ASSERT_TAGE_INVARIANT(tage); - list_del(&tage->linkage); - tage_free(tage); + list_del(&tage->linkage); + tage_free(tage); + } + tcd->tcd_cur_pages = 0; } - tcd->tcd_cur_pages = 0; } } @@ -1256,7 +1250,7 @@ trace_fini(void) { int i, j; - trace_call_on_all_cpus(trace_cleanup_on_cpu, NULL); + trace_cleanup_on_all_cpus(); for (i = 0; i < num_possible_cpus(); i++) { for (j = 0; j < 3; j++) { From 749045bbfa3302f8917ef681373775245b241698 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 3 Nov 2008 20:21:08 +0000 Subject: [PATCH 0152/1062] Apply a nice fix caught by Ricardo, * spl-04-fix-taskq-spinlock-lockup.patch Fixes a deadlock in the BIO completion handler, due to the taskq code prematurely re-enabling interrupts when another spinlock had disabled them in the IDE IRQ handler. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@161 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/taskq.h | 1 + modules/spl/spl-taskq.c | 41 ++++++++++++++++++++--------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index fbcc5556d..cedf5350c 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -61,6 +61,7 @@ typedef void (task_func_t)(void *); typedef struct taskq { spinlock_t tq_lock; /* protects taskq_t */ + unsigned long tq_lock_flags; /* interrupt state */ struct task_struct **tq_threads; /* thread pointers */ const char *tq_name; /* taskq name */ int tq_nactive; /* # of active threads */ diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 21d63c875..3c7f43cda 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -76,9 +76,9 @@ retry: * spl_task_t. If a full second passes and we have not found * one gives up and return a NULL to the caller. */ if (flags & TQ_SLEEP) { - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); schedule_timeout(HZ / 100); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); if (count < 100) GOTO(retry, count++); @@ -89,9 +89,9 @@ retry: SBUG(); } - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); t = kmem_alloc(sizeof(spl_task_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); if (t) { spin_lock_init(&t->t_lock); @@ -185,9 +185,9 @@ __taskq_wait(taskq_t *tq) ENTRY; ASSERT(tq); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); id = tq->tq_next_id; - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); __taskq_wait_id(tq, id); @@ -228,7 +228,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) SBUG(); } - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TQ_ACTIVE)) @@ -242,7 +242,6 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) if ((t = task_alloc(tq, flags)) == NULL) GOTO(out, rc = 0); - spin_lock(&t->t_lock); list_add_tail(&t->t_list, &tq->tq_pend_list); t->t_id = rc = tq->tq_next_id; @@ -253,7 +252,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); RETURN(rc); } EXPORT_SYMBOL(__taskq_dispatch); @@ -297,7 +296,7 @@ taskq_thread(void *args) sigprocmask(SIG_BLOCK, &blocked, NULL); flush_signals(current); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nthreads++; wake_up(&tq->tq_wait_waitq); set_current_state(TASK_INTERRUPTIBLE); @@ -306,9 +305,9 @@ taskq_thread(void *args) add_wait_queue(&tq->tq_work_waitq, &wait); if (list_empty(&tq->tq_pend_list)) { - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); schedule(); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); } else { __set_current_state(TASK_RUNNING); } @@ -319,12 +318,12 @@ taskq_thread(void *args) list_del_init(&t->t_list); list_add_tail(&t->t_list, &tq->tq_work_list); tq->tq_nactive++; - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); /* Perform the requested task */ t->t_func(t->t_arg); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; id = t->t_id; task_done(tq, t); @@ -344,7 +343,7 @@ taskq_thread(void *args) __set_current_state(TASK_RUNNING); tq->tq_nthreads--; - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); RETURN(0); } @@ -375,7 +374,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, } spin_lock_init(&tq->tq_lock); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_name = name; tq->tq_nactive = 0; tq->tq_nthreads = 0; @@ -396,7 +395,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, for (i = 0; i < minalloc; i++) task_done(tq, task_alloc(tq, TQ_SLEEP | TQ_NEW)); - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); for (i = 0; i < nthreads; i++) { t = kthread_create(taskq_thread, tq, "%s/%d", name, i); @@ -432,9 +431,9 @@ __taskq_destroy(taskq_t *tq) ENTRY; ASSERT(tq); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_flags &= ~TQ_ACTIVE; - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); /* TQ_ACTIVE cleared prevents new tasks being added to pending */ __taskq_wait(tq); @@ -444,7 +443,7 @@ __taskq_destroy(taskq_t *tq) if (tq->tq_threads[i]) kthread_stop(tq->tq_threads[i]); - spin_lock_irq(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); while (!list_empty(&tq->tq_free_list)) { t = list_entry(tq->tq_free_list.next, spl_task_t, t_list); @@ -458,7 +457,7 @@ __taskq_destroy(taskq_t *tq) ASSERT(list_empty(&tq->tq_work_list)); ASSERT(list_empty(&tq->tq_pend_list)); - spin_unlock_irq(&tq->tq_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); kmem_free(tq->tq_threads, nthreads * sizeof(spl_task_t *)); kmem_free(tq, sizeof(taskq_t)); From 550f1705259c9b97ad158354a921003bbbfe819f Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 3 Nov 2008 20:34:17 +0000 Subject: [PATCH 0153/1062] Apply two nice improvements caught by Ricardo, spl-05-div64.patch This is a much less intrusive fix for undefined 64-bit division symbols when compiling the DMU in 32-bit kernels. * spl-06-atomic64.patch This is a workaround for 32-bit kernels that don't have atomic64_t. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@162 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 1 + include/asm/atomic_compat.h | 58 +++++++++++++++++++++++++++++++++++++ include/sys/div64.h | 44 ---------------------------- include/sys/kmem.h | 2 ++ modules/spl/spl-generic.c | 24 +++++++++++---- modules/spl/spl-kmem.c | 8 ++--- modules/spl/spl-proc.c | 2 +- 7 files changed, 85 insertions(+), 54 deletions(-) create mode 100644 include/asm/atomic_compat.h delete mode 100644 include/sys/div64.h diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index 61d11e8ff..585e3482e 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -653,6 +653,7 @@ AC_DEFUN([SPL_AC_DIV64_64], [ AC_MSG_CHECKING([whether div64_64() is available]) SPL_LINUX_TRY_COMPILE([ #include + #include ],[ uint64_t i = div64_64(1ULL, 1ULL); ],[ diff --git a/include/asm/atomic_compat.h b/include/asm/atomic_compat.h new file mode 100644 index 000000000..0ab1d6cbd --- /dev/null +++ b/include/asm/atomic_compat.h @@ -0,0 +1,58 @@ +#ifndef _SPL_ATOMIC_COMPAT_H +#define _SPL_ATOMIC_COMPAT_H + +#include + +#ifndef HAVE_ATOMIC64_T +#include + +typedef struct { + spinlock_t lock; + __s64 val; +} atomic64_t; + +#define ATOMIC64_INIT(i) { .lock = SPIN_LOCK_UNLOCKED, .val = (i) } + +static inline void atomic64_add(__s64 i, atomic64_t *v) +{ + unsigned long flags; + + spin_lock_irqsave(&v->lock, flags); + v->val += i; + spin_unlock_irqrestore(&v->lock, flags); +} + +static inline void atomic64_sub(__s64 i, atomic64_t *v) +{ + unsigned long flags; + + spin_lock_irqsave(&v->lock, flags); + v->val -= i; + spin_unlock_irqrestore(&v->lock, flags); +} + +static inline __s64 atomic64_read(atomic64_t *v) +{ + unsigned long flags; + __s64 r; + + spin_lock_irqsave(&v->lock, flags); + r = v->val; + spin_unlock_irqrestore(&v->lock, flags); + + return r; +} + +static inline void atomic64_set(atomic64_t *v, __s64 i) +{ + unsigned long flags; + + spin_lock_irqsave(&v->lock, flags); + v->val = i; + spin_unlock_irqrestore(&v->lock, flags); +} + +#endif /* HAVE_ATOMIC64_T */ + +#endif /* _SPL_ATOMIC_COMPAT_H */ + diff --git a/include/sys/div64.h b/include/sys/div64.h deleted file mode 100644 index cb62cd3c5..000000000 --- a/include/sys/div64.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Sun Microsystems, Inc. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef _SPL_DIV64_H -#define _SPL_DIV64_H - -#include - -#ifndef HAVE_DIV64_64 -#if BITS_PER_LONG == 32 - -extern uint64_t spl_div64_64(uint64_t dividend, uint64_t divisor); -#define div64_64(a,b) spl_div64_64(a,b) - -#else /* BITS_PER_LONG == 32 */ - -static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) -{ - return dividend / divisor; -} - -#endif /* BITS_PER_LONG == 32 */ -#endif /* HAVE_DIV64_64 */ - -#define roundup64(x, y) (div64_64((x) + ((y) - 1), (y)) * (y)) - -#endif /* _SPL_DIV64_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 1ca2c261a..336eeda3e 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -42,8 +42,10 @@ extern "C" { #include #include #include +#include #include #include + /* * Memory allocation interfaces */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index afaefb6b4..944d70e72 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -88,12 +88,15 @@ highbit(unsigned long i) EXPORT_SYMBOL(highbit); /* - * Implementation of div64_64(), for kernels that don't have it. - * - * Taken from a 2.6.24 kernel. + * Implementation of 64 bit division for 32-bit machines. */ -uint64_t spl_div64_64(uint64_t dividend, uint64_t divisor) +#if BITS_PER_LONG == 32 +uint64_t __udivdi3(uint64_t dividend, uint64_t divisor) { +#ifdef HAVE_DIV64_64 + return div64_64(dividend, divisor); +#else + /* Taken from a 2.6.24 kernel. */ uint32_t high, d; high = divisor >> 32; @@ -108,8 +111,19 @@ uint64_t spl_div64_64(uint64_t dividend, uint64_t divisor) do_div(dividend, d); return dividend; +#endif } -EXPORT_SYMBOL(spl_div64_64); +EXPORT_SYMBOL(__udivdi3); + +/* + * Implementation of 64 bit modulo for 32-bit machines. + */ +uint64_t __umoddi3(uint64_t dividend, uint64_t divisor) +{ + return dividend - divisor * (dividend / divisor); +} +EXPORT_SYMBOL(__umoddi3); +#endif int ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 208f11b8e..796caa20c 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -43,9 +43,9 @@ */ #ifdef DEBUG_KMEM /* Shim layer memory accounting */ -atomic64_t kmem_alloc_used; +atomic64_t kmem_alloc_used = ATOMIC64_INIT(0); unsigned long kmem_alloc_max = 0; -atomic64_t vmem_alloc_used; +atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); unsigned long vmem_alloc_max = 0; int kmem_warning_flag = 1; @@ -1031,12 +1031,12 @@ spl_kmem_fini(void) * a serious concern here since it is module unload time. */ if (atomic64_read(&kmem_alloc_used) != 0) CWARN("kmem leaked %ld/%ld bytes\n", - atomic_read(&kmem_alloc_used), kmem_alloc_max); + atomic64_read(&kmem_alloc_used), kmem_alloc_max); if (atomic64_read(&vmem_alloc_used) != 0) CWARN("vmem leaked %ld/%ld bytes\n", - atomic_read(&vmem_alloc_used), vmem_alloc_max); + atomic64_read(&vmem_alloc_used), vmem_alloc_max); spl_kmem_fini_tracking(&kmem_list, &kmem_lock); spl_kmem_fini_tracking(&vmem_list, &vmem_lock); diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 01983433d..017c69d47 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -415,7 +415,7 @@ proc_doatomic64(struct ctl_table *table, int write, struct file *filp, if (write) { *ppos += *lenp; } else { - val = atomic_read((atomic64_t *)table->data); + val = atomic64_read((atomic64_t *)table->data); rc = proc_doulongvec_minmax(&dummy, write, filp, buffer, lenp, ppos); } From a0f6da3d9590ece3c7a056f235aab28880dbd67c Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 3 Nov 2008 21:06:04 +0000 Subject: [PATCH 0154/1062] Add a SPL_AC_TYPE_ATOMIC64_T test to configure for systems which do already supprt atomic64_t types. * spl-07-kmem-cleanup.patch This moves all the debugging code from sys/kmem.h to spl-kmem.c, because the huge macros were hard to debug and were bloating functions that allocated memory. I also fixed some other minor problems, including 32-bit fixes and a reported memory leak which was just due to using the wrong free function. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@163 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- autoconf/spl-build.m4 | 19 ++ configure.ac | 1 + include/asm/atomic_compat.h | 1 + include/sys/debug.h | 1 + include/sys/kmem.h | 391 ++++++---------------------------- modules/spl/spl-kmem.c | 407 ++++++++++++++++++++++++++++++++++-- 6 files changed, 473 insertions(+), 347 deletions(-) diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index 585e3482e..0ac7ae8a6 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -328,6 +328,25 @@ AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], ]) ]) +dnl # +dnl # 2.6.x API change, +dnl # check if atomic64_t typedef is defined +dnl # +AC_DEFUN([SPL_AC_TYPE_ATOMIC64_T], + [AC_MSG_CHECKING([whether kernel defines atomic64_t]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + atomic64_t *ptr; + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_ATOMIC64_T, 1, + [kernel defines atomic64_t]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + dnl # dnl # 2.6.20 API change, dnl # INIT_WORK use 2 args and not store data inside diff --git a/configure.ac b/configure.ac index 047ab89b1..2c639a892 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,7 @@ SPL_AC_DEBUG_MUTEX SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB SPL_AC_TYPE_UINTPTR_T +SPL_AC_TYPE_ATOMIC64_T SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SET_SHRINKER diff --git a/include/asm/atomic_compat.h b/include/asm/atomic_compat.h index 0ab1d6cbd..9aa248b06 100644 --- a/include/asm/atomic_compat.h +++ b/include/asm/atomic_compat.h @@ -2,6 +2,7 @@ #define _SPL_ATOMIC_COMPAT_H #include +#include "spl_config.h" #ifndef HAVE_ATOMIC64_T #include diff --git a/include/sys/debug.h b/include/sys/debug.h index 1c25083f3..3cde97635 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -201,6 +201,7 @@ struct page_collection { #ifdef NDEBUG #define CDEBUG_STACK() (0) +#define CDEBUG_LIMIT(x, y, z, a...) ((void)0) #define __CDEBUG_LIMIT(x, y, z, a...) ((void)0) #define CDEBUG(mask, format, a...) ((void)0) #define CWARN(fmt, a...) ((void)0) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 336eeda3e..828481070 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -52,7 +52,7 @@ extern "C" { #define KM_SLEEP GFP_KERNEL #define KM_NOSLEEP GFP_ATOMIC #undef KM_PANIC /* No linux analog */ -#define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) +#define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) #define KM_VMFLAGS GFP_LEVEL_MASK #define KM_FLAGS __GFP_BITS_MASK @@ -60,360 +60,93 @@ extern "C" { * Used internally, the kernel does not need to support this flag */ #ifndef __GFP_ZERO -#define __GFP_ZERO 0x8000 +# define __GFP_ZERO 0x8000 #endif #ifdef DEBUG_KMEM + extern atomic64_t kmem_alloc_used; -extern unsigned long kmem_alloc_max; +extern unsigned long long kmem_alloc_max; extern atomic64_t vmem_alloc_used; -extern unsigned long vmem_alloc_max; -extern int kmem_warning_flag; +extern unsigned long long vmem_alloc_max; -#ifdef DEBUG_KMEM_TRACKING -/* XXX - Not to surprisingly with debugging enabled the xmem_locks are very - * highly contended particularly on xfree(). If we want to run with this - * detailed debugging enabled for anything other than debugging we need to - * minimize the contention by moving to a lock per xmem_table entry model. - */ -#define KMEM_HASH_BITS 10 -#define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) +# define kmem_alloc(size, flags) __kmem_alloc((size), (flags), 0, 0) +# define kmem_zalloc(size, flags) __kmem_alloc((size), ((flags) | \ + __GFP_ZERO), 0, 0) -extern struct hlist_head kmem_table[KMEM_TABLE_SIZE]; -extern struct list_head kmem_list; -extern spinlock_t kmem_lock; +/* The node alloc functions are only used by the SPL code itself */ +# ifdef HAVE_KMALLOC_NODE +# define kmem_alloc_node(size, flags, node) __kmem_alloc((size), (flags), 1, \ + node) +# else +# define kmem_alloc_node(size, flags, node) __kmem_alloc((size), (flags), 0, 0) +# endif -#define VMEM_HASH_BITS 10 -#define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) +# define vmem_zalloc(size, flags) vmem_alloc((size), ((flags) | \ + __GFP_ZERO)) -extern struct hlist_head vmem_table[VMEM_TABLE_SIZE]; -extern struct list_head vmem_list; -extern spinlock_t vmem_lock; +# ifdef DEBUG_KMEM_TRACKING -typedef struct kmem_debug { - struct hlist_node kd_hlist; /* Hash node linkage */ - struct list_head kd_list; /* List of all allocations */ - void *kd_addr; /* Allocation pointer */ - size_t kd_size; /* Allocation size */ - const char *kd_func; /* Allocation function */ - int kd_line; /* Allocation line */ -} kmem_debug_t; +extern void *kmem_alloc_track(size_t size, int flags, const char *func, + int line, int node_alloc, int node); +extern void kmem_free_track(void *ptr, size_t size); +extern void *vmem_alloc_track(size_t size, int flags, const char *func, + int line); +extern void vmem_free_track(void *ptr, size_t size); -static __inline__ kmem_debug_t * -__kmem_del_init(spinlock_t *lock,struct hlist_head *table,int bits,void *addr) -{ - struct hlist_head *head; - struct hlist_node *node; - struct kmem_debug *p; - unsigned long flags; +# define __kmem_alloc(size, flags, na, node) kmem_alloc_track((size), \ + (flags), __FUNCTION__, \ + __LINE__, (na), (node)) +# define kmem_free(ptr, size) kmem_free_track((ptr), (size)) +# define vmem_alloc(size, flags) vmem_alloc_track((size), \ + (flags),__FUNCTION__, \ + __LINE__) +# define vmem_free(ptr, size) vmem_free_track((ptr), (size)) - spin_lock_irqsave(lock, flags); - head = &table[hash_ptr(addr, bits)]; - hlist_for_each_entry_rcu(p, node, head, kd_hlist) { - if (p->kd_addr == addr) { - hlist_del_init(&p->kd_hlist); - list_del_init(&p->kd_list); - spin_unlock_irqrestore(lock, flags); - return p; - } - } +# else /* DEBUG_KMEM_TRACKING */ - spin_unlock_irqrestore(lock, flags); - return NULL; -} +extern void *kmem_alloc_debug(size_t size, int flags, const char *func, + int line, int node_alloc, int node); +extern void kmem_free_debug(void *ptr, size_t size); +extern void *vmem_alloc_debug(size_t size, int flags, const char *func, + int line); +extern void vmem_free_debug(void *ptr, size_t size); -#define __kmem_alloc(size, flags, allocator, args...) \ -({ void *_ptr_ = NULL; \ - kmem_debug_t *_dptr_; \ - unsigned long _flags_; \ - \ - _dptr_ = (kmem_debug_t *)kmalloc(sizeof(kmem_debug_t), (flags)); \ - if (_dptr_ == NULL) { \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "kmem_alloc(%d, 0x%x) debug failed\n", \ - sizeof(kmem_debug_t), (int)(flags)); \ - } else { \ - /* Marked unlikely because we should never be doing this, */ \ - /* we tolerate to up 2 pages but a single page is best. */ \ - if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning large " \ - "kmem_alloc(%d, 0x%x) (%ld/%ld)\n", \ - (int)(size), (int)(flags), \ - atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - \ - _ptr_ = (void *)allocator((size), (flags), ## args); \ - if (_ptr_ == NULL) { \ - kfree(_dptr_); \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "kmem_alloc(%d, 0x%x) failed (%ld/" \ - "%ld)\n", (int)(size), (int)(flags), \ - atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - } else { \ - atomic64_add((size), &kmem_alloc_used); \ - if (unlikely(atomic64_read(&kmem_alloc_used) > \ - kmem_alloc_max)) \ - kmem_alloc_max = \ - atomic64_read(&kmem_alloc_used); \ - \ - INIT_HLIST_NODE(&_dptr_->kd_hlist); \ - INIT_LIST_HEAD(&_dptr_->kd_list); \ - _dptr_->kd_addr = _ptr_; \ - _dptr_->kd_size = (size); \ - _dptr_->kd_func = __FUNCTION__; \ - _dptr_->kd_line = __LINE__; \ - spin_lock_irqsave(&kmem_lock, _flags_); \ - hlist_add_head_rcu(&_dptr_->kd_hlist, \ - &kmem_table[hash_ptr(_ptr_, KMEM_HASH_BITS)]);\ - list_add_tail(&_dptr_->kd_list, &kmem_list); \ - spin_unlock_irqrestore(&kmem_lock, _flags_); \ - \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(" \ - "%d, 0x%x) = %p (%ld/%ld)\n", \ - (int)(size), (int)(flags), _ptr_, \ - atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - } \ - } \ - \ - _ptr_; \ -}) +# define __kmem_alloc(size, flags, na, node) kmem_alloc_debug((size), \ + (flags), __FUNCTION__, \ + __LINE__, (na), (node)) +# define kmem_free(ptr, size) kmem_free_debug((ptr), (size)) +# define vmem_alloc(size, flags) vmem_alloc_debug((size), \ + (flags), __FUNCTION__, \ + __LINE__) +# define vmem_free(ptr, size) vmem_free_debug((ptr), (size)) -#define kmem_free(ptr, size) \ -({ \ - kmem_debug_t *_dptr_; \ - ASSERT((ptr) || (size > 0)); \ - \ - _dptr_ = __kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr);\ - ASSERT(_dptr_); /* Must exist in hash due to kmem_alloc() */ \ - ASSERTF(_dptr_->kd_size == (size), "kd_size (%d) != size (%d), " \ - "kd_func = %s, kd_line = %d\n", _dptr_->kd_size, (size), \ - _dptr_->kd_func, _dptr_->kd_line); /* Size must match */ \ - atomic64_sub((size), &kmem_alloc_used); \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%p, %d) (%ld/%ld)\n", \ - (ptr), (int)(size), atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - \ - memset(_dptr_, 0x5a, sizeof(kmem_debug_t)); \ - kfree(_dptr_); \ - \ - memset(ptr, 0x5a, (size)); \ - kfree(ptr); \ -}) - -#define __vmem_alloc(size, flags) \ -({ void *_ptr_ = NULL; \ - kmem_debug_t *_dptr_; \ - unsigned long _flags_; \ - \ - ASSERT((flags) & KM_SLEEP); \ - \ - _dptr_ = (kmem_debug_t *)kmalloc(sizeof(kmem_debug_t), (flags)); \ - if (_dptr_ == NULL) { \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "vmem_alloc(%d, 0x%x) debug failed\n", \ - sizeof(kmem_debug_t), (int)(flags)); \ - } else { \ - _ptr_ = (void *)__vmalloc((size), (((flags) | \ - __GFP_HIGHMEM) & ~__GFP_ZERO), \ - PAGE_KERNEL); \ - if (_ptr_ == NULL) { \ - kfree(_dptr_); \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "vmem_alloc(%d, 0x%x) failed (%ld/" \ - "%ld)\n", (int)(size), (int)(flags), \ - atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ - } else { \ - if (flags & __GFP_ZERO) \ - memset(_ptr_, 0, (size)); \ - \ - atomic64_add((size), &vmem_alloc_used); \ - if (unlikely(atomic64_read(&vmem_alloc_used) > \ - vmem_alloc_max)) \ - vmem_alloc_max = \ - atomic64_read(&vmem_alloc_used); \ - \ - INIT_HLIST_NODE(&_dptr_->kd_hlist); \ - INIT_LIST_HEAD(&_dptr_->kd_list); \ - _dptr_->kd_addr = _ptr_; \ - _dptr_->kd_size = (size); \ - _dptr_->kd_func = __FUNCTION__; \ - _dptr_->kd_line = __LINE__; \ - spin_lock_irqsave(&vmem_lock, _flags_); \ - hlist_add_head_rcu(&_dptr_->kd_hlist, \ - &vmem_table[hash_ptr(_ptr_, VMEM_HASH_BITS)]);\ - list_add_tail(&_dptr_->kd_list, &vmem_list); \ - spin_unlock_irqrestore(&vmem_lock, _flags_); \ - \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(" \ - "%d, 0x%x) = %p (%ld/%ld)\n", \ - (int)(size), (int)(flags), _ptr_, \ - atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ - } \ - } \ - \ - _ptr_; \ -}) - -#define vmem_free(ptr, size) \ -({ \ - kmem_debug_t *_dptr_; \ - ASSERT((ptr) || (size > 0)); \ - \ - _dptr_ = __kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr);\ - ASSERT(_dptr_); /* Must exist in hash due to vmem_alloc() */ \ - ASSERTF(_dptr_->kd_size == (size), "kd_size (%d) != size (%d), " \ - "kd_func = %s, kd_line = %d\n", _dptr_->kd_size, (size), \ - _dptr_->kd_func, _dptr_->kd_line); /* Size must match */ \ - atomic64_sub((size), &vmem_alloc_used); \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%p, %d) (%ld/%ld)\n", \ - (ptr), (int)(size), atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ - \ - memset(_dptr_, 0x5a, sizeof(kmem_debug_t)); \ - kfree(_dptr_); \ - \ - memset(ptr, 0x5a, (size)); \ - vfree(ptr); \ -}) - -#else /* DEBUG_KMEM_TRACKING */ - -#define __kmem_alloc(size, flags, allocator, args...) \ -({ void *_ptr_ = NULL; \ - \ - /* Marked unlikely because we should never be doing this, */ \ - /* we tolerate to up 2 pages but a single page is best. */ \ - if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning large " \ - "kmem_alloc(%d, 0x%x) (%ld/%ld)\n", \ - (int)(size), (int)(flags), \ - atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - \ - _ptr_ = (void *)allocator((size), (flags), ## args); \ - if (_ptr_ == NULL) { \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "kmem_alloc(%d, 0x%x) failed (%ld/" \ - "%ld)\n", (int)(size), (int)(flags), \ - atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - } else { \ - atomic64_add((size), &kmem_alloc_used); \ - if (unlikely(atomic64_read(&kmem_alloc_used) > \ - kmem_alloc_max)) \ - kmem_alloc_max = \ - atomic64_read(&kmem_alloc_used); \ - \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x) = %p " \ - "(%ld/%ld)\n", (int)(size), (int)(flags), \ - _ptr_, atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - } \ - \ - _ptr_; \ -}) - -#define kmem_free(ptr, size) \ -({ \ - ASSERT((ptr) || (size > 0)); \ - \ - atomic64_sub((size), &kmem_alloc_used); \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%p, %d) (%ld/%ld)\n", \ - (ptr), (int)(size), atomic64_read(&kmem_alloc_used), \ - kmem_alloc_max); \ - memset(ptr, 0x5a, (size)); \ - kfree(ptr); \ -}) - -#define __vmem_alloc(size, flags) \ -({ void *_ptr_ = NULL; \ - \ - ASSERT((flags) & KM_SLEEP); \ - \ - _ptr_ = (void *)__vmalloc((size), (((flags) | \ - __GFP_HIGHMEM) & ~__GFP_ZERO), PAGE_KERNEL);\ - if (_ptr_ == NULL) { \ - __CDEBUG_LIMIT(S_KMEM, D_WARNING, "Warning " \ - "vmem_alloc(%d, 0x%x) failed (%ld/" \ - "%ld)\n", (int)(size), (int)(flags), \ - atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ - } else { \ - if (flags & __GFP_ZERO) \ - memset(_ptr_, 0, (size)); \ - \ - atomic64_add((size), &vmem_alloc_used); \ - if (unlikely(atomic64_read(&vmem_alloc_used) > \ - vmem_alloc_max)) \ - vmem_alloc_max = \ - atomic64_read(&vmem_alloc_used); \ - \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(" \ - "%d, 0x%x) = %p (%ld/%ld)\n", \ - (int)(size), (int)(flags), _ptr_, \ - atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ - } \ - \ - _ptr_; \ -}) - -#define vmem_free(ptr, size) \ -({ \ - ASSERT((ptr) || (size > 0)); \ - \ - atomic64_sub((size), &vmem_alloc_used); \ - __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%p, %d) (%ld/%ld)\n", \ - (ptr), (int)(size), atomic64_read(&vmem_alloc_used), \ - vmem_alloc_max); \ - memset(ptr, 0x5a, (size)); \ - vfree(ptr); \ -}) - -#endif /* DEBUG_KMEM_TRACKING */ - -#define kmem_alloc(size, flags) __kmem_alloc((size), (flags), kmalloc) -#define kmem_zalloc(size, flags) __kmem_alloc((size), (flags), kzalloc) - -#ifdef HAVE_KMALLOC_NODE -#define kmem_alloc_node(size, flags, node) \ - __kmem_alloc((size), (flags), kmalloc_node, node) -#else -#define kmem_alloc_node(size, flags, node) \ - __kmem_alloc((size), (flags), kmalloc) -#endif - -#define vmem_alloc(size, flags) __vmem_alloc((size), (flags)) -#define vmem_zalloc(size, flags) __vmem_alloc((size), ((flags) | __GFP_ZERO)) +# endif /* DEBUG_KMEM_TRACKING */ #else /* DEBUG_KMEM */ -#define kmem_alloc(size, flags) kmalloc((size), (flags)) -#define kmem_zalloc(size, flags) kzalloc((size), (flags)) -#define kmem_free(ptr, size) kfree(ptr) +# define kmem_alloc(size, flags) kmalloc((size), (flags)) +# define kmem_zalloc(size, flags) kzalloc((size), (flags)) +# define kmem_free(ptr, size) (kfree(ptr), (void)(size)) -#ifdef HAVE_KMALLOC_NODE -#define kmem_alloc_node(size, flags, node) \ - kmalloc_node((size), (flags), (node)) -#else -#define kmem_alloc_node(size, flags, node) \ - kmalloc((size), (flags)) -#endif +# ifdef HAVE_KMALLOC_NODE +# define kmem_alloc_node(size, flags, node) \ + kmalloc_node((size), (flags), (node)) +# else +# define kmem_alloc_node(size, flags, node) \ + kmalloc((size), (flags)) +# endif -#define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ - __GFP_HIGHMEM), PAGE_KERNEL) -#define vmem_zalloc(size, flags) \ +# define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ + __GFP_HIGHMEM), PAGE_KERNEL) +# define vmem_zalloc(size, flags) \ ({ \ void *_ptr_ = __vmalloc((size),((flags)|__GFP_HIGHMEM),PAGE_KERNEL); \ if (_ptr_) \ memset(_ptr_, 0, (size)); \ _ptr_; \ }) -#define vmem_free(ptr, size) vfree(ptr) +# define vmem_free(ptr, size) (vfree(ptr), (void)(size)) #endif /* DEBUG_KMEM */ diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 796caa20c..3b5ecfb46 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -27,7 +27,7 @@ #include #ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +# undef DEBUG_SUBSYSTEM #endif #define DEBUG_SUBSYSTEM S_KMEM @@ -44,9 +44,9 @@ #ifdef DEBUG_KMEM /* Shim layer memory accounting */ atomic64_t kmem_alloc_used = ATOMIC64_INIT(0); -unsigned long kmem_alloc_max = 0; +unsigned long long kmem_alloc_max = 0; atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); -unsigned long vmem_alloc_max = 0; +unsigned long long vmem_alloc_max = 0; int kmem_warning_flag = 1; EXPORT_SYMBOL(kmem_alloc_used); @@ -55,7 +55,29 @@ EXPORT_SYMBOL(vmem_alloc_used); EXPORT_SYMBOL(vmem_alloc_max); EXPORT_SYMBOL(kmem_warning_flag); -#ifdef DEBUG_KMEM_TRACKING +# ifdef DEBUG_KMEM_TRACKING + +/* XXX - Not to surprisingly with debugging enabled the xmem_locks are very + * highly contended particularly on xfree(). If we want to run with this + * detailed debugging enabled for anything other than debugging we need to + * minimize the contention by moving to a lock per xmem_table entry model. + */ + +# define KMEM_HASH_BITS 10 +# define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) + +# define VMEM_HASH_BITS 10 +# define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) + +typedef struct kmem_debug { + struct hlist_node kd_hlist; /* Hash node linkage */ + struct list_head kd_list; /* List of all allocations */ + void *kd_addr; /* Allocation pointer */ + size_t kd_size; /* Allocation size */ + const char *kd_func; /* Allocation function */ + int kd_line; /* Allocation line */ +} kmem_debug_t; + spinlock_t kmem_lock; struct hlist_head kmem_table[KMEM_TABLE_SIZE]; struct list_head kmem_list; @@ -71,7 +93,7 @@ EXPORT_SYMBOL(kmem_list); EXPORT_SYMBOL(vmem_lock); EXPORT_SYMBOL(vmem_table); EXPORT_SYMBOL(vmem_list); -#endif +# endif int kmem_set_warning(int flag) { return (kmem_warning_flag = !!flag); } #else @@ -90,10 +112,10 @@ EXPORT_SYMBOL(kmem_set_warning); * kernel have removed support for destructors. This is a deal * breaker for the SPL which contains particularly expensive * initializers for mutex's, condition variables, etc. We also - * require a minimal level of cleaner for these data types unlike - * may Linux data type which do need to be explicitly destroyed. + * require a minimal level of cleanup for these data types unlike + * many Linux data type which do need to be explicitly destroyed. * - * 2) Virtual address backed slab. Callers of the Solaris slab + * 2) Virtual address space backed slab. Callers of the Solaris slab * expect it to work well for both small are very large allocations. * Because of memory fragmentation the Linux slab which is backed * by kmalloc'ed memory performs very badly when confronted with @@ -130,23 +152,369 @@ EXPORT_SYMBOL(kmem_set_warning); * XXX: Proper hardware cache alignment would be good too. */ -struct list_head spl_kmem_cache_list; /* List of caches */ -struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ +struct list_head spl_kmem_cache_list; /* List of caches */ +struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ static int spl_cache_flush(spl_kmem_cache_t *skc, - spl_kmem_magazine_t *skm, int flush); + spl_kmem_magazine_t *skm, int flush); #ifdef HAVE_SET_SHRINKER static struct shrinker *spl_kmem_cache_shrinker; #else static int spl_kmem_cache_generic_shrinker(int nr_to_scan, - unsigned int gfp_mask); + unsigned int gfp_mask); static struct shrinker spl_kmem_cache_shrinker = { .shrink = spl_kmem_cache_generic_shrinker, .seeks = KMC_DEFAULT_SEEKS, }; #endif +#ifdef DEBUG_KMEM +# ifdef DEBUG_KMEM_TRACKING + +static kmem_debug_t * +kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, + void *addr) +{ + struct hlist_head *head; + struct hlist_node *node; + struct kmem_debug *p; + unsigned long flags; + ENTRY; + + spin_lock_irqsave(lock, flags); + + head = &table[hash_ptr(addr, bits)]; + hlist_for_each_entry_rcu(p, node, head, kd_hlist) { + if (p->kd_addr == addr) { + hlist_del_init(&p->kd_hlist); + list_del_init(&p->kd_list); + spin_unlock_irqrestore(lock, flags); + return p; + } + } + + spin_unlock_irqrestore(lock, flags); + + RETURN(NULL); +} + +void * +kmem_alloc_track(size_t size, int flags, const char *func, int line, + int node_alloc, int node) +{ + void *ptr = NULL; + kmem_debug_t *dptr; + unsigned long irq_flags; + ENTRY; + + dptr = (kmem_debug_t *) kmalloc(sizeof(kmem_debug_t), + flags & ~__GFP_ZERO); + + if (dptr == NULL) { + CWARN("kmem_alloc(%ld, 0x%x) debug failed\n", + sizeof(kmem_debug_t), flags); + } else { + /* Marked unlikely because we should never be doing this, + * we tolerate to up 2 pages but a single page is best. */ + if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) + CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", + (unsigned long long) size, flags, + atomic64_read(&kmem_alloc_used), kmem_alloc_max); + + /* Use the correct allocator */ + if (node_alloc) { + ASSERT(!(flags & __GFP_ZERO)); + ptr = kmalloc_node(size, flags, node); + } else if (flags & __GFP_ZERO) { + ptr = kzalloc(size, flags & ~__GFP_ZERO); + } else { + ptr = kmalloc(size, flags); + } + + if (unlikely(ptr == NULL)) { + kfree(dptr); + CWARN("kmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", + (unsigned long long) size, flags, + atomic64_read(&kmem_alloc_used), kmem_alloc_max); + goto out; + } + + atomic64_add(size, &kmem_alloc_used); + if (unlikely(atomic64_read(&kmem_alloc_used) > + kmem_alloc_max)) + kmem_alloc_max = + atomic64_read(&kmem_alloc_used); + + INIT_HLIST_NODE(&dptr->kd_hlist); + INIT_LIST_HEAD(&dptr->kd_list); + + dptr->kd_addr = ptr; + dptr->kd_size = size; + dptr->kd_func = func; + dptr->kd_line = line; + + spin_lock_irqsave(&kmem_lock, irq_flags); + hlist_add_head_rcu(&dptr->kd_hlist, + &kmem_table[hash_ptr(ptr, KMEM_HASH_BITS)]); + list_add_tail(&dptr->kd_list, &kmem_list); + spin_unlock_irqrestore(&kmem_lock, irq_flags); + + CDEBUG_LIMIT(D_INFO, "kmem_alloc(%llu, 0x%x) = %p " + "(%lld/%llu)\n", (unsigned long long) size, flags, + ptr, atomic64_read(&kmem_alloc_used), + kmem_alloc_max); + } +out: + RETURN(ptr); +} +EXPORT_SYMBOL(kmem_alloc_track); + +void +kmem_free_track(void *ptr, size_t size) +{ + kmem_debug_t *dptr; + ENTRY; + + ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, + (unsigned long long) size); + + dptr = kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr); + + ASSERT(dptr); /* Must exist in hash due to kmem_alloc() */ + + /* Size must match */ + ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " + "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, + (unsigned long long) size, dptr->kd_func, dptr->kd_line); + + atomic64_sub(size, &kmem_alloc_used); + + CDEBUG_LIMIT(D_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, + (unsigned long long) size, atomic64_read(&kmem_alloc_used), + kmem_alloc_max); + + memset(dptr, 0x5a, sizeof(kmem_debug_t)); + kfree(dptr); + + memset(ptr, 0x5a, size); + kfree(ptr); + + EXIT; +} +EXPORT_SYMBOL(kmem_free_track); + +void * +vmem_alloc_track(size_t size, int flags, const char *func, int line) +{ + void *ptr = NULL; + kmem_debug_t *dptr; + unsigned long irq_flags; + ENTRY; + + ASSERT(flags & KM_SLEEP); + + dptr = (kmem_debug_t *) kmalloc(sizeof(kmem_debug_t), flags); + if (dptr == NULL) { + CWARN("vmem_alloc(%ld, 0x%x) debug failed\n", + sizeof(kmem_debug_t), flags); + } else { + ptr = __vmalloc(size, (flags | __GFP_HIGHMEM) & ~__GFP_ZERO, + PAGE_KERNEL); + + if (unlikely(ptr == NULL)) { + kfree(dptr); + CWARN("vmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", + (unsigned long long) size, flags, + atomic64_read(&vmem_alloc_used), vmem_alloc_max); + goto out; + } + + if (flags & __GFP_ZERO) + memset(ptr, 0, size); + + atomic64_add(size, &vmem_alloc_used); + if (unlikely(atomic64_read(&vmem_alloc_used) > + vmem_alloc_max)) + vmem_alloc_max = + atomic64_read(&vmem_alloc_used); + + INIT_HLIST_NODE(&dptr->kd_hlist); + INIT_LIST_HEAD(&dptr->kd_list); + + dptr->kd_addr = ptr; + dptr->kd_size = size; + dptr->kd_func = func; + dptr->kd_line = line; + + spin_lock_irqsave(&vmem_lock, irq_flags); + hlist_add_head_rcu(&dptr->kd_hlist, + &vmem_table[hash_ptr(ptr, VMEM_HASH_BITS)]); + list_add_tail(&dptr->kd_list, &vmem_list); + spin_unlock_irqrestore(&vmem_lock, irq_flags); + + CDEBUG_LIMIT(D_INFO, "vmem_alloc(%llu, 0x%x) = %p " + "(%lld/%llu)\n", (unsigned long long) size, flags, + ptr, atomic64_read(&vmem_alloc_used), + vmem_alloc_max); + } +out: + RETURN(ptr); +} +EXPORT_SYMBOL(vmem_alloc_track); + +void +vmem_free_track(void *ptr, size_t size) +{ + kmem_debug_t *dptr; + ENTRY; + + ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, + (unsigned long long) size); + + dptr = kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr); + ASSERT(dptr); /* Must exist in hash due to vmem_alloc() */ + + /* Size must match */ + ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " + "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, + (unsigned long long) size, dptr->kd_func, dptr->kd_line); + + atomic64_sub(size, &vmem_alloc_used); + CDEBUG_LIMIT(D_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, + (unsigned long long) size, atomic64_read(&vmem_alloc_used), + vmem_alloc_max); + + memset(dptr, 0x5a, sizeof(kmem_debug_t)); + kfree(dptr); + + memset(ptr, 0x5a, size); + vfree(ptr); + + EXIT; +} +EXPORT_SYMBOL(vmem_free_track); + +# else /* DEBUG_KMEM_TRACKING */ + +void * +kmem_alloc_debug(size_t size, int flags, const char *func, int line, + int node_alloc, int node) +{ + void *ptr; + ENTRY; + + /* Marked unlikely because we should never be doing this, + * we tolerate to up 2 pages but a single page is best. */ + if (unlikely(size > (PAGE_SIZE * 2)) && kmem_warning_flag) + CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", + (unsigned long long) size, flags, + atomic64_read(&kmem_alloc_used), kmem_alloc_max); + + /* Use the correct allocator */ + if (node_alloc) { + ASSERT(!(flags & __GFP_ZERO)); + ptr = kmalloc_node(size, flags, node); + } else if (flags & __GFP_ZERO) { + ptr = kzalloc(size, flags & (~__GFP_ZERO)); + } else { + ptr = kmalloc(size, flags); + } + + if (ptr == NULL) { + CWARN("kmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", + (unsigned long long) size, flags, + atomic64_read(&kmem_alloc_used), kmem_alloc_max); + } else { + atomic64_add(size, &kmem_alloc_used); + if (unlikely(atomic64_read(&kmem_alloc_used) > kmem_alloc_max)) + kmem_alloc_max = atomic64_read(&kmem_alloc_used); + + CDEBUG_LIMIT(D_INFO, "kmem_alloc(%llu, 0x%x) = %p " + "(%lld/%llu)\n", (unsigned long long) size, flags, ptr, + atomic64_read(&kmem_alloc_used), kmem_alloc_max); + } + RETURN(ptr); +} +EXPORT_SYMBOL(kmem_alloc_debug); + +void +kmem_free_debug(void *ptr, size_t size) +{ + ENTRY; + + ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, + (unsigned long long) size); + + atomic64_sub(size, &kmem_alloc_used); + + CDEBUG_LIMIT(D_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, + (unsigned long long) size, atomic64_read(&kmem_alloc_used), + kmem_alloc_max); + + memset(ptr, 0x5a, size); + kfree(ptr); + + EXIT; +} +EXPORT_SYMBOL(kmem_free_debug); + +void * +vmem_alloc_debug(size_t size, int flags, const char *func, int line) +{ + void *ptr; + ENTRY; + + ASSERT(flags & KM_SLEEP); + + ptr = __vmalloc(size, (flags | __GFP_HIGHMEM) & ~__GFP_ZERO, + PAGE_KERNEL); + if (ptr == NULL) { + CWARN("vmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", + (unsigned long long) size, flags, + atomic64_read(&vmem_alloc_used), vmem_alloc_max); + } else { + if (flags & __GFP_ZERO) + memset(ptr, 0, size); + + atomic64_add(size, &vmem_alloc_used); + + if (unlikely(atomic64_read(&vmem_alloc_used) > vmem_alloc_max)) + vmem_alloc_max = atomic64_read(&vmem_alloc_used); + + CDEBUG_LIMIT(D_INFO, "vmem_alloc(%llu, 0x%x) = %p " + "(%lld/%llu)\n", (unsigned long long) size, flags, ptr, + atomic64_read(&vmem_alloc_used), vmem_alloc_max); + } + + RETURN(ptr); +} +EXPORT_SYMBOL(vmem_alloc_debug); + +void +vmem_free_debug(void *ptr, size_t size) +{ + ENTRY; + + ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, + (unsigned long long) size); + + atomic64_sub(size, &vmem_alloc_used); + + CDEBUG_LIMIT(D_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, + (unsigned long long) size, atomic64_read(&vmem_alloc_used), + vmem_alloc_max); + + memset(ptr, 0x5a, size); + vfree(ptr); + + EXIT; +} +EXPORT_SYMBOL(vmem_free_debug); + +# endif /* DEBUG_KMEM_TRACKING */ +#endif /* DEBUG_KMEM */ + static void * kv_alloc(spl_kmem_cache_t *skc, int size, int flags) { @@ -386,10 +754,14 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) static void spl_magazine_free(spl_kmem_magazine_t *skm) { + int size = sizeof(spl_kmem_magazine_t) + + sizeof(void *) * skm->skm_size; + ENTRY; ASSERT(skm->skm_magic == SKM_MAGIC); ASSERT(skm->skm_avail == 0); - kfree(skm); + + kmem_free(skm, size); EXIT; } @@ -976,13 +1348,12 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) spin_lock_irqsave(lock, flags); if (!list_empty(list)) - CDEBUG(D_WARNING, "%-16s %-5s %-16s %s:%s\n", - "address", "size", "data", "func", "line"); + printk(KERN_WARNING "%-16s %-5s %-16s %s:%s\n", "address", + "size", "data", "func", "line"); list_for_each_entry(kd, list, kd_list) - CDEBUG(D_WARNING, "%p %-5d %-16s %s:%d\n", - kd->kd_addr, kd->kd_size, - spl_sprintf_addr(kd, str, 17, 8), + printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr, + kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), kd->kd_func, kd->kd_line); spin_unlock_irqrestore(lock, flags); From c22e7a427bfbea456e783c918fad817f3c4f34ce Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 3 Nov 2008 21:51:33 +0000 Subject: [PATCH 0155/1062] Under Solaris KM_SLEEP ensures success (or at least you hang forever). That said when working with a finite resource like memory failure really is always a possibility. It would be far better longer term if the ZFS code could be weened off this assumption and properly handle the cases where an allocation fails. Still I've applied the patch to spl-0.3.4 since this layer is supposed to emulate Solaris as closely as possible. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@164 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/kmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 828481070..ef401ade4 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -49,7 +49,7 @@ extern "C" { /* * Memory allocation interfaces */ -#define KM_SLEEP GFP_KERNEL +#define KM_SLEEP (GFP_KERNEL | __GFP_NOFAIL) #define KM_NOSLEEP GFP_ATOMIC #undef KM_PANIC /* No linux analog */ #define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) From c8e60837b78501851b19e1d02ed78e165c7c4103 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 3 Nov 2008 22:02:15 +0000 Subject: [PATCH 0156/1062] * spl-09-fix-kmem-track-oops.patch This fixes an oops when unloading the modules, in the case where memory tracking was enabled and there were memory leaks. The comment in the code explains what was the problem. * spl-10-fix-assert-verify-ndebug.patch This fixes ASSERT*() and VERIFY*() macros in non-debug builds. VERIFY*() macros are supposed to check the condition and panic even in production builds, and ASSERT*() macros don't need to evaluate the arguments. Also some 32-bit fixes. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@165 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/debug.h | 36 ++++++++++++++++++++++++++---------- modules/spl/spl-kmem.c | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 3cde97635..0d7b0b772 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -218,17 +218,32 @@ struct page_collection { #define __ASSERT_TAGE_INVARIANT(x) ((void)0) #define ASSERT(x) ((void)0) #define ASSERTF(x, y, z...) ((void)0) -#define VERIFY(x) ((void)(x)) +#define VERIFY(cond) \ +do { \ + if (unlikely(!(cond))) { \ + printk(KERN_ERR "VERIFY(" #cond ") failed\n"); \ + SBUG(); \ + } \ +} while (0) -#define VERIFY3_IMPL(x, y, z, t, f, c) if ((x) == (z)) ((void)0) +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ +do { \ + if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ + printk(KERN_ERR "VERIFY3(" #LEFT " " #OP " " #RIGHT \ + " failed (" FMT ", " FMT ")\n", CAST (LEFT), \ + CAST (RIGHT)); \ + SBUG(); \ + } \ +} while (0) -#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%ld", (long)) -#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%lu", (unsigned long)) +#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ + (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define ASSERT3S(x,y,z) VERIFY3S(x, y, z) -#define ASSERT3U(x,y,z) VERIFY3U(x, y, z) -#define ASSERT3P(x,y,z) VERIFY3P(x, y, z) +#define ASSERT3S(x,y,z) ((void)0) +#define ASSERT3U(x,y,z) ((void)0) +#define ASSERT3P(x,y,z) ((void)0) #else /* NDEBUG */ @@ -270,7 +285,7 @@ do { \ #define __ASSERT(cond) \ do { \ if (unlikely(!(cond))) { \ - printk(KERN_ERR "ASSERTION(" #cond ") failed"); \ + printk(KERN_ERR "ASSERTION(" #cond ") failed\n"); \ BUG(); \ } \ } while (0) @@ -322,8 +337,9 @@ do { \ } \ } while (0) -#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%ld", (long)) -#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%lu", (unsigned long)) +#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu`", \ + (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) #define ASSERT3S(x,y,z) VERIFY3S(x, y, z) diff --git a/modules/spl/spl-kmem.c b/modules/spl/spl-kmem.c index 3b5ecfb46..e580fbbdd 100644 --- a/modules/spl/spl-kmem.c +++ b/modules/spl/spl-kmem.c @@ -222,6 +222,18 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, (unsigned long long) size, flags, atomic64_read(&kmem_alloc_used), kmem_alloc_max); + /* We use kstrdup() below because the string pointed to by + * __FUNCTION__ might not be available by the time we want + * to print it since the module might have been unloaded. */ + dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); + if (unlikely(dptr->kd_func == NULL)) { + kfree(dptr); + CWARN("kstrdup() failed in kmem_alloc(%llu, 0x%x) " + "(%lld/%llu)\n", (unsigned long long) size, flags, + atomic64_read(&kmem_alloc_used), kmem_alloc_max); + goto out; + } + /* Use the correct allocator */ if (node_alloc) { ASSERT(!(flags & __GFP_ZERO)); @@ -233,6 +245,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, } if (unlikely(ptr == NULL)) { + kfree(dptr->kd_func); kfree(dptr); CWARN("kmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", (unsigned long long) size, flags, @@ -251,7 +264,6 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, dptr->kd_addr = ptr; dptr->kd_size = size; - dptr->kd_func = func; dptr->kd_line = line; spin_lock_irqsave(&kmem_lock, irq_flags); @@ -294,6 +306,8 @@ kmem_free_track(void *ptr, size_t size) (unsigned long long) size, atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kfree(dptr->kd_func); + memset(dptr, 0x5a, sizeof(kmem_debug_t)); kfree(dptr); @@ -319,10 +333,23 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) CWARN("vmem_alloc(%ld, 0x%x) debug failed\n", sizeof(kmem_debug_t), flags); } else { + /* We use kstrdup() below because the string pointed to by + * __FUNCTION__ might not be available by the time we want + * to print it, since the module might have been unloaded. */ + dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); + if (unlikely(dptr->kd_func == NULL)) { + kfree(dptr); + CWARN("kstrdup() failed in vmem_alloc(%llu, 0x%x) " + "(%lld/%llu)\n", (unsigned long long) size, flags, + atomic64_read(&vmem_alloc_used), vmem_alloc_max); + goto out; + } + ptr = __vmalloc(size, (flags | __GFP_HIGHMEM) & ~__GFP_ZERO, PAGE_KERNEL); if (unlikely(ptr == NULL)) { + kfree(dptr->kd_func); kfree(dptr); CWARN("vmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", (unsigned long long) size, flags, @@ -344,7 +371,6 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) dptr->kd_addr = ptr; dptr->kd_size = size; - dptr->kd_func = func; dptr->kd_line = line; spin_lock_irqsave(&vmem_lock, irq_flags); @@ -385,6 +411,8 @@ vmem_free_track(void *ptr, size_t size) (unsigned long long) size, atomic64_read(&vmem_alloc_used), vmem_alloc_max); + kfree(dptr->kd_func); + memset(dptr, 0x5a, sizeof(kmem_debug_t)); kfree(dptr); From b07335c1a77c6eb2b208a604ea97d3a438c69ec1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 00:00:16 +0000 Subject: [PATCH 0157/1062] Ensure GPL-only symbols are re-exported as GPL-only Remove GPL-only symbol from __gethrtime() git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@166 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-module.c | 4 ++-- modules/spl/spl-time.c | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 18f57fdf1..0dd4cfded 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -184,7 +184,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, RETURN(DDI_SUCCESS); } -EXPORT_SYMBOL(__ddi_create_minor_node); +EXPORT_SYMBOL_GPL(__ddi_create_minor_node); static void __ddi_remove_minor_node_locked(dev_info_t *di, char *name) @@ -216,7 +216,7 @@ __ddi_remove_minor_node(dev_info_t *di, char *name) mutex_exit(&di->di_lock); EXIT; } -EXPORT_SYMBOL(ddi_remove_minor_node); +EXPORT_SYMBOL_GPL(ddi_remove_minor_node); #if 0 static int diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index 93945ddbc..88722afe1 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -55,18 +55,14 @@ EXPORT_SYMBOL(__gethrestime); hrtime_t __gethrtime(void) { #ifdef HAVE_MONOTONIC_CLOCK - unsigned long long res = monotonic_clock(); + unsigned long long res = monotonic_clock(); - /* Deal with signed/unsigned mismatch */ - return (hrtime_t)(res & ~(1ULL << (BITS_PER_LONG - 1))); + /* Deal with signed/unsigned mismatch */ + return (hrtime_t)(res & ~(1ULL << 63)); #else - timespec_t tv; - hrtime_t rc; + int64_t j = get_jiffies_64(); - do_posix_clock_monotonic_gettime(&tv); - rc = (NSEC_PER_SEC * (hrtime_t)tv.tv_sec) + (hrtime_t)tv.tv_nsec; - - return rc; + return j * NSEC_PER_SEC / HZ; #endif } EXPORT_SYMBOL(__gethrtime); From b02e9b2415d1888222927ace7416821873d4b0cf Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 22:24:55 +0000 Subject: [PATCH 0158/1062] Add missing initializer which is needed in an unlikely error case. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@167 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index d4964dd6e..d2b96b0c3 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -642,7 +642,7 @@ spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, const char *format1, va_list args, const char *format2, ...) { struct trace_cpu_data *tcd = NULL; - struct spl_debug_header header; + struct spl_debug_header header = { 0, }; struct trace_page *tage; /* string_buf is used only if tcd != NULL, and is always set then */ char *string_buf = NULL; From 55c59e6153509887463d258c41c87c100f7f851f Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 22:39:29 +0000 Subject: [PATCH 0159/1062] Add proper error handling to one of the atomic test cases in the event that a kernel thread cannot be properly spawned. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@168 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/splat/splat-atomic.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/modules/splat/splat-atomic.c b/modules/splat/splat-atomic.c index 05afdb64b..cc947d095 100644 --- a/modules/splat/splat-atomic.c +++ b/modules/splat/splat-atomic.c @@ -126,9 +126,9 @@ splat_atomic_work(void *priv) } static int -splat_atomic_test1_cond(atomic_priv_t *ap) +splat_atomic_test1_cond(atomic_priv_t *ap, int started) { - return (ap->ap_atomic_exited == SPLAT_ATOMIC_COUNT_64); + return (ap->ap_atomic_exited == started); } static int @@ -137,7 +137,7 @@ splat_atomic_test1(struct file *file, void *arg) atomic_priv_t ap; DEFINE_WAIT(wait); kthread_t *thr; - int i; + int i, rc = 0; ap.ap_magic = SPLAT_ATOMIC_TEST_MAGIC; ap.ap_file = file; @@ -153,7 +153,11 @@ splat_atomic_test1(struct file *file, void *arg) thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work, &ap, 0, &p0, TS_RUN, minclsyspri); - ASSERT(thr); + if (thr == NULL) { + rc = -ESRCH; + spin_unlock(&ap.ap_lock); + break; + } /* Prepare to wait, the new thread will wake us once it * has made a copy of the unique private passed data */ @@ -162,7 +166,13 @@ splat_atomic_test1(struct file *file, void *arg) schedule(); } - wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap)); + wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap, i)); + + if (rc) { + splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, "Only started " + "%d/%d test threads\n", i, SPLAT_ATOMIC_COUNT_64); + return rc; + } if (ap.ap_atomic != SPLAT_ATOMIC_INIT_VALUE) { splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, From 8e80a04c043244eb2fdf0541b5ed86bd53d71736 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 22:42:58 +0000 Subject: [PATCH 0160/1062] Simple ignore the return type which was never used here and cast it to void. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@169 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-rwlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c index d599e04e1..07fc2aae4 100644 --- a/modules/spl/spl-rwlock.c +++ b/modules/spl/spl-rwlock.c @@ -61,11 +61,11 @@ __rwsem_wake_one_writer_locked(struct rw_semaphore *sem) } /* release a read lock on the semaphore */ -static void +static void __up_read_locked(struct rw_semaphore *sem) { if (--sem->activity == 0 && !list_empty(&sem->wait_list)) - sem = __rwsem_wake_one_writer_locked(sem); + (void)__rwsem_wake_one_writer_locked(sem); } /* trylock for writing -- returns 1 if successful, 0 if contention */ From 3bc9d50eaa95af0c5de6e5408bf91b0001b56280 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 22:51:31 +0000 Subject: [PATCH 0161/1062] Add missing error handling to this case where a memory allocation fails. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@170 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-kobj.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/spl/spl-kobj.c b/modules/spl/spl-kobj.c index 28ff74e7c..e78cd9244 100644 --- a/modules/spl/spl-kobj.c +++ b/modules/spl/spl-kobj.c @@ -40,10 +40,15 @@ kobj_open_file(const char *name) int rc; ENTRY; - if ((rc = vn_open(name, UIO_SYSSPACE, FREAD, 0644, &vp, 0, 0))) + file = kmalloc(sizeof(_buf_t), GFP_KERNEL); + if (file == NULL) RETURN((_buf_t *)-1UL); - file = kmalloc(sizeof(_buf_t), GFP_KERNEL); + if ((rc = vn_open(name, UIO_SYSSPACE, FREAD, 0644, &vp, 0, 0))) { + kfree(file); + RETURN((_buf_t *)-1UL); + } + file->vp = vp; RETURN(file); From 0498e6c5853a37b2d41e043fd566a752281f2185 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 23:18:31 +0000 Subject: [PATCH 0162/1062] Removed useless check Fix forward NULL in splat kmem_cache test ctors/dtors git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@171 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/vmsystm.h | 3 --- modules/splat/splat-kmem.c | 22 ++++++++-------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index f0688393c..e10a1dc54 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -72,9 +72,6 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) if (len == 0) return -ENAMETOOLONG; - if (len < 0) - return -EFAULT; - /* XXX: Should return ENAMETOOLONG if 'strlen(from) > len' */ memset(to, 0, len); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 27e27a5c8..bc15bc64a 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -262,14 +262,11 @@ splat_kmem_cache_test_constructor(void *ptr, void *priv, int flags) kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; - if (kcd) { - if (kcp) { - kcd->kcd_magic = kcp->kcp_magic; - kcp->kcp_count++; - } - - memset(kcd->kcd_buf, 0xaa, kcp->kcp_size - (sizeof *kcd)); + if (kcd && kcp) { + kcd->kcd_magic = kcp->kcp_magic; kcd->kcd_flag = 1; + memset(kcd->kcd_buf, 0xaa, kcp->kcp_size - (sizeof *kcd)); + kcp->kcp_count++; } return 0; @@ -281,14 +278,11 @@ splat_kmem_cache_test_destructor(void *ptr, void *priv) kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; - if (kcd) { - if (kcp) { - kcd->kcd_magic = 0; - kcp->kcp_count--; - } - - memset(kcd->kcd_buf, 0xbb, kcp->kcp_size - (sizeof *kcd)); + if (kcd && kcp) { + kcd->kcd_magic = 0; kcd->kcd_flag = 0; + memset(kcd->kcd_buf, 0xbb, kcp->kcp_size - (sizeof *kcd)); + kcp->kcp_count--; } return; From 12018327f5a42304971b816d64756a47cb1bed9f Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 23:30:15 +0000 Subject: [PATCH 0163/1062] 3 minor fixups where sprintf() was used instead of snprintf() with a known max length. Additionally the function return value is cast to void to make it explicit that the value is not needed. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@172 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-proc.c | 2 +- modules/spl/spl-vnode.c | 8 ++++---- modules/splat/splat-kmem.c | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/spl/spl-proc.c b/modules/spl/spl-proc.c index 017c69d47..bf185c60e 100644 --- a/modules/spl/spl-proc.c +++ b/modules/spl/spl-proc.c @@ -446,7 +446,7 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, RETURN(-EINVAL); spl_hostid = (long)val; - sprintf(hw_serial, "%u", (val >= 0) ? val : -val); + (void)snprintf(hw_serial, 11, "%u", (val >= 0) ? val : -val); *ppos += *lenp; } else { len = snprintf(str, sizeof(str), "%lx", spl_hostid); diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index 17336a1a2..fef74f3c7 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -161,18 +161,18 @@ vn_openat(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd) { char *realpath; - int rc; + int len, rc; ENTRY; ASSERT(vp == rootdir); - realpath = kmalloc(strlen(path) + 2, GFP_KERNEL); + len = strlen(path) + 2; + realpath = kmalloc(len, GFP_KERNEL); if (!realpath) RETURN(ENOMEM); - sprintf(realpath, "/%s", path); + (void)snprintf(realpath, len, "/%s", path); rc = vn_open(realpath, seg, flags, mode, vpp, x1, x2); - kfree(realpath); RETURN(rc); diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index bc15bc64a..7e95b4af8 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -601,7 +601,8 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) spin_lock_init(&kcp.kcp_lock); init_waitqueue_head(&kcp.kcp_waitq); - sprintf(cache_name, "%s-%d-%d", SPLAT_KMEM_CACHE_NAME, size, i); + (void)snprintf(cache_name, 32, "%s-%d-%d", + SPLAT_KMEM_CACHE_NAME, size, i); kcp.kcp_cache = kmem_cache_create(cache_name, kcp.kcp_size, 0, splat_kmem_cache_test_constructor, splat_kmem_cache_test_destructor, From ac569b72a10d5676a5a572a8aa44bfab9b29cbac Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 23:38:29 +0000 Subject: [PATCH 0164/1062] Fix a small corner case in the test infrastructure where we might end up with a non-NULL terminated buffer if the test name or desc is too long. Only copy N-1 bytes. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@173 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/splat/splat-internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index bda56f1bc..c98201dfd 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -110,8 +110,8 @@ printk(KERN_ERR "splat: Error initializing: " n "/" #tid" \n");\ } else { \ memset(_test_, 0, sizeof(*_test_)); \ - strncpy(_test_->desc.name, n, SPLAT_NAME_SIZE); \ - strncpy(_test_->desc.desc, d, SPLAT_DESC_SIZE); \ + strncpy(_test_->desc.name, n, SPLAT_NAME_SIZE-1); \ + strncpy(_test_->desc.desc, d, SPLAT_DESC_SIZE-1); \ _test_->desc.id = tid; \ _test_->test = func; \ INIT_LIST_HEAD(&(_test_->test_list)); \ From 36833ea4e40833811269d86112043cf1db933009 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 5 Nov 2008 21:27:31 +0000 Subject: [PATCH 0165/1062] Slightly increase SPLAT_NAME_SIZE to ensure string is always NULL terminated. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@174 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/splat-ctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 7f2c6d94d..d5ce6ab9a 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -36,7 +36,7 @@ #define SPLAT_NAME "splatctl" #define SPLAT_DEV "/dev/splatctl" -#define SPLAT_NAME_SIZE 12 +#define SPLAT_NAME_SIZE 16 #define SPLAT_DESC_SIZE 60 typedef struct splat_user { From 7ea1cbf5b2b5489ce1a5f408d3e101e0e7447205 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 5 Nov 2008 21:43:37 +0000 Subject: [PATCH 0166/1062] Add proper error handling for the case where a thread can not be created. Instead of asserting we simply abort the test, wait for any tasks we created to finish, and return -ESRCH back to the user space component. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@175 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/splat/splat-kmem.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/splat/splat-kmem.c b/modules/splat/splat-kmem.c index 7e95b4af8..a9792b1a5 100644 --- a/modules/splat/splat-kmem.c +++ b/modules/splat/splat-kmem.c @@ -582,7 +582,7 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) kthread_t *thr; struct timespec start, stop, delta; char cache_name[32]; - int i, j, threads = 32; + int i, j, rc = 0, threads = 32; kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; kcp.kcp_file = file; @@ -611,7 +611,8 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Unable to create '%s' cache\n", SPLAT_KMEM_CACHE_NAME); - return -ENOMEM; + rc = -ENOMEM; + break; } start = current_kernel_time(); @@ -619,7 +620,10 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) for (j = 0; j < threads; j++) { thr = thread_create(NULL, 0, splat_kmem_test8_thread, &kcp, 0, &p0, TS_RUN, minclsyspri); - ASSERT(thr != NULL); + if (thr == NULL) { + rc = -ESRCH; + break; + } spin_lock(&kcp.kcp_lock); kcp.kcp_threads++; spin_unlock(&kcp.kcp_lock); @@ -644,11 +648,14 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) kmem_cache_destroy(kcp.kcp_cache); - if (kcp.kcp_rc) + if (!rc && kcp.kcp_rc) + rc = kcp.kcp_rc; + + if (rc) break; } - return kcp.kcp_rc; + return rc; } static int From 83e5edb47db1eafdb320790e4937e7aa3005a296 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 5 Nov 2008 22:06:56 +0000 Subject: [PATCH 0167/1062] Remove 3 instances of unused variables. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@176 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-thread.c | 1 - modules/splat/splat-thread.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/modules/spl/spl-thread.c b/modules/spl/spl-thread.c index 62d2fa329..953c5ce7f 100644 --- a/modules/spl/spl-thread.c +++ b/modules/spl/spl-thread.c @@ -87,7 +87,6 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, int state, pri_t pri) { thread_priv_t *tp; - DEFINE_WAIT(wait); struct task_struct *tsk; char *p; ENTRY; diff --git a/modules/splat/splat-thread.c b/modules/splat/splat-thread.c index 330c3ae10..ca6c46ac3 100644 --- a/modules/splat/splat-thread.c +++ b/modules/splat/splat-thread.c @@ -78,7 +78,6 @@ static int splat_thread_test1(struct file *file, void *arg) { thread_priv_t tp; - DEFINE_WAIT(wait); kthread_t *thr; tp.tp_magic = SPLAT_THREAD_TEST_MAGIC; @@ -128,7 +127,6 @@ static int splat_thread_test2(struct file *file, void *arg) { thread_priv_t tp; - DEFINE_WAIT(wait); kthread_t *thr; int rc = 0; From 5457aee1a3912396a8b63d4491724a51187c598c Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 6 Nov 2008 00:51:31 +0000 Subject: [PATCH 0168/1062] Prep for spl-0.3.4 tag. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@177 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 21 +++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d33a2fd3f..cb231cb01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2008-11-05 Brian Behlendorf + + * : Tag spl-0.3.4 + + * : Coverity clean. + + * : Patches from Ricardo M. Correia + applied with minor revisions: + + spl-00-rm-gpl-symbol-notifier_chain.patch + spl-01-rm-gpl-symbol-set_cpus_allowed.patch + spl-02-rm-gpl-symbols-device.patch + spl-03-rm-gpl-symbol-ktime_get_ts.patch + spl-04-fix-taskq-spinlock-lockup.patch + spl-05-div64.patch + spl-06-atomic64.patch + spl-07-kmem-cleanup.patch + spl-08-km-sleep-nofail.patch + spl-09-fix-kmem-track-oops.patch + spl-10-fix-assert-verify-ndebug.patch + 2008-06-30 Brian Behlendorf * : Tag spl-0.3.3 diff --git a/configure.ac b/configure.ac index 2c639a892..a50fe92e1 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.3.3) +AM_INIT_AUTOMAKE(spl, 0.3.4) AC_CONFIG_HEADERS([spl_config.h]) AC_PROG_INSTALL From 6a1c3d418a94bd98ef47e6bedb15c85a31398d6f Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 13 Nov 2008 21:43:30 +0000 Subject: [PATCH 0169/1062] * include/sys/sunddi.h, modules/spl/spl-module.c : Removed default udev support from sunddi implementation because it uses GPL-only symbols. This support is optionally available for SPL consumers if they define HAVE_GPL_ONLY_SYMBOLS and license their module as GPL using the MODULE_LICENSE("GPL") macro. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@179 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 8 ++++++ autoconf/spl-build.m4 | 8 +++++- configure.ac | 1 + include/sys/sunddi.h | 61 ++++++++++++++++++++++++++++++++++++---- modules/spl/spl-module.c | 50 +++++++------------------------- 5 files changed, 82 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb231cb01..8d023992e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-13 Brian Behlendorf + + * include/sys/sunddi.h, modules/spl/spl-module.c : Removed default + udev support from sunddi implementation because it uses GPL-only + symbols. This support is optionally available for SPL consumers + if they define HAVE_GPL_ONLY_SYMBOLS and license their module as + GPL using the MODULE_LICENSE("GPL") macro. + 2008-11-05 Brian Behlendorf * : Tag spl-0.3.4 diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index 0ac7ae8a6..c5c031977 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -30,7 +30,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([Not found]) AC_MSG_ERROR([ *** Please specify the location of the kernel source - *** with the '--with-kernel=PATH' option]) + *** with the '--with-linux=PATH' option]) fi fi @@ -74,6 +74,12 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_SUBST(kmoduledir) ]) +AC_DEFUN([SPL_AC_LICENSE], [ + AC_MSG_CHECKING([license]) + AC_MSG_RESULT([GPL]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" +]) + AC_DEFUN([SPL_AC_DEBUG], [ AC_MSG_CHECKING([whether debugging is enabled]) AC_ARG_ENABLE( [debug], diff --git a/configure.ac b/configure.ac index a50fe92e1..b3835d0e2 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,7 @@ LINUX= LINUX_OBJ= SPL_AC_KERNEL +SPL_AC_LICENSE SPL_AC_DEBUG SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_MUTEX diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index bbfd412da..dea09d171 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -87,6 +87,7 @@ typedef struct dev_info { minor_t di_minor; dev_t di_dev; unsigned di_minors; + int di_flags; struct list_head di_list; } dev_info_t; @@ -180,6 +181,11 @@ typedef struct modldrv { #define DDI_PROP_DONTPASS 0x0001 #define DDI_PROP_CANSLEEP 0x0002 +#define GLOBAL_DEV 0x02 +#define NODEBOUND_DEV 0x04 +#define NODESPECIFIC_DEV 0x06 +#define ENUMERATED_DEV 0x08 + #define ddi_prop_lookup_string(x1,x2,x3,x4,x5) (*x5 = NULL) #define ddi_prop_free(x) (void)0 #define ddi_root_node() (void)0 @@ -189,7 +195,7 @@ typedef struct modldrv { extern int __ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type, minor_t minor_num, char *node_type, - int flag, struct module *mod); + int flags, struct module *mod); extern void __ddi_remove_minor_node(dev_info_t *dip, char *name); extern int __mod_install(struct modlinkage *modlp); extern int __mod_remove(struct modlinkage *modlp); @@ -197,19 +203,64 @@ extern int __mod_remove(struct modlinkage *modlp); static __inline__ void ddi_report_dev(dev_info_t *d) { } static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { } +static __inline__ void +ddi_remove_minor_node(dev_info_t *di, char *name) +{ +#ifdef HAVE_GPL_ONLY_SYMBOLS + /* Cleanup udev (GPL-only symbols required). This is performed as + * part of an inline function to ensure that these symbols are not + * linked against the SPL which is GPL'ed. But instead they are + * linked against the package building against the SPL to ensure + * its license allows linking with GPL-only symbols. */ + if (di->di_class) { + spl_device_destroy(di->di_class, di->di_device, di->di_dev); + spl_class_destroy(di->di_class); + di->di_class = NULL; + di->di_dev = 0; + } +#endif + + __ddi_remove_minor_node(di, name); +} + static __inline__ int ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, - minor_t minor_num, char *node_type, int flag) + minor_t minor_num, char *node_type, int flags) { - return __ddi_create_minor_node(di, name, spec_type, minor_num, - node_type, flag, THIS_MODULE); + int rc; + rc = __ddi_create_minor_node(di, name, spec_type, minor_num, + node_type, flags, THIS_MODULE); + if (rc) + return rc; + +#ifdef HAVE_GPL_ONLY_SYMBOLS + /* Setup udev (GPL-only symbols required). This is performed as + * part of an inline function to ensure that these symbols are not + * linked against the SPL which is GPL'ed. But instead they are + * linked against the package building against the SPL to ensure + * its license allows linking with GPL-only symbols. */ + di->di_class = spl_class_create(THIS_MODULE, name); + if (IS_ERR(di->di_class)) { + rc = PTR_ERR(di->di_class); + di->di_class = NULL; + ddi_remove_minor_node(di, name); + CERROR("Error creating %s class, %d\n", name, rc); + RETURN(DDI_FAILURE); + } + + /* Do not append a 0 to devices with minor nums of 0 */ + di->di_device = spl_device_create(di->di_class, NULL, di->di_dev, NULL, + (di->di_minor == 0) ? "%s" : "%s%d", + name, di->di_minor); +#endif + + return rc; } #undef mod_install #undef mod_remove -#define ddi_remove_minor_node __ddi_remove_minor_node #define mod_install __mod_install #define mod_remove __mod_remove diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 0dd4cfded..700c76182 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -58,7 +58,7 @@ mod_generic_ioctl(struct inode *ino, struct file *filp, unsigned int cmd, unsigned long arg) { struct dev_info *di; - int rc, flag = 0, rvalp = 0; + int rc, flags = 0, rvalp = 0; cred_t *cr = NULL; di = get_dev_info(MKDEV(imajor(ino), iminor(ino))); @@ -67,14 +67,14 @@ mod_generic_ioctl(struct inode *ino, struct file *filp, rc = di->di_ops->devo_cb_ops->cb_ioctl(di->di_dev, (int)cmd,(intptr_t)arg, - flag, cr, &rvalp); + flags, cr, &rvalp); return rc; } int __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, minor_t minor_num, char *node_type, - int flag, struct module *mod) + int flags, struct module *mod) { struct cdev *cdev; struct dev_ops *dev_ops; @@ -86,7 +86,6 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, ASSERT(spec_type == S_IFCHR); ASSERT(minor_num < di->di_minors); ASSERT(!strcmp(node_type, DDI_PSEUDO)); - ASSERT(flag == 0); fops = kzalloc(sizeof(struct file_operations), GFP_KERNEL); if (fops == NULL) @@ -141,8 +140,10 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, ASSERT(cb_ops->cb_aread == NULL); ASSERT(cb_ops->cb_awrite == NULL); + di->di_cdev = cdev; + di->di_flags = flags; di->di_minor = minor_num; - di->di_dev = MKDEV(di->di_major, di->di_minor); + di->di_dev = MKDEV(di->di_major, di->di_minor); rc = cdev_add(cdev, di->di_dev, 1); if (rc) { @@ -153,29 +154,6 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, RETURN(DDI_FAILURE); } - di->di_class = spl_class_create(THIS_MODULE, name); - if (IS_ERR(di->di_class)) { - rc = PTR_ERR(di->di_class); - CERROR("Error creating %s class, %d\n", name, rc); - kfree(fops); - cdev_del(di->di_cdev); - mutex_exit(&di->di_lock); - RETURN(DDI_FAILURE); - } - - /* Do not append a 0 to devices with minor nums of 0 */ - if (di->di_minor == 0) { - di->di_device = spl_device_create(di->di_class, NULL, - di->di_dev, NULL, - "%s", name); - } else { - di->di_device = spl_device_create(di->di_class, NULL, - di->di_dev, NULL, - "%s%d", name, di->di_minor); - } - - di->di_cdev = cdev; - spin_lock(&dev_info_lock); list_add(&di->di_list, &dev_info_list); spin_unlock(&dev_info_lock); @@ -184,19 +162,11 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, RETURN(DDI_SUCCESS); } -EXPORT_SYMBOL_GPL(__ddi_create_minor_node); +EXPORT_SYMBOL(__ddi_create_minor_node); static void __ddi_remove_minor_node_locked(dev_info_t *di, char *name) { - if (di->di_class) { - spl_device_destroy(di->di_class, di->di_device, di->di_dev); - spl_class_destroy(di->di_class); - - di->di_class = NULL; - di->di_dev = 0; - } - if (di->di_cdev) { cdev_del(di->di_cdev); di->di_cdev = NULL; @@ -216,19 +186,19 @@ __ddi_remove_minor_node(dev_info_t *di, char *name) mutex_exit(&di->di_lock); EXIT; } -EXPORT_SYMBOL_GPL(ddi_remove_minor_node); +EXPORT_SYMBOL(__ddi_remove_minor_node); #if 0 static int mod_generic_open(struct inode *, struct file *) { - open(dev_t *devp, int flag, int otyp, cred_t *credp); + open(dev_t *devp, int flags, int otyp, cred_t *credp); } static int mod_generic_close(struct inode *, struct file *) { - close(dev_t dev, int flag, int otyp, cred_t *credp); + close(dev_t dev, int flags, int otyp, cred_t *credp); } static ssize_t From bf9f3bac95bfccbc765f09f5b372197184cce8d7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Mon, 24 Nov 2008 23:49:18 +0000 Subject: [PATCH 0170/1062] * : Add autogen.sh products. * configure.ac : Use AC_CONFIG_AUX_DIR to put autoconf products in ./auotconf. * autogen.sh : Use --copy to avoid symlinks, remove error redirection, run aclocal before libtoolize. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@180 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 10 + Makefile.in | 641 + autogen.sh | 10 +- config/config.guess | 1411 ++ config/config.sub | 1500 ++ config/depcomp | 530 + config/install-sh | 323 + config/ltmain.sh | 6911 +++++++++ config/missing | 360 + {autoconf => config}/spl-build.m4 | 0 configure | 21723 ++++++++++++++++++++++++++++ configure.ac | 2 + spl_config.h.in | 136 + 13 files changed, 33551 insertions(+), 6 deletions(-) create mode 100644 Makefile.in create mode 100755 config/config.guess create mode 100755 config/config.sub create mode 100755 config/depcomp create mode 100755 config/install-sh create mode 100644 config/ltmain.sh create mode 100755 config/missing rename {autoconf => config}/spl-build.m4 (100%) create mode 100755 configure create mode 100644 spl_config.h.in diff --git a/ChangeLog b/ChangeLog index 8d023992e..73ceb1d42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-11-05 Jim Garlick + + * : Add autogen.sh products. + + * configure.ac : Use AC_CONFIG_AUX_DIR to put autoconf products + in ./auotconf. + + * autogen.sh : Use --copy to avoid symlinks, remove error + redirection, run aclocal before libtoolize. + 2008-11-13 Brian Behlendorf * include/sys/sunddi.h, modules/spl/spl-module.c : Removed default diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..d57d52114 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,641 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/spl_config.h.in \ + $(top_srcdir)/configure $(top_srcdir)/modules/Makefile.in \ + $(top_srcdir)/modules/spl/Makefile.in \ + $(top_srcdir)/modules/splat/Makefile.in AUTHORS COPYING \ + ChangeLog INSTALL config/config.guess config/config.sub \ + config/depcomp config/install-sh config/ltmain.sh \ + config/missing +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = spl_config.h +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = foreign dist-zip +SUBDIRS = lib cmd modules include scripts +CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub depcomp \ + install-sh missing mkinstalldirs +EXTRA_DIST = autogen.sh +all: spl_config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +spl_config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/spl_config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status spl_config.h +$(srcdir)/spl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f spl_config.h stamp-h1 +modules/Makefile: $(top_builddir)/config.status $(top_srcdir)/modules/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +modules/spl/Makefile: $(top_builddir)/config.status $(top_srcdir)/modules/spl/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +modules/splat/Makefile: $(top_builddir)/config.status $(top_srcdir)/modules/splat/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) spl_config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) spl_config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/config $(distdir)/modules $(distdir)/modules/spl $(distdir)/modules/splat $(distdir)/scripts + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile spl_config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-libtool clean-recursive \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am + + +rpms: dist Makefile + rpmbuild -ta $(distdir).tar.gz +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/autogen.sh b/autogen.sh index abd43903a..e5614cf32 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,10 +1,8 @@ #!/bin/sh -find . -type d -name .deps | xargs rm -rf -rm -rf config.guess config.sub ltmain.sh -libtoolize --automake -aclocal -I autoconf 2>/dev/null && +aclocal -I config && +libtoolize --automake --copy autoheader && -automake --add-missing --include-deps 2>/dev/null +automake --add-missing --include-deps --copy 2>/dev/null autoconf - +rm -rf autom4te.cache aclocal.m4 diff --git a/config/config.guess b/config/config.guess new file mode 100755 index 000000000..2fc3acce2 --- /dev/null +++ b/config/config.guess @@ -0,0 +1,1411 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-06-17' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +## for Red Hat Linux +if test -f /etc/redhat-release ; then + VENDOR=redhat ; +else + VENDOR= ; +fi + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/config.sub b/config/config.sub new file mode 100755 index 000000000..6b2ff9f6a --- /dev/null +++ b/config/config.sub @@ -0,0 +1,1500 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-06-18' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | s390 | s390x \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | s390-* | s390x-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/depcomp b/config/depcomp new file mode 100755 index 000000000..04701da53 --- /dev/null +++ b/config/depcomp @@ -0,0 +1,530 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2005-07-09.11 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/config/install-sh b/config/install-sh new file mode 100755 index 000000000..4d4a9519e --- /dev/null +++ b/config/install-sh @@ -0,0 +1,323 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2005-05-14.22 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/config/ltmain.sh b/config/ltmain.sh new file mode 100644 index 000000000..0223495a0 --- /dev/null +++ b/config/ltmain.sh @@ -0,0 +1,6911 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. +# for path in $notinst_path; do +# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` +# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` +# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` +# done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/config/missing b/config/missing new file mode 100755 index 000000000..894e786e1 --- /dev/null +++ b/config/missing @@ -0,0 +1,360 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2005-06-08.21 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case "$1" in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/autoconf/spl-build.m4 b/config/spl-build.m4 similarity index 100% rename from autoconf/spl-build.m4 rename to config/spl-build.m4 diff --git a/configure b/configure new file mode 100755 index 000000000..b2ce4fd94 --- /dev/null +++ b/configure @@ -0,0 +1,21723 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] + build shared libraries [default=yes] + --enable-static[=PKGS] + build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-debug Enable generic debug support (default off) + --enable-debug-kmem Enable kmem debug support (default off) + --enable-debug-mutex Enable mutex debug support (default off) + --enable-debug-kstat Enable kstat debug support (default off) + --enable-debug-callb Enable callb debug support (default off) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] + include additional configurations [automatic] + --with-linux=PATH Path to kernel source + --with-linux-obj=PATH Path to kernel build objects + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + +ac_aux_dir= +for ac_dir in config $srcdir/config; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version="1.9" +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=spl + VERSION=0.3.4 + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + ac_config_headers="$ac_config_headers spl_config.h" + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi; + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi; + +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi; + +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done + +fi + +SED=$lt_cv_path_SED + +echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" + +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 3804 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +lt_cv_cc_needs_belf=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F77" && break +done + + F77=$ac_ct_F77 +fi + + +# Provide some information about the compiler. +echo "$as_me:5403:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f77_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 +else + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 +fi + +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6 +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AR=$ac_ct_AR +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi; +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6466: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:6470: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6734: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:6738: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6838: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:6842: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6 +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 8307 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi; + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11647: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:11651: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11751: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:11755: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 12287 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6 + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13345: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13349: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13449: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13453: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 14898 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15676: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15680: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15944: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15948: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16048: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:16052: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_GCJ=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 17517 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +LINUX= +LINUX_OBJ= + + + ver=`uname -r` + + +# Check whether --with-linux or --without-linux was given. +if test "${with_linux+set}" = set; then + withval="$with_linux" + kernelsrc="$withval"; kernelbuild="$withval" +fi; + + +# Check whether --with-linux-obj or --without-linux-obj was given. +if test "${with_linux_obj+set}" = set; then + withval="$with_linux_obj" + kernelbuild="$withval" +fi; + + echo "$as_me:$LINENO: checking kernel source directory" >&5 +echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 + if test -z "$kernelsrc"; then + kernelbuild= + sourcelink=/lib/modules/${ver}/source + buildlink=/lib/modules/${ver}/build + + if test -e $sourcelink; then + kernelsrc=`(cd $sourcelink; /bin/pwd)` + fi + if test -e $buildlink; then + kernelbuild=`(cd $buildlink; /bin/pwd)` + fi + if test -z "$kernelsrc"; then + kernelsrc=$kernelbuild + fi + if test -z "$kernelsrc" -o -z "$kernelbuild"; then + echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6 + { { echo "$as_me:$LINENO: error: + *** Please specify the location of the kernel source + *** with the '--with-linux=PATH' option" >&5 +echo "$as_me: error: + *** Please specify the location of the kernel source + *** with the '--with-linux=PATH' option" >&2;} + { (exit 1); exit 1; }; } + fi + fi + + echo "$as_me:$LINENO: result: $kernelsrc" >&5 +echo "${ECHO_T}$kernelsrc" >&6 + echo "$as_me:$LINENO: checking kernel build directory" >&5 +echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $kernelbuild" >&5 +echo "${ECHO_T}$kernelbuild" >&6 + + echo "$as_me:$LINENO: checking kernel source version" >&5 +echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 + if test -r $kernelbuild/include/linux/version.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + elif test -r $kernelbuild/include/linux/utsrelease.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + fi + + if test -z "$kernsrcver"; then + echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6 + { { echo "$as_me:$LINENO: error: + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script" >&5 +echo "$as_me: error: + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script" >&2;} + { (exit 1); exit 1; }; } + fi + + echo "$as_me:$LINENO: result: $kernsrcver" >&5 +echo "${ECHO_T}$kernsrcver" >&6 + + kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver + LINUX=${kernelsrc} + LINUX_OBJ=${kernelbuild} + + + + + + + echo "$as_me:$LINENO: checking license" >&5 +echo $ECHO_N "checking license... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: GPL" >&5 +echo "${ECHO_T}GPL" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + + + echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define NDEBUG 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + fi + + + echo "$as_me:$LINENO: checking whether kmem debugging is enabled" >&5 +echo $ECHO_N "checking whether kmem debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-kmem or --disable-debug-kmem was given. +if test "${enable_debug_kmem+set}" = set; then + enableval="$enable_debug_kmem" + case "$enableval" in + yes) spl_ac_debug_kmem=yes ;; + no) spl_ac_debug_kmem=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kmem" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kmem" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_kmem" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_KMEM 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether mutex debugging is enabled" >&5 +echo $ECHO_N "checking whether mutex debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-mutex or --disable-debug-mutex was given. +if test "${enable_debug_mutex+set}" = set; then + enableval="$enable_debug_mutex" + case "$enableval" in + yes) spl_ac_debug_mutex=yes ;; + no) spl_ac_debug_mutex=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-mutex" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-mutex" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_mutex" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_MUTEX 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether kstat debugging is enabled" >&5 +echo $ECHO_N "checking whether kstat debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-kstat or --disable-debug-kstat was given. +if test "${enable_debug_kstat+set}" = set; then + enableval="$enable_debug_kstat" + case "$enableval" in + yes) spl_ac_debug_kstat=yes ;; + no) spl_ac_debug_kstat=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kstat" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kstat" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_kstat" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_KSTAT 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether callb debugging is enabled" >&5 +echo $ECHO_N "checking whether callb debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-callb or --disable-debug-callb was given. +if test "${enable_debug_callb+set}" = set; then + enableval="$enable_debug_callb" + case "$enableval" in + yes) spl_ac_debug_callb=yes ;; + no) spl_ac_debug_callb=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-callb" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-callb" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_callb" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_CALLB 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + +echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 +echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + uintptr_t *ptr; + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + +echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_t *ptr; + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATOMIC64_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + +echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 +echo $ECHO_N "checking whether INIT_WORK wants 3 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct work_struct work; + INIT_WORK(&work, NULL, NULL); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_INIT_WORK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + +echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 +echo $ECHO_N "checking whether register_sysctl_table() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return register_sysctl_table(NULL,0); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_REGISTER_SYSCTL 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 +echo $ECHO_N "checking whether set_shrinker() available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return set_shrinker(DEFAULT_SEEKS, NULL); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_SHRINKER 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + +echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 +echo $ECHO_N "checking whether struct path used in struct nameidata... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct nameidata nd; + + nd.path.mnt = NULL; + nd.path.dentry = NULL; + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PATH_IN_NAMEIDATA 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 +echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]task_curr[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in kernel/sched.c; do + grep -q -E "EXPORT_SYMBOL.*(task_curr)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TASK_CURR 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TASK_CURR 1 +_ACEOF + + fi + + +echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 +echo $ECHO_N "checking whether unnumbered sysctl support exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + #ifndef CTL_UNNUMBERED + #error CTL_UNNUMBERED undefined + #endif + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CTL_UNNUMBERED 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + +echo "$as_me:$LINENO: checking whether fls64() is available" >&5 +echo $ECHO_N "checking whether fls64() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return fls64(0); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FLS64 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 +echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]device_create[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in drivers/base/core.c; do + grep -q -E "EXPORT_SYMBOL.*(device_create)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 +echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]class_device_create[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in drivers/base/class.c; do + grep -q -E "EXPORT_SYMBOL.*(class_device_create)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLASS_DEVICE_CREATE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLASS_DEVICE_CREATE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 +echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in kernel/time.c; do + grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 +echo $ECHO_N "checking whether set_normalized_timespec() is an inline... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + void set_normalized_timespec(struct timespec *ts, + time_t sec, long nsec) { } + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 +_ACEOF + + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 +echo $ECHO_N "checking whether timespec_sub() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct timespec a, b, c = { 0 }; + c = timespec_sub(a, b); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TIMESPEC_SUB 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 +echo $ECHO_N "checking whether init_utsname() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct new_utsname *a = init_utsname(); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INIT_UTSNAME 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 +echo $ECHO_N "checking whether header linux/fdtable.h exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return 0; + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FDTABLE_HEADER 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + + echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 +echo $ECHO_N "checking whether files_fdtable() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + #ifdef HAVE_FDTABLE_HEADER + #include + #endif + +int +main (void) +{ + + struct files_struct *files = current->files; + struct fdtable *fdt = files_fdtable(files); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FILES_FDTABLE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 +echo $ECHO_N "checking whether header linux/uaccess.h exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return 0; + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UACCESS_HEADER 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + + echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 +echo $ECHO_N "checking whether kmalloc_node() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + void *a = kmalloc_node(1, GFP_KERNEL, 0); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KMALLOC_NODE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 +echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]monotonic_clock[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MONOTONIC_CLOCK 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MONOTONIC_CLOCK 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 +echo $ECHO_N "checking whether struct inode has i_mutex... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + struct inode i; + mutex_init(&i.i_mutex); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INODE_I_MUTEX 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether div64_64() is available" >&5 +echo $ECHO_N "checking whether div64_64() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + uint64_t i = div64_64(1ULL, 1ULL); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_64 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + +TOPDIR=`/bin/pwd` + +# Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build +KERNELMAKE_PARAMS= +KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" + +if test "${LINUX_OBJ}" != "${LINUX}"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" +fi + + + + + + ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile modules/Makefile modules/spl/Makefile modules/splat/Makefile include/Makefile include/sys/Makefile scripts/Makefile scripts/spl.spec" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "cmd/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;; + "modules/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; + "modules/spl/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/spl/Makefile" ;; + "modules/splat/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/splat/Makefile" ;; + "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/sys/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;; + "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; + "scripts/spl.spec" ) CONFIG_FILES="$CONFIG_FILES scripts/spl.spec" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "spl_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS spl_config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@SED@,$SED,;t t +s,@EGREP@,$EGREP,;t t +s,@LN_S@,$LN_S,;t t +s,@ECHO@,$ECHO,;t t +s,@AR@,$AR,;t t +s,@ac_ct_AR@,$ac_ct_AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@CPP@,$CPP,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@CXXDEPMODE@,$CXXDEPMODE,;t t +s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +s,@CXXCPP@,$CXXCPP,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@LIBTOOL@,$LIBTOOL,;t t +s,@LINUX@,$LINUX,;t t +s,@LINUX_OBJ@,$LINUX_OBJ,;t t +s,@kmoduledir@,$kmoduledir,;t t +s,@KERNELMAKE_PARAMS@,$KERNELMAKE_PARAMS,;t t +s,@KERNELCPPFLAGS@,$KERNELCPPFLAGS,;t t +s,@KERNELCFLAGS@,$KERNELCFLAGS,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/configure.ac b/configure.ac index b3835d0e2..5fb7c92de 100644 --- a/configure.ac +++ b/configure.ac @@ -26,9 +26,11 @@ AC_INIT +AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(spl, 0.3.4) AC_CONFIG_HEADERS([spl_config.h]) +AM_MAINTAINER_MODE AC_PROG_INSTALL AC_PROG_CC diff --git a/spl_config.h.in b/spl_config.h.in new file mode 100644 index 000000000..cf1faaae3 --- /dev/null +++ b/spl_config.h.in @@ -0,0 +1,136 @@ +/* spl_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 to enable callb debugging */ +#undef DEBUG_CALLB + +/* Define to 1 to enable kmem debugging */ +#undef DEBUG_KMEM + +/* Define to 1 to enable kstat debugging */ +#undef DEBUG_KSTAT + +/* Define to 1 to enable mutex debugging */ +#undef DEBUG_MUTEX + +/* register_sysctl_table() wants 2 args */ +#undef HAVE_2ARGS_REGISTER_SYSCTL + +/* INIT_WORK wants 3 args */ +#undef HAVE_3ARGS_INIT_WORK + +/* kernel defines atomic64_t */ +#undef HAVE_ATOMIC64_T + +/* class_device_create() is available */ +#undef HAVE_CLASS_DEVICE_CREATE + +/* unnumbered sysctl support exists */ +#undef HAVE_CTL_UNNUMBERED + +/* device_create() is available */ +#undef HAVE_DEVICE_CREATE + +/* div64_64() is available */ +#undef HAVE_DIV64_64 + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* linux/fdtable.h exists */ +#undef HAVE_FDTABLE_HEADER + +/* files_fdtable() is available */ +#undef HAVE_FILES_FDTABLE + +/* fls64() is available */ +#undef HAVE_FLS64 + +/* init_utsname() is available */ +#undef HAVE_INIT_UTSNAME + +/* struct inode has i_mutex */ +#undef HAVE_INODE_I_MUTEX + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* kmalloc_node() is available */ +#undef HAVE_KMALLOC_NODE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* monotonic_clock() is available */ +#undef HAVE_MONOTONIC_CLOCK + +/* struct path used in struct nameidata */ +#undef HAVE_PATH_IN_NAMEIDATA + +/* set_normalized_timespec() is available as export */ +#undef HAVE_SET_NORMALIZED_TIMESPEC_EXPORT + +/* set_normalized_timespec() is available as inline */ +#undef HAVE_SET_NORMALIZED_TIMESPEC_INLINE + +/* set_shrinker() available */ +#undef HAVE_SET_SHRINKER + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* task_curr() exported */ +#undef HAVE_TASK_CURR + +/* timespec_sub() is available */ +#undef HAVE_TIMESPEC_SUB + +/* linux/uaccess.h exists */ +#undef HAVE_UACCESS_HEADER + +/* kernel defines uintptr_t */ +#undef HAVE_UINTPTR_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 to disable debug tracing */ +#undef NDEBUG + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION From dd529a30accac95bf738e369d72c825fcb25686e Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 26 Nov 2008 17:01:45 +0000 Subject: [PATCH 0171/1062] Include META file support. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@181 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- ChangeLog | 6 ++ META | 6 ++ Makefile.in | 11 +- config/spl-meta.m4 | 112 ++++++++++++++++++++ configure | 248 +++++++++++++++++++++++++++++++++++++++------ configure.ac | 4 +- spl_config.h.in | 27 +++++ 7 files changed, 380 insertions(+), 34 deletions(-) create mode 100644 META create mode 100644 config/spl-meta.m4 diff --git a/ChangeLog b/ChangeLog index 73ceb1d42..62e687151 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-26 Brian Behlendorf + + * : Tag spl-0.3.5 + + * : Include META file support. + 2008-11-05 Jim Garlick * : Add autogen.sh products. diff --git a/META b/META new file mode 100644 index 000000000..5f6c459c0 --- /dev/null +++ b/META @@ -0,0 +1,6 @@ +Meta: 1 +Name: spl +Branch: 1.0 +Version: 0.3.5 +Release: 1 +Release-Tags: relext diff --git a/Makefile.in b/Makefile.in index d57d52114..e70fe6168 100644 --- a/Makefile.in +++ b/Makefile.in @@ -47,7 +47,7 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -124,6 +124,15 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 new file mode 100644 index 000000000..62c30e9f9 --- /dev/null +++ b/config/spl-meta.m4 @@ -0,0 +1,112 @@ +dnl # +dnl # SPL_AC_META +dnl # Read metadata from the META file. +dnl # +dnl # AUTHOR: +dnl # Chris Dunlap +dnl # +AC_DEFUN([SPL_AC_META], [ + AC_MSG_CHECKING([metadata]) + + META="$srcdir/META" + _spl_ac_meta_got_file=no + if test -f "$META"; then + _spl_ac_meta_got_file=yes + + META_NAME=_SPL_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]); + if test -n "$META_NAME"; then + AC_DEFINE_UNQUOTED([META_NAME], ["$META_NAME"], + [Define the project name.] + ) + AC_SUBST([META_NAME]) + fi + + META_VERSION=_SPL_AC_META_GETVAL([VERSION]); + if test -n "$META_VERSION"; then + AC_DEFINE_UNQUOTED([META_VERSION], ["$META_VERSION"], + [Define the project version.] + ) + AC_SUBST([META_VERSION]) + fi + + META_RELEASE=_SPL_AC_META_GETVAL([RELEASE]); + if test -n "$META_RELEASE"; then + AC_DEFINE_UNQUOTED([META_RELEASE], ["$META_RELEASE"], + [Define the project release.] + ) + AC_SUBST([META_RELEASE]) + fi + + if test -n "$META_NAME" -a -n "$META_VERSION"; then + META_ALIAS="$META_NAME-$META_VERSION" + test -n "$META_RELEASE" && + META_ALIAS="$META_ALIAS-$META_RELEASE" + AC_DEFINE_UNQUOTED([META_ALIAS], + ["$META_ALIAS"], + [Define the project alias string.] + ) + AC_SUBST([META_ALIAS]) + fi + + META_DATE=_SPL_AC_META_GETVAL([DATE]); + if test -n "$META_DATE"; then + AC_DEFINE_UNQUOTED([META_DATE], ["$META_DATE"], + [Define the project release date.] + ) + AC_SUBST([META_DATE]) + fi + + META_AUTHOR=_SPL_AC_META_GETVAL([AUTHOR]); + if test -n "$META_AUTHOR"; then + AC_DEFINE_UNQUOTED([META_AUTHOR], ["$META_AUTHOR"], + [Define the project author.] + ) + AC_SUBST([META_AUTHOR]) + fi + + m4_pattern_allow([^LT_(CURRENT|REVISION|AGE)$]) + META_LT_CURRENT=_SPL_AC_META_GETVAL([LT_CURRENT]); + META_LT_REVISION=_SPL_AC_META_GETVAL([LT_REVISION]); + META_LT_AGE=_SPL_AC_META_GETVAL([LT_AGE]); + if test -n "$META_LT_CURRENT" \ + -o -n "$META_LT_REVISION" \ + -o -n "$META_LT_AGE"; then + test -n "$META_LT_CURRENT" || META_LT_CURRENT="0" + test -n "$META_LT_REVISION" || META_LT_REVISION="0" + test -n "$META_LT_AGE" || META_LT_AGE="0" + AC_DEFINE_UNQUOTED([META_LT_CURRENT], + ["$META_LT_CURRENT"], + [Define the libtool library 'current' + version information.] + ) + AC_DEFINE_UNQUOTED([META_LT_REVISION], + ["$META_LT_REVISION"], + [Define the libtool library 'revision' + version information.] + ) + AC_DEFINE_UNQUOTED([META_LT_AGE], ["$META_LT_AGE"], + [Define the libtool library 'age' + version information.] + ) + AC_SUBST([META_LT_CURRENT]) + AC_SUBST([META_LT_REVISION]) + AC_SUBST([META_LT_AGE]) + fi + fi + + AC_MSG_RESULT([$_spl_ac_meta_got_file]) + ] +) + +AC_DEFUN([_SPL_AC_META_GETVAL], + [`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key@<:@:=@:>@//i;"\ + -e "s/^((?:@<:@^'\"#@:>@*(?:(@<:@'\"@:>@)@<:@^\2@:>@*\2)*)*)#.*/\\@S|@1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(@<:@'\"@:>@)(.*)\1/\\@S|@2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + '$1' $META`]dnl +) diff --git a/configure b/configure index b2ce4fd94..8fa6783b8 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS META_NAME META_VERSION META_RELEASE META_ALIAS META_DATE META_AUTHOR META_LT_CURRENT META_LT_REVISION META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1504,6 +1504,183 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + echo "$as_me:$LINENO: checking metadata" >&5 +echo $ECHO_N "checking metadata... $ECHO_C" >&6 + + META="$srcdir/META" + _spl_ac_meta_got_file=no + if test -f "$META"; then + _spl_ac_meta_got_file=yes + + META_NAME=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + '(?:NAME|PROJECT|PACKAGE)' $META`; + if test -n "$META_NAME"; then + +cat >>confdefs.h <<_ACEOF +#define META_NAME "$META_NAME" +_ACEOF + + + fi + + META_VERSION=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'VERSION' $META`; + if test -n "$META_VERSION"; then + +cat >>confdefs.h <<_ACEOF +#define META_VERSION "$META_VERSION" +_ACEOF + + + fi + + META_RELEASE=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'RELEASE' $META`; + if test -n "$META_RELEASE"; then + +cat >>confdefs.h <<_ACEOF +#define META_RELEASE "$META_RELEASE" +_ACEOF + + + fi + + if test -n "$META_NAME" -a -n "$META_VERSION"; then + META_ALIAS="$META_NAME-$META_VERSION" + test -n "$META_RELEASE" && + META_ALIAS="$META_ALIAS-$META_RELEASE" + +cat >>confdefs.h <<_ACEOF +#define META_ALIAS "$META_ALIAS" +_ACEOF + + + fi + + META_DATE=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'DATE' $META`; + if test -n "$META_DATE"; then + +cat >>confdefs.h <<_ACEOF +#define META_DATE "$META_DATE" +_ACEOF + + + fi + + META_AUTHOR=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'AUTHOR' $META`; + if test -n "$META_AUTHOR"; then + +cat >>confdefs.h <<_ACEOF +#define META_AUTHOR "$META_AUTHOR" +_ACEOF + + + fi + + + META_LT_CURRENT=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'LT_CURRENT' $META`; + META_LT_REVISION=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'LT_REVISION' $META`; + META_LT_AGE=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'LT_AGE' $META`; + if test -n "$META_LT_CURRENT" \ + -o -n "$META_LT_REVISION" \ + -o -n "$META_LT_AGE"; then + test -n "$META_LT_CURRENT" || META_LT_CURRENT="0" + test -n "$META_LT_REVISION" || META_LT_REVISION="0" + test -n "$META_LT_AGE" || META_LT_AGE="0" + +cat >>confdefs.h <<_ACEOF +#define META_LT_CURRENT "$META_LT_CURRENT" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define META_LT_REVISION "$META_LT_REVISION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define META_LT_AGE "$META_LT_AGE" +_ACEOF + + + + + fi + fi + + echo "$as_me:$LINENO: result: $_spl_ac_meta_got_file" >&5 +echo "${ECHO_T}$_spl_ac_meta_got_file" >&6 + + ac_aux_dir= for ac_dir in config $srcdir/config; do if test -f $ac_dir/install-sh; then @@ -1892,8 +2069,8 @@ fi # Define the identity of the package. - PACKAGE=spl - VERSION=0.3.4 + PACKAGE=$META_NAME + VERSION=$META_VERSION cat >>confdefs.h <<_ACEOF @@ -3801,7 +3978,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3804 "configure"' > conftest.$ac_ext + echo '#line 3981 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5400,7 +5577,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5403:" \ +echo "$as_me:5580:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6463,11 +6640,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6466: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6643: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6470: \$? = $ac_status" >&5 + echo "$as_me:6647: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6731,11 +6908,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6734: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6911: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6738: \$? = $ac_status" >&5 + echo "$as_me:6915: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6835,11 +7012,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6838: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7015: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6842: \$? = $ac_status" >&5 + echo "$as_me:7019: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8304,7 +8481,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8307 "configure"' > conftest.$ac_ext + echo '#line 8484 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9201,7 +9378,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11824: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11651: \$? = $ac_status" >&5 + echo "$as_me:11828: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11748,11 +11925,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11751: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11928: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11755: \$? = $ac_status" >&5 + echo "$as_me:11932: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12284,7 +12461,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12287 "configure"' > conftest.$ac_ext + echo '#line 12464 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13342,11 +13519,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13345: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13522: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13349: \$? = $ac_status" >&5 + echo "$as_me:13526: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13446,11 +13623,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13449: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13626: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13453: \$? = $ac_status" >&5 + echo "$as_me:13630: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14895,7 +15072,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 14898 "configure"' > conftest.$ac_ext + echo '#line 15075 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15673,11 +15850,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15676: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15853: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15680: \$? = $ac_status" >&5 + echo "$as_me:15857: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15941,11 +16118,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15944: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16121: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15948: \$? = $ac_status" >&5 + echo "$as_me:16125: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16045,11 +16222,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16048: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16225: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16052: \$? = $ac_status" >&5 + echo "$as_me:16229: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17514,7 +17691,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17517 "configure"' > conftest.$ac_ext + echo '#line 17694 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -20925,6 +21102,15 @@ s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t +s,@META_NAME@,$META_NAME,;t t +s,@META_VERSION@,$META_VERSION,;t t +s,@META_RELEASE@,$META_RELEASE,;t t +s,@META_ALIAS@,$META_ALIAS,;t t +s,@META_DATE@,$META_DATE,;t t +s,@META_AUTHOR@,$META_AUTHOR,;t t +s,@META_LT_CURRENT@,$META_LT_CURRENT,;t t +s,@META_LT_REVISION@,$META_LT_REVISION,;t t +s,@META_LT_AGE@,$META_LT_AGE,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t diff --git a/configure.ac b/configure.ac index 5fb7c92de..5a86b246b 100644 --- a/configure.ac +++ b/configure.ac @@ -25,10 +25,10 @@ */ AC_INIT - +SPL_AC_META AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(spl, 0.3.4) +AM_INIT_AUTOMAKE([$META_NAME], [$META_VERSION]) AC_CONFIG_HEADERS([spl_config.h]) AM_MAINTAINER_MODE diff --git a/spl_config.h.in b/spl_config.h.in index cf1faaae3..09d0d917a 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -108,6 +108,33 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define the project alias string. */ +#undef META_ALIAS + +/* Define the project author. */ +#undef META_AUTHOR + +/* Define the project release date. */ +#undef META_DATE + +/* Define the libtool library 'age' version information. */ +#undef META_LT_AGE + +/* Define the libtool library 'current' version information. */ +#undef META_LT_CURRENT + +/* Define the libtool library 'revision' version information. */ +#undef META_LT_REVISION + +/* Define the project name. */ +#undef META_NAME + +/* Define the project release. */ +#undef META_RELEASE + +/* Define the project version. */ +#undef META_VERSION + /* Define to 1 to disable debug tracing */ #undef NDEBUG From 7212e2cd2710338f326f0347d987f761bade4d58 Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 26 Nov 2008 17:07:59 +0000 Subject: [PATCH 0172/1062] Add missing autogen products git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@182 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- cmd/Makefile.in | 480 +++++++++++++++++++++++++++++++++++++++ include/Makefile.in | 492 ++++++++++++++++++++++++++++++++++++++++ include/sys/Makefile.in | 336 +++++++++++++++++++++++++++ lib/Makefile.in | 445 ++++++++++++++++++++++++++++++++++++ scripts/Makefile.in | 340 +++++++++++++++++++++++++++ 5 files changed, 2093 insertions(+) create mode 100644 cmd/Makefile.in create mode 100644 include/Makefile.in create mode 100644 include/sys/Makefile.in create mode 100644 lib/Makefile.in create mode 100644 scripts/Makefile.in diff --git a/cmd/Makefile.in b/cmd/Makefile.in new file mode 100644 index 000000000..901f69826 --- /dev/null +++ b/cmd/Makefile.in @@ -0,0 +1,480 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +sbin_PROGRAMS = spl$(EXEEXT) splat$(EXEEXT) +subdir = cmd +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" +sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(sbin_PROGRAMS) +am_spl_OBJECTS = spl.$(OBJEXT) +spl_OBJECTS = $(am_spl_OBJECTS) +spl_LDADD = $(LDADD) +am_splat_OBJECTS = splat.$(OBJEXT) +splat_OBJECTS = $(am_splat_OBJECTS) +splat_LDADD = $(LDADD) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(spl_SOURCES) $(splat_SOURCES) +DIST_SOURCES = $(spl_SOURCES) $(splat_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +DEFAULT_INCLUDES = -I. -I.. -I../lib +AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow -D__USE_LARGEFILE64 +spl_SOURCES = spl.c +splat_SOURCES = splat.c +splat_LDFLAGS = $(top_builddir)/lib/libcommon.la +EXTRA_DIST = splat.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmd/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu cmd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ + rm -f "$(DESTDIR)$(sbindir)/$$f"; \ + done + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +spl$(EXEEXT): $(spl_OBJECTS) $(spl_DEPENDENCIES) + @rm -f spl$(EXEEXT) + $(LINK) $(spl_LDFLAGS) $(spl_OBJECTS) $(spl_LDADD) $(LIBS) +splat$(EXEEXT): $(splat_OBJECTS) $(splat_DEPENDENCIES) + @rm -f splat$(EXEEXT) + $(LINK) $(splat_LDFLAGS) $(splat_OBJECTS) $(splat_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splat.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: install-sbinPROGRAMS + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-sbinPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/Makefile.in b/include/Makefile.in new file mode 100644 index 000000000..4b27a5208 --- /dev/null +++ b/include/Makefile.in @@ -0,0 +1,492 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +SUBDIRS = sys +EXTRA_DIST = splat-ctl.h +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive distclean distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-libtool \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in new file mode 100644 index 000000000..6dc6ac98e --- /dev/null +++ b/include/sys/Makefile.in @@ -0,0 +1,336 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/sys +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = callb.h cmn_err.h condvar.h cred.h debug.h kmem.h kstat.h \ + mutex.h param.h random.h rwlock.h taskq.h thread.h time.h \ + timer.h types.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/sys/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/Makefile.in b/lib/Makefile.in new file mode 100644 index 000000000..264079880 --- /dev/null +++ b/lib/Makefile.in @@ -0,0 +1,445 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = lib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libcommon_la_LIBADD = +am_libcommon_la_OBJECTS = list.lo +libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libcommon_la_SOURCES) +DIST_SOURCES = $(libcommon_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +DEFAULT_INCLUDES = -I. -I.. +AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow +noinst_LTLIBRARIES = libcommon.la +libcommon_la_SOURCES = list.c +EXTRA_DIST = list.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) + $(LINK) $(libcommon_la_LDFLAGS) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/scripts/Makefile.in b/scripts/Makefile.in new file mode 100644 index 000000000..026feee21 --- /dev/null +++ b/scripts/Makefile.in @@ -0,0 +1,340 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = scripts +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/spl.spec.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = spl.spec +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = spl.spec.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu scripts/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +spl.spec: $(top_builddir)/config.status $(srcdir)/spl.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + + +check: + ./check.sh +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: From 02a794ae3ffa15c8cfd7e95b5365651e2306127e Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 26 Nov 2008 17:43:44 +0000 Subject: [PATCH 0173/1062] Add libtool script git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@183 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- libtool | 7885 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 7885 insertions(+) create mode 100755 libtool diff --git a/libtool b/libtool new file mode 100755 index 000000000..7f0815003 --- /dev/null +++ b/libtool @@ -0,0 +1,7885 @@ +#! /bin/sh + +# libtoolT - Provide generalized library-building support services. +# Generated automatically by (GNU spl 0.3.5) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED="/bin/sed" + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="/bin/sed -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags=" CXX F77" + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host ilc18: + +# Shell to use when invoking shell scripts. +SHELL="/bin/sh" + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=no + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias= +host=x86_64-redhat-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=x86_64-redhat-linux-gnu +build_os=linux-gnu + +# An echo program that does not interpret backslashes. +echo="echo" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A C compiler. +LTCC="gcc" + +# LTCC compiler flags. +LTCFLAGS="-g -O2" + +# A language-specific compiler. +CC="gcc" + +# Is the compiler the GNU C compiler? +with_gcc=yes + +gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'` +gcc_ver=`gcc -dumpversion` + +# An ERE matcher. +EGREP="grep -E" + +# The linker used to build libraries. +LD="/usr/bin/ld -m elf_x86_64" + +# Whether we need hard or soft links. +LN_S="ln -s" + +# A BSD-compatible nm program. +NM="/usr/bin/nm -B" + +# A symbol stripping program +STRIP="strip" + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=file + +# Used on cygwin: DLL creation program. +DLLTOOL="dlltool" + +# Used on cygwin: object dumper. +OBJDUMP="objdump" + +# Used on cygwin: assembler. +AS="as" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Object file suffix (normally "o"). +objext="o" + +# Old archive suffix (normally "a"). +libext="a" + +# Shared library suffix (normally ".so"). +shrext_cmds='.so' + +# Executable file suffix (normally ""). +exeext="" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" +pic_mode=default + +# What is the maximum length of a command? +max_cmd_len=32768 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Must we lock files when doing compilation? +need_locks="no" + +# Do we need the lib prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec="" + +# Library versioning type. +version_type=linux + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Commands used to build and install an old-style archive. +RANLIB="ranlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build and install a shared archive. +archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ + cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ + \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ + \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" +postinstall_cmds="" +postuninstall_cmds="" + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds="" +module_expsym_cmds="" + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps="" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd="\$MAGIC_CMD" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that forces no undefined symbols. +no_undefined_flag="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" + +# This is the shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# This is the shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist. +hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into +# a binary during linking. This must work even if $libdir does +# not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="" + +# Set to yes if using DIR/libNAME during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=no + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=no + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=no + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Compile-time system search path for libraries +sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to yes if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + +# Symbols that must always be exported. +include_expsyms="" + +# ### END LIBTOOL CONFIG + +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. +# for path in $notinst_path; do +# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` +# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` +# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` +# done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# Libtool was configured on host ilc18: + +# Shell to use when invoking shell scripts. +SHELL="/bin/sh" + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=no + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias= +host=x86_64-redhat-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=x86_64-redhat-linux-gnu +build_os=linux-gnu + +# An echo program that does not interpret backslashes. +echo="echo" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A C compiler. +LTCC="gcc" + +# LTCC compiler flags. +LTCFLAGS="-g -O2" + +# A language-specific compiler. +CC="g++" + +# Is the compiler the GNU C compiler? +with_gcc=yes + +gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'` +gcc_ver=`gcc -dumpversion` + +# An ERE matcher. +EGREP="grep -E" + +# The linker used to build libraries. +LD="/usr/bin/ld -m elf_x86_64" + +# Whether we need hard or soft links. +LN_S="ln -s" + +# A BSD-compatible nm program. +NM="/usr/bin/nm -B" + +# A symbol stripping program +STRIP="strip" + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=file + +# Used on cygwin: DLL creation program. +DLLTOOL="dlltool" + +# Used on cygwin: object dumper. +OBJDUMP="objdump" + +# Used on cygwin: assembler. +AS="as" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Object file suffix (normally "o"). +objext="o" + +# Old archive suffix (normally "a"). +libext="a" + +# Shared library suffix (normally ".so"). +shrext_cmds='.so' + +# Executable file suffix (normally ""). +exeext="" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" +pic_mode=default + +# What is the maximum length of a command? +max_cmd_len=32768 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Must we lock files when doing compilation? +need_locks="no" + +# Do we need the lib prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec="" + +# Library versioning type. +version_type=linux + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Commands used to build and install an old-style archive. +RANLIB="ranlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build and install a shared archive. +archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" +postinstall_cmds="" +postuninstall_cmds="" + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds="" +module_expsym_cmds="" + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=`echo "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=`echo "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=`echo "-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd="\$MAGIC_CMD" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that forces no undefined symbols. +no_undefined_flag="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" + +# This is the shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# This is the shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist. +hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into +# a binary during linking. This must work even if $libdir does +# not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="" + +# Set to yes if using DIR/libNAME during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=no + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=no + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=no + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Compile-time system search path for libraries +sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to yes if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="" + +# Symbols that must always be exported. +include_expsyms="" + +# ### END LIBTOOL TAG CONFIG: CXX + +# ### BEGIN LIBTOOL TAG CONFIG: F77 + +# Libtool was configured on host ilc18: + +# Shell to use when invoking shell scripts. +SHELL="/bin/sh" + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=no + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias= +host=x86_64-redhat-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=x86_64-redhat-linux-gnu +build_os=linux-gnu + +# An echo program that does not interpret backslashes. +echo="echo" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A C compiler. +LTCC="gcc" + +# LTCC compiler flags. +LTCFLAGS="-g -O2" + +# A language-specific compiler. +CC="g77" + +# Is the compiler the GNU C compiler? +with_gcc=yes + +gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'` +gcc_ver=`gcc -dumpversion` + +# An ERE matcher. +EGREP="grep -E" + +# The linker used to build libraries. +LD="/usr/bin/ld -m elf_x86_64" + +# Whether we need hard or soft links. +LN_S="ln -s" + +# A BSD-compatible nm program. +NM="/usr/bin/nm -B" + +# A symbol stripping program +STRIP="strip" + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=file + +# Used on cygwin: DLL creation program. +DLLTOOL="dlltool" + +# Used on cygwin: object dumper. +OBJDUMP="objdump" + +# Used on cygwin: assembler. +AS="as" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Object file suffix (normally "o"). +objext="o" + +# Old archive suffix (normally "a"). +libext="a" + +# Shared library suffix (normally ".so"). +shrext_cmds='.so' + +# Executable file suffix (normally ""). +exeext="" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC" +pic_mode=default + +# What is the maximum length of a command? +max_cmd_len=32768 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Must we lock files when doing compilation? +need_locks="no" + +# Do we need the lib prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Compiler flag to turn off builtin functions. +no_builtin_flag="" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec="" + +# Library versioning type. +version_type=linux + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Commands used to build and install an old-style archive. +RANLIB="ranlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build and install a shared archive. +archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ + cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ + \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ + \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" +postinstall_cmds="" +postuninstall_cmds="" + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds="" +module_expsym_cmds="" + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps="" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd="\$MAGIC_CMD" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that forces no undefined symbols. +no_undefined_flag="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" + +# This is the shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# This is the shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist. +hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into +# a binary during linking. This must work even if $libdir does +# not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="" + +# Set to yes if using DIR/libNAME during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=no + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=no + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=no + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Compile-time system search path for libraries +sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to yes if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + +# Symbols that must always be exported. +include_expsyms="" + +# ### END LIBTOOL TAG CONFIG: F77 + From 7860010a723224a36a904005205a59bbb9efab4a Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 26 Nov 2008 17:44:40 +0000 Subject: [PATCH 0174/1062] Tag spl-0.3.5 git-svn-id: https://outreach.scidac.gov/svn/spl/tags/spl-0.3.5@184 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c From 895ff83c08b99755d1817b71489f486212b6ad14 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 26 Nov 2008 09:57:29 -0800 Subject: [PATCH 0175/1062] Rebase on Git from SVN as of version 0.4.0. --- ChangeLog | 6 ++++++ META | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 62e687151..08cda5998 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-26 Brian Behlendorf + + * : Tag spl-0.4.0 (Development now done with Git) + + * : Imported SPL SVN repo in to Git Repo for core development. + 2008-11-26 Brian Behlendorf * : Tag spl-0.3.5 diff --git a/META b/META index 5f6c459c0..6e5ae867f 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.3.5 +Version: 0.4.0 Release: 1 Release-Tags: relext From abc3ca149d719cca5c807f38030d01f61e97d87d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 26 Nov 2008 13:09:37 -0800 Subject: [PATCH 0176/1062] Prefix all META_* #defines with SPL to prevent colisions which include our spl_config.h. Dependent packages may do this to leverage the autoconf check we have already run aganst the kernel. --- Makefile.in | 16 ++++---- cmd/Makefile.in | 16 ++++---- config/spl-meta.m4 | 82 ++++++++++++++++++++-------------------- configure | 84 ++++++++++++++++++++--------------------- configure.ac | 2 +- include/Makefile.in | 16 ++++---- include/sys/Makefile.in | 16 ++++---- lib/Makefile.in | 16 ++++---- scripts/Makefile.in | 16 ++++---- spl_config.h.in | 48 +++++++++++------------ 10 files changed, 156 insertions(+), 156 deletions(-) diff --git a/Makefile.in b/Makefile.in index e70fe6168..d387b77a3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -125,14 +125,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ META_ALIAS = @META_ALIAS@ -META_AUTHOR = @META_AUTHOR@ -META_DATE = @META_DATE@ -META_LT_AGE = @META_LT_AGE@ -META_LT_CURRENT = @META_LT_CURRENT@ -META_LT_REVISION = @META_LT_REVISION@ -META_NAME = @META_NAME@ -META_RELEASE = @META_RELEASE@ -META_VERSION = @META_VERSION@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -145,6 +137,14 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 901f69826..2a49bc5f2 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -121,14 +121,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ META_ALIAS = @META_ALIAS@ -META_AUTHOR = @META_AUTHOR@ -META_DATE = @META_DATE@ -META_LT_AGE = @META_LT_AGE@ -META_LT_CURRENT = @META_LT_CURRENT@ -META_LT_REVISION = @META_LT_REVISION@ -META_NAME = @META_NAME@ -META_RELEASE = @META_RELEASE@ -META_VERSION = @META_VERSION@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -141,6 +133,14 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index 62c30e9f9..e58ed673f 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -13,34 +13,34 @@ AC_DEFUN([SPL_AC_META], [ if test -f "$META"; then _spl_ac_meta_got_file=yes - META_NAME=_SPL_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]); - if test -n "$META_NAME"; then - AC_DEFINE_UNQUOTED([META_NAME], ["$META_NAME"], + SPL_META_NAME=_SPL_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]); + if test -n "$SPL_META_NAME"; then + AC_DEFINE_UNQUOTED([SPL_META_NAME], ["$SPL_META_NAME"], [Define the project name.] ) - AC_SUBST([META_NAME]) + AC_SUBST([SPL_META_NAME]) fi - META_VERSION=_SPL_AC_META_GETVAL([VERSION]); - if test -n "$META_VERSION"; then - AC_DEFINE_UNQUOTED([META_VERSION], ["$META_VERSION"], + SPL_META_VERSION=_SPL_AC_META_GETVAL([VERSION]); + if test -n "$SPL_META_VERSION"; then + AC_DEFINE_UNQUOTED([SPL_META_VERSION], ["$SPL_META_VERSION"], [Define the project version.] ) - AC_SUBST([META_VERSION]) + AC_SUBST([SPL_META_VERSION]) fi - META_RELEASE=_SPL_AC_META_GETVAL([RELEASE]); - if test -n "$META_RELEASE"; then - AC_DEFINE_UNQUOTED([META_RELEASE], ["$META_RELEASE"], + SPL_META_RELEASE=_SPL_AC_META_GETVAL([RELEASE]); + if test -n "$SPL_META_RELEASE"; then + AC_DEFINE_UNQUOTED([SPL_META_RELEASE], ["$SPL_META_RELEASE"], [Define the project release.] ) - AC_SUBST([META_RELEASE]) + AC_SUBST([SPL_META_RELEASE]) fi - if test -n "$META_NAME" -a -n "$META_VERSION"; then - META_ALIAS="$META_NAME-$META_VERSION" - test -n "$META_RELEASE" && - META_ALIAS="$META_ALIAS-$META_RELEASE" + if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then + META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" + test -n "$SPL_META_RELEASE" && + META_ALIAS="$META_ALIAS-$SPL_META_RELEASE" AC_DEFINE_UNQUOTED([META_ALIAS], ["$META_ALIAS"], [Define the project alias string.] @@ -48,49 +48,49 @@ AC_DEFUN([SPL_AC_META], [ AC_SUBST([META_ALIAS]) fi - META_DATE=_SPL_AC_META_GETVAL([DATE]); - if test -n "$META_DATE"; then - AC_DEFINE_UNQUOTED([META_DATE], ["$META_DATE"], + SPL_META_DATA=_SPL_AC_META_GETVAL([DATE]); + if test -n "$SPL_META_DATA"; then + AC_DEFINE_UNQUOTED([SPL_META_DATA], ["$SPL_META_DATA"], [Define the project release date.] ) - AC_SUBST([META_DATE]) + AC_SUBST([SPL_META_DATA]) fi - META_AUTHOR=_SPL_AC_META_GETVAL([AUTHOR]); - if test -n "$META_AUTHOR"; then - AC_DEFINE_UNQUOTED([META_AUTHOR], ["$META_AUTHOR"], + SPL_META_AUTHOR=_SPL_AC_META_GETVAL([AUTHOR]); + if test -n "$SPL_META_AUTHOR"; then + AC_DEFINE_UNQUOTED([SPL_META_AUTHOR], ["$SPL_META_AUTHOR"], [Define the project author.] ) - AC_SUBST([META_AUTHOR]) + AC_SUBST([SPL_META_AUTHOR]) fi m4_pattern_allow([^LT_(CURRENT|REVISION|AGE)$]) - META_LT_CURRENT=_SPL_AC_META_GETVAL([LT_CURRENT]); - META_LT_REVISION=_SPL_AC_META_GETVAL([LT_REVISION]); - META_LT_AGE=_SPL_AC_META_GETVAL([LT_AGE]); - if test -n "$META_LT_CURRENT" \ - -o -n "$META_LT_REVISION" \ - -o -n "$META_LT_AGE"; then - test -n "$META_LT_CURRENT" || META_LT_CURRENT="0" - test -n "$META_LT_REVISION" || META_LT_REVISION="0" - test -n "$META_LT_AGE" || META_LT_AGE="0" - AC_DEFINE_UNQUOTED([META_LT_CURRENT], - ["$META_LT_CURRENT"], + SPL_META_LT_CURRENT=_SPL_AC_META_GETVAL([LT_CURRENT]); + SPL_META_LT_REVISION=_SPL_AC_META_GETVAL([LT_REVISION]); + SPL_META_LT_AGE=_SPL_AC_META_GETVAL([LT_AGE]); + if test -n "$SPL_META_LT_CURRENT" \ + -o -n "$SPL_META_LT_REVISION" \ + -o -n "$SPL_META_LT_AGE"; then + test -n "$SPL_META_LT_CURRENT" || SPL_META_LT_CURRENT="0" + test -n "$SPL_META_LT_REVISION" || SPL_META_LT_REVISION="0" + test -n "$SPL_META_LT_AGE" || SPL_META_LT_AGE="0" + AC_DEFINE_UNQUOTED([SPL_META_LT_CURRENT], + ["$SPL_META_LT_CURRENT"], [Define the libtool library 'current' version information.] ) - AC_DEFINE_UNQUOTED([META_LT_REVISION], - ["$META_LT_REVISION"], + AC_DEFINE_UNQUOTED([SPL_META_LT_REVISION], + ["$SPL_META_LT_REVISION"], [Define the libtool library 'revision' version information.] ) - AC_DEFINE_UNQUOTED([META_LT_AGE], ["$META_LT_AGE"], + AC_DEFINE_UNQUOTED([SPL_META_LT_AGE], ["$SPL_META_LT_AGE"], [Define the libtool library 'age' version information.] ) - AC_SUBST([META_LT_CURRENT]) - AC_SUBST([META_LT_REVISION]) - AC_SUBST([META_LT_AGE]) + AC_SUBST([SPL_META_LT_CURRENT]) + AC_SUBST([SPL_META_LT_REVISION]) + AC_SUBST([SPL_META_LT_AGE]) fi fi diff --git a/configure b/configure index 8fa6783b8..16f877f91 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS META_NAME META_VERSION META_RELEASE META_ALIAS META_DATE META_AUTHOR META_LT_CURRENT META_LT_REVISION META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1512,7 +1512,7 @@ echo $ECHO_N "checking metadata... $ECHO_C" >&6 if test -f "$META"; then _spl_ac_meta_got_file=yes - META_NAME=`perl -n\ + SPL_META_NAME=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1522,16 +1522,16 @@ echo $ECHO_N "checking metadata... $ECHO_C" >&6 -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ '(?:NAME|PROJECT|PACKAGE)' $META`; - if test -n "$META_NAME"; then + if test -n "$SPL_META_NAME"; then cat >>confdefs.h <<_ACEOF -#define META_NAME "$META_NAME" +#define SPL_META_NAME "$SPL_META_NAME" _ACEOF fi - META_VERSION=`perl -n\ + SPL_META_VERSION=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1541,16 +1541,16 @@ _ACEOF -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ 'VERSION' $META`; - if test -n "$META_VERSION"; then + if test -n "$SPL_META_VERSION"; then cat >>confdefs.h <<_ACEOF -#define META_VERSION "$META_VERSION" +#define SPL_META_VERSION "$SPL_META_VERSION" _ACEOF fi - META_RELEASE=`perl -n\ + SPL_META_RELEASE=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1560,19 +1560,19 @@ _ACEOF -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ 'RELEASE' $META`; - if test -n "$META_RELEASE"; then + if test -n "$SPL_META_RELEASE"; then cat >>confdefs.h <<_ACEOF -#define META_RELEASE "$META_RELEASE" +#define SPL_META_RELEASE "$SPL_META_RELEASE" _ACEOF fi - if test -n "$META_NAME" -a -n "$META_VERSION"; then - META_ALIAS="$META_NAME-$META_VERSION" - test -n "$META_RELEASE" && - META_ALIAS="$META_ALIAS-$META_RELEASE" + if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then + META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" + test -n "$SPL_META_RELEASE" && + META_ALIAS="$META_ALIAS-$SPL_META_RELEASE" cat >>confdefs.h <<_ACEOF #define META_ALIAS "$META_ALIAS" @@ -1581,7 +1581,7 @@ _ACEOF fi - META_DATE=`perl -n\ + SPL_META_DATA=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1591,16 +1591,16 @@ _ACEOF -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ 'DATE' $META`; - if test -n "$META_DATE"; then + if test -n "$SPL_META_DATA"; then cat >>confdefs.h <<_ACEOF -#define META_DATE "$META_DATE" +#define SPL_META_DATA "$SPL_META_DATA" _ACEOF fi - META_AUTHOR=`perl -n\ + SPL_META_AUTHOR=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1610,17 +1610,17 @@ _ACEOF -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ 'AUTHOR' $META`; - if test -n "$META_AUTHOR"; then + if test -n "$SPL_META_AUTHOR"; then cat >>confdefs.h <<_ACEOF -#define META_AUTHOR "$META_AUTHOR" +#define SPL_META_AUTHOR "$SPL_META_AUTHOR" _ACEOF fi - META_LT_CURRENT=`perl -n\ + SPL_META_LT_CURRENT=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1630,7 +1630,7 @@ _ACEOF -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ 'LT_CURRENT' $META`; - META_LT_REVISION=`perl -n\ + SPL_META_LT_REVISION=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1640,7 +1640,7 @@ _ACEOF -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ 'LT_REVISION' $META`; - META_LT_AGE=`perl -n\ + SPL_META_LT_AGE=`perl -n\ -e "BEGIN { \\$key=shift @ARGV; }"\ -e "next unless s/^\s*\\$key[:=]//i;"\ -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ @@ -1650,25 +1650,25 @@ _ACEOF -e "\\$val=\\$_;"\ -e "END { print \\$val if defined \\$val; }"\ 'LT_AGE' $META`; - if test -n "$META_LT_CURRENT" \ - -o -n "$META_LT_REVISION" \ - -o -n "$META_LT_AGE"; then - test -n "$META_LT_CURRENT" || META_LT_CURRENT="0" - test -n "$META_LT_REVISION" || META_LT_REVISION="0" - test -n "$META_LT_AGE" || META_LT_AGE="0" + if test -n "$SPL_META_LT_CURRENT" \ + -o -n "$SPL_META_LT_REVISION" \ + -o -n "$SPL_META_LT_AGE"; then + test -n "$SPL_META_LT_CURRENT" || SPL_META_LT_CURRENT="0" + test -n "$SPL_META_LT_REVISION" || SPL_META_LT_REVISION="0" + test -n "$SPL_META_LT_AGE" || SPL_META_LT_AGE="0" cat >>confdefs.h <<_ACEOF -#define META_LT_CURRENT "$META_LT_CURRENT" +#define SPL_META_LT_CURRENT "$SPL_META_LT_CURRENT" _ACEOF cat >>confdefs.h <<_ACEOF -#define META_LT_REVISION "$META_LT_REVISION" +#define SPL_META_LT_REVISION "$SPL_META_LT_REVISION" _ACEOF cat >>confdefs.h <<_ACEOF -#define META_LT_AGE "$META_LT_AGE" +#define SPL_META_LT_AGE "$SPL_META_LT_AGE" _ACEOF @@ -2069,8 +2069,8 @@ fi # Define the identity of the package. - PACKAGE=$META_NAME - VERSION=$META_VERSION + PACKAGE=$SPL_META_NAME + VERSION=$SPL_META_VERSION cat >>confdefs.h <<_ACEOF @@ -21102,15 +21102,15 @@ s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t -s,@META_NAME@,$META_NAME,;t t -s,@META_VERSION@,$META_VERSION,;t t -s,@META_RELEASE@,$META_RELEASE,;t t +s,@SPL_META_NAME@,$SPL_META_NAME,;t t +s,@SPL_META_VERSION@,$SPL_META_VERSION,;t t +s,@SPL_META_RELEASE@,$SPL_META_RELEASE,;t t s,@META_ALIAS@,$META_ALIAS,;t t -s,@META_DATE@,$META_DATE,;t t -s,@META_AUTHOR@,$META_AUTHOR,;t t -s,@META_LT_CURRENT@,$META_LT_CURRENT,;t t -s,@META_LT_REVISION@,$META_LT_REVISION,;t t -s,@META_LT_AGE@,$META_LT_AGE,;t t +s,@SPL_META_DATA@,$SPL_META_DATA,;t t +s,@SPL_META_AUTHOR@,$SPL_META_AUTHOR,;t t +s,@SPL_META_LT_CURRENT@,$SPL_META_LT_CURRENT,;t t +s,@SPL_META_LT_REVISION@,$SPL_META_LT_REVISION,;t t +s,@SPL_META_LT_AGE@,$SPL_META_LT_AGE,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t diff --git a/configure.ac b/configure.ac index 5a86b246b..ca19adc4e 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ AC_INIT SPL_AC_META AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE([$META_NAME], [$META_VERSION]) +AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) AC_CONFIG_HEADERS([spl_config.h]) AM_MAINTAINER_MODE diff --git a/include/Makefile.in b/include/Makefile.in index 4b27a5208..8e36757ab 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -107,14 +107,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ META_ALIAS = @META_ALIAS@ -META_AUTHOR = @META_AUTHOR@ -META_DATE = @META_DATE@ -META_LT_AGE = @META_LT_AGE@ -META_LT_CURRENT = @META_LT_CURRENT@ -META_LT_REVISION = @META_LT_REVISION@ -META_NAME = @META_NAME@ -META_RELEASE = @META_RELEASE@ -META_VERSION = @META_VERSION@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -127,6 +119,14 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index 6dc6ac98e..3c3d50c3d 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -98,14 +98,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ META_ALIAS = @META_ALIAS@ -META_AUTHOR = @META_AUTHOR@ -META_DATE = @META_DATE@ -META_LT_AGE = @META_LT_AGE@ -META_LT_CURRENT = @META_LT_CURRENT@ -META_LT_REVISION = @META_LT_REVISION@ -META_NAME = @META_NAME@ -META_RELEASE = @META_RELEASE@ -META_VERSION = @META_VERSION@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -118,6 +110,14 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 264079880..0390165f3 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -115,14 +115,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ META_ALIAS = @META_ALIAS@ -META_AUTHOR = @META_AUTHOR@ -META_DATE = @META_DATE@ -META_LT_AGE = @META_LT_AGE@ -META_LT_CURRENT = @META_LT_CURRENT@ -META_LT_REVISION = @META_LT_REVISION@ -META_NAME = @META_NAME@ -META_RELEASE = @META_RELEASE@ -META_VERSION = @META_VERSION@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -135,6 +127,14 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 026feee21..269c3080a 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -99,14 +99,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ META_ALIAS = @META_ALIAS@ -META_AUTHOR = @META_AUTHOR@ -META_DATE = @META_DATE@ -META_LT_AGE = @META_LT_AGE@ -META_LT_CURRENT = @META_LT_CURRENT@ -META_LT_REVISION = @META_LT_REVISION@ -META_NAME = @META_NAME@ -META_RELEASE = @META_RELEASE@ -META_VERSION = @META_VERSION@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -119,6 +111,14 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ diff --git a/spl_config.h.in b/spl_config.h.in index 09d0d917a..64b00244a 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -111,30 +111,6 @@ /* Define the project alias string. */ #undef META_ALIAS -/* Define the project author. */ -#undef META_AUTHOR - -/* Define the project release date. */ -#undef META_DATE - -/* Define the libtool library 'age' version information. */ -#undef META_LT_AGE - -/* Define the libtool library 'current' version information. */ -#undef META_LT_CURRENT - -/* Define the libtool library 'revision' version information. */ -#undef META_LT_REVISION - -/* Define the project name. */ -#undef META_NAME - -/* Define the project release. */ -#undef META_RELEASE - -/* Define the project version. */ -#undef META_VERSION - /* Define to 1 to disable debug tracing */ #undef NDEBUG @@ -156,6 +132,30 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define the project author. */ +#undef SPL_META_AUTHOR + +/* Define the project release date. */ +#undef SPL_META_DATA + +/* Define the libtool library 'age' version information. */ +#undef SPL_META_LT_AGE + +/* Define the libtool library 'current' version information. */ +#undef SPL_META_LT_CURRENT + +/* Define the libtool library 'revision' version information. */ +#undef SPL_META_LT_REVISION + +/* Define the project name. */ +#undef SPL_META_NAME + +/* Define the project release. */ +#undef SPL_META_RELEASE + +/* Define the project version. */ +#undef SPL_META_VERSION + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS From 72e7de60262b8a1925e0a384a76cc1d745ea310e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 26 Nov 2008 13:26:05 -0800 Subject: [PATCH 0177/1062] Prefix META_ALIAS with SPL_ --- Makefile.in | 2 +- cmd/Makefile.in | 2 +- config/spl-meta.m4 | 10 +++++----- configure | 10 +++++----- include/Makefile.in | 2 +- include/sys/Makefile.in | 2 +- lib/Makefile.in | 2 +- scripts/Makefile.in | 2 +- spl_config.h.in | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Makefile.in b/Makefile.in index d387b77a3..8eea6c97d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -124,7 +124,6 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -META_ALIAS = @META_ALIAS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -137,6 +136,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ SPL_META_LT_AGE = @SPL_META_LT_AGE@ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 2a49bc5f2..e31c3bdcd 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -120,7 +120,6 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -META_ALIAS = @META_ALIAS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -133,6 +132,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ SPL_META_LT_AGE = @SPL_META_LT_AGE@ diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index e58ed673f..0fd1f65d0 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -38,14 +38,14 @@ AC_DEFUN([SPL_AC_META], [ fi if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then - META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" + SPL_META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" test -n "$SPL_META_RELEASE" && - META_ALIAS="$META_ALIAS-$SPL_META_RELEASE" - AC_DEFINE_UNQUOTED([META_ALIAS], - ["$META_ALIAS"], + SPL_META_ALIAS="$SPL_META_ALIAS-$SPL_META_RELEASE" + AC_DEFINE_UNQUOTED([SPL_META_ALIAS], + ["$SPL_META_ALIAS"], [Define the project alias string.] ) - AC_SUBST([META_ALIAS]) + AC_SUBST([SPL_META_ALIAS]) fi SPL_META_DATA=_SPL_AC_META_GETVAL([DATE]); diff --git a/configure b/configure index 16f877f91..c0b771407 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1570,12 +1570,12 @@ _ACEOF fi if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then - META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" + SPL_META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" test -n "$SPL_META_RELEASE" && - META_ALIAS="$META_ALIAS-$SPL_META_RELEASE" + SPL_META_ALIAS="$SPL_META_ALIAS-$SPL_META_RELEASE" cat >>confdefs.h <<_ACEOF -#define META_ALIAS "$META_ALIAS" +#define SPL_META_ALIAS "$SPL_META_ALIAS" _ACEOF @@ -21105,7 +21105,7 @@ s,@LIBS@,$LIBS,;t t s,@SPL_META_NAME@,$SPL_META_NAME,;t t s,@SPL_META_VERSION@,$SPL_META_VERSION,;t t s,@SPL_META_RELEASE@,$SPL_META_RELEASE,;t t -s,@META_ALIAS@,$META_ALIAS,;t t +s,@SPL_META_ALIAS@,$SPL_META_ALIAS,;t t s,@SPL_META_DATA@,$SPL_META_DATA,;t t s,@SPL_META_AUTHOR@,$SPL_META_AUTHOR,;t t s,@SPL_META_LT_CURRENT@,$SPL_META_LT_CURRENT,;t t diff --git a/include/Makefile.in b/include/Makefile.in index 8e36757ab..acbd552fa 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -106,7 +106,6 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -META_ALIAS = @META_ALIAS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -119,6 +118,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ SPL_META_LT_AGE = @SPL_META_LT_AGE@ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index 3c3d50c3d..d03422b0f 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -97,7 +97,6 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -META_ALIAS = @META_ALIAS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -110,6 +109,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ SPL_META_LT_AGE = @SPL_META_LT_AGE@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 0390165f3..e4097785b 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -114,7 +114,6 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -META_ALIAS = @META_ALIAS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -127,6 +126,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ SPL_META_LT_AGE = @SPL_META_LT_AGE@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 269c3080a..e82088e59 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -98,7 +98,6 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -META_ALIAS = @META_ALIAS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -111,6 +110,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ SPL_META_LT_AGE = @SPL_META_LT_AGE@ diff --git a/spl_config.h.in b/spl_config.h.in index 64b00244a..dfca13d09 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -108,9 +108,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define the project alias string. */ -#undef META_ALIAS - /* Define to 1 to disable debug tracing */ #undef NDEBUG @@ -132,6 +129,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define the project alias string. */ +#undef SPL_META_ALIAS + /* Define the project author. */ #undef SPL_META_AUTHOR From 857c63f413b16f723ebd408b3b753d1a45bff924 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 5 Dec 2008 16:20:09 -0800 Subject: [PATCH 0178/1062] Refresh --- libtool | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libtool b/libtool index 7f0815003..30d9b0952 100755 --- a/libtool +++ b/libtool @@ -1,7 +1,7 @@ #! /bin/sh # libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU spl 0.3.5) +# Generated automatically by (GNU spl 0.4.0) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host ilc18: +# Libtool was configured on host ilci: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -100,7 +100,7 @@ gcc_ver=`gcc -dumpversion` EGREP="grep -E" # The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" +LD="/usr/local/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -7266,7 +7266,7 @@ disable_libs=static # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host ilc18: +# Libtool was configured on host ilci: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7322,7 +7322,7 @@ gcc_ver=`gcc -dumpversion` EGREP="grep -E" # The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" +LD="/usr/local/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -7574,7 +7574,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host ilc18: +# Libtool was configured on host ilci: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7630,7 +7630,7 @@ gcc_ver=`gcc -dumpversion` EGREP="grep -E" # The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" +LD="/usr/local/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" From 2ee63a549ae18875ded60ec2f0fc7315e076c326 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 5 Dec 2008 16:23:57 -0800 Subject: [PATCH 0179/1062] Add struct ddi_strtox functions --- include/sys/sunddi.h | 5 ++++ modules/spl/spl-generic.c | 59 +++++++++++++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index dea09d171..cf9c8ebc7 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -200,6 +200,11 @@ extern void __ddi_remove_minor_node(dev_info_t *dip, char *name); extern int __mod_install(struct modlinkage *modlp); extern int __mod_remove(struct modlinkage *modlp); +extern int ddi_strtoul(const char *, char **, int, unsigned long *); +extern int ddi_strtol(const char *, char **, int, long *); +extern int ddi_strtoull(const char *, char **, int, unsigned long long *); +extern int ddi_strtoll(const char *, char **, int, long long *); + static __inline__ void ddi_report_dev(dev_info_t *d) { } static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { } diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 944d70e72..58b595170 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -125,13 +125,60 @@ uint64_t __umoddi3(uint64_t dividend, uint64_t divisor) EXPORT_SYMBOL(__umoddi3); #endif -int -ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) -{ - char *end; - return (*result = simple_strtoul(str, &end, base)); -} +int ddi_strtoul(const char *, char **, int, unsigned long *); +int ddi_strtol(const char *, char **, int, long *); +int ddi_strtoull(const char *, char **, int, unsigned long long *); +int ddi_strtoll(const char *, char **, int, long long *); + +#define define_ddi_strtoux(type, valtype) \ +int ddi_strtou##type(const char *str, char **endptr, \ + int base, valtype *result) \ +{ \ + valtype val; \ + size_t len; \ + \ + len = strlen(str); \ + if (len == 0) \ + return -EINVAL; \ + \ + val = simple_strtoul(str, endptr, (unsigned int)base); \ + if ((**endptr == '\0') || \ + ((len == (size_t)(*endptr-str) + 1) && (**endptr == '\n'))) {\ + *result = val; \ + return 0; \ + } \ + \ + return -EINVAL; \ +} \ + +#define define_ddi_strtox(type, valtype) \ +int ddi_strto##type(const char *str, char **endptr, \ + int base, valtype *result) \ +{ \ + int ret; \ + \ + if (*str == '-') { \ + ret = ddi_strtou##type(str+1, endptr, \ + (unsigned int)base, result); \ + if (!ret) \ + *result = -(*result); \ + } else { \ + ret = ddi_strtou##type(str, endptr, \ + (unsigned int)base, result); \ + } \ + \ + return ret; \ +} \ + +define_ddi_strtoux(l, unsigned long) +define_ddi_strtox(l, long) +define_ddi_strtoux(ll, unsigned long long) +define_ddi_strtox(ll, long long) + EXPORT_SYMBOL(ddi_strtoul); +EXPORT_SYMBOL(ddi_strtol); +EXPORT_SYMBOL(ddi_strtoll); +EXPORT_SYMBOL(ddi_strtoull); struct new_utsname *__utsname(void) { From f5b92a66adc809499972a4012a9cccdd2a2fd6ef Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 13:03:09 -0800 Subject: [PATCH 0180/1062] Add a few more missing header which the upstream stock kernel context expects --- include/sys/bitmap.h | 4 ++++ include/sys/conf.h | 4 ++++ include/sys/cpuvar.h | 4 ++++ include/sys/dirent.h | 4 ++++ include/sys/disp.h | 4 ++++ include/sys/list.h | 4 ++++ include/sys/note.h | 4 ++++ include/sys/t_lock.h | 4 ++++ 8 files changed, 32 insertions(+) create mode 100644 include/sys/bitmap.h create mode 100644 include/sys/conf.h create mode 100644 include/sys/cpuvar.h create mode 100644 include/sys/dirent.h create mode 100644 include/sys/disp.h create mode 100644 include/sys/list.h create mode 100644 include/sys/note.h create mode 100644 include/sys/t_lock.h diff --git a/include/sys/bitmap.h b/include/sys/bitmap.h new file mode 100644 index 000000000..1bf09e66c --- /dev/null +++ b/include/sys/bitmap.h @@ -0,0 +1,4 @@ +#ifndef _SPL_BITMAP_H +#define _SPL_BITMAP_H + +#endif /* SPL_BITMAP_H */ diff --git a/include/sys/conf.h b/include/sys/conf.h new file mode 100644 index 000000000..4166b0c23 --- /dev/null +++ b/include/sys/conf.h @@ -0,0 +1,4 @@ +#ifndef _SPL_CONF_H +#define _SPL_CONF_H + +#endif /* SPL_CONF_H */ diff --git a/include/sys/cpuvar.h b/include/sys/cpuvar.h new file mode 100644 index 000000000..56ad7a41e --- /dev/null +++ b/include/sys/cpuvar.h @@ -0,0 +1,4 @@ +#ifndef _SPL_CPUVAR_H +#define _SPL_CPUVAR_H + +#endif /* SPL_CPUVAR_H */ diff --git a/include/sys/dirent.h b/include/sys/dirent.h new file mode 100644 index 000000000..ac4c701bb --- /dev/null +++ b/include/sys/dirent.h @@ -0,0 +1,4 @@ +#ifndef _SPL_DIRENT_H +#define _SPL_DIRENT_H + +#endif /* SPL_DIRENT_H */ diff --git a/include/sys/disp.h b/include/sys/disp.h new file mode 100644 index 000000000..7ff9e3ba3 --- /dev/null +++ b/include/sys/disp.h @@ -0,0 +1,4 @@ +#ifndef _SPL_DISP_H +#define _SPL_DISP_H + +#endif /* SPL_DISP_H */ diff --git a/include/sys/list.h b/include/sys/list.h new file mode 100644 index 000000000..465576d5c --- /dev/null +++ b/include/sys/list.h @@ -0,0 +1,4 @@ +#ifndef _SPL_LIST_H +#define _SPL_LIST_H + +#endif /* SPL_LIST_H */ diff --git a/include/sys/note.h b/include/sys/note.h new file mode 100644 index 000000000..835d1d5ad --- /dev/null +++ b/include/sys/note.h @@ -0,0 +1,4 @@ +#ifndef _SPL_NOTE_H +#define _SPL_NOTE_H + +#endif /* SPL_NOTE_H */ diff --git a/include/sys/t_lock.h b/include/sys/t_lock.h new file mode 100644 index 000000000..9e6f2ea3f --- /dev/null +++ b/include/sys/t_lock.h @@ -0,0 +1,4 @@ +#ifndef _SPL_T_LOCK_H +#define _SPL_T_LOCK_H + +#endif /* SPL_T_LOCK_H */ From c1d42c2f1db1b9c7e89bfbfd79a52ca9de78a404 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 13:05:50 -0800 Subject: [PATCH 0181/1062] Add header --- include/vm/seg_kmem.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 include/vm/seg_kmem.h diff --git a/include/vm/seg_kmem.h b/include/vm/seg_kmem.h new file mode 100644 index 000000000..3cbd6b1eb --- /dev/null +++ b/include/vm/seg_kmem.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SEG_KMEM_H +#define _SPL_SEG_KMEM_H + +#endif /* SPL_SEG_KMEM_H */ From 926e2b6058867123809979c2e6bf5dbcc13fa4a2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 13:18:39 -0800 Subject: [PATCH 0182/1062] Pull in lock types --- include/sys/t_lock.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sys/t_lock.h b/include/sys/t_lock.h index 9e6f2ea3f..0e7d8ae9e 100644 --- a/include/sys/t_lock.h +++ b/include/sys/t_lock.h @@ -1,4 +1,9 @@ #ifndef _SPL_T_LOCK_H #define _SPL_T_LOCK_H +#include +#include +#include +#include + #endif /* SPL_T_LOCK_H */ From dc0f920710ecaa023df893216987c318c2e2b721 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 13:25:52 -0800 Subject: [PATCH 0183/1062] Minor updates --- include/sys/list.h | 35 +++++++++++++++++++++++++++++++++++ include/sys/u8_textprep.h | 4 ++++ 2 files changed, 39 insertions(+) create mode 100644 include/sys/u8_textprep.h diff --git a/include/sys/list.h b/include/sys/list.h index 465576d5c..73bbca0c9 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -1,4 +1,39 @@ #ifndef _SPL_LIST_H #define _SPL_LIST_H +#include + +typedef struct list_node { + struct list_node *list_next; + struct list_node *list_prev; +} list_node_t; + +typedef struct list { + size_t list_size; + size_t list_offset; + struct list_node list_head; +} list_t; + +void list_create(list_t *, size_t, size_t); +void list_destroy(list_t *); + +void list_insert_after(list_t *, void *, void *); +void list_insert_before(list_t *, void *, void *); +void list_insert_head(list_t *, void *); +void list_insert_tail(list_t *, void *); +void list_remove(list_t *, void *); +void *list_remove_head(list_t *); +void *list_remove_tail(list_t *); + +void *list_head(list_t *); +void *list_tail(list_t *); +void *list_next(list_t *, void *); +void *list_prev(list_t *, void *); +int list_is_empty(list_t *); + +void list_link_init(list_node_t *); +void list_link_replace(list_node_t *, list_node_t *); + +int list_link_active(list_node_t *); + #endif /* SPL_LIST_H */ diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h new file mode 100644 index 000000000..e659548e3 --- /dev/null +++ b/include/sys/u8_textprep.h @@ -0,0 +1,4 @@ +#ifndef _SPL_U8_TEXTPREP_H +#define _SPL_U8_TEXTPREP_H + +#endif /* SPL_U8_TEXTPREP_H */ From 9d457afd1b39e6bb5eccf0de80d82ef08b7c190b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 13:30:04 -0800 Subject: [PATCH 0184/1062] Add sunddi to uio --- include/sys/uio.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/uio.h b/include/sys/uio.h index 0ef7aab63..502b4b328 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -4,6 +4,7 @@ #include #include #include +#include typedef enum uio_rw { UIO_READ = 0, From de79fdd3a83acb63c2aedddb4b67f0c9379dd608 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 13:32:07 -0800 Subject: [PATCH 0185/1062] Move sunddi include --- include/sys/systm.h | 2 ++ include/sys/uio.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sys/systm.h b/include/sys/systm.h index ca6cca5ce..1fb367a9b 100644 --- a/include/sys/systm.h +++ b/include/sys/systm.h @@ -1,4 +1,6 @@ #ifndef _SPL_SYSTM_H #define _SPL_SYSTM_H +#include + #endif /* SPL_SYSTM_H */ diff --git a/include/sys/uio.h b/include/sys/uio.h index 502b4b328..0ef7aab63 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -4,7 +4,6 @@ #include #include #include -#include typedef enum uio_rw { UIO_READ = 0, From bbdec3be06d38b2cf4fd83043b9424e0a240976a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 15:38:15 -0800 Subject: [PATCH 0186/1062] Add u8 stub --- include/sys/u8_textprep.h | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h index e659548e3..c8f6e4fe4 100644 --- a/include/sys/u8_textprep.h +++ b/include/sys/u8_textprep.h @@ -1,4 +1,44 @@ #ifndef _SPL_U8_TEXTPREP_H #define _SPL_U8_TEXTPREP_H +#define U8_STRCMP_CS (0x00000001) +#define U8_STRCMP_CI_UPPER (0x00000002) +#define U8_STRCMP_CI_LOWER (0x00000004) + +#define U8_CANON_DECOMP (0x00000010) +#define U8_COMPAT_DECOMP (0x00000020) +#define U8_CANON_COMP (0x00000040) + +#define U8_STRCMP_NFD (U8_CANON_DECOMP) +#define U8_STRCMP_NFC (U8_CANON_DECOMP | U8_CANON_COMP) +#define U8_STRCMP_NFKD (U8_COMPAT_DECOMP) +#define U8_STRCMP_NFKC (U8_COMPAT_DECOMP | U8_CANON_COMP) + +#define U8_TEXTPREP_TOUPPER (U8_STRCMP_CI_UPPER) +#define U8_TEXTPREP_TOLOWER (U8_STRCMP_CI_LOWER) + +#define U8_TEXTPREP_NFD (U8_STRCMP_NFD) +#define U8_TEXTPREP_NFC (U8_STRCMP_NFC) +#define U8_TEXTPREP_NFKD (U8_STRCMP_NFKD) +#define U8_TEXTPREP_NFKC (U8_STRCMP_NFKC) + +#define U8_TEXTPREP_IGNORE_NULL (0x00010000) +#define U8_TEXTPREP_IGNORE_INVALID (0x00020000) +#define U8_TEXTPREP_NOWAIT (0x00040000) + +#define U8_UNICODE_320 (0) +#define U8_UNICODE_500 (1) +#define U8_UNICODE_LATEST (U8_UNICODE_500) + +#define U8_VALIDATE_ENTIRE (0x00100000) +#define U8_VALIDATE_CHECK_ADDITIONAL (0x00200000) +#define U8_VALIDATE_UCS2_RANGE (0x00400000) + +#define U8_ILLEGAL_CHAR (-1) +#define U8_OUT_OF_RANGE_CHAR (-2) + +extern int u8_validate(char *, size_t, char **, int, int *); +extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *); +extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t, int *); + #endif /* SPL_U8_TEXTPREP_H */ From 2b88beb74f0654a229d13b191bde441c4a3f4a5a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 15:40:20 -0800 Subject: [PATCH 0187/1062] Add timer.h header --- include/sys/time.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/time.h b/include/sys/time.h index 408edf97e..5b263f82c 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -39,6 +39,7 @@ extern "C" { #include #include #include +#include #define TIME32_MAX INT32_MAX #define TIME32_MIN INT32_MIN From bb9cfc6cc3918a2458a92d38e926fd5b04efa817 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 15:59:36 -0800 Subject: [PATCH 0188/1062] Define needfree --- include/sys/vmsystm.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index e10a1dc54..e92c17bdd 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -38,6 +38,7 @@ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ #define freemem nr_free_pages() // Expensive on linux, // cheap on solaris #define minfree 0 +#define needfree 0 /* # of needed pages */ #define ptob(pages) (pages * PAGE_SIZE) #define membar_producer() smp_wmb() @@ -93,10 +94,6 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) * processes but not yet allocated */ #define deficit 0 -/* A guess as to how many page are needed to satisfy - * stalled page creation requests */ -#define needfree 0 - /* A bootlean the controls the setting of deficit */ #define desperate From 925ca8cc011007ef56e497607a466c0696595775 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 16:27:36 -0800 Subject: [PATCH 0189/1062] Add sys/thread.h --- include/sys/taskq.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index cedf5350c..7a0be048c 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -37,6 +37,7 @@ extern "C" { #include #include #include +#include #define TASKQ_NAMELEN 31 From f3fc90c249268f888a105cbcaab05821f875bb4a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Dec 2008 16:48:15 -0800 Subject: [PATCH 0190/1062] Include the header --- include/vm/seg_kmem.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/vm/seg_kmem.h b/include/vm/seg_kmem.h index 3cbd6b1eb..df620e73d 100644 --- a/include/vm/seg_kmem.h +++ b/include/vm/seg_kmem.h @@ -1,4 +1,6 @@ #ifndef _SPL_SEG_KMEM_H #define _SPL_SEG_KMEM_H +#include + #endif /* SPL_SEG_KMEM_H */ From 8a2b328b18f52ff411ba6b223a3b11461c841135 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Jan 2009 11:32:08 -0800 Subject: [PATCH 0191/1062] Remove u8_textprep, we will not be implementing this nightmare yet --- include/sys/u8_textprep.h | 44 --------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 include/sys/u8_textprep.h diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h deleted file mode 100644 index c8f6e4fe4..000000000 --- a/include/sys/u8_textprep.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _SPL_U8_TEXTPREP_H -#define _SPL_U8_TEXTPREP_H - -#define U8_STRCMP_CS (0x00000001) -#define U8_STRCMP_CI_UPPER (0x00000002) -#define U8_STRCMP_CI_LOWER (0x00000004) - -#define U8_CANON_DECOMP (0x00000010) -#define U8_COMPAT_DECOMP (0x00000020) -#define U8_CANON_COMP (0x00000040) - -#define U8_STRCMP_NFD (U8_CANON_DECOMP) -#define U8_STRCMP_NFC (U8_CANON_DECOMP | U8_CANON_COMP) -#define U8_STRCMP_NFKD (U8_COMPAT_DECOMP) -#define U8_STRCMP_NFKC (U8_COMPAT_DECOMP | U8_CANON_COMP) - -#define U8_TEXTPREP_TOUPPER (U8_STRCMP_CI_UPPER) -#define U8_TEXTPREP_TOLOWER (U8_STRCMP_CI_LOWER) - -#define U8_TEXTPREP_NFD (U8_STRCMP_NFD) -#define U8_TEXTPREP_NFC (U8_STRCMP_NFC) -#define U8_TEXTPREP_NFKD (U8_STRCMP_NFKD) -#define U8_TEXTPREP_NFKC (U8_STRCMP_NFKC) - -#define U8_TEXTPREP_IGNORE_NULL (0x00010000) -#define U8_TEXTPREP_IGNORE_INVALID (0x00020000) -#define U8_TEXTPREP_NOWAIT (0x00040000) - -#define U8_UNICODE_320 (0) -#define U8_UNICODE_500 (1) -#define U8_UNICODE_LATEST (U8_UNICODE_500) - -#define U8_VALIDATE_ENTIRE (0x00100000) -#define U8_VALIDATE_CHECK_ADDITIONAL (0x00200000) -#define U8_VALIDATE_UCS2_RANGE (0x00400000) - -#define U8_ILLEGAL_CHAR (-1) -#define U8_OUT_OF_RANGE_CHAR (-2) - -extern int u8_validate(char *, size_t, char **, int, int *); -extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *); -extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t, int *); - -#endif /* SPL_U8_TEXTPREP_H */ From e9cb2b4f6458220c8b2ff1317caa022ac2ead3d4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Jan 2009 15:08:03 -0800 Subject: [PATCH 0192/1062] Add system taskq support --- include/sys/taskq.h | 6 +++++ modules/spl/spl-generic.c | 21 ++++++++++------ modules/spl/spl-taskq.c | 25 +++++++++++++++++++ modules/splat/splat-taskq.c | 49 +++++++++++++++++++++++++++++++++---- 4 files changed, 89 insertions(+), 12 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 7a0be048c..0e78ea123 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -81,12 +81,18 @@ typedef struct taskq { wait_queue_head_t tq_wait_waitq; /* wait waitq */ } taskq_t; +/* Global system-wide dynamic task queue available for all consumers */ +extern taskq_t *system_taskq; + extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); extern void __taskq_destroy(taskq_t *); extern void __taskq_wait(taskq_t *); extern int __taskq_member(taskq_t *, void *); +int spl_taskq_init(void); +void spl_taskq_fini(void); + #define taskq_member(tq, t) __taskq_member(tq, t) #define taskq_wait_id(tq, id) __taskq_wait_id(tq, id) #define taskq_wait(tq) __taskq_wait(tq) diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 58b595170..d361bff92 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -225,26 +226,31 @@ static int __init spl_init(void) if ((rc = spl_mutex_init())) GOTO(out2 , rc); - if ((rc = vn_init())) + if ((rc = spl_taskq_init())) GOTO(out3, rc); - if ((rc = proc_init())) + if ((rc = vn_init())) GOTO(out4, rc); - if ((rc = kstat_init())) + if ((rc = proc_init())) GOTO(out5, rc); + if ((rc = kstat_init())) + GOTO(out6, rc); + if ((rc = set_hostid())) - GOTO(out6, rc = -EADDRNOTAVAIL); + GOTO(out7, rc = -EADDRNOTAVAIL); printk("SPL: Loaded Solaris Porting Layer v%s\n", VERSION); RETURN(rc); -out6: +out7: kstat_fini(); -out5: +out6: proc_fini(); -out4: +out5: vn_fini(); +out4: + spl_taskq_fini(); out3: spl_mutex_fini(); out2: @@ -265,6 +271,7 @@ static void spl_fini(void) kstat_fini(); proc_fini(); vn_fini(); + spl_taskq_fini(); spl_mutex_fini(); spl_kmem_fini(); debug_fini(); diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 3c7f43cda..dc6959db5 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -33,6 +33,10 @@ #define DEBUG_SUBSYSTEM S_TASKQ +/* Global system-wide dynamic task queue available for all consumers */ +taskq_t *system_taskq; +EXPORT_SYMBOL(system_taskq); + typedef struct spl_task { spinlock_t t_lock; struct list_head t_list; @@ -464,3 +468,24 @@ __taskq_destroy(taskq_t *tq) EXIT; } EXPORT_SYMBOL(__taskq_destroy); + +int +spl_taskq_init(void) +{ + ENTRY; + + system_taskq = taskq_create("system_taskq", 64, minclsyspri, 4, 512, + TASKQ_DYNAMIC | TASKQ_PREPOPULATE); + if (system_taskq == NULL) + RETURN(1); + + RETURN(0); +} + +void +spl_taskq_fini(void) +{ + ENTRY; + taskq_destroy(system_taskq); + EXIT; +} diff --git a/modules/splat/splat-taskq.c b/modules/splat/splat-taskq.c index 4d349f071..3cc09bcb9 100644 --- a/modules/splat/splat-taskq.c +++ b/modules/splat/splat-taskq.c @@ -38,6 +38,10 @@ #define SPLAT_TASKQ_TEST2_NAME "multiple" #define SPLAT_TASKQ_TEST2_DESC "Multiple task queues, multiple tasks" +#define SPLAT_TASKQ_TEST3_ID 0x0203 +#define SPLAT_TASKQ_TEST3_NAME "system" +#define SPLAT_TASKQ_TEST3_DESC "System task queue, multiple tasks" + typedef struct splat_taskq_arg { int flag; int id; @@ -49,14 +53,14 @@ typedef struct splat_taskq_arg { * task completes, ensure task ran properly, cleanup taskq, */ static void -splat_taskq_test1_func(void *arg) +splat_taskq_test13_func(void *arg) { splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; ASSERT(tq_arg); splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' setting flag\n", - tq_arg->name, sym2str(splat_taskq_test1_func)); + tq_arg->name, sym2str(splat_taskq_test13_func)); tq_arg->flag = 1; } @@ -84,12 +88,12 @@ splat_taskq_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatching\n", - tq_arg.name, sym2str(splat_taskq_test1_func)); - if ((id = taskq_dispatch(tq, splat_taskq_test1_func, + tq_arg.name, sym2str(splat_taskq_test13_func)); + if ((id = taskq_dispatch(tq, splat_taskq_test13_func, &tq_arg, TQ_SLEEP)) == 0) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatch failed\n", - tq_arg.name, sym2str(splat_taskq_test1_func)); + tq_arg.name, sym2str(splat_taskq_test13_func)); taskq_destroy(tq); return -EINVAL; } @@ -230,6 +234,38 @@ splat_taskq_test2(struct file *file, void *arg) { return rc; } +/* Validation Test 3 - Use the global system task queue with a single + * task, * wait until task completes, ensure task ran properly. + */ +static int +splat_taskq_test3(struct file *file, void *arg) +{ + taskqid_t id; + splat_taskq_arg_t tq_arg; + + tq_arg.flag = 0; + tq_arg.id = 0; + tq_arg.file = file; + tq_arg.name = SPLAT_TASKQ_TEST3_NAME; + + splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, + "Taskq '%s' function '%s' dispatching\n", + tq_arg.name, sym2str(splat_taskq_test13_func)); + if ((id = taskq_dispatch(system_taskq, splat_taskq_test13_func, + &tq_arg, TQ_SLEEP)) == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, + "Taskq '%s' function '%s' dispatch failed\n", + tq_arg.name, sym2str(splat_taskq_test13_func)); + return -EINVAL; + } + + splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, "Taskq '%s' waiting\n", + tq_arg.name); + taskq_wait(system_taskq); + + return (tq_arg.flag) ? 0 : -EINVAL; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -251,6 +287,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST1_ID, splat_taskq_test1); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST2_NAME, SPLAT_TASKQ_TEST2_DESC, SPLAT_TASKQ_TEST2_ID, splat_taskq_test2); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST3_NAME, SPLAT_TASKQ_TEST3_DESC, + SPLAT_TASKQ_TEST3_ID, splat_taskq_test3); return sub; } @@ -259,6 +297,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST3_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST2_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST1_ID); From b53c565e6513547b6d4da9cee47b5a82d6422d47 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Jan 2009 15:37:07 -0800 Subject: [PATCH 0193/1062] Stub u8_textprep.h for inclusion purposes --- include/sys/sunddi.h | 1 + include/sys/u8_textprep.h | 4 ++++ libtool | 12 ++++++------ 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 include/sys/u8_textprep.h diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index cf9c8ebc7..090a367fe 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h new file mode 100644 index 000000000..e659548e3 --- /dev/null +++ b/include/sys/u8_textprep.h @@ -0,0 +1,4 @@ +#ifndef _SPL_U8_TEXTPREP_H +#define _SPL_U8_TEXTPREP_H + +#endif /* SPL_U8_TEXTPREP_H */ diff --git a/libtool b/libtool index 30d9b0952..c9b16afcb 100755 --- a/libtool +++ b/libtool @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host ilci: +# Libtool was configured on host wopri: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -331,7 +331,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7266,7 +7266,7 @@ disable_libs=static # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host ilci: +# Libtool was configured on host wopri: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7550,7 +7550,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7574,7 +7574,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host ilci: +# Libtool was configured on host wopri: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7861,7 +7861,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" From 0f372044172b3793a32f88741baaea146614023d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Jan 2009 16:09:21 -0800 Subject: [PATCH 0194/1062] Add DTRACE_PROBE(a) --- include/sys/sysmacros.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 95f7f8a3b..9507de0ac 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -102,6 +102,10 @@ extern "C" { #define bcmp(src,dest,size) memcmp((src), (dest), (size_t)(size)) /* Dtrace probes do not exist in the linux kernel */ +#ifdef DTRACE_PROBE +#undef DTRACE_PROBE +#endif /* DTRACE_PROBE */ +#define DTRACE_PROBE(a) ((void)0) #ifdef DTRACE_PROBE1 #undef DTRACE_PROBE1 From 7adbea4141d9ac2df0a1fc622747090d6ea91c32 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Jan 2009 16:14:38 -0800 Subject: [PATCH 0195/1062] Pull in some default page typedefs --- include/sys/types.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/sys/types.h b/include/sys/types.h index 6336bb6de..b67336bae 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -49,5 +49,8 @@ typedef longlong_t diskaddr_t; typedef ushort_t o_mode_t; typedef uint_t major_t; typedef uint_t minor_t; +typedef ulong_t pfn_t; +typedef ulong_t pgcnt_t; +typedef long spgcnt_t; #endif /* _SPL_TYPES_H */ From 160c63ab763f620592fbdc8271a3f7b66e080b74 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 6 Jan 2009 09:23:13 -0800 Subject: [PATCH 0196/1062] Add P2BOUNDARY macro --- include/sys/sysmacros.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 9507de0ac..94ff3f84e 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -165,6 +165,8 @@ extern int ddi_strtoul(const char *str, char **nptr, (-(type)(x) & ((type)(align) - 1)) #define ISP2(x) (((x) & ((x) - 1)) == 0) #define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) +#define P2BOUNDARY(off, len, align) \ + (((off) ^ ((off) + (len) - 1)) > (align) - 1) /* * Typed version of the P2* macros. These macros should be used to ensure From 4c18c39ecb2b1876ca067969f245bffdff6da56b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 6 Jan 2009 09:47:00 -0800 Subject: [PATCH 0197/1062] Add include/sys/compress.h header --- include/sys/compress.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 include/sys/compress.h diff --git a/include/sys/compress.h b/include/sys/compress.h new file mode 100644 index 000000000..a12f6784c --- /dev/null +++ b/include/sys/compress.h @@ -0,0 +1,4 @@ +#ifndef _SPL_COMPRESS_H +#define _SPL_COMPRESS_H + +#endif /* SPL_COMPRESS_H */ From d702c04ff190b17d0f3f1dbee23e769398b82c39 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 7 Jan 2009 12:54:03 -0800 Subject: [PATCH 0198/1062] Add 5 splat tests for list handling --- include/sys/list.h | 182 +++++++++++++-- modules/splat/Makefile.in | 1 + modules/splat/splat-ctl.c | 2 + modules/splat/splat-internal.h | 26 ++- modules/splat/splat-list.c | 407 +++++++++++++++++++++++++++++++++ 5 files changed, 583 insertions(+), 35 deletions(-) create mode 100644 modules/splat/splat-list.c diff --git a/include/sys/list.h b/include/sys/list.h index 73bbca0c9..0592d5c1d 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -2,38 +2,172 @@ #define _SPL_LIST_H #include +#include -typedef struct list_node { - struct list_node *list_next; - struct list_node *list_prev; -} list_node_t; +/* NOTE: We have implemented the Solaris list API in terms of the native + * linux API. This has certain advantages in terms of leveraging the linux + * list debugging infrastructure, but it also means that the internals of a + * list differ slightly than on Solaris. This is not a problem as long as + * all callers stick to the published API. The two major differences are: + * + * 1) A list_node_t is mapped to a linux list_head struct which changes + * the name of the list_next/list_prev pointers to next/prev respectively. + * + * 2) A list_node_t which is not attached to a list on Solaris is denoted + * by having its list_next/list_prev pointers set to NULL. Under linux + * the next/prev pointers are set to LIST_POISON1 and LIST_POISON2 + * respectively. At this moment this only impacts the implementation + * of the list_link_init() and list_link_active() functions. + */ + +typedef struct list_head list_node_t; typedef struct list { - size_t list_size; - size_t list_offset; - struct list_node list_head; + size_t list_size; + size_t list_offset; + list_node_t list_head; } list_t; -void list_create(list_t *, size_t, size_t); -void list_destroy(list_t *); +#define list_d2l(a, obj) ((list_node_t *)(((char *)obj) + (a)->list_offset)) +#define list_object(a, node) ((void *)(((char *)node) - (a)->list_offset)) -void list_insert_after(list_t *, void *, void *); -void list_insert_before(list_t *, void *, void *); -void list_insert_head(list_t *, void *); -void list_insert_tail(list_t *, void *); -void list_remove(list_t *, void *); -void *list_remove_head(list_t *); -void *list_remove_tail(list_t *); +static inline int +list_is_empty(list_t *list) +{ + return list_empty(&list->list_head); +} -void *list_head(list_t *); -void *list_tail(list_t *); -void *list_next(list_t *, void *); -void *list_prev(list_t *, void *); -int list_is_empty(list_t *); +static inline void +list_link_init(list_node_t *node) +{ + node->next = LIST_POISON1; + node->prev = LIST_POISON2; +} -void list_link_init(list_node_t *); -void list_link_replace(list_node_t *, list_node_t *); +static inline void +list_create(list_t *list, size_t size, size_t offset) +{ + ASSERT(list); + ASSERT(size > 0); + ASSERT(size >= offset + sizeof(list_node_t)); -int list_link_active(list_node_t *); + list->list_size = size; + list->list_offset = offset; + INIT_LIST_HEAD(&list->list_head); +} + +static inline void +list_destroy(list_t *list) +{ + ASSERT(list); + ASSERT(list_is_empty(list)); + + list_del(&list->list_head); +} + +static inline void +list_insert_head(list_t *list, void *object) +{ + list_add(list_d2l(list, object), &list->list_head); +} + +static inline void +list_insert_tail(list_t *list, void *object) +{ + list_add_tail(list_d2l(list, object), &list->list_head); +} + +static inline void +list_insert_after(list_t *list, void *object, void *nobject) +{ + if (object == NULL) + list_insert_head(list, nobject); + else + list_add(list_d2l(list, nobject), list_d2l(list, object)); +} + +static inline void +list_insert_before(list_t *list, void *object, void *nobject) +{ + if (object == NULL) + list_insert_tail(list, nobject); + else + list_add_tail(list_d2l(list, nobject), list_d2l(list, object)); +} + +static inline void +list_remove(list_t *list, void *object) +{ + ASSERT(!list_is_empty(list)); + list_del(list_d2l(list, object)); +} + +static inline void * +list_remove_head(list_t *list) +{ + list_node_t *head = list->list_head.next; + if (head == &list->list_head) + return NULL; + + list_del(head); + return list_object(list, head); +} + +static inline void * +list_remove_tail(list_t *list) +{ + list_node_t *tail = list->list_head.prev; + if (tail == &list->list_head) + return NULL; + + list_del(tail); + return list_object(list, tail); +} + +static inline void * +list_head(list_t *list) +{ + if (list_is_empty(list)) + return NULL; + + return list_object(list, list->list_head.next); +} + +static inline void * +list_tail(list_t *list) +{ + if (list_is_empty(list)) + return NULL; + + return list_object(list, list->list_head.prev); +} + +static inline void * +list_next(list_t *list, void *object) +{ + list_node_t *node = list_d2l(list, object); + + if (node->next != &list->list_head) + return list_object(list, node->next); + + return NULL; +} + +static inline void * +list_prev(list_t *list, void *object) +{ + list_node_t *node = list_d2l(list, object); + + if (node->prev != &list->list_head) + return list_object(list, node->prev); + + return NULL; +} + +static inline int +list_link_active(list_node_t *node) +{ + return (node->next != LIST_POISON1) && (node->prev != LIST_POISON2); +} #endif /* SPL_LIST_H */ diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index eaab508a9..c31be0285 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -23,6 +23,7 @@ splat-objs += splat-time.o splat-objs += splat-vnode.o splat-objs += splat-kobj.o splat-objs += splat-atomic.o +splat-objs += splat-list.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index b82c85f9c..15bc23a97 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -607,6 +607,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(vnode); SPLAT_SUBSYSTEM_INIT(kobj); SPLAT_SUBSYSTEM_INIT(atomic); + SPLAT_SUBSYSTEM_INIT(list); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, SPLAT_NAME))) @@ -653,6 +654,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(list); SPLAT_SUBSYSTEM_FINI(atomic); SPLAT_SUBSYSTEM_FINI(kobj); SPLAT_SUBSYSTEM_FINI(vnode); diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index c98201dfd..4a49b4d01 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -61,6 +61,7 @@ #include #include #include +#include #include #include "spl-device.h" @@ -192,17 +193,18 @@ typedef struct splat_info { #define splat_vprint(file, test, format, args...) \ splat_print(file, "%*s: " format, SPLAT_NAME_SIZE, test, args) -splat_subsystem_t * splat_condvar_init(void); -splat_subsystem_t * splat_kmem_init(void); -splat_subsystem_t * splat_mutex_init(void); -splat_subsystem_t * splat_krng_init(void); -splat_subsystem_t * splat_rwlock_init(void); -splat_subsystem_t * splat_taskq_init(void); -splat_subsystem_t * splat_thread_init(void); -splat_subsystem_t * splat_time_init(void); -splat_subsystem_t * splat_vnode_init(void); -splat_subsystem_t * splat_kobj_init(void); -splat_subsystem_t * splat_atomic_init(void); +splat_subsystem_t *splat_condvar_init(void); +splat_subsystem_t *splat_kmem_init(void); +splat_subsystem_t *splat_mutex_init(void); +splat_subsystem_t *splat_krng_init(void); +splat_subsystem_t *splat_rwlock_init(void); +splat_subsystem_t *splat_taskq_init(void); +splat_subsystem_t *splat_thread_init(void); +splat_subsystem_t *splat_time_init(void); +splat_subsystem_t *splat_vnode_init(void); +splat_subsystem_t *splat_kobj_init(void); +splat_subsystem_t *splat_atomic_init(void); +splat_subsystem_t *splat_list_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -215,6 +217,7 @@ void splat_time_fini(splat_subsystem_t *); void splat_vnode_fini(splat_subsystem_t *); void splat_kobj_fini(splat_subsystem_t *); void splat_atomic_fini(splat_subsystem_t *); +void splat_list_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -227,5 +230,6 @@ int splat_time_id(void); int splat_vnode_id(void); int splat_kobj_id(void); int splat_atomic_id(void); +int splat_list_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/modules/splat/splat-list.c b/modules/splat/splat-list.c new file mode 100644 index 000000000..366038380 --- /dev/null +++ b/modules/splat/splat-list.c @@ -0,0 +1,407 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "splat-internal.h" + +#define SPLAT_SUBSYSTEM_LIST 0x0c00 +#define SPLAT_LIST_NAME "list" +#define SPLAT_LIST_DESC "Kernel List Tests" + +#define SPLAT_LIST_TEST1_ID 0x0c01 +#define SPLAT_LIST_TEST1_NAME "create/destroy" +#define SPLAT_LIST_TEST1_DESC "Create/destroy Test" + +#define SPLAT_LIST_TEST2_ID 0x0c02 +#define SPLAT_LIST_TEST2_NAME "insert/remove head" +#define SPLAT_LIST_TEST2_DESC "Insert/remove head Test" + +#define SPLAT_LIST_TEST3_ID 0x0c03 +#define SPLAT_LIST_TEST3_NAME "insert/remove tail" +#define SPLAT_LIST_TEST3_DESC "Insert/remove tail Test" + +#define SPLAT_LIST_TEST4_ID 0x0c04 +#define SPLAT_LIST_TEST4_NAME "insert_after" +#define SPLAT_LIST_TEST4_DESC "Insert_after Test" + +#define SPLAT_LIST_TEST5_ID 0x0c05 +#define SPLAT_LIST_TEST5_NAME "insert_before" +#define SPLAT_LIST_TEST5_DESC "Insert_before Test" + +#define SPLAT_LIST_TEST6_ID 0x0c06 +#define SPLAT_LIST_TEST6_NAME "remove" +#define SPLAT_LIST_TEST6_DESC "Remove Test" + + +/* It is important that li_node is not the first element, this + * ensures the list_d2l/list_object macros are working correctly. */ +typedef struct list_item { + int li_data; + list_node_t li_node; +} list_item_t; + +#define LIST_ORDER_STACK 0 +#define LIST_ORDER_QUEUE 1 + +static int +splat_list_test1(struct file *file, void *arg) +{ + list_t list; + + splat_vprint(file, SPLAT_LIST_TEST1_NAME, "Creating list\n%s", ""); + list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); + + if (!list_is_empty(&list)) { + splat_vprint(file, SPLAT_LIST_TEST1_NAME, + "New list NOT empty%s\n", ""); + /* list_destroy() intentionally skipped to avoid assert */ + return -EEXIST; + } + + splat_vprint(file, SPLAT_LIST_TEST1_NAME, "Destroying list\n%s", ""); + list_destroy(&list); + + /* Validate the list has been destroyed */ + if (list_link_active(&list.list_head)) { + splat_vprint(file, SPLAT_LIST_TEST1_NAME, + "Destroyed list still active%s", ""); + return -EIO; + } + + return 0; +} + +static int +splat_list_validate(list_t *list, int size, int order, int mult) +{ + list_item_t *li; + int i; + + /* Walk all items in list from head to verify stack or queue + * ordering. We bound the for loop by size+1 to ensure that + * we still terminate if there is list corruption. We also + * intentionally make things a little more complex than they + * need to be by using list_head/list_next for queues, and + * list_tail/list_prev for stacks. This is simply done for + * coverage and to ensure these function are working right. + */ + for (i = 0, li = (order ? list_head(list) : list_tail(list)); + i < size + 1 && li != NULL; + i++, li = (order ? list_next(list, li) : list_prev(list, li))) + if (li->li_data != i * mult) + return -EIDRM; + + if (i != size) + return -E2BIG; + + return 0; +} + +static int +splat_list_test2(struct file *file, void *arg) +{ + list_t list; + list_item_t *li; + int i, list_size = 8, rc = 0; + + splat_vprint(file, SPLAT_LIST_TEST2_NAME, "Creating list\n%s", ""); + list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); + + /* Insert all items at the list head to form a stack */ + splat_vprint(file, SPLAT_LIST_TEST2_NAME, + "Adding %d items to list head\n", list_size); + for (i = 0; i < list_size; i++) { + li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); + if (li == NULL) { + rc = -ENOMEM; + goto out; + } + + list_link_init(&li->li_node); + li->li_data = i; + list_insert_head(&list, li); + } + + splat_vprint(file, SPLAT_LIST_TEST2_NAME, + "Validating %d item list is a stack\n", list_size); + rc = splat_list_validate(&list, list_size, LIST_ORDER_STACK, 1); + if (rc) + splat_vprint(file, SPLAT_LIST_TEST2_NAME, + "List validation failed, %d\n", rc); +out: + /* Remove all items */ + splat_vprint(file, SPLAT_LIST_TEST2_NAME, + "Removing %d items from list head\n", list_size); + while ((li = list_remove_head(&list))) + kmem_free(li, sizeof(list_item_t)); + + splat_vprint(file, SPLAT_LIST_TEST2_NAME, "Destroying list\n%s", ""); + list_destroy(&list); + + return rc; +} + +static int +splat_list_test3(struct file *file, void *arg) +{ + list_t list; + list_item_t *li; + int i, list_size = 8, rc = 0; + + splat_vprint(file, SPLAT_LIST_TEST3_NAME, "Creating list\n%s", ""); + list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); + + /* Insert all items at the list tail to form a queue */ + splat_vprint(file, SPLAT_LIST_TEST3_NAME, + "Adding %d items to list tail\n", list_size); + for (i = 0; i < list_size; i++) { + li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); + if (li == NULL) { + rc = -ENOMEM; + goto out; + } + + list_link_init(&li->li_node); + li->li_data = i; + list_insert_tail(&list, li); + } + + splat_vprint(file, SPLAT_LIST_TEST3_NAME, + "Validating %d item list is a queue\n", list_size); + rc = splat_list_validate(&list, list_size, LIST_ORDER_QUEUE, 1); + if (rc) + splat_vprint(file, SPLAT_LIST_TEST3_NAME, + "List validation failed, %d\n", rc); +out: + /* Remove all items */ + splat_vprint(file, SPLAT_LIST_TEST3_NAME, + "Removing %d items from list tail\n", list_size); + while ((li = list_remove_tail(&list))) + kmem_free(li, sizeof(list_item_t)); + + splat_vprint(file, SPLAT_LIST_TEST3_NAME, "Destroying list\n%s", ""); + list_destroy(&list); + + return rc; +} + +static int +splat_list_test4(struct file *file, void *arg) +{ + list_t list; + list_item_t *li_new, *li_last = NULL; + int i, list_size = 8, rc = 0; + + splat_vprint(file, SPLAT_LIST_TEST4_NAME, "Creating list\n%s", ""); + list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); + + /* Insert all items after the last item to form a queue */ + splat_vprint(file, SPLAT_LIST_TEST4_NAME, + "Adding %d items each after the last item\n", list_size); + for (i = 0; i < list_size; i++) { + li_new = kmem_alloc(sizeof(list_item_t), KM_SLEEP); + if (li_new == NULL) { + rc = -ENOMEM; + goto out; + } + + list_link_init(&li_new->li_node); + li_new->li_data = i; + list_insert_after(&list, li_last, li_new); + li_last = li_new; + } + + splat_vprint(file, SPLAT_LIST_TEST4_NAME, + "Validating %d item list is a queue\n", list_size); + rc = splat_list_validate(&list, list_size, LIST_ORDER_QUEUE, 1); + if (rc) + splat_vprint(file, SPLAT_LIST_TEST4_NAME, + "List validation failed, %d\n", rc); +out: + /* Remove all items */ + splat_vprint(file, SPLAT_LIST_TEST4_NAME, + "Removing %d items from list tail\n", list_size); + while ((li_new = list_remove_head(&list))) + kmem_free(li_new, sizeof(list_item_t)); + + splat_vprint(file, SPLAT_LIST_TEST4_NAME, "Destroying list\n%s", ""); + list_destroy(&list); + + return rc; +} + +static int +splat_list_test5(struct file *file, void *arg) +{ + list_t list; + list_item_t *li_new, *li_last = NULL; + int i, list_size = 8, rc = 0; + + splat_vprint(file, SPLAT_LIST_TEST5_NAME, "Creating list\n%s", ""); + list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); + + /* Insert all items before the last item to form a stack */ + splat_vprint(file, SPLAT_LIST_TEST5_NAME, + "Adding %d items each before the last item\n", list_size); + for (i = 0; i < list_size; i++) { + li_new = kmem_alloc(sizeof(list_item_t), KM_SLEEP); + if (li_new == NULL) { + rc = -ENOMEM; + goto out; + } + + list_link_init(&li_new->li_node); + li_new->li_data = i; + list_insert_before(&list, li_last, li_new); + li_last = li_new; + } + + splat_vprint(file, SPLAT_LIST_TEST5_NAME, + "Validating %d item list is a queue\n", list_size); + rc = splat_list_validate(&list, list_size, LIST_ORDER_STACK, 1); + if (rc) + splat_vprint(file, SPLAT_LIST_TEST5_NAME, + "List validation failed, %d\n", rc); +out: + /* Remove all items */ + splat_vprint(file, SPLAT_LIST_TEST5_NAME, + "Removing %d items from list tail\n", list_size); + while ((li_new = list_remove_tail(&list))) + kmem_free(li_new, sizeof(list_item_t)); + + splat_vprint(file, SPLAT_LIST_TEST5_NAME, "Destroying list\n%s", ""); + list_destroy(&list); + + return rc; +} + +static int +splat_list_test6(struct file *file, void *arg) +{ + list_t list; + list_item_t *li, *li_prev; + int i, list_size = 8, rc = 0; + + splat_vprint(file, SPLAT_LIST_TEST6_NAME, "Creating list\n%s", ""); + list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); + + /* Insert all items at the list tail to form a queue */ + splat_vprint(file, SPLAT_LIST_TEST6_NAME, + "Adding %d items to list tail\n", list_size); + for (i = 0; i < list_size; i++) { + li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); + if (li == NULL) { + rc = -ENOMEM; + goto out; + } + + list_link_init(&li->li_node); + li->li_data = i; + list_insert_tail(&list, li); + } + + /* Remove all odd items from the queue */ + splat_vprint(file, SPLAT_LIST_TEST6_NAME, + "Removing %d odd items from the list\n", list_size / 2); + for (li = list_head(&list); li != NULL; li = list_next(&list, li)) { + if (li->li_data % 2 == 1) { + li_prev = list_prev(&list, li); + list_remove(&list, li); + li = li_prev; + } + } + + splat_vprint(file, SPLAT_LIST_TEST6_NAME, "Validating %d item " + "list is a queue of only even elements\n", list_size / 2); + rc = splat_list_validate(&list, list_size / 2, LIST_ORDER_QUEUE, 2); + if (rc) + splat_vprint(file, SPLAT_LIST_TEST6_NAME, + "List validation failed, %d\n", rc); +out: + /* Remove all items */ + splat_vprint(file, SPLAT_LIST_TEST6_NAME, + "Removing %d items from list tail\n", list_size / 2); + while ((li = list_remove_tail(&list))) + kmem_free(li, sizeof(list_item_t)); + + splat_vprint(file, SPLAT_LIST_TEST6_NAME, "Destroying list\n%s", ""); + list_destroy(&list); + + return rc; +} + +splat_subsystem_t * +splat_list_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_LIST_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_LIST_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_LIST; + + SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST1_NAME, SPLAT_LIST_TEST1_DESC, + SPLAT_LIST_TEST1_ID, splat_list_test1); + SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST2_NAME, SPLAT_LIST_TEST2_DESC, + SPLAT_LIST_TEST2_ID, splat_list_test2); + SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST3_NAME, SPLAT_LIST_TEST3_DESC, + SPLAT_LIST_TEST3_ID, splat_list_test3); + SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST4_NAME, SPLAT_LIST_TEST4_DESC, + SPLAT_LIST_TEST4_ID, splat_list_test4); + SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST5_NAME, SPLAT_LIST_TEST5_DESC, + SPLAT_LIST_TEST5_ID, splat_list_test5); + SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST6_NAME, SPLAT_LIST_TEST6_DESC, + SPLAT_LIST_TEST6_ID, splat_list_test6); + + return sub; +} + +void +splat_list_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + + SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST6_ID); + SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST5_ID); + SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST1_ID); + + kfree(sub); +} + +int +splat_list_id(void) +{ + return SPLAT_SUBSYSTEM_LIST; +} From 434d1d0f8f099747b275de1668f7522491e248f5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 7 Jan 2009 13:48:36 -0800 Subject: [PATCH 0199/1062] Add active test for splat list tests --- modules/splat/splat-list.c | 70 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/modules/splat/splat-list.c b/modules/splat/splat-list.c index 366038380..3d435cad0 100644 --- a/modules/splat/splat-list.c +++ b/modules/splat/splat-list.c @@ -35,11 +35,11 @@ #define SPLAT_LIST_TEST1_DESC "Create/destroy Test" #define SPLAT_LIST_TEST2_ID 0x0c02 -#define SPLAT_LIST_TEST2_NAME "insert/remove head" +#define SPLAT_LIST_TEST2_NAME "ins/rm head" #define SPLAT_LIST_TEST2_DESC "Insert/remove head Test" #define SPLAT_LIST_TEST3_ID 0x0c03 -#define SPLAT_LIST_TEST3_NAME "insert/remove tail" +#define SPLAT_LIST_TEST3_NAME "ins/rm tail" #define SPLAT_LIST_TEST3_DESC "Insert/remove tail Test" #define SPLAT_LIST_TEST4_ID 0x0c04 @@ -54,6 +54,9 @@ #define SPLAT_LIST_TEST6_NAME "remove" #define SPLAT_LIST_TEST6_DESC "Remove Test" +#define SPLAT_LIST_TEST7_ID 0x0c7 +#define SPLAT_LIST_TEST7_NAME "active" +#define SPLAT_LIST_TEST7_DESC "Active Test" /* It is important that li_node is not the first element, this * ensures the list_d2l/list_object macros are working correctly. */ @@ -352,6 +355,66 @@ out: return rc; } +static int +splat_list_test7(struct file *file, void *arg) +{ + list_t list; + list_item_t *li; + int rc = 0; + + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Creating list\n%s", ""); + list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); + + li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); + if (li == NULL) { + rc = -ENOMEM; + goto out; + } + + /* Validate newly initialized node is inactive */ + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Init list node\n%s", ""); + list_link_init(&li->li_node); + if (list_link_active(&li->li_node)) { + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Newly initialized " + "list node should inactive %p/%p\n", + li->li_node.prev, li->li_node.next); + rc = -EINVAL; + goto out; + } + + /* Validate node is active when linked in to a list */ + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Insert list node\n%s", ""); + list_insert_head(&list, li); + if (!list_link_active(&li->li_node)) { + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "List node " + "inserted in list should be active %p/%p\n", + li->li_node.prev, li->li_node.next); + rc = -EINVAL; + goto out; + } + + /* Validate node is inactive when removed from list */ + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Remove list node\n%s", ""); + list_remove(&list, li); + if (list_link_active(&li->li_node)) { + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "List node " + "removed from list should be inactive %p/%p\n", + li->li_node.prev, li->li_node.next); + rc = -EINVAL; + } + + kmem_free(li, sizeof(list_item_t)); +out: + /* Remove all items */ + while ((li = list_remove_head(&list))) + kmem_free(li, sizeof(list_item_t)); + + splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Destroying list\n%s", ""); + list_destroy(&list); + + return rc; +} + splat_subsystem_t * splat_list_init(void) { @@ -381,6 +444,8 @@ splat_list_init(void) SPLAT_LIST_TEST5_ID, splat_list_test5); SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST6_NAME, SPLAT_LIST_TEST6_DESC, SPLAT_LIST_TEST6_ID, splat_list_test6); + SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST7_NAME, SPLAT_LIST_TEST7_DESC, + SPLAT_LIST_TEST7_ID, splat_list_test7); return sub; } @@ -390,6 +455,7 @@ splat_list_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST4_ID); From 703e7a3cf413265bda05349aa95919e3d42582ae Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 09:47:27 -0800 Subject: [PATCH 0200/1062] Add stubs for three more includes --- include/sys/modctl.h | 4 ++++ include/sys/open.h | 4 ++++ include/sys/policy.h | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 include/sys/modctl.h create mode 100644 include/sys/open.h create mode 100644 include/sys/policy.h diff --git a/include/sys/modctl.h b/include/sys/modctl.h new file mode 100644 index 000000000..85f936915 --- /dev/null +++ b/include/sys/modctl.h @@ -0,0 +1,4 @@ +#ifndef _SPL_MODCTL_H +#define _SPL_MODCTL_H + +#endif /* SPL_MODCTL_H */ diff --git a/include/sys/open.h b/include/sys/open.h new file mode 100644 index 000000000..eba9fa7d7 --- /dev/null +++ b/include/sys/open.h @@ -0,0 +1,4 @@ +#ifndef _SPL_OPEN_H +#define _SPL_OPEN_H + +#endif /* SPL_OPEN_H */ diff --git a/include/sys/policy.h b/include/sys/policy.h new file mode 100644 index 000000000..d10d8f79f --- /dev/null +++ b/include/sys/policy.h @@ -0,0 +1,4 @@ +#ifndef _SPL_POLICY_H +#define _SPL_POLICY_H + +#endif /* SPL_POLICY_H */ From 23f5c4c2814caabd446a16d1d18df2f156465e72 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 10:03:37 -0800 Subject: [PATCH 0201/1062] Add missing callback_context_t and fid_t types --- include/sys/vfs.h | 12 +++++ include/sys/vnode.h | 105 +++++++++++++++++++++++--------------------- 2 files changed, 68 insertions(+), 49 deletions(-) diff --git a/include/sys/vfs.h b/include/sys/vfs.h index e0044f771..0b968faa5 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -5,4 +5,16 @@ typedef struct vfs { int foo; } vfs_t; +#define MAXFIDSZ 64 + +typedef struct fid { + union { + long fid_pad; + struct { + ushort_t len; /* length of data in bytes */ + char data[MAXFIDSZ];/* data (variable len) */ + } _fid; + } un; +} fid_t; + #endif /* SPL_ZFS_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 7ff14692c..00e940828 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -116,56 +116,56 @@ typedef enum vtype { } vtype_t; typedef struct vattr { - enum vtype va_type; /* vnode type */ - u_int va_mask; /* attribute bit-mask */ - u_short va_mode; /* acc mode */ - short va_uid; /* owner uid */ - short va_gid; /* owner gid */ - long va_fsid; /* fs id */ - long va_nodeid; /* node # */ - short va_nlink; /* # links */ - u_long va_size; /* file size */ - long va_blocksize; /* block size */ - struct timeval va_atime; /* last acc */ - struct timeval va_mtime; /* last mod */ - struct timeval va_ctime; /* last chg */ - dev_t va_rdev; /* dev */ - long va_blocks; /* space used */ + enum vtype va_type; /* vnode type */ + u_int va_mask; /* attribute bit-mask */ + u_short va_mode; /* acc mode */ + short va_uid; /* owner uid */ + short va_gid; /* owner gid */ + long va_fsid; /* fs id */ + long va_nodeid; /* node # */ + short va_nlink; /* # links */ + u_long va_size; /* file size */ + long va_blocksize; /* block size */ + struct timeval va_atime; /* last acc */ + struct timeval va_mtime; /* last mod */ + struct timeval va_ctime; /* last chg */ + dev_t va_rdev; /* dev */ + long va_blocks; /* space used */ } vattr_t; typedef struct xoptattr { - timestruc_t xoa_createtime; /* Create time of file */ - uint8_t xoa_archive; - uint8_t xoa_system; - uint8_t xoa_readonly; - uint8_t xoa_hidden; - uint8_t xoa_nounlink; - uint8_t xoa_immutable; - uint8_t xoa_appendonly; - uint8_t xoa_nodump; - uint8_t xoa_settable; - uint8_t xoa_opaque; - uint8_t xoa_av_quarantined; - uint8_t xoa_av_modified; + timestruc_t xoa_createtime; /* Create time of file */ + uint8_t xoa_archive; + uint8_t xoa_system; + uint8_t xoa_readonly; + uint8_t xoa_hidden; + uint8_t xoa_nounlink; + uint8_t xoa_immutable; + uint8_t xoa_appendonly; + uint8_t xoa_nodump; + uint8_t xoa_settable; + uint8_t xoa_opaque; + uint8_t xoa_av_quarantined; + uint8_t xoa_av_modified; } xoptattr_t; typedef struct xvattr { - vattr_t xva_vattr; /* Embedded vattr structure */ - uint32_t xva_magic; /* Magic Number */ - uint32_t xva_mapsize; /* Size of attr bitmap (32-bit words) */ - uint32_t *xva_rtnattrmapp; /* Ptr to xva_rtnattrmap[] */ - uint32_t xva_reqattrmap[XVA_MAPSIZE]; /* Requested attrs */ - uint32_t xva_rtnattrmap[XVA_MAPSIZE]; /* Returned attrs */ - xoptattr_t xva_xoptattrs; /* Optional attributes */ + vattr_t xva_vattr; /* Embedded vattr structure */ + uint32_t xva_magic; /* Magic Number */ + uint32_t xva_mapsize; /* Size of attr bitmap (32-bit words) */ + uint32_t *xva_rtnattrmapp; /* Ptr to xva_rtnattrmap[] */ + uint32_t xva_reqattrmap[XVA_MAPSIZE]; /* Requested attrs */ + uint32_t xva_rtnattrmap[XVA_MAPSIZE]; /* Returned attrs */ + xoptattr_t xva_xoptattrs; /* Optional attributes */ } xvattr_t; typedef struct vsecattr { - uint_t vsa_mask; /* See below */ - int vsa_aclcnt; /* ACL entry count */ - void *vsa_aclentp; /* pointer to ACL entries */ - int vsa_dfaclcnt; /* default ACL entry count */ - void *vsa_dfaclentp; /* pointer to default ACL entries */ - size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ + uint_t vsa_mask; /* See below */ + int vsa_aclcnt; /* ACL entry count */ + void *vsa_aclentp; /* pointer to ACL entries */ + int vsa_dfaclcnt; /* default ACL entry count */ + void *vsa_dfaclentp; /* pointer to default ACL entries */ + size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ } vsecattr_t; typedef struct vnode { @@ -181,15 +181,22 @@ typedef struct vnode { } vnode_t; typedef struct vn_file { - int f_fd; /* linux fd for lookup */ - struct file *f_file; /* linux file struct */ - atomic_t f_ref; /* ref count */ - kmutex_t f_lock; /* struct lock */ - loff_t f_offset; /* offset */ - vnode_t *f_vnode; /* vnode */ - struct list_head f_list; /* list of referenced file_t's */ + int f_fd; /* linux fd for lookup */ + struct file *f_file; /* linux file struct */ + atomic_t f_ref; /* ref count */ + kmutex_t f_lock; /* struct lock */ + loff_t f_offset; /* offset */ + vnode_t *f_vnode; /* vnode */ + struct list_head f_list /* list referenced file_t's */ } file_t; +typedef struct caller_context { + pid_t cc_pid; /* Process ID of the caller */ + int cc_sysid; /* System ID, used for remote calls */ + u_longlong_t cc_caller_id; /* Identifier for (set of) caller(s) */ + ulong_t cc_flags; +} caller_context_t; + extern vnode_t *vn_alloc(int flag); void vn_free(vnode_t *vp); extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode, @@ -218,7 +225,7 @@ vn_rele(vnode_t *vp) static __inline__ int vn_putpage(vnode_t *vp, offset_t off, ssize_t size, - int flags, void *x1, void *x2) { + int flags, void *x1, void *x2) { return 0; } /* vn_putpage() */ From 71c8ab9c685f85f75d451cc98e18bc83565addd3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 10:05:03 -0800 Subject: [PATCH 0202/1062] Drat fix missing ; --- include/sys/vnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 00e940828..8b7aefee0 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -187,7 +187,7 @@ typedef struct vn_file { kmutex_t f_lock; /* struct lock */ loff_t f_offset; /* offset */ vnode_t *f_vnode; /* vnode */ - struct list_head f_list /* list referenced file_t's */ + struct list_head f_list; /* list referenced file_t's */ } file_t; typedef struct caller_context { From 70997fb4b1d6e7601209f1dfc3ec27d0dd379be6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 10:06:18 -0800 Subject: [PATCH 0203/1062] Add share.h stub --- include/sharefs/share.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 include/sharefs/share.h diff --git a/include/sharefs/share.h b/include/sharefs/share.h new file mode 100644 index 000000000..f7c649c70 --- /dev/null +++ b/include/sharefs/share.h @@ -0,0 +1,4 @@ +#ifndef _SPL_SHARE_H +#define _SPL_SHARE_H + +#endif /* SPL_SHARE_H */ From d83ba26e1819ca3c0fcfc8e108db86f4c78a5d54 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 10:49:47 -0800 Subject: [PATCH 0204/1062] Add missing policy includes, add missing sun ddi bits --- include/sys/policy.h | 6 ++++++ include/sys/sunddi.h | 2 ++ modules/spl/spl-module.c | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/include/sys/policy.h b/include/sys/policy.h index d10d8f79f..f6467fe18 100644 --- a/include/sys/policy.h +++ b/include/sys/policy.h @@ -1,4 +1,10 @@ #ifndef _SPL_POLICY_H #define _SPL_POLICY_H +#define secpolicy_fs_unmount(c,vfs) (0) +#define secpolicy_nfs(c) (0) +#define secpolicy_sys_config(c,co) (0) +#define secpolicy_zfs(c) (0) +#define secpolicy_zinject(c) (0) + #endif /* SPL_POLICY_H */ diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 090a367fe..d2e71ebd5 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -136,6 +136,7 @@ typedef struct dev_ops { struct cb_ops *devo_cb_ops; struct bus_ops *devo_bus_ops; int (*devo_power)(dev_info_t *dip, int component, int level); + int (*devo_quiesce)(dev_info_t *dip); } dev_ops_t; typedef struct mod_ops { @@ -198,6 +199,7 @@ extern int __ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type, minor_t minor_num, char *node_type, int flags, struct module *mod); extern void __ddi_remove_minor_node(dev_info_t *dip, char *name); +extern int ddi_quiesce_not_needed(dev_info_t *dip); extern int __mod_install(struct modlinkage *modlp); extern int __mod_remove(struct modlinkage *modlp); diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 700c76182..817b1e31e 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -188,6 +188,12 @@ __ddi_remove_minor_node(dev_info_t *di, char *name) } EXPORT_SYMBOL(__ddi_remove_minor_node); +int +ddi_quiesce_not_needed(dev_info_t *dip) +{ + RETURN(DDI_SUCCESS); +} + #if 0 static int mod_generic_open(struct inode *, struct file *) From 97735c39e37f1b644ba09755173dd2b3de95ab47 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 13:59:39 -0800 Subject: [PATCH 0205/1062] Add VOP_SEEK --- include/sys/vnode.h | 3 +++ modules/spl/spl-vnode.c | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 8b7aefee0..7972f6548 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -207,6 +207,8 @@ extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, uio_seg_t seg, int x1, rlim64_t x2, void *x3, ssize_t *residp); extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4); +extern int vn_seek(vnode_t *vp, offset_t o, offset_t *op, caller_context_t *ct); + extern int vn_remove(const char *path, uio_seg_t seg, int flags); extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); @@ -230,6 +232,7 @@ vn_putpage(vnode_t *vp, offset_t off, ssize_t size, } /* vn_putpage() */ #define VOP_CLOSE vn_close +#define VOP_SEEK vn_seek #define VN_RELE vn_rele #define VOP_GETATTR vn_getattr #define VOP_FSYNC vn_fsync diff --git a/modules/spl/spl-vnode.c b/modules/spl/spl-vnode.c index fef74f3c7..b19d9f1de 100644 --- a/modules/spl/spl-vnode.c +++ b/modules/spl/spl-vnode.c @@ -235,19 +235,31 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) ASSERT(vp); ASSERT(vp->v_file); - rc = filp_close(vp->v_file, 0); - vn_free(vp); + rc = filp_close(vp->v_file, 0); + vn_free(vp); RETURN(-rc); } /* vn_close() */ EXPORT_SYMBOL(vn_close); -static struct dentry *vn_lookup_hash(struct nameidata *nd) +/* vn_seek() does not actually seek it only performs bounds checking on the + * proposed seek. We perform minimal checking and allow vn_rdwr() to catch + * anything more serious. */ +int +vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, caller_context_t *ct) +{ + return ((*noffp < 0 || *noffp > MAXOFFSET_T) ? EINVAL : 0); +} +EXPORT_SYMBOL(vn_seek); + +static struct dentry * +vn_lookup_hash(struct nameidata *nd) { return lookup_one_len(nd->last.name, nd->nd_dentry, nd->last.len); } /* lookup_hash() */ -static void vn_path_release(struct nameidata *nd) +static void +vn_path_release(struct nameidata *nd) { dput(nd->nd_dentry); mntput(nd->nd_mnt); From 0e4141494611ec11b08c411e25d1fd878691de56 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 14:04:13 -0800 Subject: [PATCH 0206/1062] Add two new stub headers --- include/sys/bootconf.h | 4 ++++ include/sys/refstr.h | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 include/sys/bootconf.h create mode 100644 include/sys/refstr.h diff --git a/include/sys/bootconf.h b/include/sys/bootconf.h new file mode 100644 index 000000000..29c885a08 --- /dev/null +++ b/include/sys/bootconf.h @@ -0,0 +1,4 @@ +#ifndef _SPL_BOOTCONF_H +#define _SPL_BOOTCONF_H + +#endif /* SPL_BOOTCONF_H */ diff --git a/include/sys/refstr.h b/include/sys/refstr.h new file mode 100644 index 000000000..041ea23af --- /dev/null +++ b/include/sys/refstr.h @@ -0,0 +1,4 @@ +#ifndef _SPL_REFSTR_H +#define _SPL_REFSTR_H + +#endif /* SPL_REFSTR_H */ From f590d7d37469a45f3da17bd30c3c0b0396004ac1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 14:30:30 -0800 Subject: [PATCH 0207/1062] Make sure we export ddi_quiesce_not_needed --- modules/spl/spl-module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 817b1e31e..c1d030f24 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -193,6 +193,7 @@ ddi_quiesce_not_needed(dev_info_t *dip) { RETURN(DDI_SUCCESS); } +EXPORT_SYMBOL(ddi_quiesce_not_needed); #if 0 static int From 121d48c97d9ad4455062bc289d78a872a7e021b7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 15:30:53 -0800 Subject: [PATCH 0208/1062] Add basic ksid_lookupdomain and ksiddomain_rele support, just allocations --- include/sys/sid.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/sys/sid.h b/include/sys/sid.h index 530c91a75..f798d24a8 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -1,4 +1,31 @@ #ifndef _SPL_SID_H #define _SPL_SID_H +typedef struct ksiddomain { + uint_t kd_ref; + uint_t kd_len; + char *kd_name; + avl_node_t kd_link; +} ksiddomain_t; + +static inline ksiddomain_t * +ksid_lookupdomain(const char *dom) +{ + ksiddomain_t *kd; + int len = strlen(dom); + + kd = kmem_zalloc(sizeof(ksiddomain_t), KM_SLEEP); + kd->kd_name = kmem_zalloc(len + 1, KM_SLEEP); + memcpy(kd->kd_name, dom, len); + + return (kd); +} + +static inline void +ksiddomain_rele(ksiddomain_t *ksid) +{ + kmem_free(ksid->kd_name, strlen(ksid->kd_name) + 1); + kmem_free(ksid, sizeof(ksiddomain_t)); +} + #endif /* _SPL_SID_H */ From 1e4ed6c9907570d5844186b3f559665bef8ff041 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 16:04:44 -0800 Subject: [PATCH 0209/1062] Add missing stub headers --- include/sys/crc32.h | 4 ++++ include/sys/efi_partition.h | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 include/sys/crc32.h create mode 100644 include/sys/efi_partition.h diff --git a/include/sys/crc32.h b/include/sys/crc32.h new file mode 100644 index 000000000..b80157965 --- /dev/null +++ b/include/sys/crc32.h @@ -0,0 +1,4 @@ +#ifndef _SPL_CRC32_H +#define _SPL_CRC32_H + +#endif /* SPL_CRC32_H */ diff --git a/include/sys/efi_partition.h b/include/sys/efi_partition.h new file mode 100644 index 000000000..369062301 --- /dev/null +++ b/include/sys/efi_partition.h @@ -0,0 +1,4 @@ +#ifndef _SPL_EFI_PARTITION_H +#define _SPL_EFI_PARTITION_H + +#endif /* SPL_EFI_PARTITION_H */ From b871b8cdef68bdfa99e0fdc45734af810b75e998 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 13 Jan 2009 09:30:59 -0800 Subject: [PATCH 0210/1062] Rework ddi_strtox calls to a native implementation which actuall supports the EINVAL, ERANGE error handling, plus add a regression suite to ensure I got it atleast mostly right --- modules/spl/spl-generic.c | 87 ++++++++---- modules/splat/Makefile.in | 7 +- modules/splat/splat-ctl.c | 2 + modules/splat/splat-generic.c | 233 +++++++++++++++++++++++++++++++++ modules/splat/splat-internal.h | 4 + 5 files changed, 306 insertions(+), 27 deletions(-) create mode 100644 modules/splat/splat-generic.c diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index d361bff92..c09d9d4e3 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -126,6 +126,11 @@ uint64_t __umoddi3(uint64_t dividend, uint64_t divisor) EXPORT_SYMBOL(__umoddi3); #endif +/* NOTE: The strtoxx behavior is solely based on my reading of the Solaris + * ddi_strtol(9F) man page. I have not verified the behavior of these + * functions against their Solaris counterparts. It is possible that I + * may have misinterpretted the man page or the man page is incorrect. + */ int ddi_strtoul(const char *, char **, int, unsigned long *); int ddi_strtol(const char *, char **, int, long *); int ddi_strtoull(const char *, char **, int, unsigned long long *); @@ -133,43 +138,81 @@ int ddi_strtoll(const char *, char **, int, long long *); #define define_ddi_strtoux(type, valtype) \ int ddi_strtou##type(const char *str, char **endptr, \ - int base, valtype *result) \ + int base, valtype *result) \ { \ - valtype val; \ - size_t len; \ + valtype last_value, value = 0; \ + char *ptr = (char *)str; \ + int flag = 1, digit; \ \ - len = strlen(str); \ - if (len == 0) \ - return -EINVAL; \ + if (strlen(ptr) == 0) \ + return EINVAL; \ \ - val = simple_strtoul(str, endptr, (unsigned int)base); \ - if ((**endptr == '\0') || \ - ((len == (size_t)(*endptr-str) + 1) && (**endptr == '\n'))) {\ - *result = val; \ - return 0; \ + /* Auto-detect base based on prefix */ \ + if (!base) { \ + if (str[0] == '0') { \ + if (tolower(str[1])=='x' && isxdigit(str[2])) { \ + base = 16; /* hex */ \ + ptr += 2; \ + } else if (str[1] >= '0' && str[1] < 8) { \ + base = 8; /* octal */ \ + ptr += 1; \ + } else { \ + return EINVAL; \ + } \ + } else { \ + base = 10; /* decimal */ \ + } \ } \ \ - return -EINVAL; \ + while (1) { \ + if (isdigit(*ptr)) \ + digit = *ptr - '0'; \ + else if (isalpha(*ptr)) \ + digit = tolower(*ptr) - 'a' + 10; \ + else \ + break; \ + \ + if (digit >= base) \ + break; \ + \ + last_value = value; \ + value = value * base + digit; \ + if (last_value > value) /* Overflow */ \ + return ERANGE; \ + \ + flag = 1; \ + ptr++; \ + } \ + \ + if (flag) \ + *result = value; \ + \ + if (endptr) \ + *endptr = (char *)(flag ? ptr : str); \ + \ + return 0; \ } \ #define define_ddi_strtox(type, valtype) \ int ddi_strto##type(const char *str, char **endptr, \ int base, valtype *result) \ -{ \ - int ret; \ +{ \ + int rc; \ \ if (*str == '-') { \ - ret = ddi_strtou##type(str+1, endptr, \ - (unsigned int)base, result); \ - if (!ret) \ - *result = -(*result); \ + rc = ddi_strtou##type(str + 1, endptr, base, result); \ + if (!rc) { \ + if (*endptr == str + 1) \ + *endptr = (char *)str; \ + else \ + *result = -*result; \ + } \ } else { \ - ret = ddi_strtou##type(str, endptr, \ - (unsigned int)base, result); \ + rc = ddi_strtou##type(str, endptr, base, result); \ } \ \ - return ret; \ -} \ + return rc; \ +} define_ddi_strtoux(l, unsigned long) define_ddi_strtox(l, long) diff --git a/modules/splat/Makefile.in b/modules/splat/Makefile.in index c31be0285..33b2865c1 100644 --- a/modules/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -1,11 +1,7 @@ # Makefile.in for splat kernel module MODULES := splat -DISTFILES = Makefile.in \ - splat-kmem.c splat-random.c splat-taskq.c \ - splat-time.c splat-condvar.c splat-mutex.c \ - splat-rwlock.c splat-thread.c \ - splat-ctl.c splat-internal.h +DISTFILES = Makefile.in *.c *.h EXTRA_CFLAGS = @KERNELCPPFLAGS@ # Solaris Porting LAyer Tests @@ -24,6 +20,7 @@ splat-objs += splat-vnode.o splat-objs += splat-kobj.o splat-objs += splat-atomic.o splat-objs += splat-list.o +splat-objs += splat-generic.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index 15bc23a97..41a844789 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -608,6 +608,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(kobj); SPLAT_SUBSYSTEM_INIT(atomic); SPLAT_SUBSYSTEM_INIT(list); + SPLAT_SUBSYSTEM_INIT(generic); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, SPLAT_NAME))) @@ -654,6 +655,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(generic); SPLAT_SUBSYSTEM_FINI(list); SPLAT_SUBSYSTEM_FINI(atomic); SPLAT_SUBSYSTEM_FINI(kobj); diff --git a/modules/splat/splat-generic.c b/modules/splat/splat-generic.c new file mode 100644 index 000000000..6da7473e0 --- /dev/null +++ b/modules/splat/splat-generic.c @@ -0,0 +1,233 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "splat-internal.h" + +#define SPLAT_SUBSYSTEM_GENERIC 0x0d00 +#define SPLAT_GENERIC_NAME "generic" +#define SPLAT_GENERIC_DESC "Kernel Generic Tests" + +#define SPLAT_GENERIC_TEST1_ID 0x0d01 +#define SPLAT_GENERIC_TEST1_NAME "ddi_strtoul" +#define SPLAT_GENERIC_TEST1_DESC "ddi_strtoul Test" + +#define SPLAT_GENERIC_TEST2_ID 0x0d02 +#define SPLAT_GENERIC_TEST2_NAME "ddi_strtol" +#define SPLAT_GENERIC_TEST2_DESC "ddi_strtol Test" + +#define SPLAT_GENERIC_TEST3_ID 0x0d03 +#define SPLAT_GENERIC_TEST3_NAME "ddi_strtoull" +#define SPLAT_GENERIC_TEST3_DESC "ddi_strtoull Test" + +#define SPLAT_GENERIC_TEST4_ID 0x0d04 +#define SPLAT_GENERIC_TEST4_NAME "ddi_strtoll" +#define SPLAT_GENERIC_TEST4_DESC "ddi_strtoll Test" + +#define STR_POS "123456789" +#define STR_NEG "-123456789" +#define STR_BASE "0xabcdef" +#define STR_RANGE_MAX "10000000000000000" +#define STR_RANGE_MIN "-10000000000000000" +#define STR_INVAL1 "12345U" +#define STR_INVAL2 "invald" + +#define VAL_POS 123456789 +#define VAL_NEG -123456789 +#define VAL_BASE 0xabcdef +#define VAL_INVAL1 12345U + +#define define_generic_msg_strtox(type, valtype) \ +static void \ +generic_msg_strto##type(struct file *file, char *msg, int rc, int *err, \ + const char *s, valtype d, char *endptr) \ +{ \ + splat_vprint(file, SPLAT_GENERIC_TEST1_NAME, \ + "%s (%d) %s: %s == %lld, 0x%p\n", \ + rc ? "Fail" : "Pass", *err, msg, s, \ + (unsigned long long)d, endptr); \ + *err = rc; \ +} + +define_generic_msg_strtox(ul, unsigned long); +define_generic_msg_strtox(l, long); +define_generic_msg_strtox(ull, unsigned long long); +define_generic_msg_strtox(ll, long long); + +#define define_splat_generic_test_strtox(type, valtype) \ +static int \ +splat_generic_test_strto##type(struct file *file, void *arg) \ +{ \ + int rc, rc1, rc2, rc3, rc4, rc5, rc6, rc7; \ + char str[20], *endptr; \ + valtype r; \ + \ + /* Positive value: expect success */ \ + r = 0; \ + rc = 1; \ + endptr = NULL; \ + rc1 = ddi_strto##type(STR_POS, &endptr, 10, &r); \ + if (rc1 == 0 && r == VAL_POS && endptr && *endptr == '\0') \ + rc = 0; \ + \ + generic_msg_strto##type(file, "positive", rc , &rc1, \ + STR_POS, r, endptr); \ + \ + /* Negative value: expect success */ \ + r = 0; \ + rc = 1; \ + endptr = NULL; \ + strcpy(str, STR_NEG); \ + rc2 = ddi_strto##type(str, &endptr, 10, &r); \ + if (#type[0] == 'u') { \ + if (rc2 == 0 && r == 0 && endptr == str) \ + rc = 0; \ + } else { \ + if (rc2 == 0 && r == VAL_NEG && \ + endptr && *endptr == '\0') \ + rc = 0; \ + } \ + \ + generic_msg_strto##type(file, "negative", rc, &rc2, \ + STR_NEG, r, endptr); \ + \ + /* Non decimal base: expect sucess */ \ + r = 0; \ + rc = 1; \ + endptr = NULL; \ + rc3 = ddi_strto##type(STR_BASE, &endptr, 0, &r); \ + if (rc3 == 0 && r == VAL_BASE && endptr && *endptr == '\0') \ + rc = 0; \ + \ + generic_msg_strto##type(file, "base", rc, &rc3, \ + STR_BASE, r, endptr); \ + \ + /* Max out of range: failure expected, r unchanged */ \ + r = 0; \ + rc = 1; \ + endptr = NULL; \ + rc4 = ddi_strto##type(STR_RANGE_MAX, &endptr, 16, &r); \ + if (rc4 == ERANGE && r == 0 && endptr == NULL) \ + rc = 0; \ + \ + generic_msg_strto##type(file, "max", rc, &rc4, \ + STR_RANGE_MAX, r, endptr); \ + \ + /* Min out of range: failure expected, r unchanged */ \ + r = 0; \ + rc = 1; \ + endptr = NULL; \ + strcpy(str, STR_RANGE_MIN); \ + rc5 = ddi_strto##type(str, &endptr, 16, &r); \ + if (#type[0] == 'u') { \ + if (rc5 == 0 && r == 0 && endptr == str) \ + rc = 0; \ + } else { \ + if (rc5 == ERANGE && r == 0 && endptr == NULL) \ + rc = 0; \ + } \ + \ + generic_msg_strto##type(file, "min", rc, &rc5, \ + STR_RANGE_MIN, r, endptr); \ + \ + /* Invalid string: success expected, endptr == 'U' */ \ + r = 0; \ + rc = 1; \ + endptr = NULL; \ + rc6 = ddi_strto##type(STR_INVAL1, &endptr, 10, &r); \ + if (rc6 == 0 && r == VAL_INVAL1 && endptr && *endptr == 'U') \ + rc = 0; \ + \ + generic_msg_strto##type(file, "invalid", rc, &rc6, \ + STR_INVAL1, r, endptr); \ + \ + /* Invalid string: failure expected, endptr == str */ \ + r = 0; \ + rc = 1; \ + endptr = NULL; \ + strcpy(str, STR_INVAL2); \ + rc7 = ddi_strto##type(str, &endptr, 10, &r); \ + if (rc7 == 0 && r == 0 && endptr == str) \ + rc = 0; \ + \ + generic_msg_strto##type(file, "invalid", rc, &rc7, \ + STR_INVAL2, r, endptr); \ + \ + return (rc1 || rc2 || rc3 || rc4 || rc5 || rc6 || rc7) ? \ + -EINVAL : 0; \ +} + +define_splat_generic_test_strtox(ul, unsigned long); +define_splat_generic_test_strtox(l, long); +define_splat_generic_test_strtox(ull, unsigned long long); +define_splat_generic_test_strtox(ll, long long); + +splat_subsystem_t * +splat_generic_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_GENERIC_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_GENERIC_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_GENERIC; + + SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST1_NAME, SPLAT_GENERIC_TEST1_DESC, + SPLAT_GENERIC_TEST1_ID, splat_generic_test_strtoul); + SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST2_NAME, SPLAT_GENERIC_TEST2_DESC, + SPLAT_GENERIC_TEST2_ID, splat_generic_test_strtol); + SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST3_NAME, SPLAT_GENERIC_TEST3_DESC, + SPLAT_GENERIC_TEST3_ID, splat_generic_test_strtoull); + SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST4_NAME, SPLAT_GENERIC_TEST4_DESC, + SPLAT_GENERIC_TEST4_ID, splat_generic_test_strtoll); + + return sub; +} + +void +splat_generic_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + + SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST1_ID); + + kfree(sub); +} + +int +splat_generic_id(void) +{ + return SPLAT_SUBSYSTEM_GENERIC; +} diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index 4a49b4d01..87c47b173 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -62,6 +62,7 @@ #include #include #include +#include #include #include "spl-device.h" @@ -205,6 +206,7 @@ splat_subsystem_t *splat_vnode_init(void); splat_subsystem_t *splat_kobj_init(void); splat_subsystem_t *splat_atomic_init(void); splat_subsystem_t *splat_list_init(void); +splat_subsystem_t *splat_generic_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -218,6 +220,7 @@ void splat_vnode_fini(splat_subsystem_t *); void splat_kobj_fini(splat_subsystem_t *); void splat_atomic_fini(splat_subsystem_t *); void splat_list_fini(splat_subsystem_t *); +void splat_generic_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -231,5 +234,6 @@ int splat_vnode_id(void); int splat_kobj_id(void); int splat_atomic_id(void); int splat_list_id(void); +int splat_generic_id(void); #endif /* _SPLAT_INTERNAL_H */ From b172b6dfdec0c14ddd5bf3b1d6a81b07c63788c5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 13 Jan 2009 11:43:05 -0800 Subject: [PATCH 0211/1062] TASKQ_DYNAMIC not yet support, do not create the global taskq with that flag or we crash with debug enabled. Also don't bother dumping debug when debugging is diabled, it's pointless --- modules/spl/spl-debug.c | 2 ++ modules/spl/spl-taskq.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/spl/spl-debug.c b/modules/spl/spl-debug.c index d2b96b0c3..df22cbc48 100644 --- a/modules/spl/spl-debug.c +++ b/modules/spl/spl-debug.c @@ -1118,8 +1118,10 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags) if (spl_debug_panic_on_bug) spl_panic_in_progress = 1; +#ifdef DEBUG spl_debug_dumpstack(NULL); spl_debug_dumplog(flags); +#endif if (spl_debug_panic_on_bug) panic("SBUG"); diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index dc6959db5..799b54839 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -475,7 +475,7 @@ spl_taskq_init(void) ENTRY; system_taskq = taskq_create("system_taskq", 64, minclsyspri, 4, 512, - TASKQ_DYNAMIC | TASKQ_PREPOPULATE); + TASKQ_PREPOPULATE); if (system_taskq == NULL) RETURN(1); From f6a19c0d37992755ed6b1b50344047537a1efe5c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 13 Jan 2009 11:45:02 -0800 Subject: [PATCH 0212/1062] Make the splat load message caps just for consistency --- modules/splat/splat-ctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/splat/splat-ctl.c b/modules/splat/splat-ctl.c index 41a844789..d7aed023c 100644 --- a/modules/splat/splat-ctl.c +++ b/modules/splat/splat-ctl.c @@ -617,7 +617,7 @@ splat_init(void) /* Support for registering a character driver */ cdev_init(&splat_cdev, &splat_fops); if ((rc = cdev_add(&splat_cdev, dev, SPLAT_MINORS))) { - printk(KERN_ERR "splat: Error adding cdev, %d\n", rc); + printk(KERN_ERR "SPLAT: Error adding cdev, %d\n", rc); kobject_put(&splat_cdev.kobj); unregister_chrdev_region(dev, SPLAT_MINORS); goto error; @@ -627,7 +627,7 @@ splat_init(void) splat_class = spl_class_create(THIS_MODULE, "splat"); if (IS_ERR(splat_class)) { rc = PTR_ERR(splat_class); - printk(KERN_ERR "splat: Error creating splat class, %d\n", rc); + printk(KERN_ERR "SPLAT: Error creating splat class, %d\n", rc); cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); goto error; @@ -637,11 +637,11 @@ splat_init(void) MKDEV(SPLAT_MAJOR, 0), NULL, SPLAT_NAME); - printk(KERN_INFO "splat: Loaded Solaris Porting LAyer " + printk(KERN_INFO "SPLAT: Loaded Solaris Porting LAyer " "Tests v%s\n", VERSION); return 0; error: - printk(KERN_ERR "splat: Error registering splat device, %d\n", rc); + printk(KERN_ERR "SPLAT: Error registering splat device, %d\n", rc); return rc; } @@ -670,7 +670,7 @@ splat_fini(void) SPLAT_SUBSYSTEM_FINI(kmem); ASSERT(list_empty(&splat_module_list)); - printk(KERN_INFO "splat: Unloaded Solaris Porting LAyer " + printk(KERN_INFO "SPLAT: Unloaded Solaris Porting LAyer " "Tests v%s\n", VERSION); } From 617d5a673cd16aa91fa9668b94cc385094fae852 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 15 Jan 2009 10:44:54 -0800 Subject: [PATCH 0213/1062] Rename modules to module and update references --- Makefile.am | 2 +- Makefile.in | 16 ++++++++-------- configure | 8 ++++---- configure.ac | 6 +++--- {modules => module}/Makefile.in | 0 {modules => module}/spl/Makefile.in | 0 {modules => module}/spl/spl-atomic.c | 0 {modules => module}/spl/spl-condvar.c | 0 {modules => module}/spl/spl-debug.c | 0 {modules => module}/spl/spl-err.c | 0 {modules => module}/spl/spl-generic.c | 0 {modules => module}/spl/spl-kmem.c | 0 {modules => module}/spl/spl-kobj.c | 0 {modules => module}/spl/spl-kstat.c | 0 {modules => module}/spl/spl-module.c | 0 {modules => module}/spl/spl-mutex.c | 0 {modules => module}/spl/spl-proc.c | 0 {modules => module}/spl/spl-rwlock.c | 0 {modules => module}/spl/spl-taskq.c | 0 {modules => module}/spl/spl-thread.c | 0 {modules => module}/spl/spl-time.c | 0 {modules => module}/spl/spl-vnode.c | 0 {modules => module}/splat/Makefile.in | 0 {modules => module}/splat/splat-atomic.c | 0 {modules => module}/splat/splat-condvar.c | 0 {modules => module}/splat/splat-ctl.c | 0 {modules => module}/splat/splat-generic.c | 0 {modules => module}/splat/splat-internal.h | 0 {modules => module}/splat/splat-kmem.c | 0 {modules => module}/splat/splat-kobj.c | 0 {modules => module}/splat/splat-list.c | 0 {modules => module}/splat/splat-mutex.c | 0 {modules => module}/splat/splat-random.c | 0 {modules => module}/splat/splat-rwlock.c | 0 {modules => module}/splat/splat-taskq.c | 0 {modules => module}/splat/splat-thread.c | 0 {modules => module}/splat/splat-time.c | 0 {modules => module}/splat/splat-vnode.c | 0 scripts/check.sh | 4 ++-- 39 files changed, 18 insertions(+), 18 deletions(-) rename {modules => module}/Makefile.in (100%) rename {modules => module}/spl/Makefile.in (100%) rename {modules => module}/spl/spl-atomic.c (100%) rename {modules => module}/spl/spl-condvar.c (100%) rename {modules => module}/spl/spl-debug.c (100%) rename {modules => module}/spl/spl-err.c (100%) rename {modules => module}/spl/spl-generic.c (100%) rename {modules => module}/spl/spl-kmem.c (100%) rename {modules => module}/spl/spl-kobj.c (100%) rename {modules => module}/spl/spl-kstat.c (100%) rename {modules => module}/spl/spl-module.c (100%) rename {modules => module}/spl/spl-mutex.c (100%) rename {modules => module}/spl/spl-proc.c (100%) rename {modules => module}/spl/spl-rwlock.c (100%) rename {modules => module}/spl/spl-taskq.c (100%) rename {modules => module}/spl/spl-thread.c (100%) rename {modules => module}/spl/spl-time.c (100%) rename {modules => module}/spl/spl-vnode.c (100%) rename {modules => module}/splat/Makefile.in (100%) rename {modules => module}/splat/splat-atomic.c (100%) rename {modules => module}/splat/splat-condvar.c (100%) rename {modules => module}/splat/splat-ctl.c (100%) rename {modules => module}/splat/splat-generic.c (100%) rename {modules => module}/splat/splat-internal.h (100%) rename {modules => module}/splat/splat-kmem.c (100%) rename {modules => module}/splat/splat-kobj.c (100%) rename {modules => module}/splat/splat-list.c (100%) rename {modules => module}/splat/splat-mutex.c (100%) rename {modules => module}/splat/splat-random.c (100%) rename {modules => module}/splat/splat-rwlock.c (100%) rename {modules => module}/splat/splat-taskq.c (100%) rename {modules => module}/splat/splat-thread.c (100%) rename {modules => module}/splat/splat-time.c (100%) rename {modules => module}/splat/splat-vnode.c (100%) diff --git a/Makefile.am b/Makefile.am index 1d219cd85..e0c5fe29e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = foreign dist-zip -SUBDIRS = lib cmd modules include scripts +SUBDIRS = lib cmd module include scripts CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub CONFIG_CLEAN_FILES += depcomp install-sh missing mkinstalldirs EXTRA_DIST = autogen.sh diff --git a/Makefile.in b/Makefile.in index 8eea6c97d..834d7f74b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,9 +38,9 @@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/spl_config.h.in \ - $(top_srcdir)/configure $(top_srcdir)/modules/Makefile.in \ - $(top_srcdir)/modules/spl/Makefile.in \ - $(top_srcdir)/modules/splat/Makefile.in AUTHORS COPYING \ + $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ + $(top_srcdir)/module/spl/Makefile.in \ + $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ ChangeLog INSTALL config/config.guess config/config.sub \ config/depcomp config/install-sh config/ltmain.sh \ config/missing @@ -196,7 +196,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ AUTOMAKE_OPTIONS = foreign dist-zip -SUBDIRS = lib cmd modules include scripts +SUBDIRS = lib cmd module include scripts CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub depcomp \ install-sh missing mkinstalldirs EXTRA_DIST = autogen.sh @@ -254,11 +254,11 @@ $(srcdir)/spl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) distclean-hdr: -rm -f spl_config.h stamp-h1 -modules/Makefile: $(top_builddir)/config.status $(top_srcdir)/modules/Makefile.in +module/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ -modules/spl/Makefile: $(top_builddir)/config.status $(top_srcdir)/modules/spl/Makefile.in +module/spl/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/spl/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ -modules/splat/Makefile: $(top_builddir)/config.status $(top_srcdir)/modules/splat/Makefile.in +module/splat/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/splat/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: @@ -406,7 +406,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/config $(distdir)/modules $(distdir)/modules/spl $(distdir)/modules/splat $(distdir)/scripts + $(mkdir_p) $(distdir)/config $(distdir)/module $(distdir)/module/spl $(distdir)/module/splat $(distdir)/scripts @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/configure b/configure index c0b771407..2ecf422f0 100755 --- a/configure +++ b/configure @@ -20439,7 +20439,7 @@ fi - ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile modules/Makefile modules/spl/Makefile modules/splat/Makefile include/Makefile include/sys/Makefile scripts/Makefile scripts/spl.spec" + ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile include/sys/Makefile scripts/Makefile scripts/spl.spec" cat >confcache <<\_ACEOF @@ -21008,9 +21008,9 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "cmd/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;; - "modules/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; - "modules/spl/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/spl/Makefile" ;; - "modules/splat/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/splat/Makefile" ;; + "module/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/Makefile" ;; + "module/spl/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;; + "module/splat/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/sys/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;; "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; diff --git a/configure.ac b/configure.ac index ca19adc4e..1db1efbf9 100644 --- a/configure.ac +++ b/configure.ac @@ -86,9 +86,9 @@ AC_SUBST(KERNELCFLAGS) AC_CONFIG_FILES([ Makefile lib/Makefile cmd/Makefile - modules/Makefile - modules/spl/Makefile - modules/splat/Makefile + module/Makefile + module/spl/Makefile + module/splat/Makefile include/Makefile include/sys/Makefile scripts/Makefile diff --git a/modules/Makefile.in b/module/Makefile.in similarity index 100% rename from modules/Makefile.in rename to module/Makefile.in diff --git a/modules/spl/Makefile.in b/module/spl/Makefile.in similarity index 100% rename from modules/spl/Makefile.in rename to module/spl/Makefile.in diff --git a/modules/spl/spl-atomic.c b/module/spl/spl-atomic.c similarity index 100% rename from modules/spl/spl-atomic.c rename to module/spl/spl-atomic.c diff --git a/modules/spl/spl-condvar.c b/module/spl/spl-condvar.c similarity index 100% rename from modules/spl/spl-condvar.c rename to module/spl/spl-condvar.c diff --git a/modules/spl/spl-debug.c b/module/spl/spl-debug.c similarity index 100% rename from modules/spl/spl-debug.c rename to module/spl/spl-debug.c diff --git a/modules/spl/spl-err.c b/module/spl/spl-err.c similarity index 100% rename from modules/spl/spl-err.c rename to module/spl/spl-err.c diff --git a/modules/spl/spl-generic.c b/module/spl/spl-generic.c similarity index 100% rename from modules/spl/spl-generic.c rename to module/spl/spl-generic.c diff --git a/modules/spl/spl-kmem.c b/module/spl/spl-kmem.c similarity index 100% rename from modules/spl/spl-kmem.c rename to module/spl/spl-kmem.c diff --git a/modules/spl/spl-kobj.c b/module/spl/spl-kobj.c similarity index 100% rename from modules/spl/spl-kobj.c rename to module/spl/spl-kobj.c diff --git a/modules/spl/spl-kstat.c b/module/spl/spl-kstat.c similarity index 100% rename from modules/spl/spl-kstat.c rename to module/spl/spl-kstat.c diff --git a/modules/spl/spl-module.c b/module/spl/spl-module.c similarity index 100% rename from modules/spl/spl-module.c rename to module/spl/spl-module.c diff --git a/modules/spl/spl-mutex.c b/module/spl/spl-mutex.c similarity index 100% rename from modules/spl/spl-mutex.c rename to module/spl/spl-mutex.c diff --git a/modules/spl/spl-proc.c b/module/spl/spl-proc.c similarity index 100% rename from modules/spl/spl-proc.c rename to module/spl/spl-proc.c diff --git a/modules/spl/spl-rwlock.c b/module/spl/spl-rwlock.c similarity index 100% rename from modules/spl/spl-rwlock.c rename to module/spl/spl-rwlock.c diff --git a/modules/spl/spl-taskq.c b/module/spl/spl-taskq.c similarity index 100% rename from modules/spl/spl-taskq.c rename to module/spl/spl-taskq.c diff --git a/modules/spl/spl-thread.c b/module/spl/spl-thread.c similarity index 100% rename from modules/spl/spl-thread.c rename to module/spl/spl-thread.c diff --git a/modules/spl/spl-time.c b/module/spl/spl-time.c similarity index 100% rename from modules/spl/spl-time.c rename to module/spl/spl-time.c diff --git a/modules/spl/spl-vnode.c b/module/spl/spl-vnode.c similarity index 100% rename from modules/spl/spl-vnode.c rename to module/spl/spl-vnode.c diff --git a/modules/splat/Makefile.in b/module/splat/Makefile.in similarity index 100% rename from modules/splat/Makefile.in rename to module/splat/Makefile.in diff --git a/modules/splat/splat-atomic.c b/module/splat/splat-atomic.c similarity index 100% rename from modules/splat/splat-atomic.c rename to module/splat/splat-atomic.c diff --git a/modules/splat/splat-condvar.c b/module/splat/splat-condvar.c similarity index 100% rename from modules/splat/splat-condvar.c rename to module/splat/splat-condvar.c diff --git a/modules/splat/splat-ctl.c b/module/splat/splat-ctl.c similarity index 100% rename from modules/splat/splat-ctl.c rename to module/splat/splat-ctl.c diff --git a/modules/splat/splat-generic.c b/module/splat/splat-generic.c similarity index 100% rename from modules/splat/splat-generic.c rename to module/splat/splat-generic.c diff --git a/modules/splat/splat-internal.h b/module/splat/splat-internal.h similarity index 100% rename from modules/splat/splat-internal.h rename to module/splat/splat-internal.h diff --git a/modules/splat/splat-kmem.c b/module/splat/splat-kmem.c similarity index 100% rename from modules/splat/splat-kmem.c rename to module/splat/splat-kmem.c diff --git a/modules/splat/splat-kobj.c b/module/splat/splat-kobj.c similarity index 100% rename from modules/splat/splat-kobj.c rename to module/splat/splat-kobj.c diff --git a/modules/splat/splat-list.c b/module/splat/splat-list.c similarity index 100% rename from modules/splat/splat-list.c rename to module/splat/splat-list.c diff --git a/modules/splat/splat-mutex.c b/module/splat/splat-mutex.c similarity index 100% rename from modules/splat/splat-mutex.c rename to module/splat/splat-mutex.c diff --git a/modules/splat/splat-random.c b/module/splat/splat-random.c similarity index 100% rename from modules/splat/splat-random.c rename to module/splat/splat-random.c diff --git a/modules/splat/splat-rwlock.c b/module/splat/splat-rwlock.c similarity index 100% rename from modules/splat/splat-rwlock.c rename to module/splat/splat-rwlock.c diff --git a/modules/splat/splat-taskq.c b/module/splat/splat-taskq.c similarity index 100% rename from modules/splat/splat-taskq.c rename to module/splat/splat-taskq.c diff --git a/modules/splat/splat-thread.c b/module/splat/splat-thread.c similarity index 100% rename from modules/splat/splat-thread.c rename to module/splat/splat-thread.c diff --git a/modules/splat/splat-time.c b/module/splat/splat-time.c similarity index 100% rename from modules/splat/splat-time.c rename to module/splat/splat-time.c diff --git a/modules/splat/splat-vnode.c b/module/splat/splat-vnode.c similarity index 100% rename from modules/splat/splat-vnode.c rename to module/splat/splat-vnode.c diff --git a/scripts/check.sh b/scripts/check.sh index 81f2fdde3..37f77853a 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -1,8 +1,8 @@ #!/bin/bash prog=check.sh -spl_module=../modules/spl/spl.ko -splat_module=../modules/splat/splat.ko +spl_module=../module/spl/spl.ko +splat_module=../module/splat/splat.ko splat_cmd=../cmd/splat verbose= From 5566ec0959a17776265204d24a186ffeb09cee7f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 15 Jan 2009 10:47:24 -0800 Subject: [PATCH 0214/1062] Refresh libtool --- libtool | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libtool b/libtool index c9b16afcb..30d9b0952 100755 --- a/libtool +++ b/libtool @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host wopri: +# Libtool was configured on host ilci: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -331,7 +331,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7266,7 +7266,7 @@ disable_libs=static # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host wopri: +# Libtool was configured on host ilci: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7550,7 +7550,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7574,7 +7574,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host wopri: +# Libtool was configured on host ilci: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7861,7 +7861,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" From 15270e003ed666ad965ab9f73b390846823998fd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 Jan 2009 11:59:47 -0800 Subject: [PATCH 0215/1062] Ensure -NDEBUG does not get added to spl_config.h and is only set in the build options. This allows other kernel modules to use spl_config to leverage the reset of the config checks without getting confused with the debug options --- config/spl-build.m4 | 2 -- configure | 5 ----- module/spl/spl-debug.c | 2 -- spl_config.h.in | 3 --- 4 files changed, 12 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c5c031977..993133065 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -97,8 +97,6 @@ AC_DEFUN([SPL_AC_DEBUG], [ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" else AC_MSG_RESULT([no]) - AC_DEFINE([NDEBUG], [1], - [Define to 1 to disable debug tracing]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" fi ]) diff --git a/configure b/configure index 2ecf422f0..5ac16ce74 100755 --- a/configure +++ b/configure @@ -19046,11 +19046,6 @@ echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - -cat >>confdefs.h <<\_ACEOF -#define NDEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" fi diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index df22cbc48..d2b96b0c3 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -1118,10 +1118,8 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags) if (spl_debug_panic_on_bug) spl_panic_in_progress = 1; -#ifdef DEBUG spl_debug_dumpstack(NULL); spl_debug_dumplog(flags); -#endif if (spl_debug_panic_on_bug) panic("SBUG"); diff --git a/spl_config.h.in b/spl_config.h.in index dfca13d09..c19555a06 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -108,9 +108,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 to disable debug tracing */ -#undef NDEBUG - /* Name of package */ #undef PACKAGE From ae3b87f908fe67f8be739b7f7c71bb5fdd742552 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 Jan 2009 12:47:53 -0800 Subject: [PATCH 0216/1062] KMEM_TRACKING turned up a missing free in list test 6, fix the leak --- module/splat/splat-list.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index 3d435cad0..464a45781 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -332,6 +332,7 @@ splat_list_test6(struct file *file, void *arg) if (li->li_data % 2 == 1) { li_prev = list_prev(&list, li); list_remove(&list, li); + kmem_free(li, sizeof(list_item_t)); li = li_prev; } } From b6b2acc66e9621ec8c218875b2e5395d0d1841fe Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 Jan 2009 13:39:35 -0800 Subject: [PATCH 0217/1062] Minor fix for compiler warning when KMEM_TRACKING is enabled --- module/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e580fbbdd..c6cd914ad 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1381,7 +1381,7 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) list_for_each_entry(kd, list, kd_list) printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr, - kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), + (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), kd->kd_func, kd->kd_line); spin_unlock_irqrestore(lock, flags); From 064bbffb633dfbc85a29843b421925214742c7e4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Jan 2009 11:46:02 -0800 Subject: [PATCH 0218/1062] Prep for 0.4.1 tag --- ChangeLog | 8 ++++++++ META | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 08cda5998..eb208f613 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-21 Brian Behlendorf + + * : Tag spl-0.4.1 + + * : Implement ksid_*, ddi_strto*, and system taskq functionality. + In addition, several other small Solaris compatibility changes + were made, see the 'git log' for full details. + 2008-11-26 Brian Behlendorf * : Tag spl-0.4.0 (Development now done with Git) diff --git a/META b/META index 6e5ae867f..4caa7e377 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.0 +Version: 0.4.1 Release: 1 Release-Tags: relext From 511176398c81136786d5f6a955dcc6509f98f573 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 22 Jan 2009 09:41:47 -0800 Subject: [PATCH 0219/1062] Update debug.h to standardize VERIFY3_IMPL error messages in debug and non-debug mode --- include/sys/debug.h | 24 +++++++++++++----------- libtool | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 0d7b0b772..b0f2bc727 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -191,9 +191,9 @@ struct trace_page { }; struct page_collection { - struct list_head pc_pages; - spinlock_t pc_lock; - int pc_want_daemon_pages; + struct list_head pc_pages; + spinlock_t pc_lock; + int pc_want_daemon_pages; }; #define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); @@ -201,8 +201,8 @@ struct page_collection { #ifdef NDEBUG #define CDEBUG_STACK() (0) -#define CDEBUG_LIMIT(x, y, z, a...) ((void)0) -#define __CDEBUG_LIMIT(x, y, z, a...) ((void)0) +#define CDEBUG_LIMIT(x, y, z, a...) ((void)0) +#define __CDEBUG_LIMIT(x, y, z, a...) ((void)0) #define CDEBUG(mask, format, a...) ((void)0) #define CWARN(fmt, a...) ((void)0) #define CERROR(fmt, a...) ((void)0) @@ -217,7 +217,7 @@ struct page_collection { #define __ASSERT(x) ((void)0) #define __ASSERT_TAGE_INVARIANT(x) ((void)0) #define ASSERT(x) ((void)0) -#define ASSERTF(x, y, z...) ((void)0) +#define ASSERTF(x, y, z...) ((void)0) #define VERIFY(cond) \ do { \ if (unlikely(!(cond))) { \ @@ -229,9 +229,10 @@ do { \ #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ do { \ if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ - printk(KERN_ERR "VERIFY3(" #LEFT " " #OP " " #RIGHT \ - " failed (" FMT ", " FMT ")\n", CAST (LEFT), \ - CAST (RIGHT)); \ + printk(KERN_ERR \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ + CAST (LEFT), CAST (RIGHT)); \ SBUG(); \ } \ } while (0) @@ -331,7 +332,8 @@ do { \ if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" FMT " " #OP " " FMT ")\n", \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ CAST (LEFT), CAST (RIGHT)); \ SBUG(); \ } \ @@ -405,7 +407,7 @@ do { \ __CDEBUG(NULL, subsys, D_TRACE, "Process leaving\n"); \ } while(0) -#define ENTRY __ENTRY(DEBUG_SUBSYSTEM) +#define ENTRY __ENTRY(DEBUG_SUBSYSTEM) #define EXIT __EXIT(DEBUG_SUBSYSTEM) #endif /* NDEBUG */ diff --git a/libtool b/libtool index 30d9b0952..8dde1f20c 100755 --- a/libtool +++ b/libtool @@ -1,7 +1,7 @@ #! /bin/sh # libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU spl 0.4.0) +# Generated automatically by (GNU spl 0.4.1) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 From 3f4126739dc5c2a0b10ec1f6143ec43028755aa4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 22 Jan 2009 09:58:48 -0800 Subject: [PATCH 0220/1062] Sleep uninteruptibly, waking up early may result in a crash --- module/splat/splat-kmem.c | 23 ++++++++++++----------- module/splat/splat-rwlock.c | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index a9792b1a5..31499dde3 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -309,31 +309,32 @@ splat_kmem_cache_size_test(struct file *file, void *arg, NULL, &kcp, NULL, flags); if (!cache) { splat_vprint(file, name, - "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); + "Unable to create '%s'\n", + SPLAT_KMEM_CACHE_NAME); return -ENOMEM; } kcd = kmem_cache_alloc(cache, KM_SLEEP); if (!kcd) { splat_vprint(file, name, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } if (!kcd->kcd_flag) { splat_vprint(file, name, - "Failed to run contructor for '%s'\n", - SPLAT_KMEM_CACHE_NAME); + "Failed to run contructor for '%s'\n", + SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } if (kcd->kcd_magic != kcp.kcp_magic) { splat_vprint(file, name, - "Failed to pass private data to constructor " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + "Failed to pass private data to constructor " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } @@ -346,14 +347,14 @@ splat_kmem_cache_size_test(struct file *file, void *arg, kmem_cache_destroy(cache); if (kcp.kcp_count) { splat_vprint(file, name, - "Failed to run destructor on all slab objects " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + "Failed to run destructor on all slab objects " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; } splat_vprint(file, name, - "Successfully ran ctors/dtors for %d elements in '%s'\n", - max, SPLAT_KMEM_CACHE_NAME); + "Successfully ran ctors/dtors for %d elements in '%s'\n", + max, SPLAT_KMEM_CACHE_NAME); return rc; diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index b1db12ea8..70c9dc3d0 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -84,7 +84,7 @@ typedef struct rw_thr { static inline void splat_rwlock_sleep(signed long delay) { - set_current_state(TASK_INTERRUPTIBLE); + set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(delay); } @@ -431,7 +431,7 @@ splat_rwlock_test2(struct file *file, void *arg) while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) != 0 || atomic_read(&rwv.rw_waiters) != 0)) { - splat_rwlock_sleep(1 * HZ); + splat_rwlock_sleep(HZ); } /* If any of the write threads ever acquired the lock From e4f3ea278e05b5b23e857cf6cf061caddf5ce148 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 23 Jan 2009 08:59:11 -0800 Subject: [PATCH 0221/1062] Remove stray ` from macro --- include/sys/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index b0f2bc727..7ceb571d0 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -340,7 +340,7 @@ do { \ } while (0) #define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) -#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu`", \ +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) From 48e0606a525527bef5b50172b4967a3f6cf1aa4d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 26 Jan 2009 09:02:04 -0800 Subject: [PATCH 0222/1062] Implement kmem cache alignment argument --- include/sys/kmem.h | 2 + module/spl/spl-kmem.c | 165 ++++++++++++++++++++++---------------- module/splat/splat-kmem.c | 48 ++++++++--- 3 files changed, 135 insertions(+), 80 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index ef401ade4..ef5876312 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -225,6 +225,7 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SPL_KMEM_CACHE_DELAY 5 #define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 +#define SPL_KMEM_CACHE_ALIGN 8 typedef int (*spl_kmem_ctor_t)(void *, void *, int); typedef void (*spl_kmem_dtor_t)(void *, void *); @@ -270,6 +271,7 @@ typedef struct spl_kmem_cache { void *skc_vmp; /* Unused */ uint32_t skc_flags; /* Flags */ uint32_t skc_obj_size; /* Object size */ + uint32_t skc_obj_align; /* Object alignment */ uint32_t skc_slab_objs; /* Objects per slab */ uint32_t skc_slab_size; /* Slab size */ uint32_t skc_delay; /* slab reclaim interval */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index c6cd914ad..0c3c2f37e 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -148,8 +148,6 @@ EXPORT_SYMBOL(kmem_set_warning); * * XXX: Slab coloring may also yield performance improvements and would * be desirable to implement. - * - * XXX: Proper hardware cache alignment would be good too. */ struct list_head spl_kmem_cache_list; /* List of caches */ @@ -573,44 +571,44 @@ kv_free(spl_kmem_cache_t *skc, void *ptr, int size) } } +/* It's important that we pack the spl_kmem_obj_t structure and the + * actual objects in to one large address space to minimize the number + * of calls to the allocator. It is far better to do a few large + * allocations and then subdivide it ourselves. Now which allocator + * we use requires balancing a few trade offs. + * + * For small objects we use kmem_alloc() because as long as you are + * only requesting a small number of pages (ideally just one) its cheap. + * However, when you start requesting multiple pages with kmem_alloc() + * it gets increasingly expensive since it requires contigeous pages. + * For this reason we shift to vmem_alloc() for slabs of large objects + * which removes the need for contigeous pages. We do not use + * vmem_alloc() in all cases because there is significant locking + * overhead in __get_vm_area_node(). This function takes a single + * global lock when aquiring an available virtual address range which + * serializes all vmem_alloc()'s for all slab caches. Using slightly + * different allocation functions for small and large objects should + * give us the best of both worlds. + * + * KMC_ONSLAB KMC_OFFSLAB + * + * +------------------------+ +-----------------+ + * | spl_kmem_slab_t --+-+ | | spl_kmem_slab_t |---+-+ + * | skc_obj_size <-+ | | +-----------------+ | | + * | spl_kmem_obj_t | | | | + * | skc_obj_size <---+ | +-----------------+ | | + * | spl_kmem_obj_t | | | skc_obj_size | <-+ | + * | ... v | | spl_kmem_obj_t | | + * +------------------------+ +-----------------+ v + */ static spl_kmem_slab_t * spl_slab_alloc(spl_kmem_cache_t *skc, int flags) { spl_kmem_slab_t *sks; spl_kmem_obj_t *sko, *n; void *base, *obj; - int i, size, rc = 0; + int i, align, size, rc = 0; - /* It's important that we pack the spl_kmem_obj_t structure - * and the actual objects in to one large address space - * to minimize the number of calls to the allocator. It - * is far better to do a few large allocations and then - * subdivide it ourselves. Now which allocator we use - * requires balancling a few trade offs. - * - * For small objects we use kmem_alloc() because as long - * as you are only requesting a small number of pages - * (ideally just one) its cheap. However, when you start - * requesting multiple pages kmem_alloc() get increasingly - * expensive since it requires contigeous pages. For this - * reason we shift to vmem_alloc() for slabs of large - * objects which removes the need for contigeous pages. - * We do not use vmem_alloc() in all cases because there - * is significant locking overhead in __get_vm_area_node(). - * This function takes a single global lock when aquiring - * an available virtual address range which serialize all - * vmem_alloc()'s for all slab caches. Using slightly - * different allocation functions for small and large - * objects should give us the best of both worlds. - * - * sks struct: sizeof(spl_kmem_slab_t) - * obj data: skc->skc_obj_size - * obj struct: sizeof(spl_kmem_obj_t) - * - * - * XXX: It would probably be a good idea to more carefully - * align these data structures in memory. - */ base = kv_alloc(skc, skc->skc_slab_size, flags); if (base == NULL) RETURN(NULL); @@ -623,7 +621,10 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) INIT_LIST_HEAD(&sks->sks_list); INIT_LIST_HEAD(&sks->sks_free_list); sks->sks_ref = 0; - size = sizeof(spl_kmem_obj_t) + skc->skc_obj_size; + + align = skc->skc_obj_align; + size = P2ROUNDUP(skc->skc_obj_size, align) + + P2ROUNDUP(sizeof(spl_kmem_obj_t), align); for (i = 0; i < sks->sks_objs; i++) { if (skc->skc_flags & KMC_OFFSLAB) { @@ -631,10 +632,12 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) if (!obj) GOTO(out, rc = -ENOMEM); } else { - obj = base + sizeof(spl_kmem_slab_t) + i * size; + obj = base + + P2ROUNDUP(sizeof(spl_kmem_slab_t), align) + + (i * size); } - sko = obj + skc->skc_obj_size; + sko = obj + P2ROUNDUP(skc->skc_obj_size, align); sko->sko_addr = obj; sko->sko_magic = SKO_MAGIC; sko->sko_slab = sks; @@ -648,7 +651,8 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) out: if (rc) { if (skc->skc_flags & KMC_OFFSLAB) - list_for_each_entry_safe(sko,n,&sks->sks_free_list,sko_list) + list_for_each_entry_safe(sko, n, &sks->sks_free_list, + sko_list) kv_free(skc, sko->sko_addr, size); kv_free(skc, base, skc->skc_slab_size); @@ -678,7 +682,8 @@ spl_slab_free(spl_kmem_slab_t *sks) { skc->skc_obj_total -= sks->sks_objs; skc->skc_slab_total--; list_del(&sks->sks_list); - size = sizeof(spl_kmem_obj_t) + skc->skc_obj_size; + size = P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) + + P2ROUNDUP(sizeof(spl_kmem_obj_t), skc->skc_obj_align); /* Run destructors slab is being released */ list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { @@ -736,21 +741,48 @@ spl_slab_reclaim(spl_kmem_cache_t *skc) RETURN(rc); } +/* Size slabs properly to ensure they are not too large */ +static int +spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) +{ + int max = ((uint64_t)1 << (MAX_ORDER - 1)) * PAGE_SIZE; + int align = skc->skc_obj_align; + + *objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; + + if (skc->skc_flags & KMC_OFFSLAB) { + *size = sizeof(spl_kmem_slab_t); + } else { +resize: + *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), align) + + *objs * (P2ROUNDUP(skc->skc_obj_size, align) + + P2ROUNDUP(sizeof(spl_kmem_obj_t), align)); + + if (*size > max) + GOTO(resize, *objs = *objs - 1); + + ASSERT(*objs > 0); + } + + ASSERTF(*size <= max, "%d < %d\n", *size, max); + RETURN(0); +} + static int spl_magazine_size(spl_kmem_cache_t *skc) { - int size; + int size, align = skc->skc_obj_align; ENTRY; /* Guesses for reasonable magazine sizes, they * should really adapt based on observed usage. */ - if (skc->skc_obj_size > (PAGE_SIZE * 256)) + if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE * 256)) size = 4; - else if (skc->skc_obj_size > (PAGE_SIZE * 32)) + else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE * 32)) size = 16; - else if (skc->skc_obj_size > (PAGE_SIZE)) + else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE)) size = 64; - else if (skc->skc_obj_size > (PAGE_SIZE / 4)) + else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE / 4)) size = 128; else size = 512; @@ -839,13 +871,13 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, void *priv, void *vmp, int flags) { spl_kmem_cache_t *skc; - uint32_t slab_max, slab_size, slab_objs; int rc, kmem_flags = KM_SLEEP; ENTRY; ASSERTF(!(flags & KMC_NOMAGAZINE), "Bad KMC_NOMAGAZINE (%x)\n", flags); ASSERTF(!(flags & KMC_NOHASH), "Bad KMC_NOHASH (%x)\n", flags); ASSERTF(!(flags & KMC_QCACHE), "Bad KMC_QCACHE (%x)\n", flags); + ASSERT(vmp == NULL); /* We may be called when there is a non-zero preempt_count or * interrupts are disabled is which case we must not sleep. @@ -874,6 +906,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_vmp = vmp; skc->skc_flags = flags; skc->skc_obj_size = size; + skc->skc_obj_align = SPL_KMEM_CACHE_ALIGN; skc->skc_delay = SPL_KMEM_CACHE_DELAY; INIT_LIST_HEAD(&skc->skc_list); @@ -890,46 +923,39 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_alloc = 0; skc->skc_obj_max = 0; + if (align) { + ASSERT((align & (align - 1)) == 0); /* Power of two */ + ASSERT(align >= SPL_KMEM_CACHE_ALIGN); /* Minimum size */ + skc->skc_obj_align = align; + } + /* If none passed select a cache type based on object size */ if (!(skc->skc_flags & (KMC_KMEM | KMC_VMEM))) { - if (skc->skc_obj_size < (PAGE_SIZE / 8)) { + if (P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) < + (PAGE_SIZE / 8)) { skc->skc_flags |= KMC_KMEM; } else { skc->skc_flags |= KMC_VMEM; } } - /* Size slabs properly so ensure they are not too large */ - slab_max = ((uint64_t)1 << (MAX_ORDER - 1)) * PAGE_SIZE; - if (skc->skc_flags & KMC_OFFSLAB) { - skc->skc_slab_objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; - skc->skc_slab_size = sizeof(spl_kmem_slab_t); - ASSERT(skc->skc_obj_size < slab_max); - } else { - slab_objs = SPL_KMEM_CACHE_OBJ_PER_SLAB + 1; - - do { - slab_objs--; - slab_size = sizeof(spl_kmem_slab_t) + slab_objs * - (skc->skc_obj_size+sizeof(spl_kmem_obj_t)); - } while (slab_size > slab_max); - - skc->skc_slab_objs = slab_objs; - skc->skc_slab_size = slab_size; - } + rc = spl_slab_size(skc, &skc->skc_slab_objs, &skc->skc_slab_size); + if (rc) + GOTO(out, rc); rc = spl_magazine_create(skc); - if (rc) { - kmem_free(skc->skc_name, skc->skc_name_size); - kmem_free(skc, sizeof(*skc)); - RETURN(NULL); - } + if (rc) + GOTO(out, rc); down_write(&spl_kmem_cache_sem); list_add_tail(&skc->skc_list, &spl_kmem_cache_list); up_write(&spl_kmem_cache_sem); RETURN(skc); +out: + kmem_free(skc->skc_name, skc->skc_name_size); + kmem_free(skc, sizeof(*skc)); + RETURN(NULL); } EXPORT_SYMBOL(spl_kmem_cache_create); @@ -1119,7 +1145,7 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); - sko = obj + skc->skc_obj_size; + sko = obj + P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align); ASSERT(sko->sko_magic == SKO_MAGIC); sks = sko->sko_slab; @@ -1213,6 +1239,7 @@ restart: local_irq_restore(irq_flags); ASSERT(obj); + ASSERT(((unsigned long)(obj) % skc->skc_obj_align) == 0); /* Pre-emptively migrate object to CPU L1 cache */ prefetchw(obj); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 31499dde3..9b96fce90 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -47,11 +47,11 @@ #define SPLAT_KMEM_TEST4_DESC "Memory allocation test (vmem_zalloc)" #define SPLAT_KMEM_TEST5_ID 0x0105 -#define SPLAT_KMEM_TEST5_NAME "kmem_cache1" +#define SPLAT_KMEM_TEST5_NAME "kmem_small" #define SPLAT_KMEM_TEST5_DESC "Slab ctor/dtor test (small)" #define SPLAT_KMEM_TEST6_ID 0x0106 -#define SPLAT_KMEM_TEST6_NAME "kmem_cache2" +#define SPLAT_KMEM_TEST6_NAME "kmem_large" #define SPLAT_KMEM_TEST6_DESC "Slab ctor/dtor test (large)" #define SPLAT_KMEM_TEST7_ID 0x0107 @@ -62,6 +62,10 @@ #define SPLAT_KMEM_TEST8_NAME "kmem_lock" #define SPLAT_KMEM_TEST8_DESC "Slab locking test" +#define SPLAT_KMEM_TEST9_ID 0x0109 +#define SPLAT_KMEM_TEST9_NAME "kmem_align" +#define SPLAT_KMEM_TEST9_DESC "Slab alignment test" + #define SPLAT_KMEM_ALLOC_COUNT 10 #define SPLAT_VMEM_ALLOC_COUNT 10 @@ -250,6 +254,7 @@ typedef struct kmem_cache_priv { spinlock_t kcp_lock; wait_queue_head_t kcp_waitq; int kcp_size; + int kcp_align; int kcp_count; int kcp_threads; int kcp_alloc; @@ -289,8 +294,8 @@ splat_kmem_cache_test_destructor(void *ptr, void *priv) } static int -splat_kmem_cache_size_test(struct file *file, void *arg, - char *name, int size, int flags) +splat_kmem_cache_test(struct file *file, void *arg, char *name, + int size, int align, int flags) { kmem_cache_t *cache = NULL; kmem_cache_data_t *kcd = NULL; @@ -300,10 +305,12 @@ splat_kmem_cache_size_test(struct file *file, void *arg, kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; kcp.kcp_file = file; kcp.kcp_size = size; + kcp.kcp_align = align; kcp.kcp_count = 0; kcp.kcp_rc = 0; - cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp.kcp_size, 0, + cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, + kcp.kcp_size, kcp.kcp_align, splat_kmem_cache_test_constructor, splat_kmem_cache_test_destructor, NULL, &kcp, NULL, flags); @@ -373,15 +380,15 @@ splat_kmem_test5(struct file *file, void *arg) char *name = SPLAT_KMEM_TEST5_NAME; int rc; - rc = splat_kmem_cache_size_test(file, arg, name, 128, 0); + rc = splat_kmem_cache_test(file, arg, name, 128, 0, 0); if (rc) return rc; - rc = splat_kmem_cache_size_test(file, arg, name, 128, KMC_KMEM); + rc = splat_kmem_cache_test(file, arg, name, 128, 0, KMC_KMEM); if (rc) return rc; - return splat_kmem_cache_size_test(file, arg, name, 128, KMC_VMEM); + return splat_kmem_cache_test(file, arg, name, 128, 0, KMC_VMEM); } /* Validate large object cache behavior for dynamic/kmem/vmem caches */ @@ -391,15 +398,15 @@ splat_kmem_test6(struct file *file, void *arg) char *name = SPLAT_KMEM_TEST6_NAME; int rc; - rc = splat_kmem_cache_size_test(file, arg, name, 128 * 1024, 0); + rc = splat_kmem_cache_test(file, arg, name, 128*1024, 0, 0); if (rc) return rc; - rc = splat_kmem_cache_size_test(file, arg, name, 128 * 1024, KMC_KMEM); + rc = splat_kmem_cache_test(file, arg, name, 128*1024, 0, KMC_KMEM); if (rc) return rc; - return splat_kmem_cache_size_test(file, arg, name, 128 * 1028, KMC_VMEM); + return splat_kmem_cache_test(file, arg, name, 128*1028, 0, KMC_VMEM); } static void @@ -675,6 +682,22 @@ splat_kmem_test8(struct file *file, void *arg) return rc; } +/* Validate object alignment cache behavior for caches */ +static int +splat_kmem_test9(struct file *file, void *arg) +{ + char *name = SPLAT_KMEM_TEST9_NAME; + int i, rc; + + for (i = 8; i <= PAGE_SIZE; i *= 2) { + rc = splat_kmem_cache_test(file, arg, name, 157, i, 0); + if (rc) + return rc; + } + + return rc; +} + splat_subsystem_t * splat_kmem_init(void) { @@ -708,6 +731,8 @@ splat_kmem_init(void) SPLAT_KMEM_TEST7_ID, splat_kmem_test7); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST8_NAME, SPLAT_KMEM_TEST8_DESC, SPLAT_KMEM_TEST8_ID, splat_kmem_test8); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST9_NAME, SPLAT_KMEM_TEST9_DESC, + SPLAT_KMEM_TEST9_ID, splat_kmem_test9); return sub; } @@ -716,6 +741,7 @@ void splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST9_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST8_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST6_ID); From 0f233eac33e40d58386a8faa5656ee59bbfccfce Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 26 Jan 2009 16:47:49 -0800 Subject: [PATCH 0223/1062] Pull the blkdev header in to the sunldi for some useful structure definitions and helper functions --- include/sys/sunldi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index c0875725c..97952ad2f 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -32,6 +32,7 @@ #include #include #include +#include #define SECTOR_SIZE 512 From 34e71c9e97f4d0d2b3ede850d016a7de558b0f3c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 26 Jan 2009 20:10:23 -0800 Subject: [PATCH 0224/1062] Remove debug check was was accidentally left in place an prevent the slab cache from working on systems with >4 cores --- module/spl/spl-kmem.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 0c3c2f37e..a68f8efe9 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1206,7 +1206,6 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) spl_kmem_magazine_t *skm; unsigned long irq_flags; void *obj = NULL; - int id; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -1218,8 +1217,6 @@ restart: * in the restart case we must be careful to reaquire * the local magazine since this may have changed * when we need to grow the cache. */ - id = smp_processor_id(); - ASSERTF(id < 4, "cache=%p smp_processor_id=%d\n", skc, id); skm = skc->skc_mag[smp_processor_id()]; ASSERTF(skm->skm_magic == SKM_MAGIC, "%x != %x: %s/%p/%p %x/%x/%x\n", skm->skm_magic, SKM_MAGIC, skc->skc_name, skc, skm, From ea3e6ca9e595ebfba82b964ee2eaf1ddd7076f0f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Jan 2009 20:54:49 -0800 Subject: [PATCH 0225/1062] kmem_cache hardening and performance improvements - Added slab work queue task which gradually ages and free's slabs from the cache which have not been used recently. - Optimized slab packing algorithm to ensure each slab contains the maximum number of objects without create to large a slab. - Fix deadlock, we can never call kv_free() under the skc_lock. We now unlink the objects and slabs from the cache itself and attach them to a private work list. The contents of the list are then subsequently freed outside the spin lock. - Move magazine create/destroy operation on to local cpu. - Further performace optimizations by minimize the usage of the large per-cache skc_lock. This includes the addition of KMC_BIT_REAPING bit mask which is used to prevent concurrent reaping, and to defer new slab creation when reaping is occuring. - Add KMC_BIT_DESTROYING bit mask which is set when the cache is being destroyed, this is used to catch any task accessing the cache while it is being destroyed. - Add comments to all the functions and additional comments to try and make everything as clear as possible. - Major cleanup and additions to the SPLAT kmem tests to more rigerously stress the cache implementation and look for any problems. This includes correctness and performance tests. - Updated portable work queue interfaces --- include/sys/kmem.h | 71 ++- include/sys/sysmacros.h | 12 - include/sys/vmsystm.h | 3 +- module/spl/spl-kmem.c | 473 +++++++++----- module/splat/splat-internal.h | 1 + module/splat/splat-kmem.c | 1103 +++++++++++++++++++++------------ 6 files changed, 1096 insertions(+), 567 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index ef5876312..4f939e0fc 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -45,6 +45,7 @@ extern "C" { #include #include #include +#include /* * Memory allocation interfaces @@ -161,17 +162,32 @@ kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) /* * Slab allocation interfaces */ -#define KMC_NOTOUCH 0x00000001 -#define KMC_NODEBUG 0x00000002 /* Default behavior */ -#define KMC_NOMAGAZINE 0x00000004 /* XXX: No disable support available */ -#define KMC_NOHASH 0x00000008 /* XXX: No hash available */ -#define KMC_QCACHE 0x00000010 /* XXX: Unsupported */ -#define KMC_KMEM 0x00000100 /* Use kmem cache */ -#define KMC_VMEM 0x00000200 /* Use vmem cache */ -#define KMC_OFFSLAB 0x00000400 /* Objects not on slab */ +enum { + KMC_BIT_NOTOUCH = 0, /* Don't update ages */ + KMC_BIT_NODEBUG = 1, /* Default behavior */ + KMC_BIT_NOMAGAZINE = 2, /* XXX: Unsupported */ + KMC_BIT_NOHASH = 3, /* XXX: Unsupported */ + KMC_BIT_QCACHE = 4, /* XXX: Unsupported */ + KMC_BIT_KMEM = 5, /* Use kmem cache */ + KMC_BIT_VMEM = 6, /* Use vmem cache */ + KMC_BIT_OFFSLAB = 7, /* Objects not on slab */ + KMC_BIT_REAPING = 16, /* Reaping in progress */ + KMC_BIT_DESTROY = 17, /* Destroy in progress */ +}; -#define KMC_REAP_CHUNK 256 -#define KMC_DEFAULT_SEEKS DEFAULT_SEEKS +#define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH) +#define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) +#define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE) +#define KMC_NOHASH (1 << KMC_BIT_NOHASH) +#define KMC_QCACHE (1 << KMC_BIT_QCACHE) +#define KMC_KMEM (1 << KMC_BIT_KMEM) +#define KMC_VMEM (1 << KMC_BIT_VMEM) +#define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) +#define KMC_REAPING (1 << KMC_BIT_REAPING) +#define KMC_DESTROY (1 << KMC_BIT_DESTROY) + +#define KMC_REAP_CHUNK INT_MAX +#define KMC_DEFAULT_SEEKS 1 #ifdef DEBUG_KMEM_UNIMPLEMENTED static __inline__ void kmem_init(void) { @@ -223,9 +239,10 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SKS_MAGIC 0x22222222 #define SKC_MAGIC 0x2c2c2c2c -#define SPL_KMEM_CACHE_DELAY 5 -#define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 -#define SPL_KMEM_CACHE_ALIGN 8 +#define SPL_KMEM_CACHE_DELAY 5 /* Minimum slab release age */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 /* Target objects per slab */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 8 /* Minimum objects per slab */ +#define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ typedef int (*spl_kmem_ctor_t)(void *, void *, int); typedef void (*spl_kmem_dtor_t)(void *, void *); @@ -258,24 +275,28 @@ typedef struct spl_kmem_slab { } spl_kmem_slab_t; typedef struct spl_kmem_cache { - uint32_t skc_magic; /* Sanity magic */ - uint32_t skc_name_size; /* Name length */ - char *skc_name; /* Name string */ + uint32_t skc_magic; /* Sanity magic */ + uint32_t skc_name_size; /* Name length */ + char *skc_name; /* Name string */ spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */ uint32_t skc_mag_size; /* Magazine size */ uint32_t skc_mag_refill; /* Magazine refill count */ - spl_kmem_ctor_t skc_ctor; /* Constructor */ - spl_kmem_dtor_t skc_dtor; /* Destructor */ - spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ - void *skc_private; /* Private data */ - void *skc_vmp; /* Unused */ + spl_kmem_ctor_t skc_ctor; /* Constructor */ + spl_kmem_dtor_t skc_dtor; /* Destructor */ + spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ + void *skc_private; /* Private data */ + void *skc_vmp; /* Unused */ uint32_t skc_flags; /* Flags */ uint32_t skc_obj_size; /* Object size */ uint32_t skc_obj_align; /* Object alignment */ uint32_t skc_slab_objs; /* Objects per slab */ - uint32_t skc_slab_size; /* Slab size */ - uint32_t skc_delay; /* slab reclaim interval */ - struct list_head skc_list; /* List of caches linkage */ + uint32_t skc_slab_size; /* Slab size */ + uint32_t skc_delay; /* Slab reclaim interval */ + atomic_t skc_ref; /* Ref count callers */ + struct delayed_work skc_work; /* Slab reclaim work */ + struct work_struct work; + struct timer_list timer; + struct list_head skc_list; /* List of caches linkage */ struct list_head skc_complete_list;/* Completely alloc'ed */ struct list_head skc_partial_list; /* Partially alloc'ed */ spinlock_t skc_lock; /* Cache lock */ @@ -283,7 +304,7 @@ typedef struct spl_kmem_cache { uint64_t skc_slab_create;/* Slab creates */ uint64_t skc_slab_destroy;/* Slab destroys */ uint64_t skc_slab_total; /* Slab total current */ - uint64_t skc_slab_alloc; /* Slab alloc current */ + uint64_t skc_slab_alloc; /* Slab alloc current */ uint64_t skc_slab_max; /* Slab max historic */ uint64_t skc_obj_total; /* Obj total current */ uint64_t skc_obj_alloc; /* Obj alloc current */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 94ff3f84e..b82812385 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -203,18 +203,6 @@ extern int ddi_strtoul(const char *str, char **nptr, #define offsetof(s, m) ((size_t)(&(((s *)0)->m))) #endif -#ifdef HAVE_3ARGS_INIT_WORK - -#define spl_init_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), (void *)(d)) -#define spl_get_work_data(type,field,data) (data) - -#else - -#define spl_init_work(wq,cb,d) INIT_WORK((wq), (void *)(cb)); -#define spl_get_work_data(type,field,data) container_of(data,type,field) - -#endif - #ifdef __cplusplus } #endif diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index e92c17bdd..1cb716f13 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -35,8 +35,7 @@ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ #define physmem num_physpages -#define freemem nr_free_pages() // Expensive on linux, - // cheap on solaris +#define freemem nr_free_pages() #define minfree 0 #define needfree 0 /* # of needed pages */ #define ptob(pages) (pages * PAGE_SIZE) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index a68f8efe9..83eefe293 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -132,10 +132,6 @@ EXPORT_SYMBOL(kmem_set_warning); * small virtual address space on 32bit arches. This will seriously * constrain the size of the slab caches and their performance. * - * XXX: Implement work requests to keep an eye on each cache and - * shrink them via spl_slab_reclaim() when they are wasting lots - * of space. Currently this process is driven by the reapers. - * * XXX: Improve the partial slab list by carefully maintaining a * strict ordering of fullest to emptiest slabs based on * the slab reference count. This gaurentees the when freeing @@ -571,7 +567,8 @@ kv_free(spl_kmem_cache_t *skc, void *ptr, int size) } } -/* It's important that we pack the spl_kmem_obj_t structure and the +/* + * It's important that we pack the spl_kmem_obj_t structure and the * actual objects in to one large address space to minimize the number * of calls to the allocator. It is far better to do a few large * allocations and then subdivide it ourselves. Now which allocator @@ -662,14 +659,17 @@ out: RETURN(sks); } -/* Removes slab from complete or partial list, so it must - * be called with the 'skc->skc_lock' held. +/* + * Remove a slab from complete or partial list, it must be called with + * the 'skc->skc_lock' held but the actual free must be performed + * outside the lock to prevent deadlocking on vmem addresses. */ static void -spl_slab_free(spl_kmem_slab_t *sks) { +spl_slab_free(spl_kmem_slab_t *sks, + struct list_head *sks_list, struct list_head *sko_list) +{ spl_kmem_cache_t *skc; spl_kmem_obj_t *sko, *n; - int size; ENTRY; ASSERT(sks->sks_magic == SKS_MAGIC); @@ -682,114 +682,190 @@ spl_slab_free(spl_kmem_slab_t *sks) { skc->skc_obj_total -= sks->sks_objs; skc->skc_slab_total--; list_del(&sks->sks_list); - size = P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) + - P2ROUNDUP(sizeof(spl_kmem_obj_t), skc->skc_obj_align); /* Run destructors slab is being released */ list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { ASSERT(sko->sko_magic == SKO_MAGIC); + list_del(&sko->sko_list); if (skc->skc_dtor) skc->skc_dtor(sko->sko_addr, skc->skc_private); if (skc->skc_flags & KMC_OFFSLAB) - kv_free(skc, sko->sko_addr, size); + list_add(&sko->sko_list, sko_list); } - kv_free(skc, sks, skc->skc_slab_size); + list_add(&sks->sks_list, sks_list); EXIT; } -static int -__spl_slab_reclaim(spl_kmem_cache_t *skc) +/* + * Traverses all the partial slabs attached to a cache and free those + * which which are currently empty, and have not been touched for + * skc_delay seconds. This is to avoid thrashing. + */ +static void +spl_slab_reclaim(spl_kmem_cache_t *skc, int flag) { spl_kmem_slab_t *sks, *m; - int rc = 0; + spl_kmem_obj_t *sko, *n; + LIST_HEAD(sks_list); + LIST_HEAD(sko_list); + int size; ENTRY; - ASSERT(spin_is_locked(&skc->skc_lock)); /* - * Free empty slabs which have not been touched in skc_delay - * seconds. This delay time is important to avoid thrashing. - * Empty slabs will be at the end of the skc_partial_list. + * Move empty slabs and objects which have not been touched in + * skc_delay seconds on to private lists to be freed outside + * the spin lock. This delay time is important to avoid + * thrashing however when flag is set the delay will not be + * used. Empty slabs will be at the end of the skc_partial_list. */ + spin_lock(&skc->skc_lock); list_for_each_entry_safe_reverse(sks, m, &skc->skc_partial_list, sks_list) { if (sks->sks_ref > 0) break; - if (time_after(jiffies, sks->sks_age + skc->skc_delay * HZ)) { - spl_slab_free(sks); - rc++; - } + if (flag || time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)) + spl_slab_free(sks, &sks_list, &sko_list); } - - /* Returns number of slabs reclaimed */ - RETURN(rc); -} - -static int -spl_slab_reclaim(spl_kmem_cache_t *skc) -{ - int rc; - ENTRY; - - spin_lock(&skc->skc_lock); - rc = __spl_slab_reclaim(skc); spin_unlock(&skc->skc_lock); - RETURN(rc); + /* + * We only have list of spl_kmem_obj_t's if they are located off + * the slab, otherwise they get feed with the spl_kmem_slab_t. + */ + if (!list_empty(&sko_list)) { + ASSERT(skc->skc_flags & KMC_OFFSLAB); + + size = P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) + + P2ROUNDUP(sizeof(spl_kmem_obj_t), skc->skc_obj_align); + + list_for_each_entry_safe(sko, n, &sko_list, sko_list) + kv_free(skc, sko->sko_addr, size); + } + + list_for_each_entry_safe(sks, m, &sks_list, sks_list) + kv_free(skc, sks, skc->skc_slab_size); + + EXIT; } -/* Size slabs properly to ensure they are not too large */ +/* + * Called regularly on all caches to age objects out of the magazines + * which have not been access in skc->skc_delay seconds. This prevents + * idle magazines from holding memory which might be better used by + * other caches or parts of the system. The delay is present to + * prevent thrashing the magazine. + */ +static void +spl_magazine_age(void *data) +{ + spl_kmem_cache_t *skc = data; + spl_kmem_magazine_t *skm = skc->skc_mag[smp_processor_id()]; + + if (skm->skm_avail > 0 && + time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) + (void)spl_cache_flush(skc, skm, skm->skm_refill); +} + +/* + * Called regularly to keep a downward pressure on the size of idle + * magazines and to release free slabs from the cache. This function + * never calls the registered reclaim function, that only occures + * under memory pressure or with a direct call to spl_kmem_reap(). + */ +static void +spl_cache_age(void *data) +{ + spl_kmem_cache_t *skc = + spl_get_work_data(data, spl_kmem_cache_t, skc_work.work); + + ASSERT(skc->skc_magic == SKC_MAGIC); + on_each_cpu(spl_magazine_age, skc, 0, 1); + spl_slab_reclaim(skc, 0); + + if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) + schedule_delayed_work(&skc->skc_work, 2 * skc->skc_delay * HZ); +} + +/* + * Size a slab based on the size of each aliged object plus spl_kmem_obj_t. + * When on-slab we want to target SPL_KMEM_CACHE_OBJ_PER_SLAB. However, + * for very small objects we may end up with more than this so as not + * to waste space in the minimal allocation of a single page. Also for + * very large objects we may use as few as SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN, + * lower than this and we will fail. + */ static int spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) { - int max = ((uint64_t)1 << (MAX_ORDER - 1)) * PAGE_SIZE; - int align = skc->skc_obj_align; - - *objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; + int sks_size, obj_size, max_size, align; if (skc->skc_flags & KMC_OFFSLAB) { + *objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; *size = sizeof(spl_kmem_slab_t); } else { -resize: - *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), align) + - *objs * (P2ROUNDUP(skc->skc_obj_size, align) + - P2ROUNDUP(sizeof(spl_kmem_obj_t), align)); + align = skc->skc_obj_align; + sks_size = P2ROUNDUP(sizeof(spl_kmem_slab_t), align); + obj_size = P2ROUNDUP(skc->skc_obj_size, align) + + P2ROUNDUP(sizeof(spl_kmem_obj_t), align); - if (*size > max) - GOTO(resize, *objs = *objs - 1); + if (skc->skc_flags & KMC_KMEM) + max_size = ((uint64_t)1 << (MAX_ORDER-1)) * PAGE_SIZE; + else + max_size = (32 * 1024 * 1024); - ASSERT(*objs > 0); + for (*size = PAGE_SIZE; *size <= max_size; *size += PAGE_SIZE) { + *objs = (*size - sks_size) / obj_size; + if (*objs >= SPL_KMEM_CACHE_OBJ_PER_SLAB) + RETURN(0); + } + + /* + * Unable to satisfy target objets per slab, fallback to + * allocating a maximally sized slab and assuming it can + * contain the minimum objects count use it. If not fail. + */ + *size = max_size; + *objs = (*size - sks_size) / obj_size; + if (*objs >= SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN) + RETURN(0); } - ASSERTF(*size <= max, "%d < %d\n", *size, max); - RETURN(0); + RETURN(-ENOSPC); } +/* + * Make a guess at reasonable per-cpu magazine size based on the size of + * each object and the cost of caching N of them in each magazine. Long + * term this should really adapt based on an observed usage heuristic. + */ static int spl_magazine_size(spl_kmem_cache_t *skc) { int size, align = skc->skc_obj_align; ENTRY; - /* Guesses for reasonable magazine sizes, they - * should really adapt based on observed usage. */ + /* Per-magazine sizes below assume a 4Kib page size */ if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE * 256)) - size = 4; + size = 4; /* Minimum 4Mib per-magazine */ else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE * 32)) - size = 16; + size = 16; /* Minimum 2Mib per-magazine */ else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE)) - size = 64; + size = 64; /* Minimum 256Kib per-magazine */ else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE / 4)) - size = 128; + size = 128; /* Minimum 128Kib per-magazine */ else - size = 512; + size = 256; RETURN(size); } +/* + * Allocate a per-cpu magazine to assoicate with a specific core. + */ static spl_kmem_magazine_t * spl_magazine_alloc(spl_kmem_cache_t *skc, int node) { @@ -798,19 +874,21 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) sizeof(void *) * skc->skc_mag_size; ENTRY; - skm = kmem_alloc_node(size, GFP_KERNEL, node); + skm = kmem_alloc_node(size, GFP_KERNEL | __GFP_NOFAIL, node); if (skm) { skm->skm_magic = SKM_MAGIC; skm->skm_avail = 0; skm->skm_size = skc->skc_mag_size; skm->skm_refill = skc->skc_mag_refill; - if (!(skc->skc_flags & KMC_NOTOUCH)) - skm->skm_age = jiffies; + skm->skm_age = jiffies; } RETURN(skm); } +/* + * Free a per-cpu magazine assoicated with a specific core. + */ static void spl_magazine_free(spl_kmem_magazine_t *skm) { @@ -825,44 +903,72 @@ spl_magazine_free(spl_kmem_magazine_t *skm) EXIT; } +static void +__spl_magazine_create(void *data) +{ + spl_kmem_cache_t *skc = data; + int id = smp_processor_id(); + + skc->skc_mag[id] = spl_magazine_alloc(skc, cpu_to_node(id)); + ASSERT(skc->skc_mag[id]); +} + +/* + * Create all pre-cpu magazines of reasonable sizes. + */ static int spl_magazine_create(spl_kmem_cache_t *skc) { - int i; ENTRY; skc->skc_mag_size = spl_magazine_size(skc); - skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; - - for_each_online_cpu(i) { - skc->skc_mag[i] = spl_magazine_alloc(skc, cpu_to_node(i)); - if (!skc->skc_mag[i]) { - for (i--; i >= 0; i--) - spl_magazine_free(skc->skc_mag[i]); - - RETURN(-ENOMEM); - } - } + skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; + on_each_cpu(__spl_magazine_create, skc, 0, 1); RETURN(0); } +static void +__spl_magazine_destroy(void *data) +{ + spl_kmem_cache_t *skc = data; + spl_kmem_magazine_t *skm = skc->skc_mag[smp_processor_id()]; + + (void)spl_cache_flush(skc, skm, skm->skm_avail); + spl_magazine_free(skm); +} + +/* + * Destroy all pre-cpu magazines. + */ static void spl_magazine_destroy(spl_kmem_cache_t *skc) { - spl_kmem_magazine_t *skm; - int i; ENTRY; - - for_each_online_cpu(i) { - skm = skc->skc_mag[i]; - (void)spl_cache_flush(skc, skm, skm->skm_avail); - spl_magazine_free(skm); - } - + on_each_cpu(__spl_magazine_destroy, skc, 0, 1); EXIT; } +/* + * Create a object cache based on the following arguments: + * name cache name + * size cache object size + * align cache object alignment + * ctor cache object constructor + * dtor cache object destructor + * reclaim cache object reclaim + * priv cache private data for ctor/dtor/reclaim + * vmp unused must be NULL + * flags + * KMC_NOTOUCH Disable cache object aging (unsupported) + * KMC_NODEBUG Disable debugging (unsupported) + * KMC_NOMAGAZINE Disable magazine (unsupported) + * KMC_NOHASH Disable hashing (unsupported) + * KMC_QCACHE Disable qcache (unsupported) + * KMC_KMEM Force kmem backed cache + * KMC_VMEM Force vmem backed cache + * KMC_OFFSLAB Locate objects off the slab + */ spl_kmem_cache_t * spl_kmem_cache_create(char *name, size_t size, size_t align, spl_kmem_ctor_t ctor, @@ -908,6 +1014,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_size = size; skc->skc_obj_align = SPL_KMEM_CACHE_ALIGN; skc->skc_delay = SPL_KMEM_CACHE_DELAY; + atomic_set(&skc->skc_ref, 0); INIT_LIST_HEAD(&skc->skc_list); INIT_LIST_HEAD(&skc->skc_complete_list); @@ -947,6 +1054,9 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (rc) GOTO(out, rc); + spl_init_delayed_work(&skc->skc_work, spl_cache_age, skc); + schedule_delayed_work(&skc->skc_work, 2 * skc->skc_delay * HZ); + down_write(&spl_kmem_cache_sem); list_add_tail(&skc->skc_list, &spl_kmem_cache_list); up_write(&spl_kmem_cache_sem); @@ -959,10 +1069,13 @@ out: } EXPORT_SYMBOL(spl_kmem_cache_create); +/* + * Destroy a cache and all objects assoicated with the cache. + */ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { - spl_kmem_slab_t *sks, *m; + DECLARE_WAIT_QUEUE_HEAD(wq); ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -971,20 +1084,27 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) list_del_init(&skc->skc_list); up_write(&spl_kmem_cache_sem); + /* Cancel any and wait for any pending delayed work */ + ASSERT(!test_and_set_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + cancel_delayed_work(&skc->skc_work); + flush_scheduled_work(); + + /* Wait until all current callers complete, this is mainly + * to catch the case where a low memory situation triggers a + * cache reaping action which races with this destroy. */ + wait_event(wq, atomic_read(&skc->skc_ref) == 0); + spl_magazine_destroy(skc); + spl_slab_reclaim(skc, 1); spin_lock(&skc->skc_lock); /* Validate there are no objects in use and free all the * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ + ASSERT3U(skc->skc_slab_alloc, ==, 0); + ASSERT3U(skc->skc_obj_alloc, ==, 0); + ASSERT3U(skc->skc_slab_total, ==, 0); + ASSERT3U(skc->skc_obj_total, ==, 0); ASSERT(list_empty(&skc->skc_complete_list)); - ASSERT(skc->skc_slab_alloc == 0); - ASSERT(skc->skc_obj_alloc == 0); - - list_for_each_entry_safe(sks, m, &skc->skc_partial_list, sks_list) - spl_slab_free(sks); - - ASSERT(skc->skc_slab_total == 0); - ASSERT(skc->skc_obj_total == 0); kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); @@ -995,6 +1115,10 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) } EXPORT_SYMBOL(spl_kmem_cache_destroy); +/* + * Allocate an object from a slab attached to the cache. This is used to + * repopulate the per-cpu magazine caches in batches when they run low. + */ static void * spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) { @@ -1030,10 +1154,11 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) return sko->sko_addr; } -/* No available objects create a new slab. Since this is an - * expensive operation we do it without holding the spinlock - * and only briefly aquire it when we link in the fully - * allocated and constructed slab. +/* + * No available objects on any slabsi, create a new slab. Since this + * is an expensive operation we do it without holding the spinlock and + * only briefly aquire it when we link in the fully allocated and + * constructed slab. */ static spl_kmem_slab_t * spl_cache_grow(spl_kmem_cache_t *skc, int flags) @@ -1042,34 +1167,42 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); + local_irq_enable(); + might_sleep(); - if (flags & __GFP_WAIT) { - flags |= __GFP_NOFAIL; - local_irq_enable(); - might_sleep(); + /* + * Before allocating a new slab check if the slab is being reaped. + * If it is there is a good chance we can wait until it finishes + * and then use one of the newly freed but not aged-out slabs. + */ + if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { + schedule(); + GOTO(out, sks= NULL); } - sks = spl_slab_alloc(skc, flags); - if (sks == NULL) { - if (flags & __GFP_WAIT) - local_irq_disable(); + /* Allocate a new slab for the cache */ + sks = spl_slab_alloc(skc, flags | __GFP_NORETRY | __GFP_NOWARN); + if (sks == NULL) + GOTO(out, sks = NULL); - RETURN(NULL); - } - - if (flags & __GFP_WAIT) - local_irq_disable(); - - /* Link the new empty slab in to the end of skc_partial_list */ + /* Link the new empty slab in to the end of skc_partial_list. */ spin_lock(&skc->skc_lock); skc->skc_slab_total++; skc->skc_obj_total += sks->sks_objs; list_add_tail(&sks->sks_list, &skc->skc_partial_list); spin_unlock(&skc->skc_lock); +out: + local_irq_disable(); RETURN(sks); } +/* + * Refill a per-cpu magazine with objects from the slabs for this + * cache. Ideally the magazine can be repopulated using existing + * objects which have been released, however if we are unable to + * locate enough free objects new slabs of objects will be created. + */ static int spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) { @@ -1080,13 +1213,11 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); - /* XXX: Check for refill bouncing by age perhaps */ refill = MIN(skm->skm_refill, skm->skm_size - skm->skm_avail); - spin_lock(&skc->skc_lock); while (refill > 0) { - /* No slabs available we must grow the cache */ + /* No slabs available we may need to grow the cache */ if (list_empty(&skc->skc_partial_list)) { spin_unlock(&skc->skc_lock); @@ -1135,6 +1266,9 @@ out: RETURN(rc); } +/* + * Release an object back to the slab from which it came. + */ static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) { @@ -1176,6 +1310,13 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) EXIT; } +/* + * Release a batch of objects from a per-cpu magazine back to their + * respective slabs. This occurs when we exceed the magazine size, + * are under memory pressure, when the cache is idle, or during + * cache cleanup. The flush argument contains the number of entries + * to remove from the magazine. + */ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) { @@ -1185,12 +1326,17 @@ spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); + /* + * XXX: Currently we simply return objects from the magazine to + * the slabs in fifo order. The ideal thing to do from a memory + * fragmentation standpoint is to cheaply determine the set of + * objects in the magazine which will result in the largest + * number of free slabs if released from the magazine. + */ spin_lock(&skc->skc_lock); - for (i = 0; i < count; i++) spl_cache_shrink(skc, skm->skm_objs[i]); -// __spl_slab_reclaim(skc); skm->skm_avail -= count; memmove(skm->skm_objs, &(skm->skm_objs[count]), sizeof(void *) * skm->skm_avail); @@ -1200,6 +1346,10 @@ spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) RETURN(count); } +/* + * Allocate an object from the per-cpu magazine, or if the magazine + * is empty directly allocate from a slab and repopulate the magazine. + */ void * spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) { @@ -1209,7 +1359,9 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(flags & KM_SLEEP); /* XXX: KM_NOSLEEP not yet supported */ + ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + ASSERT(flags & KM_SLEEP); + atomic_inc(&skc->skc_ref); local_irq_save(irq_flags); restart: @@ -1225,8 +1377,7 @@ restart: if (likely(skm->skm_avail)) { /* Object available in CPU cache, use it */ obj = skm->skm_objs[--skm->skm_avail]; - if (!(skc->skc_flags & KMC_NOTOUCH)) - skm->skm_age = jiffies; + skm->skm_age = jiffies; } else { /* Per-CPU cache empty, directly allocate from * the slab and refill the per-CPU cache. */ @@ -1240,11 +1391,18 @@ restart: /* Pre-emptively migrate object to CPU L1 cache */ prefetchw(obj); + atomic_dec(&skc->skc_ref); RETURN(obj); } EXPORT_SYMBOL(spl_kmem_cache_alloc); +/* + * Free an object back to the local per-cpu magazine, there is no + * guarantee that this is the same magazine the object was originally + * allocated from. We may need to flush entire from the magazine + * back to the slabs to make space. + */ void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) { @@ -1253,6 +1411,8 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + atomic_inc(&skc->skc_ref); local_irq_save(flags); /* Safe to update per-cpu structure without lock, but @@ -1270,62 +1430,87 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) skm->skm_objs[skm->skm_avail++] = obj; local_irq_restore(flags); + atomic_dec(&skc->skc_ref); EXIT; } EXPORT_SYMBOL(spl_kmem_cache_free); +/* + * The generic shrinker function for all caches. Under linux a shrinker + * may not be tightly coupled with a slab cache. In fact linux always + * systematically trys calling all registered shrinker callbacks which + * report that they contain unused objects. Because of this we only + * register one shrinker function in the shim layer for all slab caches. + * We always attempt to shrink all caches when this generic shrinker + * is called. The shrinker should return the number of free objects + * in the cache when called with nr_to_scan == 0 but not attempt to + * free any objects. When nr_to_scan > 0 it is a request that nr_to_scan + * objects should be freed, because Solaris semantics are to free + * all available objects we may free more objects than requested. + */ static int spl_kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) { spl_kmem_cache_t *skc; + int unused = 0; - /* Under linux a shrinker is not tightly coupled with a slab - * cache. In fact linux always systematically trys calling all - * registered shrinker callbacks until its target reclamation level - * is reached. Because of this we only register one shrinker - * function in the shim layer for all slab caches. And we always - * attempt to shrink all caches when this generic shrinker is called. - */ down_read(&spl_kmem_cache_sem); + list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { + if (nr_to_scan) + spl_kmem_cache_reap_now(skc); - list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) - spl_kmem_cache_reap_now(skc); - + /* + * Presume everything alloc'ed in reclaimable, this ensures + * we are called again with nr_to_scan > 0 so can try and + * reclaim. The exact number is not important either so + * we forgo taking this already highly contented lock. + */ + unused += skc->skc_obj_alloc; + } up_read(&spl_kmem_cache_sem); - /* XXX: Under linux we should return the remaining number of - * entries in the cache. We should do this as well. - */ - return 1; + return (unused * sysctl_vfs_cache_pressure) / 100; } +/* + * Call the registered reclaim function for a cache. Depending on how + * many and which objects are released it may simply repopulate the + * local magazine which will then need to age-out. Objects which cannot + * fit in the magazine we will be released back to their slabs which will + * also need to age out before being release. This is all just best + * effort and we do not want to thrash creating and destroying slabs. + */ void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) { - spl_kmem_magazine_t *skm; - int i; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + + /* Prevent concurrent cache reaping when contended */ + if (test_and_set_bit(KMC_BIT_REAPING, &skc->skc_flags)) { + EXIT; + return; + } + + atomic_inc(&skc->skc_ref); if (skc->skc_reclaim) skc->skc_reclaim(skc->skc_private); - /* Ensure per-CPU caches which are idle gradually flush */ - for_each_online_cpu(i) { - skm = skc->skc_mag[i]; - - if (time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) - (void)spl_cache_flush(skc, skm, skm->skm_refill); - } - - spl_slab_reclaim(skc); + spl_slab_reclaim(skc, 0); + clear_bit(KMC_BIT_REAPING, &skc->skc_flags); + atomic_dec(&skc->skc_ref); EXIT; } EXPORT_SYMBOL(spl_kmem_cache_reap_now); +/* + * Reap all free slabs from all registered caches. + */ void spl_kmem_reap(void) { diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 87c47b173..0fa177c02 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 9b96fce90..c592e983c 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -4,9 +4,9 @@ * Copyright (c) 2008 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick * UCRL-CODE-235197 * * This is free software; you can redistribute it and/or modify it @@ -47,30 +47,37 @@ #define SPLAT_KMEM_TEST4_DESC "Memory allocation test (vmem_zalloc)" #define SPLAT_KMEM_TEST5_ID 0x0105 -#define SPLAT_KMEM_TEST5_NAME "kmem_small" +#define SPLAT_KMEM_TEST5_NAME "slab_small" #define SPLAT_KMEM_TEST5_DESC "Slab ctor/dtor test (small)" #define SPLAT_KMEM_TEST6_ID 0x0106 -#define SPLAT_KMEM_TEST6_NAME "kmem_large" +#define SPLAT_KMEM_TEST6_NAME "slab_large" #define SPLAT_KMEM_TEST6_DESC "Slab ctor/dtor test (large)" #define SPLAT_KMEM_TEST7_ID 0x0107 -#define SPLAT_KMEM_TEST7_NAME "kmem_reap" -#define SPLAT_KMEM_TEST7_DESC "Slab reaping test" +#define SPLAT_KMEM_TEST7_NAME "slab_align" +#define SPLAT_KMEM_TEST7_DESC "Slab alignment test" #define SPLAT_KMEM_TEST8_ID 0x0108 -#define SPLAT_KMEM_TEST8_NAME "kmem_lock" -#define SPLAT_KMEM_TEST8_DESC "Slab locking test" +#define SPLAT_KMEM_TEST8_NAME "slab_reap" +#define SPLAT_KMEM_TEST8_DESC "Slab reaping test" #define SPLAT_KMEM_TEST9_ID 0x0109 -#define SPLAT_KMEM_TEST9_NAME "kmem_align" -#define SPLAT_KMEM_TEST9_DESC "Slab alignment test" +#define SPLAT_KMEM_TEST9_NAME "slab_age" +#define SPLAT_KMEM_TEST9_DESC "Slab aging test" + +#define SPLAT_KMEM_TEST10_ID 0x010a +#define SPLAT_KMEM_TEST10_NAME "slab_lock" +#define SPLAT_KMEM_TEST10_DESC "Slab locking test" + +#define SPLAT_KMEM_TEST11_ID 0x010b +#define SPLAT_KMEM_TEST11_NAME "slab_overcommit" +#define SPLAT_KMEM_TEST11_DESC "Slab memory overcommit test" #define SPLAT_KMEM_ALLOC_COUNT 10 #define SPLAT_VMEM_ALLOC_COUNT 10 -/* XXX - This test may fail under tight memory conditions */ static int splat_kmem_test1(struct file *file, void *arg) { @@ -96,8 +103,8 @@ splat_kmem_test1(struct file *file, void *arg) kmem_free(ptr[i], size); splat_vprint(file, SPLAT_KMEM_TEST1_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_KMEM_ALLOC_COUNT); + "%d byte allocations, %d/%d successful\n", + size, count, SPLAT_KMEM_ALLOC_COUNT); if (count != SPLAT_KMEM_ALLOC_COUNT) rc = -ENOMEM; @@ -134,8 +141,8 @@ splat_kmem_test2(struct file *file, void *arg) for (j = 0; j < size; j++) { if (((char *)ptr[i])[j] != '\0') { splat_vprint(file, SPLAT_KMEM_TEST2_NAME, - "%d-byte allocation was " - "not zeroed\n", size); + "%d-byte allocation was " + "not zeroed\n", size); rc = -EFAULT; } } @@ -146,8 +153,8 @@ splat_kmem_test2(struct file *file, void *arg) kmem_free(ptr[i], size); splat_vprint(file, SPLAT_KMEM_TEST2_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_KMEM_ALLOC_COUNT); + "%d byte allocations, %d/%d successful\n", + size, count, SPLAT_KMEM_ALLOC_COUNT); if (count != SPLAT_KMEM_ALLOC_COUNT) rc = -ENOMEM; @@ -180,8 +187,8 @@ splat_kmem_test3(struct file *file, void *arg) vmem_free(ptr[i], size); splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_VMEM_ALLOC_COUNT); + "%d byte allocations, %d/%d successful\n", + size, count, SPLAT_VMEM_ALLOC_COUNT); if (count != SPLAT_VMEM_ALLOC_COUNT) rc = -ENOMEM; @@ -212,8 +219,8 @@ splat_kmem_test4(struct file *file, void *arg) for (j = 0; j < size; j++) { if (((char *)ptr[i])[j] != '\0') { splat_vprint(file, SPLAT_KMEM_TEST4_NAME, - "%d-byte allocation was " - "not zeroed\n", size); + "%d-byte allocation was " + "not zeroed\n", size); rc = -EFAULT; } } @@ -224,8 +231,8 @@ splat_kmem_test4(struct file *file, void *arg) vmem_free(ptr[i], size); splat_vprint(file, SPLAT_KMEM_TEST4_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_VMEM_ALLOC_COUNT); + "%d byte allocations, %d/%d successful\n", + size, count, SPLAT_VMEM_ALLOC_COUNT); if (count != SPLAT_VMEM_ALLOC_COUNT) rc = -ENOMEM; @@ -237,8 +244,11 @@ splat_kmem_test4(struct file *file, void *arg) #define SPLAT_KMEM_TEST_MAGIC 0x004488CCUL #define SPLAT_KMEM_CACHE_NAME "kmem_test" -#define SPLAT_KMEM_OBJ_COUNT 128 -#define SPLAT_KMEM_OBJ_RECLAIM 16 +#define SPLAT_KMEM_OBJ_COUNT 1024 +#define SPLAT_KMEM_OBJ_RECLAIM 20 /* percent */ +#define SPLAT_KMEM_THREADS 32 + +#define KCP_FLAG_READY 0x01 typedef struct kmem_cache_data { unsigned long kcd_magic; @@ -246,21 +256,95 @@ typedef struct kmem_cache_data { char kcd_buf[0]; } kmem_cache_data_t; +typedef struct kmem_cache_thread { + kmem_cache_t *kct_cache; + spinlock_t kct_lock; + int kct_id; + int kct_kcd_count; + kmem_cache_data_t *kct_kcd[0]; +} kmem_cache_thread_t; + typedef struct kmem_cache_priv { unsigned long kcp_magic; struct file *kcp_file; kmem_cache_t *kcp_cache; - kmem_cache_data_t *kcp_kcd[SPLAT_KMEM_OBJ_COUNT]; spinlock_t kcp_lock; - wait_queue_head_t kcp_waitq; + wait_queue_head_t kcp_ctl_waitq; + wait_queue_head_t kcp_thr_waitq; + int kcp_flags; + int kcp_kct_count; + kmem_cache_thread_t *kcp_kct[SPLAT_KMEM_THREADS]; int kcp_size; int kcp_align; int kcp_count; - int kcp_threads; int kcp_alloc; int kcp_rc; + int kcp_kcd_count; + kmem_cache_data_t *kcp_kcd[0]; } kmem_cache_priv_t; +static kmem_cache_priv_t * +splat_kmem_cache_test_kcp_alloc(struct file *file, char *name, + int size, int align, int alloc, int count) +{ + kmem_cache_priv_t *kcp; + + kcp = vmem_zalloc(sizeof(kmem_cache_priv_t) + + count * sizeof(kmem_cache_data_t *), KM_SLEEP); + if (!kcp) + return NULL; + + kcp->kcp_magic = SPLAT_KMEM_TEST_MAGIC; + kcp->kcp_file = file; + kcp->kcp_cache = NULL; + spin_lock_init(&kcp->kcp_lock); + init_waitqueue_head(&kcp->kcp_ctl_waitq); + init_waitqueue_head(&kcp->kcp_thr_waitq); + kcp->kcp_flags = 0; + kcp->kcp_kct_count = -1; + kcp->kcp_size = size; + kcp->kcp_align = align; + kcp->kcp_count = 0; + kcp->kcp_alloc = alloc; + kcp->kcp_rc = 0; + kcp->kcp_kcd_count = count; + + return kcp; +} + +static void +splat_kmem_cache_test_kcp_free(kmem_cache_priv_t *kcp) +{ + vmem_free(kcp, sizeof(kmem_cache_priv_t) + + kcp->kcp_kcd_count * sizeof(kmem_cache_data_t *)); +} + +static kmem_cache_thread_t * +splat_kmem_cache_test_kct_alloc(int id, int count) +{ + kmem_cache_thread_t *kct; + + ASSERTF(id < SPLAT_KMEM_THREADS, "id=%d\n", id); + kct = vmem_zalloc(sizeof(kmem_cache_thread_t) + + count * sizeof(kmem_cache_data_t *), KM_SLEEP); + if (!kct) + return NULL; + + spin_lock_init(&kct->kct_lock); + kct->kct_cache = NULL; + kct->kct_id = id; + kct->kct_kcd_count = count; + + return kct; +} + +static void +splat_kmem_cache_test_kct_free(kmem_cache_thread_t *kct) +{ + vmem_free(kct, sizeof(kmem_cache_thread_t) + + kct->kct_kcd_count * sizeof(kmem_cache_data_t *)); +} + static int splat_kmem_cache_test_constructor(void *ptr, void *priv, int flags) { @@ -293,83 +377,340 @@ splat_kmem_cache_test_destructor(void *ptr, void *priv) return; } +/* + * Generic reclaim function which assumes that all objects may + * be reclaimed at any time. We free a small percentage of the + * objects linked off the kcp or kct[] every time we are called. + */ +static void +splat_kmem_cache_test_reclaim(void *priv) +{ + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; + kmem_cache_thread_t *kct; + int i, j, count; + + ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); + count = kcp->kcp_kcd_count * SPLAT_KMEM_OBJ_RECLAIM / 100; + + /* Objects directly attached to the kcp */ + spin_lock(&kcp->kcp_lock); + for (i = 0; i < kcp->kcp_kcd_count; i++) { + if (kcp->kcp_kcd[i]) { + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); + kcp->kcp_kcd[i] = NULL; + + if ((--count) == 0) + break; + } + } + spin_unlock(&kcp->kcp_lock); + + /* No threads containing objects to consider */ + if (kcp->kcp_kct_count == -1) + return; + + /* Objects attached to a kct thread */ + for (i = 0; i < kcp->kcp_kct_count; i++) { + spin_lock(&kcp->kcp_lock); + kct = kcp->kcp_kct[i]; + spin_unlock(&kcp->kcp_lock); + if (!kct) + continue; + + spin_lock(&kct->kct_lock); + count = kct->kct_kcd_count * SPLAT_KMEM_OBJ_RECLAIM / 100; + + for (j = 0; j < kct->kct_kcd_count; j++) { + if (kct->kct_kcd[j]) { + kmem_cache_free(kcp->kcp_cache,kct->kct_kcd[j]); + kct->kct_kcd[j] = NULL; + + if ((--count) == 0) + break; + } + } + spin_unlock(&kct->kct_lock); + } + + return; +} + +static int +splat_kmem_cache_test_threads(kmem_cache_priv_t *kcp, int threads) +{ + int rc; + + spin_lock(&kcp->kcp_lock); + rc = (kcp->kcp_kct_count == threads); + spin_unlock(&kcp->kcp_lock); + + return rc; +} + +static int +splat_kmem_cache_test_flags(kmem_cache_priv_t *kcp, int flags) +{ + int rc; + + spin_lock(&kcp->kcp_lock); + rc = (kcp->kcp_flags & flags); + spin_unlock(&kcp->kcp_lock); + + return rc; +} + +static void +splat_kmem_cache_test_thread(void *arg) +{ + kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)arg; + kmem_cache_thread_t *kct; + int rc = 0, id, i; + void *obj; + + ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); + + /* Assign thread ids */ + spin_lock(&kcp->kcp_lock); + if (kcp->kcp_kct_count == -1) + kcp->kcp_kct_count = 0; + + id = kcp->kcp_kct_count; + kcp->kcp_kct_count++; + spin_unlock(&kcp->kcp_lock); + + kct = splat_kmem_cache_test_kct_alloc(id, kcp->kcp_alloc); + if (!kct) { + rc = -ENOMEM; + goto out; + } + + spin_lock(&kcp->kcp_lock); + kcp->kcp_kct[id] = kct; + spin_unlock(&kcp->kcp_lock); + + /* Wait for all threads to have started and report they are ready */ + if (kcp->kcp_kct_count == SPLAT_KMEM_THREADS) + wake_up(&kcp->kcp_ctl_waitq); + + wait_event(kcp->kcp_thr_waitq, + splat_kmem_cache_test_flags(kcp, KCP_FLAG_READY)); + + /* + * Updates to kct->kct_kcd[] are performed under a spin_lock so + * they may safely run concurrent with the reclaim function. If + * we are not in a low memory situation we have one lock per- + * thread so they are not expected to be contended. + */ + for (i = 0; i < kct->kct_kcd_count; i++) { + obj = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); + spin_lock(&kct->kct_lock); + kct->kct_kcd[i] = obj; + spin_unlock(&kct->kct_lock); + } + + for (i = 0; i < kct->kct_kcd_count; i++) { + spin_lock(&kct->kct_lock); + if (kct->kct_kcd[i]) { + kmem_cache_free(kcp->kcp_cache, kct->kct_kcd[i]); + kct->kct_kcd[i] = NULL; + } + spin_unlock(&kct->kct_lock); + } +out: + spin_lock(&kcp->kcp_lock); + if (kct) { + splat_kmem_cache_test_kct_free(kct); + kcp->kcp_kct[id] = kct = NULL; + } + + if (!kcp->kcp_rc) + kcp->kcp_rc = rc; + + if ((--kcp->kcp_kct_count) == 0) + wake_up(&kcp->kcp_ctl_waitq); + + spin_unlock(&kcp->kcp_lock); + + thread_exit(); +} + static int splat_kmem_cache_test(struct file *file, void *arg, char *name, - int size, int align, int flags) + int size, int align, int flags) { - kmem_cache_t *cache = NULL; - kmem_cache_data_t *kcd = NULL; - kmem_cache_priv_t kcp; + kmem_cache_priv_t *kcp; + kmem_cache_data_t *kcd; int rc = 0, max; - kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; - kcp.kcp_file = file; - kcp.kcp_size = size; - kcp.kcp_align = align; - kcp.kcp_count = 0; - kcp.kcp_rc = 0; - - cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, - kcp.kcp_size, kcp.kcp_align, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - NULL, &kcp, NULL, flags); - if (!cache) { - splat_vprint(file, name, - "Unable to create '%s'\n", - SPLAT_KMEM_CACHE_NAME); + kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, align, 0, 1); + if (!kcp) { + splat_vprint(file, name, "Unable to create '%s'\n", "kcp"); return -ENOMEM; } - kcd = kmem_cache_alloc(cache, KM_SLEEP); + kcp->kcp_cache = + kmem_cache_create(SPLAT_KMEM_CACHE_NAME, + kcp->kcp_size, kcp->kcp_align, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + NULL, kcp, NULL, flags); + if (!kcp->kcp_cache) { + splat_vprint(file, name, + "Unable to create '%s'\n", + SPLAT_KMEM_CACHE_NAME); + rc = -ENOMEM; + goto out_free; + } + + kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); if (!kcd) { splat_vprint(file, name, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } + spin_lock(&kcp->kcp_lock); + kcp->kcp_kcd[0] = kcd; + spin_unlock(&kcp->kcp_lock); - if (!kcd->kcd_flag) { + if (!kcp->kcp_kcd[0]->kcd_flag) { splat_vprint(file, name, - "Failed to run contructor for '%s'\n", - SPLAT_KMEM_CACHE_NAME); + "Failed to run contructor for '%s'\n", + SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } - if (kcd->kcd_magic != kcp.kcp_magic) { + if (kcp->kcp_kcd[0]->kcd_magic != kcp->kcp_magic) { splat_vprint(file, name, - "Failed to pass private data to constructor " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + "Failed to pass private data to constructor " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; goto out_free; } - max = kcp.kcp_count; - kmem_cache_free(cache, kcd); + max = kcp->kcp_count; + spin_lock(&kcp->kcp_lock); + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[0]); + kcp->kcp_kcd[0] = NULL; + spin_unlock(&kcp->kcp_lock); /* Destroy the entire cache which will force destructors to * run and we can verify one was called for every object */ - kmem_cache_destroy(cache); - if (kcp.kcp_count) { + kmem_cache_destroy(kcp->kcp_cache); + if (kcp->kcp_count) { splat_vprint(file, name, - "Failed to run destructor on all slab objects " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + "Failed to run destructor on all slab objects " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; } splat_vprint(file, name, - "Successfully ran ctors/dtors for %d elements in '%s'\n", - max, SPLAT_KMEM_CACHE_NAME); + "Successfully ran ctors/dtors for %d elements in '%s'\n", + max, SPLAT_KMEM_CACHE_NAME); return rc; out_free: - if (kcd) - kmem_cache_free(cache, kcd); + if (kcp->kcp_kcd[0]) { + spin_lock(&kcp->kcp_lock); + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[0]); + kcp->kcp_kcd[0] = NULL; + spin_unlock(&kcp->kcp_lock); + } - kmem_cache_destroy(cache); + if (kcp->kcp_cache) + kmem_cache_destroy(kcp->kcp_cache); + + splat_kmem_cache_test_kcp_free(kcp); + + return rc; +} + +static int +splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, + int size, int alloc) +{ + kmem_cache_priv_t *kcp; + kthread_t *thr; + struct timespec start, stop, delta; + char cache_name[32]; + int i, rc = 0; + + kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, 0, alloc, 0); + if (!kcp) { + splat_vprint(file, name, "Unable to create '%s'\n", "kcp"); + return -ENOMEM; + } + + (void)snprintf(cache_name, 32, "%s-%d-%d", + SPLAT_KMEM_CACHE_NAME, size, alloc); + kcp->kcp_cache = + kmem_cache_create(cache_name, kcp->kcp_size, 0, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + splat_kmem_cache_test_reclaim, + kcp, NULL, KMC_VMEM); + if (!kcp->kcp_cache) { + splat_vprint(file, name, "Unable to create '%s'\n", cache_name); + rc = -ENOMEM; + goto out_kcp; + } + + start = current_kernel_time(); + + for (i = 0; i < SPLAT_KMEM_THREADS; i++) { + thr = thread_create(NULL, 0, + splat_kmem_cache_test_thread, + kcp, 0, &p0, TS_RUN, minclsyspri); + if (thr == NULL) { + rc = -ESRCH; + goto out_cache; + } + } + + /* Sleep until all threads have started, then set the ready + * flag and wake them all up for maximum concurrency. */ + wait_event(kcp->kcp_ctl_waitq, + splat_kmem_cache_test_threads(kcp, SPLAT_KMEM_THREADS)); + + spin_lock(&kcp->kcp_lock); + kcp->kcp_flags |= KCP_FLAG_READY; + spin_unlock(&kcp->kcp_lock); + wake_up_all(&kcp->kcp_thr_waitq); + + /* Sleep until all thread have finished */ + wait_event(kcp->kcp_ctl_waitq, splat_kmem_cache_test_threads(kcp, 0)); + + stop = current_kernel_time(); + delta = timespec_sub(stop, start); + + splat_vprint(file, name, + "%-22s %2ld.%09ld\t" + "%lu/%lu/%lu\t%lu/%lu/%lu\n", + kcp->kcp_cache->skc_name, + delta.tv_sec, delta.tv_nsec, + (unsigned long)kcp->kcp_cache->skc_slab_total, + (unsigned long)kcp->kcp_cache->skc_slab_max, + (unsigned long)(kcp->kcp_alloc * + SPLAT_KMEM_THREADS / + SPL_KMEM_CACHE_OBJ_PER_SLAB), + (unsigned long)kcp->kcp_cache->skc_obj_total, + (unsigned long)kcp->kcp_cache->skc_obj_max, + (unsigned long)(kcp->kcp_alloc * + SPLAT_KMEM_THREADS)); + + if (delta.tv_sec >= 5) + rc = -ETIME; + + if (!rc && kcp->kcp_rc) + rc = kcp->kcp_rc; + +out_cache: + kmem_cache_destroy(kcp->kcp_cache); +out_kcp: + splat_kmem_cache_test_kcp_free(kcp); return rc; } @@ -409,284 +750,11 @@ splat_kmem_test6(struct file *file, void *arg) return splat_kmem_cache_test(file, arg, name, 128*1028, 0, KMC_VMEM); } -static void -splat_kmem_cache_test_reclaim(void *priv) -{ - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; - int i, count; - - count = min(SPLAT_KMEM_OBJ_RECLAIM, kcp->kcp_count); - splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST7_NAME, - "Reaping %d objects from '%s'\n", count, - SPLAT_KMEM_CACHE_NAME); - - for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { - if (kcp->kcp_kcd[i]) { - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); - kcp->kcp_kcd[i] = NULL; - - if (--count == 0) - break; - } - } - - return; -} - +/* Validate object alignment cache behavior for caches */ static int splat_kmem_test7(struct file *file, void *arg) { - kmem_cache_t *cache; - kmem_cache_priv_t kcp; - int i, rc = 0; - - kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; - kcp.kcp_file = file; - kcp.kcp_size = 256; - kcp.kcp_count = 0; - kcp.kcp_rc = 0; - - cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp.kcp_size, 0, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - splat_kmem_cache_test_reclaim, - &kcp, NULL, 0); - if (!cache) { - splat_vprint(file, SPLAT_KMEM_TEST7_NAME, - "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - return -ENOMEM; - } - - kcp.kcp_cache = cache; - - for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { - /* All allocations need not succeed */ - kcp.kcp_kcd[i] = kmem_cache_alloc(cache, KM_SLEEP); - if (!kcp.kcp_kcd[i]) { - splat_vprint(file, SPLAT_KMEM_TEST7_NAME, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); - } - } - - ASSERT(kcp.kcp_count > 0); - - /* Request the slab cache free any objects it can. For a few reasons - * this may not immediately result in more free memory even if objects - * are freed. First off, due to fragmentation we may not be able to - * reclaim any slabs. Secondly, even if we do we fully clear some - * slabs we will not want to immedately reclaim all of them because - * we may contend with cache allocs and thrash. What we want to see - * is slab size decrease more gradually as it becomes clear they - * will not be needed. This should be acheivable in less than minute - * if it takes longer than this something has gone wrong. - */ - for (i = 0; i < 60; i++) { - kmem_cache_reap_now(cache); - splat_vprint(file, SPLAT_KMEM_TEST7_NAME, - "%s cache objects %d, slabs %u/%u objs %u/%u\n", - SPLAT_KMEM_CACHE_NAME, kcp.kcp_count, - (unsigned)cache->skc_slab_alloc, - (unsigned)cache->skc_slab_total, - (unsigned)cache->skc_obj_alloc, - (unsigned)cache->skc_obj_total); - - if (cache->skc_obj_total == 0) - break; - - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - } - - if (cache->skc_obj_total == 0) { - splat_vprint(file, SPLAT_KMEM_TEST7_NAME, - "Successfully created %d objects " - "in cache %s and reclaimed them\n", - SPLAT_KMEM_OBJ_COUNT, SPLAT_KMEM_CACHE_NAME); - } else { - splat_vprint(file, SPLAT_KMEM_TEST7_NAME, - "Failed to reclaim %u/%d objects from cache %s\n", - (unsigned)cache->skc_obj_total, SPLAT_KMEM_OBJ_COUNT, - SPLAT_KMEM_CACHE_NAME); - rc = -ENOMEM; - } - - /* Cleanup our mess (for failure case of time expiring) */ - for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) - if (kcp.kcp_kcd[i]) - kmem_cache_free(cache, kcp.kcp_kcd[i]); - - kmem_cache_destroy(cache); - - return rc; -} - -static void -splat_kmem_test8_thread(void *arg) -{ - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)arg; - int count = kcp->kcp_alloc, rc = 0, i; - void **objs; - - ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); - - objs = vmem_zalloc(count * sizeof(void *), KM_SLEEP); - if (!objs) { - splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST8_NAME, - "Unable to alloc objp array for cache '%s'\n", - kcp->kcp_cache->skc_name); - rc = -ENOMEM; - goto out; - } - - for (i = 0; i < count; i++) { - objs[i] = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - if (!objs[i]) { - splat_vprint(kcp->kcp_file, SPLAT_KMEM_TEST8_NAME, - "Unable to allocate from cache '%s'\n", - kcp->kcp_cache->skc_name); - rc = -ENOMEM; - break; - } - } - - for (i = 0; i < count; i++) - if (objs[i]) - kmem_cache_free(kcp->kcp_cache, objs[i]); - - vmem_free(objs, count * sizeof(void *)); -out: - spin_lock(&kcp->kcp_lock); - if (!kcp->kcp_rc) - kcp->kcp_rc = rc; - - if (--kcp->kcp_threads == 0) - wake_up(&kcp->kcp_waitq); - - spin_unlock(&kcp->kcp_lock); - - thread_exit(); -} - -static int -splat_kmem_test8_count(kmem_cache_priv_t *kcp, int threads) -{ - int ret; - - spin_lock(&kcp->kcp_lock); - ret = (kcp->kcp_threads == threads); - spin_unlock(&kcp->kcp_lock); - - return ret; -} - -/* This test will always pass and is simply here so I can easily - * eyeball the slab cache locking overhead to ensure it is reasonable. - */ -static int -splat_kmem_test8_sc(struct file *file, void *arg, int size, int count) -{ - kmem_cache_priv_t kcp; - kthread_t *thr; - struct timespec start, stop, delta; - char cache_name[32]; - int i, j, rc = 0, threads = 32; - - kcp.kcp_magic = SPLAT_KMEM_TEST_MAGIC; - kcp.kcp_file = file; - - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %s", "name", - "time (sec)\tslabs \tobjs \thash\n"); - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %s", "", - " \ttot/max/calc\ttot/max/calc\n"); - - for (i = 1; i <= count; i *= 2) { - kcp.kcp_size = size; - kcp.kcp_count = 0; - kcp.kcp_threads = 0; - kcp.kcp_alloc = i; - kcp.kcp_rc = 0; - spin_lock_init(&kcp.kcp_lock); - init_waitqueue_head(&kcp.kcp_waitq); - - (void)snprintf(cache_name, 32, "%s-%d-%d", - SPLAT_KMEM_CACHE_NAME, size, i); - kcp.kcp_cache = kmem_cache_create(cache_name, kcp.kcp_size, 0, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - NULL, &kcp, NULL, 0); - if (!kcp.kcp_cache) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Unable to create '%s' cache\n", - SPLAT_KMEM_CACHE_NAME); - rc = -ENOMEM; - break; - } - - start = current_kernel_time(); - - for (j = 0; j < threads; j++) { - thr = thread_create(NULL, 0, splat_kmem_test8_thread, - &kcp, 0, &p0, TS_RUN, minclsyspri); - if (thr == NULL) { - rc = -ESRCH; - break; - } - spin_lock(&kcp.kcp_lock); - kcp.kcp_threads++; - spin_unlock(&kcp.kcp_lock); - } - - /* Sleep until the thread sets kcp.kcp_threads == 0 */ - wait_event(kcp.kcp_waitq, splat_kmem_test8_count(&kcp, 0)); - stop = current_kernel_time(); - delta = timespec_sub(stop, start); - - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "%-22s %2ld.%09ld\t" - "%lu/%lu/%lu\t%lu/%lu/%lu\n", - kcp.kcp_cache->skc_name, - delta.tv_sec, delta.tv_nsec, - (unsigned long)kcp.kcp_cache->skc_slab_total, - (unsigned long)kcp.kcp_cache->skc_slab_max, - (unsigned long)(kcp.kcp_alloc * threads / - SPL_KMEM_CACHE_OBJ_PER_SLAB), - (unsigned long)kcp.kcp_cache->skc_obj_total, - (unsigned long)kcp.kcp_cache->skc_obj_max, - (unsigned long)(kcp.kcp_alloc * threads)); - - kmem_cache_destroy(kcp.kcp_cache); - - if (!rc && kcp.kcp_rc) - rc = kcp.kcp_rc; - - if (rc) - break; - } - - return rc; -} - -static int -splat_kmem_test8(struct file *file, void *arg) -{ - int i, rc = 0; - - /* Run through slab cache with objects size from - * 16-1Mb in 4x multiples with 1024 objects each */ - for (i = 16; i <= 1024*1024; i *= 4) { - rc = splat_kmem_test8_sc(file, arg, i, 256); - if (rc) - break; - } - - return rc; -} - -/* Validate object alignment cache behavior for caches */ -static int -splat_kmem_test9(struct file *file, void *arg) -{ - char *name = SPLAT_KMEM_TEST9_NAME; + char *name = SPLAT_KMEM_TEST7_NAME; int i, rc; for (i = 8; i <= PAGE_SIZE; i *= 2) { @@ -698,63 +766,330 @@ splat_kmem_test9(struct file *file, void *arg) return rc; } +static int +splat_kmem_test8(struct file *file, void *arg) +{ + kmem_cache_priv_t *kcp; + kmem_cache_data_t *kcd; + int i, j, rc = 0; + + kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST8_NAME, + 256, 0, 0, SPLAT_KMEM_OBJ_COUNT); + if (!kcp) { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Unable to create '%s'\n", "kcp"); + return -ENOMEM; + } + + kcp->kcp_cache = + kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, 0, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + splat_kmem_cache_test_reclaim, + kcp, NULL, 0); + if (!kcp->kcp_cache) { + splat_kmem_cache_test_kcp_free(kcp); + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { + kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); + spin_lock(&kcp->kcp_lock); + kcp->kcp_kcd[i] = kcd; + spin_unlock(&kcp->kcp_lock); + if (!kcd) { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); + } + } + + /* Request the slab cache free any objects it can. For a few reasons + * this may not immediately result in more free memory even if objects + * are freed. First off, due to fragmentation we may not be able to + * reclaim any slabs. Secondly, even if we do we fully clear some + * slabs we will not want to immedately reclaim all of them because + * we may contend with cache allocs and thrash. What we want to see + * is the slab size decrease more gradually as it becomes clear they + * will not be needed. This should be acheivable in less than minute + * if it takes longer than this something has gone wrong. + */ + for (i = 0; i < 60; i++) { + kmem_cache_reap_now(kcp->kcp_cache); + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "%s cache objects %d, slabs %u/%u objs %u/%u mags ", + SPLAT_KMEM_CACHE_NAME, kcp->kcp_count, + (unsigned)kcp->kcp_cache->skc_slab_alloc, + (unsigned)kcp->kcp_cache->skc_slab_total, + (unsigned)kcp->kcp_cache->skc_obj_alloc, + (unsigned)kcp->kcp_cache->skc_obj_total); + + for_each_online_cpu(j) + splat_print(file, "%u/%u ", + kcp->kcp_cache->skc_mag[j]->skm_avail, + kcp->kcp_cache->skc_mag[j]->skm_size); + + splat_print(file, "%s\n", ""); + + if (kcp->kcp_cache->skc_obj_total == 0) + break; + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + } + + if (kcp->kcp_cache->skc_obj_total == 0) { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Successfully created %d objects " + "in cache %s and reclaimed them\n", + SPLAT_KMEM_OBJ_COUNT, SPLAT_KMEM_CACHE_NAME); + } else { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Failed to reclaim %u/%d objects from cache %s\n", + (unsigned)kcp->kcp_cache->skc_obj_total, + SPLAT_KMEM_OBJ_COUNT, SPLAT_KMEM_CACHE_NAME); + rc = -ENOMEM; + } + + /* Cleanup our mess (for failure case of time expiring) */ + spin_lock(&kcp->kcp_lock); + for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) + if (kcp->kcp_kcd[i]) + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); + spin_unlock(&kcp->kcp_lock); + + kmem_cache_destroy(kcp->kcp_cache); + splat_kmem_cache_test_kcp_free(kcp); + + return rc; +} + +static int +splat_kmem_test9(struct file *file, void *arg) +{ + kmem_cache_priv_t *kcp; + kmem_cache_data_t *kcd; + int i, j, rc = 0, count = SPLAT_KMEM_OBJ_COUNT * 128; + + kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST9_NAME, + 256, 0, 0, count); + if (!kcp) { + splat_vprint(file, SPLAT_KMEM_TEST9_NAME, + "Unable to create '%s'\n", "kcp"); + return -ENOMEM; + } + + kcp->kcp_cache = + kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, 0, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + NULL, kcp, NULL, 0); + if (!kcp->kcp_cache) { + splat_kmem_cache_test_kcp_free(kcp); + splat_vprint(file, SPLAT_KMEM_TEST9_NAME, + "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + for (i = 0; i < count; i++) { + kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); + spin_lock(&kcp->kcp_lock); + kcp->kcp_kcd[i] = kcd; + spin_unlock(&kcp->kcp_lock); + if (!kcd) { + splat_vprint(file, SPLAT_KMEM_TEST9_NAME, + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); + } + } + + spin_lock(&kcp->kcp_lock); + for (i = 0; i < count; i++) + if (kcp->kcp_kcd[i]) + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); + spin_unlock(&kcp->kcp_lock); + + /* We have allocated a large number of objects thus creating a + * large number of slabs and then free'd them all. However since + * there should be little memory pressure at the moment those + * slabs have not been freed. What we want to see is the slab + * size decrease gradually as it becomes clear they will not be + * be needed. This should be acheivable in less than minute + * if it takes longer than this something has gone wrong. + */ + for (i = 0; i < 60; i++) { + splat_vprint(file, SPLAT_KMEM_TEST9_NAME, + "%s cache objects %d, slabs %u/%u objs %u/%u mags ", + SPLAT_KMEM_CACHE_NAME, kcp->kcp_count, + (unsigned)kcp->kcp_cache->skc_slab_alloc, + (unsigned)kcp->kcp_cache->skc_slab_total, + (unsigned)kcp->kcp_cache->skc_obj_alloc, + (unsigned)kcp->kcp_cache->skc_obj_total); + + for_each_online_cpu(j) + splat_print(file, "%u/%u ", + kcp->kcp_cache->skc_mag[j]->skm_avail, + kcp->kcp_cache->skc_mag[j]->skm_size); + + splat_print(file, "%s\n", ""); + + if (kcp->kcp_cache->skc_obj_total == 0) + break; + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + } + + if (kcp->kcp_cache->skc_obj_total == 0) { + splat_vprint(file, SPLAT_KMEM_TEST9_NAME, + "Successfully created %d objects " + "in cache %s and reclaimed them\n", + count, SPLAT_KMEM_CACHE_NAME); + } else { + splat_vprint(file, SPLAT_KMEM_TEST9_NAME, + "Failed to reclaim %u/%d objects from cache %s\n", + (unsigned)kcp->kcp_cache->skc_obj_total, count, + SPLAT_KMEM_CACHE_NAME); + rc = -ENOMEM; + } + + kmem_cache_destroy(kcp->kcp_cache); + splat_kmem_cache_test_kcp_free(kcp); + + return rc; +} + +/* + * This test creates N threads with a shared kmem cache. They then all + * concurrently allocate and free from the cache to stress the locking and + * concurrent cache performance. If any one test takes longer than 5 + * seconds to complete it is treated as a failure and may indicate a + * performance regression. On my test system no one test takes more + * than 1 second to complete so a 5x slowdown likely a problem. + */ +static int +splat_kmem_test10(struct file *file, void *arg) +{ + uint64_t size, alloc, free_mem, rc = 0; + + free_mem = nr_free_pages() * PAGE_SIZE; + for (size = 16; size <= 1024*1024; size *= 2) { + + splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "name", + "time (sec)\tslabs \tobjs \thash\n"); + splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "", + " \ttot/max/calc\ttot/max/calc\n"); + + for (alloc = 1; alloc <= 1024; alloc *= 2) { + + /* Skip tests which exceed free memory */ + if (size * alloc * SPLAT_KMEM_THREADS > free_mem / 2) + continue; + + rc = splat_kmem_cache_thread_test(file, arg, + SPLAT_KMEM_TEST10_NAME, size, alloc); + if (rc) + break; + } + } + + return rc; +} + +/* + * This test creates N threads with a shared kmem cache which overcommits + * memory by 4x. This makes it impossible for the slab to satify the + * thread requirements without having its reclaim hook run which will + * free objects back for use. This behavior is triggered by the linum VM + * detecting a low memory condition on the node and invoking the shrinkers. + * This should allow all the threads to complete while avoiding deadlock + * and for the most part out of memory events. This is very tough on the + * system so it is possible the test app may get oom'ed. + */ +static int +splat_kmem_test11(struct file *file, void *arg) +{ + uint64_t size, alloc, rc; + + size = 1024*1024; + alloc = ((4 * num_physpages * PAGE_SIZE) / size) / SPLAT_KMEM_THREADS; + + splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "name", + "time (sec)\tslabs \tobjs \thash\n"); + splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "", + " \ttot/max/calc\ttot/max/calc\n"); + + rc = splat_kmem_cache_thread_test(file, arg, + SPLAT_KMEM_TEST11_NAME, size, alloc); + + return rc; +} + splat_subsystem_t * splat_kmem_init(void) { - splat_subsystem_t *sub; + splat_subsystem_t *sub; - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_KMEM_NAME, SPLAT_NAME_SIZE); + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_KMEM_NAME, SPLAT_NAME_SIZE); strncpy(sub->desc.desc, SPLAT_KMEM_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->subsystem_list); INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_KMEM; + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_KMEM; - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST1_NAME, SPLAT_KMEM_TEST1_DESC, - SPLAT_KMEM_TEST1_ID, splat_kmem_test1); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST2_NAME, SPLAT_KMEM_TEST2_DESC, - SPLAT_KMEM_TEST2_ID, splat_kmem_test2); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST3_NAME, SPLAT_KMEM_TEST3_DESC, - SPLAT_KMEM_TEST3_ID, splat_kmem_test3); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST4_NAME, SPLAT_KMEM_TEST4_DESC, - SPLAT_KMEM_TEST4_ID, splat_kmem_test4); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST5_NAME, SPLAT_KMEM_TEST5_DESC, - SPLAT_KMEM_TEST5_ID, splat_kmem_test5); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST6_NAME, SPLAT_KMEM_TEST6_DESC, - SPLAT_KMEM_TEST6_ID, splat_kmem_test6); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST7_NAME, SPLAT_KMEM_TEST7_DESC, - SPLAT_KMEM_TEST7_ID, splat_kmem_test7); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST8_NAME, SPLAT_KMEM_TEST8_DESC, - SPLAT_KMEM_TEST8_ID, splat_kmem_test8); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST9_NAME, SPLAT_KMEM_TEST9_DESC, - SPLAT_KMEM_TEST9_ID, splat_kmem_test9); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST1_NAME, SPLAT_KMEM_TEST1_DESC, + SPLAT_KMEM_TEST1_ID, splat_kmem_test1); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST2_NAME, SPLAT_KMEM_TEST2_DESC, + SPLAT_KMEM_TEST2_ID, splat_kmem_test2); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST3_NAME, SPLAT_KMEM_TEST3_DESC, + SPLAT_KMEM_TEST3_ID, splat_kmem_test3); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST4_NAME, SPLAT_KMEM_TEST4_DESC, + SPLAT_KMEM_TEST4_ID, splat_kmem_test4); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST5_NAME, SPLAT_KMEM_TEST5_DESC, + SPLAT_KMEM_TEST5_ID, splat_kmem_test5); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST6_NAME, SPLAT_KMEM_TEST6_DESC, + SPLAT_KMEM_TEST6_ID, splat_kmem_test6); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST7_NAME, SPLAT_KMEM_TEST7_DESC, + SPLAT_KMEM_TEST7_ID, splat_kmem_test7); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST8_NAME, SPLAT_KMEM_TEST8_DESC, + SPLAT_KMEM_TEST8_ID, splat_kmem_test8); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST9_NAME, SPLAT_KMEM_TEST9_DESC, + SPLAT_KMEM_TEST9_ID, splat_kmem_test9); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST10_NAME, SPLAT_KMEM_TEST10_DESC, + SPLAT_KMEM_TEST10_ID, splat_kmem_test10); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, + SPLAT_KMEM_TEST11_ID, splat_kmem_test11); - return sub; + return sub; } void splat_kmem_fini(splat_subsystem_t *sub) { - ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST9_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST8_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST7_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST1_ID); + ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST11_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST10_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST9_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST8_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST7_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST6_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST5_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST1_ID); - kfree(sub); + kfree(sub); } int splat_kmem_id(void) { - return SPLAT_SUBSYSTEM_KMEM; + return SPLAT_SUBSYSTEM_KMEM; } From 416bae036bd1113a6102be4589dd47cee8d2b08a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Jan 2009 21:11:42 -0800 Subject: [PATCH 0226/1062] Add new workqueue header --- include/sys/workqueue.h | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/sys/workqueue.h diff --git a/include/sys/workqueue.h b/include/sys/workqueue.h new file mode 100644 index 000000000..711c32ed2 --- /dev/null +++ b/include/sys/workqueue.h @@ -0,0 +1,55 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _SPL_WORKQUEUE_H +#define _SPL_WORKQUEUE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#ifdef HAVE_3ARGS_INIT_WORK + +#define delayed_work work_struct + +#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb), \ + (void *)(d)) +#define spl_init_delayed_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), \ + (void *)(d)) +#define spl_get_work_data(d, t, f) (t *)(d) + +#else + +#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb)); +#define spl_init_delayed_work(wq,cb,d) INIT_DELAYED_WORK((wq), (void *)(cb)); +#define spl_get_work_data(d, t, f) (t *)container_of(d, t, f) + +#endif /* HAVE_3ARGS_INIT_WORK */ + +#endif /* _SPL_WORKQUEUE_H */ From 10a4be0f0369b80c44e013513acf7ad36f64cfaa Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Jan 2009 21:24:42 -0800 Subject: [PATCH 0227/1062] Update thread tests to have max_time --- module/splat/splat-kmem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index c592e983c..c57e280b0 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -630,7 +630,7 @@ out_free: static int splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, - int size, int alloc) + int size, int alloc, int max_time) { kmem_cache_priv_t *kcp; kthread_t *thr; @@ -701,7 +701,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, (unsigned long)(kcp->kcp_alloc * SPLAT_KMEM_THREADS)); - if (delta.tv_sec >= 5) + if (delta.tv_sec >= max_time) rc = -ETIME; if (!rc && kcp->kcp_rc) @@ -989,7 +989,7 @@ splat_kmem_test10(struct file *file, void *arg) continue; rc = splat_kmem_cache_thread_test(file, arg, - SPLAT_KMEM_TEST10_NAME, size, alloc); + SPLAT_KMEM_TEST10_NAME, size, alloc, 5); if (rc) break; } @@ -1022,7 +1022,7 @@ splat_kmem_test11(struct file *file, void *arg) " \ttot/max/calc\ttot/max/calc\n"); rc = splat_kmem_cache_thread_test(file, arg, - SPLAT_KMEM_TEST11_NAME, size, alloc); + SPLAT_KMEM_TEST11_NAME, size, alloc, 60); return rc; } From f220894e1fc86cbfaf073dc4cca519887c41e78e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 2 Feb 2009 08:53:53 -0800 Subject: [PATCH 0228/1062] Make the number of system taskq threads based on the node of cores in the node, as is done for most linux system tasks --- module/spl/spl-taskq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 799b54839..e77ef669f 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -474,8 +474,10 @@ spl_taskq_init(void) { ENTRY; - system_taskq = taskq_create("system_taskq", 64, minclsyspri, 4, 512, - TASKQ_PREPOPULATE); + /* Solaris creates a dynamic taskq of up to 64 threads, however in + * a Linux environment 1 thread per-core is usually about right */ + system_taskq = taskq_create("spl_system_taskq", num_online_cpus(), + minclsyspri, 4, 512, TASKQ_PREPOPULATE); if (system_taskq == NULL) RETURN(1); From 31a033ecd49c2f691d6a377db2882ed941f47481 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 2 Feb 2009 15:12:30 -0800 Subject: [PATCH 0229/1062] 2.6.27+ portability changes - Added SPL_AC_3ARGS_ON_EACH_CPU configure check to determine if the older 4 argument version of on_each_cpu() should be used or the new 3 argument version. The retry argument was dropped in the new API which was never used anyway. - Updated work queue compatibility wrappers. The old way this worked was to pass a data point when initialized the workqueue. The new API assumed the work item is embedding in a structure and we us container_of() to find that data pointer. - Updated skc->skc_flags to be an unsigned long which is now type checked in the bit operations. This silences the warnings. - Updated autogen products and splat tests accordingly --- config/spl-build.m4 | 19 ++++++++++ configure | 61 ++++++++++++++++++++++++++++++++ configure.ac | 1 + include/linux/smp_compat.h | 16 +++++++++ include/linux/workqueue_compat.h | 25 +++++++++++++ include/sys/kmem.h | 3 +- include/sys/types.h | 2 ++ include/sys/workqueue.h | 55 ---------------------------- module/spl/spl-kmem.c | 6 ++-- module/splat/splat-mutex.c | 23 +++++------- spl_config.h.in | 3 ++ 11 files changed, 139 insertions(+), 75 deletions(-) create mode 100644 include/linux/smp_compat.h create mode 100644 include/linux/workqueue_compat.h delete mode 100644 include/sys/workqueue.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 993133065..2f346f6c8 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -686,3 +686,22 @@ AC_DEFUN([SPL_AC_DIV64_64], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.27 API change, +dnl # on_each_cpu() uses 3 args, no 'retry' argument +dnl # +AC_DEFUN([SPL_AC_3ARGS_ON_EACH_CPU], [ + AC_MSG_CHECKING([whether on_each_cpu() wants 3 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + on_each_cpu(NULL, NULL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_ON_EACH_CPU, 1, + [on_each_cpu wants 3 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index 5ac16ce74..8acd05023 100755 --- a/configure +++ b/configure @@ -20407,6 +20407,67 @@ cat >>confdefs.h <<\_ACEOF _ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + + + echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 +echo $ECHO_N "checking whether on_each_cpu() wants 3 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + on_each_cpu(NULL, NULL, 0); + + ; + return 0; +} + +_ACEOF + +rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile +echo "obj-m := conftest.o" >build/Makefile +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_ON_EACH_CPU 1 +_ACEOF + + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 diff --git a/configure.ac b/configure.ac index 1db1efbf9..e0fcb6077 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,7 @@ SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX SPL_AC_DIV64_64 +SPL_AC_3ARGS_ON_EACH_CPU TOPDIR=`/bin/pwd` diff --git a/include/linux/smp_compat.h b/include/linux/smp_compat.h new file mode 100644 index 000000000..4da35f4ad --- /dev/null +++ b/include/linux/smp_compat.h @@ -0,0 +1,16 @@ +#ifndef _SPL_SMP_COMPAT_H +#define _SPL_SMP_COMPAT_H + +#include + +#ifdef HAVE_3ARGS_ON_EACH_CPU + +#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,wait) + +#else + +#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,0,wait) + +#endif /* HAVE_3ARGS_ON_EACH_CPU */ + +#endif /* _SPL_SMP_COMPAT_H */ diff --git a/include/linux/workqueue_compat.h b/include/linux/workqueue_compat.h new file mode 100644 index 000000000..3dab8776a --- /dev/null +++ b/include/linux/workqueue_compat.h @@ -0,0 +1,25 @@ +#ifndef _SPL_WORKQUEUE_COMPAT_H +#define _SPL_WORKQUEUE_COMPAT_H + +#include +#include + +#ifdef HAVE_3ARGS_INIT_WORK + +#define delayed_work work_struct + +#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb), \ + (void *)(d)) +#define spl_init_delayed_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), \ + (void *)(d)) +#define spl_get_work_data(d, t, f) (t *)(d) + +#else + +#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb)); +#define spl_init_delayed_work(wq,cb,d) INIT_DELAYED_WORK((wq), (void *)(cb)); +#define spl_get_work_data(d, t, f) (t *)container_of(d, t, f) + +#endif /* HAVE_3ARGS_INIT_WORK */ + +#endif /* _SPL_WORKQUEUE_COMPAT_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 4f939e0fc..5f2695d52 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -45,7 +45,6 @@ extern "C" { #include #include #include -#include /* * Memory allocation interfaces @@ -286,7 +285,7 @@ typedef struct spl_kmem_cache { spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ void *skc_private; /* Private data */ void *skc_vmp; /* Unused */ - uint32_t skc_flags; /* Flags */ + unsigned long skc_flags; /* Flags */ uint32_t skc_obj_size; /* Object size */ uint32_t skc_obj_align; /* Object alignment */ uint32_t skc_slab_objs; /* Objects per slab */ diff --git a/include/sys/types.h b/include/sys/types.h index b67336bae..0b5cae641 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -14,6 +14,8 @@ extern "C" { #include #include #include +#include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/include/sys/workqueue.h b/include/sys/workqueue.h deleted file mode 100644 index 711c32ed2..000000000 --- a/include/sys/workqueue.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick - * UCRL-CODE-235197 - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef _SPL_WORKQUEUE_H -#define _SPL_WORKQUEUE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#ifdef HAVE_3ARGS_INIT_WORK - -#define delayed_work work_struct - -#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb), \ - (void *)(d)) -#define spl_init_delayed_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), \ - (void *)(d)) -#define spl_get_work_data(d, t, f) (t *)(d) - -#else - -#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb)); -#define spl_init_delayed_work(wq,cb,d) INIT_DELAYED_WORK((wq), (void *)(cb)); -#define spl_get_work_data(d, t, f) (t *)container_of(d, t, f) - -#endif /* HAVE_3ARGS_INIT_WORK */ - -#endif /* _SPL_WORKQUEUE_H */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 83eefe293..79f787271 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -783,7 +783,7 @@ spl_cache_age(void *data) spl_get_work_data(data, spl_kmem_cache_t, skc_work.work); ASSERT(skc->skc_magic == SKC_MAGIC); - on_each_cpu(spl_magazine_age, skc, 0, 1); + spl_on_each_cpu(spl_magazine_age, skc, 1); spl_slab_reclaim(skc, 0); if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) @@ -923,7 +923,7 @@ spl_magazine_create(spl_kmem_cache_t *skc) skc->skc_mag_size = spl_magazine_size(skc); skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; - on_each_cpu(__spl_magazine_create, skc, 0, 1); + spl_on_each_cpu(__spl_magazine_create, skc, 1); RETURN(0); } @@ -945,7 +945,7 @@ static void spl_magazine_destroy(spl_kmem_cache_t *skc) { ENTRY; - on_each_cpu(__spl_magazine_destroy, skc, 0, 1); + spl_on_each_cpu(__spl_magazine_destroy, skc, 1); EXIT; } diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 640f8f407..c64f27aaf 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -59,28 +59,26 @@ typedef struct mutex_priv { int mp_rc; } mutex_priv_t; -#ifdef HAVE_3ARGS_INIT_WORK static void splat_mutex_test1_work(void *priv) { - mutex_priv_t *mp = (mutex_priv_t *)priv; + mutex_priv_t *mp; + mp = spl_get_work_data(priv, mutex_priv_t, mp_work.work); ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); mp->mp_rc = 0; if (!mutex_tryenter(&mp->mp_mtx)) mp->mp_rc = -EBUSY; } -#endif static int splat_mutex_test1(struct file *file, void *arg) { - int rc = 0; -#ifdef HAVE_3ARGS_INIT_WORK struct workqueue_struct *wq; struct work_struct work; mutex_priv_t *mp; + int rc = 0; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); if (mp == NULL) @@ -97,7 +95,7 @@ splat_mutex_test1(struct file *file, void *arg) mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; mp->mp_file = file; - INIT_WORK(&work, splat_mutex_test1_work, mp); + spl_init_work(&work, splat_mutex_test1_work, mp); /* Schedule a work item which will try and aquire the mutex via * mutex_tryenter() while its held. This should fail and the work @@ -143,17 +141,16 @@ out: destroy_workqueue(wq); out2: kfree(mp); -#endif return rc; } -#ifdef HAVE_3ARGS_INIT_WORK static void splat_mutex_test2_work(void *priv) { - mutex_priv_t *mp = (mutex_priv_t *)priv; + mutex_priv_t *mp; int rc; + mp = spl_get_work_data(priv, mutex_priv_t, mp_work.work); ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); /* Read the value before sleeping and write it after we wake up to @@ -165,16 +162,13 @@ splat_mutex_test2_work(void *priv) mp->mp_rc = rc + 1; mutex_exit(&mp->mp_mtx); } -#endif static int splat_mutex_test2(struct file *file, void *arg) { - int rc = 0; -#ifdef HAVE_3ARGS_INIT_WORK struct workqueue_struct *wq; mutex_priv_t *mp; - int i; + int i, rc = 0; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); if (mp == NULL) @@ -200,7 +194,7 @@ splat_mutex_test2(struct file *file, void *arg) * critical region at the same time the system will panic. If the * mutex is implemented right this will never happy, that's a pass. */ for (i = 0; i < SPLAT_MUTEX_TEST_COUNT; i++) { - INIT_WORK(&(mp->mp_work[i]), splat_mutex_test2_work, mp); + spl_init_work(&(mp->mp_work[i]), splat_mutex_test2_work, mp); if (!queue_work(wq, &(mp->mp_work[i]))) { splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, @@ -226,7 +220,6 @@ splat_mutex_test2(struct file *file, void *arg) destroy_workqueue(wq); out: kfree(mp); -#endif return rc; } diff --git a/spl_config.h.in b/spl_config.h.in index c19555a06..a4a8ccd32 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -18,6 +18,9 @@ /* INIT_WORK wants 3 args */ #undef HAVE_3ARGS_INIT_WORK +/* on_each_cpu wants 3 args */ +#undef HAVE_3ARGS_ON_EACH_CPU + /* kernel defines atomic64_t */ #undef HAVE_ATOMIC64_T From 36b313dacf2f60f526fe98b7e9d1a6bbcbb250d2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 4 Feb 2009 15:15:41 -0800 Subject: [PATCH 0230/1062] Linux VM integration / device special files Support added to provide reasonable values for the global Solaris VM variables: minfree, desfree, lotsfree, needfree. These values are set to the sum of their per-zone linux counterparts which should be close enough for Solaris consumers. When a non-GPL app links against the SPL we cannot use the udev interfaces, which means non of the device special files are created. Because of this I had added a poor mans udev which cause the SPL to invoke an upcall and create the basic devices when a minor is registered. When a minor is unregistered we use the vnode interface to unlink the special file. --- config/spl-build.m4 | 36 +++++++++ configure | 117 +++++++++++++++++++++++++++++ configure.ac | 3 + include/sys/dnlc.h | 2 + include/sys/kmem.h | 1 + include/sys/sunddi.h | 34 ++++++++- include/sys/sysmacros.h | 5 +- include/sys/vmsystm.h | 62 +++++++++------- module/spl/spl-generic.c | 3 - module/spl/spl-kmem.c | 109 +++++++++++++++++++++++++++ module/spl/spl-module.c | 25 +++++++ module/spl/spl-proc.c | 156 +++++++++++++++++++++++++++++++-------- spl_config.h.in | 9 +++ 13 files changed, 498 insertions(+), 64 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2f346f6c8..b7aa024e4 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -705,3 +705,39 @@ AC_DEFUN([SPL_AC_3ARGS_ON_EACH_CPU], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # Distro specific first_online_pgdat symbol export. +dnl # +AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ + SPL_CHECK_SYMBOL_EXPORT( + [first_online_pgdat], + [], + [AC_DEFINE(HAVE_FIRST_ONLINE_PGDAT, 1, + [first_online_pgdat() is available])], + []) +]) + +dnl # +dnl # Distro specific next_online_pgdat symbol export. +dnl # +AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ + SPL_CHECK_SYMBOL_EXPORT( + [next_online_pgdat], + [], + [AC_DEFINE(HAVE_NEXT_ONLINE_PGDAT, 1, + [next_online_pgdat() is available])], + []) +]) + +dnl # +dnl # Distro specific next_zone symbol export. +dnl # +AC_DEFUN([SPL_AC_NEXT_ZONE], [ + SPL_CHECK_SYMBOL_EXPORT( + [next_zone], + [], + [AC_DEFINE(HAVE_NEXT_ZONE, 1, + [next_zone() is available])], + []) +]) diff --git a/configure b/configure index 8acd05023..7e59d67fd 100755 --- a/configure +++ b/configure @@ -20481,6 +20481,123 @@ rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest. + echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 +echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIRST_ONLINE_PGDAT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIRST_ONLINE_PGDAT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 +echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ONLINE_PGDAT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ONLINE_PGDAT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 +echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]next_zone[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(next_zone)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ZONE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ZONE 1 +_ACEOF + + fi + + + TOPDIR=`/bin/pwd` # Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build diff --git a/configure.ac b/configure.ac index e0fcb6077..bd4f69976 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,9 @@ SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX SPL_AC_DIV64_64 SPL_AC_3ARGS_ON_EACH_CPU +SPL_AC_FIRST_ONLINE_PGDAT +SPL_AC_NEXT_ONLINE_PGDAT +SPL_AC_NEXT_ZONE TOPDIR=`/bin/pwd` diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h index 91fb57e06..38f8dd6b1 100644 --- a/include/sys/dnlc.h +++ b/include/sys/dnlc.h @@ -1,4 +1,6 @@ #ifndef _SPL_DNLC_H #define _SPL_DNLC_H +#define dnlc_reduce_cache(percent) ((void)0) + #endif /* SPL_DNLC_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 5f2695d52..7281f1063 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -45,6 +45,7 @@ extern "C" { #include #include #include +#include /* * Memory allocation interfaces diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index d2e71ebd5..404b14b38 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -32,12 +32,15 @@ #include #include #include +#include #include #include #include #include #include +#define DDI_MAX_NAME_LEN 32 + typedef int ddi_devid_t; typedef enum { @@ -80,6 +83,7 @@ typedef struct pollhead { typedef struct dev_info { kmutex_t di_lock; + char di_name[DDI_MAX_NAME_LEN]; struct dev_ops *di_ops; struct cdev *di_cdev; spl_class *di_class; @@ -202,6 +206,7 @@ extern void __ddi_remove_minor_node(dev_info_t *dip, char *name); extern int ddi_quiesce_not_needed(dev_info_t *dip); extern int __mod_install(struct modlinkage *modlp); extern int __mod_remove(struct modlinkage *modlp); +extern int __mod_mknod(char *name, char *type, int major, int minor); extern int ddi_strtoul(const char *, char **, int, unsigned long *); extern int ddi_strtol(const char *, char **, int, long *); @@ -226,7 +231,16 @@ ddi_remove_minor_node(dev_info_t *di, char *name) di->di_class = NULL; di->di_dev = 0; } -#endif +#else + /* When we do not have access to the GPL-only device interfaces we + * are forced to do something crude. We unlink the special device + * file in /dev/ ourselves from within the kernel. On the upside we + * are already providing this functionality for Solaris, and it is + * easy to leverage the Solaris API to perform the unlink. */ + if (strlen(di->di_name) > 0) + vn_remove(di->di_name, UIO_SYSSPACE, RMFILE); + +#endif /* HAVE_GPL_ONLY_SYMBOLS */ __ddi_remove_minor_node(di, name); } @@ -254,14 +268,28 @@ ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, di->di_class = NULL; ddi_remove_minor_node(di, name); CERROR("Error creating %s class, %d\n", name, rc); - RETURN(DDI_FAILURE); + return DDI_FAILURE; } /* Do not append a 0 to devices with minor nums of 0 */ di->di_device = spl_device_create(di->di_class, NULL, di->di_dev, NULL, (di->di_minor == 0) ? "%s" : "%s%d", name, di->di_minor); -#endif +#else + /* When we do not have access to the GPL-only device interfaces we + * are forced to do something horible. We use a user mode helper to + * create the special device file in /dev/. By futher extending the + * Solaris vnode implementation we could potentially do a vn_create() + * from within the kernel but that's still a hack. */ + if (name) { + rc = __mod_mknod(di->di_name, "c", di->di_major, di->di_minor); + if (rc) { + CERROR("Error mknod %s, %d\n", di->di_name, rc); + ddi_remove_minor_node(di, name); + } + } + +#endif /* HAVE_GPL_ONLY_SYMBOLS */ return rc; } diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index b82812385..65c102585 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -67,10 +67,13 @@ extern "C" { #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ +#define curproc current +#define proc_pageout NULL #define max_ncpus 64 #define CPU_SEQID smp_processor_id() /* I think... */ #define _NOTE(x) + #define RLIM64_INFINITY RLIM_INFINITY /* 0..MAX_PRIO-1: Process priority @@ -135,8 +138,6 @@ extern int p0; /* Missing misc functions */ extern int highbit(unsigned long i); -extern int ddi_strtoul(const char *str, char **nptr, - int base, unsigned long *result); #define makedevice(maj,min) makedev(maj,min) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 1cb716f13..a6e9e7d7e 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -27,19 +27,50 @@ #ifndef _SPL_VMSYSTM_H #define _SPL_VMSYSTM_H +#include #include #include #include #include -extern vmem_t *zio_alloc_arena; /* arena for zio caches */ +/* These values are loosely coupled with the the VM page reclaim. + * Linux uses its own heuristics to trigger page reclamation, and + * because those interface are difficult to interface with. These + * values should only be considered as a rough guide to the system + * memory state and not as direct evidence that page reclaimation + * is or is not currently in progress. + */ +#define ptob(pages) (pages * PAGE_SIZE) +#define membar_producer() smp_wmb() #define physmem num_physpages #define freemem nr_free_pages() -#define minfree 0 -#define needfree 0 /* # of needed pages */ -#define ptob(pages) (pages * PAGE_SIZE) -#define membar_producer() smp_wmb() + +extern pgcnt_t minfree; /* Sum of zone->pages_min */ +extern pgcnt_t desfree; /* Sum of zone->pages_low */ +extern pgcnt_t lotsfree; /* Sum of zone->pages_high */ +extern pgcnt_t needfree; /* Always 0 */ +extern pgcnt_t swapfs_minfree; +extern pgcnt_t swapfs_desfree; +extern pgcnt_t swapfs_reserve; +extern pgcnt_t availrmem; + +extern vmem_t *heap_arena; /* primary kernel heap arena */ +extern vmem_t *zio_alloc_arena; /* arena for zio caches */ +extern vmem_t *zio_arena; /* arena for allocating zio memory */ + +#define VMEM_ALLOC 0x01 +#define VMEM_FREE 0x02 + +static __inline__ size_t +vmem_size(vmem_t *vmp, int typemask) +{ + /* Arena's unsupported */ + ASSERT(vmp == NULL); + ASSERT(typemask & (VMEM_ALLOC | VMEM_FREE)); + + return 0; +} #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) @@ -82,25 +113,4 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) return 0; } -#if 0 -/* The average number of free pages over the last 5 seconds */ -#define avefree 0 - -/* The average number of free pages over the last 30 seconds */ -#define avefree30 0 - -/* A guess as to how much memory has been promised to - * processes but not yet allocated */ -#define deficit 0 - -/* A bootlean the controls the setting of deficit */ -#define desperate - -/* When free memory is above this limit, no paging or swapping is done */ -#define lotsfree 0 - -/* When free memory is above this limit, swapping is not performed */ -#define desfree 0 -#endif - #endif /* SPL_VMSYSTM_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index c09d9d4e3..a15cac41e 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -53,9 +53,6 @@ EXPORT_SYMBOL(hw_serial); int p0 = 0; EXPORT_SYMBOL(p0); -vmem_t *zio_alloc_arena = NULL; -EXPORT_SYMBOL(zio_alloc_arena); - int highbit(unsigned long i) { diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 79f787271..c39636e06 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -32,6 +32,96 @@ #define DEBUG_SUBSYSTEM S_KMEM +/* + * The minimum amount of memory measured in pages to be free at all + * times on the system. This is similar to Linux's zone->pages_min + * multipled by the number of zones and is sized based on that. + */ +pgcnt_t minfree = 0; +EXPORT_SYMBOL(minfree); + +/* + * The desired amount of memory measured in pages to be free at all + * times on the system. This is similar to Linux's zone->pages_low + * multipled by the number of zones and is sized based on that. + * Assuming all zones are being used roughly equally, when we drop + * below this threshold async page reclamation is triggered. + */ +pgcnt_t desfree = 0; +EXPORT_SYMBOL(desfree); + +/* + * When above this amount of memory measures in pages the system is + * determined to have enough free memory. This is similar to Linux's + * zone->pages_high multipled by the number of zones and is sized based + * on that. Assuming all zones are being used roughly equally, when + * async page reclamation reaches this threshold it stops. + */ +pgcnt_t lotsfree = 0; +EXPORT_SYMBOL(lotsfree); + +/* Unused always 0 in this implementation */ +pgcnt_t needfree = 0; +EXPORT_SYMBOL(needfree); + +pgcnt_t swapfs_desfree = 0; +EXPORT_SYMBOL(swapfs_desfree); + +pgcnt_t swapfs_minfree = 0; +EXPORT_SYMBOL(swapfs_minfree); + +pgcnt_t swapfs_reserve = 0; +EXPORT_SYMBOL(swapfs_reserve); + +pgcnt_t availrmem = 0; +EXPORT_SYMBOL(availrmem); + +vmem_t *heap_arena = NULL; +EXPORT_SYMBOL(heap_arena); + +vmem_t *zio_alloc_arena = NULL; +EXPORT_SYMBOL(zio_alloc_arena); + +vmem_t *zio_arena = NULL; +EXPORT_SYMBOL(zio_arena); + +#ifndef HAVE_FIRST_ONLINE_PGDAT +struct pglist_data *first_online_pgdat(void) +{ + return NODE_DATA(first_online_node); +} +#endif /* HAVE_FIRST_ONLINE_PGDAT */ + +#ifndef HAVE_NEXT_ONLINE_PGDAT +struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) +{ + int nid = next_online_node(pgdat->node_id); + + if (nid == MAX_NUMNODES) + return NULL; + + return NODE_DATA(nid); +} +#endif /* HAVE_NEXT_ONLINE_PGDAT */ + +#ifndef HAVE_NEXT_ZONE +struct zone *next_zone(struct zone *zone) +{ + pg_data_t *pgdat = zone->zone_pgdat; + + if (zone < pgdat->node_zones + MAX_NR_ZONES - 1) + zone++; + else { + pgdat = next_online_pgdat(pgdat); + if (pgdat) + zone = pgdat->node_zones; + else + zone = NULL; + } + return zone; +} +#endif /* HAVE_NEXT_ZONE */ + /* * Memory allocation interfaces and debugging for basic kmem_* * and vmem_* style memory allocation. When DEBUG_KMEM is enable @@ -1601,6 +1691,24 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) #define spl_kmem_fini_tracking(list, lock) #endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ +static void +spl_kmem_init_globals(void) +{ + struct zone *zone; + + /* For now all zones are includes, it may be wise to restrict + * this to normal and highmem zones if we see problems. */ + for_each_zone(zone) { + + if (!populated_zone(zone)) + continue; + + minfree += zone->pages_min; + desfree += zone->pages_low; + lotsfree += zone->pages_high; + } +} + int spl_kmem_init(void) { @@ -1609,6 +1717,7 @@ spl_kmem_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); + spl_kmem_init_globals(); #ifdef HAVE_SET_SHRINKER spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index c1d030f24..4a2be89da 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -140,6 +140,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, ASSERT(cb_ops->cb_aread == NULL); ASSERT(cb_ops->cb_awrite == NULL); + snprintf(di->di_name, DDI_MAX_NAME_LEN-1, "/dev/%s", name); di->di_cdev = cdev; di->di_flags = flags; di->di_minor = minor_num; @@ -281,6 +282,30 @@ __mod_install(struct modlinkage *modlp) } EXPORT_SYMBOL(__mod_install); +int +__mod_mknod(char *name, char *type, int major, int minor) +{ + char cmd[] = "/bin/mknod"; + char major_str[8]; + char minor_str[8]; + char *argv[] = { cmd, + name, + type, + major_str, + minor_str, + NULL }; + char *envp[] = { "HOME=/", + "TERM=linux", + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", + NULL }; + + snprintf(major_str, 8, "%d", major); + snprintf(minor_str, 8, "%d", minor); + + return call_usermodehelper(cmd, argv, envp, 1); +} +EXPORT_SYMBOL(__mod_mknod); + int __mod_remove(struct modlinkage *modlp) { diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index bf185c60e..024118a9f 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -60,6 +60,7 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #define CTL_SPL CTL_UNNUMBERED #define CTL_SPL_DEBUG CTL_UNNUMBERED +#define CTL_SPL_VM CTL_UNNUMBERED #define CTL_SPL_MUTEX CTL_UNNUMBERED #define CTL_SPL_KMEM CTL_UNNUMBERED #define CTL_SPL_KSTAT CTL_UNNUMBERED @@ -85,6 +86,15 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #define CTL_CONSOLE_MIN_DELAY_CS CTL_UNNUMBERED /* Init delay skip messages */ #define CTL_CONSOLE_BACKOFF CTL_UNNUMBERED /* Delay increase factor */ +#define CTL_VM_MINFREE CTL_UNNUMBERED /* Minimum free memory */ +#define CTL_VM_DESFREE CTL_UNNUMBERED /* Desired free memory */ +#define CTL_VM_LOTSFREE CTL_UNNUMBERED /* Lots of free memory */ +#define CTL_VM_NEEDFREE CTL_UNNUMBERED /* Need free memory */ +#define CTL_VM_SWAPFS_MINFREE CTL_UNNUMBERED /* Minimum swapfs memory */ +#define CTL_VM_SWAPFS_DESFREE CTL_UNNUMBERED /* Desired swapfs memory */ +#define CTL_VM_SWAPFS_RESERVE CTL_UNNUMBERED /* Reserved swapfs memory */ +#define CTL_VM_AVAILRMEM CTL_UNNUMBERED /* Available reserved memory */ + #ifdef DEBUG_KMEM #define CTL_KMEM_KMEMUSED CTL_UNNUMBERED /* Alloc'd kmem bytes */ #define CTL_KMEM_KMEMMAX CTL_UNNUMBERED /* Max alloc'd by kmem bytes */ @@ -99,44 +109,56 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #else /* HAVE_CTL_UNNUMBERED */ -#define CTL_SPL 0x87 -#define CTL_SPL_DEBUG 0x88 -#define CTL_SPL_MUTEX 0x89 -#define CTL_SPL_KMEM 0x90 -#define CTL_SPL_KSTAT 0x91 +enum { + CTL_SPL = 0x87, + CTL_SPL_DEBUG = 0x88, + CTL_SPL_VM = 0x89, + CTL_SPL_MUTEX = 0x90, + CTL_SPL_KMEM = 0x91, + CTL_SPL_KSTAT = 0x92, +}; enum { - CTL_VERSION = 1, /* Version */ - CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ - CTL_HW_SERIAL, /* Hardware serial number from hostid */ + CTL_VERSION = 1, /* Version */ + CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ + CTL_HW_SERIAL, /* Hardware serial number from hostid */ - CTL_DEBUG_SUBSYS, /* Debug subsystem */ - CTL_DEBUG_MASK, /* Debug mask */ - CTL_DEBUG_PRINTK, /* Force all messages to console */ - CTL_DEBUG_MB, /* Debug buffer size */ - CTL_DEBUG_BINARY, /* Include binary data in buffer */ - CTL_DEBUG_CATASTROPHE, /* Set if we have BUG'd or panic'd */ - CTL_DEBUG_PANIC_ON_BUG, /* Set if we should panic on BUG */ - CTL_DEBUG_PATH, /* Dump log location */ - CTL_DEBUG_DUMP, /* Dump debug buffer to file */ - CTL_DEBUG_FORCE_BUG, /* Hook to force a BUG */ - CTL_DEBUG_STACK_SIZE, /* Max observed stack size */ + CTL_DEBUG_SUBSYS, /* Debug subsystem */ + CTL_DEBUG_MASK, /* Debug mask */ + CTL_DEBUG_PRINTK, /* Force all messages to console */ + CTL_DEBUG_MB, /* Debug buffer size */ + CTL_DEBUG_BINARY, /* Include binary data in buffer */ + CTL_DEBUG_CATASTROPHE, /* Set if we have BUG'd or panic'd */ + CTL_DEBUG_PANIC_ON_BUG, /* Set if we should panic on BUG */ + CTL_DEBUG_PATH, /* Dump log location */ + CTL_DEBUG_DUMP, /* Dump debug buffer to file */ + CTL_DEBUG_FORCE_BUG, /* Hook to force a BUG */ + CTL_DEBUG_STACK_SIZE, /* Max observed stack size */ - CTL_CONSOLE_RATELIMIT, /* Ratelimit console messages */ - CTL_CONSOLE_MAX_DELAY_CS, /* Max delay at which we skip messages */ - CTL_CONSOLE_MIN_DELAY_CS, /* Init delay at which we skip messages */ - CTL_CONSOLE_BACKOFF, /* Delay increase factor */ + CTL_CONSOLE_RATELIMIT, /* Ratelimit console messages */ + CTL_CONSOLE_MAX_DELAY_CS, /* Max delay which we skip messages */ + CTL_CONSOLE_MIN_DELAY_CS, /* Init delay which we skip messages */ + CTL_CONSOLE_BACKOFF, /* Delay increase factor */ + + CTL_VM_MINFREE, /* Minimum free memory threshold */ + CTL_VM_DESFREE, /* Desired free memory threshold */ + CTL_VM_LOTSFREE, /* Lots of free memory threshold */ + CTL_VM_NEEDFREE, /* Need free memory deficit */ + CTL_VM_SWAPFS_MINFREE, /* Minimum swapfs memory */ + CTL_VM_SWAPFS_DESFREE, /* Desired swapfs memory */ + CTL_VM_SWAPFS_RESERVE, /* Reserved swapfs memory */ + CTL_VM_AVAILRMEM, /* Available reserved memory */ #ifdef DEBUG_KMEM - CTL_KMEM_KMEMUSED, /* Alloc'd kmem bytes */ - CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ - CTL_KMEM_VMEMUSED, /* Alloc'd vmem bytes */ - CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ + CTL_KMEM_KMEMUSED, /* Alloc'd kmem bytes */ + CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ + CTL_KMEM_VMEMUSED, /* Alloc'd vmem bytes */ + CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ #endif - CTL_MUTEX_STATS, /* Global mutex statistics */ - CTL_MUTEX_STATS_PER, /* Per mutex statistics */ - CTL_MUTEX_SPIN_MAX, /* Maximum mutex spin iterations */ + CTL_MUTEX_STATS, /* Global mutex statistics */ + CTL_MUTEX_STATS_PER, /* Per mutex statistics */ + CTL_MUTEX_SPIN_MAX, /* Maximum mutex spin iterations */ }; #endif /* HAVE_CTL_UNNUMBERED */ @@ -769,6 +791,74 @@ static struct ctl_table spl_debug_table[] = { {0}, }; +static struct ctl_table spl_vm_table[] = { + { + .ctl_name = CTL_VM_MINFREE, + .procname = "minfree", + .data = &minfree, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_VM_DESFREE, + .procname = "desfree", + .data = &desfree, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_VM_LOTSFREE, + .procname = "lotsfree", + .data = &lotsfree, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_VM_NEEDFREE, + .procname = "needfree", + .data = &needfree, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_VM_SWAPFS_MINFREE, + .procname = "swapfs_minfree", + .data = &swapfs_minfree, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_VM_SWAPFS_DESFREE, + .procname = "swapfs_desfree", + .data = &swapfs_desfree, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_VM_SWAPFS_RESERVE, + .procname = "swapfs_reserve", + .data = &swapfs_reserve, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = CTL_VM_AVAILRMEM, + .procname = "availrmem", + .data = &availrmem, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + {0}, +}; + #ifdef DEBUG_MUTEX static struct ctl_table spl_mutex_table[] = { { @@ -873,6 +963,12 @@ static struct ctl_table spl_table[] = { .mode = 0555, .child = spl_debug_table, }, + { + .ctl_name = CTL_SPL_VM, + .procname = "vm", + .mode = 0555, + .child = spl_vm_table, + }, #ifdef DEBUG_MUTEX { .ctl_name = CTL_SPL_MUTEX, diff --git a/spl_config.h.in b/spl_config.h.in index a4a8ccd32..2bfb5c487 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -45,6 +45,9 @@ /* files_fdtable() is available */ #undef HAVE_FILES_FDTABLE +/* first_online_pgdat() is available */ +#undef HAVE_FIRST_ONLINE_PGDAT + /* fls64() is available */ #undef HAVE_FLS64 @@ -66,6 +69,12 @@ /* monotonic_clock() is available */ #undef HAVE_MONOTONIC_CLOCK +/* next_online_pgdat() is available */ +#undef HAVE_NEXT_ONLINE_PGDAT + +/* next_zone() is available */ +#undef HAVE_NEXT_ZONE + /* struct path used in struct nameidata */ #undef HAVE_PATH_IN_NAMEIDATA From 4ab13d3b5c2d0724632dd29c0970ff7df00985f5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 5 Feb 2009 12:26:34 -0800 Subject: [PATCH 0231/1062] Additional Linux VM integration Added support for Solaris swapfs_minfree, and swapfs_reserve tunables. In additional availrmem is now available and return a reasonable value which is reasonably analogous to the Solaris meaning. On linux we return the sun of free and inactive pages since these are all easily reclaimable. All tunables are available in /proc/sys/kernel/spl/vm/* and they may need a little adjusting once we observe the real behavior. Some of the defaults are mapped to similar linux counterparts, others are straight from the OpenSolaris defaults. --- config/spl-build.m4 | 18 +++++++-- configure | 39 ++++++++++++++++++++ configure.ac | 1 + include/sys/vmsystm.h | 20 +++------- module/spl/spl-kmem.c | 86 ++++++++++++++++++++++++++++++++++++++----- module/spl/spl-proc.c | 86 ++++++++++++++++++++++++++++++++++++------- spl_config.h.in | 3 ++ 7 files changed, 214 insertions(+), 39 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b7aa024e4..5ee615bf8 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -707,7 +707,7 @@ AC_DEFUN([SPL_AC_3ARGS_ON_EACH_CPU], [ ]) dnl # -dnl # Distro specific first_online_pgdat symbol export. +dnl # Distro specific first_online_pgdat() symbol export. dnl # AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ SPL_CHECK_SYMBOL_EXPORT( @@ -719,7 +719,7 @@ AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ ]) dnl # -dnl # Distro specific next_online_pgdat symbol export. +dnl # Distro specific next_online_pgdat() symbol export. dnl # AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ SPL_CHECK_SYMBOL_EXPORT( @@ -731,7 +731,7 @@ AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ ]) dnl # -dnl # Distro specific next_zone symbol export. +dnl # Distro specific next_zone() symbol export. dnl # AC_DEFUN([SPL_AC_NEXT_ZONE], [ SPL_CHECK_SYMBOL_EXPORT( @@ -741,3 +741,15 @@ AC_DEFUN([SPL_AC_NEXT_ZONE], [ [next_zone() is available])], []) ]) + +dnl # +dnl # Distro specific get_zone_counts() symbol export. +dnl # +AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ + SPL_CHECK_SYMBOL_EXPORT( + [get_zone_counts], + [], + [AC_DEFINE(HAVE_GET_ZONE_COUNTS, 1, + [get_zone_counts() is available])], + []) +]) diff --git a/configure b/configure index 7e59d67fd..21e222de4 100755 --- a/configure +++ b/configure @@ -20598,6 +20598,45 @@ _ACEOF + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 +echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' $LINUX/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + + + TOPDIR=`/bin/pwd` # Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build diff --git a/configure.ac b/configure.ac index bd4f69976..259c4e892 100644 --- a/configure.ac +++ b/configure.ac @@ -72,6 +72,7 @@ SPL_AC_3ARGS_ON_EACH_CPU SPL_AC_FIRST_ONLINE_PGDAT SPL_AC_NEXT_ONLINE_PGDAT SPL_AC_NEXT_ZONE +SPL_AC_GET_ZONE_COUNTS TOPDIR=`/bin/pwd` diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index a6e9e7d7e..75ae8a991 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -45,15 +45,14 @@ #define physmem num_physpages #define freemem nr_free_pages() +#define availrmem spl_kmem_availrmem() extern pgcnt_t minfree; /* Sum of zone->pages_min */ extern pgcnt_t desfree; /* Sum of zone->pages_low */ extern pgcnt_t lotsfree; /* Sum of zone->pages_high */ -extern pgcnt_t needfree; /* Always 0 */ -extern pgcnt_t swapfs_minfree; -extern pgcnt_t swapfs_desfree; -extern pgcnt_t swapfs_reserve; -extern pgcnt_t availrmem; +extern pgcnt_t needfree; /* Always 0 unused in new Solaris */ +extern pgcnt_t swapfs_minfree; /* Solaris default value */ +extern pgcnt_t swapfs_reserve; /* Solaris default value */ extern vmem_t *heap_arena; /* primary kernel heap arena */ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ @@ -62,15 +61,8 @@ extern vmem_t *zio_arena; /* arena for allocating zio memory */ #define VMEM_ALLOC 0x01 #define VMEM_FREE 0x02 -static __inline__ size_t -vmem_size(vmem_t *vmp, int typemask) -{ - /* Arena's unsupported */ - ASSERT(vmp == NULL); - ASSERT(typemask & (VMEM_ALLOC | VMEM_FREE)); - - return 0; -} +extern pgcnt_t spl_kmem_availrmem(void); +extern size_t vmem_size(vmem_t *vmp, int typemask); #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index c39636e06..b5cd9fb12 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -64,18 +64,12 @@ EXPORT_SYMBOL(lotsfree); pgcnt_t needfree = 0; EXPORT_SYMBOL(needfree); -pgcnt_t swapfs_desfree = 0; -EXPORT_SYMBOL(swapfs_desfree); - pgcnt_t swapfs_minfree = 0; EXPORT_SYMBOL(swapfs_minfree); pgcnt_t swapfs_reserve = 0; EXPORT_SYMBOL(swapfs_reserve); -pgcnt_t availrmem = 0; -EXPORT_SYMBOL(availrmem); - vmem_t *heap_arena = NULL; EXPORT_SYMBOL(heap_arena); @@ -86,14 +80,17 @@ vmem_t *zio_arena = NULL; EXPORT_SYMBOL(zio_arena); #ifndef HAVE_FIRST_ONLINE_PGDAT -struct pglist_data *first_online_pgdat(void) +struct pglist_data * +first_online_pgdat(void) { return NODE_DATA(first_online_node); } +EXPORT_SYMBOL(first_online_pgdat); #endif /* HAVE_FIRST_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ONLINE_PGDAT -struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) +struct pglist_data * +next_online_pgdat(struct pglist_data *pgdat) { int nid = next_online_node(pgdat->node_id); @@ -102,10 +99,12 @@ struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) return NODE_DATA(nid); } +EXPORT_SYMBOL(next_online_pgdat); #endif /* HAVE_NEXT_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ZONE -struct zone *next_zone(struct zone *zone) +struct zone * +next_zone(struct zone *zone) { pg_data_t *pgdat = zone->zone_pgdat; @@ -120,8 +119,73 @@ struct zone *next_zone(struct zone *zone) } return zone; } +EXPORT_SYMBOL(next_zone); #endif /* HAVE_NEXT_ZONE */ +#ifndef HAVE_GET_ZONE_COUNTS +void +__get_zone_counts(unsigned long *active, unsigned long *inactive, + unsigned long *free, struct pglist_data *pgdat) +{ + struct zone *zones = pgdat->node_zones; + int i; + + *active = 0; + *inactive = 0; + *free = 0; + for (i = 0; i < MAX_NR_ZONES; i++) { + *active += zones[i].nr_active; + *inactive += zones[i].nr_inactive; + *free += zones[i].free_pages; + } +} + +void +get_zone_counts(unsigned long *active, unsigned long *inactive, + unsigned long *free) +{ + struct pglist_data *pgdat; + + *active = 0; + *inactive = 0; + *free = 0; + for_each_online_pgdat(pgdat) { + unsigned long l, m, n; + __get_zone_counts(&l, &m, &n, pgdat); + *active += l; + *inactive += m; + *free += n; + } +} +EXPORT_SYMBOL(get_zone_counts); +#endif /* HAVE_GET_ZONE_COUNTS */ + +pgcnt_t +spl_kmem_availrmem(void) +{ + unsigned long active; + unsigned long inactive; + unsigned long free; + + get_zone_counts(&active, &inactive, &free); + + /* The amount of easily available memory */ + return free + inactive; +} +EXPORT_SYMBOL(spl_kmem_availrmem); + +size_t +vmem_size(vmem_t *vmp, int typemask) +{ + /* Arena's unsupported */ + ASSERT(vmp == NULL); + ASSERT(typemask & (VMEM_ALLOC | VMEM_FREE)); + + return 0; +} +EXPORT_SYMBOL(vmem_size); + + /* * Memory allocation interfaces and debugging for basic kmem_* * and vmem_* style memory allocation. When DEBUG_KMEM is enable @@ -1707,6 +1771,10 @@ spl_kmem_init_globals(void) desfree += zone->pages_low; lotsfree += zone->pages_high; } + + /* Solaris default values */ + swapfs_minfree = MAX(2*1024*1024 / PAGE_SIZE, physmem / 8); + swapfs_reserve = MIN(4*1024*1024 / PAGE_SIZE, physmem / 16); } int diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 024118a9f..1ae1c129a 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -91,9 +91,10 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #define CTL_VM_LOTSFREE CTL_UNNUMBERED /* Lots of free memory */ #define CTL_VM_NEEDFREE CTL_UNNUMBERED /* Need free memory */ #define CTL_VM_SWAPFS_MINFREE CTL_UNNUMBERED /* Minimum swapfs memory */ -#define CTL_VM_SWAPFS_DESFREE CTL_UNNUMBERED /* Desired swapfs memory */ #define CTL_VM_SWAPFS_RESERVE CTL_UNNUMBERED /* Reserved swapfs memory */ -#define CTL_VM_AVAILRMEM CTL_UNNUMBERED /* Available reserved memory */ +#define CTL_VM_AVAILRMEM CTL_UNNUMBERED /* Easily available memory */ +#define CTL_VM_FREEMEM CTL_UNNUMBERED /* Free memory */ +#define CTL_VM_PHYSMEM CTL_UNNUMBERED /* Total physical memory */ #ifdef DEBUG_KMEM #define CTL_KMEM_KMEMUSED CTL_UNNUMBERED /* Alloc'd kmem bytes */ @@ -145,9 +146,10 @@ enum { CTL_VM_LOTSFREE, /* Lots of free memory threshold */ CTL_VM_NEEDFREE, /* Need free memory deficit */ CTL_VM_SWAPFS_MINFREE, /* Minimum swapfs memory */ - CTL_VM_SWAPFS_DESFREE, /* Desired swapfs memory */ CTL_VM_SWAPFS_RESERVE, /* Reserved swapfs memory */ - CTL_VM_AVAILRMEM, /* Available reserved memory */ + CTL_VM_AVAILRMEM, /* Easily available memory */ + CTL_VM_FREEMEM, /* Free memory */ + CTL_VM_PHYSMEM, /* Total physical memory */ #ifdef DEBUG_KMEM CTL_KMEM_KMEMUSED, /* Alloc'd kmem bytes */ @@ -486,6 +488,58 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } +static int +proc_doavailrmem(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + int len, rc = 0; + char str[32]; + ENTRY; + + if (write) { + *ppos += *lenp; + } else { + len = snprintf(str, sizeof(str), "%lu", (unsigned long)availrmem); + if (*ppos >= len) + rc = 0; + else + rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + + if (rc >= 0) { + *lenp = rc; + *ppos += rc; + } + } + + RETURN(rc); +} + +static int +proc_dofreemem(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + int len, rc = 0; + char str[32]; + ENTRY; + + if (write) { + *ppos += *lenp; + } else { + len = snprintf(str, sizeof(str), "%lu", (unsigned long)freemem); + if (*ppos >= len) + rc = 0; + else + rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + + if (rc >= 0) { + *lenp = rc; + *ppos += rc; + } + } + + RETURN(rc); +} + #ifdef DEBUG_MUTEX static void mutex_seq_show_headers(struct seq_file *f) @@ -832,14 +886,6 @@ static struct ctl_table spl_vm_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, - { - .ctl_name = CTL_VM_SWAPFS_DESFREE, - .procname = "swapfs_desfree", - .data = &swapfs_desfree, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, { .ctl_name = CTL_VM_SWAPFS_RESERVE, .procname = "swapfs_reserve", @@ -851,7 +897,21 @@ static struct ctl_table spl_vm_table[] = { { .ctl_name = CTL_VM_AVAILRMEM, .procname = "availrmem", - .data = &availrmem, + .mode = 0444, + .proc_handler = &proc_doavailrmem, + }, + { + .ctl_name = CTL_VM_FREEMEM, + .procname = "freemem", + .data = (void *)2, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dofreemem, + }, + { + .ctl_name = CTL_VM_PHYSMEM, + .procname = "physmem", + .data = &physmem, .maxlen = sizeof(int), .mode = 0444, .proc_handler = &proc_dointvec, diff --git a/spl_config.h.in b/spl_config.h.in index 2bfb5c487..1b7c8abab 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -51,6 +51,9 @@ /* fls64() is available */ #undef HAVE_FLS64 +/* get_zone_counts() is available */ +#undef HAVE_GET_ZONE_COUNTS + /* init_utsname() is available */ #undef HAVE_INIT_UTSNAME From e50ad76da5379916a2b2942e4617c6670fb43b27 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 5 Feb 2009 13:34:51 -0800 Subject: [PATCH 0232/1062] Prep for 0.4.2 tag --- ChangeLog | 24 ++++++++++++++++++++++++ META | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index eb208f613..86affd867 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2009-02-05 Brian Behlendorf + + * : Tag spl-0.4.2 + + * module/spl/spl-kmem.c include/sys/kmem.h: Slab cache improvements: + - Implement kmem cache alignment. + - Implement slab ageing. + - Optimized slab packing algorithm. + - Fixed deadlock due to calling call kv_free() under the skc_lock. + - Added additional SPLAT test cases + - Performance optimizations + + * module/spl/spl-kmem.c include/sys/kmem.h: Linux VM integration. + The Solaris global VM symbols minfree, desfree, lotsfree, needfree, + swapfs_minfree, swapfs_reserve, availrmem, freemem, and physmem are + now available and loosely integrating with the Linux VM. Some + tuning will undoubtably be needed and these tunables are available + in /proc/sys/kernel/spl/vm/* for this very reason. + + * config/spl-build.m4: New configure checks needed when building + against 2.6.27+ kernels. More work is needed here. + + * : Minor cleanup see the 'git log' for full details. + 2009-01-21 Brian Behlendorf * : Tag spl-0.4.1 diff --git a/META b/META index 4caa7e377..b548337d0 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.1 +Version: 0.4.2 Release: 1 Release-Tags: relext From f500ccff35a55d04e7f6b8ddb54ff6e54e9c5d70 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Sat, 7 Feb 2009 00:53:39 +0000 Subject: [PATCH 0233/1062] Minor bug fix due to MAXOFFSET_T constant being too large on 32-bit systems. --- include/sys/sysmacros.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 65c102585..03e72a145 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -61,7 +61,12 @@ extern "C" { #define MAXMSGLEN 256 #define MAXNAMELEN 256 #define MAXPATHLEN PATH_MAX + +#ifdef _LP64 #define MAXOFFSET_T 0x7fffffffffffffffl +#else +#define MAXOFFSET_T 0x7fffffffl +#endif #define MAXBSIZE 8192 #define DEV_BSIZE 512 From 37db7d8cf9936e6d2851a4329c11efcd9f61305c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 12 Feb 2009 13:32:10 -0800 Subject: [PATCH 0234/1062] kmem slab fixes - Default SPL_KMEM_CACHE_DELAY changed to 15 to match Solaris. - Aged out slab checking occurs every SPL_KMEM_CACHE_DELAY / 3. - skc->skc_reap tunable added whichs allows callers of spl_slab_reclaim() to cap the number of slabs reclaimed. On Solaris all eligible slabs are always reclaimed, and this is still the default behavior. However, I suspect that is not always wise for reasons such as in the next comment. - spl_slab_reclaim() added cond_resched() while walking the slab/object free lists. Soft lockups were observed when freeing large numbers of vmalloc'd slabs/objets. - spl_slab_reclaim() 'sks->sks_ref > 0' check changes from incorrect 'break' to 'continue' to ensure all slabs are checked. - spl_cache_age() reworked to avoid a deadlock with do_flush_tlb_all() which occured because we slept waiting for completion in spl_cache_age(). To waiting for magazine reclamation to finish is not required so we no longer wait. - spl_magazine_create() and spl_magazine_destroy() shifted back to using for_each_online_cpu() instead of the spl_on_each_cpu() approach which was of course a bad idea due to memory allocations which Ricardo pointed out. --- include/sys/kmem.h | 4 +- module/spl/spl-kmem.c | 87 +++++++++++++++++++++++++------------------ 2 files changed, 54 insertions(+), 37 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 7281f1063..dc66a9153 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -239,7 +239,8 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SKS_MAGIC 0x22222222 #define SKC_MAGIC 0x2c2c2c2c -#define SPL_KMEM_CACHE_DELAY 5 /* Minimum slab release age */ +#define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ +#define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ #define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 /* Target objects per slab */ #define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 8 /* Minimum objects per slab */ #define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ @@ -292,6 +293,7 @@ typedef struct spl_kmem_cache { uint32_t skc_slab_objs; /* Objects per slab */ uint32_t skc_slab_size; /* Slab size */ uint32_t skc_delay; /* Slab reclaim interval */ + uint32_t skc_reap; /* Slab reclaim count */ atomic_t skc_ref; /* Ref count callers */ struct delayed_work skc_work; /* Slab reclaim work */ struct work_struct work; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index b5cd9fb12..d82d7b49f 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -856,16 +856,19 @@ spl_slab_free(spl_kmem_slab_t *sks, /* * Traverses all the partial slabs attached to a cache and free those * which which are currently empty, and have not been touched for - * skc_delay seconds. This is to avoid thrashing. + * skc_delay seconds to avoid thrashing. The count argument is + * passed to optionally cap the number of slabs reclaimed, a count + * of zero means try and reclaim everything. When flag is set we + * always free an available slab regardless of age. */ static void -spl_slab_reclaim(spl_kmem_cache_t *skc, int flag) +spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) { spl_kmem_slab_t *sks, *m; spl_kmem_obj_t *sko, *n; LIST_HEAD(sks_list); LIST_HEAD(sko_list); - int size; + int size, i = 0; ENTRY; /* @@ -878,11 +881,18 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int flag) spin_lock(&skc->skc_lock); list_for_each_entry_safe_reverse(sks, m, &skc->skc_partial_list, sks_list) { - if (sks->sks_ref > 0) - break; + /* Release at most count slabs */ + if (count && i > count) + break; - if (flag || time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)) + /* Skip active slabs */ + if (sks->sks_ref > 0) + continue; + + if (time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)||flag) { spl_slab_free(sks, &sks_list, &sko_list); + i++; + } } spin_unlock(&skc->skc_lock); @@ -896,12 +906,18 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int flag) size = P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) + P2ROUNDUP(sizeof(spl_kmem_obj_t), skc->skc_obj_align); - list_for_each_entry_safe(sko, n, &sko_list, sko_list) + /* To avoid soft lockups conditionally reschedule */ + list_for_each_entry_safe(sko, n, &sko_list, sko_list) { kv_free(skc, sko->sko_addr, size); + cond_resched(); + } } - list_for_each_entry_safe(sks, m, &sks_list, sks_list) + /* To avoid soft lockups conditionally reschedule */ + list_for_each_entry_safe(sks, m, &sks_list, sks_list) { kv_free(skc, sks, skc->skc_slab_size); + cond_resched(); + } EXIT; } @@ -937,11 +953,11 @@ spl_cache_age(void *data) spl_get_work_data(data, spl_kmem_cache_t, skc_work.work); ASSERT(skc->skc_magic == SKC_MAGIC); - spl_on_each_cpu(spl_magazine_age, skc, 1); - spl_slab_reclaim(skc, 0); + spl_slab_reclaim(skc, skc->skc_reap, 0); + spl_on_each_cpu(spl_magazine_age, skc, 0); if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) - schedule_delayed_work(&skc->skc_work, 2 * skc->skc_delay * HZ); + schedule_delayed_work(&skc->skc_work, skc->skc_delay / 3 * HZ); } /* @@ -1057,49 +1073,47 @@ spl_magazine_free(spl_kmem_magazine_t *skm) EXIT; } -static void -__spl_magazine_create(void *data) -{ - spl_kmem_cache_t *skc = data; - int id = smp_processor_id(); - - skc->skc_mag[id] = spl_magazine_alloc(skc, cpu_to_node(id)); - ASSERT(skc->skc_mag[id]); -} - /* * Create all pre-cpu magazines of reasonable sizes. */ static int spl_magazine_create(spl_kmem_cache_t *skc) { + int i; ENTRY; skc->skc_mag_size = spl_magazine_size(skc); skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; - spl_on_each_cpu(__spl_magazine_create, skc, 1); + + for_each_online_cpu(i) { + skc->skc_mag[i] = spl_magazine_alloc(skc, cpu_to_node(i)); + if (!skc->skc_mag[i]) { + for (i--; i >= 0; i--) + spl_magazine_free(skc->skc_mag[i]); + + RETURN(-ENOMEM); + } + } RETURN(0); } -static void -__spl_magazine_destroy(void *data) -{ - spl_kmem_cache_t *skc = data; - spl_kmem_magazine_t *skm = skc->skc_mag[smp_processor_id()]; - - (void)spl_cache_flush(skc, skm, skm->skm_avail); - spl_magazine_free(skm); -} - /* * Destroy all pre-cpu magazines. */ static void spl_magazine_destroy(spl_kmem_cache_t *skc) { + spl_kmem_magazine_t *skm; + int i; ENTRY; - spl_on_each_cpu(__spl_magazine_destroy, skc, 1); + + for_each_online_cpu(i) { + skm = skc->skc_mag[i]; + (void)spl_cache_flush(skc, skm, skm->skm_avail); + spl_magazine_free(skm); + } + EXIT; } @@ -1168,6 +1182,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_size = size; skc->skc_obj_align = SPL_KMEM_CACHE_ALIGN; skc->skc_delay = SPL_KMEM_CACHE_DELAY; + skc->skc_reap = SPL_KMEM_CACHE_REAP; atomic_set(&skc->skc_ref, 0); INIT_LIST_HEAD(&skc->skc_list); @@ -1209,7 +1224,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, GOTO(out, rc); spl_init_delayed_work(&skc->skc_work, spl_cache_age, skc); - schedule_delayed_work(&skc->skc_work, 2 * skc->skc_delay * HZ); + schedule_delayed_work(&skc->skc_work, skc->skc_delay / 3 * HZ); down_write(&spl_kmem_cache_sem); list_add_tail(&skc->skc_list, &spl_kmem_cache_list); @@ -1249,7 +1264,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) wait_event(wq, atomic_read(&skc->skc_ref) == 0); spl_magazine_destroy(skc); - spl_slab_reclaim(skc, 1); + spl_slab_reclaim(skc, 0, 1); spin_lock(&skc->skc_lock); /* Validate there are no objects in use and free all the @@ -1654,7 +1669,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) if (skc->skc_reclaim) skc->skc_reclaim(skc->skc_private); - spl_slab_reclaim(skc, 0); + spl_slab_reclaim(skc, skc->skc_reap, 0); clear_bit(KMC_BIT_REAPING, &skc->skc_flags); atomic_dec(&skc->skc_ref); From f6c5d4ff88937fd69c938e0bc6ea11ad541e0a48 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 12 Feb 2009 14:45:22 -0800 Subject: [PATCH 0235/1062] Build system update - Added default build flags: -Wall -Wstrict-prototypes -Werror -Wshadow - Added missing Makefile's for include/ subdirectories. --- cmd/Makefile.am | 6 +- cmd/Makefile.in | 11 +- config/Rules.am | 4 + configure | 12 +- configure.ac | 34 +++- include/Makefile.am | 4 +- include/Makefile.in | 4 +- include/asm/Makefile.am | 1 + include/asm/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/fs/Makefile.am | 1 + include/fs/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/linux/Makefile.am | 1 + include/linux/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/rpc/Makefile.am | 1 + include/rpc/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/sharefs/Makefile.am | 1 + include/sharefs/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/sys/Makefile.am | 8 +- include/sys/Makefile.in | 222 +++++++++++++++++--- include/sys/fm/Makefile.am | 1 + include/sys/fm/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/sys/fs/Makefile.am | 1 + include/sys/fs/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/sys/sysevent/Makefile.am | 1 + include/sys/sysevent/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/util/Makefile.am | 1 + include/util/Makefile.in | 334 +++++++++++++++++++++++++++++++ include/vm/Makefile.am | 1 + include/vm/Makefile.in | 334 +++++++++++++++++++++++++++++++ lib/Makefile.am | 3 +- lib/Makefile.in | 11 +- libtool | 20 +- 32 files changed, 3613 insertions(+), 76 deletions(-) create mode 100644 config/Rules.am create mode 100644 include/asm/Makefile.am create mode 100644 include/asm/Makefile.in create mode 100644 include/fs/Makefile.am create mode 100644 include/fs/Makefile.in create mode 100644 include/linux/Makefile.am create mode 100644 include/linux/Makefile.in create mode 100644 include/rpc/Makefile.am create mode 100644 include/rpc/Makefile.in create mode 100644 include/sharefs/Makefile.am create mode 100644 include/sharefs/Makefile.in create mode 100644 include/sys/fm/Makefile.am create mode 100644 include/sys/fm/Makefile.in create mode 100644 include/sys/fs/Makefile.am create mode 100644 include/sys/fs/Makefile.in create mode 100644 include/sys/sysevent/Makefile.am create mode 100644 include/sys/sysevent/Makefile.in create mode 100644 include/util/Makefile.am create mode 100644 include/util/Makefile.in create mode 100644 include/vm/Makefile.am create mode 100644 include/vm/Makefile.in diff --git a/cmd/Makefile.am b/cmd/Makefile.am index 3d1a39297..5658d06c4 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -1,5 +1,7 @@ -DEFAULT_INCLUDES = -I. -I.. -I../lib -AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow -D__USE_LARGEFILE64 +include $(top_srcdir)/config/Rules.am + +DEFAULT_INCLUDES += \ + -I${top_srcdir}/lib sbin_PROGRAMS = spl splat diff --git a/cmd/Makefile.in b/cmd/Makefile.in index e31c3bdcd..48d44a2b4 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -37,9 +37,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/config/Rules.am sbin_PROGRAMS = spl$(EXEEXT) splat$(EXEEXT) subdir = cmd -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -191,8 +192,9 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -DEFAULT_INCLUDES = -I. -I.. -I../lib -AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow -D__USE_LARGEFILE64 +DEFAULT_INCLUDES = -I${top_srcdir} -I${top_srcdir}/lib +AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ + -D__USE_LARGEFILE64 spl_SOURCES = spl.c splat_SOURCES = splat.c splat_LDFLAGS = $(top_builddir)/lib/libcommon.la @@ -201,7 +203,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/Rules.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -354,6 +356,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/../config @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/config/Rules.am b/config/Rules.am new file mode 100644 index 000000000..255fa6c1b --- /dev/null +++ b/config/Rules.am @@ -0,0 +1,4 @@ +DEFAULT_INCLUDES = -I${top_srcdir} + +AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow +AM_CFLAGS += -D__USE_LARGEFILE64 diff --git a/configure b/configure index 21e222de4..8eaed0697 100755 --- a/configure +++ b/configure @@ -20651,7 +20651,7 @@ fi - ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile include/sys/Makefile scripts/Makefile scripts/spl.spec" + ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile include/asm/Makefile include/fs/Makefile include/linux/Makefile include/rpc/Makefile include/sharefs/Makefile include/sys/Makefile include/sys/fm/Makefile include/sys/fs/Makefile include/sys/sysevent/Makefile include/util/Makefile include/vm/Makefile scripts/Makefile scripts/spl.spec" cat >confcache <<\_ACEOF @@ -21224,7 +21224,17 @@ do "module/spl/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;; "module/splat/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/asm/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/asm/Makefile" ;; + "include/fs/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/fs/Makefile" ;; + "include/linux/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/linux/Makefile" ;; + "include/rpc/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/rpc/Makefile" ;; + "include/sharefs/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sharefs/Makefile" ;; "include/sys/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;; + "include/sys/fm/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/fm/Makefile" ;; + "include/sys/fs/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/fs/Makefile" ;; + "include/sys/sysevent/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/sysevent/Makefile" ;; + "include/util/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/util/Makefile" ;; + "include/vm/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/vm/Makefile" ;; "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "scripts/spl.spec" ) CONFIG_FILES="$CONFIG_FILES scripts/spl.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; diff --git a/configure.ac b/configure.ac index 259c4e892..385fdcdfb 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,7 @@ TOPDIR=`/bin/pwd` # Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build KERNELMAKE_PARAMS= KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" +KERNELCPPFLAGS="${KERNELCPPFLAGS} -Wstrict-prototypes -Werror -Wshadow" if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" @@ -88,16 +89,27 @@ AC_SUBST(KERNELMAKE_PARAMS) AC_SUBST(KERNELCPPFLAGS) AC_SUBST(KERNELCFLAGS) -AC_CONFIG_FILES([ Makefile - lib/Makefile - cmd/Makefile - module/Makefile - module/spl/Makefile - module/splat/Makefile - include/Makefile - include/sys/Makefile - scripts/Makefile - scripts/spl.spec - ]) +AC_CONFIG_FILES([ + Makefile + lib/Makefile + cmd/Makefile + module/Makefile + module/spl/Makefile + module/splat/Makefile + include/Makefile + include/asm/Makefile + include/fs/Makefile + include/linux/Makefile + include/rpc/Makefile + include/sharefs/Makefile + include/sys/Makefile + include/sys/fm/Makefile + include/sys/fs/Makefile + include/sys/sysevent/Makefile + include/util/Makefile + include/vm/Makefile + scripts/Makefile + scripts/spl.spec +]) AC_OUTPUT diff --git a/include/Makefile.am b/include/Makefile.am index 161a93a8d..de6312f1e 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = sys +SUBDIRS = asm linux rpc sys util fs sharefs vm -EXTRA_DIST = splat-ctl.h +EXTRA_DIST = *.h diff --git a/include/Makefile.in b/include/Makefile.in index acbd552fa..10f3779fe 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -177,8 +177,8 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -SUBDIRS = sys -EXTRA_DIST = splat-ctl.h +SUBDIRS = asm linux rpc sys util fs sharefs vm +EXTRA_DIST = *.h all: all-recursive .SUFFIXES: diff --git a/include/asm/Makefile.am b/include/asm/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/asm/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/asm/Makefile.in b/include/asm/Makefile.in new file mode 100644 index 000000000..4a73cd9a2 --- /dev/null +++ b/include/asm/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/asm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/asm/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/asm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/fs/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/fs/Makefile.in b/include/fs/Makefile.in new file mode 100644 index 000000000..a2a857588 --- /dev/null +++ b/include/fs/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/fs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/fs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/fs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/linux/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in new file mode 100644 index 000000000..95193ff7e --- /dev/null +++ b/include/linux/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/linux +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/linux/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/linux/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/rpc/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/rpc/Makefile.in b/include/rpc/Makefile.in new file mode 100644 index 000000000..bb4d3fb6e --- /dev/null +++ b/include/rpc/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/rpc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/rpc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/rpc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/sharefs/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/sharefs/Makefile.in b/include/sharefs/Makefile.in new file mode 100644 index 000000000..903fa8f26 --- /dev/null +++ b/include/sharefs/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/sharefs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sharefs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/sharefs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 2eda85688..8fdb5afef 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -1,5 +1,3 @@ -EXTRA_DIST = callb.h cmn_err.h condvar.h cred.h -EXTRA_DIST += debug.h kmem.h kstat.h -EXTRA_DIST += mutex.h param.h random.h rwlock.h -EXTRA_DIST += taskq.h thread.h time.h -EXTRA_DIST += timer.h types.h +SUBDIRS = fm fs sysevent + +EXTRA_DIST = *.h diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index d03422b0f..7b0b4e9f1 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -48,6 +48,15 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -168,10 +177,9 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = callb.h cmn_err.h condvar.h cred.h debug.h kmem.h kstat.h \ - mutex.h param.h random.h rwlock.h taskq.h thread.h time.h \ - timer.h types.h -all: all-am +SUBDIRS = fm fs sysevent +EXTRA_DIST = *.h +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -213,12 +221,138 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,19 +381,35 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -275,21 +425,22 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -297,39 +448,44 @@ install-data-am: install-exec-am: -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive distclean distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-libtool \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/sys/fm/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in new file mode 100644 index 000000000..c0634e12b --- /dev/null +++ b/include/sys/fm/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/sys/fm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/fm/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/sys/fm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/sys/fs/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in new file mode 100644 index 000000000..7c27a21ad --- /dev/null +++ b/include/sys/fs/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/sys/fs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/fs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/sys/fs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/sys/sysevent/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/sys/sysevent/Makefile.in b/include/sys/sysevent/Makefile.in new file mode 100644 index 000000000..9b208a155 --- /dev/null +++ b/include/sys/sysevent/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/sys/sysevent +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/sysevent/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/sys/sysevent/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/util/Makefile.am b/include/util/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/util/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/util/Makefile.in b/include/util/Makefile.in new file mode 100644 index 000000000..570b7c271 --- /dev/null +++ b/include/util/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/util +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/util/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/util/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am new file mode 100644 index 000000000..379c0ba79 --- /dev/null +++ b/include/vm/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = *.h diff --git a/include/vm/Makefile.in b/include/vm/Makefile.in new file mode 100644 index 000000000..ffd9de73d --- /dev/null +++ b/include/vm/Makefile.in @@ -0,0 +1,334 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = include/vm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ + $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/spl_config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNELCFLAGS = @KERNELCFLAGS@ +KERNELCPPFLAGS = @KERNELCPPFLAGS@ +KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINUX = @LINUX@ +LINUX_OBJ = @LINUX_OBJ@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPL_META_ALIAS = @SPL_META_ALIAS@ +SPL_META_AUTHOR = @SPL_META_AUTHOR@ +SPL_META_DATA = @SPL_META_DATA@ +SPL_META_LT_AGE = @SPL_META_LT_AGE@ +SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ +SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ +SPL_META_NAME = @SPL_META_NAME@ +SPL_META_RELEASE = @SPL_META_RELEASE@ +SPL_META_VERSION = @SPL_META_VERSION@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kmoduledir = @kmoduledir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +EXTRA_DIST = *.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/vm/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/vm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/Makefile.am b/lib/Makefile.am index 24ba72913..0f2826bb2 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,5 +1,4 @@ -DEFAULT_INCLUDES = -I. -I.. -AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow +include $(top_srcdir)/config/Rules.am noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = list.c diff --git a/lib/Makefile.in b/lib/Makefile.in index e4097785b..76ac90bc9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -37,8 +37,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/config/Rules.am subdir = lib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -185,8 +186,9 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -DEFAULT_INCLUDES = -I. -I.. -AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow +DEFAULT_INCLUDES = -I${top_srcdir} +AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ + -D__USE_LARGEFILE64 noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = list.c EXTRA_DIST = list.h @@ -194,7 +196,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/Rules.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -323,6 +325,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/../config @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/libtool b/libtool index 8dde1f20c..ccefb3279 100755 --- a/libtool +++ b/libtool @@ -1,7 +1,7 @@ #! /bin/sh # libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU spl 0.4.1) +# Generated automatically by (GNU spl 0.4.2) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host ilci: +# Libtool was configured on host thales: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -100,7 +100,7 @@ gcc_ver=`gcc -dumpversion` EGREP="grep -E" # The linker used to build libraries. -LD="/usr/local/bin/ld -m elf_x86_64" +LD="/usr/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -331,7 +331,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7266,7 +7266,7 @@ disable_libs=static # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host ilci: +# Libtool was configured on host thales: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7322,7 +7322,7 @@ gcc_ver=`gcc -dumpversion` EGREP="grep -E" # The linker used to build libraries. -LD="/usr/local/bin/ld -m elf_x86_64" +LD="/usr/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -7550,7 +7550,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7574,7 +7574,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host ilci: +# Libtool was configured on host thales: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7630,7 +7630,7 @@ gcc_ver=`gcc -dumpversion` EGREP="grep -E" # The linker used to build libraries. -LD="/usr/local/bin/ld -m elf_x86_64" +LD="/usr/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -7861,7 +7861,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/shmem/lib/shared /usr/lib64/mysql /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" From fce5ef8306f0413c1cede818fd6534c5b3dd1771 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 12 Feb 2009 15:04:36 -0800 Subject: [PATCH 0236/1062] Build system update - Added default build flags for kernel modules: -Wstrict-prototypes -Werror --- configure | 1 + configure.ac | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 8eaed0697..b0d5b8e58 100755 --- a/configure +++ b/configure @@ -20642,6 +20642,7 @@ TOPDIR=`/bin/pwd` # Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build KERNELMAKE_PARAMS= KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" +KERNELCPPFLAGS="${KERNELCPPFLAGS} -Wstrict-prototypes -Werror" if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" diff --git a/configure.ac b/configure.ac index 385fdcdfb..5329a1157 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,7 @@ TOPDIR=`/bin/pwd` # Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build KERNELMAKE_PARAMS= KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" -KERNELCPPFLAGS="${KERNELCPPFLAGS} -Wstrict-prototypes -Werror -Wshadow" +KERNELCPPFLAGS="${KERNELCPPFLAGS} -Wstrict-prototypes -Werror" if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" From 1a944a7d0b1d9e62c7ac34d9041300007a656a17 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 13 Feb 2009 10:28:55 -0800 Subject: [PATCH 0237/1062] kmem slab fixes - spl_slab_reclaim() 'continue' changed back to 'break' from commit 37db7d8cf9936e6d2851a4329c11efcd9f61305c. The original was correct, I have added a comment to ensure this does not happen again. - spl_slab_reclaim() further optimized by moving the destructor call in spl_slab_free() outside the skc->skc_lock. This minimizes the length of time the spin lock is held, allows the destructors to be invoked concurrently for different objects, and as a bonus makes it safe (although unwise) to sleep in the destructors. --- module/spl/spl-kmem.c | 72 +++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index d82d7b49f..ba7e19b4e 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -823,7 +823,6 @@ spl_slab_free(spl_kmem_slab_t *sks, struct list_head *sks_list, struct list_head *sko_list) { spl_kmem_cache_t *skc; - spl_kmem_obj_t *sko, *n; ENTRY; ASSERT(sks->sks_magic == SKS_MAGIC); @@ -833,23 +832,18 @@ spl_slab_free(spl_kmem_slab_t *sks, ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); + /* + * Update slab/objects counters in the cache, then remove the + * slab from the skc->skc_partial_list. Finally add the slab + * and all its objects in to the private work lists where the + * destructors will be called and the memory freed to the system. + */ skc->skc_obj_total -= sks->sks_objs; skc->skc_slab_total--; list_del(&sks->sks_list); - - /* Run destructors slab is being released */ - list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) { - ASSERT(sko->sko_magic == SKO_MAGIC); - list_del(&sko->sko_list); - - if (skc->skc_dtor) - skc->skc_dtor(sko->sko_addr, skc->skc_private); - - if (skc->skc_flags & KMC_OFFSLAB) - list_add(&sko->sko_list, sko_list); - } - list_add(&sks->sks_list, sks_list); + list_splice_init(&sks->sks_free_list, sko_list); + EXIT; } @@ -868,27 +862,26 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) spl_kmem_obj_t *sko, *n; LIST_HEAD(sks_list); LIST_HEAD(sko_list); - int size, i = 0; + int size = 0, i = 0; ENTRY; /* * Move empty slabs and objects which have not been touched in * skc_delay seconds on to private lists to be freed outside - * the spin lock. This delay time is important to avoid - * thrashing however when flag is set the delay will not be - * used. Empty slabs will be at the end of the skc_partial_list. + * the spin lock. This delay time is important to avoid thrashing + * however when flag is set the delay will not be used. */ spin_lock(&skc->skc_lock); - list_for_each_entry_safe_reverse(sks, m, &skc->skc_partial_list, - sks_list) { - /* Release at most count slabs */ - if (count && i > count) + list_for_each_entry_safe_reverse(sks,m,&skc->skc_partial_list,sks_list){ + /* + * All empty slabs are at the end of skc->skc_partial_list, + * therefore once a non-empty slab is found we can stop + * scanning. Additionally, stop when reaching the target + * reclaim 'count' if a non-zero threshhold is given. + */ + if ((sks->sks_ref > 0) || (count && i > count)) break; - /* Skip active slabs */ - if (sks->sks_ref > 0) - continue; - if (time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)||flag) { spl_slab_free(sks, &sks_list, &sko_list); i++; @@ -897,24 +890,31 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) spin_unlock(&skc->skc_lock); /* - * We only have list of spl_kmem_obj_t's if they are located off - * the slab, otherwise they get feed with the spl_kmem_slab_t. + * The following two loops ensure all the object destructors are + * run, any offslab objects are freed, and the slabs themselves + * are freed. This is all done outside the skc->skc_lock since + * this allows the destructor to sleep, and allows us to perform + * a conditional reschedule when a freeing a large number of + * objects and slabs back to the system. */ - if (!list_empty(&sko_list)) { - ASSERT(skc->skc_flags & KMC_OFFSLAB); - + if (skc->skc_flags & KMC_OFFSLAB) size = P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) + P2ROUNDUP(sizeof(spl_kmem_obj_t), skc->skc_obj_align); - /* To avoid soft lockups conditionally reschedule */ - list_for_each_entry_safe(sko, n, &sko_list, sko_list) { + list_for_each_entry_safe(sko, n, &sko_list, sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + + if (skc->skc_dtor) + skc->skc_dtor(sko->sko_addr, skc->skc_private); + + if (skc->skc_flags & KMC_OFFSLAB) kv_free(skc, sko->sko_addr, size); - cond_resched(); - } + + cond_resched(); } - /* To avoid soft lockups conditionally reschedule */ list_for_each_entry_safe(sks, m, &sks_list, sks_list) { + ASSERT(sks->sks_magic == SKS_MAGIC); kv_free(skc, sks, skc->skc_slab_size); cond_resched(); } From 9b1b8e4c2459a02fc230cdda65b13908f263fd36 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Feb 2009 15:52:18 -0800 Subject: [PATCH 0238/1062] kmem slab magazine ageing deadlock - The previous magazine ageing sceme relied on the on_each_cpu() function to call spl_magazine_age() on each cpu. It turns out this could deadlock with do_flush_tlb_all() which also relies on the IPI based on_each_cpu(). To avoid this problem a per- magazine delayed work item is created and indepentantly scheduled to the correct cpu removing the need for on_each_cpu(). - Additionally two unused fields were removed from the type spl_kmem_cache_t, they were hold overs from previous cleanup. - struct work_struct work - struct timer_list timer --- include/sys/kmem.h | 6 +++--- module/spl/spl-kmem.c | 28 ++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index dc66a9153..cad652c91 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -250,10 +250,12 @@ typedef void (*spl_kmem_dtor_t)(void *, void *); typedef void (*spl_kmem_reclaim_t)(void *); typedef struct spl_kmem_magazine { - uint32_t skm_magic; /* Sanity magic */ + uint32_t skm_magic; /* Sanity magic */ uint32_t skm_avail; /* Available objects */ uint32_t skm_size; /* Magazine size */ uint32_t skm_refill; /* Batch refill size */ + struct spl_kmem_cache *skm_cache; /* Owned by cache */ + struct delayed_work skm_work; /* Magazine reclaim work */ unsigned long skm_age; /* Last cache access */ void *skm_objs[0]; /* Object pointers */ } spl_kmem_magazine_t; @@ -296,8 +298,6 @@ typedef struct spl_kmem_cache { uint32_t skc_reap; /* Slab reclaim count */ atomic_t skc_ref; /* Ref count callers */ struct delayed_work skc_work; /* Slab reclaim work */ - struct work_struct work; - struct timer_list timer; struct list_head skc_list; /* List of caches linkage */ struct list_head skc_complete_list;/* Completely alloc'ed */ struct list_head skc_partial_list; /* Partially alloc'ed */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index ba7e19b4e..18613e799 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -932,12 +932,22 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) static void spl_magazine_age(void *data) { - spl_kmem_cache_t *skc = data; - spl_kmem_magazine_t *skm = skc->skc_mag[smp_processor_id()]; + spl_kmem_magazine_t *skm = + spl_get_work_data(data, spl_kmem_magazine_t, skm_work.work); + spl_kmem_cache_t *skc = skm->skm_cache; + int i = smp_processor_id(); + + ASSERT(skm->skm_magic == SKM_MAGIC); + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skc->skc_mag[i] == skm); if (skm->skm_avail > 0 && time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) (void)spl_cache_flush(skc, skm, skm->skm_refill); + + if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) + schedule_delayed_work_on(i, &skm->skm_work, + skc->skc_delay / 3 * HZ); } /* @@ -949,12 +959,11 @@ spl_magazine_age(void *data) static void spl_cache_age(void *data) { - spl_kmem_cache_t *skc = + spl_kmem_cache_t *skc = spl_get_work_data(data, spl_kmem_cache_t, skc_work.work); ASSERT(skc->skc_magic == SKC_MAGIC); spl_slab_reclaim(skc, skc->skc_reap, 0); - spl_on_each_cpu(spl_magazine_age, skc, 0); if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) schedule_delayed_work(&skc->skc_work, skc->skc_delay / 3 * HZ); @@ -1050,6 +1059,8 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) skm->skm_avail = 0; skm->skm_size = skc->skc_mag_size; skm->skm_refill = skc->skc_mag_refill; + skm->skm_cache = skc; + spl_init_delayed_work(&skm->skm_work, spl_magazine_age, skm); skm->skm_age = jiffies; } @@ -1095,6 +1106,11 @@ spl_magazine_create(spl_kmem_cache_t *skc) } } + /* Only after everything is allocated schedule magazine work */ + for_each_online_cpu(i) + schedule_delayed_work_on(i, &skc->skc_mag[i]->skm_work, + skc->skc_delay / 3 * HZ); + RETURN(0); } @@ -1245,6 +1261,7 @@ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { DECLARE_WAIT_QUEUE_HEAD(wq); + int i; ENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -1256,6 +1273,9 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) /* Cancel any and wait for any pending delayed work */ ASSERT(!test_and_set_bit(KMC_BIT_DESTROY, &skc->skc_flags)); cancel_delayed_work(&skc->skc_work); + for_each_online_cpu(i) + cancel_delayed_work(&skc->skc_mag[i]->skm_work); + flush_scheduled_work(); /* Wait until all current callers complete, this is mainly From 014b1d6f54dc7236a7572533f9e72ec459f1abd4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Feb 2009 16:24:26 -0800 Subject: [PATCH 0239/1062] Coverity 9641: Buffer Size When SPLAT_TEST_INIT() initialized SPLAT_KMEM_TEST11_NAME the short short test name overran the static length buffer of SPLAT_NAME_SIZE. This was fixed by increasing the buffer length from 16 to 20 bytes. --- include/splat-ctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/splat-ctl.h b/include/splat-ctl.h index d5ce6ab9a..82d5c0b50 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -36,7 +36,7 @@ #define SPLAT_NAME "splatctl" #define SPLAT_DEV "/dev/splatctl" -#define SPLAT_NAME_SIZE 16 +#define SPLAT_NAME_SIZE 20 #define SPLAT_DESC_SIZE 60 typedef struct splat_user { From 15dc8b072e77cf69b36e3df94782af4801d5e8cc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Feb 2009 16:30:58 -0800 Subject: [PATCH 0240/1062] Coverity 9652, 9653: No Effect Removed 2 ASSERT()s which had no effect because by definition size_t is always an unsigned type thus is always >= 0. --- include/sys/random.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/sys/random.h b/include/sys/random.h index de386b634..2e206ccae 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -43,7 +43,6 @@ extern "C" { static __inline__ int random_get_bytes(uint8_t *ptr, size_t len) { - ASSERT(len >= 0); get_random_bytes((void *)ptr,(int)len); return 0; } @@ -52,7 +51,6 @@ random_get_bytes(uint8_t *ptr, size_t len) static __inline__ int random_get_pseudo_bytes(uint8_t *ptr, size_t len) { - ASSERT(len >= 0); get_random_bytes((void *)ptr,(int)len); return 0; } From bb01879ebe5ba5d8e2c2177d3b1ce0272c17ce07 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Feb 2009 16:41:08 -0800 Subject: [PATCH 0241/1062] Coverity 9654, 9654: Use After Free Because vmem_free() was implemented as a macro using the ',' operator to evaluate both arguments and we performed the free before evaluating size we would deference the free'd pointer. To resolve the problem we just invert the ordering and evaluate size first just as if it was evaluated by the caller when being passed to this function. This ensure that if the caller is doing something reckless like performing an assignment as part of the size argument we still perform it and it simply doesn't get removed by the macro. Oh course nobody should be doing this sort of thing, but just in case. --- include/sys/kmem.h | 2 +- libtool | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index cad652c91..278039ec9 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -147,7 +147,7 @@ extern void vmem_free_debug(void *ptr, size_t size); memset(_ptr_, 0, (size)); \ _ptr_; \ }) -# define vmem_free(ptr, size) (vfree(ptr), (void)(size)) +# define vmem_free(ptr, size) ((void)(size), vfree(ptr)) #endif /* DEBUG_KMEM */ diff --git a/libtool b/libtool index ccefb3279..aeb8ab787 100755 --- a/libtool +++ b/libtool @@ -331,7 +331,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7550,7 +7550,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7861,7 +7861,7 @@ link_all_deplibs=unknown sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" From 1315c884379965af367d1a38c695f73ad7d6e0c1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 18 Feb 2009 09:48:07 -0800 Subject: [PATCH 0242/1062] Coverity 9649, 9650, 9651: Uninit This check was originally added to detect double initializations of mutex types (which it did find). Unfortunately, Coverity is right that there is a very small chance we could trigger the assertion by accident because an uninitialized stack variable happens to contain the mutex magic. This is particularly unlikely since we do poison the mutexs when destroyed but still possible. Therefore I'm simply removing the assertion. --- module/spl/spl-mutex.c | 1 - 1 file changed, 1 deletion(-) diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index e7ec41cf4..f0389f5d1 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -67,7 +67,6 @@ __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) ASSERT(mp); ASSERT(name); ASSERT(ibc == NULL); - ASSERT(mp->km_magic != KM_MAGIC); /* Never double init */ mp->km_name = NULL; mp->km_name_size = strlen(name) + 1; From 02c7f164946e86048721a8c1af6ada3f25c3a78c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 18 Feb 2009 10:09:01 -0800 Subject: [PATCH 0243/1062] Coverity 9656: Forward NULL This was a false positive the callpath being walked is impossible because the splat_kmem_cache_test_kcp_alloc() function will ensure kcp->kcp_kcd[0] is initialized to NULL. However, there is no harm is making this explicit for the test case so I'm adding a line to clearly set it to correct the analysis. --- module/splat/splat-kmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index c57e280b0..35718e2f8 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -548,6 +548,7 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, return -ENOMEM; } + kcp->kcp_kcd[0] = NULL; kcp->kcp_cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, kcp->kcp_align, From 63a93055fb6cfddebe31c791f7df86b14942ca9d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 18 Feb 2009 10:16:26 -0800 Subject: [PATCH 0244/1062] Coverity 9657: Resource Leak Accidentally leaked list item li in error path. The fix is to adjust this error path to ensure the allocated list item which has not yet been added to the list gets freed. To do this we simply add a new goto label slightly earlier to use the existing cleanup logic and minimize the number of unique return points. --- module/splat/splat-list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index 464a45781..5a610cee4 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -380,7 +380,7 @@ splat_list_test7(struct file *file, void *arg) "list node should inactive %p/%p\n", li->li_node.prev, li->li_node.next); rc = -EINVAL; - goto out; + goto out_li; } /* Validate node is active when linked in to a list */ @@ -403,7 +403,7 @@ splat_list_test7(struct file *file, void *arg) li->li_node.prev, li->li_node.next); rc = -EINVAL; } - +out_li: kmem_free(li, sizeof(list_item_t)); out: /* Remove all items */ From 99639e4a13306c3809b52e487d4343d756fad2e2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 19 Feb 2009 11:26:17 -0800 Subject: [PATCH 0245/1062] Add zone_get_hostid() function Minimal support added for the zone_get_hostid() function. Only global zones are supported therefore this function must be called with a NULL argumment. Additionally, I've added the HW_HOSTID_LEN define and updated all instances where a hard coded magic value of 11 was used; "A good riddance of bad rubbish!" --- include/sys/proc.h | 1 + include/sys/sysmacros.h | 1 + include/sys/systeminfo.h | 5 +++++ module/spl/spl-generic.c | 18 +++++++++++++++++- module/spl/spl-proc.c | 3 ++- 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/include/sys/proc.h b/include/sys/proc.h index ab2425ce8..a4b1da55a 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 03e72a145..923cc22e7 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -143,6 +143,7 @@ extern int p0; /* Missing misc functions */ extern int highbit(unsigned long i); +extern uint32_t zone_get_hostid(void *zone); #define makedevice(maj,min) makedev(maj,min) diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index e297f2a5a..0e8934554 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -1,4 +1,9 @@ #ifndef _SPL_SYSTEMINFO_H #define _SPL_SYSTEMINFO_H +#define HW_INVALID_HOSTID 0xFFFFFFFF /* an invalid hostid */ +#define HW_HOSTID_LEN 11 /* minimum buffer size needed */ + /* to hold a decimal or hex */ + /* hostid string */ + #endif /* SPL_SYSTEMINFO_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index a15cac41e..96a14c62e 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -25,6 +25,7 @@ */ #include +#include #include #include #include @@ -47,7 +48,7 @@ char spl_version[16] = "SPL v" VERSION; long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); -char hw_serial[11] = ""; +char hw_serial[HW_HOSTID_LEN] = ""; EXPORT_SYMBOL(hw_serial); int p0 = 0; @@ -253,6 +254,21 @@ set_hostid(void) return call_usermodehelper(sh_path, argv, envp, 1); } +uint32_t +zone_get_hostid(void *zone) +{ + unsigned long hostid; + + /* Only the global zone is supported */ + ASSERT(zone == NULL); + + if (ddi_strtoul(hw_serial, NULL, HW_HOSTID_LEN-1, &hostid) != 0) + return HW_INVALID_HOSTID; + + return (uint32_t)hostid; +} +EXPORT_SYMBOL(zone_get_hostid); + static int __init spl_init(void) { int rc = 0; diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 1ae1c129a..90c89ce31 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -470,7 +470,8 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, RETURN(-EINVAL); spl_hostid = (long)val; - (void)snprintf(hw_serial, 11, "%u", (val >= 0) ? val : -val); + (void)snprintf(hw_serial, HW_HOSTID_LEN-1, "%u", + (val >= 0) ? val : -val); *ppos += *lenp; } else { len = snprintf(str, sizeof(str), "%lx", spl_hostid); From a1cf80b493137b00d9111d4d15405a12237ea9bd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 19 Feb 2009 12:28:10 -0800 Subject: [PATCH 0246/1062] Matching kmem_free() fix for use after free case. See commit bb01879ebe5ba5d8e2c2177d3b1ce0272c17ce07 for a full description. This issue should have been addressed in the same commit but it slipped my mind. --- include/sys/kmem.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 278039ec9..318cf5ee8 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -126,9 +126,9 @@ extern void vmem_free_debug(void *ptr, size_t size); #else /* DEBUG_KMEM */ -# define kmem_alloc(size, flags) kmalloc((size), (flags)) -# define kmem_zalloc(size, flags) kzalloc((size), (flags)) -# define kmem_free(ptr, size) (kfree(ptr), (void)(size)) +# define kmem_alloc(size, flags) kmalloc((size), (flags)) +# define kmem_zalloc(size, flags) kzalloc((size), (flags)) +# define kmem_free(ptr, size) ((void)(size), kfree(ptr)) # ifdef HAVE_KMALLOC_NODE # define kmem_alloc_node(size, flags, node) \ @@ -138,8 +138,8 @@ extern void vmem_free_debug(void *ptr, size_t size); kmalloc((size), (flags)) # endif -# define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ - __GFP_HIGHMEM), PAGE_KERNEL) +# define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ + __GFP_HIGHMEM), PAGE_KERNEL) # define vmem_zalloc(size, flags) \ ({ \ void *_ptr_ = __vmalloc((size),((flags)|__GFP_HIGHMEM),PAGE_KERNEL); \ From 4327ac3ff93b7aa47d20c184d34fb1f2202b7ab5 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Sun, 22 Feb 2009 03:35:51 +0000 Subject: [PATCH 0247/1062] Changed z_compress_level() and z_uncompress() prototypes to match the ones in Solaris. Fixes compilation warning. --- include/sys/zmod.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/sys/zmod.h b/include/sys/zmod.h index 428904ea7..bc901b346 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -48,8 +48,8 @@ * Z_STREAM_ERROR if the level parameter is invalid. */ static __inline__ int -z_compress_level(Byte *dest, uLong *destLen, const Byte *source, - uLong sourceLen, int level) +z_compress_level(void *dest, size_t *destLen, const void *source, + size_t sourceLen, int level) { z_stream stream; int err; @@ -58,13 +58,13 @@ z_compress_level(Byte *dest, uLong *destLen, const Byte *source, stream.avail_in = (uInt)sourceLen; #ifdef MAXSEG_64K /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) + if ((size_t)stream.avail_in != sourceLen) return Z_BUF_ERROR; #endif stream.next_out = dest; stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) + if ((size_t)stream.avail_out != *destLen) return Z_BUF_ERROR; err = zlib_deflateInit(&stream, level); @@ -98,7 +98,7 @@ z_compress_level(Byte *dest, uLong *destLen, const Byte *source, * buffer, or Z_DATA_ERROR if the input data was corrupted. */ static __inline__ int -z_uncompress(Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen) +z_uncompress(void *dest, size_t *destLen, const void *source, size_t sourceLen) { z_stream stream; int err; @@ -106,13 +106,13 @@ z_uncompress(Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen) stream.next_in = (Byte *)source; stream.avail_in = (uInt)sourceLen; /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) + if ((size_t)stream.avail_in != sourceLen) return Z_BUF_ERROR; stream.next_out = dest; stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) + if ((size_t)stream.avail_out != *destLen) return Z_BUF_ERROR; err = zlib_inflateInit(&stream); From 7819a92a9bb9e1bc5dd9f50bc644baf39f2946c9 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Sun, 22 Feb 2009 03:05:40 +0000 Subject: [PATCH 0248/1062] Added btop() and moved ptob() to include/sys/param.h. --- include/sys/param.h | 4 ++++ include/sys/vmsystm.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/sys/param.h b/include/sys/param.h index f924006ef..d6b4f761f 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -1,4 +1,8 @@ #ifndef _SPL_PARAM_H #define _SPL_PARAM_H +/* Pages to bytes and back */ +#define ptob(pages) (pages * PAGE_SIZE) +#define btop(bytes) (bytes / PAGE_SIZE) + #endif /* SPL_PARAM_H */ diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 75ae8a991..c75d447d9 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -40,7 +40,6 @@ * memory state and not as direct evidence that page reclaimation * is or is not currently in progress. */ -#define ptob(pages) (pages * PAGE_SIZE) #define membar_producer() smp_wmb() #define physmem num_physpages From eb7c7f44e8b7630f027cf92e0490062428f7fced Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Wed, 25 Feb 2009 21:06:15 +0000 Subject: [PATCH 0249/1062] Changed ptob()/btop() mult/div into bit shifts. Added necessary include for PAGE_SHIFT. --- include/sys/param.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/sys/param.h b/include/sys/param.h index d6b4f761f..dbcdb6e9c 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -1,8 +1,10 @@ #ifndef _SPL_PARAM_H #define _SPL_PARAM_H +#include + /* Pages to bytes and back */ -#define ptob(pages) (pages * PAGE_SIZE) -#define btop(bytes) (bytes / PAGE_SIZE) +#define ptob(pages) (pages << PAGE_SHIFT) +#define btop(bytes) (bytes >> PAGE_SHIFT) #endif /* SPL_PARAM_H */ From d1ff2312b05852d2190afd1da216b4e0e1b0c7d4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 25 Feb 2009 13:20:40 -0800 Subject: [PATCH 0250/1062] Linux VM Integration Cleanup Remove all instances of functions being reimplemented in the SPL. When the prototypes are available in the linux headers but the function address itself is not exported use kallsyms_lookup_name() to find the address. The function name itself can them become a define which calls a function pointer. This is preferable to reimplementing the function in the SPL because it ensures we get the correct version of the function for the running kernel. This is actually pretty safe because the prototype is defined in the headers so we know we are calling the function properly. This patch also includes a rhel5 kernel patch we exports the needed symbols so we don't need to use kallsyms_lookup_name(). There are autoconf checks to detect if the symbol is exported and if so to use it directly. We should add patches for stock upstream kernels as needed if for no other reason than so we can easily track which additional symbols we needed exported. Those patches can also be used by anyone willing to rebuild their kernel, but this should not be a requirement. The rhel5 version of the export-symbols patch has been applied to the chaos kernel. Additional fixes: 1) Implement vmem_size() function using get_vmalloc_info() 2) SPL_CHECK_SYMBOL_EXPORT macro updated to use $LINUX_OBJ instead of $LINUX because Module.symvers is a build product. When $LINUX_OBJ != $LINUX we will not properly detect exported symbols. 3) SPL_LINUX_COMPILE_IFELSE macro updated to add include2 and $LINUX/include search paths to allow proper compilation when the kernel target build directory is not the source directory. --- config/spl-build.m4 | 41 +++++-- configure | 154 +++++++++++++++++++------ configure.ac | 2 + include/linux/kallsyms_compat.h | 17 +++ include/sys/kmem.h | 1 + include/sys/types.h | 1 + include/sys/vmsystm.h | 65 ++++++++++- module/spl/spl-generic.c | 43 +++++++ module/spl/spl-kmem.c | 147 +++++++++++------------ module/spl/spl-proc.c | 57 +++++++++ patches/16kstack-x86_64.patch | 13 --- patches/rhel5-spl-export-symbols.patch | 91 +++++++++++++++ patches/task-curr-export.patch | 12 -- spl_config.h.in | 6 + 14 files changed, 504 insertions(+), 146 deletions(-) create mode 100644 include/linux/kallsyms_compat.h delete mode 100644 patches/16kstack-x86_64.patch create mode 100644 patches/rhel5-spl-export-symbols.patch delete mode 100644 patches/task-curr-export.patch diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 5ee615bf8..a90fb6170 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -221,8 +221,8 @@ AC_DEFUN([SPL_LINUX_COMPILE_IFELSE], [ m4_ifvaln([$1], [SPL_LINUX_CONFTEST([$1])])dnl rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -dnl AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" -f $PWD/build/Makefile LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM SUBDIRS=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], -AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], +dnl AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" -f $PWD/build/Makefile LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM SUBDIRS=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], +AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], [$4], [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])dnl])dnl @@ -268,12 +268,12 @@ dnl # check symbol exported or not dnl # AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], [AC_MSG_CHECKING([whether symbol $1 is exported]) - grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in $2; do - grep -q -E "EXPORT_SYMBOL.*($1)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*($1)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -707,7 +707,32 @@ AC_DEFUN([SPL_AC_3ARGS_ON_EACH_CPU], [ ]) dnl # -dnl # Distro specific first_online_pgdat() symbol export. +dnl # 2.6.18 API change, +dnl # kallsyms_lookup_name no longer exported +dnl # +AC_DEFUN([SPL_AC_KALLSYMS_LOOKUP_NAME], [ + SPL_CHECK_SYMBOL_EXPORT( + [kallsyms_lookup_name], + [], + [AC_DEFINE(HAVE_KALLSYMS_LOOKUP_NAME, 1, + [kallsyms_lookup_name() is available])], + []) +]) + +dnl # +dnl # Symbol only available in custom kernels +dnl # +AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], [ + SPL_CHECK_SYMBOL_EXPORT( + [get_vmalloc_info], + [], + [AC_DEFINE(HAVE_GET_VMALLOC_INFO, 1, + [get_vmalloc_info() is available])], + []) +]) + +dnl # +dnl # Symbol only available in custom kernels dnl # AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ SPL_CHECK_SYMBOL_EXPORT( @@ -719,7 +744,7 @@ AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ ]) dnl # -dnl # Distro specific next_online_pgdat() symbol export. +dnl # Symbol only available in custom kernels dnl # AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ SPL_CHECK_SYMBOL_EXPORT( @@ -731,7 +756,7 @@ AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ ]) dnl # -dnl # Distro specific next_zone() symbol export. +dnl # Symbol only available in custom kernels dnl # AC_DEFUN([SPL_AC_NEXT_ZONE], [ SPL_CHECK_SYMBOL_EXPORT( @@ -743,7 +768,7 @@ AC_DEFUN([SPL_AC_NEXT_ZONE], [ ]) dnl # -dnl # Distro specific get_zone_counts() symbol export. +dnl # Symbol only available in custom kernels dnl # AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ SPL_CHECK_SYMBOL_EXPORT( diff --git a/configure b/configure index b0d5b8e58..d436b8a7c 100755 --- a/configure +++ b/configure @@ -19201,7 +19201,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19261,7 +19261,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19322,7 +19322,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19382,7 +19382,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19443,7 +19443,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19506,7 +19506,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19541,12 +19541,12 @@ rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest. echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]task_curr[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]task_curr[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in kernel/sched.c; do - grep -q -E "EXPORT_SYMBOL.*(task_curr)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(task_curr)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -19607,7 +19607,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19667,7 +19667,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19702,12 +19702,12 @@ rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest. echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]device_create[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]device_create[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in drivers/base/core.c; do - grep -q -E "EXPORT_SYMBOL.*(device_create)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(device_create)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -19741,12 +19741,12 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]class_device_create[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]class_device_create[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in drivers/base/class.c; do - grep -q -E "EXPORT_SYMBOL.*(class_device_create)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(class_device_create)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -19780,12 +19780,12 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in kernel/time.c; do - grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -19845,7 +19845,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19907,7 +19907,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19968,7 +19968,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20029,7 +20029,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20098,7 +20098,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20159,7 +20159,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20223,7 +20223,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20258,12 +20258,12 @@ rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest. echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]monotonic_clock[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]monotonic_clock[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20325,7 +20325,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20387,7 +20387,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20448,7 +20448,7 @@ _ACEOF rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' +if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20481,14 +20481,92 @@ rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest. - echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 -echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' $LINUX/Module.symvers 2>/dev/null + echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 +echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KALLSYMS_LOOKUP_NAME 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KALLSYMS_LOOKUP_NAME 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 +echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 +echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20522,12 +20600,12 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20561,12 +20639,12 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]next_zone[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]next_zone[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_zone)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(next_zone)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20600,12 +20678,12 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' $LINUX/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 diff --git a/configure.ac b/configure.ac index 5329a1157..7a5d52b68 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,8 @@ SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX SPL_AC_DIV64_64 SPL_AC_3ARGS_ON_EACH_CPU +SPL_AC_KALLSYMS_LOOKUP_NAME +SPL_AC_GET_VMALLOC_INFO SPL_AC_FIRST_ONLINE_PGDAT SPL_AC_NEXT_ONLINE_PGDAT SPL_AC_NEXT_ZONE diff --git a/include/linux/kallsyms_compat.h b/include/linux/kallsyms_compat.h new file mode 100644 index 000000000..82abed41d --- /dev/null +++ b/include/linux/kallsyms_compat.h @@ -0,0 +1,17 @@ +#ifndef _SPL_KALLSYMS_COMPAT_H +#define _SPL_KALLSYMS_COMPAT_H + +#ifdef HAVE_KALLSYMS_LOOKUP_NAME + +#include +#define spl_kallsyms_lookup_name(name) kallsyms_lookup_name(name) + +#else + +typedef unsigned long (*kallsyms_lookup_name_t)(const char *); +extern kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn; +#define spl_kallsyms_lookup_name(name) spl_kallsyms_lookup_name_fn(name) + +#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ + +#endif /* _SPL_KALLSYMS_COMPAT_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 318cf5ee8..caba9104f 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -325,6 +325,7 @@ extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc); extern void spl_kmem_reap(void); +int spl_kmem_init_kallsyms_lookup(void); int spl_kmem_init(void); void spl_kmem_fini(void); diff --git a/include/sys/types.h b/include/sys/types.h index 0b5cae641..699efe648 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -16,6 +16,7 @@ extern "C" { #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 75ae8a991..7876fc72b 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -58,12 +58,71 @@ extern vmem_t *heap_arena; /* primary kernel heap arena */ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ extern vmem_t *zio_arena; /* arena for allocating zio memory */ -#define VMEM_ALLOC 0x01 -#define VMEM_FREE 0x02 - extern pgcnt_t spl_kmem_availrmem(void); extern size_t vmem_size(vmem_t *vmp, int typemask); +/* + * The following symbols are available for use within the kernel + * itself, and they used to be available in older kernels. But it + * looks like they have been removed perhaps due to lack of use. + * For our purposes we need them to access the global memory state + * of the system, which is even available to user space process + * in /proc/meminfo. It's odd to me that there is no kernel API + * to get the same information, minimally the proc handler for + * the above mentioned /proc/meminfo file would make use of it. + */ + +/* Source linux/fs/proc/mmu.c */ +#ifndef HAVE_GET_VMALLOC_INFO +#ifdef CONFIG_MMU + +struct vmalloc_info { + unsigned long used; + unsigned long largest_chunk; +}; + +typedef void (*get_vmalloc_info_t)(struct vmalloc_info *); +extern get_vmalloc_info_t get_vmalloc_info_fn; + +# define VMEM_ALLOC 0x01 +# define VMEM_FREE 0x02 +# define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) +# define get_vmalloc_info(vmi) get_vmalloc_info_fn(vmi) +#else +# error "CONFIG_MMU must be defined" +#endif /* CONFIG_MMU */ +#endif /* HAVE_GET_VMALLOC_INFO */ + +/* Source linux/mm/mmzone.c */ +#ifndef HAVE_FIRST_ONLINE_PGDAT +typedef struct pglist_data *(*first_online_pgdat_t)(void); +extern first_online_pgdat_t first_online_pgdat_fn; +#define first_online_pgdat() first_online_pgdat_fn() +#endif /* HAVE_FIRST_ONLINE_PGDAT */ + +/* Source linux/mm/mmzone.c */ +#ifndef HAVE_NEXT_ONLINE_PGDAT +typedef struct pglist_data *(*next_online_pgdat_t)(struct pglist_data *); +extern next_online_pgdat_t next_online_pgdat_fn; +#define next_online_pgdat(pgd) next_online_pgdat_fn(pgd) +#endif /* HAVE_NEXT_ONLINE_PGDAT */ + +/* Source linux/mm/mmzone.c */ +#ifndef HAVE_NEXT_ZONE +typedef struct zone *(*next_zone_t)(struct zone *); +extern next_zone_t next_zone_fn; +#define next_zone(zone) next_zone_fn(zone) +#endif /* HAVE_NEXT_ZONE */ + +/* Source linux/mm/vmstat.c */ +#ifndef HAVE_GET_ZONE_COUNTS +typedef void (*get_zone_counts_t)(unsigned long *, unsigned long *, + unsigned long *); +extern get_zone_counts_t get_zone_counts_fn; +#define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f) +#endif /* HAVE_GET_ZONE_COUNTS */ + + #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 96a14c62e..c23abf6ff 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -54,6 +54,10 @@ EXPORT_SYMBOL(hw_serial); int p0 = 0; EXPORT_SYMBOL(p0); +#ifndef HAVE_KALLSYMS_LOOKUP_NAME +kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn = NULL; +#endif + int highbit(unsigned long i) { @@ -269,6 +273,42 @@ zone_get_hostid(void *zone) } EXPORT_SYMBOL(zone_get_hostid); +#ifdef HAVE_KALLSYMS_LOOKUP_NAME +#define set_kallsyms_lookup_name() (0) +#else +/* + * Because kallsyms_lookup_name() is no longer exported in the + * mainline kernel we are forced to resort to somewhat drastic + * measures. This function replaces the functionality by performing + * an upcall to user space where /proc/kallsyms is consulted for + * the requested address. + */ +#define GET_KALLSYMS_ADDR_CMD \ + "awk '{ if ( $3 == \"kallsyms_lookup_name\") { print $1 } }' " \ + "/proc/kallsyms >/proc/sys/kernel/spl/kallsyms_lookup_name" + +static int +set_kallsyms_lookup_name(void) +{ + char sh_path[] = "/bin/sh"; + char *argv[] = { sh_path, + "-c", + GET_KALLSYMS_ADDR_CMD, + NULL }; + char *envp[] = { "HOME=/", + "TERM=linux", + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", + NULL }; + int rc; + + rc = call_usermodehelper(sh_path, argv, envp, 1); + if (rc) + return rc; + + return spl_kmem_init_kallsyms_lookup(); +} +#endif + static int __init spl_init(void) { int rc = 0; @@ -297,6 +337,9 @@ static int __init spl_init(void) if ((rc = set_hostid())) GOTO(out7, rc = -EADDRNOTAVAIL); + if ((rc = set_kallsyms_lookup_name())) + GOTO(out7, rc = -EADDRNOTAVAIL); + printk("SPL: Loaded Solaris Porting Layer v%s\n", VERSION); RETURN(rc); out7: diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 18613e799..b8b006610 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -79,85 +79,29 @@ EXPORT_SYMBOL(zio_alloc_arena); vmem_t *zio_arena = NULL; EXPORT_SYMBOL(zio_arena); +#ifndef HAVE_GET_VMALLOC_INFO +get_vmalloc_info_t get_vmalloc_info_fn = NULL; +EXPORT_SYMBOL(get_vmalloc_info_fn); +#endif /* HAVE_GET_VMALLOC_INFO */ + #ifndef HAVE_FIRST_ONLINE_PGDAT -struct pglist_data * -first_online_pgdat(void) -{ - return NODE_DATA(first_online_node); -} -EXPORT_SYMBOL(first_online_pgdat); +first_online_pgdat_t first_online_pgdat_fn = NULL; +EXPORT_SYMBOL(first_online_pgdat_fn); #endif /* HAVE_FIRST_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ONLINE_PGDAT -struct pglist_data * -next_online_pgdat(struct pglist_data *pgdat) -{ - int nid = next_online_node(pgdat->node_id); - - if (nid == MAX_NUMNODES) - return NULL; - - return NODE_DATA(nid); -} -EXPORT_SYMBOL(next_online_pgdat); +next_online_pgdat_t next_online_pgdat_fn = NULL; +EXPORT_SYMBOL(next_online_pgdat_fn); #endif /* HAVE_NEXT_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ZONE -struct zone * -next_zone(struct zone *zone) -{ - pg_data_t *pgdat = zone->zone_pgdat; - - if (zone < pgdat->node_zones + MAX_NR_ZONES - 1) - zone++; - else { - pgdat = next_online_pgdat(pgdat); - if (pgdat) - zone = pgdat->node_zones; - else - zone = NULL; - } - return zone; -} -EXPORT_SYMBOL(next_zone); +next_zone_t next_zone_fn = NULL; +EXPORT_SYMBOL(next_zone_fn); #endif /* HAVE_NEXT_ZONE */ #ifndef HAVE_GET_ZONE_COUNTS -void -__get_zone_counts(unsigned long *active, unsigned long *inactive, - unsigned long *free, struct pglist_data *pgdat) -{ - struct zone *zones = pgdat->node_zones; - int i; - - *active = 0; - *inactive = 0; - *free = 0; - for (i = 0; i < MAX_NR_ZONES; i++) { - *active += zones[i].nr_active; - *inactive += zones[i].nr_inactive; - *free += zones[i].free_pages; - } -} - -void -get_zone_counts(unsigned long *active, unsigned long *inactive, - unsigned long *free) -{ - struct pglist_data *pgdat; - - *active = 0; - *inactive = 0; - *free = 0; - for_each_online_pgdat(pgdat) { - unsigned long l, m, n; - __get_zone_counts(&l, &m, &n, pgdat); - *active += l; - *inactive += m; - *free += n; - } -} -EXPORT_SYMBOL(get_zone_counts); +get_zone_counts_t get_zone_counts_fn = NULL; +EXPORT_SYMBOL(get_zone_counts_fn); #endif /* HAVE_GET_ZONE_COUNTS */ pgcnt_t @@ -177,11 +121,20 @@ EXPORT_SYMBOL(spl_kmem_availrmem); size_t vmem_size(vmem_t *vmp, int typemask) { - /* Arena's unsupported */ + struct vmalloc_info vmi; + size_t size = 0; + ASSERT(vmp == NULL); ASSERT(typemask & (VMEM_ALLOC | VMEM_FREE)); - return 0; + get_vmalloc_info(&vmi); + if (typemask & VMEM_ALLOC) + size += (size_t)vmi.used; + + if (typemask & VMEM_FREE) + size += (size_t)(VMALLOC_TOTAL - vmi.used); + + return size; } EXPORT_SYMBOL(vmem_size); @@ -1812,6 +1765,57 @@ spl_kmem_init_globals(void) swapfs_reserve = MIN(4*1024*1024 / PAGE_SIZE, physmem / 16); } +/* + * Called at module init when it is safe to use spl_kallsyms_lookup_name() + */ +int +spl_kmem_init_kallsyms_lookup(void) +{ +#ifndef HAVE_GET_VMALLOC_INFO + get_vmalloc_info_fn = (get_vmalloc_info_t) + spl_kallsyms_lookup_name("get_vmalloc_info"); + if (!get_vmalloc_info_fn) + return -EFAULT; +#endif /* HAVE_GET_VMALLOC_INFO */ + +#ifndef HAVE_FIRST_ONLINE_PGDAT + first_online_pgdat_fn = (first_online_pgdat_t) + spl_kallsyms_lookup_name("first_online_pgdat"); + if (!first_online_pgdat_fn) + return -EFAULT; +#endif /* HAVE_FIRST_ONLINE_PGDAT */ + +#ifndef HAVE_NEXT_ONLINE_PGDAT + next_online_pgdat_fn = (next_online_pgdat_t) + spl_kallsyms_lookup_name("next_online_pgdat"); + if (!next_online_pgdat_fn) + return -EFAULT; +#endif /* HAVE_NEXT_ONLINE_PGDAT */ + +#ifndef HAVE_NEXT_ZONE + next_zone_fn = (next_zone_t) + spl_kallsyms_lookup_name("next_zone"); + if (!next_zone_fn) + return -EFAULT; +#endif /* HAVE_NEXT_ZONE */ + +#ifndef HAVE_GET_ZONE_COUNTS + get_zone_counts_fn = (get_zone_counts_t) + spl_kallsyms_lookup_name("get_zone_counts"); + if (!get_zone_counts_fn) + return -EFAULT; +#endif /* HAVE_GET_ZONE_COUNTS */ + + /* + * It is now safe to initialize the global tunings which rely on + * the use of the for_each_zone() macro. This macro in turns + * depends on the *_pgdat symbols which are now available. + */ + spl_kmem_init_globals(); + + return 0; +} + int spl_kmem_init(void) { @@ -1820,7 +1824,6 @@ spl_kmem_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); - spl_kmem_init_globals(); #ifdef HAVE_SET_SHRINKER spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 90c89ce31..d0ce23194 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -68,6 +68,7 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #define CTL_VERSION CTL_UNNUMBERED /* Version */ #define CTL_HOSTID CTL_UNNUMBERED /* Host id by /usr/bin/hostid */ #define CTL_HW_SERIAL CTL_UNNUMBERED /* HW serial number by hostid */ +#define CTL_KALLSYMS CTL_UNNUMBERED /* kallsyms_lookup_name addr */ #define CTL_DEBUG_SUBSYS CTL_UNNUMBERED /* Debug subsystem */ #define CTL_DEBUG_MASK CTL_UNNUMBERED /* Debug mask */ @@ -123,6 +124,7 @@ enum { CTL_VERSION = 1, /* Version */ CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ CTL_HW_SERIAL, /* Hardware serial number from hostid */ + CTL_KALLSYMS, /* Address of kallsyms_lookup_name */ CTL_DEBUG_SUBSYS, /* Debug subsystem */ CTL_DEBUG_MASK, /* Debug mask */ @@ -489,6 +491,51 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } +#ifndef HAVE_KALLSYMS_LOOKUP_NAME +static int +proc_dokallsyms_lookup_name(struct ctl_table *table, int write, + struct file *filp, void __user *buffer, + size_t *lenp, loff_t *ppos) { + int len, rc = 0; + char *end, str[32]; + ENTRY; + + if (write) { + /* This may only be set once at module load time */ + if (spl_kallsyms_lookup_name_fn) + RETURN(-EEXIST); + + /* We can't use proc_doulongvec_minmax() in the write + * case hear because the address while a hex value has no + * leading 0x which confuses the helper function. */ + rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); + if (rc < 0) + RETURN(rc); + + spl_kallsyms_lookup_name_fn = + (kallsyms_lookup_name_t)simple_strtoul(str, &end, 16); + if (str == end) + RETURN(-EINVAL); + + *ppos += *lenp; + } else { + len = snprintf(str, sizeof(str), "%lx", + (unsigned long)spl_kallsyms_lookup_name_fn); + if (*ppos >= len) + rc = 0; + else + rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); + + if (rc >= 0) { + *lenp = rc; + *ppos += rc; + } + } + + RETURN(rc); +} +#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ + static int proc_doavailrmem(struct ctl_table *table, int write, struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) @@ -1018,6 +1065,16 @@ static struct ctl_table spl_table[] = { .mode = 0444, .proc_handler = &proc_dostring, }, +#ifndef HAVE_KALLSYMS_LOOKUP_NAME + { + .ctl_name = CTL_KALLSYMS, + .procname = "kallsyms_lookup_name", + .data = &spl_kallsyms_lookup_name_fn, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = &proc_dokallsyms_lookup_name, + }, +#endif { .ctl_name = CTL_SPL_DEBUG, .procname = "debug", diff --git a/patches/16kstack-x86_64.patch b/patches/16kstack-x86_64.patch deleted file mode 100644 index 330cedddf..000000000 --- a/patches/16kstack-x86_64.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: linux+rh+chaos/include/asm-x86_64/page.h -=================================================================== ---- linux+rh+chaos.orig/include/asm-x86_64/page.h -+++ linux+rh+chaos/include/asm-x86_64/page.h -@@ -10,7 +10,7 @@ - #define PAGE_MASK (~(PAGE_SIZE-1)) - #define PHYSICAL_PAGE_MASK (~(PAGE_SIZE-1) & __PHYSICAL_MASK) - --#define THREAD_ORDER 1 -+#define THREAD_ORDER 2 - #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) - #define CURRENT_MASK (~(THREAD_SIZE-1)) - diff --git a/patches/rhel5-spl-export-symbols.patch b/patches/rhel5-spl-export-symbols.patch new file mode 100644 index 000000000..772242cf4 --- /dev/null +++ b/patches/rhel5-spl-export-symbols.patch @@ -0,0 +1,91 @@ +Index: linux+rh+chaos/kernel/sched.c +=================================================================== +--- linux+rh+chaos.orig/kernel/sched.c ++++ linux+rh+chaos/kernel/sched.c +@@ -1034,10 +1034,11 @@ static inline void resched_task(struct t + * task_curr - is this task currently executing on a CPU? + * @p: the task in question. + */ +-inline int task_curr(const struct task_struct *p) ++int task_curr(const struct task_struct *p) + { + return cpu_curr(task_cpu(p)) == p; + } ++EXPORT_SYMBOL(task_curr); /* Request export upstream */ + + /* Used instead of source_load when we know the type == 0 */ + unsigned long weighted_cpuload(const int cpu) +Index: linux+rh+chaos/kernel/time.c +=================================================================== +--- linux+rh+chaos.orig/kernel/time.c ++++ linux+rh+chaos/kernel/time.c +@@ -605,6 +605,7 @@ void set_normalized_timespec(struct time + ts->tv_sec = sec; + ts->tv_nsec = nsec; + } ++EXPORT_SYMBOL(set_normalized_timespec); /* Exported as of 2.6.26 */ + + /** + * ns_to_timespec - Convert nanoseconds to timespec +Index: linux+rh+chaos/kernel/kallsyms.c +=================================================================== +--- linux+rh+chaos.orig/kernel/kallsyms.c ++++ linux+rh+chaos/kernel/kallsyms.c +@@ -154,6 +154,7 @@ unsigned long kallsyms_lookup_name(const + } + return module_kallsyms_lookup_name(name); + } ++EXPORT_SYMBOL(kallsyms_lookup_name); /* Exported prior to 2.6.19 */ + + /* + * Lookup an address +Index: linux+rh+chaos/fs/proc/mmu.c +=================================================================== +--- linux+rh+chaos.orig/fs/proc/mmu.c ++++ linux+rh+chaos/fs/proc/mmu.c +@@ -75,3 +75,4 @@ void get_vmalloc_info(struct vmalloc_inf + read_unlock(&vmlist_lock); + } + } ++EXPORT_SYMBOL(get_vmalloc_info); /* Request clean upstream API for this */ +Index: linux+rh+chaos/mm/mmzone.c +=================================================================== +--- linux+rh+chaos.orig/mm/mmzone.c ++++ linux+rh+chaos/mm/mmzone.c +@@ -14,7 +14,7 @@ struct pglist_data *first_online_pgdat(v + return NODE_DATA(first_online_node); + } + +-EXPORT_UNUSED_SYMBOL(first_online_pgdat); /* June 2006 */ ++EXPORT_SYMBOL(first_online_pgdat); /* Exported prior to 2.6.18 */ + + struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) + { +@@ -24,7 +24,7 @@ struct pglist_data *next_online_pgdat(st + return NULL; + return NODE_DATA(nid); + } +-EXPORT_UNUSED_SYMBOL(next_online_pgdat); /* June 2006 */ ++EXPORT_SYMBOL(next_online_pgdat); /* Exported prior to 2.6.18 */ + + + /* +@@ -45,5 +45,5 @@ struct zone *next_zone(struct zone *zone + } + return zone; + } +-EXPORT_UNUSED_SYMBOL(next_zone); /* June 2006 */ ++EXPORT_SYMBOL(next_zone); /* Exported prior to 2.6.18 */ + +Index: linux+rh+chaos/mm/vmstat.c +=================================================================== +--- linux+rh+chaos.orig/mm/vmstat.c ++++ linux+rh+chaos/mm/vmstat.c +@@ -45,6 +45,7 @@ void get_zone_counts(unsigned long *acti + *free += n; + } + } ++EXPORT_SYMBOL(get_zone_counts); /* Request clean upstream API for this */ + + #ifdef CONFIG_VM_EVENT_COUNTERS + DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}}; diff --git a/patches/task-curr-export.patch b/patches/task-curr-export.patch deleted file mode 100644 index 53007d2ba..000000000 --- a/patches/task-curr-export.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: linux+rh+chaos/kernel/sched.c -=================================================================== ---- linux+rh+chaos.orig/kernel/sched.c -+++ linux+rh+chaos/kernel/sched.c -@@ -1038,6 +1038,7 @@ inline int task_curr(const struct task_s - { - return cpu_curr(task_cpu(p)) == p; - } -+EXPORT_SYMBOL(task_curr); - - /* Used instead of source_load when we know the type == 0 */ - unsigned long weighted_cpuload(const int cpu) diff --git a/spl_config.h.in b/spl_config.h.in index 1b7c8abab..7e677708a 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -51,6 +51,9 @@ /* fls64() is available */ #undef HAVE_FLS64 +/* get_vmalloc_info() is available */ +#undef HAVE_GET_VMALLOC_INFO + /* get_zone_counts() is available */ #undef HAVE_GET_ZONE_COUNTS @@ -63,6 +66,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* kallsyms_lookup_name() is available */ +#undef HAVE_KALLSYMS_LOOKUP_NAME + /* kmalloc_node() is available */ #undef HAVE_KMALLOC_NODE From 32f74c5280ca9a753991b97370e7c4c1a4e34ede Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 26 Feb 2009 18:05:39 +0000 Subject: [PATCH 0251/1062] XXX: Temporarily disable vmem_size(). --- include/sys/vmsystm.h | 2 ++ module/spl/spl-kmem.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 929c790d0..e0995c374 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -58,7 +58,9 @@ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ extern vmem_t *zio_arena; /* arena for allocating zio memory */ extern pgcnt_t spl_kmem_availrmem(void); +#if 0 extern size_t vmem_size(vmem_t *vmp, int typemask); +#endif /* * The following symbols are available for use within the kernel diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index b8b006610..1030cdd8e 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -118,6 +118,7 @@ spl_kmem_availrmem(void) } EXPORT_SYMBOL(spl_kmem_availrmem); +#if 0 size_t vmem_size(vmem_t *vmp, int typemask) { @@ -137,6 +138,7 @@ vmem_size(vmem_t *vmp, int typemask) return size; } EXPORT_SYMBOL(vmem_size); +#endif /* From c5f704607bbdc5e6a89b4ac088dff16a6c1eeb5e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 5 Mar 2009 09:08:07 -0800 Subject: [PATCH 0252/1062] Build system and packaging (RPM support) An update to the build system to properly support all commonly used Makefile targets these include: make all # Build everything make install # Install everything make clean # Clean up build products make distclean # Clean up everything make dist # Create package tarball make srpm # Create package source RPM make rpm # Create package binary RPMs make tags # Create ctags and etags for everything Extra care was taken to ensure that the source RPMs are fully rebuildable against Fedora/RHEL/Chaos kernels. To build binary RPMs from the source RPM for your system simply run: rpmbuild --rebuild spl-x.y.z-1.src.rpm This will produce two binary RPMs with correct 'requires' dependencies for your kernel. One will contain all spl modules and support utilities, the other is a devel package for compiling additional kernel modules which are dependant on the spl. spl-x.y.z-1_.x86_64.rpm spl-devel-x.y.2-1_.x86_64.rpm --- Makefile.am | 58 +- Makefile.in | 131 +- build/Makefile | 1 - cmd/Makefile.in | 2 +- config/spl-build.m4 | 41 +- configure | 307 +- configure.ac | 28 +- include/Makefile.am | 18 +- include/Makefile.in | 217 +- include/asm/Makefile.am | 1 - include/asm/Makefile.in | 116 +- include/fs/Makefile.am | 1 - include/fs/Makefile.in | 116 +- include/linux/Makefile.am | 1 - include/linux/Makefile.in | 116 +- include/rpc/Makefile.am | 1 - include/rpc/Makefile.in | 116 +- include/sharefs/Makefile.am | 1 - include/sharefs/Makefile.in | 112 +- include/sys/Makefile.am | 3 - include/sys/Makefile.in | 53 +- include/sys/fm/Makefile.am | 1 - include/sys/fm/Makefile.in | 112 +- include/sys/fs/Makefile.am | 1 - include/sys/fs/Makefile.in | 112 +- include/sys/sysevent/Makefile.am | 1 - include/sys/sysevent/Makefile.in | 112 +- include/sys/vmsystm.h | 7 +- include/util/Makefile.am | 1 - include/util/Makefile.in | 112 +- include/vm/Makefile.am | 1 - include/vm/Makefile.in | 112 +- lib/Makefile.in | 2 +- libtool | 7885 ------------------------------ module/Makefile.in | 17 +- module/spl/Makefile.in | 27 - module/spl/spl-kmem.c | 3 - module/splat/Makefile.in | 25 - scripts/Makefile.am | 2 +- scripts/Makefile.in | 11 +- scripts/spl.spec.in | 28 - spl.spec.in | 104 + 42 files changed, 1594 insertions(+), 8522 deletions(-) delete mode 100644 build/Makefile delete mode 100644 include/asm/Makefile.am delete mode 100644 include/fs/Makefile.am delete mode 100644 include/linux/Makefile.am delete mode 100644 include/rpc/Makefile.am delete mode 100644 include/sharefs/Makefile.am delete mode 100644 include/sys/Makefile.am delete mode 100644 include/sys/fm/Makefile.am delete mode 100644 include/sys/fs/Makefile.am delete mode 100644 include/sys/sysevent/Makefile.am delete mode 100644 include/util/Makefile.am delete mode 100644 include/vm/Makefile.am delete mode 100755 libtool delete mode 100644 scripts/spl.spec.in create mode 100644 spl.spec.in diff --git a/Makefile.am b/Makefile.am index e0c5fe29e..410d9a689 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,54 @@ -AUTOMAKE_OPTIONS = foreign dist-zip - SUBDIRS = lib cmd module include scripts -CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub -CONFIG_CLEAN_FILES += depcomp install-sh missing mkinstalldirs -EXTRA_DIST = autogen.sh -rpms: dist Makefile - rpmbuild -ta $(distdir).tar.gz +AUTOMAKE_OPTIONS = foreign dist-zip +EXTRA_DIST = autogen.sh spl.spec META DISCLAIMER +include_HEADERS = spl_config.h +distclean-local:: + -$(RM) -R autom4te*.cache + -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ + -o -name .pc -o -name .hg -o -name .git \) -prune -o \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ + -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ + -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ + -o -name 'Makefile' -o -name 'Module.symvers' \) \ + -type f -print | xargs $(RM) + +install-data-local: + $(INSTALL) module/Module.symvers $(DESTDIR)/$(includedir) + +ctags: + $(RM) $(top_srcdir)/tags + find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags + +etags: + $(RM) $(top_srcdir)/TAGS + find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a + +tags: ctags etags + +rpm-local: + mkdir -p $(rpmbuild)/TMP && \ + mkdir -p $(rpmbuild)/BUILD && \ + mkdir -p $(rpmbuild)/RPMS && \ + mkdir -p $(rpmbuild)/SRPMS && \ + mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + +srpm: dist + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ + /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "build_src_rpm 1" --define "dist %{nil}" --nodeps -bs $$rpmbuild/SPECS/$(PACKAGE).spec || exit 1; \ + cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\ + $(RM) -R $$rpmbuild + +# Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM +# against any installed kernel-devel-2.x.y-z package. This will +# override the LINUX_VERSION detected at configure time. +rpm: srpm + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ + /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ + cp $$rpmbuild/RPMS/*/* . || exit 1; \ + $(RM) -R $$rpmbuild diff --git a/Makefile.in b/Makefile.in index 834d7f74b..1bdb7b7a9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -36,8 +37,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/spl_config.h.in \ +DIST_COMMON = $(am__configure_deps) $(include_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/spl.spec.in $(srcdir)/spl_config.h.in \ $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ @@ -54,6 +56,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = spl_config.h +CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ + module/splat/Makefile spl.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -62,6 +66,15 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -118,6 +131,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -178,7 +192,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -195,11 +208,10 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -AUTOMAKE_OPTIONS = foreign dist-zip SUBDIRS = lib cmd module include scripts -CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub depcomp \ - install-sh missing mkinstalldirs -EXTRA_DIST = autogen.sh +AUTOMAKE_OPTIONS = foreign dist-zip +EXTRA_DIST = autogen.sh spl.spec META DISCLAIMER +include_HEADERS = spl_config.h all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -260,6 +272,8 @@ module/spl/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/spl/Make cd $(top_builddir) && $(SHELL) ./config.status $@ module/splat/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/splat/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ +spl.spec: $(top_builddir)/config.status $(srcdir)/spl.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -270,6 +284,23 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -350,7 +381,6 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique -tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -380,7 +410,6 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi -ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ @@ -406,7 +435,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/config $(distdir)/module $(distdir)/module/spl $(distdir)/module/splat $(distdir)/scripts + $(mkdir_p) $(distdir)/. $(distdir)/config $(distdir)/module $(distdir)/module/spl $(distdir)/module/splat @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -548,9 +577,12 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile spl_config.h +all-am: Makefile $(HEADERS) spl_config.h installdirs: installdirs-recursive installdirs-am: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -583,7 +615,7 @@ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-tags + distclean-libtool distclean-local distclean-tags dvi: dvi-recursive @@ -595,7 +627,7 @@ info: info-recursive info-am: -install-data-am: +install-data-am: install-data-local install-includeHEADERS install-exec-am: @@ -623,7 +655,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am uninstall-info: uninstall-info-recursive @@ -632,19 +664,68 @@ uninstall-info: uninstall-info-recursive ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ - distclean-recursive distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am + distclean-local distclean-recursive distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-exec \ + install-exec-am install-includeHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-libtool \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-includeHEADERS \ + uninstall-info-am -rpms: dist Makefile - rpmbuild -ta $(distdir).tar.gz +distclean-local:: + -$(RM) -R autom4te*.cache + -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ + -o -name .pc -o -name .hg -o -name .git \) -prune -o \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ + -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ + -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ + -o -name 'Makefile' -o -name 'Module.symvers' \) \ + -type f -print | xargs $(RM) + +install-data-local: + $(INSTALL) module/Module.symvers $(DESTDIR)/$(includedir) + +ctags: + $(RM) $(top_srcdir)/tags + find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags + +etags: + $(RM) $(top_srcdir)/TAGS + find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a + +tags: ctags etags + +rpm-local: + mkdir -p $(rpmbuild)/TMP && \ + mkdir -p $(rpmbuild)/BUILD && \ + mkdir -p $(rpmbuild)/RPMS && \ + mkdir -p $(rpmbuild)/SRPMS && \ + mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + +srpm: dist + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ + /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "build_src_rpm 1" --define "dist %{nil}" --nodeps -bs $$rpmbuild/SPECS/$(PACKAGE).spec || exit 1; \ + cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\ + $(RM) -R $$rpmbuild + +# Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM +# against any installed kernel-devel-2.x.y-z package. This will +# override the LINUX_VERSION detected at configure time. +rpm: srpm + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ + /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ + cp $$rpmbuild/RPMS/*/* . || exit 1; \ + $(RM) -R $$rpmbuild # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/build/Makefile b/build/Makefile deleted file mode 100644 index f84b8e9cc..000000000 --- a/build/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-m := conftest.o diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 48d44a2b4..b7fcf9c1c 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -115,6 +115,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -175,7 +176,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ diff --git a/config/spl-build.m4 b/config/spl-build.m4 index a90fb6170..b6e44a7f2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -32,6 +32,10 @@ AC_DEFUN([SPL_AC_KERNEL], [ *** Please specify the location of the kernel source *** with the '--with-linux=PATH' option]) fi + else + if test "$kernelsrc" = "NONE"; then + kernsrcver=NONE + fi fi AC_MSG_RESULT([$kernelsrc]) @@ -65,13 +69,28 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([$kernsrcver]) - kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver LINUX=${kernelsrc} LINUX_OBJ=${kernelbuild} + LINUX_VERSION=${kernsrcver} + + abs_srcdir=`readlink -f ${srcdir}` + kerninclude="-I${abs_srcdir} -I${abs_srcdir}/include" + kernwarn="-Wstrict-prototypes -Werror" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + kernobjs="O=$kernelbuild" + fi + + KERNELCFLAGS= + KERNELCPPFLAGS="${kerninclude} ${kernwarn}" + KERNELMAKE_PARAMS="${kernobjs}" AC_SUBST(LINUX) AC_SUBST(LINUX_OBJ) - AC_SUBST(kmoduledir) + AC_SUBST(LINUX_VERSION) + AC_SUBST(KERNELMAKE_PARAMS) + AC_SUBST(KERNELCPPFLAGS) + AC_SUBST(KERNELCFLAGS) ]) AC_DEFUN([SPL_AC_LICENSE], [ @@ -218,15 +237,15 @@ dnl # dnl # SPL_LINUX_COMPILE_IFELSE / like AC_COMPILE_IFELSE dnl # AC_DEFUN([SPL_LINUX_COMPILE_IFELSE], [ -m4_ifvaln([$1], [SPL_LINUX_CONFTEST([$1])])dnl -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -dnl AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" -f $PWD/build/Makefile LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM SUBDIRS=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], -AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], - [$4], - [_AC_MSG_LOG_CONFTEST -m4_ifvaln([$5],[$5])dnl])dnl -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko m4_ifval([$1], [build/conftest.c conftest.c])[]dnl + m4_ifvaln([$1], [SPL_LINUX_CONFTEST([$1])]) + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + AS_IF( + [AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], + [$4], + [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])] + ) + rm -Rf build ]) dnl # diff --git a/configure b/configure index d436b8a7c..8f5ec50c4 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ kmoduledir KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ LINUX_VERSION KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -18964,6 +18964,10 @@ echo "$as_me: error: *** with the '--with-linux=PATH' option" >&2;} { (exit 1); exit 1; }; } fi + else + if test "$kernelsrc" = "NONE"; then + kernsrcver=NONE + fi fi echo "$as_me:$LINENO: result: $kernelsrc" >&5 @@ -19007,9 +19011,24 @@ echo "$as_me: error: echo "$as_me:$LINENO: result: $kernsrcver" >&5 echo "${ECHO_T}$kernsrcver" >&6 - kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver LINUX=${kernelsrc} LINUX_OBJ=${kernelbuild} + LINUX_VERSION=${kernsrcver} + + abs_srcdir=`readlink -f ${srcdir}` + kerninclude="-I${abs_srcdir} -I${abs_srcdir}/include" + kernwarn="-Wstrict-prototypes -Werror" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + kernobjs="O=$kernelbuild" + fi + + KERNELCFLAGS= + KERNELCPPFLAGS="${kerninclude} ${kernwarn}" + KERNELMAKE_PARAMS="${kernobjs}" + + + @@ -19199,9 +19218,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19225,12 +19245,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 @@ -19259,9 +19282,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19285,12 +19309,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 @@ -19320,9 +19347,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19346,12 +19374,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 @@ -19380,9 +19411,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19406,12 +19438,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -19441,9 +19476,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19467,12 +19503,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 @@ -19504,9 +19543,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19530,12 +19570,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -19605,9 +19648,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19631,12 +19675,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + echo "$as_me:$LINENO: checking whether fls64() is available" >&5 @@ -19665,9 +19712,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19691,12 +19739,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -19843,9 +19894,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19864,7 +19916,6 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 @@ -19873,8 +19924,12 @@ cat >>confdefs.h <<\_ACEOF _ACEOF + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -19905,9 +19960,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19931,12 +19987,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -19966,9 +20025,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19992,12 +20052,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20027,9 +20090,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20054,13 +20118,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20096,9 +20163,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20122,12 +20190,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20157,9 +20228,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20184,13 +20256,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20221,9 +20296,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20247,12 +20323,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20323,9 +20402,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20349,12 +20429,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20385,9 +20468,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20411,12 +20495,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20446,9 +20533,10 @@ main (void) _ACEOF -rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile -echo "obj-m := conftest.o" >build/Makefile -if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20472,12 +20560,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + fi -rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko build/conftest.c conftest.c + + rm -Rf build + @@ -20715,22 +20806,7 @@ _ACEOF -TOPDIR=`/bin/pwd` - -# Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build -KERNELMAKE_PARAMS= -KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" -KERNELCPPFLAGS="${KERNELCPPFLAGS} -Wstrict-prototypes -Werror" - -if test "${LINUX_OBJ}" != "${LINUX}"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" -fi - - - - - - ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile include/asm/Makefile include/fs/Makefile include/linux/Makefile include/rpc/Makefile include/sharefs/Makefile include/sys/Makefile include/sys/fm/Makefile include/sys/fs/Makefile include/sys/sysevent/Makefile include/util/Makefile include/vm/Makefile scripts/Makefile scripts/spl.spec" + ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec" cat >confcache <<\_ACEOF @@ -21303,19 +21379,8 @@ do "module/spl/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;; "module/splat/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "include/asm/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/asm/Makefile" ;; - "include/fs/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/fs/Makefile" ;; - "include/linux/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/linux/Makefile" ;; - "include/rpc/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/rpc/Makefile" ;; - "include/sharefs/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sharefs/Makefile" ;; - "include/sys/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;; - "include/sys/fm/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/fm/Makefile" ;; - "include/sys/fs/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/fs/Makefile" ;; - "include/sys/sysevent/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/sys/sysevent/Makefile" ;; - "include/util/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/util/Makefile" ;; - "include/vm/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/vm/Makefile" ;; "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; - "scripts/spl.spec" ) CONFIG_FILES="$CONFIG_FILES scripts/spl.spec" ;; + "spl.spec" ) CONFIG_FILES="$CONFIG_FILES spl.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "spl_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS spl_config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 @@ -21487,7 +21552,7 @@ s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LINUX@,$LINUX,;t t s,@LINUX_OBJ@,$LINUX_OBJ,;t t -s,@kmoduledir@,$kmoduledir,;t t +s,@LINUX_VERSION@,$LINUX_VERSION,;t t s,@KERNELMAKE_PARAMS@,$KERNELMAKE_PARAMS,;t t s,@KERNELCPPFLAGS@,$KERNELCPPFLAGS,;t t s,@KERNELCFLAGS@,$KERNELCFLAGS,;t t diff --git a/configure.ac b/configure.ac index 7a5d52b68..6285afa22 100644 --- a/configure.ac +++ b/configure.ac @@ -76,21 +76,6 @@ SPL_AC_NEXT_ONLINE_PGDAT SPL_AC_NEXT_ZONE SPL_AC_GET_ZONE_COUNTS -TOPDIR=`/bin/pwd` - -# Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build -KERNELMAKE_PARAMS= -KERNELCPPFLAGS="${KERNELCPPFLAGS} -I$TOPDIR -I$TOPDIR/include" -KERNELCPPFLAGS="${KERNELCPPFLAGS} -Wstrict-prototypes -Werror" - -if test "${LINUX_OBJ}" != "${LINUX}"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" -fi - -AC_SUBST(KERNELMAKE_PARAMS) -AC_SUBST(KERNELCPPFLAGS) -AC_SUBST(KERNELCFLAGS) - AC_CONFIG_FILES([ Makefile lib/Makefile @@ -99,19 +84,8 @@ AC_CONFIG_FILES([ module/spl/Makefile module/splat/Makefile include/Makefile - include/asm/Makefile - include/fs/Makefile - include/linux/Makefile - include/rpc/Makefile - include/sharefs/Makefile - include/sys/Makefile - include/sys/fm/Makefile - include/sys/fs/Makefile - include/sys/sysevent/Makefile - include/util/Makefile - include/vm/Makefile scripts/Makefile - scripts/spl.spec + spl.spec ]) AC_OUTPUT diff --git a/include/Makefile.am b/include/Makefile.am index de6312f1e..0b58dd9f8 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,3 +1,15 @@ -SUBDIRS = asm linux rpc sys util fs sharefs vm - -EXTRA_DIST = *.h +# All headers are referenced by this top level Makefile.am and the +# nobase_* rule is used to ensure all path information is preserved +# when using the 'make install' target. +nobase_include_HEADERS = *.h +nobase_include_HEADERS += asm/*.h +nobase_include_HEADERS += fs/*.h +nobase_include_HEADERS += linux/*.h +nobase_include_HEADERS += rpc/*.h +nobase_include_HEADERS += sharefs/*.h +nobase_include_HEADERS += sys/fm/*.h +nobase_include_HEADERS += sys/fs/*.h +nobase_include_HEADERS += sys/sysevent/*.h +nobase_include_HEADERS += sys/*.h +nobase_include_HEADERS += util/*.h +nobase_include_HEADERS += vm/*.h diff --git a/include/Makefile.in b/include/Makefile.in index 10f3779fe..4dfe80800 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,15 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +nobase_includeHEADERS_INSTALL = $(install_sh_DATA) +HEADERS = $(nobase_include_HEADERS) ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -100,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -160,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -177,9 +181,14 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -SUBDIRS = asm linux rpc sys util fs sharefs vm -EXTRA_DIST = *.h -all: all-recursive + +# All headers are referenced by this top level Makefile.am and the +# nobase_* rule is used to ensure all path information is preserved +# when using the 'make install' target. +nobase_include_HEADERS = *.h asm/*.h fs/*.h linux/*.h rpc/*.h \ + sharefs/*.h sys/fm/*.h sys/fs/*.h sys/sysevent/*.h sys/*.h \ + util/*.h vm/*.h +all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -221,76 +230,24 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__vpath_adj) \ + echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + $(am__vpath_adj) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -303,23 +260,10 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -332,7 +276,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$tags $$unique; \ fi ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ @@ -355,6 +299,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/asm $(distdir)/fs $(distdir)/linux $(distdir)/rpc $(distdir)/sharefs $(distdir)/sys $(distdir)/sys/fm $(distdir)/sys/fs $(distdir)/sys/sysevent $(distdir)/util $(distdir)/vm @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -381,35 +326,22 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive +check: check-am +all-am: Makefile $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-recursive +installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -425,67 +357,64 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive +clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-recursive +distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags -dvi: dvi-recursive +dvi: dvi-am dvi-am: -html: html-recursive +html: html-am -info: info-recursive +info: info-am info-am: -install-data-am: +install-data-am: install-nobase_includeHEADERS install-exec-am: -install-info: install-info-recursive +install-info: install-info-am install-man: installcheck-am: -maintainer-clean: maintainer-clean-recursive +maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-recursive +mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-recursive +pdf: pdf-am pdf-am: -ps: ps-recursive +ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-recursive ctags \ - ctags-recursive distclean distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am + install-info-am install-man install-nobase_includeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/asm/Makefile.am b/include/asm/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/asm/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/asm/Makefile.in b/include/asm/Makefile.in index 4a73cd9a2..fb8283de2 100644 --- a/include/asm/Makefile.in +++ b/include/asm/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/asm -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +nobase_includeHEADERS_INSTALL = $(install_sh_DATA) +HEADERS = $(nobase_include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +nobase_include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,73 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__vpath_adj) \ + echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + $(am__vpath_adj) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +321,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +356,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +369,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-nobase_includeHEADERS install-exec-am: @@ -317,17 +395,19 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-nobase_includeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/fs/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/fs/Makefile.in b/include/fs/Makefile.in index a2a857588..78beaa5bf 100644 --- a/include/fs/Makefile.in +++ b/include/fs/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/fs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +nobase_includeHEADERS_INSTALL = $(install_sh_DATA) +HEADERS = $(nobase_include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +nobase_include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,73 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__vpath_adj) \ + echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + $(am__vpath_adj) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +321,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +356,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +369,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-nobase_includeHEADERS install-exec-am: @@ -317,17 +395,19 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-nobase_includeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/linux/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index 95193ff7e..eb19aec76 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/linux -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +nobase_includeHEADERS_INSTALL = $(install_sh_DATA) +HEADERS = $(nobase_include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +nobase_include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,73 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__vpath_adj) \ + echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + $(am__vpath_adj) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +321,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +356,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +369,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-nobase_includeHEADERS install-exec-am: @@ -317,17 +395,19 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-nobase_includeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/rpc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/rpc/Makefile.in b/include/rpc/Makefile.in index bb4d3fb6e..68151f9be 100644 --- a/include/rpc/Makefile.in +++ b/include/rpc/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/rpc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +nobase_includeHEADERS_INSTALL = $(install_sh_DATA) +HEADERS = $(nobase_include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +nobase_include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,73 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__vpath_adj) \ + echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @$(am__vpath_adj_setup) \ + list='$(nobase_include_HEADERS)'; for p in $$list; do \ + $(am__vpath_adj) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +321,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +356,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +369,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-nobase_includeHEADERS install-exec-am: @@ -317,17 +395,19 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-nobase_includeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/sharefs/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/sharefs/Makefile.in b/include/sharefs/Makefile.in index 903fa8f26..69e3093d1 100644 --- a/include/sharefs/Makefile.in +++ b/include/sharefs/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/sharefs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,71 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +319,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +354,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +367,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-includeHEADERS install-exec-am: @@ -317,16 +393,18 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am deleted file mode 100644 index 8fdb5afef..000000000 --- a/include/sys/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = fm fs sysevent - -EXTRA_DIST = *.h diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index 7b0b4e9f1..76a7cdf47 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/sys -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -54,6 +56,15 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -100,6 +111,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -160,7 +172,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -178,7 +189,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ SUBDIRS = fm fs sysevent -EXTRA_DIST = *.h +include_HEADERS = *.h all: all-recursive .SUFFIXES: @@ -221,6 +232,23 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -398,9 +426,12 @@ distdir: $(DISTFILES) done check-am: all-am check: check-recursive -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -444,7 +475,7 @@ info: info-recursive info-am: -install-data-am: +install-data-am: install-includeHEADERS install-exec-am: @@ -470,7 +501,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am uninstall-info: uninstall-info-recursive @@ -479,13 +510,15 @@ uninstall-info: uninstall-info-recursive ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am + uninstall uninstall-am uninstall-includeHEADERS \ + uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/sys/fm/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index c0634e12b..8180b6f0a 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/sys/fm -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,71 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +319,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +354,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +367,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-includeHEADERS install-exec-am: @@ -317,16 +393,18 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/sys/fs/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index 7c27a21ad..2d758f0cb 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/sys/fs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,71 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +319,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +354,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +367,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-includeHEADERS install-exec-am: @@ -317,16 +393,18 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/sys/sysevent/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/sys/sysevent/Makefile.in b/include/sys/sysevent/Makefile.in index 9b208a155..740da4191 100644 --- a/include/sys/sysevent/Makefile.in +++ b/include/sys/sysevent/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/sys/sysevent -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,71 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +319,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +354,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +367,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-includeHEADERS install-exec-am: @@ -317,16 +393,18 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index e0995c374..861e51164 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -30,14 +30,15 @@ #include #include #include +#include #include #include -/* These values are loosely coupled with the the VM page reclaim. +/* These values are loosely coupled with the VM page reclaim. * Linux uses its own heuristics to trigger page reclamation, and * because those interface are difficult to interface with. These * values should only be considered as a rough guide to the system - * memory state and not as direct evidence that page reclaimation + * memory state and not as direct evidence that page reclamation. * is or is not currently in progress. */ #define membar_producer() smp_wmb() @@ -58,9 +59,7 @@ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ extern vmem_t *zio_arena; /* arena for allocating zio memory */ extern pgcnt_t spl_kmem_availrmem(void); -#if 0 extern size_t vmem_size(vmem_t *vmp, int typemask); -#endif /* * The following symbols are available for use within the kernel diff --git a/include/util/Makefile.am b/include/util/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/util/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/util/Makefile.in b/include/util/Makefile.in index 570b7c271..f0b92cf7a 100644 --- a/include/util/Makefile.in +++ b/include/util/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/util -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,71 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +319,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +354,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +367,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-includeHEADERS install-exec-am: @@ -317,16 +393,18 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am deleted file mode 100644 index 379c0ba79..000000000 --- a/include/vm/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = *.h diff --git a/include/vm/Makefile.in b/include/vm/Makefile.in index ffd9de73d..8e04bb980 100644 --- a/include/vm/Makefile.in +++ b/include/vm/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +38,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/vm -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -48,6 +50,17 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -91,6 +104,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -151,7 +165,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -168,7 +181,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = *.h +include_HEADERS = *.h all: all-am .SUFFIXES: @@ -211,12 +224,71 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -247,8 +319,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -279,7 +354,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags dvi: dvi-am @@ -291,7 +367,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-includeHEADERS install-exec-am: @@ -317,16 +393,18 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-includeHEADERS uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/lib/Makefile.in b/lib/Makefile.in index 76ac90bc9..523c30bcb 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -109,6 +109,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -169,7 +170,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ diff --git a/libtool b/libtool deleted file mode 100755 index aeb8ab787..000000000 --- a/libtool +++ /dev/null @@ -1,7885 +0,0 @@ -#! /bin/sh - -# libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU spl 0.4.2) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED="/bin/sed" - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="/bin/sed -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags=" CXX F77" - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host thales: - -# Shell to use when invoking shell scripts. -SHELL="/bin/sh" - -# Whether or not to build shared libraries. -build_libtool_libs=yes - -# Whether or not to build static libraries. -build_old_libs=yes - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=no - -# Whether or not to optimize for fast installation. -fast_install=yes - -# The host system. -host_alias= -host=x86_64-redhat-linux-gnu -host_os=linux-gnu - -# The build system. -build_alias= -build=x86_64-redhat-linux-gnu -build_os=linux-gnu - -# An echo program that does not interpret backslashes. -echo="echo" - -# The archiver. -AR="ar" -AR_FLAGS="cru" - -# A C compiler. -LTCC="gcc" - -# LTCC compiler flags. -LTCFLAGS="-g -O2" - -# A language-specific compiler. -CC="gcc" - -# Is the compiler the GNU C compiler? -with_gcc=yes - -gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'` -gcc_ver=`gcc -dumpversion` - -# An ERE matcher. -EGREP="grep -E" - -# The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" - -# Whether we need hard or soft links. -LN_S="ln -s" - -# A BSD-compatible nm program. -NM="/usr/bin/nm -B" - -# A symbol stripping program -STRIP="strip" - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=file - -# Used on cygwin: DLL creation program. -DLLTOOL="dlltool" - -# Used on cygwin: object dumper. -OBJDUMP="objdump" - -# Used on cygwin: assembler. -AS="as" - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Object file suffix (normally "o"). -objext="o" - -# Old archive suffix (normally "a"). -libext="a" - -# Shared library suffix (normally ".so"). -shrext_cmds='.so' - -# Executable file suffix (normally ""). -exeext="" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" -pic_mode=default - -# What is the maximum length of a command? -max_cmd_len=32768 - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Must we lock files when doing compilation? -need_locks="no" - -# Do we need the lib prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Whether dlopen is supported. -dlopen_support=unknown - -# Whether dlopen of programs is supported. -dlopen_self=unknown - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=unknown - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec="" - -# Library versioning type. -version_type=linux - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" - -# The coded name of the library, if different from the real name. -soname_spec="\${libname}\${release}\${shared_ext}\$major" - -# Commands used to build and install an old-style archive. -RANLIB="ranlib" -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" -old_postuninstall_cmds="" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build and install a shared archive. -archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ - cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ - \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ - \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" -postinstall_cmds="" -postuninstall_cmds="" - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds="" -module_expsym_cmds="" - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps="" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd="\$MAGIC_CMD" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that forces no undefined symbols. -no_undefined_flag="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" - -# This is the shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# This is the shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=no - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist. -hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" - -# If ld is used when linking, flag to hardcode $libdir into -# a binary during linking. This must work even if $libdir does -# not exist. -hardcode_libdir_flag_spec_ld="" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="" - -# Set to yes if using DIR/libNAME during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=no - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=no - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=no - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Compile-time system search path for libraries -sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " - -# Fix the shell variable $srcfile for the compiler. -fix_srcfile_path="" - -# Set to yes if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - -# Symbols that must always be exported. -include_expsyms="" - -# ### END LIBTOOL CONFIG - -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor - 1` - age="$number_minor" - revision="$number_minor" - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - major=`expr $current - $age + 1` - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. -# for path in $notinst_path; do -# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` -# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` -# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` -# done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# Libtool was configured on host thales: - -# Shell to use when invoking shell scripts. -SHELL="/bin/sh" - -# Whether or not to build shared libraries. -build_libtool_libs=yes - -# Whether or not to build static libraries. -build_old_libs=yes - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=no - -# Whether or not to optimize for fast installation. -fast_install=yes - -# The host system. -host_alias= -host=x86_64-redhat-linux-gnu -host_os=linux-gnu - -# The build system. -build_alias= -build=x86_64-redhat-linux-gnu -build_os=linux-gnu - -# An echo program that does not interpret backslashes. -echo="echo" - -# The archiver. -AR="ar" -AR_FLAGS="cru" - -# A C compiler. -LTCC="gcc" - -# LTCC compiler flags. -LTCFLAGS="-g -O2" - -# A language-specific compiler. -CC="g++" - -# Is the compiler the GNU C compiler? -with_gcc=yes - -gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'` -gcc_ver=`gcc -dumpversion` - -# An ERE matcher. -EGREP="grep -E" - -# The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" - -# Whether we need hard or soft links. -LN_S="ln -s" - -# A BSD-compatible nm program. -NM="/usr/bin/nm -B" - -# A symbol stripping program -STRIP="strip" - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=file - -# Used on cygwin: DLL creation program. -DLLTOOL="dlltool" - -# Used on cygwin: object dumper. -OBJDUMP="objdump" - -# Used on cygwin: assembler. -AS="as" - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Object file suffix (normally "o"). -objext="o" - -# Old archive suffix (normally "a"). -libext="a" - -# Shared library suffix (normally ".so"). -shrext_cmds='.so' - -# Executable file suffix (normally ""). -exeext="" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" -pic_mode=default - -# What is the maximum length of a command? -max_cmd_len=32768 - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Must we lock files when doing compilation? -need_locks="no" - -# Do we need the lib prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Whether dlopen is supported. -dlopen_support=unknown - -# Whether dlopen of programs is supported. -dlopen_self=unknown - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=unknown - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec="" - -# Library versioning type. -version_type=linux - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" - -# The coded name of the library, if different from the real name. -soname_spec="\${libname}\${release}\${shared_ext}\$major" - -# Commands used to build and install an old-style archive. -RANLIB="ranlib" -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" -old_postuninstall_cmds="" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build and install a shared archive. -archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" -postinstall_cmds="" -postuninstall_cmds="" - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds="" -module_expsym_cmds="" - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=`echo "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=`echo "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=`echo "-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd="\$MAGIC_CMD" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that forces no undefined symbols. -no_undefined_flag="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" - -# This is the shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# This is the shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=no - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist. -hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" - -# If ld is used when linking, flag to hardcode $libdir into -# a binary during linking. This must work even if $libdir does -# not exist. -hardcode_libdir_flag_spec_ld="" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="" - -# Set to yes if using DIR/libNAME during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=no - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=no - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=no - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Compile-time system search path for libraries -sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " - -# Fix the shell variable $srcfile for the compiler. -fix_srcfile_path="" - -# Set to yes if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="" - -# Symbols that must always be exported. -include_expsyms="" - -# ### END LIBTOOL TAG CONFIG: CXX - -# ### BEGIN LIBTOOL TAG CONFIG: F77 - -# Libtool was configured on host thales: - -# Shell to use when invoking shell scripts. -SHELL="/bin/sh" - -# Whether or not to build shared libraries. -build_libtool_libs=yes - -# Whether or not to build static libraries. -build_old_libs=yes - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=no - -# Whether or not to optimize for fast installation. -fast_install=yes - -# The host system. -host_alias= -host=x86_64-redhat-linux-gnu -host_os=linux-gnu - -# The build system. -build_alias= -build=x86_64-redhat-linux-gnu -build_os=linux-gnu - -# An echo program that does not interpret backslashes. -echo="echo" - -# The archiver. -AR="ar" -AR_FLAGS="cru" - -# A C compiler. -LTCC="gcc" - -# LTCC compiler flags. -LTCFLAGS="-g -O2" - -# A language-specific compiler. -CC="g77" - -# Is the compiler the GNU C compiler? -with_gcc=yes - -gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'` -gcc_ver=`gcc -dumpversion` - -# An ERE matcher. -EGREP="grep -E" - -# The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" - -# Whether we need hard or soft links. -LN_S="ln -s" - -# A BSD-compatible nm program. -NM="/usr/bin/nm -B" - -# A symbol stripping program -STRIP="strip" - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=file - -# Used on cygwin: DLL creation program. -DLLTOOL="dlltool" - -# Used on cygwin: object dumper. -OBJDUMP="objdump" - -# Used on cygwin: assembler. -AS="as" - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Object file suffix (normally "o"). -objext="o" - -# Old archive suffix (normally "a"). -libext="a" - -# Shared library suffix (normally ".so"). -shrext_cmds='.so' - -# Executable file suffix (normally ""). -exeext="" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC" -pic_mode=default - -# What is the maximum length of a command? -max_cmd_len=32768 - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Must we lock files when doing compilation? -need_locks="no" - -# Do we need the lib prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Whether dlopen is supported. -dlopen_support=unknown - -# Whether dlopen of programs is supported. -dlopen_self=unknown - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=unknown - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Compiler flag to turn off builtin functions. -no_builtin_flag="" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec="" - -# Library versioning type. -version_type=linux - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" - -# The coded name of the library, if different from the real name. -soname_spec="\${libname}\${release}\${shared_ext}\$major" - -# Commands used to build and install an old-style archive. -RANLIB="ranlib" -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" -old_postuninstall_cmds="" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build and install a shared archive. -archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ - cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ - \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ - \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" -postinstall_cmds="" -postuninstall_cmds="" - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds="" -module_expsym_cmds="" - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps="" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd="\$MAGIC_CMD" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that forces no undefined symbols. -no_undefined_flag="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" - -# This is the shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# This is the shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=no - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist. -hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" - -# If ld is used when linking, flag to hardcode $libdir into -# a binary during linking. This must work even if $libdir does -# not exist. -hardcode_libdir_flag_spec_ld="" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="" - -# Set to yes if using DIR/libNAME during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=no - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=no - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=no - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Compile-time system search path for libraries -sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/nvidia/lib /usr/nvidia/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib " - -# Fix the shell variable $srcfile for the compiler. -fix_srcfile_path="" - -# Set to yes if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - -# Symbols that must always be exported. -include_expsyms="" - -# ### END LIBTOOL TAG CONFIG: F77 - diff --git a/module/Makefile.in b/module/Makefile.in index 86f8951ae..3fd7dbd8b 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -1,10 +1,19 @@ subdir-m += spl subdir-m += splat -all: - $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules - -install uninstall clean distclean maintainer-clean distdir: +modules clean: $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ +modules_install: + $(MAKE) -C @LINUX@ SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=addon $@ + +distdir: + list='$(subdir-m)'; for subdir in $$list; do \ + (find $$subdir -name '*.c' -o -name '*.h' | \ + xargs /bin/cp -t $$distdir/$$subdir); \ + done + +distclean maintainer-clean: clean +install: modules_install +all: modules check: diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index f92945b00..18f49434b 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -1,9 +1,6 @@ # Makefile.in for spl kernel module MODULES := spl -DISTFILES = Makefile.in \ - spl-kmem.c spl-rwlock.c spl-taskq.c \ - spl-thread.c spl-generic.c EXTRA_CFLAGS = @KERNELCPPFLAGS@ # Solaris porting layer module @@ -25,27 +22,3 @@ spl-objs += spl-atomic.o spl-objs += spl-mutex.o spl-objs += spl-kstat.o spl-objs += spl-condvar.o - -splmodule := spl.ko -splmoduledir := @kmoduledir@/kernel/lib/ - -install: - mkdir -p $(DESTDIR)$(splmoduledir) - $(INSTALL) -m 644 $(splmodule) $(DESTDIR)$(splmoduledir)/$(splmodule) - -/sbin/depmod -a - -uninstall: - rm -f $(DESTDIR)$(splmoduledir)/$(splmodule) - -/sbin/depmod -a - -clean: - -rm -f $(splmodule) *.o .*.cmd *.mod.c *.ko *.s */*.o - -distclean: clean - rm -f Makefile - rm -rf .tmp_versions - -maintainer-clean: distclean - -distdir: $(DISTFILES) - cp -p $(DISTFILES) $(distdir) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 1030cdd8e..944300bb4 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -118,7 +118,6 @@ spl_kmem_availrmem(void) } EXPORT_SYMBOL(spl_kmem_availrmem); -#if 0 size_t vmem_size(vmem_t *vmp, int typemask) { @@ -138,8 +137,6 @@ vmem_size(vmem_t *vmp, int typemask) return size; } EXPORT_SYMBOL(vmem_size); -#endif - /* * Memory allocation interfaces and debugging for basic kmem_* diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index 33b2865c1..c2d4c3f22 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -1,7 +1,6 @@ # Makefile.in for splat kernel module MODULES := splat -DISTFILES = Makefile.in *.c *.h EXTRA_CFLAGS = @KERNELCPPFLAGS@ # Solaris Porting LAyer Tests @@ -21,27 +20,3 @@ splat-objs += splat-kobj.o splat-objs += splat-atomic.o splat-objs += splat-list.o splat-objs += splat-generic.o - -splatmodule := splat.ko -splatmoduledir := @kmoduledir@/kernel/lib/ - -install: - mkdir -p $(DESTDIR)$(splatmoduledir) - $(INSTALL) -m 644 $(splatmodule) $(DESTDIR)$(splatmoduledir)/$(splatmodule) - -/sbin/depmod -a - -uninstall: - rm -f $(DESTDIR)$(splatmoduledir)/$(splatmodule) - -/sbin/depmod -a - -clean: - -rm -f $(splmodule) *.o .*.cmd *.mod.c *.ko *.s */*.o - -distclean: clean - rm -f Makefile - rm -rf .tmp_versions - -maintainer-clean: distclean - -distdir: $(DISTFILES) - cp -p $(DISTFILES) $(distdir) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index eb711fec6..949d77bdb 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = spl.spec.in +EXTRA_DIST = check.sh check: ./check.sh diff --git a/scripts/Makefile.in b/scripts/Makefile.in index e82088e59..3fb7ce62b 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -37,8 +37,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/spl.spec.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac @@ -46,7 +45,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = spl.spec +CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -92,6 +91,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -152,7 +152,6 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -kmoduledir = @kmoduledir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -169,7 +168,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -EXTRA_DIST = spl.spec.in +EXTRA_DIST = check.sh all: all-am .SUFFIXES: @@ -202,8 +201,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -spl.spec: $(top_builddir)/config.status $(srcdir)/spl.spec.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo diff --git a/scripts/spl.spec.in b/scripts/spl.spec.in deleted file mode 100644 index 9d9d4e325..000000000 --- a/scripts/spl.spec.in +++ /dev/null @@ -1,28 +0,0 @@ -# spl -%define name @PACKAGE@ -%define version @VERSION@ - -Summary: Solaris Porting Layer -Name: %{name} -Version: %{version} -Release: 1 -Copyright: GPL -Group: Utilities/System -BuildRoot: /tmp/%{name}-%{version} -Source: %{name}-%{version}.tar.gz - -%description -Abstration layer to provide Solaris style primatives in the linux kernel. - -%prep -%setup -q -./configure - -%build -rm -rf $RPM_BUILD_ROOT -make - -%install -make install "DESTDIR=$RPM_BUILD_ROOT" - -%files diff --git a/spl.spec.in b/spl.spec.in new file mode 100644 index 000000000..3090ba710 --- /dev/null +++ b/spl.spec.in @@ -0,0 +1,104 @@ +# The following block is used to allow the source RPM to be rebuilt +# against arbitrary kernels. It ensure the release name is correct +# and the proper build/install requires are set. +%if 0%{?require_kver:1} +%define kver %{require_kver} +%else +%define _kdir %((echo X; ls -1d /usr/src/kernels/* /usr/src/linux-* 2>/dev/null)|sed -e 's/linux-//' | tail -1) +%define kver %(basename %{_kdir}) +%endif + +# Each distro has its own kernel package naming convention. +%if 0%{?ch4} +%define kstr chaos-kernel +%define kdev chaos-kernel-devel +%define kdir /usr/src/kernels/%{kver} +%else +%define kstr kernel +%define kdev kernel-devel +%define kdir /usr/src/kernels/%{kver} +%endif + +%define debug_package %{nil} + +# The kernel version should only be appended to a binary RPM. +# When building a source RPM it must be kernel version agnostic. +%define name @PACKAGE@ +%define version @VERSION@ + +%if %{?build_src_rpm:1}0 +%define release @SPL_META_RELEASE@ +%else +%define release @SPL_META_RELEASE@_%(echo %{kver} | sed -e 's/-/_/g') +%endif + +%if 0%{?require_kver:1} +%define buildrequires %{kdev}=%{kver} +%else +%define buildrequires %{kdev} +%endif + +Summary: Solaris Porting Layer +Group: Utilities/System +Name: %{name} +Version: %{version} +Release: %{release} +License: GPL +URL: git://eris.llnl.gov/spl.git +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) +Source: %{name}-%{version}.tar.gz +Requires: %{kstr} = %{kver} +BuildRequires: %{buildrequires} + +%description +The %{name} package contains kernel modules and support utilities for +emulating Solaris style primatives in the linux kernel. These include, +but are not limited too, atomic, condvar, debug, error, memory, kobject, +kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. + +%package devel +Summary: Solaris Porting Layer Headers and Symbols +Group: Development/Libraries +Requires: %{kstr} = %{kver} +BuildRequires: %{buildrequires} + +%description devel +The %{name}-devel package contains the header files and Module.symvers +symbols needed for building additional modules which use %{name}. + +%prep +%setup +%build +%configure --includedir=%{kdir}/include/spl --with-linux=%{kdir} +make + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%doc AUTHORS ChangeLog COPYING DISCLAIMER INSTALL +%{_sbindir}/* +/lib/modules/* + +%files devel +%defattr(-,root,root) +%{kdir}/include/spl/* + +%post +if [ -f /boot/System.map-%{kver} ]; then + depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +else + depmod -ae %{kver} || exit 0 +fi + +%postun +if [ -f /boot/System.map-%{kver} ]; then + depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +else + depmod -ae %{kver} || exit 0 +fi From d4326403de5f1fe9634c3d9468a51076eff702b6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 9 Mar 2009 16:50:37 -0700 Subject: [PATCH 0253/1062] Build System Default Kernel Update the method used for determining which kernel to build against when not specified. Previous 'uname -r' was used but this makes the assumption that the running kernel is the one you want to use, this is often not the case. It is better to examine the usual kernel-devel install locations and select one of the installed kernels. --- config/spl-build.m4 | 23 +++++++---------------- configure | 23 +++++++---------------- 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b6e44a7f2..f2dc7fa9e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1,6 +1,4 @@ AC_DEFUN([SPL_AC_KERNEL], [ - ver=`uname -r` - AC_ARG_WITH([linux], AS_HELP_STRING([--with-linux=PATH], [Path to kernel source]), @@ -14,19 +12,12 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_CHECKING([kernel source directory]) if test -z "$kernelsrc"; then kernelbuild= - sourcelink=/lib/modules/${ver}/source - buildlink=/lib/modules/${ver}/build + sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* 2>/dev/null | tail -1` - if test -e $sourcelink; then - kernelsrc=`(cd $sourcelink; /bin/pwd)` - fi - if test -e $buildlink; then - kernelbuild=`(cd $buildlink; /bin/pwd)` - fi - if test -z "$kernelsrc"; then - kernelsrc=$kernelbuild - fi - if test -z "$kernelsrc" -o -z "$kernelbuild"; then + if test -e ${sourcelink}; then + kernelsrc=`readlink -f ${sourcelink}` + kernelbuild=${kernelsrc} + else AC_MSG_RESULT([Not found]) AC_MSG_ERROR([ *** Please specify the location of the kernel source @@ -48,7 +39,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ kernsrcver=`(echo "#include "; echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | + cpp -I $kernelbuild/include | grep "^kernsrcver=" | cut -d \" -f 2` elif test -r $kernelbuild/include/linux/utsrelease.h && @@ -56,7 +47,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ kernsrcver=`(echo "#include "; echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | + cpp -I $kernelbuild/include | grep "^kernsrcver=" | cut -d \" -f 2` fi diff --git a/configure b/configure index 8f5ec50c4..0c4a90cc6 100755 --- a/configure +++ b/configure @@ -18921,8 +18921,6 @@ LINUX= LINUX_OBJ= - ver=`uname -r` - # Check whether --with-linux or --without-linux was given. if test "${with_linux+set}" = set; then @@ -18941,19 +18939,12 @@ fi; echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 if test -z "$kernelsrc"; then kernelbuild= - sourcelink=/lib/modules/${ver}/source - buildlink=/lib/modules/${ver}/build + sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* 2>/dev/null | tail -1` - if test -e $sourcelink; then - kernelsrc=`(cd $sourcelink; /bin/pwd)` - fi - if test -e $buildlink; then - kernelbuild=`(cd $buildlink; /bin/pwd)` - fi - if test -z "$kernelsrc"; then - kernelsrc=$kernelbuild - fi - if test -z "$kernelsrc" -o -z "$kernelbuild"; then + if test -e ${sourcelink}; then + kernelsrc=`readlink -f ${sourcelink}` + kernelbuild=${kernelsrc} + else echo "$as_me:$LINENO: result: Not found" >&5 echo "${ECHO_T}Not found" >&6 { { echo "$as_me:$LINENO: error: @@ -18984,7 +18975,7 @@ echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 kernsrcver=`(echo "#include "; echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | + cpp -I $kernelbuild/include | grep "^kernsrcver=" | cut -d \" -f 2` elif test -r $kernelbuild/include/linux/utsrelease.h && @@ -18992,7 +18983,7 @@ echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 kernsrcver=`(echo "#include "; echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | + cpp -I $kernelbuild/include | grep "^kernsrcver=" | cut -d \" -f 2` fi From 0c617c9a63c733643019a8d930d902ce56b153cc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 10 Mar 2009 10:57:52 -0700 Subject: [PATCH 0254/1062] Build system cleanup 1) Undefine non-unique entries in spl_config.h 2) Minor Makefile cleanup 3) Don't use includedir for proper kernel header install --- Makefile.am | 6 ++-- Makefile.in | 56 +++++++++--------------------------- config/spl-meta.m4 | 12 ++++++++ configure | 69 +++++++++++++++++++++++++-------------------- configure.ac | 4 +-- include/Makefile.am | 38 +++++++++++++++---------- include/Makefile.in | 64 +++++++++++++---------------------------- module/Makefile.in | 7 ++++- spl.spec.in | 2 +- spl_config.h.in | 10 +++++++ 10 files changed, 127 insertions(+), 141 deletions(-) diff --git a/Makefile.am b/Makefile.am index 410d9a689..37182fe7f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,8 @@ SUBDIRS = lib cmd module include scripts AUTOMAKE_OPTIONS = foreign dist-zip -EXTRA_DIST = autogen.sh spl.spec META DISCLAIMER -include_HEADERS = spl_config.h +EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER +noinst_HEADERS = spl_config.h distclean-local:: -$(RM) -R autom4te*.cache @@ -16,7 +16,7 @@ distclean-local:: -type f -print | xargs $(RM) install-data-local: - $(INSTALL) module/Module.symvers $(DESTDIR)/$(includedir) + $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h ctags: $(RM) $(top_srcdir)/tags diff --git a/Makefile.in b/Makefile.in index 1bdb7b7a9..6b212bb65 100644 --- a/Makefile.in +++ b/Makefile.in @@ -37,7 +37,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(am__configure_deps) $(include_HEADERS) \ +DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/spl.spec.in $(srcdir)/spl_config.h.in \ $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ @@ -66,15 +66,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) +HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -210,8 +202,8 @@ target_os = @target_os@ target_vendor = @target_vendor@ SUBDIRS = lib cmd module include scripts AUTOMAKE_OPTIONS = foreign dist-zip -EXTRA_DIST = autogen.sh spl.spec META DISCLAIMER -include_HEADERS = spl_config.h +EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER +noinst_HEADERS = spl_config.h all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -284,23 +276,6 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -580,9 +555,6 @@ check: check-recursive all-am: Makefile $(HEADERS) spl_config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -627,7 +599,7 @@ info: info-recursive info-am: -install-data-am: install-data-local install-includeHEADERS +install-data-am: install-data-local install-exec-am: @@ -655,7 +627,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-includeHEADERS uninstall-info-am +uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive @@ -668,14 +640,12 @@ uninstall-info: uninstall-info-recursive distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-exec \ - install-exec-am install-includeHEADERS install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am distclean-local:: @@ -690,7 +660,7 @@ distclean-local:: -type f -print | xargs $(RM) install-data-local: - $(INSTALL) module/Module.symvers $(DESTDIR)/$(includedir) + $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h ctags: $(RM) $(top_srcdir)/tags diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index 0fd1f65d0..54c9ac38f 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -4,8 +4,20 @@ dnl # Read metadata from the META file. dnl # dnl # AUTHOR: dnl # Chris Dunlap +dnl # Brian Behlendorf dnl # AC_DEFUN([SPL_AC_META], [ + + AH_BOTTOM([ +#undef PACKAGE +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#undef STDC_HEADERS +#undef VERSION]) + AC_MSG_CHECKING([metadata]) META="$srcdir/META" diff --git a/configure b/configure index 0c4a90cc6..92dd8d732 100755 --- a/configure +++ b/configure @@ -1503,6 +1503,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + echo "$as_me:$LINENO: checking metadata" >&5 echo $ECHO_N "checking metadata... $ECHO_C" >&6 @@ -3978,7 +3988,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3981 "configure"' > conftest.$ac_ext + echo '#line 3991 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5577,7 +5587,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5580:" \ +echo "$as_me:5590:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6640,11 +6650,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6643: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6653: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6647: \$? = $ac_status" >&5 + echo "$as_me:6657: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6908,11 +6918,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6911: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6921: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6915: \$? = $ac_status" >&5 + echo "$as_me:6925: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7012,11 +7022,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7015: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7025: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7019: \$? = $ac_status" >&5 + echo "$as_me:7029: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8481,7 +8491,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8484 "configure"' > conftest.$ac_ext + echo '#line 8494 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9378,7 +9388,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11834: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11828: \$? = $ac_status" >&5 + echo "$as_me:11838: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11925,11 +11935,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11928: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11938: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11932: \$? = $ac_status" >&5 + echo "$as_me:11942: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12461,7 +12471,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12464 "configure"' > conftest.$ac_ext + echo '#line 12474 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13519,11 +13529,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13522: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13532: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13526: \$? = $ac_status" >&5 + echo "$as_me:13536: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13623,11 +13633,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13626: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13636: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13630: \$? = $ac_status" >&5 + echo "$as_me:13640: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15072,7 +15082,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15075 "configure"' > conftest.$ac_ext + echo '#line 15085 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15850,11 +15860,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15853: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15863: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15857: \$? = $ac_status" >&5 + echo "$as_me:15867: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16118,11 +16128,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16121: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16131: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16125: \$? = $ac_status" >&5 + echo "$as_me:16135: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16222,11 +16232,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16225: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16235: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16229: \$? = $ac_status" >&5 + echo "$as_me:16239: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17691,7 +17701,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17694 "configure"' > conftest.$ac_ext + echo '#line 17704 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -18916,9 +18926,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -LINUX= -LINUX_OBJ= diff --git a/configure.ac b/configure.ac index 6285afa22..7409cba6e 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,7 @@ */ AC_INIT +AC_LANG(C) SPL_AC_META AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM @@ -36,9 +37,6 @@ AC_PROG_INSTALL AC_PROG_CC AC_PROG_LIBTOOL -LINUX= -LINUX_OBJ= - SPL_AC_KERNEL SPL_AC_LICENSE SPL_AC_DEBUG diff --git a/include/Makefile.am b/include/Makefile.am index 0b58dd9f8..f85380f79 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,15 +1,23 @@ -# All headers are referenced by this top level Makefile.am and the -# nobase_* rule is used to ensure all path information is preserved -# when using the 'make install' target. -nobase_include_HEADERS = *.h -nobase_include_HEADERS += asm/*.h -nobase_include_HEADERS += fs/*.h -nobase_include_HEADERS += linux/*.h -nobase_include_HEADERS += rpc/*.h -nobase_include_HEADERS += sharefs/*.h -nobase_include_HEADERS += sys/fm/*.h -nobase_include_HEADERS += sys/fs/*.h -nobase_include_HEADERS += sys/sysevent/*.h -nobase_include_HEADERS += sys/*.h -nobase_include_HEADERS += util/*.h -nobase_include_HEADERS += vm/*.h +# All headers are referenced by this top level Makefile.am are +# noinst_HEADERS because they are not installed in the usual include +# location. We do not want to be using $includedir for this. +# Installation is handled by the custom install-data-local rule. +noinst_HEADERS = *.h +noinst_HEADERS += asm/*.h +noinst_HEADERS += fs/*.h +noinst_HEADERS += linux/*.h +noinst_HEADERS += rpc/*.h +noinst_HEADERS += sharefs/*.h +noinst_HEADERS += sys/fm/*.h +noinst_HEADERS += sys/fs/*.h +noinst_HEADERS += sys/sysevent/*.h +noinst_HEADERS += sys/*.h +noinst_HEADERS += util/*.h +noinst_HEADERS += vm/*.h + +install-data-local: + instdest=$(DESTDIR)/$(LINUX)/include/spl; \ + instfiles=`find . -name '*.h'`; \ + for instfile in $$instfiles; do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + done diff --git a/include/Makefile.in b/include/Makefile.in index 4dfe80800..e70ab9ff7 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -38,7 +38,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include -DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ @@ -50,15 +50,7 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -nobase_includeHEADERS_INSTALL = $(install_sh_DATA) -HEADERS = $(nobase_include_HEADERS) +HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -182,12 +174,12 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -# All headers are referenced by this top level Makefile.am and the -# nobase_* rule is used to ensure all path information is preserved -# when using the 'make install' target. -nobase_include_HEADERS = *.h asm/*.h fs/*.h linux/*.h rpc/*.h \ - sharefs/*.h sys/fm/*.h sys/fs/*.h sys/sysevent/*.h sys/*.h \ - util/*.h vm/*.h +# All headers are referenced by this top level Makefile.am are +# noinst_HEADERS because they are not installed in the usual include +# location. We do not want to be using $includedir for this. +# Installation is handled by the custom install-data-local rule. +noinst_HEADERS = *.h asm/*.h fs/*.h linux/*.h rpc/*.h sharefs/*.h \ + sys/fm/*.h sys/fs/*.h sys/sysevent/*.h sys/*.h util/*.h vm/*.h all: all-am .SUFFIXES: @@ -230,25 +222,6 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: -install-nobase_includeHEADERS: $(nobase_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__vpath_adj) \ - echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-nobase_includeHEADERS: - @$(NORMAL_UNINSTALL) - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - $(am__vpath_adj) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -330,9 +303,6 @@ check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -376,7 +346,7 @@ info: info-am info-am: -install-data-am: install-nobase_includeHEADERS +install-data-am: install-data-local install-exec-am: @@ -402,20 +372,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS +uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ + install-data-am install-data-local install-exec \ + install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-nobase_includeHEADERS + tags uninstall uninstall-am uninstall-info-am + +install-data-local: + instdest=$(DESTDIR)/$(LINUX)/include/spl; \ + instfiles=`find . -name '*.h'`; \ + for instfile in $$instfiles; do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/module/Makefile.in b/module/Makefile.in index 3fd7dbd8b..abb379482 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -1,11 +1,16 @@ subdir-m += spl subdir-m += splat +INSTALL=/usr/bin/install + modules clean: $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ modules_install: - $(MAKE) -C @LINUX@ SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=addon $@ + $(MAKE) -C @LINUX@ SUBDIRS=`pwd` \ + INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=addon $@ + $(INSTALL) -D Module.symvers \ + $(DESTDIR)/@LINUX@/include/spl/Module.symvers distdir: list='$(subdir-m)'; for subdir in $$list; do \ diff --git a/spl.spec.in b/spl.spec.in index 3090ba710..cb2648509 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -69,7 +69,7 @@ symbols needed for building additional modules which use %{name}. %prep %setup %build -%configure --includedir=%{kdir}/include/spl --with-linux=%{kdir} +%configure --with-linux=%{kdir} make %install diff --git a/spl_config.h.in b/spl_config.h.in index 7e677708a..931539c81 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -179,3 +179,13 @@ /* Version number of package */ #undef VERSION + + +#undef PACKAGE +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#undef STDC_HEADERS +#undef VERSION From f48b61938a7efc427946418e987ce751ca6160c7 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 10 Mar 2009 19:51:45 +0000 Subject: [PATCH 0255/1062] Add XDR implementation Added proper XDR implementation (Lustre bug 17662), needed for on-disk compatibility between platforms of different endianness. --- include/rpc/types.h | 2 +- include/rpc/xdr.h | 152 +++++++++++- module/spl/Makefile.in | 1 + module/spl/spl-xdr.c | 517 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 670 insertions(+), 2 deletions(-) create mode 100644 module/spl/spl-xdr.c diff --git a/include/rpc/types.h b/include/rpc/types.h index 537d322f1..e73fd9c05 100644 --- a/include/rpc/types.h +++ b/include/rpc/types.h @@ -1,6 +1,6 @@ #ifndef _SPL_RPC_TYPES_H #define _SPL_RPC_TYPES_H -#include +typedef int bool_t; #endif /* SPL_RPC_TYPES_H */ diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index 3cd3574eb..5b8165460 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -1,6 +1,156 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Sun Microsystems, Inc. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef _SPL_RPC_XDR_H #define _SPL_RPC_XDR_H -#include +#include +#include + +/* + * XDR enums and types. + */ +enum xdr_op { + XDR_ENCODE, + XDR_DECODE +}; + +struct xdr_ops; + +typedef struct { + struct xdr_ops *x_ops; /* Also used to let caller know if + xdrmem_create() succeeds (sigh..) */ + caddr_t x_addr; /* Current buffer addr */ + caddr_t x_addr_end; /* End of the buffer */ + enum xdr_op x_op; /* Stream direction */ +} XDR; + +typedef bool_t (*xdrproc_t)(XDR *xdrs, void *ptr); + +struct xdr_ops { + bool_t (*xdr_control)(XDR *, int, void *); + + bool_t (*xdr_char)(XDR *, char *); + bool_t (*xdr_u_short)(XDR *, unsigned short *); + bool_t (*xdr_u_int)(XDR *, unsigned *); + bool_t (*xdr_u_longlong_t)(XDR *, u_longlong_t *); + + bool_t (*xdr_opaque)(XDR *, caddr_t, const uint_t); + bool_t (*xdr_string)(XDR *, char **, const uint_t); + bool_t (*xdr_array)(XDR *, caddr_t *, uint_t *, const uint_t, + const uint_t, const xdrproc_t); +}; + +/* + * XDR control operator. + */ +#define XDR_GET_BYTES_AVAIL 1 + +struct xdr_bytesrec { + bool_t xc_is_last_record; + size_t xc_num_avail; +}; + +typedef struct xdr_bytesrec xdr_bytesrec; + +/* + * XDR functions. + */ +void xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, + const enum xdr_op op); +#define xdr_destroy(xdrs) ((void) 0) /* Currently not needed. If needed later, + we'll add it to struct xdr_ops */ + +#define xdr_control(xdrs, req, info) (xdrs)->x_ops->xdr_control((xdrs), \ + (req), (info)) + +/* + * For precaution, the following are defined as static inlines instead of macros + * to get some amount of type safety. + * + * Also, macros wouldn't work in the case where typecasting is done, because it + * must be possible to reference the functions' addresses by these names. + */ +static inline bool_t xdr_char(XDR *xdrs, char *cp) +{ + return xdrs->x_ops->xdr_char(xdrs, cp); +} + +static inline bool_t xdr_u_short(XDR *xdrs, unsigned short *usp) +{ + return xdrs->x_ops->xdr_u_short(xdrs, usp); +} + +static inline bool_t xdr_short(XDR *xdrs, short *sp) +{ + BUILD_BUG_ON(sizeof(short) != 2); + return xdrs->x_ops->xdr_u_short(xdrs, (unsigned short *) sp); +} + +static inline bool_t xdr_u_int(XDR *xdrs, unsigned *up) +{ + return xdrs->x_ops->xdr_u_int(xdrs, up); +} + +static inline bool_t xdr_int(XDR *xdrs, int *ip) +{ + BUILD_BUG_ON(sizeof(int) != 4); + return xdrs->x_ops->xdr_u_int(xdrs, (unsigned *) ip); +} + +static inline bool_t xdr_u_longlong_t(XDR *xdrs, u_longlong_t *ullp) +{ + return xdrs->x_ops->xdr_u_longlong_t(xdrs, ullp); +} + +static inline bool_t xdr_longlong_t(XDR *xdrs, longlong_t *llp) +{ + BUILD_BUG_ON(sizeof(longlong_t) != 8); + return xdrs->x_ops->xdr_u_longlong_t(xdrs, (u_longlong_t *) llp); +} + +/* + * Fixed-length opaque data. + */ +static inline bool_t xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt) +{ + return xdrs->x_ops->xdr_opaque(xdrs, cp, cnt); +} + +/* + * Variable-length string. + * The *sp buffer must have (maxsize + 1) bytes. + */ +static inline bool_t xdr_string(XDR *xdrs, char **sp, const uint_t maxsize) +{ + return xdrs->x_ops->xdr_string(xdrs, sp, maxsize); +} + +/* + * Variable-length arrays. + */ +static inline bool_t xdr_array(XDR *xdrs, caddr_t *arrp, uint_t *sizep, + const uint_t maxsize, const uint_t elsize, const xdrproc_t elproc) +{ + return xdrs->x_ops->xdr_array(xdrs, arrp, sizep, maxsize, elsize, + elproc); +} #endif /* SPL_RPC_XDR_H */ diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 18f49434b..e9c8d3470 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -22,3 +22,4 @@ spl-objs += spl-atomic.o spl-objs += spl-mutex.o spl-objs += spl-kstat.o spl-objs += spl-condvar.o +spl-objs += spl-xdr.o diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c new file mode 100644 index 000000000..feaa59e4f --- /dev/null +++ b/module/spl/spl-xdr.c @@ -0,0 +1,517 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2008 Sun Microsystems, Inc. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include +#include +#include + +#include +#include + +/* + * SPL's XDR mem implementation. + * + * This is used by libnvpair to serialize/deserialize the name-value pair data + * structures into byte arrays in a well-defined and portable manner. + * + * These data structures are used by the DMU/ZFS to flexibly manipulate various + * information in memory and later serialize it/deserialize it to disk. + * Examples of usages include the pool configuration, lists of pool and dataset + * properties, etc. + * + * Reference documentation for the XDR representation and XDR operations can be + * found in RFC 1832 and xdr(3), respectively. + * + * === Implementation shortcomings === + * + * It is assumed that the following C types have the following sizes: + * + * char/unsigned char: 1 byte + * short/unsigned short: 2 bytes + * int/unsigned int: 4 bytes + * longlong_t/u_longlong_t: 8 bytes + * + * The C standard allows these types to be larger (and in the case of ints, + * shorter), so if that is the case on some compiler/architecture, the build + * will fail (on purpose). + * + * If someone wants to fix the code to work properly on such environments, then: + * + * 1) Preconditions should be added to xdrmem_enc functions to make sure the + * caller doesn't pass arguments which exceed the expected range. + * 2) Functions which take signed integers should be changed to properly do + * sign extension. + * 3) For ints with less than 32 bits, well.. I suspect you'll have bigger + * problems than this implementation. + * + * It is also assumed that: + * + * 1) Chars have 8 bits. + * 2) We can always do 32-bit-aligned int memory accesses and byte-aligned + * memcpy, memset and memcmp. + * 3) Arrays passed to xdr_array() are packed and the compiler/architecture + * supports element-sized-aligned memory accesses. + * 4) Negative integers are natively stored in two's complement binary + * representation. + * + * No checks are done for the 4 assumptions above, though. + * + * === Caller expectations === + * + * Existing documentation does not describe the semantics of XDR operations very + * well. Therefore, some assumptions about failure semantics will be made and + * will be described below: + * + * 1) If any encoding operation fails (e.g., due to lack of buffer space), the + * the stream should be considered valid only up to the encoding operation + * previous to the one that first failed. However, the stream size as returned + * by xdr_control() cannot be considered to be strictly correct (it may be + * bigger). + * + * Putting it another way, if there is an encoding failure it's undefined + * whether anything is added to the stream in that operation and therefore + * neither xdr_control() nor future encoding operations on the same stream can + * be relied upon to produce correct results. + * + * 2) If a decoding operation fails, it's undefined whether anything will be + * decoded into passed buffers/pointers during that operation, or what the + * values on those buffers will look like. + * + * Future decoding operations on the same stream will also have similar + * undefined behavior. + * + * 3) When the first decoding operation fails it is OK to trust the results of + * previous decoding operations on the same stream, as long as the caller + * expects a failure to be possible (e.g. due to end-of-stream). + * + * However, this is highly discouraged because the caller should know the + * stream size and should be coded to expect any decoding failure to be data + * corruption due to hardware, accidental or even malicious causes, which should + * be handled gracefully in all cases. + * + * In very rare situations where there are strong reasons to believe the data + * can be trusted to be valid and non-tampered with, then the caller may assume + * a decoding failure to be a bug (e.g. due to mismatched data types) and may + * fail non-gracefully. + * + * 4) Non-zero padding bytes will cause the decoding operation to fail. + * + * 5) Zero bytes on string types will also cause the decoding operation to fail. + * + * 6) It is assumed that either the pointer to the stream buffer given by the + * caller is 32-bit aligned or the architecture supports non-32-bit-aligned int + * memory accesses. + * + * 7) The stream buffer and encoding/decoding buffers/ptrs should not overlap. + * + * 8) If a caller passes pointers to non-kernel memory (e.g., pointers to user + * space or MMIO space), the computer may explode. + */ + +static struct xdr_ops xdrmem_encode_ops; +static struct xdr_ops xdrmem_decode_ops; + +void +xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, + const enum xdr_op op) +{ + switch (op) { + case XDR_ENCODE: + xdrs->x_ops = &xdrmem_encode_ops; + break; + case XDR_DECODE: + xdrs->x_ops = &xdrmem_decode_ops; + break; + default: + CWARN("Invalid op value: %d\n", op); + xdrs->x_ops = NULL; /* Let the caller know we failed */ + return; + } + + xdrs->x_op = op; + xdrs->x_addr = addr; + xdrs->x_addr_end = addr + size; + + if (xdrs->x_addr_end < xdrs->x_addr) { + CWARN("Overflow while creating xdrmem: %p, %u\n", addr, size); + xdrs->x_ops = NULL; + } +} +EXPORT_SYMBOL(xdrmem_create); + +static bool_t +xdrmem_control(XDR *xdrs, int req, void *info) +{ + struct xdr_bytesrec *rec = (struct xdr_bytesrec *) info; + + if (req != XDR_GET_BYTES_AVAIL) { + CWARN("Called with unknown request: %d\n", req); + return FALSE; + } + + rec->xc_is_last_record = TRUE; /* always TRUE in xdrmem streams */ + rec->xc_num_avail = xdrs->x_addr_end - xdrs->x_addr; + + return TRUE; +} + +static bool_t +xdrmem_enc_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) +{ + uint_t size = roundup(cnt, 4); + uint_t pad; + + if (size < cnt) + return FALSE; /* Integer overflow */ + + if (xdrs->x_addr > xdrs->x_addr_end) + return FALSE; + + if (xdrs->x_addr_end - xdrs->x_addr > size) + return FALSE; + + memcpy(xdrs->x_addr, cp, cnt); + + xdrs->x_addr += cnt; + + pad = size - cnt; + if (pad > 0) { + memset(xdrs->x_addr, 0, pad); + xdrs->x_addr += pad; + } + + return TRUE; +} + +static bool_t +xdrmem_dec_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) +{ + static uint32_t zero = 0; + uint_t size = roundup(cnt, 4); + uint_t pad; + + if (size < cnt) + return FALSE; /* Integer overflow */ + + if (xdrs->x_addr > xdrs->x_addr_end) + return FALSE; + + if (xdrs->x_addr_end - xdrs->x_addr > size) + return FALSE; + + memcpy(cp, xdrs->x_addr, cnt); + xdrs->x_addr += cnt; + + pad = size - cnt; + if (pad > 0) { + /* An inverted memchr() would be useful here... */ + if (memcmp(&zero, xdrs->x_addr, pad) != 0) + return FALSE; + + xdrs->x_addr += pad; + } + + return TRUE; +} + +static bool_t +xdrmem_enc_uint32(XDR *xdrs, uint32_t val) +{ + if (xdrs->x_addr + sizeof(uint32_t) > xdrs->x_addr_end) + return FALSE; + + *((uint32_t *) xdrs->x_addr) = cpu_to_be32(val); + + xdrs->x_addr += sizeof(uint32_t); + + return TRUE; +} + +static bool_t +xdrmem_dec_uint32(XDR *xdrs, uint32_t *val) +{ + if (xdrs->x_addr + sizeof(uint32_t) > xdrs->x_addr_end) + return FALSE; + + *val = be32_to_cpu(*((uint32_t *) xdrs->x_addr)); + + xdrs->x_addr += sizeof(uint32_t); + + return TRUE; +} + +static bool_t +xdrmem_enc_char(XDR *xdrs, char *cp) +{ + uint32_t val; + + BUILD_BUG_ON(sizeof(char) != 1); + val = *((unsigned char *) cp); + + return xdrmem_enc_uint32(xdrs, val); +} + +static bool_t +xdrmem_dec_char(XDR *xdrs, char *cp) +{ + uint32_t val; + + BUILD_BUG_ON(sizeof(char) != 1); + + if (!xdrmem_dec_uint32(xdrs, &val)) + return FALSE; + + /* + * If any of the 3 other bytes are non-zero then val will be greater + * than 0xff and we fail because according to the RFC, this block does + * not have a char encoded in it. + */ + if (val > 0xff) + return FALSE; + + *((unsigned char *) cp) = val; + + return TRUE; +} + +static bool_t +xdrmem_enc_ushort(XDR *xdrs, unsigned short *usp) +{ + BUILD_BUG_ON(sizeof(unsigned short) != 2); + + return xdrmem_enc_uint32(xdrs, *usp); +} + +static bool_t +xdrmem_dec_ushort(XDR *xdrs, unsigned short *usp) +{ + uint32_t val; + + BUILD_BUG_ON(sizeof(unsigned short) != 2); + + if (!xdrmem_dec_uint32(xdrs, &val)) + return FALSE; + + /* + * Short ints are not in the RFC, but we assume similar logic as in + * xdrmem_dec_char(). + */ + if (val > 0xffff) + return FALSE; + + *usp = val; + + return TRUE; +} + +static bool_t +xdrmem_enc_uint(XDR *xdrs, unsigned *up) +{ + BUILD_BUG_ON(sizeof(unsigned) != 4); + + return xdrmem_enc_uint32(xdrs, *up); +} + +static bool_t +xdrmem_dec_uint(XDR *xdrs, unsigned *up) +{ + BUILD_BUG_ON(sizeof(unsigned) != 4); + + return xdrmem_dec_uint32(xdrs, (uint32_t *) up); +} + +static bool_t +xdrmem_enc_ulonglong(XDR *xdrs, u_longlong_t *ullp) +{ + BUILD_BUG_ON(sizeof(u_longlong_t) != 8); + + if (!xdrmem_enc_uint32(xdrs, *ullp >> 32)) + return FALSE; + + return xdrmem_enc_uint32(xdrs, *ullp & 0xffffffff); +} + +static bool_t +xdrmem_dec_ulonglong(XDR *xdrs, u_longlong_t *ullp) +{ + uint32_t low, high; + + BUILD_BUG_ON(sizeof(u_longlong_t) != 8); + + if (!xdrmem_dec_uint32(xdrs, &high)) + return FALSE; + if (!xdrmem_dec_uint32(xdrs, &low)) + return FALSE; + + *ullp = ((u_longlong_t) high << 32) | low; + + return TRUE; +} + +static bool_t +xdr_enc_array(XDR *xdrs, caddr_t *arrp, uint_t *sizep, const uint_t maxsize, + const uint_t elsize, const xdrproc_t elproc) +{ + uint_t i; + caddr_t addr = *arrp; + + if (*sizep > maxsize || *sizep > UINT_MAX / elsize) + return FALSE; + + if (!xdrmem_enc_uint(xdrs, sizep)) + return FALSE; + + for (i = 0; i < *sizep; i++) { + if (!elproc(xdrs, addr)) + return FALSE; + addr += elsize; + } + + return TRUE; +} + +static bool_t +xdr_dec_array(XDR *xdrs, caddr_t *arrp, uint_t *sizep, const uint_t maxsize, + const uint_t elsize, const xdrproc_t elproc) +{ + uint_t i, size; + bool_t alloc = FALSE; + caddr_t addr; + + if (!xdrmem_dec_uint(xdrs, sizep)) + return FALSE; + + size = *sizep; + + if (size > maxsize || size > UINT_MAX / elsize) + return FALSE; + + /* + * The Solaris man page says: "If *arrp is NULL when decoding, + * xdr_array() allocates memory and *arrp points to it". + */ + if (*arrp == NULL) { + BUILD_BUG_ON(sizeof(uint_t) > sizeof(size_t)); + + *arrp = kmem_alloc(size * elsize, KM_NOSLEEP); + if (*arrp == NULL) + return FALSE; + + alloc = TRUE; + } + + addr = *arrp; + + for (i = 0; i < size; i++) { + if (!elproc(xdrs, addr)) { + if (alloc) + kmem_free(*arrp, size * elsize); + return FALSE; + } + addr += elsize; + } + + return TRUE; +} + +static bool_t +xdr_enc_string(XDR *xdrs, char **sp, const uint_t maxsize) +{ + size_t slen = strlen(*sp); + uint_t len; + + if (slen > maxsize) + return FALSE; + + len = slen; + + if (!xdrmem_enc_uint(xdrs, &len)) + return FALSE; + + return xdrmem_enc_bytes(xdrs, *sp, len); +} + +static bool_t +xdr_dec_string(XDR *xdrs, char **sp, const uint_t maxsize) +{ + uint_t size; + bool_t alloc = FALSE; + + if (!xdrmem_dec_uint(xdrs, &size)) + return FALSE; + + if (size > maxsize || size > UINT_MAX - 1) + return FALSE; + + /* + * Solaris man page: "If *sp is NULL when decoding, xdr_string() + * allocates memory and *sp points to it". + */ + if (*sp == NULL) { + BUILD_BUG_ON(sizeof(uint_t) > sizeof(size_t)); + + *sp = kmem_alloc(size + 1, KM_NOSLEEP); + if (*sp == NULL) + return FALSE; + + alloc = TRUE; + } + + if (!xdrmem_dec_bytes(xdrs, *sp, size)) + goto fail; + + if (memchr(*sp, 0, size) != NULL) + goto fail; + + (*sp)[size] = '\0'; + + return TRUE; + +fail: + if (alloc) + kmem_free(*sp, size + 1); + + return FALSE; +} + +static struct xdr_ops xdrmem_encode_ops = { + .xdr_control = xdrmem_control, + .xdr_char = xdrmem_enc_char, + .xdr_u_short = xdrmem_enc_ushort, + .xdr_u_int = xdrmem_enc_uint, + .xdr_u_longlong_t = xdrmem_enc_ulonglong, + .xdr_opaque = xdrmem_enc_bytes, + .xdr_string = xdr_enc_string, + .xdr_array = xdr_enc_array +}; + +static struct xdr_ops xdrmem_decode_ops = { + .xdr_control = xdrmem_control, + .xdr_char = xdrmem_dec_char, + .xdr_u_short = xdrmem_dec_ushort, + .xdr_u_int = xdrmem_dec_uint, + .xdr_u_longlong_t = xdrmem_dec_ulonglong, + .xdr_opaque = xdrmem_dec_bytes, + .xdr_string = xdr_dec_string, + .xdr_array = xdr_dec_array +}; + From 6c33eb816268ef3fef9bb8ca9079bb46aad26605 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Wed, 11 Mar 2009 05:39:03 +0000 Subject: [PATCH 0256/1062] Minor bug fix in XDR code introduced in last minute change before landing. 1) Removed xdr_bytesrec typedef which has no consumers. If we re-add it should also probably be xdr_bytesrec_t. --- include/rpc/xdr.h | 2 -- module/spl/spl-xdr.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index 5b8165460..43919ca25 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -68,8 +68,6 @@ struct xdr_bytesrec { size_t xc_num_avail; }; -typedef struct xdr_bytesrec xdr_bytesrec; - /* * XDR functions. */ diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index feaa59e4f..16e42c336 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -186,7 +186,7 @@ xdrmem_enc_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) if (xdrs->x_addr > xdrs->x_addr_end) return FALSE; - if (xdrs->x_addr_end - xdrs->x_addr > size) + if (xdrs->x_addr_end - xdrs->x_addr < size) return FALSE; memcpy(xdrs->x_addr, cp, cnt); @@ -215,7 +215,7 @@ xdrmem_dec_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) if (xdrs->x_addr > xdrs->x_addr_end) return FALSE; - if (xdrs->x_addr_end - xdrs->x_addr > size) + if (xdrs->x_addr_end - xdrs->x_addr < size) return FALSE; memcpy(cp, xdrs->x_addr, cnt); From a0b5ae8acaaf63fa2378a6d062e66fdf99387625 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 12 Mar 2009 21:23:34 +0000 Subject: [PATCH 0257/1062] Fix off-by-1 truncation of hw_serial when converting from integer to string, when writing to /proc/sys/kernel/spl/spl_hostid. Fixes hostid mismatch which leads to assertion failure when the hostid/hw_serial is a 10-character decimal number: $ zpool status pool: lustre state: ONLINE lt-zpool: zpool_main.c:3176: status_callback: Assertion `reason == ZPOOL_STATUS_OK' failed. zsh: 5262 abort zpool status --- module/spl/spl-proc.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index d0ce23194..294948d81 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -457,23 +457,24 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, int len, rc = 0; int32_t val; char *end, str[32]; - ENTRY; + ENTRY; if (write) { - /* We can't use proc_doulongvec_minmax() in the write - * case hear because hostid while a hex value has no - * leading 0x which confuses the helper function. */ + /* We can't use proc_doulongvec_minmax() in the write + * case hear because hostid while a hex value has no + * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); if (rc < 0) RETURN(rc); val = simple_strtol(str, &end, 16); - if (str == end) - RETURN(-EINVAL); + if (str == end) + RETURN(-EINVAL); - spl_hostid = (long)val; - (void)snprintf(hw_serial, HW_HOSTID_LEN-1, "%u", - (val >= 0) ? val : -val); + spl_hostid = (long) val; + (void) snprintf(hw_serial, HW_HOSTID_LEN, "%u", + (val >= 0) ? val : -val); + hw_serial[HW_HOSTID_LEN - 1] = '\0'; *ppos += *lenp; } else { len = snprintf(str, sizeof(str), "%lx", spl_hostid); From 8123ac4f0d7409cae209858d01803fb2744b51b6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 13 Mar 2009 13:38:43 -0700 Subject: [PATCH 0258/1062] Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure check As of 2.6.27 kernels the device_create() API changed to include a private data argument. This check detects which version of device_create() function the kernel has and properly defines spl_device_create() to use the correct prototype. --- config/spl-build.m4 | 22 ++++++++++++++ configure | 68 ++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 1 + include/spl-device.h | 9 +++++- spl_config.h.in | 3 ++ 5 files changed, 102 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index f2dc7fa9e..d0cf86d9a 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -503,6 +503,28 @@ AC_DEFUN([SPL_AC_DEVICE_CREATE], [ []) ]) +dnl # +dnl # 2.6.27 API change, +dnl # device_create() uses 5 args, new 'drvdata' argument. +dnl # +AC_DEFUN([SPL_AC_5ARGS_DEVICE_CREATE], [ + AC_MSG_CHECKING([whether device_create() wants 5 args]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + device_create(NULL, NULL, 0, NULL, "%d", 1); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_5ARGS_DEVICE_CREATE, 1, + [device_create wants 5 args]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + dnl # dnl # 2.6.13 API change, check whether class_device_create() is available. dnl # Class_device_create() was introduced in 2.6.13 and depricated diff --git a/configure b/configure index 92dd8d732..0467b602d 100755 --- a/configure +++ b/configure @@ -19788,6 +19788,74 @@ _ACEOF + echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 +echo $ECHO_N "checking whether device_create() wants 5 args... $ECHO_C" >&6 + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + device_create(NULL, NULL, 0, NULL, "%d", 1); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_5ARGS_DEVICE_CREATE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 grep -q -E '[[:space:]]class_device_create[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null diff --git a/configure.ac b/configure.ac index 7409cba6e..623d54dd5 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,7 @@ SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED SPL_AC_FLS64 SPL_AC_DEVICE_CREATE +SPL_AC_5ARGS_DEVICE_CREATE SPL_AC_CLASS_DEVICE_CREATE SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE diff --git a/include/spl-device.h b/include/spl-device.h index d18aedf07..c82f65dfe 100644 --- a/include/spl-device.h +++ b/include/spl-device.h @@ -13,8 +13,15 @@ typedef struct device spl_device; #define spl_class_create(mod, name) class_create(mod, name) #define spl_class_destroy(cls) class_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ + +# ifdef HAVE_5ARGS_DEVICE_CREATE +# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \ + device_create(cls, parent, devt, drvdata, fmt, ## args) +# else +# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \ device_create(cls, parent, devt, fmt, ## args) +# endif + #define spl_device_destroy(cls, cls_dev, devt) \ device_destroy(cls, devt) diff --git a/spl_config.h.in b/spl_config.h.in index 931539c81..f2895054d 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -21,6 +21,9 @@ /* on_each_cpu wants 3 args */ #undef HAVE_3ARGS_ON_EACH_CPU +/* device_create wants 5 args */ +#undef HAVE_5ARGS_DEVICE_CREATE + /* kernel defines atomic64_t */ #undef HAVE_ATOMIC64_T From 5b5f5685033b60cbd698c68b11d67150426587f5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 15 Mar 2009 15:05:38 -0700 Subject: [PATCH 0259/1062] Mutex tests updated to use task queues instead of work queues. Mainly for portability reasons I have rebased the mutex tests on Solaris taskqs instead of linux work queues. The linux workqueue API changed post 2.6.18 kernels and using task queues avoids having to conditionally detect which workqueue API to use. Additionally, this is basically free additional testing for the task queues. Much to my surprise after updating these test cases they did expose a long standing bug in the taskq_wait() implementation. This patch does not address that issue but the followup patch does. --- module/splat/splat-mutex.c | 144 +++++++++++++++++++++---------------- 1 file changed, 81 insertions(+), 63 deletions(-) diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index c64f27aaf..5c039236e 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -48,109 +48,124 @@ #define SPLAT_MUTEX_TEST_MAGIC 0x115599DDUL #define SPLAT_MUTEX_TEST_NAME "mutex_test" -#define SPLAT_MUTEX_TEST_WORKQ "mutex_wq" +#define SPLAT_MUTEX_TEST_TASKQ "mutex_taskq" #define SPLAT_MUTEX_TEST_COUNT 128 typedef struct mutex_priv { unsigned long mp_magic; struct file *mp_file; - struct work_struct mp_work[SPLAT_MUTEX_TEST_COUNT]; kmutex_t mp_mtx; int mp_rc; } mutex_priv_t; static void -splat_mutex_test1_work(void *priv) +splat_mutex_test1_func(void *arg) { - mutex_priv_t *mp; - - mp = spl_get_work_data(priv, mutex_priv_t, mp_work.work); + mutex_priv_t *mp = (mutex_priv_t *)arg; ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); - mp->mp_rc = 0; - if (!mutex_tryenter(&mp->mp_mtx)) + if (mutex_tryenter(&mp->mp_mtx)) { + mp->mp_rc = 0; + mutex_exit(&mp->mp_mtx); + } else { mp->mp_rc = -EBUSY; + } } static int splat_mutex_test1(struct file *file, void *arg) { - struct workqueue_struct *wq; - struct work_struct work; mutex_priv_t *mp; - int rc = 0; + taskq_t *tq; + int id, rc = 0; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); if (mp == NULL) return -ENOMEM; - wq = create_singlethread_workqueue(SPLAT_MUTEX_TEST_WORKQ); - if (wq == NULL) { + tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE); + if (tq == NULL) { rc = -ENOMEM; goto out2; } - mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mutex_enter(&(mp->mp_mtx)); - mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; mp->mp_file = file; - spl_init_work(&work, splat_mutex_test1_work, mp); + mutex_init(&mp->mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_enter(&mp->mp_mtx); - /* Schedule a work item which will try and aquire the mutex via - * mutex_tryenter() while its held. This should fail and the work - * item will indicte this status in the passed private data. */ - if (!queue_work(wq, &work)) { - mutex_exit(&(mp->mp_mtx)); + /* + * Schedule a task function which will try and acquire the mutex via + * mutex_tryenter() while it's held. This should fail and the task + * function will indicate this status in the passed private data. + */ + mp->mp_rc = -EINVAL; + id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); + if (id == 0) { + mutex_exit(&mp->mp_mtx); + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "taskq_dispatch() failed\n"); rc = -EINVAL; goto out; } - flush_workqueue(wq); - mutex_exit(&(mp->mp_mtx)); + taskq_wait_id(tq, id); + mutex_exit(&mp->mp_mtx); - /* Work item successfully aquired mutex, very bad! */ + /* Task function successfully acquired mutex, very bad! */ if (mp->mp_rc != -EBUSY) { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, + "mutex_trylock() incorrectly succeeded when " + "the mutex was held, %d/%d\n", id, mp->mp_rc); + rc = -EINVAL; + goto out; + } else { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "mutex_trylock() correctly failed when " + "the mutex was held\n"); + } + + /* + * Schedule a task function which will try and acquire the mutex via + * mutex_tryenter() while it is not held. This should succeed and + * can be verified by checking the private data. + */ + mp->mp_rc = -EINVAL; + id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); + if (id == 0) { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "taskq_dispatch() failed\n"); rc = -EINVAL; goto out; } - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "mutex_trylock() correctly failed when mutex held\n"); + taskq_wait_id(tq, id); - /* Schedule a work item which will try and aquire the mutex via - * mutex_tryenter() while it is not held. This should work and - * the item will indicte this status in the passed private data. */ - if (!queue_work(wq, &work)) { - rc = -EINVAL; - goto out; - } - - flush_workqueue(wq); - - /* Work item failed to aquire mutex, very bad! */ + /* Task function failed to acquire mutex, very bad! */ if (mp->mp_rc != 0) { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, + "mutex_trylock() incorrectly failed when " + "the mutex was not held, %d/%d\n", id, mp->mp_rc); rc = -EINVAL; - goto out; + } else { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "mutex_trylock() correctly succeeded " + "when the mutex was not held\n"); } - - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "mutex_trylock() correctly succeeded when mutex unheld\n"); out: + taskq_destroy(tq); mutex_destroy(&(mp->mp_mtx)); - destroy_workqueue(wq); out2: kfree(mp); return rc; } static void -splat_mutex_test2_work(void *priv) +splat_mutex_test2_func(void *arg) { - mutex_priv_t *mp; + mutex_priv_t *mp = (mutex_priv_t *)arg; int rc; - - mp = spl_get_work_data(priv, mutex_priv_t, mp_work.work); ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); /* Read the value before sleeping and write it after we wake up to @@ -159,6 +174,7 @@ splat_mutex_test2_work(void *priv) rc = mp->mp_rc; set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ / 100); /* 1/100 of a second */ + VERIFY(mp->mp_rc == rc); mp->mp_rc = rc + 1; mutex_exit(&mp->mp_mtx); } @@ -166,44 +182,46 @@ splat_mutex_test2_work(void *priv) static int splat_mutex_test2(struct file *file, void *arg) { - struct workqueue_struct *wq; mutex_priv_t *mp; + taskq_t *tq; int i, rc = 0; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); if (mp == NULL) return -ENOMEM; - /* Create a thread per CPU items on queue will race */ - wq = create_workqueue(SPLAT_MUTEX_TEST_WORKQ); - if (wq == NULL) { + /* Create several threads allowing tasks to race with each other */ + tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, num_online_cpus(), + maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); + if (tq == NULL) { rc = -ENOMEM; goto out; } - mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; mp->mp_file = file; + mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); mp->mp_rc = 0; - /* Schedule N work items to the work queue each of which enters the + /* + * Schedule N work items to the work queue each of which enters the * mutex, sleeps briefly, then exits the mutex. On a multiprocessor * box these work items will be handled by all available CPUs. The - * mutex is instrumented such that if any two processors are in the + * task function checks to ensure the tracked shared variable is + * always only incremented by one. Additionally, the mutex itself + * is instrumented such that if any two processors are in the * critical region at the same time the system will panic. If the - * mutex is implemented right this will never happy, that's a pass. */ + * mutex is implemented right this will never happy, that's a pass. + */ for (i = 0; i < SPLAT_MUTEX_TEST_COUNT; i++) { - spl_init_work(&(mp->mp_work[i]), splat_mutex_test2_work, mp); - - if (!queue_work(wq, &(mp->mp_work[i]))) { + if (!taskq_dispatch(tq, splat_mutex_test2_func, mp, TQ_SLEEP)) { splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, - "Failed to queue work id %d\n", i); + "Failed to queue task %d\n", i); rc = -EINVAL; } } - flush_workqueue(wq); + taskq_wait(tq); if (mp->mp_rc == SPLAT_MUTEX_TEST_COUNT) { splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " @@ -212,12 +230,12 @@ splat_mutex_test2(struct file *file, void *arg) } else { splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " "only processed %d/%d mutex work items\n", - num_online_cpus(), mp->mp_rc, SPLAT_MUTEX_TEST_COUNT); + num_online_cpus(),mp->mp_rc,SPLAT_MUTEX_TEST_COUNT); rc = -EINVAL; } + taskq_destroy(tq); mutex_destroy(&(mp->mp_mtx)); - destroy_workqueue(wq); out: kfree(mp); return rc; From 7257ec41856cf54d47a85f786f06e5a3c330acfc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 15 Mar 2009 15:13:49 -0700 Subject: [PATCH 0260/1062] Fix taskq_wait() not waiting bug I'm very surprised this has not surfaced until now. But the taskq_wait() implementation work only wait successfully the first time it was called. Subsequent usage of taskq_wait() on the taskq would not wait. The issue was caused by tq->tq_lowest_id being set to MAX_INT after the first wait completed. This caused subsequent waits which check that the waiting id is less than the lowest taskq id to always succeed. The fix is to ensure that tq->tq_lowest_id is never set larger than tq->tq_next.id. Additional fixes which were added to this patch include: 1) Fix a race by placing the taskq_wait_check() in the tq->tq_lock spinlock. 2) taskq_wait() should wait for the largest outstanding id. 3) Multiple spelling corrections. 4) Added taskq wait regression test to validate correct behavior. --- include/sys/taskq.h | 1 + module/spl/spl-taskq.c | 32 ++++++++++------ module/splat/splat-taskq.c | 75 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 12 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 0e78ea123..0b8623103 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -87,6 +87,7 @@ extern taskq_t *system_taskq; extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); extern void __taskq_destroy(taskq_t *); +extern void __taskq_wait_id(taskq_t *, taskqid_t); extern void __taskq_wait(taskq_t *); extern int __taskq_member(taskq_t *, void *); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index e77ef669f..5960761f4 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -60,14 +60,14 @@ task_alloc(taskq_t *tq, uint_t flags) ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ ASSERT(spin_is_locked(&tq->tq_lock)); retry: - /* Aquire spl_task_t's from free list if available */ + /* Acquire spl_task_t's from free list if available */ if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { t = list_entry(tq->tq_free_list.next, spl_task_t, t_list); list_del_init(&t->t_list); RETURN(t); } - /* Free list is empty and memory allocs are prohibited */ + /* Free list is empty and memory allocations are prohibited */ if (flags & TQ_NOALLOC) RETURN(NULL); @@ -89,7 +89,7 @@ retry: RETURN(NULL); } - /* Unreachable, TQ_SLEEP xor TQ_NOSLEEP */ + /* Unreachable, TQ_SLEEP or TQ_NOSLEEP */ SBUG(); } @@ -109,7 +109,7 @@ retry: RETURN(t); } -/* NOTE: Must be called with tq->tq_lock held, expectes the spl_task_t +/* NOTE: Must be called with tq->tq_lock held, expects the spl_task_t * to already be removed from the free, work, or pending taskq lists. */ static void @@ -128,7 +128,7 @@ task_free(taskq_t *tq, spl_task_t *t) EXIT; } -/* NOTE: Must be called with tq->tq_lock held, either destroyes the +/* NOTE: Must be called with tq->tq_lock held, either destroys the * spl_task_t if too many exist or moves it to the free list for later use. */ static void @@ -154,7 +154,7 @@ task_done(taskq_t *tq, spl_task_t *t) } /* Taskqid's are handed out in a monotonically increasing fashion per - * taskq_t. We don't handle taskqid wrapping yet, but fortuntely it isi + * taskq_t. We don't handle taskqid wrapping yet, but fortunately it is * a 64-bit value so this is probably never going to happen. The lowest * pending taskqid is stored in the taskq_t to make it easy for any * taskq_wait()'ers to know if the tasks they're waiting for have @@ -164,12 +164,18 @@ task_done(taskq_t *tq, spl_task_t *t) static int taskq_wait_check(taskq_t *tq, taskqid_t id) { - RETURN(tq->tq_lowest_id >= id); + int rc; + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + rc = (id < tq->tq_lowest_id); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + RETURN(rc); } /* Expected to wait for all previously scheduled tasks to complete. We do * not need to wait for tasked scheduled after this call to complete. In - * otherwords we do not need to drain the entire taskq. */ + * other words we do not need to drain the entire taskq. */ void __taskq_wait_id(taskq_t *tq, taskqid_t id) { @@ -189,8 +195,9 @@ __taskq_wait(taskq_t *tq) ENTRY; ASSERT(tq); + /* Wait for the largest outstanding taskqid */ spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - id = tq->tq_next_id; + id = tq->tq_next_id - 1; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); __taskq_wait_id(tq, id); @@ -265,7 +272,7 @@ EXPORT_SYMBOL(__taskq_dispatch); static taskqid_t taskq_lowest_id(taskq_t *tq) { - taskqid_t lowest_id = ~0; + taskqid_t lowest_id = tq->tq_next_id; spl_task_t *t; ENTRY; @@ -318,7 +325,7 @@ taskq_thread(void *args) remove_wait_queue(&tq->tq_work_waitq, &wait); if (!list_empty(&tq->tq_pend_list)) { - t = list_entry(tq->tq_pend_list.next, spl_task_t, t_list); + t = list_entry(tq->tq_pend_list.next,spl_task_t,t_list); list_del_init(&t->t_list); list_add_tail(&t->t_list, &tq->tq_work_list); tq->tq_nactive++; @@ -332,7 +339,8 @@ taskq_thread(void *args) id = t->t_id; task_done(tq, t); - /* Update the lowest remaining taskqid yet to run */ + /* When the current lowest outstanding taskqid is + * done calculate the new lowest outstanding id */ if (tq->tq_lowest_id == id) { tq->tq_lowest_id = taskq_lowest_id(tq); ASSERT(tq->tq_lowest_id > id); diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 3cc09bcb9..a9398f5a5 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -42,9 +42,14 @@ #define SPLAT_TASKQ_TEST3_NAME "system" #define SPLAT_TASKQ_TEST3_DESC "System task queue, multiple tasks" +#define SPLAT_TASKQ_TEST4_ID 0x0204 +#define SPLAT_TASKQ_TEST4_NAME "wait" +#define SPLAT_TASKQ_TEST4_DESC "Multiple task waiting" + typedef struct splat_taskq_arg { int flag; int id; + atomic_t count; struct file *file; const char *name; } splat_taskq_arg_t; @@ -266,6 +271,73 @@ splat_taskq_test3(struct file *file, void *arg) return (tq_arg.flag) ? 0 : -EINVAL; } +static void +splat_taskq_test4_func(void *arg) +{ + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; + ASSERT(tq_arg); + + atomic_inc(&tq_arg->count); +} + +static int +splat_taskq_test4(struct file *file, void *arg) +{ + taskq_t *tq; + splat_taskq_arg_t tq_arg; + int i, j, rc = 0; + + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' creating\n", + SPLAT_TASKQ_TEST4_NAME); + if ((tq = taskq_create(SPLAT_TASKQ_TEST4_NAME, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, + "Taskq '%s' create failed\n", + SPLAT_TASKQ_TEST4_NAME); + return -EINVAL; + } + + tq_arg.file = file; + tq_arg.name = SPLAT_TASKQ_TEST4_NAME; + + for (i = 1; i <= 1024; i *= 2) { + atomic_set(&tq_arg.count, 0); + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, + "Taskq '%s' function '%s' dispatched %d times\n", + tq_arg.name, sym2str(splat_taskq_test4_func), i); + + for (j = 0; j < i; j++) { + if ((taskq_dispatch(tq, splat_taskq_test4_func, + &tq_arg, TQ_SLEEP)) == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, + "Taskq '%s' function '%s' dispatch " + "%d failed\n", tq_arg.name, + sym2str(splat_taskq_test13_func), j); + rc = -EINVAL; + goto out; + } + } + + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' " + "waiting for %d dispatches\n", tq_arg.name, i); + taskq_wait(tq); + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' " + "%d/%d dispatches finished\n", tq_arg.name, + atomic_read(&tq_arg.count), i); + if (atomic_read(&tq_arg.count) != i) { + rc = -ERANGE; + goto out; + + } + } +out: + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' destroying\n", + tq_arg.name); + taskq_destroy(tq); + + return rc; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -289,6 +361,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST2_ID, splat_taskq_test2); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST3_NAME, SPLAT_TASKQ_TEST3_DESC, SPLAT_TASKQ_TEST3_ID, splat_taskq_test3); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST4_NAME, SPLAT_TASKQ_TEST4_DESC, + SPLAT_TASKQ_TEST4_ID, splat_taskq_test4); return sub; } @@ -297,6 +371,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST4_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST3_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST2_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST1_ID); From e11d6c5f50ff1cb9a75f5c6a6895846f73564422 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Mar 2009 12:16:31 -0700 Subject: [PATCH 0261/1062] FC10/i686 Compatibility Update (2.6.27.19-170.2.35.fc10.i686) In the interests of portability I have added a FC10/i686 box to my list of development platforms. The hope is this will allow me to keep current with upstream kernel API changes, and at the same time ensure I don't accidentally break x86 support. This patch resolves all remaining issues observed under that environment. 1) SPL_AC_ZONE_STAT_ITEM_FIA autoconf check added. As of 2.6.21 the kernel added a clean API for modules to get the global count for free, inactive, and active pages. The SPL attempts to detect if this API is available and directly map spl_global_page_state() to global_page_state(). If the full API is not available then spl_global_page_state() is implemented as a thin layer to get these values via get_zone_counts() if that symbol is available. 2) New kmem:vmem_size regression test added to validate correct vmem_size() functionality. The test case acquires the current global vmem state, allocates from the vmem region, then verifies the allocation is correctly reflected in the vmem_size() stats. 3) Change splat_kmem_cache_thread_test() to always use KMC_KMEM based memory. On x86 systems with limited virtual address space failures resulted due to exhaustig the address space. The tests really need to problem exhausting all memory on the system thus we need to use the physical address space. 4) Change kmem:slab_lock to cap it's memory usage at availrmem instead of using the native linux nr_free_pages(). This provides additional test coverage of the SPL Linux VM integration. 5) Change kmem:slab_overcommit to perform allocation of 256K instead of 1M. On x86 based systems it is not possible to create a kmem backed slab with entires of that size. To compensate for this the number of allocations performed in increased by 4x. 6) Additional autoconf documentation for proposed upstream API changes to make additional symbols available to modules. 7) Console error messages added when spl_kallsyms_lookup_name() fails to locate an expected symbol. This causes the module to fail to load and we need to know exactly which symbol was not available. --- config/spl-build.m4 | 53 ++++++++++++++++++-- configure | 68 ++++++++++++++++++++++++++ configure.ac | 1 + include/sys/vmsystm.h | 17 +++++-- module/spl/spl-kmem.c | 65 ++++++++++++++++++++----- module/splat/splat-kmem.c | 100 ++++++++++++++++++++++++++++++++++---- spl_config.h.in | 3 ++ 7 files changed, 277 insertions(+), 30 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d0cf86d9a..1013e1f4c 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -752,7 +752,11 @@ AC_DEFUN([SPL_AC_KALLSYMS_LOOKUP_NAME], [ ]) dnl # -dnl # Symbol only available in custom kernels +dnl # Proposed API change, +dnl # This symbol is not available in stock kernels. You may build a +dnl # custom kernel with the *-spl-export-symbols.patch which will export +dnl # these symbols for use. If your already rolling a custom kernel for +dnl # your environment this is recommended. dnl # AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], [ SPL_CHECK_SYMBOL_EXPORT( @@ -764,7 +768,11 @@ AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], [ ]) dnl # -dnl # Symbol only available in custom kernels +dnl # Proposed API change, +dnl # This symbol is not available in stock kernels. You may build a +dnl # custom kernel with the *-spl-export-symbols.patch which will export +dnl # these symbols for use. If your already rolling a custom kernel for +dnl # your environment this is recommended. dnl # AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ SPL_CHECK_SYMBOL_EXPORT( @@ -776,7 +784,11 @@ AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ ]) dnl # -dnl # Symbol only available in custom kernels +dnl # Proposed API change, +dnl # This symbol is not available in stock kernels. You may build a +dnl # custom kernel with the *-spl-export-symbols.patch which will export +dnl # these symbols for use. If your already rolling a custom kernel for +dnl # your environment this is recommended. dnl # AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ SPL_CHECK_SYMBOL_EXPORT( @@ -788,7 +800,11 @@ AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ ]) dnl # -dnl # Symbol only available in custom kernels +dnl # Proposed API change, +dnl # This symbol is not available in stock kernels. You may build a +dnl # custom kernel with the *-spl-export-symbols.patch which will export +dnl # these symbols for use. If your already rolling a custom kernel for +dnl # your environment this is recommended. dnl # AC_DEFUN([SPL_AC_NEXT_ZONE], [ SPL_CHECK_SYMBOL_EXPORT( @@ -800,7 +816,11 @@ AC_DEFUN([SPL_AC_NEXT_ZONE], [ ]) dnl # -dnl # Symbol only available in custom kernels +dnl # Proposed API change, +dnl # This symbol is not available in stock kernels. You may build a +dnl # custom kernel with the *-spl-export-symbols.patch which will export +dnl # these symbols for use. If your already rolling a custom kernel for +dnl # your environment this is recommended. dnl # AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ SPL_CHECK_SYMBOL_EXPORT( @@ -810,3 +830,26 @@ AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ [get_zone_counts() is available])], []) ]) + +dnl # +dnl # 2.6.21 API change, +dnl # Public global zone stats now include free/inactive/active page +dnl # counts. This replaced the priviate get_zone_counts() interface. +dnl # +AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_FIA], [ + AC_MSG_CHECKING([whether free/inactive/active page state is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + enum zone_stat_item i1, i2, i3; + i1 = NR_FREE_PAGES; + i2 = NR_INACTIVE; + i3 = NR_ACTIVE; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_FIA, 1, + [free/inactive/active page state is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index 0467b602d..f3deee9c8 100755 --- a/configure +++ b/configure @@ -20872,6 +20872,74 @@ _ACEOF + echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5 +echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item i1, i2, i3; + i1 = NR_FREE_PAGES; + i2 = NR_INACTIVE; + i3 = NR_ACTIVE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_FIA 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec" diff --git a/configure.ac b/configure.ac index 623d54dd5..bdec31c4b 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,7 @@ SPL_AC_FIRST_ONLINE_PGDAT SPL_AC_NEXT_ONLINE_PGDAT SPL_AC_NEXT_ZONE SPL_AC_GET_ZONE_COUNTS +SPL_AC_ZONE_STAT_ITEM_FIA AC_CONFIG_FILES([ Makefile diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 861e51164..123005e5e 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -115,13 +115,24 @@ extern next_zone_t next_zone_fn; #endif /* HAVE_NEXT_ZONE */ /* Source linux/mm/vmstat.c */ -#ifndef HAVE_GET_ZONE_COUNTS +#ifndef HAVE_ZONE_STAT_ITEM_FIA +# ifndef HAVE_GET_ZONE_COUNTS typedef void (*get_zone_counts_t)(unsigned long *, unsigned long *, unsigned long *); extern get_zone_counts_t get_zone_counts_fn; -#define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f) -#endif /* HAVE_GET_ZONE_COUNTS */ +# define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f) +extern unsigned long spl_global_page_state(int); +/* Defines designed to simulate enum but large enough to ensure no overlap */ +# define NR_FREE_PAGES 0x8001 +# define NR_INACTIVE 0x8002 +# define NR_ACTIVE 0x8003 +# else +# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable" +# endif /* HAVE_GET_ZONE_COUNTS */ +#else +#define spl_global_page_state(item) global_page_state(item) +#endif /* HAVE_ZONE_STAT_ITEM_FIA */ #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 944300bb4..6723dcd08 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -99,22 +99,47 @@ next_zone_t next_zone_fn = NULL; EXPORT_SYMBOL(next_zone_fn); #endif /* HAVE_NEXT_ZONE */ -#ifndef HAVE_GET_ZONE_COUNTS +#ifndef HAVE_ZONE_STAT_ITEM_FIA +# ifndef HAVE_GET_ZONE_COUNTS get_zone_counts_t get_zone_counts_fn = NULL; EXPORT_SYMBOL(get_zone_counts_fn); -#endif /* HAVE_GET_ZONE_COUNTS */ -pgcnt_t -spl_kmem_availrmem(void) +unsigned long +spl_global_page_state(int item) { unsigned long active; unsigned long inactive; unsigned long free; - get_zone_counts(&active, &inactive, &free); + if (item == NR_FREE_PAGES) { + get_zone_counts(&active, &inactive, &free); + return free; + } + if (item == NR_INACTIVE) { + get_zone_counts(&active, &inactive, &free); + return inactive; + } + + if (item == NR_ACTIVE) { + get_zone_counts(&active, &inactive, &free); + return active; + } + + return global_page_state((enum zone_stat_item)item); +} +EXPORT_SYMBOL(spl_global_page_state); +# else +# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable" +# endif /* HAVE_GET_ZONE_COUNTS */ +#endif /* HAVE_ZONE_STAT_ITEM_FIA */ + +pgcnt_t +spl_kmem_availrmem(void) +{ /* The amount of easily available memory */ - return free + inactive; + return (spl_global_page_state(NR_FREE_PAGES) + + spl_global_page_state(NR_INACTIVE)); } EXPORT_SYMBOL(spl_kmem_availrmem); @@ -1773,37 +1798,51 @@ spl_kmem_init_kallsyms_lookup(void) #ifndef HAVE_GET_VMALLOC_INFO get_vmalloc_info_fn = (get_vmalloc_info_t) spl_kallsyms_lookup_name("get_vmalloc_info"); - if (!get_vmalloc_info_fn) + if (!get_vmalloc_info_fn) { + printk(KERN_ERR "Error: Unknown symbol get_vmalloc_info\n"); return -EFAULT; + } #endif /* HAVE_GET_VMALLOC_INFO */ #ifndef HAVE_FIRST_ONLINE_PGDAT first_online_pgdat_fn = (first_online_pgdat_t) spl_kallsyms_lookup_name("first_online_pgdat"); - if (!first_online_pgdat_fn) + if (!first_online_pgdat_fn) { + printk(KERN_ERR "Error: Unknown symbol first_online_pgdat\n"); return -EFAULT; + } #endif /* HAVE_FIRST_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ONLINE_PGDAT next_online_pgdat_fn = (next_online_pgdat_t) spl_kallsyms_lookup_name("next_online_pgdat"); - if (!next_online_pgdat_fn) + if (!next_online_pgdat_fn) { + printk(KERN_ERR "Error: Unknown symbol next_online_pgdat\n"); return -EFAULT; + } #endif /* HAVE_NEXT_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ZONE next_zone_fn = (next_zone_t) spl_kallsyms_lookup_name("next_zone"); - if (!next_zone_fn) + if (!next_zone_fn) { + printk(KERN_ERR "Error: Unknown symbol next_zone\n"); return -EFAULT; + } #endif /* HAVE_NEXT_ZONE */ -#ifndef HAVE_GET_ZONE_COUNTS +#ifndef HAVE_ZONE_STAT_ITEM_FIA +# ifndef HAVE_GET_ZONE_COUNTS get_zone_counts_fn = (get_zone_counts_t) spl_kallsyms_lookup_name("get_zone_counts"); - if (!get_zone_counts_fn) + if (!get_zone_counts_fn) { + printk(KERN_ERR "Error: Unknown symbol get_zone_counts\n"); return -EFAULT; -#endif /* HAVE_GET_ZONE_COUNTS */ + } +# else +# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable" +# endif /* HAVE_GET_ZONE_COUNTS */ +#endif /* HAVE_ZONE_STAT_ITEM_FIA */ /* * It is now safe to initialize the global tunings which rely on diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 35718e2f8..f12cd34b3 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -74,6 +74,10 @@ #define SPLAT_KMEM_TEST11_NAME "slab_overcommit" #define SPLAT_KMEM_TEST11_DESC "Slab memory overcommit test" +#define SPLAT_KMEM_TEST12_ID 0x010c +#define SPLAT_KMEM_TEST12_NAME "vmem_size" +#define SPLAT_KMEM_TEST12_DESC "Memory zone test" + #define SPLAT_KMEM_ALLOC_COUNT 10 #define SPLAT_VMEM_ALLOC_COUNT 10 @@ -652,7 +656,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, splat_kmem_cache_test_constructor, splat_kmem_cache_test_destructor, splat_kmem_cache_test_reclaim, - kcp, NULL, KMC_VMEM); + kcp, NULL, KMC_KMEM); if (!kcp->kcp_cache) { splat_vprint(file, name, "Unable to create '%s'\n", cache_name); rc = -ENOMEM; @@ -973,9 +977,8 @@ splat_kmem_test9(struct file *file, void *arg) static int splat_kmem_test10(struct file *file, void *arg) { - uint64_t size, alloc, free_mem, rc = 0; + uint64_t size, alloc, rc = 0; - free_mem = nr_free_pages() * PAGE_SIZE; for (size = 16; size <= 1024*1024; size *= 2) { splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "name", @@ -985,8 +988,9 @@ splat_kmem_test10(struct file *file, void *arg) for (alloc = 1; alloc <= 1024; alloc *= 2) { - /* Skip tests which exceed free memory */ - if (size * alloc * SPLAT_KMEM_THREADS > free_mem / 2) + /* Skip tests which exceed available memory. We + * leverage availrmem here for some extra testing */ + if (size * alloc * SPLAT_KMEM_THREADS > availrmem / 2) continue; rc = splat_kmem_cache_thread_test(file, arg, @@ -1014,12 +1018,12 @@ splat_kmem_test11(struct file *file, void *arg) { uint64_t size, alloc, rc; - size = 1024*1024; - alloc = ((4 * num_physpages * PAGE_SIZE) / size) / SPLAT_KMEM_THREADS; + size = 256*1024; + alloc = ((4 * physmem * PAGE_SIZE) / size) / SPLAT_KMEM_THREADS; - splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "name", + splat_vprint(file, SPLAT_KMEM_TEST11_NAME, "%-22s %s", "name", "time (sec)\tslabs \tobjs \thash\n"); - splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "", + splat_vprint(file, SPLAT_KMEM_TEST11_NAME, "%-22s %s", "", " \ttot/max/calc\ttot/max/calc\n"); rc = splat_kmem_cache_thread_test(file, arg, @@ -1028,6 +1032,81 @@ splat_kmem_test11(struct file *file, void *arg) return rc; } +/* + * Check vmem_size() behavior by acquiring the alloc/free/total vmem + * space, then allocate a known buffer size from vmem space. We can + * then check that vmem_size() values were updated properly with in + * a fairly small tolerence. The tolerance is important because we + * are not the only vmem consumer on the system. Other unrelated + * allocations might occur during the small test window. The vmem + * allocation itself may also add in a little extra private space to + * the buffer. Finally, verify total space always remains unchanged. + */ +static int +splat_kmem_test12(struct file *file, void *arg) +{ + ssize_t alloc1, free1, total1; + ssize_t alloc2, free2, total2; + int size = 8*1024*1024; + void *ptr; + + alloc1 = vmem_size(NULL, VMEM_ALLOC); + free1 = vmem_size(NULL, VMEM_FREE); + total1 = vmem_size(NULL, VMEM_ALLOC | VMEM_FREE); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%d free=%d " + "total=%d\n", (int)alloc1, (int)free1, (int)total1); + + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Alloc %d bytes\n", size); + ptr = vmem_alloc(size, KM_SLEEP); + if (!ptr) { + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, + "Failed to alloc %d bytes\n", size); + return -ENOMEM; + } + + alloc2 = vmem_size(NULL, VMEM_ALLOC); + free2 = vmem_size(NULL, VMEM_FREE); + total2 = vmem_size(NULL, VMEM_ALLOC | VMEM_FREE); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%d free=%d " + "total=%d\n", (int)alloc2, (int)free2, (int)total2); + + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Free %d bytes\n", size); + vmem_free(ptr, size); + if (alloc2 < (alloc1 + size - (size / 100)) || + alloc2 > (alloc1 + size + (size / 100))) { + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, + "Failed VMEM_ALLOC size: %d != %d+%d (+/- 1%%)\n", + (int)alloc2, (int)alloc1, size); + return -ERANGE; + } + + if (free2 < (free1 - size - (size / 100)) || + free2 > (free1 - size + (size / 100))) { + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, + "Failed VMEM_FREE size: %d != %d-%d (+/- 1%%)\n", + (int)free2, (int)free1, size); + return -ERANGE; + } + + if (total1 != total2) { + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, + "Failed VMEM_ALLOC | VMEM_FREE not constant: " + "%d != %d\n", (int)total2, (int)total1); + return -ERANGE; + } + + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, + "VMEM_ALLOC within tolerance: ~%d%% (%d/%d)\n", + (int)(((alloc1 + size) - alloc2) * 100 / size), + (int)((alloc1 + size) - alloc2), size); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, + "VMEM_FREE within tolerance: ~%d%% (%d/%d)\n", + (int)(((free1 - size) - free2) * 100 / size), + (int)((free1 - size) - free2), size); + + return 0; +} + splat_subsystem_t * splat_kmem_init(void) { @@ -1067,6 +1146,8 @@ splat_kmem_init(void) SPLAT_KMEM_TEST10_ID, splat_kmem_test10); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, SPLAT_KMEM_TEST11_ID, splat_kmem_test11); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST12_NAME, SPLAT_KMEM_TEST12_DESC, + SPLAT_KMEM_TEST12_ID, splat_kmem_test12); return sub; } @@ -1075,6 +1156,7 @@ void splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST12_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST11_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST10_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST9_ID); diff --git a/spl_config.h.in b/spl_config.h.in index f2895054d..4d11efb3c 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -132,6 +132,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* free/inactive/active page state is available */ +#undef HAVE_ZONE_STAT_ITEM_FIA + /* Name of package */ #undef PACKAGE From 0cbaeb117ae0e77d05c7709a4f5dbfad9daa799f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Mar 2009 14:55:59 -0700 Subject: [PATCH 0262/1062] Allow spl_config.h to be included by dependant packages We need dependent packages to be able to include spl_config.h so they can leverage the configure checks the SPL has done. This is important because several of the spl headers need the results of these checks to work properly. Unfortunately, the autoheader build product is always private to a particular build and defined certain common things. (PACKAGE, VERSION, etc). This prevents other packages which also use autoheader from being include because the definitions conflict. To avoid this problem the SPL build system leverage AH_BOTTOM to include a spl_unconfig.h at the botton of the autoheader build product. This custom include undefs all known shared symbols to prevent the confict. This does however mean that those definition are also not availble to the SPL package either. The SPL package therefore uses the equivilant SPL_META_* definitions. --- Makefile.am | 3 +- Makefile.in | 3 +- config/spl-meta.m4 | 11 ------- configure | 62 ++++++++++++++++++------------------- configure.ac | 1 + include/asm/atomic_compat.h | 2 +- include/sys/types.h | 2 +- lib/list.c | 2 +- module/spl/spl-generic.c | 8 ++--- module/splat/splat-ctl.c | 4 +-- spl_config.h.in | 10 +----- spl_unconfig.h | 12 +++++++ 12 files changed, 57 insertions(+), 63 deletions(-) create mode 100644 spl_unconfig.h diff --git a/Makefile.am b/Makefile.am index 37182fe7f..63d6ba7e4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = lib cmd module include scripts AUTOMAKE_OPTIONS = foreign dist-zip EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER -noinst_HEADERS = spl_config.h +noinst_HEADERS = spl_config.h spl_unconfig.h distclean-local:: -$(RM) -R autom4te*.cache @@ -17,6 +17,7 @@ distclean-local:: install-data-local: $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h + $(INSTALL) -D spl_unconfig.h $(DESTDIR)/$(LINUX)/include/spl/spl_unconfig.h ctags: $(RM) $(top_srcdir)/tags diff --git a/Makefile.in b/Makefile.in index 6b212bb65..27825361e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -203,7 +203,7 @@ target_vendor = @target_vendor@ SUBDIRS = lib cmd module include scripts AUTOMAKE_OPTIONS = foreign dist-zip EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER -noinst_HEADERS = spl_config.h +noinst_HEADERS = spl_config.h spl_unconfig.h all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -661,6 +661,7 @@ distclean-local:: install-data-local: $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h + $(INSTALL) -D spl_unconfig.h $(DESTDIR)/$(LINUX)/include/spl/spl_unconfig.h ctags: $(RM) $(top_srcdir)/tags diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index 54c9ac38f..84b41757d 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -7,17 +7,6 @@ dnl # Chris Dunlap dnl # Brian Behlendorf dnl # AC_DEFUN([SPL_AC_META], [ - - AH_BOTTOM([ -#undef PACKAGE -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef STDC_HEADERS -#undef VERSION]) - AC_MSG_CHECKING([metadata]) META="$srcdir/META" diff --git a/configure b/configure index f3deee9c8..3c6344324 100755 --- a/configure +++ b/configure @@ -1510,10 +1510,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - echo "$as_me:$LINENO: checking metadata" >&5 echo $ECHO_N "checking metadata... $ECHO_C" >&6 @@ -2212,6 +2208,8 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers spl_config.h" + + echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. @@ -3988,7 +3986,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3991 "configure"' > conftest.$ac_ext + echo '#line 3989 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5587,7 +5585,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5590:" \ +echo "$as_me:5588:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6650,11 +6648,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6653: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6657: \$? = $ac_status" >&5 + echo "$as_me:6655: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6918,11 +6916,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6921: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6919: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6925: \$? = $ac_status" >&5 + echo "$as_me:6923: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7022,11 +7020,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7025: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7023: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7029: \$? = $ac_status" >&5 + echo "$as_me:7027: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8491,7 +8489,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8494 "configure"' > conftest.$ac_ext + echo '#line 8492 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9388,7 +9386,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11832: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11838: \$? = $ac_status" >&5 + echo "$as_me:11836: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11935,11 +11933,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11938: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11936: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11942: \$? = $ac_status" >&5 + echo "$as_me:11940: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12471,7 +12469,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12474 "configure"' > conftest.$ac_ext + echo '#line 12472 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13529,11 +13527,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13532: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13530: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13536: \$? = $ac_status" >&5 + echo "$as_me:13534: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13633,11 +13631,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13636: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13634: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13640: \$? = $ac_status" >&5 + echo "$as_me:13638: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15082,7 +15080,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15085 "configure"' > conftest.$ac_ext + echo '#line 15083 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15860,11 +15858,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15863: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15867: \$? = $ac_status" >&5 + echo "$as_me:15865: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16128,11 +16126,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16131: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16129: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16135: \$? = $ac_status" >&5 + echo "$as_me:16133: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16232,11 +16230,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16235: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16239: \$? = $ac_status" >&5 + echo "$as_me:16237: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17701,7 +17699,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17704 "configure"' > conftest.$ac_ext + echo '#line 17702 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? diff --git a/configure.ac b/configure.ac index bdec31c4b..b6abe7a8c 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) AC_CONFIG_HEADERS([spl_config.h]) +AH_BOTTOM([#include ]) AM_MAINTAINER_MODE AC_PROG_INSTALL diff --git a/include/asm/atomic_compat.h b/include/asm/atomic_compat.h index 9aa248b06..2f7376925 100644 --- a/include/asm/atomic_compat.h +++ b/include/asm/atomic_compat.h @@ -2,7 +2,7 @@ #define _SPL_ATOMIC_COMPAT_H #include -#include "spl_config.h" +#include #ifndef HAVE_ATOMIC64_T #include diff --git a/include/sys/types.h b/include/sys/types.h index 699efe648..5fd3a9376 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -7,7 +7,7 @@ extern "C" { #include #include -#include "spl_config.h" +#include #include #include diff --git a/lib/list.c b/lib/list.c index ee6b33a83..08b1f631f 100644 --- a/lib/list.c +++ b/lib/list.c @@ -26,7 +26,7 @@ #ifdef HAVE_CONFIG_H -# include "spl_config.h" +# include #endif /* HAVE_CONFIG_H */ #ifdef WITH_PTHREADS diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index c23abf6ff..76a8de472 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -43,7 +43,7 @@ #define DEBUG_SUBSYSTEM S_GENERIC -char spl_version[16] = "SPL v" VERSION; +char spl_version[16] = "SPL v" SPL_META_VERSION; long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); @@ -340,7 +340,7 @@ static int __init spl_init(void) if ((rc = set_kallsyms_lookup_name())) GOTO(out7, rc = -EADDRNOTAVAIL); - printk("SPL: Loaded Solaris Porting Layer v%s\n", VERSION); + printk("SPL: Loaded Solaris Porting Layer v%s\n", SPL_META_VERSION); RETURN(rc); out7: kstat_fini(); @@ -358,7 +358,7 @@ out: debug_fini(); printk("SPL: Failed to Load Solaris Porting Layer v%s, " - "rc = %d\n", VERSION, rc); + "rc = %d\n", SPL_META_VERSION, rc); return rc; } @@ -366,7 +366,7 @@ static void spl_fini(void) { ENTRY; - printk("SPL: Unloaded Solaris Porting Layer v%s\n", VERSION); + printk("SPL: Unloaded Solaris Porting Layer v%s\n", SPL_META_VERSION); kstat_fini(); proc_fini(); vn_fini(); diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index d7aed023c..2ff62ffb0 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -638,7 +638,7 @@ splat_init(void) NULL, SPLAT_NAME); printk(KERN_INFO "SPLAT: Loaded Solaris Porting LAyer " - "Tests v%s\n", VERSION); + "Tests v%s\n", SPL_META_VERSION); return 0; error: printk(KERN_ERR "SPLAT: Error registering splat device, %d\n", rc); @@ -671,7 +671,7 @@ splat_fini(void) ASSERT(list_empty(&splat_module_list)); printk(KERN_INFO "SPLAT: Unloaded Solaris Porting LAyer " - "Tests v%s\n", VERSION); + "Tests v%s\n", SPL_META_VERSION); } module_init(splat_init); diff --git a/spl_config.h.in b/spl_config.h.in index 4d11efb3c..8cfcff5c6 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -186,12 +186,4 @@ /* Version number of package */ #undef VERSION - -#undef PACKAGE -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef STDC_HEADERS -#undef VERSION +#include diff --git a/spl_unconfig.h b/spl_unconfig.h new file mode 100644 index 000000000..b50a0be0c --- /dev/null +++ b/spl_unconfig.h @@ -0,0 +1,12 @@ +/* + * Undefine these symbols to allow other autoheader enabled packages + * to leverage the SPL configure checks without a header conflict. + */ +#undef PACKAGE +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#undef VERSION +#undef STDC_HEADERS From f250d90b5f1586cdee79d1612a1a4361ab69afe2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 18 Mar 2009 11:56:00 -0700 Subject: [PATCH 0263/1062] Fix vmem leak in kmem_cache_test (missing splat_kmem_cache_test_kcp_free()) --- module/splat/splat-kmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index f12cd34b3..f7ea58004 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -611,6 +611,7 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, rc = -EINVAL; } + splat_kmem_cache_test_kcp_free(kcp); splat_vprint(file, name, "Successfully ran ctors/dtors for %d elements in '%s'\n", max, SPLAT_KMEM_CACHE_NAME); From c388a3ab26bdd19a10c02dbb24981e6f482d0958 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 18 Mar 2009 11:56:42 -0700 Subject: [PATCH 0264/1062] Remove useless EOL white space padding from `splat -l` command. --- cmd/splat.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/splat.c b/cmd/splat.c index 9b2bb417a..3fefe9739 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -339,11 +339,10 @@ static void test_list(List l, int indent) i = list_iterator_create(l); while ((test = list_next(i))) - fprintf(stdout, "%*s0x%0*x %-*s %-*s\n", - indent, "", - 04, test->test_desc.id, + fprintf(stdout, "%*s0x%0*x %-*s %s\n", + indent, "", 04, test->test_desc.id, SPLAT_NAME_SIZE, test->test_desc.name, - SPLAT_DESC_SIZE, test->test_desc.desc); + test->test_desc.desc); list_iterator_destroy(i); } From 759dfe7d4366c60cba2693902396fc70b06d176f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 19 Mar 2009 21:40:07 -0700 Subject: [PATCH 0265/1062] Add list_move_tail() function. --- include/sys/list.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/sys/list.h b/include/sys/list.h index 0592d5c1d..0a4cf1183 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -170,4 +170,12 @@ list_link_active(list_node_t *node) return (node->next != LIST_POISON1) && (node->prev != LIST_POISON2); } +static inline void +spl_list_move_tail(list_t *dst, list_t *src) +{ + list_splice_init(&src->list_head, dst->list_head.prev); +} + +#define list_move_tail(dst, src) spl_list_move_tail(dst, src) + #endif /* SPL_LIST_H */ From f8b2932a43d955d804731c3ad03c7a47177f481c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 20 Mar 2009 14:48:30 -0700 Subject: [PATCH 0266/1062] Prep for spl-0.4.3 tag. --- AUTHORS | 1 + ChangeLog | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- META | 2 +- 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8beef8bac..b780cbc05 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,4 @@ Brian Behlendorf , +Ricardo M. Correia Herb Wartens , Jim Garlick diff --git a/ChangeLog b/ChangeLog index 86affd867..434b9e8e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,59 @@ +2009-03-20 Brian Behlendorf + + * : Tag spl-0.4.3 + + * configure.ac, *Makefile.am: Build system update. This includes + resolving various build issues and adding support for the remaining + common build targets. Available targets now include: + + - make all # Build everything + - make install # Install everything + - make clean # Clean up build products + - make distclean # Clean up everything + - make dist # Create package tarball + - make srpm # Create package source RPM + - make rpm # Create package binary RPMs + - make tags # Create ctags and etags for everything + + Extra care was taken to ensure that the source RPMs are fully + rebuildable against Fedora/RHEL/Chaos kernels. To build binary + RPMs from the source RPM for your system simply run: + + rpmbuild --rebuild spl-x.y.z-1.src.rpm + + This will produce two binary RPMs with correct 'requires' + dependencies for your kernel. One will contain all zpl modules + and support utilities, the other is a devel package for compiling + additional kernel modules which are dependent on the spl. + + spl-x.y.z-1_.x86_64.rpm + spl-devel-x.y.2-1_.x86_64.rpm + + * : FC10 (linux-2.6.27.19) and i686 compatibility update. The + list of support platforms has been extended to include FC10 + systems and x86 architectures. It should be noted that kernels + older the 2.6.27.19 should work but have not have not been tested. + + * configure.ac: Fix build issue preventing spl_config.h from being + cleanly included by dependent packages. + + * module/spl/spl-taskq.c: Fix taskq_wait() not waiting bug. + + * module/spl/spl-xdr.c: Add XDR implementation provided by Ricardo + Correia from Sun. + + * module/spl/spl-kmem.c: Linux VM integration cleanup. + + * module/spl/spl-kmem.c: Slab cache improvements and fixes. + + * modules/splat/*: Include additional SPLAT regression tests. + + * : Various bug fixes are more clearly detailed in the git + commit logs. For a detailed summary of changes post version + 0.4.2 check the git commit logs. + + git log -35 + 2009-02-05 Brian Behlendorf * : Tag spl-0.4.2 @@ -46,7 +102,7 @@ * : Add autogen.sh products. - * configure.ac : Use AC_CONFIG_AUX_DIR to put autoconf products + * configure.ac : Use AC_CONFIG_AUX_DIR to put autograph products in ./auotconf. * autogen.sh : Use --copy to avoid symlinks, remove error diff --git a/META b/META index b548337d0..e1dc7613f 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.2 +Version: 0.4.3 Release: 1 Release-Tags: relext From bf338d8d09b410884be526ed4f11b6030244dbfa Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 19 May 2009 11:42:39 -0700 Subject: [PATCH 0267/1062] SLES10 Fixes (part 1): - Exclude -obj when detecting installed kernel source. - Detect -obj directory for out of tree kernel builds. - Allow kernel build system to set CC to ensure -m64 is set properly. This is an issue on 64-bit SLES systems which by default always build 32-bit binaries (unlike RHEL/Fedora which default to 64-bit) --- config/spl-build.m4 | 13 ++++++++---- configure | 51 +++++++++++++++++++++++++-------------------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 1013e1f4c..76fa96ff9 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -11,12 +11,12 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_CHECKING([kernel source directory]) if test -z "$kernelsrc"; then - kernelbuild= - sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* 2>/dev/null | tail -1` + sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1` if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` - kernelbuild=${kernelsrc} + kernelbuild= else AC_MSG_RESULT([Not found]) AC_MSG_ERROR([ @@ -31,6 +31,11 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([$kernelsrc]) AC_MSG_CHECKING([kernel build directory]) + if test -z "$kernelbuild" && test -d ${kernelsrc}-obj; then + kernelbuild=${kernelsrc}-obj/`arch`/`arch` + else + kernelbuild=${kernelsrc} + fi AC_MSG_RESULT([$kernelbuild]) AC_MSG_CHECKING([kernel source version]) @@ -232,7 +237,7 @@ AC_DEFUN([SPL_LINUX_COMPILE_IFELSE], [ rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile AS_IF( - [AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], + [AC_TRY_COMMAND(cp conftest.c build && make [$2] LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], [$4], [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])] ) diff --git a/configure b/configure index 3c6344324..f6f164dca 100755 --- a/configure +++ b/configure @@ -18943,12 +18943,12 @@ fi; echo "$as_me:$LINENO: checking kernel source directory" >&5 echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 if test -z "$kernelsrc"; then - kernelbuild= - sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* 2>/dev/null | tail -1` + sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1` if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` - kernelbuild=${kernelsrc} + kernelbuild= else echo "$as_me:$LINENO: result: Not found" >&5 echo "${ECHO_T}Not found" >&6 @@ -18970,6 +18970,11 @@ echo "$as_me: error: echo "${ECHO_T}$kernelsrc" >&6 echo "$as_me:$LINENO: checking kernel build directory" >&5 echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 + if test -z "$kernelbuild" && test -d ${kernelsrc}-obj; then + kernelbuild=${kernelsrc}-obj/`arch`/`arch` + else + kernelbuild=${kernelsrc} + fi echo "$as_me:$LINENO: result: $kernelbuild" >&5 echo "${ECHO_T}$kernelbuild" >&6 @@ -19217,7 +19222,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19281,7 +19286,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19346,7 +19351,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19410,7 +19415,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19475,7 +19480,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19542,7 +19547,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19647,7 +19652,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19711,7 +19716,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19817,7 +19822,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19961,7 +19966,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20027,7 +20032,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20092,7 +20097,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20157,7 +20162,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20230,7 +20235,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20295,7 +20300,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20363,7 +20368,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20469,7 +20474,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20535,7 +20540,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20600,7 +20605,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20902,7 +20907,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules CC="$CC" LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? From 96dded38442684319305082aa2ac7e25f7f414da Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 10:08:37 -0700 Subject: [PATCH 0268/1062] SLES10 Fixes (part 2): - Configure check, the div64_64() function was renamed to div64_u64() as of 2.6.26. - Configure check, the global_page_state() fuction was introduced in 2.6.18 kernels. The earlier 2.6.16 based SLES10 must not try and use it, thankfully get_zone_counts() is still available. - To simplify debugging poison all symbols aquired dynamically using spl_kallsyms_lookup_name() with SYMBOL_POISON. - Add console messages when the user mode helpers fail. - spl_kmem_init_globals() use bit shifts instead of division. - When the monotonic clock is unavailable __gethrtime() must perform the HZ division as an 'unsigned long long' because the SPL only implements __udivdi3(), and not __divdi3() for 'long long' division on 32-bit arches. --- config/spl-build.m4 | 57 ++++++++--- configure | 166 +++++++++++++++++++++++--------- configure.ac | 2 + include/linux/kallsyms_compat.h | 2 + include/sys/vmsystm.h | 4 +- module/spl/spl-generic.c | 42 +++++--- module/spl/spl-kmem.c | 24 ++--- module/spl/spl-proc.c | 2 +- module/spl/spl-time.c | 4 +- module/splat/splat-list.c | 2 +- spl_config.h.in | 6 ++ 11 files changed, 217 insertions(+), 94 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 76fa96ff9..ebc2721f5 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -706,22 +706,29 @@ AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ ]) dnl # -dnl # 2.6.14 API change, -dnl # check whether 'div64_64()' is available -dnl # +dnl # 2.6.22 API change, +dnl # First introduced 'div64_64()' in lib/div64.c +dnl AC_DEFUN([SPL_AC_DIV64_64], [ - AC_MSG_CHECKING([whether div64_64() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - uint64_t i = div64_64(1ULL, 1ULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DIV64_64, 1, [div64_64() is available]) - ],[ - AC_MSG_RESULT(no) - ]) + SPL_CHECK_SYMBOL_EXPORT( + [div64_64], + [], + [AC_DEFINE(HAVE_DIV64_64, 1, + [div64_64() is available])], + []) +]) + +dnl # +dnl # 2.6.26 API change, +dnl # Renamed 'div64_64()' to 'div64_u64' in lib/div64.c +dnl # +AC_DEFUN([SPL_AC_DIV64_U64], [ + SPL_CHECK_SYMBOL_EXPORT( + [div64_u64], + [], + [AC_DEFINE(HAVE_DIV64_U64, 1, + [div64_u64() is available])], + []) ]) dnl # @@ -836,6 +843,26 @@ AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ []) ]) +dnl # +dnl # 2.6.18 API change, +dnl # First introduced global_page_state() support as an inline. +dnl # +AC_DEFUN([SPL_AC_GLOBAL_PAGE_STATE], [ + AC_MSG_CHECKING([whether global_page_state() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + unsigned long state; + state = global_page_state(NR_FREE_PAGES); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GLOBAL_PAGE_STATE, 1, + [global_page_state() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.21 API change, dnl # Public global zone stats now include free/inactive/active page diff --git a/configure b/configure index f6f164dca..96d9d886f 100755 --- a/configure +++ b/configure @@ -20510,48 +20510,34 @@ fi - echo "$as_me:$LINENO: checking whether div64_64() is available" >&5 -echo $ECHO_N "checking whether div64_64() is available... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 +echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]div64_64[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(div64_64)" "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -cat >conftest.c <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - uint64_t i = div64_64(1ULL, 1ULL); - - ; - return 0; -} - +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_64 1 _ACEOF - - rm -Rf build && mkdir -p build - echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - + fi + else echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 @@ -20559,20 +20545,46 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_64 1 _ACEOF + fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 + + echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 +echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]div64_u64[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(div64_u64)" "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_U64 1 +_ACEOF -fi + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - rm -Rf build +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_U64 1 +_ACEOF + fi @@ -20875,6 +20887,72 @@ _ACEOF + echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 +echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + unsigned long state; + state = global_page_state(NR_FREE_PAGES); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GLOBAL_PAGE_STATE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5 echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6 diff --git a/configure.ac b/configure.ac index b6abe7a8c..179dbc1d7 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,7 @@ SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX SPL_AC_DIV64_64 +SPL_AC_DIV64_U64 SPL_AC_3ARGS_ON_EACH_CPU SPL_AC_KALLSYMS_LOOKUP_NAME SPL_AC_GET_VMALLOC_INFO @@ -75,6 +76,7 @@ SPL_AC_FIRST_ONLINE_PGDAT SPL_AC_NEXT_ONLINE_PGDAT SPL_AC_NEXT_ZONE SPL_AC_GET_ZONE_COUNTS +SPL_AC_GLOBAL_PAGE_STATE SPL_AC_ZONE_STAT_ITEM_FIA AC_CONFIG_FILES([ diff --git a/include/linux/kallsyms_compat.h b/include/linux/kallsyms_compat.h index 82abed41d..6cd0a18de 100644 --- a/include/linux/kallsyms_compat.h +++ b/include/linux/kallsyms_compat.h @@ -1,6 +1,8 @@ #ifndef _SPL_KALLSYMS_COMPAT_H #define _SPL_KALLSYMS_COMPAT_H +#define SYMBOL_POISON ((void*)0xabcddcba) + #ifdef HAVE_KALLSYMS_LOOKUP_NAME #include diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 123005e5e..71058eef8 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -121,15 +121,13 @@ typedef void (*get_zone_counts_t)(unsigned long *, unsigned long *, unsigned long *); extern get_zone_counts_t get_zone_counts_fn; # define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f) +# endif /* HAVE_GET_ZONE_COUNTS */ extern unsigned long spl_global_page_state(int); /* Defines designed to simulate enum but large enough to ensure no overlap */ # define NR_FREE_PAGES 0x8001 # define NR_INACTIVE 0x8002 # define NR_ACTIVE 0x8003 -# else -# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable" -# endif /* HAVE_GET_ZONE_COUNTS */ #else #define spl_global_page_state(item) global_page_state(item) #endif /* HAVE_ZONE_STAT_ITEM_FIA */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 76a8de472..fe6350079 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -55,7 +55,7 @@ int p0 = 0; EXPORT_SYMBOL(p0); #ifndef HAVE_KALLSYMS_LOOKUP_NAME -kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn = NULL; +kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn = SYMBOL_POISON; #endif int @@ -96,10 +96,12 @@ EXPORT_SYMBOL(highbit); #if BITS_PER_LONG == 32 uint64_t __udivdi3(uint64_t dividend, uint64_t divisor) { -#ifdef HAVE_DIV64_64 +#if defined(HAVE_DIV64_64) /* 2.6.22 - 2.6.25 API */ return div64_64(dividend, divisor); +#elif defined(HAVE_DIV64_U64) /* 2.6.26 - 2.6.x API */ + return div64_u64(dividend, divisor); #else - /* Taken from a 2.6.24 kernel. */ + /* Implementation from 2.6.30 kernel */ uint32_t high, d; high = divisor >> 32; @@ -111,10 +113,8 @@ uint64_t __udivdi3(uint64_t dividend, uint64_t divisor) } else d = divisor; - do_div(dividend, d); - - return dividend; -#endif + return do_div64(dividend, d); +#endif /* HAVE_DIV64_64, HAVE_DIV64_U64 */ } EXPORT_SYMBOL(__udivdi3); @@ -126,12 +126,12 @@ uint64_t __umoddi3(uint64_t dividend, uint64_t divisor) return dividend - divisor * (dividend / divisor); } EXPORT_SYMBOL(__umoddi3); -#endif +#endif /* BITS_PER_LONG */ /* NOTE: The strtoxx behavior is solely based on my reading of the Solaris * ddi_strtol(9F) man page. I have not verified the behavior of these * functions against their Solaris counterparts. It is possible that I - * may have misinterpretted the man page or the man page is incorrect. + * may have misinterpreted the man page or the man page is incorrect. */ int ddi_strtoul(const char *, char **, int, unsigned long *); int ddi_strtol(const char *, char **, int, long *); @@ -248,14 +248,20 @@ set_hostid(void) "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; + int rc; /* Doing address resolution in the kernel is tricky and just * not a good idea in general. So to set the proper 'hw_serial' * use the usermodehelper support to ask '/bin/sh' to run * '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid - * for us to use. It's a horific solution but it will do for now. + * for us to use. It's a horrific solution but it will do for now. */ - return call_usermodehelper(sh_path, argv, envp, 1); + rc = call_usermodehelper(sh_path, argv, envp, 1); + if (rc) + printk("SPL: Failed user helper '%s %s %s', rc = %d\n", + argv[0], argv[1], argv[2], rc); + + return rc; } uint32_t @@ -273,9 +279,7 @@ zone_get_hostid(void *zone) } EXPORT_SYMBOL(zone_get_hostid); -#ifdef HAVE_KALLSYMS_LOOKUP_NAME -#define set_kallsyms_lookup_name() (0) -#else +#ifndef HAVE_KALLSYMS_LOOKUP_NAME /* * Because kallsyms_lookup_name() is no longer exported in the * mainline kernel we are forced to resort to somewhat drastic @@ -303,9 +307,10 @@ set_kallsyms_lookup_name(void) rc = call_usermodehelper(sh_path, argv, envp, 1); if (rc) - return rc; + printk("SPL: Failed user helper '%s %s %s', rc = %d\n", + argv[0], argv[1], argv[2], rc); - return spl_kmem_init_kallsyms_lookup(); + return rc; } #endif @@ -337,8 +342,13 @@ static int __init spl_init(void) if ((rc = set_hostid())) GOTO(out7, rc = -EADDRNOTAVAIL); +#ifndef HAVE_KALLSYMS_LOOKUP_NAME if ((rc = set_kallsyms_lookup_name())) GOTO(out7, rc = -EADDRNOTAVAIL); +#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ + + if ((rc = spl_kmem_init_kallsyms_lookup())) + GOTO(out7, rc); printk("SPL: Loaded Solaris Porting Layer v%s\n", SPL_META_VERSION); RETURN(rc); diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 6723dcd08..706691929 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -80,29 +80,30 @@ vmem_t *zio_arena = NULL; EXPORT_SYMBOL(zio_arena); #ifndef HAVE_GET_VMALLOC_INFO -get_vmalloc_info_t get_vmalloc_info_fn = NULL; +get_vmalloc_info_t get_vmalloc_info_fn = SYMBOL_POISON; EXPORT_SYMBOL(get_vmalloc_info_fn); #endif /* HAVE_GET_VMALLOC_INFO */ #ifndef HAVE_FIRST_ONLINE_PGDAT -first_online_pgdat_t first_online_pgdat_fn = NULL; +first_online_pgdat_t first_online_pgdat_fn = SYMBOL_POISON; EXPORT_SYMBOL(first_online_pgdat_fn); #endif /* HAVE_FIRST_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ONLINE_PGDAT -next_online_pgdat_t next_online_pgdat_fn = NULL; +next_online_pgdat_t next_online_pgdat_fn = SYMBOL_POISON; EXPORT_SYMBOL(next_online_pgdat_fn); #endif /* HAVE_NEXT_ONLINE_PGDAT */ #ifndef HAVE_NEXT_ZONE -next_zone_t next_zone_fn = NULL; +next_zone_t next_zone_fn = SYMBOL_POISON; EXPORT_SYMBOL(next_zone_fn); #endif /* HAVE_NEXT_ZONE */ #ifndef HAVE_ZONE_STAT_ITEM_FIA # ifndef HAVE_GET_ZONE_COUNTS -get_zone_counts_t get_zone_counts_fn = NULL; +get_zone_counts_t get_zone_counts_fn = SYMBOL_POISON; EXPORT_SYMBOL(get_zone_counts_fn); +# endif /* HAVE_GET_ZONE_COUNTS */ unsigned long spl_global_page_state(int item) @@ -126,12 +127,13 @@ spl_global_page_state(int item) return active; } +# ifdef HAVE_GLOBAL_PAGE_STATE return global_page_state((enum zone_stat_item)item); +# else + return 0; /* Unsupported */ +# endif /* HAVE_GLOBAL_PAGE_STATE */ } EXPORT_SYMBOL(spl_global_page_state); -# else -# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable" -# endif /* HAVE_GET_ZONE_COUNTS */ #endif /* HAVE_ZONE_STAT_ITEM_FIA */ pgcnt_t @@ -1785,8 +1787,8 @@ spl_kmem_init_globals(void) } /* Solaris default values */ - swapfs_minfree = MAX(2*1024*1024 / PAGE_SIZE, physmem / 8); - swapfs_reserve = MIN(4*1024*1024 / PAGE_SIZE, physmem / 16); + swapfs_minfree = MAX(2*1024*1024 >> PAGE_SHIFT, physmem >> 3); + swapfs_reserve = MIN(4*1024*1024 >> PAGE_SHIFT, physmem >> 4); } /* @@ -1839,8 +1841,6 @@ spl_kmem_init_kallsyms_lookup(void) printk(KERN_ERR "Error: Unknown symbol get_zone_counts\n"); return -EFAULT; } -# else -# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable" # endif /* HAVE_GET_ZONE_COUNTS */ #endif /* HAVE_ZONE_STAT_ITEM_FIA */ diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 294948d81..5dd7884f6 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -503,7 +503,7 @@ proc_dokallsyms_lookup_name(struct ctl_table *table, int write, if (write) { /* This may only be set once at module load time */ - if (spl_kallsyms_lookup_name_fn) + if (spl_kallsyms_lookup_name_fn != SYMBOL_POISON) RETURN(-EEXIST); /* We can't use proc_doulongvec_minmax() in the write diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 88722afe1..1e9671e83 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -60,9 +60,9 @@ __gethrtime(void) { /* Deal with signed/unsigned mismatch */ return (hrtime_t)(res & ~(1ULL << 63)); #else - int64_t j = get_jiffies_64(); + uint64_t j = get_jiffies_64(); - return j * NSEC_PER_SEC / HZ; + return (hrtime_t)(j * NSEC_PER_SEC / HZ); #endif } EXPORT_SYMBOL(__gethrtime); diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index 5a610cee4..224eaa63a 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -327,7 +327,7 @@ splat_list_test6(struct file *file, void *arg) /* Remove all odd items from the queue */ splat_vprint(file, SPLAT_LIST_TEST6_NAME, - "Removing %d odd items from the list\n", list_size / 2); + "Removing %d odd items from the list\n", list_size >> 1); for (li = list_head(&list); li != NULL; li = list_next(&list, li)) { if (li->li_data % 2 == 1) { li_prev = list_prev(&list, li); diff --git a/spl_config.h.in b/spl_config.h.in index 8cfcff5c6..4369f85b7 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -39,6 +39,9 @@ /* div64_64() is available */ #undef HAVE_DIV64_64 +/* div64_u64() is available */ +#undef HAVE_DIV64_U64 + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -60,6 +63,9 @@ /* get_zone_counts() is available */ #undef HAVE_GET_ZONE_COUNTS +/* global_page_state() is available */ +#undef HAVE_GLOBAL_PAGE_STATE + /* init_utsname() is available */ #undef HAVE_INIT_UTSNAME From 6c9433c150ad12d01f7ea4cfc72c8647a08ac5fc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 10:56:13 -0700 Subject: [PATCH 0269/1062] SLES10 Fixes (part 3): - Configure check for mutex_lock_nested(). This function was introduced as part of the mutex validator in 2.6.18, but if it's unavailable then it's safe to fallback to a plain mutex_lock(). --- config/spl-build.m4 | 23 +++++++++++++ configure | 67 ++++++++++++++++++++++++++++++++++++ configure.ac | 1 + include/linux/mutex_compat.h | 12 +++++++ include/sys/types.h | 1 + spl_config.h.in | 3 ++ 6 files changed, 107 insertions(+) create mode 100644 include/linux/mutex_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ebc2721f5..0f849950e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -705,6 +705,29 @@ AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ ]) ]) +dnl # +dnl # 2.6.18 API change, +dnl # First introduced 'mutex_lock_nested()' in include/linux/mutex.h, +dnl # as part of the mutex validator. Fallback to using 'mutex_lock()' +dnl # if the mutex validator is disabled or otherwise unavailable. +dnl # +AC_DEFUN([SPL_AC_MUTEX_LOCK_NESTED], [ + AC_MSG_CHECKING([whether mutex_lock_nested() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct mutex mutex; + mutex_init(&mutex); + mutex_lock_nested(&mutex, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MUTEX_LOCK_NESTED, 1, + [mutex_lock_nested() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.22 API change, dnl # First introduced 'div64_64()' in lib/div64.c diff --git a/configure b/configure index 96d9d886f..c16397c76 100755 --- a/configure +++ b/configure @@ -20510,6 +20510,73 @@ fi + echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 +echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct mutex mutex; + mutex_init(&mutex); + mutex_lock_nested(&mutex, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MUTEX_LOCK_NESTED 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 grep -q -E '[[:space:]]div64_64[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null diff --git a/configure.ac b/configure.ac index 179dbc1d7..e05629750 100644 --- a/configure.ac +++ b/configure.ac @@ -67,6 +67,7 @@ SPL_AC_UACCESS_HEADER SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX +SPL_AC_MUTEX_LOCK_NESTED SPL_AC_DIV64_64 SPL_AC_DIV64_U64 SPL_AC_3ARGS_ON_EACH_CPU diff --git a/include/linux/mutex_compat.h b/include/linux/mutex_compat.h new file mode 100644 index 000000000..49072405e --- /dev/null +++ b/include/linux/mutex_compat.h @@ -0,0 +1,12 @@ +#ifndef _SPL_MUTEX_COMPAT_H +#define _SPL_MUTEX_COMPAT_H + +#include + +/* mutex_lock_nested() introduced in 2.6.18 */ +#ifndef HAVE_MUTEX_LOCK_NESTED +# define mutex_lock_nested(lock, subclass) mutex_lock(lock) +#endif /* HAVE_MUTEX_LOCK_NESTED */ + +#endif /* _SPL_MUTEX_COMPAT_H */ + diff --git a/include/sys/types.h b/include/sys/types.h index 5fd3a9376..252def7bd 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -17,6 +17,7 @@ extern "C" { #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/spl_config.h.in b/spl_config.h.in index 4369f85b7..e3b80e86e 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -87,6 +87,9 @@ /* monotonic_clock() is available */ #undef HAVE_MONOTONIC_CLOCK +/* mutex_lock_nested() is available */ +#undef HAVE_MUTEX_LOCK_NESTED + /* next_online_pgdat() is available */ #undef HAVE_NEXT_ONLINE_PGDAT From a093c6a49927912642ccc35e99f74ecf37d00334 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 11:31:55 -0700 Subject: [PATCH 0270/1062] SLES10 Fixes (part 4): - Configure check for SLES specific API change to vfs_unlink() and vfs_rename() which added a 'struct vfsmount *' argument. This was for something called the linux-security-module, but it appears that it was never adopted upstream. --- config/spl-build.m4 | 38 ++++++++++++ configure | 128 +++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 + module/spl/spl-vnode.c | 19 ++++-- spl_config.h.in | 6 ++ 5 files changed, 188 insertions(+), 5 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 0f849950e..ce798cc74 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -908,3 +908,41 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_FIA], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # SLES API change, never adopted in mainline, +dnl # Third 'struct vfsmount *' argument removed. +dnl # +AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK], + [AC_MSG_CHECKING([whether vfs_unlink() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_unlink(NULL, NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_VFS_UNLINK, 1, + [vfs_unlink() wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # SLES API change, never adopted in mainline, +dnl # Third and sixth 'struct vfsmount *' argument removed. +dnl # +AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME], + [AC_MSG_CHECKING([whether vfs_rename() wants 4 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_rename(NULL, NULL, NULL, NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_4ARGS_VFS_RENAME, 1, + [vfs_rename() wants 4 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index c16397c76..8ad6e7f53 100755 --- a/configure +++ b/configure @@ -21081,6 +21081,134 @@ echo "${ECHO_T}no" >&6 +fi + + rm -Rf build + + + +echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 +echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_unlink(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_VFS_UNLINK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + +echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 +echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_rename(NULL, NULL, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_4ARGS_VFS_RENAME 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + fi rm -Rf build diff --git a/configure.ac b/configure.ac index e05629750..a073f4297 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,8 @@ SPL_AC_NEXT_ZONE SPL_AC_GET_ZONE_COUNTS SPL_AC_GLOBAL_PAGE_STATE SPL_AC_ZONE_STAT_ITEM_FIA +SPL_AC_2ARGS_VFS_UNLINK +SPL_AC_4ARGS_VFS_RENAME AC_CONFIG_FILES([ Makefile diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index b19d9f1de..c5595dee0 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -290,7 +290,7 @@ vn_remove(const char *path, uio_seg_t seg, int flags) mutex_lock_nested(&nd.nd_dentry->d_inode->i_mutex, I_MUTEX_PARENT); #else down(&nd.nd_dentry->d_inode->i_sem); -#endif +#endif /* HAVE_INODE_I_MUTEX */ dentry = vn_lookup_hash(&nd); rc = PTR_ERR(dentry); if (!IS_ERR(dentry)) { @@ -301,7 +301,11 @@ vn_remove(const char *path, uio_seg_t seg, int flags) inode = dentry->d_inode; if (inode) atomic_inc(&inode->i_count); +#ifdef HAVE_2ARGS_VFS_UNLINK rc = vfs_unlink(nd.nd_dentry->d_inode, dentry); +#else + rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, nd.mnt); +#endif /* HAVE_2ARGS_VFS_UNLINK */ exit2: dput(dentry); } @@ -309,7 +313,7 @@ exit2: mutex_unlock(&nd.nd_dentry->d_inode->i_mutex); #else up(&nd.nd_dentry->d_inode->i_sem); -#endif +#endif /* HAVE_INODE_I_MUTEX */ if (inode) iput(inode); /* truncate the inode here */ exit1: @@ -328,9 +332,9 @@ EXPORT_SYMBOL(vn_remove); int vn_rename(const char *oldname, const char *newname, int x1) { - struct dentry * old_dir, * new_dir; - struct dentry * old_dentry, *new_dentry; - struct dentry * trap; + struct dentry *old_dir, *new_dir; + struct dentry *old_dentry, *new_dentry; + struct dentry *trap; struct nameidata oldnd, newnd; int rc = 0; ENTRY; @@ -393,8 +397,13 @@ vn_rename(const char *oldname, const char *newname, int x1) if (new_dentry == trap) GOTO(exit5, rc); +#ifdef HAVE_4ARGS_VFS_RENAME rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); +#else + rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.mnt, + new_dir->d_inode, new_dentry, newnd.mnt); +#endif /* HAVE_4ARGS_VFS_RENAME */ exit5: dput(new_dentry); exit4: diff --git a/spl_config.h.in b/spl_config.h.in index e3b80e86e..3e9e6b9af 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -15,12 +15,18 @@ /* register_sysctl_table() wants 2 args */ #undef HAVE_2ARGS_REGISTER_SYSCTL +/* vfs_unlink() wants 2 args */ +#undef HAVE_2ARGS_VFS_UNLINK + /* INIT_WORK wants 3 args */ #undef HAVE_3ARGS_INIT_WORK /* on_each_cpu wants 3 args */ #undef HAVE_3ARGS_ON_EACH_CPU +/* vfs_rename() wants 4 args */ +#undef HAVE_4ARGS_VFS_RENAME + /* device_create wants 5 args */ #undef HAVE_5ARGS_DEVICE_CREATE From fe4573928fc73590373a074ef9b068c6286d9a26 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 11:54:40 -0700 Subject: [PATCH 0271/1062] SLES10 Fixes (part 5): - Fix incorrect mapping for spl_device_create()->class_device_create() which is the prefered API for 2.6.13 to 2.6.17 based kernels. --- include/spl-device.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spl-device.h b/include/spl-device.h index c82f65dfe..d8c2d09ba 100644 --- a/include/spl-device.h +++ b/include/spl-device.h @@ -39,7 +39,7 @@ typedef struct class_device spl_device; #define spl_class_create(mod, name) class_create(mod, name) #define spl_class_destroy(cls) class_destroy(cls) #define spl_device_create(cls, parent, devt, device, fmt, args...) \ - class_device_create(cls, devt, device, fmt, ## args) + class_device_create(cls, parent, devt, device, fmt, ## args) #define spl_device_destroy(cls, cls_dev, devt) \ class_device_unregister(cls_dev) @@ -60,7 +60,7 @@ typedef struct class_device spl_class_device; #define spl_device_destroy(cls, cls_dev, devt) \ class_simple_device_remove(devt) -#endif -#endif +#endif /* HAVE_CLASS_DEVICE_CREATE */ +#endif /* HAVE_DEVICE_CREATE */ #endif /* _SPL_DEVICE_H */ From 3731931529df2bff63ca3d62e387d4e602de7cb2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 12:23:24 -0700 Subject: [PATCH 0272/1062] Powerpc Fixes (part 1): - Enable builds for powerpc ISA type. - Add DIV_ROUND_UP and roundup macros if unavailable. - Cast 64-bit values for %lld format string to (long long) to quiet compile warning. --- include/sys/isa_defs.h | 17 ++++++++++++++++- include/sys/sysmacros.h | 12 +++++++++--- module/splat/splat-kobj.c | 8 +++++--- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 57a6d366e..3b8fffe1e 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -39,7 +39,22 @@ extern "C" { #define _ILP32 #endif -#else /* Currently only x86_64 and i386 arches supported */ +/* powerpc (ppc64) arch specific defines */ +#elif defined(__powerpc) || defined(__powerpc__) + +#if !defined(__powerpc) +#define __powerpc +#endif + +#if !defined(__powerpc__) +#define __powerpc__ +#endif + +#if !defined(_LP64) +#define _LP64 +#endif + +#else /* Currently only x86_64, i386, and powerpc arches supported */ #error "Unsupported ISA type" #endif diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 923cc22e7..67afbfeb0 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -149,13 +149,19 @@ extern uint32_t zone_get_hostid(void *zone); /* common macros */ #ifndef MIN -#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef MAX -#define MAX(a, b) ((a) < (b) ? (b) : (a)) +#define MAX(a, b) ((a) < (b) ? (b) : (a)) #endif #ifndef ABS -#define ABS(a) ((a) < 0 ? -(a) : (a)) +#define ABS(a) ((a) < 0 ? -(a) : (a)) +#endif +#ifndef DIV_ROUND_UP +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#endif +#ifndef roundup +#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #endif /* diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c index 2137ab02a..c646cce1b 100644 --- a/module/splat/splat-kobj.c +++ b/module/splat/splat-kobj.c @@ -85,7 +85,8 @@ splat_kobj_test2(struct file *file, void *arg) if (!buf) { rc = -ENOMEM; splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed to alloc " - "%lld bytes for tmp buffer (%d)\n", size, rc); + "%lld bytes for tmp buffer (%d)\n", + (long long)size, rc); goto out; } @@ -104,7 +105,8 @@ splat_kobj_test2(struct file *file, void *arg) rc = -EFBIG; splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Stat'ed size " "(%lld) does not match number of bytes read " - "(%lld)\n", size, (uint64_t)strlen(buf)); + "(%lld)\n", (long long)size, + (long long)strlen(buf)); goto out2; } @@ -112,7 +114,7 @@ splat_kobj_test2(struct file *file, void *arg) splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "\n%s\n", buf); splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Successfully stat'ed " "and read expected number of bytes (%lld) from test " - "file: %s\n", size, SPLAT_KOBJ_TEST_FILE); + "file: %s\n", (long long)size, SPLAT_KOBJ_TEST_FILE); out2: kfree(buf); out: From 5232d256b45b3c48dd96d30b5907c0205192197b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 14:23:13 -0700 Subject: [PATCH 0273/1062] SLES10 Fixes (part 6) - Prior to 2.6.17 there were no *_pgdat helper functions in mm/mmzone.c. Instead for_each_zone() operated directly on pgdat_list which may or may not have been exported depending on how your kernel was compiled. Now new configure checks determine if you have the helpers or not, and if the needed symbols are exported. If they are not exported then they are dynamically aquired at runtime by kallsyms_lookup_name(). --- config/spl-build.m4 | 38 +++++++++++++++++++++++++++++ configure | 57 +++++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 ++ include/sys/vmsystm.h | 30 ++++++++++++++--------- module/spl/spl-kmem.c | 47 ++++++++++++++++++++++++++--------- spl_config.h.in | 6 +++++ 6 files changed, 157 insertions(+), 23 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ce798cc74..750218941 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -802,6 +802,31 @@ AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], [ []) ]) +dnl # +dnl # 2.6.17 API change +dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and +dnl # next_zone() are introduced to simplify for_each_zone(). These symbols +dnl # were exported in 2.6.17 for use by modules which was consistent with +dnl # the previous implementation of for_each_zone(). From 2.6.18 - 2.6.19 +dnl # the symbols were exported as 'unused', and by 2.6.20 they exports +dnl # were dropped entirely leaving modules no way to directly iterate over +dnl # the zone list. Because we need access to the zone helpers we check +dnl # if the kernel contains the old or new implementation. Then we check +dnl # to see if the symbols we need for each version are available. If they +dnl # are not, dynamically aquire the addresses with kallsyms_lookup_name(). +dnl # +AC_DEFUN([SPL_AC_PGDAT_HELPERS], [ + AC_MSG_CHECKING([whether symbol *_pgdat exist]) + grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null + rc=$? + if test $rc -eq 0; then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_PGDAT_HELPERS, 1, [pgdat helpers are available]) + else + AC_MSG_RESULT([no]) + fi +]) + dnl # dnl # Proposed API change, dnl # This symbol is not available in stock kernels. You may build a @@ -850,6 +875,19 @@ AC_DEFUN([SPL_AC_NEXT_ZONE], [ []) ]) +dnl # +dnl # 2.6.17 API change, +dnl # See SPL_AC_PGDAT_HELPERS for details. +dnl # +AC_DEFUN([SPL_AC_PGDAT_LIST], [ + SPL_CHECK_SYMBOL_EXPORT( + [pgdat_list], + [], + [AC_DEFINE(HAVE_PGDAT_LIST, 1, + [pgdat_list is available])], + []) +]) + dnl # dnl # Proposed API change, dnl # This symbol is not available in stock kernels. You may build a diff --git a/configure b/configure index 8ad6e7f53..e42d7bfb9 100755 --- a/configure +++ b/configure @@ -20798,6 +20798,24 @@ _ACEOF + echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 +echo $ECHO_N "checking whether symbol *_pgdat exist... $ECHO_C" >&6 + grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null + rc=$? + if test $rc -eq 0; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_HELPERS 1 +_ACEOF + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null @@ -20915,6 +20933,45 @@ _ACEOF + echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 +echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]pgdat_list[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_LIST 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_LIST 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 grep -q -E '[[:space:]]get_zone_counts[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null diff --git a/configure.ac b/configure.ac index a073f4297..ecad8cbd0 100644 --- a/configure.ac +++ b/configure.ac @@ -73,9 +73,11 @@ SPL_AC_DIV64_U64 SPL_AC_3ARGS_ON_EACH_CPU SPL_AC_KALLSYMS_LOOKUP_NAME SPL_AC_GET_VMALLOC_INFO +SPL_AC_PGDAT_HELPERS SPL_AC_FIRST_ONLINE_PGDAT SPL_AC_NEXT_ONLINE_PGDAT SPL_AC_NEXT_ZONE +SPL_AC_PGDAT_LIST SPL_AC_GET_ZONE_COUNTS SPL_AC_GLOBAL_PAGE_STATE SPL_AC_ZONE_STAT_ITEM_FIA diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 71058eef8..75365fde0 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -93,26 +93,34 @@ extern get_vmalloc_info_t get_vmalloc_info_fn; #endif /* CONFIG_MMU */ #endif /* HAVE_GET_VMALLOC_INFO */ +#ifdef HAVE_PGDAT_HELPERS /* Source linux/mm/mmzone.c */ -#ifndef HAVE_FIRST_ONLINE_PGDAT +# ifndef HAVE_FIRST_ONLINE_PGDAT typedef struct pglist_data *(*first_online_pgdat_t)(void); extern first_online_pgdat_t first_online_pgdat_fn; -#define first_online_pgdat() first_online_pgdat_fn() -#endif /* HAVE_FIRST_ONLINE_PGDAT */ +# define first_online_pgdat() first_online_pgdat_fn() +# endif /* HAVE_FIRST_ONLINE_PGDAT */ -/* Source linux/mm/mmzone.c */ -#ifndef HAVE_NEXT_ONLINE_PGDAT +# ifndef HAVE_NEXT_ONLINE_PGDAT typedef struct pglist_data *(*next_online_pgdat_t)(struct pglist_data *); extern next_online_pgdat_t next_online_pgdat_fn; -#define next_online_pgdat(pgd) next_online_pgdat_fn(pgd) -#endif /* HAVE_NEXT_ONLINE_PGDAT */ +# define next_online_pgdat(pgd) next_online_pgdat_fn(pgd) +# endif /* HAVE_NEXT_ONLINE_PGDAT */ -/* Source linux/mm/mmzone.c */ -#ifndef HAVE_NEXT_ZONE +# ifndef HAVE_NEXT_ZONE typedef struct zone *(*next_zone_t)(struct zone *); extern next_zone_t next_zone_fn; -#define next_zone(zone) next_zone_fn(zone) -#endif /* HAVE_NEXT_ZONE */ +# define next_zone(zone) next_zone_fn(zone) +# endif /* HAVE_NEXT_ZONE */ + +#else /* HAVE_PGDAT_HELPERS */ + +# ifndef HAVE_PGDAT_LIST +extern struct pglist_data *pgdat_list_addr; +# define pgdat_list pgdat_list_addr +# endif /* HAVE_PGDAT_LIST */ + +#endif /* HAVE_PGDAT_HELPERS */ /* Source linux/mm/vmstat.c */ #ifndef HAVE_ZONE_STAT_ITEM_FIA diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 706691929..4009aa3b2 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -84,20 +84,30 @@ get_vmalloc_info_t get_vmalloc_info_fn = SYMBOL_POISON; EXPORT_SYMBOL(get_vmalloc_info_fn); #endif /* HAVE_GET_VMALLOC_INFO */ -#ifndef HAVE_FIRST_ONLINE_PGDAT +#ifdef HAVE_PGDAT_HELPERS +# ifndef HAVE_FIRST_ONLINE_PGDAT first_online_pgdat_t first_online_pgdat_fn = SYMBOL_POISON; EXPORT_SYMBOL(first_online_pgdat_fn); -#endif /* HAVE_FIRST_ONLINE_PGDAT */ +# endif /* HAVE_FIRST_ONLINE_PGDAT */ -#ifndef HAVE_NEXT_ONLINE_PGDAT +# ifndef HAVE_NEXT_ONLINE_PGDAT next_online_pgdat_t next_online_pgdat_fn = SYMBOL_POISON; EXPORT_SYMBOL(next_online_pgdat_fn); -#endif /* HAVE_NEXT_ONLINE_PGDAT */ +# endif /* HAVE_NEXT_ONLINE_PGDAT */ -#ifndef HAVE_NEXT_ZONE +# ifndef HAVE_NEXT_ZONE next_zone_t next_zone_fn = SYMBOL_POISON; EXPORT_SYMBOL(next_zone_fn); -#endif /* HAVE_NEXT_ZONE */ +# endif /* HAVE_NEXT_ZONE */ + +#else /* HAVE_PGDAT_HELPERS */ + +# ifndef HAVE_PGDAT_LIST +struct pglist_data *pgdat_list_addr = SYMBOL_POISON; +EXPORT_SYMBOL(pgdat_list_addr); +# endif /* HAVE_PGDAT_LIST */ + +#endif /* HAVE_PGDAT_HELPERS */ #ifndef HAVE_ZONE_STAT_ITEM_FIA # ifndef HAVE_GET_ZONE_COUNTS @@ -1806,32 +1816,45 @@ spl_kmem_init_kallsyms_lookup(void) } #endif /* HAVE_GET_VMALLOC_INFO */ -#ifndef HAVE_FIRST_ONLINE_PGDAT +#ifdef HAVE_PGDAT_HELPERS +# ifndef HAVE_FIRST_ONLINE_PGDAT first_online_pgdat_fn = (first_online_pgdat_t) spl_kallsyms_lookup_name("first_online_pgdat"); if (!first_online_pgdat_fn) { printk(KERN_ERR "Error: Unknown symbol first_online_pgdat\n"); return -EFAULT; } -#endif /* HAVE_FIRST_ONLINE_PGDAT */ +# endif /* HAVE_FIRST_ONLINE_PGDAT */ -#ifndef HAVE_NEXT_ONLINE_PGDAT +# ifndef HAVE_NEXT_ONLINE_PGDAT next_online_pgdat_fn = (next_online_pgdat_t) spl_kallsyms_lookup_name("next_online_pgdat"); if (!next_online_pgdat_fn) { printk(KERN_ERR "Error: Unknown symbol next_online_pgdat\n"); return -EFAULT; } -#endif /* HAVE_NEXT_ONLINE_PGDAT */ +# endif /* HAVE_NEXT_ONLINE_PGDAT */ -#ifndef HAVE_NEXT_ZONE +# ifndef HAVE_NEXT_ZONE next_zone_fn = (next_zone_t) spl_kallsyms_lookup_name("next_zone"); if (!next_zone_fn) { printk(KERN_ERR "Error: Unknown symbol next_zone\n"); return -EFAULT; } -#endif /* HAVE_NEXT_ZONE */ +# endif /* HAVE_NEXT_ZONE */ + +#else /* HAVE_PGDAT_HELPERS */ + +# ifndef HAVE_PGDAT_LIST + pgdat_list_addr = (struct pglist_data *) + spl_kallsyms_lookup_name("pgdat_list"); + if (!pgdat_list_addr) { + printk(KERN_ERR "Error: Unknown symbol pgdat_list\n"); + return -EFAULT; + } +# endif /* HAVE_PGDAT_LIST */ +#endif /* HAVE_PGDAT_HELPERS */ #ifndef HAVE_ZONE_STAT_ITEM_FIA # ifndef HAVE_GET_ZONE_COUNTS diff --git a/spl_config.h.in b/spl_config.h.in index 3e9e6b9af..3b07d993c 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -105,6 +105,12 @@ /* struct path used in struct nameidata */ #undef HAVE_PATH_IN_NAMEIDATA +/* pgdat helpers are available */ +#undef HAVE_PGDAT_HELPERS + +/* pgdat_list is available */ +#undef HAVE_PGDAT_LIST + /* set_normalized_timespec() is available as export */ #undef HAVE_SET_NORMALIZED_TIMESPEC_EXPORT From 124ca8a5a98a5e64e6a221b5f30c48361dac6f24 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 15:30:13 -0700 Subject: [PATCH 0274/1062] SLES10 Fixes (part 7) - Initial SLES testing uncovered a long standing bug in the debug tracing. The tcd_for_each() macro expected a NULL to terminate the trace_data[i] array but this was only ever true due to luck. All trace_data[] iterators are now properly capped by TCD_TYPE_MAX. - SPLAT_MAJOR 229 conflicted with a 'hvc' device on my SLES system. Since this was always an arbitrary choice I picked something else. - The HAVE_PGDAT_LIST case should set pgdat_list_addr to the value stored at the address of the memory location returned by kallsyms_lookup_name(). --- include/splat-ctl.h | 2 +- include/sys/debug.h | 4 ++-- module/spl/spl-debug.c | 2 +- module/spl/spl-kmem.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 82d5c0b50..05eb3e8f5 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -31,7 +31,7 @@ * and kernelspace portions of splat must agree on. */ -#define SPLAT_MAJOR 229 /* XXX - Arbitrary */ +#define SPLAT_MAJOR 225 /* XXX - Arbitrary */ #define SPLAT_MINORS 1 #define SPLAT_NAME "splatctl" #define SPLAT_DEV "/dev/splatctl" diff --git a/include/sys/debug.h b/include/sys/debug.h index 7ceb571d0..12226a033 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -173,12 +173,12 @@ union trace_data_union { extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; #define tcd_for_each(tcd, i, j) \ - for (i = 0; trace_data[i] != NULL; i++) \ + for (i = 0; i < TCD_TYPE_MAX; i++) \ for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) #define tcd_for_each_type_lock(tcd, i, cpu) \ - for (i = 0; trace_data[i] && \ + for (i = 0; i < TCD_TYPE_MAX && trace_data[i] && \ (tcd = &(*trace_data[i])[cpu].tcd) && \ trace_lock_tcd(tcd); trace_unlock_tcd(tcd), i++) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index d2b96b0c3..a60740519 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -1261,7 +1261,7 @@ trace_fini(void) } } - for (i = 0; trace_data[i] != NULL; i++) { + for (i = 0; i < TCD_TYPE_MAX && trace_data[i] != NULL; i++) { kfree(trace_data[i]); trace_data[i] = NULL; } diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 4009aa3b2..4edd3d7e1 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1847,7 +1847,7 @@ spl_kmem_init_kallsyms_lookup(void) #else /* HAVE_PGDAT_HELPERS */ # ifndef HAVE_PGDAT_LIST - pgdat_list_addr = (struct pglist_data *) + pgdat_list_addr = *(struct pglist_data **) spl_kallsyms_lookup_name("pgdat_list"); if (!pgdat_list_addr) { printk(KERN_ERR "Error: Unknown symbol pgdat_list\n"); From 9593ef76d9ab2290a4fee7f97651dfa1f57185e6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 May 2009 16:33:08 -0700 Subject: [PATCH 0275/1062] SLES10 Fixes (part 8) - Add compat_ioctl() handler, by default 64-bit SLES systems build 32-bit ELF binaries. For the 32-bit binaries to pass ioctl information to a 64-bit kernel a compatibility handler needs to be registered. In our case no additional conversions are needed to convert 32-bit ioctl() commands to 64-bit commands so we can just call the default handler. --- module/splat/splat-ctl.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 2ff62ffb0..c123f5bf9 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -460,6 +460,15 @@ splat_ioctl(struct inode *inode, struct file *file, return rc; } +#ifdef CONFIG_COMPAT +/* Compatibility handler for ioctls from 32-bit ELF binaries */ +static long +splat_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + return splat_ioctl(NULL, file, cmd, arg); +} +#endif /* CONFIG_COMPAT */ + /* I'm not sure why you would want to write in to this buffer from * user space since its principle use is to pass test status info * back to the user space, but I don't see any reason to prevent it. @@ -573,13 +582,16 @@ static loff_t splat_seek(struct file *file, loff_t offset, int origin) } static struct file_operations splat_fops = { - .owner = THIS_MODULE, - .open = splat_open, - .release = splat_release, - .ioctl = splat_ioctl, - .read = splat_read, - .write = splat_write, - .llseek = splat_seek, + .owner = THIS_MODULE, + .open = splat_open, + .release = splat_release, + .ioctl = splat_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = splat_compat_ioctl, +#endif + .read = splat_read, + .write = splat_write, + .llseek = splat_seek, }; static struct cdev splat_cdev = { From e554dffa6031a2cf37537fc8451f757d5ae9e46f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 21 May 2009 10:56:11 -0700 Subject: [PATCH 0276/1062] SLES10 Fixes (part 9) - Proper ioctl() 32/64-bit binary compatibility. We need to ensure the ioctl data itself is always packed the same for 32/64-bit binaries. Additionally, the correct thing to do is encode this size in bytes as part of the command using _IOC_SIZE(). - Minor formatting changes to respect the 80 character limit. - Move all SPLAT_SUBSYSTEM_* defines in to splat-ctl.h. - Increase SPLAT_SUBSYSTEM_UNKNOWN because we were getting close to accidentally using it for a real registered subsystem. --- cmd/splat.c | 51 ++++++----------------------- include/splat-ctl.h | 62 +++++++++++++++++++++++------------- module/splat/splat-atomic.c | 1 - module/splat/splat-condvar.c | 1 - module/splat/splat-ctl.c | 23 +++++++++---- module/splat/splat-generic.c | 1 - module/splat/splat-kmem.c | 1 - module/splat/splat-kobj.c | 1 - module/splat/splat-list.c | 1 - module/splat/splat-mutex.c | 1 - module/splat/splat-random.c | 1 - module/splat/splat-rwlock.c | 1 - module/splat/splat-taskq.c | 1 - module/splat/splat-thread.c | 1 - module/splat/splat-time.c | 1 - module/splat/splat-vnode.c | 1 - 16 files changed, 64 insertions(+), 85 deletions(-) diff --git a/cmd/splat.c b/cmd/splat.c index 3fefe9739..abeea15e9 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -131,8 +131,8 @@ static int subsystem_setup(void) rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); if (rc) { - fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); + fprintf(stderr, "Ioctl() error 0x%lx / %d: %d\n", + (unsigned long)SPLAT_CFG, cfg->cfg_cmd, errno); free(cfg); return rc; } @@ -140,7 +140,7 @@ static int subsystem_setup(void) size = cfg->cfg_rc1; free(cfg); - /* Based on the newly aquired number of subsystems allocate enough + /* Based on the newly acquired number of subsystems allocate * memory to get the descriptive information for them all. */ cfg_size = sizeof(*cfg) + size * sizeof(splat_user_t); cfg = (splat_cfg_t *)malloc(cfg_size); @@ -180,23 +180,6 @@ static int subsystem_setup(void) return 0; } -/* XXX - Commented out until we sort the lists */ -#if 0 -static int subsystem_compare(const void *l_arg, const void *r_arg, void *private) -{ - const subsystem_t *l = l_arg; - const subsystem_t *r = r_arg; - - if (l->sub_desc.id > r->sub_desc.id) - return 1; - - if (l->sub_desc.id < r->sub_desc.id) - return -1; - - return 0; -} -#endif - static void subsystem_list(List l, int indent) { ListIterator i; @@ -271,7 +254,7 @@ static int test_setup(subsystem_t *sub) /* Based on the newly aquired number of tests allocate enough * memory to get the descriptive information for them all. */ - cfg = (splat_cfg_t *)malloc(sizeof(*cfg) + size * sizeof(splat_user_t)); + cfg = (splat_cfg_t *)malloc(sizeof(*cfg) + size*sizeof(splat_user_t)); if (cfg == NULL) return -ENOMEM; @@ -309,23 +292,6 @@ static int test_setup(subsystem_t *sub) return 0; } -/* XXX - Commented out until we sort the lists */ -#if 0 -static int test_compare(const void *l_arg, const void *r_arg, void *private) -{ - const test_t *l = l_arg; - const test_t *r = r_arg; - - if (l->test_desc.id > r->test_desc.id) - return 1; - - if (l->test_desc.id < r->test_desc.id) - return -1; - - return 0; -} -#endif - static test_t *test_copy(test_t *test) { return test_init(test->test_sub, &test->test_desc); @@ -374,7 +340,7 @@ static test_t *test_find(char *sub_str, char *test_str) while ((test = list_next(ti))) { if (!strncmp(test->test_desc.name, test_str, - SPLAT_NAME_SIZE) || test->test_desc.id == test_num) { + SPLAT_NAME_SIZE) || test->test_desc.id==test_num) { list_iterator_destroy(ti); list_iterator_destroy(si); return test; @@ -467,7 +433,8 @@ static int test_run(cmd_args_t *args, test_t *test) free(cmd); if (args->args_verbose) { - if ((rc = read(splatctl_fd, splat_buffer, splat_buffer_size - 1)) < 0) { + if ((rc = read(splatctl_fd, splat_buffer, + splat_buffer_size - 1)) < 0) { fprintf(stdout, "Error reading results: %d\n", rc); } else { fprintf(stdout, "\n%s\n", splat_buffer); @@ -530,7 +497,7 @@ static int args_parse_test(cmd_args_t *args, char *str) if (!strncasecmp(sub_str, "all", strlen(sub_str)) || (sub_num == -1)) sub_all = 1; - if (!strncasecmp(test_str, "all", strlen(test_str)) || (test_num == -1)) + if (!strncasecmp(test_str,"all",strlen(test_str)) || (test_num == -1)) test_all = 1; si = list_iterator_create(subsystems); @@ -551,7 +518,7 @@ static int args_parse_test(cmd_args_t *args, char *str) } else { /* Add a specific test from all subsystems */ while ((s = list_next(si))) { - if ((t = test_find(s->sub_desc.name,test_str))) { + if ((t=test_find(s->sub_desc.name,test_str))) { if ((rc = test_add(args, t))) goto error_run; diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 05eb3e8f5..7f49b9fff 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -27,10 +27,13 @@ #ifndef _SPLAT_CTL_H #define _SPLAT_CTL_H -/* Contains shared definitions which both the userspace - * and kernelspace portions of splat must agree on. - */ +#include +/* + * Contains shared definitions for both user space and kernel space. To + * ensure 32-bit/64-bit interoperability over ioctl()'s only types with + * fixed sizes can be used. + */ #define SPLAT_MAJOR 225 /* XXX - Arbitrary */ #define SPLAT_MINORS 1 #define SPLAT_NAME "splatctl" @@ -40,24 +43,24 @@ #define SPLAT_DESC_SIZE 60 typedef struct splat_user { - char name[SPLAT_NAME_SIZE]; /* short name */ - char desc[SPLAT_DESC_SIZE]; /* short description */ - int id; /* unique numeric id */ + char name[SPLAT_NAME_SIZE]; /* Short name */ + char desc[SPLAT_DESC_SIZE]; /* Short description */ + __u32 id; /* Unique numeric id */ } splat_user_t; #define SPLAT_CFG_MAGIC 0x15263748U typedef struct splat_cfg { - unsigned int cfg_magic; /* Unique magic */ - int cfg_cmd; /* Config command */ - int cfg_arg1; /* Config command arg 1 */ - int cfg_rc1; /* Config response 1 */ + __u32 cfg_magic; /* Unique magic */ + __u32 cfg_cmd; /* Configure command */ + __s32 cfg_arg1; /* Configure command arg 1 */ + __s32 cfg_rc1; /* Configure response 1 */ union { struct { - int size; + __u32 size; splat_user_t descs[0]; } splat_subsystems; struct { - int size; + __u32 size; splat_user_t descs[0]; } splat_tests; } cfg_data; @@ -65,16 +68,16 @@ typedef struct splat_cfg { #define SPLAT_CMD_MAGIC 0x9daebfc0U typedef struct splat_cmd { - unsigned int cmd_magic; /* Unique magic */ - int cmd_subsystem; /* Target subsystem */ - int cmd_test; /* Subsystem test */ - int cmd_data_size; /* Extra opaque data */ + __u32 cmd_magic; /* Unique magic */ + __u32 cmd_subsystem; /* Target subsystem */ + __u32 cmd_test; /* Subsystem test */ + __u32 cmd_data_size; /* Opaque data size */ char cmd_data_str[0]; /* Opaque data region */ } splat_cmd_t; /* Valid ioctls */ -#define SPLAT_CFG _IOWR('f', 101, long) -#define SPLAT_CMD _IOWR('f', 102, long) +#define SPLAT_CFG _IOWR('f', 101, splat_cfg_t) +#define SPLAT_CMD _IOWR('f', 102, splat_cmd_t) /* Valid configuration commands */ #define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ @@ -84,11 +87,24 @@ typedef struct splat_cmd { #define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ #define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ -/* Valid subsystem and test commands defined in each subsystem, we do - * need to be careful to avoid colisions. That alone may argue to define - * them all here, for now we just define the global error codes. +/* + * Valid subsystem and test commands are defined in each subsystem as + * SPLAT_SUBSYSTEM_*. We do need to be careful to avoid collisions, the + * currently defined subsystems are as follows: */ -#define SPLAT_SUBSYSTEM_UNKNOWN 0xF00 -#define SPLAT_TEST_UNKNOWN 0xFFF +#define SPLAT_SUBSYSTEM_KMEM 0x0100 +#define SPLAT_SUBSYSTEM_TASKQ 0x0200 +#define SPLAT_SUBSYSTEM_KRNG 0x0300 +#define SPLAT_SUBSYSTEM_MUTEX 0x0400 +#define SPLAT_SUBSYSTEM_CONDVAR 0x0500 +#define SPLAT_SUBSYSTEM_THREAD 0x0600 +#define SPLAT_SUBSYSTEM_RWLOCK 0x0700 +#define SPLAT_SUBSYSTEM_TIME 0x0800 +#define SPLAT_SUBSYSTEM_VNODE 0x0900 +#define SPLAT_SUBSYSTEM_KOBJ 0x0a00 +#define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 +#define SPLAT_SUBSYSTEM_LIST 0x0c00 +#define SPLAT_SUBSYSTEM_GENERIC 0x0d00 +#define SPLAT_SUBSYSTEM_UNKNOWN 0xff00 #endif /* _SPLAT_CTL_H */ diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index cc947d095..3a651103e 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 #define SPLAT_ATOMIC_NAME "atomic" #define SPLAT_ATOMIC_DESC "Kernel Atomic Tests" diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index 276798818..baef871c2 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_CONDVAR 0x0500 #define SPLAT_CONDVAR_NAME "condvar" #define SPLAT_CONDVAR_DESC "Kernel Condition Variable Tests" diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index c123f5bf9..c8925636a 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -326,11 +326,15 @@ splat_validate(struct file *file, splat_subsystem_t *sub, int cmd, void *arg) } static int -splat_ioctl_cfg(struct file *file, unsigned long arg) +splat_ioctl_cfg(struct file *file, unsigned int cmd, unsigned long arg) { splat_cfg_t kcfg; int rc = 0; + /* User and kernel space agree about arg size */ + if (_IOC_SIZE(cmd) != sizeof(kcfg)) + return -EBADMSG; + if (copy_from_user(&kcfg, (splat_cfg_t *)arg, sizeof(kcfg))) return -EFAULT; @@ -362,7 +366,7 @@ splat_ioctl_cfg(struct file *file, unsigned long arg) case SPLAT_CFG_SUBSYSTEM_LIST: /* cfg_arg1 - Unused * cfg_rc1 - Set to number of subsystems - * cfg_data.splat_subsystems - Populated with subsystems + * cfg_data.splat_subsystems - Set with subsystems */ rc = splat_subsystem_list(&kcfg, arg); break; @@ -380,7 +384,8 @@ splat_ioctl_cfg(struct file *file, unsigned long arg) rc = splat_test_list(&kcfg, arg); break; default: - splat_print(file, "Bad config command %d\n", kcfg.cfg_cmd); + splat_print(file, "Bad config command %d\n", + kcfg.cfg_cmd); rc = -EINVAL; break; } @@ -389,13 +394,17 @@ splat_ioctl_cfg(struct file *file, unsigned long arg) } static int -splat_ioctl_cmd(struct file *file, unsigned long arg) +splat_ioctl_cmd(struct file *file, unsigned int cmd, unsigned long arg) { splat_subsystem_t *sub; splat_cmd_t kcmd; int rc = -EINVAL; void *data = NULL; + /* User and kernel space agree about arg size */ + if (_IOC_SIZE(cmd) != sizeof(kcmd)) + return -EBADMSG; + if (copy_from_user(&kcmd, (splat_cfg_t *)arg, sizeof(kcmd))) return -EFAULT; @@ -432,7 +441,7 @@ splat_ioctl_cmd(struct file *file, unsigned long arg) static int splat_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) + unsigned int cmd, unsigned long arg) { unsigned int minor = iminor(file->f_dentry->d_inode); int rc = 0; @@ -446,10 +455,10 @@ splat_ioctl(struct inode *inode, struct file *file, switch (cmd) { case SPLAT_CFG: - rc = splat_ioctl_cfg(file, arg); + rc = splat_ioctl_cfg(file, cmd, arg); break; case SPLAT_CMD: - rc = splat_ioctl_cmd(file, arg); + rc = splat_ioctl_cmd(file, cmd, arg); break; default: splat_print(file, "Bad ioctl command %d\n", cmd); diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index 6da7473e0..d963e50f3 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_GENERIC 0x0d00 #define SPLAT_GENERIC_NAME "generic" #define SPLAT_GENERIC_DESC "Kernel Generic Tests" diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index f7ea58004..fdf02a917 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_KMEM 0x0100 #define SPLAT_KMEM_NAME "kmem" #define SPLAT_KMEM_DESC "Kernel Malloc/Slab Tests" diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c index c646cce1b..cd73a98f3 100644 --- a/module/splat/splat-kobj.c +++ b/module/splat/splat-kobj.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_KOBJ 0x0a00 #define SPLAT_KOBJ_NAME "kobj" #define SPLAT_KOBJ_DESC "Kernel Kobj Tests" diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index 224eaa63a..e68d4be33 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_LIST 0x0c00 #define SPLAT_LIST_NAME "list" #define SPLAT_LIST_DESC "Kernel List Tests" diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 5c039236e..3d8f94213 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_MUTEX 0x0400 #define SPLAT_MUTEX_NAME "mutex" #define SPLAT_MUTEX_DESC "Kernel Mutex Tests" diff --git a/module/splat/splat-random.c b/module/splat/splat-random.c index c96dd480c..ed8f694c3 100644 --- a/module/splat/splat-random.c +++ b/module/splat/splat-random.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_KRNG 0x0300 #define SPLAT_KRNG_NAME "krng" #define SPLAT_KRNG_DESC "Kernel Random Number Generator Tests" diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 70c9dc3d0..7f19dfb32 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_RWLOCK 0x0700 #define SPLAT_RWLOCK_NAME "rwlock" #define SPLAT_RWLOCK_DESC "Kernel RW Lock Tests" diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index a9398f5a5..6ce398a0e 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_TASKQ 0x0200 #define SPLAT_TASKQ_NAME "taskq" #define SPLAT_TASKQ_DESC "Kernel Task Queue Tests" diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index ca6c46ac3..b88cecb83 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_THREAD 0x0600 #define SPLAT_THREAD_NAME "thread" #define SPLAT_THREAD_DESC "Kernel Thread Tests" diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index 1aa13e520..d9b62be8f 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -26,7 +26,6 @@ #include "splat-internal.h" -#define SPLAT_SUBSYSTEM_TIME 0x0800 #define SPLAT_TIME_NAME "time" #define SPLAT_TIME_DESC "Kernel Time Tests" diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index 413651dac..e545ce9f1 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -27,7 +27,6 @@ #include "splat-internal.h" #include -#define SPLAT_SUBSYSTEM_VNODE 0x0900 #define SPLAT_VNODE_NAME "vnode" #define SPLAT_VNODE_DESC "Kernel Vnode Tests" From 39a3d2a421bf067329bae352866a5d1fccbcee70 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 16 Jun 2009 10:44:59 -0700 Subject: [PATCH 0277/1062] Packaging improvements for RHEL and SLES - Properly honor --prefix in build system and rpm spec file. - Add '--define require_kdir' to spec file to support building rpms against kernel sources installed in non-default locations. - Add '--define require_kobj' to spec file to support building rpms against kernel object installed in non-default locations. - Stop suppressing errors in autogen.sh script. - Improved logic to detect missing kernel objects when they are not located with the source. This is the common case for SLES as well as in-tree chaos kernel builds and is done to simply support for multiple arches. - Moved spl-devel build products to /usr/src/spl-, a spl symlink is created to reference the last installed version. --- Makefile.am | 9 ++++++--- Makefile.in | 9 ++++++--- autogen.sh | 2 +- config/spl-build.m4 | 15 +++++++++------ configure | 15 +++++++++------ include/Makefile.am | 2 +- include/Makefile.in | 2 +- module/Makefile.in | 2 -- spl.spec.in | 42 ++++++++++++++++++++++++++++++++++++------ 9 files changed, 69 insertions(+), 29 deletions(-) diff --git a/Makefile.am b/Makefile.am index 63d6ba7e4..c0a4a6b65 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,8 +16,11 @@ distclean-local:: -type f -print | xargs $(RM) install-data-local: - $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h - $(INSTALL) -D spl_unconfig.h $(DESTDIR)/$(LINUX)/include/spl/spl_unconfig.h + instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ + for instfile in $(noinst_HEADERS) module/Module.symvers; do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + done + (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl) ctags: $(RM) $(top_srcdir)/tags @@ -50,6 +53,6 @@ srpm: dist rpm: srpm rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ + /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kdir $(LINUX)" --define "require_kobj $(LINUX_OBJ)" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild diff --git a/Makefile.in b/Makefile.in index 27825361e..5c3bf0227 100644 --- a/Makefile.in +++ b/Makefile.in @@ -660,8 +660,11 @@ distclean-local:: -type f -print | xargs $(RM) install-data-local: - $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h - $(INSTALL) -D spl_unconfig.h $(DESTDIR)/$(LINUX)/include/spl/spl_unconfig.h + instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ + for instfile in $(noinst_HEADERS) module/Module.symvers; do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + done + (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl) ctags: $(RM) $(top_srcdir)/tags @@ -694,7 +697,7 @@ srpm: dist rpm: srpm rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ + /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kdir $(LINUX)" --define "require_kobj $(LINUX_OBJ)" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/autogen.sh b/autogen.sh index e5614cf32..728000ae4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,6 +3,6 @@ aclocal -I config && libtoolize --automake --copy autoheader && -automake --add-missing --include-deps --copy 2>/dev/null +automake --add-missing --include-deps --copy autoconf rm -rf autom4te.cache aclocal.m4 diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 750218941..a141fce50 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -2,7 +2,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_ARG_WITH([linux], AS_HELP_STRING([--with-linux=PATH], [Path to kernel source]), - [kernelsrc="$withval"; kernelbuild="$withval"]) + [kernelsrc="$withval"]) AC_ARG_WITH([linux-obj], AS_HELP_STRING([--with-linux-obj=PATH], @@ -16,7 +16,6 @@ AC_DEFUN([SPL_AC_KERNEL], [ if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` - kernelbuild= else AC_MSG_RESULT([Not found]) AC_MSG_ERROR([ @@ -31,10 +30,14 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([$kernelsrc]) AC_MSG_CHECKING([kernel build directory]) - if test -z "$kernelbuild" && test -d ${kernelsrc}-obj; then - kernelbuild=${kernelsrc}-obj/`arch`/`arch` - else - kernelbuild=${kernelsrc} + if test -z "$kernelbuild"; then + if test -d ${kernelsrc}-obj; then + kernelbuild=${kernelsrc}-obj/`arch`/`arch` + elif test -d `dirname ${kernelsrc}`/build-`arch`; then + kernelbuild=`dirname ${kernelsrc}`/build-`arch` + else + kernelbuild=${kernelsrc} + fi fi AC_MSG_RESULT([$kernelbuild]) diff --git a/configure b/configure index e42d7bfb9..d2e177ced 100755 --- a/configure +++ b/configure @@ -18930,7 +18930,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Check whether --with-linux or --without-linux was given. if test "${with_linux+set}" = set; then withval="$with_linux" - kernelsrc="$withval"; kernelbuild="$withval" + kernelsrc="$withval" fi; @@ -18948,7 +18948,6 @@ echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` - kernelbuild= else echo "$as_me:$LINENO: result: Not found" >&5 echo "${ECHO_T}Not found" >&6 @@ -18970,10 +18969,14 @@ echo "$as_me: error: echo "${ECHO_T}$kernelsrc" >&6 echo "$as_me:$LINENO: checking kernel build directory" >&5 echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 - if test -z "$kernelbuild" && test -d ${kernelsrc}-obj; then - kernelbuild=${kernelsrc}-obj/`arch`/`arch` - else - kernelbuild=${kernelsrc} + if test -z "$kernelbuild"; then + if test -d ${kernelsrc}-obj; then + kernelbuild=${kernelsrc}-obj/`arch`/`arch` + elif test -d `dirname ${kernelsrc}`/build-`arch`; then + kernelbuild=`dirname ${kernelsrc}`/build-`arch` + else + kernelbuild=${kernelsrc} + fi fi echo "$as_me:$LINENO: result: $kernelbuild" >&5 echo "${ECHO_T}$kernelbuild" >&6 diff --git a/include/Makefile.am b/include/Makefile.am index f85380f79..d1990dcb0 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -16,7 +16,7 @@ noinst_HEADERS += util/*.h noinst_HEADERS += vm/*.h install-data-local: - instdest=$(DESTDIR)/$(LINUX)/include/spl; \ + instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ diff --git a/include/Makefile.in b/include/Makefile.in index e70ab9ff7..7b1437a4d 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -387,7 +387,7 @@ uninstall-am: uninstall-info-am install-data-local: - instdest=$(DESTDIR)/$(LINUX)/include/spl; \ + instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ diff --git a/module/Makefile.in b/module/Makefile.in index abb379482..b93a1d769 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -9,8 +9,6 @@ modules clean: modules_install: $(MAKE) -C @LINUX@ SUBDIRS=`pwd` \ INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=addon $@ - $(INSTALL) -D Module.symvers \ - $(DESTDIR)/@LINUX@/include/spl/Module.symvers distdir: list='$(subdir-m)'; for subdir in $$list; do \ diff --git a/spl.spec.in b/spl.spec.in index cb2648509..4cd71de05 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -1,22 +1,52 @@ # The following block is used to allow the source RPM to be rebuilt # against arbitrary kernels. It ensure the release name is correct # and the proper build/install requires are set. + +# When require_kdir is defined we do one of two things: +# require_kver: Ideally defined to match the kernel. +# !require_kver: A best guess is made. +%if 0%{?require_kdir:1} %if 0%{?require_kver:1} %define kver %{require_kver} +%define kdir %{require_kdir} %else -%define _kdir %((echo X; ls -1d /usr/src/kernels/* /usr/src/linux-* 2>/dev/null)|sed -e 's/linux-//' | tail -1) -%define kver %(basename %{_kdir}) +%{!?require_kobj: %define require_kobj %{require_kdir}} +%define kdir %{require_kdir} +%define kuts %{require_kobj}/include/linux/utsrelease.h \ + %{require_kobj}/include/linux/version.h +%define kver %((grep UTS_RELEASE %{kuts}) | cut -f2 -d'"' | tail -1) +%endif + +# When require_kdir is not defined we do one of two things: +# require_kver: Locate the requested kernel in default dirs. +# !require_kver: Locate the newest kernel in default dirs. +%else +%if 0%{?require_kver:1} +%define kver %{require_kver} +%define kdef %{_prefix}/src/kernels/%{kver} %{_prefix}/src/linux-%{kver} +%define kdir %((echo X; ls -1d %kdef 2>/dev/null)|sed -e 's/linux-//'|tail -1) +%else +%define kdef %{_prefix}/src/kernels/* %{_prefix}/src/linux-* +%define kdir %((echo X; ls -1d %kdef 2>/dev/null)|sed -e 's/linux-//'|tail -1) +%define kver %(basename %{kdir}) +%endif +%endif + +# Kernel objects may not be located with the source. Assume +# that they are but allow this to be overrided if required. +%if 0%{?require_kobj:1} +%define kobj %{require_kobj} +%else +%define kobj %{kdir} %endif # Each distro has its own kernel package naming convention. %if 0%{?ch4} %define kstr chaos-kernel %define kdev chaos-kernel-devel -%define kdir /usr/src/kernels/%{kver} %else %define kstr kernel %define kdev kernel-devel -%define kdir /usr/src/kernels/%{kver} %endif %define debug_package %{nil} @@ -69,7 +99,7 @@ symbols needed for building additional modules which use %{name}. %prep %setup %build -%configure --with-linux=%{kdir} +%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} make %install @@ -87,7 +117,7 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -%{kdir}/include/spl/* +%{_prefix}/src/* %post if [ -f /boot/System.map-%{kver} ]; then From 2e0e7e69769eb0f5ceda102e575da79288d05127 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 16 Jun 2009 11:34:28 -0700 Subject: [PATCH 0278/1062] Packaging improvements for RHEL and SLES (part 2) - Allow checking for exported symbols in both Module.symvers and Module.symvers. My stock SLES kernel ships an objects directory with Module.symvers, yet produces a Module.symvers in the local build directory. --- Makefile.am | 4 +- Makefile.in | 5 ++- cmd/Makefile.in | 1 + config/spl-build.m4 | 21 +++++++-- configure | 103 +++++++++++++++++++++++++++++++------------- configure.ac | 1 + include/Makefile.in | 1 + lib/Makefile.in | 1 + scripts/Makefile.in | 1 + spl.spec.in | 2 +- 10 files changed, 100 insertions(+), 40 deletions(-) diff --git a/Makefile.am b/Makefile.am index c0a4a6b65..b7aed778e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,12 +12,12 @@ distclean-local:: -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ - -o -name 'Makefile' -o -name 'Module.symvers' \) \ + -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ -type f -print | xargs $(RM) install-data-local: instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ - for instfile in $(noinst_HEADERS) module/Module.symvers; do \ + for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl) diff --git a/Makefile.in b/Makefile.in index 5c3bf0227..732880fcc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -123,6 +123,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -656,12 +657,12 @@ distclean-local:: -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ - -o -name 'Makefile' -o -name 'Module.symvers' \) \ + -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ -type f -print | xargs $(RM) install-data-local: instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ - for instfile in $(noinst_HEADERS) module/Module.symvers; do \ + for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl) diff --git a/cmd/Makefile.in b/cmd/Makefile.in index b7fcf9c1c..753c44fca 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -115,6 +115,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/config/spl-build.m4 b/config/spl-build.m4 index a141fce50..2f277a3b3 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -92,9 +92,20 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_SUBST(KERNELCFLAGS) ]) +AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ + AC_MSG_CHECKING([kernel file name for module symbols]) + if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi + AC_MSG_RESULT($LINUX_SYMBOLS) + AC_SUBST(LINUX_SYMBOLS) +]) + AC_DEFUN([SPL_AC_LICENSE], [ - AC_MSG_CHECKING([license]) - AC_MSG_RESULT([GPL]) + AC_MSG_CHECKING([license]) + AC_MSG_RESULT([GPL]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" ]) @@ -286,12 +297,14 @@ dnl # check symbol exported or not dnl # AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], [AC_MSG_CHECKING([whether symbol $1 is exported]) - grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[[:space:]]]$1[[[:space:]]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in $2; do - grep -q -E "EXPORT_SYMBOL.*($1)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*($1)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 diff --git a/configure b/configure index d2e177ced..f3f6b1303 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ LINUX_VERSION KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ LINUX_VERSION KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LINUX_SYMBOLS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -19039,9 +19039,21 @@ echo "${ECHO_T}$kernsrcver" >&6 - echo "$as_me:$LINENO: checking license" >&5 + echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 +echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 + if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi + echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 +echo "${ECHO_T}$LINUX_SYMBOLS" >&6 + + + + echo "$as_me:$LINENO: checking license" >&5 echo $ECHO_N "checking license... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: GPL" >&5 + echo "$as_me:$LINENO: result: GPL" >&5 echo "${ECHO_T}GPL" >&6 KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" @@ -19588,12 +19600,14 @@ fi echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]task_curr[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]task_curr[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in kernel/sched.c; do - grep -q -E "EXPORT_SYMBOL.*(task_curr)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -19757,12 +19771,14 @@ fi echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]device_create[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]device_create[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in drivers/base/core.c; do - grep -q -E "EXPORT_SYMBOL.*(device_create)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(device_create)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -19864,12 +19880,14 @@ fi echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]class_device_create[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]class_device_create[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in drivers/base/class.c; do - grep -q -E "EXPORT_SYMBOL.*(class_device_create)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -19903,12 +19921,14 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in kernel/time.c; do - grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20409,12 +20429,14 @@ fi echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]monotonic_clock[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20582,12 +20604,14 @@ fi echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]div64_64[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]div64_64[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(div64_64)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(div64_64)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20621,12 +20645,14 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]div64_u64[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]div64_u64[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(div64_u64)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(div64_u64)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20725,12 +20751,14 @@ fi echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20764,12 +20792,14 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20821,12 +20851,14 @@ echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20860,12 +20892,14 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20899,12 +20933,14 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]next_zone[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]next_zone[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_zone)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20938,12 +20974,14 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]pgdat_list[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -20977,12 +21015,14 @@ _ACEOF echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' $LINUX_OBJ/Module.symvers 2>/dev/null + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? if test $rc -ne 0; then export=0 for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" "$LINUX_OBJ/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ + "$LINUX_OBJ/$file" 2>/dev/null rc=$? if test $rc -eq 0; then export=1 @@ -22026,6 +22066,7 @@ s,@LINUX_VERSION@,$LINUX_VERSION,;t t s,@KERNELMAKE_PARAMS@,$KERNELMAKE_PARAMS,;t t s,@KERNELCPPFLAGS@,$KERNELCPPFLAGS,;t t s,@KERNELCFLAGS@,$KERNELCFLAGS,;t t +s,@LINUX_SYMBOLS@,$LINUX_SYMBOLS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.ac b/configure.ac index ecad8cbd0..19109ae26 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,7 @@ AC_PROG_CC AC_PROG_LIBTOOL SPL_AC_KERNEL +SPL_AC_MODULE_SYMVERS SPL_AC_LICENSE SPL_AC_DEBUG SPL_AC_DEBUG_KMEM diff --git a/include/Makefile.in b/include/Makefile.in index 7b1437a4d..53650a52e 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -96,6 +96,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 523c30bcb..b8b573ef7 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -109,6 +109,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 3fb7ce62b..bbf7ea47e 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -91,6 +91,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ +LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/spl.spec.in b/spl.spec.in index 4cd71de05..e67408dd7 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -93,7 +93,7 @@ Requires: %{kstr} = %{kver} BuildRequires: %{buildrequires} %description devel -The %{name}-devel package contains the header files and Module.symvers +The %{name}-devel package contains the header files and Module{s}.symvers symbols needed for building additional modules which use %{name}. %prep From 762b96f6c6dd6feb2407bf484685b4ac70ab8fcd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Jun 2009 15:31:40 -0700 Subject: [PATCH 0279/1062] Update ChangeLog with a high level summary of the changes from 0.4.3 to 0.4.4 prior to tagging. Full details can be found in the git commit history. --- ChangeLog | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ META | 2 +- 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 434b9e8e9..908d3c183 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,83 @@ +2009-06-22 Brian Behlendorf + + * : Tag spl-0.4.4 + + * : Added SLES10 support. This includes all compatibility + changes to support 2.6.16 based kernels and the required + build system improvements. + + * : Build System changes for SLES10: + - Exclude -obj when detecting installed kernel source. + - Detect -obj directory for out of tree kernel builds. + - Allow kernel build system to set CC to ensure -m64 is set properly. + This is an issue on 64-bit SLES systems which by default always + build 32-bit binaries (unlike RHEL/Fedora which default to 64-bit) + + * : Configure Checks added for SLES10: + - div64_64() renamed to div64_u64() as of 2.6.26. + - global_page_state() fuction was introduced in 2.6.18 kernels. + The earlier 2.6.16 based SLES10 must not try and use it, + thankfully get_zone_counts() is still available. + - monotonic_clock() is unavailable __gethrtime() must perform the + HZ division as an 'unsigned long long' because the SPL only + implements __udivdi3(), and not __divdi3() for 'long long' + division on 32-bit arches. + - mutex_lock_nested() was introduced as part of the mutex + validator in 2.6.18, when it is unavailable it is safe to + fallback to using a plain mutex_lock(). + - SLES specific API change to vfs_unlink() and vfs_rename() which + added a 'struct vfsmount *' argument. This was for something + called the linux-security-module, but it appears that it was + never adopted upstream. + - spl_device_create() correctly mapped to class_device_create() + for 2.6.13 to 2.6.17 based kernels, this is the preferred API. + - Prior to 2.6.17 there were no *_pgdat helper functions in + mm/mmzone.c. Instead for_each_zone() operated directly on + pgdat_list which may or may not have been exported depending on + how your kernel was compiled. A configure check was added to + determine if you have the helpers or not, and if the needed + symbols are exported. If they are not exported then they are + dynamically aquired at runtime by kallsyms_lookup_name(). + + * : Packaging changes for SLES10 + - Properly honor --prefix in build system and rpm spec file. + - Add '--define require_kdir' to spec file to support building + rpms against kernel sources installed in non-default locations. + - Add '--define require_kobj' to spec file to support building + rpms against kernel object installed in non-default locations. + - Stop suppressing errors in autogen.sh script. + - Improved logic to detect missing kernel objects when they are + not located with the source. This is the common case for SLES + as well as in-tree chaos kernel builds and is done to simply + support for multiple arches. + - Moved spl-devel build products to /usr/src/spl-, a + spl symlink is created to reference the last installed version. + - Allow checking for exported symbols in both Module.symvers + and Module.symvers. My stock SLES kernel ships an objects + directory with Module.symvers, yet produces a Module.symvers + in the local build directory. + + * : Added powerpc64 support. + - Enable builds for powerpc64 ISA type. + - Add DIV_ROUND_UP and roundup macros if unavailable. + - Cast 64-bit values for %lld format string to (long long) to + quiet compile warning. + + * module/splat/splat-ctl.c: Proper ioctl() 32/64-bit binary + compatibility. We need to ensure the ioctl data itself is always + packed the same for 32/64-bit binaries. Additionally, the correct + thing to do is encode this size in bytes as part of the command + using _IOC_SIZE(). + + * modules/spl/spl-kmem.c: Fixed a long standing bug in the debug + tracing. The tcd_for_each() macro expected a NULL to terminate + the trace_data[i] array but this was only ever true due to luck. + All trace_data[] iterators are now properly capped by TCD_TYPE_MAX. + + * modules/spl/spl-kmem.c: To simplify debugging all symbols aquired + dynamically using spl_kallsyms_lookup_name() are initially poisoned + with SYMBOL_POISON. + 2009-03-20 Brian Behlendorf * : Tag spl-0.4.3 diff --git a/META b/META index e1dc7613f..aa42e6238 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.3 +Version: 0.4.4 Release: 1 Release-Tags: relext From 31b2e0b070d99681d189951557d2344dc2b63dbf Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 25 Jun 2009 15:31:53 -0700 Subject: [PATCH 0280/1062] Packaging Fixes - Kernel modules should be built using the LINUX_OBJ Makefiles and not the LINUX Makefiles to ensure the proper install paths are used. - Install modules in to addon/spl/ - Ensure no additional kernel module build products are packaged. - Simplified spl.spec.in which supports RHEL, CHAOS, SLES, FEDORA. --- module/Makefile.in | 8 +-- spl.spec.in | 120 ++++++++++++++++++++++++++------------------- 2 files changed, 74 insertions(+), 54 deletions(-) diff --git a/module/Makefile.in b/module/Makefile.in index b93a1d769..4368f7142 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -4,11 +4,13 @@ subdir-m += splat INSTALL=/usr/bin/install modules clean: - $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ modules_install: - $(MAKE) -C @LINUX@ SUBDIRS=`pwd` \ - INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=addon $@ + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ + INSTALL_MOD_PATH=$(DESTDIR) \ + INSTALL_MOD_DIR=addon/spl $@ + find ${DESTDIR}/lib/modules/ -name 'modules.*' | xargs ${RM} distdir: list='$(subdir-m)'; for subdir in $$list; do \ diff --git a/spl.spec.in b/spl.spec.in index e67408dd7..ac4b9e78d 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -1,71 +1,89 @@ # The following block is used to allow the source RPM to be rebuilt -# against arbitrary kernels. It ensure the release name is correct -# and the proper build/install requires are set. +# against specific kernels. It is preferable that rpmbuild define the +# require_kver, require_kdir, require_obj constants for us, but if it does not +# not we attempt to determine the correct values based on your distro. -# When require_kdir is defined we do one of two things: -# require_kver: Ideally defined to match the kernel. -# !require_kver: A best guess is made. -%if 0%{?require_kdir:1} -%if 0%{?require_kver:1} -%define kver %{require_kver} -%define kdir %{require_kdir} +%{?require_kver: %define kver %{require_kver}} +%{?require_kdir: %define kdir %{require_kdir}} +%{?require_kobj: %define kobj %{require_kobj}} + +# kdir: Full path to the kernel source headers +# kobj: Full path to the kernel build objects +# kver: Kernel version +# kpkg: Kernel package name +# kdevpkg: Kernel devel package name +# kverpkg: Kernel package version + +# SLES*: +%if %{defined sles_version} + %if %{undefined kver} + %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} + %define kver %(%{__cat} %{klnk}/.kernelrelease) + %endif + %define kpkg kernel-%{_target_cpu} + %define kdevpkg kernel-source kernel-syms + %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) + %{!?kdir: %define kdir %{_usrsrc}/linux-%{kverpkg}} + %{!?kobj: %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu}} + +# CHAOS4: %else -%{!?require_kobj: %define require_kobj %{require_kdir}} -%define kdir %{require_kdir} -%define kuts %{require_kobj}/include/linux/utsrelease.h \ - %{require_kobj}/include/linux/version.h -%define kver %((grep UTS_RELEASE %{kuts}) | cut -f2 -d'"' | tail -1) +%if %{defined ch4} + %if %{undefined kver} + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((%{__cat} %{klnk}/kernel.release) | tail -1) + %endif + %define kpkg chaos-kernel + %define kdevpkg chaos-kernel-devel + %define kverpkg %{kver} + %{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} + %{!?kobj: %define kobj %{kdir}} + +# RHEL*/Fedora: +%else +%if %{defined fedora} || %{defined rhel} + %if %{undefined kver} + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((%{__cat} %{klnk}/kernel.release) | tail -1) + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) + %{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} + %{!?kobj: %define kobj %{kdir}} + +%else + +# Unsupported distro: +%{!?kver: %define kver unknown} +%define kpkg kernel +%define kdevpkg kernel-devel +%define kverpkg %{kver} +%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} +%{!?kobj: %define kobj %{kdir}} + %endif - -# When require_kdir is not defined we do one of two things: -# require_kver: Locate the requested kernel in default dirs. -# !require_kver: Locate the newest kernel in default dirs. -%else -%if 0%{?require_kver:1} -%define kver %{require_kver} -%define kdef %{_prefix}/src/kernels/%{kver} %{_prefix}/src/linux-%{kver} -%define kdir %((echo X; ls -1d %kdef 2>/dev/null)|sed -e 's/linux-//'|tail -1) -%else -%define kdef %{_prefix}/src/kernels/* %{_prefix}/src/linux-* -%define kdir %((echo X; ls -1d %kdef 2>/dev/null)|sed -e 's/linux-//'|tail -1) -%define kver %(basename %{kdir}) %endif %endif -# Kernel objects may not be located with the source. Assume -# that they are but allow this to be overrided if required. -%if 0%{?require_kobj:1} -%define kobj %{require_kobj} -%else -%define kobj %{kdir} -%endif - -# Each distro has its own kernel package naming convention. -%if 0%{?ch4} -%define kstr chaos-kernel -%define kdev chaos-kernel-devel -%else -%define kstr kernel -%define kdev kernel-devel -%endif - +# Distro agnostic: %define debug_package %{nil} -# The kernel version should only be appended to a binary RPM. -# When building a source RPM it must be kernel version agnostic. %define name @PACKAGE@ %define version @VERSION@ +# The kernel version should only be appended to a binary RPM. +# When building a source RPM it must be kernel version agnostic. %if %{?build_src_rpm:1}0 %define release @SPL_META_RELEASE@ %else -%define release @SPL_META_RELEASE@_%(echo %{kver} | sed -e 's/-/_/g') +%define release @SPL_META_RELEASE@_%(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %endif %if 0%{?require_kver:1} -%define buildrequires %{kdev}=%{kver} +%define buildrequires %{kdevpkg}=%{kverpkg} %else -%define buildrequires %{kdev} +%define buildrequires %{kdevpkg} %endif Summary: Solaris Porting Layer @@ -77,7 +95,7 @@ License: GPL URL: git://eris.llnl.gov/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Source: %{name}-%{version}.tar.gz -Requires: %{kstr} = %{kver} +Requires: %{kpkg} = %{kverpkg} BuildRequires: %{buildrequires} %description @@ -89,7 +107,7 @@ kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. %package devel Summary: Solaris Porting Layer Headers and Symbols Group: Development/Libraries -Requires: %{kstr} = %{kver} +Requires: %{kpkg} = %{kverpkg} BuildRequires: %{buildrequires} %description devel From 07114bdee9012057c26c17ebe70ab0d9d05c4154 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 25 Jun 2009 16:11:13 -0700 Subject: [PATCH 0281/1062] Build farm integration to ensure BuildRequires are correct --- spl.spec.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spl.spec.in b/spl.spec.in index ac4b9e78d..e6193ffc8 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -74,14 +74,14 @@ # The kernel version should only be appended to a binary RPM. # When building a source RPM it must be kernel version agnostic. -%if %{?build_src_rpm:1}0 +%if %{defined build_src_rpm} %define release @SPL_META_RELEASE@ %else %define release @SPL_META_RELEASE@_%(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %endif -%if 0%{?require_kver:1} -%define buildrequires %{kdevpkg}=%{kverpkg} +%if %{defined require_kver} +%define buildrequires %{kdevpkg}=%{require_kver} %else %define buildrequires %{kdevpkg} %endif From e28bc9160d4dd0706f9c65bf35062bea41f20ebb Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Jun 2009 09:40:14 -0700 Subject: [PATCH 0282/1062] SRPM build farm / mock itergration --- spl.spec.in | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/spl.spec.in b/spl.spec.in index e6193ffc8..3922f938b 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -17,8 +17,8 @@ # SLES*: %if %{defined sles_version} %if %{undefined kver} - %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %(%{__cat} %{klnk}/.kernelrelease) + %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} + %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease 2>/dev/null) | tail -1) %endif %define kpkg kernel-%{_target_cpu} %define kdevpkg kernel-source kernel-syms @@ -30,8 +30,8 @@ %else %if %{defined ch4} %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((%{__cat} %{klnk}/kernel.release) | tail -1) + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) %endif %define kpkg chaos-kernel %define kdevpkg chaos-kernel-devel @@ -43,8 +43,8 @@ %else %if %{defined fedora} || %{defined rhel} %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((%{__cat} %{klnk}/kernel.release) | tail -1) + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) %endif %define kpkg kernel %define kdevpkg kernel-devel @@ -55,12 +55,12 @@ %else # Unsupported distro: -%{!?kver: %define kver unknown} -%define kpkg kernel -%define kdevpkg kernel-devel -%define kverpkg %{kver} -%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} -%{!?kobj: %define kobj %{kdir}} +%{!?kver: %define kver unknown} +%define kpkg kernel +%define kdevpkg kernel-devel +%define kverpkg %{kver} +%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} +%{!?kobj: %define kobj %{kdir}} %endif %endif @@ -80,9 +80,14 @@ %define release @SPL_META_RELEASE@_%(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %endif +# Required by mock to ensure valid 'Requires' and 'BuildRequires' fields +# are set even when a specific kernel version was not requested. This is +# used when mock is attempting to rebuild the srpm for the latest kernel. %if %{defined require_kver} -%define buildrequires %{kdevpkg}=%{require_kver} +%define requires %{kpkg}=%{kverpkg} +%define buildrequires %{kdevpkg}=%{kverpkg} %else +%define requires %{kpkg} %define buildrequires %{kdevpkg} %endif @@ -95,7 +100,7 @@ License: GPL URL: git://eris.llnl.gov/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Source: %{name}-%{version}.tar.gz -Requires: %{kpkg} = %{kverpkg} +Requires: %{requires} BuildRequires: %{buildrequires} %description @@ -107,7 +112,7 @@ kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. %package devel Summary: Solaris Porting Layer Headers and Symbols Group: Development/Libraries -Requires: %{kpkg} = %{kverpkg} +Requires: %{requires} BuildRequires: %{buildrequires} %description devel From af971a8594bd8c472b301c0d194addae5fc56397 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Jun 2009 10:34:40 -0700 Subject: [PATCH 0283/1062] Spec file update, for some reason the following shorthand syntax was failing so it was replaced with the longer %if version. %{!?foo: %define foo bar} changed to %if %{undefined foo} %define foo bar %endif --- spl.spec.in | 55 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/spl.spec.in b/spl.spec.in index 3922f938b..408158fc2 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -18,49 +18,70 @@ %if %{defined sles_version} %if %{undefined kver} %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease 2>/dev/null) | tail -1) - %endif + %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease + 2>/dev/null) | tail -1) + %endif %define kpkg kernel-%{_target_cpu} %define kdevpkg kernel-source kernel-syms %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) - %{!?kdir: %define kdir %{_usrsrc}/linux-%{kverpkg}} - %{!?kobj: %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu}} + %if %{undefined kdir} + %define kdir %{_usrsrc}/linux-%{kverpkg} + %endif + %if %{undefined kobj} + %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} + %endif # CHAOS4: %else %if %{defined ch4} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) - %endif + %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) + %endif %define kpkg chaos-kernel %define kdevpkg chaos-kernel-devel %define kverpkg %{kver} - %{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} - %{!?kobj: %define kobj %{kdir}} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif # RHEL*/Fedora: %else %if %{defined fedora} || %{defined rhel} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) + %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) %endif %define kpkg kernel %define kdevpkg kernel-devel %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) - %{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} - %{!?kobj: %define kobj %{kdir}} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif %else # Unsupported distro: -%{!?kver: %define kver unknown} -%define kpkg kernel -%define kdevpkg kernel-devel -%define kverpkg %{kver} -%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} -%{!?kobj: %define kobj %{kdir}} + %if %{undefined kver} + %define kver unknown + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %{kver} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif %endif %endif From ac12b26284a15ba8985c845a0511448435c3f065 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Jun 2009 11:37:06 -0700 Subject: [PATCH 0284/1062] Simplify the kernel depenency logic --- spl.spec.in | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/spl.spec.in b/spl.spec.in index 408158fc2..0243dc430 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -88,28 +88,23 @@ %endif # Distro agnostic: -%define debug_package %{nil} +%define name @PACKAGE@ +%define version @VERSION@ +%define debug_package %{nil} -%define name @PACKAGE@ -%define version @VERSION@ - -# The kernel version should only be appended to a binary RPM. -# When building a source RPM it must be kernel version agnostic. +# The kernel version should only be appended to a binary RPM. When +# building a source RPM it must be kernel version agnostic. This means +# the source RPM must never specify a required kernel version, but the +# final RPM should be keyed to the kernel version it was built against. %if %{defined build_src_rpm} -%define release @SPL_META_RELEASE@ +%define release @SPL_META_RELEASE@ +%define requires %{kpkg} +%define buildrequires %{kdevpkg} %else -%define release @SPL_META_RELEASE@_%(echo %{kverpkg} | %{__sed} -e 's/-/_/g') -%endif - -# Required by mock to ensure valid 'Requires' and 'BuildRequires' fields -# are set even when a specific kernel version was not requested. This is -# used when mock is attempting to rebuild the srpm for the latest kernel. -%if %{defined require_kver} -%define requires %{kpkg}=%{kverpkg} -%define buildrequires %{kdevpkg}=%{kverpkg} -%else -%define requires %{kpkg} -%define buildrequires %{kdevpkg} +%define release @SPL_META_RELEASE@_%(echo %{kverpkg} | + %{__sed} -e 's/-/_/g') +%define requires %{kpkg} = %{kverpkg} +%define buildrequires %{kdevpkg} = %{kverpkg} %endif Summary: Solaris Porting Layer From 155189d4a72da0aee986193826ceb2cf602c690e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Jun 2009 12:43:27 -0700 Subject: [PATCH 0285/1062] Additional tuning to get the BuildRequires right for all cases. pl.spec~ --- spl.spec.in | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/spl.spec.in b/spl.spec.in index 0243dc430..caba00dfc 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -18,7 +18,7 @@ %if %{defined sles_version} %if %{undefined kver} %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease + %define kver %((echo X; %{__cat} %{klnk}/.kernelrelease 2>/dev/null) | tail -1) %endif %define kpkg kernel-%{_target_cpu} @@ -36,7 +36,7 @@ %if %{defined ch4} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release + %define kver %((echo X; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) %endif %define kpkg chaos-kernel @@ -54,7 +54,7 @@ %if %{defined fedora} || %{defined rhel} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release + %define kver %((echo X; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) %endif %define kpkg kernel @@ -71,7 +71,7 @@ # Unsupported distro: %if %{undefined kver} - %define kver unknown + %define kver X %endif %define kpkg kernel %define kdevpkg kernel-devel @@ -92,6 +92,7 @@ %define version @VERSION@ %define debug_package %{nil} + # The kernel version should only be appended to a binary RPM. When # building a source RPM it must be kernel version agnostic. This means # the source RPM must never specify a required kernel version, but the @@ -99,12 +100,10 @@ %if %{defined build_src_rpm} %define release @SPL_META_RELEASE@ %define requires %{kpkg} -%define buildrequires %{kdevpkg} %else -%define release @SPL_META_RELEASE@_%(echo %{kverpkg} | - %{__sed} -e 's/-/_/g') +%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') +%define release @SPL_META_RELEASE@_%{relext} %define requires %{kpkg} = %{kverpkg} -%define buildrequires %{kdevpkg} = %{kverpkg} %endif Summary: Solaris Porting Layer @@ -117,7 +116,7 @@ URL: git://eris.llnl.gov/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Source: %{name}-%{version}.tar.gz Requires: %{requires} -BuildRequires: %{buildrequires} +BuildRequires: %{kdevpkg} %description The %{name} package contains kernel modules and support utilities for @@ -129,7 +128,7 @@ kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. Summary: Solaris Porting Layer Headers and Symbols Group: Development/Libraries Requires: %{requires} -BuildRequires: %{buildrequires} +BuildRequires: %{kdevpkg} %description devel The %{name}-devel package contains the header files and Module{s}.symvers From c0517c35d244beea61ff443f1e6e7229ef6337fe Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Jun 2009 13:10:52 -0700 Subject: [PATCH 0286/1062] Use do_div on older kernel where do_div64 doesn't exist. --- module/spl/spl-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index fe6350079..568d40635 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -113,7 +113,7 @@ uint64_t __udivdi3(uint64_t dividend, uint64_t divisor) } else d = divisor; - return do_div64(dividend, d); + return do_div(dividend, d); #endif /* HAVE_DIV64_64, HAVE_DIV64_U64 */ } EXPORT_SYMBOL(__udivdi3); From f4f9cd75a1e4654bf50cac6dbb5496ba93bb1662 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Jun 2009 16:30:44 -0700 Subject: [PATCH 0287/1062] Install spl-devel products in /usr/src/spl-SPL_VERSION/LINUX_VERSION/ Remove the spl symlink, it's just confusing --- Makefile.am | 4 ++-- Makefile.in | 4 ++-- include/Makefile.am | 3 ++- include/Makefile.in | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index b7aed778e..022430361 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,11 +16,11 @@ distclean-local:: -type f -print | xargs $(RM) install-data-local: - instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ + destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ + instdest=$(DESTDIR)/${prefix}/src/$$destname; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done - (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl) ctags: $(RM) $(top_srcdir)/tags diff --git a/Makefile.in b/Makefile.in index 732880fcc..c87fbb7cf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -661,11 +661,11 @@ distclean-local:: -type f -print | xargs $(RM) install-data-local: - instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ + destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ + instdest=$(DESTDIR)/${prefix}/src/$$destname; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done - (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl) ctags: $(RM) $(top_srcdir)/tags diff --git a/include/Makefile.am b/include/Makefile.am index d1990dcb0..3388ce8d9 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -16,7 +16,8 @@ noinst_HEADERS += util/*.h noinst_HEADERS += vm/*.h install-data-local: - instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ + destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ + instdest=$(DESTDIR)/${prefix}/src/$$destname; \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ diff --git a/include/Makefile.in b/include/Makefile.in index 53650a52e..db1587d47 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -388,7 +388,8 @@ uninstall-am: uninstall-info-am install-data-local: - instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ + destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ + instdest=$(DESTDIR)/${prefix}/src/$$destname; \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ From 5c3c70adece1ea8724cae0cf0c6cd164a4439f19 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Jun 2009 16:41:21 -0700 Subject: [PATCH 0288/1062] Add spl.release to spl-devel to simply dependent package version check. --- Makefile.am | 1 + Makefile.in | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index 022430361..e6dc5a181 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,7 @@ distclean-local:: install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ instdest=$(DESTDIR)/${prefix}/src/$$destname; \ + echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done diff --git a/Makefile.in b/Makefile.in index c87fbb7cf..91a89db7d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -663,6 +663,7 @@ distclean-local:: install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ instdest=$(DESTDIR)/${prefix}/src/$$destname; \ + echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done From 86933a6e510bb00edb097095ffe3deb7a4fbe533 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Jul 2009 14:37:44 -0700 Subject: [PATCH 0289/1062] Simplify rpm build rules, added config/rpm.am. Distro friendly changes such that the kernel modules are packaged seperately. --- Makefile.am | 51 +- Makefile.in | 119 +- cmd/Makefile.in | 7 +- config/rpm.am | 43 + config/spl-build.m4 | 146 ++- configure | 2583 ++++++++++++++++++++++++++++++++++++++++++- configure.ac | 47 +- include/Makefile.in | 7 +- lib/Makefile.in | 7 +- scripts/Makefile.in | 7 +- spl-modules.spec.in | 171 +++ spl.spec.in | 144 +-- 12 files changed, 2998 insertions(+), 334 deletions(-) create mode 100644 config/rpm.am create mode 100644 spl-modules.spec.in diff --git a/Makefile.am b/Makefile.am index e6dc5a181..53d4876fc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,12 @@ -SUBDIRS = lib cmd module include scripts +include $(top_srcdir)/config/rpm.am + +if CONFIG_USER +USER_DIR = lib cmd scripts +endif +if CONFIG_KERNEL +KERNEL_DIR = module include +endif +SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER @@ -15,6 +23,7 @@ distclean-local:: -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ -type f -print | xargs $(RM) +if CONFIG_KERNEL install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ instdest=$(DESTDIR)/${prefix}/src/$$destname; \ @@ -22,6 +31,7 @@ install-data-local: for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done +endif ctags: $(RM) $(top_srcdir)/tags @@ -33,27 +43,22 @@ etags: tags: ctags etags -rpm-local: - mkdir -p $(rpmbuild)/TMP && \ - mkdir -p $(rpmbuild)/BUILD && \ - mkdir -p $(rpmbuild)/RPMS && \ - mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES +srpm-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common -srpm: dist - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "build_src_rpm 1" --define "dist %{nil}" --nodeps -bs $$rpmbuild/SPECS/$(PACKAGE).spec || exit 1; \ - cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\ - $(RM) -R $$rpmbuild +srpm-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common -# Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM -# against any installed kernel-devel-2.x.y-z package. This will -# override the LINUX_VERSION detected at configure time. -rpm: srpm - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kdir $(LINUX)" --define "require_kobj $(LINUX_OBJ)" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ - cp $$rpmbuild/RPMS/*/* . || exit 1; \ - $(RM) -R $$rpmbuild +srpm: srpm-modules srpm-utils + +rpm-modules: srpm-modules + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common + +rpm-utils: srpm-utils + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common + +rpm-modules: srpm-modules + +rpm-utils: srpm-utils + +rpm: rpm-modules rpm-utils diff --git a/Makefile.in b/Makefile.in index 91a89db7d..ea8c98e37 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,7 +39,8 @@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/spl.spec.in $(srcdir)/spl_config.h.in \ + $(srcdir)/spl-modules.spec.in $(srcdir)/spl.spec.in \ + $(srcdir)/spl_config.h.in $(top_srcdir)/config/rpm.am \ $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ @@ -57,7 +58,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = spl_config.h CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ - module/splat/Makefile spl.spec + module/splat/Makefile spl.spec spl-modules.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -69,7 +70,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = lib cmd scripts module include DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -93,6 +94,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -114,13 +119,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -143,6 +148,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ @@ -201,7 +207,9 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -SUBDIRS = lib cmd module include scripts +@CONFIG_USER_TRUE@USER_DIR = lib cmd scripts +@CONFIG_KERNEL_TRUE@KERNEL_DIR = module include +SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER noinst_HEADERS = spl_config.h spl_unconfig.h @@ -211,7 +219,7 @@ all: spl_config.h .SUFFIXES: am--refresh: @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -267,6 +275,8 @@ module/splat/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/splat/ cd $(top_builddir) && $(SHELL) ./config.status $@ spl.spec: $(top_builddir)/config.status $(srcdir)/spl.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ +spl-modules.spec: $(top_builddir)/config.status $(srcdir)/spl-modules.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -580,6 +590,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@CONFIG_KERNEL_FALSE@install-data-local: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -648,6 +659,49 @@ uninstall-info: uninstall-info-recursive mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am +rpm-local: + mkdir -p $(rpmbuild)/TMP && \ + mkdir -p $(rpmbuild)/BUILD && \ + mkdir -p $(rpmbuild)/RPMS && \ + mkdir -p $(rpmbuild)/SRPMS && \ + mkdir -p $(rpmbuild)/SPECS && cp $(rpmspec) $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + +srpm-common: dist + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "build_src_rpm 1" \ + --define "dist %{nil}" \ + --nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ + cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ + $(RM) -R $$rpmbuild + +rpm-common: + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "dist %{nil}" \ + --define "require_kdir $(LINUX)" \ + --define "require_kobj $(LINUX_OBJ)" \ + --define "require_kver $(LINUX_VERSION)" \ + --nodeps --rebuild $$rpmpkg || exit 1; \ + cp $$rpmbuild/RPMS/*/* . || exit 1; \ + $(RM) -R $$rpmbuild distclean-local:: -$(RM) -R autom4te*.cache @@ -660,13 +714,13 @@ distclean-local:: -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ -type f -print | xargs $(RM) -install-data-local: - destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/${prefix}/src/$$destname; \ - echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ - for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ - done +@CONFIG_KERNEL_TRUE@install-data-local: +@CONFIG_KERNEL_TRUE@ destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ +@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/${prefix}/src/$$destname; \ +@CONFIG_KERNEL_TRUE@ echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ +@CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ +@CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ +@CONFIG_KERNEL_TRUE@ done ctags: $(RM) $(top_srcdir)/tags @@ -678,30 +732,25 @@ etags: tags: ctags etags -rpm-local: - mkdir -p $(rpmbuild)/TMP && \ - mkdir -p $(rpmbuild)/BUILD && \ - mkdir -p $(rpmbuild)/RPMS && \ - mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES +srpm-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common -srpm: dist - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "build_src_rpm 1" --define "dist %{nil}" --nodeps -bs $$rpmbuild/SPECS/$(PACKAGE).spec || exit 1; \ - cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\ - $(RM) -R $$rpmbuild +srpm-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common -# Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM -# against any installed kernel-devel-2.x.y-z package. This will -# override the LINUX_VERSION detected at configure time. -rpm: srpm - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kdir $(LINUX)" --define "require_kobj $(LINUX_OBJ)" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ - cp $$rpmbuild/RPMS/*/* . || exit 1; \ - $(RM) -R $$rpmbuild +srpm: srpm-modules srpm-utils + +rpm-modules: srpm-modules + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common + +rpm-utils: srpm-utils + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common + +rpm-modules: srpm-modules + +rpm-utils: srpm-utils + +rpm: rpm-modules rpm-utils # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 753c44fca..9ae0f0d51 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -85,6 +85,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -106,13 +110,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -135,6 +139,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/config/rpm.am b/config/rpm.am new file mode 100644 index 000000000..b1c832674 --- /dev/null +++ b/config/rpm.am @@ -0,0 +1,43 @@ +rpm-local: + mkdir -p $(rpmbuild)/TMP && \ + mkdir -p $(rpmbuild)/BUILD && \ + mkdir -p $(rpmbuild)/RPMS && \ + mkdir -p $(rpmbuild)/SRPMS && \ + mkdir -p $(rpmbuild)/SPECS && cp $(rpmspec) $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + +srpm-common: dist + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "build_src_rpm 1" \ + --define "dist %{nil}" \ + --nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ + cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ + $(RM) -R $$rpmbuild + +rpm-common: + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "dist %{nil}" \ + --define "require_kdir $(LINUX)" \ + --define "require_kobj $(LINUX_OBJ)" \ + --define "require_kver $(LINUX_VERSION)" \ + --nodeps --rebuild $$rpmpkg || exit 1; \ + cp $$rpmbuild/RPMS/*/* . || exit 1; \ + $(RM) -R $$rpmbuild diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2f277a3b3..134831978 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1,3 +1,82 @@ +dnl # +dnl # Default SPL kernel configuration +dnl # +AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ + SPL_AC_KERNEL + + dnl # Kernel build make options + dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build + KERNELMAKE_PARAMS="V=1" + + dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other + dnl # compiler options are added by the kernel build system. + abs_srcdir=`readlink -f ${srcdir}` + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + fi + + AC_SUBST(KERNELMAKE_PARAMS) + AC_SUBST(KERNELCPPFLAGS) + + SPL_AC_DEBUG + SPL_AC_DEBUG_KMEM + SPL_AC_DEBUG_MUTEX + SPL_AC_DEBUG_KSTAT + SPL_AC_DEBUG_CALLB + SPL_AC_TYPE_UINTPTR_T + SPL_AC_TYPE_ATOMIC64_T + SPL_AC_3ARGS_INIT_WORK + SPL_AC_2ARGS_REGISTER_SYSCTL + SPL_AC_SET_SHRINKER + SPL_AC_PATH_IN_NAMEIDATA + SPL_AC_TASK_CURR + SPL_AC_CTL_UNNUMBERED + SPL_AC_FLS64 + SPL_AC_DEVICE_CREATE + SPL_AC_5ARGS_DEVICE_CREATE + SPL_AC_CLASS_DEVICE_CREATE + SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT + SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE + SPL_AC_TIMESPEC_SUB + SPL_AC_INIT_UTSNAME + SPL_AC_FDTABLE_HEADER + SPL_AC_FILES_FDTABLE + SPL_AC_UACCESS_HEADER + SPL_AC_KMALLOC_NODE + SPL_AC_MONOTONIC_CLOCK + SPL_AC_INODE_I_MUTEX + SPL_AC_MUTEX_LOCK_NESTED + SPL_AC_DIV64_64 + SPL_AC_DIV64_U64 + SPL_AC_3ARGS_ON_EACH_CPU + SPL_AC_KALLSYMS_LOOKUP_NAME + SPL_AC_GET_VMALLOC_INFO + SPL_AC_PGDAT_HELPERS + SPL_AC_FIRST_ONLINE_PGDAT + SPL_AC_NEXT_ONLINE_PGDAT + SPL_AC_NEXT_ZONE + SPL_AC_PGDAT_LIST + SPL_AC_GET_ZONE_COUNTS + SPL_AC_GLOBAL_PAGE_STATE + SPL_AC_ZONE_STAT_ITEM_FIA + SPL_AC_2ARGS_VFS_UNLINK + SPL_AC_4ARGS_VFS_RENAME +]) + +AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ + AC_MSG_CHECKING([kernel file name for module symbols]) + if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi + AC_MSG_RESULT($LINUX_SYMBOLS) + AC_SUBST(LINUX_SYMBOLS) +]) + AC_DEFUN([SPL_AC_KERNEL], [ AC_ARG_WITH([linux], AS_HELP_STRING([--with-linux=PATH], @@ -72,41 +151,54 @@ AC_DEFUN([SPL_AC_KERNEL], [ LINUX_OBJ=${kernelbuild} LINUX_VERSION=${kernsrcver} - abs_srcdir=`readlink -f ${srcdir}` - kerninclude="-I${abs_srcdir} -I${abs_srcdir}/include" - kernwarn="-Wstrict-prototypes -Werror" - - if test "${LINUX_OBJ}" != "${LINUX}"; then - kernobjs="O=$kernelbuild" - fi - - KERNELCFLAGS= - KERNELCPPFLAGS="${kerninclude} ${kernwarn}" - KERNELMAKE_PARAMS="${kernobjs}" - AC_SUBST(LINUX) AC_SUBST(LINUX_OBJ) AC_SUBST(LINUX_VERSION) - AC_SUBST(KERNELMAKE_PARAMS) - AC_SUBST(KERNELCPPFLAGS) - AC_SUBST(KERNELCFLAGS) + + SPL_AC_MODULE_SYMVERS ]) -AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ - AC_MSG_CHECKING([kernel file name for module symbols]) - if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then - LINUX_SYMBOLS=Modules.symvers - else - LINUX_SYMBOLS=Module.symvers - fi - AC_MSG_RESULT($LINUX_SYMBOLS) - AC_SUBST(LINUX_SYMBOLS) -]) +dnl # +dnl # Default SPL user configuration +dnl # +AC_DEFUN([SPL_AC_CONFIG_USER], []) AC_DEFUN([SPL_AC_LICENSE], [ - AC_MSG_CHECKING([license]) - AC_MSG_RESULT([GPL]) + AC_MSG_CHECKING([spl license]) + LICENSE=GPL + AC_MSG_RESULT([$LICENSE]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + AC_SUBST(LICENSE) +]) + +AC_DEFUN([SPL_AC_CONFIG], [ + SPL_CONFIG=all + AC_ARG_WITH([config], + AS_HELP_STRING([--with-config=CONFIG], + [Config file 'kernel|user|all']), + [SPL_CONFIG="$withval"]) + + AC_MSG_CHECKING([spl config]) + AC_MSG_RESULT([$SPL_CONFIG]); + AC_SUBST(SPL_CONFIG) + + case "$SPL_CONFIG" in + kernel) SPL_AC_CONFIG_KERNEL ;; + user) SPL_AC_CONFIG_USER ;; + all) SPL_AC_CONFIG_KERNEL + SPL_AC_CONFIG_USER ;; + *) + AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$SPL_CONFIG" for --with-config, + user kernel|user|all]) ;; + esac + + AM_CONDITIONAL([CONFIG_USER], + [test "$SPL_CONFIG" = user] || + [test "$SPL_CONFIG" = all]) + AM_CONDITIONAL([CONFIG_KERNEL], + [test "$SPL_CONFIG" = kernel] || + [test "$SPL_CONFIG" = all]) ]) AC_DEFUN([SPL_AC_DEBUG], [ diff --git a/configure b/configure index f3f6b1303..3c75a96ad 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ LINUX_VERSION KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LINUX_SYMBOLS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LICENSE SPL_CONFIG LINUX LINUX_OBJ LINUX_VERSION LINUX_SYMBOLS KERNELMAKE_PARAMS KERNELCPPFLAGS CONFIG_USER_TRUE CONFIG_USER_FALSE CONFIG_KERNEL_TRUE CONFIG_KERNEL_FALSE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1048,6 +1048,7 @@ Optional Packages: both] --with-tags[=TAGS] include additional configurations [automatic] + --with-config=CONFIG Config file 'kernel|user|all' --with-linux=PATH Path to kernel source --with-linux-obj=PATH Path to kernel build objects @@ -3986,7 +3987,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3989 "configure"' > conftest.$ac_ext + echo '#line 3990 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5585,7 +5586,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5588:" \ +echo "$as_me:5589:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6648,11 +6649,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6652: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6655: \$? = $ac_status" >&5 + echo "$as_me:6656: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6916,11 +6917,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6919: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6920: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6923: \$? = $ac_status" >&5 + echo "$as_me:6924: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7020,11 +7021,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7023: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7024: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7027: \$? = $ac_status" >&5 + echo "$as_me:7028: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8489,7 +8490,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8492 "configure"' > conftest.$ac_ext + echo '#line 8493 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9386,7 +9387,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11833: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11836: \$? = $ac_status" >&5 + echo "$as_me:11837: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11933,11 +11934,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11936: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11937: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11940: \$? = $ac_status" >&5 + echo "$as_me:11941: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12469,7 +12470,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12472 "configure"' > conftest.$ac_ext + echo '#line 12473 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13527,11 +13528,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13530: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13531: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13534: \$? = $ac_status" >&5 + echo "$as_me:13535: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13631,11 +13632,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13634: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13635: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13638: \$? = $ac_status" >&5 + echo "$as_me:13639: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15080,7 +15081,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15083 "configure"' > conftest.$ac_ext + echo '#line 15084 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15858,11 +15859,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15862: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15865: \$? = $ac_status" >&5 + echo "$as_me:15866: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16126,11 +16127,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16129: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16130: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16133: \$? = $ac_status" >&5 + echo "$as_me:16134: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16230,11 +16231,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16234: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16237: \$? = $ac_status" >&5 + echo "$as_me:16238: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17699,7 +17700,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17702 "configure"' > conftest.$ac_ext + echo '#line 17703 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -18925,6 +18926,32 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + echo "$as_me:$LINENO: checking spl license" >&5 +echo $ECHO_N "checking spl license... $ECHO_C" >&6 + LICENSE=GPL + echo "$as_me:$LINENO: result: $LICENSE" >&5 +echo "${ECHO_T}$LICENSE" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + + + + SPL_CONFIG=all + +# Check whether --with-config or --without-config was given. +if test "${with_config+set}" = set; then + withval="$with_config" + SPL_CONFIG="$withval" +fi; + + echo "$as_me:$LINENO: checking spl config" >&5 +echo $ECHO_N "checking spl config... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 +echo "${ECHO_T}$SPL_CONFIG" >&6; + + + case "$SPL_CONFIG" in + kernel) # Check whether --with-linux or --without-linux was given. @@ -19019,21 +19046,6 @@ echo "${ECHO_T}$kernsrcver" >&6 LINUX_OBJ=${kernelbuild} LINUX_VERSION=${kernsrcver} - abs_srcdir=`readlink -f ${srcdir}` - kerninclude="-I${abs_srcdir} -I${abs_srcdir}/include" - kernwarn="-Wstrict-prototypes -Werror" - - if test "${LINUX_OBJ}" != "${LINUX}"; then - kernobjs="O=$kernelbuild" - fi - - KERNELCFLAGS= - KERNELCPPFLAGS="${kerninclude} ${kernwarn}" - KERNELMAKE_PARAMS="${kernobjs}" - - - - @@ -19051,11 +19063,19 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - echo "$as_me:$LINENO: checking license" >&5 -echo $ECHO_N "checking license... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: GPL" >&5 -echo "${ECHO_T}GPL" >&6 - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + + KERNELMAKE_PARAMS="V=1" + + abs_srcdir=`readlink -f ${srcdir}` + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + fi + + + echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 @@ -19208,7 +19228,7 @@ _ACEOF echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 @@ -19272,7 +19292,7 @@ fi -echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 + echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 @@ -19336,7 +19356,7 @@ fi -echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 + echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 echo $ECHO_N "checking whether INIT_WORK wants 3 args... $ECHO_C" >&6 @@ -19401,7 +19421,7 @@ fi -echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 + echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 echo $ECHO_N "checking whether register_sysctl_table() wants 2 args... $ECHO_C" >&6 @@ -19530,7 +19550,7 @@ fi -echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 + echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 echo $ECHO_N "checking whether struct path used in struct nameidata... $ECHO_C" >&6 @@ -19638,7 +19658,7 @@ _ACEOF fi -echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 + echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 echo $ECHO_N "checking whether unnumbered sysctl support exists... $ECHO_C" >&6 @@ -19704,7 +19724,7 @@ fi -echo "$as_me:$LINENO: checking whether fls64() is available" >&5 + echo "$as_me:$LINENO: checking whether fls64() is available" >&5 echo $ECHO_N "checking whether fls64() is available... $ECHO_C" >&6 @@ -21187,7 +21207,7 @@ fi -echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 + echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6 @@ -21251,7 +21271,2393 @@ fi -echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 + echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 +echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_rename(NULL, NULL, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_4ARGS_VFS_RENAME 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + ;; + user) ;; + all) + + +# Check whether --with-linux or --without-linux was given. +if test "${with_linux+set}" = set; then + withval="$with_linux" + kernelsrc="$withval" +fi; + + +# Check whether --with-linux-obj or --without-linux-obj was given. +if test "${with_linux_obj+set}" = set; then + withval="$with_linux_obj" + kernelbuild="$withval" +fi; + + echo "$as_me:$LINENO: checking kernel source directory" >&5 +echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 + if test -z "$kernelsrc"; then + sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1` + + if test -e ${sourcelink}; then + kernelsrc=`readlink -f ${sourcelink}` + else + echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6 + { { echo "$as_me:$LINENO: error: + *** Please specify the location of the kernel source + *** with the '--with-linux=PATH' option" >&5 +echo "$as_me: error: + *** Please specify the location of the kernel source + *** with the '--with-linux=PATH' option" >&2;} + { (exit 1); exit 1; }; } + fi + else + if test "$kernelsrc" = "NONE"; then + kernsrcver=NONE + fi + fi + + echo "$as_me:$LINENO: result: $kernelsrc" >&5 +echo "${ECHO_T}$kernelsrc" >&6 + echo "$as_me:$LINENO: checking kernel build directory" >&5 +echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 + if test -z "$kernelbuild"; then + if test -d ${kernelsrc}-obj; then + kernelbuild=${kernelsrc}-obj/`arch`/`arch` + elif test -d `dirname ${kernelsrc}`/build-`arch`; then + kernelbuild=`dirname ${kernelsrc}`/build-`arch` + else + kernelbuild=${kernelsrc} + fi + fi + echo "$as_me:$LINENO: result: $kernelbuild" >&5 +echo "${ECHO_T}$kernelbuild" >&6 + + echo "$as_me:$LINENO: checking kernel source version" >&5 +echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 + if test -r $kernelbuild/include/linux/version.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + elif test -r $kernelbuild/include/linux/utsrelease.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + fi + + if test -z "$kernsrcver"; then + echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6 + { { echo "$as_me:$LINENO: error: + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script" >&5 +echo "$as_me: error: + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script" >&2;} + { (exit 1); exit 1; }; } + fi + + echo "$as_me:$LINENO: result: $kernsrcver" >&5 +echo "${ECHO_T}$kernsrcver" >&6 + + LINUX=${kernelsrc} + LINUX_OBJ=${kernelbuild} + LINUX_VERSION=${kernsrcver} + + + + + + + echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 +echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 + if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi + echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 +echo "${ECHO_T}$LINUX_SYMBOLS" >&6 + + + + + KERNELMAKE_PARAMS="V=1" + + abs_srcdir=`readlink -f ${srcdir}` + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + fi + + + + + + echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + fi + + + echo "$as_me:$LINENO: checking whether kmem debugging is enabled" >&5 +echo $ECHO_N "checking whether kmem debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-kmem or --disable-debug-kmem was given. +if test "${enable_debug_kmem+set}" = set; then + enableval="$enable_debug_kmem" + case "$enableval" in + yes) spl_ac_debug_kmem=yes ;; + no) spl_ac_debug_kmem=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kmem" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kmem" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_kmem" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_KMEM 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether mutex debugging is enabled" >&5 +echo $ECHO_N "checking whether mutex debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-mutex or --disable-debug-mutex was given. +if test "${enable_debug_mutex+set}" = set; then + enableval="$enable_debug_mutex" + case "$enableval" in + yes) spl_ac_debug_mutex=yes ;; + no) spl_ac_debug_mutex=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-mutex" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-mutex" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_mutex" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_MUTEX 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether kstat debugging is enabled" >&5 +echo $ECHO_N "checking whether kstat debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-kstat or --disable-debug-kstat was given. +if test "${enable_debug_kstat+set}" = set; then + enableval="$enable_debug_kstat" + case "$enableval" in + yes) spl_ac_debug_kstat=yes ;; + no) spl_ac_debug_kstat=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kstat" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kstat" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_kstat" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_KSTAT 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether callb debugging is enabled" >&5 +echo $ECHO_N "checking whether callb debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-callb or --disable-debug-callb was given. +if test "${enable_debug_callb+set}" = set; then + enableval="$enable_debug_callb" + case "$enableval" in + yes) spl_ac_debug_callb=yes ;; + no) spl_ac_debug_callb=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-callb" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-callb" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_callb" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_CALLB 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 +echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + uintptr_t *ptr; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_t *ptr; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATOMIC64_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 +echo $ECHO_N "checking whether INIT_WORK wants 3 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct work_struct work; + INIT_WORK(&work, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_INIT_WORK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 +echo $ECHO_N "checking whether register_sysctl_table() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return register_sysctl_table(NULL,0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_REGISTER_SYSCTL 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 +echo $ECHO_N "checking whether set_shrinker() available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return set_shrinker(DEFAULT_SEEKS, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_SHRINKER 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 +echo $ECHO_N "checking whether struct path used in struct nameidata... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct nameidata nd; + + nd.path.mnt = NULL; + nd.path.dentry = NULL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PATH_IN_NAMEIDATA 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 +echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]task_curr[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in kernel/sched.c; do + grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TASK_CURR 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TASK_CURR 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 +echo $ECHO_N "checking whether unnumbered sysctl support exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + #ifndef CTL_UNNUMBERED + #error CTL_UNNUMBERED undefined + #endif + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CTL_UNNUMBERED 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether fls64() is available" >&5 +echo $ECHO_N "checking whether fls64() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return fls64(0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FLS64 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 +echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]device_create[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in drivers/base/core.c; do + grep -q -E "EXPORT_SYMBOL.*(device_create)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 +echo $ECHO_N "checking whether device_create() wants 5 args... $ECHO_C" >&6 + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + device_create(NULL, NULL, 0, NULL, "%d", 1); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_5ARGS_DEVICE_CREATE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 +echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]class_device_create[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in drivers/base/class.c; do + grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLASS_DEVICE_CREATE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLASS_DEVICE_CREATE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 +echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in kernel/time.c; do + grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 +echo $ECHO_N "checking whether set_normalized_timespec() is an inline... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + void set_normalized_timespec(struct timespec *ts, + time_t sec, long nsec) { } + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 +_ACEOF + + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 +echo $ECHO_N "checking whether timespec_sub() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct timespec a, b, c = { 0 }; + c = timespec_sub(a, b); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TIMESPEC_SUB 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 +echo $ECHO_N "checking whether init_utsname() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct new_utsname *a = init_utsname(); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INIT_UTSNAME 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 +echo $ECHO_N "checking whether header linux/fdtable.h exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return 0; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FDTABLE_HEADER 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + + +fi + + rm -Rf build + + + + + + echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 +echo $ECHO_N "checking whether files_fdtable() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + #ifdef HAVE_FDTABLE_HEADER + #include + #endif + +int +main (void) +{ + + struct files_struct *files = current->files; + struct fdtable *fdt = files_fdtable(files); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FILES_FDTABLE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 +echo $ECHO_N "checking whether header linux/uaccess.h exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return 0; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UACCESS_HEADER 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + + +fi + + rm -Rf build + + + + + + echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 +echo $ECHO_N "checking whether kmalloc_node() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + void *a = kmalloc_node(1, GFP_KERNEL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KMALLOC_NODE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 +echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MONOTONIC_CLOCK 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MONOTONIC_CLOCK 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 +echo $ECHO_N "checking whether struct inode has i_mutex... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + struct inode i; + mutex_init(&i.i_mutex); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INODE_I_MUTEX 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 +echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct mutex mutex; + mutex_init(&mutex); + mutex_lock_nested(&mutex, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MUTEX_LOCK_NESTED 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 +echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]div64_64[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(div64_64)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_64 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_64 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 +echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]div64_u64[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(div64_u64)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_U64 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_U64 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 +echo $ECHO_N "checking whether on_each_cpu() wants 3 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + on_each_cpu(NULL, NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_ON_EACH_CPU 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 +echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KALLSYMS_LOOKUP_NAME 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KALLSYMS_LOOKUP_NAME 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 +echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 +echo $ECHO_N "checking whether symbol *_pgdat exist... $ECHO_C" >&6 + grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null + rc=$? + if test $rc -eq 0; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_HELPERS 1 +_ACEOF + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 +echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIRST_ONLINE_PGDAT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIRST_ONLINE_PGDAT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 +echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ONLINE_PGDAT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ONLINE_PGDAT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 +echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]next_zone[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ZONE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ZONE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 +echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_LIST 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_LIST 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 +echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 +echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + unsigned long state; + state = global_page_state(NR_FREE_PAGES); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GLOBAL_PAGE_STATE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5 +echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item i1, i2, i3; + i1 = NR_FREE_PAGES; + i2 = NR_INACTIVE; + i3 = NR_ACTIVE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_FIA 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 +echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_unlink(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_VFS_UNLINK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6 @@ -21316,7 +23722,42 @@ fi - ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec" + ;; + *) + echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, + user kernel|user|all" >&5 +echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, + user kernel|user|all" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + + +if test "$SPL_CONFIG" = user || + test "$SPL_CONFIG" = all; then + CONFIG_USER_TRUE= + CONFIG_USER_FALSE='#' +else + CONFIG_USER_TRUE='#' + CONFIG_USER_FALSE= +fi + + + +if test "$SPL_CONFIG" = kernel || + test "$SPL_CONFIG" = all; then + CONFIG_KERNEL_TRUE= + CONFIG_KERNEL_FALSE='#' +else + CONFIG_KERNEL_TRUE='#' + CONFIG_KERNEL_FALSE= +fi + + + + ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec" cat >confcache <<\_ACEOF @@ -21438,6 +23879,20 @@ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${CONFIG_USER_TRUE}" && test -z "${CONFIG_USER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONFIG_USER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONFIG_USER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONFIG_KERNEL_TRUE}" && test -z "${CONFIG_KERNEL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONFIG_KERNEL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONFIG_KERNEL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -21891,6 +24346,7 @@ do "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "spl.spec" ) CONFIG_FILES="$CONFIG_FILES spl.spec" ;; + "spl-modules.spec" ) CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "spl_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS spl_config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 @@ -22060,13 +24516,18 @@ s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t +s,@LICENSE@,$LICENSE,;t t +s,@SPL_CONFIG@,$SPL_CONFIG,;t t s,@LINUX@,$LINUX,;t t s,@LINUX_OBJ@,$LINUX_OBJ,;t t s,@LINUX_VERSION@,$LINUX_VERSION,;t t +s,@LINUX_SYMBOLS@,$LINUX_SYMBOLS,;t t s,@KERNELMAKE_PARAMS@,$KERNELMAKE_PARAMS,;t t s,@KERNELCPPFLAGS@,$KERNELCPPFLAGS,;t t -s,@KERNELCFLAGS@,$KERNELCFLAGS,;t t -s,@LINUX_SYMBOLS@,$LINUX_SYMBOLS,;t t +s,@CONFIG_USER_TRUE@,$CONFIG_USER_TRUE,;t t +s,@CONFIG_USER_FALSE@,$CONFIG_USER_FALSE,;t t +s,@CONFIG_KERNEL_TRUE@,$CONFIG_KERNEL_TRUE,;t t +s,@CONFIG_KERNEL_FALSE@,$CONFIG_KERNEL_FALSE,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.ac b/configure.ac index 19109ae26..ee6866509 100644 --- a/configure.ac +++ b/configure.ac @@ -38,52 +38,8 @@ AC_PROG_INSTALL AC_PROG_CC AC_PROG_LIBTOOL -SPL_AC_KERNEL -SPL_AC_MODULE_SYMVERS SPL_AC_LICENSE -SPL_AC_DEBUG -SPL_AC_DEBUG_KMEM -SPL_AC_DEBUG_MUTEX -SPL_AC_DEBUG_KSTAT -SPL_AC_DEBUG_CALLB -SPL_AC_TYPE_UINTPTR_T -SPL_AC_TYPE_ATOMIC64_T -SPL_AC_3ARGS_INIT_WORK -SPL_AC_2ARGS_REGISTER_SYSCTL -SPL_AC_SET_SHRINKER -SPL_AC_PATH_IN_NAMEIDATA -SPL_AC_TASK_CURR -SPL_AC_CTL_UNNUMBERED -SPL_AC_FLS64 -SPL_AC_DEVICE_CREATE -SPL_AC_5ARGS_DEVICE_CREATE -SPL_AC_CLASS_DEVICE_CREATE -SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT -SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE -SPL_AC_TIMESPEC_SUB -SPL_AC_INIT_UTSNAME -SPL_AC_FDTABLE_HEADER -SPL_AC_FILES_FDTABLE -SPL_AC_UACCESS_HEADER -SPL_AC_KMALLOC_NODE -SPL_AC_MONOTONIC_CLOCK -SPL_AC_INODE_I_MUTEX -SPL_AC_MUTEX_LOCK_NESTED -SPL_AC_DIV64_64 -SPL_AC_DIV64_U64 -SPL_AC_3ARGS_ON_EACH_CPU -SPL_AC_KALLSYMS_LOOKUP_NAME -SPL_AC_GET_VMALLOC_INFO -SPL_AC_PGDAT_HELPERS -SPL_AC_FIRST_ONLINE_PGDAT -SPL_AC_NEXT_ONLINE_PGDAT -SPL_AC_NEXT_ZONE -SPL_AC_PGDAT_LIST -SPL_AC_GET_ZONE_COUNTS -SPL_AC_GLOBAL_PAGE_STATE -SPL_AC_ZONE_STAT_ITEM_FIA -SPL_AC_2ARGS_VFS_UNLINK -SPL_AC_4ARGS_VFS_RENAME +SPL_AC_CONFIG AC_CONFIG_FILES([ Makefile @@ -95,6 +51,7 @@ AC_CONFIG_FILES([ include/Makefile scripts/Makefile spl.spec + spl-modules.spec ]) AC_OUTPUT diff --git a/include/Makefile.in b/include/Makefile.in index db1587d47..50785f69f 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -66,6 +66,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -87,13 +91,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -116,6 +120,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/lib/Makefile.in b/lib/Makefile.in index b8b573ef7..992319d02 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -79,6 +79,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -100,13 +104,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -129,6 +133,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index bbf7ea47e..73f31008d 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -61,6 +61,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -82,13 +86,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -111,6 +115,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/spl-modules.spec.in b/spl-modules.spec.in new file mode 100644 index 000000000..61ad41ba3 --- /dev/null +++ b/spl-modules.spec.in @@ -0,0 +1,171 @@ +# The following block is used to allow the source RPM to be rebuilt +# against specific kernels. It is preferable that rpmbuild define the +# require_kver, require_kdir, require_obj constants for us, but if it does not +# not we attempt to determine the correct values based on your distro. + +%{?require_kver: %define kver %{require_kver}} +%{?require_kdir: %define kdir %{require_kdir}} +%{?require_kobj: %define kobj %{require_kobj}} + +# kdir: Full path to the kernel source headers +# kobj: Full path to the kernel build objects +# kver: Kernel version +# kpkg: Kernel package name +# kdevpkg: Kernel devel package name +# kverpkg: Kernel package version + +# SLES*: +%if %{defined sles_version} + %if %{undefined kver} + %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} + %define kver %((echo X; %{__cat} %{klnk}/.kernelrelease + 2>/dev/null) | tail -1) + %endif + %define kpkg kernel-%{_target_cpu} + %define kdevpkg kernel-source kernel-syms + %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) + %if %{undefined kdir} + %define kdir %{_usrsrc}/linux-%{kverpkg} + %endif + %if %{undefined kobj} + %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} + %endif + +# CHAOS4: +%else +%if %{defined ch4} + %if %{undefined kver} + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((echo X; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) + %endif + %define kpkg chaos-kernel + %define kdevpkg chaos-kernel-devel + %define kverpkg %{kver} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif + +# RHEL*/Fedora: +%else +%if %{defined fedora} || %{defined rhel} + %if %{undefined kver} + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((echo X; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif + +%else + +# Unsupported distro: + %if %{undefined kver} + %define kver X + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %{kver} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif + +%endif +%endif +%endif + +# Distro agnostic: +%define name @PACKAGE@-modules +%define version @VERSION@ +%define debug_package %{nil} + + +# The kernel version should only be appended to a binary RPM. When +# building a source RPM it must be kernel version agnostic. This means +# the source RPM must never specify a required kernel version, but the +# final RPM should be keyed to the kernel version it was built against. +%if %{defined build_src_rpm} +%define release @SPL_META_RELEASE@ +%define requires %{kpkg} +%else +%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') +%define release @SPL_META_RELEASE@_%{relext} +%define requires %{kpkg} = %{kverpkg} +%endif + +Summary: Solaris Porting Layer Modules +Group: Utilities/System +Name: %{name} +Version: %{version} +Release: %{release} +License: @LICENSE@ +URL: git://eris.llnl.gov/spl.git +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) +Source: @PACKAGE@-%{version}.tar.gz +Requires: %{requires} +BuildRequires: %{kdevpkg} + +%description +The %{name} package contains kernel modules for emulating Solaris style +primatives in the linux kernel. These include, but are not limited to: +atomic, condvar, debug, error, memory, kobject, kstat, mutex, rwlock, +taskq, thread, time, and vnode APIs. + +%package devel +Summary: Solaris Porting Layer Headers and Symbols +Group: Development/Libraries +Requires: %{requires} +BuildRequires: %{kdevpkg} + +%description devel +The %{name}-devel package contains the header files and Module{s}.symvers +symbols needed for building additional modules which use %{name}. + +%prep +%setup -n @PACKAGE@-%{version} +%build +%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \ + --with-config=kernel +make + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +/lib/modules/* + +%files devel +%defattr(-,root,root) +%{_prefix}/src/* + +%post +if [ -f /boot/System.map-%{kver} ]; then + depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +else + depmod -ae %{kver} || exit 0 +fi + +%postun +if [ -f /boot/System.map-%{kver} ]; then + depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +else + depmod -ae %{kver} || exit 0 +fi diff --git a/spl.spec.in b/spl.spec.in index caba00dfc..34207f626 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -1,143 +1,25 @@ -# The following block is used to allow the source RPM to be rebuilt -# against specific kernels. It is preferable that rpmbuild define the -# require_kver, require_kdir, require_obj constants for us, but if it does not -# not we attempt to determine the correct values based on your distro. - -%{?require_kver: %define kver %{require_kver}} -%{?require_kdir: %define kdir %{require_kdir}} -%{?require_kobj: %define kobj %{require_kobj}} - -# kdir: Full path to the kernel source headers -# kobj: Full path to the kernel build objects -# kver: Kernel version -# kpkg: Kernel package name -# kdevpkg: Kernel devel package name -# kverpkg: Kernel package version - -# SLES*: -%if %{defined sles_version} - %if %{undefined kver} - %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %((echo X; %{__cat} %{klnk}/.kernelrelease - 2>/dev/null) | tail -1) - %endif - %define kpkg kernel-%{_target_cpu} - %define kdevpkg kernel-source kernel-syms - %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) - %if %{undefined kdir} - %define kdir %{_usrsrc}/linux-%{kverpkg} - %endif - %if %{undefined kobj} - %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} - %endif - -# CHAOS4: -%else -%if %{defined ch4} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %endif - %define kpkg chaos-kernel - %define kdevpkg chaos-kernel-devel - %define kverpkg %{kver} - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -# RHEL*/Fedora: -%else -%if %{defined fedora} || %{defined rhel} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -%else - -# Unsupported distro: - %if %{undefined kver} - %define kver X - %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %{kver} - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -%endif -%endif -%endif - -# Distro agnostic: %define name @PACKAGE@ %define version @VERSION@ +%define release @SPL_META_RELEASE@ %define debug_package %{nil} - -# The kernel version should only be appended to a binary RPM. When -# building a source RPM it must be kernel version agnostic. This means -# the source RPM must never specify a required kernel version, but the -# final RPM should be keyed to the kernel version it was built against. -%if %{defined build_src_rpm} -%define release @SPL_META_RELEASE@ -%define requires %{kpkg} -%else -%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') -%define release @SPL_META_RELEASE@_%{relext} -%define requires %{kpkg} = %{kverpkg} -%endif - -Summary: Solaris Porting Layer +Summary: SPL Utils Group: Utilities/System Name: %{name} Version: %{version} Release: %{release} -License: GPL +License: @LICENSE@ URL: git://eris.llnl.gov/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Source: %{name}-%{version}.tar.gz -Requires: %{requires} -BuildRequires: %{kdevpkg} %description -The %{name} package contains kernel modules and support utilities for -emulating Solaris style primatives in the linux kernel. These include, -but are not limited too, atomic, condvar, debug, error, memory, kobject, -kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. - -%package devel -Summary: Solaris Porting Layer Headers and Symbols -Group: Development/Libraries -Requires: %{requires} -BuildRequires: %{kdevpkg} - -%description devel -The %{name}-devel package contains the header files and Module{s}.symvers -symbols needed for building additional modules which use %{name}. +The %{name} package contains the support utilities for the spl. %prep %setup %build -%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} +%configure --with-config=user make %install @@ -151,22 +33,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %doc AUTHORS ChangeLog COPYING DISCLAIMER INSTALL %{_sbindir}/* -/lib/modules/* - -%files devel -%defattr(-,root,root) -%{_prefix}/src/* %post -if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 -else - depmod -ae %{kver} || exit 0 -fi - %postun -if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 -else - depmod -ae %{kver} || exit 0 -fi From bb339d067054174f218ead91105472558f278fc2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Jul 2009 10:47:28 -0700 Subject: [PATCH 0290/1062] Cleanly handle --with-linux=NONE option when used to generate source rpms. These should not be fatal because we actually don't need them until we build the source rpm. When doing mock builds this is important because these dependent rpms will only be installed if they are specificed in the source rpms spec file. --- config/spl-build.m4 | 11 ++++++++--- configure | 22 ++++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 134831978..eee9a783f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -67,11 +67,16 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ + modpost=$LINUX/scripts/Makefile.modpost AC_MSG_CHECKING([kernel file name for module symbols]) - if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then - LINUX_SYMBOLS=Modules.symvers + if test -f "$modpost"; then + if grep -q Modules.symvers $modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi else - LINUX_SYMBOLS=Module.symvers + LINUX_SYMBOLS=NONE fi AC_MSG_RESULT($LINUX_SYMBOLS) AC_SUBST(LINUX_SYMBOLS) diff --git a/configure b/configure index 3c75a96ad..93713e5a4 100755 --- a/configure +++ b/configure @@ -19051,12 +19051,17 @@ echo "${ECHO_T}$kernsrcver" >&6 + modpost=$LINUX/scripts/Makefile.modpost echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 - if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then - LINUX_SYMBOLS=Modules.symvers + if test -f "$modpost"; then + if grep -q Modules.symvers $modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi else - LINUX_SYMBOLS=Module.symvers + LINUX_SYMBOLS=NONE fi echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 echo "${ECHO_T}$LINUX_SYMBOLS" >&6 @@ -21437,12 +21442,17 @@ echo "${ECHO_T}$kernsrcver" >&6 + modpost=$LINUX/scripts/Makefile.modpost echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 - if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then - LINUX_SYMBOLS=Modules.symvers + if test -f "$modpost"; then + if grep -q Modules.symvers $modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi else - LINUX_SYMBOLS=Module.symvers + LINUX_SYMBOLS=NONE fi echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 echo "${ECHO_T}$LINUX_SYMBOLS" >&6 From aaad2f7226d26c8ca3575830d07aa08363f346b3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Jul 2009 14:19:11 -0700 Subject: [PATCH 0291/1062] Update ChangeLog --- ChangeLog | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 908d3c183..e68b7f239 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,28 @@ -2009-06-22 Brian Behlendorf +2009-07-02 Brian Behlendorf * : Tag spl-0.4.4 + * : Generic distro friendly build system / packaging improvements + for RPM based distros including CHAOS, RHEL, Fedora, and SLES. + + spl-.src.rpm + - Fully rebuildable source rpm for utils. + spl-modules-.src.rpm + - Fully rebuildable source rpm for kernel modules. + + spl-..rpm + - Binary rpm for utils. The utils in this package are compatible + with all spl-module rpms of the same version. + + spl-modules--.arch.rpm + - Binary rpm containing the kernel modules for a specific kernel build. + The package name contains the kernel version and you should have one + of these packages installed to match every kernel on your system. + spl-modules-devel--.arch.rpm + - Binary rpm containing development header and module symbols needed + for building additional kernel modules which are dependent on the + spl module. + * : Added SLES10 support. This includes all compatibility changes to support 2.6.16 based kernels and the required build system improvements. From 915404bd509e5231c134042560d86e3ac86c1ab4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 9 Jul 2009 10:07:52 -0700 Subject: [PATCH 0292/1062] Add basic support for TASKQ_THREADS_CPU_PCT taskq flag which is used to scale the number of threads based on the number of online CPUs. As CPUs are added/removed we should rescale the thread count appropriately, but currently this is only done at create. --- include/sys/taskq.h | 1 + module/spl/spl-taskq.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 0b8623103..603fde680 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -44,6 +44,7 @@ extern "C" { #define TASKQ_PREPOPULATE 0x00000001 #define TASKQ_CPR_SAFE 0x00000002 #define TASKQ_DYNAMIC 0x00000004 +#define TASKQ_THREADS_CPU_PCT 0x00000008 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 5960761f4..7575aa3b0 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -375,6 +375,15 @@ __taskq_create(const char *name, int nthreads, pri_t pri, ASSERT(maxalloc <= INT_MAX); ASSERT(!(flags & (TASKQ_CPR_SAFE | TASKQ_DYNAMIC))); /* Unsupported */ + /* Scale the number of threads using nthreads as a percentage */ + if (flags & TASKQ_THREADS_CPU_PCT) { + ASSERT(nthreads <= 100); + ASSERT(nthreads >= 0); + nthreads = MIN(nthreads, 100); + nthreads = MAX(nthreads, 0); + nthreads = MAX((num_online_cpus() * nthreads) / 100, 1); + } + tq = kmem_alloc(sizeof(*tq), KM_SLEEP); if (tq == NULL) RETURN(NULL); From 3a68dc5374dd864726ae23389f03c5ca69af7c95 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 9 Jul 2009 12:15:23 -0700 Subject: [PATCH 0293/1062] Add ASSERTV macro to simplify removing variables (the V in ASSERTV) which are only used in ASSERT(). --- include/sys/debug.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/debug.h b/include/sys/debug.h index 12226a033..1ea1520de 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -218,6 +218,7 @@ struct page_collection { #define __ASSERT_TAGE_INVARIANT(x) ((void)0) #define ASSERT(x) ((void)0) #define ASSERTF(x, y, z...) ((void)0) +#define ASSERTV(x) #define VERIFY(cond) \ do { \ if (unlikely(!(cond))) { \ @@ -348,6 +349,7 @@ do { \ #define ASSERT3U(x,y,z) VERIFY3U(x, y, z) #define ASSERT3P(x,y,z) VERIFY3P(x, y, z) +#define ASSERTV(x) x #define VERIFY(x) ASSERT(x) #define __CDEBUG(cdls, subsys, mask, format, a...) \ From c18cbcfe66880f17408ad252e77947669e12975a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 9 Jul 2009 14:59:41 -0700 Subject: [PATCH 0294/1062] Define FKIOCTL which is used on Solaris to mark an in-kernel ioctl. --- include/sys/file.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/file.h b/include/sys/file.h index 63d662237..f5ee2f0df 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -1,4 +1,6 @@ #ifndef _SPL_FILE_H #define _SPL_FILE_H +#define FKIOCTL 0x80000000 + #endif /* SPL_FILE_H */ From 2a734e9c266f5fd31db84153a61263b529167732 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 9 Jul 2009 15:00:25 -0700 Subject: [PATCH 0295/1062] Define ACE_ALL_PERMS for use by ACLs --- include/sys/acl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sys/acl.h b/include/sys/acl.h index 042d9ca75..61b5bdf07 100644 --- a/include/sys/acl.h +++ b/include/sys/acl.h @@ -77,4 +77,10 @@ typedef struct ace_object { #define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE|ACE_IDENTIFIER_GROUP) +#define ACE_ALL_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \ + ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS| \ + ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES| \ + ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \ + ACE_WRITE_OWNER|ACE_SYNCHRONIZE) + #endif /* _SPL_ACL_H */ From d3126abe75a6502d55bfa2339b48d4fa263e1b02 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 10 Jul 2009 10:56:32 -0700 Subject: [PATCH 0296/1062] Add ddi_copyin/ddi_copyout support for fake kernel originated ioctls. --- include/sys/sunddi.h | 3 +++ module/spl/spl-generic.c | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 404b14b38..c1773f504 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -213,6 +213,9 @@ extern int ddi_strtol(const char *, char **, int, long *); extern int ddi_strtoull(const char *, char **, int, unsigned long long *); extern int ddi_strtoll(const char *, char **, int, long long *); +extern int ddi_copyin(const void *from, void *to, size_t len, int flags); +extern int ddi_copyout(const void *from, void *to, size_t len, int flags); + static __inline__ void ddi_report_dev(dev_info_t *d) { } static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { } diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 568d40635..b81dabc56 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #ifdef DEBUG_SUBSYSTEM @@ -226,6 +227,32 @@ EXPORT_SYMBOL(ddi_strtol); EXPORT_SYMBOL(ddi_strtoll); EXPORT_SYMBOL(ddi_strtoull); +int +ddi_copyin(const void *from, void *to, size_t len, int flags) +{ + /* Fake ioctl() issued by kernel, 'from' is a kernel address */ + if (flags & FKIOCTL) { + memcpy(to, from, len); + return 0; + } + + return copyin(from, to, len); +} +EXPORT_SYMBOL(ddi_copyin); + +int +ddi_copyout(const void *from, void *to, size_t len, int flags) +{ + /* Fake ioctl() issued by kernel, 'from' is a kernel address */ + if (flags & FKIOCTL) { + memcpy(to, from, len); + return 0; + } + + return copyout(from, to, len); +} +EXPORT_SYMBOL(ddi_copyout); + struct new_utsname *__utsname(void) { #ifdef HAVE_INIT_UTSNAME From 06dea103807ed57621d5711edafc4da2f2d9bbc6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 10 Jul 2009 10:58:06 -0700 Subject: [PATCH 0297/1062] Add basic groupmember() function, not sup groups. --- include/sys/cred.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/sys/cred.h b/include/sys/cred.h index 1e7d3b7c9..47eeda2cb 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -61,6 +61,18 @@ crgetgroups(cred_t *cr) return NULL; } +static __inline__ int +groupmember(gid_t gid, const cred_t *cr) +{ + /* Primary group check */ + if ((cr) && (gid == cr->cr_gid)) + return 1; + + /* Supplemental group check (unsupported) */ + return 0; +} + + #ifdef __cplusplus } #endif From b11b08ed641b8c677b529e108c2b28dc0183d34c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 14 Jul 2009 14:28:04 -0700 Subject: [PATCH 0298/1062] Add a little paranoia here to ensure endianess is set correctly. --- include/sys/isa_defs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 3b8fffe1e..081133e5a 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -73,7 +73,11 @@ extern "C" { #endif #if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) -#error "Both _LITTLE_ENDIAN and __BIG_ENDIAN are defined" +#error "Both _LITTLE_ENDIAN and _BIG_ENDIAN are defined" +#endif + +#if !defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) +#error "Neither _LITTLE_ENDIAN or _BIG_ENDIAN are defined" #endif #ifdef __cplusplus From e004f04c8b110ee598baa6b86148c8148d737a44 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 14 Jul 2009 15:23:25 -0700 Subject: [PATCH 0299/1062] Prevent integer overflow after ~164 days of uptime. Signed-off-by: Brian Behlendorf --- module/spl/spl-time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 1e9671e83..2973ae82d 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -62,7 +62,7 @@ __gethrtime(void) { #else uint64_t j = get_jiffies_64(); - return (hrtime_t)(j * NSEC_PER_SEC / HZ); + return (hrtime_t)(j * (NSEC_PER_SEC / HZ)); #endif } EXPORT_SYMBOL(__gethrtime); From ac95d0974bb36000b979f5b2dd404638ea87baf7 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 14 Jul 2009 15:24:59 -0700 Subject: [PATCH 0300/1062] Fixed NULL dereference by tcd_for_each() when the kmalloc() call in module/spl/spl-debug.c:1163 returns NULL. Signed-off-by: Brian Behlendorf --- include/sys/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 1ea1520de..f19231b90 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -173,7 +173,7 @@ union trace_data_union { extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; #define tcd_for_each(tcd, i, j) \ - for (i = 0; i < TCD_TYPE_MAX; i++) \ + for (i = 0; i < TCD_TYPE_MAX && trace_data[i]; i++) \ for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) From 78d6de97bd0749b03af86ff5f76edae4bfb18b42 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 21 Jul 2009 10:13:58 -0700 Subject: [PATCH 0301/1062] Register a basic compat ioctl handler (32 vs 64 bit compat) Simply pass the ioctl on to the normal handler. If the ioctl helper macros are used correctly this should be safe as they will handle the packing/unpacking of the data encoded in the ioctl command. And actually, if the caller does not use the IO* macros at all, and just passes small values, it will probably be OK as well. We only get in to trouble if they try and use the upper 32-bits. Endianness is not really a concern here, we we are pretty much assumed they user and kernel will match. --- module/spl/spl-module.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index 4a2be89da..aa3d56195 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -54,7 +54,7 @@ out: } static int -mod_generic_ioctl(struct inode *ino, struct file *filp, +mod_generic_ioctl(struct inode *ino, struct file *file, unsigned int cmd, unsigned long arg) { struct dev_info *di; @@ -66,11 +66,21 @@ mod_generic_ioctl(struct inode *ino, struct file *filp, return EINVAL; rc = di->di_ops->devo_cb_ops->cb_ioctl(di->di_dev, - (int)cmd,(intptr_t)arg, + (int)cmd, (intptr_t)arg, flags, cr, &rvalp); return rc; } +#ifdef CONFIG_COMPAT +/* Compatibility handler for ioctls from 32-bit ELF binaries */ +static long +mod_generic_compat_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) +{ + return mod_generic_ioctl(file->f_dentry->d_inode, file, cmd, arg); +} +#endif /* CONFIG_COMPAT */ + int __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, minor_t minor_num, char *node_type, @@ -107,8 +117,12 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, /* Setup the fops to cb_ops mapping */ fops->owner = mod; - if (cb_ops->cb_ioctl) + if (cb_ops->cb_ioctl) { fops->ioctl = mod_generic_ioctl; +#ifdef CONFIG_COMPAT + fops->compat_ioctl = mod_generic_compat_ioctl; +#endif + } #if 0 if (cb_ops->cb_open) From 749e5eb1edaa86b60e3b0c925a587925873ec560 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 22 Jul 2009 06:59:28 -0700 Subject: [PATCH 0302/1062] Check arch/default/ path when detecting kernel objects on SLES We still preferentially use arch/arch looking for a native version but if that fails it is acceptable to use default. --- config/spl-build.m4 | 4 +++- configure | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index eee9a783f..a528e0f63 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -115,8 +115,10 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([$kernelsrc]) AC_MSG_CHECKING([kernel build directory]) if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj; then + if test -d ${kernelsrc}-obj/`arch`/`arch`; then kernelbuild=${kernelsrc}-obj/`arch`/`arch` + elif test -d ${kernelsrc}-obj/`arch`/default; then + kernelbuild=${kernelsrc}-obj/`arch`/default elif test -d `dirname ${kernelsrc}`/build-`arch`; then kernelbuild=`dirname ${kernelsrc}`/build-`arch` else diff --git a/configure b/configure index 93713e5a4..0297a07af 100755 --- a/configure +++ b/configure @@ -18997,8 +18997,10 @@ echo "${ECHO_T}$kernelsrc" >&6 echo "$as_me:$LINENO: checking kernel build directory" >&5 echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj; then + if test -d ${kernelsrc}-obj/`arch`/`arch`; then kernelbuild=${kernelsrc}-obj/`arch`/`arch` + elif test -d ${kernelsrc}-obj/`arch`/default; then + kernelbuild=${kernelsrc}-obj/`arch`/default elif test -d `dirname ${kernelsrc}`/build-`arch`; then kernelbuild=`dirname ${kernelsrc}`/build-`arch` else @@ -21388,8 +21390,10 @@ echo "${ECHO_T}$kernelsrc" >&6 echo "$as_me:$LINENO: checking kernel build directory" >&5 echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj; then + if test -d ${kernelsrc}-obj/`arch`/`arch`; then kernelbuild=${kernelsrc}-obj/`arch`/`arch` + elif test -d ${kernelsrc}-obj/`arch`/default; then + kernelbuild=${kernelsrc}-obj/`arch`/default elif test -d `dirname ${kernelsrc}`/build-`arch`; then kernelbuild=`dirname ${kernelsrc}`/build-`arch` else From 2141116167c36051f757f426f1fb2242ab85d2a4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 22 Jul 2009 14:28:19 -0700 Subject: [PATCH 0303/1062] The HAVE_PATH_IN_NAMEIDATA compat macros should have been used here. --- module/spl/spl-vnode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index c5595dee0..08c339a5a 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -304,7 +304,7 @@ vn_remove(const char *path, uio_seg_t seg, int flags) #ifdef HAVE_2ARGS_VFS_UNLINK rc = vfs_unlink(nd.nd_dentry->d_inode, dentry); #else - rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, nd.mnt); + rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, nd.nd_mnt); #endif /* HAVE_2ARGS_VFS_UNLINK */ exit2: dput(dentry); @@ -401,8 +401,8 @@ vn_rename(const char *oldname, const char *newname, int x1) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); #else - rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.mnt, - new_dir->d_inode, new_dentry, newnd.mnt); + rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt, + new_dir->d_inode, new_dentry, newnd.nd_mnt); #endif /* HAVE_4ARGS_VFS_RENAME */ exit5: dput(new_dentry); From 3c9ce2bf695a70887b4391a268e6f6c6f7868b91 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 23 Jul 2009 13:50:53 -0700 Subject: [PATCH 0304/1062] Allow kmem or vmem based slab for slab_lock and slab_overcommit tests. The slab_overcommit test case could hang on a system with fragmented memory because it was creating a kmem based slab with 256K objects. To avoid this I've removed the KMC_KMEM flag which allows the slab to decide if it should be kmem or vmem backed based on the object side. The slab_lock test shares this code and will also be effected. But the point of these two tests is to stress cache locking and memory overcommit, the type of slab is not critical. In fact, allowing the slab to do the default smart thing is preferable. --- module/splat/splat-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index fdf02a917..b021750ad 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -656,7 +656,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, splat_kmem_cache_test_constructor, splat_kmem_cache_test_destructor, splat_kmem_cache_test_reclaim, - kcp, NULL, KMC_KMEM); + kcp, NULL, 0); if (!kcp->kcp_cache) { splat_vprint(file, name, "Unable to create '%s'\n", cache_name); rc = -ENOMEM; From 7064b767c22eba639ef20180f03b6a25b40ff2e1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 23 Jul 2009 16:14:52 -0700 Subject: [PATCH 0305/1062] Positive Solaris ioctl return codes need to be negated for use by libc --- module/spl/spl-module.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index aa3d56195..f17974873 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -63,12 +63,19 @@ mod_generic_ioctl(struct inode *ino, struct file *file, di = get_dev_info(MKDEV(imajor(ino), iminor(ino))); if (di == NULL) - return EINVAL; + return -EINVAL; rc = di->di_ops->devo_cb_ops->cb_ioctl(di->di_dev, (int)cmd, (intptr_t)arg, flags, cr, &rvalp); - return rc; + /* + * The Solaris the kernel returns positive error codes to indicate + * a failure. Under linux the kernel is expected to return a + * small negative value which is trapped by libc and used to + * set errno correctly. For this reason we negate the Solaris + * return code to ensure errno gets set correctly. + */ + return -rc; } #ifdef CONFIG_COMPAT From 3d0cb2d31dbeef37382249ceb9f16a46c2ccd819 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 27 Jul 2009 09:52:01 -0700 Subject: [PATCH 0306/1062] Remove LINUXINCLUDE from autoconf wrapper, breaks 2.6.28+ kernels. Modern kernel build systems at least post 2.6.16 will set this properly so we should not. In fact post 2.6.28 the include headers have moved under arch so the guess we make here is completely wrong. Letting the kernel build system set this ensure it will be correct. --- config/spl-build.m4 | 2 +- configure | 92 ++++++++++++++++++++++----------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index a528e0f63..35cc8e401 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -350,7 +350,7 @@ AC_DEFUN([SPL_LINUX_COMPILE_IFELSE], [ rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile AS_IF( - [AC_TRY_COMMAND(cp conftest.c build && make [$2] LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], + [AC_TRY_COMMAND(cp conftest.c build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], [$4], [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])] ) diff --git a/configure b/configure index 0297a07af..5e3358490 100755 --- a/configure +++ b/configure @@ -19264,7 +19264,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19328,7 +19328,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19393,7 +19393,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19457,7 +19457,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19522,7 +19522,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19589,7 +19589,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19696,7 +19696,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19760,7 +19760,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19868,7 +19868,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20016,7 +20016,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20082,7 +20082,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20147,7 +20147,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20212,7 +20212,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20285,7 +20285,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20350,7 +20350,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20418,7 +20418,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20526,7 +20526,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20593,7 +20593,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20740,7 +20740,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21111,7 +21111,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21179,7 +21179,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21243,7 +21243,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21307,7 +21307,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21657,7 +21657,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21721,7 +21721,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21786,7 +21786,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21850,7 +21850,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21915,7 +21915,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21982,7 +21982,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22089,7 +22089,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22153,7 +22153,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22261,7 +22261,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22409,7 +22409,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22475,7 +22475,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22540,7 +22540,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22605,7 +22605,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22678,7 +22678,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22743,7 +22743,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22811,7 +22811,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22919,7 +22919,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22986,7 +22986,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23133,7 +23133,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23504,7 +23504,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23572,7 +23572,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23636,7 +23636,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23700,7 +23700,7 @@ _ACEOF rm -Rf build && mkdir -p build echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? From ec7d53e99aee17ae1500701520649d3b54b31676 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 27 Jul 2009 17:18:59 -0700 Subject: [PATCH 0307/1062] Add basic credential support and splat tests. The previous credential implementation simply provided the needed types and a couple of dummy functions needed. This update correctly ties the basic Solaris credential API in to one of two Linux kernel APIs. Prior to 2.6.29 the linux kernel embeded all credentials in the task structure. For these kernels, we pass around the entire task struct as if it were the credential, then we use the helper functions to extract the credential related bits. As of 2.6.29 a new credential type was added which we can and do fairly cleanly layer on top of. Once again the helper functions nicely hide the implementation details from all callers. Three tests were added to the splat test framework to verify basic correctness. They should be extended as needed when need credential functions are added. --- config/spl-build.m4 | 33 ++++ configure | 214 +++++++++++++++++++++++ include/splat-ctl.h | 1 + include/sys/cred.h | 76 +++------ include/sys/debug.h | 1 + module/spl/Makefile.in | 1 + module/spl/spl-cred.c | 308 ++++++++++++++++++++++++++++++++++ module/spl/spl-debug.c | 2 + module/splat/Makefile.in | 1 + module/splat/splat-cred.c | 247 +++++++++++++++++++++++++++ module/splat/splat-ctl.c | 2 + module/splat/splat-internal.h | 3 + spl_config.h.in | 6 + 13 files changed, 839 insertions(+), 56 deletions(-) create mode 100644 module/spl/spl-cred.c create mode 100644 module/splat/splat-cred.c diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 35cc8e401..79fcd2548 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -64,6 +64,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_ZONE_STAT_ITEM_FIA SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME + SPL_AC_CRED_STRUCT + SPL_AC_GROUPS_SEARCH ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1099,3 +1101,34 @@ AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME], AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.29 API change, +dnl # check whether 'struct cred' exists +dnl # +AC_DEFUN([SPL_AC_CRED_STRUCT], [ + AC_MSG_CHECKING([whether struct cred exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct cred *cr; + cr = NULL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CRED_STRUCT, 1, [struct cred exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # Custom SPL patch may export this symbol +dnl # +AC_DEFUN([SPL_AC_GROUPS_SEARCH], [ + SPL_CHECK_SYMBOL_EXPORT( + [groups_search], + [], + [AC_DEFINE(HAVE_GROUPS_SEARCH, 1, + [groups_search() is available])], + []) +]) diff --git a/configure b/configure index 5e3358490..a342d73a2 100755 --- a/configure +++ b/configure @@ -21342,6 +21342,113 @@ fi + + echo "$as_me:$LINENO: checking whether struct cred exists" >&5 +echo $ECHO_N "checking whether struct cred exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct cred *cr; + cr = NULL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CRED_STRUCT 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 +echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]groups_search[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GROUPS_SEARCH 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GROUPS_SEARCH 1 +_ACEOF + + fi + + ;; user) ;; all) @@ -23736,6 +23843,113 @@ fi + echo "$as_me:$LINENO: checking whether struct cred exists" >&5 +echo $ECHO_N "checking whether struct cred exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct cred *cr; + cr = NULL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CRED_STRUCT 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 +echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]groups_search[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GROUPS_SEARCH 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GROUPS_SEARCH 1 +_ACEOF + + fi + + + ;; *) echo "$as_me:$LINENO: result: Error!" >&5 diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 7f49b9fff..fc68395e8 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -105,6 +105,7 @@ typedef struct splat_cmd { #define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 #define SPLAT_SUBSYSTEM_LIST 0x0c00 #define SPLAT_SUBSYSTEM_GENERIC 0x0d00 +#define SPLAT_SUBSYSTEM_CRED 0x0e00 #define SPLAT_SUBSYSTEM_UNKNOWN 0xff00 #endif /* _SPLAT_CTL_H */ diff --git a/include/sys/cred.h b/include/sys/cred.h index 47eeda2cb..9717b66bc 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -9,69 +9,33 @@ extern "C" { #include #include -/* XXX - Portions commented out because we really just want to have the type - * defined and the contents aren't nearly so important at the moment. */ -typedef struct cred { - uint_t cr_ref; /* reference count */ - uid_t cr_uid; /* effective user id */ - gid_t cr_gid; /* effective group id */ - uid_t cr_ruid; /* real user id */ - gid_t cr_rgid; /* real group id */ - uid_t cr_suid; /* "saved" user id (from exec) */ - gid_t cr_sgid; /* "saved" group id (from exec) */ - uint_t cr_ngroups; /* number of groups returned by */ - /* crgroups() */ -#if 0 - cred_priv_t cr_priv; /* privileges */ - projid_t cr_projid; /* project */ - struct zone *cr_zone; /* pointer to per-zone structure */ - struct ts_label_s *cr_label; /* pointer to the effective label */ - credsid_t *cr_ksid; /* pointer to SIDs */ -#endif - gid_t cr_groups[1]; /* cr_groups size not fixed */ - /* audit info is defined dynamically */ - /* and valid only when audit enabled */ - /* auditinfo_addr_t cr_auinfo; audit info */ -} cred_t; +#ifdef HAVE_CRED_STRUCT -#define kcred NULL -#define CRED() NULL +typedef struct cred cred_t; -static __inline__ uid_t -crgetuid(cred_t *cr) -{ - return 0; -} +#define kcred ((cred_t *)(init_task.cred)) +#define CRED() ((cred_t *)current_cred()) -static __inline__ gid_t -crgetgid(cred_t *cr) -{ - return 0; -} +#else -static __inline__ int -crgetngroups(cred_t *cr) -{ - return 0; -} +typedef struct task_struct cred_t; -static __inline__ gid_t * -crgetgroups(cred_t *cr) -{ - return NULL; -} +#define kcred ((cred_t *)&init_task) +#define CRED() ((cred_t *)current) -static __inline__ int -groupmember(gid_t gid, const cred_t *cr) -{ - /* Primary group check */ - if ((cr) && (gid == cr->cr_gid)) - return 1; - - /* Supplemental group check (unsupported) */ - return 0; -} +#endif /* HAVE_CRED_STRUCT */ +extern void crhold(cred_t *cr); +extern void crfree(cred_t *cr); +extern uid_t crgetuid(const cred_t *cr); +extern uid_t crgetruid(const cred_t *cr); +extern uid_t crgetsuid(const cred_t *cr); +extern gid_t crgetgid(const cred_t *cr); +extern gid_t crgetrgid(const cred_t *cr); +extern gid_t crgetsgid(const cred_t *cr); +extern int crgetngroups(const cred_t *cr); +extern gid_t * crgetgroups(const cred_t *cr); +extern int groupmember(gid_t gid, const cred_t *cr); #ifdef __cplusplus } diff --git a/include/sys/debug.h b/include/sys/debug.h index f19231b90..8da76863c 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -53,6 +53,7 @@ extern unsigned long spl_debug_subsys; #define S_GENERIC 0x00002000 #define S_PROC 0x00004000 #define S_MODULE 0x00008000 +#define S_CRED 0x00010000 #define D_TRACE 0x00000001 #define D_INFO 0x00000002 diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index e9c8d3470..ad29af406 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -23,3 +23,4 @@ spl-objs += spl-mutex.o spl-objs += spl-kstat.o spl-objs += spl-condvar.o spl-objs += spl-xdr.o +spl-objs += spl-cred.o diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c new file mode 100644 index 000000000..c5994aa20 --- /dev/null +++ b/module/spl/spl-cred.c @@ -0,0 +1,308 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2009 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM S_CRED + +#ifdef HAVE_GROUPS_SEARCH +/* Symbol may be exported by custom kernel patch */ +#define cr_groups_search(gi, grp) groups_search(gi, grp) +#else +/* Implementation from 2.6.30 kernel */ +static int +cr_groups_search(const struct group_info *group_info, gid_t grp) +{ + unsigned int left, right; + + if (!group_info) + return 0; + + left = 0; + right = group_info->ngroups; + while (left < right) { + unsigned int mid = (left+right)/2; + int cmp = grp - GROUP_AT(group_info, mid); + if (cmp > 0) + left = mid + 1; + else if (cmp < 0) + right = mid; + else + return 1; + } + return 0; +} +#endif + +#ifdef HAVE_CRED_STRUCT + +/* + * As of 2.6.29 a clean credential API appears in the linux kernel. + * We attempt to layer the Solaris API on top of the linux API. + */ + +/* Hold a reference on the credential and group info */ +void +crhold(cred_t *cr) +{ + (void)get_cred((const cred_t *)cr); + (void)get_group_info(cr->group_info); +} + +/* Free a reference on the credential and group info */ +void +crfree(cred_t *cr) +{ + put_group_info(cr->group_info); + put_cred((const cred_t *)cr); +} + +/* Return the effective user id */ +uid_t +crgetuid(const cred_t *cr) +{ + return cr->euid; +} + +/* Return the real user id */ +uid_t +crgetruid(const cred_t *cr) +{ + return cr->uid; +} + +/* Return the saved user id */ +uid_t +crgetsuid(const cred_t *cr) +{ + return cr->suid; +} + +/* Return the effective group id */ +gid_t +crgetgid(const cred_t *cr) +{ + return cr->egid; +} + +/* Return the real group id */ +gid_t +crgetrgid(const cred_t *cr) +{ + return cr->gid; +} + +/* Return the saved group id */ +gid_t +crgetsgid(const cred_t *cr) +{ + return cr->sgid; +} + +/* Return the number of supplemental groups */ +int +crgetngroups(const cred_t *cr) +{ + struct group_info *gi; + int rc; + + gi = get_group_info(cr->group_info); + rc = gi->ngroups; + put_group_info(gi); + + return rc; +} + +/* + * Return an array of supplemental gids. The returned address is safe + * to use as long as the caller has taken a reference with crhold(). + * The caller is responsible for releasing the reference with crfree(). + */ +gid_t * +crgetgroups(const cred_t *cr) +{ + struct group_info *gi; + gid_t *gids; + + gi = get_group_info(cr->group_info); + gids = gi->blocks[0]; + put_group_info(gi); + + return gids; +} + +/* Check if the passed gid is available is in supplied credential. */ +int +groupmember(gid_t gid, const cred_t *cr) +{ + struct group_info *gi; + int rc; + + gi = get_group_info(cr->group_info); + rc = cr_groups_search(cr->group_info, gid); + put_group_info(gi); + + return rc; +} + +#else /* HAVE_CRED_STRUCT */ + +/* + * Until very recently all credential information was embedded in + * the linux task struct. For this reason to simulate a Solaris + * cred_t we need to pass the entire task structure around. + */ + +/* Hold a reference on the credential and group info */ +void +crhold(cred_t *cr) +{ + get_task_struct(cr); +} + +/* Free a reference on the credential and group info */ +void +crfree(cred_t *cr) +{ + put_task_struct(cr); +} + +/* Return the effective user id */ +uid_t +crgetuid(const cred_t *cr) { + return cr->euid; +} + +/* Return the effective real id */ +uid_t +crgetruid(const cred_t *cr) { + return cr->uid; +} + +/* Return the effective saved id */ +uid_t +crgetsuid(const cred_t *cr) { + return cr->suid; +} + +/* Return the effective group id */ +gid_t +crgetgid(const cred_t *cr) { + return cr->egid; +} + +/* Return the real group id */ +gid_t +crgetrgid(const cred_t *cr) { + return cr->gid; +} + +/* Return the saved group id */ +gid_t +crgetsgid(const cred_t *cr) { + return cr->sgid; +} + +/* Return the number of supplemental groups */ +int +crgetngroups(const cred_t *cr) +{ + int lock, rc; + + lock = (cr != current); + if (lock) + task_lock((struct task_struct *)cr); + + get_group_info(cr->group_info); + rc = cr->group_info->ngroups; + put_group_info(cr->group_info); + + if (lock) + task_unlock((struct task_struct *)cr); + + return rc; +} + +/* + * Return an array of supplemental gids. The returned address is safe + * to use as long as the caller has taken a reference with crhold(). + * The caller is responsible for releasing the reference with crfree(). + */ +gid_t * +crgetgroups(const cred_t *cr) +{ + gid_t *gids; + int lock; + + lock = (cr != current); + if (lock) + task_lock((struct task_struct *)cr); + + get_group_info(cr->group_info); + gids = cr->group_info->blocks[0]; + put_group_info(cr->group_info); + + if (lock) + task_unlock((struct task_struct *)cr); + + return gids; +} + +/* Check if the passed gid is available is in supplied credential. */ +int +groupmember(gid_t gid, const cred_t *cr) +{ + int lock, rc; + + lock = (cr != current); + if (lock) + task_lock((struct task_struct *)cr); + + get_group_info(cr->group_info); + rc = cr_groups_search(cr->group_info, gid); + put_group_info(cr->group_info); + + if (lock) + task_unlock((struct task_struct *)cr); + + return rc; +} + +#endif /* HAVE_CRED_STRUCT */ + +EXPORT_SYMBOL(crhold); +EXPORT_SYMBOL(crfree); +EXPORT_SYMBOL(crgetuid); +EXPORT_SYMBOL(crgetruid); +EXPORT_SYMBOL(crgetsuid); +EXPORT_SYMBOL(crgetgid); +EXPORT_SYMBOL(crgetrgid); +EXPORT_SYMBOL(crgetsgid); +EXPORT_SYMBOL(crgetngroups); +EXPORT_SYMBOL(crgetgroups); +EXPORT_SYMBOL(groupmember); diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index a60740519..6d71f4b82 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -157,6 +157,8 @@ spl_debug_subsys2str(int subsys) return "proc"; case S_MODULE: return "module"; + case S_CRED: + return "cred"; } } diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index c2d4c3f22..2f63b458a 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -20,3 +20,4 @@ splat-objs += splat-kobj.o splat-objs += splat-atomic.o splat-objs += splat-list.o splat-objs += splat-generic.o +splat-objs += splat-cred.o diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c new file mode 100644 index 000000000..f808625e8 --- /dev/null +++ b/module/splat/splat-cred.c @@ -0,0 +1,247 @@ +/* + * This file is part of the SPL: Solaris Porting Layer. + * + * Copyright (c) 2009 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory + * Written by: + * Brian Behlendorf , + * UCRL-CODE-235197 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "splat-internal.h" + +#define SPLAT_CRED_NAME "cred" +#define SPLAT_CRED_DESC "Kernel Cred Tests" + +#define SPLAT_CRED_TEST1_ID 0x0e01 +#define SPLAT_CRED_TEST1_NAME "cred" +#define SPLAT_CRED_TEST1_DESC "Task Credential Test" + +#define SPLAT_CRED_TEST2_ID 0x0e02 +#define SPLAT_CRED_TEST2_NAME "kcred" +#define SPLAT_CRED_TEST2_DESC "Kernel Credential Test" + +#define SPLAT_CRED_TEST3_ID 0x0e03 +#define SPLAT_CRED_TEST3_NAME "groupmember" +#define SPLAT_CRED_TEST3_DESC "Group Member Test" + +#define GROUP_STR_SIZE 128 +#define GROUP_STR_REDZONE 16 + +static int +splat_cred_test1(struct file *file, void *arg) +{ + char str[GROUP_STR_SIZE]; + uid_t uid, ruid, suid; + gid_t gid, rgid, sgid, *groups; + int ngroups, i, count = 0; + + uid = crgetuid(CRED()); + ruid = crgetruid(CRED()); + suid = crgetsuid(CRED()); + + gid = crgetgid(CRED()); + rgid = crgetrgid(CRED()); + sgid = crgetsgid(CRED()); + + crhold(CRED()); + ngroups = crgetngroups(CRED()); + groups = crgetgroups(CRED()); + + memset(str, 0, GROUP_STR_SIZE); + for (i = 0; i < ngroups; i++) { + count += sprintf(str + count, "%d ", groups[i]); + + if (count > (GROUP_STR_SIZE - GROUP_STR_REDZONE)) { + splat_vprint(file, SPLAT_CRED_TEST1_NAME, + "Failed too many group entries for temp " + "buffer: %d, %s\n", ngroups, str); + return -ENOSPC; + } + } + + crfree(CRED()); + + splat_vprint(file, SPLAT_CRED_TEST1_NAME, + "uid: %d ruid: %d suid: %d " + "gid: %d rgid: %d sgid: %d\n", + uid, ruid, suid, gid, rgid, sgid); + splat_vprint(file, SPLAT_CRED_TEST1_NAME, + "ngroups: %d groups: %s\n", ngroups, str); + + if (uid || ruid || suid || gid || rgid || sgid) { + splat_vprint(file, SPLAT_CRED_TEST1_NAME, + "Failed expected all uids+gids to be %d\n", 0); + return -EIDRM; + } + + if (ngroups > NGROUPS_MAX) { + splat_vprint(file, SPLAT_CRED_TEST1_NAME, + "Failed ngroups must not exceed NGROUPS_MAX: " + "%d > %d\n", ngroups, NGROUPS_MAX); + return -EIDRM; + } + + splat_vprint(file, SPLAT_CRED_TEST1_NAME, + "Success sane CRED(): %d\n", 0); + + return 0; +} /* splat_cred_test1() */ + +static int +splat_cred_test2(struct file *file, void *arg) +{ + char str[GROUP_STR_SIZE]; + uid_t uid, ruid, suid; + gid_t gid, rgid, sgid, *groups; + int ngroups, i, count = 0; + + uid = crgetuid(kcred); + ruid = crgetruid(kcred); + suid = crgetsuid(kcred); + + gid = crgetgid(kcred); + rgid = crgetrgid(kcred); + sgid = crgetsgid(kcred); + + crhold(kcred); + ngroups = crgetngroups(kcred); + groups = crgetgroups(kcred); + + memset(str, 0, GROUP_STR_SIZE); + for (i = 0; i < ngroups; i++) { + count += sprintf(str + count, "%d ", groups[i]); + + if (count > (GROUP_STR_SIZE - GROUP_STR_REDZONE)) { + splat_vprint(file, SPLAT_CRED_TEST2_NAME, + "Failed too many group entries for temp " + "buffer: %d, %s\n", ngroups, str); + return -ENOSPC; + } + } + + crfree(kcred); + + splat_vprint(file, SPLAT_CRED_TEST2_NAME, + "uid: %d ruid: %d suid: %d " + "gid: %d rgid: %d sgid: %d\n", + uid, ruid, suid, gid, rgid, sgid); + splat_vprint(file, SPLAT_CRED_TEST2_NAME, + "ngroups: %d groups: %s\n", ngroups, str); + + if (uid || ruid || suid || gid || rgid || sgid) { + splat_vprint(file, SPLAT_CRED_TEST2_NAME, + "Failed expected all uids+gids to be %d\n", 0); + return -EIDRM; + } + + if (ngroups > NGROUPS_MAX) { + splat_vprint(file, SPLAT_CRED_TEST2_NAME, + "Failed ngroups must not exceed NGROUPS_MAX: " + "%d > %d\n", ngroups, NGROUPS_MAX); + return -EIDRM; + } + + splat_vprint(file, SPLAT_CRED_TEST2_NAME, + "Success sane kcred: %d\n", 0); + + return 0; +} /* splat_cred_test2() */ + +/* + * On most/all systems it can be expected that a task with root + * permissions also is a member of the root group, Since the + * test suite is always run as root we check first that CRED() is + * a member of the root group, and secondly that it is not a member + * of our fake group. This test will break is someone happens to + * create group number NGROUPS_MAX-1 and then added root to it. + */ +static int +splat_cred_test3(struct file *file, void *arg) +{ + gid_t root_gid, fake_gid; + int rc; + + root_gid = 0; + fake_gid = NGROUPS_MAX-1; + + rc = groupmember(root_gid, CRED()); + if (!rc) { + splat_vprint(file, SPLAT_CRED_TEST3_NAME, + "Failed root git %d expected to be member " + "of CRED() groups: %d\n", root_gid, rc); + return -EIDRM; + } + + rc = groupmember(fake_gid, CRED()); + if (rc) { + splat_vprint(file, SPLAT_CRED_TEST3_NAME, + "Failed fake git %d expected not to be member " + "of CRED() groups: %d\n", fake_gid, rc); + return -EIDRM; + } + + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Success root gid " + "is a member of the expected groups: %d\n", rc); + + return rc; +} /* splat_cred_test3() */ + +splat_subsystem_t * +splat_cred_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_CRED_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_CRED_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_CRED; + + SPLAT_TEST_INIT(sub, SPLAT_CRED_TEST1_NAME, SPLAT_CRED_TEST1_DESC, + SPLAT_CRED_TEST1_ID, splat_cred_test1); + SPLAT_TEST_INIT(sub, SPLAT_CRED_TEST2_NAME, SPLAT_CRED_TEST2_DESC, + SPLAT_CRED_TEST2_ID, splat_cred_test2); + SPLAT_TEST_INIT(sub, SPLAT_CRED_TEST3_NAME, SPLAT_CRED_TEST3_DESC, + SPLAT_CRED_TEST3_ID, splat_cred_test3); + + return sub; +} /* splat_cred_init() */ + +void +splat_cred_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + + SPLAT_TEST_FINI(sub, SPLAT_CRED_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_CRED_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_CRED_TEST1_ID); + + kfree(sub); +} /* splat_cred_fini() */ + +int +splat_cred_id(void) +{ + return SPLAT_SUBSYSTEM_CRED; +} /* splat_cred_id() */ diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index c8925636a..159103980 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -630,6 +630,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(atomic); SPLAT_SUBSYSTEM_INIT(list); SPLAT_SUBSYSTEM_INIT(generic); + SPLAT_SUBSYSTEM_INIT(cred); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, SPLAT_NAME))) @@ -676,6 +677,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(cred); SPLAT_SUBSYSTEM_FINI(generic); SPLAT_SUBSYSTEM_FINI(list); SPLAT_SUBSYSTEM_FINI(atomic); diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 0fa177c02..c1c84d8d1 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -208,6 +208,7 @@ splat_subsystem_t *splat_kobj_init(void); splat_subsystem_t *splat_atomic_init(void); splat_subsystem_t *splat_list_init(void); splat_subsystem_t *splat_generic_init(void); +splat_subsystem_t *splat_cred_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -222,6 +223,7 @@ void splat_kobj_fini(splat_subsystem_t *); void splat_atomic_fini(splat_subsystem_t *); void splat_list_fini(splat_subsystem_t *); void splat_generic_fini(splat_subsystem_t *); +void splat_cred_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -236,5 +238,6 @@ int splat_kobj_id(void); int splat_atomic_id(void); int splat_list_id(void); int splat_generic_id(void); +int splat_cred_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/spl_config.h.in b/spl_config.h.in index 3b07d993c..582a47603 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -36,6 +36,9 @@ /* class_device_create() is available */ #undef HAVE_CLASS_DEVICE_CREATE +/* struct cred exists */ +#undef HAVE_CRED_STRUCT + /* unnumbered sysctl support exists */ #undef HAVE_CTL_UNNUMBERED @@ -72,6 +75,9 @@ /* global_page_state() is available */ #undef HAVE_GLOBAL_PAGE_STATE +/* groups_search() is available */ +#undef HAVE_GROUPS_SEARCH + /* init_utsname() is available */ #undef HAVE_INIT_UTSNAME From 6b09f739398a644384bfbab87792e4681707aef1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 28 Jul 2009 15:04:21 -0700 Subject: [PATCH 0308/1062] Remove get/put_task_struct as they are not available for SLES11 This interface is going away, and it's not as if most callers actually use crhold/crfree when working with credentials. So it'll be okay they we're not taking a reference on the task structure the odds of it going away while working with a credential and pretty small. --- module/spl/spl-cred.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index c5994aa20..826a228dd 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -179,18 +179,10 @@ groupmember(gid_t gid, const cred_t *cr) */ /* Hold a reference on the credential and group info */ -void -crhold(cred_t *cr) -{ - get_task_struct(cr); -} +void crhold(cred_t *cr) { } /* Free a reference on the credential and group info */ -void -crfree(cred_t *cr) -{ - put_task_struct(cr); -} +void crfree(cred_t *cr) { } /* Return the effective user id */ uid_t From 6ae7fef5b94275e50cc1dcd48c4ecf3b70d7f9d9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 28 Jul 2009 15:06:42 -0700 Subject: [PATCH 0309/1062] Update global_page_state() support for 2.6.29 kernels. Basically everything we need to monitor the global memory state of the system is now cleanly available via global_page_state(). The problem is that this interface is still fairly recent, and there has been one change in the page state enum which we need to handle. These changes basically boil down to the following: - If global_page_state() is available we should use it. Several autoconf checks have been added to detect the correct enum names. - If global_page_state() is not available check to see if get_zone_counts() symbol is available and use that. - If the get_zone_counts() symbol is not exported we have no choice be to dynamically aquire it at load time. This is an absolute last resort for old kernel which we don't want to patch to cleanly export the symbol. --- config/spl-build.m4 | 205 +++++-- configure | 1138 +++++++++++++++++++++++++++++++++---- include/sys/vmsystm.h | 21 +- module/spl/spl-kmem.c | 85 ++- module/splat/splat-kmem.c | 45 +- spl_config.h.in | 25 +- 6 files changed, 1324 insertions(+), 195 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 79fcd2548..51f7ea376 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -59,9 +59,11 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_NEXT_ONLINE_PGDAT SPL_AC_NEXT_ZONE SPL_AC_PGDAT_LIST - SPL_AC_GET_ZONE_COUNTS SPL_AC_GLOBAL_PAGE_STATE - SPL_AC_ZONE_STAT_ITEM_FIA + SPL_AC_ZONE_STAT_ITEM_FREE + SPL_AC_ZONE_STAT_ITEM_INACTIVE + SPL_AC_ZONE_STAT_ITEM_ACTIVE + SPL_AC_GET_ZONE_COUNTS SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME SPL_AC_CRED_STRUCT @@ -1005,22 +1007,6 @@ AC_DEFUN([SPL_AC_PGDAT_LIST], [ []) ]) -dnl # -dnl # Proposed API change, -dnl # This symbol is not available in stock kernels. You may build a -dnl # custom kernel with the *-spl-export-symbols.patch which will export -dnl # these symbols for use. If your already rolling a custom kernel for -dnl # your environment this is recommended. -dnl # -AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ - SPL_CHECK_SYMBOL_EXPORT( - [get_zone_counts], - [], - [AC_DEFINE(HAVE_GET_ZONE_COUNTS, 1, - [get_zone_counts() is available])], - []) -]) - dnl # dnl # 2.6.18 API change, dnl # First introduced global_page_state() support as an inline. @@ -1028,10 +1014,10 @@ dnl # AC_DEFUN([SPL_AC_GLOBAL_PAGE_STATE], [ AC_MSG_CHECKING([whether global_page_state() is available]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ unsigned long state; - state = global_page_state(NR_FREE_PAGES); + state = global_page_state(0); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GLOBAL_PAGE_STATE, 1, @@ -1042,28 +1028,183 @@ AC_DEFUN([SPL_AC_GLOBAL_PAGE_STATE], [ ]) dnl # -dnl # 2.6.21 API change, -dnl # Public global zone stats now include free/inactive/active page -dnl # counts. This replaced the priviate get_zone_counts() interface. +dnl # 2.6.21 API change (plus subsequent naming convention changes), +dnl # Public global zone stats now include a free page count. However +dnl # the enumerated names of the counters have changed since this API +dnl # was introduced. We need to deduce the corrent name to use. This +dnl # replaces the priviate get_zone_counts() interface. dnl # -AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_FIA], [ - AC_MSG_CHECKING([whether free/inactive/active page state is available]) +dnl # NR_FREE_PAGES was available from 2.6.21 to current kernels, which +dnl # is 2.6.30 as of when this was written. +dnl # +AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_FREE], [ + AC_MSG_CHECKING([whether page state NR_FREE_PAGES is available]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ - enum zone_stat_item i1, i2, i3; - i1 = NR_FREE_PAGES; - i2 = NR_INACTIVE; - i3 = NR_ACTIVE; + enum zone_stat_item zsi; + zsi = NR_FREE_PAGES; ],[ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_FIA, 1, - [free/inactive/active page state is available]) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES, 1, + [Page state NR_FREE_PAGES is available]) ],[ AC_MSG_RESULT(no) ]) ]) +dnl # +dnl # 2.6.21 API change (plus subsequent naming convention changes), +dnl # Public global zone stats now include an inactive page count. However +dnl # the enumerated names of the counters have changed since this API +dnl # was introduced. We need to deduce the corrent name to use. This +dnl # replaces the priviate get_zone_counts() interface. +dnl # +dnl # NR_INACTIVE was available from 2.6.21 to 2.6.27 and included both +dnl # anonymous and file inactive pages. As of 2.6.28 it was split in +dnl # to NR_INACTIVE_ANON and NR_INACTIVE_FILE. +dnl # +AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_INACTIVE], [ + AC_MSG_CHECKING([whether page state NR_INACTIVE is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + enum zone_stat_item zsi; + zsi = NR_INACTIVE; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_INACTIVE, 1, + [Page state NR_INACTIVE is available]) + ],[ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([whether page state NR_INACTIVE_ANON is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + enum zone_stat_item zsi; + zsi = NR_INACTIVE_ANON; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON, 1, + [Page state NR_INACTIVE_ANON is available]) + ],[ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([whether page state NR_INACTIVE_FILE is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + enum zone_stat_item zsi; + zsi = NR_INACTIVE_FILE; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE, 1, + [Page state NR_INACTIVE_FILE is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 2.6.21 API change (plus subsequent naming convention changes), +dnl # Public global zone stats now include an active page count. However +dnl # the enumerated names of the counters have changed since this API +dnl # was introduced. We need to deduce the corrent name to use. This +dnl # replaces the priviate get_zone_counts() interface. +dnl # +dnl # NR_ACTIVE was available from 2.6.21 to 2.6.27 and included both +dnl # anonymous and file active pages. As of 2.6.28 it was split in +dnl # to NR_ACTIVE_ANON and NR_ACTIVE_FILE. +dnl # +AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_ACTIVE], [ + AC_MSG_CHECKING([whether page state NR_ACTIVE is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + enum zone_stat_item zsi; + zsi = NR_ACTIVE; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_ACTIVE, 1, + [Page state NR_ACTIVE is available]) + ],[ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([whether page state NR_ACTIVE_ANON is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + enum zone_stat_item zsi; + zsi = NR_ACTIVE_ANON; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON, 1, + [Page state NR_ACTIVE_ANON is available]) + ],[ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([whether page state NR_ACTIVE_FILE is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + enum zone_stat_item zsi; + zsi = NR_ACTIVE_FILE; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE, 1, + [Page state NR_ACTIVE_FILE is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # Proposed API change for legacy kernels. +dnl # This symbol is not available in older kernels. For kernels post +dnl # 2.6.21 the global_page_state() API is used to get free/inactive/active +dnl # page state information. This symbol is only used in legacy kernels +dnl # any only as a last resort. +dnl +AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ + AC_MSG_CHECKING([whether symbol get_zone_counts is needed]) + SPL_LINUX_TRY_COMPILE([ + ],[ + #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) + #error "global_page_state needs NR_FREE_PAGES" + #endif + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) + #error "global_page_state needs NR_ACTIVE*" + #endif + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) + #error "global_page_state needs NR_INACTIVE*" + #endif + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(NEED_GET_ZONE_COUNTS, 1, + [get_zone_counts() is needed]) + + SPL_CHECK_SYMBOL_EXPORT( + [get_zone_counts], + [], + [AC_DEFINE(HAVE_GET_ZONE_COUNTS, 1, + [get_zone_counts() is available])], + []) + ]) +]) + dnl # dnl # SLES API change, never adopted in mainline, dnl # Third 'struct vfsmount *' argument removed. diff --git a/configure b/configure index a342d73a2..3ed6af191 100755 --- a/configure +++ b/configure @@ -21040,47 +21040,6 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - - else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - - fi - else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - - fi - - - echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6 @@ -21093,14 +21052,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { unsigned long state; - state = global_page_state(NR_FREE_PAGES); + state = global_page_state(0); ; return 0; @@ -21147,8 +21106,8 @@ fi - echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5 -echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 +echo $ECHO_N "checking whether page state NR_FREE_PAGES is available... $ECHO_C" >&6 cat >conftest.c <<_ACEOF @@ -21159,16 +21118,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item i1, i2, i3; - i1 = NR_FREE_PAGES; - i2 = NR_INACTIVE; - i3 = NR_ACTIVE; + enum zone_stat_item zsi; + zsi = NR_FREE_PAGES; ; return 0; @@ -21195,7 +21152,7 @@ _ACEOF echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_FIA 1 +#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 _ACEOF @@ -21208,6 +21165,516 @@ echo "${ECHO_T}no" >&6 +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 +echo $ECHO_N "checking whether page state NR_INACTIVE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_INACTIVE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 +echo $ECHO_N "checking whether page state NR_INACTIVE_ANON is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_INACTIVE_ANON; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 +echo $ECHO_N "checking whether page state NR_INACTIVE_FILE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_INACTIVE_FILE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 +echo $ECHO_N "checking whether page state NR_ACTIVE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_ACTIVE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 +echo $ECHO_N "checking whether page state NR_ACTIVE_ANON is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_ACTIVE_ANON; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 +echo $ECHO_N "checking whether page state NR_ACTIVE_FILE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_ACTIVE_FILE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 +echo $ECHO_N "checking whether symbol get_zone_counts is needed... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + +int +main (void) +{ + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) + #error "global_page_state needs NR_FREE_PAGES" + #endif + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) + #error "global_page_state needs NR_ACTIVE*" + #endif + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) + #error "global_page_state needs NR_INACTIVE*" + #endif + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define NEED_GET_ZONE_COUNTS 1 +_ACEOF + + + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 +echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + + + + fi rm -Rf build @@ -23540,47 +24007,6 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - - else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - - fi - else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - - fi - - - echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6 @@ -23593,14 +24019,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { unsigned long state; - state = global_page_state(NR_FREE_PAGES); + state = global_page_state(0); ; return 0; @@ -23647,8 +24073,8 @@ fi - echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5 -echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 +echo $ECHO_N "checking whether page state NR_FREE_PAGES is available... $ECHO_C" >&6 cat >conftest.c <<_ACEOF @@ -23659,16 +24085,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item i1, i2, i3; - i1 = NR_FREE_PAGES; - i2 = NR_INACTIVE; - i3 = NR_ACTIVE; + enum zone_stat_item zsi; + zsi = NR_FREE_PAGES; ; return 0; @@ -23695,7 +24119,7 @@ _ACEOF echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_FIA 1 +#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 _ACEOF @@ -23708,6 +24132,516 @@ echo "${ECHO_T}no" >&6 +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 +echo $ECHO_N "checking whether page state NR_INACTIVE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_INACTIVE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 +echo $ECHO_N "checking whether page state NR_INACTIVE_ANON is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_INACTIVE_ANON; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 +echo $ECHO_N "checking whether page state NR_INACTIVE_FILE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_INACTIVE_FILE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 +echo $ECHO_N "checking whether page state NR_ACTIVE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_ACTIVE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 +echo $ECHO_N "checking whether page state NR_ACTIVE_ANON is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_ACTIVE_ANON; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 +echo $ECHO_N "checking whether page state NR_ACTIVE_FILE is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item zsi; + zsi = NR_ACTIVE_FILE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 +echo $ECHO_N "checking whether symbol get_zone_counts is needed... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + +int +main (void) +{ + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) + #error "global_page_state needs NR_FREE_PAGES" + #endif + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) + #error "global_page_state needs NR_ACTIVE*" + #endif + + #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ + !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) + #error "global_page_state needs NR_INACTIVE*" + #endif + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define NEED_GET_ZONE_COUNTS 1 +_ACEOF + + + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 +echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + + + + fi rm -Rf build diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 75365fde0..1c367d7cd 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -123,22 +123,21 @@ extern struct pglist_data *pgdat_list_addr; #endif /* HAVE_PGDAT_HELPERS */ /* Source linux/mm/vmstat.c */ -#ifndef HAVE_ZONE_STAT_ITEM_FIA -# ifndef HAVE_GET_ZONE_COUNTS +#if defined(NEED_GET_ZONE_COUNTS) && !defined(HAVE_GET_ZONE_COUNTS) typedef void (*get_zone_counts_t)(unsigned long *, unsigned long *, unsigned long *); extern get_zone_counts_t get_zone_counts_fn; # define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f) -# endif /* HAVE_GET_ZONE_COUNTS */ +#endif /* NEED_GET_ZONE_COUNTS && !HAVE_GET_ZONE_COUNTS */ -extern unsigned long spl_global_page_state(int); -/* Defines designed to simulate enum but large enough to ensure no overlap */ -# define NR_FREE_PAGES 0x8001 -# define NR_INACTIVE 0x8002 -# define NR_ACTIVE 0x8003 -#else -#define spl_global_page_state(item) global_page_state(item) -#endif /* HAVE_ZONE_STAT_ITEM_FIA */ +typedef enum spl_zone_stat_item { + SPL_NR_FREE_PAGES, + SPL_NR_INACTIVE, + SPL_NR_ACTIVE, + SPL_NR_ZONE_STAT_ITEMS +} spl_zone_stat_item_t; + +extern unsigned long spl_global_page_state(spl_zone_stat_item_t); #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 4edd3d7e1..b1124f706 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -109,49 +109,82 @@ EXPORT_SYMBOL(pgdat_list_addr); #endif /* HAVE_PGDAT_HELPERS */ -#ifndef HAVE_ZONE_STAT_ITEM_FIA +#ifdef NEED_GET_ZONE_COUNTS # ifndef HAVE_GET_ZONE_COUNTS get_zone_counts_t get_zone_counts_fn = SYMBOL_POISON; EXPORT_SYMBOL(get_zone_counts_fn); # endif /* HAVE_GET_ZONE_COUNTS */ unsigned long -spl_global_page_state(int item) +spl_global_page_state(spl_zone_stat_item_t item) { unsigned long active; unsigned long inactive; unsigned long free; - if (item == NR_FREE_PAGES) { - get_zone_counts(&active, &inactive, &free); - return free; + get_zone_counts(&active, &inactive, &free); + switch (item) { + case SPL_NR_FREE_PAGES: return free; + case SPL_NR_INACTIVE: return inactive; + case SPL_NR_ACTIVE: return active; + default: ASSERT(0); /* Unsupported */ } - if (item == NR_INACTIVE) { - get_zone_counts(&active, &inactive, &free); - return inactive; - } - - if (item == NR_ACTIVE) { - get_zone_counts(&active, &inactive, &free); - return active; - } - -# ifdef HAVE_GLOBAL_PAGE_STATE - return global_page_state((enum zone_stat_item)item); -# else - return 0; /* Unsupported */ -# endif /* HAVE_GLOBAL_PAGE_STATE */ + return 0; } +#else +# ifdef HAVE_GLOBAL_PAGE_STATE +unsigned long +spl_global_page_state(spl_zone_stat_item_t item) +{ + unsigned long pages = 0; + + switch (item) { + case SPL_NR_FREE_PAGES: +# ifdef HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES + pages += global_page_state(NR_FREE_PAGES); +# endif + break; + case SPL_NR_INACTIVE: +# ifdef HAVE_ZONE_STAT_ITEM_NR_INACTIVE + pages += global_page_state(NR_INACTIVE); +# endif +# ifdef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON + pages += global_page_state(NR_INACTIVE_ANON); +# endif +# ifdef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE + pages += global_page_state(NR_INACTIVE_FILE); +# endif + break; + case SPL_NR_ACTIVE: +# ifdef HAVE_ZONE_STAT_ITEM_NR_ACTIVE + pages += global_page_state(NR_ACTIVE); +# endif +# ifdef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON + pages += global_page_state(NR_ACTIVE_ANON); +# endif +# ifdef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE + pages += global_page_state(NR_ACTIVE_FILE); +# endif + break; + default: + ASSERT(0); /* Unsupported */ + } + + return pages; +} +# else +# error "Both global_page_state() and get_zone_counts() unavailable" +# endif /* HAVE_GLOBAL_PAGE_STATE */ +#endif /* NEED_GET_ZONE_COUNTS */ EXPORT_SYMBOL(spl_global_page_state); -#endif /* HAVE_ZONE_STAT_ITEM_FIA */ pgcnt_t spl_kmem_availrmem(void) { /* The amount of easily available memory */ - return (spl_global_page_state(NR_FREE_PAGES) + - spl_global_page_state(NR_INACTIVE)); + return (spl_global_page_state(SPL_NR_FREE_PAGES) + + spl_global_page_state(SPL_NR_INACTIVE)); } EXPORT_SYMBOL(spl_kmem_availrmem); @@ -1856,16 +1889,14 @@ spl_kmem_init_kallsyms_lookup(void) # endif /* HAVE_PGDAT_LIST */ #endif /* HAVE_PGDAT_HELPERS */ -#ifndef HAVE_ZONE_STAT_ITEM_FIA -# ifndef HAVE_GET_ZONE_COUNTS +#if defined(NEED_GET_ZONE_COUNTS) && !defined(HAVE_GET_ZONE_COUNTS) get_zone_counts_fn = (get_zone_counts_t) spl_kallsyms_lookup_name("get_zone_counts"); if (!get_zone_counts_fn) { printk(KERN_ERR "Error: Unknown symbol get_zone_counts\n"); return -EFAULT; } -# endif /* HAVE_GET_ZONE_COUNTS */ -#endif /* HAVE_ZONE_STAT_ITEM_FIA */ +#endif /* NEED_GET_ZONE_COUNTS && !HAVE_GET_ZONE_COUNTS */ /* * It is now safe to initialize the global tunings which rely on diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index b021750ad..1007f7855 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1045,16 +1045,17 @@ splat_kmem_test11(struct file *file, void *arg) static int splat_kmem_test12(struct file *file, void *arg) { - ssize_t alloc1, free1, total1; - ssize_t alloc2, free2, total2; + size_t alloc1, free1, total1; + size_t alloc2, free2, total2; int size = 8*1024*1024; void *ptr; alloc1 = vmem_size(NULL, VMEM_ALLOC); free1 = vmem_size(NULL, VMEM_FREE); total1 = vmem_size(NULL, VMEM_ALLOC | VMEM_FREE); - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%d free=%d " - "total=%d\n", (int)alloc1, (int)free1, (int)total1); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%lu " + "free=%lu total=%lu\n", (unsigned long)alloc1, + (unsigned long)free1, (unsigned long)total1); splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Alloc %d bytes\n", size); ptr = vmem_alloc(size, KM_SLEEP); @@ -1067,42 +1068,44 @@ splat_kmem_test12(struct file *file, void *arg) alloc2 = vmem_size(NULL, VMEM_ALLOC); free2 = vmem_size(NULL, VMEM_FREE); total2 = vmem_size(NULL, VMEM_ALLOC | VMEM_FREE); - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%d free=%d " - "total=%d\n", (int)alloc2, (int)free2, (int)total2); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%lu " + "free=%lu total=%lu\n", (unsigned long)alloc2, + (unsigned long)free2, (unsigned long)total2); splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Free %d bytes\n", size); vmem_free(ptr, size); if (alloc2 < (alloc1 + size - (size / 100)) || alloc2 > (alloc1 + size + (size / 100))) { - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "Failed VMEM_ALLOC size: %d != %d+%d (+/- 1%%)\n", - (int)alloc2, (int)alloc1, size); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Failed " + "VMEM_ALLOC size: %lu != %lu+%d (+/- 1%%)\n", + (unsigned long)alloc2,(unsigned long)alloc1,size); return -ERANGE; } if (free2 < (free1 - size - (size / 100)) || free2 > (free1 - size + (size / 100))) { - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "Failed VMEM_FREE size: %d != %d-%d (+/- 1%%)\n", - (int)free2, (int)free1, size); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Failed " + "VMEM_FREE size: %lu != %lu-%d (+/- 1%%)\n", + (unsigned long)free2, (unsigned long)free1, size); return -ERANGE; } if (total1 != total2) { - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "Failed VMEM_ALLOC | VMEM_FREE not constant: " - "%d != %d\n", (int)total2, (int)total1); + splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Failed " + "VMEM_ALLOC | VMEM_FREE not constant: " + "%lu != %lu\n", (unsigned long)total2, + (unsigned long)total1); return -ERANGE; } splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "VMEM_ALLOC within tolerance: ~%d%% (%d/%d)\n", - (int)(((alloc1 + size) - alloc2) * 100 / size), - (int)((alloc1 + size) - alloc2), size); + "VMEM_ALLOC within tolerance: ~%ld%% (%ld/%d)\n", + (long)abs(alloc1 + (long)size - alloc2) * 100 / (long)size, + (long)abs(alloc1 + (long)size - alloc2), size); splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "VMEM_FREE within tolerance: ~%d%% (%d/%d)\n", - (int)(((free1 - size) - free2) * 100 / size), - (int)((free1 - size) - free2), size); + "VMEM_FREE within tolerance: ~%ld%% (%ld/%d)\n", + (long)abs((free1 - (long)size) - free2) * 100 / (long)size, + (long)abs((free1 - (long)size) - free2), size); return 0; } diff --git a/spl_config.h.in b/spl_config.h.in index 582a47603..c4097d80f 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -159,8 +159,29 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* free/inactive/active page state is available */ -#undef HAVE_ZONE_STAT_ITEM_FIA +/* Page state NR_ACTIVE is available */ +#undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE + +/* Page state NR_ACTIVE_ANON is available */ +#undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON + +/* Page state NR_ACTIVE_FILE is available */ +#undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE + +/* Page state NR_FREE_PAGES is available */ +#undef HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES + +/* Page state NR_INACTIVE is available */ +#undef HAVE_ZONE_STAT_ITEM_NR_INACTIVE + +/* Page state NR_INACTIVE_ANON is available */ +#undef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON + +/* Page state NR_INACTIVE_FILE is available */ +#undef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE + +/* get_zone_counts() is needed */ +#undef NEED_GET_ZONE_COUNTS /* Name of package */ #undef PACKAGE From c65d62d8bfbc3e800e17a580267fa77de5d01d6b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 30 Jul 2009 13:52:11 -0700 Subject: [PATCH 0310/1062] Disable stack overflow checking by default. The run time stack overflow checking is being disabled by default because it is not safe for use with 2.6.29 and latter kernels. These kernels do now have their own stack overflow checking so this support has become redundant anyway. It can be re-enabled for older kernels or arches without stack overflow checking by redefining CHECK_STACK(). --- include/sys/debug.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 8da76863c..639b4cc28 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -282,7 +282,15 @@ do { \ } \ } while (0) -#define CHECK_STACK() __CHECK_STACK(__FILE__, __func__, __LINE__) +/* NOTE: The run time stack overflow checking is being disabled by default + * because it is not safe for use with 2.6.29 and latter kernels. These + * kernels do now have their own stack overflow checking so this support + * has become redundant anyway. It can be re-enabled for older kernels or + * arches without stack overflow checking by redefining CHECK_STACK(). + * + * #define CHECK_STACK() __CHECK_STACK(__FILE__, __func__, __LINE__) + */ +#define CHECK_STACK() ((void)0) /* ASSERTION that is safe to use within the debug system */ #define __ASSERT(cond) \ From 16f4a92c1019229c50d43adcc9141eb46a75f20d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 31 Jul 2009 12:44:34 -0700 Subject: [PATCH 0311/1062] Required missing symbols for FC11 kernels (2.6.29.4-167.fc11.x86_64) --- patches/fc11-spl-export-symbols.patch | 94 +++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 patches/fc11-spl-export-symbols.patch diff --git a/patches/fc11-spl-export-symbols.patch b/patches/fc11-spl-export-symbols.patch new file mode 100644 index 000000000..726aabddc --- /dev/null +++ b/patches/fc11-spl-export-symbols.patch @@ -0,0 +1,94 @@ +Required missing symbols for FC11 kernels (2.6.29.4-167.fc11.x86_64) + +* get_vmalloc_info() +There is no clean API in the kernel for modules to check the virtual +memory state of the system. This information is available in user +space under /proc/meminfo and the details for every virtual memory +node are available under /proc/vmallocinfo. + +* groups_search() +This support is easily replicated if the symbol is not provided by the +kernel. However exporting the symbol from the kernel is preferable. +This is required by the solaris credential API. + +* task_curr() +This symbol is used by the solaris adaptive mutex implementation. If +unavailable then all solaris mutexs behave strictly like linux style +semaphones. If available then the mutex may spin for a short while, +rather than sleep, if the holder of the lock is currently executing. + +* first_online_pgdat() +* next_online_pgdat() +* next_zone() +Required helper functions for the zone iterators for_each_zone() and +for_each_populated_zone(). These symbols were previously available +in 2.6.17 kernels, marked unused in 2.6.18 kernels, and removed as +of the 2.6.19 kernel series. The information is available in user +space under /proc/zoneinfo. + +diff --git a/fs/proc/mmu.c b/fs/proc/mmu.c +index 8ae221d..081c7b5 100644 +--- a/fs/proc/mmu.c ++++ b/fs/proc/mmu.c +@@ -58,3 +58,4 @@ void get_vmalloc_info(struct vmalloc_info *vmi) + read_unlock(&vmlist_lock); + } + } ++EXPORT_SYMBOL(get_vmalloc_info); +diff --git a/kernel/groups.c b/kernel/groups.c +index 2b45b2e..24b62f8 100644 +--- a/kernel/groups.c ++++ b/kernel/groups.c +@@ -153,6 +153,7 @@ int groups_search(const struct group_info *group_info, gid_t grp) + } + return 0; + } ++EXPORT_SYMBOL(groups_search); + + /** + * set_groups - Change a group subscription in a set of credentials +diff --git a/kernel/sched.c b/kernel/sched.c +index 1b59e26..8728c52 100644 +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -1883,10 +1883,11 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep) + * task_curr - is this task currently executing on a CPU? + * @p: the task in question. + */ +-inline int task_curr(const struct task_struct *p) ++task_curr(const struct task_struct *p) + { + return cpu_curr(task_cpu(p)) == p; + } ++EXPORT_SYMBOL(task_curr); + + static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu) + { +diff --git a/mm/mmzone.c b/mm/mmzone.c +index f5b7d17..1468a22 100644 +--- a/mm/mmzone.c ++++ b/mm/mmzone.c +@@ -14,6 +14,7 @@ struct pglist_data *first_online_pgdat(void) + { + return NODE_DATA(first_online_node); + } ++EXPORT_SYMBOL(first_online_pgdat); + + struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) + { +@@ -23,6 +24,7 @@ struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) + return NULL; + return NODE_DATA(nid); + } ++EXPORT_SYMBOL(next_online_pgdat); + + /* + * next_zone - helper magic for for_each_zone() +@@ -42,6 +44,7 @@ struct zone *next_zone(struct zone *zone) + } + return zone; + } ++EXPORT_SYMBOL(next_zone); + + static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) + { From 68ada11e5ccd5aab3485d77953b446937d12852b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 4 Aug 2009 12:22:33 -0700 Subject: [PATCH 0312/1062] Tag spl-0.4.5. Update the ChangeLog with a summary of the changes since the last release and update the META file to reflect the new version number. --- ChangeLog | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- META | 2 +- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e68b7f239..cc75e7d17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,57 @@ +2009-08-04 Brian Behlendorf + + * : Tag spl-0.4.5 + + * FC11 and SLES11 support: This includes all compatibility changes + to support 2.6.29 based kernels and the required build system + improvements. + * module/spl/spl-module.c: Register a basic compat ioctl handler + for 32-bit user vs 64-bit kernel compatibility. This is the default + build environment for all 64-bit SLES systems. + * config/spl-build.m4: Check arch/default path when detecting kernel + objects under SLES. We still preferentially use arch/arch if + available but if that fails it is acceptable to use default. + * module/spl/spl-vnode.: Use HAVE_PATH_IN_NAMEIDATA compat macros + for maximum kernel compatibility. + * config/spl-build.m4: Remove LINUXINCLUDE from autoconf wrapper. + This breaks the 2.6.28+ kernels build system, all kernel build systems + at least post 2.6.16 will set this properly so we should not. + * include/sys/vmsystm.h, module/spl/spl-kmem.c: Perferentially use the + global_page_state() API when your kernel supports the required enums. + * include/sys/debug.h: Add ASSERTV macro to simplify removing + variables (the V in ASSERTV) which are only used in ASSERT(). + * include/sys/debug.h: Disable stack overflow checking by default + when build with --enable-debug, modern kernels now provide this. + * patches/fc11-spl-export-symbols.patch: Recommended missing symbols + patch for FC11. This is not required for correct functionality but + it is recommended for individuals who are already patching the kernel. + + * Additional Solaris API emulation: + * include/sys/taskq.h: Add basic taskq support for the flag + TASKQ_THREADS_CPU_PCT which is used to scale the number of threads + based on the number of online CPUs. + * include/sys/file.hi, module/spl/spl-generic.c: Add support for + fake ioctls which originate from the kernel instead of user space. + * include/sys/acl.h: Add ACE_ALL_PERMS ACL definition. + * include/sys/cred.h, module/splat/splat-cred.c: Add basic credential + support and splat regression tests. + + * Bug fixes: + * include/sys/isa_defs.h: Add more endianess paranoia. + * module/spl/spl-time.c: Integer overflow after ~164 days. + * include/sys/debug.h: NULL dereference by tcd_for_each(). + * module/splat/splat-kmem.c: Allow kmem or vmem based slabs for + slab_lock and slab_overcommit tests. This may still be an issue on + 32-bit systems due to the small virtual address space. + * module/spl/spl-module.c: Positive Solaris ioctl return codes are + need to be negated for use by libc to ensure errno is set correctly. + 2009-07-02 Brian Behlendorf * : Tag spl-0.4.4 * : Generic distro friendly build system / packaging improvements - for RPM based distros including CHAOS, RHEL, Fedora, and SLES. + for rpm based distros including CHAOS, RHEL, Fedora, and SLES. spl-.src.rpm - Fully rebuildable source rpm for utils. diff --git a/META b/META index aa42e6238..72c2493c7 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.4 +Version: 0.4.5 Release: 1 Release-Tags: relext From 26d77c4493b631b7faa26da50be120c9dabb3a60 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 13 Aug 2009 15:02:34 -0700 Subject: [PATCH 0313/1062] Explicit check for requires_* rpm defines Due to different distros and/or versions of rpm mishandling the shorthand syntax simply use the longer version which get interpreted correctly. --- spl-modules.spec.in | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 61ad41ba3..e18a3bfbc 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -3,9 +3,17 @@ # require_kver, require_kdir, require_obj constants for us, but if it does not # not we attempt to determine the correct values based on your distro. -%{?require_kver: %define kver %{require_kver}} -%{?require_kdir: %define kdir %{require_kdir}} -%{?require_kobj: %define kobj %{require_kobj}} +%if %{defined require_kver} +%define kver %{require_kver} +%endif + +%if %{defined require_kdir} +%define kdir %{require_kdir} +%endif + +%if %{defined require_kobj} +%define kobj %{require_kobj} +%endif # kdir: Full path to the kernel source headers # kobj: Full path to the kernel build objects From 73358d5a1dc6278fd20eed0a9872c0b1572caacc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 14 Aug 2009 14:09:16 -0700 Subject: [PATCH 0314/1062] Various spec file tweaks to handle rpm building of several distros. Supported and tested distros now include SLES10, SLES11, Chaos 4.x, RHEL5, and Fedora 11. This update was mainly to address rebuildable kernel module rpms, and correct rpm dependencies for each distro. --- spl-modules.spec.in | 105 ++++++++++++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 29 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index e18a3bfbc..7740d9422 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -3,6 +3,13 @@ # require_kver, require_kdir, require_obj constants for us, but if it does not # not we attempt to determine the correct values based on your distro. +# kdir: Full path to the kernel source headers +# kobj: Full path to the kernel build objects +# kver: Kernel version +# kpkg: Kernel package name +# kdevpkg: Kernel devel package name +# kverpkg: Kernel package version + %if %{defined require_kver} %define kver %{require_kver} %endif @@ -15,32 +22,51 @@ %define kobj %{require_kobj} %endif -# kdir: Full path to the kernel source headers -# kobj: Full path to the kernel build objects -# kver: Kernel version -# kpkg: Kernel package name -# kdevpkg: Kernel devel package name -# kverpkg: Kernel package version - -# SLES*: -%if %{defined sles_version} +# SLES 10, SLES 11: +%if %{defined suse_version} %if %{undefined kver} - %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %((echo X; %{__cat} %{klnk}/.kernelrelease - 2>/dev/null) | tail -1) + %ifarch ppc64 + %define kverextra ppc64 + %else + %define kverextra default + %endif + + %if %{suse_version} >= 1100 + %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{kverextra} + %define krelease %{klnk}/include/config/kernel.release + %else + %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{kverextra} + %define krelease %{klnk}/.kernelrelease + %endif + + %define kver %((echo X; %{__cat} %{krelease} 2>/dev/null)|tail -1) %endif - %define kpkg kernel-%{_target_cpu} - %define kdevpkg kernel-source kernel-syms - %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) + + %if %{undefined kverextra} + %define kverextra %(echo %{kver} | cut -f3 -d'-') + %endif + + %define kpkg kernel-%{kverextra} + %define kdevpkg kernel-source + %define kverpkg %(echo %{kver} | %{__sed} -e 's/-%{kverextra}//g') + + # The kernel and rpm versions do not strictly match under SLES11 + # e.g. kernel version 2.6.27.19-5 != rpm version 2.6.27.19-5.1 + %if %{suse_version} >= 1100 + %define koppkg >= + %else + %define koppkg = + %endif + %if %{undefined kdir} %define kdir %{_usrsrc}/linux-%{kverpkg} %endif %if %{undefined kobj} - %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} + %define kobj %{kdir}-obj/%{_target_cpu}/%{kverextra} %endif - -# CHAOS4: %else + +# CHAOS 4.x: %if %{defined ch4} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config @@ -50,16 +76,17 @@ %define kpkg chaos-kernel %define kdevpkg chaos-kernel-devel %define kverpkg %{kver} + %define koppkg = %if %{undefined kdir} %define kdir %{_usrsrc}/kernels/%{kver} %endif %if %{undefined kobj} %define kobj %{kdir} %endif - -# RHEL*/Fedora: %else -%if %{defined fedora} || %{defined rhel} + +# RHEL 5: +%if %{defined el5} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config %define kver %((echo X; %{__cat} %{klnk}/kernel.release @@ -67,23 +94,43 @@ %endif %define kpkg kernel %define kdevpkg kernel-devel - %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) + %define kverpkg %{kver} + %define koppkg = + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif +%else + +# Fedora 11: +%if %{defined fedora} + %if %{undefined kver} + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((echo X; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %(echo %{kver} | %{__sed} -e 's/.%{_target_cpu}//g') + %define koppkg = %if %{undefined kdir} %define kdir %{_usrsrc}/kernels/%{kver} %endif %if %{undefined kobj} %define kobj %{kdir} %endif - %else # Unsupported distro: %if %{undefined kver} - %define kver X + %define kver X %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %{kver} + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %{kver} + %define koppkg = %if %{undefined kdir} %define kdir %{_usrsrc}/kernels/%{kver} %endif @@ -94,13 +141,13 @@ %endif %endif %endif +%endif # Distro agnostic: %define name @PACKAGE@-modules %define version @VERSION@ %define debug_package %{nil} - # The kernel version should only be appended to a binary RPM. When # building a source RPM it must be kernel version agnostic. This means # the source RPM must never specify a required kernel version, but the @@ -111,7 +158,7 @@ %else %define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %define release @SPL_META_RELEASE@_%{relext} -%define requires %{kpkg} = %{kverpkg} +%define requires %{kpkg} %{koppkg} %{kverpkg} %endif Summary: Solaris Porting Layer Modules From e811949a57044d60d12953c5c3b808a79a7d36ef Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 18 Sep 2009 16:09:47 -0700 Subject: [PATCH 0315/1062] Reimplement rwlocks for Linux lock profiling/analysis. It turns out that the previous rwlock implementation worked well but did not integrate properly with the upstream kernel lock profiling/ analysis tools. This is a major problem since it would be awfully nice to be able to use the automatic lock checker and profiler. The problem is that the upstream lock tools use the pre-processor to create a lock class for each uniquely named locked. Since the rwsem was embedded in a wrapper structure the name was always the same. The effect was that we only ended up with one lock class for the entire SPL which caused the lock dependency checker to flag nearly everything as a possible deadlock. The solution was to directly map a krwlock to a Linux rwsem using a typedef there by eliminating the wrapper structure. This was not done initially because the rwsem implementation is specific to the arch. To fully implement the Solaris krwlock API using only the provided rwsem API is not possible. It can only be done by directly accessing some of the internal data member of the rwsem structure. For example, the Linux API provides a different function for dropping a reader vs writer lock. Whereas the Solaris API uses the same function and the caller does not pass in what type of lock it is. This means to properly drop the lock we need to determine if the lock is currently a reader or writer lock. Then we need to call the proper Linux API function. Unfortunately, there is no provided API for this so we must extracted this information directly from arch specific lock implementation. This is all do able, and what I did, but it does complicate things considerably. The good news is that in addition to the profiling benefits of this change. We may see performance improvements due to slightly reduced overhead when creating rwlocks and manipulating them. The only function I was forced to sacrafice was rw_owner() because this information is simply not stored anywhere in the rwsem. Luckily this appears not to be a commonly used function on Solaris, and it is my understanding it is mainly used for debugging anyway. In addition to the core rwlock changes, extensive updates were made to the rwlock regression tests. Each class of test was extended to provide more API coverage and to be more rigerous in checking for misbehavior. This is a pretty significant change and with that in mind I have been careful to validate it on several platforms before committing. The full SPLAT regression test suite was run numberous times on all of the following platforms. This includes various kernels ranging from 2.6.16 to 2.6.29. - SLES10 (ppc64) - SLES11 (x86_64) - CHAOS4.2 (x86_64) - RHEL5.3 (x86_64) - RHEL6 (x86_64) - FC11 (x86_64) --- config/spl-build.m4 | 16 +- configure | 82 ++ include/sys/rwlock.h | 129 ++-- module/spl/spl-generic.c | 16 + module/spl/spl-rwlock.c | 328 +------- module/splat/splat-internal.h | 10 + module/splat/splat-rwlock.c | 1016 +++++++++++-------------- patches/fc11-spl-export-symbols.patch | 12 + spl_config.h.in | 3 + 9 files changed, 692 insertions(+), 920 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 51f7ea376..c52ea5db4 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -68,6 +68,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_4ARGS_VFS_RENAME SPL_AC_CRED_STRUCT SPL_AC_GROUPS_SEARCH + SPL_AC_PUT_TASK_STRUCT ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1263,7 +1264,7 @@ AC_DEFUN([SPL_AC_CRED_STRUCT], [ ]) dnl # -dnl # Custom SPL patch may export this symbol +dnl # Custom SPL patch may export this symbol. dnl # AC_DEFUN([SPL_AC_GROUPS_SEARCH], [ SPL_CHECK_SYMBOL_EXPORT( @@ -1273,3 +1274,16 @@ AC_DEFUN([SPL_AC_GROUPS_SEARCH], [ [groups_search() is available])], []) ]) + +dnl # +dnl # 2.6.x API change, +dnl # __put_task_struct() was exported in RHEL5 but unavailable elsewhere. +dnl # +AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], [ + SPL_CHECK_SYMBOL_EXPORT( + [__put_task_struct], + [], + [AC_DEFINE(HAVE_PUT_TASK_STRUCT, 1, + [__put_task_struct() is available])], + []) +]) diff --git a/configure b/configure index 3ed6af191..6b9ea364e 100755 --- a/configure +++ b/configure @@ -21916,6 +21916,47 @@ _ACEOF fi + + echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 +echo $ECHO_N "checking whether symbol __put_task_struct is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PUT_TASK_STRUCT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PUT_TASK_STRUCT 1 +_ACEOF + + fi + + ;; user) ;; all) @@ -24884,6 +24925,47 @@ _ACEOF + echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 +echo $ECHO_N "checking whether symbol __put_task_struct is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PUT_TASK_STRUCT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PUT_TASK_STRUCT 1 +_ACEOF + + fi + + + ;; *) echo "$as_me:$LINENO: result: Error!" >&5 diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 2e8624191..c6d66ceaa 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -1,7 +1,7 @@ /* * This file is part of the SPL: Solaris Porting Layer. * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Copyright (c) 2009 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory * Written by: * Brian Behlendorf , @@ -30,68 +30,89 @@ #include #include #include -#include #include -#include - -#ifdef __cplusplus -extern "C" { -#endif typedef enum { - RW_DRIVER = 2, /* driver (DDI) rwlock */ - RW_DEFAULT = 4 /* kernel default rwlock */ + RW_DRIVER = 2, + RW_DEFAULT = 4 } krw_type_t; typedef enum { - RW_WRITER, - RW_READER + RW_NONE = 0, + RW_WRITER = 1, + RW_READER = 2 } krw_t; +typedef struct rw_semaphore krwlock_t; -#define RW_MAGIC 0x3423645a -#define RW_POISON 0xa6 - -typedef struct { - int32_t rw_magic; - int32_t rw_name_size; - char *rw_name; - struct rw_semaphore rw_sem; - struct task_struct *rw_owner; /* holder of the write lock */ -} krwlock_t; - -extern void __rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg); -extern void __rw_destroy(krwlock_t *rwlp); -extern int __rw_tryenter(krwlock_t *rwlp, krw_t rw); -extern void __rw_enter(krwlock_t *rwlp, krw_t rw); -extern void __rw_exit(krwlock_t *rwlp); -extern void __rw_downgrade(krwlock_t *rwlp); -extern int __rw_tryupgrade(krwlock_t *rwlp); -extern kthread_t *__rw_owner(krwlock_t *rwlp); -extern int __rw_read_held(krwlock_t *rwlp); -extern int __rw_write_held(krwlock_t *rwlp); -extern int __rw_lock_held(krwlock_t *rwlp); - -#define rw_init(rwlp, name, type, arg) \ -({ \ - if ((name) == NULL) \ - __rw_init(rwlp, #rwlp, type, arg); \ - else \ - __rw_init(rwlp, name, type, arg); \ -}) -#define rw_destroy(rwlp) __rw_destroy(rwlp) -#define rw_tryenter(rwlp, rw) __rw_tryenter(rwlp, rw) -#define rw_enter(rwlp, rw) __rw_enter(rwlp, rw) -#define rw_exit(rwlp) __rw_exit(rwlp) -#define rw_downgrade(rwlp) __rw_downgrade(rwlp) -#define rw_tryupgrade(rwlp) __rw_tryupgrade(rwlp) -#define rw_owner(rwlp) __rw_owner(rwlp) -#define RW_READ_HELD(rwlp) __rw_read_held(rwlp) -#define RW_WRITE_HELD(rwlp) __rw_write_held(rwlp) -#define RW_LOCK_HELD(rwlp) __rw_lock_held(rwlp) - -#ifdef __cplusplus -} +#define rw_init(rwlp, name, type, arg) init_rwsem(rwlp) +#define rw_destroy(rwlp) ((void)0) +#define rw_downgrade(rwlp) downgrade_write(rwlp) +#define RW_LOCK_HELD(rwlp) rwsem_is_locked(rwlp) +/* + * the rw-semaphore definition + * - if activity/count is 0 then there are no active readers or writers + * - if activity/count is +ve then that is the number of active readers + * - if activity/count is -1 then there is one active writer + */ +#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) +# define RW_COUNT(rwlp) ((rwlp)->activity) +# define RW_READ_HELD(rwlp) ((RW_COUNT(rwlp) > 0) ? RW_COUNT(rwlp) : 0) +# define RW_WRITE_HELD(rwlp) ((RW_COUNT(rwlp) < 0)) +# define rw_exit_locked(rwlp) __up_read_locked(rwlp) +# define rw_tryenter_locked(rwlp) __down_write_trylock_locked(rwlp) +void __up_read_locked(struct rw_semaphore *); +int __down_write_trylock_locked(struct rw_semaphore *); +#else +# define RW_COUNT(rwlp) ((rwlp)->count & RWSEM_ACTIVE_MASK) +# define RW_READ_HELD(rwlp) ((RW_COUNT(rwlp) > 0) ? RW_COUNT(rwlp) : 0) +# define RW_WRITE_HELD(rwlp) ((RW_COUNT(rwlp) < 0)) +# define rw_exit_locked(rwlp) up_read(rwlp) +# define rw_tryenter_locked(rwlp) down_write_trylock(rwlp) #endif +#define rw_tryenter(rwlp, rw) \ +({ \ + int _rc_ = 0; \ + switch (rw) { \ + case RW_READER: _rc_ = down_read_trylock(rwlp); break; \ + case RW_WRITER: _rc_ = down_write_trylock(rwlp); break; \ + default: SBUG(); \ + } \ + _rc_; \ +}) + +#define rw_enter(rwlp, rw) \ +({ \ + switch (rw) { \ + case RW_READER: down_read(rwlp); break; \ + case RW_WRITER: down_write(rwlp); break; \ + default: SBUG(); \ + } \ +}) + +#define rw_exit(rwlp) \ +({ \ + if (RW_READ_HELD(rwlp)) \ + up_read(rwlp); \ + else if (RW_WRITE_HELD(rwlp)) \ + up_write(rwlp); \ + else \ + SBUG(); \ +}) + +#define rw_tryupgrade(rwlp) \ +({ \ + unsigned long flags; \ + int _rc_ = 0; \ + spin_lock_irqsave(&(rwlp)->wait_lock, flags); \ + if (list_empty(&(rwlp)->wait_list) && (RW_READ_HELD(rwlp) == 1)) { \ + rw_exit_locked(rwlp); \ + _rc_ = rw_tryenter_locked(rwlp); \ + ASSERT(_rc_); \ + } \ + spin_unlock_irqrestore(&(rwlp)->wait_lock, flags); \ + _rc_; \ +}) + #endif /* _SPL_RWLOCK_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index b81dabc56..8e0ef9263 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -253,6 +253,22 @@ ddi_copyout(const void *from, void *to, size_t len, int flags) } EXPORT_SYMBOL(ddi_copyout); +#ifndef HAVE_PUT_TASK_STRUCT +/* + * This is only a stub function which should never be used. The SPL should + * never be putting away the last reference on a task structure so this will + * not be called. However, we still need to define it so the module does not + * have undefined symbol at load time. That all said if this impossible + * thing does somehow happen SBUG() immediately so we know about it. + */ +void +__put_task_struct(struct task_struct *t) +{ + SBUG(); +} +EXPORT_SYMBOL(__put_task_struct); +#endif /* HAVE_PUT_TASK_STRUCT */ + struct new_utsname *__utsname(void) { #ifdef HAVE_INIT_UTSNAME diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 07fc2aae4..8ff66bf9f 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -33,6 +33,11 @@ #define DEBUG_SUBSYSTEM S_RWLOCK #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK + +/* + * From lib/rwsem-spinlock.c but modified such that the caller is + * responsible for acquiring and dropping the sem->wait_lock. + */ struct rwsem_waiter { struct list_head list; struct task_struct *task; @@ -40,322 +45,49 @@ struct rwsem_waiter { #define RWSEM_WAITING_FOR_READ 0x00000001 #define RWSEM_WAITING_FOR_WRITE 0x00000002 }; + /* wake a single writer */ static struct rw_semaphore * __rwsem_wake_one_writer_locked(struct rw_semaphore *sem) { - struct rwsem_waiter *waiter; - struct task_struct *tsk; + struct rwsem_waiter *waiter; + struct task_struct *tsk; - sem->activity = -1; + sem->activity = -1; - waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); - list_del(&waiter->list); + waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); + list_del(&waiter->list); - tsk = waiter->task; - smp_mb(); - waiter->task = NULL; - wake_up_process(tsk); - put_task_struct(tsk); - return sem; + tsk = waiter->task; + smp_mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); + return sem; } /* release a read lock on the semaphore */ -static void +void __up_read_locked(struct rw_semaphore *sem) { - if (--sem->activity == 0 && !list_empty(&sem->wait_list)) - (void)__rwsem_wake_one_writer_locked(sem); + if (--sem->activity == 0 && !list_empty(&sem->wait_list)) + (void)__rwsem_wake_one_writer_locked(sem); } +EXPORT_SYMBOL(__up_read_locked); /* trylock for writing -- returns 1 if successful, 0 if contention */ -static int +int __down_write_trylock_locked(struct rw_semaphore *sem) { - int ret = 0; + int ret = 0; - if (sem->activity == 0 && list_empty(&sem->wait_list)) { - /* granted */ - sem->activity = -1; - ret = 1; - } + if (sem->activity == 0 && list_empty(&sem->wait_list)) { + sem->activity = -1; + ret = 1; + } - return ret; + return ret; } +EXPORT_SYMBOL(__down_write_trylock_locked); + #endif - -void -__rw_init(krwlock_t *rwlp, char *name, krw_type_t type, void *arg) -{ - int flags = KM_SLEEP; - - ASSERT(rwlp); - ASSERT(name); - ASSERT(type == RW_DEFAULT); /* XXX no irq handler use */ - ASSERT(arg == NULL); /* XXX no irq handler use */ - - rwlp->rw_magic = RW_MAGIC; - rwlp->rw_owner = NULL; - rwlp->rw_name = NULL; - rwlp->rw_name_size = strlen(name) + 1; - - /* We may be called when there is a non-zero preempt_count or - * interrupts are disabled is which case we must not sleep. - */ - if (current_thread_info()->preempt_count || irqs_disabled()) - flags = KM_NOSLEEP; - - rwlp->rw_name = kmem_alloc(rwlp->rw_name_size, flags); - if (rwlp->rw_name == NULL) - return; - - init_rwsem(&rwlp->rw_sem); - strcpy(rwlp->rw_name, name); -} -EXPORT_SYMBOL(__rw_init); - -void -__rw_destroy(krwlock_t *rwlp) -{ - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - ASSERT(rwlp->rw_owner == NULL); - spin_lock(&rwlp->rw_sem.wait_lock); - ASSERT(list_empty(&rwlp->rw_sem.wait_list)); - spin_unlock(&rwlp->rw_sem.wait_lock); - - kmem_free(rwlp->rw_name, rwlp->rw_name_size); - - memset(rwlp, RW_POISON, sizeof(krwlock_t)); -} -EXPORT_SYMBOL(__rw_destroy); - -/* Return 0 if the lock could not be obtained without blocking. */ -int -__rw_tryenter(krwlock_t *rwlp, krw_t rw) -{ - int rc = 0; - ENTRY; - - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - switch (rw) { - /* these functions return 1 if success, 0 if contention */ - case RW_READER: - /* Here the Solaris code would return 0 - * if there were any write waiters. Specifically - * thinking about the case where readers may have - * the lock and we would also allow this thread - * to grab the read lock with a writer waiting in the - * queue. This doesn't seem like a correctness - * issue, so just call down_read_trylock() - * for the test. We may have to revisit this if - * it becomes an issue */ - rc = down_read_trylock(&rwlp->rw_sem); - break; - case RW_WRITER: - rc = down_write_trylock(&rwlp->rw_sem); - if (rc) { - /* there better not be anyone else - * holding the write lock here */ - ASSERT(rwlp->rw_owner == NULL); - rwlp->rw_owner = current; - } - break; - default: - SBUG(); - } - - RETURN(rc); -} -EXPORT_SYMBOL(__rw_tryenter); - -void -__rw_enter(krwlock_t *rwlp, krw_t rw) -{ - ENTRY; - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - switch (rw) { - case RW_READER: - /* Here the Solaris code would block - * if there were any write waiters. Specifically - * thinking about the case where readers may have - * the lock and we would also allow this thread - * to grab the read lock with a writer waiting in the - * queue. This doesn't seem like a correctness - * issue, so just call down_read() - * for the test. We may have to revisit this if - * it becomes an issue */ - down_read(&rwlp->rw_sem); - break; - case RW_WRITER: - down_write(&rwlp->rw_sem); - - /* there better not be anyone else - * holding the write lock here */ - ASSERT(rwlp->rw_owner == NULL); - rwlp->rw_owner = current; - break; - default: - SBUG(); - } - EXIT; -} -EXPORT_SYMBOL(__rw_enter); - -void -__rw_exit(krwlock_t *rwlp) -{ - ENTRY; - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - /* rw_owner is held by current - * thread iff it is a writer */ - if (rwlp->rw_owner == current) { - rwlp->rw_owner = NULL; - up_write(&rwlp->rw_sem); - } else { - up_read(&rwlp->rw_sem); - } - EXIT; -} -EXPORT_SYMBOL(__rw_exit); - -void -__rw_downgrade(krwlock_t *rwlp) -{ - ENTRY; - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - ASSERT(rwlp->rw_owner == current); - - rwlp->rw_owner = NULL; - downgrade_write(&rwlp->rw_sem); - EXIT; -} -EXPORT_SYMBOL(__rw_downgrade); - -/* Return 0 if unable to perform the upgrade. - * Might be wise to fix the caller - * to acquire the write lock first? - */ -int -__rw_tryupgrade(krwlock_t *rwlp) -{ - int rc = 0; - ENTRY; - - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - spin_lock(&rwlp->rw_sem.wait_lock); - - /* Check if there is anyone waiting for the - * lock. If there is, then we know we should - * not try to upgrade the lock */ - if (!list_empty(&rwlp->rw_sem.wait_list)) { - spin_unlock(&rwlp->rw_sem.wait_lock); - RETURN(0); - } -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - /* Note that activity is protected by - * the wait_lock. Don't try to upgrade - * if there are multiple readers currently - * holding the lock */ - if (rwlp->rw_sem.activity > 1) { -#else - /* Don't try to upgrade - * if there are multiple readers currently - * holding the lock */ - if ((rwlp->rw_sem.count & RWSEM_ACTIVE_MASK) > 1) { -#endif - spin_unlock(&rwlp->rw_sem.wait_lock); - RETURN(0); - } - -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - /* Here it should be safe to drop the - * read lock and reacquire it for writing since - * we know there are no waiters */ - __up_read_locked(&rwlp->rw_sem); - - /* returns 1 if success, 0 if contention */ - rc = __down_write_trylock_locked(&rwlp->rw_sem); -#else - /* Here it should be safe to drop the - * read lock and reacquire it for writing since - * we know there are no waiters */ - up_read(&rwlp->rw_sem); - - /* returns 1 if success, 0 if contention */ - rc = down_write_trylock(&rwlp->rw_sem); -#endif - - /* Check if upgrade failed. Should not ever happen - * if we got to this point */ - ASSERT(rc); - ASSERT(rwlp->rw_owner == NULL); - rwlp->rw_owner = current; - spin_unlock(&rwlp->rw_sem.wait_lock); - - RETURN(1); -} -EXPORT_SYMBOL(__rw_tryupgrade); - -kthread_t * -__rw_owner(krwlock_t *rwlp) -{ - ENTRY; - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - RETURN(rwlp->rw_owner); -} -EXPORT_SYMBOL(__rw_owner); - -int -__rw_read_held(krwlock_t *rwlp) -{ - ENTRY; - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - RETURN(__rw_lock_held(rwlp) && rwlp->rw_owner == NULL); -} -EXPORT_SYMBOL(__rw_read_held); - -int -__rw_write_held(krwlock_t *rwlp) -{ - ENTRY; - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - RETURN(rwlp->rw_owner == current); -} -EXPORT_SYMBOL(__rw_write_held); - -int -__rw_lock_held(krwlock_t *rwlp) -{ - int rc = 0; - ENTRY; - - ASSERT(rwlp); - ASSERT(rwlp->rw_magic == RW_MAGIC); - - spin_lock_irq(&(rwlp->rw_sem.wait_lock)); -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - if (rwlp->rw_sem.activity != 0) { -#else - if (rwlp->rw_sem.count != 0) { -#endif - rc = 1; - } - - spin_unlock_irq(&(rwlp->rw_sem.wait_lock)); - - RETURN(rc); -} -EXPORT_SYMBOL(__rw_lock_held); diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index c1c84d8d1..fea78e043 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -195,6 +196,15 @@ typedef struct splat_info { #define splat_vprint(file, test, format, args...) \ splat_print(file, "%*s: " format, SPLAT_NAME_SIZE, test, args) +#define splat_locked_test(lock, test) \ +({ \ + int _rc_; \ + spin_lock(lock); \ + _rc_ = (test) ? 1 : 0; \ + spin_unlock(lock); \ + _rc_; \ +}) + splat_subsystem_t *splat_condvar_init(void); splat_subsystem_t *splat_kmem_init(void); splat_subsystem_t *splat_mutex_init(void); diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 7f19dfb32..cf3670370 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -4,9 +4,9 @@ * Copyright (c) 2008 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick + * Brian Behlendorf , + * Herb Wartens , + * Jim Garlick * UCRL-CODE-235197 * * This is free software; you can redistribute it and/or modify it @@ -30,210 +30,168 @@ #define SPLAT_RWLOCK_DESC "Kernel RW Lock Tests" #define SPLAT_RWLOCK_TEST1_ID 0x0701 -#define SPLAT_RWLOCK_TEST1_NAME "rwtest1" -#define SPLAT_RWLOCK_TEST1_DESC "Multiple Readers One Writer" +#define SPLAT_RWLOCK_TEST1_NAME "N-rd/1-wr" +#define SPLAT_RWLOCK_TEST1_DESC "Multiple readers one writer" #define SPLAT_RWLOCK_TEST2_ID 0x0702 -#define SPLAT_RWLOCK_TEST2_NAME "rwtest2" -#define SPLAT_RWLOCK_TEST2_DESC "Multiple Writers" +#define SPLAT_RWLOCK_TEST2_NAME "0-rd/N-wr" +#define SPLAT_RWLOCK_TEST2_DESC "Multiple writers" #define SPLAT_RWLOCK_TEST3_ID 0x0703 -#define SPLAT_RWLOCK_TEST3_NAME "rwtest3" -#define SPLAT_RWLOCK_TEST3_DESC "Owner Verification" +#define SPLAT_RWLOCK_TEST3_NAME "held" +#define SPLAT_RWLOCK_TEST3_DESC "RW_{LOCK|READ|WRITE}_HELD" #define SPLAT_RWLOCK_TEST4_ID 0x0704 -#define SPLAT_RWLOCK_TEST4_NAME "rwtest4" -#define SPLAT_RWLOCK_TEST4_DESC "Trylock Test" +#define SPLAT_RWLOCK_TEST4_NAME "tryenter" +#define SPLAT_RWLOCK_TEST4_DESC "Tryenter" #define SPLAT_RWLOCK_TEST5_ID 0x0705 -#define SPLAT_RWLOCK_TEST5_NAME "rwtest5" -#define SPLAT_RWLOCK_TEST5_DESC "Write Downgrade Test" +#define SPLAT_RWLOCK_TEST5_NAME "rw_downgrade" +#define SPLAT_RWLOCK_TEST5_DESC "Write downgrade" #define SPLAT_RWLOCK_TEST6_ID 0x0706 -#define SPLAT_RWLOCK_TEST6_NAME "rwtest6" -#define SPLAT_RWLOCK_TEST6_DESC "Read Upgrade Test" +#define SPLAT_RWLOCK_TEST6_NAME "rw_tryupgrade" +#define SPLAT_RWLOCK_TEST6_DESC "Read upgrade" #define SPLAT_RWLOCK_TEST_MAGIC 0x115599DDUL #define SPLAT_RWLOCK_TEST_NAME "rwlock_test" +#define SPLAT_RWLOCK_TEST_TASKQ "rwlock_taskq" #define SPLAT_RWLOCK_TEST_COUNT 8 #define SPLAT_RWLOCK_RELEASE_INIT 0 -#define SPLAT_RWLOCK_RELEASE_WRITERS 1 -#define SPLAT_RWLOCK_RELEASE_READERS 2 +#define SPLAT_RWLOCK_RELEASE_WR 1 +#define SPLAT_RWLOCK_RELEASE_RD 2 typedef struct rw_priv { - unsigned long rw_magic; - struct file *rw_file; - krwlock_t rwl; - spinlock_t rw_priv_lock; + unsigned long rw_magic; + struct file *rw_file; + krwlock_t rw_rwlock; + spinlock_t rw_lock; wait_queue_head_t rw_waitq; - atomic_t rw_completed; - atomic_t rw_acquired; - atomic_t rw_waiters; - atomic_t rw_release; + int rw_completed; + int rw_holders; + int rw_waiters; + int rw_release; + int rw_rc; + krw_type_t rw_type; } rw_priv_t; typedef struct rw_thr { - int rwt_id; const char *rwt_name; rw_priv_t *rwt_rwp; - int rwt_rc; + int rwt_id; } rw_thr_t; -static inline void -splat_rwlock_sleep(signed long delay) +void splat_init_rw_priv(rw_priv_t *rwp, struct file *file) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(delay); + rwp->rw_magic = SPLAT_RWLOCK_TEST_MAGIC; + rwp->rw_file = file; + rw_init(&rwp->rw_rwlock, SPLAT_RWLOCK_TEST_NAME, RW_DEFAULT, NULL); + spin_lock_init(&rwp->rw_lock); + init_waitqueue_head(&rwp->rw_waitq); + rwp->rw_completed = 0; + rwp->rw_holders = 0; + rwp->rw_waiters = 0; + rwp->rw_release = SPLAT_RWLOCK_RELEASE_INIT; + rwp->rw_rc = 0; + rwp->rw_type = 0; } -#define splat_rwlock_lock_and_test(lock,test) \ -({ \ - int ret = 0; \ - \ - spin_lock(lock); \ - ret = (test) ? 1 : 0; \ - spin_unlock(lock); \ - ret; \ -}) - -void splat_init_rw_priv(rw_priv_t *rwv, struct file *file) -{ - rwv->rw_magic = SPLAT_RWLOCK_TEST_MAGIC; - rwv->rw_file = file; - spin_lock_init(&rwv->rw_priv_lock); - init_waitqueue_head(&rwv->rw_waitq); - atomic_set(&rwv->rw_completed, 0); - atomic_set(&rwv->rw_acquired, 0); - atomic_set(&rwv->rw_waiters, 0); - atomic_set(&rwv->rw_release, SPLAT_RWLOCK_RELEASE_INIT); - - /* Initialize the read/write lock */ - rw_init(&rwv->rwl, SPLAT_RWLOCK_TEST_NAME, RW_DEFAULT, NULL); -} - -int -splat_rwlock_test1_writer_thread(void *arg) +static int +splat_rwlock_wr_thr(void *arg) { rw_thr_t *rwt = (rw_thr_t *)arg; - rw_priv_t *rwv = rwt->rwt_rwp; - uint8_t rnd = 0; + rw_priv_t *rwp = rwt->rwt_rwp; + uint8_t rnd; char name[16]; - ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", - SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); + ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); + snprintf(name, sizeof(name), "rwlock_wr_thr%d", rwt->rwt_id); daemonize(name); get_random_bytes((void *)&rnd, 1); - splat_rwlock_sleep(rnd * HZ / 1000); + msleep((unsigned int)rnd); - spin_lock(&rwv->rw_priv_lock); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s writer thread trying to acquire rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - atomic_inc(&rwv->rw_waiters); - spin_unlock(&rwv->rw_priv_lock); + splat_vprint(rwp->rw_file, rwt->rwt_name, + "%s trying to acquire rwlock (%d holding/%d waiting)\n", + name, rwp->rw_holders, rwp->rw_waiters); + spin_lock(&rwp->rw_lock); + rwp->rw_waiters++; + spin_unlock(&rwp->rw_lock); + rw_enter(&rwp->rw_rwlock, RW_WRITER); - /* Take the semaphore for writing - * release it when we are told to */ - rw_enter(&rwv->rwl, RW_WRITER); + spin_lock(&rwp->rw_lock); + rwp->rw_waiters--; + rwp->rw_holders++; + spin_unlock(&rwp->rw_lock); + splat_vprint(rwp->rw_file, rwt->rwt_name, + "%s acquired rwlock (%d holding/%d waiting)\n", + name, rwp->rw_holders, rwp->rw_waiters); - spin_lock(&rwv->rw_priv_lock); - atomic_dec(&rwv->rw_waiters); - atomic_inc(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s writer thread acquired rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); + /* Wait for control thread to signal we can release the write lock */ + wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, + rwp->rw_release == SPLAT_RWLOCK_RELEASE_WR)); - /* Wait here until the control thread - * says we can release the write lock */ - wait_event_interruptible(rwv->rw_waitq, - splat_rwlock_lock_and_test(&rwv->rw_priv_lock, - atomic_read(&rwv->rw_release) == - SPLAT_RWLOCK_RELEASE_WRITERS)); - spin_lock(&rwv->rw_priv_lock); - atomic_inc(&rwv->rw_completed); - atomic_dec(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s writer thread dropped rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); + spin_lock(&rwp->rw_lock); + rwp->rw_completed++; + rwp->rw_holders--; + spin_unlock(&rwp->rw_lock); + splat_vprint(rwp->rw_file, rwt->rwt_name, + "%s dropped rwlock (%d holding/%d waiting)\n", + name, rwp->rw_holders, rwp->rw_waiters); + + rw_exit(&rwp->rw_rwlock); - /* Release the semaphore */ - rw_exit(&rwv->rwl); return 0; } -int -splat_rwlock_test1_reader_thread(void *arg) +static int +splat_rwlock_rd_thr(void *arg) { rw_thr_t *rwt = (rw_thr_t *)arg; - rw_priv_t *rwv = rwt->rwt_rwp; - uint8_t rnd = 0; + rw_priv_t *rwp = rwt->rwt_rwp; + uint8_t rnd; char name[16]; - ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", - SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); + ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); + snprintf(name, sizeof(name), "rwlock_rd_thr%d", rwt->rwt_id); daemonize(name); get_random_bytes((void *)&rnd, 1); - splat_rwlock_sleep(rnd * HZ / 1000); + msleep((unsigned int)rnd); - /* Don't try and and take the semaphore until - * someone else has already acquired it */ - wait_event_interruptible(rwv->rw_waitq, - splat_rwlock_lock_and_test(&rwv->rw_priv_lock, - atomic_read(&rwv->rw_acquired) > 0)); + /* Don't try and take the semaphore until after someone has it */ + wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, + rwp->rw_holders > 0)); - spin_lock(&rwv->rw_priv_lock); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s reader thread trying to acquire rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - atomic_inc(&rwv->rw_waiters); - spin_unlock(&rwv->rw_priv_lock); + splat_vprint(rwp->rw_file, rwt->rwt_name, + "%s trying to acquire rwlock (%d holding/%d waiting)\n", + name, rwp->rw_holders, rwp->rw_waiters); + spin_lock(&rwp->rw_lock); + rwp->rw_waiters++; + spin_unlock(&rwp->rw_lock); + rw_enter(&rwp->rw_rwlock, RW_READER); - /* Take the semaphore for reading - * release it when we are told to */ - rw_enter(&rwv->rwl, RW_READER); + spin_lock(&rwp->rw_lock); + rwp->rw_waiters--; + rwp->rw_holders++; + spin_unlock(&rwp->rw_lock); + splat_vprint(rwp->rw_file, rwt->rwt_name, + "%s acquired rwlock (%d holding/%d waiting)\n", + name, rwp->rw_holders, rwp->rw_waiters); - spin_lock(&rwv->rw_priv_lock); - atomic_dec(&rwv->rw_waiters); - atomic_inc(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s reader thread acquired rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); + /* Wait for control thread to signal we can release the read lock */ + wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, + rwp->rw_release == SPLAT_RWLOCK_RELEASE_RD)); - /* Wait here until the control thread - * says we can release the read lock */ - wait_event_interruptible(rwv->rw_waitq, - splat_rwlock_lock_and_test(&rwv->rw_priv_lock, - atomic_read(&rwv->rw_release) == - SPLAT_RWLOCK_RELEASE_READERS)); + spin_lock(&rwp->rw_lock); + rwp->rw_completed++; + rwp->rw_holders--; + spin_unlock(&rwp->rw_lock); + splat_vprint(rwp->rw_file, rwt->rwt_name, + "%s dropped rwlock (%d holding/%d waiting)\n", + name, rwp->rw_holders, rwp->rw_waiters); - spin_lock(&rwv->rw_priv_lock); - atomic_inc(&rwv->rw_completed); - atomic_dec(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s reader thread dropped rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); + rw_exit(&rwp->rw_rwlock); - /* Release the semaphore */ - rw_exit(&rwv->rwl); return 0; } @@ -243,543 +201,467 @@ splat_rwlock_test1(struct file *file, void *arg) int i, count = 0, rc = 0; long pids[SPLAT_RWLOCK_TEST_COUNT]; rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; - rw_priv_t rwv; + rw_priv_t *rwp; - /* Initialize private data including the rwlock */ - splat_init_rw_priv(&rwv, file); + rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); + if (rwp == NULL) + return -ENOMEM; + + splat_init_rw_priv(rwp, file); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ + + + for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { - rwt[i].rwt_rwp = &rwv; + rwt[i].rwt_rwp = rwp; rwt[i].rwt_id = i; rwt[i].rwt_name = SPLAT_RWLOCK_TEST1_NAME; - rwt[i].rwt_rc = 0; - /* The first thread will be a writer */ - if (i == 0) { - pids[i] = kernel_thread(splat_rwlock_test1_writer_thread, - &rwt[i], 0); - } else { - pids[i] = kernel_thread(splat_rwlock_test1_reader_thread, - &rwt[i], 0); - } + /* The first thread will be the writer */ + if (i == 0) + pids[i] = kernel_thread(splat_rwlock_wr_thr, &rwt[i], 0); + else + pids[i] = kernel_thread(splat_rwlock_rd_thr, &rwt[i], 0); - if (pids[i] >= 0) { + if (pids[i] >= 0) count++; - } } - /* Once the writer has the lock, release the readers */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, atomic_read(&rwv.rw_acquired) <= 0)) { - splat_rwlock_sleep(1 * HZ); + /* Wait for the writer */ + while (splat_locked_test(&rwp->rw_lock, rwp->rw_holders == 0)) { + wake_up_interruptible(&rwp->rw_waitq); + msleep(100); } - wake_up_interruptible(&rwv.rw_waitq); - /* Ensure that there is only 1 writer and all readers are waiting */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_acquired) != 1 || - atomic_read(&rwv.rw_waiters) != - SPLAT_RWLOCK_TEST_COUNT - 1)) { - - splat_rwlock_sleep(1 * HZ); + /* Wait for 'count-1' readers */ + while (splat_locked_test(&rwp->rw_lock, rwp->rw_waiters < count - 1)) { + wake_up_interruptible(&rwp->rw_waitq); + msleep(100); } - /* Relase the writer */ - spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_WRITERS); - spin_unlock(&rwv.rw_priv_lock); - wake_up_interruptible(&rwv.rw_waitq); - /* Now ensure that there are multiple reader threads holding the lock */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_acquired) <= 1)) { - splat_rwlock_sleep(1 * HZ); + /* Verify there is only one lock holder */ + if (splat_locked_test(&rwp->rw_lock, rwp->rw_holders) != 1) { + splat_vprint(file, SPLAT_RWLOCK_TEST1_NAME, "Only 1 holder " + "expected for rwlock (%d holding/%d waiting)\n", + rwp->rw_holders, rwp->rw_waiters); + rc = -EINVAL; } - /* Release the readers */ - spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_READERS); - spin_unlock(&rwv.rw_priv_lock); - wake_up_interruptible(&rwv.rw_waitq); + + /* Verify 'count-1' readers */ + if (splat_locked_test(&rwp->rw_lock, rwp->rw_waiters != count - 1)) { + splat_vprint(file, SPLAT_RWLOCK_TEST1_NAME, "Only %d waiters " + "expected for rwlock (%d holding/%d waiting)\n", + count - 1, rwp->rw_holders, rwp->rw_waiters); + rc = -EINVAL; + } + + /* Signal the writer to release, allows readers to acquire */ + spin_lock(&rwp->rw_lock); + rwp->rw_release = SPLAT_RWLOCK_RELEASE_WR; + wake_up_interruptible(&rwp->rw_waitq); + spin_unlock(&rwp->rw_lock); + + /* Wait for 'count-1' readers to hold the lock */ + while (splat_locked_test(&rwp->rw_lock, rwp->rw_holders < count - 1)) { + wake_up_interruptible(&rwp->rw_waitq); + msleep(100); + } + + /* Verify there are 'count-1' readers */ + if (splat_locked_test(&rwp->rw_lock, rwp->rw_holders != count - 1)) { + splat_vprint(file, SPLAT_RWLOCK_TEST1_NAME, "Only %d holders " + "expected for rwlock (%d holding/%d waiting)\n", + count - 1, rwp->rw_holders, rwp->rw_waiters); + rc = -EINVAL; + } + + /* Release 'count-1' readers */ + spin_lock(&rwp->rw_lock); + rwp->rw_release = SPLAT_RWLOCK_RELEASE_RD; + wake_up_interruptible(&rwp->rw_waitq); + spin_unlock(&rwp->rw_lock); /* Wait for the test to complete */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_acquired) != 0 || - atomic_read(&rwv.rw_waiters) != 0)) { - splat_rwlock_sleep(1 * HZ); + while (splat_locked_test(&rwp->rw_lock, + rwp->rw_holders>0 || rwp->rw_waiters>0)) + msleep(100); - } + rw_destroy(&(rwp->rw_rwlock)); + kfree(rwp); - rw_destroy(&rwv.rwl); return rc; } -int -splat_rwlock_test2_writer_thread(void *arg) +static void +splat_rwlock_test2_func(void *arg) { - rw_thr_t *rwt = (rw_thr_t *)arg; - rw_priv_t *rwv = rwt->rwt_rwp; - uint8_t rnd = 0; - char name[16]; + rw_priv_t *rwp = (rw_priv_t *)arg; + int rc; + ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", - SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); - daemonize(name); - get_random_bytes((void *)&rnd, 1); - splat_rwlock_sleep(rnd * HZ / 1000); - - /* Here just increment the waiters count even if we are not - * exactly about to call rw_enter(). Not really a big deal - * since more than likely will be true when we simulate work - * later on */ - spin_lock(&rwv->rw_priv_lock); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s writer thread trying to acquire rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - atomic_inc(&rwv->rw_waiters); - spin_unlock(&rwv->rw_priv_lock); - - /* Wait here until the control thread - * says we can acquire the write lock */ - wait_event_interruptible(rwv->rw_waitq, - splat_rwlock_lock_and_test(&rwv->rw_priv_lock, - atomic_read(&rwv->rw_release) == - SPLAT_RWLOCK_RELEASE_WRITERS)); - - /* Take the semaphore for writing */ - rw_enter(&rwv->rwl, RW_WRITER); - - spin_lock(&rwv->rw_priv_lock); - atomic_dec(&rwv->rw_waiters); - atomic_inc(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s writer thread acquired rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); - - /* Give up the processor for a bit to simulate - * doing some work while taking the write lock */ - splat_rwlock_sleep(rnd * HZ / 1000); - - /* Ensure that we are the only one writing */ - if (atomic_read(&rwv->rw_acquired) > 1) { - rwt->rwt_rc = 1; - } else { - rwt->rwt_rc = 0; - } - - spin_lock(&rwv->rw_priv_lock); - atomic_inc(&rwv->rw_completed); - atomic_dec(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s writer thread dropped rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); - - rw_exit(&rwv->rwl); - - return 0; + /* Read the value before sleeping and write it after we wake up to + * maximize the chance of a race if rwlocks are not working properly */ + rw_enter(&rwp->rw_rwlock, RW_WRITER); + rc = rwp->rw_rc; + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ / 100); /* 1/100 of a second */ + VERIFY(rwp->rw_rc == rc); + rwp->rw_rc = rc + 1; + rw_exit(&rwp->rw_rwlock); } static int splat_rwlock_test2(struct file *file, void *arg) { - int i, count = 0, rc = 0; - long pids[SPLAT_RWLOCK_TEST_COUNT]; - rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; - rw_priv_t rwv; + rw_priv_t *rwp; + taskq_t *tq; + int i, rc = 0, tq_count = 256; - /* Initialize private data including the rwlock */ - splat_init_rw_priv(&rwv, file); + rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); + if (rwp == NULL) + return -ENOMEM; - /* Create some threads, the exact number isn't important just as - * long as we know how many we managed to create and should expect. */ - for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { - rwt[i].rwt_rwp = &rwv; - rwt[i].rwt_id = i; - rwt[i].rwt_name = SPLAT_RWLOCK_TEST2_NAME; - rwt[i].rwt_rc = 0; + splat_init_rw_priv(rwp, file); - /* The first thread will be a writer */ - pids[i] = kernel_thread(splat_rwlock_test2_writer_thread, - &rwt[i], 0); + /* Create several threads allowing tasks to race with each other */ + tq = taskq_create(SPLAT_RWLOCK_TEST_TASKQ, num_online_cpus(), + maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); + if (tq == NULL) { + rc = -ENOMEM; + goto out; + } - if (pids[i] >= 0) { - count++; + /* + * Schedule N work items to the work queue each of which enters the + * writer rwlock, sleeps briefly, then exits the writer rwlock. On a + * multiprocessor box these work items will be handled by all available + * CPUs. The task function checks to ensure the tracked shared variable + * is always only incremented by one. Additionally, the rwlock itself + * is instrumented such that if any two processors are in the + * critical region at the same time the system will panic. If the + * rwlock is implemented right this will never happy, that's a pass. + */ + for (i = 0; i < tq_count; i++) { + if (!taskq_dispatch(tq,splat_rwlock_test2_func,rwp,TQ_SLEEP)) { + splat_vprint(file, SPLAT_RWLOCK_TEST2_NAME, + "Failed to queue task %d\n", i); + rc = -EINVAL; } } - /* Wait for writers to get queued up */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_waiters) < SPLAT_RWLOCK_TEST_COUNT)) { - splat_rwlock_sleep(1 * HZ); - } - /* Relase the writers */ - spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_WRITERS); - spin_unlock(&rwv.rw_priv_lock); - wake_up_interruptible(&rwv.rw_waitq); + taskq_wait(tq); - /* Wait for the test to complete */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_acquired) != 0 || - atomic_read(&rwv.rw_waiters) != 0)) { - splat_rwlock_sleep(HZ); + if (rwp->rw_rc == tq_count) { + splat_vprint(file, SPLAT_RWLOCK_TEST2_NAME, "%d racing threads " + "correctly entered/exited the rwlock %d times\n", + num_online_cpus(), rwp->rw_rc); + } else { + splat_vprint(file, SPLAT_RWLOCK_TEST2_NAME, "%d racing threads " + "only processed %d/%d w rwlock work items\n", + num_online_cpus(), rwp->rw_rc, tq_count); + rc = -EINVAL; } - /* If any of the write threads ever acquired the lock - * while another thread had it, make sure we return - * an error */ - for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { - if (rwt[i].rwt_rc) { - rc++; - } - } - - rw_destroy(&rwv.rwl); + taskq_destroy(tq); + rw_destroy(&(rwp->rw_rwlock)); +out: + kfree(rwp); return rc; } +#define splat_rwlock_test3_helper(rwp,rex1,rex2,wex1,wex2,held_func,rc) \ +do { \ + int result, _rc1_, _rc2_, _rc3_, _rc4_; \ + \ + rc = 0; \ + rw_enter(&(rwp)->rw_rwlock, RW_READER); \ + _rc1_ = ((result = held_func(&(rwp)->rw_rwlock)) != rex1); \ + splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ + " returned %d (expected %d) when RW_READER\n", \ + _rc1_ ? "Fail " : "", result, rex1); \ + rw_exit(&(rwp)->rw_rwlock); \ + _rc2_ = ((result = held_func(&(rwp)->rw_rwlock)) != rex2); \ + splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ + " returned %d (expected %d) when !RW_READER\n", \ + _rc2_ ? "Fail " : "", result, rex2); \ + \ + rw_enter(&(rwp)->rw_rwlock, RW_WRITER); \ + _rc3_ = ((result = held_func(&(rwp)->rw_rwlock)) != wex1); \ + splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ + " returned %d (expected %d) when RW_WRITER\n", \ + _rc3_ ? "Fail " : "", result, wex1); \ + rw_exit(&(rwp)->rw_rwlock); \ + _rc4_ = ((result = held_func(&(rwp)->rw_rwlock)) != wex2); \ + splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ + " returned %d (expected %d) when !RW_WRITER\n", \ + _rc4_ ? "Fail " : "", result, wex2); \ + \ + rc = ((_rc1_ || _rc2_ || _rc3_ || _rc4_) ? -EINVAL : 0); \ +} while(0); + static int splat_rwlock_test3(struct file *file, void *arg) { - kthread_t *owner; - rw_priv_t rwv; - int rc = 0; + rw_priv_t *rwp; + int rc1, rc2, rc3; - /* Initialize private data - * including the rwlock */ - splat_init_rw_priv(&rwv, file); + rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); + if (rwp == NULL) + return -ENOMEM; - /* Take the rwlock for writing */ - rw_enter(&rwv.rwl, RW_WRITER); - owner = rw_owner(&rwv.rwl); - if (current != owner) { - splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "rwlock should " - "be owned by pid %d but is owned by pid %d\n", - current->pid, owner ? owner->pid : -1); - rc = -EINVAL; - goto out; - } + splat_init_rw_priv(rwp, file); - /* Release the rwlock */ - rw_exit(&rwv.rwl); - owner = rw_owner(&rwv.rwl); - if (owner) { - splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "rwlock should not " - "be owned but is owned by pid %d\n", owner->pid); - rc = -EINVAL; - goto out; - } + splat_rwlock_test3_helper(rwp, 1, 0, 1, 0, RW_LOCK_HELD, rc1); + splat_rwlock_test3_helper(rwp, 1, 0, 0, 0, RW_READ_HELD, rc2); + splat_rwlock_test3_helper(rwp, 0, 0, 1, 0, RW_WRITE_HELD, rc3); - /* Take the rwlock for reading. - * Should not have an owner */ - rw_enter(&rwv.rwl, RW_READER); - owner = rw_owner(&rwv.rwl); - if (owner) { - splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "rwlock should not " - "be owned but is owned by pid %d\n", owner->pid); - /* Release the rwlock */ - rw_exit(&rwv.rwl); - rc = -EINVAL; - goto out; - } + rw_destroy(&rwp->rw_rwlock); + kfree(rwp); - /* Release the rwlock */ - rw_exit(&rwv.rwl); - -out: - rw_destroy(&rwv.rwl); - return rc; + return ((rc1 || rc2 || rc3) ? -EINVAL : 0); } -int -splat_rwlock_test4_reader_thread(void *arg) +static void +splat_rwlock_test4_func(void *arg) { - rw_thr_t *rwt = (rw_thr_t *)arg; - rw_priv_t *rwv = rwt->rwt_rwp; - uint8_t rnd = 0; - char name[16]; + rw_priv_t *rwp = (rw_priv_t *)arg; + ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - ASSERT(rwv->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", - SPLAT_RWLOCK_TEST_NAME, rwt->rwt_id); - daemonize(name); - get_random_bytes((void *)&rnd, 1); - splat_rwlock_sleep(rnd * HZ / 1000); - - /* Don't try and and take the semaphore until - * someone else has already acquired it */ - wait_event_interruptible(rwv->rw_waitq, - splat_rwlock_lock_and_test(&rwv->rw_priv_lock, - atomic_read(&rwv->rw_acquired) > 0)); - - spin_lock(&rwv->rw_priv_lock); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s reader thread trying to acquire rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); - - /* Take the semaphore for reading - * release it when we are told to */ - rwt->rwt_rc = rw_tryenter(&rwv->rwl, RW_READER); - - /* Here we acquired the lock this is a - * failure since the writer should be - * holding the lock */ - if (rwt->rwt_rc == 1) { - spin_lock(&rwv->rw_priv_lock); - atomic_inc(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s reader thread acquired rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); - - spin_lock(&rwv->rw_priv_lock); - atomic_dec(&rwv->rw_acquired); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s reader thread dropped rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); - - /* Release the semaphore */ - rw_exit(&rwv->rwl); + if (rw_tryenter(&rwp->rw_rwlock, rwp->rw_type)) { + rwp->rw_rc = 0; + rw_exit(&rwp->rw_rwlock); + } else { + rwp->rw_rc = -EBUSY; } - /* Here we know we didn't block and didn't - * acquire the rwlock for reading */ - else { - spin_lock(&rwv->rw_priv_lock); - atomic_inc(&rwv->rw_completed); - splat_vprint(rwv->rw_file, rwt->rwt_name, - "%s reader thread could not acquire rwlock with " - "%d holding lock and %d waiting\n", - name, atomic_read(&rwv->rw_acquired), - atomic_read(&rwv->rw_waiters)); - spin_unlock(&rwv->rw_priv_lock); +} + +static char * +splat_rwlock_test4_name(krw_t type) +{ + switch (type) { + case RW_NONE: return "RW_NONE"; + case RW_WRITER: return "RW_WRITER"; + case RW_READER: return "RW_READER"; } - return 0; + return NULL; +} + +static int +splat_rwlock_test4_type(taskq_t *tq, rw_priv_t *rwp, int expected_rc, + krw_t holder_type, krw_t try_type) +{ + int id, rc = 0; + + /* Schedule a task function which will try and acquire the rwlock + * using type try_type while the rwlock is being held as holder_type. + * The result must match expected_rc for the test to pass */ + rwp->rw_rc = -EINVAL; + rwp->rw_type = try_type; + + if (holder_type == RW_WRITER || holder_type == RW_READER) + rw_enter(&rwp->rw_rwlock, holder_type); + + id = taskq_dispatch(tq, splat_rwlock_test4_func, rwp, TQ_SLEEP); + if (id == 0) { + splat_vprint(rwp->rw_file, SPLAT_RWLOCK_TEST4_NAME, "%s", + "taskq_dispatch() failed\n"); + rc = -EINVAL; + goto out; + } + + taskq_wait_id(tq, id); + + if (rwp->rw_rc != expected_rc) + rc = -EINVAL; + + splat_vprint(rwp->rw_file, SPLAT_RWLOCK_TEST4_NAME, + "%srw_tryenter(%s) returned %d (expected %d) when %s\n", + rc ? "Fail " : "", splat_rwlock_test4_name(try_type), + rwp->rw_rc, expected_rc, + splat_rwlock_test4_name(holder_type)); +out: + if (holder_type == RW_WRITER || holder_type == RW_READER) + rw_exit(&rwp->rw_rwlock); + + return rc; } static int splat_rwlock_test4(struct file *file, void *arg) { - int i, count = 0, rc = 0; - long pids[SPLAT_RWLOCK_TEST_COUNT]; - rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; - rw_priv_t rwv; + rw_priv_t *rwp; + taskq_t *tq; + int rc = 0, rc1, rc2, rc3, rc4, rc5, rc6; - /* Initialize private data - * including the rwlock */ - splat_init_rw_priv(&rwv, file); + rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); + if (rwp == NULL) + return -ENOMEM; - /* Create some threads, the exact number isn't important just as - * long as we know how many we managed to create and should expect. */ - for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { - rwt[i].rwt_rwp = &rwv; - rwt[i].rwt_id = i; - rwt[i].rwt_name = SPLAT_RWLOCK_TEST4_NAME; - rwt[i].rwt_rc = 0; - - /* The first thread will be a writer */ - if (i == 0) { - /* We can reuse the test1 writer thread here */ - pids[i] = kernel_thread(splat_rwlock_test1_writer_thread, - &rwt[i], 0); - } else { - pids[i] = kernel_thread(splat_rwlock_test4_reader_thread, - &rwt[i], 0); - } - - if (pids[i] >= 0) { - count++; - } + tq = taskq_create(SPLAT_RWLOCK_TEST_TASKQ, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE); + if (tq == NULL) { + rc = -ENOMEM; + goto out; } - /* Once the writer has the lock, release the readers */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_acquired) <= 0)) { - splat_rwlock_sleep(1 * HZ); - } - wake_up_interruptible(&rwv.rw_waitq); + splat_init_rw_priv(rwp, file); - /* Make sure that the reader threads complete */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_completed) != SPLAT_RWLOCK_TEST_COUNT - 1)) { - splat_rwlock_sleep(1 * HZ); - } - /* Release the writer */ - spin_lock(&rwv.rw_priv_lock); - atomic_set(&rwv.rw_release, SPLAT_RWLOCK_RELEASE_WRITERS); - spin_unlock(&rwv.rw_priv_lock); - wake_up_interruptible(&rwv.rw_waitq); + /* Validate all combinations of rw_tryenter() contention */ + rc1 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_WRITER, RW_WRITER); + rc2 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_WRITER, RW_READER); + rc3 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_READER, RW_WRITER); + rc4 = splat_rwlock_test4_type(tq, rwp, 0, RW_READER, RW_READER); + rc5 = splat_rwlock_test4_type(tq, rwp, 0, RW_NONE, RW_WRITER); + rc6 = splat_rwlock_test4_type(tq, rwp, 0, RW_NONE, RW_READER); - /* Wait for the test to complete */ - while (splat_rwlock_lock_and_test(&rwv.rw_priv_lock, - atomic_read(&rwv.rw_acquired) != 0 || - atomic_read(&rwv.rw_waiters) != 0)) { - splat_rwlock_sleep(1 * HZ); - } + if (rc1 || rc2 || rc3 || rc4 || rc5 || rc6) + rc = -EINVAL; - /* If any of the reader threads ever acquired the lock - * while another thread had it, make sure we return - * an error since the rw_tryenter() should have failed */ - for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { - if (rwt[i].rwt_rc) { - rc++; - } - } + taskq_destroy(tq); +out: + rw_destroy(&(rwp->rw_rwlock)); + kfree(rwp); - rw_destroy(&rwv.rwl); return rc; } static int splat_rwlock_test5(struct file *file, void *arg) { - kthread_t *owner; - rw_priv_t rwv; - int rc = 0; + rw_priv_t *rwp; + int rc = -EINVAL; - /* Initialize private data - * including the rwlock */ - splat_init_rw_priv(&rwv, file); + rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); + if (rwp == NULL) + return -ENOMEM; - /* Take the rwlock for writing */ - rw_enter(&rwv.rwl, RW_WRITER); - owner = rw_owner(&rwv.rwl); - if (current != owner) { - splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, "rwlock should " - "be owned by pid %d but is owned by pid %d\n", - current->pid, owner ? owner->pid : -1); - rc = -EINVAL; + splat_init_rw_priv(rwp, file); + + rw_enter(&rwp->rw_rwlock, RW_WRITER); + if (!RW_WRITE_HELD(&rwp->rw_rwlock)) { + splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, + "rwlock should be write lock: %d\n", + RW_WRITE_HELD(&rwp->rw_rwlock)); goto out; } - /* Make sure that the downgrade - * worked properly */ - rw_downgrade(&rwv.rwl); - - owner = rw_owner(&rwv.rwl); - if (owner) { - splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, "rwlock should not " - "be owned but is owned by pid %d\n", owner->pid); - /* Release the rwlock */ - rw_exit(&rwv.rwl); - rc = -EINVAL; + rw_downgrade(&rwp->rw_rwlock); + if (!RW_READ_HELD(&rwp->rw_rwlock)) { + splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, + "rwlock should be read lock: %d\n", + RW_READ_HELD(&rwp->rw_rwlock)); goto out; } - /* Release the rwlock */ - rw_exit(&rwv.rwl); - + rc = 0; + splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, "%s", + "rwlock properly downgraded\n"); out: - rw_destroy(&rwv.rwl); + rw_exit(&rwp->rw_rwlock); + rw_destroy(&rwp->rw_rwlock); + kfree(rwp); + return rc; } static int splat_rwlock_test6(struct file *file, void *arg) { - kthread_t *owner; - rw_priv_t rwv; - int rc = 0; + rw_priv_t *rwp; + int rc = -EINVAL; - /* Initialize private data - * including the rwlock */ - splat_init_rw_priv(&rwv, file); + rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); + if (rwp == NULL) + return -ENOMEM; - /* Take the rwlock for reading */ - rw_enter(&rwv.rwl, RW_READER); - owner = rw_owner(&rwv.rwl); - if (owner) { - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "rwlock should not " - "be owned but is owned by pid %d\n", owner->pid); - rc = -EINVAL; + splat_init_rw_priv(rwp, file); + + rw_enter(&rwp->rw_rwlock, RW_READER); + if (!RW_READ_HELD(&rwp->rw_rwlock)) { + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, + "rwlock should be read lock: %d\n", + RW_READ_HELD(&rwp->rw_rwlock)); goto out; } - /* Make sure that the upgrade - * worked properly */ - rc = !rw_tryupgrade(&rwv.rwl); + /* With one reader upgrade should never fail */ + rc = rw_tryupgrade(&rwp->rw_rwlock); + if (!rc) { + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, + "rwlock contended preventing upgrade: %d\n", + RW_COUNT(&rwp->rw_rwlock)); + goto out; + } - owner = rw_owner(&rwv.rwl); - if (rc || current != owner) { + if (RW_READ_HELD(&rwp->rw_rwlock) || !RW_WRITE_HELD(&rwp->rw_rwlock)) { splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "rwlock should " - "be owned by pid %d but is owned by pid %d " - "trylock rc %d\n", - current->pid, owner ? owner->pid : -1, rc); - rc = -EINVAL; + "have 0 (not %d) reader and 1 (not %d) writer\n", + RW_READ_HELD(&rwp->rw_rwlock), + RW_WRITE_HELD(&rwp->rw_rwlock)); goto out; } - /* Release the rwlock */ - rw_exit(&rwv.rwl); - + rc = 0; + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", + "rwlock properly upgraded\n"); out: - rw_destroy(&rwv.rwl); + rw_exit(&rwp->rw_rwlock); + rw_destroy(&rwp->rw_rwlock); + kfree(rwp); + return rc; } splat_subsystem_t * splat_rwlock_init(void) { - splat_subsystem_t *sub; + splat_subsystem_t *sub; - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_RWLOCK_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_RWLOCK_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_RWLOCK; + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_RWLOCK_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_RWLOCK_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_RWLOCK; - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, - SPLAT_RWLOCK_TEST1_ID, splat_rwlock_test1); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, - SPLAT_RWLOCK_TEST2_ID, splat_rwlock_test2); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, - SPLAT_RWLOCK_TEST3_ID, splat_rwlock_test3); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, - SPLAT_RWLOCK_TEST4_ID, splat_rwlock_test4); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, - SPLAT_RWLOCK_TEST5_ID, splat_rwlock_test5); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, - SPLAT_RWLOCK_TEST6_ID, splat_rwlock_test6); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, + SPLAT_RWLOCK_TEST1_ID, splat_rwlock_test1); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, + SPLAT_RWLOCK_TEST2_ID, splat_rwlock_test2); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, + SPLAT_RWLOCK_TEST3_ID, splat_rwlock_test3); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, + SPLAT_RWLOCK_TEST4_ID, splat_rwlock_test4); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, + SPLAT_RWLOCK_TEST5_ID, splat_rwlock_test5); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, + SPLAT_RWLOCK_TEST6_ID, splat_rwlock_test6); - return sub; + return sub; } void splat_rwlock_fini(splat_subsystem_t *sub) { - ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST1_ID); - kfree(sub); + ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST6_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST5_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST4_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST1_ID); + kfree(sub); } int splat_rwlock_id(void) { - return SPLAT_SUBSYSTEM_RWLOCK; + return SPLAT_SUBSYSTEM_RWLOCK; } diff --git a/patches/fc11-spl-export-symbols.patch b/patches/fc11-spl-export-symbols.patch index 726aabddc..c9d3ec880 100644 --- a/patches/fc11-spl-export-symbols.patch +++ b/patches/fc11-spl-export-symbols.patch @@ -92,3 +92,15 @@ index f5b7d17..1468a22 100644 static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) { +diff --git a/kernel/fork.c b/kernel/fork.c +index 9b42695..852499e 100644 +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -159,6 +159,7 @@ void __put_task_struct(struct task_struct *tsk) + if (!profile_handoff_task(tsk)) + free_task(tsk); + } ++EXPORT_SYMBOL(__put_task_struct); + + /* + * macro override instead of weak attribute alias, to workaround diff --git a/spl_config.h.in b/spl_config.h.in index c4097d80f..eedff8e81 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -117,6 +117,9 @@ /* pgdat_list is available */ #undef HAVE_PGDAT_LIST +/* __put_task_struct() is available */ +#undef HAVE_PUT_TASK_STRUCT + /* set_normalized_timespec() is available as export */ #undef HAVE_SET_NORMALIZED_TIMESPEC_EXPORT From d28db80fd0fd4fd63aec09037c44408e51a222d6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 25 Sep 2009 14:14:35 -0700 Subject: [PATCH 0316/1062] Update rwlocks to track owner to ensure correct semantics The behavior of RW_*_HELD was updated because it was not quite right. It is not sufficient to return non-zero when the lock is help, we must only do this when the current task in the holder. This means we need to track the lock owner which is not something tracked in a Linux semaphore. After some experimentation the solution I settled on was to embed the Linux semaphore at the start of a larger krwlock_t structure which includes the owner field. This maintains good performance and allows us to cleanly intergrate with the kernel lock analysis tools. My reasons: 1) By placing the Linux semaphore at the start of krwlock_t we can then simply cast krwlock_t to a rw_semaphore and pass that on to the linux kernel. This allows us to use '#defines so the preprocessor can do direct replacement of the Solaris primative with the linux equivilant. This is important because it then maintains the location information for each rw_* call point. 2) Additionally, by adding the owner to krwlock_t we can keep this needed extra information adjacent to the lock itself. This removes the need for a fancy lookup to get the owner which is optimal for performance. We can also leverage the existing spin lock in the semaphore to ensure owner is updated correctly. 3) All helper functions which do not need to strictly be implemented as a define to preserve location information can be done as a static inline function. 4) Adding the owner to krwlock_t allows us to remove all memory allocations done during lock initialization. This is good for all the obvious reasons, we do give up the ability to specific the lock name. The Linux profiling tools will stringify the lock name used in the code via the preprocessor and use that. Update rwlocks validated on: - SLES10 (ppc64) - SLES11 (x86_64) - CHAOS4.2 (x86_64) - RHEL5.3 (x86_64) - RHEL6 (x86_64) - FC11 (x86_64) --- include/sys/rwlock.h | 232 +++++++++++++++++++++++++++++---------- module/spl/spl-generic.c | 35 +++--- module/spl/spl-rwlock.c | 3 + 3 files changed, 198 insertions(+), 72 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index c6d66ceaa..a68d07243 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -27,10 +27,8 @@ #ifndef _SPL_RWLOCK_H #define _SPL_RWLOCK_H -#include -#include -#include #include +#include typedef enum { RW_DRIVER = 2, @@ -38,81 +36,199 @@ typedef enum { } krw_type_t; typedef enum { - RW_NONE = 0, + RW_NONE = 0, RW_WRITER = 1, RW_READER = 2 } krw_t; -typedef struct rw_semaphore krwlock_t; +typedef struct { + struct rw_semaphore rw_rwlock; + kthread_t *rw_owner; +} krwlock_t; -#define rw_init(rwlp, name, type, arg) init_rwsem(rwlp) -#define rw_destroy(rwlp) ((void)0) -#define rw_downgrade(rwlp) downgrade_write(rwlp) -#define RW_LOCK_HELD(rwlp) rwsem_is_locked(rwlp) /* - * the rw-semaphore definition + * For the generic and x86 implementations of rw-semaphores the following + * is true. If your semaphore implementation internally represents the + * semaphore state differently special case handling will be required. * - if activity/count is 0 then there are no active readers or writers * - if activity/count is +ve then that is the number of active readers * - if activity/count is -1 then there is one active writer */ +#define SEM(rwp) ((struct rw_semaphore *)(rwp)) + #if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) -# define RW_COUNT(rwlp) ((rwlp)->activity) -# define RW_READ_HELD(rwlp) ((RW_COUNT(rwlp) > 0) ? RW_COUNT(rwlp) : 0) -# define RW_WRITE_HELD(rwlp) ((RW_COUNT(rwlp) < 0)) -# define rw_exit_locked(rwlp) __up_read_locked(rwlp) -# define rw_tryenter_locked(rwlp) __down_write_trylock_locked(rwlp) -void __up_read_locked(struct rw_semaphore *); -int __down_write_trylock_locked(struct rw_semaphore *); +# define RW_COUNT(rwp) (SEM(rwp)->activity) +# define rw_exit_locked(rwp) __up_read_locked(rwp) +# define rw_tryenter_locked(rwp) __down_write_trylock_locked(rwp) +extern void __up_read_locked(struct rw_semaphore *); +extern int __down_write_trylock_locked(struct rw_semaphore *); #else -# define RW_COUNT(rwlp) ((rwlp)->count & RWSEM_ACTIVE_MASK) -# define RW_READ_HELD(rwlp) ((RW_COUNT(rwlp) > 0) ? RW_COUNT(rwlp) : 0) -# define RW_WRITE_HELD(rwlp) ((RW_COUNT(rwlp) < 0)) -# define rw_exit_locked(rwlp) up_read(rwlp) -# define rw_tryenter_locked(rwlp) down_write_trylock(rwlp) +# define RW_COUNT(rwp) (SEM(rwp)->count & RWSEM_ACTIVE_MASK) +# define rw_exit_locked(rwp) up_read(rwp) +# define rw_tryenter_locked(rwp) down_write_trylock(rwp) #endif -#define rw_tryenter(rwlp, rw) \ -({ \ - int _rc_ = 0; \ - switch (rw) { \ - case RW_READER: _rc_ = down_read_trylock(rwlp); break; \ - case RW_WRITER: _rc_ = down_write_trylock(rwlp); break; \ - default: SBUG(); \ - } \ - _rc_; \ +static inline kthread_t * +spl_rw_get_owner(krwlock_t *rwp) +{ + return rwp->rw_owner; +} + +static inline void +spl_rw_set_owner(krwlock_t *rwp) +{ + unsigned long flags; + + spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + rwp->rw_owner = current; + spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); +} + +static inline void +spl_rw_clear_owner(krwlock_t *rwp) +{ + unsigned long flags; + + spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + rwp->rw_owner = NULL; + spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); +} + +static inline kthread_t * +rw_owner(krwlock_t *rwp) +{ + unsigned long flags; + kthread_t *owner; + + spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + owner = spl_rw_get_owner(rwp); + spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + + return owner; +} + +static inline int +RW_READ_HELD(krwlock_t *rwp) +{ + unsigned long flags; + int rc; + + spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + rc = ((RW_COUNT(rwp) > 0) && (spl_rw_get_owner(rwp) == NULL)); + spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + + return rc; +} + +static inline int +RW_WRITE_HELD(krwlock_t *rwp) +{ + unsigned long flags; + int rc; + + spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + rc = ((RW_COUNT(rwp) < 0) && (spl_rw_get_owner(rwp) == current)); + spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + + return rc; +} + +static inline int +RW_LOCK_HELD(krwlock_t *rwp) +{ + unsigned long flags; + int rc; + + spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + rc = (RW_COUNT(rwp) != 0); + spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + + return rc; +} + +/* + * The following functions must be a #define and not static inline. + * This ensures that the native linux semaphore functions (down/up) + * will be correctly located in the users code which is important + * for the built in kernel lock analysis tools + */ +#define rw_init(rwp, name, type, arg) \ +({ \ + init_rwsem(SEM(rwp)); \ + spl_rw_clear_owner(rwp); \ }) -#define rw_enter(rwlp, rw) \ -({ \ - switch (rw) { \ - case RW_READER: down_read(rwlp); break; \ - case RW_WRITER: down_write(rwlp); break; \ - default: SBUG(); \ - } \ +#define rw_destroy(rwp) \ +({ \ + VERIFY(!RW_LOCK_HELD(rwp)); \ }) -#define rw_exit(rwlp) \ -({ \ - if (RW_READ_HELD(rwlp)) \ - up_read(rwlp); \ - else if (RW_WRITE_HELD(rwlp)) \ - up_write(rwlp); \ - else \ - SBUG(); \ +#define rw_tryenter(rwp, rw) \ +({ \ + int _rc_ = 0; \ + \ + switch (rw) { \ + case RW_READER: \ + _rc_ = down_read_trylock(SEM(rwp)); \ + break; \ + case RW_WRITER: \ + if ((_rc_ = down_write_trylock(SEM(rwp)))) \ + spl_rw_set_owner(rwp); \ + break; \ + default: \ + SBUG(); \ + } \ + _rc_; \ }) -#define rw_tryupgrade(rwlp) \ -({ \ - unsigned long flags; \ - int _rc_ = 0; \ - spin_lock_irqsave(&(rwlp)->wait_lock, flags); \ - if (list_empty(&(rwlp)->wait_list) && (RW_READ_HELD(rwlp) == 1)) { \ - rw_exit_locked(rwlp); \ - _rc_ = rw_tryenter_locked(rwlp); \ - ASSERT(_rc_); \ - } \ - spin_unlock_irqrestore(&(rwlp)->wait_lock, flags); \ - _rc_; \ +#define rw_enter(rwp, rw) \ +({ \ + switch (rw) { \ + case RW_READER: \ + down_read(SEM(rwp)); \ + break; \ + case RW_WRITER: \ + down_write(SEM(rwp)); \ + spl_rw_set_owner(rwp); \ + break; \ + default: \ + SBUG(); \ + } \ }) +#define rw_exit(rwp) \ +({ \ + if (RW_WRITE_HELD(rwp)) { \ + spl_rw_clear_owner(rwp); \ + up_write(SEM(rwp)); \ + } else { \ + ASSERT(RW_READ_HELD(rwp)); \ + up_read(SEM(rwp)); \ + } \ +}) + +#define rw_downgrade(rwp) \ +({ \ + spl_rw_clear_owner(rwp); \ + downgrade_write(SEM(rwp)); \ +}) + +#define rw_tryupgrade(rwp) \ +({ \ + unsigned long _flags_; \ + int _rc_ = 0; \ + \ + spin_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ + if (list_empty(&SEM(rwp)->wait_list) && (RW_COUNT(rwp) == 1)) { \ + rw_exit_locked(SEM(rwp)); \ + VERIFY(_rc_ = rw_tryenter_locked(SEM(rwp))); \ + (rwp)->rw_owner = current; \ + } \ + spin_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ + _rc_; \ +}) + +int spl_rw_init(void); +void spl_rw_fini(void); + #endif /* _SPL_RWLOCK_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 8e0ef9263..8bf97e0cf 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -365,49 +366,54 @@ static int __init spl_init(void) return rc; if ((rc = spl_kmem_init())) - GOTO(out , rc); + GOTO(out1, rc); if ((rc = spl_mutex_init())) - GOTO(out2 , rc); + GOTO(out2, rc); - if ((rc = spl_taskq_init())) + if ((rc = spl_rw_init())) GOTO(out3, rc); - if ((rc = vn_init())) + if ((rc = spl_taskq_init())) GOTO(out4, rc); - if ((rc = proc_init())) + if ((rc = vn_init())) GOTO(out5, rc); - if ((rc = kstat_init())) + if ((rc = proc_init())) GOTO(out6, rc); + if ((rc = kstat_init())) + GOTO(out7, rc); + if ((rc = set_hostid())) - GOTO(out7, rc = -EADDRNOTAVAIL); + GOTO(out8, rc = -EADDRNOTAVAIL); #ifndef HAVE_KALLSYMS_LOOKUP_NAME if ((rc = set_kallsyms_lookup_name())) - GOTO(out7, rc = -EADDRNOTAVAIL); + GOTO(out8, rc = -EADDRNOTAVAIL); #endif /* HAVE_KALLSYMS_LOOKUP_NAME */ if ((rc = spl_kmem_init_kallsyms_lookup())) - GOTO(out7, rc); + GOTO(out8, rc); printk("SPL: Loaded Solaris Porting Layer v%s\n", SPL_META_VERSION); RETURN(rc); -out7: +out8: kstat_fini(); -out6: +out7: proc_fini(); -out5: +out6: vn_fini(); -out4: +out5: spl_taskq_fini(); +out4: + spl_rw_fini(); out3: spl_mutex_fini(); out2: spl_kmem_fini(); -out: +out1: debug_fini(); printk("SPL: Failed to Load Solaris Porting Layer v%s, " @@ -424,6 +430,7 @@ static void spl_fini(void) proc_fini(); vn_fini(); spl_taskq_fini(); + spl_rw_fini(); spl_mutex_fini(); spl_kmem_fini(); debug_fini(); diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 8ff66bf9f..5120b2c81 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -91,3 +91,6 @@ __down_write_trylock_locked(struct rw_semaphore *sem) EXPORT_SYMBOL(__down_write_trylock_locked); #endif + +int spl_rw_init(void) { return 0; } +void spl_rw_fini(void) { } From 4d54fdee1d774ddaef381893434a3721067e2c56 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 25 Sep 2009 14:47:01 -0700 Subject: [PATCH 0317/1062] Reimplement mutexs for Linux lock profiling/analysis For a generic explanation of why mutexs needed to be reimplemented to work with the kernel lock profiling see commits: e811949a57044d60d12953c5c3b808a79a7d36ef and d28db80fd0fd4fd63aec09037c44408e51a222d6 The specific changes made to the mutex implemetation are as follows. The Linux mutex structure is now directly embedded in the kmutex_t. This allows a kmutex_t to be directly case to a mutex struct and passed directly to the Linux primative. Just like with the rwlocks it is critical that these functions be implemented as '#defines to ensure the location information is preserved. The preprocessor can then do a direct replacement of the Solaris primative with the linux primative. Just as with the rwlocks we need to track the lock owner. Here things get a little more interesting because depending on your kernel version, and how you've built your kernel Linux may already do this for you. If your running a 2.6.29 or newer kernel on a SMP system the lock owner will be tracked. This was added to Linux to support adaptive mutexs, more on that shortly. Alternately, your kernel might track the lock owner if you've set CONFIG_DEBUG_MUTEXES in the kernel build. If neither of the above things is true for your kernel the kmutex_t type will include and track the lock owner to ensure correct behavior. This is all handled by a new autoconf check called SPL_AC_MUTEX_OWNER. Concerning adaptive mutexs these are a very recent development and they did not make it in to either the latest FC11 of SLES11 kernels. Ideally, I'd love to see this kernel change appear in one of these distros because it does help performance. From Linux kernel commit: 0d66bf6d3514b35eb6897629059443132992dbd7 "Testing with Ingo's test-mutex application... gave a 345% boost for VFS scalability on my testbox" However, if you don't want to backport this change yourself you can still simply export the task_curr() symbol. The kmutex_t implementation will use this symbol when it's available to provide it's own adaptive mutexs. Finally, DEBUG_MUTEX support was removed including the proc handlers. This was done because now that we are cleanly integrated with the kernel profiling all this information and much much more is available in debug kernel builds. This code was now redundant. Update mutexs validated on: - SLES10 (ppc64) - SLES11 (x86_64) - CHAOS4.2 (x86_64) - RHEL5.3 (x86_64) - RHEL6 (x86_64) - FC11 (x86_64) --- config/spl-build.m4 | 43 ++-- configure | 251 ++++++++++++++-------- include/sys/condvar.h | 1 + include/sys/mutex.h | 233 +++++++++++++------- module/spl/spl-mutex.c | 305 ++++----------------------- module/spl/spl-proc.c | 172 +-------------- module/splat/splat-mutex.c | 420 ++++++++++++++++++------------------- spl_config.h.in | 6 +- 8 files changed, 596 insertions(+), 835 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c52ea5db4..3293aa273 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -23,7 +23,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG SPL_AC_DEBUG_KMEM - SPL_AC_DEBUG_MUTEX SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB SPL_AC_TYPE_UINTPTR_T @@ -48,6 +47,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX + SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_LOCK_NESTED SPL_AC_DIV64_64 SPL_AC_DIV64_U64 @@ -256,28 +256,6 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM], [ fi ]) -AC_DEFUN([SPL_AC_DEBUG_MUTEX], [ - AC_MSG_CHECKING([whether mutex debugging is enabled]) - AC_ARG_ENABLE( [debug-mutex], - AS_HELP_STRING([--enable-debug-mutex], - [Enable mutex debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug_mutex=yes ;; - no) spl_ac_debug_mutex=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-mutex]) ;; - esac ] - ) - if test "$spl_ac_debug_mutex" = yes; then - AC_MSG_RESULT([yes]) - AC_DEFINE([DEBUG_MUTEX], [1], - [Define to 1 to enable mutex debugging]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" - else - AC_MSG_RESULT([no]) - fi -]) - AC_DEFUN([SPL_AC_DEBUG_KSTAT], [ AC_MSG_CHECKING([whether kstat debugging is enabled]) AC_ARG_ENABLE( [debug-kstat], @@ -825,6 +803,25 @@ AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ ]) ]) +dnl # +dnl # 2.6.29 API change, +dnl # Adaptive mutexs introduced. +dnl # +AC_DEFUN([SPL_AC_MUTEX_OWNER], [ + AC_MSG_CHECKING([whether struct mutex has owner]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct mutex mtx; + mtx.owner = NULL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MUTEX_OWNER, 1, [struct mutex has owner]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.18 API change, dnl # First introduced 'mutex_lock_nested()' in include/linux/mutex.h, diff --git a/configure b/configure index 6b9ea364e..03b23036e 100755 --- a/configure +++ b/configure @@ -1036,7 +1036,6 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Enable generic debug support (default off) --enable-debug-kmem Enable kmem debug support (default off) - --enable-debug-mutex Enable mutex debug support (default off) --enable-debug-kstat Enable kstat debug support (default off) --enable-debug-callb Enable callb debug support (default off) @@ -3987,7 +3986,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3990 "configure"' > conftest.$ac_ext + echo '#line 3989 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5586,7 +5585,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5589:" \ +echo "$as_me:5588:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6649,11 +6648,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6652: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6656: \$? = $ac_status" >&5 + echo "$as_me:6655: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6917,11 +6916,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6920: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6919: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6924: \$? = $ac_status" >&5 + echo "$as_me:6923: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7021,11 +7020,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7024: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7023: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7028: \$? = $ac_status" >&5 + echo "$as_me:7027: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8490,7 +8489,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8493 "configure"' > conftest.$ac_ext + echo '#line 8492 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9387,7 +9386,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11832: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11837: \$? = $ac_status" >&5 + echo "$as_me:11836: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11934,11 +11933,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11937: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11936: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11941: \$? = $ac_status" >&5 + echo "$as_me:11940: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12470,7 +12469,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12473 "configure"' > conftest.$ac_ext + echo '#line 12472 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13528,11 +13527,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13531: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13530: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13535: \$? = $ac_status" >&5 + echo "$as_me:13534: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13632,11 +13631,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13635: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13634: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13639: \$? = $ac_status" >&5 + echo "$as_me:13638: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15081,7 +15080,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15084 "configure"' > conftest.$ac_ext + echo '#line 15083 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15859,11 +15858,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15862: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15866: \$? = $ac_status" >&5 + echo "$as_me:15865: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16127,11 +16126,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16130: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16129: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16134: \$? = $ac_status" >&5 + echo "$as_me:16133: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16231,11 +16230,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16234: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16238: \$? = $ac_status" >&5 + echo "$as_me:16237: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17700,7 +17699,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17703 "configure"' > conftest.$ac_ext + echo '#line 17702 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19143,37 +19142,6 @@ echo "${ECHO_T}no" >&6 fi - echo "$as_me:$LINENO: checking whether mutex debugging is enabled" >&5 -echo $ECHO_N "checking whether mutex debugging is enabled... $ECHO_C" >&6 - # Check whether --enable-debug-mutex or --disable-debug-mutex was given. -if test "${enable_debug_mutex+set}" = set; then - enableval="$enable_debug_mutex" - case "$enableval" in - yes) spl_ac_debug_mutex=yes ;; - no) spl_ac_debug_mutex=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-mutex" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-mutex" >&2;} - { (exit 1); exit 1; }; } ;; - esac - -fi; - if test "$spl_ac_debug_mutex" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_MUTEX 1 -_ACEOF - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - - echo "$as_me:$LINENO: checking whether kstat debugging is enabled" >&5 echo $ECHO_N "checking whether kstat debugging is enabled... $ECHO_C" >&6 # Check whether --enable-debug-kstat or --disable-debug-kstat was given. @@ -20562,6 +20530,72 @@ fi + echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 +echo $ECHO_N "checking whether struct mutex has owner... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct mutex mtx; + mtx.owner = NULL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MUTEX_OWNER 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6 @@ -22151,37 +22185,6 @@ echo "${ECHO_T}no" >&6 fi - echo "$as_me:$LINENO: checking whether mutex debugging is enabled" >&5 -echo $ECHO_N "checking whether mutex debugging is enabled... $ECHO_C" >&6 - # Check whether --enable-debug-mutex or --disable-debug-mutex was given. -if test "${enable_debug_mutex+set}" = set; then - enableval="$enable_debug_mutex" - case "$enableval" in - yes) spl_ac_debug_mutex=yes ;; - no) spl_ac_debug_mutex=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-mutex" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-mutex" >&2;} - { (exit 1); exit 1; }; } ;; - esac - -fi; - if test "$spl_ac_debug_mutex" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_MUTEX 1 -_ACEOF - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - - echo "$as_me:$LINENO: checking whether kstat debugging is enabled" >&5 echo $ECHO_N "checking whether kstat debugging is enabled... $ECHO_C" >&6 # Check whether --enable-debug-kstat or --disable-debug-kstat was given. @@ -23570,6 +23573,72 @@ fi + echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 +echo $ECHO_N "checking whether struct mutex has owner... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct mutex mtx; + mtx.owner = NULL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MUTEX_OWNER 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6 diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 40b6e4948..9a2e8b5a0 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -33,6 +33,7 @@ extern "C" { #include #include +#include #include /* The kcondvar_t struct is protected by mutex taken externally before diff --git a/include/sys/mutex.h b/include/sys/mutex.h index a26b2116a..49d17659d 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -1,7 +1,7 @@ /* * This file is part of the SPL: Solaris Porting Layer. * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Copyright (c) 2009 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory * Written by: * Brian Behlendorf , @@ -25,88 +25,177 @@ */ #ifndef _SPL_MUTEX_H -#define _SPL_MUTEX_H +#define _SPL_MUTEX_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include #include -#include +#include -#define MUTEX_DEFAULT 0 -#define MUTEX_SPIN 1 -#define MUTEX_ADAPTIVE 2 +typedef enum { + MUTEX_DEFAULT = 0, + MUTEX_SPIN = 1, + MUTEX_ADAPTIVE = 2 +} kmutex_type_t; -#define MUTEX_ENTER_TOTAL 0 -#define MUTEX_ENTER_NOT_HELD 1 -#define MUTEX_ENTER_SPIN 2 -#define MUTEX_ENTER_SLEEP 3 -#define MUTEX_TRYENTER_TOTAL 4 -#define MUTEX_TRYENTER_NOT_HELD 5 -#define MUTEX_STATS_SIZE 6 +#ifdef HAVE_MUTEX_OWNER -#define KM_MAGIC 0x42424242 -#define KM_POISON 0x84 +typedef struct mutex kmutex_t; + +static inline kthread_t * +mutex_owner(kmutex_t *mp) +{ + if (mp->owner) + return (mp->owner)->task; + + return NULL; +} +#define mutex_owned(mp) (mutex_owner(mp) == current) +#define MUTEX_HELD(mp) mutex_owned(mp) +#undef mutex_init +#define mutex_init(mp, name, type, ibc) \ +({ \ + static struct lock_class_key __key; \ + ASSERT(type == MUTEX_DEFAULT); \ + \ + __mutex_init((mp), #mp, &__key); \ +}) +/* #define mutex_destroy(mp) ((void)0) */ +#define mutex_tryenter(mp) mutex_trylock(mp) +#define mutex_enter(mp) mutex_lock(mp) +#define mutex_exit(mp) mutex_unlock(mp) + +#else /* HAVE_MUTEX_OWNER */ typedef struct { - int32_t km_magic; - int16_t km_type; - int16_t km_name_size; - char *km_name; - struct task_struct *km_owner; - struct semaphore *km_sem; -#ifdef DEBUG_MUTEX - int *km_stats; - struct list_head km_list; -#endif + struct mutex m_mutex; + kthread_t *m_owner; } kmutex_t; -extern int mutex_spin_max; +#ifdef HAVE_TASK_CURR +extern int spl_mutex_spin_max(void); +#else /* HAVE_TASK_CURR */ +# define task_curr(owner) 0 +# define spl_mutex_spin_max() 0 +#endif /* HAVE_TASK_CURR */ -#ifdef DEBUG_MUTEX -extern int mutex_stats[MUTEX_STATS_SIZE]; -extern spinlock_t mutex_stats_lock; -extern struct list_head mutex_stats_list; -#define MUTEX_STAT_INC(stats, stat) ((stats)[stat]++) -#else -#define MUTEX_STAT_INC(stats, stat) -#endif +#define MUTEX(mp) ((struct mutex *)(mp)) + +static inline kthread_t * +spl_mutex_get_owner(kmutex_t *mp) +{ + return mp->m_owner; +} + +static inline void +spl_mutex_set_owner(kmutex_t *mp) +{ + unsigned long flags; + + spin_lock_irqsave(&MUTEX(mp)->wait_lock, flags); + mp->m_owner = current; + spin_unlock_irqrestore(&MUTEX(mp)->wait_lock, flags); +} + +static inline void +spl_mutex_clear_owner(kmutex_t *mp) +{ + unsigned long flags; + + spin_lock_irqsave(&MUTEX(mp)->wait_lock, flags); + mp->m_owner = NULL; + spin_unlock_irqrestore(&MUTEX(mp)->wait_lock, flags); +} + +static inline kthread_t * +mutex_owner(kmutex_t *mp) +{ + unsigned long flags; + kthread_t *owner; + + spin_lock_irqsave(&MUTEX(mp)->wait_lock, flags); + owner = spl_mutex_get_owner(mp); + spin_unlock_irqrestore(&MUTEX(mp)->wait_lock, flags); + + return owner; +} + +#define mutex_owned(mp) (mutex_owner(mp) == current) +#define MUTEX_HELD(mp) mutex_owned(mp) + +/* + * The following functions must be a #define and not static inline. + * This ensures that the native linux mutex functions (lock/unlock) + * will be correctly located in the users code which is important + * for the built in kernel lock analysis tools + */ +#undef mutex_init +#define mutex_init(mp, name, type, ibc) \ +({ \ + static struct lock_class_key __key; \ + ASSERT(type == MUTEX_DEFAULT); \ + \ + __mutex_init(MUTEX(mp), #mp, &__key); \ + spl_mutex_clear_owner(mp); \ +}) + +#undef mutex_destroy +#define mutex_destroy(mp) \ +({ \ + VERIFY(!MUTEX_HELD(mp)); \ +}) + +#define mutex_tryenter(mp) \ +({ \ + int _rc_; \ + \ + if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \ + spl_mutex_set_owner(mp); \ + \ + _rc_; \ +}) + +/* + * Adaptive mutexs assume that the lock may be held by a task running + * on a different cpu. The expectation is that the task will drop the + * lock before leaving the head of the run queue. So the ideal thing + * to do is spin until we acquire the lock and avoid a context switch. + * However it is also possible the task holding the lock yields the + * processor with out dropping lock. In this case, we know it's going + * to be a while so we stop spinning and go to sleep waiting for the + * lock to be available. This should strike the optimum balance + * between spinning and sleeping waiting for a lock. + */ +#define mutex_enter(mp) \ +({ \ + kthread_t *_owner_; \ + int _rc_, _count_; \ + \ + _rc_ = 0; \ + _count_ = 0; \ + _owner_ = mutex_owner(mp); \ + \ + while (_owner_ && task_curr(_owner_) && \ + _count_ <= spl_mutex_spin_max()) { \ + if ((_rc_ = mutex_trylock(MUTEX(mp)))) \ + break; \ + \ + _count_++; \ + } \ + \ + if (!_rc_) \ + mutex_lock(MUTEX(mp)); \ + \ + spl_mutex_set_owner(mp); \ +}) + +#define mutex_exit(mp) \ +({ \ + spl_mutex_clear_owner(mp); \ + mutex_unlock(MUTEX(mp)); \ +}) + +#endif /* HAVE_MUTEX_OWNER */ int spl_mutex_init(void); void spl_mutex_fini(void); -extern int __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc); -extern void __spl_mutex_destroy(kmutex_t *mp); -extern int __mutex_tryenter(kmutex_t *mp); -extern void __mutex_enter(kmutex_t *mp); -extern void __mutex_exit(kmutex_t *mp); -extern int __mutex_owned(kmutex_t *mp); -extern kthread_t *__spl_mutex_owner(kmutex_t *mp); - -#undef mutex_init -#undef mutex_destroy - -#define mutex_init(mp, name, type, ibc) \ -({ \ - /* May never fail or all subsequent mutex_* calls will ASSERT */\ - if ((name) == NULL) \ - while(__spl_mutex_init(mp, #mp, type, ibc)); \ - else \ - while(__spl_mutex_init(mp, name, type, ibc)); \ -}) -#define mutex_destroy(mp) __spl_mutex_destroy(mp) -#define mutex_tryenter(mp) __mutex_tryenter(mp) -#define mutex_enter(mp) __mutex_enter(mp) -#define mutex_exit(mp) __mutex_exit(mp) -#define mutex_owned(mp) __mutex_owned(mp) -#define mutex_owner(mp) __spl_mutex_owner(mp) -#define MUTEX_HELD(mp) mutex_owned(mp) - -#ifdef __cplusplus -} -#endif - -#endif /* _SPL_MUTEX_H */ +#endif /* _SPL_MUTEX_H */ diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index f0389f5d1..0af74571d 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -1,7 +1,7 @@ /* * This file is part of the SPL: Solaris Porting Layer. * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. + * Copyright (c) 2009 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory * Written by: * Brian Behlendorf , @@ -32,277 +32,46 @@ #define DEBUG_SUBSYSTEM S_MUTEX -/* Mutex implementation based on those found in Solaris. This means - * they the MUTEX_DEFAULT type is an adaptive mutex. When calling - * mutex_enter() your process will spin waiting for the lock if it's - * likely the lock will be free'd shortly. If it looks like the - * lock will be held for a longer time we schedule and sleep waiting - * for it. This determination is made by checking if the holder of - * the lock is currently running on cpu or sleeping waiting to be - * scheduled. If the holder is currently running it's likely the - * lock will be shortly dropped. +/* + * While a standard mutex implementation has been available in the kernel + * for quite some time. It was not until 2.6.29 and latter kernels that + * adaptive mutexs were embraced and integrated with the scheduler. This + * brought a significant performance improvement, but just as importantly + * it added a lock owner to the generic mutex outside CONFIG_DEBUG_MUTEXES + * builds. This is critical for correctly supporting the mutex_owner() + * Solaris primitive. When the owner is available we use a pure Linux + * mutex implementation. When the owner is not available we still use + * Linux mutexs as a base but also reserve space for an owner field right + * after the mutex structure. * - * XXX: This is basically a rough implementation to see if this - * helps our performance. If it does a more careful implementation - * should be done, perhaps in assembly. + * In the case when HAVE_MUTEX_OWNER is not defined your code may + * still me able to leverage adaptive mutexs. As long as the task_curr() + * symbol is exported this code will provide a poor mans adaptive mutex + * implementation. However, this is not required and if the symbol is + * unavailable we provide a standard mutex. */ -/* 0: Never spin when trying to aquire lock - * -1: Spin until aquired or holder yeilds without dropping lock +#ifndef HAVE_MUTEX_OWNER +#ifdef HAVE_TASK_CURR +/* + * mutex_spin_max = { 0, -1, 1-MAX_INT } + * 0: Never spin when trying to acquire lock + * -1: Spin until acquired or holder yields without dropping lock * 1-MAX_INT: Spin for N attempts before sleeping for lock */ int mutex_spin_max = 0; - -#ifdef DEBUG_MUTEX -int mutex_stats[MUTEX_STATS_SIZE] = { 0 }; -spinlock_t mutex_stats_lock; -struct list_head mutex_stats_list; -#endif - -int -__spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc) -{ - int flags = KM_SLEEP; - - ASSERT(mp); - ASSERT(name); - ASSERT(ibc == NULL); - - mp->km_name = NULL; - mp->km_name_size = strlen(name) + 1; - - switch (type) { - case MUTEX_DEFAULT: - mp->km_type = MUTEX_ADAPTIVE; - break; - case MUTEX_SPIN: - case MUTEX_ADAPTIVE: - mp->km_type = type; - break; - default: - SBUG(); - } - - /* We may be called when there is a non-zero preempt_count or - * interrupts are disabled is which case we must not sleep. - */ - if (current_thread_info()->preempt_count || irqs_disabled()) - flags = KM_NOSLEEP; - - /* Semaphore kmem_alloc'ed to keep struct size down (<64b) */ - mp->km_sem = kmem_alloc(sizeof(struct semaphore), flags); - if (mp->km_sem == NULL) - return -ENOMEM; - - mp->km_name = kmem_alloc(mp->km_name_size, flags); - if (mp->km_name == NULL) { - kmem_free(mp->km_sem, sizeof(struct semaphore)); - return -ENOMEM; - } - - sema_init(mp->km_sem, 1); - strncpy(mp->km_name, name, mp->km_name_size); - -#ifdef DEBUG_MUTEX - mp->km_stats = kmem_zalloc(sizeof(int) * MUTEX_STATS_SIZE, flags); - if (mp->km_stats == NULL) { - kmem_free(mp->km_name, mp->km_name_size); - kmem_free(mp->km_sem, sizeof(struct semaphore)); - return -ENOMEM; - } - - /* XXX - This appears to be a much more contended lock than I - * would have expected. To run with this debugging enabled and - * get reasonable performance we may need to be more clever and - * do something like hash the mutex ptr on to one of several - * lists to ease this single point of contention. - */ - spin_lock(&mutex_stats_lock); - list_add_tail(&mp->km_list, &mutex_stats_list); - spin_unlock(&mutex_stats_lock); -#endif - mp->km_magic = KM_MAGIC; - mp->km_owner = NULL; - - return 0; -} -EXPORT_SYMBOL(__spl_mutex_init); - -void -__spl_mutex_destroy(kmutex_t *mp) -{ - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - -#ifdef DEBUG_MUTEX - spin_lock(&mutex_stats_lock); - list_del_init(&mp->km_list); - spin_unlock(&mutex_stats_lock); - - kmem_free(mp->km_stats, sizeof(int) * MUTEX_STATS_SIZE); -#endif - kmem_free(mp->km_name, mp->km_name_size); - kmem_free(mp->km_sem, sizeof(struct semaphore)); - - memset(mp, KM_POISON, sizeof(*mp)); -} -EXPORT_SYMBOL(__spl_mutex_destroy); - -/* Return 1 if we acquired the mutex, else zero. */ -int -__mutex_tryenter(kmutex_t *mp) -{ - int rc; - ENTRY; - - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - MUTEX_STAT_INC(mutex_stats, MUTEX_TRYENTER_TOTAL); - MUTEX_STAT_INC(mp->km_stats, MUTEX_TRYENTER_TOTAL); - - rc = down_trylock(mp->km_sem); - if (rc == 0) { - ASSERT(mp->km_owner == NULL); - mp->km_owner = current; - MUTEX_STAT_INC(mutex_stats, MUTEX_TRYENTER_NOT_HELD); - MUTEX_STAT_INC(mp->km_stats, MUTEX_TRYENTER_NOT_HELD); - } - - RETURN(!rc); -} -EXPORT_SYMBOL(__mutex_tryenter); - -#ifndef HAVE_TASK_CURR -#define task_curr(owner) 0 -#endif - - -static void -mutex_enter_adaptive(kmutex_t *mp) -{ - struct task_struct *owner; - int count = 0; - - /* Lock is not held so we expect to aquire the lock */ - if ((owner = mp->km_owner) == NULL) { - down(mp->km_sem); - MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_NOT_HELD); - MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_NOT_HELD); - } else { - /* The lock is held by a currently running task which - * we expect will drop the lock before leaving the - * head of the runqueue. So the ideal thing to do - * is spin until we aquire the lock and avoid a - * context switch. However it is also possible the - * task holding the lock yields the processor with - * out dropping lock. In which case, we know it's - * going to be a while so we stop spinning and go - * to sleep waiting for the lock to be available. - * This should strike the optimum balance between - * spinning and sleeping waiting for a lock. - */ - while (task_curr(owner) && (count <= mutex_spin_max)) { - if (down_trylock(mp->km_sem) == 0) { - MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_SPIN); - MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_SPIN); - GOTO(out, count); - } - count++; - } - - /* The lock is held by a sleeping task so it's going to - * cost us minimally one context switch. We might as - * well sleep and yield the processor to other tasks. - */ - down(mp->km_sem); - MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_SLEEP); - MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_SLEEP); - } -out: - MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_TOTAL); - MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_TOTAL); -} - -void -__mutex_enter(kmutex_t *mp) -{ - ENTRY; - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - - switch (mp->km_type) { - case MUTEX_SPIN: - while (down_trylock(mp->km_sem)); - MUTEX_STAT_INC(mutex_stats, MUTEX_ENTER_SPIN); - MUTEX_STAT_INC(mp->km_stats, MUTEX_ENTER_SPIN); - break; - case MUTEX_ADAPTIVE: - mutex_enter_adaptive(mp); - break; - } - - ASSERT(mp->km_owner == NULL); - mp->km_owner = current; - - EXIT; -} -EXPORT_SYMBOL(__mutex_enter); - -void -__mutex_exit(kmutex_t *mp) -{ - ENTRY; - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - ASSERT(mp->km_owner == current); - mp->km_owner = NULL; - up(mp->km_sem); - EXIT; -} -EXPORT_SYMBOL(__mutex_exit); - -/* Return 1 if mutex is held by current process, else zero. */ -int -__mutex_owned(kmutex_t *mp) -{ - ENTRY; - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - RETURN(mp->km_owner == current); -} -EXPORT_SYMBOL(__mutex_owned); - -/* Return owner if mutex is owned, else NULL. */ -kthread_t * -__spl_mutex_owner(kmutex_t *mp) -{ - ENTRY; - ASSERT(mp); - ASSERT(mp->km_magic == KM_MAGIC); - RETURN(mp->km_owner); -} -EXPORT_SYMBOL(__spl_mutex_owner); - -int -spl_mutex_init(void) -{ - ENTRY; -#ifdef DEBUG_MUTEX - spin_lock_init(&mutex_stats_lock); - INIT_LIST_HEAD(&mutex_stats_list); -#endif - RETURN(0); -} - -void -spl_mutex_fini(void) -{ - ENTRY; -#ifdef DEBUG_MUTEX - ASSERT(list_empty(&mutex_stats_list)); -#endif - EXIT; -} - module_param(mutex_spin_max, int, 0644); -MODULE_PARM_DESC(mutex_spin_max, "Spin a maximum of N times to aquire lock"); +MODULE_PARM_DESC(mutex_spin_max, "Spin a maximum of N times to acquire lock"); + +int +spl_mutex_spin_max(void) +{ + return mutex_spin_max; +} +EXPORT_SYMBOL(spl_mutex_spin_max); + +#endif /* HAVE_TASK_CURR */ +#endif /* !HAVE_MUTEX_OWNER */ + +int spl_mutex_init(void) { return 0; } +void spl_mutex_fini(void) { } diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 5dd7884f6..690f2991e 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -41,12 +41,8 @@ static unsigned long table_max = ~0; static struct ctl_table_header *spl_header = NULL; #endif /* CONFIG_SYSCTL */ -#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) +#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) static struct proc_dir_entry *proc_spl = NULL; -#ifdef DEBUG_MUTEX -static struct proc_dir_entry *proc_spl_mutex = NULL; -static struct proc_dir_entry *proc_spl_mutex_stats = NULL; -#endif /* DEBUG_MUTEX */ #ifdef DEBUG_KMEM static struct proc_dir_entry *proc_spl_kmem = NULL; static struct proc_dir_entry *proc_spl_kmem_slab = NULL; @@ -54,7 +50,7 @@ static struct proc_dir_entry *proc_spl_kmem_slab = NULL; #ifdef DEBUG_KSTAT struct proc_dir_entry *proc_spl_kstat = NULL; #endif /* DEBUG_KSTAT */ -#endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ +#endif /* DEBUG_KMEM || DEBUG_KSTAT */ #ifdef HAVE_CTL_UNNUMBERED @@ -105,10 +101,6 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #define CTL_KMEM_ALLOC_FAILED CTL_UNNUMBERED /* Cache allocations failed */ #endif -#define CTL_MUTEX_STATS CTL_UNNUMBERED /* Global mutex statistics */ -#define CTL_MUTEX_STATS_PER CTL_UNNUMBERED /* Per mutex statistics */ -#define CTL_MUTEX_SPIN_MAX CTL_UNNUMBERED /* Max mutex spin iterations */ - #else /* HAVE_CTL_UNNUMBERED */ enum { @@ -159,10 +151,6 @@ enum { CTL_KMEM_VMEMUSED, /* Alloc'd vmem bytes */ CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ #endif - - CTL_MUTEX_STATS, /* Global mutex statistics */ - CTL_MUTEX_STATS_PER, /* Per mutex statistics */ - CTL_MUTEX_SPIN_MAX, /* Maximum mutex spin iterations */ }; #endif /* HAVE_CTL_UNNUMBERED */ @@ -589,103 +577,6 @@ proc_dofreemem(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } -#ifdef DEBUG_MUTEX -static void -mutex_seq_show_headers(struct seq_file *f) -{ - seq_printf(f, "%-36s %-4s %-16s\t" - "e_tot\te_nh\te_sp\te_sl\tte_tot\tte_nh\n", - "name", "type", "owner"); -} - -static int -mutex_seq_show(struct seq_file *f, void *p) -{ - kmutex_t *mp = p; - char t = 'X'; - int i; - - ASSERT(mp->km_magic == KM_MAGIC); - - switch (mp->km_type) { - case MUTEX_DEFAULT: t = 'D'; break; - case MUTEX_SPIN: t = 'S'; break; - case MUTEX_ADAPTIVE: t = 'A'; break; - default: - SBUG(); - } - seq_printf(f, "%-36s %c ", mp->km_name, t); - if (mp->km_owner) - seq_printf(f, "%p\t", mp->km_owner); - else - seq_printf(f, "%-16s\t", ""); - - for (i = 0; i < MUTEX_STATS_SIZE; i++) - seq_printf(f, "%d%c", mp->km_stats[i], - (i + 1 == MUTEX_STATS_SIZE) ? '\n' : '\t'); - - return 0; -} - -static void * -mutex_seq_start(struct seq_file *f, loff_t *pos) -{ - struct list_head *p; - loff_t n = *pos; - ENTRY; - - spin_lock(&mutex_stats_lock); - if (!n) - mutex_seq_show_headers(f); - - p = mutex_stats_list.next; - while (n--) { - p = p->next; - if (p == &mutex_stats_list) - RETURN(NULL); - } - - RETURN(list_entry(p, kmutex_t, km_list)); -} - -static void * -mutex_seq_next(struct seq_file *f, void *p, loff_t *pos) -{ - kmutex_t *mp = p; - ENTRY; - - ++*pos; - RETURN((mp->km_list.next == &mutex_stats_list) ? - NULL : list_entry(mp->km_list.next, kmutex_t, km_list)); -} - -static void -mutex_seq_stop(struct seq_file *f, void *v) -{ - spin_unlock(&mutex_stats_lock); -} - -static struct seq_operations mutex_seq_ops = { - .show = mutex_seq_show, - .start = mutex_seq_start, - .next = mutex_seq_next, - .stop = mutex_seq_stop, -}; - -static int -proc_mutex_open(struct inode *inode, struct file *filp) -{ - return seq_open(filp, &mutex_seq_ops); -} - -static struct file_operations proc_mutex_operations = { - .open = proc_mutex_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; -#endif /* DEBUG_MUTEX */ - #ifdef DEBUG_KMEM static void slab_seq_show_headers(struct seq_file *f) @@ -968,28 +859,6 @@ static struct ctl_table spl_vm_table[] = { {0}, }; -#ifdef DEBUG_MUTEX -static struct ctl_table spl_mutex_table[] = { - { - .ctl_name = CTL_MUTEX_STATS, - .procname = "stats", - .data = &mutex_stats, - .maxlen = sizeof(int) * MUTEX_STATS_SIZE, - .mode = 0444, - .proc_handler = &proc_dointvec, - }, - { - .ctl_name = CTL_MUTEX_SPIN_MAX, - .procname = "spin_max", - .data = &mutex_spin_max, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - {0}, -}; -#endif /* DEBUG_MUTEX */ - #ifdef DEBUG_KMEM static struct ctl_table spl_kmem_table[] = { { @@ -1088,14 +957,6 @@ static struct ctl_table spl_table[] = { .mode = 0555, .child = spl_vm_table, }, -#ifdef DEBUG_MUTEX - { - .ctl_name = CTL_SPL_MUTEX, - .procname = "mutex", - .mode = 0555, - .child = spl_mutex_table, - }, -#endif #ifdef DEBUG_KMEM { .ctl_name = CTL_SPL_KMEM, @@ -1180,24 +1041,11 @@ proc_init(void) RETURN(-EUNATCH); #endif /* CONFIG_SYSCTL */ -#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) +#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) proc_spl = proc_mkdir("spl", NULL); if (proc_spl == NULL) GOTO(out, rc = -EUNATCH); -#ifdef DEBUG_MUTEX - proc_spl_mutex = proc_mkdir("mutex", proc_spl); - if (proc_spl_mutex == NULL) - GOTO(out, rc = -EUNATCH); - - proc_spl_mutex_stats = create_proc_entry("stats_per", 0444, - proc_spl_mutex); - if (proc_spl_mutex_stats == NULL) - GOTO(out, rc = -EUNATCH); - - proc_spl_mutex_stats->proc_fops = &proc_mutex_operations; -#endif /* DEBUG_MUTEX */ - #ifdef DEBUG_KMEM proc_spl_kmem = proc_mkdir("kmem", proc_spl); if (proc_spl_kmem == NULL) @@ -1223,16 +1071,12 @@ out: remove_proc_entry("slab", proc_spl_kmem); #endif remove_proc_entry("kmem", proc_spl); -#ifdef DEBUG_MUTEX - remove_proc_entry("stats_per", proc_spl_mutex); -#endif - remove_proc_entry("mutex", proc_spl); remove_proc_entry("spl", NULL); #ifdef CONFIG_SYSCTL spl_unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ } -#endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ +#endif /* DEBUG_KMEM || DEBUG_KSTAT */ RETURN(rc); } @@ -1242,18 +1086,14 @@ proc_fini(void) { ENTRY; -#if defined(DEBUG_MUTEX) || defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) +#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) remove_proc_entry("kstat", proc_spl); #ifdef DEBUG_KMEM remove_proc_entry("slab", proc_spl_kmem); #endif remove_proc_entry("kmem", proc_spl); -#ifdef DEBUG_MUTEX - remove_proc_entry("stats_per", proc_spl_mutex); -#endif - remove_proc_entry("mutex", proc_spl); remove_proc_entry("spl", NULL); -#endif /* DEBUG_MUTEX || DEBUG_KMEM || DEBUG_KSTAT */ +#endif /* DEBUG_KMEM || DEBUG_KSTAT */ #ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 3d8f94213..72fa32c81 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -26,296 +26,292 @@ #include "splat-internal.h" -#define SPLAT_MUTEX_NAME "mutex" -#define SPLAT_MUTEX_DESC "Kernel Mutex Tests" +#define SPLAT_MUTEX_NAME "mutex" +#define SPLAT_MUTEX_DESC "Kernel Mutex Tests" -#define SPLAT_MUTEX_TEST1_ID 0x0401 -#define SPLAT_MUTEX_TEST1_NAME "tryenter" -#define SPLAT_MUTEX_TEST1_DESC "Validate mutex_tryenter() correctness" +#define SPLAT_MUTEX_TEST1_ID 0x0401 +#define SPLAT_MUTEX_TEST1_NAME "tryenter" +#define SPLAT_MUTEX_TEST1_DESC "Validate mutex_tryenter() correctness" -#define SPLAT_MUTEX_TEST2_ID 0x0402 -#define SPLAT_MUTEX_TEST2_NAME "race" -#define SPLAT_MUTEX_TEST2_DESC "Many threads entering/exiting the mutex" +#define SPLAT_MUTEX_TEST2_ID 0x0402 +#define SPLAT_MUTEX_TEST2_NAME "race" +#define SPLAT_MUTEX_TEST2_DESC "Many threads entering/exiting the mutex" -#define SPLAT_MUTEX_TEST3_ID 0x0403 -#define SPLAT_MUTEX_TEST3_NAME "owned" -#define SPLAT_MUTEX_TEST3_DESC "Validate mutex_owned() correctness" +#define SPLAT_MUTEX_TEST3_ID 0x0403 +#define SPLAT_MUTEX_TEST3_NAME "owned" +#define SPLAT_MUTEX_TEST3_DESC "Validate mutex_owned() correctness" -#define SPLAT_MUTEX_TEST4_ID 0x0404 -#define SPLAT_MUTEX_TEST4_NAME "owner" -#define SPLAT_MUTEX_TEST4_DESC "Validate mutex_owner() correctness" +#define SPLAT_MUTEX_TEST4_ID 0x0404 +#define SPLAT_MUTEX_TEST4_NAME "owner" +#define SPLAT_MUTEX_TEST4_DESC "Validate mutex_owner() correctness" -#define SPLAT_MUTEX_TEST_MAGIC 0x115599DDUL -#define SPLAT_MUTEX_TEST_NAME "mutex_test" -#define SPLAT_MUTEX_TEST_TASKQ "mutex_taskq" -#define SPLAT_MUTEX_TEST_COUNT 128 +#define SPLAT_MUTEX_TEST_MAGIC 0x115599DDUL +#define SPLAT_MUTEX_TEST_NAME "mutex_test" +#define SPLAT_MUTEX_TEST_TASKQ "mutex_taskq" +#define SPLAT_MUTEX_TEST_COUNT 128 typedef struct mutex_priv { unsigned long mp_magic; struct file *mp_file; - kmutex_t mp_mtx; - int mp_rc; + kmutex_t mp_mtx; + int mp_rc; } mutex_priv_t; static void splat_mutex_test1_func(void *arg) { - mutex_priv_t *mp = (mutex_priv_t *)arg; - ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); + mutex_priv_t *mp = (mutex_priv_t *)arg; + ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); - if (mutex_tryenter(&mp->mp_mtx)) { - mp->mp_rc = 0; - mutex_exit(&mp->mp_mtx); - } else { - mp->mp_rc = -EBUSY; - } + if (mutex_tryenter(&mp->mp_mtx)) { + mp->mp_rc = 0; + mutex_exit(&mp->mp_mtx); + } else { + mp->mp_rc = -EBUSY; + } } static int splat_mutex_test1(struct file *file, void *arg) { - mutex_priv_t *mp; - taskq_t *tq; - int id, rc = 0; + mutex_priv_t *mp; + taskq_t *tq; + int id, rc = 0; - mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); - if (mp == NULL) - return -ENOMEM; + mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); + if (mp == NULL) + return -ENOMEM; - tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, maxclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE); - if (tq == NULL) { - rc = -ENOMEM; - goto out2; - } + tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE); + if (tq == NULL) { + rc = -ENOMEM; + goto out2; + } - mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; - mp->mp_file = file; - mutex_init(&mp->mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mutex_enter(&mp->mp_mtx); + mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; + mp->mp_file = file; + mutex_init(&mp->mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_enter(&mp->mp_mtx); - /* - * Schedule a task function which will try and acquire the mutex via - * mutex_tryenter() while it's held. This should fail and the task - * function will indicate this status in the passed private data. - */ - mp->mp_rc = -EINVAL; - id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); - if (id == 0) { - mutex_exit(&mp->mp_mtx); - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "taskq_dispatch() failed\n"); - rc = -EINVAL; - goto out; - } + /* + * Schedule a task function which will try and acquire the mutex via + * mutex_tryenter() while it's held. This should fail and the task + * function will indicate this status in the passed private data. + */ + mp->mp_rc = -EINVAL; + id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); + if (id == 0) { + mutex_exit(&mp->mp_mtx); + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "taskq_dispatch() failed\n"); + rc = -EINVAL; + goto out; + } - taskq_wait_id(tq, id); - mutex_exit(&mp->mp_mtx); + taskq_wait_id(tq, id); + mutex_exit(&mp->mp_mtx); - /* Task function successfully acquired mutex, very bad! */ - if (mp->mp_rc != -EBUSY) { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, - "mutex_trylock() incorrectly succeeded when " - "the mutex was held, %d/%d\n", id, mp->mp_rc); - rc = -EINVAL; - goto out; - } else { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "mutex_trylock() correctly failed when " - "the mutex was held\n"); - } + /* Task function successfully acquired mutex, very bad! */ + if (mp->mp_rc != -EBUSY) { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, + "mutex_trylock() incorrectly succeeded when " + "the mutex was held, %d/%d\n", id, mp->mp_rc); + rc = -EINVAL; + goto out; + } else { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "mutex_trylock() correctly failed when " + "the mutex was held\n"); + } - /* - * Schedule a task function which will try and acquire the mutex via - * mutex_tryenter() while it is not held. This should succeed and - * can be verified by checking the private data. - */ - mp->mp_rc = -EINVAL; - id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); - if (id == 0) { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "taskq_dispatch() failed\n"); - rc = -EINVAL; - goto out; - } + /* + * Schedule a task function which will try and acquire the mutex via + * mutex_tryenter() while it is not held. This should succeed and + * can be verified by checking the private data. + */ + mp->mp_rc = -EINVAL; + id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); + if (id == 0) { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "taskq_dispatch() failed\n"); + rc = -EINVAL; + goto out; + } - taskq_wait_id(tq, id); + taskq_wait_id(tq, id); - /* Task function failed to acquire mutex, very bad! */ - if (mp->mp_rc != 0) { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, - "mutex_trylock() incorrectly failed when " - "the mutex was not held, %d/%d\n", id, mp->mp_rc); - rc = -EINVAL; - } else { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "mutex_trylock() correctly succeeded " - "when the mutex was not held\n"); - } + /* Task function failed to acquire mutex, very bad! */ + if (mp->mp_rc != 0) { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, + "mutex_trylock() incorrectly failed when " + "the mutex was not held, %d/%d\n", id, mp->mp_rc); + rc = -EINVAL; + } else { + splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", + "mutex_trylock() correctly succeeded " + "when the mutex was not held\n"); + } out: - taskq_destroy(tq); - mutex_destroy(&(mp->mp_mtx)); + taskq_destroy(tq); + mutex_destroy(&(mp->mp_mtx)); out2: - kfree(mp); - return rc; + kfree(mp); + return rc; } static void splat_mutex_test2_func(void *arg) { - mutex_priv_t *mp = (mutex_priv_t *)arg; - int rc; - ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); + mutex_priv_t *mp = (mutex_priv_t *)arg; + int rc; + ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); - /* Read the value before sleeping and write it after we wake up to - * maximize the chance of a race if mutexs are not working properly */ - mutex_enter(&mp->mp_mtx); - rc = mp->mp_rc; - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 100); /* 1/100 of a second */ - VERIFY(mp->mp_rc == rc); - mp->mp_rc = rc + 1; - mutex_exit(&mp->mp_mtx); + /* Read the value before sleeping and write it after we wake up to + * maximize the chance of a race if mutexs are not working properly */ + mutex_enter(&mp->mp_mtx); + rc = mp->mp_rc; + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ / 100); /* 1/100 of a second */ + VERIFY(mp->mp_rc == rc); + mp->mp_rc = rc + 1; + mutex_exit(&mp->mp_mtx); } static int splat_mutex_test2(struct file *file, void *arg) { - mutex_priv_t *mp; - taskq_t *tq; - int i, rc = 0; + mutex_priv_t *mp; + taskq_t *tq; + int i, rc = 0; - mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); - if (mp == NULL) - return -ENOMEM; + mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); + if (mp == NULL) + return -ENOMEM; - /* Create several threads allowing tasks to race with each other */ - tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, num_online_cpus(), - maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); - if (tq == NULL) { - rc = -ENOMEM; - goto out; - } + /* Create several threads allowing tasks to race with each other */ + tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, num_online_cpus(), + maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); + if (tq == NULL) { + rc = -ENOMEM; + goto out; + } - mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; - mp->mp_file = file; - mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mp->mp_rc = 0; + mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; + mp->mp_file = file; + mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mp->mp_rc = 0; - /* - * Schedule N work items to the work queue each of which enters the - * mutex, sleeps briefly, then exits the mutex. On a multiprocessor - * box these work items will be handled by all available CPUs. The - * task function checks to ensure the tracked shared variable is - * always only incremented by one. Additionally, the mutex itself - * is instrumented such that if any two processors are in the - * critical region at the same time the system will panic. If the - * mutex is implemented right this will never happy, that's a pass. - */ - for (i = 0; i < SPLAT_MUTEX_TEST_COUNT; i++) { - if (!taskq_dispatch(tq, splat_mutex_test2_func, mp, TQ_SLEEP)) { - splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, - "Failed to queue task %d\n", i); - rc = -EINVAL; - } - } + /* + * Schedule N work items to the work queue each of which enters the + * mutex, sleeps briefly, then exits the mutex. On a multiprocessor + * box these work items will be handled by all available CPUs. The + * task function checks to ensure the tracked shared variable is + * always only incremented by one. Additionally, the mutex itself + * is instrumented such that if any two processors are in the + * critical region at the same time the system will panic. If the + * mutex is implemented right this will never happy, that's a pass. + */ + for (i = 0; i < SPLAT_MUTEX_TEST_COUNT; i++) { + if (!taskq_dispatch(tq, splat_mutex_test2_func, mp, TQ_SLEEP)) { + splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, + "Failed to queue task %d\n", i); + rc = -EINVAL; + } + } - taskq_wait(tq); + taskq_wait(tq); - if (mp->mp_rc == SPLAT_MUTEX_TEST_COUNT) { - splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " - "correctly entered/exited the mutex %d times\n", - num_online_cpus(), mp->mp_rc); - } else { - splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " - "only processed %d/%d mutex work items\n", - num_online_cpus(),mp->mp_rc,SPLAT_MUTEX_TEST_COUNT); - rc = -EINVAL; - } + if (mp->mp_rc == SPLAT_MUTEX_TEST_COUNT) { + splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " + "correctly entered/exited the mutex %d times\n", + num_online_cpus(), mp->mp_rc); + } else { + splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " + "only processed %d/%d mutex work items\n", + num_online_cpus(),mp->mp_rc,SPLAT_MUTEX_TEST_COUNT); + rc = -EINVAL; + } - taskq_destroy(tq); - mutex_destroy(&(mp->mp_mtx)); + taskq_destroy(tq); + mutex_destroy(&(mp->mp_mtx)); out: - kfree(mp); - return rc; + kfree(mp); + return rc; } static int splat_mutex_test3(struct file *file, void *arg) { kmutex_t mtx; - int rc = 0; + int rc = 0; - mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_enter(&mtx); - mutex_enter(&mtx); + /* Mutex should be owned by current */ + if (!mutex_owned(&mtx)) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Unowned mutex " + "should be owned by pid %d\n", current->pid); + rc = -EINVAL; + goto out; + } - /* Mutex should be owned by current */ - if (!mutex_owned(&mtx)) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " - "be owned by pid %d but is owned by pid %d\n", - current->pid, mtx.km_owner ? mtx.km_owner->pid : -1); - rc = -EINVAL; - goto out; - } + mutex_exit(&mtx); - mutex_exit(&mtx); - - /* Mutex should not be owned by any task */ - if (mutex_owned(&mtx)) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " - "not be owned but is owned by pid %d\n", - mtx.km_owner ? mtx.km_owner->pid : -1); - rc = -EINVAL; - goto out; - } + /* Mutex should not be owned by any task */ + if (mutex_owned(&mtx)) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex owned by " + "pid %d should be unowned\b", current->pid); + rc = -EINVAL; + goto out; + } splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "%s", - "Correct mutex_owned() behavior\n"); + "Correct mutex_owned() behavior\n"); out: - mutex_destroy(&mtx); + mutex_destroy(&mtx); - return rc; + return rc; } static int splat_mutex_test4(struct file *file, void *arg) { kmutex_t mtx; - kthread_t *owner; - int rc = 0; + kthread_t *owner; + int rc = 0; - mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + mutex_enter(&mtx); - mutex_enter(&mtx); + /* Mutex should be owned by current */ + owner = mutex_owner(&mtx); + if (current != owner) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " + "be owned by pid %d but is owned by pid %d\n", + current->pid, owner ? owner->pid : -1); + rc = -EINVAL; + goto out; + } - /* Mutex should be owned by current */ - owner = mutex_owner(&mtx); - if (current != owner) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " - "be owned by pid %d but is owned by pid %d\n", - current->pid, owner ? owner->pid : -1); - rc = -EINVAL; - goto out; - } + mutex_exit(&mtx); - mutex_exit(&mtx); - - /* Mutex should not be owned by any task */ - owner = mutex_owner(&mtx); - if (owner) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should not " - "be owned but is owned by pid %d\n", owner->pid); - rc = -EINVAL; - goto out; - } + /* Mutex should not be owned by any task */ + owner = mutex_owner(&mtx); + if (owner) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should not " + "be owned but is owned by pid %d\n", owner->pid); + rc = -EINVAL; + goto out; + } splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "%s", - "Correct mutex_owner() behavior\n"); + "Correct mutex_owner() behavior\n"); out: - mutex_destroy(&mtx); + mutex_destroy(&mtx); - return rc; + return rc; } splat_subsystem_t * diff --git a/spl_config.h.in b/spl_config.h.in index eedff8e81..bd42119cb 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -9,9 +9,6 @@ /* Define to 1 to enable kstat debugging */ #undef DEBUG_KSTAT -/* Define to 1 to enable mutex debugging */ -#undef DEBUG_MUTEX - /* register_sysctl_table() wants 2 args */ #undef HAVE_2ARGS_REGISTER_SYSCTL @@ -102,6 +99,9 @@ /* mutex_lock_nested() is available */ #undef HAVE_MUTEX_LOCK_NESTED +/* struct mutex has owner */ +#undef HAVE_MUTEX_OWNER + /* next_online_pgdat() is available */ #undef HAVE_NEXT_ONLINE_PGDAT From 0e77fc118e2c105af0df5d1c7aa6627ed601bfa1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 29 Sep 2009 03:19:09 -0700 Subject: [PATCH 0318/1062] Expand SEM() outside init_rwsem and directly call __init_rwsem(). We need to directly call __init_rwsem() or the name gets expanded to SEM(lock-name). This is safe and correct for the support arches x86/x86_64/ppc/ppc64. --- include/sys/rwlock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index a68d07243..75356b95d 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -154,7 +154,9 @@ RW_LOCK_HELD(krwlock_t *rwp) */ #define rw_init(rwp, name, type, arg) \ ({ \ - init_rwsem(SEM(rwp)); \ + static struct lock_class_key __key; \ + \ + __init_rwsem(SEM(rwp), #rwp, &__key); \ spl_rw_clear_owner(rwp); \ }) From 51a727e90f1dd11194737e64e85ca09d34be5d8b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Oct 2009 16:06:15 -0700 Subject: [PATCH 0319/1062] Set cwd to '/' for the process executing insmod. Ricardo has pointed out that under Solaris the cwd is set to '/' during module load, while under Linux it is set to the callers cwd. To handle this cleanly I've reworked the module *_init()/_exit() macros so they call a *_setup()/_cleanup() function when any SPL dependent module is loaded or unloaded. This gives us a chance to perform any needed modification of the process, in this case changing the cwd. It also handily provides a way to avoid creating wrapper init()/exit() functions because the Solaris and Linux prototypes differ slightly. All dependent modules should now call the spl helper macros spl_module_{init,exit}() instead of the native linux versions. Unfortunately, it appears that under Linux there has been no consistent API in the kernel to set the cwd in a module. Because of this I have had to add more autoconf magic than I'd like. However, what I have done is correct and has been tested on RHEL5, SLES11, FC11, and CHAOS kernels. In addition, I have change the rootdir type from a 'void *' to the correct 'vnode_t *' type. And I've set rootdir to a non-NULL value. --- config/spl-build.m4 | 33 ++++++ configure | 210 ++++++++++++++++++++++++++++++++++ include/linux/module_compat.h | 35 ++++++ include/sys/sysmacros.h | 2 + include/sys/types.h | 1 + include/sys/vnode.h | 3 +- module/spl/spl-generic.c | 26 ++++- module/spl/spl-vnode.c | 86 +++++++++++++- module/splat/splat-ctl.c | 10 +- spl_config.h.in | 6 + 10 files changed, 404 insertions(+), 8 deletions(-) create mode 100644 include/linux/module_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 3293aa273..e6a626108 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -64,6 +64,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_ZONE_STAT_ITEM_INACTIVE SPL_AC_ZONE_STAT_ITEM_ACTIVE SPL_AC_GET_ZONE_COUNTS + SPL_AC_SET_FS_PWD + SPL_AC_2ARGS_SET_FS_PWD SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME SPL_AC_CRED_STRUCT @@ -1203,6 +1205,37 @@ AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ ]) ]) +dnl # +dnl # Symbol available in RHEL kernels not in stock kernels. +dnl # +AC_DEFUN([SPL_AC_SET_FS_PWD], [ + SPL_CHECK_SYMBOL_EXPORT( + [set_fs_pwd], + [], + [AC_DEFINE(HAVE_SET_FS_PWD, 1, + [set_fs_pwd() is available])], + []) +]) + +dnl # +dnl # 2.6.25 API change, +dnl # Simplied API by replacing mnt+dentry args with a single path arg. +dnl # +AC_DEFUN([SPL_AC_2ARGS_SET_FS_PWD], + [AC_MSG_CHECKING([whether set_fs_pwd() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + set_fs_pwd(NULL, NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_SET_FS_PWD, 1, + [set_fs_pwd() wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # SLES API change, never adopted in mainline, dnl # Third 'struct vfsmount *' argument removed. diff --git a/configure b/configure index 03b23036e..8c8736883 100755 --- a/configure +++ b/configure @@ -21709,6 +21709,111 @@ _ACEOF +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 +echo $ECHO_N "checking whether symbol set_fs_pwd is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_FS_PWD 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_FS_PWD 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 +echo $ECHO_N "checking whether set_fs_pwd() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + set_fs_pwd(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_SET_FS_PWD 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + fi rm -Rf build @@ -24752,6 +24857,111 @@ _ACEOF +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 +echo $ECHO_N "checking whether symbol set_fs_pwd is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_FS_PWD 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_FS_PWD 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 +echo $ECHO_N "checking whether set_fs_pwd() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + set_fs_pwd(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_SET_FS_PWD 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + fi rm -Rf build diff --git a/include/linux/module_compat.h b/include/linux/module_compat.h new file mode 100644 index 000000000..766cb58ea --- /dev/null +++ b/include/linux/module_compat.h @@ -0,0 +1,35 @@ +#ifndef _SPL_MODULE_COMPAT_H +#define _SPL_MODULE_COMPAT_H + +#include + +#define spl_module_init(init_fn) \ +static int \ +spl_##init_fn(void) \ +{ \ + int rc; \ + \ + spl_setup(); \ + rc = init_fn(); \ + \ + return rc; \ +} \ + \ +module_init(spl_##init_fn) + +#define spl_module_exit(exit_fn) \ +static void \ +spl_##exit_fn(void) \ +{ \ + int rc; \ + \ + rc = exit_fn(); \ + spl_cleanup(); \ + if (rc) \ + printk(KERN_ERR "SPL: Failure %d unloading " \ + "dependent module\n", rc); \ +} \ + \ +module_exit(spl_##exit_fn) + +#endif /* _SPL_MODULE_COMPAT_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 67afbfeb0..e66d8d991 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -144,6 +144,8 @@ extern int p0; /* Missing misc functions */ extern int highbit(unsigned long i); extern uint32_t zone_get_hostid(void *zone); +extern void spl_setup(void); +extern void spl_cleanup(void); #define makedevice(maj,min) makedev(maj,min) diff --git a/include/sys/types.h b/include/sys/types.h index 252def7bd..89cf115c0 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -18,6 +18,7 @@ extern "C" { #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 7972f6548..d8a8df272 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -215,6 +215,7 @@ extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); extern file_t *vn_getf(int fd); extern void vn_releasef(int fd); +extern int vn_set_pwd(const char *filename); int vn_init(void); void vn_fini(void); @@ -241,7 +242,7 @@ vn_putpage(vnode_t *vp, offset_t off, ssize_t size, #define getf vn_getf #define releasef vn_releasef -extern void *rootdir; +extern vnode_t *rootdir; #ifdef __cplusplus } diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 8bf97e0cf..dc0ac21d0 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -358,7 +358,8 @@ set_kallsyms_lookup_name(void) } #endif -static int __init spl_init(void) +static int +__init spl_init(void) { int rc = 0; @@ -421,7 +422,8 @@ out1: return rc; } -static void spl_fini(void) +static void +spl_fini(void) { ENTRY; @@ -436,6 +438,26 @@ static void spl_fini(void) debug_fini(); } +/* Called when a dependent module is loaded */ +void +spl_setup(void) +{ + /* + * At module load time the pwd is set to '/' on a Solaris system. + * On a Linux system will be set to whatever directory the caller + * was in when executing insmod/modprobe. + */ + vn_set_pwd("/"); +} +EXPORT_SYMBOL(spl_setup); + +/* Called when a dependent module is unloaded */ +void +spl_cleanup(void) +{ +} +EXPORT_SYMBOL(spl_cleanup); + module_init(spl_init); module_exit(spl_fini); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 08c339a5a..7d2080022 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -34,7 +34,7 @@ #define DEBUG_SUBSYSTEM S_VNODE -void *rootdir = NULL; +vnode_t *rootdir = (vnode_t *)0xabcd1234; EXPORT_SYMBOL(rootdir); static spl_kmem_cache_t *vn_cache; @@ -602,6 +602,90 @@ vn_releasef(int fd) } /* releasef() */ EXPORT_SYMBOL(releasef); +#ifndef HAVE_SET_FS_PWD +# ifdef HAVE_2ARGS_SET_FS_PWD +/* Used from 2.6.25 - 2.6.31+ */ +void +set_fs_pwd(struct fs_struct *fs, struct path *path) +{ + struct path old_pwd; + + write_lock(&fs->lock); + old_pwd = fs->pwd; + fs->pwd = *path; + path_get(path); + write_unlock(&fs->lock); + + if (old_pwd.dentry) + path_put(&old_pwd); +} +# else +/* Used from 2.6.11 - 2.6.24 */ +void +set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, struct dentry *dentry) +{ + struct dentry *old_pwd; + struct vfsmount *old_pwdmnt; + + write_lock(&fs->lock); + old_pwd = fs->pwd; + old_pwdmnt = fs->pwdmnt; + fs->pwdmnt = mntget(mnt); + fs->pwd = dget(dentry); + write_unlock(&fs->lock); + + if (old_pwd) { + dput(old_pwd); + mntput(old_pwdmnt); + } +} +# endif /* HAVE_2ARGS_SET_FS_PWD */ +#endif /* HAVE_SET_FS_PWD */ + +int +vn_set_pwd(const char *filename) +{ +#ifdef HAVE_2ARGS_SET_FS_PWD + struct path path; + int rc; + ENTRY; + + rc = user_path_dir(filename, &path); + if (rc) + GOTO(out, rc); + + rc = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_ACCESS); + if (rc) + GOTO(dput_and_out, rc); + + set_fs_pwd(current->fs, &path); + +dput_and_out: + path_put(&path); +#else + struct nameidata nd; + int rc; + ENTRY; + + rc = __user_walk(filename, + LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); + if (rc) + GOTO(out, rc); + + rc = vfs_permission(&nd, MAY_EXEC); + if (rc) + GOTO(dput_and_out, rc); + + set_fs_pwd(current->fs, nd.nd_mnt, nd.nd_dentry); + +dput_and_out: + vn_path_release(&nd); +#endif /* HAVE_2ARGS_SET_FS_PWD */ +out: + RETURN(-rc); +} /* vn_set_pwd() */ +EXPORT_SYMBOL(vn_set_pwd); + static int vn_cache_constructor(void *buf, void *cdrarg, int kmflags) { diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 159103980..9e52ab4fb 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -608,7 +608,7 @@ static struct cdev splat_cdev = { .kobj = { .name = SPLAT_NAME, }, }; -static int __init +static int splat_init(void) { dev_t dev; @@ -667,7 +667,7 @@ error: return rc; } -static void +static int splat_fini(void) { dev_t dev = MKDEV(SPLAT_MAJOR, 0); @@ -695,10 +695,12 @@ splat_fini(void) ASSERT(list_empty(&splat_module_list)); printk(KERN_INFO "SPLAT: Unloaded Solaris Porting LAyer " "Tests v%s\n", SPL_META_VERSION); + + return 0; } -module_init(splat_init); -module_exit(splat_fini); +spl_module_init(splat_init); +spl_module_exit(splat_fini); MODULE_AUTHOR("Lawrence Livermore National Labs"); MODULE_DESCRIPTION("Solaris Porting LAyer Tests"); diff --git a/spl_config.h.in b/spl_config.h.in index bd42119cb..176da466b 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -12,6 +12,9 @@ /* register_sysctl_table() wants 2 args */ #undef HAVE_2ARGS_REGISTER_SYSCTL +/* set_fs_pwd() wants 2 args */ +#undef HAVE_2ARGS_SET_FS_PWD + /* vfs_unlink() wants 2 args */ #undef HAVE_2ARGS_VFS_UNLINK @@ -120,6 +123,9 @@ /* __put_task_struct() is available */ #undef HAVE_PUT_TASK_STRUCT +/* set_fs_pwd() is available */ +#undef HAVE_SET_FS_PWD + /* set_normalized_timespec() is available as export */ #undef HAVE_SET_NORMALIZED_TIMESPEC_EXPORT From 39ab544079015f2b7ad854ef9c8815290d971f17 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 2 Oct 2009 16:21:59 -0700 Subject: [PATCH 0320/1062] Use kobject_set_name() for increased portability. As of 2.6.25 kobj->k_name was replaced with kobj->name. Some distros such as RHEL5 (2.6.18) add a patch to prevent this from being a problem but other older distros such as SLES10 (2.6.16) have not. To avoid the whole issue I'm updating the code to use kobject_set_name() which does what I want and has existed all the way back to 2.6.11. --- module/splat/splat-ctl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 9e52ab4fb..36a690743 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -590,6 +590,7 @@ static loff_t splat_seek(struct file *file, loff_t offset, int origin) return rc; } +static struct cdev splat_cdev; static struct file_operations splat_fops = { .owner = THIS_MODULE, .open = splat_open, @@ -603,11 +604,6 @@ static struct file_operations splat_fops = { .llseek = splat_seek, }; -static struct cdev splat_cdev = { - .owner = THIS_MODULE, - .kobj = { .name = SPLAT_NAME, }, -}; - static int splat_init(void) { @@ -638,6 +634,8 @@ splat_init(void) /* Support for registering a character driver */ cdev_init(&splat_cdev, &splat_fops); + splat_cdev.owner = THIS_MODULE; + kobject_set_name(&splat_cdev.kobj, SPLAT_NAME); if ((rc = cdev_add(&splat_cdev, dev, SPLAT_MINORS))) { printk(KERN_ERR "SPLAT: Error adding cdev, %d\n", rc); kobject_put(&splat_cdev.kobj); From f44078fad5a941f2489ce0bbb8ed2c521f13f26e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Oct 2009 12:51:58 -0700 Subject: [PATCH 0321/1062] Remove usage of the __id_u macro for portability. This macro was removed from the default RPM macro file. Interestly, some of the arch specific macro's add it back it based on your distro but it should not be counted on. However, __id still exists and its command line args have historically been fairly stable so we will directly use %{__id} -un to get the user name. --- spl-modules.spec.in | 2 +- spl.spec.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 7740d9422..0c3dd10a9 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -168,7 +168,7 @@ Version: %{version} Release: %{release} License: @LICENSE@ URL: git://eris.llnl.gov/spl.git -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) Source: @PACKAGE@-%{version}.tar.gz Requires: %{requires} BuildRequires: %{kdevpkg} diff --git a/spl.spec.in b/spl.spec.in index 34207f626..fcb3dcfc8 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -10,7 +10,7 @@ Version: %{version} Release: %{release} License: @LICENSE@ URL: git://eris.llnl.gov/spl.git -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) Source: %{name}-%{version}.tar.gz %description From 4bd577d069985e7b79357cb9744a46b03cdf881b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 27 Oct 2009 15:54:45 -0700 Subject: [PATCH 0322/1062] Rebase cmn_err on vcmn_err and don't warn about missing \n The cmn_err/vcmn_err functions are layered on top of the debug system which usually expects a newline at the end. However, there really doesn't need to be a newline there and there in fact should not be for the CE_CONT case so let's just drop the warning. Also we make a half-hearted attempt to handle a leading ! which means only send it to the syslog not the console. In this case we just send to the the debug logs and not the console. --- module/spl/spl-debug.c | 4 ---- module/spl/spl-err.c | 37 +++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 6d71f4b82..a3fcd74e0 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -724,10 +724,6 @@ spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, break; } - if (unlikely(*(string_buf + needed - 1) != '\n')) - printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n", - file, line, fn); - header.ph_len = known_size + needed; debug_buf = (char *)page_address(tage->page) + tage->used; diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index c4508dfa2..8f46aae5b 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -33,10 +33,8 @@ #define DEBUG_SUBSYSTEM S_GENERIC -#ifndef NDEBUG static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; -#endif void vpanic(const char *fmt, va_list ap) @@ -48,20 +46,6 @@ vpanic(const char *fmt, va_list ap) } /* vpanic() */ EXPORT_SYMBOL(vpanic); -void -cmn_err(int ce, const char *fmt, ...) -{ - char msg[MAXMSGLEN]; - va_list ap; - - va_start(ap, fmt); - vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); - va_end(ap); - - CERROR("%s", msg); -} /* cmn_err() */ -EXPORT_SYMBOL(cmn_err); - void vcmn_err(int ce, const char *fmt, va_list ap) { @@ -70,9 +54,26 @@ vcmn_err(int ce, const char *fmt, va_list ap) if (ce == CE_PANIC) vpanic(fmt, ap); - if (ce != CE_NOTE) { /* suppress noise in stress testing */ + if (ce != CE_NOTE) { vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); - CERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); + + if (fmt[0] == '!') + CDEBUG(D_INFO, "%s%s%s", + ce_prefix[ce], msg, ce_suffix[ce]); + else + CERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); } } /* vcmn_err() */ EXPORT_SYMBOL(vcmn_err); + +void +cmn_err(int ce, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vcmn_err(ce, fmt, ap); + va_end(ap); +} /* cmn_err() */ +EXPORT_SYMBOL(cmn_err); + From 2b5adaf18fde25b963a9d21407773544f2cbed6f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 27 Oct 2009 16:17:06 -0700 Subject: [PATCH 0323/1062] I should not have removed these, they are important. --- module/spl/spl-err.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 8f46aae5b..3ee284868 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -33,8 +33,10 @@ #define DEBUG_SUBSYSTEM S_GENERIC +#ifndef NDEBUG static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; +#endif void vpanic(const char *fmt, va_list ap) From 5e9b5d832b228b0628a61c9c1c9bf0b05d2fe122 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Oct 2009 10:55:25 -0700 Subject: [PATCH 0324/1062] Use Linux atomic primitives by default. Previously Solaris style atomic primitives were implemented simply by wrapping the desired operation in a global spinlock. This was easy to implement at the time when I wasn't 100% sure I could safely layer the Solaris atomic primatives on the Linux counterparts. It however was likely not good for performance. After more investigation however it does appear the Solaris primitives can be layered on Linux's fairly safely. The Linux atomic_t type really just wraps a long so we can simply cast the Solaris unsigned value to either a atomic_t or atomic64_t. The only lingering problem for both implementations is that Solaris provides no atomic read function. This means reading a 64-bit value on a 32-bit arch can (and will) result in word breaking. I was very concerned about this initially, but upon further reflection it is a limitation of the Solaris API. So really we are just being bug-for-bug compatible here. With this change the default implementation is layered on top of Linux atomic types. However, because we're assuming a lot about the internal implementation of those types I've made it easy to fall-back to the generic approach. Simply build with --enable-atomic_spinlocks if issues are encountered with the new implementation. --- config/spl-build.m4 | 22 ++++++ configure | 104 ++++++++++++++++++++-------- include/sys/atomic.h | 146 ++++++++++++++++++++++++++-------------- module/spl/spl-atomic.c | 6 +- spl_config.h.in | 3 + 5 files changed, 202 insertions(+), 79 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index e6a626108..15d10841b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -25,6 +25,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_KSTAT SPL_AC_DEBUG_CALLB + SPL_AC_ATOMIC_SPINLOCK SPL_AC_TYPE_UINTPTR_T SPL_AC_TYPE_ATOMIC64_T SPL_AC_3ARGS_INIT_WORK @@ -302,6 +303,27 @@ AC_DEFUN([SPL_AC_DEBUG_CALLB], [ fi ]) +dnl # +dnl # Use the atomic implemenation based on global spinlocks. This +dnl # should never be needed, however it has been left in place as +dnl # a fallback option in case problems are observed with directly +dnl # mapping to the native Linux atomic operations. +dnl # +AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ + AC_ARG_ENABLE([atomic-spinlocks], + [AS_HELP_STRING([--enable-atomic-spinlocks], + [Atomic types use spinlocks @<:@default=no@:>@])], + [], + [enable_atomic_spinlocks=no]) + + AS_IF([test "x$enable_atomic_spinlocks" = xyes], + [AC_DEFINE([ATOMIC_SPINLOCK], [1], + [Atomic types use spinlocks])]) + + AC_MSG_CHECKING([whether atomic types use spinlocks]) + AC_MSG_RESULT([$enable_atomic_spinlocks]) +]) + dnl # dnl # SPL_LINUX_CONFTEST dnl # diff --git a/configure b/configure index 8c8736883..bcbd0fb54 100755 --- a/configure +++ b/configure @@ -1038,6 +1038,8 @@ Optional Features: --enable-debug-kmem Enable kmem debug support (default off) --enable-debug-kstat Enable kstat debug support (default off) --enable-debug-callb Enable callb debug support (default off) + --enable-atomic-spinlocks + Atomic types use spinlocks [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3986,7 +3988,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3989 "configure"' > conftest.$ac_ext + echo '#line 3991 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5585,7 +5587,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5588:" \ +echo "$as_me:5590:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6648,11 +6650,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6653: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6655: \$? = $ac_status" >&5 + echo "$as_me:6657: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6916,11 +6918,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6919: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6921: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6923: \$? = $ac_status" >&5 + echo "$as_me:6925: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7020,11 +7022,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7023: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7025: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7027: \$? = $ac_status" >&5 + echo "$as_me:7029: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8489,7 +8491,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8492 "configure"' > conftest.$ac_ext + echo '#line 8494 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9386,7 +9388,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11834: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11836: \$? = $ac_status" >&5 + echo "$as_me:11838: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11933,11 +11935,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11936: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11938: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11940: \$? = $ac_status" >&5 + echo "$as_me:11942: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12469,7 +12471,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12472 "configure"' > conftest.$ac_ext + echo '#line 12474 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13527,11 +13529,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13530: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13532: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13534: \$? = $ac_status" >&5 + echo "$as_me:13536: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13631,11 +13633,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13634: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13636: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13638: \$? = $ac_status" >&5 + echo "$as_me:13640: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15080,7 +15082,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15083 "configure"' > conftest.$ac_ext + echo '#line 15085 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15858,11 +15860,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15863: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15865: \$? = $ac_status" >&5 + echo "$as_me:15867: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16126,11 +16128,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16129: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16131: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16133: \$? = $ac_status" >&5 + echo "$as_me:16135: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16230,11 +16232,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16235: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16237: \$? = $ac_status" >&5 + echo "$as_me:16239: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17699,7 +17701,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17702 "configure"' > conftest.$ac_ext + echo '#line 17704 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19203,6 +19205,29 @@ _ACEOF echo "${ECHO_T}no" >&6 fi + + # Check whether --enable-atomic-spinlocks or --disable-atomic-spinlocks was given. +if test "${enable_atomic_spinlocks+set}" = set; then + enableval="$enable_atomic_spinlocks" + +else + enable_atomic_spinlocks=no +fi; + + if test "x$enable_atomic_spinlocks" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_SPINLOCK 1 +_ACEOF + +fi + + + echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 +echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 +echo "${ECHO_T}$enable_atomic_spinlocks" >&6 + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 @@ -22351,6 +22376,29 @@ _ACEOF echo "${ECHO_T}no" >&6 fi + + # Check whether --enable-atomic-spinlocks or --disable-atomic-spinlocks was given. +if test "${enable_atomic_spinlocks+set}" = set; then + enableval="$enable_atomic_spinlocks" + +else + enable_atomic_spinlocks=no +fi; + + if test "x$enable_atomic_spinlocks" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_SPINLOCK 1 +_ACEOF + +fi + + + echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 +echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 +echo "${ECHO_T}$enable_atomic_spinlocks" >&6 + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 diff --git a/include/sys/atomic.h b/include/sys/atomic.h index cd0eb3b0a..4f4a1e058 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -27,31 +27,94 @@ #ifndef _SPL_ATOMIC_H #define _SPL_ATOMIC_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include -#include +#include -/* XXX: Serialize everything through global locks. This is - * going to be bad for performance, but for now it's the easiest - * way to ensure correct behavior. I don't like it at all. - * It would be nicer to make these function to the atomic linux - * functions, but the normal uint64_t type complicates this. +/* + * Two approaches to atomic operations are implemented each with its + * own benefits are drawbacks imposed by the Solaris API. Neither + * approach handles the issue of word breaking when using a 64-bit + * atomic variable on a 32-bit arch. The Solaris API would need to + * add an atomic read call to correctly support this. + * + * When ATOMIC_SPINLOCK is defined all atomic operations will be + * serialized through global spin locks. This is bad for performance + * but it does allow a simple generic implementation. + * + * When ATOMIC_SPINLOCK is not defined the Linux atomic operations + * are used. This is safe as long as the core Linux implementation + * doesn't change because we are relying on the fact that an atomic + * type is really just a uint32 or uint64. If this changes at some + * point in the future we need to fall-back to the spin approach. */ -extern spinlock_t atomic64_lock; +#ifdef ATOMIC_SPINLOCK extern spinlock_t atomic32_lock; +extern spinlock_t atomic64_lock; + +static __inline__ void +atomic_inc_32(volatile uint32_t *target) +{ + spin_lock(&atomic32_lock); + (*target)++; + spin_unlock(&atomic32_lock); +} + +static __inline__ void +atomic_dec_32(volatile uint32_t *target) +{ + spin_lock(&atomic32_lock); + (*target)--; + spin_unlock(&atomic32_lock); +} + +static __inline__ void +atomic_add_32(volatile uint32_t *target, int32_t delta) +{ + spin_lock(&atomic32_lock); + *target += delta; + spin_unlock(&atomic32_lock); +} + +static __inline__ void +atomic_sub_32(volatile uint32_t *target, int32_t delta) +{ + spin_lock(&atomic32_lock); + *target -= delta; + spin_unlock(&atomic32_lock); +} static __inline__ uint32_t -atomic_add_32(volatile uint32_t *target, int32_t delta) +atomic_add_32_nv(volatile uint32_t *target, uint32_t delta) +{ + spin_lock(&atomic32_lock); + *target += delta; + spin_unlock(&atomic32_lock); + + return *target; +} + +static __inline__ uint32_t +atomic_sub_32_nv(volatile uint32_t *target, uint32_t delta) +{ + spin_lock(&atomic32_lock); + *target -= delta; + spin_unlock(&atomic32_lock); + + return *target; +} + +static __inline__ uint32_t +atomic_cas_32(volatile uint32_t *target, uint32_t cmp, + uint32_t newval) { uint32_t rc; spin_lock(&atomic32_lock); rc = *target; - *target += delta; + if (*target == cmp) + *target = newval; + spin_unlock(&atomic32_lock); return rc; @@ -73,30 +136,20 @@ atomic_dec_64(volatile uint64_t *target) spin_unlock(&atomic64_lock); } -static __inline__ uint64_t +static __inline__ void atomic_add_64(volatile uint64_t *target, uint64_t delta) { - uint64_t rc; - spin_lock(&atomic64_lock); - rc = *target; *target += delta; spin_unlock(&atomic64_lock); - - return rc; } -static __inline__ uint64_t +static __inline__ void atomic_sub_64(volatile uint64_t *target, uint64_t delta) { - uint64_t rc; - spin_lock(&atomic64_lock); - rc = *target; *target -= delta; spin_unlock(&atomic64_lock); - - return rc; } static __inline__ uint64_t @@ -121,7 +174,7 @@ atomic_sub_64_nv(volatile uint64_t *target, uint64_t delta) static __inline__ uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp, - uint64_t newval) + uint64_t newval) { uint64_t rc; @@ -134,45 +187,40 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, return rc; } -static __inline__ uint32_t -atomic_cas_32(volatile uint32_t *target, uint32_t cmp, - uint32_t newval) -{ - uint32_t rc; - spin_lock(&atomic32_lock); - rc = *target; - if (*target == cmp) - *target = newval; +#else /* ATOMIC_SPINLOCK */ - spin_unlock(&atomic32_lock); +#define atomic_inc_32(v) atomic_inc((atomic_t *)(v)) +#define atomic_dec_32(v) atomic_dec((atomic_t *)(v)) +#define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v)) +#define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v)) +#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) +#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) +#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) +#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v)) +#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) +#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) +#define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v)) +#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) +#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) +#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) - return rc; -} +#endif /* ATOMIC_SPINLOCK */ #ifdef _LP64 -/* XXX: Implement atomic_cas_ptr() in terms of uint64'ts. This - * is of course only safe and correct for 64 bit arches... but - * for now I'm OK with that. - */ static __inline__ void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { return (void *)atomic_cas_64((volatile uint64_t *)target, (uint64_t)cmp, (uint64_t)newval); } -#else +#else /* _LP64 */ static __inline__ void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { return (void *)atomic_cas_32((volatile uint32_t *)target, (uint32_t)cmp, (uint32_t)newval); } -#endif - -#ifdef __cplusplus -} -#endif +#endif /* _LP64 */ #endif /* _SPL_ATOMIC_H */ - diff --git a/module/spl/spl-atomic.c b/module/spl/spl-atomic.c index 40cdb06cc..decf9515e 100644 --- a/module/spl/spl-atomic.c +++ b/module/spl/spl-atomic.c @@ -32,9 +32,11 @@ #define DEBUG_SUBSYSTEM S_ATOMIC +#ifdef ATOMIC_SPINLOCK /* Global atomic lock declarations */ -spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED; spinlock_t atomic32_lock = SPIN_LOCK_UNLOCKED; +spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED; -EXPORT_SYMBOL(atomic64_lock); EXPORT_SYMBOL(atomic32_lock); +EXPORT_SYMBOL(atomic64_lock); +#endif /* ATOMIC_SPINLOCK */ diff --git a/spl_config.h.in b/spl_config.h.in index 176da466b..feb09a865 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -1,5 +1,8 @@ /* spl_config.h.in. Generated from configure.ac by autoheader. */ +/* Atomic types use spinlocks */ +#undef ATOMIC_SPINLOCK + /* Define to 1 to enable callb debugging */ #undef DEBUG_CALLB From 302b88e6abc3efe86411f9622b0a27a5b8b1f417 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Oct 2009 13:53:17 -0700 Subject: [PATCH 0325/1062] Add autoconf checks for atomic64_cmpxchg + atomic64_xchg These functions didn't exist for all archs prior to 2.6.24. This patch addes an autoconf test to detect this and add them when needed. The autoconf check is needed instead of just an #ifndef because in the most modern kernels atomic64_{cmp}xchg are implemented as in inline function and not a #define. --- config/spl-build.m4 | 40 ++++++ configure | 256 ++++++++++++++++++++++++++++++++++++ include/asm/atomic_compat.h | 8 ++ include/sys/atomic.h | 1 + spl_config.h.in | 6 + 5 files changed, 311 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 15d10841b..9d81ccc8e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -28,6 +28,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_ATOMIC_SPINLOCK SPL_AC_TYPE_UINTPTR_T SPL_AC_TYPE_ATOMIC64_T + SPL_AC_TYPE_ATOMIC64_CMPXCHG + SPL_AC_TYPE_ATOMIC64_XCHG SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SET_SHRINKER @@ -488,6 +490,44 @@ AC_DEFUN([SPL_AC_TYPE_ATOMIC64_T], ]) ]) +dnl # +dnl # 2.6.24 API change, +dnl # check if atomic64_cmpxchg is defined +dnl # +AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG], + [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_ATOMIC64_CMPXCHG, 1, + [kernel defines atomic64_cmpxchg]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + +dnl # +dnl # 2.6.24 API change, +dnl # check if atomic64_xchg is defined +dnl # +AC_DEFUN([SPL_AC_TYPE_ATOMIC64_XCHG], + [AC_MSG_CHECKING([whether kernel defines atomic64_xchg]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + atomic64_xchg((atomic64_t *)NULL, 0); + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_ATOMIC64_XCHG, 1, + [kernel defines atomic64_xchg]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + dnl # dnl # 2.6.20 API change, dnl # INIT_WORK use 2 args and not store data inside diff --git a/configure b/configure index bcbd0fb54..b03faa8c9 100755 --- a/configure +++ b/configure @@ -19350,6 +19350,134 @@ echo "${ECHO_T}no" >&6 +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_cmpxchg... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATOMIC64_CMPXCHG 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_xchg... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_xchg((atomic64_t *)NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATOMIC64_XCHG 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + fi rm -Rf build @@ -22521,6 +22649,134 @@ echo "${ECHO_T}no" >&6 +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_cmpxchg... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATOMIC64_CMPXCHG 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_xchg... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_xchg((atomic64_t *)NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATOMIC64_XCHG 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + fi rm -Rf build diff --git a/include/asm/atomic_compat.h b/include/asm/atomic_compat.h index 2f7376925..c769d6248 100644 --- a/include/asm/atomic_compat.h +++ b/include/asm/atomic_compat.h @@ -55,5 +55,13 @@ static inline void atomic64_set(atomic64_t *v, __s64 i) #endif /* HAVE_ATOMIC64_T */ +#ifndef HAVE_ATOMIC64_CMPXCHG +#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) +#endif + +#ifndef HAVE_ATOMIC64_XCHG +#define atomic64_xchg(v, n) (xchg(&((v)->counter), n)) +#endif + #endif /* _SPL_ATOMIC_COMPAT_H */ diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 4f4a1e058..7a741de17 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -30,6 +30,7 @@ #include #include #include +#include /* * Two approaches to atomic operations are implemented each with its diff --git a/spl_config.h.in b/spl_config.h.in index feb09a865..409ee372d 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -33,9 +33,15 @@ /* device_create wants 5 args */ #undef HAVE_5ARGS_DEVICE_CREATE +/* kernel defines atomic64_cmpxchg */ +#undef HAVE_ATOMIC64_CMPXCHG + /* kernel defines atomic64_t */ #undef HAVE_ATOMIC64_T +/* kernel defines atomic64_xchg */ +#undef HAVE_ATOMIC64_XCHG + /* class_device_create() is available */ #undef HAVE_CLASS_DEVICE_CREATE From 055ffd98cf80bfc72c28d730753c7d139b704d44 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Oct 2009 13:58:51 -0700 Subject: [PATCH 0326/1062] Autoconf --enable-debug-* cleanup Cleanup the --enable-debug-* configure options, this has been pending for quite some time and I am glad I finally got to it. To summerize: 1) All SPL_AC_DEBUG_* macros were updated to be a more autoconf friendly. This mainly involved shift to the GNU approved usage of AC_ARG_ENABLE and ensuring AS_IF is used rather than directly using an if [ test ] construct. 2) --enable-debug-kmem=yes by default. This simply enabled keeping a running tally of total memory allocated and freed and reporting a memory leak if there was one at module unload. Additionally, it ensure /proc/spl/kmem/slab will exist by default which is handy. The overhead is low for this and it should not impact performance. 3) --enable-debug-kmem-tracking=no by default. This option was added to provide a configure option to enable to detailed memory allocation tracking. This support was always there but you had to know where to turn it on. By default this support is disabled because it is known to badly hurt performence, however it is invaluable when chasing a memory leak. 4) --enable-debug-kstat removed. After further reflection I can't see why you would ever really want to turn this support off. It is now always on which had the nice side effect of simplifying the proc handling code in spl-proc.c. We can now always assume the top level directory will be there. 5) --enable-debug-callb removed. This never really did anything, it was put in provisionally because it might have been needed. It turns out it was not so I am just removing it to prevent confusion. --- config/spl-build.m4 | 137 +++++++++------------ configure | 266 +++++++++++++---------------------------- include/sys/callb.h | 4 - include/sys/kmem.h | 1 - include/sys/kstat.h | 17 --- include/sys/proc.h | 2 - module/spl/spl-kmem.c | 26 ++-- module/spl/spl-kstat.c | 8 -- module/spl/spl-proc.c | 19 +-- spl_config.h.in | 9 +- 10 files changed, 159 insertions(+), 330 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 9d81ccc8e..ae45e29da 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -23,8 +23,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG SPL_AC_DEBUG_KMEM - SPL_AC_DEBUG_KSTAT - SPL_AC_DEBUG_CALLB + SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_ATOMIC_SPINLOCK SPL_AC_TYPE_UINTPTR_T SPL_AC_TYPE_ATOMIC64_T @@ -218,91 +217,71 @@ AC_DEFUN([SPL_AC_CONFIG], [ [test "$SPL_CONFIG" = all]) ]) +dnl # +dnl # Enable if the SPL should be compiled with internal debugging enabled. +dnl # By default this support is disabled. +dnl # AC_DEFUN([SPL_AC_DEBUG], [ + AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [Enable generic debug support @<:@default=no@:>@])], + [], + [enable_debug=no]) + + AS_IF([test "x$enable_debug" = xyes], + [KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG"], + [KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"]) + AC_MSG_CHECKING([whether debugging is enabled]) - AC_ARG_ENABLE( [debug], - AS_HELP_STRING([--enable-debug], - [Enable generic debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;; - esac ] - ) - if test "$spl_ac_debug" = yes; then - AC_MSG_RESULT([yes]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" - else - AC_MSG_RESULT([no]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" - fi + AC_MSG_RESULT([$enable_debug]) ]) +dnl # +dnl # Enabled by default it provides a minimal level of memory tracking. +dnl # A total count of bytes allocated is kept for each alloc and free. +dnl # Then at module unload time a report to the console will be printed +dnl # if memory was leaked. Additionally, /proc/spl/kmem/slab will exist +dnl # and provide an easy way to inspect the kmem based slab. +dnl # AC_DEFUN([SPL_AC_DEBUG_KMEM], [ - AC_MSG_CHECKING([whether kmem debugging is enabled]) - AC_ARG_ENABLE( [debug-kmem], - AS_HELP_STRING([--enable-debug-kmem], - [Enable kmem debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug_kmem=yes ;; - no) spl_ac_debug_kmem=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kmem]) ;; - esac ] - ) - if test "$spl_ac_debug_kmem" = yes; then - AC_MSG_RESULT([yes]) - AC_DEFINE([DEBUG_KMEM], [1], - [Define to 1 to enable kmem debugging]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" - else - AC_MSG_RESULT([no]) - fi + AC_ARG_ENABLE([debug-kmem], + [AS_HELP_STRING([--enable-debug-kmem], + [Enable basic kmem accounting @<:@default=yes@:>@])], + [], + [enable_debug_kmem=yes]) + + AS_IF([test "x$enable_debug_kmem" = xyes], + [AC_DEFINE([DEBUG_KMEM], [1], + [Define to 1 to enable basic kmem accounting]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"]) + + AC_MSG_CHECKING([whether basic kmem accounting is enabled]) + AC_MSG_RESULT([$enable_debug_kmem]) ]) -AC_DEFUN([SPL_AC_DEBUG_KSTAT], [ - AC_MSG_CHECKING([whether kstat debugging is enabled]) - AC_ARG_ENABLE( [debug-kstat], - AS_HELP_STRING([--enable-debug-kstat], - [Enable kstat debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug_kstat=yes ;; - no) spl_ac_debug_kstat=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-kstat]) ;; - esac ] - ) - if test "$spl_ac_debug_kstat" = yes; then - AC_MSG_RESULT([yes]) - AC_DEFINE([DEBUG_KSTAT], [1], - [Define to 1 to enable kstat debugging]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" - else - AC_MSG_RESULT([no]) - fi -]) +dnl # +dnl # Disabled by default it provides detailed memory tracking. This +dnl # feature also requires --enable-debug-kmem to be set. When enabled +dnl # not only will total bytes be tracked but also the location of every +dnl # alloc and free. When the SPL module is unloaded a list of all leaked +dnl # addresses and where they were allocated will be dumped to the console. +dnl # Enabling this feature has a significant impact on performance but it +dnl # makes finding memory leaks pretty straight forward. +dnl # +AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [ + AC_ARG_ENABLE([debug-kmem-tracking], + [AS_HELP_STRING([--enable-debug-kmem-tracking], + [Enable detailed kmem tracking @<:@default=no@:>@])], + [], + [enable_debug_kmem_tracking=no]) -AC_DEFUN([SPL_AC_DEBUG_CALLB], [ - AC_MSG_CHECKING([whether callb debugging is enabled]) - AC_ARG_ENABLE( [debug-callb], - AS_HELP_STRING([--enable-debug-callb], - [Enable callb debug support (default off)]), - [ case "$enableval" in - yes) spl_ac_debug_callb=yes ;; - no) spl_ac_debug_callb=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug-callb]) ;; - esac ] - ) - if test "$spl_ac_debug_callb" = yes; then - AC_MSG_RESULT([yes]) - AC_DEFINE([DEBUG_CALLB], [1], - [Define to 1 to enable callb debugging]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" - else - AC_MSG_RESULT([no]) - fi + AS_IF([test "x$enable_debug_kmem_tracking" = xyes], + [AC_DEFINE([DEBUG_KMEM_TRACKING], [1], + [Define to 1 to enable detailed kmem tracking]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"]) + + AC_MSG_CHECKING([whether detailed kmem tracking is enabled]) + AC_MSG_RESULT([$enable_debug_kmem_tracking]) ]) dnl # diff --git a/configure b/configure index b03faa8c9..15fea65f9 100755 --- a/configure +++ b/configure @@ -1034,10 +1034,10 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-debug Enable generic debug support (default off) - --enable-debug-kmem Enable kmem debug support (default off) - --enable-debug-kstat Enable kstat debug support (default off) - --enable-debug-callb Enable callb debug support (default off) + --enable-debug Enable generic debug support [default=no] + --enable-debug-kmem Enable basic kmem accounting [default=yes] + --enable-debug-kmem-tracking + Enable detailed kmem tracking [default=no] --enable-atomic-spinlocks Atomic types use spinlocks [default=no] @@ -19086,124 +19086,73 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" - case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug" >&2;} - { (exit 1); exit 1; }; } ;; - esac +else + enable_debug=no fi; - if test "$spl_ac_debug" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" - fi + + if test "x$enable_debug" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" +else + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" +fi + + + echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_debug" >&5 +echo "${ECHO_T}$enable_debug" >&6 - echo "$as_me:$LINENO: checking whether kmem debugging is enabled" >&5 -echo $ECHO_N "checking whether kmem debugging is enabled... $ECHO_C" >&6 # Check whether --enable-debug-kmem or --disable-debug-kmem was given. if test "${enable_debug_kmem+set}" = set; then enableval="$enable_debug_kmem" - case "$enableval" in - yes) spl_ac_debug_kmem=yes ;; - no) spl_ac_debug_kmem=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kmem" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kmem" >&2;} - { (exit 1); exit 1; }; } ;; - esac +else + enable_debug_kmem=yes fi; - if test "$spl_ac_debug_kmem" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + + if test "x$enable_debug_kmem" = xyes; then cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM 1 _ACEOF KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi +fi - echo "$as_me:$LINENO: checking whether kstat debugging is enabled" >&5 -echo $ECHO_N "checking whether kstat debugging is enabled... $ECHO_C" >&6 - # Check whether --enable-debug-kstat or --disable-debug-kstat was given. -if test "${enable_debug_kstat+set}" = set; then - enableval="$enable_debug_kstat" - case "$enableval" in - yes) spl_ac_debug_kstat=yes ;; - no) spl_ac_debug_kstat=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kstat" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kstat" >&2;} - { (exit 1); exit 1; }; } ;; - esac + echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 +echo $ECHO_N "checking whether basic kmem accounting is enabled... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 +echo "${ECHO_T}$enable_debug_kmem" >&6 + + # Check whether --enable-debug-kmem-tracking or --disable-debug-kmem-tracking was given. +if test "${enable_debug_kmem_tracking+set}" = set; then + enableval="$enable_debug_kmem_tracking" + +else + enable_debug_kmem_tracking=no fi; - if test "$spl_ac_debug_kstat" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + + if test "x$enable_debug_kmem_tracking" = xyes; then cat >>confdefs.h <<\_ACEOF -#define DEBUG_KSTAT 1 +#define DEBUG_KMEM_TRACKING 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" +fi - echo "$as_me:$LINENO: checking whether callb debugging is enabled" >&5 -echo $ECHO_N "checking whether callb debugging is enabled... $ECHO_C" >&6 - # Check whether --enable-debug-callb or --disable-debug-callb was given. -if test "${enable_debug_callb+set}" = set; then - enableval="$enable_debug_callb" - case "$enableval" in - yes) spl_ac_debug_callb=yes ;; - no) spl_ac_debug_callb=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-callb" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-callb" >&2;} - { (exit 1); exit 1; }; } ;; - esac - -fi; - if test "$spl_ac_debug_callb" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_CALLB 1 -_ACEOF - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi + echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 +echo $ECHO_N "checking whether detailed kmem tracking is enabled... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 +echo "${ECHO_T}$enable_debug_kmem_tracking" >&6 # Check whether --enable-atomic-spinlocks or --disable-atomic-spinlocks was given. @@ -22385,124 +22334,73 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" - case "$enableval" in - yes) spl_ac_debug=yes ;; - no) spl_ac_debug=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug" >&2;} - { (exit 1); exit 1; }; } ;; - esac +else + enable_debug=no fi; - if test "$spl_ac_debug" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" - fi + + if test "x$enable_debug" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" +else + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" +fi + + + echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_debug" >&5 +echo "${ECHO_T}$enable_debug" >&6 - echo "$as_me:$LINENO: checking whether kmem debugging is enabled" >&5 -echo $ECHO_N "checking whether kmem debugging is enabled... $ECHO_C" >&6 # Check whether --enable-debug-kmem or --disable-debug-kmem was given. if test "${enable_debug_kmem+set}" = set; then enableval="$enable_debug_kmem" - case "$enableval" in - yes) spl_ac_debug_kmem=yes ;; - no) spl_ac_debug_kmem=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kmem" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kmem" >&2;} - { (exit 1); exit 1; }; } ;; - esac +else + enable_debug_kmem=yes fi; - if test "$spl_ac_debug_kmem" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + + if test "x$enable_debug_kmem" = xyes; then cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM 1 _ACEOF KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi +fi - echo "$as_me:$LINENO: checking whether kstat debugging is enabled" >&5 -echo $ECHO_N "checking whether kstat debugging is enabled... $ECHO_C" >&6 - # Check whether --enable-debug-kstat or --disable-debug-kstat was given. -if test "${enable_debug_kstat+set}" = set; then - enableval="$enable_debug_kstat" - case "$enableval" in - yes) spl_ac_debug_kstat=yes ;; - no) spl_ac_debug_kstat=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kstat" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kstat" >&2;} - { (exit 1); exit 1; }; } ;; - esac + echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 +echo $ECHO_N "checking whether basic kmem accounting is enabled... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 +echo "${ECHO_T}$enable_debug_kmem" >&6 + + # Check whether --enable-debug-kmem-tracking or --disable-debug-kmem-tracking was given. +if test "${enable_debug_kmem_tracking+set}" = set; then + enableval="$enable_debug_kmem_tracking" + +else + enable_debug_kmem_tracking=no fi; - if test "$spl_ac_debug_kstat" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + + if test "x$enable_debug_kmem_tracking" = xyes; then cat >>confdefs.h <<\_ACEOF -#define DEBUG_KSTAT 1 +#define DEBUG_KMEM_TRACKING 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" +fi - echo "$as_me:$LINENO: checking whether callb debugging is enabled" >&5 -echo $ECHO_N "checking whether callb debugging is enabled... $ECHO_C" >&6 - # Check whether --enable-debug-callb or --disable-debug-callb was given. -if test "${enable_debug_callb+set}" = set; then - enableval="$enable_debug_callb" - case "$enableval" in - yes) spl_ac_debug_callb=yes ;; - no) spl_ac_debug_callb=no ;; - *) echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-callb" >&5 -echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-callb" >&2;} - { (exit 1); exit 1; }; } ;; - esac - -fi; - if test "$spl_ac_debug_callb" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_CALLB 1 -_ACEOF - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi + echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 +echo $ECHO_N "checking whether detailed kmem tracking is enabled... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 +echo "${ECHO_T}$enable_debug_kmem_tracking" >&6 # Check whether --enable-atomic-spinlocks or --disable-atomic-spinlocks was given. diff --git a/include/sys/callb.h b/include/sys/callb.h index 0857d6d8a..b37bb278a 100644 --- a/include/sys/callb.h +++ b/include/sys/callb.h @@ -8,11 +8,7 @@ extern "C" { #include #include -#ifdef DEBUG_CALLB #define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); -#else -#define CALLB_CPR_ASSERT(cp) (void)0 -#endif typedef struct callb_cpr { kmutex_t *cc_lockp; diff --git a/include/sys/kmem.h b/include/sys/kmem.h index caba9104f..7cfbc49e5 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -32,7 +32,6 @@ extern "C" { #endif #undef DEBUG_KMEM_UNIMPLEMENTED -#undef DEBUG_KMEM_TRACKING /* Per-allocation memory tracking */ #include #include diff --git a/include/sys/kstat.h b/include/sys/kstat.h index bfae7bd15..362bae286 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -27,10 +27,6 @@ #ifndef _SPL_KSTAT_H #define _SPL_KSTAT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -155,7 +151,6 @@ typedef struct kstat_timer { int kstat_init(void); void kstat_fini(void); -#ifdef DEBUG_KSTAT extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, const char *ks_name, const char *ks_class, uchar_t ks_type, uint_t ks_ndata, @@ -167,17 +162,5 @@ extern void __kstat_delete(kstat_t *ksp); #define kstat_install(k) __kstat_install(k) #define kstat_delete(k) __kstat_delete(k) -#else - -#define kstat_create(m,i,n,c,t,s,f) (NULL) -#define kstat_install(k) ((void)0) -#define kstat_delete(k) ((void)0) - -#endif /* DEBUG_KSTAT */ - -#ifdef __cplusplus -} -#endif - #endif /* _SPL_KSTAT_H */ diff --git a/include/sys/proc.h b/include/sys/proc.h index a4b1da55a..2938414b7 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -48,12 +48,10 @@ #define spl_unregister_sysctl_table(t) unregister_sysctl_table(t) #endif /* CONFIG_SYSCTL */ -#ifdef DEBUG_KSTAT extern struct proc_dir_entry *proc_spl_kstat; struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, const char *str); int proc_dir_entries(struct proc_dir_entry *root); -#endif int proc_init(void); void proc_fini(void); diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index b1124f706..00d37c798 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -210,12 +210,9 @@ EXPORT_SYMBOL(vmem_size); /* * Memory allocation interfaces and debugging for basic kmem_* - * and vmem_* style memory allocation. When DEBUG_KMEM is enable - * all allocations will be tracked when they are allocated and - * freed. When the SPL module is unload a list of all leaked - * addresses and where they were allocated will be dumped to the - * console. Enabling this feature has a significant impant on - * performance but it makes finding memory leaks staight forward. + * and vmem_* style memory allocation. When DEBUG_KMEM is enabled + * the SPL will keep track of the total memory allocated, and + * report any memory leaked when the module is unloaded. */ #ifdef DEBUG_KMEM /* Shim layer memory accounting */ @@ -231,13 +228,18 @@ EXPORT_SYMBOL(vmem_alloc_used); EXPORT_SYMBOL(vmem_alloc_max); EXPORT_SYMBOL(kmem_warning_flag); -# ifdef DEBUG_KMEM_TRACKING - -/* XXX - Not to surprisingly with debugging enabled the xmem_locks are very - * highly contended particularly on xfree(). If we want to run with this - * detailed debugging enabled for anything other than debugging we need to - * minimize the contention by moving to a lock per xmem_table entry model. +/* When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked + * but also the location of every alloc and free. When the SPL module is + * unloaded a list of all leaked addresses and where they were allocated + * will be dumped to the console. Enabling this feature has a significant + * impact on performance but it makes finding memory leaks straight forward. + * + * Not surprisingly with debugging enabled the xmem_locks are very highly + * contended particularly on xfree(). If we want to run with this detailed + * debugging enabled for anything other than debugging we need to minimize + * the contention by moving to a lock per xmem_table entry model. */ +# ifdef DEBUG_KMEM_TRACKING # define KMEM_HASH_BITS 10 # define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index bb6e9a504..53089c311 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -26,8 +26,6 @@ #include -#ifdef DEBUG_KSTAT - static spinlock_t kstat_lock; static struct list_head kstat_list; static kid_t kstat_id; @@ -470,17 +468,13 @@ __kstat_delete(kstat_t *ksp) } EXPORT_SYMBOL(__kstat_delete); -#endif /* DEBUG_KSTAT */ - int kstat_init(void) { ENTRY; -#ifdef DEBUG_KSTAT spin_lock_init(&kstat_lock); INIT_LIST_HEAD(&kstat_list); kstat_id = 0; -#endif /* DEBUG_KSTAT */ RETURN(0); } @@ -488,9 +482,7 @@ void kstat_fini(void) { ENTRY; -#ifdef DEBUG_KSTAT ASSERT(list_empty(&kstat_list)); -#endif /* DEBUG_KSTAT */ EXIT; } diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 690f2991e..08bcac625 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -41,16 +41,12 @@ static unsigned long table_max = ~0; static struct ctl_table_header *spl_header = NULL; #endif /* CONFIG_SYSCTL */ -#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) static struct proc_dir_entry *proc_spl = NULL; #ifdef DEBUG_KMEM static struct proc_dir_entry *proc_spl_kmem = NULL; static struct proc_dir_entry *proc_spl_kmem_slab = NULL; #endif /* DEBUG_KMEM */ -#ifdef DEBUG_KSTAT struct proc_dir_entry *proc_spl_kstat = NULL; -#endif /* DEBUG_KSTAT */ -#endif /* DEBUG_KMEM || DEBUG_KSTAT */ #ifdef HAVE_CTL_UNNUMBERED @@ -901,11 +897,9 @@ static struct ctl_table spl_kmem_table[] = { }; #endif /* DEBUG_KMEM */ -#ifdef DEBUG_KSTAT static struct ctl_table spl_kstat_table[] = { {0}, }; -#endif /* DEBUG_KSTAT */ static struct ctl_table spl_table[] = { /* NB No .strategy entries have been provided since @@ -965,14 +959,12 @@ static struct ctl_table spl_table[] = { .child = spl_kmem_table, }, #endif -#ifdef DEBUG_KSTAT { .ctl_name = CTL_SPL_KSTAT, .procname = "kstat", .mode = 0555, .child = spl_kstat_table, }, -#endif { 0 }, }; @@ -1041,7 +1033,6 @@ proc_init(void) RETURN(-EUNATCH); #endif /* CONFIG_SYSCTL */ -#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) proc_spl = proc_mkdir("spl", NULL); if (proc_spl == NULL) GOTO(out, rc = -EUNATCH); @@ -1058,25 +1049,21 @@ proc_init(void) proc_spl_kmem_slab->proc_fops = &proc_slab_operations; #endif /* DEBUG_KMEM */ -#ifdef DEBUG_KSTAT proc_spl_kstat = proc_mkdir("kstat", proc_spl); if (proc_spl_kstat == NULL) GOTO(out, rc = -EUNATCH); -#endif /* DEBUG_KSTAT */ - out: if (rc) { remove_proc_entry("kstat", proc_spl); #ifdef DEBUG_KMEM remove_proc_entry("slab", proc_spl_kmem); -#endif remove_proc_entry("kmem", proc_spl); +#endif remove_proc_entry("spl", NULL); #ifdef CONFIG_SYSCTL spl_unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ } -#endif /* DEBUG_KMEM || DEBUG_KSTAT */ RETURN(rc); } @@ -1086,14 +1073,12 @@ proc_fini(void) { ENTRY; -#if defined(DEBUG_KMEM) || defined(DEBUG_KSTAT) remove_proc_entry("kstat", proc_spl); #ifdef DEBUG_KMEM remove_proc_entry("slab", proc_spl_kmem); -#endif remove_proc_entry("kmem", proc_spl); +#endif remove_proc_entry("spl", NULL); -#endif /* DEBUG_KMEM || DEBUG_KSTAT */ #ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); diff --git a/spl_config.h.in b/spl_config.h.in index 409ee372d..06e5766f1 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -3,14 +3,11 @@ /* Atomic types use spinlocks */ #undef ATOMIC_SPINLOCK -/* Define to 1 to enable callb debugging */ -#undef DEBUG_CALLB - -/* Define to 1 to enable kmem debugging */ +/* Define to 1 to enable basic kmem accounting */ #undef DEBUG_KMEM -/* Define to 1 to enable kstat debugging */ -#undef DEBUG_KSTAT +/* Define to 1 to enable detailed kmem tracking */ +#undef DEBUG_KMEM_TRACKING /* register_sysctl_table() wants 2 args */ #undef HAVE_2ARGS_REGISTER_SYSCTL From f97cd5fd875e8c28c6411ef86845ad0ec283f115 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 2 Nov 2009 10:24:12 -0800 Subject: [PATCH 0327/1062] Prep for 0.4.6 tag, updated META and ChangeLog. --- ChangeLog | 43 +++++++++++++++++++++++++++++++++++++++++++ META | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cc75e7d17..cb6ab0126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,46 @@ +2009-11-02 Brian Behlendorf + + * : Tag spl-0.4.6 + + * config/spl-build.m4: Cleanup --enable-debug-* configure options. + --enable-debug= generic debug support. + --enable-debug-kmem= basic kmem and slab accounting. + --enable-debug-kmem-tracking= detailed kmem tracking. + --enable-debug-kstat removed option support always enabled. + --enable-debug-callb removed option which never did anything. + + * module/spl/spl-atomic.c: Reimplemented atomic functions by + layering them on top of the Linux atomic functions. This improves + performance by removing the need for a global spinlock. + + * module/spl/spl-debug.c: Rebase cmn_err on vcmn_err. Handle the + case where the message contains a leading ! which means only send + it to syslog. And suppress warnings for messages which do not end + in a '\n'. + + * module/splat/splat-ctl.c: Update to use kobject_set_name() for + increased portability. + + * module/spl/spl-generic.c: Set cwd to '/' for the task during + module load for SPL dependent modules. Under Solaris this is + the expected behavior, on a Linux system your cwd remains set + to whatever the tasks cwd was when loading a module. + + * module/spl/spl-mutex.c: Reimplemented mutexs for improved + performance and cleaner integration with the Linux kernels built + in lock analyzer. As of 2.6.29 based kernels adaptive mutexs + are supported, for these newer kernels task_curr() does not need + to be exported. Finally, DEBUG_MUTEX support was dropped in + favor of more detailed kernel profiling which is now available. + + * module/spl/spl-rwlock.c: Reimplemented rwlocks for improved + performance and cleaner integration with the Linux kernels built + in lock analyzer. Additionally, the rwlock regression tests were + improved to help validate correctness. + + * spl-modules.spec.in: Various spec file tweaks for the supported + distros: RHEL5, RHEL6, SLES10, SLES11, Chaos4, Fedora 11. + 2009-08-04 Brian Behlendorf * : Tag spl-0.4.5 diff --git a/META b/META index 72c2493c7..fa5210b1e 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.5 +Version: 0.4.6 Release: 1 Release-Tags: relext From baf2979ed35c1a9c2e90e84416e220ab3d25140a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 10 Nov 2009 14:06:57 -0800 Subject: [PATCH 0328/1062] Linux 2.6.31 Compatibility Updates SPL_AC_2ARGS_SET_FS_PWD macro updated to explicitly include linux/fs_struct.h which was dropped from linux/sched.h. min_wmark_pages, low_wmark_pages, high_wmark_pages macros introduced in newer kernels. For older kernels mm_compat.h was introduced to define them as needed as direct mappings to per zone min_pages, low_pages, max_pages. --- config/spl-build.m4 | 1 + configure | 2 ++ include/linux/mm_compat.h | 22 ++++++++++++++++++++++ include/sys/kmem.h | 2 +- include/sys/vnode.h | 1 + module/spl/spl-kmem.c | 6 +++--- 6 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 include/linux/mm_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ae45e29da..f50e1757f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1266,6 +1266,7 @@ AC_DEFUN([SPL_AC_2ARGS_SET_FS_PWD], [AC_MSG_CHECKING([whether set_fs_pwd() wants 2 args]) SPL_LINUX_TRY_COMPILE([ #include + #include ],[ set_fs_pwd(NULL, NULL); ],[ diff --git a/configure b/configure index 15fea65f9..3beeb5df0 100755 --- a/configure +++ b/configure @@ -21871,6 +21871,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #include int main (void) @@ -25119,6 +25120,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #include int main (void) diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h new file mode 100644 index 000000000..c99027b44 --- /dev/null +++ b/include/linux/mm_compat.h @@ -0,0 +1,22 @@ +#ifndef _SPL_MM_COMPAT_H +#define _SPL_MM_COMPAT_H + +#include + +/* + * Linux 2.6.31 API Change. + * Individual pages_{min,low,high} moved in to watermark array. + */ +#ifndef min_wmark_pages +#define min_wmark_pages(z) (z->pages_min) +#endif + +#ifndef low_wmark_pages +#define low_wmark_pages(z) (z->pages_low) +#endif + +#ifndef high_wmark_pages +#define high_wmark_pages(z) (z->pages_high) +#endif + +#endif /* SPL_MM_COMPAT_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 7cfbc49e5..3e5eb204f 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -36,7 +36,7 @@ extern "C" { #include #include #include -#include +#include #include #include #include diff --git a/include/sys/vnode.h b/include/sys/vnode.h index d8a8df272..9568a1392 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -39,6 +39,7 @@ extern "C" { #include #include #include +#include #include #include #include diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 00d37c798..79a7028c2 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1826,9 +1826,9 @@ spl_kmem_init_globals(void) if (!populated_zone(zone)) continue; - minfree += zone->pages_min; - desfree += zone->pages_low; - lotsfree += zone->pages_high; + minfree += min_wmark_pages(zone); + desfree += low_wmark_pages(zone); + lotsfree += high_wmark_pages(zone); } /* Solaris default values */ From c89fdee4d3530e22270ec2b700f697c5e0d46d71 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 12 Nov 2009 15:11:24 -0800 Subject: [PATCH 0329/1062] Remove __GFP_NOFAIL in kmem and retry internally. As of 2.6.31 it's clear __GFP_NOFAIL should no longer be used and it may disappear from the kernel at any time. To handle this I have simply added *_nofail wrappers in the kmem implementation which perform the retry for non-atomic allocations. From linux-2.6.31 mm/page_alloc.c:1166 /* * __GFP_NOFAIL is not to be used in new code. * * All __GFP_NOFAIL callers should be fixed so that they * properly detect and handle allocation failures. * * We most definitely don't want callers attempting to * allocate greater than order-1 page units with * __GFP_NOFAIL. */ WARN_ON_ONCE(order > 1); --- include/sys/kmem.h | 55 +++++++++++++++++++++++++++++++++++++++---- module/spl/spl-kmem.c | 18 +++++++------- 2 files changed, 59 insertions(+), 14 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 3e5eb204f..fdeba70d1 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -49,7 +49,7 @@ extern "C" { /* * Memory allocation interfaces */ -#define KM_SLEEP (GFP_KERNEL | __GFP_NOFAIL) +#define KM_SLEEP GFP_KERNEL #define KM_NOSLEEP GFP_ATOMIC #undef KM_PANIC /* No linux analog */ #define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) @@ -63,6 +63,51 @@ extern "C" { # define __GFP_ZERO 0x8000 #endif +/* + * __GFP_NOFAIL looks like it will be removed from the kernel perhaps as + * early as 2.6.32. To avoid this issue when it occurs in upstream kernels + * we retry the allocation here as long as it is not __GFP_WAIT (GFP_ATOMIC). + * I would prefer the caller handle the failure case cleanly but we are + * trying to emulate Solaris and those are not the Solaris semantics. + */ +static inline void * +kmalloc_nofail(size_t size, gfp_t flags) +{ + void *ptr; + + do { + ptr = kmalloc(size, flags); + } while (ptr == NULL && (flags & __GFP_WAIT)); + + return ptr; +} + +static inline void * +kzalloc_nofail(size_t size, gfp_t flags) +{ + void *ptr; + + do { + ptr = kzalloc(size, flags); + } while (ptr == NULL && (flags & __GFP_WAIT)); + + return ptr; +} + +#ifdef HAVE_KMALLOC_NODE +static inline void * +kmalloc_node_nofail(size_t size, gfp_t flags, int node) +{ + void *ptr; + + do { + ptr = kmalloc_node(size, flags, node); + } while (ptr == NULL && (flags & __GFP_WAIT)); + + return ptr; +} +#endif /* HAVE_KMALLOC_NODE */ + #ifdef DEBUG_KMEM extern atomic64_t kmem_alloc_used; @@ -125,16 +170,16 @@ extern void vmem_free_debug(void *ptr, size_t size); #else /* DEBUG_KMEM */ -# define kmem_alloc(size, flags) kmalloc((size), (flags)) -# define kmem_zalloc(size, flags) kzalloc((size), (flags)) +# define kmem_alloc(size, flags) kmalloc_nofail((size), (flags)) +# define kmem_zalloc(size, flags) kzalloc_nofail((size), (flags)) # define kmem_free(ptr, size) ((void)(size), kfree(ptr)) # ifdef HAVE_KMALLOC_NODE # define kmem_alloc_node(size, flags, node) \ - kmalloc_node((size), (flags), (node)) + kmalloc_node_nofail((size), (flags), (node)) # else # define kmem_alloc_node(size, flags, node) \ - kmalloc((size), (flags)) + kmalloc_nofail((size), (flags)) # endif # define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 79a7028c2..438f7c6d3 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -380,7 +380,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, unsigned long irq_flags; ENTRY; - dptr = (kmem_debug_t *) kmalloc(sizeof(kmem_debug_t), + dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); if (dptr == NULL) { @@ -409,11 +409,11 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, /* Use the correct allocator */ if (node_alloc) { ASSERT(!(flags & __GFP_ZERO)); - ptr = kmalloc_node(size, flags, node); + ptr = kmalloc_node_nofail(size, flags, node); } else if (flags & __GFP_ZERO) { - ptr = kzalloc(size, flags & ~__GFP_ZERO); + ptr = kzalloc_nofail(size, flags & ~__GFP_ZERO); } else { - ptr = kmalloc(size, flags); + ptr = kmalloc_nofail(size, flags); } if (unlikely(ptr == NULL)) { @@ -500,7 +500,7 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) ASSERT(flags & KM_SLEEP); - dptr = (kmem_debug_t *) kmalloc(sizeof(kmem_debug_t), flags); + dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags); if (dptr == NULL) { CWARN("vmem_alloc(%ld, 0x%x) debug failed\n", sizeof(kmem_debug_t), flags); @@ -614,11 +614,11 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, /* Use the correct allocator */ if (node_alloc) { ASSERT(!(flags & __GFP_ZERO)); - ptr = kmalloc_node(size, flags, node); + ptr = kmalloc_node_nofail(size, flags, node); } else if (flags & __GFP_ZERO) { - ptr = kzalloc(size, flags & (~__GFP_ZERO)); + ptr = kzalloc_nofail(size, flags & (~__GFP_ZERO)); } else { - ptr = kmalloc(size, flags); + ptr = kmalloc_nofail(size, flags); } if (ptr == NULL) { @@ -1077,7 +1077,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) sizeof(void *) * skc->skc_mag_size; ENTRY; - skm = kmem_alloc_node(size, GFP_KERNEL | __GFP_NOFAIL, node); + skm = kmem_alloc_node(size, KM_SLEEP, node); if (skm) { skm->skm_magic = SKM_MAGIC; skm->skm_avail = 0; From 8b45dda2bc82ee821992b928ea9d7278a953e8f9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 13 Nov 2009 11:12:43 -0800 Subject: [PATCH 0330/1062] Linux 2.6.31 kmem cache alignment fixes and cleanup. The big fix here is the removal of kmalloc() in kv_alloc(). It used to be true in previous kernels that kmallocs over PAGE_SIZE would always be pages aligned. This is no longer true atleast in 2.6.31 there are no longer any alignment expectations. Since kv_alloc() requires the resulting address to be page align we no only either directly allocate pages in the KMC_KMEM case, or directly call __vmalloc() both of which will always return a page aligned address. Additionally, to avoid wasting memory size is always a power of two. As for cleanup several helper functions were introduced to calculate the aligned sizes of various data structures. This helps ensure no case is accidentally missed where the alignment needs to be taken in to account. The helpers now use P2ROUNDUP_TYPE instead of P2ROUNDUP which is safer since the type will be explict and we no longer count on the compiler to auto promote types hopefully as we expected. Always wnforce minimum (SPL_KMEM_CACHE_ALIGN) and maximum (PAGE_SIZE) alignment restrictions at cache creation time. Use SPL_KMEM_CACHE_ALIGN in splat alignment test. --- include/sys/sysmacros.h | 4 -- module/spl/spl-kmem.c | 144 ++++++++++++++++++++++++-------------- module/splat/splat-kmem.c | 2 +- 3 files changed, 93 insertions(+), 57 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index e66d8d991..4ed41d4c5 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -172,12 +172,8 @@ extern void spl_cleanup(void); #define P2ALIGN(x, align) ((x) & -(align)) #define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) #define P2ROUNDUP(x, align) (-(-(x) & -(align))) -#define P2ROUNDUP_TYPED(x, align, type) \ - (-(-(type)(x) & -(type)(align))) #define P2PHASE(x, align) ((x) & ((align) - 1)) #define P2NPHASE(x, align) (-(x) & ((align) - 1)) -#define P2NPHASE_TYPED(x, align, type) \ - (-(type)(x) & ((type)(align) - 1)) #define ISP2(x) (((x) & ((x) - 1)) == 0) #define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) #define P2BOUNDARY(off, len, align) \ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 438f7c6d3..b86a8ad82 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -720,14 +720,15 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) { void *ptr; - if (skc->skc_flags & KMC_KMEM) { - if (size > (2 * PAGE_SIZE)) { - ptr = (void *)__get_free_pages(flags, get_order(size)); - } else - ptr = kmem_alloc(size, flags); - } else { - ptr = vmem_alloc(size, flags); - } + ASSERT(ISP2(size)); + + if (skc->skc_flags & KMC_KMEM) + ptr = (void *)__get_free_pages(flags, get_order(size)); + else + ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); + + /* Resulting allocated memory will be page aligned */ + ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); return ptr; } @@ -735,14 +736,55 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) static void kv_free(spl_kmem_cache_t *skc, void *ptr, int size) { - if (skc->skc_flags & KMC_KMEM) { - if (size > (2 * PAGE_SIZE)) - free_pages((unsigned long)ptr, get_order(size)); - else - kmem_free(ptr, size); - } else { - vmem_free(ptr, size); - } + ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); + ASSERT(ISP2(size)); + + if (skc->skc_flags & KMC_KMEM) + free_pages((unsigned long)ptr, get_order(size)); + else + vfree(ptr); +} + +/* + * Required space for each aligned sks. + */ +static inline uint32_t +spl_sks_size(spl_kmem_cache_t *skc) +{ + return P2ROUNDUP_TYPED(sizeof(spl_kmem_slab_t), + skc->skc_obj_align, uint32_t); +} + +/* + * Required space for each aligned object. + */ +static inline uint32_t +spl_obj_size(spl_kmem_cache_t *skc) +{ + uint32_t align = skc->skc_obj_align; + + return P2ROUNDUP_TYPED(skc->skc_obj_size, align, uint32_t) + + P2ROUNDUP_TYPED(sizeof(spl_kmem_obj_t), align, uint32_t); +} + +/* + * Lookup the spl_kmem_object_t for an object given that object. + */ +static inline spl_kmem_obj_t * +spl_sko_from_obj(spl_kmem_cache_t *skc, void *obj) +{ + return obj + P2ROUNDUP_TYPED(skc->skc_obj_size, + skc->skc_obj_align, uint32_t); +} + +/* + * Required space for each offslab object taking in to account alignment + * restrictions and the power-of-two requirement of kv_alloc(). + */ +static inline uint32_t +spl_offslab_size(spl_kmem_cache_t *skc) +{ + return 1UL << (highbit(spl_obj_size(skc)) + 1); } /* @@ -782,7 +824,8 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) spl_kmem_slab_t *sks; spl_kmem_obj_t *sko, *n; void *base, *obj; - int i, align, size, rc = 0; + uint32_t obj_size, offslab_size = 0; + int i, rc = 0; base = kv_alloc(skc, skc->skc_slab_size, flags); if (base == NULL) @@ -796,23 +839,22 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) INIT_LIST_HEAD(&sks->sks_list); INIT_LIST_HEAD(&sks->sks_free_list); sks->sks_ref = 0; + obj_size = spl_obj_size(skc); - align = skc->skc_obj_align; - size = P2ROUNDUP(skc->skc_obj_size, align) + - P2ROUNDUP(sizeof(spl_kmem_obj_t), align); + if (skc->skc_flags * KMC_OFFSLAB) + offslab_size = spl_offslab_size(skc); for (i = 0; i < sks->sks_objs; i++) { if (skc->skc_flags & KMC_OFFSLAB) { - obj = kv_alloc(skc, size, flags); + obj = kv_alloc(skc, offslab_size, flags); if (!obj) GOTO(out, rc = -ENOMEM); } else { - obj = base + - P2ROUNDUP(sizeof(spl_kmem_slab_t), align) + - (i * size); + obj = base + spl_sks_size(skc) + (i * obj_size); } - sko = obj + P2ROUNDUP(skc->skc_obj_size, align); + ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); + sko = spl_sko_from_obj(skc, obj); sko->sko_addr = obj; sko->sko_magic = SKO_MAGIC; sko->sko_slab = sks; @@ -828,7 +870,7 @@ out: if (skc->skc_flags & KMC_OFFSLAB) list_for_each_entry_safe(sko, n, &sks->sks_free_list, sko_list) - kv_free(skc, sko->sko_addr, size); + kv_free(skc, sko->sko_addr, offslab_size); kv_free(skc, base, skc->skc_slab_size); sks = NULL; @@ -886,7 +928,8 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) spl_kmem_obj_t *sko, *n; LIST_HEAD(sks_list); LIST_HEAD(sko_list); - int size = 0, i = 0; + uint32_t size = 0; + int i = 0; ENTRY; /* @@ -922,8 +965,7 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) * objects and slabs back to the system. */ if (skc->skc_flags & KMC_OFFSLAB) - size = P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) + - P2ROUNDUP(sizeof(spl_kmem_obj_t), skc->skc_obj_align); + size = spl_offslab_size(skc); list_for_each_entry_safe(sko, n, &sko_list, sko_list) { ASSERT(sko->sko_magic == SKO_MAGIC); @@ -994,7 +1036,7 @@ spl_cache_age(void *data) } /* - * Size a slab based on the size of each aliged object plus spl_kmem_obj_t. + * Size a slab based on the size of each aligned object plus spl_kmem_obj_t. * When on-slab we want to target SPL_KMEM_CACHE_OBJ_PER_SLAB. However, * for very small objects we may end up with more than this so as not * to waste space in the minimal allocation of a single page. Also for @@ -1004,30 +1046,29 @@ spl_cache_age(void *data) static int spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) { - int sks_size, obj_size, max_size, align; + uint32_t sks_size, obj_size, max_size; if (skc->skc_flags & KMC_OFFSLAB) { *objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; *size = sizeof(spl_kmem_slab_t); } else { - align = skc->skc_obj_align; - sks_size = P2ROUNDUP(sizeof(spl_kmem_slab_t), align); - obj_size = P2ROUNDUP(skc->skc_obj_size, align) + - P2ROUNDUP(sizeof(spl_kmem_obj_t), align); + sks_size = spl_sks_size(skc); + obj_size = spl_obj_size(skc); if (skc->skc_flags & KMC_KMEM) - max_size = ((uint64_t)1 << (MAX_ORDER-1)) * PAGE_SIZE; + max_size = ((uint32_t)1 << (MAX_ORDER-1)) * PAGE_SIZE; else max_size = (32 * 1024 * 1024); - for (*size = PAGE_SIZE; *size <= max_size; *size += PAGE_SIZE) { + /* Power of two sized slab */ + for (*size = PAGE_SIZE; *size <= max_size; *size *= 2) { *objs = (*size - sks_size) / obj_size; if (*objs >= SPL_KMEM_CACHE_OBJ_PER_SLAB) RETURN(0); } /* - * Unable to satisfy target objets per slab, fallback to + * Unable to satisfy target objects per slab, fall back to * allocating a maximally sized slab and assuming it can * contain the minimum objects count use it. If not fail. */ @@ -1048,17 +1089,18 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) static int spl_magazine_size(spl_kmem_cache_t *skc) { - int size, align = skc->skc_obj_align; + uint32_t obj_size = spl_obj_size(skc); + int size; ENTRY; /* Per-magazine sizes below assume a 4Kib page size */ - if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE * 256)) + if (obj_size > (PAGE_SIZE * 256)) size = 4; /* Minimum 4Mib per-magazine */ - else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE * 32)) + else if (obj_size > (PAGE_SIZE * 32)) size = 16; /* Minimum 2Mib per-magazine */ - else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE)) + else if (obj_size > (PAGE_SIZE)) size = 64; /* Minimum 256Kib per-magazine */ - else if (P2ROUNDUP(skc->skc_obj_size, align) > (PAGE_SIZE / 4)) + else if (obj_size > (PAGE_SIZE / 4)) size = 128; /* Minimum 128Kib per-magazine */ else size = 256; @@ -1240,19 +1282,18 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_max = 0; if (align) { - ASSERT((align & (align - 1)) == 0); /* Power of two */ - ASSERT(align >= SPL_KMEM_CACHE_ALIGN); /* Minimum size */ + VERIFY(ISP2(align)); + VERIFY3U(align, >=, SPL_KMEM_CACHE_ALIGN); /* Min alignment */ + VERIFY3U(align, <=, PAGE_SIZE); /* Max alignment */ skc->skc_obj_align = align; } /* If none passed select a cache type based on object size */ if (!(skc->skc_flags & (KMC_KMEM | KMC_VMEM))) { - if (P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align) < - (PAGE_SIZE / 8)) { + if (spl_obj_size(skc) < (PAGE_SIZE / 8)) skc->skc_flags |= KMC_KMEM; - } else { + else skc->skc_flags |= KMC_VMEM; - } } rc = spl_slab_size(skc, &skc->skc_slab_objs, &skc->skc_slab_size); @@ -1492,9 +1533,8 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); - sko = obj + P2ROUNDUP(skc->skc_obj_size, skc->skc_obj_align); + sko = spl_sko_from_obj(skc, obj); ASSERT(sko->sko_magic == SKO_MAGIC); - sks = sko->sko_slab; ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(sks->sks_cache == skc); @@ -1600,7 +1640,7 @@ restart: local_irq_restore(irq_flags); ASSERT(obj); - ASSERT(((unsigned long)(obj) % skc->skc_obj_align) == 0); + ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); /* Pre-emptively migrate object to CPU L1 cache */ prefetchw(obj); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 1007f7855..55c42b7d0 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -762,7 +762,7 @@ splat_kmem_test7(struct file *file, void *arg) char *name = SPLAT_KMEM_TEST7_NAME; int i, rc; - for (i = 8; i <= PAGE_SIZE; i *= 2) { + for (i = SPL_KMEM_CACHE_ALIGN; i <= PAGE_SIZE; i *= 2) { rc = splat_kmem_cache_test(file, arg, name, 157, i, 0); if (rc) return rc; From 05b48408fb8bc420908d93d97231bb6727b17e9a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 15 Nov 2009 14:27:15 -0800 Subject: [PATCH 0331/1062] Add mutex_enter_nested() as wrapper for mutex_lock_nested(). This symbol can be used by GPL modules which use the SPL to handle cases where a call path takes a two different locks by the same name. This is needed to avoid a false positive in the lock checker. --- include/sys/mutex.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 49d17659d..596c15612 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -52,17 +52,26 @@ mutex_owner(kmutex_t *mp) #define MUTEX_HELD(mp) mutex_owned(mp) #undef mutex_init #define mutex_init(mp, name, type, ibc) \ -({ \ +({ \ static struct lock_class_key __key; \ ASSERT(type == MUTEX_DEFAULT); \ \ __mutex_init((mp), #mp, &__key); \ }) -/* #define mutex_destroy(mp) ((void)0) */ + #define mutex_tryenter(mp) mutex_trylock(mp) #define mutex_enter(mp) mutex_lock(mp) #define mutex_exit(mp) mutex_unlock(mp) +#ifdef HAVE_GPL_ONLY_SYMBOLS +# define mutex_enter_nested(mp, sc) mutex_lock_nested(mp, sc) +#else +# define mutex_enter_nested(mp, sc) mutex_enter(mp) +# ifdef CONFIG_DEBUG_MUTEXES +# define mutex_destroy(mp) ((void)0) +# endif /* CONFIG_DEBUG_MUTEXES */ +#endif /* HAVE_GPL_ONLY_SYMBOLS */ + #else /* HAVE_MUTEX_OWNER */ typedef struct { @@ -193,6 +202,19 @@ mutex_owner(kmutex_t *mp) mutex_unlock(MUTEX(mp)); \ }) +#ifdef HAVE_GPL_ONLY_SYMBOLS +# define mutex_enter_nested(mp, sc) \ +({ \ + mutex_lock_nested(MUTEX(mp, sc)); \ + spl_mutex_set_owner(mp); \ +}) +#else +# define mutex_enter_nested(mp, sc) \ +({ \ + mutex_enter(mp); \ +}) +#endif + #endif /* HAVE_MUTEX_OWNER */ int spl_mutex_init(void); From 1273cf284b4e916fdf6dfbdf1fdb720d62738663 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 15 Nov 2009 15:04:02 -0800 Subject: [PATCH 0332/1062] Always use the generic mutex_destroy(). --- include/sys/mutex.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 596c15612..1eedd4565 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -59,17 +59,21 @@ mutex_owner(kmutex_t *mp) __mutex_init((mp), #mp, &__key); \ }) +#undef mutex_destroy +#define mutex_destroy(mp) \ +({ \ + VERIFY(!MUTEX_HELD(mp)); \ +}) + #define mutex_tryenter(mp) mutex_trylock(mp) #define mutex_enter(mp) mutex_lock(mp) #define mutex_exit(mp) mutex_unlock(mp) + #ifdef HAVE_GPL_ONLY_SYMBOLS # define mutex_enter_nested(mp, sc) mutex_lock_nested(mp, sc) #else # define mutex_enter_nested(mp, sc) mutex_enter(mp) -# ifdef CONFIG_DEBUG_MUTEXES -# define mutex_destroy(mp) ((void)0) -# endif /* CONFIG_DEBUG_MUTEXES */ #endif /* HAVE_GPL_ONLY_SYMBOLS */ #else /* HAVE_MUTEX_OWNER */ From 0a6c005959c168262cc9e146c0b66b64ba5d94d3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 15 Nov 2009 15:04:33 -0800 Subject: [PATCH 0333/1062] Ensure spl_config.h is include in spl-generic.c --- module/spl/spl-generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index dc0ac21d0..19cdf5046 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -38,6 +38,7 @@ #include #include #include +#include "spl_config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM From fe883092b937eb574fd748174e951b52244813e3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 20 Nov 2009 16:01:00 -0800 Subject: [PATCH 0334/1062] Ensure *.order and *.markers build products are removed by distclean rule. --- Makefile.am | 3 ++- Makefile.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 53d4876fc..97977d50e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,8 @@ distclean-local:: -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ - -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ + -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \ + -o -name '*.order' -o -name '*.markers' \) \ -type f -print | xargs $(RM) if CONFIG_KERNEL diff --git a/Makefile.in b/Makefile.in index ea8c98e37..a36b92677 100644 --- a/Makefile.in +++ b/Makefile.in @@ -711,7 +711,8 @@ distclean-local:: -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ - -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ + -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \ + -o -name '*.order' -o -name '*.markers' \) \ -type f -print | xargs $(RM) @CONFIG_KERNEL_TRUE@install-data-local: From 958dc9e737ffe14e6253479a903700e5e8416580 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 20 Nov 2009 16:52:29 -0800 Subject: [PATCH 0335/1062] Prep for 0.4.7 tag, updated META and ChangeLog. --- ChangeLog | 31 +++++++++++++++++++++++++++++++ META | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cb6ab0126..e32be8592 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2009-11-20 Brian Behlendorf + + * : Tag spl-0.4.7 + + * config/spl-build.m4: Linux 2.6.31 compat, SPL_AC_2ARGS_SET_FS_PWD + macro updated to explicitly include linux/fs_struct.h which was + dropped from linux/sched.h. + + * include/linux/mm_compat.h: Linux 2.6.31 compat, use the macros + min_wmark_pages, low_wmark_pages, and high_wmark_pages which were + introduced. For older kernels a compability macro is used. + + * include/sys/kmem.h: Linux 2.6.31 compat, the __GFP_NOFAIL flag + should no longer be used and it may disappear from the kernel at any + time. To handle this I have simply added *_nofail wrappers in the + kmem implementation which perform the retry for non-atomic allocations. + + * module/spl/spl-kmem.c: Linux 2.6.31 compat, kmem cache alignment + fixes and cleanup. Always perform allocations for the kmem cache + using __get_free_pages() or __vmalloc() to ensure the returned + memory is page aligned. Also introduce helper functions which use + P2ROUNDUP_TYPE instead of P2ROUNDUP force all types to be explicit. + + * include/sys/mutex.h: Add mutex_enter_nested() as wrapper for + mutex_lock_nested() to permit integration with the lock checker. + + * include/sys/mutex.h: Always use the generic mutex_destroy(). + + * Makefile.am: Ensure *.order and *.markers build products are + removed by distclean rule. + 2009-11-02 Brian Behlendorf * : Tag spl-0.4.6 diff --git a/META b/META index fa5210b1e..231173eb6 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.6 +Version: 0.4.7 Release: 1 Release-Tags: relext From ea385742dbe619f25d5a2b80aee9c9fd35ef2eed Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 24 Nov 2009 13:15:35 -0800 Subject: [PATCH 0336/1062] Add chaos5 and rhel6 macro's to the spl-modules.spec.in --- spl-modules.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 0c3dd10a9..56bf74c2d 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -66,8 +66,8 @@ %endif %else -# CHAOS 4.x: -%if %{defined ch4} +# CHAOS 4.x/5.x: +%if %{defined ch4} || %{defined ch5} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config %define kver %((echo X; %{__cat} %{klnk}/kernel.release @@ -85,8 +85,8 @@ %endif %else -# RHEL 5: -%if %{defined el5} +# RHEL 5.x/6.x: +%if %{defined el5} || %{defined el6} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config %define kver %((echo X; %{__cat} %{klnk}/kernel.release From c1541dfef13041f945aa21985249bd24ee5449e0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 24 Nov 2009 14:21:45 -0800 Subject: [PATCH 0337/1062] Add 'srpm' --with-config option for creation of spec files. --- config/spl-build.m4 | 5 +++-- configure | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index f50e1757f..8e0eca6d2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -191,7 +191,7 @@ AC_DEFUN([SPL_AC_CONFIG], [ SPL_CONFIG=all AC_ARG_WITH([config], AS_HELP_STRING([--with-config=CONFIG], - [Config file 'kernel|user|all']), + [Config file 'kernel|user|all|srpm']), [SPL_CONFIG="$withval"]) AC_MSG_CHECKING([spl config]) @@ -203,10 +203,11 @@ AC_DEFUN([SPL_AC_CONFIG], [ user) SPL_AC_CONFIG_USER ;; all) SPL_AC_CONFIG_KERNEL SPL_AC_CONFIG_USER ;; + srpm) ;; *) AC_MSG_RESULT([Error!]) AC_MSG_ERROR([Bad value "$SPL_CONFIG" for --with-config, - user kernel|user|all]) ;; + user kernel|user|all|srpm]) ;; esac AM_CONDITIONAL([CONFIG_USER], diff --git a/configure b/configure index 3beeb5df0..8f644abf4 100755 --- a/configure +++ b/configure @@ -1049,7 +1049,7 @@ Optional Packages: both] --with-tags[=TAGS] include additional configurations [automatic] - --with-config=CONFIG Config file 'kernel|user|all' + --with-config=CONFIG Config file 'kernel|user|all|srpm' --with-linux=PATH Path to kernel source --with-linux-obj=PATH Path to kernel build objects @@ -25450,13 +25450,14 @@ _ACEOF ;; + srpm) ;; *) echo "$as_me:$LINENO: result: Error!" >&5 echo "${ECHO_T}Error!" >&6 { { echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all" >&5 + user kernel|user|all|srpm" >&5 echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all" >&2;} + user kernel|user|all|srpm" >&2;} { (exit 1); exit 1; }; } ;; esac From f6ea161924b3fe4166faa1de709fce0049bf4b11 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 24 Nov 2009 15:24:36 -0800 Subject: [PATCH 0338/1062] spl-modules-devel package must depend on the exact version of kernel devel package it was built against. --- spl-modules.spec.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 56bf74c2d..4f8d47acc 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -155,10 +155,12 @@ %if %{defined build_src_rpm} %define release @SPL_META_RELEASE@ %define requires %{kpkg} +%define devel_requires %{kdevpkg} %else %define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %define release @SPL_META_RELEASE@_%{relext} %define requires %{kpkg} %{koppkg} %{kverpkg} +%define devel_requires %{kdevpkg} %{koppkg} %{kverpkg} %endif Summary: Solaris Porting Layer Modules @@ -182,7 +184,7 @@ taskq, thread, time, and vnode APIs. %package devel Summary: Solaris Porting Layer Headers and Symbols Group: Development/Libraries -Requires: %{requires} +Requires: %{devel_requires} BuildRequires: %{kdevpkg} %description devel From 6ff686c44dbc39f12cb57e930fb20199203514d9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Dec 2009 10:14:01 -0800 Subject: [PATCH 0339/1062] Type long expected explicitly cast for 32-bit systems. --- module/splat/splat-rwlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index cf3670370..13140260c 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -591,8 +591,8 @@ splat_rwlock_test6(struct file *file, void *arg) rc = rw_tryupgrade(&rwp->rw_rwlock); if (!rc) { splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, - "rwlock contended preventing upgrade: %d\n", - RW_COUNT(&rwp->rw_rwlock)); + "rwlock contended preventing upgrade: %ld\n", + (long int)RW_COUNT(&rwp->rw_rwlock)); goto out; } From a5d6f6020aeeebfabd0bb5e48d8736d63b44b875 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Dec 2009 10:15:27 -0800 Subject: [PATCH 0340/1062] Add missing atomic64 compat helpers for 32-bit systems. The use of these functions was added with the recent atomic work and not tested on 32-bit systems. Add the missing compat functions: atomic64_inc, atomic64_dec, atomic64_add_return, atomic64_sub_return, atomic64_inc_return, atomic64_dec_return. --- include/asm/atomic_compat.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/include/asm/atomic_compat.h b/include/asm/atomic_compat.h index c769d6248..5eaccd7e7 100644 --- a/include/asm/atomic_compat.h +++ b/include/asm/atomic_compat.h @@ -32,6 +32,38 @@ static inline void atomic64_sub(__s64 i, atomic64_t *v) spin_unlock_irqrestore(&v->lock, flags); } +#define atomic64_inc(v) (atomic64_add(1, (v))) +#define atomic64_dec(v) (atomic64_sub(1, (v))) + +static inline __s64 atomic64_add_return(__s64 i, atomic64_t *v) +{ + unsigned long flags; + __s64 ret; + + spin_lock_irqsave(&v->lock, flags); + v->val += i; + ret = v->val; + spin_unlock_irqrestore(&v->lock, flags); + + return ret; +} + +static inline __s64 atomic64_sub_return(__s64 i, atomic64_t *v) +{ + unsigned long flags; + __s64 ret; + + spin_lock_irqsave(&v->lock, flags); + v->val -= i; + ret = v->val; + spin_unlock_irqrestore(&v->lock, flags); + + return ret; +} + +#define atomic64_inc_return(v) (atomic64_add_return(1, (v))) +#define atomic64_dec_return(v) (atomic64_sub_return(1, (v))) + static inline __s64 atomic64_read(atomic64_t *v) { unsigned long flags; From 4e5691faf69cd5a3db5c7d6c12c5dc588f9e4b3d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Dec 2009 11:40:47 -0800 Subject: [PATCH 0341/1062] Only run the kmem overcommit test on 64-bit systems. --- module/splat/splat-kmem.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 55c42b7d0..6957f1f1c 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -69,9 +69,11 @@ #define SPLAT_KMEM_TEST10_NAME "slab_lock" #define SPLAT_KMEM_TEST10_DESC "Slab locking test" +#ifdef _LP64 #define SPLAT_KMEM_TEST11_ID 0x010b #define SPLAT_KMEM_TEST11_NAME "slab_overcommit" #define SPLAT_KMEM_TEST11_DESC "Slab memory overcommit test" +#endif /* _LP64 */ #define SPLAT_KMEM_TEST12_ID 0x010c #define SPLAT_KMEM_TEST12_NAME "vmem_size" @@ -1003,6 +1005,7 @@ splat_kmem_test10(struct file *file, void *arg) return rc; } +#ifdef _LP64 /* * This test creates N threads with a shared kmem cache which overcommits * memory by 4x. This makes it impossible for the slab to satify the @@ -1011,7 +1014,9 @@ splat_kmem_test10(struct file *file, void *arg) * detecting a low memory condition on the node and invoking the shrinkers. * This should allow all the threads to complete while avoiding deadlock * and for the most part out of memory events. This is very tough on the - * system so it is possible the test app may get oom'ed. + * system so it is possible the test app may get oom'ed. This particular + * test has proven troublesome on 32-bit archs with limited virtual + * address space so it only run on 64-bit systems. */ static int splat_kmem_test11(struct file *file, void *arg) @@ -1031,6 +1036,7 @@ splat_kmem_test11(struct file *file, void *arg) return rc; } +#endif /* _LP64 */ /* * Check vmem_size() behavior by acquiring the alloc/free/total vmem @@ -1147,8 +1153,10 @@ splat_kmem_init(void) SPLAT_KMEM_TEST9_ID, splat_kmem_test9); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST10_NAME, SPLAT_KMEM_TEST10_DESC, SPLAT_KMEM_TEST10_ID, splat_kmem_test10); +#ifdef _LP64 SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, SPLAT_KMEM_TEST11_ID, splat_kmem_test11); +#endif /* _LP64 */ SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST12_NAME, SPLAT_KMEM_TEST12_DESC, SPLAT_KMEM_TEST12_ID, splat_kmem_test12); @@ -1160,7 +1168,9 @@ splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST12_ID); +#ifdef _LP64 SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST11_ID); +#endif /* _LP64 */ SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST10_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST9_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST8_ID); From 5652e7b497256647cdcd4d5825cdb23b1b797dd0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Dec 2009 15:47:27 -0800 Subject: [PATCH 0342/1062] When using x86 specific rwsem correctly intepret rwsem->count. --- include/sys/rwlock.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 75356b95d..0043f3966 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -47,9 +47,10 @@ typedef struct { } krwlock_t; /* - * For the generic and x86 implementations of rw-semaphores the following - * is true. If your semaphore implementation internally represents the - * semaphore state differently special case handling will be required. + * For the generic implementations of rw-semaphores the following is + * true. If your semaphore implementation internally represents the + * semaphore state differently. Then special case handling will be + * required so RW_COUNT() provides these semantics: * - if activity/count is 0 then there are no active readers or writers * - if activity/count is +ve then that is the number of active readers * - if activity/count is -1 then there is one active writer @@ -63,9 +64,14 @@ typedef struct { extern void __up_read_locked(struct rw_semaphore *); extern int __down_write_trylock_locked(struct rw_semaphore *); #else -# define RW_COUNT(rwp) (SEM(rwp)->count & RWSEM_ACTIVE_MASK) -# define rw_exit_locked(rwp) up_read(rwp) -# define rw_tryenter_locked(rwp) down_write_trylock(rwp) +# ifdef _I386_RWSEM_H +# define RW_COUNT(rwp) ((SEM(rwp)->count < 0) ? (-1) : \ + (SEM(rwp)->count & RWSEM_ACTIVE_MASK)) +# else +# define RW_COUNT(rwp) (SEM(rwp)->count & RWSEM_ACTIVE_MASK) +# endif +# define rw_exit_locked(rwp) up_read(rwp) +# define rw_tryenter_locked(rwp) down_write_trylock(rwp) #endif static inline kthread_t * From db1aa22297d50fa19939e487b5cc7d1f5088c64e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Dec 2009 15:53:28 -0800 Subject: [PATCH 0343/1062] Correctly handle division on 32-bit RHEL5 systems by returning dividend. --- module/spl/spl-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 19cdf5046..a13b978cb 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -116,7 +116,9 @@ uint64_t __udivdi3(uint64_t dividend, uint64_t divisor) } else d = divisor; - return do_div(dividend, d); + do_div(dividend, d); + + return dividend; #endif /* HAVE_DIV64_64, HAVE_DIV64_U64 */ } EXPORT_SYMBOL(__udivdi3); From d04c8a563c09d6449d5663aa2b57840653defae5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 4 Dec 2009 15:54:12 -0800 Subject: [PATCH 0344/1062] Atomic64 compatibility for 32-bit systems without kernel support. This patch is another step towards updating the code to handle the 32-bit kernels which I have not been regularly testing. This changes do not really impact the common case I'm expected which is the latest kernel running on an x86_64 arch. Until the linux-2.6.31 kernel the x86 arch did not have support for 64-bit atomic operations. Additionally, the new atomic_compat.h support for this case was wrong because it embedded a spinlock in the atomic variable which must always and only be 64-bits total. To handle these 32-bit issues we now simply fall back to the --enable-atomic-spinlock implementation if the kernel does not provide the 64-bit atomic funcs. The second issue this patch addresses is the DEBUG_KMEM assumption that there will always be atomic64 funcs available. On 32-bit archs this may not be true, and actually that's just fine. In that case the kernel will will never be able to allocate more the 32-bits worth anyway. So just check if atomic64 funcs are available, if they are not it means this is a 32-bit machine and we can safely use atomic_t's instead. --- config/spl-build.m4 | 107 +++++----- configure | 406 ++++++++++++++++++++--------------- include/Makefile.am | 1 - include/Makefile.in | 6 +- include/asm/Makefile.in | 414 ------------------------------------ include/asm/atomic_compat.h | 99 --------- include/sys/atomic.h | 9 +- include/sys/kmem.h | 30 ++- module/spl/spl-kmem.c | 92 ++++---- module/spl/spl-proc.c | 20 +- 10 files changed, 396 insertions(+), 788 deletions(-) delete mode 100644 include/asm/Makefile.in delete mode 100644 include/asm/atomic_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 8e0eca6d2..9fa7bc811 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -25,10 +25,9 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_ATOMIC_SPINLOCK - SPL_AC_TYPE_UINTPTR_T - SPL_AC_TYPE_ATOMIC64_T SPL_AC_TYPE_ATOMIC64_CMPXCHG SPL_AC_TYPE_ATOMIC64_XCHG + SPL_AC_TYPE_UINTPTR_T SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SET_SHRINKER @@ -285,27 +284,6 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [ AC_MSG_RESULT([$enable_debug_kmem_tracking]) ]) -dnl # -dnl # Use the atomic implemenation based on global spinlocks. This -dnl # should never be needed, however it has been left in place as -dnl # a fallback option in case problems are observed with directly -dnl # mapping to the native Linux atomic operations. -dnl # -AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ - AC_ARG_ENABLE([atomic-spinlocks], - [AS_HELP_STRING([--enable-atomic-spinlocks], - [Atomic types use spinlocks @<:@default=no@:>@])], - [], - [enable_atomic_spinlocks=no]) - - AS_IF([test "x$enable_atomic_spinlocks" = xyes], - [AC_DEFINE([ATOMIC_SPINLOCK], [1], - [Atomic types use spinlocks])]) - - AC_MSG_CHECKING([whether atomic types use spinlocks]) - AC_MSG_RESULT([$enable_atomic_spinlocks]) -]) - dnl # dnl # SPL_LINUX_CONFTEST dnl # @@ -433,41 +411,55 @@ AC_DEFUN([SPL_CHECK_HEADER], ]) dnl # -dnl # 2.6.24 API change, -dnl # check if uintptr_t typedef is defined +dnl # Use the atomic implemenation based on global spinlocks. This +dnl # should only be needed by 32-bit kernels which do not provide +dnl # the atomic64_* API. It may be optionally enabled as a fallback +dnl # if problems are observed with the direct mapping to the native +dnl # Linux atomic operations. You may not disable atomic spinlocks +dnl # if you kernel does not an atomic64_* API. dnl # -AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], - [AC_MSG_CHECKING([whether kernel defines uintptr_t]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - uintptr_t *ptr; - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_UINTPTR_T, 1, - [kernel defines uintptr_t]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) +AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ + AC_ARG_ENABLE([atomic-spinlocks], + [AS_HELP_STRING([--enable-atomic-spinlocks], + [Atomic types use spinlocks @<:@default=check@:>@])], + [], + [enable_atomic_spinlocks=check]) -dnl # -dnl # 2.6.x API change, -dnl # check if atomic64_t typedef is defined -dnl # -AC_DEFUN([SPL_AC_TYPE_ATOMIC64_T], - [AC_MSG_CHECKING([whether kernel defines atomic64_t]) SPL_LINUX_TRY_COMPILE([ #include ],[ atomic64_t *ptr; ],[ - AC_MSG_RESULT([yes]) + have_atomic64_t=yes AC_DEFINE(HAVE_ATOMIC64_T, 1, - [kernel defines atomic64_t]) + [kernel defines atomic64_t]) ],[ - AC_MSG_RESULT([no]) + have_atomic64_t=no ]) + + AS_IF([test "x$enable_atomic_spinlocks" = xcheck], [ + AS_IF([test "x$have_atomic64_t" = xyes], [ + enable_atomic_spinlocks=no + ],[ + enable_atomic_spinlocks=yes + ]) + ]) + + AS_IF([test "x$enable_atomic_spinlocks" = xyes], [ + AC_DEFINE([ATOMIC_SPINLOCK], [1], + [Atomic types use spinlocks]) + ],[ + AS_IF([test "x$have_atomic64_t" = xno], [ + AC_MSG_FAILURE( + [--disable-atomic-spinlocks given but required atomic64 support is unavailable]) + ]) + ]) + + AC_MSG_CHECKING([whether atomic types use spinlocks]) + AC_MSG_RESULT([$enable_atomic_spinlocks]) + + AC_MSG_CHECKING([whether kernel defines atomic64_t]) + AC_MSG_RESULT([$have_atomic64_t]) ]) dnl # @@ -508,6 +500,25 @@ AC_DEFUN([SPL_AC_TYPE_ATOMIC64_XCHG], ]) ]) +dnl # +dnl # 2.6.24 API change, +dnl # check if uintptr_t typedef is defined +dnl # +AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], + [AC_MSG_CHECKING([whether kernel defines uintptr_t]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + uintptr_t *ptr; + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_UINTPTR_T, 1, + [kernel defines uintptr_t]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + dnl # dnl # 2.6.20 API change, dnl # INIT_WORK use 2 args and not store data inside diff --git a/configure b/configure index 8f644abf4..192a08442 100755 --- a/configure +++ b/configure @@ -1039,7 +1039,7 @@ Optional Features: --enable-debug-kmem-tracking Enable detailed kmem tracking [default=no] --enable-atomic-spinlocks - Atomic types use spinlocks [default=no] + Atomic types use spinlocks [default=check] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -19160,89 +19160,9 @@ if test "${enable_atomic_spinlocks+set}" = set; then enableval="$enable_atomic_spinlocks" else - enable_atomic_spinlocks=no + enable_atomic_spinlocks=check fi; - if test "x$enable_atomic_spinlocks" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define ATOMIC_SPINLOCK 1 -_ACEOF - -fi - - - echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 -echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 -echo "${ECHO_T}$enable_atomic_spinlocks" >&6 - - echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 - - -cat >conftest.c <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - uintptr_t *ptr; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build - echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF - - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - - - -fi - - rm -Rf build - - - - echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 cat >conftest.c <<_ACEOF @@ -19282,8 +19202,7 @@ _ACEOF echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + have_atomic64_t=yes cat >>confdefs.h <<\_ACEOF #define HAVE_ATOMIC64_T 1 @@ -19294,8 +19213,7 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + have_atomic64_t=no @@ -19305,6 +19223,56 @@ fi + if test "x$enable_atomic_spinlocks" = xcheck; then + + if test "x$have_atomic64_t" = xyes; then + + enable_atomic_spinlocks=no + +else + + enable_atomic_spinlocks=yes + +fi + + +fi + + + if test "x$enable_atomic_spinlocks" = xyes; then + + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_SPINLOCK 1 +_ACEOF + + +else + + if test "x$have_atomic64_t" = xno; then + + { { echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable +See \`config.log' for more details." >&5 +echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +fi + + +fi + + + echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 +echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 +echo "${ECHO_T}$enable_atomic_spinlocks" >&6 + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 +echo "${ECHO_T}$have_atomic64_t" >&6 + echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 echo $ECHO_N "checking whether kernel defines atomic64_cmpxchg... $ECHO_C" >&6 @@ -19427,6 +19395,70 @@ echo "${ECHO_T}no" >&6 +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 +echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + uintptr_t *ptr; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + fi rm -Rf build @@ -22409,89 +22441,9 @@ if test "${enable_atomic_spinlocks+set}" = set; then enableval="$enable_atomic_spinlocks" else - enable_atomic_spinlocks=no + enable_atomic_spinlocks=check fi; - if test "x$enable_atomic_spinlocks" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define ATOMIC_SPINLOCK 1 -_ACEOF - -fi - - - echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 -echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 -echo "${ECHO_T}$enable_atomic_spinlocks" >&6 - - echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 - - -cat >conftest.c <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - uintptr_t *ptr; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build - echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF - - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - - - -fi - - rm -Rf build - - - - echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 cat >conftest.c <<_ACEOF @@ -22531,8 +22483,7 @@ _ACEOF echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + have_atomic64_t=yes cat >>confdefs.h <<\_ACEOF #define HAVE_ATOMIC64_T 1 @@ -22543,8 +22494,7 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + have_atomic64_t=no @@ -22554,6 +22504,56 @@ fi + if test "x$enable_atomic_spinlocks" = xcheck; then + + if test "x$have_atomic64_t" = xyes; then + + enable_atomic_spinlocks=no + +else + + enable_atomic_spinlocks=yes + +fi + + +fi + + + if test "x$enable_atomic_spinlocks" = xyes; then + + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_SPINLOCK 1 +_ACEOF + + +else + + if test "x$have_atomic64_t" = xno; then + + { { echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable +See \`config.log' for more details." >&5 +echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +fi + + +fi + + + echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 +echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 +echo "${ECHO_T}$enable_atomic_spinlocks" >&6 + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 +echo "${ECHO_T}$have_atomic64_t" >&6 + echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 echo $ECHO_N "checking whether kernel defines atomic64_cmpxchg... $ECHO_C" >&6 @@ -22676,6 +22676,70 @@ echo "${ECHO_T}no" >&6 +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 +echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + uintptr_t *ptr; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + fi rm -Rf build diff --git a/include/Makefile.am b/include/Makefile.am index 3388ce8d9..6ed7cdad8 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -3,7 +3,6 @@ # location. We do not want to be using $includedir for this. # Installation is handled by the custom install-data-local rule. noinst_HEADERS = *.h -noinst_HEADERS += asm/*.h noinst_HEADERS += fs/*.h noinst_HEADERS += linux/*.h noinst_HEADERS += rpc/*.h diff --git a/include/Makefile.in b/include/Makefile.in index 50785f69f..0aba5a0b8 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -184,8 +184,8 @@ target_vendor = @target_vendor@ # noinst_HEADERS because they are not installed in the usual include # location. We do not want to be using $includedir for this. # Installation is handled by the custom install-data-local rule. -noinst_HEADERS = *.h asm/*.h fs/*.h linux/*.h rpc/*.h sharefs/*.h \ - sys/fm/*.h sys/fs/*.h sys/sysevent/*.h sys/*.h util/*.h vm/*.h +noinst_HEADERS = *.h fs/*.h linux/*.h rpc/*.h sharefs/*.h sys/fm/*.h \ + sys/fs/*.h sys/sysevent/*.h sys/*.h util/*.h vm/*.h all: all-am .SUFFIXES: @@ -278,7 +278,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/asm $(distdir)/fs $(distdir)/linux $(distdir)/rpc $(distdir)/sharefs $(distdir)/sys $(distdir)/sys/fm $(distdir)/sys/fs $(distdir)/sys/sysevent $(distdir)/util $(distdir)/vm + $(mkdir_p) $(distdir)/fs $(distdir)/linux $(distdir)/rpc $(distdir)/sharefs $(distdir)/sys $(distdir)/sys/fm $(distdir)/sys/fs $(distdir)/sys/sysevent $(distdir)/util $(distdir)/vm @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/include/asm/Makefile.in b/include/asm/Makefile.in deleted file mode 100644 index fb8283de2..000000000 --- a/include/asm/Makefile.in +++ /dev/null @@ -1,414 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/asm -DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -nobase_includeHEADERS_INSTALL = $(install_sh_DATA) -HEADERS = $(nobase_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -nobase_include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/asm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/asm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-nobase_includeHEADERS: $(nobase_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__vpath_adj) \ - echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-nobase_includeHEADERS: - @$(NORMAL_UNINSTALL) - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - $(am__vpath_adj) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-nobase_includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-nobase_includeHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/asm/atomic_compat.h b/include/asm/atomic_compat.h deleted file mode 100644 index 5eaccd7e7..000000000 --- a/include/asm/atomic_compat.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef _SPL_ATOMIC_COMPAT_H -#define _SPL_ATOMIC_COMPAT_H - -#include -#include - -#ifndef HAVE_ATOMIC64_T -#include - -typedef struct { - spinlock_t lock; - __s64 val; -} atomic64_t; - -#define ATOMIC64_INIT(i) { .lock = SPIN_LOCK_UNLOCKED, .val = (i) } - -static inline void atomic64_add(__s64 i, atomic64_t *v) -{ - unsigned long flags; - - spin_lock_irqsave(&v->lock, flags); - v->val += i; - spin_unlock_irqrestore(&v->lock, flags); -} - -static inline void atomic64_sub(__s64 i, atomic64_t *v) -{ - unsigned long flags; - - spin_lock_irqsave(&v->lock, flags); - v->val -= i; - spin_unlock_irqrestore(&v->lock, flags); -} - -#define atomic64_inc(v) (atomic64_add(1, (v))) -#define atomic64_dec(v) (atomic64_sub(1, (v))) - -static inline __s64 atomic64_add_return(__s64 i, atomic64_t *v) -{ - unsigned long flags; - __s64 ret; - - spin_lock_irqsave(&v->lock, flags); - v->val += i; - ret = v->val; - spin_unlock_irqrestore(&v->lock, flags); - - return ret; -} - -static inline __s64 atomic64_sub_return(__s64 i, atomic64_t *v) -{ - unsigned long flags; - __s64 ret; - - spin_lock_irqsave(&v->lock, flags); - v->val -= i; - ret = v->val; - spin_unlock_irqrestore(&v->lock, flags); - - return ret; -} - -#define atomic64_inc_return(v) (atomic64_add_return(1, (v))) -#define atomic64_dec_return(v) (atomic64_sub_return(1, (v))) - -static inline __s64 atomic64_read(atomic64_t *v) -{ - unsigned long flags; - __s64 r; - - spin_lock_irqsave(&v->lock, flags); - r = v->val; - spin_unlock_irqrestore(&v->lock, flags); - - return r; -} - -static inline void atomic64_set(atomic64_t *v, __s64 i) -{ - unsigned long flags; - - spin_lock_irqsave(&v->lock, flags); - v->val = i; - spin_unlock_irqrestore(&v->lock, flags); -} - -#endif /* HAVE_ATOMIC64_T */ - -#ifndef HAVE_ATOMIC64_CMPXCHG -#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -#endif - -#ifndef HAVE_ATOMIC64_XCHG -#define atomic64_xchg(v, n) (xchg(&((v)->counter), n)) -#endif - -#endif /* _SPL_ATOMIC_COMPAT_H */ - diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 7a741de17..f522781fc 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -30,7 +30,14 @@ #include #include #include -#include + +#ifndef HAVE_ATOMIC64_CMPXCHG +#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) +#endif + +#ifndef HAVE_ATOMIC64_XCHG +#define atomic64_xchg(v, n) (xchg(&((v)->counter), n)) +#endif /* * Two approaches to atomic operations are implemented each with its diff --git a/include/sys/kmem.h b/include/sys/kmem.h index fdeba70d1..f40d0813d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -41,7 +41,7 @@ extern "C" { #include #include #include -#include +#include #include #include #include @@ -109,12 +109,40 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) #endif /* HAVE_KMALLOC_NODE */ #ifdef DEBUG_KMEM +# ifdef HAVE_ATOMIC64_T extern atomic64_t kmem_alloc_used; extern unsigned long long kmem_alloc_max; extern atomic64_t vmem_alloc_used; extern unsigned long long vmem_alloc_max; +# define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used) +# define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used) +# define kmem_alloc_used_read() atomic64_read(&kmem_alloc_used) +# define kmem_alloc_used_set(size) atomic64_set(&kmem_alloc_used, size) +# define vmem_alloc_used_add(size) atomic64_add(size, &vmem_alloc_used) +# define vmem_alloc_used_sub(size) atomic64_sub(size, &vmem_alloc_used) +# define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used) +# define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size) + +# else + +extern atomic_t kmem_alloc_used; +extern unsigned long long kmem_alloc_max; +extern atomic_t vmem_alloc_used; +extern unsigned long long vmem_alloc_max; + +# define kmem_alloc_used_add(size) atomic_add(size, &kmem_alloc_used) +# define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used) +# define kmem_alloc_used_read() atomic_read(&kmem_alloc_used) +# define kmem_alloc_used_set(size) atomic_set(&kmem_alloc_used, size) +# define vmem_alloc_used_add(size) atomic_add(size, &vmem_alloc_used) +# define vmem_alloc_used_sub(size) atomic_sub(size, &vmem_alloc_used) +# define vmem_alloc_used_read() atomic_read(&vmem_alloc_used) +# define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size) + +# endif /* _LP64 */ + # define kmem_alloc(size, flags) __kmem_alloc((size), (flags), 0, 0) # define kmem_zalloc(size, flags) __kmem_alloc((size), ((flags) | \ __GFP_ZERO), 0, 0) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index b86a8ad82..64498ee5d 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -215,11 +215,19 @@ EXPORT_SYMBOL(vmem_size); * report any memory leaked when the module is unloaded. */ #ifdef DEBUG_KMEM + /* Shim layer memory accounting */ +# ifdef HAVE_ATOMIC64_T atomic64_t kmem_alloc_used = ATOMIC64_INIT(0); unsigned long long kmem_alloc_max = 0; atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); unsigned long long vmem_alloc_max = 0; +# else +atomic_t kmem_alloc_used = ATOMIC_INIT(0); +unsigned long long kmem_alloc_max = 0; +atomic_t vmem_alloc_used = ATOMIC_INIT(0); +unsigned long long vmem_alloc_max = 0; +# endif /* _LP64 */ int kmem_warning_flag = 1; EXPORT_SYMBOL(kmem_alloc_used); @@ -392,7 +400,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); /* We use kstrdup() below because the string pointed to by * __FUNCTION__ might not be available by the time we want @@ -402,7 +410,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, kfree(dptr); CWARN("kstrdup() failed in kmem_alloc(%llu, 0x%x) " "(%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); goto out; } @@ -421,15 +429,13 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, kfree(dptr); CWARN("kmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); goto out; } - atomic64_add(size, &kmem_alloc_used); - if (unlikely(atomic64_read(&kmem_alloc_used) > - kmem_alloc_max)) - kmem_alloc_max = - atomic64_read(&kmem_alloc_used); + kmem_alloc_used_add(size); + if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) + kmem_alloc_max = kmem_alloc_used_read(); INIT_HLIST_NODE(&dptr->kd_hlist); INIT_LIST_HEAD(&dptr->kd_list); @@ -446,7 +452,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, CDEBUG_LIMIT(D_INFO, "kmem_alloc(%llu, 0x%x) = %p " "(%lld/%llu)\n", (unsigned long long) size, flags, - ptr, atomic64_read(&kmem_alloc_used), + ptr, kmem_alloc_used_read(), kmem_alloc_max); } out: @@ -472,10 +478,9 @@ kmem_free_track(void *ptr, size_t size) "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, (unsigned long long) size, dptr->kd_func, dptr->kd_line); - atomic64_sub(size, &kmem_alloc_used); - + kmem_alloc_used_sub(size); CDEBUG_LIMIT(D_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, atomic64_read(&kmem_alloc_used), + (unsigned long long) size, kmem_alloc_used_read(), kmem_alloc_max); kfree(dptr->kd_func); @@ -513,7 +518,7 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) kfree(dptr); CWARN("kstrdup() failed in vmem_alloc(%llu, 0x%x) " "(%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&vmem_alloc_used), vmem_alloc_max); + vmem_alloc_used_read(), vmem_alloc_max); goto out; } @@ -525,18 +530,16 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) kfree(dptr); CWARN("vmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&vmem_alloc_used), vmem_alloc_max); + vmem_alloc_used_read(), vmem_alloc_max); goto out; } if (flags & __GFP_ZERO) memset(ptr, 0, size); - atomic64_add(size, &vmem_alloc_used); - if (unlikely(atomic64_read(&vmem_alloc_used) > - vmem_alloc_max)) - vmem_alloc_max = - atomic64_read(&vmem_alloc_used); + vmem_alloc_used_add(size); + if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) + vmem_alloc_max = vmem_alloc_used_read(); INIT_HLIST_NODE(&dptr->kd_hlist); INIT_LIST_HEAD(&dptr->kd_list); @@ -553,7 +556,7 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) CDEBUG_LIMIT(D_INFO, "vmem_alloc(%llu, 0x%x) = %p " "(%lld/%llu)\n", (unsigned long long) size, flags, - ptr, atomic64_read(&vmem_alloc_used), + ptr, vmem_alloc_used_read(), vmem_alloc_max); } out: @@ -578,9 +581,9 @@ vmem_free_track(void *ptr, size_t size) "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, (unsigned long long) size, dptr->kd_func, dptr->kd_line); - atomic64_sub(size, &vmem_alloc_used); + vmem_alloc_used_sub(size); CDEBUG_LIMIT(D_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, atomic64_read(&vmem_alloc_used), + (unsigned long long) size, vmem_alloc_used_read(), vmem_alloc_max); kfree(dptr->kd_func); @@ -609,7 +612,7 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, if (unlikely(size > (PAGE_SIZE * 2)) && kmem_warning_flag) CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); /* Use the correct allocator */ if (node_alloc) { @@ -624,15 +627,15 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, if (ptr == NULL) { CWARN("kmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); } else { - atomic64_add(size, &kmem_alloc_used); - if (unlikely(atomic64_read(&kmem_alloc_used) > kmem_alloc_max)) - kmem_alloc_max = atomic64_read(&kmem_alloc_used); + kmem_alloc_used_add(size); + if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) + kmem_alloc_max = kmem_alloc_used_read(); CDEBUG_LIMIT(D_INFO, "kmem_alloc(%llu, 0x%x) = %p " "(%lld/%llu)\n", (unsigned long long) size, flags, ptr, - atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); } RETURN(ptr); } @@ -646,10 +649,9 @@ kmem_free_debug(void *ptr, size_t size) ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); - atomic64_sub(size, &kmem_alloc_used); - + kmem_alloc_used_sub(size); CDEBUG_LIMIT(D_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, atomic64_read(&kmem_alloc_used), + (unsigned long long) size, kmem_alloc_used_read(), kmem_alloc_max); memset(ptr, 0x5a, size); @@ -672,19 +674,18 @@ vmem_alloc_debug(size_t size, int flags, const char *func, int line) if (ptr == NULL) { CWARN("vmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", (unsigned long long) size, flags, - atomic64_read(&vmem_alloc_used), vmem_alloc_max); + vmem_alloc_used_read(), vmem_alloc_max); } else { if (flags & __GFP_ZERO) memset(ptr, 0, size); - atomic64_add(size, &vmem_alloc_used); - - if (unlikely(atomic64_read(&vmem_alloc_used) > vmem_alloc_max)) - vmem_alloc_max = atomic64_read(&vmem_alloc_used); + vmem_alloc_used_add(size); + if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) + vmem_alloc_max = vmem_alloc_used_read(); CDEBUG_LIMIT(D_INFO, "vmem_alloc(%llu, 0x%x) = %p " "(%lld/%llu)\n", (unsigned long long) size, flags, ptr, - atomic64_read(&vmem_alloc_used), vmem_alloc_max); + vmem_alloc_used_read(), vmem_alloc_max); } RETURN(ptr); @@ -699,10 +700,9 @@ vmem_free_debug(void *ptr, size_t size) ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); - atomic64_sub(size, &vmem_alloc_used); - + vmem_alloc_used_sub(size); CDEBUG_LIMIT(D_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, atomic64_read(&vmem_alloc_used), + (unsigned long long) size, vmem_alloc_used_read(), vmem_alloc_max); memset(ptr, 0x5a, size); @@ -1969,8 +1969,8 @@ spl_kmem_init(void) #endif #ifdef DEBUG_KMEM - atomic64_set(&kmem_alloc_used, 0); - atomic64_set(&vmem_alloc_used, 0); + kmem_alloc_used_set(0); + vmem_alloc_used_set(0); spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); @@ -1986,14 +1986,14 @@ spl_kmem_fini(void) * allocation size and the first few bytes of what's located * at that address to aid in debugging. Performance is not * a serious concern here since it is module unload time. */ - if (atomic64_read(&kmem_alloc_used) != 0) + if (kmem_alloc_used_read() != 0) CWARN("kmem leaked %ld/%ld bytes\n", - atomic64_read(&kmem_alloc_used), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); - if (atomic64_read(&vmem_alloc_used) != 0) + if (vmem_alloc_used_read() != 0) CWARN("vmem leaked %ld/%ld bytes\n", - atomic64_read(&vmem_alloc_used), vmem_alloc_max); + vmem_alloc_used_read(), vmem_alloc_max); spl_kmem_fini_tracking(&kmem_list, &kmem_lock); spl_kmem_fini_tracking(&vmem_list, &vmem_lock); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 08bcac625..dcd686c9e 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -409,8 +409,8 @@ proc_console_backoff(struct ctl_table *table, int write, struct file *filp, #ifdef DEBUG_KMEM static int -proc_doatomic64(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +proc_domemused(struct ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) { int rc = 0; unsigned long min = 0, max = ~0, val; @@ -425,7 +425,11 @@ proc_doatomic64(struct ctl_table *table, int write, struct file *filp, if (write) { *ppos += *lenp; } else { +# ifdef HAVE_ATOMIC64_T val = atomic64_read((atomic64_t *)table->data); +# else + val = atomic_read((atomic_t *)table->data); +# endif /* HAVE_ATOMIC64_T */ rc = proc_doulongvec_minmax(&dummy, write, filp, buffer, lenp, ppos); } @@ -861,9 +865,13 @@ static struct ctl_table spl_kmem_table[] = { .ctl_name = CTL_KMEM_KMEMUSED, .procname = "kmem_used", .data = &kmem_alloc_used, +# ifdef HAVE_ATOMIC64_T .maxlen = sizeof(atomic64_t), +# else + .maxlen = sizeof(atomic_t), +# endif /* HAVE_ATOMIC64_T */ .mode = 0444, - .proc_handler = &proc_doatomic64, + .proc_handler = &proc_domemused, }, { .ctl_name = CTL_KMEM_KMEMMAX, @@ -879,9 +887,13 @@ static struct ctl_table spl_kmem_table[] = { .ctl_name = CTL_KMEM_VMEMUSED, .procname = "vmem_used", .data = &vmem_alloc_used, +# ifdef HAVE_ATOMIC64_T .maxlen = sizeof(atomic64_t), +# else + .maxlen = sizeof(atomic_t), +# endif /* HAVE_ATOMIC64_T */ .mode = 0444, - .proc_handler = &proc_doatomic64, + .proc_handler = &proc_domemused, }, { .ctl_name = CTL_KMEM_VMEMMAX, From f60a5f5221c594372d96767d9859a334ed0a80a6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 Dec 2009 15:06:07 -0800 Subject: [PATCH 0345/1062] Splat vnode tests must return negative error codes. I must have been in a hurry when I wrote the vnode regression tests because the error code handling is not correct. The Solaris vnode API returns positive errno's, these need to be converted to negative errno's for Linux before being passed back to user space. Otherwise the test hardness with report the failure but errno will not be set with the correct error code. Additionally tests 3, 4, 6, and 7 may fail in the test file already exists. To avoid false positives a user mode helper has added to remove the test files in /tmp/ before running the actual test. --- module/splat/splat-vnode.c | 107 ++++++++++++++++++++++++++++--------- 1 file changed, 82 insertions(+), 25 deletions(-) diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index e545ce9f1..91a719b5f 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -64,6 +64,51 @@ #define SPLAT_VNODE_TEST_FILE_RW1 "/tmp/spl.vnode.tmp.1" #define SPLAT_VNODE_TEST_FILE_RW2 "/tmp/spl.vnode.tmp.2" +static int +splat_vnode_user_cmd(struct file *file, void *arg, + char *name, char *cmd) +{ + char sh_path[] = "/bin/sh"; + char *argv[] = { sh_path, + "-c", + cmd, + NULL }; + char *envp[] = { "HOME=/", + "TERM=linux", + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", + NULL }; + int rc; + + rc = call_usermodehelper(sh_path, argv, envp, 1); + if (rc) { + splat_vprint(file, name, + "Failed command: %s %s %s (%d)\n", + argv[0], argv[1], cmd, rc); + return -EPERM; + } + + return 0; +} + +static int +splat_vnode_unlink_all(struct file *file, void *arg, char *name) +{ + char *cmds[] = { "rm -f " SPLAT_VNODE_TEST_FILE_RW, + "rm -f " SPLAT_VNODE_TEST_FILE_RW1, + "rm -f " SPLAT_VNODE_TEST_FILE_RW2, + NULL }; + int i = 0, rc = 0; + + while (cmds[i] != NULL) { + if ((rc = splat_vnode_user_cmd(file, arg, name, cmds[i]))) + return rc; + + i++; + } + + return rc; +} + static int splat_vnode_test1(struct file *file, void *arg) { @@ -75,7 +120,7 @@ splat_vnode_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_VNODE_TEST1_NAME, "Failed to vn_open test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE, rc); - return rc; + return -rc; } rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); @@ -85,13 +130,13 @@ splat_vnode_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_VNODE_TEST1_NAME, "Failed to vn_close test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE, rc); - return rc; + return -rc; } splat_vprint(file, SPLAT_VNODE_TEST1_NAME, "Successfully vn_open'ed " "and vn_closed test file: %s\n", SPLAT_VNODE_TEST_FILE); - return rc; + return -rc; } /* splat_vnode_test1() */ static int @@ -105,7 +150,7 @@ splat_vnode_test2(struct file *file, void *arg) splat_vprint(file, SPLAT_VNODE_TEST2_NAME, "Failed to vn_openat test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE, rc); - return rc; + return -rc; } rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); @@ -115,13 +160,13 @@ splat_vnode_test2(struct file *file, void *arg) splat_vprint(file, SPLAT_VNODE_TEST2_NAME, "Failed to vn_close test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE, rc); - return rc; + return -rc; } splat_vprint(file, SPLAT_VNODE_TEST2_NAME, "Successfully vn_openat'ed " "and vn_closed test file: %s\n", SPLAT_VNODE_TEST_FILE); - return rc; + return -rc; } /* splat_vnode_test2() */ static int @@ -132,18 +177,21 @@ splat_vnode_test3(struct file *file, void *arg) char buf2[32] = ""; int rc; + if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST3_NAME))) + return rc; + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, FWRITE | FREAD | FCREAT | FEXCL, 0644, &vp, 0, 0))) { splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Failed to vn_open test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); - return rc; + return -rc; } rc = vn_rdwr(UIO_WRITE, vp, buf1, strlen(buf1), 0, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc < 0) { + if (rc) { splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Failed vn_rdwr write of test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); @@ -152,7 +200,7 @@ splat_vnode_test3(struct file *file, void *arg) rc = vn_rdwr(UIO_READ, vp, buf2, strlen(buf1), 0, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc < 0) { + if (rc) { splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Failed vn_rdwr read of test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); @@ -160,7 +208,7 @@ splat_vnode_test3(struct file *file, void *arg) } if (strncmp(buf1, buf2, strlen(buf1))) { - rc = -EINVAL; + rc = EINVAL; splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Failed strncmp data written does not match " "data read\nWrote: %sRead: %s\n", buf1, buf2); @@ -179,7 +227,7 @@ out: VN_RELE(vp); vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); - return rc; + return -rc; } /* splat_vnode_test3() */ static int @@ -190,6 +238,9 @@ splat_vnode_test4(struct file *file, void *arg) char buf2[32] = ""; int rc; + if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST4_NAME))) + return rc; + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, FWRITE | FREAD | FCREAT | FEXCL, 0644, &vp, 0, 0))) { splat_vprint(file, SPLAT_VNODE_TEST4_NAME, @@ -200,7 +251,7 @@ splat_vnode_test4(struct file *file, void *arg) rc = vn_rdwr(UIO_WRITE, vp, buf1, strlen(buf1), 0, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc < 0) { + if (rc) { splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Failed vn_rdwr write of test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW1, rc); @@ -229,7 +280,7 @@ splat_vnode_test4(struct file *file, void *arg) rc = vn_rdwr(UIO_READ, vp, buf2, strlen(buf1), 0, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc < 0) { + if (rc) { splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Failed vn_rdwr read of test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW2, rc); @@ -259,7 +310,7 @@ out: vn_remove(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, RMFILE); vn_remove(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE, RMFILE); - return rc; + return -rc; } /* splat_vnode_test4() */ static int @@ -274,7 +325,7 @@ splat_vnode_test5(struct file *file, void *arg) splat_vprint(file, SPLAT_VNODE_TEST5_NAME, "Failed to vn_open test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE, rc); - return rc; + return -rc; } rc = VOP_GETATTR(vp, &vap, 0, 0, NULL); @@ -286,7 +337,7 @@ splat_vnode_test5(struct file *file, void *arg) } if (vap.va_type != VREG) { - rc = -EINVAL; + rc = EINVAL; splat_vprint(file, SPLAT_VNODE_TEST5_NAME, "Failed expected regular file type " "(%d != VREG): %s (%d)\n", vap.va_type, @@ -301,7 +352,7 @@ out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); VN_RELE(vp); - return rc; + return -rc; } /* splat_vnode_test5() */ static int @@ -311,17 +362,20 @@ splat_vnode_test6(struct file *file, void *arg) char buf[32] = "SPL VNode Interface Test File\n"; int rc; + if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST6_NAME))) + return rc; + if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, FWRITE | FCREAT | FEXCL, 0644, &vp, 0, 0))) { splat_vprint(file, SPLAT_VNODE_TEST6_NAME, "Failed to vn_open test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); - return rc; + return -rc; } rc = vn_rdwr(UIO_WRITE, vp, buf, strlen(buf), 0, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc < 0) { + if (rc) { splat_vprint(file, SPLAT_VNODE_TEST6_NAME, "Failed vn_rdwr write of test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); @@ -344,7 +398,7 @@ out: VN_RELE(vp); vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); - return rc; + return -rc; } /* splat_vnode_test6() */ /* Basically a slightly modified version of sys_close() */ @@ -401,6 +455,9 @@ splat_vnode_test7(struct file *file, void *arg) file_t *fp; int rc, fd; + if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST7_NAME))) + return rc; + /* Prep work needed to test getf/releasef */ fd = get_unused_fd(); if (fd < 0) { @@ -426,7 +483,7 @@ splat_vnode_test7(struct file *file, void *arg) /* Actual getf()/releasef() test */ fp = vn_getf(fd); if (fp == NULL) { - rc = -EINVAL; + rc = EINVAL; splat_vprint(file, SPLAT_VNODE_TEST7_NAME, "Failed to getf fd %d: (%d)\n", fd, rc); goto out; @@ -434,7 +491,7 @@ splat_vnode_test7(struct file *file, void *arg) rc = vn_rdwr(UIO_WRITE, fp->f_vnode, buf1, strlen(buf1), 0, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc < 0) { + if (rc) { splat_vprint(file, SPLAT_VNODE_TEST7_NAME, "Failed vn_rdwr write of test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); @@ -443,7 +500,7 @@ splat_vnode_test7(struct file *file, void *arg) rc = vn_rdwr(UIO_READ, fp->f_vnode, buf2, strlen(buf1), 0, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc < 0) { + if (rc) { splat_vprint(file, SPLAT_VNODE_TEST7_NAME, "Failed vn_rdwr read of test file: %s (%d)\n", SPLAT_VNODE_TEST_FILE_RW, rc); @@ -451,7 +508,7 @@ splat_vnode_test7(struct file *file, void *arg) } if (strncmp(buf1, buf2, strlen(buf1))) { - rc = -EINVAL; + rc = EINVAL; splat_vprint(file, SPLAT_VNODE_TEST7_NAME, "Failed strncmp data written does not match " "data read\nWrote: %sRead: %s\n", buf1, buf2); @@ -470,7 +527,7 @@ out: filp_close(lfp, 0); vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); - return rc; + return -rc; } /* splat_vnode_test7() */ splat_subsystem_t * From 242f539a2ea886769a6408192a6a263fb2a45eaf Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Dec 2009 11:20:08 -0800 Subject: [PATCH 0346/1062] Add skc_flags and full header to /proc/spl/kmem/slab. --- module/spl/spl-proc.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index dcd686c9e..6458186ee 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -581,33 +581,40 @@ proc_dofreemem(struct ctl_table *table, int write, struct file *filp, static void slab_seq_show_headers(struct seq_file *f) { - seq_printf(f, "%-36s\n", "name"); + seq_printf(f, "%-36s %-6s - %s %s %s - %s %s %s - " + "%s %s %s - %s %s %s\n", "name", "flags", + "obj_size", "slab_objs", "slab_size", + "slab_fail", "slab_create", "slab_destroy", + "slab_total", "slab_alloc", "slab_max", + "obj_total", "obj_alloc", "obj_max"); } static int slab_seq_show(struct seq_file *f, void *p) { - spl_kmem_cache_t *skc = p; + spl_kmem_cache_t *skc = p; - ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skc->skc_magic == SKC_MAGIC); - spin_lock(&skc->skc_lock); + spin_lock(&skc->skc_lock); seq_printf(f, "%-36s ", skc->skc_name); - seq_printf(f, "%u %u %u - %lu %lu %lu - %lu %lu %lu - %lu %lu %lu\n", - (unsigned)skc->skc_obj_size, - (unsigned)skc->skc_slab_objs, - (unsigned)skc->skc_slab_size, - (long unsigned)skc->skc_slab_fail, - (long unsigned)skc->skc_slab_create, - (long unsigned)skc->skc_slab_destroy, - (long unsigned)skc->skc_slab_total, - (long unsigned)skc->skc_slab_alloc, - (long unsigned)skc->skc_slab_max, - (long unsigned)skc->skc_obj_total, - (long unsigned)skc->skc_obj_alloc, - (long unsigned)skc->skc_obj_max); + seq_printf(f, "0x%04lx - %u %u %u - %lu %lu %lu - " + "%lu %lu %lu - %lu %lu %lu\n", + (long unsigned)skc->skc_flags, + (unsigned)skc->skc_obj_size, + (unsigned)skc->skc_slab_objs, + (unsigned)skc->skc_slab_size, + (long unsigned)skc->skc_slab_fail, + (long unsigned)skc->skc_slab_create, + (long unsigned)skc->skc_slab_destroy, + (long unsigned)skc->skc_slab_total, + (long unsigned)skc->skc_slab_alloc, + (long unsigned)skc->skc_slab_max, + (long unsigned)skc->skc_obj_total, + (long unsigned)skc->skc_obj_alloc, + (long unsigned)skc->skc_obj_max); - spin_unlock(&skc->skc_lock); + spin_unlock(&skc->skc_lock); return 0; } From 3a03ce5cbf61def830905dfab0f43d5b6074f921 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 17 Dec 2009 11:57:44 -0800 Subject: [PATCH 0347/1062] Check for changed gaurd macro in 2.6.28+ for rwsem implementation. As part of the 2.6.28 cleanup which moved all the linux/include/asm/ headers in to linux/arch, the guard headers for many header files changed. The i386 rwsem implementation keys off this header to ensure the internal members of the rwsem structure are interpreted correctly. This change checks for the new guard macro in addition to the only one, the implementation of the rwsem has not changed for i386 so this is safe and correct. --- include/sys/rwlock.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 0043f3966..89fdfa537 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -64,7 +64,11 @@ typedef struct { extern void __up_read_locked(struct rw_semaphore *); extern int __down_write_trylock_locked(struct rw_semaphore *); #else -# ifdef _I386_RWSEM_H +/* + * 2.6.x - 2.6.27 use guard macro _I386_RWSEM_H + * 2.6.28 - 2.6.32+ use guard macro _ASM_X86_RWSEM_H + */ +# if defined(_I386_RWSEM_H) || defined(_ASM_X86_RWSEM_H) # define RW_COUNT(rwp) ((SEM(rwp)->count < 0) ? (-1) : \ (SEM(rwp)->count & RWSEM_ACTIVE_MASK)) # else From 641bebe35f0675489357fd2db5d20e1bfc055648 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 23 Dec 2009 12:46:11 -0800 Subject: [PATCH 0348/1062] Fix kmem:slab_overcommit regression test locking This regression test could crash in splat_kmem_cache_test_reclaim() due to a race between the slab relclaim and the normal exiting of the thread. Specifically, the kct structure could be free'd by the thread performing the allocations while the reclaim function was also working on that's threads kct structure. The simplest fix is to extend the kcp->kcp_lock over the reclaim to prevent the kct from being freed. A better fix would be to ref count these structures, but since is just a regression this locking change is enough. Surprisingly this was only observed commonly under RHEL5.4 but all platform could have hit this. --- module/splat/splat-kmem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 6957f1f1c..c743dd163 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -418,9 +418,10 @@ splat_kmem_cache_test_reclaim(void *priv) for (i = 0; i < kcp->kcp_kct_count; i++) { spin_lock(&kcp->kcp_lock); kct = kcp->kcp_kct[i]; - spin_unlock(&kcp->kcp_lock); - if (!kct) + if (!kct) { + spin_unlock(&kcp->kcp_lock); continue; + } spin_lock(&kct->kct_lock); count = kct->kct_kcd_count * SPLAT_KMEM_OBJ_RECLAIM / 100; @@ -435,6 +436,7 @@ splat_kmem_cache_test_reclaim(void *priv) } } spin_unlock(&kct->kct_lock); + spin_unlock(&kcp->kcp_lock); } return; From ef1c7a069131512458be75aae1e4857fcd8f133b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 23 Dec 2009 12:57:10 -0800 Subject: [PATCH 0349/1062] Strip __GFP_ZERO from kmalloc it is not available for older kernels. This is needed to avoid a BUG_ON() on RHEL5.4 kernel 2.6.18-164.6.1, since __GFP_ZERO is not a valid flag for kmalloc(). --- module/spl/spl-kmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 64498ee5d..f87d2b55a 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -505,7 +505,8 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) ASSERT(flags & KM_SLEEP); - dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags); + dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), + flags & ~__GFP_ZERO); if (dptr == NULL) { CWARN("vmem_alloc(%ld, 0x%x) debug failed\n", sizeof(kmem_debug_t), flags); From 82387586af283ac5fa6cde5d316f7ed4c587efec Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 4 Jan 2010 15:52:26 -0800 Subject: [PATCH 0350/1062] Optimize lowest outstanding taskqid calculation in taskq_lowest_id() In the initial version of taskq_lowest_id() the entire pending and work list was locked under the tq->tq_lock to determine the lowest outstanding taskqid. At the time this done because I was rushed and wanted to make sure it was right... fast was secondary. Well now fast is important too so I carefully thought through the pending and work list management and convinced myself it is safe and correct to simply check the first entry. I added a large comment to the source to explain this. But basically as long as we are careful to ensure the pending and work list stay sorted this is safe and fast. The motivation for this chance was that I was observing as much as 10% of the total CPU time go to waiting on the tq->tq_lock when the pending list was long. This resolves that problems and frees up that CPU time for something useful. --- module/spl/spl-taskq.c | 61 ++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 7575aa3b0..16b1382d9 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -45,7 +45,8 @@ typedef struct spl_task { void *t_arg; } spl_task_t; -/* NOTE: Must be called with tq->tq_lock held, returns a list_t which +/* + * NOTE: Must be called with tq->tq_lock held, returns a list_t which * is not attached to the free, work, or pending taskq lists. */ static spl_task_t * @@ -109,7 +110,8 @@ retry: RETURN(t); } -/* NOTE: Must be called with tq->tq_lock held, expects the spl_task_t +/* + * NOTE: Must be called with tq->tq_lock held, expects the spl_task_t * to already be removed from the free, work, or pending taskq lists. */ static void @@ -128,7 +130,8 @@ task_free(taskq_t *tq, spl_task_t *t) EXIT; } -/* NOTE: Must be called with tq->tq_lock held, either destroys the +/* + * NOTE: Must be called with tq->tq_lock held, either destroys the * spl_task_t if too many exist or moves it to the free list for later use. */ static void @@ -153,13 +156,28 @@ task_done(taskq_t *tq, spl_task_t *t) EXIT; } -/* Taskqid's are handed out in a monotonically increasing fashion per - * taskq_t. We don't handle taskqid wrapping yet, but fortunately it is - * a 64-bit value so this is probably never going to happen. The lowest - * pending taskqid is stored in the taskq_t to make it easy for any - * taskq_wait()'ers to know if the tasks they're waiting for have - * completed. Unfortunately, tq_task_lowest is kept up to date is - * a pretty brain dead way, something more clever should be done. +/* + * As tasks are submitted to the task queue they are assigned a + * monotonically increasing taskqid and added to the tail of the + * pending list. As worker threads become available the tasks are + * removed from the head of the pending list and added to the tail + * of the work list. Finally, as tasks complete they are removed + * from the work list. This means that the pending and work lists + * are always kept sorted by taskqid. Thus the lowest outstanding + * incomplete taskqid can be determined simply by checking the min + * taskqid for each head item on the pending and work list. This + * value is stored in tq->tq_lowest_id and only updated to the new + * lowest id when the previous lowest id completes. All taskqids + * lower than tq->tq_lowest_id must have completed. It is also + * possible larger taskqid's have completed because they may be + * processed in parallel by several worker threads. However, this + * is not a problem because the behavior of taskq_wait_id() is to + * block until all previously submitted taskqid's have completed. + * + * XXX: Taskqid_t wrapping is not handled. However, taskqid_t's are + * 64-bit values so even if a taskq is processing 2^24 (16,777,216) + * taskqid_ts per second it will still take 2^40 seconds, 34,865 years, + * before the wrap occurs. I can live with that for now. */ static int taskq_wait_check(taskq_t *tq, taskqid_t id) @@ -173,9 +191,6 @@ taskq_wait_check(taskq_t *tq, taskqid_t id) RETURN(rc); } -/* Expected to wait for all previously scheduled tasks to complete. We do - * not need to wait for tasked scheduled after this call to complete. In - * other words we do not need to drain the entire taskq. */ void __taskq_wait_id(taskq_t *tq, taskqid_t id) { @@ -268,7 +283,11 @@ out: } EXPORT_SYMBOL(__taskq_dispatch); -/* NOTE: Must be called with tq->tq_lock held */ +/* + * Returns the lowest incomplete taskqid_t. The taskqid_t may + * be queued on the pending list or may be on the work list + * currently being handled, but it is not 100% complete yet. + */ static taskqid_t taskq_lowest_id(taskq_t *tq) { @@ -279,13 +298,15 @@ taskq_lowest_id(taskq_t *tq) ASSERT(tq); ASSERT(spin_is_locked(&tq->tq_lock)); - list_for_each_entry(t, &tq->tq_pend_list, t_list) - if (t->t_id < lowest_id) - lowest_id = t->t_id; + if (!list_empty(&tq->tq_pend_list)) { + t = list_entry(tq->tq_pend_list.next, spl_task_t, t_list); + lowest_id = MIN(lowest_id, t->t_id); + } - list_for_each_entry(t, &tq->tq_work_list, t_list) - if (t->t_id < lowest_id) - lowest_id = t->t_id; + if (!list_empty(&tq->tq_work_list)) { + t = list_entry(tq->tq_work_list.next, spl_task_t, t_list); + lowest_id = MIN(lowest_id, t->t_id); + } RETURN(lowest_id); } From 5562e5d105aa5120a828b38c5d1a635d852bcdde Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 5 Jan 2010 13:34:09 -0800 Subject: [PATCH 0351/1062] Added splat taskq task ordering test case. This test case verifies the correct behavior of taskq_wait_id(). In particular it ensure the the following two cases are handled properly: 1) Task ids larger than the waited for task id can run and complete as long as there is an available worker thread. 2) All task ids lower than the waited one must complete before unblocking even if the waited task id itself has completed. --- module/splat/splat-taskq.c | 223 +++++++++++++++++++++++++++++++++++-- 1 file changed, 212 insertions(+), 11 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 6ce398a0e..9214ecf8d 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -33,28 +33,42 @@ #define SPLAT_TASKQ_TEST1_NAME "single" #define SPLAT_TASKQ_TEST1_DESC "Single task queue, single task" -#define SPLAT_TASKQ_TEST2_ID 0x0202 +#define SPLAT_TASKQ_TEST2_ID 0x0202 #define SPLAT_TASKQ_TEST2_NAME "multiple" #define SPLAT_TASKQ_TEST2_DESC "Multiple task queues, multiple tasks" -#define SPLAT_TASKQ_TEST3_ID 0x0203 +#define SPLAT_TASKQ_TEST3_ID 0x0203 #define SPLAT_TASKQ_TEST3_NAME "system" #define SPLAT_TASKQ_TEST3_DESC "System task queue, multiple tasks" -#define SPLAT_TASKQ_TEST4_ID 0x0204 +#define SPLAT_TASKQ_TEST4_ID 0x0204 #define SPLAT_TASKQ_TEST4_NAME "wait" #define SPLAT_TASKQ_TEST4_DESC "Multiple task waiting" +#define SPLAT_TASKQ_TEST5_ID 0x0205 +#define SPLAT_TASKQ_TEST5_NAME "order" +#define SPLAT_TASKQ_TEST5_DESC "Correct task ordering" + +#define SPLAT_TASKQ_ORDER_MAX 8 + typedef struct splat_taskq_arg { int flag; int id; atomic_t count; + int order[SPLAT_TASKQ_ORDER_MAX]; + spinlock_t lock; struct file *file; const char *name; } splat_taskq_arg_t; -/* Validation Test 1 - Create a taskq, queue a task, wait until - * task completes, ensure task ran properly, cleanup taskq, +typedef struct splat_taskq_id { + int id; + splat_taskq_arg_t *arg; +} splat_taskq_id_t; + +/* + * Create a taskq, queue a task, wait until task completes, ensure + * task ran properly, cleanup taskq. */ static void splat_taskq_test13_func(void *arg) @@ -112,9 +126,11 @@ splat_taskq_test1(struct file *file, void *arg) return (tq_arg.flag) ? 0 : -EINVAL; } -/* Validation Test 2 - Create multiple taskq's, each with multiple tasks, - * wait until all tasks complete, ensure all tasks ran properly and in the - * the correct order, cleanup taskq's +/* + * Create multiple taskq's, each with multiple tasks, wait until + * all tasks complete, ensure all tasks ran properly and in the + * correct order. Run order must be the same as the order submitted + * because we only have 1 thread per taskq. Finally cleanup the taskq. */ static void splat_taskq_test2_func1(void *arg) @@ -145,7 +161,7 @@ splat_taskq_test2_func2(void *arg) } #define TEST2_TASKQS 8 -#define TEST2_THREADS_PER_TASKQ 4 +#define TEST2_THREADS_PER_TASKQ 1 static int splat_taskq_test2(struct file *file, void *arg) { @@ -238,8 +254,9 @@ splat_taskq_test2(struct file *file, void *arg) { return rc; } -/* Validation Test 3 - Use the global system task queue with a single - * task, * wait until task completes, ensure task ran properly. +/* + * Use the global system task queue with a single task, wait until task + * completes, ensure task ran properly. */ static int splat_taskq_test3(struct file *file, void *arg) @@ -270,6 +287,12 @@ splat_taskq_test3(struct file *file, void *arg) return (tq_arg.flag) ? 0 : -EINVAL; } +/* + * Create a taskq and dispatch a large number of tasks to the queue. + * Then use taskq_wait() to block until all the tasks complete, then + * cross check that all the tasks ran by checking tg_arg->count which + * is incremented in the task function. Finally cleanup the taskq. + */ static void splat_taskq_test4_func(void *arg) { @@ -337,6 +360,181 @@ out: return rc; } +/* + * Create a taskq and dispatch a specific sequence of tasks carefully + * crafted to validate the order in which tasks are processed. When + * there are multiple worker threads each thread will process the + * next pending task as soon as it completes its current task. This + * means that tasks do not strictly complete in order in which they + * were dispatched (increasing task id). This is fine but we need to + * verify that taskq_wait_id() blocks until the passed task id and all + * lower task ids complete. We do this by dispatching the following + * specific sequence of tasks each of which block for N time units. + * We then use taskq_wait_id() to unblock at specific task id and + * verify the only the expected task ids have completed and in the + * correct order. The two cases of interest are: + * + * 1) Task ids larger than the waited for task id can run and + * complete as long as there is an available worker thread. + * 2) All task ids lower than the waited one must complete before + * unblocking even if the waited task id itself has completed. + * + * The following table shows each task id and how they will be + * scheduled. Each rows represent one time unit and each column + * one of the three worker threads. The places taskq_wait_id() + * must unblock for a specific id are identified as well as the + * task ids which must have completed and their order. + * + * +-----+ <--- taskq_wait_id(tq, 8) unblocks + * | | Required Completion Order: 1,2,4,5,3 + * +-----+ | + * | | | + * | | +-----+ + * | | | 8 | + * | | +-----+ <--- taskq_wait_id(tq, 3) unblocks + * | | 7 | | Required Completion Order: 1,2,4,5,3,8,6,7 + * | +-----+ | + * | 6 | | | + * +-----+ | | + * | | 5 | | + * | +-----+ | + * | 4 | | | + * +-----+ | | + * | 1 | 2 | 3 | + * +-----+-----+-----+ + * + */ +static void +splat_taskq_test5_func(void *arg) +{ + splat_taskq_id_t *tq_id = (splat_taskq_id_t *)arg; + splat_taskq_arg_t *tq_arg = tq_id->arg; + int factor; + + /* Delays determined by above table */ + switch (tq_id->id) { + default: factor = 0; break; + case 1: case 8: factor = 1; break; + case 2: case 4: case 5: factor = 2; break; + case 6: case 7: factor = 4; break; + case 3: factor = 5; break; + } + + msleep(factor * 100); + splat_vprint(tq_arg->file, tq_arg->name, + "Taskqid %d complete for taskq '%s'\n", + tq_id->id, tq_arg->name); + + spin_lock(&tq_arg->lock); + tq_arg->order[tq_arg->flag] = tq_id->id; + tq_arg->flag++; + spin_unlock(&tq_arg->lock); +} + +static int +splat_taskq_test5_order(splat_taskq_arg_t *tq_arg, int *order) +{ + int i, j; + + for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { + if (tq_arg->order[i] != order[i]) { + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + "Taskq '%s' incorrect completion " + "order\n", tq_arg->name); + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + "%s", "Expected { "); + + for (j = 0; j < SPLAT_TASKQ_ORDER_MAX; j++) + splat_print(tq_arg->file, "%d ", order[j]); + + splat_print(tq_arg->file, "%s", "}\n"); + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + "%s", "Got { "); + + for (j = 0; j < SPLAT_TASKQ_ORDER_MAX; j++) + splat_print(tq_arg->file, "%d ", + tq_arg->order[j]); + + splat_print(tq_arg->file, "%s", "}\n"); + return -EILSEQ; + } + } + + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + "Taskq '%s' validated correct completion order\n", + tq_arg->name); + + return 0; +} + +static int +splat_taskq_test5(struct file *file, void *arg) +{ + taskq_t *tq; + taskqid_t id; + splat_taskq_id_t tq_id[SPLAT_TASKQ_ORDER_MAX]; + splat_taskq_arg_t tq_arg; + int order1[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,0,0,0 }; + int order2[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,8,6,7 }; + int i, rc = 0; + + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' creating\n", + SPLAT_TASKQ_TEST5_NAME); + if ((tq = taskq_create(SPLAT_TASKQ_TEST5_NAME, 3, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, + "Taskq '%s' create failed\n", + SPLAT_TASKQ_TEST5_NAME); + return -EINVAL; + } + + tq_arg.flag = 0; + memset(&tq_arg.order, 0, sizeof(int) * SPLAT_TASKQ_ORDER_MAX); + spin_lock_init(&tq_arg.lock); + tq_arg.file = file; + tq_arg.name = SPLAT_TASKQ_TEST5_NAME; + + for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { + tq_id[i].id = i + 1; + tq_id[i].arg = &tq_arg; + + if ((id = taskq_dispatch(tq, splat_taskq_test5_func, + &tq_id[i], TQ_SLEEP)) == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, + "Taskq '%s' function '%s' dispatch failed\n", + tq_arg.name, sym2str(splat_taskq_test5_func)); + rc = -EINVAL; + goto out; + } + + if (tq_id[i].id != id) { + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, + "Taskq '%s' expected taskqid %d got %d\n", + tq_arg.name, (int)tq_id[i].id, (int)id); + rc = -EINVAL; + goto out; + } + } + + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " + "waiting for taskqid %d completion\n", tq_arg.name, 3); + taskq_wait_id(tq, 3); + if ((rc = splat_taskq_test5_order(&tq_arg, order1))) + goto out; + + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " + "waiting for taskqid %d completion\n", tq_arg.name, 8); + taskq_wait_id(tq, 8); + rc = splat_taskq_test5_order(&tq_arg, order2); + +out: + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, + "Taskq '%s' destroying\n", tq_arg.name); + taskq_destroy(tq); + + return rc; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -362,6 +560,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST3_ID, splat_taskq_test3); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST4_NAME, SPLAT_TASKQ_TEST4_DESC, SPLAT_TASKQ_TEST4_ID, splat_taskq_test4); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST5_NAME, SPLAT_TASKQ_TEST5_DESC, + SPLAT_TASKQ_TEST5_ID, splat_taskq_test5); return sub; } @@ -370,6 +570,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST4_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST3_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST2_ID); From b520b14305975bc8b18d3b8e3844ba6c4e119a0d Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 7 Jan 2010 16:58:29 +0000 Subject: [PATCH 0352/1062] sun-fix-panic-str Fix panic() string, which was being used as a format string, instead of an already-formatted string. Signed-off-by: Ricardo M. Correia --- module/spl/spl-err.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 3ee284868..f87e2a394 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -44,7 +44,7 @@ vpanic(const char *fmt, va_list ap) char msg[MAXMSGLEN]; vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); - panic(msg); + panic("%s", msg); } /* vpanic() */ EXPORT_SYMBOL(vpanic); From f7e8739c940c4175b5298de9a00c8c7974aff489 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 7 Jan 2010 16:58:30 +0000 Subject: [PATCH 0353/1062] sun-fix-whitespace Whitespace fixes. Signed-off-by: Ricardo M. Correia --- include/sys/list.h | 2 +- module/spl/spl-err.c | 8 ++++---- module/spl/spl-vnode.c | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/sys/list.h b/include/sys/list.h index 0a4cf1183..faf7c7a45 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -167,7 +167,7 @@ list_prev(list_t *list, void *object) static inline int list_link_active(list_node_t *node) { - return (node->next != LIST_POISON1) && (node->prev != LIST_POISON2); + return (node->next != LIST_POISON1) && (node->prev != LIST_POISON2); } static inline void diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index f87e2a394..fcf701400 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -53,10 +53,10 @@ vcmn_err(int ce, const char *fmt, va_list ap) { char msg[MAXMSGLEN]; - if (ce == CE_PANIC) - vpanic(fmt, ap); + if (ce == CE_PANIC) + vpanic(fmt, ap); - if (ce != CE_NOTE) { + if (ce != CE_NOTE) { vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); if (fmt[0] == '!') @@ -64,7 +64,7 @@ vcmn_err(int ce, const char *fmt, va_list ap) ce_prefix[ce], msg, ce_suffix[ce]); else CERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); - } + } } /* vcmn_err() */ EXPORT_SYMBOL(vcmn_err); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 7d2080022..12e09b781 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -102,9 +102,9 @@ int vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2) { - struct file *fp; - struct kstat stat; - int rc, saved_umask = 0; + struct file *fp; + struct kstat stat; + int rc, saved_umask = 0; vnode_t *vp; ENTRY; @@ -126,15 +126,15 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, if (flags & FCREAT) saved_umask = xchg(¤t->fs->umask, 0); - fp = filp_open(path, flags, mode); + fp = filp_open(path, flags, mode); if (flags & FCREAT) (void)xchg(¤t->fs->umask, saved_umask); - if (IS_ERR(fp)) + if (IS_ERR(fp)) RETURN(-PTR_ERR(fp)); - rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); + rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) { filp_close(fp, 0); RETURN(-rc); From 694921bc49b3267b3fc0bc3a9e753fbc206e1a61 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Fri, 8 Jan 2010 01:19:49 +0000 Subject: [PATCH 0354/1062] sun-misc-gitignore Add .gitignore files. Signed-off-by: Ricardo M. Correia --- .gitignore | 47 +++++++++++++++++++++++++++++++++++++++++ cmd/.gitignore | 3 +++ include/.gitignore | 1 + lib/.gitignore | 1 + module/.gitignore | 4 ++++ module/spl/.gitignore | 1 + module/splat/.gitignore | 1 + scripts/.gitignore | 1 + 8 files changed, 59 insertions(+) create mode 100644 .gitignore create mode 100644 cmd/.gitignore create mode 100644 include/.gitignore create mode 100644 lib/.gitignore create mode 100644 module/.gitignore create mode 100644 module/spl/.gitignore create mode 100644 module/splat/.gitignore create mode 100644 scripts/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..27807cad9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# +# N.B. +# This is the toplevel .gitignore file. +# This is not the place for entries that are specific to +# a subdirectory. Instead add those files to the +# .gitignore file in that subdirectory. +# +# N.B. +# Please use 'git ls-files -i --exclude-standard' +# command after changing this file, to see if there are +# any tracked files which get ignored after the change. + +# +# Normal rules +# +*.[oa] +*.ko +*.lo +*.la +*.mod.c +*~ +*.swp +.*.cmd +.deps +.libs +.DS_Store +modules.order + +# +# Top level generated files specific to this top level dir +# +/Makefile +/config.log +/config.status +/libtool +/spl_config.h +/spl.spec +/spl-modules.spec +/stamp-h1 + +# +# Top level generic files +# +!.gitignore +tags +TAGS +cscope.* diff --git a/cmd/.gitignore b/cmd/.gitignore new file mode 100644 index 000000000..1b34aca0a --- /dev/null +++ b/cmd/.gitignore @@ -0,0 +1,3 @@ +/Makefile +/spl +/splat diff --git a/include/.gitignore b/include/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/include/.gitignore @@ -0,0 +1 @@ +/Makefile diff --git a/lib/.gitignore b/lib/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/lib/.gitignore @@ -0,0 +1 @@ +/Makefile diff --git a/module/.gitignore b/module/.gitignore new file mode 100644 index 000000000..7a922a409 --- /dev/null +++ b/module/.gitignore @@ -0,0 +1,4 @@ +/.tmp_versions +/Makefile +/Module.markers +/Module.symvers diff --git a/module/spl/.gitignore b/module/spl/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/module/spl/.gitignore @@ -0,0 +1 @@ +/Makefile diff --git a/module/splat/.gitignore b/module/splat/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/module/splat/.gitignore @@ -0,0 +1 @@ +/Makefile diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1 @@ +/Makefile From 3977f8370f8caf57600deff6795894410f0e715e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 4 Mar 2010 12:14:56 -0800 Subject: [PATCH 0355/1062] Linux 2.6.32 compat, proc_handler() API change As of linux-2.6.32 the 'struct file *filp' argument was dropped from the proc_handle() prototype. It was apparently unused _almost_ everywhere in the kernel and this was simply cleanup. I've added a new SPL_AC_5ARGS_PROC_HANDLER autoconf check for this and the proper compat macros to correctly define the prototypes and some helper functions. It's not pretty but API compat changes rarely are. --- config/spl-build.m4 | 20 ++++++ configure | 130 ++++++++++++++++++++++++++++++++++ include/linux/sysctl_compat.h | 72 +++++++++++++++++++ include/sys/types.h | 1 + module/spl/spl-proc.c | 83 ++++++++-------------- spl_config.h.in | 3 + 6 files changed, 256 insertions(+), 53 deletions(-) create mode 100644 include/linux/sysctl_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 9fa7bc811..e2e2112e7 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -72,6 +72,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CRED_STRUCT SPL_AC_GROUPS_SEARCH SPL_AC_PUT_TASK_STRUCT + SPL_AC_5ARGS_PROC_HANDLER ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1371,3 +1372,22 @@ AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], [ [__put_task_struct() is available])], []) ]) + +dnl # +dnl # 2.6.32 API change, +dnl # Unused 'struct file *' removed from prototype. +dnl # +AC_DEFUN([SPL_AC_5ARGS_PROC_HANDLER], [ + AC_MSG_CHECKING([whether proc_handler() wants 5 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + proc_dostring(NULL, 0, NULL, NULL, NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_5ARGS_PROC_HANDLER, 1, + [proc_handler() wants 5 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index 192a08442..99c064d43 100755 --- a/configure +++ b/configure @@ -22231,6 +22231,71 @@ _ACEOF fi + + echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 +echo $ECHO_N "checking whether proc_handler() wants 5 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + proc_dostring(NULL, 0, NULL, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_5ARGS_PROC_HANDLER 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + ;; user) ;; all) @@ -25513,6 +25578,71 @@ _ACEOF + echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 +echo $ECHO_N "checking whether proc_handler() wants 5 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + proc_dostring(NULL, 0, NULL, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_5ARGS_PROC_HANDLER 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + ;; srpm) ;; *) diff --git a/include/linux/sysctl_compat.h b/include/linux/sysctl_compat.h new file mode 100644 index 000000000..ecc5d1999 --- /dev/null +++ b/include/linux/sysctl_compat.h @@ -0,0 +1,72 @@ +#ifndef _SPL_SYSCTL_COMPAT_H +#define _SPL_SYSCTL_COMPAT_H + +#include + +/* proc_handler() / proc_do* API changes + * 2.6.x - 2.6.31: 6 args, prototype includes 'struct file *' + * 2.6.32 - 2.6.y: 5 args, removed unused 'struct file *' from prototype + * + * Generic SPL_PROC_HANDLER() macro should be used for correct prototypes. + * It will define the following function arguments which can and should be + * used with the spl_proc_* helper macros. + * + * struct ctl_table *table, + * int write, + * struct file *filp [2.6.31 and earlier kernels], + * void __user *buffer, + * size_t *lenp, + * loff_t *ppos, + */ +#ifdef HAVE_5ARGS_PROC_HANDLER + +#define SPL_PROC_HANDLER(proc_handler) \ +static int \ +proc_handler(struct ctl_table *table, int write, \ + void __user *buffer, size_t *lenp, loff_t *ppos) + +#define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \ + proc_dostring(table, write, buffer, lenp, ppos) +#define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec(table, write, buffer, lenp, ppos) +#define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec_minmax(table, write, buffer, lenp, ppos) +#define spl_proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec_jiffies(table, write, buffer, lenp, ppos) +#define spl_proc_dointvec_userhz_jiffies(table,write,filp,buffer,lenp,ppos) \ + proc_dointvec_userhz_jiffies(table, write, buffer, lenp, ppos) +#define spl_proc_dointvec_ms_jiffies(table,write,filp,buffer,lenp,ppos) \ + proc_dointvec_ms_jiffies(table, write, buffer, lenp, ppos) +#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \ + proc_doulongvec_minmax(table, write, buffer, lenp, ppos) +#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos) \ + proc_doulongvec_ms_jiffies_minmax(table, write, buffer, lenp, ppos) + +#else /* HAVE_5ARGS_PROC_HANDLER */ + +#define SPL_PROC_HANDLER(proc_handler) \ +static int \ +proc_handler(struct ctl_table *table, int write, struct file *filp, \ + void __user *buffer, size_t *lenp, loff_t *ppos) + +#define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \ + proc_dostring(table, write, filp, buffer, lenp, ppos) +#define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec(table, write, filp, buffer, lenp, ppos) +#define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) +#define spl_proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) +#define spl_proc_dointvec_userhz_jiffies(table,write,filp,buffer,lenp,ppos) \ + proc_dointvec_userhz_jiffies(table, write, filp, buffer, lenp, ppos) +#define spl_proc_dointvec_ms_jiffies(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec_ms_jiffies(table, write, filp, buffer, lenp, ppos) +#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \ + proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) +#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos) \ + proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos) + + +#endif /* HAVE_5ARGS_PROC_HANDLER */ + +#endif /* _SPL_SYSCTL_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 89cf115c0..407a1b0c5 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -19,6 +19,7 @@ extern "C" { #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 6458186ee..6db4664da 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -203,9 +203,7 @@ proc_copyout_string(char *ubuffer, int ubuffer_size, return size; } -static int -proc_dobitmasks(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_dobitmasks) { unsigned long *mask = table->data; int is_subsys = (mask == &spl_debug_subsys) ? 1 : 0; @@ -246,9 +244,7 @@ proc_dobitmasks(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } -static int -proc_debug_mb(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_debug_mb) { char str[32]; int rc, len; @@ -266,7 +262,7 @@ proc_debug_mb(struct ctl_table *table, int write, struct file *filp, if (*ppos >= len) rc = 0; else - rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); if (rc >= 0) { *lenp = rc; @@ -277,9 +273,7 @@ proc_debug_mb(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } -static int -proc_dump_kernel(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_dump_kernel) { ENTRY; @@ -293,9 +287,7 @@ proc_dump_kernel(struct ctl_table *table, int write, struct file *filp, RETURN(0); } -static int -proc_force_bug(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_force_bug) { ENTRY; @@ -310,9 +302,7 @@ proc_force_bug(struct ctl_table *table, int write, struct file *filp, RETURN(0); } -static int -proc_console_max_delay_cs(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_console_max_delay_cs) { int rc, max_delay_cs; struct ctl_table dummy = *table; @@ -324,7 +314,7 @@ proc_console_max_delay_cs(struct ctl_table *table, int write, struct file *filp, if (write) { max_delay_cs = 0; - rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); if (rc < 0) RETURN(rc); @@ -338,15 +328,13 @@ proc_console_max_delay_cs(struct ctl_table *table, int write, struct file *filp, spl_console_max_delay = d; } else { max_delay_cs = (spl_console_max_delay * 100) / HZ; - rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); } RETURN(rc); } -static int -proc_console_min_delay_cs(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_console_min_delay_cs) { int rc, min_delay_cs; struct ctl_table dummy = *table; @@ -358,7 +346,7 @@ proc_console_min_delay_cs(struct ctl_table *table, int write, struct file *filp, if (write) { min_delay_cs = 0; - rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); if (rc < 0) RETURN(rc); @@ -372,15 +360,13 @@ proc_console_min_delay_cs(struct ctl_table *table, int write, struct file *filp, spl_console_min_delay = d; } else { min_delay_cs = (spl_console_min_delay * 100) / HZ; - rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); } RETURN(rc); } -static int -proc_console_backoff(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_console_backoff) { int rc, backoff; struct ctl_table dummy = *table; @@ -391,7 +377,7 @@ proc_console_backoff(struct ctl_table *table, int write, struct file *filp, if (write) { backoff = 0; - rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); if (rc < 0) RETURN(rc); @@ -401,16 +387,14 @@ proc_console_backoff(struct ctl_table *table, int write, struct file *filp, spl_console_backoff = backoff; } else { backoff = spl_console_backoff; - rc = proc_dointvec(&dummy, write, filp, buffer, lenp, ppos); + rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); } RETURN(rc); } #ifdef DEBUG_KMEM -static int -proc_domemused(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_domemused) { int rc = 0; unsigned long min = 0, max = ~0, val; @@ -430,17 +414,15 @@ proc_domemused(struct ctl_table *table, int write, struct file *filp, # else val = atomic_read((atomic_t *)table->data); # endif /* HAVE_ATOMIC64_T */ - rc = proc_doulongvec_minmax(&dummy, write, filp, - buffer, lenp, ppos); + rc = spl_proc_doulongvec_minmax(&dummy, write, filp, + buffer, lenp, ppos); } RETURN(rc); } #endif /* DEBUG_KMEM */ -static int -proc_dohostid(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_dohostid) { int len, rc = 0; int32_t val; @@ -448,7 +430,7 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, ENTRY; if (write) { - /* We can't use proc_doulongvec_minmax() in the write + /* We can't use spl_proc_doulongvec_minmax() in the write * case hear because hostid while a hex value has no * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); @@ -469,7 +451,7 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, if (*ppos >= len) rc = 0; else - rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); if (rc >= 0) { *lenp = rc; @@ -481,10 +463,8 @@ proc_dohostid(struct ctl_table *table, int write, struct file *filp, } #ifndef HAVE_KALLSYMS_LOOKUP_NAME -static int -proc_dokallsyms_lookup_name(struct ctl_table *table, int write, - struct file *filp, void __user *buffer, - size_t *lenp, loff_t *ppos) { +SPL_PROC_HANDLER(proc_dokallsyms_lookup_name) +{ int len, rc = 0; char *end, str[32]; ENTRY; @@ -494,7 +474,7 @@ proc_dokallsyms_lookup_name(struct ctl_table *table, int write, if (spl_kallsyms_lookup_name_fn != SYMBOL_POISON) RETURN(-EEXIST); - /* We can't use proc_doulongvec_minmax() in the write + /* We can't use spl_proc_doulongvec_minmax() in the write * case hear because the address while a hex value has no * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); @@ -525,9 +505,7 @@ proc_dokallsyms_lookup_name(struct ctl_table *table, int write, } #endif /* HAVE_KALLSYMS_LOOKUP_NAME */ -static int -proc_doavailrmem(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_doavailrmem) { int len, rc = 0; char str[32]; @@ -536,11 +514,12 @@ proc_doavailrmem(struct ctl_table *table, int write, struct file *filp, if (write) { *ppos += *lenp; } else { - len = snprintf(str, sizeof(str), "%lu", (unsigned long)availrmem); + len = snprintf(str, sizeof(str), "%lu", + (unsigned long)availrmem); if (*ppos >= len) rc = 0; else - rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); if (rc >= 0) { *lenp = rc; @@ -551,9 +530,7 @@ proc_doavailrmem(struct ctl_table *table, int write, struct file *filp, RETURN(rc); } -static int -proc_dofreemem(struct ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) +SPL_PROC_HANDLER(proc_dofreemem) { int len, rc = 0; char str[32]; @@ -566,7 +543,7 @@ proc_dofreemem(struct ctl_table *table, int write, struct file *filp, if (*ppos >= len) rc = 0; else - rc = proc_copyout_string(buffer, *lenp, str + *ppos, "\n"); + rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); if (rc >= 0) { *lenp = rc; @@ -648,7 +625,7 @@ slab_seq_next(struct seq_file *f, void *p, loff_t *pos) ++*pos; RETURN((skc->skc_list.next == &spl_kmem_cache_list) ? - NULL : list_entry(skc->skc_list.next, spl_kmem_cache_t, skc_list)); + NULL : list_entry(skc->skc_list.next,spl_kmem_cache_t,skc_list)); } static void diff --git a/spl_config.h.in b/spl_config.h.in index 06e5766f1..a820bccbb 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -30,6 +30,9 @@ /* device_create wants 5 args */ #undef HAVE_5ARGS_DEVICE_CREATE +/* proc_handler() wants 5 args */ +#undef HAVE_5ARGS_PROC_HANDLER + /* kernel defines atomic64_cmpxchg */ #undef HAVE_ATOMIC64_CMPXCHG From 21006d08af406344fafc97d2eb43b73e781e49ff Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 8 Mar 2010 13:08:09 -0800 Subject: [PATCH 0356/1062] Remove Module.markers and Module.symver{s} in clean target Split 'modules' and 'clean' Makefile targets to allow us to cleanly remove the Module.* build products with a 'make clean'. --- module/Makefile.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/Makefile.in b/module/Makefile.in index 4368f7142..eed81f64e 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -3,9 +3,14 @@ subdir-m += splat INSTALL=/usr/bin/install -modules clean: +modules: $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ +clean: + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi + if [ -f Module.markers ]; then $(RM) Module.markers; fi + modules_install: $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ INSTALL_MOD_PATH=$(DESTDIR) \ From 534c4e38cb2e070e8502798e3eecf297ff82f480 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Mon, 8 Mar 2010 14:19:30 -0800 Subject: [PATCH 0357/1062] When no kernel source has been pointed to, first attempt to use /lib/modules/$(uname -r)/source. This will likely fail when building under a mock (http://fedoraproject.org/wiki/Projects/Mock) chroot environment since `uname -r` will report the running kernel which likely is not the kernel in your chroot. To cleanly handle this we fallback to using the first kernel in your chroot. The kernel-devel package which contains all the kernel headers and a few build products such as Module.symver{s} is all the is required. Full source is not needed. --- config/spl-build.m4 | 10 ++++++++-- configure | 20 ++++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index e2e2112e7..9d0361028 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -104,8 +104,14 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_CHECKING([kernel source directory]) if test -z "$kernelsrc"; then - sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \ - 2>/dev/null | grep -v obj | tail -1` + headersdir="/lib/modules/$(uname -r)/build" + if test -e "$headersdir"; then + sourcelink=$(readlink -f "$headersdir") + else + sourcelink=$(ls -1d /usr/src/kernels/* \ + /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1) + fi if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` diff --git a/configure b/configure index 99c064d43..98b92a9d0 100755 --- a/configure +++ b/configure @@ -18971,8 +18971,14 @@ fi; echo "$as_me:$LINENO: checking kernel source directory" >&5 echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 if test -z "$kernelsrc"; then - sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \ - 2>/dev/null | grep -v obj | tail -1` + headersdir="/lib/modules/$(uname -r)/build" + if test -e "$headersdir"; then + sourcelink=$(readlink -f "$headersdir") + else + sourcelink=$(ls -1d /usr/src/kernels/* \ + /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1) + fi if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` @@ -22317,8 +22323,14 @@ fi; echo "$as_me:$LINENO: checking kernel source directory" >&5 echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 if test -z "$kernelsrc"; then - sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \ - 2>/dev/null | grep -v obj | tail -1` + headersdir="/lib/modules/$(uname -r)/build" + if test -e "$headersdir"; then + sourcelink=$(readlink -f "$headersdir") + else + sourcelink=$(ls -1d /usr/src/kernels/* \ + /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1) + fi if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` From 3cce0f13652dd3476cb6939df2656631b2dee4b8 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Mon, 8 Mar 2010 15:12:22 -0800 Subject: [PATCH 0358/1062] Fix definitions for the unknown distro/installation If the distro/installation really is unsupported (i.e. unknown) we should not make it look like a known distribution (i.e. RHEL) complete with dependencies on other RPMs and trying to find kenrel source in the RH standard location. Additionally add 'k' prefix for kernel requires for consistency. --- spl-modules.spec.in | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 4f8d47acc..92b12abf4 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -125,14 +125,11 @@ # Unsupported distro: %if %{undefined kver} - %define kver X + %define kver %(uname -r) %endif - %define kpkg kernel - %define kdevpkg kernel-devel %define kverpkg %{kver} - %define koppkg = %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} + %define kdir /lib/modules/%{kver}/build %endif %if %{undefined kobj} %define kobj %{kdir} @@ -159,9 +156,13 @@ %else %define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %define release @SPL_META_RELEASE@_%{relext} -%define requires %{kpkg} %{koppkg} %{kverpkg} +%if %{defined kpkg} +%define krequires %{kpkg} %{koppkg} %{kverpkg} +%endif +%if %{defined kdevpkg} %define devel_requires %{kdevpkg} %{koppkg} %{kverpkg} %endif +%endif Summary: Solaris Porting Layer Modules Group: Utilities/System @@ -172,8 +173,12 @@ License: @LICENSE@ URL: git://eris.llnl.gov/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) Source: @PACKAGE@-%{version}.tar.gz -Requires: %{requires} +%if %{defined krequires} +Requires: %{krequires} +%endif +%if %{defined kdevpkg} BuildRequires: %{kdevpkg} +%endif %description The %{name} package contains kernel modules for emulating Solaris style @@ -184,8 +189,12 @@ taskq, thread, time, and vnode APIs. %package devel Summary: Solaris Porting Layer Headers and Symbols Group: Development/Libraries +%if %{defined devel_requires} Requires: %{devel_requires} +%endif +%if %{defined kdevpkg} BuildRequires: %{kdevpkg} +%endif %description devel The %{name}-devel package contains the header files and Module{s}.symvers From 6f088fde276e75c3b1cc824024f712c55d450651 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Mar 2010 14:29:17 -0800 Subject: [PATCH 0359/1062] Ignore unsigned module build products Along with the addition of signed kernel modules in newer kernel we have a few new build products we need to ignore. LKLM has the whole thread for those interested: http://lkml.org/lkml/2007/2/14/164 --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 27807cad9..00b8b1229 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,9 @@ # *.[oa] *.ko +*.ko.unsigned +*.ko.out +*.ko.out.sig *.lo *.la *.mod.c From c5c3d402f7109e37eeee54cd69d15c8d6cabf5d6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Mar 2010 15:36:50 -0800 Subject: [PATCH 0360/1062] Prep for 0.4.8 tag, updated META and ChangeLog --- ChangeLog | 42 ++++++++++++++++++++++++++++++++++++++++++ META | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e32be8592..d076a332c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,45 @@ +2010-03-11 Brian Behlendorf + + * : Tag spl-0.4.8 + + * : Build system improvements: + - Remove Module.markers and Module.symver{s} in clean target. + - Improved kernel source detection when none specified. + - Fix RPM definitions for the unknown distro/installation. + + * config/spl-build.m4: Linux 2.6.32 compat, SPL_AC_5ARGS_PROC_HANDLER + macro added to handle updated proc_handler () API. + + * module/spl/spl-err.c: Fix panic() string, which was being used as a + format string, instead of an already-formatted string. + + * /module/spl/spl-taskq.c: Optimize lowest outstanding taskqid + calculation in taskq_lowest_id(). The motivation for this change + was that I was observing as much as 10% of the total CPU time go + to waiting on the tq->tq_lock when the pending list was long. + + * module/spl/spl-kmem.c: Strip __GFP_ZERO from kmalloc it is not + available for older kernels. + + * module/spl/spl-proc.c: Add skc_flags and full header to + /proc/spl/kmem/slab + + * module/spl/spl-generic.c: Correctly handle division on 32-bit RHEL5 + systems by returning dividend. + + * include/sys/rwlock.h: When using x86 specific rwsem correctly + intepret rwsem->count. Additionally check for changed guard macro + in 2.6.28+ for rwsem implementation + + * module/splat/splat-vnode.c, module/splat/splat-kmem.c, + module/splat/splat-taskq.c: Several new tests were added to the + test suite and various bug fixes. + + * include/asm/atomic_compat.h: Atomic64 compatibility for 32-bit + systems without kernel support. + + * .gitignore: Added .gitignore files. + 2009-11-20 Brian Behlendorf * : Tag spl-0.4.7 diff --git a/META b/META index 231173eb6..4e568fd98 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.7 +Version: 0.4.8 Release: 1 Release-Tags: relext From aa600d8a3843755be1dd621ecd00401f26f3bb49 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 18 Mar 2010 13:39:51 -0700 Subject: [PATCH 0361/1062] Reduce max kmem based slab size Allowing MAX_ORDER-1 sized allocations for kmem based slabs have been observed to result in deadlocks. To help prvent this limit max kmem based slab size to MAX_ORDER-3. Just for the record callers should not be creating slabs like this, but if they do we should still handle it as safely as we can. --- module/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f87d2b55a..d62a6f61b 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1057,7 +1057,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) obj_size = spl_obj_size(skc); if (skc->skc_flags & KMC_KMEM) - max_size = ((uint32_t)1 << (MAX_ORDER-1)) * PAGE_SIZE; + max_size = ((uint32_t)1 << (MAX_ORDER-3)) * PAGE_SIZE; else max_size = (32 * 1024 * 1024); From 16b719f0066047aaf404756a0b4fe8c74eec6a2a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Mar 2010 14:45:33 -0700 Subject: [PATCH 0362/1062] Allow spl_config.h to be included by dependant packages (updated) We need dependent packages to be able to include spl_config.h to build properly. This was partially solved in commit 0cbaeb1 by using AH_BOTTOM to #undef common #defines (PACKAGE, VERSION, etc) which autoconf always adds and cannot be easily removed. This solution works as long as the spl_config.h is included before your projects config.h. That turns out to be easier said than done. In particular, this is a problem when your package includes its config.h using the -include gcc option which ensures the first thing included is your config.h. To handle all cases cleanly I have removed the AH_BOTTOM hack and replaced it with an AC_CONFIG_HEADERS command. This command runs immediately after spl_config.h is written and with a little awk-foo it strips the offending #defines from the file. This eliminates the problem entirely and makes header safe for inclusion. Also in this change I have removed the few places in the code where spl_config.h is included. It is now added to the gcc compile line to ensure the config results are always available. Finally, I have also disabled the verbose kernel builds. If you want them back you can always build with 'make V=1'. Since things are working now they don't need to be on by default. --- Makefile.am | 4 +- Makefile.in | 4 +- cmd/Makefile.in | 3 +- config/Rules.am | 2 +- config/config.awk | 15 +++++ config/spl-build.m4 | 7 +-- configure | 131 ++++++++++++++++++++------------------- configure.ac | 8 ++- include/sys/types.h | 1 - lib/Makefile.in | 2 +- lib/list.c | 4 -- module/spl/spl-generic.c | 1 - spl_config.h.in | 2 - spl_unconfig.h | 12 ---- 14 files changed, 97 insertions(+), 99 deletions(-) create mode 100644 config/config.awk delete mode 100644 spl_unconfig.h diff --git a/Makefile.am b/Makefile.am index 97977d50e..8c4fed9c8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,8 +9,8 @@ endif SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip -EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER -noinst_HEADERS = spl_config.h spl_unconfig.h +EXTRA_DIST = autogen.sh spl.spec.in config/config.awk META DISCLAIMER +noinst_HEADERS = spl_config.h distclean-local:: -$(RM) -R autom4te*.cache diff --git a/Makefile.in b/Makefile.in index a36b92677..d32ce8c53 100644 --- a/Makefile.in +++ b/Makefile.in @@ -211,8 +211,8 @@ target_vendor = @target_vendor@ @CONFIG_KERNEL_TRUE@KERNEL_DIR = module include SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip -EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER -noinst_HEADERS = spl_config.h spl_unconfig.h +EXTRA_DIST = autogen.sh spl.spec.in config/config.awk META DISCLAIMER +noinst_HEADERS = spl_config.h all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 9ae0f0d51..375fb6815 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -198,7 +198,8 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -DEFAULT_INCLUDES = -I${top_srcdir} -I${top_srcdir}/lib +DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h \ + -I${top_srcdir}/lib AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ -D__USE_LARGEFILE64 spl_SOURCES = spl.c diff --git a/config/Rules.am b/config/Rules.am index 255fa6c1b..4733e841d 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -1,4 +1,4 @@ -DEFAULT_INCLUDES = -I${top_srcdir} +DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow AM_CFLAGS += -D__USE_LARGEFILE64 diff --git a/config/config.awk b/config/config.awk new file mode 100644 index 000000000..cc4b7cc26 --- /dev/null +++ b/config/config.awk @@ -0,0 +1,15 @@ +# Remove default preprocessor define's from config.h +# PACKAGE +# PACKAGE_BUGREPORT +# PACKAGE_NAME +# PACKAGE_STRING +# PACKAGE_TARNAME +# PACKAGE_VERSION +# STDC_HEADERS +# VERSION + +BEGIN { RS = "" ; FS = "\n" } \ + !/.#define PACKAGE./ && \ + !/.#define VERSION./ && \ + !/.#define STDC_HEADERS./ \ + { print $0"\n" } diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 9d0361028..0b387418e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -4,15 +4,12 @@ dnl # AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL - dnl # Kernel build make options - dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build - KERNELMAKE_PARAMS="V=1" - dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other dnl # compiler options are added by the kernel build system. abs_srcdir=`readlink -f ${srcdir}` KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" - KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" + KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" diff --git a/configure b/configure index 98b92a9d0..d9bf5c1d1 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LICENSE SPL_CONFIG LINUX LINUX_OBJ LINUX_VERSION LINUX_SYMBOLS KERNELMAKE_PARAMS KERNELCPPFLAGS CONFIG_USER_TRUE CONFIG_USER_FALSE CONFIG_KERNEL_TRUE CONFIG_KERNEL_FALSE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LICENSE SPL_CONFIG LINUX LINUX_OBJ LINUX_VERSION LINUX_SYMBOLS KERNELMAKE_PARAMS KERNELCPPFLAGS CONFIG_USER_TRUE CONFIG_USER_FALSE CONFIG_KERNEL_TRUE CONFIG_KERNEL_FALSE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1796,6 +1796,30 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2211,32 +2235,6 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers spl_config.h" - -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi; - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 - - -if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -3988,7 +3986,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3991 "configure"' > conftest.$ac_ext + echo '#line 3989 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5587,7 +5585,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5590:" \ +echo "$as_me:5588:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6650,11 +6648,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6653: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6657: \$? = $ac_status" >&5 + echo "$as_me:6655: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6918,11 +6916,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6921: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6919: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6925: \$? = $ac_status" >&5 + echo "$as_me:6923: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7022,11 +7020,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7025: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7023: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7029: \$? = $ac_status" >&5 + echo "$as_me:7027: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8491,7 +8489,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8494 "configure"' > conftest.$ac_ext + echo '#line 8492 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9388,7 +9386,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11832: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11838: \$? = $ac_status" >&5 + echo "$as_me:11836: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11935,11 +11933,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11938: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11936: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11942: \$? = $ac_status" >&5 + echo "$as_me:11940: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12471,7 +12469,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12474 "configure"' > conftest.$ac_ext + echo '#line 12472 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13529,11 +13527,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13532: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13530: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13536: \$? = $ac_status" >&5 + echo "$as_me:13534: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13633,11 +13631,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13636: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13634: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13640: \$? = $ac_status" >&5 + echo "$as_me:13638: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15082,7 +15080,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15085 "configure"' > conftest.$ac_ext + echo '#line 15083 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15860,11 +15858,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15863: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15867: \$? = $ac_status" >&5 + echo "$as_me:15865: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16128,11 +16126,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16131: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16129: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16135: \$? = $ac_status" >&5 + echo "$as_me:16133: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16232,11 +16230,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16235: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16239: \$? = $ac_status" >&5 + echo "$as_me:16237: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17701,7 +17699,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17704 "configure"' > conftest.$ac_ext + echo '#line 17702 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19078,11 +19076,10 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - KERNELMAKE_PARAMS="V=1" - abs_srcdir=`readlink -f ${srcdir}` KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" - KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" + KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" @@ -22430,11 +22427,10 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - KERNELMAKE_PARAMS="V=1" - abs_srcdir=`readlink -f ${srcdir}` KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" - KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" + KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" @@ -26389,6 +26385,9 @@ s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t @@ -26411,9 +26410,6 @@ s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t -s,@MAINT@,$MAINT,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t @@ -26945,6 +26941,13 @@ echo X$ac_file | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count + # Run the commands associated with the file. + case $ac_file in + spl_config.h ) + (mv spl_config.h spl_config.h.tmp && + awk -f config/config.awk spl_config.h.tmp >spl_config.h && + rm spl_config.h.tmp) || exit 1 ;; + esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF diff --git a/configure.ac b/configure.ac index ee6866509..4efd1c642 100644 --- a/configure.ac +++ b/configure.ac @@ -29,10 +29,12 @@ AC_LANG(C) SPL_AC_META AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) -AC_CONFIG_HEADERS([spl_config.h]) -AH_BOTTOM([#include ]) AM_MAINTAINER_MODE +AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) +AC_CONFIG_HEADERS([spl_config.h], [ + (mv spl_config.h spl_config.h.tmp && + awk -f config/config.awk spl_config.h.tmp >spl_config.h && + rm spl_config.h.tmp) || exit 1]) AC_PROG_INSTALL AC_PROG_CC diff --git a/include/sys/types.h b/include/sys/types.h index 407a1b0c5..771e8f36e 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -7,7 +7,6 @@ extern "C" { #include #include -#include #include #include diff --git a/lib/Makefile.in b/lib/Makefile.in index 992319d02..ad1fbd95e 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -192,7 +192,7 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -DEFAULT_INCLUDES = -I${top_srcdir} +DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ -D__USE_LARGEFILE64 noinst_LTLIBRARIES = libcommon.la diff --git a/lib/list.c b/lib/list.c index 08b1f631f..fbee2d97d 100644 --- a/lib/list.c +++ b/lib/list.c @@ -25,10 +25,6 @@ *****************************************************************************/ -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ - #ifdef WITH_PTHREADS # include #endif /* WITH_PTHREADS */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index a13b978cb..290c5275d 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -38,7 +38,6 @@ #include #include #include -#include "spl_config.h" #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/spl_config.h.in b/spl_config.h.in index a820bccbb..3189756c2 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -251,5 +251,3 @@ /* Version number of package */ #undef VERSION - -#include diff --git a/spl_unconfig.h b/spl_unconfig.h deleted file mode 100644 index b50a0be0c..000000000 --- a/spl_unconfig.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Undefine these symbols to allow other autoheader enabled packages - * to leverage the SPL configure checks without a header conflict. - */ -#undef PACKAGE -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef VERSION -#undef STDC_HEADERS From 8934764e6049d1eebae3eca8af99b8ee7140c0ab Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Mar 2010 15:21:06 -0700 Subject: [PATCH 0363/1062] Add support for 'make -s' silent builds The cleanest way to do this is to set AM_LIBTOOLFLAGS = --silent. However, AM_LIBTOOLFLAGS is not honored by automake-1.9.6-2.1 which is what I have been using. To cleanly handle this I am updating to automake-1.11-3 which is why it looks like there is a lot of churn in the Makefiles. --- Makefile.in | 349 +- cmd/Makefile.in | 304 +- config/Rules.am | 1 + config/ltmain.sh | 8527 +++++++++------ configure | 24854 ++++++++++++++++-------------------------- configure.ac | 1 + include/Makefile.in | 211 +- lib/Makefile.in | 239 +- scripts/Makefile.in | 168 +- spl_config.h.in | 4 + 10 files changed, 14945 insertions(+), 19713 deletions(-) mode change 100644 => 100755 config/ltmain.sh diff --git a/Makefile.in b/Makefile.in index d32ce8c53..72188bad4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -54,20 +52,33 @@ am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = spl_config.h CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ module/splat/Makefile spl.spec spl-modules.spec +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = lib cmd scripts module include @@ -75,17 +86,41 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -94,33 +129,28 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ -CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ -CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ -CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -130,13 +160,18 @@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -160,16 +195,12 @@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -181,32 +212,45 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ @CONFIG_USER_TRUE@USER_DIR = lib cmd scripts @CONFIG_KERNEL_TRUE@KERNEL_DIR = module include SUBDIRS = $(USER_DIR) $(KERNEL_DIR) @@ -223,15 +267,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -247,21 +291,22 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): spl_config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/spl_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status spl_config.h $(srcdir)/spl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -285,8 +330,7 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -uninstall-info-am: + -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -312,15 +356,14 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: +$(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -347,16 +390,16 @@ maintainer-clean-recursive: else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -364,13 +407,13 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -382,92 +425,112 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) spl_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi CTAGS: ctags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) spl_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/config $(distdir)/module $(distdir)/module/spl $(distdir)/module/splat - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -476,6 +539,14 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -503,6 +574,10 @@ distcheck: dist GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -514,9 +589,11 @@ distcheck: dist mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -538,13 +615,15 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -586,6 +665,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -607,18 +687,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: install-data-local +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -639,25 +739,27 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-libtool clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-local distclean-recursive distclean-tags \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-data-local install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am + install-data-am install-data-local install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am rpm-local: mkdir -p $(rpmbuild)/TMP && \ @@ -752,6 +854,7 @@ rpm-modules: srpm-modules rpm-utils: srpm-utils rpm: rpm-modules rpm-utils + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 375fb6815..7ac86e120 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -49,34 +47,54 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) am_spl_OBJECTS = spl.$(OBJEXT) spl_OBJECTS = $(am_spl_OBJECTS) spl_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent am_splat_OBJECTS = splat.$(OBJEXT) splat_OBJECTS = $(am_splat_OBJECTS) splat_LDADD = $(LDADD) +splat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(splat_LDFLAGS) $(LDFLAGS) -o $@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(spl_SOURCES) $(splat_SOURCES) DIST_SOURCES = $(spl_SOURCES) $(splat_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -85,33 +103,28 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ -CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ -CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ -CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -121,13 +134,18 @@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -151,16 +169,12 @@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -172,34 +186,48 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h \ -I${top_srcdir}/lib +AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ -D__USE_LARGEFILE64 spl_SOURCES = spl.c @@ -214,14 +242,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmd/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu cmd/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu cmd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -239,40 +267,56 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done + test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list spl$(EXEEXT): $(spl_OBJECTS) $(spl_DEPENDENCIES) @rm -f spl$(EXEEXT) - $(LINK) $(spl_LDFLAGS) $(spl_OBJECTS) $(spl_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(spl_OBJECTS) $(spl_LDADD) $(LIBS) splat$(EXEEXT): $(splat_OBJECTS) $(splat_DEPENDENCIES) @rm -f splat$(EXEEXT) - $(LINK) $(splat_LDFLAGS) $(splat_OBJECTS) $(splat_LDADD) $(LIBS) + $(AM_V_CCLD)$(splat_LINK) $(splat_OBJECTS) $(splat_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -284,22 +328,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splat.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -310,83 +357,85 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../config - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -395,7 +444,7 @@ check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -417,6 +466,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -430,7 +480,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -438,18 +488,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-sbinPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -470,20 +540,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS +uninstall-am: uninstall-sbinPROGRAMS + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-sbinPROGRAMS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-sbinPROGRAMS + tags uninstall uninstall-am uninstall-sbinPROGRAMS + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/config/Rules.am b/config/Rules.am index 4733e841d..5eb1a12c6 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -1,4 +1,5 @@ DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h +AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow AM_CFLAGS += -D__USE_LARGEFILE64 diff --git a/config/ltmain.sh b/config/ltmain.sh old mode 100644 new mode 100755 index 0223495a0..6939dcc4a --- a/config/ltmain.sh +++ b/config/ltmain.sh @@ -1,52 +1,83 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, but +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... # -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" +VERSION=2.2.6 +TIMESTAMP="" +package_revision=1.3012 -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -57,19 +88,486 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh -# Check that we have a working $echo. +# NLS nuisances: We save the old values to restore during execute mode. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done + +$lt_unset CDPATH + + + + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/bin/sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "X$my_tmpdir" | $Xsed +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit +} + +exit_cmd=: + + + + + +# Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! : else - # Restart under the correct shell, and then maybe $echo will work. + # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi @@ -82,149 +580,424 @@ EOF exit $EXIT_SUCCESS fi -default_mode= -help="Try \`$progname --help' for more information." magic="%%%MAGIC variable%%%" -mkdir="mkdir" -mv="mv -f" -rm="rm -f" - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - SP2NL='tr \040 \012' - NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - SP2NL='tr \100 \n' - NL2SP='tr \r\n \100\100' - ;; -esac - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -# We save the old values to restore during execute mode. -for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - fi" -done - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - $echo "$modename: not configured to build any kind of library" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi +magic_exe="%%%MAGIC EXE variable%%%" # Global variables. -mode=$default_mode +# $mode is unset nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= execute_dlfiles= -duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 -##################################### -# Shell function definitions: -# This seems to be the best place for them +opt_dry_run=false +opt_duplicate_deps=false +opt_silent=false +opt_debug=: -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () { - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." } -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () +# func_config +# Display the configuration for all the tags in this script. +func_config () { - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + $ECHO "host: $host" + if test "$build_libtool_libs" = yes; then + $ECHO "enable shared libraries" + else + $ECHO "disable shared libraries" fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" + if test "$build_old_libs" = yes; then + $ECHO "enable static libraries" + else + $ECHO "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" ;; - esac + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac - $echo $win32_libid_type + + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --config) func_config ;; + + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; + + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; + + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac + + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$mode' for more information." +} + + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac } @@ -236,39 +1009,32 @@ func_win32_libid () # arg is usually of the form 'gcc ...' func_infer_tag () { + $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. @@ -282,11 +1048,10 @@ func_infer_tag () # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" fi ;; esac @@ -294,353 +1059,48 @@ func_infer_tag () } -# func_extract_an_archive dir oldlib -func_extract_an_archive () + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () { - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" + write_libobj=${1} if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" + write_lobj=\'${2}\' else - $echo "disable shared libraries" + write_lobj=none fi + if test "$build_old_libs" = yes; then - $echo "enable static libraries" + write_oldobj=\'${3}\' else - $echo "disable static libraries" + write_oldobj=none fi - exit $? - ;; - --finish) mode="finish" ;; + $opt_dry_run || { + cat >${write_libobj}T <&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" @@ -649,6 +1109,7 @@ if test -z "$show_help"; then arg_mode=normal libobj= later= + pie_flag= for arg do @@ -669,15 +1130,18 @@ if test -z "$show_help"; then # Accept any command-line options. case $arg in -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; - -static | -prefer-pic | -prefer-non-pic) + -pie | -fpie | -fPIE) + pie_flag="$pie_flag $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; @@ -693,31 +1157,25 @@ if test -z "$show_help"; then ;; # replaced later. I would guess that would be a bug. -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' - for arg in $args; do + for arg in $args; do IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" + func_quote_for_eval "$arg" + lastarg="$lastarg $func_quote_for_eval_result" done IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; - * ) + *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # @@ -729,65 +1187,42 @@ if test -z "$show_help"; then esac # case $arg_mode # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" + func_quote_for_eval "$lastarg" + base_compile="$base_compile $func_quote_for_eval_result" done # for arg case $arg_mode in arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE + func_fatal_error "you must specify an argument for -Xcompile" ;; target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.obj | *.sx) + func_xform "$libobj" + libobj=$func_xform_result + ;; esac - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac @@ -795,7 +1230,15 @@ if test -z "$show_help"; then for arg in $later; do case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + -static) + build_libtool_libs=no build_old_libs=yes continue ;; @@ -812,28 +1255,17 @@ if test -z "$show_help"; then esac done - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then @@ -842,12 +1274,9 @@ if test -z "$show_help"; then removelist="$lobj $libobj ${libobj}T" fi - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in - cygwin* | mingw* | pw32* | os2*) + cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac @@ -859,10 +1288,8 @@ if test -z "$show_help"; then # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no @@ -872,13 +1299,13 @@ if test -z "$show_help"; then # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` @@ -889,34 +1316,22 @@ repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - $echo "$srcfile" > "$lockfile" + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" fi + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -969,45 +1371,27 @@ repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1041,53 +1420,2620 @@ repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + $ECHO >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac + + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + + +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 + fi + + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} + + +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path + +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif + +const char *program_name = NULL; + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF + + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} + +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; +} + +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + + +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra @@ -1105,10 +4051,10 @@ EOF allow_undefined=yes ;; esac - libtool_args="$nonopt" + libtool_args=$nonopt base_compile="$nonopt $@" - compile_command="$nonopt" - finalize_command="$nonopt" + compile_command=$nonopt + finalize_command=$nonopt compile_rpath= finalize_rpath= @@ -1123,6 +4069,7 @@ EOF dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= + new_inherited_linker_flags= avoid_version=no dlfiles= @@ -1138,7 +4085,6 @@ EOF no_install=no objs= non_pic_objects= - notinst_path= # paths that contain not-installed libtool libraries precious_files_regex= prefer_static_libs=no preload=no @@ -1152,37 +4098,44 @@ EOF thread_safe=no vinfo= vinfo_number=no - + weak_libs= + single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 + func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; - -static) + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1197,20 +4150,16 @@ EOF while test "$#" -gt 0; do arg="$1" shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" ;; esac @@ -1218,8 +4167,8 @@ EOF dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in @@ -1257,10 +4206,8 @@ EOF ;; expsyms) export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; @@ -1269,58 +4216,52 @@ EOF prev= continue ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= - for fil in `cat $save_arg` + for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac + func_source "$arg" - if test -z "$pic_object" || \ + if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && \ + test "$pic_object" = none && test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. @@ -1345,7 +4286,7 @@ EOF fi # A PIC object. - libobjs="$libobjs $pic_object" + func_append libobjs " $pic_object" arg="$pic_object" fi @@ -1355,7 +4296,7 @@ EOF non_pic_object="$xdir$non_pic_object" # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" + func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi @@ -1363,46 +4304,48 @@ EOF # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - + if $opt_dry_run; then # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE + func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then @@ -1419,39 +4362,37 @@ EOF prev= continue ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" + shrext) + shrext_cmds="$arg" prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" continue ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + weak) + weak_libs="$weak_libs $arg" prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" + func_append compile_command " $qarg" + func_append finalize_command " $qarg" continue ;; - shrext) - shrext_cmds="$arg" + xcompiler) + compiler_flags="$compiler_flags $qarg" prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" continue ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" continue ;; *) @@ -1467,16 +4408,16 @@ EOF case $arg in -all-static) if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue + func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -1501,8 +4442,7 @@ EOF -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE + func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms @@ -1512,15 +4452,8 @@ EOF continue ;; - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + -framework) + prev=framework continue ;; @@ -1534,25 +4467,30 @@ EOF -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" ;; esac continue ;; -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac @@ -1564,14 +4502,16 @@ EOF ;; esac case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; + ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; @@ -1582,7 +4522,7 @@ EOF -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; @@ -1596,7 +4536,7 @@ EOF ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" + deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -1620,57 +4560,35 @@ EOF continue ;; - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - -module) module=yes continue ;; - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; + continue + ;; - -shrext) - prev=shrext + -multi_module) + single_module="${wl}-multi_module" continue ;; @@ -1681,11 +4599,11 @@ EOF -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -1726,13 +4644,13 @@ EOF ;; -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + func_stripname '-R' '' "$arg" + dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in @@ -1742,6 +4660,16 @@ EOF continue ;; + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that @@ -1760,47 +4688,49 @@ EOF prev=vinfo continue ;; + -version-number) prev=vinfo vinfo_number=yes continue ;; + -weak) + prev=weak + continue + ;; + -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + func_stripname ' ' '' "$arg" + arg=$func_stripname_result ;; -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + func_stripname ' ' '' "$arg" + arg=$func_stripname_result ;; -Xcompiler) @@ -1818,16 +4748,36 @@ EOF continue ;; + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + # Some other compiler flag. -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" ;; *.$objext) @@ -1839,32 +4789,23 @@ EOF # A libtool-controlled object. # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac + func_source "$arg" - if test -z "$pic_object" || \ + if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && \ + test "$pic_object" = none && test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. @@ -1889,7 +4830,7 @@ EOF fi # A PIC object. - libobjs="$libobjs $pic_object" + func_append libobjs " $pic_object" arg="$pic_object" fi @@ -1899,7 +4840,7 @@ EOF non_pic_object="$xdir$non_pic_object" # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" + func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi @@ -1907,28 +4848,22 @@ EOF # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - + if $opt_dry_run; then # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; @@ -1961,70 +4896,51 @@ EOF *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" fi done # argument parsing loop - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + func_basename "$output" + outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi + func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; @@ -2032,22 +4948,13 @@ EOF *) linkmode=prog ;; # Anything else should be a program. esac - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then + if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac @@ -2062,7 +4969,7 @@ EOF # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; @@ -2078,15 +4985,16 @@ EOF newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + case $linkmode in lib) - passes="conv link" + passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done @@ -2102,7 +5010,20 @@ EOF *) passes="conv" ;; esac + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" @@ -2115,31 +5036,65 @@ EOF link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi + for deplib in $libs; do lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + func_warning "\`-l' is ignored for archives/objects" continue fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" @@ -2169,21 +5124,17 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_p "$lib"; then library_names= old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac + func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." + func_dirname "$lib" "" "." + ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" @@ -2195,19 +5146,35 @@ EOF continue fi fi - ;; + ;; *) ;; esac fi fi ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then @@ -2220,17 +5187,19 @@ EOF compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; @@ -2248,35 +5217,41 @@ EOF fi case $linkmode in lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) valid_a_lib=yes - fi ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac continue ;; prog) @@ -2311,21 +5286,18 @@ EOF continue ;; esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." + func_dirname "$lib" "" "." + ladir="$func_dirname_result" dlname= dlopen= @@ -2333,6 +5305,7 @@ EOF libdir= library_names= old_library= + inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes @@ -2341,11 +5314,19 @@ EOF # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac + func_source "$lib" + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then @@ -2358,26 +5339,24 @@ EOF deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "\`$lib' is not a convenience library" fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done continue fi # $pass = conv @@ -2388,15 +5367,13 @@ EOF linklib="$l" done if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || @@ -2418,18 +5395,19 @@ EOF *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + func_basename "$lib" + laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 + func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" @@ -2451,18 +5429,22 @@ EOF notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" @@ -2498,7 +5480,9 @@ EOF tmp_libs= for deplib in $dependency_libs; do case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then @@ -2508,7 +5492,7 @@ EOF # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if test "X$duplicate_deps" = "Xyes" ; then + if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac @@ -2520,16 +5504,15 @@ EOF if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; esac fi @@ -2567,27 +5550,43 @@ EOF link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then + if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac # This is a shared library - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break fi - $echo "*** $linklib is not portable!" + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then @@ -2617,17 +5616,19 @@ EOF if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw*) - major=`expr $current - $age` + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result versuffix="-$major" ;; esac @@ -2638,36 +5639,22 @@ EOF # Make a new name for the extract_expsyms_cmds to use soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir @@ -2689,17 +5676,21 @@ EOF *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" fi fi esac @@ -2717,7 +5708,8 @@ EOF fi ;; relink) - if test "$hardcode_direct" = yes; then + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" @@ -2741,8 +5733,7 @@ EOF esac if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE + func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then @@ -2757,8 +5748,8 @@ EOF else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; @@ -2773,7 +5764,8 @@ EOF add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" @@ -2787,9 +5779,9 @@ EOF elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + add="$inst_prefix_dir$libdir/$linklib" else - add="$libdir/$linklib" + add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. @@ -2833,21 +5825,21 @@ EOF # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module @@ -2871,7 +5863,8 @@ EOF temp_deplibs= for libdir in $dependency_libs; do case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; @@ -2889,7 +5882,7 @@ EOF tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then + if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac @@ -2903,88 +5896,71 @@ EOF case $deplib in -L*) path="$deplib" ;; *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." + func_dirname "$deplib" "" "." + dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= + if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared + depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac fi - path="" ;; *) - path="-L$path" + path="-L$absdir/$objdir" ;; esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries @@ -3083,38 +6059,36 @@ EOF done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + func_warning "\`-dlopen' is ignored for archives" fi - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no @@ -3126,48 +6100,48 @@ EOF # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + func_stripname '' '.la' "$outputname" + name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" oldlibs= if test -z "$rpath"; then @@ -3181,25 +6155,21 @@ EOF build_old_libs=yes fi - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 + shift IFS="$save_ifs" - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -3207,9 +6177,9 @@ EOF case $vinfo_number in yes) - number_major="$2" - number_minor="$3" - number_revision="$4" + number_major="$1" + number_minor="$2" + number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version @@ -3219,7 +6189,8 @@ EOF # case $version_type in darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` + func_arith $number_major + $number_minor + current=$func_arith_result age="$number_minor" revision="$number_revision" ;; @@ -3229,16 +6200,18 @@ EOF age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor - 1` + func_arith $number_major + $number_minor + current=$func_arith_result age="$number_minor" revision="$number_minor" + lt_irix_increment=no ;; esac ;; no) - current="$2" - revision="$3" - age="$4" + current="$1" + revision="$2" + age="$3" ;; esac @@ -3246,34 +6219,30 @@ EOF case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. @@ -3286,11 +6255,14 @@ EOF darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header - major=.`expr $current - $age` + func_arith $current - $age + major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) @@ -3300,11 +6272,16 @@ EOF freebsd-elf) major=".$current" - versuffix=".$current"; + versuffix=".$current" ;; irix | nonstopux) - major=`expr $current - $age + 1` + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; @@ -3315,8 +6292,10 @@ EOF # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done @@ -3326,20 +6305,24 @@ EOF ;; linux) - major=.`expr $current - $age` + func_arith $current - $age + major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) - major=.`expr $current - $age` + func_arith $current - $age + major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result verstring="$verstring:${iface}.0" done @@ -3347,6 +6330,11 @@ EOF verstring="$verstring:${current}.0" ;; + qnx) + major=".$current" + versuffix=".$current" + ;; + sunos) major=".$current" versuffix=".$current.$revision" @@ -3355,14 +6343,13 @@ EOF windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. - major=`expr $current - $age` + func_arith $current - $age + major=$func_arith_result versuffix="-$major" ;; *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE + func_fatal_configuration "unknown library version type \`$version_type'" ;; esac @@ -3396,7 +6383,7 @@ EOF # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi @@ -3404,21 +6391,26 @@ EOF # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi + fi + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= - tempremovelist=`$echo "$output_objdir/*"` + tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in - *.$objext) + *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then continue fi fi @@ -3427,10 +6419,8 @@ EOF *) ;; esac done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. @@ -3438,15 +6428,15 @@ EOF oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. -# for path in $notinst_path; do -# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` -# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` -# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` -# done + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3486,12 +6476,12 @@ EOF if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" + deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -3505,7 +6495,7 @@ EOF *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; - *) + *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" @@ -3542,17 +6532,18 @@ EOF # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. - $rm conftest.c + $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an @@ -3668,12 +6665,12 @@ EOF potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 @@ -3683,32 +6680,35 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" fi fi - else + ;; + *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" - fi + ;; + esac done # Gone through all deplibs. ;; match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) @@ -3718,14 +6718,13 @@ EOF esac fi if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` + libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 @@ -3735,44 +6734,46 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi - else + ;; + *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" - fi + ;; + esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else - $echo "*** Warning: inter-library dependencies are not known to be supported." + $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi - $echo "*** All declared inter-library dependencies are being dropped." + $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; @@ -3785,24 +6786,24 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" @@ -3812,16 +6813,16 @@ EOF build_libtool_libs=no fi else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module @@ -3835,7 +6836,14 @@ EOF # Done checking deplibs! deplibs=$newdeplibs fi - + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list @@ -3864,7 +6872,6 @@ EOF done deplibs="$new_libs" - # All the library-specific variables (install_libdir is set above). library_names= old_library= @@ -3935,8 +6942,9 @@ EOF eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names - realname="$2" - shift; shift + shift + realname="$1" + shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" @@ -3955,71 +6963,122 @@ EOF done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" + func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols + $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= fi fi - + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" @@ -4027,7 +7086,7 @@ EOF # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. @@ -4040,22 +7099,24 @@ EOF cmds=$module_cmds fi else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we @@ -4069,77 +7130,162 @@ EOF save_libobjs=$libobjs fi save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= - delfiles= last_robj= k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done + else + output= + fi - $echo "creating a temporary reloadable object file: $output" + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi libobjs=$output # Restore the value of output. @@ -4147,6 +7293,7 @@ EOF if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. @@ -4159,28 +7306,45 @@ EOF cmds=$module_cmds fi else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds fi fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) fi exit $lt_exit @@ -4190,12 +7354,11 @@ EOF # Restore the uninstalled library and exit if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" + func_show_eval '${RM}r "$gentop"' fi fi @@ -4205,8 +7368,7 @@ EOF # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done @@ -4219,38 +7381,35 @@ EOF ;; obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + func_warning "\`-dlopen' is ignored for objects" fi - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" case $output in *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result ;; *) libobj= @@ -4259,7 +7418,7 @@ EOF esac # Delete the old objects. - $run $rm $obj $libobj + $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create @@ -4275,7 +7434,7 @@ EOF if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4286,24 +7445,15 @@ EOF fi # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop + func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS @@ -4311,14 +7461,13 @@ EOF if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop + func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi @@ -4326,20 +7475,11 @@ EOF # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop + func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS @@ -4347,39 +7487,45 @@ EOF prog) case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; esac @@ -4454,14 +7600,16 @@ EOF esac fi case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; @@ -4513,281 +7661,51 @@ EOF if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' fi - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi @@ -4820,12 +7738,11 @@ static const void *lt_preloaded_setup() { # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. - $run $rm $output + $opt_dry_run || $RM $output # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? + func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi @@ -4834,13 +7751,13 @@ static const void *lt_preloaded_setup() { link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -4852,606 +7769,103 @@ static const void *lt_preloaded_setup() { fi # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - $show "$link_command" - $run eval "$link_command" || exit $? + func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. - $show "creating $output" + func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi - # Only actually do things if our run command is non-null. - if test -z "$run"; then + # Only actually do things if not in dry run mode. + $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" + func_emit_wrapper no > $output + chmod +x $output ;; esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi + } exit $EXIT_SUCCESS ;; esac @@ -5460,7 +7874,7 @@ fi\ for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" + oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else @@ -5469,6 +7883,9 @@ fi\ build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi fi addlibs="$old_convenience" fi @@ -5483,8 +7900,18 @@ fi\ # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds + cmds=$old_archive_from_new_cmds else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi + # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a @@ -5493,32 +7920,22 @@ fi\ # not supported by libtool). if (for obj in $oldobjs do - $echo "X$obj" | $Xsed -e 's%^.*/%%' + func_basename "$obj" + $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + func_basename "$obj" + objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -5526,58 +7943,62 @@ fi\ # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase - counter=`expr $counter + 1` + func_arith $counter + 1 + counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi - eval cmds=\"$old_archive_cmds\" - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." + func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs - + oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 for obj in $save_oldobjs do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB + RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= + len=$len0 fi done RANLIB=$save_RANLIB @@ -5589,49 +8010,39 @@ fi\ fi fi fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + func_execute_cmds "$cmds" 'exit $?' done - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi + test -n "$generated" && \ + func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" + func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi - # Only create the output if not a dry run. - if test -z "$run"; then + $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then @@ -5643,12 +8054,11 @@ fi\ for deplib in $dependency_libs; do case $deplib in *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + func_basename "$deplib" + name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; @@ -5656,25 +8066,37 @@ fi\ done dependency_libs="$newdependency_libs" newdlfiles= + for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac done dlprefiles="$newdlprefiles" else @@ -5697,15 +8119,15 @@ fi\ done dlprefiles="$newdlprefiles" fi - $rm $output + $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac - $echo > $output "\ + $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -5719,9 +8141,15 @@ library_names='$library_names' # The name of the static archive. old_library='$old_library' +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + # Libraries that this one depends upon. dependency_libs='$dependency_libs' +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + # Version information for $libname. current=$current age=$age @@ -5740,749 +8168,29 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ + $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done - fi + } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS - ;; +} - # libtool install mode - install) - modename="$modename: install" +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" files= rmforce= exit_status=0 @@ -6494,30 +8202,28 @@ relink_command=\"$relink_command\"" for arg do case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + func_basename "$file" + name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates @@ -6529,9 +8235,9 @@ relink_command=\"$relink_command\"" fi # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then : elif test -d "$file"; then exit_status=1 @@ -6545,8 +8251,8 @@ relink_command=\"$relink_command\"" case $name in *.la) # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name + if func_lalib_p "$file"; then + func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do @@ -6561,39 +8267,17 @@ relink_command=\"$relink_command\"" *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -6603,20 +8287,20 @@ relink_command=\"$relink_command\"" *.lo) # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_p "$file"; then # Read the .lo file - . $dir/$name + func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then + if test -n "$pic_object" && + test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi @@ -6627,17 +8311,26 @@ relink_command=\"$relink_command\"" noexename=$name case $file in *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles @@ -6652,239 +8345,38 @@ relink_command=\"$relink_command\"" fi ;; esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 + func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 + func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status - ;; +} - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then - eval exec $exec_cmd + eval exec "$exec_cmd" exit $EXIT_FAILURE fi -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... +exit $exit_status -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting @@ -6898,14 +8390,17 @@ exit $? # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared +build_libtool_libs=no +build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: +# vi:sw=2 + diff --git a/configure b/configure index d9bf5c1d1..cbdca7759 100755 --- a/configure +++ b/configure @@ -1,25 +1,82 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.63. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,33 +86,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +147,391 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +540,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,36 +570,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$ECHO in +case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac -echo=${ECHO-echo} +ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! : else # Restart under the correct shell. @@ -270,9 +600,9 @@ fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift - cat </dev/null 2>&1 && unset CDPATH -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else - # maybe with a smaller string... - prev=: + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi + fi fi fi fi fi -fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -428,46 +750,213 @@ PACKAGE_BUGREPORT= # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LICENSE SPL_CONFIG LINUX LINUX_OBJ LINUX_VERSION LINUX_SYMBOLS KERNELMAKE_PARAMS KERNELCPPFLAGS CONFIG_USER_TRUE CONFIG_USER_FALSE CONFIG_KERNEL_TRUE CONFIG_KERNEL_FALSE LIBOBJS LTLIBOBJS' +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +CONFIG_KERNEL_FALSE +CONFIG_KERNEL_TRUE +CONFIG_USER_FALSE +CONFIG_USER_TRUE +KERNELCPPFLAGS +KERNELMAKE_PARAMS +LINUX_SYMBOLS +LINUX_VERSION +LINUX_OBJ +LINUX +SPL_CONFIG +LICENSE +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +LIBTOOL +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +SPL_META_LT_AGE +SPL_META_LT_REVISION +SPL_META_LT_CURRENT +SPL_META_AUTHOR +SPL_META_DATA +SPL_META_ALIAS +SPL_META_RELEASE +SPL_META_VERSION +SPL_META_NAME +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_silent_rules +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +with_config +with_linux +with_linux_obj +enable_debug +enable_debug_kmem +enable_debug_kmem_tracking +enable_atomic_spinlocks +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -490,34 +979,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -539,33 +1042,61 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -592,6 +1123,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -616,13 +1153,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -687,6 +1227,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -737,26 +1287,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -776,7 +1338,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -785,17 +1347,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -804,31 +1365,39 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -842,7 +1411,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -855,94 +1424,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP -ac_env_CXX_set=${CXX+set} -ac_env_CXX_value=$CXX -ac_cv_env_CXX_set=${CXX+set} -ac_cv_env_CXX_value=$CXX -ac_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_env_CXXFLAGS_value=$CXXFLAGS -ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_cv_env_CXXFLAGS_value=$CXXFLAGS -ac_env_CXXCPP_set=${CXXCPP+set} -ac_env_CXXCPP_value=$CXXCPP -ac_cv_env_CXXCPP_set=${CXXCPP+set} -ac_cv_env_CXXCPP_value=$CXXCPP -ac_env_F77_set=${F77+set} -ac_env_F77_value=$F77 -ac_cv_env_F77_set=${F77+set} -ac_cv_env_F77_value=$F77 -ac_env_FFLAGS_set=${FFLAGS+set} -ac_env_FFLAGS_value=$FFLAGS -ac_cv_env_FFLAGS_set=${FFLAGS+set} -ac_cv_env_FFLAGS_value=$FFLAGS + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -971,14 +1522,11 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -988,18 +1536,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1021,16 +1576,17 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] - build shared libraries [default=yes] - --enable-static[=PKGS] - build static libraries [default=yes] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) @@ -1044,11 +1600,9 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] - --with-tags[=TAGS] - include additional configurations [automatic] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-config=CONFIG Config file 'kernel|user|all|srpm' --with-linux=PATH Path to kernel source --with-linux-obj=PATH Path to kernel build objects @@ -1058,131 +1612,97 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1201,7 +1721,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1213,8 +1733,9 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1236,7 +1757,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1247,8 +1767,8 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1269,9 +1789,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1282,8 +1800,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1296,20 +1814,35 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1320,22 +1853,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1347,26 +1886,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1396,18 +1933,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -for ac_site_file in $CONFIG_SITE; do +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1417,54 +1960,61 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1474,21 +2024,15 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - @@ -1512,8 +2056,15 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu - echo "$as_me:$LINENO: checking metadata" >&5 -echo $ECHO_N "checking metadata... $ECHO_C" >&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking metadata" >&5 +$as_echo_n "checking metadata... " >&6; } META="$srcdir/META" _spl_ac_meta_got_file=no @@ -1685,109 +2236,159 @@ _ACEOF fi fi - echo "$as_me:$LINENO: result: $_spl_ac_meta_got_file" >&5 -echo "${ECHO_T}$_spl_ac_meta_got_file" >&6 + { $as_echo "$as_me:$LINENO: result: $_spl_ac_meta_got_file" >&5 +$as_echo "$_spl_ac_meta_got_file" >&6; } ac_aux_dir= -for ac_dir in config $srcdir/config; do - if test -f $ac_dir/install-sh; then +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +$as_echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. @@ -1796,20 +2397,19 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. + +{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no -fi; - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 +fi - -if test $USE_MAINTAINER_MODE = yes; then + { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else @@ -1820,7 +2420,20 @@ fi MAINT=$MAINTAINER_MODE_TRUE -am__api_version="1.9" +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=1;; +esac +AM_BACKSLASH='\' + +am__api_version='1.11' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1834,11 +2447,12 @@ am__api_version="1.9" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -1857,7 +2471,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1867,30 +2481,43 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac -done +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1900,21 +2527,38 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 +$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} + { (exit 1); exit 1; }; };; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 +$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} + { (exit 1); exit 1; }; };; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ @@ -1924,9 +2568,9 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi @@ -1937,81 +2581,209 @@ then # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! +$as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else - mkdir_p='$(install_sh) -d' + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" fi fi +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2022,54 +2794,58 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$AWK" && break done -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2082,12 +2858,16 @@ else fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } + fi fi # test whether we have cygpath @@ -2130,96 +2910,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. @@ -2232,7 +2922,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - ac_config_headers="$ac_config_headers spl_config.h" +ac_config_headers="$ac_config_headers spl_config.h" # Find a good install program. We prefer a C program (faster), @@ -2248,11 +2938,12 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -2271,7 +2962,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2281,30 +2972,43 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac -done +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2322,10 +3026,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2336,34 +3040,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2374,38 +3080,49 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2416,76 +3133,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2497,17 +3174,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2525,24 +3203,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2553,38 +3232,40 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2595,58 +3276,90 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2665,111 +3378,150 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +$as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2778,32 +3530,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2821,39 +3574,48 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2874,50 +3636,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2933,38 +3699,121 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2980,12 +3829,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3019,12 +3868,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -3039,205 +3893,58 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3245,60 +3952,58 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" - ac_config_commands="$ac_config_commands depfiles" +ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +# Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" + enableval=$enable_dependency_tracking; +fi -fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -3308,13 +4013,12 @@ fi - depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3339,6 +4043,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3356,7 +4065,17 @@ else done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -3366,18 +4085,23 @@ else break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3401,13 +4125,11 @@ else fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3418,165 +4140,350 @@ else fi -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi; +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi; -# Check whether --enable-fast-install or --disable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi; -echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +macro_version='2.2.6' +macro_revision='1.3012' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done done done - -fi - -SED=$lt_cv_path_SED - -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 - -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi + ac_cv_path_GREP=$GREP fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep -# Check whether --with-gnu-ld or --without-gnu-ld was given. + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -3589,9 +4496,9 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; @@ -3605,14 +4512,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR @@ -3642,19 +4549,19 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld -echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 + + + + + + +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. @@ -3742,28 +4631,493 @@ else done IFS="$lt_save_ifs" done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + : ${lt_cv_path_NM=no} fi fi -echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6 -NM="$lt_cv_path_NM" +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:4762: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:4765: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:4768: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi -echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +# find the maximum length of command line arguments +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -3780,7 +5134,7 @@ lt_cv_deplibs_check_method='unknown' # whether `pass_all' will *always* work, you probably want this one. case $host_os in -aix4* | aix5*) +aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; @@ -3802,8 +5156,20 @@ cygwin*) mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; @@ -3811,8 +5177,8 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. @@ -3849,7 +5215,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; @@ -3865,12 +5231,12 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' @@ -3883,12 +5249,12 @@ newos6*) lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx*) - lt_cv_deplibs_check_method=unknown +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all ;; openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -3899,10 +5265,18 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + solaris*) lt_cv_deplibs_check_method=pass_all ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + sysv4 | sysv4.3*) case $host_vendor in motorola) @@ -3930,17 +5304,378 @@ sysv4 | sysv4.3*) esac ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) +tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi -echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3955,11 +5690,261 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"} compiler=$CC -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:$LINENO: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi -fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good @@ -3971,97 +5956,104 @@ ia64-*-hpux*) if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3989 "configure"' > conftest.$ac_ext + echo '#line 5974 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi fi rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; esac fi rm -rf conftest* @@ -4071,10 +6063,10 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4098,35 +6090,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then lt_cv_cc_needs_belf=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4135,8 +6128,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" @@ -4148,40 +6141,655 @@ sparc*-*solaris*) if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; esac ;; esac fi rm -rf conftest* ;; - - esac need_locks="$enable_libtool_lock" + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_ld_exported_symbols_list=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -4208,35 +6816,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4246,34 +6854,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -4291,8 +6899,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -4315,35 +6923,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4353,34 +6961,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -4389,11 +6997,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -4403,10 +7013,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4428,35 +7038,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -4512,6 +7119,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -4531,36 +7139,50 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + fi fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -4582,11 +7204,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4599,41 +7221,42 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4644,1432 +7267,242 @@ done for ac_header in dlfcn.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=no" fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Set options -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - test -n "$ac_ct_CXX" && break -done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX -fi + enable_dlopen=no -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + enable_win32_dll=no -echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cxx_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CXX" am_compiler_list= - -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - - -if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6 -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_F77" && break -done - - F77=$ac_ct_F77 -fi - - -# Provide some information about the compiler. -echo "$as_me:5588:" \ - "checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_f77_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - -# find the maximum length of command line arguments -echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 -else - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 -fi - - - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 + done + IFS="$lt_save_ifs" + ;; + esac else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + enable_shared=yes fi -echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6 + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null @@ -6081,14 +7514,34 @@ else fi rmdir .libs 2>/dev/null fi -echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -6103,312 +7556,41 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' +double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' -# Constants: -rm="rm -f" - # Global variables: -default_ofile=libtool +ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" + with_gnu_ld="$lt_cv_prog_gnu_ld" -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - AR=$ac_ct_AR -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - RANLIB=$ac_ct_RANLIB -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - - old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; @@ -6417,17 +7599,18 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) @@ -6451,7 +7634,7 @@ else $EGREP "$file_magic_regex" > /dev/null; then : else - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -6462,7 +7645,7 @@ else *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -EOF +_LT_EOF fi ;; esac fi @@ -6477,19 +7660,23 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + + + + if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) @@ -6513,7 +7700,7 @@ else $EGREP "$file_magic_regex" > /dev/null; then : else - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -6524,7 +7711,7 @@ else *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -EOF +_LT_EOF fi ;; esac fi @@ -6539,13 +7726,14 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + else MAGIC_CMD=: fi @@ -6555,28 +7743,8 @@ fi ;; esac -enable_dlopen=no -enable_win32_dll=no - -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" - -fi; -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - - -# Check whether --with-pic or --without-pic was given. -if test "${with_pic+set}" = set; then - withval="$with_pic" - pic_mode="$withval" -else - pic_mode=default -fi; -test -z "$pic_mode" && pic_mode=default - # Use C for the default configuration in the libtool script -tagname= + lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6593,10 +7761,15 @@ objext=o objext=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' + + + + + # If no C compiler was specified, use CC. @@ -6608,36 +7781,39 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* +$RM conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$RM -r conftest* +if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -6648,25 +7824,25 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7827: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6655: \$? = $ac_status" >&5 + echo "$as_me:7831: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi - $rm conftest* + $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -6676,12 +7852,17 @@ fi fi -lt_prog_compiler_wl= + + + + + + lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -6697,19 +7878,29 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; @@ -6719,7 +7910,21 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic='-fno-common' ;; - interix3*) + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -6731,25 +7936,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 enable_shared=no ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - *) lt_prog_compiler_pic='-fPIC' ;; @@ -6766,18 +7964,8 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -6805,18 +7993,27 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-non_shared' ;; - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux*) + linux* | k*bsd*-gnu) case $cc_basename in - icc* | ecc*) + # old Intel for x86_64 which still supported -KPIC. + ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -6829,15 +8026,52 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; esac ;; + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -6890,22 +8124,35 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6 +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + $as_echo_n "(cached) " >&6 else - lt_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -6916,27 +8163,27 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6919: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8166: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6923: \$? = $ac_status" >&5 + echo "$as_me:8170: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works=yes + lt_cv_prog_compiler_pic_works=yes fi fi - $rm conftest* + $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_prog_compiler_pic_works" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -6947,69 +8194,70 @@ else fi fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + $as_echo_n "(cached) " >&6 else - lt_prog_compiler_static_works=no + lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi else - lt_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi fi - $rm conftest* + $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_prog_compiler_static_works" = xyes; then +if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null + $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -7020,83 +8268,148 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7023: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8271: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7027: \$? = $ac_status" >&5 + echo "$as_me:8275: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 - $rm conftest* + $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out cd .. - rmdir conftest - $rm conftest* + $RM -r conftest + $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8326: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8330: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes - $rm conftest* + $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + + + + + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= - enable_shared_with_static_runtimes=no + always_export_symbols=no archive_cmds= archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= - hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported + inherit_rpath=no link_all_deplibs=unknown - hardcode_automatic=no module_cmds= module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= @@ -7104,26 +8417,17 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -7149,16 +8453,16 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v 2>/dev/null` in + case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -7168,11 +8472,11 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. @@ -7180,26 +8484,27 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. -EOF +_LT_EOF fi ;; amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME @@ -7209,16 +8514,16 @@ EOF fi ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... @@ -7234,7 +8539,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' @@ -7249,39 +8554,78 @@ EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then tmp_addflag= + tmp_sharedflag='-shared' case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac else - ld_shlibs=no + ld_shlibs=no fi ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else @@ -7291,9 +8635,9 @@ EOF ;; solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool @@ -7302,8 +8646,8 @@ EOF *** your PATH or compiler configuration so that the native linker is *** used, and then restart. -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else @@ -7327,10 +8671,14 @@ EOF _LT_EOF ;; *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -7346,7 +8694,7 @@ _LT_EOF ;; *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else @@ -7378,7 +8726,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -7388,22 +8736,22 @@ _LT_EOF else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi done ;; esac @@ -7420,28 +8768,30 @@ _LT_EOF archive_cmds='' hardcode_direct=yes + hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes + file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null then - # We have reworked collect2 - hardcode_direct=yes + # We have reworked collect2 + : else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= fi ;; esac @@ -7452,8 +8802,8 @@ _LT_EOF else # not using gcc if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then @@ -7464,6 +8814,7 @@ _LT_EOF fi fi + export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes @@ -7471,8 +8822,9 @@ _LT_EOF # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7488,51 +8840,61 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else - # Determine the default libpath from the value encoded in an empty executable. + # Determine the default libpath from the value encoded in an + # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7549,39 +8911,48 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -7600,18 +8971,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -7623,63 +9001,40 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' + old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + ;; dgux*) @@ -7712,7 +9067,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -7721,9 +9076,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux9*) if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: @@ -7743,11 +9098,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: - hardcode_direct=yes + hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -7761,7 +9116,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -7786,12 +9141,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_cpu in hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes + hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, @@ -7804,18 +9159,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi + archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: + inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF @@ -7833,25 +9232,33 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no ;; + *nto* | *qnx*) + ;; + openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs=no fi ;; @@ -7859,18 +9266,19 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi + archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; @@ -7878,49 +9286,59 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi + archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) - no_undefined_flag=' -z text' + no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs=yes ;; @@ -7977,7 +9395,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no @@ -8003,18 +9421,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -8028,12 +9446,36 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs=no ;; esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi fi -echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6 +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + # # Do we need to explicitly link libc? # @@ -8051,15 +9493,15 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest @@ -8074,10 +9516,10 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no @@ -8088,17 +9530,225 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& else cat conftest.err 1>&5 fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6 + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi library_names_spec= libname_spec='lib$name' soname_spec= @@ -8112,20 +9762,6 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi need_lib_prefix=unknown hardcode_into_libs=no @@ -8143,7 +9779,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -8162,7 +9798,7 @@ aix4* | aix5*) aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no @@ -8188,9 +9824,18 @@ aix4* | aix5*) ;; amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac ;; beos*) @@ -8213,25 +9858,28 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ - $rm \$dlpath' + $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -8240,20 +9888,20 @@ cygwin* | mingw* | pw32*) soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -8277,17 +9925,13 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -8304,18 +9948,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -8353,7 +9985,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -8392,18 +10024,18 @@ hpux9* | hpux10* | hpux11*) fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH @@ -8416,7 +10048,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -8471,7 +10103,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -8480,36 +10112,76 @@ linux*) finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 8492 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -8521,23 +10193,11 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' @@ -8558,14 +10218,16 @@ newsos6) shlibpath_overrides_runpath=yes ;; -nto-qnx*) - version_type=linux +*nto* | *qnx*) + version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; openbsd*) @@ -8574,13 +10236,13 @@ openbsd*) need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no @@ -8614,6 +10276,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -8648,7 +10314,6 @@ sysv4 | sysv4.3*) sni) shlibpath_overrides_runpath=no need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -8679,13 +10344,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -8695,6 +10359,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) sys_lib_dlsearch_path_spec='/usr/lib' ;; +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -8706,8 +10381,8 @@ uts4*) dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -8715,19 +10390,112 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then - # We can hardcode non-existant directories. + # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink @@ -8740,10 +10508,11 @@ else # directories. hardcode_action=unsupported fi -echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6 +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink; then +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || @@ -8752,36 +10521,12 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi -if test "x$enable_dlopen" != xyes; then + + + + + if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -8796,22 +10541,22 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= - ;; + ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= - ;; + ;; darwin*) # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -8822,57 +10567,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -8882,13 +10628,13 @@ else fi - ;; + ;; *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8913,75 +10659,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef shl_load -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) +#if defined __stub_shl_load || defined __stub___shl_load choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != shl_load; +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_shl_load=no + ac_cv_func_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -8992,63 +10733,64 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9073,75 +10815,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef dlopen -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) +#if defined __stub_dlopen || defined __stub___dlopen choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != dlopen; +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_dlopen=no + ac_cv_func_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -9152,63 +10889,64 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" @@ -9219,63 +10957,64 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_svld_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -9286,58 +11025,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dld_link (); int main () { -dld_link (); +return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dld_dld_link=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -9375,18 +11115,18 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF +#line 11129 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9427,10 +11167,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -9446,13 +11182,13 @@ int main () else puts (dlerror ()); - exit (status); + return status; } -EOF +_LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -9470,23 +11206,23 @@ rm -fr conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF +#line 11225 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9527,10 +11263,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -9546,13 +11278,13 @@ int main () else puts (dlerror ()); - exit (status); + return status; } -EOF +_LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -9570,8 +11302,8 @@ rm -fr conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" @@ -9592,6169 +11324,103 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi -# Report which library types will actually be built -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -test "$can_build_shared" = "no" && enable_shared=no -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi ;; -esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ;; esac +fi -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - cat <<__EOF__ >> "$cfgfile" -#! $SHELL -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# A sed program that does not truncate output. -SED=$lt_SED -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# The names of the tagged configurations supported by this script. -available_tags= -# ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# ### END LIBTOOL CONFIG - -__EOF__ + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. case $host_os in aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -# Check whether --with-tags or --without-tags was given. -if test "${with_tags+set}" = set; then - withval="$with_tags" - tagnames="$withval" -fi; - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi; -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 -else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_CXX=yes - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix3*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - - -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - for p in `eval $output_verbose_link_cmd`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$rm -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix3*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -solaris*) - case $cc_basename in - CC*) - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - postdeps_CXX='-lCstd -lCrun' - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11832: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:11836: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 - -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11936: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:11940: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 12472 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6 - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" - -# Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13530: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13534: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 - -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13634: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13638: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' fi ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. -EOF - fi - ;; - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - - interix3*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_F77=yes - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - link_all_deplibs_F77=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6 -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 15083 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6 - -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_F77" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -15763,3211 +11429,70 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" - else - tagname="" - fi - ;; - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then -# Source file extension for Java test sources. -ac_ext=java -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC + ac_config_commands="$ac_config_commands libtool" -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Only expand once: -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no -old_archive_cmds_GCJ=$old_archive_cmds - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15865: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16129: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16133: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:16237: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix3*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_GCJ=yes - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - link_all_deplibs_GCJ=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6 -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 17702 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6 - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_GCJ" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_RC" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - ;; - - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - - - - - - - - - - - - - - - - - - - - - - echo "$as_me:$LINENO: checking spl license" >&5 -echo $ECHO_N "checking spl license... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking spl license" >&5 +$as_echo_n "checking spl license... " >&6; } LICENSE=GPL - echo "$as_me:$LINENO: result: $LICENSE" >&5 -echo "${ECHO_T}$LICENSE" >&6 + { $as_echo "$as_me:$LINENO: result: $LICENSE" >&5 +$as_echo "$LICENSE" >&6; } KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" SPL_CONFIG=all -# Check whether --with-config or --without-config was given. +# Check whether --with-config was given. if test "${with_config+set}" = set; then - withval="$with_config" - SPL_CONFIG="$withval" -fi; + withval=$with_config; SPL_CONFIG="$withval" +fi - echo "$as_me:$LINENO: checking spl config" >&5 -echo $ECHO_N "checking spl config... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 -echo "${ECHO_T}$SPL_CONFIG" >&6; + + { $as_echo "$as_me:$LINENO: checking spl config" >&5 +$as_echo_n "checking spl config... " >&6; } + { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 +$as_echo "$SPL_CONFIG" >&6; }; case "$SPL_CONFIG" in kernel) -# Check whether --with-linux or --without-linux was given. +# Check whether --with-linux was given. if test "${with_linux+set}" = set; then - withval="$with_linux" - kernelsrc="$withval" -fi; + withval=$with_linux; kernelsrc="$withval" +fi -# Check whether --with-linux-obj or --without-linux-obj was given. + +# Check whether --with-linux-obj was given. if test "${with_linux_obj+set}" = set; then - withval="$with_linux_obj" - kernelbuild="$withval" -fi; + withval=$with_linux_obj; kernelbuild="$withval" +fi - echo "$as_me:$LINENO: checking kernel source directory" >&5 -echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 + + { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 +$as_echo_n "checking kernel source directory... " >&6; } if test -z "$kernelsrc"; then headersdir="/lib/modules/$(uname -r)/build" if test -e "$headersdir"; then @@ -18981,12 +11506,12 @@ echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else - echo "$as_me:$LINENO: result: Not found" >&5 -echo "${ECHO_T}Not found" >&6 - { { echo "$as_me:$LINENO: error: + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Please specify the location of the kernel source *** with the '--with-linux=PATH' option" >&5 -echo "$as_me: error: +$as_echo "$as_me: error: *** Please specify the location of the kernel source *** with the '--with-linux=PATH' option" >&2;} { (exit 1); exit 1; }; } @@ -18997,10 +11522,10 @@ echo "$as_me: error: fi fi - echo "$as_me:$LINENO: result: $kernelsrc" >&5 -echo "${ECHO_T}$kernelsrc" >&6 - echo "$as_me:$LINENO: checking kernel build directory" >&5 -echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 +$as_echo "$kernelsrc" >&6; } + { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 +$as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then if test -d ${kernelsrc}-obj/`arch`/`arch`; then kernelbuild=${kernelsrc}-obj/`arch`/`arch` @@ -19012,11 +11537,11 @@ echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 kernelbuild=${kernelsrc} fi fi - echo "$as_me:$LINENO: result: $kernelbuild" >&5 -echo "${ECHO_T}$kernelbuild" >&6 + { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5 +$as_echo "$kernelbuild" >&6; } - echo "$as_me:$LINENO: checking kernel source version" >&5 -echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking kernel source version" >&5 +$as_echo_n "checking kernel source version... " >&6; } if test -r $kernelbuild/include/linux/version.h && fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then @@ -19035,19 +11560,19 @@ echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 fi if test -z "$kernsrcver"; then - echo "$as_me:$LINENO: result: Not found" >&5 -echo "${ECHO_T}Not found" >&6 - { { echo "$as_me:$LINENO: error: + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Cannot determine the version of the linux kernel source. *** Please prepare the kernel before running this script" >&5 -echo "$as_me: error: +$as_echo "$as_me: error: *** Cannot determine the version of the linux kernel source. *** Please prepare the kernel before running this script" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: $kernsrcver" >&5 -echo "${ECHO_T}$kernsrcver" >&6 + { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 +$as_echo "$kernsrcver" >&6; } LINUX=${kernelsrc} LINUX_OBJ=${kernelbuild} @@ -19059,8 +11584,8 @@ echo "${ECHO_T}$kernsrcver" >&6 modpost=$LINUX/scripts/Makefile.modpost - echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 -echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 +$as_echo_n "checking kernel file name for module symbols... " >&6; } if test -f "$modpost"; then if grep -q Modules.symvers $modpost; then LINUX_SYMBOLS=Modules.symvers @@ -19070,8 +11595,8 @@ echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 else LINUX_SYMBOLS=NONE fi - echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 -echo "${ECHO_T}$LINUX_SYMBOLS" >&6 + { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 +$as_echo "$LINUX_SYMBOLS" >&6; } @@ -19089,13 +11614,13 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - # Check whether --enable-debug or --disable-debug was given. + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - + enableval=$enable_debug; else enable_debug=no -fi; +fi + if test "x$enable_debug" = xyes; then KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" @@ -19104,19 +11629,19 @@ else fi - echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_debug" >&5 -echo "${ECHO_T}$enable_debug" >&6 + { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +$as_echo_n "checking whether debugging is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 +$as_echo "$enable_debug" >&6; } - # Check whether --enable-debug-kmem or --disable-debug-kmem was given. + # Check whether --enable-debug-kmem was given. if test "${enable_debug_kmem+set}" = set; then - enableval="$enable_debug_kmem" - + enableval=$enable_debug_kmem; else enable_debug_kmem=yes -fi; +fi + if test "x$enable_debug_kmem" = xyes; then @@ -19128,19 +11653,19 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 -echo $ECHO_N "checking whether basic kmem accounting is enabled... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 -echo "${ECHO_T}$enable_debug_kmem" >&6 + { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 +$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 +$as_echo "$enable_debug_kmem" >&6; } - # Check whether --enable-debug-kmem-tracking or --disable-debug-kmem-tracking was given. + # Check whether --enable-debug-kmem-tracking was given. if test "${enable_debug_kmem_tracking+set}" = set; then - enableval="$enable_debug_kmem_tracking" - + enableval=$enable_debug_kmem_tracking; else enable_debug_kmem_tracking=no -fi; +fi + if test "x$enable_debug_kmem_tracking" = xyes; then @@ -19152,19 +11677,19 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 -echo $ECHO_N "checking whether detailed kmem tracking is enabled... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 -echo "${ECHO_T}$enable_debug_kmem_tracking" >&6 + { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 +$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 +$as_echo "$enable_debug_kmem_tracking" >&6; } - # Check whether --enable-atomic-spinlocks or --disable-atomic-spinlocks was given. + # Check whether --enable-atomic-spinlocks was given. if test "${enable_atomic_spinlocks+set}" = set; then - enableval="$enable_atomic_spinlocks" - + enableval=$enable_atomic_spinlocks; else enable_atomic_spinlocks=check -fi; +fi + @@ -19197,12 +11722,12 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then have_atomic64_t=yes @@ -19213,7 +11738,7 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_atomic64_t=no @@ -19254,11 +11779,13 @@ else if test "x$have_atomic64_t" = xno; then - { { echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable See \`config.log' for more details." >&5 -echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable +$as_echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi @@ -19266,18 +11793,18 @@ fi fi - echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 -echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 -echo "${ECHO_T}$enable_atomic_spinlocks" >&6 + { $as_echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 +$as_echo_n "checking whether atomic types use spinlocks... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 +$as_echo "$enable_atomic_spinlocks" >&6; } - echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 -echo "${ECHO_T}$have_atomic64_t" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 +$as_echo_n "checking whether kernel defines atomic64_t... " >&6; } + { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 +$as_echo "$have_atomic64_t" >&6; } - echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_cmpxchg... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 +$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } cat >conftest.c <<_ACEOF @@ -19309,16 +11836,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ATOMIC64_CMPXCHG 1 @@ -19326,11 +11853,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19340,8 +11867,8 @@ fi - echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_xchg... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 +$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } cat >conftest.c <<_ACEOF @@ -19373,16 +11900,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ATOMIC64_XCHG 1 @@ -19390,11 +11917,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19404,8 +11931,8 @@ fi - echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 +$as_echo_n "checking whether kernel defines uintptr_t... " >&6; } cat >conftest.c <<_ACEOF @@ -19437,16 +11964,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_UINTPTR_T 1 @@ -19454,11 +11981,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19468,8 +11995,8 @@ fi - echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 -echo $ECHO_N "checking whether INIT_WORK wants 3 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 +$as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } cat >conftest.c <<_ACEOF @@ -19502,16 +12029,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_3ARGS_INIT_WORK 1 @@ -19519,11 +12046,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19533,8 +12060,8 @@ fi - echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 -echo $ECHO_N "checking whether register_sysctl_table() wants 2 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 +$as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } cat >conftest.c <<_ACEOF @@ -19566,16 +12093,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_2ARGS_REGISTER_SYSCTL 1 @@ -19583,11 +12110,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19598,8 +12125,8 @@ fi - echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 -echo $ECHO_N "checking whether set_shrinker() available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 +$as_echo_n "checking whether set_shrinker() available... " >&6; } cat >conftest.c <<_ACEOF @@ -19631,16 +12158,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_SHRINKER 1 @@ -19648,11 +12175,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19662,8 +12189,8 @@ fi - echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 -echo $ECHO_N "checking whether struct path used in struct nameidata... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 +$as_echo_n "checking whether struct path used in struct nameidata... " >&6; } cat >conftest.c <<_ACEOF @@ -19698,16 +12225,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PATH_IN_NAMEIDATA 1 @@ -19715,11 +12242,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19730,8 +12257,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 -echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 +$as_echo_n "checking whether symbol task_curr is exported... " >&6; } grep -q -E '[[:space:]]task_curr[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19747,12 +12274,12 @@ echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TASK_CURR 1 @@ -19760,8 +12287,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TASK_CURR 1 @@ -19770,8 +12297,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 -echo $ECHO_N "checking whether unnumbered sysctl support exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 +$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } cat >conftest.c <<_ACEOF @@ -19805,16 +12332,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CTL_UNNUMBERED 1 @@ -19822,11 +12349,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19836,8 +12363,8 @@ fi - echo "$as_me:$LINENO: checking whether fls64() is available" >&5 -echo $ECHO_N "checking whether fls64() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5 +$as_echo_n "checking whether fls64() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -19869,16 +12396,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FLS64 1 @@ -19886,11 +12413,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -19901,8 +12428,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 -echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 +$as_echo_n "checking whether symbol device_create is exported... " >&6; } grep -q -E '[[:space:]]device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19918,12 +12445,12 @@ echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_CREATE 1 @@ -19931,8 +12458,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_CREATE 1 @@ -19942,8 +12469,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 -echo $ECHO_N "checking whether device_create() wants 5 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 +$as_echo_n "checking whether device_create() wants 5 args... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Werror" @@ -19977,16 +12504,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_5ARGS_DEVICE_CREATE 1 @@ -19994,11 +12521,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20010,8 +12537,8 @@ fi EXTRA_KCFLAGS="$tmp_flags" - echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 -echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 +$as_echo_n "checking whether symbol class_device_create is exported... " >&6; } grep -q -E '[[:space:]]class_device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20027,12 +12554,12 @@ echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CLASS_DEVICE_CREATE 1 @@ -20040,8 +12567,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CLASS_DEVICE_CREATE 1 @@ -20051,8 +12578,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 -echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 +$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; } grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20068,12 +12595,12 @@ echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $EC fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 @@ -20081,8 +12608,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 @@ -20092,8 +12619,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 -echo $ECHO_N "checking whether set_normalized_timespec() is an inline... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 +$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } cat >conftest.c <<_ACEOF @@ -20125,23 +12652,23 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 @@ -20157,8 +12684,8 @@ fi - echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 -echo $ECHO_N "checking whether timespec_sub() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 +$as_echo_n "checking whether timespec_sub() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -20191,16 +12718,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TIMESPEC_SUB 1 @@ -20208,11 +12735,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20223,8 +12750,8 @@ fi - echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 -echo $ECHO_N "checking whether init_utsname() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 +$as_echo_n "checking whether init_utsname() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -20256,16 +12783,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_INIT_UTSNAME 1 @@ -20273,11 +12800,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20288,8 +12815,8 @@ fi - echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 -echo $ECHO_N "checking whether header linux/fdtable.h exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 +$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } cat >conftest.c <<_ACEOF @@ -20321,12 +12848,12 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -20334,16 +12861,16 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_FDTABLE_HEADER 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20356,8 +12883,8 @@ fi - echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 -echo $ECHO_N "checking whether files_fdtable() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 +$as_echo_n "checking whether files_fdtable() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -20394,16 +12921,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FILES_FDTABLE 1 @@ -20411,11 +12938,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20426,8 +12953,8 @@ fi - echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 -echo $ECHO_N "checking whether header linux/uaccess.h exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 +$as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } cat >conftest.c <<_ACEOF @@ -20459,12 +12986,12 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -20472,16 +12999,16 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_UACCESS_HEADER 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20494,8 +13021,8 @@ fi - echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 -echo $ECHO_N "checking whether kmalloc_node() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 +$as_echo_n "checking whether kmalloc_node() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -20527,16 +13054,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_KMALLOC_NODE 1 @@ -20544,11 +13071,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20559,8 +13086,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 -echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 +$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20576,12 +13103,12 @@ echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >& fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MONOTONIC_CLOCK 1 @@ -20589,8 +13116,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MONOTONIC_CLOCK 1 @@ -20600,8 +13127,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 -echo $ECHO_N "checking whether struct inode has i_mutex... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 +$as_echo_n "checking whether struct inode has i_mutex... " >&6; } cat >conftest.c <<_ACEOF @@ -20635,16 +13162,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_INODE_I_MUTEX 1 @@ -20652,11 +13179,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20667,8 +13194,8 @@ fi - echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 -echo $ECHO_N "checking whether struct mutex has owner... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 +$as_echo_n "checking whether struct mutex has owner... " >&6; } cat >conftest.c <<_ACEOF @@ -20701,16 +13228,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MUTEX_OWNER 1 @@ -20718,11 +13245,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20733,8 +13260,8 @@ fi - echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 -echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 +$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -20768,16 +13295,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MUTEX_LOCK_NESTED 1 @@ -20785,11 +13312,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20800,8 +13327,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 -echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 +$as_echo_n "checking whether symbol div64_64 is exported... " >&6; } grep -q -E '[[:space:]]div64_64[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20817,12 +13344,12 @@ echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_64 1 @@ -20830,8 +13357,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_64 1 @@ -20841,8 +13368,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 -echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 +$as_echo_n "checking whether symbol div64_u64 is exported... " >&6; } grep -q -E '[[:space:]]div64_u64[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20858,12 +13385,12 @@ echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_U64 1 @@ -20871,8 +13398,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_U64 1 @@ -20882,8 +13409,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 -echo $ECHO_N "checking whether on_each_cpu() wants 3 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 +$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } cat >conftest.c <<_ACEOF @@ -20915,16 +13442,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_3ARGS_ON_EACH_CPU 1 @@ -20932,11 +13459,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -20947,8 +13474,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 -echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 +$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20964,12 +13491,12 @@ echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_ fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_KALLSYMS_LOOKUP_NAME 1 @@ -20977,8 +13504,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_KALLSYMS_LOOKUP_NAME 1 @@ -20988,8 +13515,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 -echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 +$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -21005,12 +13532,12 @@ echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" > fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_VMALLOC_INFO 1 @@ -21018,8 +13545,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_VMALLOC_INFO 1 @@ -21029,26 +13556,26 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 -echo $ECHO_N "checking whether symbol *_pgdat exist... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 +$as_echo_n "checking whether symbol *_pgdat exist... " >&6; } grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null rc=$? if test $rc -eq 0; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_HELPERS 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 -echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 +$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -21064,12 +13591,12 @@ echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FIRST_ONLINE_PGDAT 1 @@ -21077,8 +13604,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FIRST_ONLINE_PGDAT 1 @@ -21088,8 +13615,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 -echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 +$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -21105,12 +13632,12 @@ echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ONLINE_PGDAT 1 @@ -21118,8 +13645,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ONLINE_PGDAT 1 @@ -21129,8 +13656,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 -echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 +$as_echo_n "checking whether symbol next_zone is exported... " >&6; } grep -q -E '[[:space:]]next_zone[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -21146,12 +13673,12 @@ echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ZONE 1 @@ -21159,8 +13686,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ZONE 1 @@ -21170,8 +13697,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 -echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 +$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -21187,12 +13714,12 @@ echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_LIST 1 @@ -21200,8 +13727,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_LIST 1 @@ -21211,8 +13738,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 -echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 +$as_echo_n "checking whether global_page_state() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21245,16 +13772,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GLOBAL_PAGE_STATE 1 @@ -21262,11 +13789,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21277,8 +13804,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 -echo $ECHO_N "checking whether page state NR_FREE_PAGES is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 +$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21311,16 +13838,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 @@ -21328,11 +13855,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21343,8 +13870,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 -echo $ECHO_N "checking whether page state NR_INACTIVE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 +$as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21377,16 +13904,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 @@ -21394,11 +13921,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21408,8 +13935,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 -echo $ECHO_N "checking whether page state NR_INACTIVE_ANON is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 +$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21442,16 +13969,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 @@ -21459,11 +13986,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21473,8 +14000,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 -echo $ECHO_N "checking whether page state NR_INACTIVE_FILE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 +$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21507,16 +14034,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 @@ -21524,11 +14051,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21539,8 +14066,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 -echo $ECHO_N "checking whether page state NR_ACTIVE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 +$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21573,16 +14100,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 @@ -21590,11 +14117,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21604,8 +14131,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 -echo $ECHO_N "checking whether page state NR_ACTIVE_ANON is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 +$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21638,16 +14165,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 @@ -21655,11 +14182,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21669,8 +14196,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 -echo $ECHO_N "checking whether page state NR_ACTIVE_FILE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 +$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -21703,16 +14230,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 @@ -21720,11 +14247,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21735,8 +14262,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 -echo $ECHO_N "checking whether symbol get_zone_counts is needed... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 +$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } cat >conftest.c <<_ACEOF @@ -21781,31 +14308,31 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define NEED_GET_ZONE_COUNTS 1 _ACEOF - echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 +$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -21821,12 +14348,12 @@ echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >& fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_ZONE_COUNTS 1 @@ -21834,8 +14361,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_ZONE_COUNTS 1 @@ -21853,8 +14380,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 -echo $ECHO_N "checking whether symbol set_fs_pwd is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 +$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -21870,12 +14397,12 @@ echo $ECHO_N "checking whether symbol set_fs_pwd is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_FS_PWD 1 @@ -21883,8 +14410,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_FS_PWD 1 @@ -21893,8 +14420,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 -echo $ECHO_N "checking whether set_fs_pwd() wants 2 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 +$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } cat >conftest.c <<_ACEOF @@ -21927,16 +14454,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_2ARGS_SET_FS_PWD 1 @@ -21944,11 +14471,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21958,8 +14485,8 @@ fi - echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 -echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 +$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } cat >conftest.c <<_ACEOF @@ -21991,16 +14518,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_2ARGS_VFS_UNLINK 1 @@ -22008,11 +14535,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22022,8 +14549,8 @@ fi - echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 -echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } cat >conftest.c <<_ACEOF @@ -22055,16 +14582,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_4ARGS_VFS_RENAME 1 @@ -22072,11 +14599,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22087,8 +14614,8 @@ fi - echo "$as_me:$LINENO: checking whether struct cred exists" >&5 -echo $ECHO_N "checking whether struct cred exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 +$as_echo_n "checking whether struct cred exists... " >&6; } cat >conftest.c <<_ACEOF @@ -22121,16 +14648,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CRED_STRUCT 1 @@ -22138,11 +14665,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22153,8 +14680,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 -echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 +$as_echo_n "checking whether symbol groups_search is exported... " >&6; } grep -q -E '[[:space:]]groups_search[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -22170,12 +14697,12 @@ echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GROUPS_SEARCH 1 @@ -22183,8 +14710,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GROUPS_SEARCH 1 @@ -22194,8 +14721,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 -echo $ECHO_N "checking whether symbol __put_task_struct is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 +$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -22211,12 +14738,12 @@ echo $ECHO_N "checking whether symbol __put_task_struct is exported... $ECHO_C" fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PUT_TASK_STRUCT 1 @@ -22224,8 +14751,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PUT_TASK_STRUCT 1 @@ -22235,8 +14762,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 -echo $ECHO_N "checking whether proc_handler() wants 5 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 +$as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } cat >conftest.c <<_ACEOF @@ -22268,16 +14795,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_5ARGS_PROC_HANDLER 1 @@ -22285,11 +14812,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22304,21 +14831,21 @@ fi all) -# Check whether --with-linux or --without-linux was given. +# Check whether --with-linux was given. if test "${with_linux+set}" = set; then - withval="$with_linux" - kernelsrc="$withval" -fi; + withval=$with_linux; kernelsrc="$withval" +fi -# Check whether --with-linux-obj or --without-linux-obj was given. + +# Check whether --with-linux-obj was given. if test "${with_linux_obj+set}" = set; then - withval="$with_linux_obj" - kernelbuild="$withval" -fi; + withval=$with_linux_obj; kernelbuild="$withval" +fi - echo "$as_me:$LINENO: checking kernel source directory" >&5 -echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 + + { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 +$as_echo_n "checking kernel source directory... " >&6; } if test -z "$kernelsrc"; then headersdir="/lib/modules/$(uname -r)/build" if test -e "$headersdir"; then @@ -22332,12 +14859,12 @@ echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 if test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else - echo "$as_me:$LINENO: result: Not found" >&5 -echo "${ECHO_T}Not found" >&6 - { { echo "$as_me:$LINENO: error: + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Please specify the location of the kernel source *** with the '--with-linux=PATH' option" >&5 -echo "$as_me: error: +$as_echo "$as_me: error: *** Please specify the location of the kernel source *** with the '--with-linux=PATH' option" >&2;} { (exit 1); exit 1; }; } @@ -22348,10 +14875,10 @@ echo "$as_me: error: fi fi - echo "$as_me:$LINENO: result: $kernelsrc" >&5 -echo "${ECHO_T}$kernelsrc" >&6 - echo "$as_me:$LINENO: checking kernel build directory" >&5 -echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 +$as_echo "$kernelsrc" >&6; } + { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 +$as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then if test -d ${kernelsrc}-obj/`arch`/`arch`; then kernelbuild=${kernelsrc}-obj/`arch`/`arch` @@ -22363,11 +14890,11 @@ echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 kernelbuild=${kernelsrc} fi fi - echo "$as_me:$LINENO: result: $kernelbuild" >&5 -echo "${ECHO_T}$kernelbuild" >&6 + { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5 +$as_echo "$kernelbuild" >&6; } - echo "$as_me:$LINENO: checking kernel source version" >&5 -echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking kernel source version" >&5 +$as_echo_n "checking kernel source version... " >&6; } if test -r $kernelbuild/include/linux/version.h && fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then @@ -22386,19 +14913,19 @@ echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 fi if test -z "$kernsrcver"; then - echo "$as_me:$LINENO: result: Not found" >&5 -echo "${ECHO_T}Not found" >&6 - { { echo "$as_me:$LINENO: error: + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Cannot determine the version of the linux kernel source. *** Please prepare the kernel before running this script" >&5 -echo "$as_me: error: +$as_echo "$as_me: error: *** Cannot determine the version of the linux kernel source. *** Please prepare the kernel before running this script" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: $kernsrcver" >&5 -echo "${ECHO_T}$kernsrcver" >&6 + { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 +$as_echo "$kernsrcver" >&6; } LINUX=${kernelsrc} LINUX_OBJ=${kernelbuild} @@ -22410,8 +14937,8 @@ echo "${ECHO_T}$kernsrcver" >&6 modpost=$LINUX/scripts/Makefile.modpost - echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 -echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 +$as_echo_n "checking kernel file name for module symbols... " >&6; } if test -f "$modpost"; then if grep -q Modules.symvers $modpost; then LINUX_SYMBOLS=Modules.symvers @@ -22421,8 +14948,8 @@ echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 else LINUX_SYMBOLS=NONE fi - echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 -echo "${ECHO_T}$LINUX_SYMBOLS" >&6 + { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 +$as_echo "$LINUX_SYMBOLS" >&6; } @@ -22440,13 +14967,13 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - # Check whether --enable-debug or --disable-debug was given. + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - + enableval=$enable_debug; else enable_debug=no -fi; +fi + if test "x$enable_debug" = xyes; then KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" @@ -22455,19 +14982,19 @@ else fi - echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_debug" >&5 -echo "${ECHO_T}$enable_debug" >&6 + { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +$as_echo_n "checking whether debugging is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 +$as_echo "$enable_debug" >&6; } - # Check whether --enable-debug-kmem or --disable-debug-kmem was given. + # Check whether --enable-debug-kmem was given. if test "${enable_debug_kmem+set}" = set; then - enableval="$enable_debug_kmem" - + enableval=$enable_debug_kmem; else enable_debug_kmem=yes -fi; +fi + if test "x$enable_debug_kmem" = xyes; then @@ -22479,19 +15006,19 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 -echo $ECHO_N "checking whether basic kmem accounting is enabled... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 -echo "${ECHO_T}$enable_debug_kmem" >&6 + { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 +$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 +$as_echo "$enable_debug_kmem" >&6; } - # Check whether --enable-debug-kmem-tracking or --disable-debug-kmem-tracking was given. + # Check whether --enable-debug-kmem-tracking was given. if test "${enable_debug_kmem_tracking+set}" = set; then - enableval="$enable_debug_kmem_tracking" - + enableval=$enable_debug_kmem_tracking; else enable_debug_kmem_tracking=no -fi; +fi + if test "x$enable_debug_kmem_tracking" = xyes; then @@ -22503,19 +15030,19 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 -echo $ECHO_N "checking whether detailed kmem tracking is enabled... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 -echo "${ECHO_T}$enable_debug_kmem_tracking" >&6 + { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 +$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 +$as_echo "$enable_debug_kmem_tracking" >&6; } - # Check whether --enable-atomic-spinlocks or --disable-atomic-spinlocks was given. + # Check whether --enable-atomic-spinlocks was given. if test "${enable_atomic_spinlocks+set}" = set; then - enableval="$enable_atomic_spinlocks" - + enableval=$enable_atomic_spinlocks; else enable_atomic_spinlocks=check -fi; +fi + @@ -22548,12 +15075,12 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then have_atomic64_t=yes @@ -22564,7 +15091,7 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_atomic64_t=no @@ -22605,11 +15132,13 @@ else if test "x$have_atomic64_t" = xno; then - { { echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable See \`config.log' for more details." >&5 -echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable +$as_echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi @@ -22617,18 +15146,18 @@ fi fi - echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 -echo $ECHO_N "checking whether atomic types use spinlocks... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 -echo "${ECHO_T}$enable_atomic_spinlocks" >&6 + { $as_echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 +$as_echo_n "checking whether atomic types use spinlocks... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 +$as_echo "$enable_atomic_spinlocks" >&6; } - echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 -echo "${ECHO_T}$have_atomic64_t" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 +$as_echo_n "checking whether kernel defines atomic64_t... " >&6; } + { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 +$as_echo "$have_atomic64_t" >&6; } - echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_cmpxchg... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 +$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } cat >conftest.c <<_ACEOF @@ -22660,16 +15189,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ATOMIC64_CMPXCHG 1 @@ -22677,11 +15206,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22691,8 +15220,8 @@ fi - echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 -echo $ECHO_N "checking whether kernel defines atomic64_xchg... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 +$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } cat >conftest.c <<_ACEOF @@ -22724,16 +15253,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ATOMIC64_XCHG 1 @@ -22741,11 +15270,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22755,8 +15284,8 @@ fi - echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 +$as_echo_n "checking whether kernel defines uintptr_t... " >&6; } cat >conftest.c <<_ACEOF @@ -22788,16 +15317,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_UINTPTR_T 1 @@ -22805,11 +15334,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22819,8 +15348,8 @@ fi - echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 -echo $ECHO_N "checking whether INIT_WORK wants 3 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 +$as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } cat >conftest.c <<_ACEOF @@ -22853,16 +15382,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_3ARGS_INIT_WORK 1 @@ -22870,11 +15399,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22884,8 +15413,8 @@ fi - echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 -echo $ECHO_N "checking whether register_sysctl_table() wants 2 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 +$as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } cat >conftest.c <<_ACEOF @@ -22917,16 +15446,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_2ARGS_REGISTER_SYSCTL 1 @@ -22934,11 +15463,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -22949,8 +15478,8 @@ fi - echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 -echo $ECHO_N "checking whether set_shrinker() available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 +$as_echo_n "checking whether set_shrinker() available... " >&6; } cat >conftest.c <<_ACEOF @@ -22982,16 +15511,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_SHRINKER 1 @@ -22999,11 +15528,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23013,8 +15542,8 @@ fi - echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 -echo $ECHO_N "checking whether struct path used in struct nameidata... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 +$as_echo_n "checking whether struct path used in struct nameidata... " >&6; } cat >conftest.c <<_ACEOF @@ -23049,16 +15578,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PATH_IN_NAMEIDATA 1 @@ -23066,11 +15595,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23081,8 +15610,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 -echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 +$as_echo_n "checking whether symbol task_curr is exported... " >&6; } grep -q -E '[[:space:]]task_curr[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -23098,12 +15627,12 @@ echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TASK_CURR 1 @@ -23111,8 +15640,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TASK_CURR 1 @@ -23121,8 +15650,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 -echo $ECHO_N "checking whether unnumbered sysctl support exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 +$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } cat >conftest.c <<_ACEOF @@ -23156,16 +15685,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CTL_UNNUMBERED 1 @@ -23173,11 +15702,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23187,8 +15716,8 @@ fi - echo "$as_me:$LINENO: checking whether fls64() is available" >&5 -echo $ECHO_N "checking whether fls64() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5 +$as_echo_n "checking whether fls64() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -23220,16 +15749,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FLS64 1 @@ -23237,11 +15766,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23252,8 +15781,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 -echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 +$as_echo_n "checking whether symbol device_create is exported... " >&6; } grep -q -E '[[:space:]]device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -23269,12 +15798,12 @@ echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_CREATE 1 @@ -23282,8 +15811,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_CREATE 1 @@ -23293,8 +15822,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 -echo $ECHO_N "checking whether device_create() wants 5 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 +$as_echo_n "checking whether device_create() wants 5 args... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Werror" @@ -23328,16 +15857,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_5ARGS_DEVICE_CREATE 1 @@ -23345,11 +15874,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23361,8 +15890,8 @@ fi EXTRA_KCFLAGS="$tmp_flags" - echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 -echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 +$as_echo_n "checking whether symbol class_device_create is exported... " >&6; } grep -q -E '[[:space:]]class_device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -23378,12 +15907,12 @@ echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CLASS_DEVICE_CREATE 1 @@ -23391,8 +15920,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CLASS_DEVICE_CREATE 1 @@ -23402,8 +15931,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 -echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 +$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; } grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -23419,12 +15948,12 @@ echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $EC fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 @@ -23432,8 +15961,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 @@ -23443,8 +15972,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 -echo $ECHO_N "checking whether set_normalized_timespec() is an inline... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 +$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } cat >conftest.c <<_ACEOF @@ -23476,23 +16005,23 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 @@ -23508,8 +16037,8 @@ fi - echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 -echo $ECHO_N "checking whether timespec_sub() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 +$as_echo_n "checking whether timespec_sub() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -23542,16 +16071,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TIMESPEC_SUB 1 @@ -23559,11 +16088,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23574,8 +16103,8 @@ fi - echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 -echo $ECHO_N "checking whether init_utsname() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 +$as_echo_n "checking whether init_utsname() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -23607,16 +16136,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_INIT_UTSNAME 1 @@ -23624,11 +16153,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23639,8 +16168,8 @@ fi - echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 -echo $ECHO_N "checking whether header linux/fdtable.h exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 +$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } cat >conftest.c <<_ACEOF @@ -23672,12 +16201,12 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -23685,16 +16214,16 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_FDTABLE_HEADER 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23707,8 +16236,8 @@ fi - echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 -echo $ECHO_N "checking whether files_fdtable() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 +$as_echo_n "checking whether files_fdtable() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -23745,16 +16274,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FILES_FDTABLE 1 @@ -23762,11 +16291,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23777,8 +16306,8 @@ fi - echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 -echo $ECHO_N "checking whether header linux/uaccess.h exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 +$as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } cat >conftest.c <<_ACEOF @@ -23810,12 +16339,12 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -23823,16 +16352,16 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_UACCESS_HEADER 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23845,8 +16374,8 @@ fi - echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 -echo $ECHO_N "checking whether kmalloc_node() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 +$as_echo_n "checking whether kmalloc_node() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -23878,16 +16407,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_KMALLOC_NODE 1 @@ -23895,11 +16424,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -23910,8 +16439,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 -echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 +$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -23927,12 +16456,12 @@ echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >& fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MONOTONIC_CLOCK 1 @@ -23940,8 +16469,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MONOTONIC_CLOCK 1 @@ -23951,8 +16480,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 -echo $ECHO_N "checking whether struct inode has i_mutex... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 +$as_echo_n "checking whether struct inode has i_mutex... " >&6; } cat >conftest.c <<_ACEOF @@ -23986,16 +16515,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_INODE_I_MUTEX 1 @@ -24003,11 +16532,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24018,8 +16547,8 @@ fi - echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 -echo $ECHO_N "checking whether struct mutex has owner... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 +$as_echo_n "checking whether struct mutex has owner... " >&6; } cat >conftest.c <<_ACEOF @@ -24052,16 +16581,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MUTEX_OWNER 1 @@ -24069,11 +16598,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24084,8 +16613,8 @@ fi - echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 -echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 +$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24119,16 +16648,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_MUTEX_LOCK_NESTED 1 @@ -24136,11 +16665,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24151,8 +16680,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 -echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 +$as_echo_n "checking whether symbol div64_64 is exported... " >&6; } grep -q -E '[[:space:]]div64_64[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24168,12 +16697,12 @@ echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_64 1 @@ -24181,8 +16710,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_64 1 @@ -24192,8 +16721,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 -echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 +$as_echo_n "checking whether symbol div64_u64 is exported... " >&6; } grep -q -E '[[:space:]]div64_u64[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24209,12 +16738,12 @@ echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_U64 1 @@ -24222,8 +16751,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DIV64_U64 1 @@ -24233,8 +16762,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 -echo $ECHO_N "checking whether on_each_cpu() wants 3 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 +$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } cat >conftest.c <<_ACEOF @@ -24266,16 +16795,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_3ARGS_ON_EACH_CPU 1 @@ -24283,11 +16812,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24298,8 +16827,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 -echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 +$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24315,12 +16844,12 @@ echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_ fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_KALLSYMS_LOOKUP_NAME 1 @@ -24328,8 +16857,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_KALLSYMS_LOOKUP_NAME 1 @@ -24339,8 +16868,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 -echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 +$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24356,12 +16885,12 @@ echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" > fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_VMALLOC_INFO 1 @@ -24369,8 +16898,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_VMALLOC_INFO 1 @@ -24380,26 +16909,26 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 -echo $ECHO_N "checking whether symbol *_pgdat exist... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 +$as_echo_n "checking whether symbol *_pgdat exist... " >&6; } grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null rc=$? if test $rc -eq 0; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_HELPERS 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 -echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 +$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24415,12 +16944,12 @@ echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FIRST_ONLINE_PGDAT 1 @@ -24428,8 +16957,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FIRST_ONLINE_PGDAT 1 @@ -24439,8 +16968,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 -echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 +$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24456,12 +16985,12 @@ echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ONLINE_PGDAT 1 @@ -24469,8 +16998,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ONLINE_PGDAT 1 @@ -24480,8 +17009,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 -echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 +$as_echo_n "checking whether symbol next_zone is exported... " >&6; } grep -q -E '[[:space:]]next_zone[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24497,12 +17026,12 @@ echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ZONE 1 @@ -24510,8 +17039,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ZONE 1 @@ -24521,8 +17050,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 -echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 +$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -24538,12 +17067,12 @@ echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_LIST 1 @@ -24551,8 +17080,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_LIST 1 @@ -24562,8 +17091,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 -echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 +$as_echo_n "checking whether global_page_state() is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24596,16 +17125,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GLOBAL_PAGE_STATE 1 @@ -24613,11 +17142,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24628,8 +17157,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 -echo $ECHO_N "checking whether page state NR_FREE_PAGES is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 +$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24662,16 +17191,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 @@ -24679,11 +17208,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24694,8 +17223,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 -echo $ECHO_N "checking whether page state NR_INACTIVE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 +$as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24728,16 +17257,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 @@ -24745,11 +17274,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24759,8 +17288,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 -echo $ECHO_N "checking whether page state NR_INACTIVE_ANON is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 +$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24793,16 +17322,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 @@ -24810,11 +17339,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24824,8 +17353,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 -echo $ECHO_N "checking whether page state NR_INACTIVE_FILE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 +$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24858,16 +17387,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 @@ -24875,11 +17404,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24890,8 +17419,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 -echo $ECHO_N "checking whether page state NR_ACTIVE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 +$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24924,16 +17453,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 @@ -24941,11 +17470,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -24955,8 +17484,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 -echo $ECHO_N "checking whether page state NR_ACTIVE_ANON is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 +$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } cat >conftest.c <<_ACEOF @@ -24989,16 +17518,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 @@ -25006,11 +17535,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -25020,8 +17549,8 @@ fi - echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 -echo $ECHO_N "checking whether page state NR_ACTIVE_FILE is available... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 +$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } cat >conftest.c <<_ACEOF @@ -25054,16 +17583,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 @@ -25071,11 +17600,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -25086,8 +17615,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 -echo $ECHO_N "checking whether symbol get_zone_counts is needed... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 +$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } cat >conftest.c <<_ACEOF @@ -25132,31 +17661,31 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define NEED_GET_ZONE_COUNTS 1 _ACEOF - echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 +$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -25172,12 +17701,12 @@ echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >& fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_ZONE_COUNTS 1 @@ -25185,8 +17714,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GET_ZONE_COUNTS 1 @@ -25204,8 +17733,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 -echo $ECHO_N "checking whether symbol set_fs_pwd is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 +$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -25221,12 +17750,12 @@ echo $ECHO_N "checking whether symbol set_fs_pwd is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_FS_PWD 1 @@ -25234,8 +17763,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SET_FS_PWD 1 @@ -25244,8 +17773,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 -echo $ECHO_N "checking whether set_fs_pwd() wants 2 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 +$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } cat >conftest.c <<_ACEOF @@ -25278,16 +17807,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_2ARGS_SET_FS_PWD 1 @@ -25295,11 +17824,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -25309,8 +17838,8 @@ fi - echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 -echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 +$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } cat >conftest.c <<_ACEOF @@ -25342,16 +17871,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_2ARGS_VFS_UNLINK 1 @@ -25359,11 +17888,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -25373,8 +17902,8 @@ fi - echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 -echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } cat >conftest.c <<_ACEOF @@ -25406,16 +17935,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_4ARGS_VFS_RENAME 1 @@ -25423,11 +17952,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -25438,8 +17967,8 @@ fi - echo "$as_me:$LINENO: checking whether struct cred exists" >&5 -echo $ECHO_N "checking whether struct cred exists... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 +$as_echo_n "checking whether struct cred exists... " >&6; } cat >conftest.c <<_ACEOF @@ -25472,16 +18001,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CRED_STRUCT 1 @@ -25489,11 +18018,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -25504,8 +18033,8 @@ fi - echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 -echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 +$as_echo_n "checking whether symbol groups_search is exported... " >&6; } grep -q -E '[[:space:]]groups_search[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -25521,12 +18050,12 @@ echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&6 fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GROUPS_SEARCH 1 @@ -25534,8 +18063,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GROUPS_SEARCH 1 @@ -25545,8 +18074,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 -echo $ECHO_N "checking whether symbol __put_task_struct is exported... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 +$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -25562,12 +18091,12 @@ echo $ECHO_N "checking whether symbol __put_task_struct is exported... $ECHO_C" fi done if test $export -eq 0; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PUT_TASK_STRUCT 1 @@ -25575,8 +18104,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PUT_TASK_STRUCT 1 @@ -25586,8 +18115,8 @@ _ACEOF - echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 -echo $ECHO_N "checking whether proc_handler() wants 5 args... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 +$as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } cat >conftest.c <<_ACEOF @@ -25619,16 +18148,16 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_5ARGS_PROC_HANDLER 1 @@ -25636,11 +18165,11 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -25654,18 +18183,16 @@ fi ;; srpm) ;; *) - echo "$as_me:$LINENO: result: Error!" >&5 -echo "${ECHO_T}Error!" >&6 - { { echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, + { $as_echo "$as_me:$LINENO: result: Error!" >&5 +$as_echo "Error!" >&6; } + { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, user kernel|user|all|srpm" >&5 -echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, +$as_echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, user kernel|user|all|srpm" >&2;} { (exit 1); exit 1; }; } ;; esac - - -if test "$SPL_CONFIG" = user || + if test "$SPL_CONFIG" = user || test "$SPL_CONFIG" = all; then CONFIG_USER_TRUE= CONFIG_USER_FALSE='#' @@ -25674,9 +18201,7 @@ else CONFIG_USER_FALSE= fi - - -if test "$SPL_CONFIG" = kernel || + if test "$SPL_CONFIG" = kernel || test "$SPL_CONFIG" = all; then CONFIG_KERNEL_TRUE= CONFIG_KERNEL_FALSE='#' @@ -25687,7 +18212,7 @@ fi - ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec" +ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec" cat >confcache <<\_ACEOF @@ -25708,39 +18233,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -25749,32 +18294,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -25782,54 +18313,56 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CONFIG_USER_TRUE}" && test -z "${CONFIG_USER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"CONFIG_USER\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_USER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"CONFIG_USER\" was never defined. +$as_echo "$as_me: error: conditional \"CONFIG_USER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CONFIG_KERNEL_TRUE}" && test -z "${CONFIG_KERNEL_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"CONFIG_KERNEL\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_KERNEL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"CONFIG_KERNEL\" was never defined. +$as_echo "$as_me: error: conditional \"CONFIG_KERNEL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -25842,22 +18375,78 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -25867,33 +18456,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -25901,159 +18517,122 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -26062,7 +18641,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -26071,31 +18671,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -26103,45 +18686,45 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -26153,83 +18736,84 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -26243,48 +18827,318 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # -# INIT-COMMANDS section. +# INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "cmd/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;; - "module/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/Makefile" ;; - "module/spl/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;; - "module/splat/Makefile" ) CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;; - "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; - "spl.spec" ) CONFIG_FILES="$CONFIG_FILES spl.spec" ;; - "spl-modules.spec" ) CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "spl_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS spl_config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + case $ac_config_target in + "spl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS spl_config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "cmd/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;; + "module/Makefile") CONFIG_FILES="$CONFIG_FILES module/Makefile" ;; + "module/spl/Makefile") CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;; + "module/splat/Makefile") CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;; + "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; + "spl.spec") CONFIG_FILES="$CONFIG_FILES spl.spec" ;; + "spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -26296,870 +19150,1430 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# CONFIG_FILES section. -# +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@SPL_META_NAME@,$SPL_META_NAME,;t t -s,@SPL_META_VERSION@,$SPL_META_VERSION,;t t -s,@SPL_META_RELEASE@,$SPL_META_RELEASE,;t t -s,@SPL_META_ALIAS@,$SPL_META_ALIAS,;t t -s,@SPL_META_DATA@,$SPL_META_DATA,;t t -s,@SPL_META_AUTHOR@,$SPL_META_AUTHOR,;t t -s,@SPL_META_LT_CURRENT@,$SPL_META_LT_CURRENT,;t t -s,@SPL_META_LT_REVISION@,$SPL_META_LT_REVISION,;t t -s,@SPL_META_LT_AGE@,$SPL_META_LT_AGE,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@target@,$target,;t t -s,@target_cpu@,$target_cpu,;t t -s,@target_vendor@,$target_vendor,;t t -s,@target_os@,$target_os,;t t -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t -s,@MAINT@,$MAINT,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@DEPDIR@,$DEPDIR,;t t -s,@am__include@,$am__include,;t t -s,@am__quote@,$am__quote,;t t -s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t -s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t -s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t -s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t -s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s,@SED@,$SED,;t t -s,@EGREP@,$EGREP,;t t -s,@LN_S@,$LN_S,;t t -s,@ECHO@,$ECHO,;t t -s,@AR@,$AR,;t t -s,@ac_ct_AR@,$ac_ct_AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@CPP@,$CPP,;t t -s,@CXX@,$CXX,;t t -s,@CXXFLAGS@,$CXXFLAGS,;t t -s,@ac_ct_CXX@,$ac_ct_CXX,;t t -s,@CXXDEPMODE@,$CXXDEPMODE,;t t -s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t -s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t -s,@CXXCPP@,$CXXCPP,;t t -s,@F77@,$F77,;t t -s,@FFLAGS@,$FFLAGS,;t t -s,@ac_ct_F77@,$ac_ct_F77,;t t -s,@LIBTOOL@,$LIBTOOL,;t t -s,@LICENSE@,$LICENSE,;t t -s,@SPL_CONFIG@,$SPL_CONFIG,;t t -s,@LINUX@,$LINUX,;t t -s,@LINUX_OBJ@,$LINUX_OBJ,;t t -s,@LINUX_VERSION@,$LINUX_VERSION,;t t -s,@LINUX_SYMBOLS@,$LINUX_SYMBOLS,;t t -s,@KERNELMAKE_PARAMS@,$KERNELMAKE_PARAMS,;t t -s,@KERNELCPPFLAGS@,$KERNELCPPFLAGS,;t t -s,@CONFIG_USER_TRUE@,$CONFIG_USER_TRUE,;t t -s,@CONFIG_USER_FALSE@,$CONFIG_USER_FALSE,;t t -s,@CONFIG_KERNEL_TRUE@,$CONFIG_KERNEL_TRUE,;t t -s,@CONFIG_KERNEL_FALSE@,$CONFIG_KERNEL_FALSE,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + ;; + :H) + # + # CONFIG_HEADER + # if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi -# Compute $ac_file's index in $config_headers. +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X$ac_file | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'`/stamp-h$_am_stamp_count - # Run the commands associated with the file. - case $ac_file in - spl_config.h ) +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "spl_config.h":H) (mv spl_config.h spl_config.h.tmp && awk -f config/config.awk spl_config.h.tmp >spl_config.h && rm spl_config.h.tmp) || exit 1 ;; + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; esac -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ;; - esac -done -_ACEOF + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -27181,4 +20595,8 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi diff --git a/configure.ac b/configure.ac index 4efd1c642..0fa9ebf90 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ SPL_AC_META AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_SYSTEM AM_MAINTAINER_MODE +AM_SILENT_RULES AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) AC_CONFIG_HEADERS([spl_config.h], [ (mv spl_config.h spl_config.h.tmp && diff --git a/include/Makefile.in b/include/Makefile.in index 0aba5a0b8..bae42d7e1 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -48,6 +46,13 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ SOURCES = DIST_SOURCES = HEADERS = $(noinst_HEADERS) @@ -55,9 +60,8 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -66,33 +70,28 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ -CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ -CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ -CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -102,13 +101,18 @@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -132,16 +136,12 @@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -153,32 +153,45 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ # All headers are referenced by this top level Makefile.am are # noinst_HEADERS because they are not installed in the usual include @@ -193,14 +206,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -218,6 +231,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -225,83 +239,85 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/fs $(distdir)/linux $(distdir)/rpc $(distdir)/sharefs $(distdir)/sys $(distdir)/sys/fm $(distdir)/sys/fs $(distdir)/sys/sysevent $(distdir)/util $(distdir)/vm - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -329,6 +345,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -339,8 +356,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags +distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am @@ -348,18 +364,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-data-local +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -378,18 +414,22 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-data-local install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am + install-data-am install-data-local install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am install-data-local: @@ -399,6 +439,7 @@ install-data-local: for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/lib/Makefile.in b/lib/Makefile.in index ad1fbd95e..ed3f85b5a 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -48,29 +46,47 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_LIBADD = am_libcommon_la_OBJECTS = list.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcommon_la_SOURCES) DIST_SOURCES = $(libcommon_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -79,33 +95,28 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ -CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ -CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ -CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -115,13 +126,18 @@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -145,16 +161,12 @@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -166,33 +178,47 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h +AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ -D__USE_LARGEFILE64 noinst_LTLIBRARIES = libcommon.la @@ -206,14 +232,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -231,6 +257,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @@ -241,7 +268,7 @@ clean-noinstLTLIBRARIES: rm -f "$${dir}/so_locations"; \ done libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) - $(LINK) $(libcommon_la_LDFLAGS) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -252,22 +279,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -278,83 +308,85 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../config - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -382,6 +414,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -395,7 +428,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -403,18 +436,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -435,19 +488,23 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-info-am + pdf pdf-am ps ps-am tags uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 73f31008d..fece4777b 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +14,12 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -46,13 +44,19 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -61,33 +65,28 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ -CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ -CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ -CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -97,13 +96,18 @@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_VERSION = @LINUX_VERSION@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -127,16 +131,12 @@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -148,32 +148,45 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ EXTRA_DIST = check.sh all: all-am @@ -182,14 +195,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu scripts/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu scripts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -207,16 +220,13 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: tags: TAGS TAGS: @@ -225,29 +235,32 @@ CTAGS: distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -275,6 +288,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -285,7 +299,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic dvi: dvi-am @@ -293,18 +307,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -323,21 +357,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am check: ./check.sh + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/spl_config.h.in b/spl_config.h.in index 3189756c2..ac608d44f 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -198,6 +198,10 @@ /* Page state NR_INACTIVE_FILE is available */ #undef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* get_zone_counts() is needed */ #undef NEED_GET_ZONE_COUNTS From ef6c1368848f364ac08ccba60bb88010548d9930 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 Apr 2010 15:16:27 -0700 Subject: [PATCH 0364/1062] Disable rw_tryupgrade() for newer kernels For kernels using the CONFIG_RWSEM_GENERIC_SPINLOCK implementation nothing has changed. But if your kernel is building with arch specific rwsems rw_tryupgrade() has been disabled until it can be implemented correctly. In particular, the x86 implementation now leverages atomic primatives for serialization rather than spinlocks. So to get this working again it will need to be implemented as a cmpxchg for x86 and likely something similiar for other arches we are interested in. For now it's safest to simply disable it. --- include/sys/rwlock.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 89fdfa537..0fc8d24f7 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -70,7 +70,7 @@ extern int __down_write_trylock_locked(struct rw_semaphore *); */ # if defined(_I386_RWSEM_H) || defined(_ASM_X86_RWSEM_H) # define RW_COUNT(rwp) ((SEM(rwp)->count < 0) ? (-1) : \ - (SEM(rwp)->count & RWSEM_ACTIVE_MASK)) + (SEM(rwp)->count & RWSEM_ACTIVE_MASK)) # else # define RW_COUNT(rwp) (SEM(rwp)->count & RWSEM_ACTIVE_MASK) # endif @@ -225,6 +225,7 @@ RW_LOCK_HELD(krwlock_t *rwp) downgrade_write(SEM(rwp)); \ }) +#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) #define rw_tryupgrade(rwp) \ ({ \ unsigned long _flags_; \ @@ -239,6 +240,14 @@ RW_LOCK_HELD(krwlock_t *rwp) spin_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ _rc_; \ }) +#else +/* + * This can be done correctly but for each supported arch we will need + * a custom cmpxchg() to atomically check and promote the rwsem. That's + * not worth the trouble for now so rw_tryupgrade() will always fail. + */ +#define rw_tryupgrade(rwp) ({ 0; }) +#endif int spl_rw_init(void); void spl_rw_fini(void); From 82a358d9c0750a84232adf5c092aeec339c9dd3a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 22 Apr 2010 12:48:40 -0700 Subject: [PATCH 0365/1062] Update vn_set_pwd() to allow user|kernal address for filename During module init spl_setup()->The vn_set_pwd("/") was failing with -EFAULT because user_path_dir() and __user_walk() both expect 'filename' to be a user space address and it's not in this case. To handle this the data segment size is increased to to ensure strncpy_from_user() does not fail with -EFAULT. Additionally, I've added a printk() warning to catch this and log it to the console if it ever reoccurs. I thought everything was working properly here because there consequences of this failing are subtle and usually non-critical. --- module/spl/spl-generic.c | 6 +++++- module/spl/spl-vnode.c | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 290c5275d..aaf1a4c10 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -444,12 +444,16 @@ spl_fini(void) void spl_setup(void) { + int rc; + /* * At module load time the pwd is set to '/' on a Solaris system. * On a Linux system will be set to whatever directory the caller * was in when executing insmod/modprobe. */ - vn_set_pwd("/"); + rc = vn_set_pwd("/"); + if (rc) + printk("SPL: Warning unable to set pwd to '/': %d\n", rc); } EXPORT_SYMBOL(spl_setup); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 12e09b781..77652a5a2 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -647,9 +647,22 @@ vn_set_pwd(const char *filename) { #ifdef HAVE_2ARGS_SET_FS_PWD struct path path; +#else + struct nameidata nd; +#endif /* HAVE_2ARGS_SET_FS_PWD */ + mm_segment_t saved_fs; int rc; ENTRY; + /* + * user_path_dir() and __user_walk() both expect 'filename' to be + * a user space address so we must briefly increase the data segment + * size to ensure strncpy_from_user() does not fail with -EFAULT. + */ + saved_fs = get_fs(); + set_fs(get_ds()); + +#ifdef HAVE_2ARGS_SET_FS_PWD rc = user_path_dir(filename, &path); if (rc) GOTO(out, rc); @@ -663,10 +676,6 @@ vn_set_pwd(const char *filename) dput_and_out: path_put(&path); #else - struct nameidata nd; - int rc; - ENTRY; - rc = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); if (rc) @@ -682,6 +691,8 @@ dput_and_out: vn_path_release(&nd); #endif /* HAVE_2ARGS_SET_FS_PWD */ out: + set_fs(saved_fs); + RETURN(-rc); } /* vn_set_pwd() */ EXPORT_SYMBOL(vn_set_pwd); From 663e02a135953a432c8497916657a29cbcd93c01 Mon Sep 17 00:00:00 2001 From: Ricardo Correia Date: Fri, 23 Apr 2010 12:19:10 -0700 Subject: [PATCH 0366/1062] Handle the FAPPEND option in vn_rdwr(). Signed-off-by: Brian Behlendorf --- module/spl/spl-vnode.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 77652a5a2..a113ecb2f 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -181,7 +181,7 @@ EXPORT_SYMBOL(vn_openat); int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, - uio_seg_t seg, int x1, rlim64_t x2, void *x3, ssize_t *residp) + uio_seg_t seg, int ioflag, rlim64_t x2, void *x3, ssize_t *residp) { loff_t offset; mm_segment_t saved_fs; @@ -193,12 +193,15 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, ASSERT(vp); ASSERT(vp->v_file); ASSERT(seg == UIO_SYSSPACE); - ASSERT(x1 == 0); + ASSERT((ioflag & ~FAPPEND) == 0); ASSERT(x2 == RLIM64_INFINITY); - offset = off; fp = vp->v_file; + offset = off; + if (ioflag & FAPPEND) + offset = fp->f_pos; + /* Writable user data segment must be briefly increased for this * process so we can use the user space read call paths to write * in to memory allocated by the kernel. */ From d05ec4b45f77c0f401098d88b5299ef090c73ca9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 23 Apr 2010 14:39:47 -0700 Subject: [PATCH 0367/1062] Assume TQ_SLEEP when not explicitly specified. --- module/spl/spl-taskq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 16b1382d9..64719d762 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -248,6 +248,11 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(tq); ASSERT(func); + + /* Solaris assumes TQ_SLEEP if not passed explicitly */ + if (!(flags & (TQ_SLEEP | TQ_NOSLEEP))) + flags |= TQ_SLEEP; + if (unlikely(in_atomic() && (flags & TQ_SLEEP))) { CERROR("May schedule while atomic: %s/0x%08x/%d\n", current->comm, preempt_count(), current->pid); From 97f8f6d78999ab41d23cf5942d55ea3ad0ca4f3e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 23 Apr 2010 15:55:02 -0700 Subject: [PATCH 0368/1062] Dump log from current process when required When dumping a debug log first check that it is safe to create a new thread and block waiting for it. If we are in an atomic context or irqs and disabled it is not safe to sleep and we must write out of the debug log from the current process. --- module/spl/spl-debug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index a3fcd74e0..0602a1a89 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -1112,6 +1112,9 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags) /* not reached */ } + if (in_atomic() || irqs_disabled()) + flags |= DL_NOTHREAD; + /* Ensure all debug pages and dumped by current cpu */ if (spl_debug_panic_on_bug) spl_panic_in_progress = 1; From f752b46eb3c3b889d62465ea800cf17c980becd1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 14 May 2010 09:24:51 -0700 Subject: [PATCH 0369/1062] Add cv_wait_interruptible() function. This is a minor extension to the condition variable API to allow for reasonable signal handling on Linux. The cv_wait() function by definition must wait unconditionally for cv_signal()/cv_broadcast() before waking it. This makes it impossible to woken by a signal such as SIGTERM. The cv_wait_interruptible() function was added to handle this case. It behaves identically to cv_wait() with the exception that it waits interruptibly allowing a signal to wake it up. This means you do need to be careful and check issig() after waking. --- include/sys/condvar.h | 5 +++-- module/spl/spl-condvar.c | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 9a2e8b5a0..bf1347b0f 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -57,8 +57,8 @@ typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; extern void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg); extern void __cv_destroy(kcondvar_t *cvp); extern void __cv_wait(kcondvar_t *cvp, kmutex_t *mp); -extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, - clock_t expire_time); +extern void __cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp); +extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time); extern void __cv_signal(kcondvar_t *cvp); extern void __cv_broadcast(kcondvar_t *cvp); @@ -71,6 +71,7 @@ extern void __cv_broadcast(kcondvar_t *cvp); }) #define cv_destroy(cvp) __cv_destroy(cvp) #define cv_wait(cvp, mp) __cv_wait(cvp, mp) +#define cv_wait_interruptible(cvp, mp) __cv_wait_interruptible(cvp, mp) #define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) #define cv_signal(cvp) __cv_signal(cvp) #define cv_broadcast(cvp) __cv_broadcast(cvp) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 163f2a1de..d5b9be721 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -84,8 +84,8 @@ __cv_destroy(kcondvar_t *cvp) } EXPORT_SYMBOL(__cv_destroy); -void -__cv_wait(kcondvar_t *cvp, kmutex_t *mp) +static void +cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) { DEFINE_WAIT(wait); ENTRY; @@ -103,8 +103,7 @@ __cv_wait(kcondvar_t *cvp, kmutex_t *mp) ASSERT(cvp->cv_mutex == mp); spin_unlock(&cvp->cv_lock); - prepare_to_wait_exclusive(&cvp->cv_event, &wait, - TASK_UNINTERRUPTIBLE); + prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); /* Mutex should be dropped after prepare_to_wait() this @@ -118,8 +117,21 @@ __cv_wait(kcondvar_t *cvp, kmutex_t *mp) finish_wait(&cvp->cv_event, &wait); EXIT; } + +void +__cv_wait(kcondvar_t *cvp, kmutex_t *mp) +{ + cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE); +} EXPORT_SYMBOL(__cv_wait); +void +__cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp) +{ + cv_wait_common(cvp, mp, TASK_INTERRUPTIBLE); +} +EXPORT_SYMBOL(__cv_wait_interruptible); + /* 'expire_time' argument is an absolute wall clock time in jiffies. * Return value is time left (expire_time - now) or -1 if timeout occurred. */ From 6020190e8f5a94bee7e65a787a1b784cb0f4c4d0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 14 May 2010 09:31:22 -0700 Subject: [PATCH 0370/1062] Use do_posix_clock_monotonic_gettime() as described by comment. While this does incur slightly more overhead we should be using do_posix_clock_monotonic_gettime() for gethrtime() as described by the existing comment. --- module/spl/spl-time.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 2973ae82d..6806dcf71 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -60,9 +60,10 @@ __gethrtime(void) { /* Deal with signed/unsigned mismatch */ return (hrtime_t)(res & ~(1ULL << 63)); #else - uint64_t j = get_jiffies_64(); + struct timespec ts; - return (hrtime_t)(j * (NSEC_PER_SEC / HZ)); + do_posix_clock_monotonic_gettime(&ts); + return (hrtime_t)((ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec); #endif } EXPORT_SYMBOL(__gethrtime); From a76df2dc0fde313d1ecaab61d0dcd46c3cdd6151 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 14 May 2010 09:40:52 -0700 Subject: [PATCH 0371/1062] Add console_*printf() functions. Add support for the missing console_vprintf() and console_printf() functions. --- include/sys/console.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/sys/console.h diff --git a/include/sys/console.h b/include/sys/console.h new file mode 100644 index 000000000..eff52916c --- /dev/null +++ b/include/sys/console.h @@ -0,0 +1,20 @@ +#ifndef _SPL_CONSOLE_H +#define _SPL_CONSOLE_H + +void +console_vprintf(const char *fmt, va_list args) +{ + vprintk(fmt, args); +} + +void +console_printf(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + console_vprintf(fmt, args); + va_end(args); +} + +#endif /* _SPL_CONSOLE_H */ From 8e2140b770152df7aa91e495f11a73308bfc6c13 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 14 May 2010 09:42:53 -0700 Subject: [PATCH 0372/1062] Add 3 missing typedefs. Add processorid_t, pc_t, index_t. --- include/sys/processor.h | 8 ++++++++ include/sys/systm.h | 2 ++ include/sys/types.h | 1 + 3 files changed, 11 insertions(+) create mode 100644 include/sys/processor.h diff --git a/include/sys/processor.h b/include/sys/processor.h new file mode 100644 index 000000000..65285868a --- /dev/null +++ b/include/sys/processor.h @@ -0,0 +1,8 @@ +#ifndef _SPL_PROCESSOR_H +#define _SPL_PROCESSOR_H + +#define getcpuid() smp_processor_id() + +typedef int processorid_t; + +#endif /* _SPL_PROCESSOR_H */ diff --git a/include/sys/systm.h b/include/sys/systm.h index 1fb367a9b..68bd9badf 100644 --- a/include/sys/systm.h +++ b/include/sys/systm.h @@ -3,4 +3,6 @@ #include +typedef uintptr_t pc_t; + #endif /* SPL_SYSTM_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 771e8f36e..2804974dd 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -57,5 +57,6 @@ typedef uint_t minor_t; typedef ulong_t pfn_t; typedef ulong_t pgcnt_t; typedef long spgcnt_t; +typedef short index_t; #endif /* _SPL_TYPES_H */ From 716154c5926eb391eb8178203496430ffa7ebed8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 17 May 2010 15:18:00 -0700 Subject: [PATCH 0373/1062] Public Release Prep Updated AUTHORS, COPYING, DISCLAIMER, and INSTALL files. Added standardized headers to all source file to clearly indicate the copyright, license, and to give credit where credit is due. --- AUTHORS | 12 ++- COPYING | 39 ++++---- DISCLAIMER | 36 +++---- INSTALL | 162 ++++++++++++++++++++----------- Makefile.in | 9 ++ autogen.sh | 4 +- cmd/Makefile.in | 8 ++ cmd/spl.c | 34 +++---- cmd/splat.c | 37 ++++--- cmd/splat.h | 32 +++--- config/Rules.am | 8 ++ config/rpm.am | 8 ++ config/spl-build.m4 | 11 ++- config/spl-meta.m4 | 15 ++- configure.ac | 50 +++++----- include/fs/fs_subr.h | 24 +++++ include/linux/bitops_compat.h | 24 +++++ include/linux/file_compat.h | 24 +++++ include/linux/kallsyms_compat.h | 24 +++++ include/linux/list_compat.h | 24 +++++ include/linux/mm_compat.h | 24 +++++ include/linux/module_compat.h | 24 +++++ include/linux/mutex_compat.h | 24 +++++ include/linux/smp_compat.h | 24 +++++ include/linux/sysctl_compat.h | 56 ++++++++--- include/linux/time_compat.h | 24 +++++ include/linux/uaccess_compat.h | 24 +++++ include/linux/workqueue_compat.h | 24 +++++ include/rpc/types.h | 24 +++++ include/rpc/xdr.h | 23 ++--- include/sharefs/share.h | 24 +++++ include/spl-ctl.h | 38 ++++---- include/spl-device.h | 24 +++++ include/splat-ctl.h | 32 +++--- include/strings.h | 24 +++++ include/sys/acl.h | 24 +++++ include/sys/acl_impl.h | 24 +++++ include/sys/atomic.h | 32 +++--- include/sys/attr.h | 24 +++++ include/sys/bitmap.h | 24 +++++ include/sys/bootconf.h | 24 +++++ include/sys/buf.h | 24 +++++ include/sys/byteorder.h | 24 +++++ include/sys/callb.h | 32 ++++-- include/sys/cmn_err.h | 24 +++++ include/sys/compress.h | 24 +++++ include/sys/condvar.h | 39 ++++---- include/sys/conf.h | 24 +++++ include/sys/console.h | 24 +++++ include/sys/cpuvar.h | 24 +++++ include/sys/crc32.h | 24 +++++ include/sys/cred.h | 32 ++++-- include/sys/ctype.h | 24 +++++ include/sys/ddi.h | 24 +++++ include/sys/debug.h | 40 +++----- include/sys/dirent.h | 24 +++++ include/sys/disp.h | 24 +++++ include/sys/dkio.h | 24 +++++ include/sys/dklabel.h | 24 +++++ include/sys/dnlc.h | 24 +++++ include/sys/dumphdr.h | 24 +++++ include/sys/efi_partition.h | 24 +++++ include/sys/errno.h | 24 +++++ include/sys/file.h | 24 +++++ include/sys/fm/protocol.h | 24 +++++ include/sys/fm/util.h | 24 +++++ include/sys/fs/swapnode.h | 24 +++++ include/sys/int_limits.h | 24 +++++ include/sys/int_types.h | 24 +++++ include/sys/inttypes.h | 24 +++++ include/sys/isa_defs.h | 32 ++++-- include/sys/kidmap.h | 24 +++++ include/sys/kmem.h | 40 +++----- include/sys/kobj.h | 40 +++----- include/sys/kstat.h | 33 +++---- include/sys/list.h | 27 +++++- include/sys/mkdev.h | 24 +++++ include/sys/mntent.h | 24 +++++ include/sys/modctl.h | 24 +++++ include/sys/mode.h | 24 +++++ include/sys/mount.h | 24 +++++ include/sys/mutex.h | 32 +++--- include/sys/note.h | 24 +++++ include/sys/open.h | 24 +++++ include/sys/param.h | 24 +++++ include/sys/pathname.h | 24 +++++ include/sys/policy.h | 24 +++++ include/sys/proc.h | 32 +++--- include/sys/processor.h | 24 +++++ include/sys/random.h | 47 +++------ include/sys/refstr.h | 24 +++++ include/sys/resource.h | 24 +++++ include/sys/rwlock.h | 32 +++--- include/sys/sdt.h | 24 +++++ include/sys/sid.h | 24 +++++ include/sys/signal.h | 32 +++--- include/sys/stat.h | 24 +++++ include/sys/stropts.h | 24 +++++ include/sys/sunddi.h | 32 +++--- include/sys/sunldi.h | 32 +++--- include/sys/sysevent.h | 24 +++++ include/sys/sysevent/eventdefs.h | 24 +++++ include/sys/sysmacros.h | 42 +++----- include/sys/systeminfo.h | 24 +++++ include/sys/systm.h | 24 +++++ include/sys/t_lock.h | 24 +++++ include/sys/taskq.h | 40 +++----- include/sys/thread.h | 40 +++----- include/sys/time.h | 41 +++----- include/sys/timer.h | 40 +++----- include/sys/types.h | 28 +++++- include/sys/types32.h | 24 +++++ include/sys/u8_textprep.h | 24 +++++ include/sys/uio.h | 35 ++++--- include/sys/unistd.h | 24 +++++ include/sys/utsname.h | 24 +++++ include/sys/va_list.h | 24 +++++ include/sys/varargs.h | 24 +++++ include/sys/vfs.h | 24 +++++ include/sys/vfs_opreg.h | 24 +++++ include/sys/vmsystm.h | 32 +++--- include/sys/vnode.h | 40 +++----- include/sys/zmod.h | 73 +++++++++----- include/sys/zone.h | 24 +++++ include/unistd.h | 24 +++++ include/util/qsort.h | 24 +++++ include/vm/anon.h | 24 +++++ include/vm/pvn.h | 24 +++++ include/vm/seg_kmem.h | 24 +++++ lib/Makefile.in | 8 ++ lib/list.c | 22 ++--- lib/list.h | 12 +-- module/spl/spl-atomic.c | 34 +++---- module/spl/spl-condvar.c | 34 +++---- module/spl/spl-cred.c | 32 +++--- module/spl/spl-debug.c | 41 ++++---- module/spl/spl-err.c | 34 +++---- module/spl/spl-generic.c | 34 +++---- module/spl/spl-kmem.c | 34 +++---- module/spl/spl-kobj.c | 34 +++---- module/spl/spl-kstat.c | 34 +++---- module/spl/spl-module.c | 34 +++---- module/spl/spl-mutex.c | 34 +++---- module/spl/spl-proc.c | 34 +++---- module/spl/spl-rwlock.c | 34 +++---- module/spl/spl-taskq.c | 34 +++---- module/spl/spl-thread.c | 34 +++---- module/spl/spl-time.c | 34 +++---- module/spl/spl-vnode.c | 34 +++---- module/spl/spl-xdr.c | 27 +++--- module/splat/splat-atomic.c | 34 +++---- module/splat/splat-condvar.c | 34 +++---- module/splat/splat-cred.c | 32 +++--- module/splat/splat-ctl.c | 67 +++++++------ module/splat/splat-generic.c | 34 +++---- module/splat/splat-internal.h | 32 +++--- module/splat/splat-kmem.c | 34 +++---- module/splat/splat-kobj.c | 34 +++---- module/splat/splat-list.c | 34 +++---- module/splat/splat-mutex.c | 34 +++---- module/splat/splat-random.c | 34 +++---- module/splat/splat-rwlock.c | 34 +++---- module/splat/splat-taskq.c | 34 +++---- module/splat/splat-thread.c | 34 +++---- module/splat/splat-time.c | 34 +++---- module/splat/splat-vnode.c | 34 +++---- scripts/check.sh | 25 +++++ 167 files changed, 3491 insertions(+), 1362 deletions(-) diff --git a/AUTHORS b/AUTHORS index b780cbc05..2b0fee00c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,10 @@ -Brian Behlendorf , +Brian Behlendorf +- Core Implementation. + Ricardo M. Correia -Herb Wartens , -Jim Garlick +- Bug Fixes +- XDR Implementation. + +Chris Dunlap +- LSD-Tools List Implementation. +- AutoConf META File Support. diff --git a/COPYING b/COPYING index 3912109b5..d159169d1 100644 --- a/COPYING +++ b/COPYING @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/DISCLAIMER b/DISCLAIMER index 86778c593..1bb04be7e 100644 --- a/DISCLAIMER +++ b/DISCLAIMER @@ -1,22 +1,24 @@ -This notice is required to be provided under our contract with the -U.S. Department of Energy (DOE). This work was produced at the -Lawrence Livermore National Laboratory under Contract with the DOE. +This work was produced at the Lawrence Livermore National Laboratory +(LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between +the U.S. Department of Energy (DOE) and Lawrence Livermore National +Security, LLC (LLNS) for the operation of LLNL. -Neither the United States Government nor the Lawrence Livermore National -Security, LLC. nor any of their employees, makes any warranty, express -or implied, or assumes any liability or responsibility for the accuracy, -completeness, or usefulness of any information, apparatus, product, -or process disclosed, or represents that its use would not infringe -privately-owned rights. +This work was prepared as an account of work sponsored by an agency of +the United States Government. Neither the United States Government nor +Lawrence Livermore National Security, LLC nor any of their employees, +makes any warranty, express or implied, or assumes any liability or +responsibility for the accuracy, completeness, or usefulness of any +information, apparatus, product, or process disclosed, or represents +that its use would not infringe privately-owned rights. -Also, reference herein to any specific commercial products, process, -or services by trade name, trademark, manufacturer or otherwise does +Reference herein to any specific commercial products, process, or +services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, -or favoring by the United States Government or the Lawrence Livermore -National Security, LLC. The views and opinions of authors expressed -herein do not necessarily state or reflect those of the United States -Government or the Lawrence Livermore National Security, LLC., and -shall not be used for advertising or product endorsement purposes. +or favoring by the United States Government or Lawrence Livermore +National Security, LLC. The views and opinions of authors expressed +herein do not necessarily state or reflect those of the Untied States +Government or Lawrence Livermore National Security, LLC, and shall +not be used for advertising or product endorsement purposes. -The precise terms and conditions for copying, distribution and +The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". diff --git a/INSTALL b/INSTALL index cd052060d..8b82ade08 100644 --- a/INSTALL +++ b/INSTALL @@ -1,16 +1,19 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives + This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,22 +38,17 @@ some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: - 0. `cd' to the directory containing the package's source code and type - `sh ./autogen.sh' to generate the configure script for your package. + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. - 1. Type `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -69,51 +67,66 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. Installation Names ================== -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular @@ -127,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -139,14 +152,36 @@ find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -161,7 +196,7 @@ where SYSTEM can have one of these forms: need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -172,9 +207,9 @@ eventually be run) with `--host=TYPE'. Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -183,7 +218,7 @@ A warning: not all `configure' scripts look for a site script. Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -192,21 +227,29 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -233,5 +276,16 @@ configuration-related scripts to be executed by `/bin/bash'. Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. + diff --git a/Makefile.in b/Makefile.in index 72188bad4..dd591e15e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,6 +15,14 @@ @SET_MAKE@ +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Written by Brian Behlendorf . +############################################################################### +# Build targets for RPM. +############################################################################### + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -761,6 +769,7 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am + rpm-local: mkdir -p $(rpmbuild)/TMP && \ mkdir -p $(rpmbuild)/BUILD && \ diff --git a/autogen.sh b/autogen.sh index 728000ae4..12ed476c7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,8 +1,8 @@ #!/bin/sh -aclocal -I config && +aclocal -I config libtoolize --automake --copy -autoheader && +autoheader automake --add-missing --include-deps --copy autoconf rm -rf autom4te.cache aclocal.m4 diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 7ac86e120..8caaa7d8b 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -15,6 +15,14 @@ @SET_MAKE@ +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Written by Brian Behlendorf . +############################################################################### +# Common rules for user space components. +############################################################################### + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ diff --git a/cmd/spl.c b/cmd/spl.c index c9eb652e4..a77ad9ca4 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) User Space Interface. +\*****************************************************************************/ #include #include diff --git a/cmd/splat.c b/cmd/splat.c index abeea15e9..c0bb7d8d4 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -1,30 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -/* Solaris Porting LAyer Tests (SPLAT) userspace interface */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) User Space Interface. +\*****************************************************************************/ #include #include @@ -834,4 +832,3 @@ out: fini(); return rc; } - diff --git a/cmd/splat.h b/cmd/splat.h index 17cc166a6..dd943124e 100644 --- a/cmd/splat.h +++ b/cmd/splat.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPLAT_H #define _SPLAT_H diff --git a/config/Rules.am b/config/Rules.am index 5eb1a12c6..7b72770b8 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -1,3 +1,11 @@ +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Written by Brian Behlendorf . +############################################################################### +# Common rules for user space components. +############################################################################### + DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h AM_LIBTOOLFLAGS = --silent diff --git a/config/rpm.am b/config/rpm.am index b1c832674..7fb95a72d 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -1,3 +1,11 @@ +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Written by Brian Behlendorf . +############################################################################### +# Build targets for RPM. +############################################################################### + rpm-local: mkdir -p $(rpmbuild)/TMP && \ mkdir -p $(rpmbuild)/BUILD && \ diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 0b387418e..a0fdb3e82 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1,6 +1,11 @@ -dnl # -dnl # Default SPL kernel configuration -dnl # +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Written by Brian Behlendorf . +############################################################################### +# SPL_AC_CONFIG_KERNEL: Default SPL kernel configuration. +############################################################################### + AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index 84b41757d..b76cc8dc6 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -1,11 +1,10 @@ -dnl # -dnl # SPL_AC_META -dnl # Read metadata from the META file. -dnl # -dnl # AUTHOR: -dnl # Chris Dunlap -dnl # Brian Behlendorf -dnl # +############################################################################### +# Written by Chris Dunlap . +# Modified by Brian Behlendorf . +############################################################################### +# SPL_AC_META: Read metadata from the META file. +############################################################################### + AC_DEFUN([SPL_AC_META], [ AC_MSG_CHECKING([metadata]) diff --git a/configure.ac b/configure.ac index 0fa9ebf90..0217e9cd9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick - * UCRL-CODE-235197 - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +############################################################################### +# SPL AutoConf Configuration +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). +# Written by Brian Behlendorf . +# UCRL-CODE-235197 +# +# This file is part of the SPL, Solaris Porting Layer. +# For details, see . +# +# The SPL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# The SPL is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with the SPL. If not, see . +############################################################################### AC_INIT AC_LANG(C) diff --git a/include/fs/fs_subr.h b/include/fs/fs_subr.h index 2a7307638..39499b532 100644 --- a/include/fs/fs_subr.h +++ b/include/fs/fs_subr.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_FS_FS_SUBR_H #define _SPL_FS_FS_SUBR_H diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h index 8e1e25809..d466e0718 100644 --- a/include/linux/bitops_compat.h +++ b/include/linux/bitops_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_BITOPS_COMPAT_H #define _SPL_BITOPS_COMPAT_H diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index c63be0348..d30e90356 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_FILE_COMPAT_H #define _SPL_FILE_COMPAT_H diff --git a/include/linux/kallsyms_compat.h b/include/linux/kallsyms_compat.h index 6cd0a18de..34c45ea3a 100644 --- a/include/linux/kallsyms_compat.h +++ b/include/linux/kallsyms_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_KALLSYMS_COMPAT_H #define _SPL_KALLSYMS_COMPAT_H diff --git a/include/linux/list_compat.h b/include/linux/list_compat.h index e5daa0410..26d5dfe07 100644 --- a/include/linux/list_compat.h +++ b/include/linux/list_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_LIST_COMPAT_H #define _SPL_LIST_COMPAT_H diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index c99027b44..57f83dcc9 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MM_COMPAT_H #define _SPL_MM_COMPAT_H diff --git a/include/linux/module_compat.h b/include/linux/module_compat.h index 766cb58ea..0261f6958 100644 --- a/include/linux/module_compat.h +++ b/include/linux/module_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MODULE_COMPAT_H #define _SPL_MODULE_COMPAT_H diff --git a/include/linux/mutex_compat.h b/include/linux/mutex_compat.h index 49072405e..39eb68c34 100644 --- a/include/linux/mutex_compat.h +++ b/include/linux/mutex_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MUTEX_COMPAT_H #define _SPL_MUTEX_COMPAT_H diff --git a/include/linux/smp_compat.h b/include/linux/smp_compat.h index 4da35f4ad..31d42f909 100644 --- a/include/linux/smp_compat.h +++ b/include/linux/smp_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SMP_COMPAT_H #define _SPL_SMP_COMPAT_H diff --git a/include/linux/sysctl_compat.h b/include/linux/sysctl_compat.h index ecc5d1999..93210e829 100644 --- a/include/linux/sysctl_compat.h +++ b/include/linux/sysctl_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SYSCTL_COMPAT_H #define _SPL_SYSCTL_COMPAT_H @@ -23,34 +47,34 @@ #define SPL_PROC_HANDLER(proc_handler) \ static int \ proc_handler(struct ctl_table *table, int write, \ - void __user *buffer, size_t *lenp, loff_t *ppos) - + void __user *buffer, size_t *lenp, loff_t *ppos) + #define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \ - proc_dostring(table, write, buffer, lenp, ppos) + proc_dostring(table, write, buffer, lenp, ppos) #define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec(table, write, buffer, lenp, ppos) + proc_dointvec(table, write, buffer, lenp, ppos) #define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec_minmax(table, write, buffer, lenp, ppos) + proc_dointvec_minmax(table, write, buffer, lenp, ppos) #define spl_proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec_jiffies(table, write, buffer, lenp, ppos) + proc_dointvec_jiffies(table, write, buffer, lenp, ppos) #define spl_proc_dointvec_userhz_jiffies(table,write,filp,buffer,lenp,ppos) \ - proc_dointvec_userhz_jiffies(table, write, buffer, lenp, ppos) + proc_dointvec_userhz_jiffies(table, write, buffer, lenp, ppos) #define spl_proc_dointvec_ms_jiffies(table,write,filp,buffer,lenp,ppos) \ - proc_dointvec_ms_jiffies(table, write, buffer, lenp, ppos) -#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \ + proc_dointvec_ms_jiffies(table, write, buffer, lenp, ppos) +#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \ proc_doulongvec_minmax(table, write, buffer, lenp, ppos) -#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos) \ +#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos)\ proc_doulongvec_ms_jiffies_minmax(table, write, buffer, lenp, ppos) - -#else /* HAVE_5ARGS_PROC_HANDLER */ - + +#else /* HAVE_5ARGS_PROC_HANDLER */ + #define SPL_PROC_HANDLER(proc_handler) \ static int \ proc_handler(struct ctl_table *table, int write, struct file *filp, \ - void __user *buffer, size_t *lenp, loff_t *ppos) - + void __user *buffer, size_t *lenp, loff_t *ppos) + #define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \ - proc_dostring(table, write, filp, buffer, lenp, ppos) + proc_dostring(table, write, filp, buffer, lenp, ppos) #define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ proc_dointvec(table, write, filp, buffer, lenp, ppos) #define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \ diff --git a/include/linux/time_compat.h b/include/linux/time_compat.h index 1b4727dcd..fa996d346 100644 --- a/include/linux/time_compat.h +++ b/include/linux/time_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_TIME_COMPAT_H #define _SPL_TIME_COMPAT_H diff --git a/include/linux/uaccess_compat.h b/include/linux/uaccess_compat.h index a1bfa52a5..c00669a57 100644 --- a/include/linux/uaccess_compat.h +++ b/include/linux/uaccess_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_UACCESS_COMPAT_H #define _SPL_UACCESS_COMPAT_H diff --git a/include/linux/workqueue_compat.h b/include/linux/workqueue_compat.h index 3dab8776a..a92800ce5 100644 --- a/include/linux/workqueue_compat.h +++ b/include/linux/workqueue_compat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_WORKQUEUE_COMPAT_H #define _SPL_WORKQUEUE_COMPAT_H diff --git a/include/rpc/types.h b/include/rpc/types.h index e73fd9c05..137a381dc 100644 --- a/include/rpc/types.h +++ b/include/rpc/types.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_RPC_TYPES_H #define _SPL_RPC_TYPES_H diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index 43919ca25..c828a38e3 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -1,22 +1,23 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * +/*****************************************************************************\ * Copyright (c) 2008 Sun Microsystems, Inc. + * Written by Ricardo Correia * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_RPC_XDR_H #define _SPL_RPC_XDR_H diff --git a/include/sharefs/share.h b/include/sharefs/share.h index f7c649c70..b3ad6993f 100644 --- a/include/sharefs/share.h +++ b/include/sharefs/share.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SHARE_H #define _SPL_SHARE_H diff --git a/include/spl-ctl.h b/include/spl-ctl.h index 9cc8ab86a..9db139073 100644 --- a/include/spl-ctl.h +++ b/include/spl-ctl.h @@ -1,36 +1,34 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _DEBUG_CTL_H #define _DEBUG_CTL_H -/* Contains shared definitions which both the userspace - * and kernelspace portions of splat must agree on. +/* + * Contains shared definitions which both the user space + * and kernel space portions of splat must agree on. */ - typedef struct spl_debug_header { int ph_len; int ph_flags; diff --git a/include/spl-device.h b/include/spl-device.h index d8c2d09ba..6c3789cd7 100644 --- a/include/spl-device.h +++ b/include/spl-device.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DEVICE_H #define _SPL_DEVICE_H diff --git a/include/splat-ctl.h b/include/splat-ctl.h index fc68395e8..61c7e0e3c 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPLAT_CTL_H #define _SPLAT_CTL_H diff --git a/include/strings.h b/include/strings.h index 697ac4db6..65ee3e7c3 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_STRINGS_H #define _SPL_STRINGS_H diff --git a/include/sys/acl.h b/include/sys/acl.h index 61b5bdf07..7b49b0bc2 100644 --- a/include/sys/acl.h +++ b/include/sys/acl.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_ACL_H #define _SPL_ACL_H diff --git a/include/sys/acl_impl.h b/include/sys/acl_impl.h index 0c8698cbd..9bc45ff96 100644 --- a/include/sys/acl_impl.h +++ b/include/sys/acl_impl.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_ACL_IMPL_H #define _SPL_ACL_IMPL_H diff --git a/include/sys/atomic.h b/include/sys/atomic.h index f522781fc..699f4456e 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_ATOMIC_H #define _SPL_ATOMIC_H diff --git a/include/sys/attr.h b/include/sys/attr.h index 47469ced6..42f21cfeb 100644 --- a/include/sys/attr.h +++ b/include/sys/attr.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_ATTR_H #define _SPL_ATTR_H diff --git a/include/sys/bitmap.h b/include/sys/bitmap.h index 1bf09e66c..85dcb2e3b 100644 --- a/include/sys/bitmap.h +++ b/include/sys/bitmap.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_BITMAP_H #define _SPL_BITMAP_H diff --git a/include/sys/bootconf.h b/include/sys/bootconf.h index 29c885a08..b9d40527c 100644 --- a/include/sys/bootconf.h +++ b/include/sys/bootconf.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_BOOTCONF_H #define _SPL_BOOTCONF_H diff --git a/include/sys/buf.h b/include/sys/buf.h index b6627301f..b1ffa479c 100644 --- a/include/sys/buf.h +++ b/include/sys/buf.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_BUF_H #define _SPL_BUF_H diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h index 7e7d04809..30700f6b3 100644 --- a/include/sys/byteorder.h +++ b/include/sys/byteorder.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_BYTEORDER_H #define _SPL_BYTEORDER_H diff --git a/include/sys/callb.h b/include/sys/callb.h index b37bb278a..9db823650 100644 --- a/include/sys/callb.h +++ b/include/sys/callb.h @@ -1,10 +1,30 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CALLB_H #define _SPL_CALLB_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -31,9 +51,5 @@ typedef struct callb_cpr { mutex_exit((cp)->cc_lockp); \ } -#ifdef __cplusplus -} -#endif - #endif /* _SPL_CALLB_H */ diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h index 62417e83e..9359c1a3b 100644 --- a/include/sys/cmn_err.h +++ b/include/sys/cmn_err.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CMN_ERR_H #define _SPL_CMN_ERR_H diff --git a/include/sys/compress.h b/include/sys/compress.h index a12f6784c..8095cff9c 100644 --- a/include/sys/compress.h +++ b/include/sys/compress.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_COMPRESS_H #define _SPL_COMPRESS_H diff --git a/include/sys/condvar.h b/include/sys/condvar.h index bf1347b0f..d854026ac 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -1,42 +1,37 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_CONDVAR_H #define _SPL_CONDVAR_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include -/* The kcondvar_t struct is protected by mutex taken externally before +/* + * The kcondvar_t struct is protected by mutex taken externally before * calling any of the wait/signal funs, and passed into the wait funs. */ #define CV_MAGIC 0x346545f4 diff --git a/include/sys/conf.h b/include/sys/conf.h index 4166b0c23..bca0ebf05 100644 --- a/include/sys/conf.h +++ b/include/sys/conf.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CONF_H #define _SPL_CONF_H diff --git a/include/sys/console.h b/include/sys/console.h index eff52916c..31d419923 100644 --- a/include/sys/console.h +++ b/include/sys/console.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CONSOLE_H #define _SPL_CONSOLE_H diff --git a/include/sys/cpuvar.h b/include/sys/cpuvar.h index 56ad7a41e..ca5a8b0a0 100644 --- a/include/sys/cpuvar.h +++ b/include/sys/cpuvar.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CPUVAR_H #define _SPL_CPUVAR_H diff --git a/include/sys/crc32.h b/include/sys/crc32.h index b80157965..000a1dca5 100644 --- a/include/sys/crc32.h +++ b/include/sys/crc32.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CRC32_H #define _SPL_CRC32_H diff --git a/include/sys/cred.h b/include/sys/cred.h index 9717b66bc..6f4cde73c 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -1,10 +1,30 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CRED_H #define _SPL_CRED_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -37,8 +57,4 @@ extern int crgetngroups(const cred_t *cr); extern gid_t * crgetgroups(const cred_t *cr); extern int groupmember(gid_t gid, const cred_t *cr); -#ifdef __cplusplus -} -#endif - #endif /* _SPL_CRED_H */ diff --git a/include/sys/ctype.h b/include/sys/ctype.h index 93c76a17e..7ec2bc7fa 100644 --- a/include/sys/ctype.h +++ b/include/sys/ctype.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_CTYPE_H #define _SPL_CTYPE_H diff --git a/include/sys/ddi.h b/include/sys/ddi.h index 186aa5ed2..903b1dd13 100644 --- a/include/sys/ddi.h +++ b/include/sys/ddi.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DDI_H #define _SPL_DDI_H diff --git a/include/sys/debug.h b/include/sys/debug.h index 639b4cc28..848c885a6 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_DEBUG_H #define _SPL_DEBUG_H -#ifdef __cplusplus -extern "C" { -#endif - #include /* THREAD_SIZE */ #include @@ -444,8 +438,4 @@ extern void spl_debug_bug(char *file, const char *func, const int line, int flag extern int spl_debug_clear_buffer(void); extern int spl_debug_mark_buffer(char *text); -#ifdef __cplusplus -} -#endif - #endif /* SPL_DEBUG_H */ diff --git a/include/sys/dirent.h b/include/sys/dirent.h index ac4c701bb..b99542e85 100644 --- a/include/sys/dirent.h +++ b/include/sys/dirent.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DIRENT_H #define _SPL_DIRENT_H diff --git a/include/sys/disp.h b/include/sys/disp.h index 7ff9e3ba3..a0a1b0957 100644 --- a/include/sys/disp.h +++ b/include/sys/disp.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DISP_H #define _SPL_DISP_H diff --git a/include/sys/dkio.h b/include/sys/dkio.h index efe7fa270..0659e9082 100644 --- a/include/sys/dkio.h +++ b/include/sys/dkio.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DKIO_H #define _SPL_DKIO_H diff --git a/include/sys/dklabel.h b/include/sys/dklabel.h index df6bc4791..bd42622d1 100644 --- a/include/sys/dklabel.h +++ b/include/sys/dklabel.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DKLABEL_H #define _SPL_DKLABEL_H diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h index 38f8dd6b1..693e3d294 100644 --- a/include/sys/dnlc.h +++ b/include/sys/dnlc.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DNLC_H #define _SPL_DNLC_H diff --git a/include/sys/dumphdr.h b/include/sys/dumphdr.h index fe4087317..07396e2e6 100644 --- a/include/sys/dumphdr.h +++ b/include/sys/dumphdr.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_DUMPHDR_H #define _SPL_DUMPHDR_H diff --git a/include/sys/efi_partition.h b/include/sys/efi_partition.h index 369062301..75df64f92 100644 --- a/include/sys/efi_partition.h +++ b/include/sys/efi_partition.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_EFI_PARTITION_H #define _SPL_EFI_PARTITION_H diff --git a/include/sys/errno.h b/include/sys/errno.h index f33fe8682..e6b446803 100644 --- a/include/sys/errno.h +++ b/include/sys/errno.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_ERRNO_H #define _SPL_ERRNO_H diff --git a/include/sys/file.h b/include/sys/file.h index f5ee2f0df..4fee255fd 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_FILE_H #define _SPL_FILE_H diff --git a/include/sys/fm/protocol.h b/include/sys/fm/protocol.h index ffd8108ba..8c47f7c9b 100644 --- a/include/sys/fm/protocol.h +++ b/include/sys/fm/protocol.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_FM_PROTOCOL_H #define _SPL_FM_PROTOCOL_H diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h index 6c3412f5b..40b8d47b2 100644 --- a/include/sys/fm/util.h +++ b/include/sys/fm/util.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_FM_UTIL_H #define _SPL_FM_UTIL_H diff --git a/include/sys/fs/swapnode.h b/include/sys/fs/swapnode.h index 12f2137a3..31be71620 100644 --- a/include/sys/fs/swapnode.h +++ b/include/sys/fs/swapnode.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SWAPNODE_H #define _SPL_SWAPNODE_H diff --git a/include/sys/int_limits.h b/include/sys/int_limits.h index 13193e6f1..ed4ad9d19 100644 --- a/include/sys/int_limits.h +++ b/include/sys/int_limits.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_INT_LIMITS_H #define _SPL_INT_LIMITS_H diff --git a/include/sys/int_types.h b/include/sys/int_types.h index a30a8cc44..c97f47f6b 100644 --- a/include/sys/int_types.h +++ b/include/sys/int_types.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_INT_TYPES_H #define _SPL_INT_TYPES_H diff --git a/include/sys/inttypes.h b/include/sys/inttypes.h index ff7a65a98..6f7020134 100644 --- a/include/sys/inttypes.h +++ b/include/sys/inttypes.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_INTTYPES_H #define _SPL_INTTYPES_H diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 081133e5a..10c0e0d3d 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -1,10 +1,30 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_ISA_DEFS_H #define _SPL_ISA_DEFS_H -#ifdef __cplusplus -extern "C" { -#endif - /* x86_64 arch specific defines */ #if defined(__x86_64) || defined(__x86_64__) @@ -80,8 +100,4 @@ extern "C" { #error "Neither _LITTLE_ENDIAN or _BIG_ENDIAN are defined" #endif -#ifdef __cplusplus -} -#endif - #endif /* _SPL_ISA_DEFS_H */ diff --git a/include/sys/kidmap.h b/include/sys/kidmap.h index d1c8d913f..f77656738 100644 --- a/include/sys/kidmap.h +++ b/include/sys/kidmap.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_KIDMAP_H #define _SPL_KIDMAP_H diff --git a/include/sys/kmem.h b/include/sys/kmem.h index f40d0813d..257f2d856 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_KMEM_H #define _SPL_KMEM_H -#ifdef __cplusplus -extern "C" { -#endif - #undef DEBUG_KMEM_UNIMPLEMENTED #include @@ -411,8 +405,4 @@ void spl_kmem_fini(void); #define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ ((ptr) < (void *)VMALLOC_END)) -#ifdef __cplusplus -} -#endif - #endif /* _SPL_KMEM_H */ diff --git a/include/sys/kobj.h b/include/sys/kobj.h index 8d79a0fbf..b682e3f9d 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_KOBJ_H #define _SPL_KOBJ_H -#ifdef __cplusplus -extern "C" { -#endif - #include typedef struct _buf { @@ -45,8 +39,4 @@ extern int kobj_read_file(struct _buf *file, char *buf, ssize_t size, offset_t off); extern int kobj_get_filesize(struct _buf *file, uint64_t *size); -#ifdef __cplusplus -} -#endif - #endif /* SPL_KOBJ_H */ diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 362bae286..6595f0a8b 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_KSTAT_H #define _SPL_KSTAT_H @@ -163,4 +161,3 @@ extern void __kstat_delete(kstat_t *ksp); #define kstat_delete(k) __kstat_delete(k) #endif /* _SPL_KSTAT_H */ - diff --git a/include/sys/list.h b/include/sys/list.h index faf7c7a45..e30d7b7e0 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -1,10 +1,35 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_LIST_H #define _SPL_LIST_H #include #include -/* NOTE: We have implemented the Solaris list API in terms of the native +/* + * NOTE: I have implemented the Solaris list API in terms of the native * linux API. This has certain advantages in terms of leveraging the linux * list debugging infrastructure, but it also means that the internals of a * list differ slightly than on Solaris. This is not a problem as long as diff --git a/include/sys/mkdev.h b/include/sys/mkdev.h index f92ad08fa..89a9000d4 100644 --- a/include/sys/mkdev.h +++ b/include/sys/mkdev.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MKDEV_H #define _SPL_MKDEV_H diff --git a/include/sys/mntent.h b/include/sys/mntent.h index b124e342b..5f0565f4c 100644 --- a/include/sys/mntent.h +++ b/include/sys/mntent.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MNTENT_H #define _SPL_MNTENT_H diff --git a/include/sys/modctl.h b/include/sys/modctl.h index 85f936915..52f679ad5 100644 --- a/include/sys/modctl.h +++ b/include/sys/modctl.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MODCTL_H #define _SPL_MODCTL_H diff --git a/include/sys/mode.h b/include/sys/mode.h index 7ca1b4889..f3d890944 100644 --- a/include/sys/mode.h +++ b/include/sys/mode.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MODE_H #define _SPL_MODE_H diff --git a/include/sys/mount.h b/include/sys/mount.h index 435dd44c4..5b33a6d3a 100644 --- a/include/sys/mount.h +++ b/include/sys/mount.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_MOUNT_H #define _SPL_MOUNT_H diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 1eedd4565..b36c7e256 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2009 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_MUTEX_H #define _SPL_MUTEX_H diff --git a/include/sys/note.h b/include/sys/note.h index 835d1d5ad..6fcffc22e 100644 --- a/include/sys/note.h +++ b/include/sys/note.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_NOTE_H #define _SPL_NOTE_H diff --git a/include/sys/open.h b/include/sys/open.h index eba9fa7d7..aafedd0a1 100644 --- a/include/sys/open.h +++ b/include/sys/open.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_OPEN_H #define _SPL_OPEN_H diff --git a/include/sys/param.h b/include/sys/param.h index dbcdb6e9c..be3dd4bf3 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_PARAM_H #define _SPL_PARAM_H diff --git a/include/sys/pathname.h b/include/sys/pathname.h index ffdf585b8..d22c4f297 100644 --- a/include/sys/pathname.h +++ b/include/sys/pathname.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_PATHNAME_H #define _SPL_PATHNAME_H diff --git a/include/sys/policy.h b/include/sys/policy.h index f6467fe18..2224c41a6 100644 --- a/include/sys/policy.h +++ b/include/sys/policy.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_POLICY_H #define _SPL_POLICY_H diff --git a/include/sys/proc.h b/include/sys/proc.h index 2938414b7..64b26bb3f 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_PROC_H #define _SPL_PROC_H diff --git a/include/sys/processor.h b/include/sys/processor.h index 65285868a..65438a4da 100644 --- a/include/sys/processor.h +++ b/include/sys/processor.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_PROCESSOR_H #define _SPL_PROCESSOR_H diff --git a/include/sys/random.h b/include/sys/random.h index 2e206ccae..8960240b1 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -1,45 +1,33 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_RANDOM_H #define _SPL_RANDOM_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include -/* FIXME: - * Should add support for blocking in the future to - * ensure that proper entopy is collected. ZFS doesn't - * use it at the moment so this is good enough for now. - * Always will succeed by returning 0. - */ static __inline__ int random_get_bytes(uint8_t *ptr, size_t len) { @@ -47,7 +35,6 @@ random_get_bytes(uint8_t *ptr, size_t len) return 0; } - /* Always will succeed by returning 0. */ static __inline__ int random_get_pseudo_bytes(uint8_t *ptr, size_t len) { @@ -55,8 +42,4 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len) return 0; } -#ifdef __cplusplus -} -#endif - #endif /* _SPL_RANDOM_H */ diff --git a/include/sys/refstr.h b/include/sys/refstr.h index 041ea23af..a8d0edbfe 100644 --- a/include/sys/refstr.h +++ b/include/sys/refstr.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_REFSTR_H #define _SPL_REFSTR_H diff --git a/include/sys/resource.h b/include/sys/resource.h index 6488794ff..68e3d2500 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_RESOURCE_H #define _SPL_RESOURCE_H diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 0fc8d24f7..9c4fb7e0f 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2009 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_RWLOCK_H #define _SPL_RWLOCK_H diff --git a/include/sys/sdt.h b/include/sys/sdt.h index 1f94f4a1d..ed4680df9 100644 --- a/include/sys/sdt.h +++ b/include/sys/sdt.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SDT_H #define _SPL_SDT_H diff --git a/include/sys/sid.h b/include/sys/sid.h index f798d24a8..9d4c7192b 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SID_H #define _SPL_SID_H diff --git a/include/sys/signal.h b/include/sys/signal.h index 4b1e82115..c7e293968 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_SIGNAL_H #define _SPL_SIGNAL_H diff --git a/include/sys/stat.h b/include/sys/stat.h index 7f67064ba..ccc01a025 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_STAT_H #define _SPL_STAT_H diff --git a/include/sys/stropts.h b/include/sys/stropts.h index b92949fee..ae20c4d70 100644 --- a/include/sys/stropts.h +++ b/include/sys/stropts.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_STROPTS_H #define _SPL_STROPTS_H diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index c1773f504..c48066b9c 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_SUNDDI_H #define _SPL_SUNDDI_H diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index 97952ad2f..a1a6a12c2 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_SUNLDI_H #define _SPL_SUNLDI_H diff --git a/include/sys/sysevent.h b/include/sys/sysevent.h index 45c960846..723220f0f 100644 --- a/include/sys/sysevent.h +++ b/include/sys/sysevent.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SYSEVENT_H #define _SPL_SYSEVENT_H diff --git a/include/sys/sysevent/eventdefs.h b/include/sys/sysevent/eventdefs.h index d7b28f62b..2112e29ed 100644 --- a/include/sys/sysevent/eventdefs.h +++ b/include/sys/sysevent/eventdefs.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SYSEVENT_EVENTDEFS_H #define _SPL_SYSEVENT_EVENTDEFS_H diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 4ed41d4c5..f76c6dd7f 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_SYSMACROS_H #define _SPL_SYSMACROS_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -41,8 +35,6 @@ extern "C" { #define _KERNEL __KERNEL__ #endif -/* Missing defines. - */ #define FALSE 0 #define TRUE 1 @@ -214,8 +206,4 @@ extern void spl_cleanup(void); #define offsetof(s, m) ((size_t)(&(((s *)0)->m))) #endif -#ifdef __cplusplus -} -#endif - #endif /* _SPL_SYSMACROS_H */ diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index 0e8934554..592d71584 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SYSTEMINFO_H #define _SPL_SYSTEMINFO_H diff --git a/include/sys/systm.h b/include/sys/systm.h index 68bd9badf..f3e310a13 100644 --- a/include/sys/systm.h +++ b/include/sys/systm.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SYSTM_H #define _SPL_SYSTM_H diff --git a/include/sys/t_lock.h b/include/sys/t_lock.h index 0e7d8ae9e..1055f7f6a 100644 --- a/include/sys/t_lock.h +++ b/include/sys/t_lock.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_T_LOCK_H #define _SPL_T_LOCK_H diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 603fde680..d8578499b 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_TASKQ_H #define _SPL_TASKQ_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -102,8 +96,4 @@ void spl_taskq_fini(void); #define taskq_create(n, th, p, mi, ma, fl) __taskq_create(n, th, p, mi, ma, fl) #define taskq_destroy(tq) __taskq_destroy(tq) -#ifdef __cplusplus -} -#endif - #endif /* _SPL_TASKQ_H */ diff --git a/include/sys/thread.h b/include/sys/thread.h index 745f93e2b..4cad648df 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_THREAD_H #define _SPL_THREAD_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -67,9 +61,5 @@ extern kthread_t *__thread_create(caddr_t stk, size_t stksize, int state, pri_t pri); extern void __thread_exit(void); -#ifdef __cplusplus -} -#endif - #endif /* _SPL_THREAD_H */ diff --git a/include/sys/time.h b/include/sys/time.h index 5b263f82c..e4470a491 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_TIME_H #define _SPL_TIME_H @@ -31,11 +29,6 @@ * Structure returned by gettimeofday(2) system call, * and used in other calls. */ - -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -89,8 +82,4 @@ gethrestime_sec(void) return now.tv_sec; } -#ifdef __cplusplus -} -#endif - #endif /* _SPL_TIME_H */ diff --git a/include/sys/timer.h b/include/sys/timer.h index b7aff1184..3af57d8f5 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_TIMER_H #define _SPL_TIMER_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -40,9 +34,5 @@ extern "C" { #define delay(ticks) schedule_timeout((long)(ticks)) -#ifdef __cplusplus -} -#endif - #endif /* _SPL_TIMER_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 2804974dd..498abdff4 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -1,10 +1,30 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_TYPES_H #define _SPL_TYPES_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include diff --git a/include/sys/types32.h b/include/sys/types32.h index 290da02f3..25c4642dc 100644 --- a/include/sys/types32.h +++ b/include/sys/types32.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_TYPES32_H #define _SPL_TYPES32_H diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h index e659548e3..456077c6f 100644 --- a/include/sys/u8_textprep.h +++ b/include/sys/u8_textprep.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_U8_TEXTPREP_H #define _SPL_U8_TEXTPREP_H diff --git a/include/sys/uio.h b/include/sys/uio.h index 0ef7aab63..83e9cc62a 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_UIO_H #define _SPL_UIO_H @@ -32,15 +56,4 @@ typedef struct aio_req { void *aio_private; } aio_req_t; -/* XXX: Must be fully implemented when ZVOL is needed, for reference: - * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/move.c - */ -#if 0 -static __inline__ int -uiomove(void *p, size_t n, enum uio_rw rw, struct uio *uio) -{ - return 0; -} -#endif - #endif /* SPL_UIO_H */ diff --git a/include/sys/unistd.h b/include/sys/unistd.h index c6b298a34..a2acfa705 100644 --- a/include/sys/unistd.h +++ b/include/sys/unistd.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_UNISTD_H #define _SPL_UNISTD_H diff --git a/include/sys/utsname.h b/include/sys/utsname.h index d4b9dc8ae..fa403ff52 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_UTSNAME_H #define _SPL_UTSNAME_H diff --git a/include/sys/va_list.h b/include/sys/va_list.h index 6eb763ff9..644812881 100644 --- a/include/sys/va_list.h +++ b/include/sys/va_list.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_VA_LIST_H #define _SPL_VA_LIST_H diff --git a/include/sys/varargs.h b/include/sys/varargs.h index 056967eaa..b74570c21 100644 --- a/include/sys/varargs.h +++ b/include/sys/varargs.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_VARARGS_H #define _SPL_VARARGS_H diff --git a/include/sys/vfs.h b/include/sys/vfs.h index 0b968faa5..b18c90928 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_ZFS_H #define _SPL_ZFS_H diff --git a/include/sys/vfs_opreg.h b/include/sys/vfs_opreg.h index 8f3f556cb..5dda4d36b 100644 --- a/include/sys/vfs_opreg.h +++ b/include/sys/vfs_opreg.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_OPREG_H #define _SPL_OPREG_H diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 1c367d7cd..b8191f3ac 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_VMSYSTM_H #define _SPL_VMSYSTM_H diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 9568a1392..d3a74a738 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -1,36 +1,30 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPL_VNODE_H #define _SPL_VNODE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -245,8 +239,4 @@ vn_putpage(vnode_t *vp, offset_t off, ssize_t size, extern vnode_t *rootdir; -#ifdef __cplusplus -} -#endif - #endif /* SPL_VNODE_H */ diff --git a/include/sys/zmod.h b/include/sys/zmod.h index bc901b346..f1a63174a 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -1,42 +1,63 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * z_compress_level/z_uncompress are nearly identical copies of the + * compress2/uncompress functions provided by the official zlib package + * available at http://zlib.net/. The only changes made we to slightly + * adapt the functions called to match the linux kernel implementation + * of zlib. The full zlib license follows: + * + * zlib.h -- interface of the 'zlib' general purpose compression library + * version 1.2.5, April 19th, 2010 + * + * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + * Jean-loup Gailly + * Mark Adler +\*****************************************************************************/ #ifndef _SPL_ZMOD_H #define _SPL_ZMOD_H #include -/* NOTE: z_compress_level/z_uncompress are nearly identical copies of - * the compress2/uncompress functions provided by the official zlib - * package available at http://zlib.net/. The only changes made we to - * slightly adapt the functioned called to match the linux kernel - * implementation of zlib. - */ - -/* =========================================================================== +/* * Compresses the source buffer into the destination buffer. The level * parameter has the same meaning as in deflateInit. sourceLen is the byte * length of the source buffer. Upon entry, destLen is the total size of the @@ -82,7 +103,7 @@ z_compress_level(void *dest, size_t *destLen, const void *source, return err; } /* z_compress_level() */ -/* =========================================================================== +/* * Decompresses the source buffer into the destination buffer. sourceLen is * the byte length of the source buffer. Upon entry, destLen is the total * size of the destination buffer, which must be large enough to hold the diff --git a/include/sys/zone.h b/include/sys/zone.h index d3dd73794..9c2652fd2 100644 --- a/include/sys/zone.h +++ b/include/sys/zone.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_ZONE_H #define _SPL_ZONE_H diff --git a/include/unistd.h b/include/unistd.h index c6b298a34..a2acfa705 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_UNISTD_H #define _SPL_UNISTD_H diff --git a/include/util/qsort.h b/include/util/qsort.h index f7bb26847..890674acd 100644 --- a/include/util/qsort.h +++ b/include/util/qsort.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_QSORT_H #define _SPL_QSORT_H diff --git a/include/vm/anon.h b/include/vm/anon.h index 0198e729e..51e8512ba 100644 --- a/include/vm/anon.h +++ b/include/vm/anon.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_VM_ANON_H #define _SPL_VM_ANON_H diff --git a/include/vm/pvn.h b/include/vm/pvn.h index e89ee1748..c206b1b77 100644 --- a/include/vm/pvn.h +++ b/include/vm/pvn.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_VM_PVN_H #define _SPL_VM_PVN_H diff --git a/include/vm/seg_kmem.h b/include/vm/seg_kmem.h index df620e73d..b21f71a52 100644 --- a/include/vm/seg_kmem.h +++ b/include/vm/seg_kmem.h @@ -1,3 +1,27 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + #ifndef _SPL_SEG_KMEM_H #define _SPL_SEG_KMEM_H diff --git a/lib/Makefile.in b/lib/Makefile.in index ed3f85b5a..9c5dfebdf 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -15,6 +15,14 @@ @SET_MAKE@ +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Written by Brian Behlendorf . +############################################################################### +# Common rules for user space components. +############################################################################### + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ diff --git a/lib/list.c b/lib/list.c index fbee2d97d..55367e449 100644 --- a/lib/list.c +++ b/lib/list.c @@ -1,30 +1,28 @@ /***************************************************************************** - * $Id: list.c 3709 2006-11-29 00:51:22Z dun $ - ***************************************************************************** - * Copyright (C) 2001-2002 The Regents of the University of California. + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2001-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . + * UCRL-CODE-235197 * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * - * LSD-Tools is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. + * LSD-Tools is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. * * You should have received a copy of the GNU General Public License along - * with LSD-Tools; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + * with LSD-Tools. If not, see . ***************************************************************************** * Refer to "list.h" for documentation on public functions. *****************************************************************************/ - #ifdef WITH_PTHREADS # include #endif /* WITH_PTHREADS */ diff --git a/lib/list.h b/lib/list.h index fe3fd006b..01adedd59 100644 --- a/lib/list.h +++ b/lib/list.h @@ -1,10 +1,10 @@ /***************************************************************************** - * $Id: list.h 2899 2002-12-11 19:00:36Z dun $ - ***************************************************************************** - * Copyright (C) 2001-2002 The Regents of the University of California. + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2001-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . - * + * UCRL-CODE-235197 + * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under @@ -18,11 +18,9 @@ * more details. * * You should have received a copy of the GNU General Public License along - * with LSD-Tools; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + * with LSD-Tools. If not, see . *****************************************************************************/ - #ifndef LSD_LIST_H #define LSD_LIST_H diff --git a/module/spl/spl-atomic.c b/module/spl/spl-atomic.c index decf9515e..f2dd67384 100644 --- a/module/spl/spl-atomic.c +++ b/module/spl/spl-atomic.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Atomic Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index d5b9be721..269b0ab61 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Credential Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index 826a228dd..dd5d9da01 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -1,26 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2009 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Credential Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 0602a1a89..e28926c12 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -1,35 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * This file was originally part of Lustre, http://www.lustre.org. - * but has subsequently been adapted for use in the SPL in - * accordance with the GPL. - * - * Copyright (C) 2004 Cluster File Systems, Inc. - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Zach Brown - * Phil Schwan - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Debug Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index fcf701400..1d5202827 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Error Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index aaf1a4c10..29b698889 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Generic Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index d62a6f61b..ca89f6fed 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Kmem Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index e78cd9244..42a264172 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Kobj Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 53089c311..2b45549d6 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Kstat Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index f17974873..37dd4f4c1 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Module Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index 0af74571d..983245dc0 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2009 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Mutex Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 6db4664da..3bc8b40cf 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Proc Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 5120b2c81..c0f974f1b 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Reader/Writer Lock Implementation. +\*****************************************************************************/ #include diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 64719d762..805749a14 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Task Queue Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 953c5ce7f..de959119e 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Thread Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 6806dcf71..4c08b754d 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Time Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a113ecb2f..ec312aad1 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Vnode Implementation. +\*****************************************************************************/ #include #include diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index 16e42c336..174f76f19 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -1,22 +1,25 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. +/*****************************************************************************\ + * Copyright (c) 2008-2010 Sun Microsystems, Inc. + * Written by Ricardo Correia * - * Copyright (c) 2008 Sun Microsystems, Inc. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) XDR Implementation. +\*****************************************************************************/ #include @@ -263,7 +266,7 @@ static bool_t xdrmem_enc_char(XDR *xdrs, char *cp) { uint32_t val; - + BUILD_BUG_ON(sizeof(char) != 1); val = *((unsigned char *) cp); diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index 3a651103e..9cdaa69df 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Atomic Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index baef871c2..ace9823c3 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Condition Variable Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index f808625e8..db36ece98 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -1,26 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2009 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Credential Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 36a690743..09f084710 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -1,44 +1,47 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -/* - * My intent is to create a loadable 'splat' (Solaris Porting LAyer - * Tests) module which can be used as an access point to run - * in kernel Solaris ABI regression tests. This provides a - * nice mechanism to validate the shim primates are working properly. + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Test Control Interface. * - * The basic design is the splat module is that it is constructed of - * various splat_* source files each of which contains regression tests. - * For example the splat_linux_kmem.c file contains tests for validating - * kmem correctness. When the splat module is loaded splat_*_init() - * will be called for each subsystems tests, similarly splat_*_fini() is - * called when the splat module is removed. Each test can then be - * run by making an ioctl() call from a userspace control application - * to pick the subsystem and test which should be run. - */ + * The 'splat' (Solaris Porting LAyer Tests) module is designed as a + * framework which runs various in kernel regression tests to validate + * the SPL primitives honor the Solaris ABI. + * + * The splat module is constructed of various splat_* source files each + * of which contain regression tests for a particular subsystem. For + * example, the splat_kmem.c file contains all the tests for validating + * the kmem interfaces have been implemented correctly. When the splat + * module is loaded splat_*_init() will be called for each subsystems + * tests. It is the responsibility of splat_*_init() to register all + * the tests for this subsystem using the SPLAT_TEST_INIT() macro. + * Similarly splat_*_fini() is called when the splat module is removed + * and is responsible for unregistering its tests via the SPLAT_TEST_FINI + * macro. Once a test is registered it can then be run with an ioctl() + * call which specifies the subsystem and test to be run. The provided + * splat command line tool can be used to display all available + * subsystems and tests. It can also be used to run the full suite + * of regression tests or particular tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index d963e50f3..8ad6913c0 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Generic Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index fea78e043..ba1224fc1 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -1,28 +1,26 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . +\*****************************************************************************/ #ifndef _SPLAT_INTERNAL_H #define _SPLAT_INTERNAL_H diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index c743dd163..28b657c15 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Kmem Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c index cd73a98f3..f0720dbf5 100644 --- a/module/splat/splat-kobj.c +++ b/module/splat/splat-kobj.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Kobj Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index e68d4be33..d517e7d22 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) List Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 72fa32c81..96ed27297 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Mutex Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-random.c b/module/splat/splat-random.c index ed8f694c3..3ee580df7 100644 --- a/module/splat/splat-random.c +++ b/module/splat/splat-random.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Random Number Generator Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 13140260c..6b2ecbe82 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Read/Writer Lock Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 9214ecf8d..ea79dfa85 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Task Queue Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index b88cecb83..d21ded795 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Thread Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index d9b62be8f..3b06b9ef2 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Time Tests. +\*****************************************************************************/ #include "splat-internal.h" diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index 91a719b5f..1955841e2 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -1,28 +1,28 @@ -/* - * This file is part of the SPL: Solaris Porting Layer. - * - * Copyright (c) 2008 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory - * Written by: - * Brian Behlendorf , - * Herb Wartens , - * Jim Garlick +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . * UCRL-CODE-235197 * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . * - * This is distributed in the hope that it will be useful, but WITHOUT + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Vnode Tests. +\*****************************************************************************/ #include "splat-internal.h" #include diff --git a/scripts/check.sh b/scripts/check.sh index 37f77853a..712605547 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -1,4 +1,29 @@ #!/bin/bash +############################################################################### +# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007 The Regents of the University of California. +# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). +# Written by Brian Behlendorf . +# UCRL-CODE-235197 +# +# This file is part of the SPL, Solaris Porting Layer. +# For details, see . +# +# The SPL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# The SPL is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with the SPL. If not, see . +############################################################################### +# This script runs the full set of regression tests. +############################################################################### prog=check.sh spl_module=../module/spl/spl.ko From de7cc348212af1b6bdc836be61943ba9e9cfcea7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 17 May 2010 15:47:24 -0700 Subject: [PATCH 0374/1062] Prep for 0.4.9 tag, updated META and ChangeLog --- ChangeLog | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ META | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d076a332c..7338e8769 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,54 @@ +2010-05-17 Brian Behlendorf + + * : Tag spl-0.4.9 + + * : Build system improvements: + - Added support for the 'make -s' silent build option. + - Allow spl_config.h to be included by dependant packages. + + * AUTHORS, COPYING, DISCLAIMER, and INSTALL: Updated. + + * *.c, *.h, *.sh, AUTHORS, COPYING, DISCLAIMER, and INSTALL: + Added standard header to source files which includes the copyright, + license, and author information. Additionally, updated the listed + top level files to the latest versions. + + * include/sys/processor.h, include/sys/systm.h, include/sys/types.h: + Added 3 missing typedefs processorid_t, pc_t, and index_t. + + * include/sys/console.h: Added support for console_* functions(). + + * module/spl/spl-time.c: Updated gethrtime() to use the function + do_posix_clock_monotonic_gettime() as described in the comment. + + * module/spl/spl-condvar.c: Added cv_wait_interruptible() function + as an extension to the existing condition variable ABI to enable + sleeping threads a way to cleanly handle signals in the kernel. + + * module/spl/spl-debug.c: Dump log from current process as required. + + * module/spl/spl-taskq.c: Assume TQ_SLEEP in taskq_dispatch() if + the caller does not specify, this is the Solaris default. + + * module/spl/spl-vnode.c: Extend the vn_rdwr() implementation to + correctly handle the FAPPEND option. + + * module/spl/spl-generic.c, module/spl/spl-vnode.c: Update + vn_set_pwd() to allow a kernal address as filename. This turns + out to be critical because spl_setup()->The vn_set_pwd("/") which + is called at module load time was failing with -EFAULT. + + * include/sys/rwlock.h: Disable rw_tryupgrade() for kernels built + without CONFIG_RWSEM_GENERIC_SPINLOCK defined. The existing + implementation is not safe in this case and needs to be replaced + with a correct native per-arch implementation. + + * module/spl/spl-kmem.c: Reduce maximum kmem based slab size. + Allowing MAX_ORDER-1 sized memory allocations while the system + is low on memory has been observed to result in deadlocks. Callers + should not be using the slab in this way but we should still handle + the case more cleanly. + 2010-03-11 Brian Behlendorf * : Tag spl-0.4.8 diff --git a/META b/META index 4e568fd98..50851fa7a 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.8 +Version: 0.4.9 Release: 1 Release-Tags: relext From 99879b257c509a1571dc412128b9b2cfbaac8ba4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 May 2010 09:18:20 -0700 Subject: [PATCH 0375/1062] Minor spec file cleanup for srpm case. Ensure kdevpkg is defined is srpm case before using it to define the devel_requires macro. Interestingly this is not an issue for rpm-4.7.1-4 but it is for rpm-4.4.2.3-18. --- spl-modules.spec.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 92b12abf4..b7e1c0934 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -22,7 +22,7 @@ %define kobj %{require_kobj} %endif -# SLES 10, SLES 11: +# SLES: %if %{defined suse_version} %if %{undefined kver} %ifarch ppc64 @@ -104,7 +104,7 @@ %endif %else -# Fedora 11: +# Fedora: %if %{defined fedora} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config @@ -152,7 +152,9 @@ %if %{defined build_src_rpm} %define release @SPL_META_RELEASE@ %define requires %{kpkg} +%if %{defined kdevpkg} %define devel_requires %{kdevpkg} +%endif %else %define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %define release @SPL_META_RELEASE@_%{relext} From 627a74972c23ddd2d27163213317cdfa878eb4d7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 19 May 2010 16:17:06 -0700 Subject: [PATCH 0376/1062] Set default debug log patch to /tmp/spl-log. Using /tmp/ is a preferable default, it can always be overriden using the module option on a case-by-case basis. Additionally standardize some log messages based on the same default log level used by the kernel. --- module/spl/spl-debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index e28926c12..3d07a5647 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -77,7 +77,7 @@ module_param(spl_debug_panic_on_bug, int, 0644); MODULE_PARM_DESC(spl_debug_panic_on_bug, "Panic on BUG"); static char spl_debug_file_name[PATH_MAX]; -char spl_debug_file_path[PATH_MAX] = "/var/dumps/spl-log"; +char spl_debug_file_path[PATH_MAX] = "/tmp/spl-log"; unsigned int spl_console_ratelimit = 1; EXPORT_SYMBOL(spl_console_ratelimit); @@ -350,7 +350,7 @@ spl_debug_dumplog_internal(dumplog_priv_t *dp) snprintf(spl_debug_file_name, sizeof(spl_debug_file_path) - 1, "%s.%ld.%ld", spl_debug_file_path, get_seconds(), (long)dp->dp_pid); - printk(KERN_ALERT "SPL: dumping log to %s\n", spl_debug_file_name); + printk("SPL: Dumping log to %s\n", spl_debug_file_name); spl_debug_dump_all_pages(dp, spl_debug_file_name); current->journal_info = journal_info; @@ -1090,7 +1090,7 @@ void spl_debug_dumpstack(struct task_struct *tsk) if (tsk == NULL) tsk = current; - printk(KERN_ERR "SPL: Showing stack for process %d\n", tsk->pid); + printk("SPL: Showing stack for process %d\n", tsk->pid); dump_stack(); } EXPORT_SYMBOL(spl_debug_dumpstack); From 5198ea0e713895efc06f1254e009e2271436fc6f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 19 May 2010 16:53:13 -0700 Subject: [PATCH 0377/1062] Remove kmem_set_warning() interface replace with __GFP_NOWARN flag. Remove the kmem_set_warning() hack used by the kmem-splat regression tests with a per-allocation flag called __GFP_NOWARN. This matches the lower level linux flag of similar by slightly different function. The idea is you can then explicitly set this flag on requests where you know your breaking the max 8k rule but you need/want to do it anyway. This is currently used by the regression tests where we intentionally push things to the limit but don't want the log noise. Additionally, we are forced to use it in spl_kmem_cache_create() because by default NR_CPUS is very large and theres no easy way to handle that. Finally, I've added a stack_dump() call to the warning when it is trigger to make to clear exactly where the allocation is taking place. --- module/spl/spl-kmem.c | 24 +++++++++++++----------- module/splat/splat-kmem.c | 18 +++--------------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index ca89f6fed..82cc10d96 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -228,13 +228,11 @@ unsigned long long kmem_alloc_max = 0; atomic_t vmem_alloc_used = ATOMIC_INIT(0); unsigned long long vmem_alloc_max = 0; # endif /* _LP64 */ -int kmem_warning_flag = 1; EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); EXPORT_SYMBOL(vmem_alloc_used); EXPORT_SYMBOL(vmem_alloc_max); -EXPORT_SYMBOL(kmem_warning_flag); /* When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked * but also the location of every alloc and free. When the SPL module is @@ -280,12 +278,7 @@ EXPORT_SYMBOL(vmem_lock); EXPORT_SYMBOL(vmem_table); EXPORT_SYMBOL(vmem_list); # endif - -int kmem_set_warning(int flag) { return (kmem_warning_flag = !!flag); } -#else -int kmem_set_warning(int flag) { return 0; } #endif -EXPORT_SYMBOL(kmem_set_warning); /* * Slab allocation interfaces @@ -397,10 +390,12 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, } else { /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ - if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) + if (unlikely((size > PAGE_SIZE*2) && !(flags & __GFP_NOWARN))) { CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", (unsigned long long) size, flags, kmem_alloc_used_read(), kmem_alloc_max); + spl_debug_dumpstack(NULL); + } /* We use kstrdup() below because the string pointed to by * __FUNCTION__ might not be available by the time we want @@ -610,10 +605,12 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ - if (unlikely(size > (PAGE_SIZE * 2)) && kmem_warning_flag) + if (unlikely((size > PAGE_SIZE * 2) && !(flags & __GFP_NOWARN))) { CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", (unsigned long long) size, flags, kmem_alloc_used_read(), kmem_alloc_max); + spl_debug_dumpstack(NULL); + } /* Use the correct allocator */ if (node_alloc) { @@ -1242,8 +1239,13 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (current_thread_info()->preempt_count || irqs_disabled()) kmem_flags = KM_NOSLEEP; - /* Allocate new cache memory and initialize. */ - skc = (spl_kmem_cache_t *)kmem_zalloc(sizeof(*skc), kmem_flags); + /* Allocate memry for a new cache an initialize it. Unfortunately, + * this usually ends up being a large allocation of ~32k because + * we need to allocate enough memory for the worst case number of + * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we + * explicitly pass __GFP_NOWARN to suppress the kmem warning */ + skc = (spl_kmem_cache_t *)kmem_zalloc(sizeof(*skc), + kmem_flags | __GFP_NOWARN); if (skc == NULL) RETURN(NULL); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 28b657c15..27efadca5 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -90,15 +90,11 @@ splat_kmem_test1(struct file *file, void *arg) int size = PAGE_SIZE; int i, count, rc = 0; - /* We are intentionally going to push kmem_alloc to its max - * allocation size, so suppress the console warnings for now */ - kmem_set_warning(0); - while ((!rc) && (size <= (PAGE_SIZE * 32))) { count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_alloc(size, KM_SLEEP); + ptr[i] = kmem_alloc(size, KM_SLEEP | __GFP_NOWARN); if (ptr[i]) count++; } @@ -116,8 +112,6 @@ splat_kmem_test1(struct file *file, void *arg) size *= 2; } - kmem_set_warning(1); - return rc; } @@ -128,15 +122,11 @@ splat_kmem_test2(struct file *file, void *arg) int size = PAGE_SIZE; int i, j, count, rc = 0; - /* We are intentionally going to push kmem_alloc to its max - * allocation size, so suppress the console warnings for now */ - kmem_set_warning(0); - while ((!rc) && (size <= (PAGE_SIZE * 32))) { count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_zalloc(size, KM_SLEEP); + ptr[i] = kmem_zalloc(size, KM_SLEEP | __GFP_NOWARN); if (ptr[i]) count++; } @@ -145,7 +135,7 @@ splat_kmem_test2(struct file *file, void *arg) for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { for (j = 0; j < size; j++) { if (((char *)ptr[i])[j] != '\0') { - splat_vprint(file, SPLAT_KMEM_TEST2_NAME, + splat_vprint(file,SPLAT_KMEM_TEST2_NAME, "%d-byte allocation was " "not zeroed\n", size); rc = -EFAULT; @@ -166,8 +156,6 @@ splat_kmem_test2(struct file *file, void *arg) size *= 2; } - kmem_set_warning(1); - return rc; } From e0dcb22e4ee6b7205e7cc1acd6de24d02509e9cc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 09:52:37 -0700 Subject: [PATCH 0378/1062] Adjust 'large' object sizes in kmem:slab_large test. 64K objects are large for a kmem based slab (2M slabs) 1M objects are large for a vmem cased slab (32M slabs) --- module/splat/splat-kmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 27efadca5..e3b6a781c 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -736,15 +736,15 @@ splat_kmem_test6(struct file *file, void *arg) char *name = SPLAT_KMEM_TEST6_NAME; int rc; - rc = splat_kmem_cache_test(file, arg, name, 128*1024, 0, 0); + rc = splat_kmem_cache_test(file, arg, name, 256*1024, 0, 0); if (rc) return rc; - rc = splat_kmem_cache_test(file, arg, name, 128*1024, 0, KMC_KMEM); + rc = splat_kmem_cache_test(file, arg, name, 64*1024, 0, KMC_KMEM); if (rc) return rc; - return splat_kmem_cache_test(file, arg, name, 128*1028, 0, KMC_VMEM); + return splat_kmem_cache_test(file, arg, name, 1024*1024, 0, KMC_VMEM); } /* Validate object alignment cache behavior for caches */ From 3626ae6a7008b2d4d16ddd01defd45a8d7aac3b8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 10:15:51 -0700 Subject: [PATCH 0379/1062] Disable spl_debug_panic_on_bug by default. While I may prefer to have the system panic on an SBUG and to get crash dump for analysis. I suspect most peoples systems are not configured from crash dump and the best thing to so is to simply halt the thread and print an error to the console. This way they have a good chance of actually saving the stack trace and debug log. --- module/spl/spl-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 3d07a5647..8ee6c5dfb 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -71,7 +71,7 @@ EXPORT_SYMBOL(spl_debug_binary); unsigned int spl_debug_catastrophe; EXPORT_SYMBOL(spl_debug_catastrophe); -unsigned int spl_debug_panic_on_bug = 1; +unsigned int spl_debug_panic_on_bug = 0; EXPORT_SYMBOL(spl_debug_panic_on_bug); module_param(spl_debug_panic_on_bug, int, 0644); MODULE_PARM_DESC(spl_debug_panic_on_bug, "Panic on BUG"); From 23d91792efdc42779605025e15b03d63226cff6a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 14:16:59 -0700 Subject: [PATCH 0380/1062] Use KM_NODEBUG macro in preference to __GFP_NOWARN. --- include/sys/kmem.h | 1 + module/spl/spl-kmem.c | 10 +++++----- module/splat/splat-kmem.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 257f2d856..2dd73a8e5 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -49,6 +49,7 @@ #define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) #define KM_VMFLAGS GFP_LEVEL_MASK #define KM_FLAGS __GFP_BITS_MASK +#define KM_NODEBUG __GFP_NOWARN /* * Used internally, the kernel does not need to support this flag diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 82cc10d96..5a421d40e 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -390,7 +390,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, } else { /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ - if (unlikely((size > PAGE_SIZE*2) && !(flags & __GFP_NOWARN))) { + if (unlikely((size > PAGE_SIZE*2) && !(flags & KM_NODEBUG))) { CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", (unsigned long long) size, flags, kmem_alloc_used_read(), kmem_alloc_max); @@ -605,7 +605,7 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ - if (unlikely((size > PAGE_SIZE * 2) && !(flags & __GFP_NOWARN))) { + if (unlikely((size > PAGE_SIZE * 2) && !(flags & KM_NODEBUG))) { CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", (unsigned long long) size, flags, kmem_alloc_used_read(), kmem_alloc_max); @@ -1243,9 +1243,9 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, * this usually ends up being a large allocation of ~32k because * we need to allocate enough memory for the worst case number of * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we - * explicitly pass __GFP_NOWARN to suppress the kmem warning */ + * explicitly pass KM_NODEBUG to suppress the kmem warning */ skc = (spl_kmem_cache_t *)kmem_zalloc(sizeof(*skc), - kmem_flags | __GFP_NOWARN); + kmem_flags | KM_NODEBUG); if (skc == NULL) RETURN(NULL); @@ -1438,7 +1438,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) } /* Allocate a new slab for the cache */ - sks = spl_slab_alloc(skc, flags | __GFP_NORETRY | __GFP_NOWARN); + sks = spl_slab_alloc(skc, flags | __GFP_NORETRY | KM_NODEBUG); if (sks == NULL) GOTO(out, sks = NULL); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index e3b6a781c..168ab0ced 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -94,7 +94,7 @@ splat_kmem_test1(struct file *file, void *arg) count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_alloc(size, KM_SLEEP | __GFP_NOWARN); + ptr[i] = kmem_alloc(size, KM_SLEEP | KM_NODEBUG); if (ptr[i]) count++; } @@ -126,7 +126,7 @@ splat_kmem_test2(struct file *file, void *arg) count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_zalloc(size, KM_SLEEP | __GFP_NOWARN); + ptr[i] = kmem_zalloc(size, KM_SLEEP | KM_NODEBUG); if (ptr[i]) count++; } From 32f5faff694b30c7992181057e3028571f834d41 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 14:20:34 -0700 Subject: [PATCH 0381/1062] Simplify rwlock implementation. Remove RW_COUNT() from the rwlock implementation. The idea was that it could be used as a generic wrapper for getting at the internal state of a rwlock. While a good idea it's proven problematic to keep it correct for multiple archs and internal implementation changes. In short it hasn't been worth the trouble. With that and simplicity in mind things have been updated to use the rwsem_is_locked() function instead of RW_COUNT for the RW_*_HELD() functions. As for rw_upgrade() it remains only implemented for the generic rwsem implemenation. It remains to be determined if its worth the effort of adding a custom implementation for each arch. --- include/sys/rwlock.h | 63 ++++++++++++++----------------------- module/splat/splat-rwlock.c | 16 +++++++--- 2 files changed, 36 insertions(+), 43 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 9c4fb7e0f..e2be77c54 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -44,38 +44,8 @@ typedef struct { kthread_t *rw_owner; } krwlock_t; -/* - * For the generic implementations of rw-semaphores the following is - * true. If your semaphore implementation internally represents the - * semaphore state differently. Then special case handling will be - * required so RW_COUNT() provides these semantics: - * - if activity/count is 0 then there are no active readers or writers - * - if activity/count is +ve then that is the number of active readers - * - if activity/count is -1 then there is one active writer - */ #define SEM(rwp) ((struct rw_semaphore *)(rwp)) -#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) -# define RW_COUNT(rwp) (SEM(rwp)->activity) -# define rw_exit_locked(rwp) __up_read_locked(rwp) -# define rw_tryenter_locked(rwp) __down_write_trylock_locked(rwp) -extern void __up_read_locked(struct rw_semaphore *); -extern int __down_write_trylock_locked(struct rw_semaphore *); -#else -/* - * 2.6.x - 2.6.27 use guard macro _I386_RWSEM_H - * 2.6.28 - 2.6.32+ use guard macro _ASM_X86_RWSEM_H - */ -# if defined(_I386_RWSEM_H) || defined(_ASM_X86_RWSEM_H) -# define RW_COUNT(rwp) ((SEM(rwp)->count < 0) ? (-1) : \ - (SEM(rwp)->count & RWSEM_ACTIVE_MASK)) -# else -# define RW_COUNT(rwp) (SEM(rwp)->count & RWSEM_ACTIVE_MASK) -# endif -# define rw_exit_locked(rwp) up_read(rwp) -# define rw_tryenter_locked(rwp) down_write_trylock(rwp) -#endif - static inline kthread_t * spl_rw_get_owner(krwlock_t *rwp) { @@ -122,7 +92,7 @@ RW_READ_HELD(krwlock_t *rwp) int rc; spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rc = ((RW_COUNT(rwp) > 0) && (spl_rw_get_owner(rwp) == NULL)); + rc = (rwsem_is_locked(SEM(rwp)) && spl_rw_get_owner(rwp) == NULL); spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); return rc; @@ -135,7 +105,7 @@ RW_WRITE_HELD(krwlock_t *rwp) int rc; spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rc = ((RW_COUNT(rwp) < 0) && (spl_rw_get_owner(rwp) == current)); + rc = (rwsem_is_locked(SEM(rwp)) && spl_rw_get_owner(rwp) == current); spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); return rc; @@ -148,7 +118,7 @@ RW_LOCK_HELD(krwlock_t *rwp) int rc; spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rc = (RW_COUNT(rwp) != 0); + rc = rwsem_is_locked(SEM(rwp)); spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); return rc; @@ -224,15 +194,28 @@ RW_LOCK_HELD(krwlock_t *rwp) }) #if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) +/* + * For the generic implementations of rw-semaphores the following is + * true. If your semaphore implementation internally represents the + * semaphore state differently then special case handling is required. + * - if activity/count is 0 then there are no active readers or writers + * - if activity/count is +ve then that is the number of active readers + * - if activity/count is -1 then there is one active writer + */ + +extern void __up_read_locked(struct rw_semaphore *); +extern int __down_write_trylock_locked(struct rw_semaphore *); + #define rw_tryupgrade(rwp) \ ({ \ unsigned long _flags_; \ int _rc_ = 0; \ \ spin_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ - if (list_empty(&SEM(rwp)->wait_list) && (RW_COUNT(rwp) == 1)) { \ - rw_exit_locked(SEM(rwp)); \ - VERIFY(_rc_ = rw_tryenter_locked(SEM(rwp))); \ + if ((list_empty(&SEM(rwp)->wait_list)) && \ + (SEM(rwp)->activity == 1)) { \ + __up_read_locked(SEM(rwp)); \ + VERIFY(_rc_ = __down_write_trylock_locked(SEM(rwp))); \ (rwp)->rw_owner = current; \ } \ spin_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ @@ -240,9 +223,11 @@ RW_LOCK_HELD(krwlock_t *rwp) }) #else /* - * This can be done correctly but for each supported arch we will need - * a custom cmpxchg() to atomically check and promote the rwsem. That's - * not worth the trouble for now so rw_tryupgrade() will always fail. + * rw_tryupgrade() can be implemented correctly but for each supported + * arch we will need a custom implementation. For the x86 implementation + * it looks like a custom cmpxchg() to atomically check and promote the + * rwsem would be safe. For now that's not worth the trouble so in this + * case rw_tryupgrade() has just been disabled. */ #define rw_tryupgrade(rwp) ({ 0; }) #endif diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 6b2ecbe82..dc560c2b9 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -571,7 +571,7 @@ static int splat_rwlock_test6(struct file *file, void *arg) { rw_priv_t *rwp; - int rc = -EINVAL; + int rc; rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); if (rwp == NULL) @@ -584,15 +584,18 @@ splat_rwlock_test6(struct file *file, void *arg) splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "rwlock should be read lock: %d\n", RW_READ_HELD(&rwp->rw_rwlock)); + rc = -ENOLCK; goto out; } - /* With one reader upgrade should never fail */ +#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) + /* With one reader upgrade should never fail. */ rc = rw_tryupgrade(&rwp->rw_rwlock); if (!rc) { splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, - "rwlock contended preventing upgrade: %ld\n", - (long int)RW_COUNT(&rwp->rw_rwlock)); + "rwlock failed upgrade from reader: %d\n", + RW_READ_HELD(&rwp->rw_rwlock)); + rc = -ENOLCK; goto out; } @@ -607,6 +610,11 @@ splat_rwlock_test6(struct file *file, void *arg) rc = 0; splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", "rwlock properly upgraded\n"); +#else + rc = 0; + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", + "rw_tryupgrade() is disabled for this arch\n"); +#endif out: rw_exit(&rwp->rw_rwlock); rw_destroy(&rwp->rw_rwlock); From edbbb609bd4418997282e4fe7110eb8073dd66cb Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 21 May 2010 11:53:49 -0700 Subject: [PATCH 0382/1062] Minor spec file cleanup for RHEL6 package dependency. --- spl-modules.spec.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index b7e1c0934..92ccbd21f 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -94,7 +94,11 @@ %endif %define kpkg kernel %define kdevpkg kernel-devel - %define kverpkg %{kver} + %if %{defined el6} + %define kverpkg %(echo %{kver} | %{__sed} -e 's/.%{_target_cpu}//g') + %else + %define kverpkg %{kver} + %endif %define koppkg = %if %{undefined kdir} %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu} From 3cca28a7859b78ec9add4e38c3c12cf1527e3e87 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 21 May 2010 14:17:44 -0700 Subject: [PATCH 0383/1062] Re-Prep for 0.4.9 tag with a few more fixes and updated ChangeLog --- ChangeLog | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7338e8769..9fda9c9a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,11 @@ -2010-05-17 Brian Behlendorf +2010-05-21 Brian Behlendorf * : Tag spl-0.4.9 * : Build system improvements: - Added support for the 'make -s' silent build option. - - Allow spl_config.h to be included by dependant packages. + - Allow spl_config.h to be included by dependent packages. + - Minor spec file updates. * AUTHORS, COPYING, DISCLAIMER, and INSTALL: Updated. @@ -13,6 +14,9 @@ license, and author information. Additionally, updated the listed top level files to the latest versions. + * module/spl/spl-debug.c: Debugging defaults adjusted. The default + log dump path is now /tmp/spl-log and panic on SBUG has been disabled. + * include/sys/processor.h, include/sys/systm.h, include/sys/types.h: Added 3 missing typedefs processorid_t, pc_t, and index_t. @@ -49,6 +53,19 @@ should not be using the slab in this way but we should still handle the case more cleanly. + * module/spl/spl-kmem.c: Remove kmem_set_warning() interface and + replace it with KM_NODEBUG flag which can be specific per allocation. + + * module/splat/splat-kmem.c: Tweaked what the idea of a large object + is for the kmem:slab_large regression tests because failures were + observed for very large kmem objects in newer kernels. + + * include/sys/rwlock.h, module/splat/splat-rwlock.c: The rwlock + implementation was simplified because failures were being observed + when using the non-generic implementation. This change leverages + the rwsem_is_locked() function instead of directly consulting the + rwsem internals which differ per-arch and per-kernel-version. + 2010-03-11 Brian Behlendorf * : Tag spl-0.4.8 From 49638d838846b551f033037c2ff13368e6fdd166 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 21 May 2010 15:52:06 -0700 Subject: [PATCH 0384/1062] Refresh autogen.sh products with automake 1.11.1. --- Makefile.in | 17 +++++++++-------- cmd/Makefile.in | 2 +- include/Makefile.in | 2 +- lib/Makefile.in | 2 +- scripts/Makefile.in | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile.in b/Makefile.in index dd591e15e..f2ec0112b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -347,7 +347,7 @@ distclean-libtool: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -372,7 +372,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -534,7 +534,8 @@ distdir: $(DISTFILES) fi; \ done -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ @@ -579,17 +580,17 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 8caaa7d8b..819957e07 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff --git a/include/Makefile.in b/include/Makefile.in index bae42d7e1..97c854e20 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff --git a/lib/Makefile.in b/lib/Makefile.in index 9c5dfebdf..3ba39fff7 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff --git a/scripts/Makefile.in b/scripts/Makefile.in index fece4777b..b171b01ff 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, From 8a1c9a02fb66ac5885990ec4d82faf03f820085b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 23 May 2010 09:51:17 -0700 Subject: [PATCH 0385/1062] Minor 32-bit fix cast to hrtime_t before the mutliply. It's important to cast to hrtime_t before doing the multiply because the ts.tv_sec type is only 32-bits and we need to promote it to 64-bits. --- module/spl/spl-time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 4c08b754d..6ef9b8fc8 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -63,7 +63,7 @@ __gethrtime(void) { struct timespec ts; do_posix_clock_monotonic_gettime(&ts); - return (hrtime_t)((ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec); + return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec); #endif } EXPORT_SYMBOL(__gethrtime); From 1b4ad25e2f29172c86d3293b61f0c5232d4a2da8 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Wed, 2 Jun 2010 22:01:14 -0700 Subject: [PATCH 0386/1062] Stack overflow on 64-bit modulus operations on 32-bit architectures. Running 'zpool create' on a 32-bit machine with an SPL compiled with gcc 4.4.4 led to a stack overlow. This turned out to be due to some sort of 'optimization' by gcc: uint64_t __umoddi3(uint64_t dividend, uint64_t divisor) { return dividend - divisor * (dividend / divisor); } This code was supposed to be using __udivdi3 to implement /, but gcc instead implemented it via __umoddi3 itself. Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 29b698889..9916051de 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -96,7 +96,8 @@ EXPORT_SYMBOL(highbit); * Implementation of 64 bit division for 32-bit machines. */ #if BITS_PER_LONG == 32 -uint64_t __udivdi3(uint64_t dividend, uint64_t divisor) +uint64_t +__udivdi3(uint64_t dividend, uint64_t divisor) { #if defined(HAVE_DIV64_64) /* 2.6.22 - 2.6.25 API */ return div64_64(dividend, divisor); @@ -125,9 +126,10 @@ EXPORT_SYMBOL(__udivdi3); /* * Implementation of 64 bit modulo for 32-bit machines. */ -uint64_t __umoddi3(uint64_t dividend, uint64_t divisor) +uint64_t +__umoddi3(uint64_t dividend, uint64_t divisor) { - return dividend - divisor * (dividend / divisor); + return (dividend - (divisor * __udivdi3(dividend, divisor))); } EXPORT_SYMBOL(__umoddi3); #endif /* BITS_PER_LONG */ From 71b1242e677d1e44d9273f9bbe1206a2184eabf8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jun 2010 14:42:16 -0700 Subject: [PATCH 0387/1062] Update META to version 0.5.0 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 50851fa7a..fd658908f 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.4.9 +Version: 0.5.0 Release: 1 Release-Tags: relext From ae4c36adce9228eb444c1d5e19f00e83303dbeee Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jun 2010 14:37:46 -0700 Subject: [PATCH 0388/1062] Cleanly split Linux proc.h (fs) from conflicting Solaris proc.h (process) Under linux the proc.h header is for the /proc filesystem, and under Solaris the proc/h header if for processes. This patch correctly moves the Linux proc functionality in a linux/proc_compat.h header and leaves the sys/proc.h for use by Solaris. Minor updates were required to all the call sites where it was included of course. --- include/linux/proc_compat.h | 47 +++++++++++++++++++++++++++++++++++++ include/sys/kstat.h | 2 +- include/sys/proc.h | 29 ----------------------- include/sys/sysmacros.h | 6 ++--- include/sys/taskq.h | 4 ++++ include/sys/thread.h | 9 ++----- include/sys/types.h | 4 ++++ module/spl/spl-debug.c | 2 +- module/spl/spl-generic.c | 3 ++- module/spl/spl-kstat.c | 1 + module/spl/spl-proc.c | 6 ++++- module/spl/spl-thread.c | 2 +- 12 files changed, 71 insertions(+), 44 deletions(-) create mode 100644 include/linux/proc_compat.h diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h new file mode 100644 index 000000000..c30f9db8e --- /dev/null +++ b/include/linux/proc_compat.h @@ -0,0 +1,47 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_PROC_H +#define _SPL_PROC_H + +#include + +#ifdef CONFIG_SYSCTL +#ifdef HAVE_2ARGS_REGISTER_SYSCTL +#define spl_register_sysctl_table(t, a) register_sysctl_table(t, a) +#else +#define spl_register_sysctl_table(t, a) register_sysctl_table(t) +#endif /* HAVE_2ARGS_REGISTER_SYSCTL */ +#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t) +#endif /* CONFIG_SYSCTL */ + +extern struct proc_dir_entry *proc_spl_kstat; +struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, + const char *str); +int proc_dir_entries(struct proc_dir_entry *root); + +int proc_init(void); +void proc_fini(void); + +#endif /* SPL_PROC_H */ diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 6595f0a8b..42458bee5 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -26,10 +26,10 @@ #define _SPL_KSTAT_H #include +#include #include #include #include -#include #define KSTAT_STRLEN 31 diff --git a/include/sys/proc.h b/include/sys/proc.h index 64b26bb3f..1c02c676e 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -25,33 +25,4 @@ #ifndef _SPL_PROC_H #define _SPL_PROC_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_SYSCTL -#ifdef HAVE_2ARGS_REGISTER_SYSCTL -#define spl_register_sysctl_table(t, a) register_sysctl_table(t, a) -#else -#define spl_register_sysctl_table(t, a) register_sysctl_table(t) -#endif /* HAVE_2ARGS_REGISTER_SYSCTL */ -#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t) -#endif /* CONFIG_SYSCTL */ - -extern struct proc_dir_entry *proc_spl_kstat; -struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, - const char *str); -int proc_dir_entries(struct proc_dir_entry *root); - -int proc_init(void); -void proc_fini(void); - #endif /* SPL_PROC_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index f76c6dd7f..4475431e7 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -64,11 +64,12 @@ #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define curproc current #define proc_pageout NULL -#define max_ncpus 64 +#define curproc get_current() +#define max_ncpus 64 #define CPU_SEQID smp_processor_id() /* I think... */ #define _NOTE(x) +#define is_system_labeled() 0 #define RLIM64_INFINITY RLIM_INFINITY @@ -131,7 +132,6 @@ extern char spl_version[16]; extern long spl_hostid; extern char hw_serial[11]; -extern int p0; /* Missing misc functions */ extern int highbit(unsigned long i); diff --git a/include/sys/taskq.h b/include/sys/taskq.h index d8578499b..baa96eaa0 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -94,6 +94,10 @@ void spl_taskq_fini(void); #define taskq_wait(tq) __taskq_wait(tq) #define taskq_dispatch(tq, f, p, fl) __taskq_dispatch(tq, f, p, fl) #define taskq_create(n, th, p, mi, ma, fl) __taskq_create(n, th, p, mi, ma, fl) +#define taskq_create_proc(n, th, p, mi, ma, pr, fl) \ + __taskq_create(n, th, p, mi, ma, fl) +#define taskq_create_sysdc(n, th, mi, ma, pr, dc, fl) \ + __taskq_create(n, th, maxclsyspri, mi, ma, fl) #define taskq_destroy(tq) __taskq_destroy(tq) #endif /* _SPL_TASKQ_H */ diff --git a/include/sys/thread.h b/include/sys/thread.h index 4cad648df..e29715d83 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -41,11 +41,6 @@ #define TS_RUN TASK_RUNNING #define TS_ZOMB EXIT_ZOMBIE #define TS_STOPPED TASK_STOPPED -#if 0 -#define TS_FREE 0x00 /* No clean linux mapping */ -#define TS_ONPROC 0x04 /* No clean linux mapping */ -#define TS_WAIT 0x20 /* No clean linux mapping */ -#endif typedef void (*thread_func_t)(void *); @@ -53,13 +48,13 @@ typedef void (*thread_func_t)(void *); __thread_create(stk, stksize, (thread_func_t)func, \ #func, arg, len, pp, state, pri) #define thread_exit() __thread_exit() +#define thread_join(t) SBUG() #define curthread get_current() extern kthread_t *__thread_create(caddr_t stk, size_t stksize, thread_func_t func, const char *name, - void *args, size_t len, int *pp, + void *args, size_t len, proc_t *pp, int state, pri_t pri); extern void __thread_exit(void); #endif /* _SPL_THREAD_H */ - diff --git a/include/sys/types.h b/include/sys/types.h index 498abdff4..1bdd00c48 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -39,6 +39,7 @@ #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; @@ -63,6 +64,7 @@ typedef unsigned long long rlim64_t; typedef long long longlong_t; typedef long long offset_t; typedef struct task_struct kthread_t; +typedef struct task_struct proc_t; typedef struct vmem { } vmem_t; typedef short pri_t; typedef struct timespec timestruc_t; /* definition per SVr4 */ @@ -79,4 +81,6 @@ typedef ulong_t pgcnt_t; typedef long spgcnt_t; typedef short index_t; +extern proc_t p0; + #endif /* _SPL_TYPES_H */ diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 8ee6c5dfb..6a1086241 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -34,8 +34,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 9916051de..d5c1523e1 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -38,6 +38,7 @@ #include #include #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -53,7 +54,7 @@ EXPORT_SYMBOL(spl_hostid); char hw_serial[HW_HOSTID_LEN] = ""; EXPORT_SYMBOL(hw_serial); -int p0 = 0; +proc_t p0 = { 0 }; EXPORT_SYMBOL(p0); #ifndef HAVE_KALLSYMS_LOOKUP_NAME diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 2b45549d6..433f3e5b0 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include static spinlock_t kstat_lock; static struct list_head kstat_list; diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 3bc8b40cf..277a92a7a 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -24,7 +24,11 @@ * Solaris Porting Layer (SPL) Proc Implementation. \*****************************************************************************/ -#include +#include +#include +#include +#include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index de959119e..1345890ed 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -83,7 +83,7 @@ EXPORT_SYMBOL(__thread_exit); * style callers likely never check for... since it can't fail. */ kthread_t * __thread_create(caddr_t stk, size_t stksize, thread_func_t func, - const char *name, void *args, size_t len, int *pp, + const char *name, void *args, size_t len, proc_t *pp, int state, pri_t pri) { thread_priv_t *tp; From 750a7101f8deecc4e8187f16c880cded2667cef8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jun 2010 14:45:42 -0700 Subject: [PATCH 0389/1062] Stub out additional missing headers --- include/sys/bootprops.h | 28 ++++++++++++++++++++++++++++ include/sys/cpupart.h | 28 ++++++++++++++++++++++++++++ include/sys/pool.h | 30 ++++++++++++++++++++++++++++++ include/sys/priv_impl.h | 28 ++++++++++++++++++++++++++++ include/sys/pset.h | 38 ++++++++++++++++++++++++++++++++++++++ include/sys/sysdc.h | 28 ++++++++++++++++++++++++++++ 6 files changed, 180 insertions(+) create mode 100644 include/sys/bootprops.h create mode 100644 include/sys/cpupart.h create mode 100644 include/sys/pool.h create mode 100644 include/sys/priv_impl.h create mode 100644 include/sys/pset.h create mode 100644 include/sys/sysdc.h diff --git a/include/sys/bootprops.h b/include/sys/bootprops.h new file mode 100644 index 000000000..e4b355032 --- /dev/null +++ b/include/sys/bootprops.h @@ -0,0 +1,28 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_BOOTPROPS_H +#define _SPL_BOOTPROPS_H + +#endif /* SPL_BOOTPROPS_H */ diff --git a/include/sys/cpupart.h b/include/sys/cpupart.h new file mode 100644 index 000000000..8416c99b6 --- /dev/null +++ b/include/sys/cpupart.h @@ -0,0 +1,28 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_CPUPART_H +#define _SPL_CPUPART_H + +#endif /* SPL_CPUPART_H */ diff --git a/include/sys/pool.h b/include/sys/pool.h new file mode 100644 index 000000000..95aea6a09 --- /dev/null +++ b/include/sys/pool.h @@ -0,0 +1,30 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_POOL_H +#define _SPL_POOL_H + +#include + +#endif /* SPL_POOL_H */ diff --git a/include/sys/priv_impl.h b/include/sys/priv_impl.h new file mode 100644 index 000000000..28fa203a6 --- /dev/null +++ b/include/sys/priv_impl.h @@ -0,0 +1,28 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_PRIV_IMPL_H +#define _SPL_PRIV_IMPL_H + +#endif /* _SPL_PRIV_IMPL_H */ diff --git a/include/sys/pset.h b/include/sys/pset.h new file mode 100644 index 000000000..9b0ebc4f8 --- /dev/null +++ b/include/sys/pset.h @@ -0,0 +1,38 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_PSET_H +#define _SPL_PSET_H + +typedef int psetid_t; + +/* special processor set id's */ +#define PS_NONE -1 +#define PS_QUERY -2 +#define PS_MYID -3 +#define PS_SOFT -4 +#define PS_HARD -5 +#define PS_QUERY_TYPE -6 + +#endif /* SPL_PSET_H */ diff --git a/include/sys/sysdc.h b/include/sys/sysdc.h new file mode 100644 index 000000000..b1000013f --- /dev/null +++ b/include/sys/sysdc.h @@ -0,0 +1,28 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_SYSDC_H +#define _SPL_SYSDC_H + +#endif /* SPL_SYSDC_H */ From bb1bb2c4c49659b47d65beb8ac24dc2c86989553 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jun 2010 15:02:24 -0700 Subject: [PATCH 0390/1062] Add xuio_* structures and typedefs. Add the basic xuio structure and typedefs for Solaris style zero copy. There's a decent chance this will not be the way I handle this on Linux but providing the basic types simplifies things for now. --- include/sys/uio.h | 60 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/include/sys/uio.h b/include/sys/uio.h index 83e9cc62a..87da72701 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -29,6 +29,8 @@ #include #include +typedef struct iovec iovec_t; + typedef enum uio_rw { UIO_READ = 0, UIO_WRITE = 1, @@ -37,23 +39,61 @@ typedef enum uio_rw { typedef enum uio_seg { UIO_USERSPACE = 0, UIO_SYSSPACE = 1, - UIO_USERISPACE =2, + UIO_USERISPACE= 2, } uio_seg_t; typedef struct uio { - struct iovec *uio_iov; /* pointer to array of iovecs */ - int uio_iovcnt; /* number of iovecs */ - offset_t uio_loffset; /* file offset */ - uio_seg_t uio_segflg; /* address space (kernel or user) */ - uint16_t uio_fmode; /* file mode flags */ - uint16_t uio_extflg; /* extended flags */ - offset_t uio_limit; /* u-limit (maximum byte offset) */ - ssize_t uio_resid; /* residual count */ + struct iovec *uio_iov; + int uio_iovcnt; + offset_t uio_loffset; + uio_seg_t uio_segflg; + uint16_t uio_fmode; + uint16_t uio_extflg; + offset_t uio_limit; + ssize_t uio_resid; } uio_t; typedef struct aio_req { - uio_t *aio_uio; /* UIO for this request */ + uio_t *aio_uio; void *aio_private; } aio_req_t; +typedef enum xuio_type { + UIOTYPE_ASYNCIO, + UIOTYPE_ZEROCOPY, +} xuio_type_t; + + +#define UIOA_IOV_MAX 16 + +typedef struct uioa_page_s { + int uioa_pfncnt; + void **uioa_ppp; + caddr_t uioa_base; + size_t uioa_len; +} uioa_page_t; + +typedef struct xuio { + uio_t xu_uio; + enum xuio_type xu_type; + union { + struct { + uint32_t xu_a_state; + ssize_t xu_a_mbytes; + uioa_page_t *xu_a_lcur; + void **xu_a_lppp; + void *xu_a_hwst[4]; + uioa_page_t xu_a_locked[UIOA_IOV_MAX]; + } xu_aio; + + struct { + int xu_zc_rw; + void *xu_zc_priv; + } xu_zc; + } xu_ext; +} xuio_t; + +#define XUIO_XUZC_PRIV(xuio) xuio->xu_ext.xu_zc.xu_zc_priv +#define XUIO_XUZC_RW(xuio) xuio->xu_ext.xu_zc.xu_zc_rw + #endif /* SPL_UIO_H */ From b868e22f05fd85be16afee800207f72b8e310d32 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jun 2010 14:48:18 -0700 Subject: [PATCH 0391/1062] Add kmem_asprintf(), strfree(), strdup(), and minor cleanup. This patch adds three missing Solaris functions: kmem_asprintf(), strfree(), and strdup(). They are all implemented as a thin layer which just calls their Linux counterparts. As part of this an autoconf check for kvasprintf was added because it does not appear in older kernels. If the kernel does not provide it then spl-generic implements it. Additionally the dead DEBUG_KMEM_UNIMPLEMENTED code was removed to clean things up and make the kmem.h a little more readable. --- config/spl-build.m4 | 14 ++++++++ configure | 82 +++++++++++++++++++++++++++++++++++++++++++ include/sys/kmem.h | 55 +++-------------------------- module/spl/spl-kmem.c | 46 ++++++++++++++++++++++++ spl_config.h.in | 3 ++ 5 files changed, 149 insertions(+), 51 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index a0fdb3e82..6f312e25a 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -75,6 +75,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_GROUPS_SEARCH SPL_AC_PUT_TASK_STRUCT SPL_AC_5ARGS_PROC_HANDLER + SPL_AC_KVASPRINTF ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1399,3 +1400,16 @@ AC_DEFUN([SPL_AC_5ARGS_PROC_HANDLER], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.x API change, +dnl # kvasprintf() function added. +dnl # +AC_DEFUN([SPL_AC_KVASPRINTF], [ + SPL_CHECK_SYMBOL_EXPORT( + [kvasprintf], + [], + [AC_DEFINE(HAVE_KVASPRINTF, 1, + [kvasprintf() is available])], + []) +]) diff --git a/configure b/configure index cbdca7759..cd227c18a 100755 --- a/configure +++ b/configure @@ -14826,6 +14826,47 @@ fi + + { $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5 +$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } + grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KVASPRINTF 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KVASPRINTF 1 +_ACEOF + + fi + + ;; user) ;; all) @@ -18180,6 +18221,47 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5 +$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } + grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KVASPRINTF 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KVASPRINTF 1 +_ACEOF + + fi + + + ;; srpm) ;; *) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 2dd73a8e5..b6da6d0ac 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -25,8 +25,6 @@ #ifndef _SPL_KMEM_H #define _SPL_KMEM_H -#undef DEBUG_KMEM_UNIMPLEMENTED - #include #include #include @@ -218,14 +216,6 @@ extern void vmem_free_debug(void *ptr, size_t size); #endif /* DEBUG_KMEM */ -#ifdef DEBUG_KMEM_UNIMPLEMENTED -static __inline__ void * -kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags) -{ -#error "kmem_alloc_tryhard() not implemented" -} -#endif /* DEBUG_KMEM_UNIMPLEMENTED */ - /* * Slab allocation interfaces */ @@ -256,47 +246,10 @@ enum { #define KMC_REAP_CHUNK INT_MAX #define KMC_DEFAULT_SEEKS 1 -#ifdef DEBUG_KMEM_UNIMPLEMENTED -static __inline__ void kmem_init(void) { -#error "kmem_init() not implemented" -} - -static __inline__ void kmem_thread_init(void) { -#error "kmem_thread_init() not implemented" -} - -static __inline__ void kmem_mp_init(void) { -#error "kmem_mp_init() not implemented" -} - -static __inline__ void kmem_reap_idspace(void) { -#error "kmem_reap_idspace() not implemented" -} - -static __inline__ size_t kmem_avail(void) { -#error "kmem_avail() not implemented" -} - -static __inline__ size_t kmem_maxavail(void) { -#error "kmem_maxavail() not implemented" -} - -static __inline__ uint64_t kmem_cache_stat(spl_kmem_cache_t *cache) { -#error "kmem_cache_stat() not implemented" -} -#endif /* DEBUG_KMEM_UNIMPLEMENTED */ - -/* XXX - Used by arc.c to adjust its memory footprint. We may want - * to use this hook in the future to adjust behavior based on - * debug levels. For now it's safe to always return 0. - */ -static __inline__ int -kmem_debugging(void) -{ - return 0; -} - -extern int kmem_set_warning(int flag); +extern int kmem_debugging(void); +extern char *kmem_asprintf(const char *fmt, ...); +#define strfree(str) kfree(str) +#define strdup(str) kstrdup(str, GFP_KERNEL) extern struct list_head spl_kmem_cache_list; extern struct rw_semaphore spl_kmem_cache_sem; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 5a421d40e..117959546 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -208,6 +208,52 @@ vmem_size(vmem_t *vmp, int typemask) } EXPORT_SYMBOL(vmem_size); +int +kmem_debugging(void) +{ + return 0; +} +EXPORT_SYMBOL(kmem_debugging); + +#ifndef HAVE_KVASPRINTF +/* Simplified asprintf. */ +char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap) +{ + unsigned int len; + char *p; + va_list aq; + + va_copy(aq, ap); + len = vsnprintf(NULL, 0, fmt, aq); + va_end(aq); + + p = kmalloc(len+1, gfp); + if (!p) + return NULL; + + vsnprintf(p, len+1, fmt, ap); + + return p; +} +EXPORT_SYMBOL(kvasprintf); +#endif /* HAVE_KVASPRINTF */ + +char * +kmem_asprintf(const char *fmt, ...) +{ + va_list args; + char *ptr; + + va_start(args, fmt); + do { + ptr = kvasprintf(GFP_KERNEL, fmt, args); + } while (ptr == NULL); + va_end(args); + + return ptr; +} +EXPORT_SYMBOL(kmem_asprintf); + /* * Memory allocation interfaces and debugging for basic kmem_* * and vmem_* style memory allocation. When DEBUG_KMEM is enabled diff --git a/spl_config.h.in b/spl_config.h.in index ac608d44f..fdef876b3 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -102,6 +102,9 @@ /* kmalloc_node() is available */ #undef HAVE_KMALLOC_NODE +/* kvasprintf() is available */ +#undef HAVE_KVASPRINTF + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H From 32c6147dee702e6033a9f3b4999a0b9025a88260 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jun 2010 14:57:49 -0700 Subject: [PATCH 0392/1062] Minor cleanup and Solaris API additions. Minor formatting cleanups. API additions: * {U}INT8_{MIN,MAX}, {U}INT16_{MIN,MAX} macros. * id_t typedef * ddi_get_lbolt(), ddi_get_lbolt64() functions. --- include/sys/sid.h | 3 -- include/sys/sysmacros.h | 62 ++++++++++++++++++++++++----------------- include/sys/timer.h | 3 ++ include/sys/types.h | 1 + 4 files changed, 41 insertions(+), 28 deletions(-) diff --git a/include/sys/sid.h b/include/sys/sid.h index 9d4c7192b..ac32d7bf7 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -26,10 +26,7 @@ #define _SPL_SID_H typedef struct ksiddomain { - uint_t kd_ref; - uint_t kd_len; char *kd_name; - avl_node_t kd_link; } ksiddomain_t; static inline ksiddomain_t * diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 4475431e7..eccfee34d 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -32,27 +32,38 @@ #include #ifndef _KERNEL -#define _KERNEL __KERNEL__ +#define _KERNEL __KERNEL__ #endif #define FALSE 0 #define TRUE 1 -#define INT32_MAX INT_MAX -#define INT32_MIN INT_MIN +#define INT8_MAX (127) +#define INT8_MIN (-128) +#define UINT8_MAX (255) +#define UINT8_MIN (0) + +#define INT16_MAX (32767) +#define INT16_MIN (-32768) +#define UINT16_MAX (65535) +#define UINT16_MIN (0) + +#define INT32_MAX INT_MAX +#define INT32_MIN INT_MIN #define UINT32_MAX UINT_MAX #define UINT32_MIN UINT_MIN + #define INT64_MAX LLONG_MAX #define INT64_MIN LLONG_MIN -#define UINT64_MAX ULLONG_MAX +#define UINT64_MAX ULLONG_MAX #define UINT64_MIN ULLONG_MIN -#define NBBY 8 -#define ENOTSUP ENOTSUPP +#define NBBY 8 +#define ENOTSUP ENOTSUPP #define MAXMSGLEN 256 -#define MAXNAMELEN 256 -#define MAXPATHLEN PATH_MAX +#define MAXNAMELEN 256 +#define MAXPATHLEN PATH_MAX #ifdef _LP64 #define MAXOFFSET_T 0x7fffffffffffffffl @@ -80,26 +91,26 @@ * * Treat shim tasks as SCHED_NORMAL tasks */ -#define minclsyspri (MAX_RT_PRIO) -#define maxclsyspri (MAX_PRIO-1) +#define minclsyspri (MAX_RT_PRIO) +#define maxclsyspri (MAX_PRIO-1) #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) #define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) /* Missing macros */ -#define PAGESIZE PAGE_SIZE +#define PAGESIZE PAGE_SIZE /* from Solaris sys/byteorder.h */ -#define BSWAP_8(x) ((x) & 0xff) -#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) -#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) -#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) +#define BSWAP_8(x) ((x) & 0xff) +#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) +#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) +#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) /* Map some simple functions. */ -#define bzero(ptr,size) memset(ptr,0,size) -#define bcopy(src,dest,size) memcpy(dest,src,size) +#define bzero(ptr,size) memset(ptr,0,size) +#define bcopy(src,dest,size) memcpy(dest,src,size) #define bcmp(src,dest,size) memcmp((src), (dest), (size_t)(size)) /* Dtrace probes do not exist in the linux kernel */ @@ -161,15 +172,15 @@ extern void spl_cleanup(void); /* * Compatibility macros/typedefs needed for Solaris -> Linux port */ -#define P2ALIGN(x, align) ((x) & -(align)) -#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) -#define P2ROUNDUP(x, align) (-(-(x) & -(align))) -#define P2PHASE(x, align) ((x) & ((align) - 1)) -#define P2NPHASE(x, align) (-(x) & ((align) - 1)) -#define ISP2(x) (((x) & ((x) - 1)) == 0) -#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) +#define P2ALIGN(x, align) ((x) & -(align)) +#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) +#define P2ROUNDUP(x, align) (-(-(x) & -(align))) +#define P2PHASE(x, align) ((x) & ((align) - 1)) +#define P2NPHASE(x, align) (-(x) & ((align) - 1)) +#define ISP2(x) (((x) & ((x) - 1)) == 0) +#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1))==0) #define P2BOUNDARY(off, len, align) \ - (((off) ^ ((off) + (len) - 1)) > (align) - 1) + (((off) ^ ((off) + (len) - 1)) > (align) - 1) /* * Typed version of the P2* macros. These macros should be used to ensure @@ -178,6 +189,7 @@ extern void spl_cleanup(void); * type of the alignment. For example, if (x) is of type uint64_t, * and we want to round it up to a page boundary using "PAGESIZE" as * the alignment, we can do either + * * P2ROUNDUP(x, (uint64_t)PAGESIZE) * or * P2ROUNDUP_TYPED(x, PAGESIZE, uint64_t) diff --git a/include/sys/timer.h b/include/sys/timer.h index 3af57d8f5..ea6043696 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -32,6 +32,9 @@ #define lbolt ((clock_t)jiffies) #define lbolt64 ((int64_t)get_jiffies_64()) +#define ddi_get_lbolt() ((clock_t)jiffies) +#define ddi_get_lbolt64() ((int64_t)get_jiffies_64()) + #define delay(ticks) schedule_timeout((long)(ticks)) #endif /* _SPL_TIMER_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 1bdd00c48..256e7b09e 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -80,6 +80,7 @@ typedef ulong_t pfn_t; typedef ulong_t pgcnt_t; typedef long spgcnt_t; typedef short index_t; +typedef int id_t; extern proc_t p0; From eb12b3782c94113d2d40d2da22265dc4111a672b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jun 2010 14:53:23 -0700 Subject: [PATCH 0393/1062] Support TQ_FRONT flag used by taskq_dispatch() Allow taskq_dispatch() to insert work items at the head of the queue instead of just the tail by passing the TQ_FRONT flag. --- include/sys/taskq.h | 2 ++ module/spl/spl-taskq.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index baa96eaa0..4e51d98dd 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -39,6 +39,7 @@ #define TASKQ_CPR_SAFE 0x00000002 #define TASKQ_DYNAMIC 0x00000004 #define TASKQ_THREADS_CPU_PCT 0x00000008 +#define TASKQ_DC_BATCH 0x00000010 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); @@ -53,6 +54,7 @@ typedef void (task_func_t)(void *); #define TQ_NOQUEUE 0x01000000 #define TQ_NOALLOC 0x02000000 #define TQ_NEW 0x04000000 +#define TQ_FRONT 0x08000000 #define TQ_ACTIVE 0x80000000 typedef struct taskq { diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 805749a14..fba38021f 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -274,7 +274,13 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) GOTO(out, rc = 0); spin_lock(&t->t_lock); - list_add_tail(&t->t_list, &tq->tq_pend_list); + + /* Queue to the head instead of the tail */ + if (flags & TQ_FRONT) + list_add(&t->t_list, &tq->tq_pend_list); + else + list_add_tail(&t->t_list, &tq->tq_pend_list); + t->t_id = rc = tq->tq_next_id; tq->tq_next_id++; t->t_func = func; From def465ad4bfdddaf0e2f776f524fa596defcb4ea Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 14 Jun 2010 14:18:48 -0700 Subject: [PATCH 0394/1062] Include kstat.h from kmem.h It turns out Solaris incidentally includes kstat.h from kmem.h. As a side effect of this certain higher level .c files which should explicitly include kstat.h don't because they happen to get it via kmem.h. To make like easier for everyone I do the same. --- include/sys/kmem.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index b6da6d0ac..a5ee4e0df 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -37,6 +37,7 @@ #include #include #include +#include /* * Memory allocation interfaces From 8ffef449efa88c7d22d3235fe98ae30c1cdc4ef3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 14 Jun 2010 14:20:31 -0700 Subject: [PATCH 0395/1062] Add missing header util/sscanf.h --- include/util/sscanf.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/util/sscanf.h diff --git a/include/util/sscanf.h b/include/util/sscanf.h new file mode 100644 index 000000000..4ea907148 --- /dev/null +++ b/include/util/sscanf.h @@ -0,0 +1,28 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_UTIL_SSCANF_H +#define _SPL_UTIL_SSCANF_H + +#endif /* SPL_UTIL_SSCAN_H */ From 3cb77549d1bbfd246e6321d8fe34dce480f31eda Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 16 Jun 2010 15:57:04 -0700 Subject: [PATCH 0396/1062] Update warnings in kmem debug code This fix was long overdue. Most of the ground work was laid long ago to include the exact function and line number in the error message which there was an issue with a memory allocation call. However, probably due to lack of time at the moment that informatin never made it in to the error message. This patch fixes that and trys to standardize the kmem debug messages as well. --- module/spl/spl-kmem.c | 85 +++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 117959546..4620eb9bf 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -431,14 +431,17 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, flags & ~__GFP_ZERO); if (dptr == NULL) { - CWARN("kmem_alloc(%ld, 0x%x) debug failed\n", - sizeof(kmem_debug_t), flags); + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "debug " + "kmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", + sizeof(kmem_debug_t), flags, func, line, + kmem_alloc_used_read(), kmem_alloc_max); } else { /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ if (unlikely((size > PAGE_SIZE*2) && !(flags & KM_NODEBUG))) { - CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", - (unsigned long long) size, flags, + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "large " + "kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); spl_debug_dumpstack(NULL); } @@ -449,9 +452,9 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); - CWARN("kstrdup() failed in kmem_alloc(%llu, 0x%x) " - "(%lld/%llu)\n", (unsigned long long) size, flags, - kmem_alloc_used_read(), kmem_alloc_max); + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + "debug kstrdup() at %s:%d failed (%lld/%llu)\n", + func, line, kmem_alloc_used_read(), kmem_alloc_max); goto out; } @@ -468,8 +471,9 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, if (unlikely(ptr == NULL)) { kfree(dptr->kd_func); kfree(dptr); - CWARN("kmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", - (unsigned long long) size, flags, + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "kmem_alloc" + "(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); goto out; } @@ -491,10 +495,10 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, list_add_tail(&dptr->kd_list, &kmem_list); spin_unlock_irqrestore(&kmem_lock, irq_flags); - CDEBUG_LIMIT(D_INFO, "kmem_alloc(%llu, 0x%x) = %p " - "(%lld/%llu)\n", (unsigned long long) size, flags, - ptr, kmem_alloc_used_read(), - kmem_alloc_max); + CDEBUG_LIMIT(D_INFO, + "kmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, ptr, + kmem_alloc_used_read(), kmem_alloc_max); } out: RETURN(ptr); @@ -549,8 +553,10 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); if (dptr == NULL) { - CWARN("vmem_alloc(%ld, 0x%x) debug failed\n", - sizeof(kmem_debug_t), flags); + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "debug " + "vmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", + sizeof(kmem_debug_t), flags, func, line, + vmem_alloc_used_read(), vmem_alloc_max); } else { /* We use kstrdup() below because the string pointed to by * __FUNCTION__ might not be available by the time we want @@ -558,9 +564,9 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); - CWARN("kstrdup() failed in vmem_alloc(%llu, 0x%x) " - "(%lld/%llu)\n", (unsigned long long) size, flags, - vmem_alloc_used_read(), vmem_alloc_max); + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + "debug kstrdup() at %s:%d failed (%lld/%llu)\n", + func, line, vmem_alloc_used_read(), vmem_alloc_max); goto out; } @@ -570,8 +576,9 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) if (unlikely(ptr == NULL)) { kfree(dptr->kd_func); kfree(dptr); - CWARN("vmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", - (unsigned long long) size, flags, + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "vmem_alloc" + "(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); goto out; } @@ -596,10 +603,10 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) list_add_tail(&dptr->kd_list, &vmem_list); spin_unlock_irqrestore(&vmem_lock, irq_flags); - CDEBUG_LIMIT(D_INFO, "vmem_alloc(%llu, 0x%x) = %p " - "(%lld/%llu)\n", (unsigned long long) size, flags, - ptr, vmem_alloc_used_read(), - vmem_alloc_max); + CDEBUG_LIMIT(D_INFO, + "vmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, + ptr, vmem_alloc_used_read(), vmem_alloc_max); } out: RETURN(ptr); @@ -652,8 +659,9 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ if (unlikely((size > PAGE_SIZE * 2) && !(flags & KM_NODEBUG))) { - CWARN("Large kmem_alloc(%llu, 0x%x) (%lld/%llu)\n", - (unsigned long long) size, flags, + CDEBUG(D_CONSOLE | D_WARNING, + "Large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); spl_debug_dumpstack(NULL); } @@ -669,16 +677,18 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, } if (ptr == NULL) { - CWARN("kmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", - (unsigned long long) size, flags, + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + "kmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); } else { kmem_alloc_used_add(size); if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) kmem_alloc_max = kmem_alloc_used_read(); - CDEBUG_LIMIT(D_INFO, "kmem_alloc(%llu, 0x%x) = %p " - "(%lld/%llu)\n", (unsigned long long) size, flags, ptr, + CDEBUG_LIMIT(D_INFO, + "kmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, ptr, kmem_alloc_used_read(), kmem_alloc_max); } RETURN(ptr); @@ -716,8 +726,9 @@ vmem_alloc_debug(size_t size, int flags, const char *func, int line) ptr = __vmalloc(size, (flags | __GFP_HIGHMEM) & ~__GFP_ZERO, PAGE_KERNEL); if (ptr == NULL) { - CWARN("vmem_alloc(%llu, 0x%x) failed (%lld/%llu)\n", - (unsigned long long) size, flags, + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + "vmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); } else { if (flags & __GFP_ZERO) @@ -2036,13 +2047,15 @@ spl_kmem_fini(void) * at that address to aid in debugging. Performance is not * a serious concern here since it is module unload time. */ if (kmem_alloc_used_read() != 0) - CWARN("kmem leaked %ld/%ld bytes\n", - kmem_alloc_used_read(), kmem_alloc_max); + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + "kmem leaked %ld/%ld bytes\n", + kmem_alloc_used_read(), kmem_alloc_max); if (vmem_alloc_used_read() != 0) - CWARN("vmem leaked %ld/%ld bytes\n", - vmem_alloc_used_read(), vmem_alloc_max); + CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + "vmem leaked %ld/%ld bytes\n", + vmem_alloc_used_read(), vmem_alloc_max); spl_kmem_fini_tracking(&kmem_list, &kmem_lock); spl_kmem_fini_tracking(&vmem_list, &vmem_lock); From 438683c0a9c9a045106f27aca85dc1855d926497 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 21 Jun 2010 10:19:44 -0700 Subject: [PATCH 0397/1062] Revert "Support TQ_FRONT flag used by taskq_dispatch()" This reverts commit eb12b3782c94113d2d40d2da22265dc4111a672b. --- include/sys/taskq.h | 2 -- module/spl/spl-taskq.c | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 4e51d98dd..baa96eaa0 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -39,7 +39,6 @@ #define TASKQ_CPR_SAFE 0x00000002 #define TASKQ_DYNAMIC 0x00000004 #define TASKQ_THREADS_CPU_PCT 0x00000008 -#define TASKQ_DC_BATCH 0x00000010 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); @@ -54,7 +53,6 @@ typedef void (task_func_t)(void *); #define TQ_NOQUEUE 0x01000000 #define TQ_NOALLOC 0x02000000 #define TQ_NEW 0x04000000 -#define TQ_FRONT 0x08000000 #define TQ_ACTIVE 0x80000000 typedef struct taskq { diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index fba38021f..805749a14 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -274,13 +274,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) GOTO(out, rc = 0); spin_lock(&t->t_lock); - - /* Queue to the head instead of the tail */ - if (flags & TQ_FRONT) - list_add(&t->t_list, &tq->tq_pend_list); - else - list_add_tail(&t->t_list, &tq->tq_pend_list); - + list_add_tail(&t->t_list, &tq->tq_pend_list); t->t_id = rc = tq->tq_next_id; tq->tq_next_id++; t->t_func = func; From e6de04b73cfaa1b17eee531d472cbbd37c247502 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 24 Jun 2010 09:41:59 -0700 Subject: [PATCH 0398/1062] Add kmem_vasprintf function We might as well have both asprintf() variants. This allows us to safely pass a va_list through several levels of the stack using va_copy() instead of va_start(). --- include/sys/kmem.h | 1 + module/spl/spl-kmem.c | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index a5ee4e0df..9688b116d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -248,6 +248,7 @@ enum { #define KMC_DEFAULT_SEEKS 1 extern int kmem_debugging(void); +extern char *kmem_vasprintf(const char *fmt, va_list ap); extern char *kmem_asprintf(const char *fmt, ...); #define strfree(str) kfree(str) #define strdup(str) kstrdup(str, GFP_KERNEL) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 4620eb9bf..a348021d8 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -239,16 +239,32 @@ EXPORT_SYMBOL(kvasprintf); #endif /* HAVE_KVASPRINTF */ char * -kmem_asprintf(const char *fmt, ...) +kmem_vasprintf(const char *fmt, va_list ap) { - va_list args; + va_list aq; char *ptr; - va_start(args, fmt); + va_copy(aq, ap); do { - ptr = kvasprintf(GFP_KERNEL, fmt, args); + ptr = kvasprintf(GFP_KERNEL, fmt, aq); } while (ptr == NULL); - va_end(args); + va_end(aq); + + return ptr; +} +EXPORT_SYMBOL(kmem_vasprintf); + +char * +kmem_asprintf(const char *fmt, ...) +{ + va_list ap; + char *ptr; + + va_start(ap, fmt); + do { + ptr = kvasprintf(GFP_KERNEL, fmt, ap); + } while (ptr == NULL); + va_end(ap); return ptr; } From 5be4767ae1cc1b864faad47eda7009193a60759e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 28 Jun 2010 11:39:43 -0700 Subject: [PATCH 0399/1062] Accept but ignore TASKQ_DC_BATCH and TQ_FRONT For the moment the SPL accepts the TASKQ_DC_BATCH and TQ_FRONT flags however they get silently ignored. This is harmless for the moment but it does need to be implemented at some point. --- include/sys/taskq.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index baa96eaa0..4e51d98dd 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -39,6 +39,7 @@ #define TASKQ_CPR_SAFE 0x00000002 #define TASKQ_DYNAMIC 0x00000004 #define TASKQ_THREADS_CPU_PCT 0x00000008 +#define TASKQ_DC_BATCH 0x00000010 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); @@ -53,6 +54,7 @@ typedef void (task_func_t)(void *); #define TQ_NOQUEUE 0x01000000 #define TQ_NOALLOC 0x02000000 #define TQ_NEW 0x04000000 +#define TQ_FRONT 0x08000000 #define TQ_ACTIVE 0x80000000 typedef struct taskq { From 616df2dd8bf76e6eb73b546d75e4c4291e104ecf Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 28 Jun 2010 12:34:20 -0700 Subject: [PATCH 0400/1062] Fix subtle race in threads test case The call to wake_up() must be moved under the spin lock because once we drop the lock 'tp' may no longer be valid because the creating thread has exited. This basic thread implementation was correct, this was simply a flaw in the test case. --- module/splat/splat-thread.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index d21ded795..34810bfff 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -67,9 +67,9 @@ splat_thread_work1(void *priv) spin_lock(&tp->tp_lock); ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); tp->tp_rc = 1; + wake_up(&tp->tp_waitq); spin_unlock(&tp->tp_lock); - wake_up(&tp->tp_waitq); thread_exit(); } @@ -108,18 +108,17 @@ splat_thread_work2(void *priv) spin_lock(&tp->tp_lock); ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); tp->tp_rc = 1; + wake_up(&tp->tp_waitq); spin_unlock(&tp->tp_lock); - wake_up(&tp->tp_waitq); thread_exit(); /* The following code is unreachable when thread_exit() is * working properly, which is exactly what we're testing */ spin_lock(&tp->tp_lock); tp->tp_rc = 2; - spin_unlock(&tp->tp_lock); - wake_up(&tp->tp_waitq); + spin_unlock(&tp->tp_lock); } static int From ede0bdffb6d36915ad610b0bdf7d790f858f448c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 28 Jun 2010 12:48:20 -0700 Subject: [PATCH 0401/1062] Treat mutex->owner as volatile When HAVE_MUTEX_OWNER is defined and we are directly accessing mutex->owner treat is as volative with the ACCESS_ONCE() helper. Without this you may get a stale cached value when accessing it from different cpus. This can result in incorrect behavior from mutex_owned() and mutex_owner(). This is not a problem for the !HAVE_MUTEX_OWNER case because in this case all the accesses are covered by a spin lock which similarly gaurentees we will not be accessing stale data. Secondly, check CONFIG_SMP before allowing access to mutex->owner. I see that for non-SMP setups the kernel does not track the owner so we cannot rely on it. Thirdly, check CONFIG_MUTEX_DEBUG when this is defined and the HAVE_MUTEX_OWNER is defined surprisingly the mutex->owner will not be cleared on mutex_exit(). When this is the case the SPL needs to make sure to do it to ensure MUTEX_HELD() behaves as expected or you will certainly assert in mutex_destroy(). Finally, improve the mutex regression tests. For mutex_owned() we now minimally check that it behaves correctly when checked from the owner thread or the non-owner thread. This subtle behaviour has bit me before and I'd like to catch it early next time if it reappears. As for mutex_owned() regression test additonally verify that mutex->owner is always cleared on mutex_exit(). --- include/sys/mutex.h | 38 ++++++++++---- module/splat/splat-mutex.c | 100 ++++++++++++++++++++++++++++++++----- 2 files changed, 116 insertions(+), 22 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index b36c7e256..d33694766 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -34,20 +34,29 @@ typedef enum { MUTEX_ADAPTIVE = 2 } kmutex_type_t; -#ifdef HAVE_MUTEX_OWNER +#if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) typedef struct mutex kmutex_t; static inline kthread_t * mutex_owner(kmutex_t *mp) { - if (mp->owner) - return (mp->owner)->task; + struct thread_info *owner; + + owner = ACCESS_ONCE(mp->owner); + if (owner) + return owner->task; return NULL; } -#define mutex_owned(mp) (mutex_owner(mp) == current) -#define MUTEX_HELD(mp) mutex_owned(mp) + +static inline int +mutex_owned(kmutex_t *mp) +{ + return (ACCESS_ONCE(mp->owner) == current_thread_info()); +} + +#define MUTEX_HELD(mp) mutex_owned(mp) #undef mutex_init #define mutex_init(mp, name, type, ibc) \ ({ \ @@ -60,13 +69,22 @@ mutex_owner(kmutex_t *mp) #undef mutex_destroy #define mutex_destroy(mp) \ ({ \ - VERIFY(!MUTEX_HELD(mp)); \ + VERIFY3P(mutex_owner(mp), ==, NULL); \ }) -#define mutex_tryenter(mp) mutex_trylock(mp) -#define mutex_enter(mp) mutex_lock(mp) -#define mutex_exit(mp) mutex_unlock(mp) +#define mutex_tryenter(mp) mutex_trylock(mp) +#define mutex_enter(mp) mutex_lock(mp) +/* mutex->owner is not cleared when CONFIG_DEBUG_MUTEXES is set */ +#ifdef CONFIG_DEBUG_MUTEXES +# define mutex_exit(mp) \ +({ \ + (mp)->owner = NULL; \ + mutex_unlock(mp); \ +}) +#else +# define mutex_exit(mp) mutex_unlock(mp) +#endif /* CONFIG_DEBUG_MUTEXES */ #ifdef HAVE_GPL_ONLY_SYMBOLS # define mutex_enter_nested(mp, sc) mutex_lock_nested(mp, sc) @@ -151,7 +169,7 @@ mutex_owner(kmutex_t *mp) #undef mutex_destroy #define mutex_destroy(mp) \ ({ \ - VERIFY(!MUTEX_HELD(mp)); \ + VERIFY3P(mutex_owner(mp), ==, NULL); \ }) #define mutex_tryenter(mp) \ diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 96ed27297..d134e49ce 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -55,6 +55,7 @@ typedef struct mutex_priv { struct file *mp_file; kmutex_t mp_mtx; int mp_rc; + int mp_rc2; } mutex_priv_t; static void @@ -240,37 +241,96 @@ out: return rc; } +static void +splat_mutex_owned(void *priv) +{ + mutex_priv_t *mp = (mutex_priv_t *)priv; + + ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); + mp->mp_rc = mutex_owned(&mp->mp_mtx); + mp->mp_rc2 = MUTEX_HELD(&mp->mp_mtx); +} + static int splat_mutex_test3(struct file *file, void *arg) { - kmutex_t mtx; + mutex_priv_t mp; + taskq_t *tq; int rc = 0; - mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mutex_enter(&mtx); + mp.mp_magic = SPLAT_MUTEX_TEST_MAGIC; + mp.mp_file = file; + mutex_init(&mp.mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + + if ((tq = taskq_create(SPLAT_MUTEX_TEST_NAME, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Taskq '%s' " + "create failed\n", SPLAT_MUTEX_TEST3_NAME); + return -EINVAL; + } + + mutex_enter(&mp.mp_mtx); /* Mutex should be owned by current */ - if (!mutex_owned(&mtx)) { + if (!mutex_owned(&mp.mp_mtx)) { splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Unowned mutex " - "should be owned by pid %d\n", current->pid); + "should be owned by pid %d\n", current->pid); + rc = -EINVAL; + goto out_exit; + } + + if (taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP) == 0) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Failed to " + "dispatch function '%s' to taskq\n", + sym2str(splat_mutex_owned)); + rc = -EINVAL; + goto out_exit; + } + taskq_wait(tq); + + /* Mutex should not be owned which checked from a different thread */ + if (mp.mp_rc || mp.mp_rc2) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex owned by " + "pid %d not by taskq\n", current->pid); + rc = -EINVAL; + goto out_exit; + } + + mutex_exit(&mp.mp_mtx); + + /* Mutex should not be owned by current */ + if (mutex_owned(&mp.mp_mtx)) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex owned by " + "pid %d it should be unowned\b", current->pid); rc = -EINVAL; goto out; } - mutex_exit(&mtx); + if (taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP) == 0) { + splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Failed to " + "dispatch function '%s' to taskq\n", + sym2str(splat_mutex_owned)); + rc = -EINVAL; + goto out; + } + taskq_wait(tq); - /* Mutex should not be owned by any task */ - if (mutex_owned(&mtx)) { + /* Mutex should be owned by no one */ + if (mp.mp_rc || mp.mp_rc2) { splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex owned by " - "pid %d should be unowned\b", current->pid); + "no one, %d/%d disagrees\n", mp.mp_rc, mp.mp_rc2); rc = -EINVAL; goto out; } splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "%s", "Correct mutex_owned() behavior\n"); + goto out; +out_exit: + mutex_exit(&mp.mp_mtx); out: - mutex_destroy(&mtx); + mutex_destroy(&mp.mp_mtx); + taskq_destroy(tq); return rc; } @@ -283,12 +343,28 @@ splat_mutex_test4(struct file *file, void *arg) int rc = 0; mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); + + /* + * Verify mutex owner is cleared after being dropped. Depending + * on how you build your kernel this behavior changes, ensure the + * SPL mutex implementation is properly detecting this. + */ + mutex_enter(&mtx); + msleep(100); + mutex_exit(&mtx); + if (MUTEX_HELD(&mtx)) { + splat_vprint(file, SPLAT_MUTEX_TEST4_NAME, "Mutex should " + "not be held, bit is by %p\n", mutex_owner(&mtx)); + rc = -EINVAL; + goto out; + } + mutex_enter(&mtx); /* Mutex should be owned by current */ owner = mutex_owner(&mtx); if (current != owner) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should " + splat_vprint(file, SPLAT_MUTEX_TEST4_NAME, "Mutex should " "be owned by pid %d but is owned by pid %d\n", current->pid, owner ? owner->pid : -1); rc = -EINVAL; @@ -300,7 +376,7 @@ splat_mutex_test4(struct file *file, void *arg) /* Mutex should not be owned by any task */ owner = mutex_owner(&mtx); if (owner) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex should not " + splat_vprint(file, SPLAT_MUTEX_TEST4_NAME, "Mutex should not " "be owned but is owned by pid %d\n", owner->pid); rc = -EINVAL; goto out; From 1e48754059046c01ac8e35c8686e2d1940d984f9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 29 Jun 2010 14:13:07 -0700 Subject: [PATCH 0402/1062] Add basic README A simple README with a short summary of the project and a link directing people to the online documentation. --- README.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 README.markdown diff --git a/README.markdown b/README.markdown new file mode 100644 index 000000000..6189ad625 --- /dev/null +++ b/README.markdown @@ -0,0 +1,10 @@ +The Solaris Porting Layer (SPL) is a Linux kernel module which provides +many of the Solaris kernel APIs. This shim layer makes it possible to +run Solaris kernel code in the Linux kernel with relatively minimal +modification. This can be particularly useful when you want to track +upstream Solaris development closely and don’t want the overhead of +maintaining a large patch which converts Solaris primitives to Linux +primitives. + +Documentation for building, configuring, and using the SPL can be +found at: From fd921c2e0c36c0c658031bc8bf4a3f912a3349f7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 30 Jun 2010 09:47:57 -0700 Subject: [PATCH 0403/1062] Linux-2.6.33 compat, check for UTS_RELEASE It seems the upstream community moved the definition of UTS_RELEASE yet again as of linux-2.6.33. Update the build system to check in all three possible locations where your kernel version may be defined. $kernelbuild/include/linux/version.h $kernelbuild/include/linux/utsrelease.h $kernelbuild/include/generated/utsrelease.h --- config/spl-build.m4 | 40 ++++++++++--------- configure | 94 ++++++++++++++++++++++++--------------------- 2 files changed, 71 insertions(+), 63 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 6f312e25a..c6f47b68f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -146,28 +146,30 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([$kernelbuild]) AC_MSG_CHECKING([kernel source version]) - if test -r $kernelbuild/include/linux/version.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - - elif test -r $kernelbuild/include/linux/utsrelease.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` + utsrelease1=$kernelbuild/include/linux/version.h + utsrelease2=$kernelbuild/include/linux/utsrelease.h + utsrelease3=$kernelbuild/include/generated/utsrelease.h + if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then + utsrelease=linux/version.h + elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then + utsrelease=linux/utsrelease.h + elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then + utsrelease=generated/utsrelease.h fi - if test -z "$kernsrcver"; then + if test "$utsrelease"; then + kernsrcver=`(echo "#include <$utsrelease>"; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + if test -z "$kernsrcver"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([*** Cannot determine kernel version.]) + fi + else AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([ - *** Cannot determine the version of the linux kernel source. - *** Please prepare the kernel before running this script]) + AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) fi AC_MSG_RESULT([$kernsrcver]) diff --git a/configure b/configure index cd227c18a..47611aeec 100755 --- a/configure +++ b/configure @@ -11542,32 +11542,35 @@ $as_echo "$kernelbuild" >&6; } { $as_echo "$as_me:$LINENO: checking kernel source version" >&5 $as_echo_n "checking kernel source version... " >&6; } - if test -r $kernelbuild/include/linux/version.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - - elif test -r $kernelbuild/include/linux/utsrelease.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` + utsrelease1=$kernelbuild/include/linux/version.h + utsrelease2=$kernelbuild/include/linux/utsrelease.h + utsrelease3=$kernelbuild/include/generated/utsrelease.h + if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then + utsrelease=linux/version.h + elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then + utsrelease=linux/utsrelease.h + elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then + utsrelease=generated/utsrelease.h fi - if test -z "$kernsrcver"; then + if test "$utsrelease"; then + kernsrcver=`(echo "#include <$utsrelease>"; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + if test -z "$kernsrcver"; then + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 +$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} + { (exit 1); exit 1; }; } + fi + else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Cannot determine the version of the linux kernel source. - *** Please prepare the kernel before running this script" >&5 -$as_echo "$as_me: error: - *** Cannot determine the version of the linux kernel source. - *** Please prepare the kernel before running this script" >&2;} + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 +$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} { (exit 1); exit 1; }; } fi @@ -14936,32 +14939,35 @@ $as_echo "$kernelbuild" >&6; } { $as_echo "$as_me:$LINENO: checking kernel source version" >&5 $as_echo_n "checking kernel source version... " >&6; } - if test -r $kernelbuild/include/linux/version.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - - elif test -r $kernelbuild/include/linux/utsrelease.h && - fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then - - kernsrcver=`(echo "#include "; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` + utsrelease1=$kernelbuild/include/linux/version.h + utsrelease2=$kernelbuild/include/linux/utsrelease.h + utsrelease3=$kernelbuild/include/generated/utsrelease.h + if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then + utsrelease=linux/version.h + elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then + utsrelease=linux/utsrelease.h + elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then + utsrelease=generated/utsrelease.h fi - if test -z "$kernsrcver"; then + if test "$utsrelease"; then + kernsrcver=`(echo "#include <$utsrelease>"; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + if test -z "$kernsrcver"; then + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 +$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} + { (exit 1); exit 1; }; } + fi + else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Cannot determine the version of the linux kernel source. - *** Please prepare the kernel before running this script" >&5 -$as_echo "$as_me: error: - *** Cannot determine the version of the linux kernel source. - *** Please prepare the kernel before running this script" >&2;} + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 +$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} { (exit 1); exit 1; }; } fi From 79a3bf130b78cae41be339917788dde0b45c7d84 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 30 Jun 2010 10:36:20 -0700 Subject: [PATCH 0404/1062] Linux-2.6.33 compat, .ctl_name removed from struct ctl_table As of linux-2.6.33 the ctl_name member of the ctl_table struct has been entirely removed. The upstream code has been updated to depend entirely on the the procname member. To handle this all references to ctl_name are wrapped in a CTL_NAME macro which simply expands to nothing for newer kernels. Older kernels are supported by having it expand to .ctl_name = X just as before. --- config/spl-build.m4 | 20 ++++++ configure | 132 ++++++++++++++++++++++++++++++++++++ include/linux/proc_compat.h | 6 ++ module/spl/spl-proc.c | 78 ++++++++++----------- spl_config.h.in | 3 + 5 files changed, 201 insertions(+), 38 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c6f47b68f..135783cdc 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -36,6 +36,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED + SPL_AC_CTL_NAME SPL_AC_FLS64 SPL_AC_DEVICE_CREATE SPL_AC_5ARGS_DEVICE_CREATE @@ -641,6 +642,25 @@ AC_DEFUN([SPL_AC_CTL_UNNUMBERED], ]) ]) +dnl # +dnl # 2.6.33 API change, +dnl # Removed .ctl_name from struct ctl_table. +dnl # +AC_DEFUN([SPL_AC_CTL_NAME], [ + AC_MSG_CHECKING([whether struct ctl_table has ctl_name]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct ctl_table ctl; + ctl.ctl_name = 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CTL_NAME, 1, [struct ctl_table has ctl_name]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.16 API change. dnl # Check if 'fls64()' is available diff --git a/configure b/configure index 47611aeec..fe3de76dc 100755 --- a/configure +++ b/configure @@ -12360,6 +12360,72 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 +$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct ctl_table ctl; + ctl.ctl_name = 0; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CTL_NAME 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build @@ -15757,6 +15823,72 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 +$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct ctl_table ctl; + ctl.ctl_name = 0; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CTL_NAME 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index c30f9db8e..97d3c6c5a 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -36,6 +36,12 @@ #define spl_unregister_sysctl_table(t) unregister_sysctl_table(t) #endif /* CONFIG_SYSCTL */ +#ifdef HAVE_CTL_NAME +#define CTL_NAME(cname) .ctl_name = (cname), +#else +#define CTL_NAME(cname) +#endif + extern struct proc_dir_entry *proc_spl_kstat; struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, const char *str); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 277a92a7a..5a71f795c 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -52,6 +52,7 @@ static struct proc_dir_entry *proc_spl_kmem_slab = NULL; #endif /* DEBUG_KMEM */ struct proc_dir_entry *proc_spl_kstat = NULL; +#ifdef HAVE_CTL_NAME #ifdef HAVE_CTL_UNNUMBERED #define CTL_SPL CTL_UNNUMBERED @@ -153,6 +154,7 @@ enum { #endif }; #endif /* HAVE_CTL_UNNUMBERED */ +#endif /* HAVE_CTL_NAME */ static int proc_copyin_string(char *kbuffer, int kbuffer_size, @@ -661,7 +663,7 @@ static struct file_operations proc_slab_operations = { static struct ctl_table spl_debug_table[] = { { - .ctl_name = CTL_DEBUG_SUBSYS, + CTL_NAME (CTL_DEBUG_SUBSYS) .procname = "subsystem", .data = &spl_debug_subsys, .maxlen = sizeof(unsigned long), @@ -669,7 +671,7 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dobitmasks }, { - .ctl_name = CTL_DEBUG_MASK, + CTL_NAME (CTL_DEBUG_MASK) .procname = "mask", .data = &spl_debug_mask, .maxlen = sizeof(unsigned long), @@ -677,7 +679,7 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dobitmasks }, { - .ctl_name = CTL_DEBUG_PRINTK, + CTL_NAME (CTL_DEBUG_PRINTK) .procname = "printk", .data = &spl_debug_printk, .maxlen = sizeof(unsigned long), @@ -685,13 +687,13 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dobitmasks }, { - .ctl_name = CTL_DEBUG_MB, + CTL_NAME (CTL_DEBUG_MB) .procname = "mb", .mode = 0644, .proc_handler = &proc_debug_mb, }, { - .ctl_name = CTL_DEBUG_BINARY, + CTL_NAME (CTL_DEBUG_BINARY) .procname = "binary", .data = &spl_debug_binary, .maxlen = sizeof(int), @@ -699,7 +701,7 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_DEBUG_CATASTROPHE, + CTL_NAME (CTL_DEBUG_CATASTROPHE) .procname = "catastrophe", .data = &spl_debug_catastrophe, .maxlen = sizeof(int), @@ -707,7 +709,7 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_DEBUG_PANIC_ON_BUG, + CTL_NAME (CTL_DEBUG_PANIC_ON_BUG) .procname = "panic_on_bug", .data = &spl_debug_panic_on_bug, .maxlen = sizeof(int), @@ -715,7 +717,7 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec }, { - .ctl_name = CTL_DEBUG_PATH, + CTL_NAME (CTL_DEBUG_PATH) .procname = "path", .data = spl_debug_file_path, .maxlen = sizeof(spl_debug_file_path), @@ -723,18 +725,18 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dostring, }, { - .ctl_name = CTL_DEBUG_DUMP, + CTL_NAME (CTL_DEBUG_DUMP) .procname = "dump", .mode = 0200, .proc_handler = &proc_dump_kernel, }, - { .ctl_name = CTL_DEBUG_FORCE_BUG, + { CTL_NAME (CTL_DEBUG_FORCE_BUG) .procname = "force_bug", .mode = 0200, .proc_handler = &proc_force_bug, }, { - .ctl_name = CTL_CONSOLE_RATELIMIT, + CTL_NAME (CTL_CONSOLE_RATELIMIT) .procname = "console_ratelimit", .data = &spl_console_ratelimit, .maxlen = sizeof(int), @@ -742,28 +744,28 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_CONSOLE_MAX_DELAY_CS, + CTL_NAME (CTL_CONSOLE_MAX_DELAY_CS) .procname = "console_max_delay_centisecs", .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_console_max_delay_cs, }, { - .ctl_name = CTL_CONSOLE_MIN_DELAY_CS, + CTL_NAME (CTL_CONSOLE_MIN_DELAY_CS) .procname = "console_min_delay_centisecs", .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_console_min_delay_cs, }, { - .ctl_name = CTL_CONSOLE_BACKOFF, + CTL_NAME (CTL_CONSOLE_BACKOFF) .procname = "console_backoff", .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_console_backoff, }, { - .ctl_name = CTL_DEBUG_STACK_SIZE, + CTL_NAME (CTL_DEBUG_STACK_SIZE) .procname = "stack_max", .data = &spl_debug_stack, .maxlen = sizeof(int), @@ -775,7 +777,7 @@ static struct ctl_table spl_debug_table[] = { static struct ctl_table spl_vm_table[] = { { - .ctl_name = CTL_VM_MINFREE, + CTL_NAME (CTL_VM_MINFREE) .procname = "minfree", .data = &minfree, .maxlen = sizeof(int), @@ -783,7 +785,7 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_VM_DESFREE, + CTL_NAME (CTL_VM_DESFREE) .procname = "desfree", .data = &desfree, .maxlen = sizeof(int), @@ -791,7 +793,7 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_VM_LOTSFREE, + CTL_NAME (CTL_VM_LOTSFREE) .procname = "lotsfree", .data = &lotsfree, .maxlen = sizeof(int), @@ -799,7 +801,7 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_VM_NEEDFREE, + CTL_NAME (CTL_VM_NEEDFREE) .procname = "needfree", .data = &needfree, .maxlen = sizeof(int), @@ -807,7 +809,7 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_VM_SWAPFS_MINFREE, + CTL_NAME (CTL_VM_SWAPFS_MINFREE) .procname = "swapfs_minfree", .data = &swapfs_minfree, .maxlen = sizeof(int), @@ -815,7 +817,7 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_VM_SWAPFS_RESERVE, + CTL_NAME (CTL_VM_SWAPFS_RESERVE) .procname = "swapfs_reserve", .data = &swapfs_reserve, .maxlen = sizeof(int), @@ -823,13 +825,13 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = CTL_VM_AVAILRMEM, + CTL_NAME (CTL_VM_AVAILRMEM) .procname = "availrmem", .mode = 0444, .proc_handler = &proc_doavailrmem, }, { - .ctl_name = CTL_VM_FREEMEM, + CTL_NAME (CTL_VM_FREEMEM) .procname = "freemem", .data = (void *)2, .maxlen = sizeof(int), @@ -837,7 +839,7 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dofreemem, }, { - .ctl_name = CTL_VM_PHYSMEM, + CTL_NAME (CTL_VM_PHYSMEM) .procname = "physmem", .data = &physmem, .maxlen = sizeof(int), @@ -850,7 +852,7 @@ static struct ctl_table spl_vm_table[] = { #ifdef DEBUG_KMEM static struct ctl_table spl_kmem_table[] = { { - .ctl_name = CTL_KMEM_KMEMUSED, + CTL_NAME (CTL_KMEM_KMEMUSED) .procname = "kmem_used", .data = &kmem_alloc_used, # ifdef HAVE_ATOMIC64_T @@ -862,7 +864,7 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_domemused, }, { - .ctl_name = CTL_KMEM_KMEMMAX, + CTL_NAME (CTL_KMEM_KMEMMAX) .procname = "kmem_max", .data = &kmem_alloc_max, .maxlen = sizeof(unsigned long), @@ -872,7 +874,7 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doulongvec_minmax, }, { - .ctl_name = CTL_KMEM_VMEMUSED, + CTL_NAME (CTL_KMEM_VMEMUSED) .procname = "vmem_used", .data = &vmem_alloc_used, # ifdef HAVE_ATOMIC64_T @@ -884,7 +886,7 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_domemused, }, { - .ctl_name = CTL_KMEM_VMEMMAX, + CTL_NAME (CTL_KMEM_VMEMMAX) .procname = "vmem_max", .data = &vmem_alloc_max, .maxlen = sizeof(unsigned long), @@ -906,7 +908,7 @@ static struct ctl_table spl_table[] = { * sysctl(8) prefers to go via /proc for portability. */ { - .ctl_name = CTL_VERSION, + CTL_NAME (CTL_VERSION) .procname = "version", .data = spl_version, .maxlen = sizeof(spl_version), @@ -914,7 +916,7 @@ static struct ctl_table spl_table[] = { .proc_handler = &proc_dostring, }, { - .ctl_name = CTL_HOSTID, + CTL_NAME (CTL_HOSTID) .procname = "hostid", .data = &spl_hostid, .maxlen = sizeof(unsigned long), @@ -922,7 +924,7 @@ static struct ctl_table spl_table[] = { .proc_handler = &proc_dohostid, }, { - .ctl_name = CTL_HW_SERIAL, + CTL_NAME (CTL_HW_SERIAL) .procname = "hw_serial", .data = hw_serial, .maxlen = sizeof(hw_serial), @@ -931,7 +933,7 @@ static struct ctl_table spl_table[] = { }, #ifndef HAVE_KALLSYMS_LOOKUP_NAME { - .ctl_name = CTL_KALLSYMS, + CTL_NAME (CTL_KALLSYMS) .procname = "kallsyms_lookup_name", .data = &spl_kallsyms_lookup_name_fn, .maxlen = sizeof(unsigned long), @@ -940,27 +942,27 @@ static struct ctl_table spl_table[] = { }, #endif { - .ctl_name = CTL_SPL_DEBUG, + CTL_NAME (CTL_SPL_DEBUG) .procname = "debug", .mode = 0555, .child = spl_debug_table, }, { - .ctl_name = CTL_SPL_VM, + CTL_NAME (CTL_SPL_VM) .procname = "vm", .mode = 0555, .child = spl_vm_table, }, #ifdef DEBUG_KMEM { - .ctl_name = CTL_SPL_KMEM, + CTL_NAME (CTL_SPL_KMEM) .procname = "kmem", .mode = 0555, .child = spl_kmem_table, }, #endif { - .ctl_name = CTL_SPL_KSTAT, + CTL_NAME (CTL_SPL_KSTAT) .procname = "kstat", .mode = 0555, .child = spl_kstat_table, @@ -970,7 +972,7 @@ static struct ctl_table spl_table[] = { static struct ctl_table spl_dir[] = { { - .ctl_name = CTL_SPL, + CTL_NAME (CTL_SPL) .procname = "spl", .mode = 0555, .child = spl_table, @@ -980,7 +982,7 @@ static struct ctl_table spl_dir[] = { static struct ctl_table spl_root[] = { { - .ctl_name = CTL_KERN, + CTL_NAME (CTL_KERN) .procname = "kernel", .mode = 0555, .child = spl_dir, diff --git a/spl_config.h.in b/spl_config.h.in index fdef876b3..a22ca7b8b 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -48,6 +48,9 @@ /* struct cred exists */ #undef HAVE_CRED_STRUCT +/* struct ctl_table has ctl_name */ +#undef HAVE_CTL_NAME + /* unnumbered sysctl support exists */ #undef HAVE_CTL_UNNUMBERED From 6801b7154ccd8df47564d0f888166f3da931f3ff Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 30 Jun 2010 10:47:36 -0700 Subject: [PATCH 0405/1062] Linux-2.6.33 compat, O_DSYNC flag added Prior to linux-2.6.33 only O_DSYNC semantics were implemented and they used the O_SYNC flag. As of linux-2.6.33 this behavior was properly split in to O_SYNC and O_DSYNC respectively. --- include/sys/vnode.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index d3a74a738..09d843366 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -45,7 +45,14 @@ #define XVA_MAPSIZE 3 #define XVA_MAGIC 0x78766174 -#define O_DSYNC 040000000 +/* + * Prior to linux-2.6.33 only O_DSYNC semantics were implemented and + * they used the O_SYNC flag. As of linux-2.6.33 the this behavior + * was properly split in to O_SYNC and O_DSYNC respectively. + */ +#ifndef O_DSYNC +#define O_DSYNC O_SYNC +#endif #define FREAD 1 #define FWRITE 2 From c950d1480dc2bf72b4ea69f32976be016c66135f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 30 Jun 2010 17:05:36 -0700 Subject: [PATCH 0406/1062] Only make compiler warnings fatal with --enable-debug While in theory I like the idea of compiler warnings always being fatal. In practice this causes problems when small harmless errors cause build failures for end users. To handle this I've updated the build system such that -Werror is only used when --enable-debug is passed to configure. This is how I always build when developing so I'll catch all build warnings and end users will not get stuck by minor issues. --- Makefile.in | 1 + cmd/Makefile.in | 5 +-- config/Rules.am | 4 +-- config/spl-build.m4 | 17 +++++++--- configure | 83 ++++++++++++++++++++++++++++++++------------- include/Makefile.in | 1 + lib/Makefile.in | 5 +-- scripts/Makefile.in | 1 + spl_config.h.in | 6 ++++ 9 files changed, 89 insertions(+), 34 deletions(-) diff --git a/Makefile.in b/Makefile.in index f2ec0112b..572e88ec2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -140,6 +140,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 819957e07..75e5d8d2f 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -114,6 +114,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -236,8 +237,8 @@ top_srcdir = @top_srcdir@ DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h \ -I${top_srcdir}/lib AM_LIBTOOLFLAGS = --silent -AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ - -D__USE_LARGEFILE64 +AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \ + -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} spl_SOURCES = spl.c splat_SOURCES = splat.c splat_LDFLAGS = $(top_builddir)/lib/libcommon.la diff --git a/config/Rules.am b/config/Rules.am index 7b72770b8..c6b00b6b8 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -9,5 +9,5 @@ DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h AM_LIBTOOLFLAGS = --silent -AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow -AM_CFLAGS += -D__USE_LARGEFILE64 +AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing +AM_CFLAGS += -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 135783cdc..9fd97c06f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -12,7 +12,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other dnl # compiler options are added by the kernel build system. abs_srcdir=`readlink -f ${srcdir}` - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" @@ -235,6 +235,7 @@ dnl # Enable if the SPL should be compiled with internal debugging enabled. dnl # By default this support is disabled. dnl # AC_DEFUN([SPL_AC_DEBUG], [ + AC_MSG_CHECKING([whether debugging is enabled]) AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [Enable generic debug support @<:@default=no@:>@])], @@ -242,10 +243,18 @@ AC_DEFUN([SPL_AC_DEBUG], [ [enable_debug=no]) AS_IF([test "x$enable_debug" = xyes], - [KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG"], - [KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"]) + [ + AC_DEFINE([DEBUG], [1], [Define to 1 to enable debug]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" + DEBUG_CFLAGS="-DDEBUG -Werror" + ], + [ + AC_DEFINE([NDEBUG], [1], [Define to 1 to enable debug]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + DEBUG_CFLAGS="-DNDEBUG" + ]) - AC_MSG_CHECKING([whether debugging is enabled]) + AC_SUBST(DEBUG_CFLAGS) AC_MSG_RESULT([$enable_debug]) ]) diff --git a/configure b/configure index fe3de76dc..a0d4cf890 100755 --- a/configure +++ b/configure @@ -791,6 +791,7 @@ CONFIG_KERNEL_FALSE CONFIG_KERNEL_TRUE CONFIG_USER_FALSE CONFIG_USER_TRUE +DEBUG_CFLAGS KERNELCPPFLAGS KERNELMAKE_PARAMS LINUX_SYMBOLS @@ -4759,13 +4760,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4762: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4763: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4765: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4766: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4768: output\"" >&5) + (eval echo "\"\$as_me:4769: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5971,7 +5972,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5974 "configure"' > conftest.$ac_ext + echo '#line 5975 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7824,11 +7825,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7827: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7828: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7831: \$? = $ac_status" >&5 + echo "$as_me:7832: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8163,11 +8164,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8166: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8167: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8170: \$? = $ac_status" >&5 + echo "$as_me:8171: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8268,11 +8269,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8271: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8272: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8275: \$? = $ac_status" >&5 + echo "$as_me:8276: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8323,11 +8324,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8326: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8327: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8330: \$? = $ac_status" >&5 + echo "$as_me:8331: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11126,7 +11127,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11129 "configure" +#line 11130 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11222,7 +11223,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11225 "configure" +#line 11226 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11605,7 +11606,7 @@ $as_echo "$LINUX_SYMBOLS" >&6; } abs_srcdir=`readlink -f ${srcdir}` - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" @@ -11617,6 +11618,8 @@ $as_echo "$LINUX_SYMBOLS" >&6; } + { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +$as_echo_n "checking whether debugging is enabled... " >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; @@ -11626,14 +11629,29 @@ fi if test "x$enable_debug" = xyes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" + + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" + DEBUG_CFLAGS="-DDEBUG -Werror" + else - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + + +cat >>confdefs.h <<\_ACEOF +#define NDEBUG 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + DEBUG_CFLAGS="-DNDEBUG" + fi - { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -$as_echo_n "checking whether debugging is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } @@ -15068,7 +15086,7 @@ $as_echo "$LINUX_SYMBOLS" >&6; } abs_srcdir=`readlink -f ${srcdir}` - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" @@ -15080,6 +15098,8 @@ $as_echo "$LINUX_SYMBOLS" >&6; } + { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +$as_echo_n "checking whether debugging is enabled... " >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; @@ -15089,14 +15109,29 @@ fi if test "x$enable_debug" = xyes; then - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" + + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" + DEBUG_CFLAGS="-DDEBUG -Werror" + else - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + + +cat >>confdefs.h <<\_ACEOF +#define NDEBUG 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + DEBUG_CFLAGS="-DNDEBUG" + fi - { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -$as_echo_n "checking whether debugging is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } diff --git a/include/Makefile.in b/include/Makefile.in index 97c854e20..21ce72f8e 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -73,6 +73,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 3ba39fff7..eb2e83134 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -106,6 +106,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -227,8 +228,8 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h AM_LIBTOOLFLAGS = --silent -AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \ - -D__USE_LARGEFILE64 +AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \ + -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = list.c EXTRA_DIST = list.h diff --git a/scripts/Makefile.in b/scripts/Makefile.in index b171b01ff..64e414acb 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -68,6 +68,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ diff --git a/spl_config.h.in b/spl_config.h.in index a22ca7b8b..540b79392 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -3,6 +3,9 @@ /* Atomic types use spinlocks */ #undef ATOMIC_SPINLOCK +/* Define to 1 to enable debug */ +#undef DEBUG + /* Define to 1 to enable basic kmem accounting */ #undef DEBUG_KMEM @@ -208,6 +211,9 @@ */ #undef LT_OBJDIR +/* Define to 1 to enable debug */ +#undef NDEBUG + /* get_zone_counts() is needed */ #undef NEED_GET_ZONE_COUNTS From c2688979a4ee3b9c0b1d00e94ce2a37ba71b6af6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 09:40:29 -0700 Subject: [PATCH 0407/1062] Remove AC_DEFINE for DEBUG/NDEBUG Whoops, I momentarilly forgot I had explicitly set these as CC options so dependent packages which need to include spl_config.h would not end up having these defined which can result in accidentally hanging debug enabled at best, or a build failure at worst. --- config/spl-build.m4 | 2 -- configure | 20 -------------------- spl_config.h.in | 6 ------ 3 files changed, 28 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 9fd97c06f..09e4b55eb 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -244,12 +244,10 @@ AC_DEFUN([SPL_AC_DEBUG], [ AS_IF([test "x$enable_debug" = xyes], [ - AC_DEFINE([DEBUG], [1], [Define to 1 to enable debug]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" ], [ - AC_DEFINE([NDEBUG], [1], [Define to 1 to enable debug]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" ]) diff --git a/configure b/configure index a0d4cf890..979c38800 100755 --- a/configure +++ b/configure @@ -11630,21 +11630,11 @@ fi if test "x$enable_debug" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" else - -cat >>confdefs.h <<\_ACEOF -#define NDEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" @@ -15110,21 +15100,11 @@ fi if test "x$enable_debug" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" else - -cat >>confdefs.h <<\_ACEOF -#define NDEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" diff --git a/spl_config.h.in b/spl_config.h.in index 540b79392..a22ca7b8b 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -3,9 +3,6 @@ /* Atomic types use spinlocks */ #undef ATOMIC_SPINLOCK -/* Define to 1 to enable debug */ -#undef DEBUG - /* Define to 1 to enable basic kmem accounting */ #undef DEBUG_KMEM @@ -211,9 +208,6 @@ */ #undef LT_OBJDIR -/* Define to 1 to enable debug */ -#undef NDEBUG - /* get_zone_counts() is needed */ #undef NEED_GET_ZONE_COUNTS From f0d8bb26b492dca0da1faff50b097b1665143bf4 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Thu, 1 Jul 2010 10:07:51 -0700 Subject: [PATCH 0408/1062] Implementation of the TQ_FRONT flag. Adds a task queue to receive tasks dispatched with TQ_FRONT. Worker threads pull tasks from this high priority queue before the default pending queue. Executing tasks out of FIFO order potentially breaks taskq_lowest_id() if we do not preserve the ordering of the work list by taskqid. Therefore, instead of always appending to the work list, we search for the appropriate place to insert a task. The common case is to append to the list, so we make this operation efficient by searching the work list in reverse order. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 1 + module/spl/spl-taskq.c | 95 ++++++++++++++++++++++++++++++++---------- 2 files changed, 75 insertions(+), 21 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 4e51d98dd..c83409d49 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -74,6 +74,7 @@ typedef struct taskq { struct list_head tq_free_list; /* free task_t's */ struct list_head tq_work_list; /* work task_t's */ struct list_head tq_pend_list; /* pending task_t's */ + struct list_head tq_prio_list; /* priority pending task_t's */ wait_queue_head_t tq_work_waitq; /* new work waitq */ wait_queue_head_t tq_wait_waitq; /* wait waitq */ } taskq_t; diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 805749a14..9aca699c7 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -158,21 +158,22 @@ task_done(taskq_t *tq, spl_task_t *t) /* * As tasks are submitted to the task queue they are assigned a - * monotonically increasing taskqid and added to the tail of the - * pending list. As worker threads become available the tasks are - * removed from the head of the pending list and added to the tail - * of the work list. Finally, as tasks complete they are removed - * from the work list. This means that the pending and work lists - * are always kept sorted by taskqid. Thus the lowest outstanding + * monotonically increasing taskqid and added to the tail of the pending + * list. As worker threads become available the tasks are removed from + * the head of the pending or priority list, giving preference to the + * priority list. The tasks are then added to the work list, preserving + * the ordering by taskqid. Finally, as tasks complete they are removed + * from the work list. This means that the pending and work lists are + * always kept sorted by taskqid. Thus the lowest outstanding * incomplete taskqid can be determined simply by checking the min - * taskqid for each head item on the pending and work list. This - * value is stored in tq->tq_lowest_id and only updated to the new - * lowest id when the previous lowest id completes. All taskqids - * lower than tq->tq_lowest_id must have completed. It is also - * possible larger taskqid's have completed because they may be - * processed in parallel by several worker threads. However, this - * is not a problem because the behavior of taskq_wait_id() is to - * block until all previously submitted taskqid's have completed. + * taskqid for each head item on the pending, priority, and work list. + * This value is stored in tq->tq_lowest_id and only updated to the new + * lowest id when the previous lowest id completes. All taskqids lower + * than tq->tq_lowest_id must have completed. It is also possible + * larger taskqid's have completed because they may be processed in + * parallel by several worker threads. However, this is not a problem + * because the behavior of taskq_wait_id() is to block until all + * previously submitted taskqid's have completed. * * XXX: Taskqid_t wrapping is not handled. However, taskqid_t's are * 64-bit values so even if a taskq is processing 2^24 (16,777,216) @@ -274,7 +275,13 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) GOTO(out, rc = 0); spin_lock(&t->t_lock); - list_add_tail(&t->t_list, &tq->tq_pend_list); + + /* Queue to the priority list instead of the pending list */ + if (flags & TQ_FRONT) + list_add_tail(&t->t_list, &tq->tq_prio_list); + else + list_add_tail(&t->t_list, &tq->tq_pend_list); + t->t_id = rc = tq->tq_next_id; tq->tq_next_id++; t->t_func = func; @@ -290,8 +297,9 @@ EXPORT_SYMBOL(__taskq_dispatch); /* * Returns the lowest incomplete taskqid_t. The taskqid_t may - * be queued on the pending list or may be on the work list - * currently being handled, but it is not 100% complete yet. + * be queued on the pending list, on the priority list, or on + * the work list currently being handled, but it is not 100% + * complete yet. */ static taskqid_t taskq_lowest_id(taskq_t *tq) @@ -308,6 +316,11 @@ taskq_lowest_id(taskq_t *tq) lowest_id = MIN(lowest_id, t->t_id); } + if (!list_empty(&tq->tq_prio_list)) { + t = list_entry(tq->tq_prio_list.next, spl_task_t, t_list); + lowest_id = MIN(lowest_id, t->t_id); + } + if (!list_empty(&tq->tq_work_list)) { t = list_entry(tq->tq_work_list.next, spl_task_t, t_list); lowest_id = MIN(lowest_id, t->t_id); @@ -316,6 +329,34 @@ taskq_lowest_id(taskq_t *tq) RETURN(lowest_id); } +/* + * Insert a task into a list keeping the list sorted by increasing + * taskqid. + */ +static void +taskq_insert_in_order(taskq_t *tq, spl_task_t *t) +{ + spl_task_t *w; + struct list_head *l; + + ENTRY; + ASSERT(tq); + ASSERT(t); + ASSERT(spin_is_locked(&tq->tq_lock)); + + list_for_each_prev(l, &tq->tq_work_list) { + w = list_entry(l, spl_task_t, t_list); + if (w->t_id < t->t_id) { + list_add(&t->t_list, l); + break; + } + } + if (l == &tq->tq_work_list) + list_add(&t->t_list, &tq->tq_work_list); + + EXIT; +} + static int taskq_thread(void *args) { @@ -324,6 +365,7 @@ taskq_thread(void *args) taskqid_t id; taskq_t *tq = args; spl_task_t *t; + struct list_head *pend_list; ENTRY; ASSERT(tq); @@ -341,7 +383,8 @@ taskq_thread(void *args) while (!kthread_should_stop()) { add_wait_queue(&tq->tq_work_waitq, &wait); - if (list_empty(&tq->tq_pend_list)) { + if (list_empty(&tq->tq_pend_list) && + list_empty(&tq->tq_prio_list)) { spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); schedule(); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); @@ -350,10 +393,18 @@ taskq_thread(void *args) } remove_wait_queue(&tq->tq_work_waitq, &wait); - if (!list_empty(&tq->tq_pend_list)) { - t = list_entry(tq->tq_pend_list.next,spl_task_t,t_list); + + if (!list_empty(&tq->tq_prio_list)) + pend_list = &tq->tq_prio_list; + else if (!list_empty(&tq->tq_pend_list)) + pend_list = &tq->tq_pend_list; + else + pend_list = NULL; + + if (pend_list) { + t = list_entry(pend_list->next, spl_task_t, t_list); list_del_init(&t->t_list); - list_add_tail(&t->t_list, &tq->tq_work_list); + taskq_insert_in_order(tq, t); tq->tq_nactive++; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -435,6 +486,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, INIT_LIST_HEAD(&tq->tq_free_list); INIT_LIST_HEAD(&tq->tq_work_list); INIT_LIST_HEAD(&tq->tq_pend_list); + INIT_LIST_HEAD(&tq->tq_prio_list); init_waitqueue_head(&tq->tq_work_waitq); init_waitqueue_head(&tq->tq_wait_waitq); @@ -503,6 +555,7 @@ __taskq_destroy(taskq_t *tq) ASSERT(list_empty(&tq->tq_free_list)); ASSERT(list_empty(&tq->tq_work_list)); ASSERT(list_empty(&tq->tq_pend_list)); + ASSERT(list_empty(&tq->tq_prio_list)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); kmem_free(tq->tq_threads, nthreads * sizeof(spl_task_t *)); From 1a73940d39f07332921a7f78eaca9bd9266c5c7a Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Thu, 1 Jul 2010 10:12:57 -0700 Subject: [PATCH 0409/1062] Initialize the /dev/splatctl device buffer On open() and initialize the buffer with the SPL version string. The user space splat utility expects to find the SPL version string when it opens and reads from /dev/splatctl. Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 1 + module/splat/splat-ctl.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index d5c1523e1..956be6882 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -47,6 +47,7 @@ #define DEBUG_SUBSYSTEM S_GENERIC char spl_version[16] = "SPL v" SPL_META_VERSION; +EXPORT_SYMBOL(spl_version); long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 09f084710..ba68de212 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -70,11 +70,14 @@ splat_open(struct inode *inode, struct file *file) kfree(info); return -ENOMEM; } + memset(info->info_buffer, 0, info->info_size); info->info_head = info->info_buffer; file->private_data = (void *)info; - return 0; + splat_print(file, "%s\n", spl_version); + + return 0; } static int From 55f10ae5e91817e339f89e312a747ef6bc2dde66 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Wed, 30 Jun 2010 17:34:57 -0700 Subject: [PATCH 0410/1062] Implementation of a regression test for TQ_FRONT. Use 3 threads and 8 tasks. Dispatch the final 3 tasks with TQ_FRONT. The first three tasks keep the worker threads busy while we stuff the queues. Use msleep() to force a known execution order, assuming TQ_FRONT is properly honored. Verify that the expected completion order occurs. The splat_taskq_test5_order() function may be useful in more than one test. This commit generalizes it by renaming the function to splat_taskq_test_order() and adding a name argument instead of assuming SPLAT_TASKQ_TEST5_NAME as the test name. The documentation for splat taskq regression test #5 swaps the two required completion orders in the diagram. This commit corrects the error. Signed-off-by: Brian Behlendorf --- module/splat/splat-taskq.c | 151 ++++++++++++++++++++++++++++++++++--- 1 file changed, 142 insertions(+), 9 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index ea79dfa85..d4540f37a 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -49,6 +49,10 @@ #define SPLAT_TASKQ_TEST5_NAME "order" #define SPLAT_TASKQ_TEST5_DESC "Correct task ordering" +#define SPLAT_TASKQ_TEST6_ID 0x0206 +#define SPLAT_TASKQ_TEST6_NAME "front" +#define SPLAT_TASKQ_TEST6_DESC "Correct ordering with TQ_FRONT flag" + #define SPLAT_TASKQ_ORDER_MAX 8 typedef struct splat_taskq_arg { @@ -386,13 +390,13 @@ out: * task ids which must have completed and their order. * * +-----+ <--- taskq_wait_id(tq, 8) unblocks - * | | Required Completion Order: 1,2,4,5,3 + * | | Required Completion Order: 1,2,4,5,3,8,6,7 * +-----+ | * | | | * | | +-----+ * | | | 8 | * | | +-----+ <--- taskq_wait_id(tq, 3) unblocks - * | | 7 | | Required Completion Order: 1,2,4,5,3,8,6,7 + * | | 7 | | Required Completion Order: 1,2,4,5,3 * | +-----+ | * | 6 | | | * +-----+ | | @@ -432,23 +436,23 @@ splat_taskq_test5_func(void *arg) } static int -splat_taskq_test5_order(splat_taskq_arg_t *tq_arg, int *order) +splat_taskq_test_order(splat_taskq_arg_t *tq_arg, int *order) { int i, j; for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { if (tq_arg->order[i] != order[i]) { - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + splat_vprint(tq_arg->file, tq_arg->name, "Taskq '%s' incorrect completion " "order\n", tq_arg->name); - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + splat_vprint(tq_arg->file, tq_arg->name, "%s", "Expected { "); for (j = 0; j < SPLAT_TASKQ_ORDER_MAX; j++) splat_print(tq_arg->file, "%d ", order[j]); splat_print(tq_arg->file, "%s", "}\n"); - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + splat_vprint(tq_arg->file, tq_arg->name, "%s", "Got { "); for (j = 0; j < SPLAT_TASKQ_ORDER_MAX; j++) @@ -460,7 +464,7 @@ splat_taskq_test5_order(splat_taskq_arg_t *tq_arg, int *order) } } - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST5_NAME, + splat_vprint(tq_arg->file, tq_arg->name, "Taskq '%s' validated correct completion order\n", tq_arg->name); @@ -519,13 +523,13 @@ splat_taskq_test5(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, 3); taskq_wait_id(tq, 3); - if ((rc = splat_taskq_test5_order(&tq_arg, order1))) + if ((rc = splat_taskq_test_order(&tq_arg, order1))) goto out; splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, 8); taskq_wait_id(tq, 8); - rc = splat_taskq_test5_order(&tq_arg, order2); + rc = splat_taskq_test_order(&tq_arg, order2); out: splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, @@ -535,6 +539,133 @@ out: return rc; } +/* + * Create a single task queue with three threads. Dispatch 8 tasks, + * setting TQ_FRONT on only the last three. Sleep after + * dispatching tasks 1-3 to ensure they will run and hold the threads + * busy while we dispatch the remaining tasks. Verify that tasks 6-8 + * run before task 4-5. + * + * The following table shows each task id and how they will be + * scheduled. Each rows represent one time unit and each column + * one of the three worker threads. + * + * +-----+ + * | | + * +-----+ | + * | | 5 +-----+ + * | | | | + * | +-----| | + * | 4 | | | + * +-----+ | 8 | + * | | | | + * | | 7 +-----+ + * | | | | + * | |-----+ | + * | 6 | | | + * +-----+ | | + * | | | | + * | 1 | 2 | 3 | + * +-----+-----+-----+ + * + */ +static void +splat_taskq_test6_func(void *arg) +{ + splat_taskq_id_t *tq_id = (splat_taskq_id_t *)arg; + splat_taskq_arg_t *tq_arg = tq_id->arg; + int factor; + + /* Delays determined by above table */ + switch (tq_id->id) { + default: factor = 0; break; + case 1: factor = 2; break; + case 2: case 4: case 5: factor = 4; break; + case 6: case 7: case 8: factor = 5; break; + case 3: factor = 6; break; + } + + msleep(factor * 100); + + splat_vprint(tq_arg->file, tq_arg->name, + "Taskqid %d complete for taskq '%s'\n", + tq_id->id, tq_arg->name); + + spin_lock(&tq_arg->lock); + tq_arg->order[tq_arg->flag] = tq_id->id; + tq_arg->flag++; + spin_unlock(&tq_arg->lock); +} + +static int +splat_taskq_test6(struct file *file, void *arg) +{ + taskq_t *tq; + taskqid_t id; + splat_taskq_id_t tq_id[SPLAT_TASKQ_ORDER_MAX]; + splat_taskq_arg_t tq_arg; + int order[SPLAT_TASKQ_ORDER_MAX] = { 1,2,3,6,7,8,4,5 }; + int i, rc = 0; + uint_t tflags; + + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' creating\n", + SPLAT_TASKQ_TEST6_NAME); + if ((tq = taskq_create(SPLAT_TASKQ_TEST6_NAME, 3, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, + "Taskq '%s' create failed\n", + SPLAT_TASKQ_TEST6_NAME); + return -EINVAL; + } + + tq_arg.flag = 0; + memset(&tq_arg.order, 0, sizeof(int) * SPLAT_TASKQ_ORDER_MAX); + spin_lock_init(&tq_arg.lock); + tq_arg.file = file; + tq_arg.name = SPLAT_TASKQ_TEST6_NAME; + + for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { + tq_id[i].id = i + 1; + tq_id[i].arg = &tq_arg; + tflags = TQ_SLEEP; + if (i > 4) + tflags |= TQ_FRONT; + + if ((id = taskq_dispatch(tq, splat_taskq_test6_func, + &tq_id[i], tflags)) == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, + "Taskq '%s' function '%s' dispatch failed\n", + tq_arg.name, sym2str(splat_taskq_test6_func)); + rc = -EINVAL; + goto out; + } + + if (tq_id[i].id != id) { + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, + "Taskq '%s' expected taskqid %d got %d\n", + tq_arg.name, (int)tq_id[i].id, (int)id); + rc = -EINVAL; + goto out; + } + /* Sleep to let tasks 1-3 start executing. */ + if ( i == 2 ) + msleep(100); + } + + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' " + "waiting for taskqid %d completion\n", tq_arg.name, + SPLAT_TASKQ_ORDER_MAX); + taskq_wait_id(tq, SPLAT_TASKQ_ORDER_MAX); + rc = splat_taskq_test_order(&tq_arg, order); + +out: + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, + "Taskq '%s' destroying\n", tq_arg.name); + taskq_destroy(tq); + + return rc; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -562,6 +693,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST4_ID, splat_taskq_test4); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST5_NAME, SPLAT_TASKQ_TEST5_DESC, SPLAT_TASKQ_TEST5_ID, splat_taskq_test5); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST6_NAME, SPLAT_TASKQ_TEST6_DESC, + SPLAT_TASKQ_TEST6_ID, splat_taskq_test6); return sub; } From 8fd4e3af2e7e4d7c45288f9dad1290b7532d7dc9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 13:25:34 -0700 Subject: [PATCH 0411/1062] Check sourcelink is set before passing to readlink When no source was found in any of the expected paths treat this as fatal and provide the user with a hint as to what they should do. --- config/spl-build.m4 | 7 ++++--- configure | 24 ++++++++++++++---------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 09e4b55eb..89b7162c3 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -117,13 +117,14 @@ AC_DEFUN([SPL_AC_KERNEL], [ 2>/dev/null | grep -v obj | tail -1) fi - if test -e ${sourcelink}; then + if test -n "$sourcelink" && test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else AC_MSG_RESULT([Not found]) AC_MSG_ERROR([ - *** Please specify the location of the kernel source - *** with the '--with-linux=PATH' option]) + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option.]) fi else if test "$kernelsrc" = "NONE"; then diff --git a/configure b/configure index 979c38800..9d5d93542 100755 --- a/configure +++ b/configure @@ -11504,17 +11504,19 @@ $as_echo_n "checking kernel source directory... " >&6; } 2>/dev/null | grep -v obj | tail -1) fi - if test -e ${sourcelink}; then + if test -n "$sourcelink" && test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } { { $as_echo "$as_me:$LINENO: error: - *** Please specify the location of the kernel source - *** with the '--with-linux=PATH' option" >&5 + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&5 $as_echo "$as_me: error: - *** Please specify the location of the kernel source - *** with the '--with-linux=PATH' option" >&2;} + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&2;} { (exit 1); exit 1; }; } fi else @@ -14974,17 +14976,19 @@ $as_echo_n "checking kernel source directory... " >&6; } 2>/dev/null | grep -v obj | tail -1) fi - if test -e ${sourcelink}; then + if test -n "$sourcelink" && test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } { { $as_echo "$as_me:$LINENO: error: - *** Please specify the location of the kernel source - *** with the '--with-linux=PATH' option" >&5 + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&5 $as_echo "$as_me: error: - *** Please specify the location of the kernel source - *** with the '--with-linux=PATH' option" >&2;} + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&2;} { (exit 1); exit 1; }; } fi else From e2d28a3743807c8708727cf51b94e4e8407bea65 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 13:27:30 -0700 Subject: [PATCH 0412/1062] Use $target_cpu instead of `arch` We should not be using arch for a few reasons. First off it might not be installed on their system, and secondly they may be trying to cross-compile. --- config/spl-build.m4 | 12 ++++++------ configure | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 89b7162c3..3bbfd0195 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -135,12 +135,12 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([$kernelsrc]) AC_MSG_CHECKING([kernel build directory]) if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/`arch`/`arch`; then - kernelbuild=${kernelsrc}-obj/`arch`/`arch` - elif test -d ${kernelsrc}-obj/`arch`/default; then - kernelbuild=${kernelsrc}-obj/`arch`/default - elif test -d `dirname ${kernelsrc}`/build-`arch`; then - kernelbuild=`dirname ${kernelsrc}`/build-`arch` + if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} + elif test -d ${kernelsrc}-obj/${target_cpu}/default; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/default + elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then + kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} else kernelbuild=${kernelsrc} fi diff --git a/configure b/configure index 9d5d93542..a7ff89e26 100755 --- a/configure +++ b/configure @@ -11530,12 +11530,12 @@ $as_echo "$kernelsrc" >&6; } { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 $as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/`arch`/`arch`; then - kernelbuild=${kernelsrc}-obj/`arch`/`arch` - elif test -d ${kernelsrc}-obj/`arch`/default; then - kernelbuild=${kernelsrc}-obj/`arch`/default - elif test -d `dirname ${kernelsrc}`/build-`arch`; then - kernelbuild=`dirname ${kernelsrc}`/build-`arch` + if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} + elif test -d ${kernelsrc}-obj/${target_cpu}/default; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/default + elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then + kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} else kernelbuild=${kernelsrc} fi @@ -15002,12 +15002,12 @@ $as_echo "$kernelsrc" >&6; } { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 $as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/`arch`/`arch`; then - kernelbuild=${kernelsrc}-obj/`arch`/`arch` - elif test -d ${kernelsrc}-obj/`arch`/default; then - kernelbuild=${kernelsrc}-obj/`arch`/default - elif test -d `dirname ${kernelsrc}`/build-`arch`; then - kernelbuild=`dirname ${kernelsrc}`/build-`arch` + if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} + elif test -d ${kernelsrc}-obj/${target_cpu}/default; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/default + elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then + kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} else kernelbuild=${kernelsrc} fi From 7119bf704490bcb9abca9fa80214313024d381a2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 13:37:43 -0700 Subject: [PATCH 0413/1062] Add configure check for user_path_dir() I didn't notice at the time but user_path_dir() was not introduced at the same time as set_fs_pwd() change. I had lumped the two together but in fact user_path_dir() was introduced in 2.6.27 and set_fs_pwd() taking 2 args was introduced in 2.6.25. This means builds against 2.6.25-2.6.26 kernels were broken. To fix this I've added a check for user_path_dir() and no longer assume that if set_fs_pwd() takes 2 args then user_path_dir() is also available. --- config/spl-build.m4 | 14 ++++++++ configure | 82 ++++++++++++++++++++++++++++++++++++++++++ module/spl/spl-vnode.c | 18 +++++++++- spl_config.h.in | 3 ++ 4 files changed, 116 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 3bbfd0195..40f072bf7 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -68,6 +68,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_ZONE_STAT_ITEM_INACTIVE SPL_AC_ZONE_STAT_ITEM_ACTIVE SPL_AC_GET_ZONE_COUNTS + SPL_AC_USER_PATH_DIR SPL_AC_SET_FS_PWD SPL_AC_2ARGS_SET_FS_PWD SPL_AC_2ARGS_VFS_UNLINK @@ -1298,6 +1299,19 @@ AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ ]) ]) +dnl # +dnl # 2.6.27 API change, +dnl # The user_path_dir() replaces __user_walk() +dnl # +AC_DEFUN([SPL_AC_USER_PATH_DIR], [ + SPL_CHECK_SYMBOL_EXPORT( + [user_path_at], + [], + [AC_DEFINE(HAVE_USER_PATH_DIR, 1, + [user_path_dir() is available])], + []) +]) + dnl # dnl # Symbol available in RHEL kernels not in stock kernels. dnl # diff --git a/configure b/configure index a7ff89e26..4c5df996f 100755 --- a/configure +++ b/configure @@ -14459,6 +14459,47 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5 +$as_echo_n "checking whether symbol user_path_at is exported... " >&6; } + grep -q -E '[[:space:]]user_path_at[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_USER_PATH_DIR 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_USER_PATH_DIR 1 +_ACEOF + + fi + + + { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 $as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ @@ -17931,6 +17972,47 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5 +$as_echo_n "checking whether symbol user_path_at is exported... " >&6; } + grep -q -E '[[:space:]]user_path_at[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_USER_PATH_DIR 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_USER_PATH_DIR 1 +_ACEOF + + fi + + + { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 $as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index ec312aad1..b5c34fbcd 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -648,7 +648,7 @@ set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, struct dentry *dentry) int vn_set_pwd(const char *filename) { -#ifdef HAVE_2ARGS_SET_FS_PWD +#if defined(HAVE_2ARGS_SET_FS_PWD) && defined(HAVE_USER_PATH_DIR) struct path path; #else struct nameidata nd; @@ -666,6 +666,7 @@ vn_set_pwd(const char *filename) set_fs(get_ds()); #ifdef HAVE_2ARGS_SET_FS_PWD +# ifdef HAVE_USER_PATH_DIR rc = user_path_dir(filename, &path); if (rc) GOTO(out, rc); @@ -678,6 +679,21 @@ vn_set_pwd(const char *filename) dput_and_out: path_put(&path); +# else + rc = __user_walk(filename, + LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); + if (rc) + GOTO(out, rc); + + rc = vfs_permission(&nd, MAY_EXEC); + if (rc) + GOTO(dput_and_out, rc); + + set_fs_pwd(current->fs, &nd.path); + +dput_and_out: + path_put(&nd.path); +# endif /* HAVE_USER_PATH_DIR */ #else rc = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); diff --git a/spl_config.h.in b/spl_config.h.in index a22ca7b8b..48b610b32 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -183,6 +183,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* user_path_dir() is available */ +#undef HAVE_USER_PATH_DIR + /* Page state NR_ACTIVE is available */ #undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE From 1814251453c8140f50170ad29d9105c1273d7e08 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 16:20:11 -0700 Subject: [PATCH 0414/1062] Require gawk the usermode helper fails with awk For some reason when awk invoked by the usermode helper the command always fails. Interestingly gawk does not suffer from this problem which is why I never observed this failure since the distro I tested with all had gawk installed instead of awk. Anyway, the simplest thing to do here is to just make gawk mandatory. I've added a configure check for gawk specifically and have updated the command to call gawk not awk. --- config/spl-build.m4 | 11 ++++++++++- configure | 30 ++++++++++++++++++++++++++++-- module/spl/spl-generic.c | 2 +- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 40f072bf7..4d6109a0e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -191,7 +191,16 @@ AC_DEFUN([SPL_AC_KERNEL], [ dnl # dnl # Default SPL user configuration dnl # -AC_DEFUN([SPL_AC_CONFIG_USER], []) +AC_DEFUN([SPL_AC_CONFIG_USER], [ + dnl # Explicitly check for gawk, we require it for the the usermode + dnl # helper. For some reason the standard awk command does not + dnl # behave correctly when invoked from the usermode helper. + AS_IF([test "x$AWK" != xgawk], [ + AC_MSG_ERROR([ + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again.]) + ]) +]) AC_DEFUN([SPL_AC_LICENSE], [ AC_MSG_CHECKING([spl license]) diff --git a/configure b/configure index 4c5df996f..8792553fe 100755 --- a/configure +++ b/configure @@ -14988,7 +14988,20 @@ _ACEOF ;; - user) ;; + user) + if test "x$AWK" != xgawk; then + + { { $as_echo "$as_me:$LINENO: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&5 +$as_echo "$as_me: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&2;} + { (exit 1); exit 1; }; } + +fi + + ;; all) @@ -18501,7 +18514,20 @@ _ACEOF - ;; + + if test "x$AWK" != xgawk; then + + { { $as_echo "$as_me:$LINENO: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&5 +$as_echo "$as_me: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&2;} + { (exit 1); exit 1; }; } + +fi + + ;; srpm) ;; *) { $as_echo "$as_me:$LINENO: result: Error!" >&5 diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 956be6882..b9ab7109a 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -338,7 +338,7 @@ EXPORT_SYMBOL(zone_get_hostid); * the requested address. */ #define GET_KALLSYMS_ADDR_CMD \ - "awk '{ if ( $3 == \"kallsyms_lookup_name\") { print $1 } }' " \ + "gawk '{ if ( $3 == \"kallsyms_lookup_name\") { print $1 } }' " \ "/proc/kallsyms >/proc/sys/kernel/spl/kallsyms_lookup_name" static int From dbe561d8ab3c4787e8d7f1233e6013d9c79bfbcd Mon Sep 17 00:00:00 2001 From: Lars Johannsen Date: Thu, 1 Jul 2010 10:38:32 +0159 Subject: [PATCH 0415/1062] Allow config/build to work with autoconf-2.65 As of autoconf-2.65 the AC_LANG_SOURCE source macro no longer includes the confdef.h results when expanded. To handle this simply explicitly include confdef.h in conftest.c. This will cause two copies to of confdef.h to be added to the test for earlier autoconf versions but this is not harmful. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 2 +- configure | 148 ++++++++++++++++++++++---------------------- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 4d6109a0e..7fd403f89 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -319,7 +319,7 @@ dnl # dnl # SPL_LINUX_CONFTEST dnl # AC_DEFUN([SPL_LINUX_CONFTEST], [ -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c $1 _ACEOF ]) diff --git a/configure b/configure index 8792553fe..82c086a63 100755 --- a/configure +++ b/configure @@ -11706,7 +11706,7 @@ fi -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11820,7 +11820,7 @@ $as_echo "$have_atomic64_t" >&6; } $as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11884,7 +11884,7 @@ fi $as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11948,7 +11948,7 @@ fi $as_echo_n "checking whether kernel defines uintptr_t... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12012,7 +12012,7 @@ fi $as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12077,7 +12077,7 @@ fi $as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12142,7 +12142,7 @@ fi $as_echo_n "checking whether set_shrinker() available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12206,7 +12206,7 @@ fi $as_echo_n "checking whether struct path used in struct nameidata... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12314,7 +12314,7 @@ _ACEOF $as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12381,7 +12381,7 @@ fi $as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12446,7 +12446,7 @@ fi $as_echo_n "checking whether fls64() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12554,7 +12554,7 @@ $as_echo_n "checking whether device_create() wants 5 args... " >&6; } EXTRA_KCFLAGS="-Werror" -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12702,7 +12702,7 @@ _ACEOF $as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12767,7 +12767,7 @@ fi $as_echo_n "checking whether timespec_sub() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12833,7 +12833,7 @@ fi $as_echo_n "checking whether init_utsname() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12898,7 +12898,7 @@ fi $as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12966,7 +12966,7 @@ fi $as_echo_n "checking whether files_fdtable() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13036,7 +13036,7 @@ fi $as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13104,7 +13104,7 @@ fi $as_echo_n "checking whether kmalloc_node() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13210,7 +13210,7 @@ _ACEOF $as_echo_n "checking whether struct inode has i_mutex... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13277,7 +13277,7 @@ fi $as_echo_n "checking whether struct mutex has owner... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13343,7 +13343,7 @@ fi $as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13492,7 +13492,7 @@ _ACEOF $as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13821,7 +13821,7 @@ _ACEOF $as_echo_n "checking whether global_page_state() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13887,7 +13887,7 @@ fi $as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13953,7 +13953,7 @@ fi $as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14018,7 +14018,7 @@ fi $as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14083,7 +14083,7 @@ fi $as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14149,7 +14149,7 @@ fi $as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14214,7 +14214,7 @@ fi $as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14279,7 +14279,7 @@ fi $as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14345,7 +14345,7 @@ fi $as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14544,7 +14544,7 @@ _ACEOF $as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14609,7 +14609,7 @@ fi $as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14673,7 +14673,7 @@ fi $as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14738,7 +14738,7 @@ fi $as_echo_n "checking whether struct cred exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14886,7 +14886,7 @@ _ACEOF $as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15232,7 +15232,7 @@ fi -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15346,7 +15346,7 @@ $as_echo "$have_atomic64_t" >&6; } $as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15410,7 +15410,7 @@ fi $as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15474,7 +15474,7 @@ fi $as_echo_n "checking whether kernel defines uintptr_t... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15538,7 +15538,7 @@ fi $as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15603,7 +15603,7 @@ fi $as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15668,7 +15668,7 @@ fi $as_echo_n "checking whether set_shrinker() available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15732,7 +15732,7 @@ fi $as_echo_n "checking whether struct path used in struct nameidata... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15840,7 +15840,7 @@ _ACEOF $as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15907,7 +15907,7 @@ fi $as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -15972,7 +15972,7 @@ fi $as_echo_n "checking whether fls64() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16080,7 +16080,7 @@ $as_echo_n "checking whether device_create() wants 5 args... " >&6; } EXTRA_KCFLAGS="-Werror" -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16228,7 +16228,7 @@ _ACEOF $as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16293,7 +16293,7 @@ fi $as_echo_n "checking whether timespec_sub() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16359,7 +16359,7 @@ fi $as_echo_n "checking whether init_utsname() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16424,7 +16424,7 @@ fi $as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16492,7 +16492,7 @@ fi $as_echo_n "checking whether files_fdtable() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16562,7 +16562,7 @@ fi $as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16630,7 +16630,7 @@ fi $as_echo_n "checking whether kmalloc_node() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16736,7 +16736,7 @@ _ACEOF $as_echo_n "checking whether struct inode has i_mutex... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16803,7 +16803,7 @@ fi $as_echo_n "checking whether struct mutex has owner... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16869,7 +16869,7 @@ fi $as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17018,7 +17018,7 @@ _ACEOF $as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17347,7 +17347,7 @@ _ACEOF $as_echo_n "checking whether global_page_state() is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17413,7 +17413,7 @@ fi $as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17479,7 +17479,7 @@ fi $as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17544,7 +17544,7 @@ fi $as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17609,7 +17609,7 @@ fi $as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17675,7 +17675,7 @@ fi $as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17740,7 +17740,7 @@ fi $as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17805,7 +17805,7 @@ fi $as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17871,7 +17871,7 @@ fi $as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18070,7 +18070,7 @@ _ACEOF $as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18135,7 +18135,7 @@ fi $as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18199,7 +18199,7 @@ fi $as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18264,7 +18264,7 @@ fi $as_echo_n "checking whether struct cred exists... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18412,7 +18412,7 @@ _ACEOF $as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } -cat >conftest.c <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext From d466208f1e76c80fe14751739273b1932c4329f3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 2 Jul 2010 14:41:54 -0700 Subject: [PATCH 0416/1062] Update config.guess to recognize additional distros The following distros were added: redhat, fedora, debian, ubuntu, sles, slackware, and gentoo. --- config/config.guess | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config/config.guess b/config/config.guess index 2fc3acce2..2440a1546 100755 --- a/config/config.guess +++ b/config/config.guess @@ -136,9 +136,20 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -## for Red Hat Linux if test -f /etc/redhat-release ; then VENDOR=redhat ; +elif test -f /etc/fedora-release ; then + VENDOR=fedora ; +elif test -f /etc/debian_version ; then + VENDOR=debian ; +elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; +elif test -f /etc/SuSE-release ; then + VENDOR=sles ; +elif test -f /etc/slackware-version ; then + VENDOR=slackware ; +elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; else VENDOR= ; fi From a4bfd8ea1b58d8797ec91b18982de243675e63bc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 12 Jul 2010 12:38:34 -0700 Subject: [PATCH 0417/1062] Add __divdi3(), remove __udivdi3() kernel dependency Up until now no SPL consumer attempted to perform signed 64-bit division so there was no need to support this. That has now changed so I adding 64-bit division support for 32-bit platforms. The signed implementation is based on the unsigned version. Since the have been several bug reports in the past concerning correct 64-bit division on 32-bit platforms I added some long over due regression tests. Much to my surprise the unsigned 64-bit division regression tests failed. This was surprising because __udivdi3() was implemented by simply calling div64_u64() which is provided by the kernel. This meant that the linux kernels 64-bit division algorithm on 32-bit platforms was flawed. After some investigation this turned out to be exactly the case. Because of this I was forced to abandon the kernel helper and instead to fully implement 64-bit division in the spl. There are several published implementation out there on how to do this properly and I settled on one proposed in the book Hacker's Delight. Their proposed algoritm is freely available without restriction and I have just modified it to be linux kernel friendly. The update implementation now passed all the unsigned and signed regression tests. This should be functional, but not fast, which is good enough for out purposes. If you want fast too I'd strongly suggest you upgrade to a 64-bit platform. I have also reported the kernel bug and we'll see if we can't get it fixed up stream. --- config/spl-build.m4 | 28 ------ configure | 164 ---------------------------------- include/linux/math64_compat.h | 32 +++++++ include/sys/types.h | 1 + module/spl/spl-generic.c | 123 +++++++++++++++++++------ module/splat/splat-generic.c | 133 +++++++++++++++++++++++++++ spl_config.h.in | 6 -- 7 files changed, 264 insertions(+), 223 deletions(-) create mode 100644 include/linux/math64_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7fd403f89..ae4e1f162 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -53,8 +53,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_INODE_I_MUTEX SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_LOCK_NESTED - SPL_AC_DIV64_64 - SPL_AC_DIV64_U64 SPL_AC_3ARGS_ON_EACH_CPU SPL_AC_KALLSYMS_LOOKUP_NAME SPL_AC_GET_VMALLOC_INFO @@ -950,32 +948,6 @@ AC_DEFUN([SPL_AC_MUTEX_LOCK_NESTED], [ ]) ]) -dnl # -dnl # 2.6.22 API change, -dnl # First introduced 'div64_64()' in lib/div64.c -dnl -AC_DEFUN([SPL_AC_DIV64_64], [ - SPL_CHECK_SYMBOL_EXPORT( - [div64_64], - [], - [AC_DEFINE(HAVE_DIV64_64, 1, - [div64_64() is available])], - []) -]) - -dnl # -dnl # 2.6.26 API change, -dnl # Renamed 'div64_64()' to 'div64_u64' in lib/div64.c -dnl # -AC_DEFUN([SPL_AC_DIV64_U64], [ - SPL_CHECK_SYMBOL_EXPORT( - [div64_u64], - [], - [AC_DEFINE(HAVE_DIV64_U64, 1, - [div64_u64() is available])], - []) -]) - dnl # dnl # 2.6.27 API change, dnl # on_each_cpu() uses 3 args, no 'retry' argument diff --git a/configure b/configure index 82c086a63..04da5953a 100755 --- a/configure +++ b/configure @@ -13406,88 +13406,6 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 -$as_echo_n "checking whether symbol div64_64 is exported... " >&6; } - grep -q -E '[[:space:]]div64_64[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(div64_64)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_64 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_64 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 -$as_echo_n "checking whether symbol div64_u64 is exported... " >&6; } - grep -q -E '[[:space:]]div64_u64[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(div64_u64)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_U64 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_U64 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 $as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } @@ -16932,88 +16850,6 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 -$as_echo_n "checking whether symbol div64_64 is exported... " >&6; } - grep -q -E '[[:space:]]div64_64[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(div64_64)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_64 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_64 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 -$as_echo_n "checking whether symbol div64_u64 is exported... " >&6; } - grep -q -E '[[:space:]]div64_u64[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(div64_u64)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_U64 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIV64_U64 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 $as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } diff --git a/include/linux/math64_compat.h b/include/linux/math64_compat.h new file mode 100644 index 000000000..652082ea2 --- /dev/null +++ b/include/linux/math64_compat.h @@ -0,0 +1,32 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_MATH64_COMPAT_H +#define _SPL_MATH64_COMPAT_H + +#ifndef abs64 +#define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; }) +#endif + +#endif /* _SPL_MATH64_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 256e7b09e..786474baa 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -40,6 +40,7 @@ #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index b9ab7109a..6a3f49ae0 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -94,39 +94,111 @@ highbit(unsigned long i) } EXPORT_SYMBOL(highbit); -/* - * Implementation of 64 bit division for 32-bit machines. - */ #if BITS_PER_LONG == 32 -uint64_t -__udivdi3(uint64_t dividend, uint64_t divisor) +/* + * Support 64/64 => 64 division on a 32-bit platform. While the kernel + * provides a div64_u64() function for this we do not use it because the + * implementation is flawed. There are cases which return incorrect + * results as late as linux-2.6.35. Until this is fixed upstream the + * spl must provide its own implementation. + * + * This implementation is a slightly modified version of the algorithm + * proposed by the book 'Hacker's Delight'. The original source can be + * found here and is available for use without restriction. + * + * http://www.hackersdelight.org/HDcode/newCode/divDouble.c + */ + +/* + * Calculate number of leading of zeros for a 64-bit value. + */ +static int +nlz64(uint64_t x) { + register int n = 0; + + if (x == 0) + return 64; + + if (x <= 0x00000000FFFFFFFFULL) {n = n + 32; x = x << 32;} + if (x <= 0x0000FFFFFFFFFFFFULL) {n = n + 16; x = x << 16;} + if (x <= 0x00FFFFFFFFFFFFFFULL) {n = n + 8; x = x << 8;} + if (x <= 0x0FFFFFFFFFFFFFFFULL) {n = n + 4; x = x << 4;} + if (x <= 0x3FFFFFFFFFFFFFFFULL) {n = n + 2; x = x << 2;} + if (x <= 0x7FFFFFFFFFFFFFFFULL) {n = n + 1;} + + return n; +} + +/* + * Newer kernels have a div_u64() function but we define our own + * to simplify portibility between kernel versions. + */ +static inline uint64_t +__div_u64(uint64_t u, uint32_t v) { -#if defined(HAVE_DIV64_64) /* 2.6.22 - 2.6.25 API */ - return div64_64(dividend, divisor); -#elif defined(HAVE_DIV64_U64) /* 2.6.26 - 2.6.x API */ - return div64_u64(dividend, divisor); -#else - /* Implementation from 2.6.30 kernel */ - uint32_t high, d; + (void) do_div(u, v); + return u; +} - high = divisor >> 32; - if (high) { - unsigned int shift = fls(high); +/* + * Implementation of 64-bit unsigned division for 32-bit machines. + * + * First the procedure takes care of the case in which the divisor is a + * 32-bit quantity. There are two subcases: (1) If the left half of the + * dividend is less than the divisor, one execution of do_div() is all that + * is required (overflow is not possible). (2) Otherwise it does two + * divisions, using the grade school method. + */ +uint64_t +__udivdi3(uint64_t u, uint64_t v) +{ + uint64_t u0, u1, v1, q0, q1, k; + int n; - d = divisor >> shift; - dividend >>= shift; - } else - d = divisor; - - do_div(dividend, d); - - return dividend; -#endif /* HAVE_DIV64_64, HAVE_DIV64_U64 */ + if (v >> 32 == 0) { // If v < 2**32: + if (u >> 32 < v) { // If u/v cannot overflow, + return __div_u64(u, v); // just do one division. + } else { // If u/v would overflow: + u1 = u >> 32; // Break u into two halves. + u0 = u & 0xFFFFFFFF; + q1 = __div_u64(u1, v); // First quotient digit. + k = u1 - q1 * v; // First remainder, < v. + u0 += (k << 32); + q0 = __div_u64(u0, v); // Seconds quotient digit. + return (q1 << 32) + q0; + } + } else { // If v >= 2**32: + n = nlz64(v); // 0 <= n <= 31. + v1 = (v << n) >> 32; // Normalize divisor, MSB is 1. + u1 = u >> 1; // To ensure no overflow. + q1 = __div_u64(u1, v1); // Get quotient from + q0 = (q1 << n) >> 31; // Undo normalization and + // division of u by 2. + if (q0 != 0) // Make q0 correct or + q0 = q0 - 1; // too small by 1. + if ((u - q0 * v) >= v) + q0 = q0 + 1; // Now q0 is correct. + + return q0; + } } EXPORT_SYMBOL(__udivdi3); /* - * Implementation of 64 bit modulo for 32-bit machines. + * Implementation of 64-bit signed division for 32-bit machines. + */ +int64_t +__divdi3(int64_t u, int64_t v) +{ + int64_t q, t; + q = __udivdi3(abs64(u), abs64(v)); + t = (u ^ v) >> 63; // If u, v have different + return (q ^ t) - t; // signs, negate q. +} +EXPORT_SYMBOL(__divdi3); + +/* + * Implementation of 64-bit unsigned modulo for 32-bit machines. */ uint64_t __umoddi3(uint64_t dividend, uint64_t divisor) @@ -134,6 +206,7 @@ __umoddi3(uint64_t dividend, uint64_t divisor) return (dividend - (divisor * __udivdi3(dividend, divisor))); } EXPORT_SYMBOL(__umoddi3); + #endif /* BITS_PER_LONG */ /* NOTE: The strtoxx behavior is solely based on my reading of the Solaris diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index 8ad6913c0..f9c3c7ec5 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -45,6 +45,14 @@ #define SPLAT_GENERIC_TEST4_NAME "ddi_strtoll" #define SPLAT_GENERIC_TEST4_DESC "ddi_strtoll Test" +# define SPLAT_GENERIC_TEST5_ID 0x0d05 +# define SPLAT_GENERIC_TEST5_NAME "udivdi3" +# define SPLAT_GENERIC_TEST5_DESC "Unsigned Div-64 Test" + +# define SPLAT_GENERIC_TEST6_ID 0x0d06 +# define SPLAT_GENERIC_TEST6_NAME "divdi3" +# define SPLAT_GENERIC_TEST6_DESC "Signed Div-64 Test" + #define STR_POS "123456789" #define STR_NEG "-123456789" #define STR_BASE "0xabcdef" @@ -183,6 +191,125 @@ define_splat_generic_test_strtox(l, long); define_splat_generic_test_strtox(ull, unsigned long long); define_splat_generic_test_strtox(ll, long long); +/* + * The entries in the table are used in all combinations and the + * return value is checked to ensure it is range. On 32-bit + * systems __udivdi3 will be invoked for the 64-bit division. + * On 64-bit system the native 64-bit divide will be used so + * __udivdi3 isn't used but we might as well stil run the test. + */ +static int +splat_generic_test_udivdi3(struct file *file, void *arg) +{ + const uint64_t tabu[] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 1000, 2003, + 32765, 32766, 32767, 32768, 32769, 32760, + 65533, 65534, 65535, 65536, 65537, 65538, + 0x7ffffffeULL, 0x7fffffffULL, 0x80000000ULL, 0x80000001ULL, + 0x7000000000000000ULL, 0x7000000080000000ULL, 0x7000000080000001ULL, + 0x7fffffffffffffffULL, 0x7fffffff8fffffffULL, 0x7fffffff8ffffff1ULL, + 0x7fffffff00000000ULL, 0x7fffffff80000000ULL, 0x7fffffff00000001ULL, + 0x8000000000000000ULL, 0x8000000080000000ULL, 0x8000000080000001ULL, + 0xc000000000000000ULL, 0xc000000080000000ULL, 0xc000000080000001ULL, + 0xfffffffffffffffdULL, 0xfffffffffffffffeULL, 0xffffffffffffffffULL, + }; + uint64_t uu, vu, qu, ru; + int n, i, j, errors = 0; + + splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, "%s", + "Testing unsigned 64-bit division.\n"); + n = sizeof(tabu) / sizeof(tabu[0]); + for (i = 0; i < n; i++) { + for (j = 1; j < n; j++) { + uu = tabu[i]; + vu = tabu[j]; + qu = uu / vu; /* __udivdi3 */ + ru = uu - qu * vu; + if (qu > uu || ru >= vu) { + splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, + "%016llx/%016llx != %016llx rem %016llx\n", + uu, vu, qu, ru); + errors++; + } + } + } + + if (errors) { + splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, + "Failed %d/%d tests\n", errors, n * (n - 1)); + return -ERANGE; + } + + splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, + "Passed all %d tests\n", n * (n - 1)); + + return 0; +} + +/* + * The entries the table are used in all combinations, with + and - signs + * preceding them. The return value is checked to ensure it is range. + * On 32-bit systems __divdi3 will be invoked for the 64-bit division. + * On 64-bit system the native 64-bit divide will be used so __divdi3 + * isn't used but we might as well stil run the test. + */ +static int +splat_generic_test_divdi3(struct file *file, void *arg) +{ + const int64_t tabs[] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 1000, 2003, + 32765, 32766, 32767, 32768, 32769, 32760, + 65533, 65534, 65535, 65536, 65537, 65538, + 0x7ffffffeLL, 0x7fffffffLL, 0x80000000LL, 0x80000001LL, + 0x7000000000000000LL, 0x7000000080000000LL, 0x7000000080000001LL, + 0x7fffffffffffffffLL, 0x7fffffff8fffffffLL, 0x7fffffff8ffffff1LL, + 0x7fffffff00000000LL, 0x7fffffff80000000LL, 0x7fffffff00000001LL, + 0x0123456789abcdefLL, 0x00000000abcdef01LL, 0x0000000012345678LL, +#if BITS_PER_LONG == 32 + 0x8000000000000000LL, 0x8000000080000000LL, 0x8000000080000001LL, +#endif + }; + int64_t u, v, q, r; + int n, i, j, k, errors = 0; + + splat_vprint(file, SPLAT_GENERIC_TEST6_NAME, "%s", + "Testing signed 64-bit division.\n"); + n = sizeof(tabs) / sizeof(tabs[0]); + for (i = 0; i < n; i++) { + for (j = 1; j < n; j++) { + for (k = 0; k <= 3; k++) { + u = (k & 1) ? -tabs[i] : tabs[i]; + v = (k >= 2) ? -tabs[j] : tabs[j]; + + q = u / v; /* __divdi3 */ + r = u - q * v; + if (abs64(q) > abs64(u) || + abs64(r) >= abs64(v) || + (r != 0 && (r ^ u) < 0)) { + splat_vprint(file, + SPLAT_GENERIC_TEST6_NAME, + "%016llx/%016llx != %016llx " + "rem %016llx\n", u, v, q, r); + errors++; + } + } + } + } + + if (errors) { + splat_vprint(file, SPLAT_GENERIC_TEST6_NAME, + "Failed %d/%d tests\n", errors, n * (n - 1)); + return -ERANGE; + } + + splat_vprint(file, SPLAT_GENERIC_TEST6_NAME, + "Passed all %d tests\n", n * (n - 1)); + + return 0; +} + splat_subsystem_t * splat_generic_init(void) { @@ -208,6 +335,10 @@ splat_generic_init(void) SPLAT_GENERIC_TEST3_ID, splat_generic_test_strtoull); SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST4_NAME, SPLAT_GENERIC_TEST4_DESC, SPLAT_GENERIC_TEST4_ID, splat_generic_test_strtoll); + SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST5_NAME, SPLAT_GENERIC_TEST5_DESC, + SPLAT_GENERIC_TEST5_ID, splat_generic_test_udivdi3); + SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST6_NAME, SPLAT_GENERIC_TEST6_DESC, + SPLAT_GENERIC_TEST6_ID, splat_generic_test_divdi3); return sub; } @@ -217,6 +348,8 @@ splat_generic_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST6_ID); + SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST4_ID); SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST3_ID); SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST2_ID); diff --git a/spl_config.h.in b/spl_config.h.in index 48b610b32..5ed1991f9 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -57,12 +57,6 @@ /* device_create() is available */ #undef HAVE_DEVICE_CREATE -/* div64_64() is available */ -#undef HAVE_DIV64_64 - -/* div64_u64() is available */ -#undef HAVE_DIV64_U64 - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H From 82b8c8fa64737edfb203156b245b48840139d2c1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 13 Jul 2010 21:30:56 -0700 Subject: [PATCH 0418/1062] Proposed fix for low memory ZFS deadlocks Deadlocks in the zvol were observed when one of the ZFS threads performing IO trys to allocate memory while the system is low on memory. The low memory condition causes dirty pages to be synced to the zvol but this can't progress because the original thread is blocked waiting on a memory allocation. Thus we end up deadlocking. A proper solution proposed by Wizeman is to change KM_SLEEP from GFP_KERNEL top GFP_NOFS. This will prevent the memory allocation which is trying to allocate memory from forcing a sync to the zvol in shrink_page_list()->pageout(). The down side to all of this is that we are using a pretty big hammer by changing KM_SLEEP. This change means ALL of the zfs memory allocations will be until to trigger dirty data to be synced. The caller still should be able to reclaim memory from the various slab caches. We will be totally dependent of other kernel processes which happen to be running and a small number of asynchronous reclaim threads to trigger the reclaim of dirty data pages. This should be OK but I think we may see some slightly longer allocation times when under memory pressure. We shall see. --- include/sys/kmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 9688b116d..a5758bd61 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -42,7 +42,7 @@ /* * Memory allocation interfaces */ -#define KM_SLEEP GFP_KERNEL +#define KM_SLEEP GFP_NOFS #define KM_NOSLEEP GFP_ATOMIC #undef KM_PANIC /* No linux analog */ #define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) From f0ff89fc86873a96a3f60e86e1694775b664663e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 14 Jul 2010 11:26:54 -0700 Subject: [PATCH 0419/1062] Linux 2.6.35 compat: filp_fsync() dropped 'stuct dentry *' The prototype for filp_fsync() drop the unused argument 'stuct dentry *'. I've fixed this by adding the needed autoconf check and moving all of those filp related functions to file_compat.h. This will simplify handling any further API changes in the future. --- config/spl-build.m4 | 20 ++++++ configure | 130 ++++++++++++++++++++++++++++++++++++ include/linux/file_compat.h | 27 ++++++++ module/spl/spl-debug.c | 33 ++------- module/spl/spl-vnode.c | 2 +- spl_config.h.in | 3 + 6 files changed, 187 insertions(+), 28 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ae4e1f162..b908a56d5 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -76,6 +76,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PUT_TASK_STRUCT SPL_AC_5ARGS_PROC_HANDLER SPL_AC_KVASPRINTF + SPL_AC_3ARGS_FILE_FSYNC ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1438,3 +1439,22 @@ AC_DEFUN([SPL_AC_KVASPRINTF], [ [kvasprintf() is available])], []) ]) + +dnl # +dnl # 2.6.35 API change, +dnl # Unused 'struct dentry *' removed from prototype. +dnl # +AC_DEFUN([SPL_AC_3ARGS_FILE_FSYNC], [ + AC_MSG_CHECKING([whether file_fsync() wants 3 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + file_fsync(NULL, NULL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_FILE_FSYNC, 1, + [file_fsync() wants 3 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index 04da5953a..656f0425a 100755 --- a/configure +++ b/configure @@ -14905,6 +14905,71 @@ _ACEOF fi + + { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5 +$as_echo_n "checking whether file_fsync() wants 3 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + file_fsync(NULL, NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_FILE_FSYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + ;; user) if test "x$AWK" != xgawk; then @@ -18350,6 +18415,71 @@ _ACEOF + { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5 +$as_echo_n "checking whether file_fsync() wants 3 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + file_fsync(NULL, NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_FILE_FSYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + if test "x$AWK" != xgawk; then diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index d30e90356..b03373ebd 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -29,5 +29,32 @@ #include #endif +static inline struct file * +spl_filp_open(const char *name, int flags, int mode, int *err) +{ + struct file *filp = NULL; + int rc; + + filp = filp_open(name, flags, mode); + if (IS_ERR(filp)) { + rc = PTR_ERR(filp); + if (err) + *err = rc; + filp = NULL; + } + return filp; +} + +#define spl_filp_close(f) filp_close(f, NULL) +#define spl_filp_poff(f) (&(f)->f_pos) +#define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) + +#ifdef HAVE_3ARGS_FILE_FSYNC +#define spl_filp_fsync(fp, sync) (fp)->f_op->fsync((fp), \ + (fp)->f_dentry, sync) +#else +#define spl_filp_fsync(fp, sync) (fp)->f_op->fsync((fp), sync) +#endif + #endif /* SPL_FILE_COMPAT_H */ diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 6a1086241..75778752b 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -902,28 +903,6 @@ put_pages_back(struct page_collection *pc) put_pages_back_on_all_cpus(pc); } -static struct file * -trace_filp_open (const char *name, int flags, int mode, int *err) -{ - struct file *filp = NULL; - int rc; - - filp = filp_open(name, flags, mode); - if (IS_ERR(filp)) { - rc = PTR_ERR(filp); - printk(KERN_ERR "SPL: Can't open %s file: %d\n", name, rc); - if (err) - *err = rc; - filp = NULL; - } - return filp; -} - -#define trace_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) -#define trace_filp_fsync(fp) (fp)->f_op->fsync((fp),(fp)->f_dentry,1) -#define trace_filp_close(f) filp_close(f, NULL) -#define trace_filp_poff(f) (&(f)->f_pos) - static int spl_debug_dump_all_pages(dumplog_priv_t *dp, char *filename) { @@ -936,7 +915,7 @@ spl_debug_dump_all_pages(dumplog_priv_t *dp, char *filename) down_write(&trace_sem); - filp = trace_filp_open(filename, O_CREAT|O_EXCL|O_WRONLY|O_LARGEFILE, + filp = spl_filp_open(filename, O_CREAT|O_EXCL|O_WRONLY|O_LARGEFILE, 0600, &rc); if (filp == NULL) { if (rc != -EEXIST) @@ -958,8 +937,8 @@ spl_debug_dump_all_pages(dumplog_priv_t *dp, char *filename) list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { __ASSERT_TAGE_INVARIANT(tage); - rc = trace_filp_write(filp, page_address(tage->page), - tage->used, trace_filp_poff(filp)); + rc = spl_filp_write(filp, page_address(tage->page), + tage->used, spl_filp_poff(filp)); if (rc != (int)tage->used) { printk(KERN_WARNING "SPL: Wanted to write %u " "but wrote %d\n", tage->used, rc); @@ -973,11 +952,11 @@ spl_debug_dump_all_pages(dumplog_priv_t *dp, char *filename) set_fs(oldfs); - rc = trace_filp_fsync(filp); + rc = spl_filp_fsync(filp, 1); if (rc) printk(KERN_ERR "SPL: Unable to sync: %d\n", rc); close: - trace_filp_close(filp); + spl_filp_close(filp); out: up_write(&trace_sem); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index b5c34fbcd..c67fc4c7f 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -473,7 +473,7 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) if (flags & FDSYNC) datasync = 1; - RETURN(-file_fsync(vp->v_file, vp->v_file->f_dentry, datasync)); + RETURN(-spl_filp_fsync(vp->v_file, datasync)); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); diff --git a/spl_config.h.in b/spl_config.h.in index 5ed1991f9..8d57a63ea 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -18,6 +18,9 @@ /* vfs_unlink() wants 2 args */ #undef HAVE_2ARGS_VFS_UNLINK +/* file_fsync() wants 3 args */ +#undef HAVE_3ARGS_FILE_FSYNC + /* INIT_WORK wants 3 args */ #undef HAVE_3ARGS_INIT_WORK From d0bd694ca93b7e43dc6aa87a2dd39d51ee3478ea Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 14 Jul 2010 11:53:57 -0700 Subject: [PATCH 0420/1062] Fix -Werror=format-security compiler option Noticed under Ubuntu kernel builds we should be passing a format specifier and the string, not just the string. --- module/spl/spl-thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 1345890ed..bce912c4d 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -123,7 +123,8 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp->tp_state = state; tp->tp_pri = pri; - tsk = kthread_create(thread_generic_wrapper, (void *)tp, tp->tp_name); + tsk = kthread_create(thread_generic_wrapper, (void *)tp, + "%s", tp->tp_name); if (IS_ERR(tsk)) { CERROR("Failed to create thread: %ld\n", PTR_ERR(tsk)); RETURN(NULL); From 8f813bb168eb21cd5d64b930ee015dcf93575331 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Thu, 15 Jul 2010 09:49:38 -0700 Subject: [PATCH 0421/1062] Proposed fix for oops on SIGINT in splat atomic:64-bit test. The threads in the splat atomic:64-bit test share the data structure atomic_priv_t ap, which lives on the kernel stack of the splat user-space utility. If splat terminates before the threads, accesses to that memory location by the other threads become invalid. Splat synchronizes with the threads with the call: wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap, i)); Apparently, the SIGINT wakes and terminates splat prematurely, so that GPFs or other bad things happen when the threads subsequently access ap. This commit prevents this by using the uninterruptible form: wait_event(ap.ap_waitq, splat_atomic_test1_cond(&ap, i)); --- module/splat/splat-atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index 9cdaa69df..fd86a9fa8 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -165,7 +165,7 @@ splat_atomic_test1(struct file *file, void *arg) schedule(); } - wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap, i)); + wait_event(ap.ap_waitq, splat_atomic_test1_cond(&ap, i)); if (rc) { splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, "Only started " From 55abb0929e4fbe326a9737650a167a1a988ad86b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 19 Jul 2010 14:16:05 -0700 Subject: [PATCH 0422/1062] Split header To avoid symbol conflicts with dependent packages the debug header must be split in to several parts. The header now only contains the Solaris macro's such as ASSERT and VERIFY. The spl-debug.h header contain the spl specific debugging infrastructure and should be included by any package which needs to use the spl logging. Finally the spl-trace.h header contains internal data structures only used for the log facility and should not be included by anythign by spl-debug.c. This way dependent packages can include the standard Solaris headers without picking up any SPL debug macros. However, if the dependant package want to integrate with the SPL debugging subsystem they can then explicitly include spl-debug.h. Along with this change I have dropped the CHECK_STACK macros because the upstream Linux kernel now has much better stack depth checking built in and we don't need this complexity. Additionally SBUG has been replaced with PANIC and provided as part of the Solaris macro set. While the Solaris version is really panic() that conflicts with the Linux kernel so we'll just have to make due to PANIC. It should rarely be called directly, the prefered usage would be an ASSERT or VERIFY. There's lots of change here but this cleanup was overdue. --- include/linux/file_compat.h | 1 + include/spl-debug.h | 181 +++++++++++++ include/spl-trace.h | 132 ++++++++++ include/sys/debug.h | 462 ++++++---------------------------- include/sys/kmem.h | 1 - include/sys/rwlock.h | 4 +- include/sys/signal.h | 2 + include/sys/sunddi.h | 2 - include/sys/thread.h | 2 +- module/spl/spl-condvar.c | 1 + module/spl/spl-debug.c | 70 +++--- module/spl/spl-err.c | 3 +- module/spl/spl-generic.c | 5 +- module/spl/spl-kmem.c | 1 + module/spl/spl-kobj.c | 1 + module/spl/spl-kstat.c | 13 +- module/spl/spl-module.c | 2 +- module/spl/spl-proc.c | 10 +- module/spl/spl-taskq.c | 13 +- module/spl/spl-thread.c | 1 + module/spl/spl-vnode.c | 3 +- module/spl/spl-xdr.c | 3 +- module/splat/splat-atomic.c | 2 +- module/splat/splat-internal.h | 1 + scripts/check.sh | 2 +- 25 files changed, 460 insertions(+), 458 deletions(-) create mode 100644 include/spl-debug.h create mode 100644 include/spl-trace.h diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index b03373ebd..77d5a27c3 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -25,6 +25,7 @@ #ifndef _SPL_FILE_COMPAT_H #define _SPL_FILE_COMPAT_H +#include #ifdef HAVE_FDTABLE_HEADER #include #endif diff --git a/include/spl-debug.h b/include/spl-debug.h new file mode 100644 index 000000000..b5ca64f87 --- /dev/null +++ b/include/spl-debug.h @@ -0,0 +1,181 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +/* + * Available debug functions. These function should be used by any + * package which needs to integrate with the SPL log infrastructure. + * + * CDEBUG() - Log debug message with specified mask. + * CDEBUG_LIMIT() - Log just 1 debug message with specified mask. + * CWARN() - Log a warning message. + * CERROR() - Log an error message. + * CEMERG() - Log an emergency error message. + * CONSOLE() - Log a generic message to the console. + * + * ENTRY - Log entry point to a function. + * EXIT - Log exit point from a function. + * RETURN(x) - Log return from a function. + * GOTO(x, y) - Log goto within a function. + */ + +#ifndef _SPL_DEBUG_INTERNAL_H +#define _SPL_DEBUG_INTERNAL_H + +#include + +#define S_UNDEFINED 0x00000001 +#define S_ATOMIC 0x00000002 +#define S_KOBJ 0x00000004 +#define S_VNODE 0x00000008 +#define S_TIME 0x00000010 +#define S_RWLOCK 0x00000020 +#define S_THREAD 0x00000040 +#define S_CONDVAR 0x00000080 +#define S_MUTEX 0x00000100 +#define S_RNG 0x00000200 +#define S_TASKQ 0x00000400 +#define S_KMEM 0x00000800 +#define S_DEBUG 0x00001000 +#define S_GENERIC 0x00002000 +#define S_PROC 0x00004000 +#define S_MODULE 0x00008000 +#define S_CRED 0x00010000 + +#define D_TRACE 0x00000001 +#define D_INFO 0x00000002 +#define D_WARNING 0x00000004 +#define D_ERROR 0x00000008 +#define D_EMERG 0x00000010 +#define D_CONSOLE 0x00000020 +#define D_IOCTL 0x00000040 +#define D_DPRINTF 0x00000080 +#define D_OTHER 0x00000100 + +#define D_CANTMASK (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE) +#define DEBUG_SUBSYSTEM S_UNDEFINED + +#ifdef NDEBUG /* Debugging Disabled */ + +#define CDEBUG(mask, fmt, a...) ((void)0) +#define CDEBUG_LIMIT(x, y, fmt, a...) ((void)0) +#define CWARN(fmt, a...) ((void)0) +#define CERROR(fmt, a...) ((void)0) +#define CEMERG(fmt, a...) ((void)0) +#define CONSOLE(mask, fmt, a...) ((void)0) + +#define ENTRY ((void)0) +#define EXIT ((void)0) +#define RETURN(x) return (x) +#define GOTO(x, y) { ((void)(y)); goto x; } + +#else /* Debugging Enabled */ + +#define __CDEBUG(cdls, subsys, mask, format, a...) \ +do { \ + if (((mask) & D_CANTMASK) != 0 || \ + ((spl_debug_mask & (mask)) != 0 && \ + (spl_debug_subsys & (subsys)) != 0)) \ + spl_debug_msg(cdls, subsys, mask, __FILE__, \ + __FUNCTION__, __LINE__, format, ## a); \ +} while (0) + +#define CDEBUG(mask, format, a...) \ + __CDEBUG(NULL, DEBUG_SUBSYSTEM, mask, format, ## a) + +#define __CDEBUG_LIMIT(subsys, mask, format, a...) \ +do { \ + static spl_debug_limit_state_t cdls; \ + \ + __CDEBUG(&cdls, subsys, mask, format, ## a); \ +} while (0) + +#define CDEBUG_LIMIT(mask, format, a...) \ + __CDEBUG_LIMIT(DEBUG_SUBSYSTEM, mask, format, ## a) + +#define CWARN(fmt, a...) CDEBUG_LIMIT(D_WARNING, fmt, ## a) +#define CERROR(fmt, a...) CDEBUG_LIMIT(D_ERROR, fmt, ## a) +#define CEMERG(fmt, a...) CDEBUG_LIMIT(D_EMERG, fmt, ## a) +#define CONSOLE(mask, fmt, a...) CDEBUG(D_CONSOLE | (mask), fmt, ## a) + +#define ENTRY CDEBUG(D_TRACE, "Process entered\n") +#define EXIT CDEBUG(D_TRACE, "Process leaving\n") + +#define RETURN(rc) \ +do { \ + typeof(rc) RETURN__ret = (rc); \ + CDEBUG(D_TRACE, "Process leaving (rc=%lu : %ld : %lx)\n", \ + (long)RETURN__ret, (long)RETURN__ret, (long)RETURN__ret); \ + return RETURN__ret; \ +} while (0) + +#define GOTO(label, rc) \ +do { \ + long GOTO__ret = (long)(rc); \ + CDEBUG(D_TRACE,"Process leaving via %s (rc=%lu : %ld : %lx)\n", \ + #label, (unsigned long)GOTO__ret, (signed long)GOTO__ret, \ + (signed long)GOTO__ret); \ + goto label; \ +} while (0) + +#endif /* NDEBUG */ + +typedef struct { + unsigned long cdls_next; + int cdls_count; + long cdls_delay; +} spl_debug_limit_state_t; + +/* Global debug variables */ +extern unsigned long spl_debug_subsys; +extern unsigned long spl_debug_mask; +extern unsigned long spl_debug_printk; +extern int spl_debug_mb; +extern unsigned int spl_debug_binary; +extern unsigned int spl_debug_catastrophe; +extern unsigned int spl_debug_panic_on_bug; +extern char spl_debug_file_path[PATH_MAX]; +extern unsigned int spl_console_ratelimit; +extern long spl_console_max_delay; +extern long spl_console_min_delay; +extern unsigned int spl_console_backoff; +extern unsigned int spl_debug_stack; + +/* Exported debug functions */ +extern int spl_debug_mask2str(char *str, int size, unsigned long mask, int ss); +extern int spl_debug_str2mask(unsigned long *mask, const char *str, int ss); +extern unsigned long spl_debug_set_mask(unsigned long mask); +extern unsigned long spl_debug_get_mask(void); +extern unsigned long spl_debug_set_subsys(unsigned long mask); +extern unsigned long spl_debug_get_subsys(void); +extern int spl_debug_set_mb(int mb); +extern int spl_debug_get_mb(void); +extern int spl_debug_dumplog(int flags); +extern void spl_debug_dumpstack(struct task_struct *tsk); +extern int spl_debug_clear_buffer(void); +extern int spl_debug_mark_buffer(char *text); + +int debug_init(void); +void debug_fini(void); + +#endif /* SPL_DEBUG_INTERNAL_H */ diff --git a/include/spl-trace.h b/include/spl-trace.h new file mode 100644 index 000000000..709b1326e --- /dev/null +++ b/include/spl-trace.h @@ -0,0 +1,132 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_TRACE_H +#define _SPL_TRACE_H + +#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) +#define TCD_STOCK_PAGES (TCD_MAX_PAGES) +#define TRACE_CONSOLE_BUFFER_SIZE 1024 + +#define SPL_DEFAULT_MAX_DELAY (600 * HZ) +#define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2) +#define SPL_DEFAULT_BACKOFF 2 + +#define DL_NOTHREAD 0x0001 /* Do not create a new thread */ +#define DL_SINGLE_CPU 0x0002 /* Collect pages from this CPU*/ + +typedef struct dumplog_priv { + wait_queue_head_t dp_waitq; + pid_t dp_pid; + int dp_flags; + atomic_t dp_done; +} dumplog_priv_t; + +/* Three trace data types */ +typedef enum { + TCD_TYPE_PROC, + TCD_TYPE_SOFTIRQ, + TCD_TYPE_IRQ, + TCD_TYPE_MAX +} tcd_type_t; + +union trace_data_union { + struct trace_cpu_data { + /* pages with trace records not yet processed by tracefiled */ + struct list_head tcd_pages; + /* number of pages on ->tcd_pages */ + unsigned long tcd_cur_pages; + /* Max number of pages allowed on ->tcd_pages */ + unsigned long tcd_max_pages; + + /* + * preallocated pages to write trace records into. Pages from + * ->tcd_stock_pages are moved to ->tcd_pages by spl_debug_msg(). + * + * This list is necessary, because on some platforms it's + * impossible to perform efficient atomic page allocation in a + * non-blockable context. + * + * Such platforms fill ->tcd_stock_pages "on occasion", when + * tracing code is entered in blockable context. + * + * trace_get_tage_try() tries to get a page from + * ->tcd_stock_pages first and resorts to atomic page + * allocation only if this queue is empty. ->tcd_stock_pages + * is replenished when tracing code is entered in blocking + * context (darwin-tracefile.c:trace_get_tcd()). We try to + * maintain TCD_STOCK_PAGES (40 by default) pages in this + * queue. Atomic allocation is only required if more than + * TCD_STOCK_PAGES pagesful are consumed by trace records all + * emitted in non-blocking contexts. Which is quite unlikely. + */ + struct list_head tcd_stock_pages; + /* number of pages on ->tcd_stock_pages */ + unsigned long tcd_cur_stock_pages; + + unsigned short tcd_shutting_down; + unsigned short tcd_cpu; + unsigned short tcd_type; + /* The factors to share debug memory. */ + unsigned short tcd_pages_factor; + + /* + * This spinlock is needed to workaround the problem of + * set_cpus_allowed() being GPL-only. Since we cannot + * schedule a thread on a specific CPU when dumping the + * pages, we must use the spinlock for mutual exclusion. + */ + spinlock_t tcd_lock; + unsigned long tcd_lock_flags; + } tcd; + char __pad[L1_CACHE_ALIGN(sizeof(struct trace_cpu_data))]; +}; + +extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; + +#define tcd_for_each(tcd, i, j) \ + for (i = 0; i < TCD_TYPE_MAX && trace_data[i]; i++) \ + for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ + j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) + +#define tcd_for_each_type_lock(tcd, i, cpu) \ + for (i = 0; i < TCD_TYPE_MAX && trace_data[i] && \ + (tcd = &(*trace_data[i])[cpu].tcd) && \ + trace_lock_tcd(tcd); trace_unlock_tcd(tcd), i++) + +struct trace_page { + struct page *page; /* page itself */ + struct list_head linkage; /* Used by trace_data_union */ + unsigned int used; /* number of bytes used within this page */ + unsigned short cpu; /* cpu that owns this page */ + unsigned short type; /* type(context) of this page */ +}; + +struct page_collection { + struct list_head pc_pages; + spinlock_t pc_lock; + int pc_want_daemon_pages; +}; + +#endif /* SPL_TRACE_H */ diff --git a/include/sys/debug.h b/include/sys/debug.h index 848c885a6..0da7e31bb 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -22,420 +22,118 @@ * with the SPL. If not, see . \*****************************************************************************/ +/* + * Available Solaris debug functions. All of the ASSERT() macros will be + * compiled out when NDEBUG is defined, this is the default behavior for + * the SPL. To enable assertions use the --enable-debug with configure. + * The VERIFY() functions are never compiled out and cannot be disabled. + * + * PANIC() - Panic the node and print message. + * ASSERT() - Assert X is true, if not panic. + * ASSERTF() - Assert X is true, if not panic and print message. + * ASSERTV() - Wraps a variable declaration which is only used by ASSERT(). + * ASSERT3S() - Assert signed X OP Y is true, if not panic. + * ASSERT3U() - Assert unsigned X OP Y is true, if not panic. + * ASSERT3P() - Assert pointer X OP Y is true, if not panic. + * VERIFY() - Verify X is true, if not panic. + * VERIFY3S() - Verify signed X OP Y is true, if not panic. + * VERIFY3U() - Verify unsigned X OP Y is true, if not panic. + * VERIFY3P() - Verify pointer X OP Y is true, if not panic. + */ + #ifndef _SPL_DEBUG_H #define _SPL_DEBUG_H -#include /* THREAD_SIZE */ -#include +#ifdef NDEBUG /* Debugging Disabled */ -extern unsigned long spl_debug_mask; -extern unsigned long spl_debug_subsys; - -#define S_UNDEFINED 0x00000001 -#define S_ATOMIC 0x00000002 -#define S_KOBJ 0x00000004 -#define S_VNODE 0x00000008 -#define S_TIME 0x00000010 -#define S_RWLOCK 0x00000020 -#define S_THREAD 0x00000040 -#define S_CONDVAR 0x00000080 -#define S_MUTEX 0x00000100 -#define S_RNG 0x00000200 -#define S_TASKQ 0x00000400 -#define S_KMEM 0x00000800 -#define S_DEBUG 0x00001000 -#define S_GENERIC 0x00002000 -#define S_PROC 0x00004000 -#define S_MODULE 0x00008000 -#define S_CRED 0x00010000 - -#define D_TRACE 0x00000001 -#define D_INFO 0x00000002 -#define D_WARNING 0x00000004 -#define D_ERROR 0x00000008 -#define D_EMERG 0x00000010 -#define D_CONSOLE 0x00000020 -#define D_IOCTL 0x00000040 -#define D_DPRINTF 0x00000080 -#define D_OTHER 0x00000100 - -#define D_CANTMASK (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE) -#define DEBUG_SUBSYSTEM S_UNDEFINED - -int debug_init(void); -void debug_fini(void); -int spl_debug_mask2str(char *str, int size, unsigned long mask, int is_subsys); -int spl_debug_str2mask(unsigned long *mask, const char *str, int is_subsys); - -extern unsigned long spl_debug_subsys; -extern unsigned long spl_debug_mask; -extern unsigned long spl_debug_printk; -extern int spl_debug_mb; -extern unsigned int spl_debug_binary; -extern unsigned int spl_debug_catastrophe; -extern unsigned int spl_debug_panic_on_bug; -extern char spl_debug_file_path[PATH_MAX]; -extern unsigned int spl_console_ratelimit; -extern long spl_console_max_delay; -extern long spl_console_min_delay; -extern unsigned int spl_console_backoff; -extern unsigned int spl_debug_stack; - -#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) -#define TCD_STOCK_PAGES (TCD_MAX_PAGES) -#define TRACE_CONSOLE_BUFFER_SIZE 1024 - -#define SPL_DEFAULT_MAX_DELAY (600 * HZ) -#define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2) -#define SPL_DEFAULT_BACKOFF 2 - -#define DL_NOTHREAD 0x0001 /* Do not create a new thread */ -#define DL_SINGLE_CPU 0x0002 /* Collect pages from this CPU */ - -typedef struct dumplog_priv { - wait_queue_head_t dp_waitq; - pid_t dp_pid; - int dp_flags; - atomic_t dp_done; -} dumplog_priv_t; - -typedef struct { - unsigned long cdls_next; - int cdls_count; - long cdls_delay; -} spl_debug_limit_state_t; - -/* Three trace data types */ -typedef enum { - TCD_TYPE_PROC, - TCD_TYPE_SOFTIRQ, - TCD_TYPE_IRQ, - TCD_TYPE_MAX -} tcd_type_t; - -union trace_data_union { - struct trace_cpu_data { - /* pages with trace records not yet processed by tracefiled */ - struct list_head tcd_pages; - /* number of pages on ->tcd_pages */ - unsigned long tcd_cur_pages; - /* Max number of pages allowed on ->tcd_pages */ - unsigned long tcd_max_pages; - - /* - * preallocated pages to write trace records into. Pages from - * ->tcd_stock_pages are moved to ->tcd_pages by spl_debug_msg(). - * - * This list is necessary, because on some platforms it's - * impossible to perform efficient atomic page allocation in a - * non-blockable context. - * - * Such platforms fill ->tcd_stock_pages "on occasion", when - * tracing code is entered in blockable context. - * - * trace_get_tage_try() tries to get a page from - * ->tcd_stock_pages first and resorts to atomic page - * allocation only if this queue is empty. ->tcd_stock_pages - * is replenished when tracing code is entered in blocking - * context (darwin-tracefile.c:trace_get_tcd()). We try to - * maintain TCD_STOCK_PAGES (40 by default) pages in this - * queue. Atomic allocation is only required if more than - * TCD_STOCK_PAGES pagesful are consumed by trace records all - * emitted in non-blocking contexts. Which is quite unlikely. - */ - struct list_head tcd_stock_pages; - /* number of pages on ->tcd_stock_pages */ - unsigned long tcd_cur_stock_pages; - - unsigned short tcd_shutting_down; - unsigned short tcd_cpu; - unsigned short tcd_type; - /* The factors to share debug memory. */ - unsigned short tcd_pages_factor; - - /* - * This spinlock is needed to workaround the problem of - * set_cpus_allowed() being GPL-only. Since we cannot - * schedule a thread on a specific CPU when dumping the - * pages, we must use the spinlock for mutual exclusion. - */ - spinlock_t tcd_lock; - unsigned long tcd_lock_flags; - } tcd; - char __pad[L1_CACHE_ALIGN(sizeof(struct trace_cpu_data))]; -}; - -extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; - -#define tcd_for_each(tcd, i, j) \ - for (i = 0; i < TCD_TYPE_MAX && trace_data[i]; i++) \ - for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ - j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) - -#define tcd_for_each_type_lock(tcd, i, cpu) \ - for (i = 0; i < TCD_TYPE_MAX && trace_data[i] && \ - (tcd = &(*trace_data[i])[cpu].tcd) && \ - trace_lock_tcd(tcd); trace_unlock_tcd(tcd), i++) - -struct trace_page { - struct page * page; /* page itself */ - struct list_head linkage; /* Used by lists in trace_data_union */ - unsigned int used; /* number of bytes used within this page */ - unsigned short cpu; /* cpu that owns this page */ - unsigned short type; /* type(context) of this page */ -}; - -struct page_collection { - struct list_head pc_pages; - spinlock_t pc_lock; - int pc_want_daemon_pages; -}; - -#define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); - -#ifdef NDEBUG - -#define CDEBUG_STACK() (0) -#define CDEBUG_LIMIT(x, y, z, a...) ((void)0) -#define __CDEBUG_LIMIT(x, y, z, a...) ((void)0) -#define CDEBUG(mask, format, a...) ((void)0) -#define CWARN(fmt, a...) ((void)0) -#define CERROR(fmt, a...) ((void)0) -#define CEMERG(fmt, a...) ((void)0) -#define CONSOLE(mask, fmt, a...) ((void)0) - -#define ENTRY ((void)0) -#define EXIT ((void)0) -#define RETURN(x) return (x) -#define GOTO(x, y) { ((void)(y)); goto x; } +#define PANIC(fmt, a...) \ +do { \ + printk(KERN_EMERG fmt, ## a); \ + spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); \ +} while (0) #define __ASSERT(x) ((void)0) -#define __ASSERT_TAGE_INVARIANT(x) ((void)0) #define ASSERT(x) ((void)0) #define ASSERTF(x, y, z...) ((void)0) #define ASSERTV(x) -#define VERIFY(cond) \ -do { \ - if (unlikely(!(cond))) { \ - printk(KERN_ERR "VERIFY(" #cond ") failed\n"); \ - SBUG(); \ - } \ +#define VERIFY(cond) \ +do { \ + if (unlikely(!(cond))) \ + PANIC("VERIFY(" #cond ") failed\n"); \ } while (0) -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ -do { \ - if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ - printk(KERN_ERR \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (" FMT " " #OP " " FMT ")\n", \ - CAST (LEFT), CAST (RIGHT)); \ - SBUG(); \ - } \ +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ +do { \ + if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) \ + PANIC("VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ + CAST (LEFT), CAST (RIGHT)); \ } while (0) -#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) -#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ - (unsigned long long)) -#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) +#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ + (unsigned long long)) +#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define ASSERT3S(x,y,z) ((void)0) -#define ASSERT3U(x,y,z) ((void)0) -#define ASSERT3P(x,y,z) ((void)0) +#define ASSERT3S(x,y,z) ((void)0) +#define ASSERT3U(x,y,z) ((void)0) +#define ASSERT3P(x,y,z) ((void)0) -#else /* NDEBUG */ +#else /* Debugging Enabled */ -#ifdef __ia64__ -#define CDEBUG_STACK() (THREAD_SIZE - \ - ((unsigned long)__builtin_dwarf_cfa() & \ - (THREAD_SIZE - 1))) -#else -#define CDEBUG_STACK() (THREAD_SIZE - \ - ((unsigned long)__builtin_frame_address(0) & \ - (THREAD_SIZE - 1))) -# endif /* __ia64__ */ - -/* DL_SINGLE_CPU flag is passed to spl_debug_bug() because we are about - * to over run our stack and likely damage at least one other unknown - * thread stack. We must finish generating the needed debug info within - * this thread context because once we yeild the CPU its very likely - * the system will crash. - */ -#define __CHECK_STACK(file, func, line) \ -do { \ - if (unlikely(CDEBUG_STACK() > spl_debug_stack)) { \ - spl_debug_stack = CDEBUG_STACK(); \ - \ - if (unlikely(CDEBUG_STACK() > (4 * THREAD_SIZE) / 5)) { \ - spl_debug_msg(NULL, D_TRACE, D_WARNING, \ - file, func, line, "Error " \ - "exceeded maximum safe stack " \ - "size (%lu/%lu)\n", \ - CDEBUG_STACK(), THREAD_SIZE); \ - spl_debug_bug(file, func, line, DL_SINGLE_CPU); \ - } \ - } \ +#define PANIC(fmt, a...) \ +do { \ + spl_debug_msg(NULL, 0, 0, \ + __FILE__, __FUNCTION__, __LINE__, fmt, ## a); \ + spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); \ } while (0) -/* NOTE: The run time stack overflow checking is being disabled by default - * because it is not safe for use with 2.6.29 and latter kernels. These - * kernels do now have their own stack overflow checking so this support - * has become redundant anyway. It can be re-enabled for older kernels or - * arches without stack overflow checking by redefining CHECK_STACK(). - * - * #define CHECK_STACK() __CHECK_STACK(__FILE__, __func__, __LINE__) - */ -#define CHECK_STACK() ((void)0) - /* ASSERTION that is safe to use within the debug system */ -#define __ASSERT(cond) \ -do { \ - if (unlikely(!(cond))) { \ - printk(KERN_ERR "ASSERTION(" #cond ") failed\n"); \ - BUG(); \ - } \ +#define __ASSERT(cond) \ +do { \ + if (unlikely(!(cond))) { \ + printk(KERN_EMERG "ASSERTION(" #cond ") failed\n"); \ + BUG(); \ + } \ } while (0) -#define __ASSERT_TAGE_INVARIANT(tage) \ -do { \ - __ASSERT(tage != NULL); \ - __ASSERT(tage->page != NULL); \ - __ASSERT(tage->used <= PAGE_SIZE); \ - __ASSERT(page_count(tage->page) > 0); \ -} while(0) - /* ASSERTION that will debug log used outside the debug sysytem */ -#define ASSERT(cond) \ -do { \ - CHECK_STACK(); \ - \ - if (unlikely(!(cond))) { \ - spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ - __FILE__, __FUNCTION__, __LINE__, \ - "ASSERTION(" #cond ") failed\n"); \ - SBUG(); \ - } \ +#define ASSERT(cond) \ +do { \ + if (unlikely(!(cond))) \ + PANIC("ASSERTION(" #cond ") failed\n"); \ } while (0) -#define ASSERTF(cond, fmt, a...) \ -do { \ - CHECK_STACK(); \ - \ - if (unlikely(!(cond))) { \ - spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ - __FILE__, __FUNCTION__, __LINE__, \ - "ASSERTION(" #cond ") failed: " fmt, \ - ## a); \ - SBUG(); \ - } \ +#define ASSERTF(cond, fmt, a...) \ +do { \ + if (unlikely(!(cond))) \ + PANIC("ASSERTION(" #cond ") failed: " fmt, ## a); \ } while (0) -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ -do { \ - CHECK_STACK(); \ - \ - if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ - spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ - __FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (" FMT " " #OP " " FMT ")\n", \ - CAST (LEFT), CAST (RIGHT)); \ - SBUG(); \ - } \ +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ +do { \ + if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) \ + PANIC("VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ + CAST (LEFT), CAST (RIGHT)); \ } while (0) -#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) -#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ - (unsigned long long)) -#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) +#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ + (unsigned long long)) +#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define ASSERT3S(x,y,z) VERIFY3S(x, y, z) -#define ASSERT3U(x,y,z) VERIFY3U(x, y, z) -#define ASSERT3P(x,y,z) VERIFY3P(x, y, z) +#define ASSERT3S(x,y,z) VERIFY3S(x, y, z) +#define ASSERT3U(x,y,z) VERIFY3U(x, y, z) +#define ASSERT3P(x,y,z) VERIFY3P(x, y, z) -#define ASSERTV(x) x -#define VERIFY(x) ASSERT(x) +#define ASSERTV(x) x +#define VERIFY(x) ASSERT(x) -#define __CDEBUG(cdls, subsys, mask, format, a...) \ -do { \ - CHECK_STACK(); \ - \ - if (((mask) & D_CANTMASK) != 0 || \ - ((spl_debug_mask & (mask)) != 0 && \ - (spl_debug_subsys & (subsys)) != 0)) \ - spl_debug_msg(cdls, subsys, mask, \ - __FILE__, __FUNCTION__, __LINE__, \ - format, ## a); \ -} while (0) - -#define CDEBUG(mask, format, a...) \ - __CDEBUG(NULL, DEBUG_SUBSYSTEM, mask, format, ## a) - -#define __CDEBUG_LIMIT(subsys, mask, format, a...) \ -do { \ - static spl_debug_limit_state_t cdls; \ - \ - __CDEBUG(&cdls, subsys, mask, format, ## a); \ -} while (0) - -#define CDEBUG_LIMIT(mask, format, a...) \ - __CDEBUG_LIMIT(DEBUG_SUBSYSTEM, mask, format, ## a) - -#define CWARN(fmt, a...) CDEBUG_LIMIT(D_WARNING, fmt, ## a) -#define CERROR(fmt, a...) CDEBUG_LIMIT(D_ERROR, fmt, ## a) -#define CEMERG(fmt, a...) CDEBUG_LIMIT(D_EMERG, fmt, ## a) -#define CONSOLE(mask, fmt, a...) CDEBUG(D_CONSOLE | (mask), fmt, ## a) - -#define GOTO(label, rc) \ -do { \ - long GOTO__ret = (long)(rc); \ - CDEBUG(D_TRACE,"Process leaving via %s (rc=%lu : %ld : %lx)\n", \ - #label, (unsigned long)GOTO__ret, (signed long)GOTO__ret,\ - (signed long)GOTO__ret); \ - goto label; \ -} while (0) - -#define RETURN(rc) \ -do { \ - typeof(rc) RETURN__ret = (rc); \ - CDEBUG(D_TRACE, "Process leaving (rc=%lu : %ld : %lx)\n", \ - (long)RETURN__ret, (long)RETURN__ret, (long)RETURN__ret);\ - return RETURN__ret; \ -} while (0) - -#define __ENTRY(subsys) \ -do { \ - __CDEBUG(NULL, subsys, D_TRACE, "Process entered\n"); \ -} while (0) - -#define __EXIT(subsys) \ -do { \ - __CDEBUG(NULL, subsys, D_TRACE, "Process leaving\n"); \ -} while(0) - -#define ENTRY __ENTRY(DEBUG_SUBSYSTEM) -#define EXIT __EXIT(DEBUG_SUBSYSTEM) #endif /* NDEBUG */ -#define spl_debug_msg(cdls, subsys, mask, file, fn, line, format, a...) \ - spl_debug_vmsg(cdls, subsys, mask, file, fn, \ - line, NULL, NULL, format, ##a) - -extern int spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, - const char *file, const char *fn, const int line, - const char *format1, va_list args, const char *format2, ...); - -extern unsigned long spl_debug_set_mask(unsigned long mask); -extern unsigned long spl_debug_get_mask(void); -extern unsigned long spl_debug_set_subsys(unsigned long mask); -extern unsigned long spl_debug_get_subsys(void); -extern int spl_debug_set_mb(int mb); -extern int spl_debug_get_mb(void); - -extern int spl_debug_dumplog(int flags); -extern void spl_debug_dumpstack(struct task_struct *tsk); -extern void spl_debug_bug(char *file, const char *func, const int line, int flags); - -extern int spl_debug_clear_buffer(void); -extern int spl_debug_mark_buffer(char *text); +extern void spl_debug_bug(char *file, const char *fn, const int line, int fl); +extern int spl_debug_msg(void *arg, int subsys, int mask, const char *file, + const char *fn, const int line, const char *format, ...); #endif /* SPL_DEBUG_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index a5758bd61..17b3a2276 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index e2be77c54..eb763ec78 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -156,7 +156,7 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_set_owner(rwp); \ break; \ default: \ - SBUG(); \ + VERIFY(0); \ } \ _rc_; \ }) @@ -172,7 +172,7 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_set_owner(rwp); \ break; \ default: \ - SBUG(); \ + VERIFY(0); \ } \ }) diff --git a/include/sys/signal.h b/include/sys/signal.h index c7e293968..254bf0641 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -25,6 +25,8 @@ #ifndef _SPL_SIGNAL_H #define _SPL_SIGNAL_H +#include + #define FORREAL 0 /* Usual side-effects */ #define JUSTLOOKING 1 /* Don't stop the process */ diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index c48066b9c..65df2a053 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -268,7 +268,6 @@ ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, rc = PTR_ERR(di->di_class); di->di_class = NULL; ddi_remove_minor_node(di, name); - CERROR("Error creating %s class, %d\n", name, rc); return DDI_FAILURE; } @@ -285,7 +284,6 @@ ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, if (name) { rc = __mod_mknod(di->di_name, "c", di->di_major, di->di_minor); if (rc) { - CERROR("Error mknod %s, %d\n", di->di_name, rc); ddi_remove_minor_node(di, name); } } diff --git a/include/sys/thread.h b/include/sys/thread.h index e29715d83..06db6d4c9 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -48,7 +48,7 @@ typedef void (*thread_func_t)(void *); __thread_create(stk, stksize, (thread_func_t)func, \ #func, arg, len, pp, state, pri) #define thread_exit() __thread_exit() -#define thread_join(t) SBUG() +#define thread_join(t) VERIFY(0) #define curthread get_current() extern kthread_t *__thread_create(caddr_t stk, size_t stksize, diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 269b0ab61..002dcdb45 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 75778752b..5284eb339 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -37,7 +37,8 @@ #include #include #include -#include +#include +#include #include #ifdef DEBUG_SUBSYSTEM @@ -48,17 +49,17 @@ unsigned long spl_debug_subsys = ~0; EXPORT_SYMBOL(spl_debug_subsys); -module_param(spl_debug_subsys, long, 0644); +module_param(spl_debug_subsys, ulong, 0644); MODULE_PARM_DESC(spl_debug_subsys, "Subsystem debugging level mask."); unsigned long spl_debug_mask = (D_EMERG | D_ERROR | D_WARNING | D_CONSOLE); EXPORT_SYMBOL(spl_debug_mask); -module_param(spl_debug_mask, long, 0644); +module_param(spl_debug_mask, ulong, 0644); MODULE_PARM_DESC(spl_debug_mask, "Debugging level mask."); unsigned long spl_debug_printk = D_CANTMASK; EXPORT_SYMBOL(spl_debug_printk); -module_param(spl_debug_printk, long, 0644); +module_param(spl_debug_printk, ulong, 0644); MODULE_PARM_DESC(spl_debug_printk, "Console printk level mask."); int spl_debug_mb = -1; @@ -74,7 +75,7 @@ EXPORT_SYMBOL(spl_debug_catastrophe); unsigned int spl_debug_panic_on_bug = 0; EXPORT_SYMBOL(spl_debug_panic_on_bug); -module_param(spl_debug_panic_on_bug, int, 0644); +module_param(spl_debug_panic_on_bug, uint, 0644); MODULE_PARM_DESC(spl_debug_panic_on_bug, "Panic on BUG"); static char spl_debug_file_name[PATH_MAX]; @@ -633,10 +634,10 @@ trace_get_tage(struct trace_cpu_data *tcd, unsigned long len) } int -spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, - const char *file, const char *fn, const int line, - const char *format1, va_list args, const char *format2, ...) +spl_debug_msg(void *arg, int subsys, int mask, const char *file, + const char *fn, const int line, const char *format, ...) { + spl_debug_limit_state_t *cdls = arg; struct trace_cpu_data *tcd = NULL; struct spl_debug_header header = { 0, }; struct trace_page *tage; @@ -650,10 +651,16 @@ spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, int i; int remain; + if (subsys == 0) + subsys = DEBUG_SUBSYSTEM; + + if (mask == 0) + mask = D_EMERG; + if (strchr(file, '/')) file = strrchr(file, '/') + 1; - trace_set_debug_header(&header, subsys, mask, line, CDEBUG_STACK()); + trace_set_debug_header(&header, subsys, mask, line, 0); tcd = trace_get_tcd(); if (tcd == NULL) @@ -698,19 +705,14 @@ spl_debug_vmsg(spl_debug_limit_state_t *cdls, int subsys, int mask, } needed = 0; - if (format1) { - va_copy(ap, args); - needed = vsnprintf(string_buf, max_nob, format1, ap); - va_end(ap); - } - - if (format2) { + if (format) { remain = max_nob - needed; if (remain < 0) remain = 0; - va_start(ap, format2); - needed += vsnprintf(string_buf+needed, remain, format2, ap); + va_start(ap, format); + needed += vsnprintf(string_buf+needed, remain, + format, ap); va_end(ap); } @@ -784,16 +786,12 @@ console: string_buf = trace_get_console_buffer(); needed = 0; - if (format1 != NULL) { - va_copy(ap, args); - needed = vsnprintf(string_buf, TRACE_CONSOLE_BUFFER_SIZE, format1, ap); - va_end(ap); - } - if (format2 != NULL) { + if (format != NULL) { remain = TRACE_CONSOLE_BUFFER_SIZE - needed; if (remain > 0) { - va_start(ap, format2); - needed += vsnprintf(string_buf+needed, remain, format2, ap); + va_start(ap, format); + needed += vsnprintf(string_buf+needed, remain, + format, ap); va_end(ap); } } @@ -819,7 +817,7 @@ console: return 0; } -EXPORT_SYMBOL(spl_debug_vmsg); +EXPORT_SYMBOL(spl_debug_msg); /* Do the collect_pages job on a single CPU: assumes that all other * CPUs have been stopped during a panic. If this isn't true for @@ -881,9 +879,6 @@ put_pages_back_on_all_cpus(struct page_collection *pc) list_for_each_entry_safe(tage, tmp, &pc->pc_pages, linkage) { - - __ASSERT_TAGE_INVARIANT(tage); - if (tage->cpu != cpu || tage->type != i) continue; @@ -935,8 +930,6 @@ spl_debug_dump_all_pages(dumplog_priv_t *dp, char *filename) set_fs(get_ds()); list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { - __ASSERT_TAGE_INVARIANT(tage); - rc = spl_filp_write(filp, page_address(tage->page), tage->used, spl_filp_poff(filp)); if (rc != (int)tage->used) { @@ -979,7 +972,6 @@ spl_debug_flush_pages(void) collect_pages(&dp, &pc); list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { - __ASSERT_TAGE_INVARIANT(tage); list_del(&tage->linkage); tage_free(tage); } @@ -1077,12 +1069,10 @@ EXPORT_SYMBOL(spl_debug_dumpstack); void spl_debug_bug(char *file, const char *func, const int line, int flags) { spl_debug_catastrophe = 1; - spl_debug_msg(NULL, 0, D_EMERG, file, func, line, "SBUG\n"); + spl_debug_msg(NULL, 0, D_EMERG, file, func, line, "SPL PANIC\n"); - if (in_interrupt()) { - panic("SBUG in interrupt.\n"); - /* not reached */ - } + if (in_interrupt()) + panic("SPL PANIC in interrupt.\n"); if (in_atomic() || irqs_disabled()) flags |= DL_NOTHREAD; @@ -1095,7 +1085,7 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags) spl_debug_dumplog(flags); if (spl_debug_panic_on_bug) - panic("SBUG"); + panic("SPL PANIC"); set_task_state(current, TASK_UNINTERRUPTIBLE); while (1) @@ -1208,8 +1198,6 @@ trace_cleanup_on_all_cpus(void) list_for_each_entry_safe(tage, tmp, &tcd->tcd_pages, linkage) { - __ASSERT_TAGE_INVARIANT(tage); - list_del(&tage->linkage); tage_free(tage); } diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 1d5202827..1b059f0c8 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -26,6 +26,7 @@ #include #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -44,7 +45,7 @@ vpanic(const char *fmt, va_list ap) char msg[MAXMSGLEN]; vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); - panic("%s", msg); + PANIC("%s", msg); } /* vpanic() */ EXPORT_SYMBOL(vpanic); diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 6a3f49ae0..b875f7d7f 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -39,6 +39,7 @@ #include #include #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -339,12 +340,12 @@ EXPORT_SYMBOL(ddi_copyout); * never be putting away the last reference on a task structure so this will * not be called. However, we still need to define it so the module does not * have undefined symbol at load time. That all said if this impossible - * thing does somehow happen SBUG() immediately so we know about it. + * thing does somehow happen PANIC immediately so we know about it. */ void __put_task_struct(struct task_struct *t) { - SBUG(); + PANIC("Unexpectly put last reference on task %d\n", (int)t->pid); } EXPORT_SYMBOL(__put_task_struct); #endif /* HAVE_PUT_TASK_STRUCT */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index a348021d8..e0b7e12e2 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #ifdef DEBUG_SUBSYSTEM # undef DEBUG_SUBSYSTEM diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index 42a264172..d58a9892b 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 433f3e5b0..238f37ae3 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -24,8 +24,9 @@ * Solaris Porting Layer (SPL) Kstat Implementation. \*****************************************************************************/ -#include #include +#include +#include static spinlock_t kstat_lock; static struct list_head kstat_list; @@ -72,7 +73,7 @@ kstat_seq_show_headers(struct seq_file *f) "min", "max", "start", "stop"); break; default: - SBUG(); /* Unreachable */ + PANIC("Undefined kstat type %d\n", ksp->ks_type); } } @@ -135,7 +136,7 @@ kstat_seq_show_named(struct seq_file *f, kstat_named_t *knp) seq_printf(f, "%s", KSTAT_NAMED_STR_PTR(knp)); break; default: - SBUG(); /* Unreachable */ + PANIC("Undefined kstat data type %d\n", knp->data_type); } seq_printf(f, "\n"); @@ -210,7 +211,7 @@ kstat_seq_show(struct seq_file *f, void *p) rc = kstat_seq_show_timer(f, (kstat_timer_t *)p); break; default: - SBUG(); /* Unreachable */ + PANIC("Undefined kstat type %d\n", ksp->ks_type); } return rc; @@ -239,7 +240,7 @@ kstat_seq_data_addr(kstat_t *ksp, loff_t n) rc = ksp->ks_data + n * sizeof(kstat_timer_t); break; default: - SBUG(); /* Unreachable */ + PANIC("Undefined kstat type %d\n", ksp->ks_type); } RETURN(rc); @@ -377,7 +378,7 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, ksp->ks_data_size = ks_ndata * sizeof(kstat_timer_t); break; default: - SBUG(); /* Unreachable */ + PANIC("Undefined kstat type %d\n", ksp->ks_type); } if (ksp->ks_flags & KSTAT_FLAG_VIRTUAL) { diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index 37dd4f4c1..787a4480e 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -24,8 +24,8 @@ * Solaris Porting Layer (SPL) Module Implementation. \*****************************************************************************/ -#include #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 5a71f795c..bc6dac5b8 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -29,6 +29,7 @@ #include #include #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -297,13 +298,10 @@ SPL_PROC_HANDLER(proc_force_bug) { ENTRY; - if (write) { - CERROR("Crashing due to forced SBUG\n"); - SBUG(); - /* Unreachable */ - } else { + if (write) + PANIC("Crashing due to forced panic\n"); + else *lenp = 0; - } RETURN(0); } diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 9aca699c7..d9c83279c 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -26,6 +26,7 @@ #include #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM @@ -90,8 +91,8 @@ retry: RETURN(NULL); } - /* Unreachable, TQ_SLEEP or TQ_NOSLEEP */ - SBUG(); + /* Unreachable, Neither TQ_SLEEP or TQ_NOSLEEP set */ + PANIC("Neither TQ_SLEEP or TQ_NOSLEEP set"); } spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -254,11 +255,9 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) if (!(flags & (TQ_SLEEP | TQ_NOSLEEP))) flags |= TQ_SLEEP; - if (unlikely(in_atomic() && (flags & TQ_SLEEP))) { - CERROR("May schedule while atomic: %s/0x%08x/%d\n", - current->comm, preempt_count(), current->pid); - SBUG(); - } + if (unlikely(in_atomic() && (flags & TQ_SLEEP))) + PANIC("May schedule while atomic: %s/0x%08x/%d\n", + current->comm, preempt_count(), current->pid); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index bce912c4d..e28b1261a 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -26,6 +26,7 @@ #include #include +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index c67fc4c7f..840bb6718 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -24,9 +24,8 @@ * Solaris Porting Layer (SPL) Vnode Implementation. \*****************************************************************************/ -#include #include - +#include #ifdef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index 174f76f19..375b74e53 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -22,13 +22,12 @@ \*****************************************************************************/ #include - #include #include #include - #include #include +#include /* * SPL's XDR mem implementation. diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index fd86a9fa8..6162d6abf 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -109,7 +109,7 @@ splat_atomic_work(void *priv) atomic_sub_64_nv(&ap->ap_atomic, 5); break; default: - SBUG(); + PANIC("Undefined op %d\n", op); } } diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index ba1224fc1..c42e08d6f 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -66,6 +66,7 @@ #include #include "spl-device.h" +#include "spl-debug.h" #include "splat-ctl.h" #define SPLAT_SUBSYSTEM_INIT(type) \ diff --git a/scripts/check.sh b/scripts/check.sh index 712605547..b44b31333 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -62,7 +62,7 @@ if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then die "Source tree must be built, run 'make'" fi -spl_module_params="spl_debug_mask=-1 spl_debug_subsys=-1" +spl_module_params="spl_debug_mask=0xffffffff spl_debug_subsys=0xffffffff" echo "Loading ${spl_module}" /sbin/insmod ${spl_module} ${spl_module_params} || die "Failed to load ${spl_module}" From b17edc10a9c66543bef54b08e4655832aefe8939 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 Jul 2010 11:55:37 -0700 Subject: [PATCH 0423/1062] Prefix all SPL debug macros with 'S' To avoid conflicts with symbols defined by dependent packages all debugging symbols have been prefixed with a 'S' for SPL. Any dependent package needing to integrate with the SPL debug should include the spl-debug.h header and use the 'S' prefixed macros. They must also build with DEBUG defined. --- include/spl-debug.h | 143 +++++++++++++++------------- module/spl/spl-condvar.c | 32 +++---- module/spl/spl-debug.c | 108 ++++++++++++--------- module/spl/spl-err.c | 10 +- module/spl/spl-generic.c | 36 +++---- module/spl/spl-kmem.c | 200 +++++++++++++++++++-------------------- module/spl/spl-kobj.c | 28 +++--- module/spl/spl-kstat.c | 40 ++++---- module/spl/spl-module.c | 48 +++++----- module/spl/spl-proc.c | 116 +++++++++++------------ module/spl/spl-taskq.c | 88 ++++++++--------- module/spl/spl-thread.c | 22 ++--- module/spl/spl-vnode.c | 140 +++++++++++++-------------- module/spl/spl-xdr.c | 12 ++- 14 files changed, 532 insertions(+), 491 deletions(-) diff --git a/include/spl-debug.h b/include/spl-debug.h index b5ca64f87..cf0d58cad 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -26,17 +26,17 @@ * Available debug functions. These function should be used by any * package which needs to integrate with the SPL log infrastructure. * - * CDEBUG() - Log debug message with specified mask. - * CDEBUG_LIMIT() - Log just 1 debug message with specified mask. - * CWARN() - Log a warning message. - * CERROR() - Log an error message. - * CEMERG() - Log an emergency error message. - * CONSOLE() - Log a generic message to the console. + * SDEBUG() - Log debug message with specified mask. + * SDEBUG_LIMIT() - Log just 1 debug message with specified mask. + * SWARN() - Log a warning message. + * SERROR() - Log an error message. + * SEMERG() - Log an emergency error message. + * SCONSOLE() - Log a generic message to the console. * - * ENTRY - Log entry point to a function. - * EXIT - Log exit point from a function. - * RETURN(x) - Log return from a function. - * GOTO(x, y) - Log goto within a function. + * SENTRY - Log entry point to a function. + * SEXIT - Log exit point from a function. + * SRETURN(x) - Log return from a function. + * SGOTO(x, y) - Log goto within a function. */ #ifndef _SPL_DEBUG_INTERNAL_H @@ -44,95 +44,104 @@ #include -#define S_UNDEFINED 0x00000001 -#define S_ATOMIC 0x00000002 -#define S_KOBJ 0x00000004 -#define S_VNODE 0x00000008 -#define S_TIME 0x00000010 -#define S_RWLOCK 0x00000020 -#define S_THREAD 0x00000040 -#define S_CONDVAR 0x00000080 -#define S_MUTEX 0x00000100 -#define S_RNG 0x00000200 -#define S_TASKQ 0x00000400 -#define S_KMEM 0x00000800 -#define S_DEBUG 0x00001000 -#define S_GENERIC 0x00002000 -#define S_PROC 0x00004000 -#define S_MODULE 0x00008000 -#define S_CRED 0x00010000 +#define SS_UNDEFINED 0x00000001 +#define SS_ATOMIC 0x00000002 +#define SS_KOBJ 0x00000004 +#define SS_VNODE 0x00000008 +#define SS_TIME 0x00000010 +#define SS_RWLOCK 0x00000020 +#define SS_THREAD 0x00000040 +#define SS_CONDVAR 0x00000080 +#define SS_MUTEX 0x00000100 +#define SS_RNG 0x00000200 +#define SS_TASKQ 0x00000400 +#define SS_KMEM 0x00000800 +#define SS_DEBUG 0x00001000 +#define SS_GENERIC 0x00002000 +#define SS_PROC 0x00004000 +#define SS_MODULE 0x00008000 +#define SS_CRED 0x00010000 +#define SS_KSTAT 0x00020000 +#define SS_XDR 0x00040000 +#define SS_USER1 0x01000000 +#define SS_USER2 0x02000000 +#define SS_USER3 0x04000000 +#define SS_USER4 0x08000000 +#define SS_USER5 0x10000000 +#define SS_USER6 0x20000000 +#define SS_USER7 0x40000000 +#define SS_USER8 0x80000000 +#define SS_DEBUG_SUBSYS SS_UNDEFINED -#define D_TRACE 0x00000001 -#define D_INFO 0x00000002 -#define D_WARNING 0x00000004 -#define D_ERROR 0x00000008 -#define D_EMERG 0x00000010 -#define D_CONSOLE 0x00000020 -#define D_IOCTL 0x00000040 -#define D_DPRINTF 0x00000080 -#define D_OTHER 0x00000100 - -#define D_CANTMASK (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE) -#define DEBUG_SUBSYSTEM S_UNDEFINED +#define SD_TRACE 0x00000001 +#define SD_INFO 0x00000002 +#define SD_WARNING 0x00000004 +#define SD_ERROR 0x00000008 +#define SD_EMERG 0x00000010 +#define SD_CONSOLE 0x00000020 +#define SD_IOCTL 0x00000040 +#define SD_DPRINTF 0x00000080 +#define SD_OTHER 0x00000100 +#define SD_CANTMASK (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE) #ifdef NDEBUG /* Debugging Disabled */ -#define CDEBUG(mask, fmt, a...) ((void)0) -#define CDEBUG_LIMIT(x, y, fmt, a...) ((void)0) -#define CWARN(fmt, a...) ((void)0) -#define CERROR(fmt, a...) ((void)0) -#define CEMERG(fmt, a...) ((void)0) -#define CONSOLE(mask, fmt, a...) ((void)0) +#define SDEBUG(mask, fmt, a...) ((void)0) +#define SDEBUG_LIMIT(x, y, fmt, a...) ((void)0) +#define SWARN(fmt, a...) ((void)0) +#define SERROR(fmt, a...) ((void)0) +#define SEMERG(fmt, a...) ((void)0) +#define SCONSOLE(mask, fmt, a...) ((void)0) -#define ENTRY ((void)0) -#define EXIT ((void)0) -#define RETURN(x) return (x) -#define GOTO(x, y) { ((void)(y)); goto x; } +#define SENTRY ((void)0) +#define SEXIT ((void)0) +#define SRETURN(x) return (x) +#define SGOTO(x, y) { ((void)(y)); goto x; } #else /* Debugging Enabled */ -#define __CDEBUG(cdls, subsys, mask, format, a...) \ +#define __SDEBUG(cdls, subsys, mask, format, a...) \ do { \ - if (((mask) & D_CANTMASK) != 0 || \ + if (((mask) & SD_CANTMASK) != 0 || \ ((spl_debug_mask & (mask)) != 0 && \ (spl_debug_subsys & (subsys)) != 0)) \ spl_debug_msg(cdls, subsys, mask, __FILE__, \ __FUNCTION__, __LINE__, format, ## a); \ } while (0) -#define CDEBUG(mask, format, a...) \ - __CDEBUG(NULL, DEBUG_SUBSYSTEM, mask, format, ## a) +#define SDEBUG(mask, format, a...) \ + __SDEBUG(NULL, SS_DEBUG_SUBSYS, mask, format, ## a) -#define __CDEBUG_LIMIT(subsys, mask, format, a...) \ +#define __SDEBUG_LIMIT(subsys, mask, format, a...) \ do { \ static spl_debug_limit_state_t cdls; \ \ - __CDEBUG(&cdls, subsys, mask, format, ## a); \ + __SDEBUG(&cdls, subsys, mask, format, ## a); \ } while (0) -#define CDEBUG_LIMIT(mask, format, a...) \ - __CDEBUG_LIMIT(DEBUG_SUBSYSTEM, mask, format, ## a) +#define SDEBUG_LIMIT(mask, format, a...) \ + __SDEBUG_LIMIT(SS_DEBUG_SUBSYS, mask, format, ## a) -#define CWARN(fmt, a...) CDEBUG_LIMIT(D_WARNING, fmt, ## a) -#define CERROR(fmt, a...) CDEBUG_LIMIT(D_ERROR, fmt, ## a) -#define CEMERG(fmt, a...) CDEBUG_LIMIT(D_EMERG, fmt, ## a) -#define CONSOLE(mask, fmt, a...) CDEBUG(D_CONSOLE | (mask), fmt, ## a) +#define SWARN(fmt, a...) SDEBUG_LIMIT(SD_WARNING, fmt, ## a) +#define SERROR(fmt, a...) SDEBUG_LIMIT(SD_ERROR, fmt, ## a) +#define SEMERG(fmt, a...) SDEBUG_LIMIT(SD_EMERG, fmt, ## a) +#define SCONSOLE(mask, fmt, a...) SDEBUG(SD_CONSOLE | (mask), fmt, ## a) -#define ENTRY CDEBUG(D_TRACE, "Process entered\n") -#define EXIT CDEBUG(D_TRACE, "Process leaving\n") +#define SENTRY SDEBUG(SD_TRACE, "Process entered\n") +#define SEXIT SDEBUG(SD_TRACE, "Process leaving\n") -#define RETURN(rc) \ +#define SRETURN(rc) \ do { \ typeof(rc) RETURN__ret = (rc); \ - CDEBUG(D_TRACE, "Process leaving (rc=%lu : %ld : %lx)\n", \ + SDEBUG(SD_TRACE, "Process leaving (rc=%lu : %ld : %lx)\n", \ (long)RETURN__ret, (long)RETURN__ret, (long)RETURN__ret); \ return RETURN__ret; \ } while (0) -#define GOTO(label, rc) \ +#define SGOTO(label, rc) \ do { \ long GOTO__ret = (long)(rc); \ - CDEBUG(D_TRACE,"Process leaving via %s (rc=%lu : %ld : %lx)\n", \ + SDEBUG(SD_TRACE,"Process leaving via %s (rc=%lu : %ld : %lx)\n",\ #label, (unsigned long)GOTO__ret, (signed long)GOTO__ret, \ (signed long)GOTO__ret); \ goto label; \ diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 002dcdb45..6b4512472 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -27,18 +27,18 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_CONDVAR +#define SS_DEBUG_SUBSYS SS_CONDVAR void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) { int flags = KM_SLEEP; - ENTRY; + SENTRY; ASSERT(cvp); ASSERT(name); ASSERT(type == CV_DEFAULT); @@ -62,14 +62,14 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) if (cvp->cv_name) strcpy(cvp->cv_name, name); - EXIT; + SEXIT; } EXPORT_SYMBOL(__cv_init); void __cv_destroy(kcondvar_t *cvp) { - ENTRY; + SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); spin_lock(&cvp->cv_lock); @@ -81,7 +81,7 @@ __cv_destroy(kcondvar_t *cvp) spin_unlock(&cvp->cv_lock); memset(cvp, CV_POISON, sizeof(*cvp)); - EXIT; + SEXIT; } EXPORT_SYMBOL(__cv_destroy); @@ -89,7 +89,7 @@ static void cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) { DEFINE_WAIT(wait); - ENTRY; + SENTRY; ASSERT(cvp); ASSERT(mp); @@ -116,7 +116,7 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) atomic_dec(&cvp->cv_waiters); finish_wait(&cvp->cv_event, &wait); - EXIT; + SEXIT; } void @@ -141,7 +141,7 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) { DEFINE_WAIT(wait); clock_t time_left; - ENTRY; + SENTRY; ASSERT(cvp); ASSERT(mp); @@ -159,7 +159,7 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) /* XXX - Does not handle jiffie wrap properly */ time_left = expire_time - jiffies; if (time_left <= 0) - RETURN(-1); + SRETURN(-1); prepare_to_wait_exclusive(&cvp->cv_event, &wait, TASK_UNINTERRUPTIBLE); @@ -175,14 +175,14 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) atomic_dec(&cvp->cv_waiters); finish_wait(&cvp->cv_event, &wait); - RETURN(time_left > 0 ? time_left : -1); + SRETURN(time_left > 0 ? time_left : -1); } EXPORT_SYMBOL(__cv_timedwait); void __cv_signal(kcondvar_t *cvp) { - ENTRY; + SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); @@ -193,7 +193,7 @@ __cv_signal(kcondvar_t *cvp) if (atomic_read(&cvp->cv_waiters) > 0) wake_up(&cvp->cv_event); - EXIT; + SEXIT; } EXPORT_SYMBOL(__cv_signal); @@ -202,13 +202,13 @@ __cv_broadcast(kcondvar_t *cvp) { ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); - ENTRY; + SENTRY; /* Wake_up_all() will wake up all waiters even those which * have the WQ_FLAG_EXCLUSIVE flag set. */ if (atomic_read(&cvp->cv_waiters) > 0) wake_up_all(&cvp->cv_event); - EXIT; + SEXIT; } EXPORT_SYMBOL(__cv_broadcast); diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 5284eb339..f6ec86ac4 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -41,23 +41,23 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_DEBUG +#define SS_DEBUG_SUBSYS SS_DEBUG unsigned long spl_debug_subsys = ~0; EXPORT_SYMBOL(spl_debug_subsys); module_param(spl_debug_subsys, ulong, 0644); MODULE_PARM_DESC(spl_debug_subsys, "Subsystem debugging level mask."); -unsigned long spl_debug_mask = (D_EMERG | D_ERROR | D_WARNING | D_CONSOLE); +unsigned long spl_debug_mask = SD_CANTMASK; EXPORT_SYMBOL(spl_debug_mask); module_param(spl_debug_mask, ulong, 0644); MODULE_PARM_DESC(spl_debug_mask, "Debugging level mask."); -unsigned long spl_debug_printk = D_CANTMASK; +unsigned long spl_debug_printk = SD_CANTMASK; EXPORT_SYMBOL(spl_debug_printk); module_param(spl_debug_printk, ulong, 0644); MODULE_PARM_DESC(spl_debug_printk, "Console printk level mask."); @@ -120,40 +120,60 @@ spl_debug_subsys2str(int subsys) switch (subsys) { default: return NULL; - case S_UNDEFINED: + case SS_UNDEFINED: return "undefined"; - case S_ATOMIC: + case SS_ATOMIC: return "atomic"; - case S_KOBJ: + case SS_KOBJ: return "kobj"; - case S_VNODE: + case SS_VNODE: return "vnode"; - case S_TIME: + case SS_TIME: return "time"; - case S_RWLOCK: + case SS_RWLOCK: return "rwlock"; - case S_THREAD: + case SS_THREAD: return "thread"; - case S_CONDVAR: + case SS_CONDVAR: return "condvar"; - case S_MUTEX: + case SS_MUTEX: return "mutex"; - case S_RNG: + case SS_RNG: return "rng"; - case S_TASKQ: + case SS_TASKQ: return "taskq"; - case S_KMEM: + case SS_KMEM: return "kmem"; - case S_DEBUG: + case SS_DEBUG: return "debug"; - case S_GENERIC: + case SS_GENERIC: return "generic"; - case S_PROC: + case SS_PROC: return "proc"; - case S_MODULE: + case SS_MODULE: return "module"; - case S_CRED: + case SS_CRED: return "cred"; + case SS_KSTAT: + return "kstat"; + case SS_XDR: + return "xdr"; + case SS_USER1: + return "user1"; + case SS_USER2: + return "user2"; + case SS_USER3: + return "user3"; + case SS_USER4: + return "user4"; + case SS_USER5: + return "user5"; + case SS_USER6: + return "user6"; + case SS_USER7: + return "user7"; + case SS_USER8: + return "user8"; } } @@ -163,23 +183,23 @@ spl_debug_dbg2str(int debug) switch (debug) { default: return NULL; - case D_TRACE: + case SD_TRACE: return "trace"; - case D_INFO: + case SD_INFO: return "info"; - case D_WARNING: + case SD_WARNING: return "warning"; - case D_ERROR: + case SD_ERROR: return "error"; - case D_EMERG: + case SD_EMERG: return "emerg"; - case D_CONSOLE: + case SD_CONSOLE: return "console"; - case D_IOCTL: + case SD_IOCTL: return "ioctl"; - case D_DPRINTF: + case SD_DPRINTF: return "dprintf"; - case D_OTHER: + case SD_OTHER: return "other"; } } @@ -493,21 +513,21 @@ trace_print_to_console(struct spl_debug_header *hdr, int mask, const char *buf, { char *prefix = "SPL", *ptype = NULL; - if ((mask & D_EMERG) != 0) { + if ((mask & SD_EMERG) != 0) { prefix = "SPLError"; ptype = KERN_EMERG; - } else if ((mask & D_ERROR) != 0) { + } else if ((mask & SD_ERROR) != 0) { prefix = "SPLError"; ptype = KERN_ERR; - } else if ((mask & D_WARNING) != 0) { + } else if ((mask & SD_WARNING) != 0) { prefix = "SPL"; ptype = KERN_WARNING; - } else if ((mask & (D_CONSOLE | spl_debug_printk)) != 0) { + } else if ((mask & (SD_CONSOLE | spl_debug_printk)) != 0) { prefix = "SPL"; ptype = KERN_INFO; } - if ((mask & D_CONSOLE) != 0) { + if ((mask & SD_CONSOLE) != 0) { printk("%s%s: %.*s", ptype, prefix, len, buf); } else { printk("%s%s: %d:%d:(%s:%d:%s()) %.*s", ptype, prefix, @@ -652,10 +672,10 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, int remain; if (subsys == 0) - subsys = DEBUG_SUBSYSTEM; + subsys = SS_DEBUG_SUBSYS; if (mask == 0) - mask = D_EMERG; + mask = SD_EMERG; if (strchr(file, '/')) file = strrchr(file, '/') + 1; @@ -685,7 +705,7 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, tage = trace_get_tage(tcd, needed + known_size + 1); if (tage == NULL) { if (needed + known_size > PAGE_SIZE) - mask |= D_ERROR; + mask |= SD_ERROR; trace_put_tcd(tcd); tcd = NULL; @@ -698,7 +718,7 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, max_nob = PAGE_SIZE - tage->used - known_size; if (max_nob <= 0) { printk(KERN_EMERG "negative max_nob: %i\n", max_nob); - mask |= D_ERROR; + mask |= SD_ERROR; trace_put_tcd(tcd); tcd = NULL; goto console; @@ -1069,7 +1089,7 @@ EXPORT_SYMBOL(spl_debug_dumpstack); void spl_debug_bug(char *file, const char *func, const int line, int flags) { spl_debug_catastrophe = 1; - spl_debug_msg(NULL, 0, D_EMERG, file, func, line, "SPL PANIC\n"); + spl_debug_msg(NULL, 0, SD_EMERG, file, func, line, "SPL PANIC\n"); if (in_interrupt()) panic("SPL PANIC in interrupt.\n"); @@ -1104,9 +1124,9 @@ EXPORT_SYMBOL(spl_debug_clear_buffer); int spl_debug_mark_buffer(char *text) { - CDEBUG(D_WARNING, "*************************************\n"); - CDEBUG(D_WARNING, "DEBUG MARKER: %s\n", text); - CDEBUG(D_WARNING, "*************************************\n"); + SDEBUG(SD_WARNING, "*************************************\n"); + SDEBUG(SD_WARNING, "DEBUG MARKER: %s\n", text); + SDEBUG(SD_WARNING, "*************************************\n"); return 0; } diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 1b059f0c8..200028f3b 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -28,11 +28,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_GENERIC +#define SS_DEBUG_SUBSYS SS_GENERIC #ifndef NDEBUG static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; @@ -61,10 +61,10 @@ vcmn_err(int ce, const char *fmt, va_list ap) vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); if (fmt[0] == '!') - CDEBUG(D_INFO, "%s%s%s", + SDEBUG(SD_INFO, "%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); else - CERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); + SERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); } } /* vcmn_err() */ EXPORT_SYMBOL(vcmn_err); diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index b875f7d7f..a7083b6d2 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -41,11 +41,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_GENERIC +#define SS_DEBUG_SUBSYS SS_GENERIC char spl_version[16] = "SPL v" SPL_META_VERSION; EXPORT_SYMBOL(spl_version); @@ -67,10 +67,10 @@ int highbit(unsigned long i) { register int h = 1; - ENTRY; + SENTRY; if (i == 0) - RETURN(0); + SRETURN(0); #if BITS_PER_LONG == 64 if (i & 0xffffffff00000000ul) { h += 32; i >>= 32; @@ -91,7 +91,7 @@ highbit(unsigned long i) if (i & 0x2) { h += 1; } - RETURN(h); + SRETURN(h); } EXPORT_SYMBOL(highbit); @@ -447,39 +447,39 @@ __init spl_init(void) return rc; if ((rc = spl_kmem_init())) - GOTO(out1, rc); + SGOTO(out1, rc); if ((rc = spl_mutex_init())) - GOTO(out2, rc); + SGOTO(out2, rc); if ((rc = spl_rw_init())) - GOTO(out3, rc); + SGOTO(out3, rc); if ((rc = spl_taskq_init())) - GOTO(out4, rc); + SGOTO(out4, rc); if ((rc = vn_init())) - GOTO(out5, rc); + SGOTO(out5, rc); if ((rc = proc_init())) - GOTO(out6, rc); + SGOTO(out6, rc); if ((rc = kstat_init())) - GOTO(out7, rc); + SGOTO(out7, rc); if ((rc = set_hostid())) - GOTO(out8, rc = -EADDRNOTAVAIL); + SGOTO(out8, rc = -EADDRNOTAVAIL); #ifndef HAVE_KALLSYMS_LOOKUP_NAME if ((rc = set_kallsyms_lookup_name())) - GOTO(out8, rc = -EADDRNOTAVAIL); + SGOTO(out8, rc = -EADDRNOTAVAIL); #endif /* HAVE_KALLSYMS_LOOKUP_NAME */ if ((rc = spl_kmem_init_kallsyms_lookup())) - GOTO(out8, rc); + SGOTO(out8, rc); printk("SPL: Loaded Solaris Porting Layer v%s\n", SPL_META_VERSION); - RETURN(rc); + SRETURN(rc); out8: kstat_fini(); out7: @@ -505,7 +505,7 @@ out1: static void spl_fini(void) { - ENTRY; + SENTRY; printk("SPL: Unloaded Solaris Porting Layer v%s\n", SPL_META_VERSION); kstat_fini(); diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e0b7e12e2..100c60230 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -27,11 +27,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -# undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_KMEM +#define SS_DEBUG_SUBSYS SS_KMEM /* * The minimum amount of memory measured in pages to be free at all @@ -416,7 +416,7 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, struct hlist_node *node; struct kmem_debug *p; unsigned long flags; - ENTRY; + SENTRY; spin_lock_irqsave(lock, flags); @@ -432,7 +432,7 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, spin_unlock_irqrestore(lock, flags); - RETURN(NULL); + SRETURN(NULL); } void * @@ -442,13 +442,13 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, void *ptr = NULL; kmem_debug_t *dptr; unsigned long irq_flags; - ENTRY; + SENTRY; dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); if (dptr == NULL) { - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "debug " + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug " "kmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", sizeof(kmem_debug_t), flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); @@ -456,7 +456,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ if (unlikely((size > PAGE_SIZE*2) && !(flags & KM_NODEBUG))) { - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "large " + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "large " "kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); @@ -469,7 +469,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug kstrdup() at %s:%d failed (%lld/%llu)\n", func, line, kmem_alloc_used_read(), kmem_alloc_max); goto out; @@ -488,7 +488,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, if (unlikely(ptr == NULL)) { kfree(dptr->kd_func); kfree(dptr); - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "kmem_alloc" + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "kmem_alloc" "(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); @@ -512,13 +512,13 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, list_add_tail(&dptr->kd_list, &kmem_list); spin_unlock_irqrestore(&kmem_lock, irq_flags); - CDEBUG_LIMIT(D_INFO, + SDEBUG_LIMIT(SD_INFO, "kmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", (unsigned long long) size, flags, func, line, ptr, kmem_alloc_used_read(), kmem_alloc_max); } out: - RETURN(ptr); + SRETURN(ptr); } EXPORT_SYMBOL(kmem_alloc_track); @@ -526,7 +526,7 @@ void kmem_free_track(void *ptr, size_t size) { kmem_debug_t *dptr; - ENTRY; + SENTRY; ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); @@ -541,7 +541,7 @@ kmem_free_track(void *ptr, size_t size) (unsigned long long) size, dptr->kd_func, dptr->kd_line); kmem_alloc_used_sub(size); - CDEBUG_LIMIT(D_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, + SDEBUG_LIMIT(SD_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, (unsigned long long) size, kmem_alloc_used_read(), kmem_alloc_max); @@ -553,7 +553,7 @@ kmem_free_track(void *ptr, size_t size) memset(ptr, 0x5a, size); kfree(ptr); - EXIT; + SEXIT; } EXPORT_SYMBOL(kmem_free_track); @@ -563,14 +563,14 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) void *ptr = NULL; kmem_debug_t *dptr; unsigned long irq_flags; - ENTRY; + SENTRY; ASSERT(flags & KM_SLEEP); dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); if (dptr == NULL) { - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "debug " + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug " "vmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", sizeof(kmem_debug_t), flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); @@ -581,7 +581,7 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug kstrdup() at %s:%d failed (%lld/%llu)\n", func, line, vmem_alloc_used_read(), vmem_alloc_max); goto out; @@ -593,7 +593,7 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) if (unlikely(ptr == NULL)) { kfree(dptr->kd_func); kfree(dptr); - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, "vmem_alloc" + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "vmem_alloc" "(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); @@ -620,13 +620,13 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) list_add_tail(&dptr->kd_list, &vmem_list); spin_unlock_irqrestore(&vmem_lock, irq_flags); - CDEBUG_LIMIT(D_INFO, + SDEBUG_LIMIT(SD_INFO, "vmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", (unsigned long long) size, flags, func, line, ptr, vmem_alloc_used_read(), vmem_alloc_max); } out: - RETURN(ptr); + SRETURN(ptr); } EXPORT_SYMBOL(vmem_alloc_track); @@ -634,7 +634,7 @@ void vmem_free_track(void *ptr, size_t size) { kmem_debug_t *dptr; - ENTRY; + SENTRY; ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); @@ -648,7 +648,7 @@ vmem_free_track(void *ptr, size_t size) (unsigned long long) size, dptr->kd_func, dptr->kd_line); vmem_alloc_used_sub(size); - CDEBUG_LIMIT(D_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, + SDEBUG_LIMIT(SD_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, (unsigned long long) size, vmem_alloc_used_read(), vmem_alloc_max); @@ -660,7 +660,7 @@ vmem_free_track(void *ptr, size_t size) memset(ptr, 0x5a, size); vfree(ptr); - EXIT; + SEXIT; } EXPORT_SYMBOL(vmem_free_track); @@ -671,12 +671,12 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, int node_alloc, int node) { void *ptr; - ENTRY; + SENTRY; /* Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ if (unlikely((size > PAGE_SIZE * 2) && !(flags & KM_NODEBUG))) { - CDEBUG(D_CONSOLE | D_WARNING, + SDEBUG(SD_CONSOLE | SD_WARNING, "Large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); @@ -694,7 +694,7 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, } if (ptr == NULL) { - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "kmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); @@ -703,32 +703,32 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) kmem_alloc_max = kmem_alloc_used_read(); - CDEBUG_LIMIT(D_INFO, + SDEBUG_LIMIT(SD_INFO, "kmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", (unsigned long long) size, flags, func, line, ptr, kmem_alloc_used_read(), kmem_alloc_max); } - RETURN(ptr); + SRETURN(ptr); } EXPORT_SYMBOL(kmem_alloc_debug); void kmem_free_debug(void *ptr, size_t size) { - ENTRY; + SENTRY; ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); kmem_alloc_used_sub(size); - CDEBUG_LIMIT(D_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, + SDEBUG_LIMIT(SD_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, (unsigned long long) size, kmem_alloc_used_read(), kmem_alloc_max); memset(ptr, 0x5a, size); kfree(ptr); - EXIT; + SEXIT; } EXPORT_SYMBOL(kmem_free_debug); @@ -736,14 +736,14 @@ void * vmem_alloc_debug(size_t size, int flags, const char *func, int line) { void *ptr; - ENTRY; + SENTRY; ASSERT(flags & KM_SLEEP); ptr = __vmalloc(size, (flags | __GFP_HIGHMEM) & ~__GFP_ZERO, PAGE_KERNEL); if (ptr == NULL) { - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "vmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); @@ -755,32 +755,32 @@ vmem_alloc_debug(size_t size, int flags, const char *func, int line) if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) vmem_alloc_max = vmem_alloc_used_read(); - CDEBUG_LIMIT(D_INFO, "vmem_alloc(%llu, 0x%x) = %p " + SDEBUG_LIMIT(SD_INFO, "vmem_alloc(%llu, 0x%x) = %p " "(%lld/%llu)\n", (unsigned long long) size, flags, ptr, vmem_alloc_used_read(), vmem_alloc_max); } - RETURN(ptr); + SRETURN(ptr); } EXPORT_SYMBOL(vmem_alloc_debug); void vmem_free_debug(void *ptr, size_t size) { - ENTRY; + SENTRY; ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); vmem_alloc_used_sub(size); - CDEBUG_LIMIT(D_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, + SDEBUG_LIMIT(SD_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, (unsigned long long) size, vmem_alloc_used_read(), vmem_alloc_max); memset(ptr, 0x5a, size); vfree(ptr); - EXIT; + SEXIT; } EXPORT_SYMBOL(vmem_free_debug); @@ -901,7 +901,7 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) base = kv_alloc(skc, skc->skc_slab_size, flags); if (base == NULL) - RETURN(NULL); + SRETURN(NULL); sks = (spl_kmem_slab_t *)base; sks->sks_magic = SKS_MAGIC; @@ -920,7 +920,7 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) if (skc->skc_flags & KMC_OFFSLAB) { obj = kv_alloc(skc, offslab_size, flags); if (!obj) - GOTO(out, rc = -ENOMEM); + SGOTO(out, rc = -ENOMEM); } else { obj = base + spl_sks_size(skc) + (i * obj_size); } @@ -948,7 +948,7 @@ out: sks = NULL; } - RETURN(sks); + SRETURN(sks); } /* @@ -961,7 +961,7 @@ spl_slab_free(spl_kmem_slab_t *sks, struct list_head *sks_list, struct list_head *sko_list) { spl_kmem_cache_t *skc; - ENTRY; + SENTRY; ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(sks->sks_ref == 0); @@ -982,7 +982,7 @@ spl_slab_free(spl_kmem_slab_t *sks, list_add(&sks->sks_list, sks_list); list_splice_init(&sks->sks_free_list, sko_list); - EXIT; + SEXIT; } /* @@ -1002,7 +1002,7 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) LIST_HEAD(sko_list); uint32_t size = 0; int i = 0; - ENTRY; + SENTRY; /* * Move empty slabs and objects which have not been touched in @@ -1057,7 +1057,7 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) cond_resched(); } - EXIT; + SEXIT; } /* @@ -1136,7 +1136,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) for (*size = PAGE_SIZE; *size <= max_size; *size *= 2) { *objs = (*size - sks_size) / obj_size; if (*objs >= SPL_KMEM_CACHE_OBJ_PER_SLAB) - RETURN(0); + SRETURN(0); } /* @@ -1147,10 +1147,10 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) *size = max_size; *objs = (*size - sks_size) / obj_size; if (*objs >= SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN) - RETURN(0); + SRETURN(0); } - RETURN(-ENOSPC); + SRETURN(-ENOSPC); } /* @@ -1163,7 +1163,7 @@ spl_magazine_size(spl_kmem_cache_t *skc) { uint32_t obj_size = spl_obj_size(skc); int size; - ENTRY; + SENTRY; /* Per-magazine sizes below assume a 4Kib page size */ if (obj_size > (PAGE_SIZE * 256)) @@ -1177,7 +1177,7 @@ spl_magazine_size(spl_kmem_cache_t *skc) else size = 256; - RETURN(size); + SRETURN(size); } /* @@ -1189,7 +1189,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) spl_kmem_magazine_t *skm; int size = sizeof(spl_kmem_magazine_t) + sizeof(void *) * skc->skc_mag_size; - ENTRY; + SENTRY; skm = kmem_alloc_node(size, KM_SLEEP, node); if (skm) { @@ -1202,7 +1202,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) skm->skm_age = jiffies; } - RETURN(skm); + SRETURN(skm); } /* @@ -1214,12 +1214,12 @@ spl_magazine_free(spl_kmem_magazine_t *skm) int size = sizeof(spl_kmem_magazine_t) + sizeof(void *) * skm->skm_size; - ENTRY; + SENTRY; ASSERT(skm->skm_magic == SKM_MAGIC); ASSERT(skm->skm_avail == 0); kmem_free(skm, size); - EXIT; + SEXIT; } /* @@ -1229,7 +1229,7 @@ static int spl_magazine_create(spl_kmem_cache_t *skc) { int i; - ENTRY; + SENTRY; skc->skc_mag_size = spl_magazine_size(skc); skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; @@ -1240,7 +1240,7 @@ spl_magazine_create(spl_kmem_cache_t *skc) for (i--; i >= 0; i--) spl_magazine_free(skc->skc_mag[i]); - RETURN(-ENOMEM); + SRETURN(-ENOMEM); } } @@ -1249,7 +1249,7 @@ spl_magazine_create(spl_kmem_cache_t *skc) schedule_delayed_work_on(i, &skc->skc_mag[i]->skm_work, skc->skc_delay / 3 * HZ); - RETURN(0); + SRETURN(0); } /* @@ -1260,7 +1260,7 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) { spl_kmem_magazine_t *skm; int i; - ENTRY; + SENTRY; for_each_online_cpu(i) { skm = skc->skc_mag[i]; @@ -1268,7 +1268,7 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) spl_magazine_free(skm); } - EXIT; + SEXIT; } /* @@ -1300,7 +1300,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, { spl_kmem_cache_t *skc; int rc, kmem_flags = KM_SLEEP; - ENTRY; + SENTRY; ASSERTF(!(flags & KMC_NOMAGAZINE), "Bad KMC_NOMAGAZINE (%x)\n", flags); ASSERTF(!(flags & KMC_NOHASH), "Bad KMC_NOHASH (%x)\n", flags); @@ -1321,14 +1321,14 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc = (spl_kmem_cache_t *)kmem_zalloc(sizeof(*skc), kmem_flags | KM_NODEBUG); if (skc == NULL) - RETURN(NULL); + SRETURN(NULL); skc->skc_magic = SKC_MAGIC; skc->skc_name_size = strlen(name) + 1; skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, kmem_flags); if (skc->skc_name == NULL) { kmem_free(skc, sizeof(*skc)); - RETURN(NULL); + SRETURN(NULL); } strncpy(skc->skc_name, name, skc->skc_name_size); @@ -1375,11 +1375,11 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, rc = spl_slab_size(skc, &skc->skc_slab_objs, &skc->skc_slab_size); if (rc) - GOTO(out, rc); + SGOTO(out, rc); rc = spl_magazine_create(skc); if (rc) - GOTO(out, rc); + SGOTO(out, rc); spl_init_delayed_work(&skc->skc_work, spl_cache_age, skc); schedule_delayed_work(&skc->skc_work, skc->skc_delay / 3 * HZ); @@ -1388,11 +1388,11 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, list_add_tail(&skc->skc_list, &spl_kmem_cache_list); up_write(&spl_kmem_cache_sem); - RETURN(skc); + SRETURN(skc); out: kmem_free(skc->skc_name, skc->skc_name_size); kmem_free(skc, sizeof(*skc)); - RETURN(NULL); + SRETURN(NULL); } EXPORT_SYMBOL(spl_kmem_cache_create); @@ -1404,7 +1404,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { DECLARE_WAIT_QUEUE_HEAD(wq); int i; - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -1442,7 +1442,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) kmem_free(skc, sizeof(*skc)); - EXIT; + SEXIT; } EXPORT_SYMBOL(spl_kmem_cache_destroy); @@ -1495,7 +1495,7 @@ static spl_kmem_slab_t * spl_cache_grow(spl_kmem_cache_t *skc, int flags) { spl_kmem_slab_t *sks; - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); local_irq_enable(); @@ -1508,13 +1508,13 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) */ if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { schedule(); - GOTO(out, sks= NULL); + SGOTO(out, sks= NULL); } /* Allocate a new slab for the cache */ sks = spl_slab_alloc(skc, flags | __GFP_NORETRY | KM_NODEBUG); if (sks == NULL) - GOTO(out, sks = NULL); + SGOTO(out, sks = NULL); /* Link the new empty slab in to the end of skc_partial_list. */ spin_lock(&skc->skc_lock); @@ -1525,7 +1525,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags) out: local_irq_disable(); - RETURN(sks); + SRETURN(sks); } /* @@ -1539,7 +1539,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) { spl_kmem_slab_t *sks; int rc = 0, refill; - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); @@ -1554,11 +1554,11 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) sks = spl_cache_grow(skc, flags); if (!sks) - GOTO(out, rc); + SGOTO(out, rc); /* Rescheduled to different CPU skm is not local */ if (skm != skc->skc_mag[smp_processor_id()]) - GOTO(out, rc); + SGOTO(out, rc); /* Potentially rescheduled to the same CPU but * allocations may have occured from this CPU while @@ -1594,7 +1594,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) spin_unlock(&skc->skc_lock); out: /* Returns the number of entries added to cache */ - RETURN(rc); + SRETURN(rc); } /* @@ -1605,7 +1605,7 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) { spl_kmem_slab_t *sks = NULL; spl_kmem_obj_t *sko = NULL; - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); @@ -1637,7 +1637,7 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) skc->skc_slab_alloc--; } - EXIT; + SEXIT; } /* @@ -1651,7 +1651,7 @@ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) { int i, count = MIN(flush, skm->skm_avail); - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); @@ -1673,7 +1673,7 @@ spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) spin_unlock(&skc->skc_lock); - RETURN(count); + SRETURN(count); } /* @@ -1686,7 +1686,7 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) spl_kmem_magazine_t *skm; unsigned long irq_flags; void *obj = NULL; - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); @@ -1712,7 +1712,7 @@ restart: /* Per-CPU cache empty, directly allocate from * the slab and refill the per-CPU cache. */ (void)spl_cache_refill(skc, skm, flags); - GOTO(restart, obj = NULL); + SGOTO(restart, obj = NULL); } local_irq_restore(irq_flags); @@ -1723,7 +1723,7 @@ restart: prefetchw(obj); atomic_dec(&skc->skc_ref); - RETURN(obj); + SRETURN(obj); } EXPORT_SYMBOL(spl_kmem_cache_alloc); @@ -1738,7 +1738,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) { spl_kmem_magazine_t *skm; unsigned long flags; - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); @@ -1762,7 +1762,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) local_irq_restore(flags); atomic_dec(&skc->skc_ref); - EXIT; + SEXIT; } EXPORT_SYMBOL(spl_kmem_cache_free); @@ -1814,14 +1814,14 @@ spl_kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) { - ENTRY; + SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); /* Prevent concurrent cache reaping when contended */ if (test_and_set_bit(KMC_BIT_REAPING, &skc->skc_flags)) { - EXIT; + SEXIT; return; } @@ -1834,7 +1834,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) clear_bit(KMC_BIT_REAPING, &skc->skc_flags); atomic_dec(&skc->skc_ref); - EXIT; + SEXIT; } EXPORT_SYMBOL(spl_kmem_cache_reap_now); @@ -1894,7 +1894,7 @@ static int spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) { int i; - ENTRY; + SENTRY; spin_lock_init(lock); INIT_LIST_HEAD(list); @@ -1902,7 +1902,7 @@ spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) for (i = 0; i < size; i++) INIT_HLIST_HEAD(&kmem_table[i]); - RETURN(0); + SRETURN(0); } static void @@ -1911,7 +1911,7 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) unsigned long flags; kmem_debug_t *kd; char str[17]; - ENTRY; + SENTRY; spin_lock_irqsave(lock, flags); if (!list_empty(list)) @@ -1924,7 +1924,7 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) kd->kd_func, kd->kd_line); spin_unlock_irqrestore(lock, flags); - EXIT; + SEXIT; } #else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ #define spl_kmem_init_tracking(list, lock, size) @@ -2031,7 +2031,7 @@ int spl_kmem_init(void) { int rc = 0; - ENTRY; + SENTRY; init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); @@ -2040,7 +2040,7 @@ spl_kmem_init(void) spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, spl_kmem_cache_generic_shrinker); if (spl_kmem_cache_shrinker == NULL) - RETURN(rc = -ENOMEM); + SRETURN(rc = -ENOMEM); #else register_shrinker(&spl_kmem_cache_shrinker); #endif @@ -2052,7 +2052,7 @@ spl_kmem_init(void) spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); #endif - RETURN(rc); + SRETURN(rc); } void @@ -2064,20 +2064,20 @@ spl_kmem_fini(void) * at that address to aid in debugging. Performance is not * a serious concern here since it is module unload time. */ if (kmem_alloc_used_read() != 0) - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "kmem leaked %ld/%ld bytes\n", kmem_alloc_used_read(), kmem_alloc_max); if (vmem_alloc_used_read() != 0) - CDEBUG_LIMIT(D_CONSOLE | D_WARNING, + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "vmem leaked %ld/%ld bytes\n", vmem_alloc_used_read(), vmem_alloc_max); spl_kmem_fini_tracking(&kmem_list, &kmem_lock); spl_kmem_fini_tracking(&vmem_list, &vmem_lock); #endif /* DEBUG_KMEM */ - ENTRY; + SENTRY; #ifdef HAVE_SET_SHRINKER remove_shrinker(spl_kmem_cache_shrinker); @@ -2085,5 +2085,5 @@ spl_kmem_fini(void) unregister_shrinker(&spl_kmem_cache_shrinker); #endif - EXIT; + SEXIT; } diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index d58a9892b..226a12971 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -27,11 +27,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_KOBJ +#define SS_DEBUG_SUBSYS SS_KOBJ struct _buf * kobj_open_file(const char *name) @@ -39,39 +39,39 @@ kobj_open_file(const char *name) struct _buf *file; vnode_t *vp; int rc; - ENTRY; + SENTRY; file = kmalloc(sizeof(_buf_t), GFP_KERNEL); if (file == NULL) - RETURN((_buf_t *)-1UL); + SRETURN((_buf_t *)-1UL); if ((rc = vn_open(name, UIO_SYSSPACE, FREAD, 0644, &vp, 0, 0))) { kfree(file); - RETURN((_buf_t *)-1UL); + SRETURN((_buf_t *)-1UL); } file->vp = vp; - RETURN(file); + SRETURN(file); } /* kobj_open_file() */ EXPORT_SYMBOL(kobj_open_file); void kobj_close_file(struct _buf *file) { - ENTRY; + SENTRY; VOP_CLOSE(file->vp, 0, 0, 0, 0, 0); VN_RELE(file->vp); kfree(file); - EXIT; + SEXIT; } /* kobj_close_file() */ EXPORT_SYMBOL(kobj_close_file); int kobj_read_file(struct _buf *file, char *buf, ssize_t size, offset_t off) { - ENTRY; - RETURN(vn_rdwr(UIO_READ, file->vp, buf, size, off, + SENTRY; + SRETURN(vn_rdwr(UIO_READ, file->vp, buf, size, off, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL)); } /* kobj_read_file() */ EXPORT_SYMBOL(kobj_read_file); @@ -81,14 +81,14 @@ kobj_get_filesize(struct _buf *file, uint64_t *size) { vattr_t vap; int rc; - ENTRY; + SENTRY; rc = VOP_GETATTR(file->vp, &vap, 0, 0, NULL); if (rc) - RETURN(rc); + SRETURN(rc); *size = vap.va_size; - RETURN(rc); + SRETURN(rc); } /* kobj_get_filesize() */ EXPORT_SYMBOL(kobj_get_filesize); diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 238f37ae3..5be1c21fc 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -28,6 +28,12 @@ #include #include +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS +#endif + +#define SS_DEBUG_SUBSYS SS_KSTAT + static spinlock_t kstat_lock; static struct list_head kstat_list; static kid_t kstat_id; @@ -221,7 +227,7 @@ static void * kstat_seq_data_addr(kstat_t *ksp, loff_t n) { void *rc = NULL; - ENTRY; + SENTRY; switch (ksp->ks_type) { case KSTAT_TYPE_RAW: @@ -243,7 +249,7 @@ kstat_seq_data_addr(kstat_t *ksp, loff_t n) PANIC("Undefined kstat type %d\n", ksp->ks_type); } - RETURN(rc); + SRETURN(rc); } static void * @@ -252,7 +258,7 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) loff_t n = *pos; kstat_t *ksp = (kstat_t *)f->private; ASSERT(ksp->ks_magic == KS_MAGIC); - ENTRY; + SENTRY; spin_lock(&ksp->ks_lock); ksp->ks_snaptime = gethrtime(); @@ -261,9 +267,9 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) kstat_seq_show_headers(f); if (n >= ksp->ks_ndata) - RETURN(NULL); + SRETURN(NULL); - RETURN(kstat_seq_data_addr(ksp, n)); + SRETURN(kstat_seq_data_addr(ksp, n)); } static void * @@ -271,13 +277,13 @@ kstat_seq_next(struct seq_file *f, void *p, loff_t *pos) { kstat_t *ksp = (kstat_t *)f->private; ASSERT(ksp->ks_magic == KS_MAGIC); - ENTRY; + SENTRY; ++*pos; if (*pos >= ksp->ks_ndata) - RETURN(NULL); + SRETURN(NULL); - RETURN(kstat_seq_data_addr(ksp, *pos)); + SRETURN(kstat_seq_data_addr(ksp, *pos)); } static void @@ -401,7 +407,7 @@ __kstat_install(kstat_t *ksp) struct proc_dir_entry *de_module, *de_name; kstat_t *tmp; int rc = 0; - ENTRY; + SENTRY; spin_lock(&kstat_lock); @@ -409,7 +415,7 @@ __kstat_install(kstat_t *ksp) list_for_each_entry(tmp, &kstat_list, ks_list) { if (tmp == ksp) { spin_unlock(&kstat_lock); - GOTO(out, rc = -EEXIST); + SGOTO(out, rc = -EEXIST); } } @@ -420,12 +426,12 @@ __kstat_install(kstat_t *ksp) if (de_module == NULL) { de_module = proc_mkdir(ksp->ks_module, proc_spl_kstat); if (de_module == NULL) - GOTO(out, rc = -EUNATCH); + SGOTO(out, rc = -EUNATCH); } de_name = create_proc_entry(ksp->ks_name, 0444, de_module); if (de_name == NULL) - GOTO(out, rc = -EUNATCH); + SGOTO(out, rc = -EUNATCH); spin_lock(&ksp->ks_lock); ksp->ks_proc = de_name; @@ -439,7 +445,7 @@ out: spin_unlock(&kstat_lock); } - EXIT; + SEXIT; } EXPORT_SYMBOL(__kstat_install); @@ -473,18 +479,18 @@ EXPORT_SYMBOL(__kstat_delete); int kstat_init(void) { - ENTRY; + SENTRY; spin_lock_init(&kstat_lock); INIT_LIST_HEAD(&kstat_list); kstat_id = 0; - RETURN(0); + SRETURN(0); } void kstat_fini(void) { - ENTRY; + SENTRY; ASSERT(list_empty(&kstat_list)); - EXIT; + SEXIT; } diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index 787a4480e..ee6bd696a 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -27,11 +27,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_MODULE +#define SS_DEBUG_SUBSYS SS_MODULE static spinlock_t dev_info_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(dev_info_list); @@ -98,7 +98,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, struct cb_ops *cb_ops; struct file_operations *fops; int rc; - ENTRY; + SENTRY; ASSERT(spec_type == S_IFCHR); ASSERT(minor_num < di->di_minors); @@ -106,12 +106,12 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, fops = kzalloc(sizeof(struct file_operations), GFP_KERNEL); if (fops == NULL) - RETURN(DDI_FAILURE); + SRETURN(DDI_FAILURE); cdev = cdev_alloc(); if (cdev == NULL) { kfree(fops); - RETURN(DDI_FAILURE); + SRETURN(DDI_FAILURE); } cdev->ops = fops; @@ -169,11 +169,11 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, rc = cdev_add(cdev, di->di_dev, 1); if (rc) { - CERROR("Error adding cdev, %d\n", rc); + SERROR("Error adding cdev, %d\n", rc); kfree(fops); cdev_del(cdev); mutex_exit(&di->di_lock); - RETURN(DDI_FAILURE); + SRETURN(DDI_FAILURE); } spin_lock(&dev_info_lock); @@ -182,7 +182,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, mutex_exit(&di->di_lock); - RETURN(DDI_SUCCESS); + SRETURN(DDI_SUCCESS); } EXPORT_SYMBOL(__ddi_create_minor_node); @@ -202,18 +202,18 @@ __ddi_remove_minor_node_locked(dev_info_t *di, char *name) void __ddi_remove_minor_node(dev_info_t *di, char *name) { - ENTRY; + SENTRY; mutex_enter(&di->di_lock); __ddi_remove_minor_node_locked(di, name); mutex_exit(&di->di_lock); - EXIT; + SEXIT; } EXPORT_SYMBOL(__ddi_remove_minor_node); int ddi_quiesce_not_needed(dev_info_t *dip) { - RETURN(DDI_SUCCESS); + SRETURN(DDI_SUCCESS); } EXPORT_SYMBOL(ddi_quiesce_not_needed); @@ -280,12 +280,12 @@ __mod_install(struct modlinkage *modlp) struct modldrv *drv = modlp->ml_modldrv; struct dev_info *di; int rc; - ENTRY; + SENTRY; di = dev_info_alloc(modlp->ml_major, modlp->ml_minors, drv->drv_dev_ops); if (di == NULL) - RETURN(ENOMEM); + SRETURN(ENOMEM); /* XXX: Really we need to be calling devo_probe if it's available * and then calling devo_attach for each device discovered. However @@ -294,12 +294,12 @@ __mod_install(struct modlinkage *modlp) rc = drv->drv_dev_ops->devo_attach(di, DDI_ATTACH); if (rc != DDI_SUCCESS) { dev_info_free(di); - RETURN(rc); + SRETURN(rc); } drv->drv_dev_info = di; - RETURN(DDI_SUCCESS); + SRETURN(DDI_SUCCESS); } EXPORT_SYMBOL(__mod_install); @@ -333,16 +333,16 @@ __mod_remove(struct modlinkage *modlp) struct modldrv *drv = modlp->ml_modldrv; struct dev_info *di = drv->drv_dev_info; int rc; - ENTRY; + SENTRY; rc = drv->drv_dev_ops->devo_detach(di, DDI_DETACH); if (rc != DDI_SUCCESS) - RETURN(rc); + SRETURN(rc); dev_info_free(di); drv->drv_dev_info = NULL; - RETURN(DDI_SUCCESS); + SRETURN(DDI_SUCCESS); } EXPORT_SYMBOL(__mod_remove); @@ -350,28 +350,28 @@ int ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip) { ldi_ident_t li; - ENTRY; + SENTRY; ASSERT(modlp); ASSERT(lip); li = kmalloc(sizeof(struct ldi_ident), GFP_KERNEL); if (li == NULL) - RETURN(ENOMEM); + SRETURN(ENOMEM); li->li_dev = MKDEV(modlp->ml_major, 0); *lip = li; - RETURN(0); + SRETURN(0); } EXPORT_SYMBOL(ldi_ident_from_mod); void ldi_ident_release(ldi_ident_t lip) { - ENTRY; + SENTRY; ASSERT(lip); kfree(lip); - EXIT; + SEXIT; } EXPORT_SYMBOL(ldi_ident_release); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index bc6dac5b8..789d8e129 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -31,11 +31,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_PROC +#define SS_DEBUG_SUBSYS SS_PROC #ifdef DEBUG_KMEM static unsigned long table_min = 0; @@ -217,21 +217,21 @@ SPL_PROC_HANDLER(proc_dobitmasks) int is_printk = (mask == &spl_debug_printk) ? 1 : 0; int size = 512, rc; char *str; - ENTRY; + SENTRY; str = kmem_alloc(size, KM_SLEEP); if (str == NULL) - RETURN(-ENOMEM); + SRETURN(-ENOMEM); if (write) { rc = proc_copyin_string(str, size, buffer, *lenp); if (rc < 0) - RETURN(rc); + SRETURN(rc); rc = spl_debug_str2mask(mask, str, is_subsys); /* Always print BUG/ASSERT to console, so keep this mask */ if (is_printk) - *mask |= D_EMERG; + *mask |= SD_EMERG; *ppos += *lenp; } else { @@ -248,19 +248,19 @@ SPL_PROC_HANDLER(proc_dobitmasks) } kmem_free(str, size); - RETURN(rc); + SRETURN(rc); } SPL_PROC_HANDLER(proc_debug_mb) { char str[32]; int rc, len; - ENTRY; + SENTRY; if (write) { rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); if (rc < 0) - RETURN(rc); + SRETURN(rc); rc = spl_debug_set_mb(simple_strtoul(str, NULL, 0)); *ppos += *lenp; @@ -277,12 +277,12 @@ SPL_PROC_HANDLER(proc_debug_mb) } } - RETURN(rc); + SRETURN(rc); } SPL_PROC_HANDLER(proc_dump_kernel) { - ENTRY; + SENTRY; if (write) { spl_debug_dumplog(0); @@ -291,19 +291,19 @@ SPL_PROC_HANDLER(proc_dump_kernel) *lenp = 0; } - RETURN(0); + SRETURN(0); } SPL_PROC_HANDLER(proc_force_bug) { - ENTRY; + SENTRY; if (write) PANIC("Crashing due to forced panic\n"); else *lenp = 0; - RETURN(0); + SRETURN(0); } SPL_PROC_HANDLER(proc_console_max_delay_cs) @@ -311,7 +311,7 @@ SPL_PROC_HANDLER(proc_console_max_delay_cs) int rc, max_delay_cs; struct ctl_table dummy = *table; long d; - ENTRY; + SENTRY; dummy.data = &max_delay_cs; dummy.proc_handler = &proc_dointvec; @@ -320,14 +320,14 @@ SPL_PROC_HANDLER(proc_console_max_delay_cs) max_delay_cs = 0; rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); if (rc < 0) - RETURN(rc); + SRETURN(rc); if (max_delay_cs <= 0) - RETURN(-EINVAL); + SRETURN(-EINVAL); d = (max_delay_cs * HZ) / 100; if (d == 0 || d < spl_console_min_delay) - RETURN(-EINVAL); + SRETURN(-EINVAL); spl_console_max_delay = d; } else { @@ -335,7 +335,7 @@ SPL_PROC_HANDLER(proc_console_max_delay_cs) rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); } - RETURN(rc); + SRETURN(rc); } SPL_PROC_HANDLER(proc_console_min_delay_cs) @@ -343,7 +343,7 @@ SPL_PROC_HANDLER(proc_console_min_delay_cs) int rc, min_delay_cs; struct ctl_table dummy = *table; long d; - ENTRY; + SENTRY; dummy.data = &min_delay_cs; dummy.proc_handler = &proc_dointvec; @@ -352,14 +352,14 @@ SPL_PROC_HANDLER(proc_console_min_delay_cs) min_delay_cs = 0; rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); if (rc < 0) - RETURN(rc); + SRETURN(rc); if (min_delay_cs <= 0) - RETURN(-EINVAL); + SRETURN(-EINVAL); d = (min_delay_cs * HZ) / 100; if (d == 0 || d > spl_console_max_delay) - RETURN(-EINVAL); + SRETURN(-EINVAL); spl_console_min_delay = d; } else { @@ -367,14 +367,14 @@ SPL_PROC_HANDLER(proc_console_min_delay_cs) rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); } - RETURN(rc); + SRETURN(rc); } SPL_PROC_HANDLER(proc_console_backoff) { int rc, backoff; struct ctl_table dummy = *table; - ENTRY; + SENTRY; dummy.data = &backoff; dummy.proc_handler = &proc_dointvec; @@ -383,10 +383,10 @@ SPL_PROC_HANDLER(proc_console_backoff) backoff = 0; rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); if (rc < 0) - RETURN(rc); + SRETURN(rc); if (backoff <= 0) - RETURN(-EINVAL); + SRETURN(-EINVAL); spl_console_backoff = backoff; } else { @@ -394,7 +394,7 @@ SPL_PROC_HANDLER(proc_console_backoff) rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); } - RETURN(rc); + SRETURN(rc); } #ifdef DEBUG_KMEM @@ -403,7 +403,7 @@ SPL_PROC_HANDLER(proc_domemused) int rc = 0; unsigned long min = 0, max = ~0, val; struct ctl_table dummy = *table; - ENTRY; + SENTRY; dummy.data = &val; dummy.proc_handler = &proc_dointvec; @@ -422,7 +422,7 @@ SPL_PROC_HANDLER(proc_domemused) buffer, lenp, ppos); } - RETURN(rc); + SRETURN(rc); } #endif /* DEBUG_KMEM */ @@ -431,7 +431,7 @@ SPL_PROC_HANDLER(proc_dohostid) int len, rc = 0; int32_t val; char *end, str[32]; - ENTRY; + SENTRY; if (write) { /* We can't use spl_proc_doulongvec_minmax() in the write @@ -439,11 +439,11 @@ SPL_PROC_HANDLER(proc_dohostid) * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); if (rc < 0) - RETURN(rc); + SRETURN(rc); val = simple_strtol(str, &end, 16); if (str == end) - RETURN(-EINVAL); + SRETURN(-EINVAL); spl_hostid = (long) val; (void) snprintf(hw_serial, HW_HOSTID_LEN, "%u", @@ -463,7 +463,7 @@ SPL_PROC_HANDLER(proc_dohostid) } } - RETURN(rc); + SRETURN(rc); } #ifndef HAVE_KALLSYMS_LOOKUP_NAME @@ -471,24 +471,24 @@ SPL_PROC_HANDLER(proc_dokallsyms_lookup_name) { int len, rc = 0; char *end, str[32]; - ENTRY; + SENTRY; if (write) { /* This may only be set once at module load time */ if (spl_kallsyms_lookup_name_fn != SYMBOL_POISON) - RETURN(-EEXIST); + SRETURN(-EEXIST); /* We can't use spl_proc_doulongvec_minmax() in the write * case hear because the address while a hex value has no * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); if (rc < 0) - RETURN(rc); + SRETURN(rc); spl_kallsyms_lookup_name_fn = (kallsyms_lookup_name_t)simple_strtoul(str, &end, 16); if (str == end) - RETURN(-EINVAL); + SRETURN(-EINVAL); *ppos += *lenp; } else { @@ -505,7 +505,7 @@ SPL_PROC_HANDLER(proc_dokallsyms_lookup_name) } } - RETURN(rc); + SRETURN(rc); } #endif /* HAVE_KALLSYMS_LOOKUP_NAME */ @@ -513,7 +513,7 @@ SPL_PROC_HANDLER(proc_doavailrmem) { int len, rc = 0; char str[32]; - ENTRY; + SENTRY; if (write) { *ppos += *lenp; @@ -531,14 +531,14 @@ SPL_PROC_HANDLER(proc_doavailrmem) } } - RETURN(rc); + SRETURN(rc); } SPL_PROC_HANDLER(proc_dofreemem) { int len, rc = 0; char str[32]; - ENTRY; + SENTRY; if (write) { *ppos += *lenp; @@ -555,7 +555,7 @@ SPL_PROC_HANDLER(proc_dofreemem) } } - RETURN(rc); + SRETURN(rc); } #ifdef DEBUG_KMEM @@ -605,7 +605,7 @@ slab_seq_start(struct seq_file *f, loff_t *pos) { struct list_head *p; loff_t n = *pos; - ENTRY; + SENTRY; down_read(&spl_kmem_cache_sem); if (!n) @@ -615,20 +615,20 @@ slab_seq_start(struct seq_file *f, loff_t *pos) while (n--) { p = p->next; if (p == &spl_kmem_cache_list) - RETURN(NULL); + SRETURN(NULL); } - RETURN(list_entry(p, spl_kmem_cache_t, skc_list)); + SRETURN(list_entry(p, spl_kmem_cache_t, skc_list)); } static void * slab_seq_next(struct seq_file *f, void *p, loff_t *pos) { spl_kmem_cache_t *skc = p; - ENTRY; + SENTRY; ++*pos; - RETURN((skc->skc_list.next == &spl_kmem_cache_list) ? + SRETURN((skc->skc_list.next == &spl_kmem_cache_list) ? NULL : list_entry(skc->skc_list.next,spl_kmem_cache_t,skc_list)); } @@ -1025,33 +1025,33 @@ int proc_init(void) { int rc = 0; - ENTRY; + SENTRY; #ifdef CONFIG_SYSCTL spl_header = spl_register_sysctl_table(spl_root, 0); if (spl_header == NULL) - RETURN(-EUNATCH); + SRETURN(-EUNATCH); #endif /* CONFIG_SYSCTL */ proc_spl = proc_mkdir("spl", NULL); if (proc_spl == NULL) - GOTO(out, rc = -EUNATCH); + SGOTO(out, rc = -EUNATCH); #ifdef DEBUG_KMEM proc_spl_kmem = proc_mkdir("kmem", proc_spl); if (proc_spl_kmem == NULL) - GOTO(out, rc = -EUNATCH); + SGOTO(out, rc = -EUNATCH); proc_spl_kmem_slab = create_proc_entry("slab", 0444, proc_spl_kmem); if (proc_spl_kmem_slab == NULL) - GOTO(out, rc = -EUNATCH); + SGOTO(out, rc = -EUNATCH); proc_spl_kmem_slab->proc_fops = &proc_slab_operations; #endif /* DEBUG_KMEM */ proc_spl_kstat = proc_mkdir("kstat", proc_spl); if (proc_spl_kstat == NULL) - GOTO(out, rc = -EUNATCH); + SGOTO(out, rc = -EUNATCH); out: if (rc) { remove_proc_entry("kstat", proc_spl); @@ -1065,13 +1065,13 @@ out: #endif /* CONFIG_SYSCTL */ } - RETURN(rc); + SRETURN(rc); } void proc_fini(void) { - ENTRY; + SENTRY; remove_proc_entry("kstat", proc_spl); #ifdef DEBUG_KMEM @@ -1085,5 +1085,5 @@ proc_fini(void) spl_unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ - EXIT; + SEXIT; } diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index d9c83279c..201cb5949 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -28,11 +28,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_TASKQ +#define SS_DEBUG_SUBSYS SS_TASKQ /* Global system-wide dynamic task queue available for all consumers */ taskq_t *system_taskq; @@ -55,7 +55,7 @@ task_alloc(taskq_t *tq, uint_t flags) { spl_task_t *t; int count = 0; - ENTRY; + SENTRY; ASSERT(tq); ASSERT(flags & (TQ_SLEEP | TQ_NOSLEEP)); /* One set */ @@ -66,17 +66,17 @@ retry: if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { t = list_entry(tq->tq_free_list.next, spl_task_t, t_list); list_del_init(&t->t_list); - RETURN(t); + SRETURN(t); } /* Free list is empty and memory allocations are prohibited */ if (flags & TQ_NOALLOC) - RETURN(NULL); + SRETURN(NULL); /* Hit maximum spl_task_t pool size */ if (tq->tq_nalloc >= tq->tq_maxalloc) { if (flags & TQ_NOSLEEP) - RETURN(NULL); + SRETURN(NULL); /* Sleep periodically polling the free list for an available * spl_task_t. If a full second passes and we have not found @@ -86,9 +86,9 @@ retry: schedule_timeout(HZ / 100); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); if (count < 100) - GOTO(retry, count++); + SGOTO(retry, count++); - RETURN(NULL); + SRETURN(NULL); } /* Unreachable, Neither TQ_SLEEP or TQ_NOSLEEP set */ @@ -108,7 +108,7 @@ retry: tq->tq_nalloc++; } - RETURN(t); + SRETURN(t); } /* @@ -118,7 +118,7 @@ retry: static void task_free(taskq_t *tq, spl_task_t *t) { - ENTRY; + SENTRY; ASSERT(tq); ASSERT(t); @@ -128,7 +128,7 @@ task_free(taskq_t *tq, spl_task_t *t) kmem_free(t, sizeof(spl_task_t)); tq->tq_nalloc--; - EXIT; + SEXIT; } /* @@ -138,7 +138,7 @@ task_free(taskq_t *tq, spl_task_t *t) static void task_done(taskq_t *tq, spl_task_t *t) { - ENTRY; + SENTRY; ASSERT(tq); ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -154,7 +154,7 @@ task_done(taskq_t *tq, spl_task_t *t) task_free(tq, t); } - EXIT; + SEXIT; } /* @@ -190,18 +190,18 @@ taskq_wait_check(taskq_t *tq, taskqid_t id) rc = (id < tq->tq_lowest_id); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - RETURN(rc); + SRETURN(rc); } void __taskq_wait_id(taskq_t *tq, taskqid_t id) { - ENTRY; + SENTRY; ASSERT(tq); wait_event(tq->tq_wait_waitq, taskq_wait_check(tq, id)); - EXIT; + SEXIT; } EXPORT_SYMBOL(__taskq_wait_id); @@ -209,7 +209,7 @@ void __taskq_wait(taskq_t *tq) { taskqid_t id; - ENTRY; + SENTRY; ASSERT(tq); /* Wait for the largest outstanding taskqid */ @@ -219,7 +219,7 @@ __taskq_wait(taskq_t *tq) __taskq_wait_id(tq, id); - EXIT; + SEXIT; } EXPORT_SYMBOL(__taskq_wait); @@ -228,16 +228,16 @@ int __taskq_member(taskq_t *tq, void *t) { int i; - ENTRY; + SENTRY; ASSERT(tq); ASSERT(t); for (i = 0; i < tq->tq_nthreads; i++) if (tq->tq_threads[i] == (struct task_struct *)t) - RETURN(1); + SRETURN(1); - RETURN(0); + SRETURN(0); } EXPORT_SYMBOL(__taskq_member); @@ -246,7 +246,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { spl_task_t *t; taskqid_t rc = 0; - ENTRY; + SENTRY; ASSERT(tq); ASSERT(func); @@ -263,15 +263,15 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TQ_ACTIVE)) - GOTO(out, rc = 0); + SGOTO(out, rc = 0); /* Do not queue the task unless there is idle thread for it */ ASSERT(tq->tq_nactive <= tq->tq_nthreads); if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) - GOTO(out, rc = 0); + SGOTO(out, rc = 0); if ((t = task_alloc(tq, flags)) == NULL) - GOTO(out, rc = 0); + SGOTO(out, rc = 0); spin_lock(&t->t_lock); @@ -290,7 +290,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - RETURN(rc); + SRETURN(rc); } EXPORT_SYMBOL(__taskq_dispatch); @@ -305,7 +305,7 @@ taskq_lowest_id(taskq_t *tq) { taskqid_t lowest_id = tq->tq_next_id; spl_task_t *t; - ENTRY; + SENTRY; ASSERT(tq); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -325,7 +325,7 @@ taskq_lowest_id(taskq_t *tq) lowest_id = MIN(lowest_id, t->t_id); } - RETURN(lowest_id); + SRETURN(lowest_id); } /* @@ -338,7 +338,7 @@ taskq_insert_in_order(taskq_t *tq, spl_task_t *t) spl_task_t *w; struct list_head *l; - ENTRY; + SENTRY; ASSERT(tq); ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -353,7 +353,7 @@ taskq_insert_in_order(taskq_t *tq, spl_task_t *t) if (l == &tq->tq_work_list) list_add(&t->t_list, &tq->tq_work_list); - EXIT; + SEXIT; } static int @@ -365,7 +365,7 @@ taskq_thread(void *args) taskq_t *tq = args; spl_task_t *t; struct list_head *pend_list; - ENTRY; + SENTRY; ASSERT(tq); current->flags |= PF_NOFREEZE; @@ -433,7 +433,7 @@ taskq_thread(void *args) tq->tq_nthreads--; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - RETURN(0); + SRETURN(0); } taskq_t * @@ -443,7 +443,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, taskq_t *tq; struct task_struct *t; int rc = 0, i, j = 0; - ENTRY; + SENTRY; ASSERT(name != NULL); ASSERT(pri <= maxclsyspri); @@ -462,12 +462,12 @@ __taskq_create(const char *name, int nthreads, pri_t pri, tq = kmem_alloc(sizeof(*tq), KM_SLEEP); if (tq == NULL) - RETURN(NULL); + SRETURN(NULL); tq->tq_threads = kmem_alloc(nthreads * sizeof(t), KM_SLEEP); if (tq->tq_threads == NULL) { kmem_free(tq, sizeof(*tq)); - RETURN(NULL); + SRETURN(NULL); } spin_lock_init(&tq->tq_lock); @@ -517,7 +517,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, tq = NULL; } - RETURN(tq); + SRETURN(tq); } EXPORT_SYMBOL(__taskq_create); @@ -526,7 +526,7 @@ __taskq_destroy(taskq_t *tq) { spl_task_t *t; int i, nthreads; - ENTRY; + SENTRY; ASSERT(tq); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); @@ -560,29 +560,29 @@ __taskq_destroy(taskq_t *tq) kmem_free(tq->tq_threads, nthreads * sizeof(spl_task_t *)); kmem_free(tq, sizeof(taskq_t)); - EXIT; + SEXIT; } EXPORT_SYMBOL(__taskq_destroy); int spl_taskq_init(void) { - ENTRY; + SENTRY; /* Solaris creates a dynamic taskq of up to 64 threads, however in * a Linux environment 1 thread per-core is usually about right */ system_taskq = taskq_create("spl_system_taskq", num_online_cpus(), minclsyspri, 4, 512, TASKQ_PREPOPULATE); if (system_taskq == NULL) - RETURN(1); + SRETURN(1); - RETURN(0); + SRETURN(0); } void spl_taskq_fini(void) { - ENTRY; + SENTRY; taskq_destroy(system_taskq); - EXIT; + SEXIT; } diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index e28b1261a..5de12ac33 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -28,11 +28,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_THREAD +#define SS_DEBUG_SUBSYS SS_THREAD /* * Thread interfaces @@ -72,8 +72,8 @@ thread_generic_wrapper(void *arg) void __thread_exit(void) { - ENTRY; - EXIT; + SENTRY; + SEXIT; complete_and_exit(NULL, 0); /* Unreachable */ } @@ -90,7 +90,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, thread_priv_t *tp; struct task_struct *tsk; char *p; - ENTRY; + SENTRY; /* Option pp is simply ignored */ /* Variable stack size unsupported */ @@ -98,7 +98,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp = kmem_alloc(sizeof(thread_priv_t), KM_SLEEP); if (tp == NULL) - RETURN(NULL); + SRETURN(NULL); tp->tp_magic = TP_MAGIC; tp->tp_name_size = strlen(name) + 1; @@ -106,7 +106,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp->tp_name = kmem_alloc(tp->tp_name_size, KM_SLEEP); if (tp->tp_name == NULL) { kmem_free(tp, sizeof(thread_priv_t)); - RETURN(NULL); + SRETURN(NULL); } strncpy(tp->tp_name, name, tp->tp_name_size); @@ -127,11 +127,11 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tsk = kthread_create(thread_generic_wrapper, (void *)tp, "%s", tp->tp_name); if (IS_ERR(tsk)) { - CERROR("Failed to create thread: %ld\n", PTR_ERR(tsk)); - RETURN(NULL); + SERROR("Failed to create thread: %ld\n", PTR_ERR(tsk)); + SRETURN(NULL); } wake_up_process(tsk); - RETURN((kthread_t *)tsk); + SRETURN((kthread_t *)tsk); } EXPORT_SYMBOL(__thread_create); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 840bb6718..9bfead8cf 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -27,11 +27,11 @@ #include #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS #endif -#define DEBUG_SUBSYSTEM S_VNODE +#define SS_DEBUG_SUBSYS SS_VNODE vnode_t *rootdir = (vnode_t *)0xabcd1234; EXPORT_SYMBOL(rootdir); @@ -76,7 +76,7 @@ vnode_t * vn_alloc(int flag) { vnode_t *vp; - ENTRY; + SENTRY; vp = kmem_cache_alloc(vn_cache, flag); if (vp != NULL) { @@ -84,16 +84,16 @@ vn_alloc(int flag) vp->v_type = 0; } - RETURN(vp); + SRETURN(vp); } /* vn_alloc() */ EXPORT_SYMBOL(vn_alloc); void vn_free(vnode_t *vp) { - ENTRY; + SENTRY; kmem_cache_free(vn_cache, vp); - EXIT; + SEXIT; } /* vn_free() */ EXPORT_SYMBOL(vn_free); @@ -105,7 +105,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, struct kstat stat; int rc, saved_umask = 0; vnode_t *vp; - ENTRY; + SENTRY; ASSERT(flags & (FWRITE | FREAD)); ASSERT(seg == UIO_SYSSPACE); @@ -131,18 +131,18 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, (void)xchg(¤t->fs->umask, saved_umask); if (IS_ERR(fp)) - RETURN(-PTR_ERR(fp)); + SRETURN(-PTR_ERR(fp)); rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) { filp_close(fp, 0); - RETURN(-rc); + SRETURN(-rc); } vp = vn_alloc(KM_SLEEP); if (!vp) { filp_close(fp, 0); - RETURN(ENOMEM); + SRETURN(ENOMEM); } mutex_enter(&vp->v_lock); @@ -151,7 +151,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, *vpp = vp; mutex_exit(&vp->v_lock); - RETURN(0); + SRETURN(0); } /* vn_open() */ EXPORT_SYMBOL(vn_open); @@ -161,20 +161,20 @@ vn_openat(const char *path, uio_seg_t seg, int flags, int mode, { char *realpath; int len, rc; - ENTRY; + SENTRY; ASSERT(vp == rootdir); len = strlen(path) + 2; realpath = kmalloc(len, GFP_KERNEL); if (!realpath) - RETURN(ENOMEM); + SRETURN(ENOMEM); (void)snprintf(realpath, len, "/%s", path); rc = vn_open(realpath, seg, flags, mode, vpp, x1, x2); kfree(realpath); - RETURN(rc); + SRETURN(rc); } /* vn_openat() */ EXPORT_SYMBOL(vn_openat); @@ -186,7 +186,7 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, mm_segment_t saved_fs; struct file *fp; int rc; - ENTRY; + SENTRY; ASSERT(uio == UIO_WRITE || uio == UIO_READ); ASSERT(vp); @@ -215,16 +215,16 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, set_fs(saved_fs); if (rc < 0) - RETURN(-rc); + SRETURN(-rc); if (residp) { *residp = len - rc; } else { if (rc != len) - RETURN(EIO); + SRETURN(EIO); } - RETURN(0); + SRETURN(0); } /* vn_rdwr() */ EXPORT_SYMBOL(vn_rdwr); @@ -232,7 +232,7 @@ int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) { int rc; - ENTRY; + SENTRY; ASSERT(vp); ASSERT(vp->v_file); @@ -240,7 +240,7 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) rc = filp_close(vp->v_file, 0); vn_free(vp); - RETURN(-rc); + SRETURN(-rc); } /* vn_close() */ EXPORT_SYMBOL(vn_close); @@ -275,18 +275,18 @@ vn_remove(const char *path, uio_seg_t seg, int flags) struct nameidata nd; struct inode *inode = NULL; int rc = 0; - ENTRY; + SENTRY; ASSERT(seg == UIO_SYSSPACE); ASSERT(flags == RMFILE); rc = path_lookup(path, LOOKUP_PARENT, &nd); if (rc) - GOTO(exit, rc); + SGOTO(exit, rc); rc = -EISDIR; if (nd.last_type != LAST_NORM) - GOTO(exit1, rc); + SGOTO(exit1, rc); #ifdef HAVE_INODE_I_MUTEX mutex_lock_nested(&nd.nd_dentry->d_inode->i_mutex, I_MUTEX_PARENT); @@ -298,7 +298,7 @@ vn_remove(const char *path, uio_seg_t seg, int flags) if (!IS_ERR(dentry)) { /* Why not before? Because we want correct rc value */ if (nd.last.name[nd.last.len]) - GOTO(slashes, rc); + SGOTO(slashes, rc); inode = dentry->d_inode; if (inode) @@ -321,12 +321,12 @@ exit2: exit1: vn_path_release(&nd); exit: - RETURN(-rc); + SRETURN(-rc); slashes: rc = !dentry->d_inode ? -ENOENT : S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR; - GOTO(exit2, rc); + SGOTO(exit2, rc); } /* vn_remove() */ EXPORT_SYMBOL(vn_remove); @@ -339,28 +339,28 @@ vn_rename(const char *oldname, const char *newname, int x1) struct dentry *trap; struct nameidata oldnd, newnd; int rc = 0; - ENTRY; + SENTRY; rc = path_lookup(oldname, LOOKUP_PARENT, &oldnd); if (rc) - GOTO(exit, rc); + SGOTO(exit, rc); rc = path_lookup(newname, LOOKUP_PARENT, &newnd); if (rc) - GOTO(exit1, rc); + SGOTO(exit1, rc); rc = -EXDEV; if (oldnd.nd_mnt != newnd.nd_mnt) - GOTO(exit2, rc); + SGOTO(exit2, rc); old_dir = oldnd.nd_dentry; rc = -EBUSY; if (oldnd.last_type != LAST_NORM) - GOTO(exit2, rc); + SGOTO(exit2, rc); new_dir = newnd.nd_dentry; if (newnd.last_type != LAST_NORM) - GOTO(exit2, rc); + SGOTO(exit2, rc); trap = lock_rename(new_dir, old_dir); @@ -368,36 +368,36 @@ vn_rename(const char *oldname, const char *newname, int x1) rc = PTR_ERR(old_dentry); if (IS_ERR(old_dentry)) - GOTO(exit3, rc); + SGOTO(exit3, rc); /* source must exist */ rc = -ENOENT; if (!old_dentry->d_inode) - GOTO(exit4, rc); + SGOTO(exit4, rc); /* unless the source is a directory trailing slashes give -ENOTDIR */ if (!S_ISDIR(old_dentry->d_inode->i_mode)) { rc = -ENOTDIR; if (oldnd.last.name[oldnd.last.len]) - GOTO(exit4, rc); + SGOTO(exit4, rc); if (newnd.last.name[newnd.last.len]) - GOTO(exit4, rc); + SGOTO(exit4, rc); } /* source should not be ancestor of target */ rc = -EINVAL; if (old_dentry == trap) - GOTO(exit4, rc); + SGOTO(exit4, rc); new_dentry = vn_lookup_hash(&newnd); rc = PTR_ERR(new_dentry); if (IS_ERR(new_dentry)) - GOTO(exit4, rc); + SGOTO(exit4, rc); /* target should not be an ancestor of source */ rc = -ENOTEMPTY; if (new_dentry == trap) - GOTO(exit5, rc); + SGOTO(exit5, rc); #ifdef HAVE_4ARGS_VFS_RENAME rc = vfs_rename(old_dir->d_inode, old_dentry, @@ -417,7 +417,7 @@ exit2: exit1: vn_path_release(&oldnd); exit: - RETURN(-rc); + SRETURN(-rc); } EXPORT_SYMBOL(vn_rename); @@ -427,7 +427,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) struct file *fp; struct kstat stat; int rc; - ENTRY; + SENTRY; ASSERT(vp); ASSERT(vp->v_file); @@ -437,7 +437,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); if (rc) - RETURN(-rc); + SRETURN(-rc); vap->va_type = vn_get_sol_type(stat.mode); vap->va_mode = stat.mode; @@ -457,14 +457,14 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) vap->va_rdev = stat.rdev; vap->va_blocks = stat.blocks; - RETURN(0); + SRETURN(0); } EXPORT_SYMBOL(vn_getattr); int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) { int datasync = 0; - ENTRY; + SENTRY; ASSERT(vp); ASSERT(vp->v_file); @@ -472,7 +472,7 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) if (flags & FDSYNC) datasync = 1; - RETURN(-spl_filp_fsync(vp->v_file, datasync)); + SRETURN(-spl_filp_fsync(vp->v_file, datasync)); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); @@ -502,7 +502,7 @@ vn_getf(int fd) file_t *fp; vnode_t *vp; int rc = 0; - ENTRY; + SENTRY; /* Already open just take an extra reference */ spin_lock(&vn_file_lock); @@ -511,7 +511,7 @@ vn_getf(int fd) if (fp) { atomic_inc(&fp->f_ref); spin_unlock(&vn_file_lock); - RETURN(fp); + SRETURN(fp); } spin_unlock(&vn_file_lock); @@ -519,7 +519,7 @@ vn_getf(int fd) /* File was not yet opened create the object and setup */ fp = kmem_cache_alloc(vn_file_cache, KM_SLEEP); if (fp == NULL) - GOTO(out, rc); + SGOTO(out, rc); mutex_enter(&fp->f_lock); @@ -529,14 +529,14 @@ vn_getf(int fd) lfp = fget(fd); if (lfp == NULL) - GOTO(out_mutex, rc); + SGOTO(out_mutex, rc); vp = vn_alloc(KM_SLEEP); if (vp == NULL) - GOTO(out_fget, rc); + SGOTO(out_fget, rc); if (vfs_getattr(lfp->f_vfsmnt, lfp->f_dentry, &stat)) - GOTO(out_vnode, rc); + SGOTO(out_vnode, rc); mutex_enter(&vp->v_lock); vp->v_type = vn_get_sol_type(stat.mode); @@ -552,7 +552,7 @@ vn_getf(int fd) spin_unlock(&vn_file_lock); mutex_exit(&fp->f_lock); - RETURN(fp); + SRETURN(fp); out_vnode: vn_free(vp); @@ -562,7 +562,7 @@ out_mutex: mutex_exit(&fp->f_lock); kmem_cache_free(vn_file_cache, fp); out: - RETURN(NULL); + SRETURN(NULL); } /* getf() */ EXPORT_SYMBOL(getf); @@ -582,7 +582,7 @@ void vn_releasef(int fd) { file_t *fp; - ENTRY; + SENTRY; spin_lock(&vn_file_lock); fp = file_find(fd); @@ -590,7 +590,7 @@ vn_releasef(int fd) atomic_dec(&fp->f_ref); if (atomic_read(&fp->f_ref) > 0) { spin_unlock(&vn_file_lock); - EXIT; + SEXIT; return; } @@ -599,7 +599,7 @@ vn_releasef(int fd) } spin_unlock(&vn_file_lock); - EXIT; + SEXIT; return; } /* releasef() */ EXPORT_SYMBOL(releasef); @@ -654,7 +654,7 @@ vn_set_pwd(const char *filename) #endif /* HAVE_2ARGS_SET_FS_PWD */ mm_segment_t saved_fs; int rc; - ENTRY; + SENTRY; /* * user_path_dir() and __user_walk() both expect 'filename' to be @@ -668,11 +668,11 @@ vn_set_pwd(const char *filename) # ifdef HAVE_USER_PATH_DIR rc = user_path_dir(filename, &path); if (rc) - GOTO(out, rc); + SGOTO(out, rc); rc = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_ACCESS); if (rc) - GOTO(dput_and_out, rc); + SGOTO(dput_and_out, rc); set_fs_pwd(current->fs, &path); @@ -682,11 +682,11 @@ dput_and_out: rc = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); if (rc) - GOTO(out, rc); + SGOTO(out, rc); rc = vfs_permission(&nd, MAY_EXEC); if (rc) - GOTO(dput_and_out, rc); + SGOTO(dput_and_out, rc); set_fs_pwd(current->fs, &nd.path); @@ -697,11 +697,11 @@ dput_and_out: rc = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); if (rc) - GOTO(out, rc); + SGOTO(out, rc); rc = vfs_permission(&nd, MAY_EXEC); if (rc) - GOTO(dput_and_out, rc); + SGOTO(dput_and_out, rc); set_fs_pwd(current->fs, nd.nd_mnt, nd.nd_dentry); @@ -711,7 +711,7 @@ dput_and_out: out: set_fs(saved_fs); - RETURN(-rc); + SRETURN(-rc); } /* vn_set_pwd() */ EXPORT_SYMBOL(vn_set_pwd); @@ -756,7 +756,7 @@ vn_file_cache_destructor(void *buf, void *cdrarg) int vn_init(void) { - ENTRY; + SENTRY; vn_cache = kmem_cache_create("spl_vn_cache", sizeof(struct vnode), 64, vn_cache_constructor, @@ -768,7 +768,7 @@ vn_init(void) vn_file_cache_constructor, vn_file_cache_destructor, NULL, NULL, NULL, 0); - RETURN(0); + SRETURN(0); } /* vn_init() */ void @@ -776,7 +776,7 @@ vn_fini(void) { file_t *fp, *next_fp; int leaked = 0; - ENTRY; + SENTRY; spin_lock(&vn_file_lock); @@ -791,10 +791,10 @@ vn_fini(void) spin_unlock(&vn_file_lock); if (leaked > 0) - CWARN("Warning %d files leaked\n", leaked); + SWARN("Warning %d files leaked\n", leaked); kmem_cache_destroy(vn_cache); - EXIT; + SEXIT; return; } /* vn_fini() */ diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index 375b74e53..eba470a4b 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -29,6 +29,12 @@ #include #include +#ifdef SS_DEBUG_SUBSYS +#undef SS_DEBUG_SUBSYS +#endif + +#define SS_DEBUG_SUBSYS SS_XDR + /* * SPL's XDR mem implementation. * @@ -144,7 +150,7 @@ xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, xdrs->x_ops = &xdrmem_decode_ops; break; default: - CWARN("Invalid op value: %d\n", op); + SWARN("Invalid op value: %d\n", op); xdrs->x_ops = NULL; /* Let the caller know we failed */ return; } @@ -154,7 +160,7 @@ xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, xdrs->x_addr_end = addr + size; if (xdrs->x_addr_end < xdrs->x_addr) { - CWARN("Overflow while creating xdrmem: %p, %u\n", addr, size); + SWARN("Overflow while creating xdrmem: %p, %u\n", addr, size); xdrs->x_ops = NULL; } } @@ -166,7 +172,7 @@ xdrmem_control(XDR *xdrs, int req, void *info) struct xdr_bytesrec *rec = (struct xdr_bytesrec *) info; if (req != XDR_GET_BYTES_AVAIL) { - CWARN("Called with unknown request: %d\n", req); + SWARN("Called with unknown request: %d\n", req); return FALSE; } From 22cd0f19b170394ac98ca3984e8f5b119fa32c7e Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 20 Jul 2010 13:47:37 -0700 Subject: [PATCH 0424/1062] Fix compilation error due to undefined ACCESS_ONCE macro. When CONFIG_DEBUG_MUTEXES is turned on in RHEL5's kernel config, the mutexes store the owner for debugging purposes, therefore the SPL will enable HAVE_MUTEX_OWNER. However, the SPL code uses ACCESS_ONCE() to access the owner, and this macro is not defined in the RHEL5 kernel, therefore we define it ourselves in include/linux/compiler_compat.h. Signed-off-by: Ricardo M. Correia Signed-off-by: Brian Behlendorf --- include/linux/compiler_compat.h | 47 +++++++++++++++++++++++++++++++++ include/sys/mutex.h | 1 + 2 files changed, 48 insertions(+) create mode 100644 include/linux/compiler_compat.h diff --git a/include/linux/compiler_compat.h b/include/linux/compiler_compat.h new file mode 100644 index 000000000..de3b3c391 --- /dev/null +++ b/include/linux/compiler_compat.h @@ -0,0 +1,47 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_COMPILER_COMPAT_H +#define _SPL_COMPILER_COMPAT_H + +#include + +#ifndef ACCESS_ONCE +/* + * Prevent the compiler from merging or refetching accesses. The compiler + * is also forbidden from reordering successive instances of ACCESS_ONCE(), + * but only when the compiler is aware of some particular ordering. One way + * to make the compiler aware of ordering is to put the two invocations of + * ACCESS_ONCE() in different C statements. + * + * This macro does absolutely -nothing- to prevent the CPU from reordering, + * merging, or refetching absolutely anything at any time. Its main intended + * use is to mediate communication between process-level code and irq/NMI + * handlers, all running on the same CPU. + */ +/* Taken from 2.6.33.2 */ +# define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) +#endif + +#endif /* _SPL_COMPILER_COMPAT_H */ diff --git a/include/sys/mutex.h b/include/sys/mutex.h index d33694766..ce8c0f4e9 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -27,6 +27,7 @@ #include #include +#include typedef enum { MUTEX_DEFAULT = 0, From 9dd5d138b2326201f4258b126f2bfdb0b4c6138d Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 20 Jul 2010 13:48:51 -0700 Subject: [PATCH 0425/1062] Fix bcopy() to allow memory area overlap Under Solaris bcopy() allows overlapping memory areas so we must use memmove() instead of memcpy(). Signed-off-by: Ricardo M. Correia Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index eccfee34d..eded9abc0 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -110,7 +110,7 @@ /* Map some simple functions. */ #define bzero(ptr,size) memset(ptr,0,size) -#define bcopy(src,dest,size) memcpy(dest,src,size) +#define bcopy(src,dest,size) memmove(dest,src,size) #define bcmp(src,dest,size) memcmp((src), (dest), (size_t)(size)) /* Dtrace probes do not exist in the linux kernel */ From 2c762de8303e441154a0c38c0cf78170b5d45013 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 20 Jul 2010 13:51:42 -0700 Subject: [PATCH 0426/1062] Fix buggy kmem_{v}asprintf() functions When the kvasprintf() call fails they should reset the arguments by calling va_start()/va_copy() and va_end() inside the loop, otherwise they'll try to read more arguments rather than starting over and reading them from the beginning. Signed-off-by: Ricardo M. Correia Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 100c60230..e575b1ee9 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -245,11 +245,11 @@ kmem_vasprintf(const char *fmt, va_list ap) va_list aq; char *ptr; - va_copy(aq, ap); do { + va_copy(aq, ap); ptr = kvasprintf(GFP_KERNEL, fmt, aq); + va_end(aq); } while (ptr == NULL); - va_end(aq); return ptr; } @@ -261,11 +261,11 @@ kmem_asprintf(const char *fmt, ...) va_list ap; char *ptr; - va_start(ap, fmt); do { + va_start(ap, fmt); ptr = kvasprintf(GFP_KERNEL, fmt, ap); + va_end(ap); } while (ptr == NULL); - va_end(ap); return ptr; } From 81672c012249f1ba81a27a1ff8f9b19b4a8048a8 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 20 Jul 2010 15:25:45 -0700 Subject: [PATCH 0427/1062] Display DEBUG keyword during module load when --enable-debug is used. Signed-off-by: Ricardo M. Correia Signed-off-by: Brian Behlendorf --- include/sys/debug.h | 6 ++++++ module/spl/spl-generic.c | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 0da7e31bb..fbf15143f 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -46,6 +46,9 @@ #ifdef NDEBUG /* Debugging Disabled */ +/* Define SPL_DEBUG_STR to make clear which ASSERT definitions are used */ +#define SPL_DEBUG_STR "" + #define PANIC(fmt, a...) \ do { \ printk(KERN_EMERG fmt, ## a); \ @@ -81,6 +84,9 @@ do { \ #else /* Debugging Enabled */ +/* Define SPL_DEBUG_STR to make clear which ASSERT definitions are used */ +#define SPL_DEBUG_STR " (DEBUG mode)" + #define PANIC(fmt, a...) \ do { \ spl_debug_msg(NULL, 0, 0, \ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index a7083b6d2..57136cdd4 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -478,7 +478,8 @@ __init spl_init(void) if ((rc = spl_kmem_init_kallsyms_lookup())) SGOTO(out8, rc); - printk("SPL: Loaded Solaris Porting Layer v%s\n", SPL_META_VERSION); + printk(KERN_NOTICE "SPL: Loaded Solaris Porting Layer v%s%s\n", + SPL_META_VERSION, SPL_DEBUG_STR); SRETURN(rc); out8: kstat_fini(); @@ -497,8 +498,8 @@ out2: out1: debug_fini(); - printk("SPL: Failed to Load Solaris Porting Layer v%s, " - "rc = %d\n", SPL_META_VERSION, rc); + printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer v%s%s" + ", rc = %d\n", SPL_META_VERSION, SPL_DEBUG_STR, rc); return rc; } @@ -507,7 +508,8 @@ spl_fini(void) { SENTRY; - printk("SPL: Unloaded Solaris Porting Layer v%s\n", SPL_META_VERSION); + printk(KERN_NOTICE "SPL: Unloaded Solaris Porting Layer v%s%s\n", + SPL_META_VERSION, SPL_DEBUG_STR); kstat_fini(); proc_fini(); vn_fini(); From 15b52c083ee886d9cb102655b4313ae7c027784a Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 20 Jul 2010 15:44:28 -0700 Subject: [PATCH 0428/1062] Fix max_ncpus definition. It was being defined as the constant 64 and at first I changed it to be NR_CPUS instead. However, NR_CPUS can be a large value on recent kernels (4096), and this may cause too large kmem allocations to happen. Therefore, now we use num_possible_cpus(), which should return a (typically) small value which represents the maximum number of CPUs than can be brought online in the running hardware (this value is determined at boot time by arch-specific kernel code). Signed-off-by: Ricardo M. Correia Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index eded9abc0..d9647b3cd 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -26,6 +26,7 @@ #define _SPL_SYSMACROS_H #include +#include #include #include #include @@ -77,8 +78,8 @@ #define proc_pageout NULL #define curproc get_current() -#define max_ncpus 64 -#define CPU_SEQID smp_processor_id() /* I think... */ +#define max_ncpus num_possible_cpus() +#define CPU_SEQID smp_processor_id() #define _NOTE(x) #define is_system_labeled() 0 From 8b0eb3f0dcf293467ddfd4b0f0d7e757f2369452 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Jul 2010 16:31:42 -0700 Subject: [PATCH 0429/1062] Remove deadcode caused by removal of format1 arg Commit 55abb0929e4fbe326a9737650a167a1a988ad86b removed the never used format1 argument of spl_debug_msg(). That in turn resulted in some deadcode which should be removed since it's now useless. --- module/spl/spl-debug.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index f6ec86ac4..008115e4e 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -669,7 +669,6 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, int max_nob; va_list ap; int i; - int remain; if (subsys == 0) subsys = SS_DEBUG_SUBSYS; @@ -726,13 +725,8 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, needed = 0; if (format) { - remain = max_nob - needed; - if (remain < 0) - remain = 0; - va_start(ap, format); - needed += vsnprintf(string_buf+needed, remain, - format, ap); + needed += vsnprintf(string_buf, max_nob, format, ap); va_end(ap); } @@ -807,13 +801,10 @@ console: needed = 0; if (format != NULL) { - remain = TRACE_CONSOLE_BUFFER_SIZE - needed; - if (remain > 0) { - va_start(ap, format); - needed += vsnprintf(string_buf+needed, remain, - format, ap); - va_end(ap); - } + va_start(ap, format); + needed += vsnprintf(string_buf, + TRACE_CONSOLE_BUFFER_SIZE, format, ap); + va_end(ap); } trace_print_to_console(&header, mask, string_buf, needed, file, fn); From 849c50e7f2487dd3f1dce1417e51dff3a12338d6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 26 Jul 2010 10:24:26 -0700 Subject: [PATCH 0430/1062] Fix two minor compiler warnings In cmd/splat.c there was a comparison between an __u32 and an int. To resolve the issue simply use a __u32 and strtoul() when converting the provided user string. In module/spl/spl-vnode.c we should explicitly cast nd->last.name to a const char * which is what is expected by the prototype. --- cmd/splat.c | 9 +++++---- module/spl/spl-vnode.c | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/splat.c b/cmd/splat.c index c0bb7d8d4..2fa0c50c0 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -316,14 +316,15 @@ static test_t *test_find(char *sub_str, char *test_str) ListIterator si, ti; subsystem_t *sub; test_t *test; - int sub_num, test_num; + __u32 sub_num, test_num; - /* No error checking here because it may not be a number, it's + /* + * No error checking here because it may not be a number, it's * perfectly OK for it to be a string. Since we're just using * it for comparison purposes this is all very safe. */ - sub_num = strtol(sub_str, NULL, 0); - test_num = strtol(test_str, NULL, 0); + sub_num = strtoul(sub_str, NULL, 0); + test_num = strtoul(test_str, NULL, 0); si = list_iterator_create(subsystems); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 9bfead8cf..dd759bf7f 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -257,7 +257,8 @@ EXPORT_SYMBOL(vn_seek); static struct dentry * vn_lookup_hash(struct nameidata *nd) { - return lookup_one_len(nd->last.name, nd->nd_dentry, nd->last.len); + return lookup_one_len((const char *)nd->last.name, + nd->nd_dentry, nd->last.len); } /* lookup_hash() */ static void From 10129680f860168a61932f0011d9ab864286bfcd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 26 Jul 2010 15:47:55 -0700 Subject: [PATCH 0431/1062] Ensure kmem_alloc() and vmem_alloc() never fail The Solaris semantics for kmem_alloc() and vmem_alloc() are that they must never fail when called with KM_SLEEP. They may only fail if called with KM_NOSLEEP otherwise they must block until memory is available. This is quite different from how the Linux memory allocators work, under Linux a memory allocation failure is always possible and must be dealt with. At one point in the past the kmem code did properly implement this behavior, however as the code evolved this behavior was overlooked in places. This patch goes through all three implementations of the kmem/vmem allocation functions and ensures that they will all block in the KM_SLEEP case when memory is not available. They may still fail in the KM_NOSLEEP case in which case the caller is responsible for handling the failure. Special care is taken in vmalloc_nofail() to avoid thrashing the system on the virtual address space spin lock. The down side of course is if you do see a failure here, which is unlikely for 64-bit systems, your allocation will delay for an entire second. Still this is preferable to locking up your system and it is the best we can do given the constraints. Additionally, the code was cleaned up to be much more readable and comments were added to describe the various kmem-debug-* configure options. The default configure options remain: "--enable-debug-kmem --disable-debug-kmem-tracking" --- include/sys/kmem.h | 226 ++++++++++++++++++++++++-------------- module/spl/spl-kmem.c | 248 ++++++++++++++++++++++++------------------ 2 files changed, 285 insertions(+), 189 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 17b3a2276..e90c6b8ce 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -87,10 +87,10 @@ kzalloc_nofail(size_t size, gfp_t flags) return ptr; } -#ifdef HAVE_KMALLOC_NODE static inline void * kmalloc_node_nofail(size_t size, gfp_t flags, int node) { +#ifdef HAVE_KMALLOC_NODE void *ptr; do { @@ -98,16 +98,63 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) } while (ptr == NULL && (flags & __GFP_WAIT)); return ptr; -} +#else + return kmalloc_nofail(size, flags); #endif /* HAVE_KMALLOC_NODE */ +} + +static inline void * +vmalloc_nofail(size_t size, gfp_t flags) +{ + void *ptr; + + /* + * Retry failed __vmalloc() allocations once every second. The + * rational for the delay is that the likely failure modes are: + * + * 1) The system has completely exhausted memory, in which case + * delaying 1 second for the memory reclaim to run is reasonable + * to avoid thrashing the system. + * 2) The system has memory but has exhausted the small virtual + * address space available on 32-bit systems. Retrying the + * allocation immediately will only result in spinning on the + * virtual address space lock. It is better delay a second and + * hope that another process will free some of the address space. + * But the bottom line is there is not much we can actually do + * since we can never safely return a failure and honor the + * Solaris semantics. + */ + while (1) { + ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); + if (unlikely((ptr == NULL) && (flags & __GFP_WAIT))) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + } else { + break; + } + } + + return ptr; +} + +static inline void * +vzalloc_nofail(size_t size, gfp_t flags) +{ + void *ptr; + + ptr = vmalloc_nofail(size, flags); + if (ptr) + memset(ptr, 0, (size)); + + return ptr; +} #ifdef DEBUG_KMEM -# ifdef HAVE_ATOMIC64_T -extern atomic64_t kmem_alloc_used; -extern unsigned long long kmem_alloc_max; -extern atomic64_t vmem_alloc_used; -extern unsigned long long vmem_alloc_max; +/* + * Memory accounting functions to be used only when DEBUG_KMEM is set. + */ +# ifdef HAVE_ATOMIC64_T # define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used) # define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used) @@ -118,13 +165,13 @@ extern unsigned long long vmem_alloc_max; # define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used) # define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size) -# else - -extern atomic_t kmem_alloc_used; +extern atomic64_t kmem_alloc_used; extern unsigned long long kmem_alloc_max; -extern atomic_t vmem_alloc_used; +extern atomic64_t vmem_alloc_used; extern unsigned long long vmem_alloc_max; +# else /* HAVE_ATOMIC64_T */ + # define kmem_alloc_used_add(size) atomic_add(size, &kmem_alloc_used) # define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used) # define kmem_alloc_used_read() atomic_read(&kmem_alloc_used) @@ -134,90 +181,107 @@ extern unsigned long long vmem_alloc_max; # define vmem_alloc_used_read() atomic_read(&vmem_alloc_used) # define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size) -# endif /* _LP64 */ +extern atomic_t kmem_alloc_used; +extern unsigned long long kmem_alloc_max; +extern atomic_t vmem_alloc_used; +extern unsigned long long vmem_alloc_max; -# define kmem_alloc(size, flags) __kmem_alloc((size), (flags), 0, 0) -# define kmem_zalloc(size, flags) __kmem_alloc((size), ((flags) | \ - __GFP_ZERO), 0, 0) - -/* The node alloc functions are only used by the SPL code itself */ -# ifdef HAVE_KMALLOC_NODE -# define kmem_alloc_node(size, flags, node) __kmem_alloc((size), (flags), 1, \ - node) -# else -# define kmem_alloc_node(size, flags, node) __kmem_alloc((size), (flags), 0, 0) -# endif - -# define vmem_zalloc(size, flags) vmem_alloc((size), ((flags) | \ - __GFP_ZERO)) +# endif /* HAVE_ATOMIC64_T */ # ifdef DEBUG_KMEM_TRACKING +/* + * DEBUG_KMEM && DEBUG_KMEM_TRACKING + * + * The maximum level of memory debugging. All memory will be accounted + * for and each allocation will be explicitly tracked. Any allocation + * which is leaked will be reported on module unload and the exact location + * where that memory was allocation will be reported. This level of memory + * tracking will have a significant impact on performance and should only + * be enabled for debugging. This feature may be enabled by passing + * --enable-debug-kmem-tracking to configure. + */ +# define kmem_alloc(sz, fl) kmem_alloc_track((sz), (fl), \ + __FUNCTION__, __LINE__, 0, 0) +# define kmem_zalloc(sz, fl) kmem_alloc_track((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__, 0, 0) +# define kmem_alloc_node(sz, fl, nd) kmem_alloc_track((sz), (fl), \ + __FUNCTION__, __LINE__, 1, nd) +# define kmem_free(ptr, sz) kmem_free_track((ptr), (sz)) -extern void *kmem_alloc_track(size_t size, int flags, const char *func, - int line, int node_alloc, int node); -extern void kmem_free_track(void *ptr, size_t size); -extern void *vmem_alloc_track(size_t size, int flags, const char *func, - int line); -extern void vmem_free_track(void *ptr, size_t size); +# define vmem_alloc(sz, fl) vmem_alloc_track((sz), (fl), \ + __FUNCTION__, __LINE__) +# define vmem_zalloc(sz, fl) vmem_alloc_track((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__) +# define vmem_free(ptr, sz) vmem_free_track((ptr), (sz)) -# define __kmem_alloc(size, flags, na, node) kmem_alloc_track((size), \ - (flags), __FUNCTION__, \ - __LINE__, (na), (node)) -# define kmem_free(ptr, size) kmem_free_track((ptr), (size)) -# define vmem_alloc(size, flags) vmem_alloc_track((size), \ - (flags),__FUNCTION__, \ - __LINE__) -# define vmem_free(ptr, size) vmem_free_track((ptr), (size)) +extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); +extern void kmem_free_track(void *, size_t); +extern void *vmem_alloc_track(size_t, int, const char *, int); +extern void vmem_free_track(void *, size_t); # else /* DEBUG_KMEM_TRACKING */ +/* + * DEBUG_KMEM && !DEBUG_KMEM_TRACKING + * + * The default build will set DEBUG_KEM. This provides basic memory + * accounting with little to no impact on performance. When the module + * is unloaded in any memory was leaked the total number of leaked bytes + * will be reported on the console. To disable this basic accounting + * pass the --disable-debug-kmem option to configure. + */ +# define kmem_alloc(sz, fl) kmem_alloc_debug((sz), (fl), \ + __FUNCTION__, __LINE__, 0, 0) +# define kmem_zalloc(sz, fl) kmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__, 0, 0) +# define kmem_alloc_node(sz, fl, nd) kmem_alloc_debug((sz), (fl), \ + __FUNCTION__, __LINE__, 1, nd) +# define kmem_free(ptr, sz) kmem_free_debug((ptr), (sz)) -extern void *kmem_alloc_debug(size_t size, int flags, const char *func, - int line, int node_alloc, int node); -extern void kmem_free_debug(void *ptr, size_t size); -extern void *vmem_alloc_debug(size_t size, int flags, const char *func, - int line); -extern void vmem_free_debug(void *ptr, size_t size); +# define vmem_alloc(sz, fl) vmem_alloc_debug((sz), (fl), \ + __FUNCTION__, __LINE__) +# define vmem_zalloc(sz, fl) vmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__) +# define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz)) -# define __kmem_alloc(size, flags, na, node) kmem_alloc_debug((size), \ - (flags), __FUNCTION__, \ - __LINE__, (na), (node)) -# define kmem_free(ptr, size) kmem_free_debug((ptr), (size)) -# define vmem_alloc(size, flags) vmem_alloc_debug((size), \ - (flags), __FUNCTION__, \ - __LINE__) -# define vmem_free(ptr, size) vmem_free_debug((ptr), (size)) +extern void *kmem_alloc_debug(size_t, int, const char *, int, int, int); +extern void kmem_free_debug(void *, size_t); +extern void *vmem_alloc_debug(size_t, int, const char *, int); +extern void vmem_free_debug(void *, size_t); # endif /* DEBUG_KMEM_TRACKING */ - #else /* DEBUG_KMEM */ +/* + * !DEBUG_KMEM && !DEBUG_KMEM_TRACKING + * + * All debugging is disabled. There will be no overhead even for + * minimal memory accounting. To enable basic accounting pass the + * --enable-debug-kmem option to configure. + */ +# define kmem_alloc(sz, fl) kmalloc_nofail((sz), (fl)) +# define kmem_zalloc(sz, fl) kzalloc_nofail((sz), (fl)) +# define kmem_alloc_node(sz, fl, nd) kmalloc_node_nofail((sz), (fl), (nd)) +# define kmem_free(ptr, sz) ((void)(sz), kfree(ptr)) -# define kmem_alloc(size, flags) kmalloc_nofail((size), (flags)) -# define kmem_zalloc(size, flags) kzalloc_nofail((size), (flags)) -# define kmem_free(ptr, size) ((void)(size), kfree(ptr)) - -# ifdef HAVE_KMALLOC_NODE -# define kmem_alloc_node(size, flags, node) \ - kmalloc_node_nofail((size), (flags), (node)) -# else -# define kmem_alloc_node(size, flags, node) \ - kmalloc_nofail((size), (flags)) -# endif - -# define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \ - __GFP_HIGHMEM), PAGE_KERNEL) -# define vmem_zalloc(size, flags) \ -({ \ - void *_ptr_ = __vmalloc((size),((flags)|__GFP_HIGHMEM),PAGE_KERNEL); \ - if (_ptr_) \ - memset(_ptr_, 0, (size)); \ - _ptr_; \ -}) -# define vmem_free(ptr, size) ((void)(size), vfree(ptr)) +# define vmem_alloc(sz, fl) vmalloc_nofail((sz), (fl)) +# define vmem_zalloc(sz, fl) vzalloc_nofail((sz), (fl)) +# define vmem_free(ptr, sz) ((void)(sz), vfree(ptr)) #endif /* DEBUG_KMEM */ +extern int kmem_debugging(void); +extern char *kmem_vasprintf(const char *fmt, va_list ap); +extern char *kmem_asprintf(const char *fmt, ...); +extern char *strdup(const char *str); +extern void strfree(char *str); + + /* - * Slab allocation interfaces + * Slab allocation interfaces. The SPL slab differs from the standard + * Linux SLAB or SLUB primarily in that each cache may be backed by slabs + * allocated from the physical or virtal memory address space. The virtual + * slabs allow for good behavior when allocation large objects of identical + * size. This slab implementation also supports both constructors and + * destructions which the Linux slab does not. */ enum { KMC_BIT_NOTOUCH = 0, /* Don't update ages */ @@ -246,12 +310,6 @@ enum { #define KMC_REAP_CHUNK INT_MAX #define KMC_DEFAULT_SEEKS 1 -extern int kmem_debugging(void); -extern char *kmem_vasprintf(const char *fmt, va_list ap); -extern char *kmem_asprintf(const char *fmt, ...); -#define strfree(str) kfree(str) -#define strdup(str) kstrdup(str, GFP_KERNEL) - extern struct list_head spl_kmem_cache_list; extern struct rw_semaphore spl_kmem_cache_sem; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e575b1ee9..ec1ccb4ce 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -271,6 +271,34 @@ kmem_asprintf(const char *fmt, ...) } EXPORT_SYMBOL(kmem_asprintf); +static char * +__strdup(const char *str, int flags) +{ + char *ptr; + int n; + + n = strlen(str); + ptr = kmalloc_nofail(n + 1, flags); + if (ptr) + memcpy(ptr, str, n + 1); + + return ptr; +} + +char * +strdup(const char *str) +{ + return __strdup(str, KM_SLEEP); +} +EXPORT_SYMBOL(strdup); + +void +strfree(char *str) +{ + kmem_free(str, strlen(str) + 1); +} +EXPORT_SYMBOL(strfree); + /* * Memory allocation interfaces and debugging for basic kmem_* * and vmem_* style memory allocation. When DEBUG_KMEM is enabled @@ -285,12 +313,12 @@ atomic64_t kmem_alloc_used = ATOMIC64_INIT(0); unsigned long long kmem_alloc_max = 0; atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); unsigned long long vmem_alloc_max = 0; -# else +# else /* HAVE_ATOMIC64_T */ atomic_t kmem_alloc_used = ATOMIC_INIT(0); unsigned long long kmem_alloc_max = 0; atomic_t vmem_alloc_used = ATOMIC_INIT(0); unsigned long long vmem_alloc_max = 0; -# endif /* _LP64 */ +# endif /* HAVE_ATOMIC64_T */ EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); @@ -340,77 +368,9 @@ EXPORT_SYMBOL(kmem_list); EXPORT_SYMBOL(vmem_lock); EXPORT_SYMBOL(vmem_table); EXPORT_SYMBOL(vmem_list); -# endif -#endif - -/* - * Slab allocation interfaces - * - * While the Linux slab implementation was inspired by the Solaris - * implemenation I cannot use it to emulate the Solaris APIs. I - * require two features which are not provided by the Linux slab. - * - * 1) Constructors AND destructors. Recent versions of the Linux - * kernel have removed support for destructors. This is a deal - * breaker for the SPL which contains particularly expensive - * initializers for mutex's, condition variables, etc. We also - * require a minimal level of cleanup for these data types unlike - * many Linux data type which do need to be explicitly destroyed. - * - * 2) Virtual address space backed slab. Callers of the Solaris slab - * expect it to work well for both small are very large allocations. - * Because of memory fragmentation the Linux slab which is backed - * by kmalloc'ed memory performs very badly when confronted with - * large numbers of large allocations. Basing the slab on the - * virtual address space removes the need for contigeous pages - * and greatly improve performance for large allocations. - * - * For these reasons, the SPL has its own slab implementation with - * the needed features. It is not as highly optimized as either the - * Solaris or Linux slabs, but it should get me most of what is - * needed until it can be optimized or obsoleted by another approach. - * - * One serious concern I do have about this method is the relatively - * small virtual address space on 32bit arches. This will seriously - * constrain the size of the slab caches and their performance. - * - * XXX: Improve the partial slab list by carefully maintaining a - * strict ordering of fullest to emptiest slabs based on - * the slab reference count. This gaurentees the when freeing - * slabs back to the system we need only linearly traverse the - * last N slabs in the list to discover all the freeable slabs. - * - * XXX: NUMA awareness for optionally allocating memory close to a - * particular core. This can be adventageous if you know the slab - * object will be short lived and primarily accessed from one core. - * - * XXX: Slab coloring may also yield performance improvements and would - * be desirable to implement. - */ - -struct list_head spl_kmem_cache_list; /* List of caches */ -struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ - -static int spl_cache_flush(spl_kmem_cache_t *skc, - spl_kmem_magazine_t *skm, int flush); - -#ifdef HAVE_SET_SHRINKER -static struct shrinker *spl_kmem_cache_shrinker; -#else -static int spl_kmem_cache_generic_shrinker(int nr_to_scan, - unsigned int gfp_mask); -static struct shrinker spl_kmem_cache_shrinker = { - .shrink = spl_kmem_cache_generic_shrinker, - .seeks = KMC_DEFAULT_SEEKS, -}; -#endif - -#ifdef DEBUG_KMEM -# ifdef DEBUG_KMEM_TRACKING static kmem_debug_t * -kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, - void *addr) +kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, void *addr) { struct hlist_head *head; struct hlist_node *node; @@ -444,17 +404,20 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, unsigned long irq_flags; SENTRY; + /* Function may be called with KM_NOSLEEP so failure is possible */ dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); - if (dptr == NULL) { + if (unlikely(dptr == NULL)) { SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug " "kmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", sizeof(kmem_debug_t), flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); } else { - /* Marked unlikely because we should never be doing this, - * we tolerate to up 2 pages but a single page is best. */ + /* + * Marked unlikely because we should never be doing this, + * we tolerate to up 2 pages but a single page is best. + */ if (unlikely((size > PAGE_SIZE*2) && !(flags & KM_NODEBUG))) { SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "large " "kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", @@ -463,14 +426,17 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, spl_debug_dumpstack(NULL); } - /* We use kstrdup() below because the string pointed to by + /* + * We use __strdup() below because the string pointed to by * __FUNCTION__ might not be available by the time we want - * to print it since the module might have been unloaded. */ - dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); + * to print it since the module might have been unloaded. + * This can only fail in the KM_NOSLEEP case. + */ + dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, - "debug kstrdup() at %s:%d failed (%lld/%llu)\n", + "debug __strdup() at %s:%d failed (%lld/%llu)\n", func, line, kmem_alloc_used_read(), kmem_alloc_max); goto out; } @@ -533,7 +499,8 @@ kmem_free_track(void *ptr, size_t size) dptr = kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr); - ASSERT(dptr); /* Must exist in hash due to kmem_alloc() */ + /* Must exist in hash due to kmem_alloc() */ + ASSERT(dptr); /* Size must match */ ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " @@ -567,28 +534,37 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) ASSERT(flags & KM_SLEEP); + /* Function may be called with KM_NOSLEEP so failure is possible */ dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); - if (dptr == NULL) { + if (unlikely(dptr == NULL)) { SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug " "vmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", sizeof(kmem_debug_t), flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); } else { - /* We use kstrdup() below because the string pointed to by + /* + * We use __strdup() below because the string pointed to by * __FUNCTION__ might not be available by the time we want - * to print it, since the module might have been unloaded. */ - dptr->kd_func = kstrdup(func, flags & ~__GFP_ZERO); + * to print it, since the module might have been unloaded. + * This can never fail because we have already asserted + * that flags is KM_SLEEP. + */ + dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, - "debug kstrdup() at %s:%d failed (%lld/%llu)\n", + "debug __strdup() at %s:%d failed (%lld/%llu)\n", func, line, vmem_alloc_used_read(), vmem_alloc_max); goto out; } - ptr = __vmalloc(size, (flags | __GFP_HIGHMEM) & ~__GFP_ZERO, - PAGE_KERNEL); + /* Use the correct allocator */ + if (flags & __GFP_ZERO) { + ptr = vzalloc_nofail(size, flags & ~__GFP_ZERO); + } else { + ptr = vmalloc_nofail(size, flags); + } if (unlikely(ptr == NULL)) { kfree(dptr->kd_func); @@ -600,9 +576,6 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) goto out; } - if (flags & __GFP_ZERO) - memset(ptr, 0, size); - vmem_alloc_used_add(size); if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) vmem_alloc_max = vmem_alloc_used_read(); @@ -640,7 +613,9 @@ vmem_free_track(void *ptr, size_t size) (unsigned long long) size); dptr = kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr); - ASSERT(dptr); /* Must exist in hash due to vmem_alloc() */ + + /* Must exist in hash due to vmem_alloc() */ + ASSERT(dptr); /* Size must match */ ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " @@ -673,11 +648,13 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, void *ptr; SENTRY; - /* Marked unlikely because we should never be doing this, - * we tolerate to up 2 pages but a single page is best. */ + /* + * Marked unlikely because we should never be doing this, + * we tolerate to up 2 pages but a single page is best. + */ if (unlikely((size > PAGE_SIZE * 2) && !(flags & KM_NODEBUG))) { SDEBUG(SD_CONSOLE | SD_WARNING, - "Large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", + "large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); spl_debug_dumpstack(NULL); @@ -693,7 +670,7 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, ptr = kmalloc_nofail(size, flags); } - if (ptr == NULL) { + if (unlikely(ptr == NULL)) { SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "kmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, @@ -706,8 +683,9 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, SDEBUG_LIMIT(SD_INFO, "kmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", (unsigned long long) size, flags, func, line, ptr, - kmem_alloc_used_read(), kmem_alloc_max); + kmem_alloc_used_read(), kmem_alloc_max); } + SRETURN(ptr); } EXPORT_SYMBOL(kmem_alloc_debug); @@ -724,8 +702,6 @@ kmem_free_debug(void *ptr, size_t size) SDEBUG_LIMIT(SD_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, (unsigned long long) size, kmem_alloc_used_read(), kmem_alloc_max); - - memset(ptr, 0x5a, size); kfree(ptr); SEXIT; @@ -740,17 +716,19 @@ vmem_alloc_debug(size_t size, int flags, const char *func, int line) ASSERT(flags & KM_SLEEP); - ptr = __vmalloc(size, (flags | __GFP_HIGHMEM) & ~__GFP_ZERO, - PAGE_KERNEL); - if (ptr == NULL) { + /* Use the correct allocator */ + if (flags & __GFP_ZERO) { + ptr = vzalloc_nofail(size, flags & (~__GFP_ZERO)); + } else { + ptr = vmalloc_nofail(size, flags); + } + + if (unlikely(ptr == NULL)) { SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "vmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); } else { - if (flags & __GFP_ZERO) - memset(ptr, 0, size); - vmem_alloc_used_add(size); if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) vmem_alloc_max = vmem_alloc_used_read(); @@ -776,8 +754,6 @@ vmem_free_debug(void *ptr, size_t size) SDEBUG_LIMIT(SD_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, (unsigned long long) size, vmem_alloc_used_read(), vmem_alloc_max); - - memset(ptr, 0x5a, size); vfree(ptr); SEXIT; @@ -787,6 +763,68 @@ EXPORT_SYMBOL(vmem_free_debug); # endif /* DEBUG_KMEM_TRACKING */ #endif /* DEBUG_KMEM */ +/* + * Slab allocation interfaces + * + * While the Linux slab implementation was inspired by the Solaris + * implemenation I cannot use it to emulate the Solaris APIs. I + * require two features which are not provided by the Linux slab. + * + * 1) Constructors AND destructors. Recent versions of the Linux + * kernel have removed support for destructors. This is a deal + * breaker for the SPL which contains particularly expensive + * initializers for mutex's, condition variables, etc. We also + * require a minimal level of cleanup for these data types unlike + * many Linux data type which do need to be explicitly destroyed. + * + * 2) Virtual address space backed slab. Callers of the Solaris slab + * expect it to work well for both small are very large allocations. + * Because of memory fragmentation the Linux slab which is backed + * by kmalloc'ed memory performs very badly when confronted with + * large numbers of large allocations. Basing the slab on the + * virtual address space removes the need for contigeous pages + * and greatly improve performance for large allocations. + * + * For these reasons, the SPL has its own slab implementation with + * the needed features. It is not as highly optimized as either the + * Solaris or Linux slabs, but it should get me most of what is + * needed until it can be optimized or obsoleted by another approach. + * + * One serious concern I do have about this method is the relatively + * small virtual address space on 32bit arches. This will seriously + * constrain the size of the slab caches and their performance. + * + * XXX: Improve the partial slab list by carefully maintaining a + * strict ordering of fullest to emptiest slabs based on + * the slab reference count. This gaurentees the when freeing + * slabs back to the system we need only linearly traverse the + * last N slabs in the list to discover all the freeable slabs. + * + * XXX: NUMA awareness for optionally allocating memory close to a + * particular core. This can be adventageous if you know the slab + * object will be short lived and primarily accessed from one core. + * + * XXX: Slab coloring may also yield performance improvements and would + * be desirable to implement. + */ + +struct list_head spl_kmem_cache_list; /* List of caches */ +struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ + +static int spl_cache_flush(spl_kmem_cache_t *skc, + spl_kmem_magazine_t *skm, int flush); + +#ifdef HAVE_SET_SHRINKER +static struct shrinker *spl_kmem_cache_shrinker; +#else +static int spl_kmem_cache_generic_shrinker(int nr_to_scan, + unsigned int gfp_mask); +static struct shrinker spl_kmem_cache_shrinker = { + .shrink = spl_kmem_cache_generic_shrinker, + .seeks = KMC_DEFAULT_SEEKS, +}; +#endif + static void * kv_alloc(spl_kmem_cache_t *skc, int size, int flags) { From 287b2fb117f1ce964dc79c1f694e7d473a6b9db0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 27 Jul 2010 10:19:44 -0700 Subject: [PATCH 0432/1062] Add Debian and Slackware style packaging via alien The long term fix for Debian and Slackware style packaging is to add native support for building these packages. Unfortunately, that is a large chunk of work I don't have time for right now. That said it would be nice to have at least basic packages for these distributions. As a quick short/medium term solution I've settled on using alien to convert the RPM packages to DEB or TGZ style packages. The build system has been updated with the following build targets which will first build RPM packages and then convert them as needed to the target package type: make rpm: Create .rpm packages make deb: Create .deb packages make tgz: Create .tgz packages make pkg: Create the right package type for your distribution The solution comes with lot of caveats and your mileage may vary. But basically the big limitations are that the resulting packages: 1) Will not have the correct dependency information. 2) Will not not include the kernel version in the release. 3) Will not handle all differences between distributions. But the resulting packages should be easy to install and remove from your system and take care of running 'depmod -a' and such. As I said at the top this is not the right long term solution. If any of the upstream distribution maintainers want to jump in and help do this right for their distribution I'd love the help. --- Makefile.am | 27 ++---- Makefile.in | 81 ++++++++++++------ cmd/Makefile.in | 16 ++++ config/deb.am | 49 +++++++++++ config/rpm.am | 37 +++++++-- config/spl-build.m4 | 149 +++++++++++++++++++++++++++++++-- config/tgz.am | 42 ++++++++++ configure | 195 ++++++++++++++++++++++++++++++++++++++++---- configure.ac | 1 + include/Makefile.in | 16 ++++ lib/Makefile.in | 16 ++++ scripts/Makefile.in | 16 ++++ 12 files changed, 574 insertions(+), 71 deletions(-) create mode 100644 config/deb.am create mode 100644 config/tgz.am diff --git a/Makefile.am b/Makefile.am index 8c4fed9c8..cae511de7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,6 @@ include $(top_srcdir)/config/rpm.am +include ${top_srcdir}/config/deb.am +include ${top_srcdir}/config/tgz.am if CONFIG_USER USER_DIR = lib cmd scripts @@ -9,7 +11,8 @@ endif SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip -EXTRA_DIST = autogen.sh spl.spec.in config/config.awk META DISCLAIMER +EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER +EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am noinst_HEADERS = spl_config.h distclean-local:: @@ -44,22 +47,6 @@ etags: tags: ctags etags -srpm-modules: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common - -srpm-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common - -srpm: srpm-modules srpm-utils - -rpm-modules: srpm-modules - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common - -rpm-utils: srpm-utils - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common - -rpm-modules: srpm-modules - -rpm-utils: srpm-utils - -rpm: rpm-modules rpm-utils +pkg: @DEFAULT_PACKAGE@ +pkg-modules: @DEFAULT_PACKAGE@-modules +pkg-utils: @DEFAULT_PACKAGE@-utils diff --git a/Makefile.in b/Makefile.in index 572e88ec2..4b0e8c838 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,7 +20,7 @@ # Copyright (C) 2007 The Regents of the University of California. # Written by Brian Behlendorf . ############################################################################### -# Build targets for RPM. +# Build targets for RPM packages. ############################################################################### VPATH = @srcdir@ @@ -127,6 +127,8 @@ GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ +ALIEN = @ALIEN@ +ALIEN_VERSION = @ALIEN_VERSION@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -141,8 +143,13 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DPKG = @DPKG@ +DPKGBUILD = @DPKGBUILD@ +DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ +DPKG_VERSION = @DPKG_VERSION@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -152,6 +159,11 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +HAVE_ALIEN = @HAVE_ALIEN@ +HAVE_DPKG = @HAVE_DPKG@ +HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -189,6 +201,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +RPM = @RPM@ +RPMBUILD = @RPMBUILD@ +RPMBUILD_VERSION = @RPMBUILD_VERSION@ +RPM_VERSION = @RPM_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -264,7 +280,9 @@ top_srcdir = @top_srcdir@ @CONFIG_KERNEL_TRUE@KERNEL_DIR = module include SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip -EXTRA_DIST = autogen.sh spl.spec.in config/config.awk META DISCLAIMER +EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \ + DISCLAIMER config/config.awk config/rpm.am config/deb.am \ + config/tgz.am noinst_HEADERS = spl_config.h all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -772,13 +790,40 @@ uninstall-am: tags tags-recursive uninstall uninstall-am +srpm-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common + +srpm-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common + +srpm: srpm-modules srpm-utils + +rpm-modules: srpm-modules + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common + +rpm-utils: srpm-utils + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common + +rpm-modules: srpm-modules + +rpm: rpm-modules rpm-utils + rpm-local: + @(if test "${HAVE_RPMBUILD}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${RPMBUILD} missing. Please install the\n" \ + "*** package for your distribution which provides ${RPMBUILD},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi; \ mkdir -p $(rpmbuild)/TMP && \ mkdir -p $(rpmbuild)/BUILD && \ mkdir -p $(rpmbuild)/RPMS && \ mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && cp $(rpmspec) $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + mkdir -p $(rpmbuild)/SPECS && \ + cp $(rpmspec) $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && \ + cp $(distdir).tar.gz $(rpmbuild)/SOURCES) srpm-common: dist rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ @@ -788,7 +833,7 @@ srpm-common: dist rpmbuild="$$rpmbuild" \ rpmspec="$$rpmspec" \ rpm-local || exit 1; \ - /usr/bin/rpmbuild \ + $(RPMBUILD) \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ --define "build_src_rpm 1" \ @@ -805,7 +850,7 @@ rpm-common: rpmbuild="$$rpmbuild" \ rpmspec="$$rpmspec" \ rpm-local || exit 1; \ - /usr/bin/rpmbuild \ + ${RPMBUILD} \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ --define "dist %{nil}" \ @@ -815,6 +860,8 @@ rpm-common: --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild +include ${top_srcdir}/config/deb.am +include ${top_srcdir}/config/tgz.am distclean-local:: -$(RM) -R autom4te*.cache @@ -846,25 +893,9 @@ etags: tags: ctags etags -srpm-modules: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common - -srpm-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common - -srpm: srpm-modules srpm-utils - -rpm-modules: srpm-modules - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common - -rpm-utils: srpm-utils - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common - -rpm-modules: srpm-modules - -rpm-utils: srpm-utils - -rpm: rpm-modules rpm-utils +pkg: @DEFAULT_PACKAGE@ +pkg-modules: @DEFAULT_PACKAGE@-modules +pkg-utils: @DEFAULT_PACKAGE@-utils # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 75e5d8d2f..fa53b0b15 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -101,6 +101,8 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ +ALIEN = @ALIEN@ +ALIEN_VERSION = @ALIEN_VERSION@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -115,8 +117,13 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DPKG = @DPKG@ +DPKGBUILD = @DPKGBUILD@ +DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ +DPKG_VERSION = @DPKG_VERSION@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -126,6 +133,11 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +HAVE_ALIEN = @HAVE_ALIEN@ +HAVE_DPKG = @HAVE_DPKG@ +HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -163,6 +175,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +RPM = @RPM@ +RPMBUILD = @RPMBUILD@ +RPMBUILD_VERSION = @RPMBUILD_VERSION@ +RPM_VERSION = @RPM_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/config/deb.am b/config/deb.am new file mode 100644 index 000000000..766655dcf --- /dev/null +++ b/config/deb.am @@ -0,0 +1,49 @@ +############################################################################### +# Copyright (C) 2010 Lawrence Livermore National Security, LLC. +# Written by Brian Behlendorf . +############################################################################### +# Build targets for DEB packages. +# +# Long term native distro specific Debian style packaging should be added. +# In the short term RPM packages are built and converted to DEB packages +# using alien. If someone familiar with Debian style packaging were to +# update the build system to correctly build Debian style packages I would +# happily take it. Until then we will have to make due with alien. +# +############################################################################### + +deb-local: + @(if test "${HAVE_DPKGBUILD}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${DPKGBUILD} missing. Please install the\n" \ + "*** package for your distribution which provides ${DPKGBUILD},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi; \ + if test "${HAVE_ALIEN}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${ALIEN} missing. Please install the\n" \ + "*** package for your distribution which provides ${ALIEN},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi) + +deb-modules: deb-local rpm-modules + name=${PACKAGE}-modules; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ + pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ + $(RM) $$pkg1 $$pkg2 + +deb-utils: deb-local rpm-utils + name=${PACKAGE}; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ + $(RM) $$pkg1 + +deb: deb-modules deb-utils diff --git a/config/rpm.am b/config/rpm.am index 7fb95a72d..0aae42586 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -3,16 +3,43 @@ # Copyright (C) 2007 The Regents of the University of California. # Written by Brian Behlendorf . ############################################################################### -# Build targets for RPM. +# Build targets for RPM packages. ############################################################################### +srpm-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common + +srpm-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common + +srpm: srpm-modules srpm-utils + +rpm-modules: srpm-modules + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common + +rpm-utils: srpm-utils + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common + +rpm-modules: srpm-modules + +rpm: rpm-modules rpm-utils + rpm-local: + @(if test "${HAVE_RPMBUILD}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${RPMBUILD} missing. Please install the\n" \ + "*** package for your distribution which provides ${RPMBUILD},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi; \ mkdir -p $(rpmbuild)/TMP && \ mkdir -p $(rpmbuild)/BUILD && \ mkdir -p $(rpmbuild)/RPMS && \ mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && cp $(rpmspec) $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + mkdir -p $(rpmbuild)/SPECS && \ + cp $(rpmspec) $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && \ + cp $(distdir).tar.gz $(rpmbuild)/SOURCES) srpm-common: dist rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ @@ -22,7 +49,7 @@ srpm-common: dist rpmbuild="$$rpmbuild" \ rpmspec="$$rpmspec" \ rpm-local || exit 1; \ - /usr/bin/rpmbuild \ + $(RPMBUILD) \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ --define "build_src_rpm 1" \ @@ -39,7 +66,7 @@ rpm-common: rpmbuild="$$rpmbuild" \ rpmspec="$$rpmspec" \ rpm-local || exit 1; \ - /usr/bin/rpmbuild \ + ${RPMBUILD} \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ --define "dist %{nil}" \ diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b908a56d5..a11d8866d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -188,12 +188,11 @@ AC_DEFUN([SPL_AC_KERNEL], [ ]) dnl # -dnl # Default SPL user configuration +dnl # Explicitly check for gawk, we require it for the the usermode +dnl # helper. For some reason the standard awk command does not +dnl # behave correctly when invoked from the usermode helper. dnl # -AC_DEFUN([SPL_AC_CONFIG_USER], [ - dnl # Explicitly check for gawk, we require it for the the usermode - dnl # helper. For some reason the standard awk command does not - dnl # behave correctly when invoked from the usermode helper. +AC_DEFUN([SPL_AC_GAWK], [ AS_IF([test "x$AWK" != xgawk], [ AC_MSG_ERROR([ *** Required util gawk missing. Please install the required @@ -201,6 +200,146 @@ AC_DEFUN([SPL_AC_CONFIG_USER], [ ]) ]) +dnl # +dnl # Default SPL user configuration +dnl # +AC_DEFUN([SPL_AC_CONFIG_USER], [ + SPL_AC_GAWK +]) + +dnl # +dnl # Check for rpm+rpmbuild to build RPM packages. If these tools +dnl # are missing it is non-fatal but you will not be able to build +dnl # RPM packages and will be warned if you try too. +dnl # +AC_DEFUN([SPL_AC_RPM], [ + RPM=rpm + RPMBUILD=rpmbuild + + AC_MSG_CHECKING([whether $RPM is available]) + AS_IF([tmp=$($RPM --version 2>/dev/null)], [ + RPM_VERSION=$(echo $tmp | $AWK '/RPM/ { print $[3] }') + HAVE_RPM=yes + AC_MSG_RESULT([$HAVE_RPM ($RPM_VERSION)]) + ],[ + HAVE_RPM=no + AC_MSG_RESULT([$HAVE_RPM]) + ]) + + AC_MSG_CHECKING([whether $RPMBUILD is available]) + AS_IF([tmp=$($RPMBUILD --version 2>/dev/null)], [ + RPMBUILD_VERSION=$(echo $tmp | $AWK '/RPM/ { print $[3] }') + HAVE_RPMBUILD=yes + AC_MSG_RESULT([$HAVE_RPMBUILD ($RPMBUILD_VERSION)]) + ],[ + HAVE_RPMBUILD=no + AC_MSG_RESULT([$HAVE_RPMBUILD]) + ]) + + AC_SUBST(HAVE_RPM) + AC_SUBST(RPM) + AC_SUBST(RPM_VERSION) + + AC_SUBST(HAVE_RPMBUILD) + AC_SUBST(RPMBUILD) + AC_SUBST(RPMBUILD_VERSION) +]) + +dnl # +dnl # Check for dpkg+dpkg-buildpackage to build DEB packages. If these +dnl # tools are missing it is non-fatal but you will not be able to build +dnl # DEB packages and will be warned if you try too. +dnl # +AC_DEFUN([SPL_AC_DPKG], [ + DPKG=dpkg + DPKGBUILD=dpkg-buildpackage + + AC_MSG_CHECKING([whether $DPKG is available]) + AS_IF([tmp=$($DPKG --version 2>/dev/null)], [ + DPKG_VERSION=$(echo $tmp | $AWK '/Debian/ { print $[7] }') + HAVE_DPKG=yes + AC_MSG_RESULT([$HAVE_DPKG ($DPKG_VERSION)]) + ],[ + HAVE_DPKG=no + AC_MSG_RESULT([$HAVE_DPKG]) + ]) + + AC_MSG_CHECKING([whether $DPKGBUILD is available]) + AS_IF([tmp=$($DPKGBUILD --version 2>/dev/null)], [ + DPKGBUILD_VERSION=$(echo $tmp | \ + $AWK '/Debian/ { print $[4] }' | cut -f-4 -d'.') + HAVE_DPKGBUILD=yes + AC_MSG_RESULT([$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)]) + ],[ + HAVE_DPKGBUILD=no + AC_MSG_RESULT([$HAVE_DPKGBUILD]) + ]) + + AC_SUBST(HAVE_DPKG) + AC_SUBST(DPKG) + AC_SUBST(DPKG_VERSION) + + AC_SUBST(HAVE_DPKGBUILD) + AC_SUBST(DPKGBUILD) + AC_SUBST(DPKGBUILD_VERSION) +]) + +dnl # +dnl # Until native packaging for various different packing systems +dnl # can be added the least we can do is attempt to use alien to +dnl # convert the RPM packages to the needed package type. This is +dnl # a hack but so far it has worked reasonable well. +dnl # +AC_DEFUN([SPL_AC_ALIEN], [ + ALIEN=alien + + AC_MSG_CHECKING([whether $ALIEN is available]) + AS_IF([tmp=$($ALIEN --version 2>/dev/null)], [ + ALIEN_VERSION=$(echo $tmp | $AWK '{ print $[3] }') + HAVE_ALIEN=yes + AC_MSG_RESULT([$HAVE_ALIEN ($ALIEN_VERSION)]) + ],[ + HAVE_ALIEN=no + AC_MSG_RESULT([$HAVE_ALIEN]) + ]) + + AC_SUBST(HAVE_ALIEN) + AC_SUBST(ALIEN) + AC_SUBST(ALIEN_VERSION) +]) + +dnl # +dnl # Using the VENDOR tag from config.guess set the default +dnl # package type for 'make pkg': (rpm | deb | tgz) +dnl # +AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ + VENDOR=$(echo $ac_build_alias | cut -f2 -d'-') + + AC_MSG_CHECKING([default package type]) + case "$VENDOR" in + fedora) DEFAULT_PACKAGE=rpm ;; + redhat) DEFAULT_PACKAGE=rpm ;; + sles) DEFAULT_PACKAGE=rpm ;; + ubuntu) DEFAULT_PACKAGE=deb ;; + debian) DEFAULT_PACKAGE=deb ;; + slackware) DEFAULT_PACKAGE=tgz ;; + *) DEFAULT_PACKAGE=rpm ;; + esac + + AC_MSG_RESULT([$DEFAULT_PACKAGE]) + AC_SUBST(DEFAULT_PACKAGE) +]) + +dnl # +dnl # Default SPL user configuration +dnl # +AC_DEFUN([SPL_AC_PACKAGE], [ + SPL_AC_RPM + SPL_AC_DPKG + SPL_AC_ALIEN + SPL_AC_DEFAULT_PACKAGE +]) + AC_DEFUN([SPL_AC_LICENSE], [ AC_MSG_CHECKING([spl license]) LICENSE=GPL diff --git a/config/tgz.am b/config/tgz.am new file mode 100644 index 000000000..57d2eee3b --- /dev/null +++ b/config/tgz.am @@ -0,0 +1,42 @@ +############################################################################### +# Copyright (C) 2010 Lawrence Livermore National Security, LLC. +# Written by Brian Behlendorf . +############################################################################### +# Build targets for TGZ packages. +# +# Long term native distro specific Slackware style packaging should be added. +# In the short term RPM packages are built and converted to TGZ packages +# using alien. If someone familiar with Slackware style packaging were to +# update the build system to correctly build Slackware style packages I would +# happily take it. Until then we will have to make due with alien. +# +############################################################################### + +tgz-local: + @(if test "${HAVE_ALIEN}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${ALIEN} missing. Please install the\n" \ + "*** package for your distribution which provides ${ALIEN},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi) + +tgz-modules: tgz-local rpm-modules + name=${PACKAGE}-modules; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ + pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ + $(RM) $$pkg1 $$pkg2 + +tgz-utils: tgz-local rpm-utils + name=${PACKAGE}; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ + $(RM) $$pkg1 + +tgz: tgz-modules tgz-utils diff --git a/configure b/configure index 656f0425a..4a24a41f5 100755 --- a/configure +++ b/configure @@ -799,6 +799,22 @@ LINUX_VERSION LINUX_OBJ LINUX SPL_CONFIG +DEFAULT_PACKAGE +ALIEN_VERSION +ALIEN +HAVE_ALIEN +DPKGBUILD_VERSION +DPKGBUILD +HAVE_DPKGBUILD +DPKG_VERSION +DPKG +HAVE_DPKG +RPMBUILD_VERSION +RPMBUILD +HAVE_RPMBUILD +RPM_VERSION +RPM +HAVE_RPM LICENSE CPP OTOOL64 @@ -4760,13 +4776,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4763: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4779: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4766: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4782: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4769: output\"" >&5) + (eval echo "\"\$as_me:4785: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5972,7 +5988,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5975 "configure"' > conftest.$ac_ext + echo '#line 5991 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7825,11 +7841,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7828: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7844: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7832: \$? = $ac_status" >&5 + echo "$as_me:7848: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8164,11 +8180,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8167: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8183: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8171: \$? = $ac_status" >&5 + echo "$as_me:8187: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8269,11 +8285,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8272: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8288: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8276: \$? = $ac_status" >&5 + echo "$as_me:8292: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8324,11 +8340,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8327: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8343: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8331: \$? = $ac_status" >&5 + echo "$as_me:8347: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11127,7 +11143,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11130 "configure" +#line 11146 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11223,7 +11239,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11226 "configure" +#line 11242 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11461,6 +11477,149 @@ $as_echo "$LICENSE" >&6; } + + RPM=rpm + RPMBUILD=rpmbuild + + { $as_echo "$as_me:$LINENO: checking whether $RPM is available" >&5 +$as_echo_n "checking whether $RPM is available... " >&6; } + if tmp=$($RPM --version 2>/dev/null); then + + RPM_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }') + HAVE_RPM=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_RPM ($RPM_VERSION)" >&5 +$as_echo "$HAVE_RPM ($RPM_VERSION)" >&6; } + +else + + HAVE_RPM=no + { $as_echo "$as_me:$LINENO: result: $HAVE_RPM" >&5 +$as_echo "$HAVE_RPM" >&6; } + +fi + + + { $as_echo "$as_me:$LINENO: checking whether $RPMBUILD is available" >&5 +$as_echo_n "checking whether $RPMBUILD is available... " >&6; } + if tmp=$($RPMBUILD --version 2>/dev/null); then + + RPMBUILD_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }') + HAVE_RPMBUILD=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&5 +$as_echo "$HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&6; } + +else + + HAVE_RPMBUILD=no + { $as_echo "$as_me:$LINENO: result: $HAVE_RPMBUILD" >&5 +$as_echo "$HAVE_RPMBUILD" >&6; } + +fi + + + + + + + + + + + + DPKG=dpkg + DPKGBUILD=dpkg-buildpackage + + { $as_echo "$as_me:$LINENO: checking whether $DPKG is available" >&5 +$as_echo_n "checking whether $DPKG is available... " >&6; } + if tmp=$($DPKG --version 2>/dev/null); then + + DPKG_VERSION=$(echo $tmp | $AWK '/Debian/ { print $7 }') + HAVE_DPKG=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_DPKG ($DPKG_VERSION)" >&5 +$as_echo "$HAVE_DPKG ($DPKG_VERSION)" >&6; } + +else + + HAVE_DPKG=no + { $as_echo "$as_me:$LINENO: result: $HAVE_DPKG" >&5 +$as_echo "$HAVE_DPKG" >&6; } + +fi + + + { $as_echo "$as_me:$LINENO: checking whether $DPKGBUILD is available" >&5 +$as_echo_n "checking whether $DPKGBUILD is available... " >&6; } + if tmp=$($DPKGBUILD --version 2>/dev/null); then + + DPKGBUILD_VERSION=$(echo $tmp | \ + $AWK '/Debian/ { print $4 }' | cut -f-4 -d'.') + HAVE_DPKGBUILD=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&5 +$as_echo "$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&6; } + +else + + HAVE_DPKGBUILD=no + { $as_echo "$as_me:$LINENO: result: $HAVE_DPKGBUILD" >&5 +$as_echo "$HAVE_DPKGBUILD" >&6; } + +fi + + + + + + + + + + + + ALIEN=alien + + { $as_echo "$as_me:$LINENO: checking whether $ALIEN is available" >&5 +$as_echo_n "checking whether $ALIEN is available... " >&6; } + if tmp=$($ALIEN --version 2>/dev/null); then + + ALIEN_VERSION=$(echo $tmp | $AWK '{ print $3 }') + HAVE_ALIEN=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_ALIEN ($ALIEN_VERSION)" >&5 +$as_echo "$HAVE_ALIEN ($ALIEN_VERSION)" >&6; } + +else + + HAVE_ALIEN=no + { $as_echo "$as_me:$LINENO: result: $HAVE_ALIEN" >&5 +$as_echo "$HAVE_ALIEN" >&6; } + +fi + + + + + + + + VENDOR=$(echo $ac_build_alias | cut -f2 -d'-') + + { $as_echo "$as_me:$LINENO: checking default package type" >&5 +$as_echo_n "checking default package type... " >&6; } + case "$VENDOR" in + fedora) DEFAULT_PACKAGE=rpm ;; + redhat) DEFAULT_PACKAGE=rpm ;; + sles) DEFAULT_PACKAGE=rpm ;; + ubuntu) DEFAULT_PACKAGE=deb ;; + debian) DEFAULT_PACKAGE=deb ;; + slackware) DEFAULT_PACKAGE=tgz ;; + *) DEFAULT_PACKAGE=rpm ;; + esac + + { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 +$as_echo "$DEFAULT_PACKAGE" >&6; } + + + + SPL_CONFIG=all # Check whether --with-config was given. @@ -14972,7 +15131,8 @@ fi ;; user) - if test "x$AWK" != xgawk; then + + if test "x$AWK" != xgawk; then { { $as_echo "$as_me:$LINENO: error: *** Required util gawk missing. Please install the required @@ -14984,6 +15144,7 @@ $as_echo "$as_me: error: fi + ;; all) @@ -18481,7 +18642,8 @@ fi - if test "x$AWK" != xgawk; then + + if test "x$AWK" != xgawk; then { { $as_echo "$as_me:$LINENO: error: *** Required util gawk missing. Please install the required @@ -18493,6 +18655,7 @@ $as_echo "$as_me: error: fi + ;; srpm) ;; *) diff --git a/configure.ac b/configure.ac index 0217e9cd9..562d03657 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,7 @@ AC_PROG_CC AC_PROG_LIBTOOL SPL_AC_LICENSE +SPL_AC_PACKAGE SPL_AC_CONFIG AC_CONFIG_FILES([ diff --git a/include/Makefile.in b/include/Makefile.in index 21ce72f8e..cdbeff05f 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -60,6 +60,8 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ +ALIEN = @ALIEN@ +ALIEN_VERSION = @ALIEN_VERSION@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -74,8 +76,13 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DPKG = @DPKG@ +DPKGBUILD = @DPKGBUILD@ +DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ +DPKG_VERSION = @DPKG_VERSION@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -85,6 +92,11 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +HAVE_ALIEN = @HAVE_ALIEN@ +HAVE_DPKG = @HAVE_DPKG@ +HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -122,6 +134,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +RPM = @RPM@ +RPMBUILD = @RPMBUILD@ +RPMBUILD_VERSION = @RPMBUILD_VERSION@ +RPM_VERSION = @RPM_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/lib/Makefile.in b/lib/Makefile.in index eb2e83134..7860a1592 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -93,6 +93,8 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ +ALIEN = @ALIEN@ +ALIEN_VERSION = @ALIEN_VERSION@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -107,8 +109,13 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DPKG = @DPKG@ +DPKGBUILD = @DPKGBUILD@ +DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ +DPKG_VERSION = @DPKG_VERSION@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -118,6 +125,11 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +HAVE_ALIEN = @HAVE_ALIEN@ +HAVE_DPKG = @HAVE_DPKG@ +HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -155,6 +167,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +RPM = @RPM@ +RPMBUILD = @RPMBUILD@ +RPMBUILD_VERSION = @RPMBUILD_VERSION@ +RPM_VERSION = @RPM_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 64e414acb..4e2f8150e 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -55,6 +55,8 @@ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ +ALIEN = @ALIEN@ +ALIEN_VERSION = @ALIEN_VERSION@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -69,8 +71,13 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DPKG = @DPKG@ +DPKGBUILD = @DPKGBUILD@ +DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ +DPKG_VERSION = @DPKG_VERSION@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -80,6 +87,11 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +HAVE_ALIEN = @HAVE_ALIEN@ +HAVE_DPKG = @HAVE_DPKG@ +HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -117,6 +129,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +RPM = @RPM@ +RPMBUILD = @RPMBUILD@ +RPMBUILD_VERSION = @RPMBUILD_VERSION@ +RPM_VERSION = @RPM_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ From 099dc9c2d275b4475f130f3d03bab88516101b36 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 28 Jul 2010 13:59:18 -0700 Subject: [PATCH 0433/1062] Add uninstall Makefile targets Extend the Makefiles with an uninstall target to cleanly remove a package which was installed with 'make install'. Additionally, ensure a 'depmod -a' is run as part of the install to update the module dependency information. --- Makefile.am | 2 +- Makefile.in | 2 +- include/Makefile.am | 7 ++++++- include/Makefile.in | 11 ++++++++--- module/Makefile.in | 10 ++++++++++ 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index cae511de7..184c300cb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,7 +30,7 @@ distclean-local:: if CONFIG_KERNEL install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/${prefix}/src/$$destname; \ + instdest=$(DESTDIR)/usr/src/$$destname; \ echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ diff --git a/Makefile.in b/Makefile.in index 4b0e8c838..af58ad11b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -877,7 +877,7 @@ distclean-local:: @CONFIG_KERNEL_TRUE@install-data-local: @CONFIG_KERNEL_TRUE@ destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ -@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/${prefix}/src/$$destname; \ +@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/$$destname; \ @CONFIG_KERNEL_TRUE@ echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ diff --git a/include/Makefile.am b/include/Makefile.am index 6ed7cdad8..64d9fa29e 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -16,8 +16,13 @@ noinst_HEADERS += vm/*.h install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/${prefix}/src/$$destname; \ + instdest=$(DESTDIR)/usr/src/$$destname; \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done + +uninstall-local: + destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ + instdest=$(DESTDIR)/usr/src/$$destname; \ + $(RM) -R $$instdest diff --git a/include/Makefile.in b/include/Makefile.in index cdbeff05f..c64647450 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -431,7 +431,7 @@ ps: ps-am ps-am: -uninstall-am: +uninstall-am: uninstall-local .MAKE: install-am install-strip @@ -446,17 +446,22 @@ uninstall-am: installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am + uninstall-am uninstall-local install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/${prefix}/src/$$destname; \ + instdest=$(DESTDIR)/usr/src/$$destname; \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done +uninstall-local: + destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ + instdest=$(DESTDIR)/usr/src/$$destname; \ + $(RM) -R $$instdest + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/module/Makefile.in b/module/Makefile.in index eed81f64e..caa403228 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -12,10 +12,19 @@ clean: if [ -f Module.markers ]; then $(RM) Module.markers; fi modules_install: + # Install the kernel modules $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ INSTALL_MOD_PATH=$(DESTDIR) \ INSTALL_MOD_DIR=addon/spl $@ find ${DESTDIR}/lib/modules/ -name 'modules.*' | xargs ${RM} + sysmap=${DESTDIR}/boot/System.map-@LINUX_VERSION@; \ + if [ -f $$sysmap ]; then \ + depmod -ae -F $$sysmap @LINUX_VERSION@; \ + fi + +modules_uninstall: + # Uninstall the kernel modules + $(RM) -R ${DESTDIR}/lib/modules/@LINUX_VERSION@/addon/spl distdir: list='$(subdir-m)'; for subdir in $$list; do \ @@ -25,5 +34,6 @@ distdir: distclean maintainer-clean: clean install: modules_install +uninstall: modules_uninstall all: modules check: From 41f84a8d56c00f3c95a4bf0b6027bedd7abb5b15 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Jul 2010 22:20:58 -0700 Subject: [PATCH 0434/1062] Strfree() should call kfree() not kmem_free() Using kmem_free() results in deducting X bytes from the memory accounting when --enable-debug is set. Unfortunately, currently the counterpart kmem_asprintf() and friends do not properly account for memory allocated, so we must do the same on free. If we don't then we end up with a negative number of lost bytes reported when the module is unloaded. A better long term fix would be to add the accounting in to the allocation side but that's a project for another day. --- module/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index ec1ccb4ce..53aefee14 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -295,7 +295,7 @@ EXPORT_SYMBOL(strdup); void strfree(char *str) { - kmem_free(str, strlen(str) + 1); + kfree(str); } EXPORT_SYMBOL(strfree); From 26f7245c7cfa77f25aedf1a500db689343644ead Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Mon, 2 Aug 2010 09:24:01 +0000 Subject: [PATCH 0435/1062] Fix taskq code to not drop tasks when TQ_SLEEP is used. When TQ_SLEEP is used, taskq_dispatch() should always succeed even if the number of pending tasks is above tq->tq_maxalloc. This semantic is similar to KM_SLEEP in kmem allocations, which also always succeed. However, we cannot block forever otherwise there is a risk of deadlock. Therefore, we still allow the number of pending tasks to go above tq->tq_maxalloc with TQ_SLEEP, but we may sleep up to 1 second per task dispatch, thereby throttling the task dispatch rate. One of the existing splat tests was also augmented to test for this scenario. The test would fail with the previous implementation but now it succeeds. Signed-off-by: Brian Behlendorf --- module/spl/spl-taskq.c | 47 +++++++++++++++++++------------------- module/splat/splat-taskq.c | 29 +++++++++++++++++++---- 2 files changed, 48 insertions(+), 28 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 201cb5949..5a17f1ccf 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -78,35 +78,36 @@ retry: if (flags & TQ_NOSLEEP) SRETURN(NULL); - /* Sleep periodically polling the free list for an available - * spl_task_t. If a full second passes and we have not found - * one gives up and return a NULL to the caller. */ - if (flags & TQ_SLEEP) { - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - schedule_timeout(HZ / 100); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - if (count < 100) - SGOTO(retry, count++); - - SRETURN(NULL); - } - - /* Unreachable, Neither TQ_SLEEP or TQ_NOSLEEP set */ - PANIC("Neither TQ_SLEEP or TQ_NOSLEEP set"); + /* + * Sleep periodically polling the free list for an available + * spl_task_t. Dispatching with TQ_SLEEP should always succeed + * but we cannot block forever waiting for an spl_taskq_t to + * show up in the free list, otherwise a deadlock can happen. + * + * Therefore, we need to allocate a new task even if the number + * of allocated tasks is above tq->tq_maxalloc, but we still + * end up delaying the task allocation by one second, thereby + * throttling the task dispatch rate. + */ + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + schedule_timeout(HZ / 100); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + if (count < 100) + SGOTO(retry, count++); } - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); t = kmem_alloc(sizeof(spl_task_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - if (t) { - spin_lock_init(&t->t_lock); + if (t) { + spin_lock_init(&t->t_lock); INIT_LIST_HEAD(&t->t_list); - t->t_id = 0; - t->t_func = NULL; - t->t_arg = NULL; - tq->tq_nalloc++; - } + t->t_id = 0; + t->t_func = NULL; + t->t_arg = NULL; + tq->tq_nalloc++; + } SRETURN(t); } diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index d4540f37a..a7c537236 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -296,6 +296,10 @@ splat_taskq_test3(struct file *file, void *arg) * Then use taskq_wait() to block until all the tasks complete, then * cross check that all the tasks ran by checking tg_arg->count which * is incremented in the task function. Finally cleanup the taskq. + * + * First we try with a large 'maxalloc' value, then we try with a small one. + * We should not drop tasks when TQ_SLEEP is used in taskq_dispatch(), even + * if the number of pending tasks is above maxalloc. */ static void splat_taskq_test4_func(void *arg) @@ -307,16 +311,18 @@ splat_taskq_test4_func(void *arg) } static int -splat_taskq_test4(struct file *file, void *arg) +splat_taskq_test4_common(struct file *file, void *arg, int minalloc, + int maxalloc, int nr_tasks) { taskq_t *tq; splat_taskq_arg_t tq_arg; int i, j, rc = 0; - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' creating\n", - SPLAT_TASKQ_TEST4_NAME); + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' creating " + "(%d/%d/%d)\n", SPLAT_TASKQ_TEST4_NAME, minalloc, maxalloc, + nr_tasks); if ((tq = taskq_create(SPLAT_TASKQ_TEST4_NAME, 1, maxclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { + minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST4_NAME); @@ -326,7 +332,7 @@ splat_taskq_test4(struct file *file, void *arg) tq_arg.file = file; tq_arg.name = SPLAT_TASKQ_TEST4_NAME; - for (i = 1; i <= 1024; i *= 2) { + for (i = 1; i <= nr_tasks; i *= 2) { atomic_set(&tq_arg.count, 0); splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' function '%s' dispatched %d times\n", @@ -364,6 +370,19 @@ out: return rc; } +static int splat_taskq_test4(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test4_common(file, arg, 50, INT_MAX, 1024); + if (rc) + return rc; + + rc = splat_taskq_test4_common(file, arg, 1, 1, 32); + + return rc; +} + /* * Create a taskq and dispatch a specific sequence of tasks carefully * crafted to validate the order in which tasks are processed. When From 5ec44a37c3857b178a958352d63c5367133526e1 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 6 Aug 2010 14:04:00 -0700 Subject: [PATCH 0436/1062] Correctly detect atomic64_cmpxchg support The RHEL5 2.6.18-194.7.1.el5 kernel added atomic64_cmpxchg to asm-x86_64/atomic.h. That macro is defined in terms of cmpxchg which is provided by asm/system.h. However, asm/system.h is not #included by atomic.h in this kernel nor by the autoconf test for atomic64_cmpxchg, so the test failed with "implicit declaration of function 'cmpxchg'". This leads the build system to erroneously conclude that the kernel does not define atomic64_cmpxchg and enable the built-in definition. This in turn produces a '"atomic64_cmpxchg" redefined' build warning which is fatal when building with --enable-debug. This commit fixes this by including asm/system.h in the autoconf test. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 1 + configure | 2 ++ 2 files changed, 3 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index a11d8866d..facaf7404 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -639,6 +639,7 @@ AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG], [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg]) SPL_LINUX_TRY_COMPILE([ #include + #include ],[ atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); ],[ diff --git a/configure b/configure index 4a24a41f5..bcef31e47 100755 --- a/configure +++ b/configure @@ -11988,6 +11988,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #include int main (void) @@ -15499,6 +15500,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #include int main (void) From 46aa7b3939bbbac86d2a4cfc556b33398ec12d08 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Tue, 10 Aug 2010 11:01:46 -0700 Subject: [PATCH 0437/1062] Correctly handle rwsem_is_locked() behavior A race condition in rwsem_is_locked() was fixed in Linux 2.6.33 and the fix was backported to RHEL5 as of kernel 2.6.18-190.el5. Details can be found here: https://bugzilla.redhat.com/show_bug.cgi?id=526092 The race condition was fixed in the kernel by acquiring the semaphore's wait_lock inside rwsem_is_locked(). The SPL worked around the race condition by acquiring the wait_lock before calling that function, but with the fix in place it must not do that. This commit implements an autoconf test to detect whether the fixed version of rwsem_is_locked() is present. The previous version of rwsem_is_locked() was an inline static function while the new version is exported as a symbol which we can check for in module.symvers. Depending on the result we correctly implement the needed compatibility macros for proper spinlock handling. Finally, we do the right thing with spin locks in RW_*_HELD() by using the new compatibility macros. We only only acquire the semaphore's wait_lock if it is calling a rwsem_is_locked() that does not itself try to acquire the lock. Some new overhead and a small harmless race is introduced by this change. This is because RW_READ_HELD() and RW_WRITE_HELD() now acquire and release the wait_lock twice: once for the call to rwsem_is_locked() and once for the call to rw_owner(). This can't be avoided if calling a rwsem_is_locked() that takes the wait_lock, as it will in more recent kernels. The other case which only occurs in legacy kernels could be optimized by taking the lock only once, as was done prior to this commit. However, I decided that the performance gain probably wasn't significant enough to justify the messy special cases required. The function spl_rw_get_owner() was only used to enable the afore-mentioned optimization. Since it is no longer used, I removed it. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 17 ++++++++ configure | 82 ++++++++++++++++++++++++++++++++++++ include/linux/rwsem_compat.h | 63 +++++++++++++++++++++++++++ include/sys/rwlock.h | 38 +++-------------- spl_config.h.in | 3 ++ 5 files changed, 172 insertions(+), 31 deletions(-) create mode 100644 include/linux/rwsem_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index facaf7404..0b9f8f430 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -77,6 +77,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_5ARGS_PROC_HANDLER SPL_AC_KVASPRINTF SPL_AC_3ARGS_FILE_FSYNC + SPL_AC_EXPORTED_RWSEM_IS_LOCKED ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1598,3 +1599,19 @@ AC_DEFUN([SPL_AC_3ARGS_FILE_FSYNC], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.33 API change. Also backported in RHEL5 as of 2.6.18-190.el5. +dnl # Earlier versions of rwsem_is_locked() were inline and had a race +dnl # condition. The fixed version is exported as a symbol. The race +dnl # condition is fixed by acquiring sem->wait_lock, so we must not +dnl # call that version while holding sem->wait_lock. +dnl # +AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], [ + SPL_CHECK_SYMBOL_EXPORT( + [rwsem_is_locked], + [lib/rwsem-spinlock.c], + [AC_DEFINE(RWSEM_IS_LOCKED_TAKES_WAIT_LOCK, 1, + [rwsem_is_locked() acquires sem->wait_lock])], + []) +]) diff --git a/configure b/configure index bcef31e47..285c9a434 100755 --- a/configure +++ b/configure @@ -15130,6 +15130,47 @@ fi + + { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 +$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } + grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in lib/rwsem-spinlock.c; do + grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 +_ACEOF + + fi + + ;; user) @@ -18643,6 +18684,47 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 +$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } + grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in lib/rwsem-spinlock.c; do + grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 +_ACEOF + + fi + + + if test "x$AWK" != xgawk; then diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h new file mode 100644 index 000000000..67a82bb44 --- /dev/null +++ b/include/linux/rwsem_compat.h @@ -0,0 +1,63 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_RWSEM_COMPAT_H +#define _SPL_RWSEM_COMPAT_H + +#include + +#ifdef RWSEM_IS_LOCKED_TAKES_WAIT_LOCK +/* + * A race condition in rwsem_is_locked() was fixed in Linux 2.6.33 and the fix + * was backported to RHEL5 as of kernel 2.6.18-190.el5. Details can be found + * here: + * + * https://bugzilla.redhat.com/show_bug.cgi?id=526092 + + * The race condition was fixed in the kernel by acquiring the semaphore's + * wait_lock inside rwsem_is_locked(). The SPL worked around the race + * condition by acquiring the wait_lock before calling that function, but + * with the fix in place we must not do that. + */ + +#define spl_rwsem_is_locked(rwsem) \ +({ \ + rwsem_is_locked(rwsem); \ +}) + +#else + +#define spl_rwsem_is_locked(rwsem) \ +({ \ + unsigned long _flags_; \ + int _rc_; \ + spin_lock_irqsave(&rwsem->wait_lock, _flags_); \ + _rc_ = rwsem_is_locked(rwsem); \ + spin_unlock_irqrestore(&rwsem->wait_lock, _flags_); \ + _rc_; \ +}) + +#endif /* RWSEM_IS_LOCKED_TAKES_WAIT_LOCK */ + +#endif /* _SPL_RWSEM_COMPAT_H */ diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index eb763ec78..3d9808599 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -27,6 +27,7 @@ #include #include +#include typedef enum { RW_DRIVER = 2, @@ -46,12 +47,6 @@ typedef struct { #define SEM(rwp) ((struct rw_semaphore *)(rwp)) -static inline kthread_t * -spl_rw_get_owner(krwlock_t *rwp) -{ - return rwp->rw_owner; -} - static inline void spl_rw_set_owner(krwlock_t *rwp) { @@ -79,7 +74,7 @@ rw_owner(krwlock_t *rwp) kthread_t *owner; spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); - owner = spl_rw_get_owner(rwp); + owner = rwp->rw_owner; spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); return owner; @@ -88,40 +83,21 @@ rw_owner(krwlock_t *rwp) static inline int RW_READ_HELD(krwlock_t *rwp) { - unsigned long flags; - int rc; - - spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rc = (rwsem_is_locked(SEM(rwp)) && spl_rw_get_owner(rwp) == NULL); - spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); - - return rc; + return (spl_rwsem_is_locked(SEM(rwp)) && + rw_owner(rwp) == NULL); } static inline int RW_WRITE_HELD(krwlock_t *rwp) { - unsigned long flags; - int rc; - - spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rc = (rwsem_is_locked(SEM(rwp)) && spl_rw_get_owner(rwp) == current); - spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); - - return rc; + return (spl_rwsem_is_locked(SEM(rwp)) && + rw_owner(rwp) == current); } static inline int RW_LOCK_HELD(krwlock_t *rwp) { - unsigned long flags; - int rc; - - spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rc = rwsem_is_locked(SEM(rwp)); - spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); - - return rc; + return spl_rwsem_is_locked(SEM(rwp)); } /* diff --git a/spl_config.h.in b/spl_config.h.in index 8d57a63ea..d3928f4ba 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -229,6 +229,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* rwsem_is_locked() acquires sem->wait_lock */ +#undef RWSEM_IS_LOCKED_TAKES_WAIT_LOCK + /* Define the project alias string. */ #undef SPL_META_ALIAS From 4be55565fe550febc92af2e26db7d5125f58d3b5 Mon Sep 17 00:00:00 2001 From: Li Wei Date: Thu, 12 Aug 2010 09:24:31 -0700 Subject: [PATCH 0438/1062] Fix stack overflow in vn_rdwr() due to memory reclaim Unless __GFP_IO and __GFP_FS are removed from the file mapping gfp mask we may enter memory reclaim during IO. In this case shrink_slab() entered another file system which is notoriously hungry for stack. This additional stack usage may cause a stack overflow. This patch removes __GFP_IO and __GFP_FS from the mapping gfp mask of each file during vn_open() to avoid any reclaim in the vn_rdwr() IO path. The original mask is then restored at vn_close() time. Hats off to the loop driver which does something similiar for the same reason. [...] shrink_slab+0xdc/0x153 try_to_free_pages+0x1da/0x2d7 __alloc_pages+0x1d7/0x2da do_generic_mapping_read+0x2c9/0x36f file_read_actor+0x0/0x145 __generic_file_aio_read+0x14f/0x19b generic_file_aio_read+0x34/0x39 do_sync_read+0xc7/0x104 vfs_read+0xcb/0x171 :spl:vn_rdwr+0x2b8/0x402 :zfs:vdev_file_io_start+0xad/0xe1 [...] Signed-off-by: Brian Behlendorf --- include/sys/vnode.h | 1 + module/spl/spl-vnode.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 09d843366..104e65d15 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -180,6 +180,7 @@ typedef struct vnode { struct stdata *v_stream; /* associated stream */ enum vtype v_type; /* vnode type */ dev_t v_rdev; /* device (VCHR, VBLK) */ + gfp_t v_gfp_mask; /* original mapping gfp mask */ } vnode_t; typedef struct vn_file { diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index dd759bf7f..29028c3c0 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -104,6 +104,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, struct file *fp; struct kstat stat; int rc, saved_umask = 0; + gfp_t saved_gfp; vnode_t *vp; SENTRY; @@ -145,9 +146,13 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, SRETURN(ENOMEM); } + saved_gfp = mapping_gfp_mask(fp->f_mapping); + mapping_set_gfp_mask(fp->f_mapping, saved_gfp & ~(__GFP_IO|__GFP_FS)); + mutex_enter(&vp->v_lock); vp->v_type = vn_get_sol_type(stat.mode); vp->v_file = fp; + vp->v_gfp_mask = saved_gfp; *vpp = vp; mutex_exit(&vp->v_lock); @@ -237,6 +242,7 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) ASSERT(vp); ASSERT(vp->v_file); + mapping_set_gfp_mask(vp->v_file->f_mapping, vp->v_gfp_mask); rc = filp_close(vp->v_file, 0); vn_free(vp); From 1db69544ccbbb923a419757bc8b3d1a1e8c2ef0f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 13 Aug 2010 09:33:50 -0700 Subject: [PATCH 0439/1062] Prep for spl-0.5.0 tag --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9fda9c9a1..d02dbdc02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-8-13 Brian Behlendorf + + * : Tag spl-0.5.0 + + * : The ChangeLog is being retired. Please use the git commit + logs for a full records of changes: 'git log' + 2010-05-21 Brian Behlendorf * : Tag spl-0.4.9 From 8dbd3fbd5e7b66eb68447a9cef44d7c4542a8867 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 27 Aug 2010 12:36:31 -0700 Subject: [PATCH 0440/1062] Add missing atomic functions These functions were not previous needed so they were not added. Now they are so add the full set. atomic_inc_32_nv() atomic_dec_32_nv() atomic_inc_64_nv() atomic_dec_64_nv() --- include/sys/atomic.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 699f4456e..9348ab97e 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -90,6 +90,26 @@ atomic_sub_32(volatile uint32_t *target, int32_t delta) spin_unlock(&atomic32_lock); } +static __inline__ uint32_t +atomic_inc_32_nv(volatile uint32_t *target) +{ + spin_lock(&atomic32_lock); + (*target)++; + spin_unlock(&atomic32_lock); + + return *target; +} + +static __inline__ uint32_t +atomic_dec_32_nv(volatile uint32_t *target) +{ + spin_lock(&atomic32_lock); + (*target)--; + spin_unlock(&atomic32_lock); + + return *target; +} + static __inline__ uint32_t atomic_add_32_nv(volatile uint32_t *target, uint32_t delta) { @@ -158,6 +178,26 @@ atomic_sub_64(volatile uint64_t *target, uint64_t delta) spin_unlock(&atomic64_lock); } +static __inline__ uint64_t +atomic_inc_64_nv(volatile uint64_t *target) +{ + spin_lock(&atomic64_lock); + (*target)++; + spin_unlock(&atomic64_lock); + + return *target; +} + +static __inline__ uint64_t +atomic_dec_64_nv(volatile uint64_t *target) +{ + spin_lock(&atomic64_lock); + (*target)--; + spin_unlock(&atomic64_lock); + + return *target; +} + static __inline__ uint64_t atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) { @@ -200,6 +240,8 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, #define atomic_dec_32(v) atomic_dec((atomic_t *)(v)) #define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v)) #define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v)) +#define atomic_inc_32_nv(v) atomic_inc_return((atomic_t *)(v)) +#define atomic_dec_32_nv(v) atomic_dec_return((atomic_t *)(v)) #define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) #define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) #define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) @@ -207,6 +249,8 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, #define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) #define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) #define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v)) +#define atomic_inc_64_nv(v) atomic64_inc_return((atomic64_t *)(v)) +#define atomic_dec_64_nv(v) atomic64_dec_return((atomic64_t *)(v)) #define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) #define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) #define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) From 2b3543025cb2e61c55b4ba79a524d10fe951e3be Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 27 Aug 2010 13:28:10 -0700 Subject: [PATCH 0441/1062] Stub out kmem cache defrag API At some point we are going to need to implement the kmem cache move callbacks to allow for kmem cache defragmentation. This commit simply lays a small part of the API ground work, it does not actually implement any of this feature. This is safe for now because the move callbacks are just an optimization. Even if they are registered we don't ever really have to call them. --- include/sys/kmem.h | 23 ++++++++++++++++++----- module/spl/spl-kmem.c | 12 ++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index e90c6b8ce..fd4c52e1e 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -296,6 +296,15 @@ enum { KMC_BIT_DESTROY = 17, /* Destroy in progress */ }; +/* kmem move callback return values */ +typedef enum kmem_cbrc { + KMEM_CBRC_YES = 0, /* Object moved */ + KMEM_CBRC_NO = 1, /* Object not moved */ + KMEM_CBRC_LATER = 2, /* Object not moved, try again later */ + KMEM_CBRC_DONT_NEED = 3, /* Neither object is needed */ + KMEM_CBRC_DONT_KNOW = 4, /* Object unknown */ +} kmem_cbrc_t; + #define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH) #define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) #define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE) @@ -324,6 +333,9 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 8 /* Minimum objects per slab */ #define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ +#define POINTER_IS_VALID(p) 0 /* Unimplemented */ +#define POINTER_INVALIDATE(pp) /* Unimplemented */ + typedef int (*spl_kmem_ctor_t)(void *, void *, int); typedef void (*spl_kmem_dtor_t)(void *, void *); typedef void (*spl_kmem_reclaim_t)(void *); @@ -393,11 +405,11 @@ typedef struct spl_kmem_cache { } spl_kmem_cache_t; #define kmem_cache_t spl_kmem_cache_t -extern spl_kmem_cache_t * -spl_kmem_cache_create(char *name, size_t size, size_t align, - spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, spl_kmem_reclaim_t reclaim, - void *priv, void *vmp, int flags); - +extern spl_kmem_cache_t *spl_kmem_cache_create(char *name, size_t size, + size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, + spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); +extern void spl_kmem_cache_set_move(kmem_cache_t *, + kmem_cbrc_t (*)(void *, void *, size_t, void *)); extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); @@ -410,6 +422,7 @@ void spl_kmem_fini(void); #define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ spl_kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) +#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move) #define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) #define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) #define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 53aefee14..aefa00fa6 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1434,6 +1434,18 @@ out: } EXPORT_SYMBOL(spl_kmem_cache_create); +/* + * Register a move callback to for cache defragmentation. + * XXX: Unimplemented but harmless to stub out for now. + */ +void +spl_kmem_cache_set_move(kmem_cache_t *skc, + kmem_cbrc_t (move)(void *, void *, size_t, void *)) +{ + ASSERT(move != NULL); +} +EXPORT_SYMBOL(spl_kmem_cache_set_move); + /* * Destroy a cache and all objects assoicated with the cache. */ From d85e28ad69d87e63894308c34739da59420a582d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 27 Aug 2010 13:36:24 -0700 Subject: [PATCH 0442/1062] Add MUTEX_NOT_HELD() function Simply implement the missing MUTEX_NOT_HELD() function using the !MUTEX_HELD construct. --- include/sys/mutex.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index ce8c0f4e9..97f49cb2a 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -57,7 +57,8 @@ mutex_owned(kmutex_t *mp) return (ACCESS_ONCE(mp->owner) == current_thread_info()); } -#define MUTEX_HELD(mp) mutex_owned(mp) +#define MUTEX_HELD(mp) mutex_owned(mp) +#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) #undef mutex_init #define mutex_init(mp, name, type, ibc) \ ({ \ @@ -150,6 +151,7 @@ mutex_owner(kmutex_t *mp) #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) +#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) /* * The following functions must be a #define and not static inline. From 8371f981f172426271635adf0e37b2b4aeccbe0e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 27 Aug 2010 13:51:25 -0700 Subject: [PATCH 0443/1062] Add list_link_replace() function The list_link_replace() function with swap a new item it to the place of an old item in a list. It is the callers responsibility to ensure all lists involved are locked properly. --- include/sys/list.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/sys/list.h b/include/sys/list.h index e30d7b7e0..303b959de 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -203,4 +203,17 @@ spl_list_move_tail(list_t *dst, list_t *src) #define list_move_tail(dst, src) spl_list_move_tail(dst, src) +static inline void +list_link_replace(list_node_t *old_node, list_node_t *new_node) +{ + ASSERT(list_link_active(old_node)); + ASSERT(!list_link_active(new_node)); + + new_node->next = old_node->next; + new_node->prev = old_node->prev; + old_node->prev->next = new_node; + old_node->next->prev = new_node; + list_link_init(old_node); +} + #endif /* SPL_LIST_H */ From 53be2266e198134014a859fa0bb6e90196c9df0c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Sep 2010 10:23:05 -0700 Subject: [PATCH 0444/1062] Add quick build instructions Full update to date build information will stay on the wiki for now, but there is no harm in adding the bare bones instructions to the README. They shouldn't change and are a reasonable quick start. --- README.markdown | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 6189ad625..233c4007f 100644 --- a/README.markdown +++ b/README.markdown @@ -6,5 +6,10 @@ upstream Solaris development closely and don’t want the overhead of maintaining a large patch which converts Solaris primitives to Linux primitives. -Documentation for building, configuring, and using the SPL can be -found at: +To build packages for your distribution: + +$ ./configure +$ make pkg + +Full documentation for building, configuring, and using the SPL can +be found at: From 6295556b716df883ca719d24838281ccbcce5c44 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Sep 2010 10:24:44 -0700 Subject: [PATCH 0445/1062] Prep for spl-0.5.1 tag --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index fd658908f..a0f42b957 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.5.0 +Version: 0.5.1 Release: 1 Release-Tags: relext From 73fc084e9272e773efa4194bc5ead654f44c4846 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Sep 2010 15:39:08 -0700 Subject: [PATCH 0446/1062] Move vendor check to spl-build.m4 This check was previously done with a hack in config.guess. However, since a new config.guess is copied in to place when forcing a full autoreconf this change was easily lost and never a good idea. This commit also updates all of the autoconf style support scripts in config. --- Makefile.in | 1 + cmd/Makefile.in | 1 + config/config.guess | 893 ++++++++++++++++++++++++-------------------- config/config.sub | 351 +++++++++++++---- config/depcomp | 172 +++++++-- config/install-sh | 511 +++++++++++++++++-------- config/missing | 104 +++--- config/spl-build.m4 | 21 +- configure | 52 ++- include/Makefile.in | 1 + lib/Makefile.in | 1 + scripts/Makefile.in | 1 + 12 files changed, 1376 insertions(+), 733 deletions(-) diff --git a/Makefile.in b/Makefile.in index af58ad11b..189b77a46 100644 --- a/Makefile.in +++ b/Makefile.in @@ -219,6 +219,7 @@ SPL_META_NAME = @SPL_META_NAME@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ +VENDOR = @VENDOR@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index fa53b0b15..2313a79c5 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -193,6 +193,7 @@ SPL_META_NAME = @SPL_META_NAME@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ +VENDOR = @VENDOR@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ diff --git a/config/config.guess b/config/config.guess index 2440a1546..dc84c68ef 100755 --- a/config/config.guess +++ b/config/config.guess @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. -timestamp='2003-06-17' +timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,23 +18,25 @@ timestamp='2003-06-17' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -53,8 +56,8 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -66,11 +69,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +107,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -136,24 +139,6 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -if test -f /etc/redhat-release ; then - VENDOR=redhat ; -elif test -f /etc/fedora-release ; then - VENDOR=fedora ; -elif test -f /etc/debian_version ; then - VENDOR=debian ; -elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; -elif test -f /etc/SuSE-release ; then - VENDOR=sles ; -elif test -f /etc/slackware-version ; then - VENDOR=slackware ; -elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; -else - VENDOR= ; -fi - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -176,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -184,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -214,50 +200,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -295,42 +263,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -338,32 +313,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -372,10 +366,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -387,10 +381,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -401,37 +395,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -455,32 +452,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -496,29 +494,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -526,7 +524,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -541,15 +539,19 @@ EOF exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; - *:AIX:*:[45]) + exit ;; + *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -562,28 +564,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -645,9 +647,19 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -655,11 +667,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -687,194 +699,164 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) + exit ;; + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - ppc:Linux:*:*) - echo powerpc-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-${VENDOR:-unknown}-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -885,10 +867,80 @@ EOF EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -896,84 +948,40 @@ EOF PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-ibm-linux + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) - echo x86_64-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -981,24 +989,27 @@ EOF # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1006,15 +1017,16 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1106,68 +1131,94 @@ EOF else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1175,22 +1226,25 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1201,28 +1255,50 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1254,7 +1330,7 @@ main () #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1343,11 +1419,12 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1356,22 +1433,22 @@ then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1382,7 +1459,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +and + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config/config.sub b/config/config.sub index 6b2ff9f6a..2a55a5075 100755 --- a/config/config.sub +++ b/config/config.sub @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. -timestamp='2003-06-18' +timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,22 +22,26 @@ timestamp='2003-06-18' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -70,8 +75,8 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -83,11 +88,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +104,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,7 +123,10 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -144,10 +152,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -169,6 +180,10 @@ case $os in -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -185,6 +200,10 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -228,54 +247,71 @@ case $basic_machine in | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | s390 | s390x \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -295,55 +331,68 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* \ - | m32r-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | s390-* | s390x-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -361,6 +410,9 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -378,6 +430,9 @@ case $basic_machine in amd64) basic_machine=x86_64-pc ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -401,6 +456,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -409,10 +468,26 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -437,12 +512,27 @@ case $basic_machine in basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -465,6 +555,14 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -615,6 +713,14 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -626,10 +732,17 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -643,10 +756,6 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -659,6 +768,9 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -727,10 +839,6 @@ case $basic_machine in np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -738,9 +846,12 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -758,6 +869,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -767,6 +886,12 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -823,6 +948,10 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -833,6 +962,12 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi @@ -843,6 +978,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -854,6 +993,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -943,6 +1085,10 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -956,6 +1102,10 @@ case $basic_machine in tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -999,6 +1149,10 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1010,6 +1164,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1029,6 +1187,9 @@ case $basic_machine in romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1045,13 +1206,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1098,6 +1256,9 @@ case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1118,25 +1279,30 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1154,12 +1320,15 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1172,6 +1341,9 @@ case $os in -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1193,6 +1365,9 @@ case $os in -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; @@ -1215,6 +1390,9 @@ case $os in -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1251,6 +1429,12 @@ case $os in -kaos*) os=-kaos ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; -none) ;; *) @@ -1273,6 +1457,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1282,8 +1472,8 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1310,6 +1500,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1328,9 +1521,15 @@ case $basic_machine in *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; @@ -1433,7 +1632,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) @@ -1463,9 +1662,15 @@ case $basic_machine in -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; @@ -1490,7 +1695,7 @@ case $basic_machine in esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/config/depcomp b/config/depcomp index 04701da53..df8eea7e4 100755 --- a/config/depcomp +++ b/config/depcomp @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,9 +17,7 @@ scriptversion=2005-07-09.11 # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -86,12 +85,34 @@ if test "$depmode" = dashXmstdout; then depmode=dashmstdout fi +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -178,14 +199,14 @@ sgi) ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' -' ' ' >> $depfile - echo >> $depfile +' ' ' >> "$depfile" + echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile + >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -201,34 +222,39 @@ aix) # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -276,6 +302,51 @@ icc) rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +359,13 @@ tru64) if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is @@ -345,7 +416,7 @@ dashmstdout) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -396,32 +467,39 @@ makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no - for arg in "$@"; do + cleared=no eat=no + for arg + do case $cleared in no) set ""; shift cleared=yes ;; esac + if test $eat = yes; then + eat=no + continue + fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix="`echo $object | sed 's/^.*\././'`" + obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" @@ -441,7 +519,7 @@ cpp) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -479,13 +557,27 @@ cpp) msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. + # always write the preprocessed file to stdout. "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + IFS=" " for arg do case "$arg" in + -o) + shift + ;; + $object) + shift + ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -498,16 +590,23 @@ msvisualcpp) ;; esac done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + none) exec "$@" ;; @@ -526,5 +625,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/config/install-sh b/config/install-sh index 4d4a9519e..6781b987b 100755 --- a/config/install-sh +++ b/config/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,38 +39,68 @@ scriptversion=2005-05-14.22 # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 -chmodcmd="$chmodprog 0755" -chowncmd= chgrpcmd= -stripcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -80,81 +110,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; - -d) dir_arg=true - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) dst_arg=$2 + shift;; - -T) no_target_directory=true - shift - continue;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac + shift done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -164,24 +199,47 @@ if test -z "$1"; then exit 0 fi +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -190,71 +248,199 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + obsolete_mkdir_used=false - # Make sure that the destination directory exists. + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi - pathcomp= + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +448,9 @@ do # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -273,51 +458,63 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi done -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} - # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/config/missing b/config/missing index 894e786e1..28055d2ae 100755 --- a/config/missing +++ b/config/missing @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -18,9 +18,7 @@ scriptversion=2005-06-08.21 # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,6 +31,8 @@ if test $# -eq 0; then fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +44,7 @@ fi msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +77,7 @@ Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -86,6 +87,9 @@ Supported PROGRAM values: tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + Send bug reports to ." exit $? ;; @@ -103,15 +107,22 @@ Send bug reports to ." esac +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). -case "$1" in - lex|yacc) +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) # Not GNU programs, they don't have --version. ;; - tar) + tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 @@ -135,7 +146,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -145,7 +156,7 @@ WARNING: \`$1' is $msg. You should only need it if touch aclocal.m4 ;; - autoconf) + autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -154,7 +165,7 @@ WARNING: \`$1' is $msg. You should only need it if touch configure ;; - autoheader) + autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -164,7 +175,7 @@ WARNING: \`$1' is $msg. You should only need it if test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -184,7 +195,7 @@ WARNING: \`$1' is $msg. You should only need it if while read f; do touch "$f"; done ;; - autom4te) + autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -192,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg. You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -207,80 +218,78 @@ WARNING: \`$1' is needed, but is $msg. fi ;; - bison|yacc) + bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; - lex|flex) + lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; - help2man) + help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit 1 + exit $? fi ;; - makeinfo) + makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -289,11 +298,17 @@ WARNING: \`$1' is $msg. You should only need it if DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -303,7 +318,7 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar) + tar*) shift # We have already tried tar in the generic part. @@ -317,13 +332,13 @@ WARNING: \`$1' is $msg. You should only need it if fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 @@ -356,5 +371,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 0b9f8f430..d956a8b43 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -314,7 +314,26 @@ dnl # Using the VENDOR tag from config.guess set the default dnl # package type for 'make pkg': (rpm | deb | tgz) dnl # AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ - VENDOR=$(echo $ac_build_alias | cut -f2 -d'-') + AC_MSG_CHECKING([linux distribution]) + if test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/fedora-release ; then + VENDOR=fedora ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; + elif test -f /etc/SuSE-release ; then + VENDOR=sles ; + elif test -f /etc/slackware-version ; then + VENDOR=slackware ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; + else + VENDOR= ; + fi + AC_MSG_RESULT([$VENDOR]) + AC_SUBST(VENDOR) AC_MSG_CHECKING([default package type]) case "$VENDOR" in diff --git a/configure b/configure index 285c9a434..eea760d14 100755 --- a/configure +++ b/configure @@ -800,6 +800,7 @@ LINUX_OBJ LINUX SPL_CONFIG DEFAULT_PACKAGE +VENDOR ALIEN_VERSION ALIEN HAVE_ALIEN @@ -4776,13 +4777,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4779: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4780: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4782: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4783: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4785: output\"" >&5) + (eval echo "\"\$as_me:4786: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5988,7 +5989,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5991 "configure"' > conftest.$ac_ext + echo '#line 5992 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7841,11 +7842,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7844: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7845: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7848: \$? = $ac_status" >&5 + echo "$as_me:7849: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8180,11 +8181,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8183: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8184: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8187: \$? = $ac_status" >&5 + echo "$as_me:8188: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8285,11 +8286,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8288: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8289: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8292: \$? = $ac_status" >&5 + echo "$as_me:8293: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8340,11 +8341,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8343: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8344: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8347: \$? = $ac_status" >&5 + echo "$as_me:8348: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11143,7 +11144,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11146 "configure" +#line 11147 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11239,7 +11240,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11242 "configure" +#line 11243 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11600,7 +11601,28 @@ fi - VENDOR=$(echo $ac_build_alias | cut -f2 -d'-') + { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 +$as_echo_n "checking linux distribution... " >&6; } + if test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/fedora-release ; then + VENDOR=fedora ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; + elif test -f /etc/SuSE-release ; then + VENDOR=sles ; + elif test -f /etc/slackware-version ; then + VENDOR=slackware ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; + else + VENDOR= ; + fi + { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 +$as_echo "$VENDOR" >&6; } + { $as_echo "$as_me:$LINENO: checking default package type" >&5 $as_echo_n "checking default package type... " >&6; } diff --git a/include/Makefile.in b/include/Makefile.in index c64647450..89b31678a 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -152,6 +152,7 @@ SPL_META_NAME = @SPL_META_NAME@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ +VENDOR = @VENDOR@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 7860a1592..201e20808 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -185,6 +185,7 @@ SPL_META_NAME = @SPL_META_NAME@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ +VENDOR = @VENDOR@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 4e2f8150e..4e706159a 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -147,6 +147,7 @@ SPL_META_NAME = @SPL_META_NAME@ SPL_META_RELEASE = @SPL_META_RELEASE@ SPL_META_VERSION = @SPL_META_VERSION@ STRIP = @STRIP@ +VENDOR = @VENDOR@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ From d8a1b739359b04f016e2b81844a29c4d0de60bd8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Sep 2010 13:15:20 -0700 Subject: [PATCH 0447/1062] Remove spl-x.y.z.zip creation in 'make dist' Do no create a spl-x.y.z.zip file as part of 'make dist'. Simply create the standard spl-x.y.z.tar.gz file. --- Makefile.am | 2 +- Makefile.in | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 184c300cb..3fe1eacd7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ KERNEL_DIR = module include endif SUBDIRS = $(USER_DIR) $(KERNEL_DIR) -AUTOMAKE_OPTIONS = foreign dist-zip +AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am noinst_HEADERS = spl_config.h diff --git a/Makefile.in b/Makefile.in index 189b77a46..4180b8167 100644 --- a/Makefile.in +++ b/Makefile.in @@ -122,7 +122,7 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip +DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print @@ -280,7 +280,7 @@ top_srcdir = @top_srcdir@ @CONFIG_USER_TRUE@USER_DIR = lib cmd scripts @CONFIG_KERNEL_TRUE@KERNEL_DIR = module include SUBDIRS = $(USER_DIR) $(KERNEL_DIR) -AUTOMAKE_OPTIONS = foreign dist-zip +AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \ DISCLAIMER config/config.awk config/rpm.am config/deb.am \ config/tgz.am @@ -583,6 +583,7 @@ dist-tarZ: distdir dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) + dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) @@ -590,8 +591,6 @@ dist-zip: distdir dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then From a7958f7eef5ba55987810336d887437767941d26 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Sep 2010 12:12:39 -0700 Subject: [PATCH 0448/1062] Support custom build directories One of the neat tricks an autoconf style project is capable of is allow configurion/building in a directory other than the source directory. The major advantage to this is that you can build the project various different ways while making changes in a single source tree. For example, this project is designed to work on various different Linux distributions each of which work slightly differently. This means that changes need to verified on each of those supported distributions perferably before the change is committed to the public git repo. Using nfs and custom build directories makes this much easier. I now have a single source tree in nfs mounted on several different systems each running a supported distribution. When I make a change to the source base I suspect may break things I can concurrently build from the same source on all the systems each in their own subdirectory. wget -c http://github.com/downloads/behlendorf/spl/spl-x.y.z.tar.gz tar -xzf spl-x.y.z.tar.gz cd spl-x-y-z ------------------------- run concurrently ---------------------- mkdir ubuntu mkdir fedora mkdir debian mkdir rhel6 cd ubuntu cd fedora cd debian cd rhel6 ../configure ../configure ../configure ../configure make make make make make check make check make check make check This is something the project has almost supported for a long time but finishing this support should save me lots of time. --- Makefile.am | 6 +-- Makefile.in | 102 +++++++++++++++++++++++++++++++++++++-- cmd/Makefile.am | 2 +- cmd/Makefile.in | 4 +- config/Rules.am | 2 +- config/spl-build.m4 | 10 +--- configure | 14 ++---- configure.ac | 2 +- include/Makefile.am | 22 ++++----- include/Makefile.in | 11 ++++- lib/Makefile.in | 2 +- module/Makefile.in | 12 ++--- module/spl/Makefile.in | 40 +++++++-------- module/splat/Makefile.in | 32 ++++++------ scripts/Makefile.am | 2 +- scripts/Makefile.in | 2 +- 16 files changed, 177 insertions(+), 88 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3fe1eacd7..9f33db7cd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/config/rpm.am -include ${top_srcdir}/config/deb.am -include ${top_srcdir}/config/tgz.am +include $(top_srcdir)/config/deb.am +include $(top_srcdir)/config/tgz.am if CONFIG_USER USER_DIR = lib cmd scripts @@ -31,7 +31,7 @@ if CONFIG_KERNEL install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ instdest=$(DESTDIR)/usr/src/$$destname; \ - echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ + echo "$(SPL_META_VERSION)" >$$instdest/spl.release; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done diff --git a/Makefile.in b/Makefile.in index 4180b8167..e5304d0a0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -23,6 +23,34 @@ # Build targets for RPM packages. ############################################################################### +############################################################################### +# Copyright (C) 2010 Lawrence Livermore National Security, LLC. +# Written by Brian Behlendorf . +############################################################################### +# Build targets for DEB packages. +# +# Long term native distro specific Debian style packaging should be added. +# In the short term RPM packages are built and converted to DEB packages +# using alien. If someone familiar with Debian style packaging were to +# update the build system to correctly build Debian style packages I would +# happily take it. Until then we will have to make due with alien. +# +############################################################################### + +############################################################################### +# Copyright (C) 2010 Lawrence Livermore National Security, LLC. +# Written by Brian Behlendorf . +############################################################################### +# Build targets for TGZ packages. +# +# Long term native distro specific Slackware style packaging should be added. +# In the short term RPM packages are built and converted to TGZ packages +# using alien. If someone familiar with Slackware style packaging were to +# update the build system to correctly build Slackware style packages I would +# happily take it. Until then we will have to make due with alien. +# +############################################################################### + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -46,7 +74,8 @@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/spl-modules.spec.in $(srcdir)/spl.spec.in \ - $(srcdir)/spl_config.h.in $(top_srcdir)/config/rpm.am \ + $(srcdir)/spl_config.h.in $(top_srcdir)/config/deb.am \ + $(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \ $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ @@ -291,7 +320,7 @@ all: spl_config.h .SUFFIXES: am--refresh: @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -860,8 +889,71 @@ rpm-common: --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild -include ${top_srcdir}/config/deb.am -include ${top_srcdir}/config/tgz.am + +deb-local: + @(if test "${HAVE_DPKGBUILD}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${DPKGBUILD} missing. Please install the\n" \ + "*** package for your distribution which provides ${DPKGBUILD},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi; \ + if test "${HAVE_ALIEN}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${ALIEN} missing. Please install the\n" \ + "*** package for your distribution which provides ${ALIEN},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi) + +deb-modules: deb-local rpm-modules + name=${PACKAGE}-modules; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ + pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ + $(RM) $$pkg1 $$pkg2 + +deb-utils: deb-local rpm-utils + name=${PACKAGE}; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ + $(RM) $$pkg1 + +deb: deb-modules deb-utils + +tgz-local: + @(if test "${HAVE_ALIEN}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${ALIEN} missing. Please install the\n" \ + "*** package for your distribution which provides ${ALIEN},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi) + +tgz-modules: tgz-local rpm-modules + name=${PACKAGE}-modules; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ + pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ + $(RM) $$pkg1 $$pkg2 + +tgz-utils: tgz-local rpm-utils + name=${PACKAGE}; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ + $(RM) $$pkg1 + +tgz: tgz-modules tgz-utils distclean-local:: -$(RM) -R autom4te*.cache @@ -878,7 +970,7 @@ distclean-local:: @CONFIG_KERNEL_TRUE@install-data-local: @CONFIG_KERNEL_TRUE@ destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/$$destname; \ -@CONFIG_KERNEL_TRUE@ echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ +@CONFIG_KERNEL_TRUE@ echo "$(SPL_META_VERSION)" >$$instdest/spl.release; \ @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ @CONFIG_KERNEL_TRUE@ done diff --git a/cmd/Makefile.am b/cmd/Makefile.am index 5658d06c4..c1e841dfe 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/config/Rules.am DEFAULT_INCLUDES += \ - -I${top_srcdir}/lib + -I$(top_srcdir)/lib sbin_PROGRAMS = spl splat diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 2313a79c5..7f87fb2ec 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -251,8 +251,8 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h \ - -I${top_srcdir}/lib +DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h \ + -I$(top_srcdir)/lib AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \ -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} diff --git a/config/Rules.am b/config/Rules.am index c6b00b6b8..0b41ec460 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -6,7 +6,7 @@ # Common rules for user space components. ############################################################################### -DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h +DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d956a8b43..dffa03655 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -9,18 +9,12 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL - dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other - dnl # compiler options are added by the kernel build system. - abs_srcdir=`readlink -f ${srcdir}` - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" - KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" - KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" - if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi - AC_SUBST(KERNELMAKE_PARAMS) + + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" AC_SUBST(KERNELCPPFLAGS) SPL_AC_DEBUG diff --git a/configure b/configure index eea760d14..5784ec75c 100755 --- a/configure +++ b/configure @@ -11788,16 +11788,12 @@ $as_echo "$LINUX_SYMBOLS" >&6; } - abs_srcdir=`readlink -f ${srcdir}` - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" - KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" - KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" - if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" @@ -15341,16 +15337,12 @@ $as_echo "$LINUX_SYMBOLS" >&6; } - abs_srcdir=`readlink -f ${srcdir}` - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" - KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include" - KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h" - if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" @@ -20369,7 +20361,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "spl_config.h":H) (mv spl_config.h spl_config.h.tmp && - awk -f config/config.awk spl_config.h.tmp >spl_config.h && + awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h && rm spl_config.h.tmp) || exit 1 ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files diff --git a/configure.ac b/configure.ac index 562d03657..b09e31fd7 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ AM_SILENT_RULES AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) AC_CONFIG_HEADERS([spl_config.h], [ (mv spl_config.h spl_config.h.tmp && - awk -f config/config.awk spl_config.h.tmp >spl_config.h && + awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h && rm spl_config.h.tmp) || exit 1]) AC_PROG_INSTALL diff --git a/include/Makefile.am b/include/Makefile.am index 64d9fa29e..d1289f0a0 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,17 +2,17 @@ # noinst_HEADERS because they are not installed in the usual include # location. We do not want to be using $includedir for this. # Installation is handled by the custom install-data-local rule. -noinst_HEADERS = *.h -noinst_HEADERS += fs/*.h -noinst_HEADERS += linux/*.h -noinst_HEADERS += rpc/*.h -noinst_HEADERS += sharefs/*.h -noinst_HEADERS += sys/fm/*.h -noinst_HEADERS += sys/fs/*.h -noinst_HEADERS += sys/sysevent/*.h -noinst_HEADERS += sys/*.h -noinst_HEADERS += util/*.h -noinst_HEADERS += vm/*.h +noinst_HEADERS = $(top_srcdir)/include/*.h +noinst_HEADERS += $(top_srcdir)/include/fs/*.h +noinst_HEADERS += $(top_srcdir)/include/linux/*.h +noinst_HEADERS += $(top_srcdir)/include/rpc/*.h +noinst_HEADERS += $(top_srcdir)/include/sharefs/*.h +noinst_HEADERS += $(top_srcdir)/include/sys/fm/*.h +noinst_HEADERS += $(top_srcdir)/include/sys/fs/*.h +noinst_HEADERS += $(top_srcdir)/include/sys/sysevent/*.h +noinst_HEADERS += $(top_srcdir)/include/sys/*.h +noinst_HEADERS += $(top_srcdir)/include/util/*.h +noinst_HEADERS += $(top_srcdir)/include/vm/*.h install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ diff --git a/include/Makefile.in b/include/Makefile.in index 89b31678a..823f50d4e 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -215,8 +215,15 @@ top_srcdir = @top_srcdir@ # noinst_HEADERS because they are not installed in the usual include # location. We do not want to be using $includedir for this. # Installation is handled by the custom install-data-local rule. -noinst_HEADERS = *.h fs/*.h linux/*.h rpc/*.h sharefs/*.h sys/fm/*.h \ - sys/fs/*.h sys/sysevent/*.h sys/*.h util/*.h vm/*.h +noinst_HEADERS = $(top_srcdir)/include/*.h \ + $(top_srcdir)/include/fs/*.h $(top_srcdir)/include/linux/*.h \ + $(top_srcdir)/include/rpc/*.h \ + $(top_srcdir)/include/sharefs/*.h \ + $(top_srcdir)/include/sys/fm/*.h \ + $(top_srcdir)/include/sys/fs/*.h \ + $(top_srcdir)/include/sys/sysevent/*.h \ + $(top_srcdir)/include/sys/*.h $(top_srcdir)/include/util/*.h \ + $(top_srcdir)/include/vm/*.h all: all-am .SUFFIXES: diff --git a/lib/Makefile.in b/lib/Makefile.in index 201e20808..8c363b924 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -243,7 +243,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h +DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \ -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} diff --git a/module/Makefile.in b/module/Makefile.in index caa403228..70a33ec14 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -12,23 +12,23 @@ clean: if [ -f Module.markers ]; then $(RM) Module.markers; fi modules_install: - # Install the kernel modules + @# Install the kernel modules $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ INSTALL_MOD_PATH=$(DESTDIR) \ INSTALL_MOD_DIR=addon/spl $@ - find ${DESTDIR}/lib/modules/ -name 'modules.*' | xargs ${RM} - sysmap=${DESTDIR}/boot/System.map-@LINUX_VERSION@; \ + find $(DESTDIR)/lib/modules/ -name 'modules.*' | xargs $(RM) + sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ if [ -f $$sysmap ]; then \ depmod -ae -F $$sysmap @LINUX_VERSION@; \ fi modules_uninstall: - # Uninstall the kernel modules - $(RM) -R ${DESTDIR}/lib/modules/@LINUX_VERSION@/addon/spl + @# Uninstall the kernel modules + $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/spl distdir: list='$(subdir-m)'; for subdir in $$list; do \ - (find $$subdir -name '*.c' -o -name '*.h' | \ + (find @top_srcdir@/module/$$subdir -name '*.c' -o -name '*.h' |\ xargs /bin/cp -t $$distdir/$$subdir); \ done diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index ad29af406..5ee9b0167 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -1,26 +1,28 @@ # Makefile.in for spl kernel module MODULES := spl -EXTRA_CFLAGS = @KERNELCPPFLAGS@ +EXTRA_CFLAGS = @KERNELCPPFLAGS@ +EXTRA_CFLAGS += -I@abs_top_srcdir@/include +EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h # Solaris porting layer module obj-m := spl.o -spl-objs += spl-debug.o -spl-objs += spl-proc.o -spl-objs += spl-kmem.o -spl-objs += spl-thread.o -spl-objs += spl-taskq.o -spl-objs += spl-rwlock.o -spl-objs += spl-vnode.o -spl-objs += spl-err.o -spl-objs += spl-time.o -spl-objs += spl-kobj.o -spl-objs += spl-module.o -spl-objs += spl-generic.o -spl-objs += spl-atomic.o -spl-objs += spl-mutex.o -spl-objs += spl-kstat.o -spl-objs += spl-condvar.o -spl-objs += spl-xdr.o -spl-objs += spl-cred.o +spl-objs += @top_srcdir@/module/spl/spl-debug.o +spl-objs += @top_srcdir@/module/spl/spl-proc.o +spl-objs += @top_srcdir@/module/spl/spl-kmem.o +spl-objs += @top_srcdir@/module/spl/spl-thread.o +spl-objs += @top_srcdir@/module/spl/spl-taskq.o +spl-objs += @top_srcdir@/module/spl/spl-rwlock.o +spl-objs += @top_srcdir@/module/spl/spl-vnode.o +spl-objs += @top_srcdir@/module/spl/spl-err.o +spl-objs += @top_srcdir@/module/spl/spl-time.o +spl-objs += @top_srcdir@/module/spl/spl-kobj.o +spl-objs += @top_srcdir@/module/spl/spl-module.o +spl-objs += @top_srcdir@/module/spl/spl-generic.o +spl-objs += @top_srcdir@/module/spl/spl-atomic.o +spl-objs += @top_srcdir@/module/spl/spl-mutex.o +spl-objs += @top_srcdir@/module/spl/spl-kstat.o +spl-objs += @top_srcdir@/module/spl/spl-condvar.o +spl-objs += @top_srcdir@/module/spl/spl-xdr.o +spl-objs += @top_srcdir@/module/spl/spl-cred.o diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index 2f63b458a..724f824d5 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -2,22 +2,24 @@ MODULES := splat EXTRA_CFLAGS = @KERNELCPPFLAGS@ +EXTRA_CFLAGS += -I@abs_top_srcdir@/include +EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h # Solaris Porting LAyer Tests obj-m := splat.o -splat-objs += splat-ctl.o -splat-objs += splat-kmem.o -splat-objs += splat-taskq.o -splat-objs += splat-random.o -splat-objs += splat-mutex.o -splat-objs += splat-condvar.o -splat-objs += splat-thread.o -splat-objs += splat-rwlock.o -splat-objs += splat-time.o -splat-objs += splat-vnode.o -splat-objs += splat-kobj.o -splat-objs += splat-atomic.o -splat-objs += splat-list.o -splat-objs += splat-generic.o -splat-objs += splat-cred.o +splat-objs += @top_srcdir@/module/splat/splat-ctl.o +splat-objs += @top_srcdir@/module/splat/splat-kmem.o +splat-objs += @top_srcdir@/module/splat/splat-taskq.o +splat-objs += @top_srcdir@/module/splat/splat-random.o +splat-objs += @top_srcdir@/module/splat/splat-mutex.o +splat-objs += @top_srcdir@/module/splat/splat-condvar.o +splat-objs += @top_srcdir@/module/splat/splat-thread.o +splat-objs += @top_srcdir@/module/splat/splat-rwlock.o +splat-objs += @top_srcdir@/module/splat/splat-time.o +splat-objs += @top_srcdir@/module/splat/splat-vnode.o +splat-objs += @top_srcdir@/module/splat/splat-kobj.o +splat-objs += @top_srcdir@/module/splat/splat-atomic.o +splat-objs += @top_srcdir@/module/splat/splat-list.o +splat-objs += @top_srcdir@/module/splat/splat-generic.o +splat-objs += @top_srcdir@/module/splat/splat-cred.o diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 949d77bdb..33700ee44 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,4 @@ EXTRA_DIST = check.sh check: - ./check.sh + $(top_srcdir)/scripts/check.sh diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 4e706159a..07d181c52 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -392,7 +392,7 @@ uninstall-am: check: - ./check.sh + $(top_srcdir)/scripts/check.sh # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. From 4bc4f6d854ed783dcd40d4dc95f3f862ba063774 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 14 Sep 2010 15:54:15 -0700 Subject: [PATCH 0449/1062] Reference new zfsonlinux.org website The wiki contents have been converted to html and made available at their new home http://zfsonlinux.org. The wiki has also been disabled the html pages are now the official documentation. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 233c4007f..60154f784 100644 --- a/README.markdown +++ b/README.markdown @@ -12,4 +12,4 @@ $ ./configure $ make pkg Full documentation for building, configuring, and using the SPL can -be found at: +be found at: From d5fcc5f51c9c3f65db5d521c53b696c074b92247 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 15 Sep 2010 09:05:34 -0700 Subject: [PATCH 0450/1062] Fix markdown rendering These two lines were being rendered incorrectly on the GitHub site. To fix the issue there needs to be leading whitespace before each line to ensure each command is rendered on its own line. $ ./configure $ make pkg --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 60154f784..e0d8f76b6 100644 --- a/README.markdown +++ b/README.markdown @@ -8,8 +8,8 @@ primitives. To build packages for your distribution: -$ ./configure -$ make pkg + $ ./configure + $ make pkg Full documentation for building, configuring, and using the SPL can be found at: From a68d91d770c0d4b8b72d9d07e65a79f3f99f03c6 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Fri, 17 Sep 2010 16:03:15 -0700 Subject: [PATCH 0451/1062] atomic_*_*_nv() functions need to return the new value atomically. A local variable must be used for the return value to avoid a potential race once the spin lock is dropped. Signed-off-by: Ricardo M. Correia Signed-off-by: Brian Behlendorf --- include/sys/atomic.h | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 9348ab97e..1d1173894 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -93,41 +93,51 @@ atomic_sub_32(volatile uint32_t *target, int32_t delta) static __inline__ uint32_t atomic_inc_32_nv(volatile uint32_t *target) { + uint32_t nv; + spin_lock(&atomic32_lock); - (*target)++; + nv = ++(*target); spin_unlock(&atomic32_lock); - return *target; + return nv; } static __inline__ uint32_t atomic_dec_32_nv(volatile uint32_t *target) { + uint32_t nv; + spin_lock(&atomic32_lock); - (*target)--; + nv = --(*target); spin_unlock(&atomic32_lock); - return *target; + return nv; } static __inline__ uint32_t atomic_add_32_nv(volatile uint32_t *target, uint32_t delta) { + uint32_t nv; + spin_lock(&atomic32_lock); *target += delta; + nv = *target; spin_unlock(&atomic32_lock); - return *target; + return nv; } static __inline__ uint32_t atomic_sub_32_nv(volatile uint32_t *target, uint32_t delta) { + uint32_t nv; + spin_lock(&atomic32_lock); *target -= delta; + nv = *target; spin_unlock(&atomic32_lock); - return *target; + return nv; } static __inline__ uint32_t @@ -181,41 +191,51 @@ atomic_sub_64(volatile uint64_t *target, uint64_t delta) static __inline__ uint64_t atomic_inc_64_nv(volatile uint64_t *target) { + uint64_t nv; + spin_lock(&atomic64_lock); - (*target)++; + nv = ++(*target); spin_unlock(&atomic64_lock); - return *target; + return nv; } static __inline__ uint64_t atomic_dec_64_nv(volatile uint64_t *target) { + uint64_t nv; + spin_lock(&atomic64_lock); - (*target)--; + nv = --(*target); spin_unlock(&atomic64_lock); - return *target; + return nv; } static __inline__ uint64_t atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) { + uint64_t nv; + spin_lock(&atomic64_lock); *target += delta; + nv = *target; spin_unlock(&atomic64_lock); - return *target; + return nv; } static __inline__ uint64_t atomic_sub_64_nv(volatile uint64_t *target, uint64_t delta) { + uint64_t nv; + spin_lock(&atomic64_lock); *target -= delta; + nv = *target; spin_unlock(&atomic64_lock); - return *target; + return nv; } static __inline__ uint64_t From 23aa63cbf5e712493d9439f888e426f89bb97857 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 Oct 2010 14:16:43 -0700 Subject: [PATCH 0452/1062] Fix 2.6.35 shrinker callback API change As of linux-2.6.35 the shrinker callback API now takes an additional argument. The shrinker struct is passed to the callback so that users can embed the shrinker structure in private data and use container_of() to access it. This removes the need to always use global state for the shrinker. To handle this we add the SPL_AC_3ARGS_SHRINKER_CALLBACK autoconf check to properly detect the API. Then we simply setup a callback function with the correct number of arguments. For now we do not make use of the new 3rd argument. --- config/spl-build.m4 | 29 +++++++++ configure | 146 ++++++++++++++++++++++++++++++++++++++++++ module/spl/spl-kmem.c | 21 +++++- spl_config.h.in | 3 + 4 files changed, 196 insertions(+), 3 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index dffa03655..ec7bda776 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -27,6 +27,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SET_SHRINKER + SPL_AC_3ARGS_SHRINKER_CALLBACK SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED @@ -761,6 +762,34 @@ AC_DEFUN([SPL_AC_SET_SHRINKER], [ ]) ]) +dnl # +dnl # 2.6.35 API change, +dnl # Add context to shrinker callback +dnl # +AC_DEFUN([SPL_AC_3ARGS_SHRINKER_CALLBACK], + [AC_MSG_CHECKING([whether shrinker callback wants 3 args]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + + int shrinker_cb(struct shrinker *, int, unsigned int); + ],[ + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1, + [shrinker callback wants 3 args]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + dnl # dnl # 2.6.25 API change, dnl # struct path entry added to struct nameidata diff --git a/configure b/configure index 5784ec75c..1a3b37688 100755 --- a/configure +++ b/configure @@ -12380,6 +12380,79 @@ fi + { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5 +$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + + int shrinker_cb(struct shrinker *, int, unsigned int); + +int +main (void) +{ + + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_SHRINKER_CALLBACK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 $as_echo_n "checking whether struct path used in struct nameidata... " >&6; } @@ -15929,6 +16002,79 @@ fi + { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5 +$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + + int shrinker_cb(struct shrinker *, int, unsigned int); + +int +main (void) +{ + + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_SHRINKER_CALLBACK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 $as_echo_n "checking whether struct path used in struct nameidata... " >&6; } diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index aefa00fa6..1a9c1fe96 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -817,13 +817,18 @@ static int spl_cache_flush(spl_kmem_cache_t *skc, #ifdef HAVE_SET_SHRINKER static struct shrinker *spl_kmem_cache_shrinker; #else -static int spl_kmem_cache_generic_shrinker(int nr_to_scan, - unsigned int gfp_mask); +# ifdef HAVE_3ARGS_SHRINKER_CALLBACK +static int spl_kmem_cache_generic_shrinker(struct shrinker *shrinker_cb, + int nr_to_scan, unsigned int gfp_mask); +# else +static int spl_kmem_cache_generic_shrinker( + int nr_to_scan, unsigned int gfp_mask); +# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ static struct shrinker spl_kmem_cache_shrinker = { .shrink = spl_kmem_cache_generic_shrinker, .seeks = KMC_DEFAULT_SEEKS, }; -#endif +#endif /* HAVE_SET_SHRINKER */ static void * kv_alloc(spl_kmem_cache_t *skc, int size, int flags) @@ -1829,8 +1834,14 @@ EXPORT_SYMBOL(spl_kmem_cache_free); * objects should be freed, because Solaris semantics are to free * all available objects we may free more objects than requested. */ +#ifdef HAVE_3ARGS_SHRINKER_CALLBACK +static int +spl_kmem_cache_generic_shrinker(struct shrinker *shrinker_cb, + int nr_to_scan, unsigned int gfp_mask) +#else static int spl_kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) +#endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ { spl_kmem_cache_t *skc; int unused = 0; @@ -1894,7 +1905,11 @@ EXPORT_SYMBOL(spl_kmem_cache_reap_now); void spl_kmem_reap(void) { +#ifdef HAVE_3ARGS_SHRINKER_CALLBACK + spl_kmem_cache_generic_shrinker(NULL, KMC_REAP_CHUNK, GFP_KERNEL); +#else spl_kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); +#endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ } EXPORT_SYMBOL(spl_kmem_reap); diff --git a/spl_config.h.in b/spl_config.h.in index d3928f4ba..2a08694c9 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -27,6 +27,9 @@ /* on_each_cpu wants 3 args */ #undef HAVE_3ARGS_ON_EACH_CPU +/* shrinker callback wants 3 args */ +#undef HAVE_3ARGS_SHRINKER_CALLBACK + /* vfs_rename() wants 4 args */ #undef HAVE_4ARGS_VFS_RENAME From 8294c69bb759d2a4dc2e73f164cb37c297722ada Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 3 Nov 2010 15:56:53 -0700 Subject: [PATCH 0453/1062] Clear owner after dropping mutex It's important to clear mp->owner after calling mutex_unlock() because when CONFIG_DEBUG_MUTEXES is defined the mutex owner is verified in mutex_unlock(). If we set it to NULL this check fails and the lockdep support is immediately disabled. --- include/sys/mutex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 97f49cb2a..1a8b25813 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -81,8 +81,8 @@ mutex_owned(kmutex_t *mp) #ifdef CONFIG_DEBUG_MUTEXES # define mutex_exit(mp) \ ({ \ - (mp)->owner = NULL; \ - mutex_unlock(mp); \ + mutex_unlock(mp); \ + (mp)->owner = NULL; \ }) #else # define mutex_exit(mp) mutex_unlock(mp) From c11908c75d72d291ea451fb2c35f05dafc8c9647 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 5 Nov 2010 11:52:46 -0700 Subject: [PATCH 0454/1062] Prep for 0.5.2 tag Update META file to prep for 0.5.2 tag. --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index a0f42b957..71ed8b742 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.5.1 +Version: 0.5.2 Release: 1 Release-Tags: relext From 1e18307b6109a5b2491cd519a312b870b2e7522b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 8 Nov 2010 21:32:47 -0800 Subject: [PATCH 0455/1062] Fix incorrect krw_type_t type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flagged by the default compile options on archlinux 2010.05, we should be using the krw_t type not the krw_type_t type in the private data. module/splat/splat-rwlock.c: In function ‘splat_rwlock_test4_func’: module/splat/splat-rwlock.c:432:6: warning: case value ‘1’ not in enumerated type ‘krw_type_t’ --- module/splat/splat-rwlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index dc560c2b9..2b9dee939 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -73,7 +73,7 @@ typedef struct rw_priv { int rw_waiters; int rw_release; int rw_rc; - krw_type_t rw_type; + krw_t rw_type; } rw_priv_t; typedef struct rw_thr { From a50cede3880ca0f7f7f10acc01bebd8617fc48ad Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 9 Nov 2010 10:34:10 -0800 Subject: [PATCH 0456/1062] Linux 2.6.36 compat, wrap RLIM64_INFINITY As of linux-2.6.36 RLIM64_INFINITY is defined in linux/resource.h. This is handled by conditionally defining RLIM64_INFINITY in the SPL only when the kernel does not provide it. --- include/sys/sysmacros.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index d9647b3cd..210dfb5c5 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -83,8 +83,9 @@ #define _NOTE(x) #define is_system_labeled() 0 - -#define RLIM64_INFINITY RLIM_INFINITY +#ifndef RLIM64_INFINITY +#define RLIM64_INFINITY (~0ULL) +#endif /* 0..MAX_PRIO-1: Process priority * 0..MAX_RT_PRIO-1: RT priority tasks From 9b2048c26b2579f2de40a185dc56261dd98e7ea3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 9 Nov 2010 11:15:32 -0800 Subject: [PATCH 0457/1062] Linux 2.6.36 compat, fs_struct->lock type change In the linux-2.6.36 kernel the fs_struct lock was changed from a rwlock_t to a spinlock_t. If the kernel would export the set_fs_pwd() symbol by default this would not have caused us any issues, but they don't. So we're forced to add a new autoconf check which sets the HAVE_FS_STRUCT_SPINLOCK define when a spinlock_t is used. We can then correctly use either spin_lock or write_lock in our custom set_fs_pwd() implementation. --- config/spl-build.m4 | 23 +++++++ configure | 134 +++++++++++++++++++++++++++++++++++++++++ module/spl/spl-vnode.c | 24 +++++--- spl_config.h.in | 3 + 4 files changed, 176 insertions(+), 8 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ec7bda776..c18db70df 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -66,6 +66,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_SET_FS_PWD SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME + SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_CRED_STRUCT SPL_AC_GROUPS_SEARCH SPL_AC_PUT_TASK_STRUCT @@ -1547,6 +1548,28 @@ AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME], ]) ]) +dnl # +dnl # 2.6.36 API change, +dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to +dnl # a spinlock_t to improve the fastpath performance. +dnl # +AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [ + AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + struct fs_struct fs; + spin_lock_init(&fs.lock); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FS_STRUCT_SPINLOCK, 1, + [struct fs_struct uses spinlock_t]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.29 API change, dnl # check whether 'struct cred' exists diff --git a/configure b/configure index 1a3b37688..189f0f9dc 100755 --- a/configure +++ b/configure @@ -14903,6 +14903,73 @@ fi + { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 +$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + struct fs_struct fs; + spin_lock_init(&fs.lock); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FS_STRUCT_SPINLOCK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 $as_echo_n "checking whether struct cred exists... " >&6; } @@ -18525,6 +18592,73 @@ fi + { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 +$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + struct fs_struct fs; + spin_lock_init(&fs.lock); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FS_STRUCT_SPINLOCK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 $as_echo_n "checking whether struct cred exists... " >&6; } diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 29028c3c0..5c64f05fb 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -617,16 +617,24 @@ EXPORT_SYMBOL(releasef); void set_fs_pwd(struct fs_struct *fs, struct path *path) { - struct path old_pwd; + struct path old_pwd; - write_lock(&fs->lock); - old_pwd = fs->pwd; - fs->pwd = *path; - path_get(path); - write_unlock(&fs->lock); +# ifdef HAVE_FS_STRUCT_SPINLOCK + spin_lock(&fs->lock); + old_pwd = fs->pwd; + fs->pwd = *path; + path_get(path); + spin_unlock(&fs->lock); +# else + write_lock(&fs->lock); + old_pwd = fs->pwd; + fs->pwd = *path; + path_get(path); + write_unlock(&fs->lock); +# endif /* HAVE_FS_STRUCT_SPINLOCK */ - if (old_pwd.dentry) - path_put(&old_pwd); + if (old_pwd.dentry) + path_put(&old_pwd); } # else /* Used from 2.6.11 - 2.6.24 */ diff --git a/spl_config.h.in b/spl_config.h.in index 2a08694c9..7863f7b3c 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -78,6 +78,9 @@ /* fls64() is available */ #undef HAVE_FLS64 +/* struct fs_struct uses spinlock_t */ +#undef HAVE_FS_STRUCT_SPINLOCK + /* get_vmalloc_info() is available */ #undef HAVE_GET_VMALLOC_INFO From 8655ce492fff8ebcc432cd841411634510ca09ac Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 10 Nov 2010 12:58:07 -0800 Subject: [PATCH 0458/1062] Linux 2.6.36 compat, use fops->unlocked_ioctl() As of linux-2.6.36 the last in-tree consumer of fops->ioctl() has been removed and thus fops()->ioctl() has also been removed. The replacement hook is fops->unlocked_ioctl() which has existed in kernel since 2.6.12. Since the SPL only contains support back to 2.6.18 vintage kernels, I'm not adding an autoconf check for this and simply moving everything to use fops->unlocked_ioctl(). --- module/spl/spl-module.c | 11 ++++++----- module/splat/splat-ctl.c | 9 ++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index ee6bd696a..3b5161b6d 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -53,10 +53,11 @@ out: return di; } -static int -mod_generic_ioctl(struct inode *ino, struct file *file, - unsigned int cmd, unsigned long arg) +static long +mod_generic_unlocked_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) { + struct inode *ino = file->f_dentry->d_inode; struct dev_info *di; int rc, flags = 0, rvalp = 0; cred_t *cr = NULL; @@ -84,7 +85,7 @@ static long mod_generic_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - return mod_generic_ioctl(file->f_dentry->d_inode, file, cmd, arg); + return mod_generic_unlocked_ioctl(file, cmd, arg); } #endif /* CONFIG_COMPAT */ @@ -125,7 +126,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, /* Setup the fops to cb_ops mapping */ fops->owner = mod; if (cb_ops->cb_ioctl) { - fops->ioctl = mod_generic_ioctl; + fops->unlocked_ioctl = mod_generic_unlocked_ioctl; #ifdef CONFIG_COMPAT fops->compat_ioctl = mod_generic_compat_ioctl; #endif diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index ba68de212..de72b805f 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -445,9 +445,8 @@ splat_ioctl_cmd(struct file *file, unsigned int cmd, unsigned long arg) return rc; } -static int -splat_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static long +splat_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { unsigned int minor = iminor(file->f_dentry->d_inode); int rc = 0; @@ -480,7 +479,7 @@ splat_ioctl(struct inode *inode, struct file *file, static long splat_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - return splat_ioctl(NULL, file, cmd, arg); + return splat_unlocked_ioctl(file, cmd, arg); } #endif /* CONFIG_COMPAT */ @@ -601,7 +600,7 @@ static struct file_operations splat_fops = { .owner = THIS_MODULE, .open = splat_open, .release = splat_release, - .ioctl = splat_ioctl, + .unlocked_ioctl = splat_unlocked_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = splat_compat_ioctl, #endif From 00ba7ef9002a7dc7919260240f58fd8f31cea24f Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Tue, 9 Nov 2010 14:06:13 -0800 Subject: [PATCH 0459/1062] Give ENOTSUP a valid user space error value The ZFS module returns ENOTSUP for several error conditions where an operation is not (yet) supported. The SPL defined ENOTSUP in terms of ENOTSUPP, but that is an internal Linux kernel error code that should not be seen by user programs. As a result the zfs utilities print a confusing error message if an unsupported operation is attempted: internal error: Unknown error 524 Aborted This change defines ENOTSUP in terms of EOPNOTSUPP which is consistent with user space. Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 210dfb5c5..35f7cb5c1 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -60,7 +60,7 @@ #define UINT64_MIN ULLONG_MIN #define NBBY 8 -#define ENOTSUP ENOTSUPP +#define ENOTSUP EOPNOTSUPP #define MAXMSGLEN 256 #define MAXNAMELEN 256 From 058de03caaefe63086559662f2abaed1edf0e086 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Nov 2010 10:56:55 -0800 Subject: [PATCH 0460/1062] Clear cv->cv_mutex when not in use For debugging purposes the condition varaibles keep track of the mutex used during a wait. The idea is to validate that all callers always use the same mutex. Unfortunately, we have seen cases where the caller reuses the condition variable with a different mutex but in a way which is known to be safe. My reading of the man pages suggests you should not do this and always cv_destroy()/cv_init() a new mutex. However, there is overhead in doing this and it does appear to be allowed under Solaris. To accomidate this behavior cv_wait_common() and __cv_timedwait() have been modified to clear the associated mutex when the last waiter is dropped. This ensures that while the condition variable is in use the incorrect mutex case is detected. It also allows the condition variable to be safely recycled without requiring the overhead of a cv_destroy()/cv_init() as long as it isn't currently in use. Finally, spin lock cv->cv_lock was removed because it is not required. When the condition variable is used properly the caller will always be holding the mutex so the spin lock is redundant. The lock was originally added because I expected to need to protect more than just the cv->cv_mutex. It turns out that was not the case. Signed-off-by: Brian Behlendorf --- include/sys/condvar.h | 1 - module/spl/spl-condvar.c | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index d854026ac..18e5a6fcf 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -44,7 +44,6 @@ typedef struct { wait_queue_head_t cv_event; atomic_t cv_waiters; kmutex_t *cv_mutex; - spinlock_t cv_lock; } kcondvar_t; typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 6b4512472..edf048bb7 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -46,7 +46,6 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) cvp->cv_magic = CV_MAGIC; init_waitqueue_head(&cvp->cv_event); - spin_lock_init(&cvp->cv_lock); atomic_set(&cvp->cv_waiters, 0); cvp->cv_mutex = NULL; cvp->cv_name = NULL; @@ -72,15 +71,14 @@ __cv_destroy(kcondvar_t *cvp) SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); - spin_lock(&cvp->cv_lock); + ASSERT(cvp->cv_mutex == NULL); ASSERT(atomic_read(&cvp->cv_waiters) == 0); ASSERT(!waitqueue_active(&cvp->cv_event)); if (cvp->cv_name) kmem_free(cvp->cv_name, cvp->cv_name_size); - spin_unlock(&cvp->cv_lock); - memset(cvp, CV_POISON, sizeof(*cvp)); + ASSERT3P(memset(cvp, CV_POISON, sizeof(*cvp)), ==, cvp); SEXIT; } EXPORT_SYMBOL(__cv_destroy); @@ -94,7 +92,6 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) ASSERT(cvp); ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); - spin_lock(&cvp->cv_lock); ASSERT(mutex_owned(mp)); if (cvp->cv_mutex == NULL) @@ -102,7 +99,6 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) /* Ensure the same mutex is used by all callers */ ASSERT(cvp->cv_mutex == mp); - spin_unlock(&cvp->cv_lock); prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); @@ -114,7 +110,10 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) schedule(); mutex_enter(mp); - atomic_dec(&cvp->cv_waiters); + /* No more waiters a different mutex could be used */ + if (atomic_dec_and_test(&cvp->cv_waiters)) + cvp->cv_mutex = NULL; + finish_wait(&cvp->cv_event, &wait); SEXIT; } @@ -146,7 +145,6 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) ASSERT(cvp); ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); - spin_lock(&cvp->cv_lock); ASSERT(mutex_owned(mp)); if (cvp->cv_mutex == NULL) @@ -154,7 +152,6 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) /* Ensure the same mutex is used by all callers */ ASSERT(cvp->cv_mutex == mp); - spin_unlock(&cvp->cv_lock); /* XXX - Does not handle jiffie wrap properly */ time_left = expire_time - jiffies; @@ -172,7 +169,10 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) time_left = schedule_timeout(time_left); mutex_enter(mp); - atomic_dec(&cvp->cv_waiters); + /* No more waiters a different mutex could be used */ + if (atomic_dec_and_test(&cvp->cv_waiters)) + cvp->cv_mutex = NULL; + finish_wait(&cvp->cv_event, &wait); SRETURN(time_left > 0 ? time_left : -1); From c2f997b0b3b9a79b7146c8883aa09326e5def253 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Mon, 22 Nov 2010 00:20:58 -0800 Subject: [PATCH 0461/1062] Make kmutex_t typesafe in all cases. When HAVE_MUTEX_OWNER and CONFIG_SMP are defined, kmutex_t is just a typedef for struct mutex. This is generally OK but has the downside that it can make mistakes such as mutex_lock(&kmutex_var) to pass by unnoticed until someone compiles the code without HAVE_MUTEX_OWNER or CONFIG_SMP (in which case kmutex_t is a real struct). Note that the correct API to call should have been mutex_enter() rather than mutex_lock(). We prevent these kind of mistakes by making kmutex_t a real structure with only one field. This makes kmutex_t typesafe and it shouldn't have any impact on the generated assembly code. Signed-off-by: Ricardo M. Correia Signed-off-by: Brian Behlendorf --- include/sys/mutex.h | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 1a8b25813..ebf9151f1 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -37,14 +37,20 @@ typedef enum { #if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) -typedef struct mutex kmutex_t; +/* + * We define a 1-field struct rather than a straight typedef to enforce type + * safety. + */ +typedef struct { + struct mutex m; +} kmutex_t; static inline kthread_t * mutex_owner(kmutex_t *mp) { - struct thread_info *owner; + struct thread_info *owner; - owner = ACCESS_ONCE(mp->owner); + owner = ACCESS_ONCE(mp->m.owner); if (owner) return owner->task; @@ -54,7 +60,7 @@ mutex_owner(kmutex_t *mp) static inline int mutex_owned(kmutex_t *mp) { - return (ACCESS_ONCE(mp->owner) == current_thread_info()); + return (ACCESS_ONCE(mp->m.owner) == current_thread_info()); } #define MUTEX_HELD(mp) mutex_owned(mp) @@ -65,31 +71,31 @@ mutex_owned(kmutex_t *mp) static struct lock_class_key __key; \ ASSERT(type == MUTEX_DEFAULT); \ \ - __mutex_init((mp), #mp, &__key); \ + __mutex_init(&(mp)->m, #mp, &__key); \ }) #undef mutex_destroy #define mutex_destroy(mp) \ ({ \ - VERIFY3P(mutex_owner(mp), ==, NULL); \ + VERIFY3P(mutex_owner(mp), ==, NULL); \ }) -#define mutex_tryenter(mp) mutex_trylock(mp) -#define mutex_enter(mp) mutex_lock(mp) +#define mutex_tryenter(mp) mutex_trylock(&(mp)->m) +#define mutex_enter(mp) mutex_lock(&(mp)->m) /* mutex->owner is not cleared when CONFIG_DEBUG_MUTEXES is set */ #ifdef CONFIG_DEBUG_MUTEXES # define mutex_exit(mp) \ ({ \ - mutex_unlock(mp); \ - (mp)->owner = NULL; \ + mutex_unlock(&(mp)->m); \ + (mp)->m.owner = NULL; \ }) #else -# define mutex_exit(mp) mutex_unlock(mp) +# define mutex_exit(mp) mutex_unlock(&(mp)->m) #endif /* CONFIG_DEBUG_MUTEXES */ #ifdef HAVE_GPL_ONLY_SYMBOLS -# define mutex_enter_nested(mp, sc) mutex_lock_nested(mp, sc) +# define mutex_enter_nested(mp, sc) mutex_lock_nested(&(mp)->m, sc) #else # define mutex_enter_nested(mp, sc) mutex_enter(mp) #endif /* HAVE_GPL_ONLY_SYMBOLS */ @@ -172,7 +178,7 @@ mutex_owner(kmutex_t *mp) #undef mutex_destroy #define mutex_destroy(mp) \ ({ \ - VERIFY3P(mutex_owner(mp), ==, NULL); \ + VERIFY3P(mutex_owner(mp), ==, NULL); \ }) #define mutex_tryenter(mp) \ From 8beea9ac2428bd3b4652e484f46726e0a261523a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Nov 2010 10:36:58 -0800 Subject: [PATCH 0462/1062] Refresh autogen.sh products Refresh the autogen.sh products based on the versions which are installed by default in the GA RHEL6.0 release. autoconf (GNU Autoconf) 2.63 automake (GNU automake) 1.11.1 ltmain.sh (GNU libtool) 2.2.6b --- config/ltmain.sh | 8 ++++---- configure | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/ltmain.sh b/config/ltmain.sh index 6939dcc4a..a72f2fd78 100755 --- a/config/ltmain.sh +++ b/config/ltmain.sh @@ -1,6 +1,6 @@ # Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6 +# ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6 +# $progname: (GNU libtool) 2.2.6b # automake: $automake_version # autoconf: $autoconf_version # @@ -73,9 +73,9 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=2.2.6 +VERSION=2.2.6b TIMESTAMP="" -package_revision=1.3012 +package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then diff --git a/configure b/configure index 189f0f9dc..7876f6a16 100755 --- a/configure +++ b/configure @@ -4166,8 +4166,8 @@ esac -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' From 9fe45dc1ac5d0292a69cc91f951b984f21ae0aaa Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Nov 2010 09:51:46 -0800 Subject: [PATCH 0463/1062] Add Thread Specific Data (TSD) Implementation Thread specific data has implemented using a hash table, this avoids the need to add a member to the task structure and allows maximum portability between kernels. This implementation has been optimized to keep the tsd_set() and tsd_get() times as small as possible. The majority of the entries in the hash table are for specific tsd entries. These entries are hashed by the product of their key and pid because by design the key and pid are guaranteed to be unique. Their product also has the desirable properly that it will be uniformly distributed over the hash bins providing neither the pid nor key is zero. Under linux the zero pid is always the init process and thus won't be used, and this implementation is careful to never to assign a zero key. By default the hash table is sized to 512 bins which is expected to be sufficient for light to moderate usage of thread specific data. The hash table contains two additional type of entries. They first type is entry is called a 'key' entry and it is added to the hash during tsd_create(). It is used to store the address of the destructor function and it is used as an anchor point. All tsd entries which use the same key will be linked to this entry. This is used during tsd_destory() to quickly call the destructor function for all tsd associated with the key. The 'key' entry may be looked up with tsd_hash_search() by passing the key you wish to lookup and DTOR_PID constant as the pid. The second type of entry is called a 'pid' entry and it is added to the hash the first time a process set a key. The 'pid' entry is also used as an anchor and all tsd for the process will be linked to it. This list is using during tsd_exit() to ensure all registered destructors are run for the process. The 'pid' entry may be looked up with tsd_hash_search() by passing the PID_KEY constant as the key, and the process pid. Note that tsd_exit() is called by thread_exit() so if your using the Solaris thread API you should not need to call tsd_exit() directly. --- include/spl-debug.h | 1 + include/sys/thread.h | 1 + include/sys/tsd.h | 45 +++ module/spl/Makefile.in | 1 + module/spl/spl-debug.c | 2 + module/spl/spl-generic.c | 13 +- module/spl/spl-thread.c | 2 + module/spl/spl-tsd.c | 638 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 700 insertions(+), 3 deletions(-) create mode 100644 include/sys/tsd.h create mode 100644 module/spl/spl-tsd.c diff --git a/include/spl-debug.h b/include/spl-debug.h index cf0d58cad..0028c29bd 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -63,6 +63,7 @@ #define SS_CRED 0x00010000 #define SS_KSTAT 0x00020000 #define SS_XDR 0x00040000 +#define SS_TSD 0x00080000 #define SS_USER1 0x01000000 #define SS_USER2 0x02000000 #define SS_USER3 0x04000000 diff --git a/include/sys/thread.h b/include/sys/thread.h index 06db6d4c9..c5f4234da 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -31,6 +31,7 @@ #include #include #include +#include /* * Thread interfaces diff --git a/include/sys/tsd.h b/include/sys/tsd.h new file mode 100644 index 000000000..56f3b4cd8 --- /dev/null +++ b/include/sys/tsd.h @@ -0,0 +1,45 @@ +/*****************************************************************************\ + * Copyright (C) 2010 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_TSD_H +#define _SPL_TSD_H + +#include + +#define TSD_HASH_TABLE_BITS_DEFAULT 9 +#define TSD_KEYS_MAX 32768 +#define DTOR_PID (PID_MAX_LIMIT+1) +#define PID_KEY (TSD_KEYS_MAX+1) + +typedef void (*dtor_func_t)(void *); + +extern int tsd_set(uint_t, void *); +extern void *tsd_get(uint_t); +extern void tsd_create(uint_t *, dtor_func_t); +extern void tsd_destroy(uint_t *); +extern void tsd_exit(void); + +int tsd_init(void); +void tsd_fini(void); + +#endif /* _SPL_TSD_H */ diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 5ee9b0167..483933b64 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -26,3 +26,4 @@ spl-objs += @top_srcdir@/module/spl/spl-kstat.o spl-objs += @top_srcdir@/module/spl/spl-condvar.o spl-objs += @top_srcdir@/module/spl/spl-xdr.o spl-objs += @top_srcdir@/module/spl/spl-cred.o +spl-objs += @top_srcdir@/module/spl/spl-tsd.o diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 008115e4e..2c76c7964 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -158,6 +158,8 @@ spl_debug_subsys2str(int subsys) return "kstat"; case SS_XDR: return "xdr"; + case SS_TSD: + return "tsd"; case SS_USER1: return "user1"; case SS_USER2: diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 57136cdd4..b83d753d8 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -467,20 +468,25 @@ __init spl_init(void) if ((rc = kstat_init())) SGOTO(out7, rc); + if ((rc = tsd_init())) + SGOTO(out8, rc); + if ((rc = set_hostid())) - SGOTO(out8, rc = -EADDRNOTAVAIL); + SGOTO(out9, rc = -EADDRNOTAVAIL); #ifndef HAVE_KALLSYMS_LOOKUP_NAME if ((rc = set_kallsyms_lookup_name())) - SGOTO(out8, rc = -EADDRNOTAVAIL); + SGOTO(out9, rc = -EADDRNOTAVAIL); #endif /* HAVE_KALLSYMS_LOOKUP_NAME */ if ((rc = spl_kmem_init_kallsyms_lookup())) - SGOTO(out8, rc); + SGOTO(out9, rc); printk(KERN_NOTICE "SPL: Loaded Solaris Porting Layer v%s%s\n", SPL_META_VERSION, SPL_DEBUG_STR); SRETURN(rc); +out9: + tsd_fini(); out8: kstat_fini(); out7: @@ -510,6 +516,7 @@ spl_fini(void) printk(KERN_NOTICE "SPL: Unloaded Solaris Porting Layer v%s%s\n", SPL_META_VERSION, SPL_DEBUG_STR); + tsd_fini(); kstat_fini(); proc_fini(); vn_fini(); diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 5de12ac33..b1aa8119b 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -26,6 +26,7 @@ #include #include +#include #include #ifdef SS_DEBUG_SUBSYS @@ -74,6 +75,7 @@ __thread_exit(void) { SENTRY; SEXIT; + tsd_exit(); complete_and_exit(NULL, 0); /* Unreachable */ } diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c new file mode 100644 index 000000000..0581e1b2e --- /dev/null +++ b/module/spl/spl-tsd.c @@ -0,0 +1,638 @@ +/*****************************************************************************\ + * Copyright (C) 2010 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Thread Specific Data Implementation. + * + * Thread specific data has implemented using a hash table, this avoids + * the need to add a member to the task structure and allows maximum + * portability between kernels. This implementation has been optimized + * to keep the tsd_set() and tsd_get() times as small as possible. + * + * The majority of the entries in the hash table are for specific tsd + * entries. These entries are hashed by the product of their key and + * pid because by design the key and pid are guaranteed to be unique. + * Their product also has the desirable properly that it will be uniformly + * distributed over the hash bins providing neither the pid nor key is zero. + * Under linux the zero pid is always the init process and thus won't be + * used, and this implementation is careful to never to assign a zero key. + * By default the hash table is sized to 512 bins which is expected to + * be sufficient for light to moderate usage of thread specific data. + * + * The hash table contains two additional type of entries. They first + * type is entry is called a 'key' entry and it is added to the hash during + * tsd_create(). It is used to store the address of the destructor function + * and it is used as an anchor point. All tsd entries which use the same + * key will be linked to this entry. This is used during tsd_destory() to + * quickly call the destructor function for all tsd associated with the key. + * The 'key' entry may be looked up with tsd_hash_search() by passing the + * key you wish to lookup and DTOR_PID constant as the pid. + * + * The second type of entry is called a 'pid' entry and it is added to the + * hash the first time a process set a key. The 'pid' entry is also used + * as an anchor and all tsd for the process will be linked to it. This + * list is using during tsd_exit() to ensure all registered destructors + * are run for the process. The 'pid' entry may be looked up with + * tsd_hash_search() by passing the PID_KEY constant as the key, and + * the process pid. Note that tsd_exit() is called by thread_exit() + * so if your using the Solaris thread API you should not need to call + * tsd_exit() directly. + * +\*****************************************************************************/ + +#include +#include +#include +#include + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM SS_TSD +#define DEBUG_SUBSYSTEM SS_TSD + +typedef struct tsd_hash_bin { + spinlock_t hb_lock; + struct hlist_head hb_head; +} tsd_hash_bin_t; + +typedef struct tsd_hash_table { + spinlock_t ht_lock; + uint_t ht_bits; + uint_t ht_key; + tsd_hash_bin_t *ht_bins; +} tsd_hash_table_t; + +typedef struct tsd_hash_entry { + uint_t he_key; + pid_t he_pid; + dtor_func_t he_dtor; + void *he_value; + struct hlist_node he_list; + struct list_head he_key_list; + struct list_head he_pid_list; +} tsd_hash_entry_t; + +static tsd_hash_table_t *tsd_hash_table = NULL; + + +/* + * tsd_hash_search - searches hash table for tsd_hash_entry + * @table: hash table + * @key: search key + * @pid: search pid + */ +static tsd_hash_entry_t * +tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid) +{ + struct hlist_node *node; + tsd_hash_entry_t *entry; + tsd_hash_bin_t *bin; + ulong_t hash; + SENTRY; + + hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); + bin = &table->ht_bins[hash]; + spin_lock(&bin->hb_lock); + hlist_for_each_entry(entry, node, &bin->hb_head, he_list) { + if ((entry->he_key == key) && (entry->he_pid == pid)) { + spin_unlock(&bin->hb_lock); + SRETURN(entry); + } + } + + spin_unlock(&bin->hb_lock); + SRETURN(NULL); +} + +/* + * tsd_hash_dtor - call the destructor and free all entries on the list + * @work: list of hash entries + * + * For a list of entries which have all already been removed from the + * hash call their registered destructor then free the associated memory. + */ +static void +tsd_hash_dtor(struct hlist_head *work) +{ + tsd_hash_entry_t *entry; + SENTRY; + + while (!hlist_empty(work)) { + entry = hlist_entry(work->first, tsd_hash_entry_t, he_list); + hlist_del(&entry->he_list); + + if (entry->he_dtor && entry->he_pid != DTOR_PID) + entry->he_dtor(entry->he_value); + + kmem_free(entry, sizeof(tsd_hash_entry_t)); + } + + SEXIT; +} + +/* + * tsd_hash_add - adds an entry to hash table + * @table: hash table + * @key: search key + * @pid: search pid + * + * The caller is responsible for ensuring the unique key/pid do not + * already exist in the hash table. This possible because all entries + * are thread specific thus a concurrent thread will never attempt to + * add this key/pid. Because multiple bins must be checked to add + * links to the dtor and pid entries the entire table is locked. + */ +static int +tsd_hash_add(tsd_hash_table_t *table, uint_t key, pid_t pid, void *value) +{ + tsd_hash_entry_t *entry, *dtor_entry, *pid_entry; + tsd_hash_bin_t *bin; + ulong_t hash; + int rc = 0; + SENTRY; + + ASSERT3P(tsd_hash_search(table, key, pid), ==, NULL); + + /* New entry allocate structure, set value, and add to hash */ + entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_SLEEP); + if (entry == NULL) + SRETURN(ENOMEM); + + entry->he_key = key; + entry->he_pid = pid; + entry->he_value = value; + INIT_HLIST_NODE(&entry->he_list); + INIT_LIST_HEAD(&entry->he_key_list); + INIT_LIST_HEAD(&entry->he_pid_list); + + spin_lock(&table->ht_lock); + + /* Destructor entry must exist for all valid keys */ + dtor_entry = tsd_hash_search(table, entry->he_key, DTOR_PID); + ASSERT3P(dtor_entry, !=, NULL); + entry->he_dtor = dtor_entry->he_dtor; + + /* Process entry must exist for all valid processes */ + pid_entry = tsd_hash_search(table, PID_KEY, entry->he_pid); + ASSERT3P(pid_entry, !=, NULL); + + hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); + bin = &table->ht_bins[hash]; + spin_lock(&bin->hb_lock); + + /* Add to the hash, key, and pid lists */ + hlist_add_head(&entry->he_list, &bin->hb_head); + list_add(&entry->he_key_list, &dtor_entry->he_key_list); + list_add(&entry->he_pid_list, &pid_entry->he_pid_list); + + spin_unlock(&bin->hb_lock); + spin_unlock(&table->ht_lock); + + SRETURN(rc); +} + +/* + * tsd_hash_add_key - adds a destructor entry to the hash table + * @table: hash table + * @keyp: search key + * @dtor: key destructor + * + * For every unique key there is a single entry in the hash which is used + * as anchor. All other thread specific entries for this key are linked + * to this anchor via the 'he_key_list' list head. On return they keyp + * will be set to the next available key for the hash table. + */ +static int +tsd_hash_add_key(tsd_hash_table_t *table, uint_t *keyp, dtor_func_t dtor) +{ + tsd_hash_entry_t *tmp_entry, *entry; + tsd_hash_bin_t *bin; + ulong_t hash; + int keys_checked = 0; + SENTRY; + + ASSERT3P(table, !=, NULL); + + /* Allocate entry to be used as a destructor for this key */ + entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_SLEEP); + if (entry == NULL) + SRETURN(ENOMEM); + + /* Determine next available key value */ + spin_lock(&table->ht_lock); + do { + /* Limited to TSD_KEYS_MAX concurrent unique keys */ + if (table->ht_key++ > TSD_KEYS_MAX) + table->ht_key = 1; + + /* Ensure failure when all TSD_KEYS_MAX keys are in use */ + if (keys_checked++ >= TSD_KEYS_MAX) { + spin_unlock(&table->ht_lock); + SRETURN(ENOENT); + } + + tmp_entry = tsd_hash_search(table, table->ht_key, DTOR_PID); + } while (tmp_entry); + + /* Add destructor entry in to hash table */ + entry->he_key = *keyp = table->ht_key; + entry->he_pid = DTOR_PID; + entry->he_dtor = dtor; + entry->he_value = NULL; + INIT_HLIST_NODE(&entry->he_list); + INIT_LIST_HEAD(&entry->he_key_list); + INIT_LIST_HEAD(&entry->he_pid_list); + + hash = hash_long((ulong_t)*keyp * (ulong_t)DTOR_PID, table->ht_bits); + bin = &table->ht_bins[hash]; + spin_lock(&bin->hb_lock); + + hlist_add_head(&entry->he_list, &bin->hb_head); + + spin_unlock(&bin->hb_lock); + spin_unlock(&table->ht_lock); + + SRETURN(0); +} + +/* + * tsd_hash_add_pid - adds a process entry to the hash table + * @table: hash table + * @pid: search pid + * + * For every process these is a single entry in the hash which is used + * as anchor. All other thread specific entries for this process are + * linked to this anchor via the 'he_pid_list' list head. + */ +static int +tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid) +{ + tsd_hash_entry_t *entry; + tsd_hash_bin_t *bin; + ulong_t hash; + SENTRY; + + /* Allocate entry to be used as the process reference */ + entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_SLEEP); + if (entry == NULL) + SRETURN(ENOMEM); + + spin_lock(&table->ht_lock); + entry->he_key = PID_KEY; + entry->he_pid = pid; + entry->he_dtor = NULL; + entry->he_value = NULL; + INIT_HLIST_NODE(&entry->he_list); + INIT_LIST_HEAD(&entry->he_key_list); + INIT_LIST_HEAD(&entry->he_pid_list); + + hash = hash_long((ulong_t)PID_KEY * (ulong_t)pid, table->ht_bits); + bin = &table->ht_bins[hash]; + spin_lock(&bin->hb_lock); + + hlist_add_head(&entry->he_list, &bin->hb_head); + + spin_unlock(&bin->hb_lock); + spin_unlock(&table->ht_lock); + + SRETURN(0); +} + +/* + * tsd_hash_del - delete an entry from hash table, key, and pid lists + * @table: hash table + * @key: search key + * @pid: search pid + */ +static void +tsd_hash_del(tsd_hash_table_t *table, tsd_hash_entry_t *entry) +{ + SENTRY; + + ASSERT(spin_is_locked(&table->ht_lock)); + hlist_del(&entry->he_list); + list_del_init(&entry->he_key_list); + list_del_init(&entry->he_pid_list); + + SEXIT; +} + +/* + * tsd_hash_table_init - allocate a hash table + * @bits: hash table size + * + * A hash table with 2^bits bins will be created, it may not be resized + * after the fact and must be free'd with tsd_hash_table_fini(). + */ +static tsd_hash_table_t * +tsd_hash_table_init(uint_t bits) +{ + tsd_hash_table_t *table; + int hash, size = (1 << bits); + SENTRY; + + table = kmem_zalloc(sizeof(tsd_hash_table_t), KM_SLEEP); + if (table == NULL) + SRETURN(NULL); + + table->ht_bins = kmem_zalloc(sizeof(tsd_hash_bin_t) * size, KM_SLEEP); + if (table->ht_bins == NULL) { + kmem_free(table, sizeof(tsd_hash_table_t)); + SRETURN(NULL); + } + + for (hash = 0; hash < size; hash++) { + spin_lock_init(&table->ht_bins[hash].hb_lock); + INIT_HLIST_HEAD(&table->ht_bins[hash].hb_head); + } + + spin_lock_init(&table->ht_lock); + table->ht_bits = bits; + table->ht_key = 1; + + SRETURN(table); +} + +/* + * tsd_hash_table_fini - free a hash table + * @table: hash table + * + * Free a hash table allocated by tsd_hash_table_init(). If the hash + * table is not empty this function will call the proper destructor for + * all remaining entries before freeing the memory used by those entries. + */ +static void +tsd_hash_table_fini(tsd_hash_table_t *table) +{ + HLIST_HEAD(work); + tsd_hash_bin_t *bin; + tsd_hash_entry_t *entry; + int size, i; + SENTRY; + + ASSERT3P(table, !=, NULL); + spin_lock(&table->ht_lock); + for (i = 0, size = (1 << table->ht_bits); i < size; i++) { + bin = &table->ht_bins[i]; + spin_lock(&bin->hb_lock); + while (!hlist_empty(&bin->hb_head)) { + entry = hlist_entry(bin->hb_head.first, + tsd_hash_entry_t, he_list); + tsd_hash_del(table, entry); + hlist_add_head(&entry->he_list, &work); + } + spin_unlock(&bin->hb_lock); + } + spin_unlock(&table->ht_lock); + + tsd_hash_dtor(&work); + kmem_free(table->ht_bins, sizeof(tsd_hash_bin_t)*(1<ht_bits)); + kmem_free(table, sizeof(tsd_hash_table_t)); + + SEXIT; +} + +/* + * tsd_set - set thread specific data + * @key: lookup key + * @value: value to set + * + * Caller must prevent racing tsd_create() or tsd_destroy(), protected + * from racing tsd_get() or tsd_set() because it is thread specific. + * This function has been optimized to be fast for the update case. + * When setting the tsd initially it will be slower due to additional + * required locking and potential memory allocations. + */ +int +tsd_set(uint_t key, void *value) +{ + tsd_hash_table_t *table; + tsd_hash_entry_t *entry; + pid_t pid; + int rc; + SENTRY; + + table = tsd_hash_table; + pid = curthread->pid; + ASSERT3P(table, !=, NULL); + + if ((key == 0) || (key > TSD_KEYS_MAX)) + SRETURN(EINVAL); + + /* Entry already exists in hash table update value */ + entry = tsd_hash_search(table, key, pid); + if (entry) { + entry->he_value = value; + SRETURN(0); + } + + /* Add a process entry to the hash if not yet exists */ + entry = tsd_hash_search(table, PID_KEY, pid); + if (entry == NULL) { + rc = tsd_hash_add_pid(table, pid); + if (rc) + SRETURN(rc); + } + + rc = tsd_hash_add(table, key, pid, value); + SRETURN(rc); +} +EXPORT_SYMBOL(tsd_set); + +/* + * tsd_get - get thread specific data + * @key: lookup key + * + * Caller must prevent racing tsd_create() or tsd_destroy(). This + * implementation is designed to be fast and scalable, it does not + * lock the entire table only a single hash bin. + */ +void * +tsd_get(uint_t key) +{ + tsd_hash_entry_t *entry; + SENTRY; + + ASSERT3P(tsd_hash_table, !=, NULL); + + if ((key == 0) || (key > TSD_KEYS_MAX)) + SRETURN(NULL); + + entry = tsd_hash_search(tsd_hash_table, key, curthread->pid); + if (entry == NULL) + SRETURN(NULL); + + SRETURN(entry->he_value); +} +EXPORT_SYMBOL(tsd_get); + +/* + * tsd_create - create thread specific data key + * @keyp: lookup key address + * @dtor: destructor called during tsd_destroy() or tsd_exit() + * + * Provided key must be set to 0 or it assumed to be already in use. + * The dtor is allowed to be NULL in which case no additional cleanup + * for the data is performed during tsd_destroy() or tsd_exit(). + * + * Caller must prevent racing tsd_set() or tsd_get(), this function is + * safe from racing tsd_create(), tsd_destroy(), and tsd_exit(). + */ +void +tsd_create(uint_t *keyp, dtor_func_t dtor) +{ + SENTRY; + + ASSERT3P(keyp, !=, NULL); + if (*keyp) { + SEXIT; + return; + } + + (void)tsd_hash_add_key(tsd_hash_table, keyp, dtor); + + SEXIT; +} +EXPORT_SYMBOL(tsd_create); + +/* + * tsd_destroy - destroy thread specific data + * @keyp: lookup key address + * + * Destroys the thread specific data on all threads which use this key. + * + * Caller must prevent racing tsd_set() or tsd_get(), this function is + * safe from racing tsd_create(), tsd_destroy(), and tsd_exit(). + */ +void +tsd_destroy(uint_t *keyp) +{ + HLIST_HEAD(work); + tsd_hash_table_t *table; + tsd_hash_entry_t *dtor_entry, *entry; + SENTRY; + + table = tsd_hash_table; + ASSERT3P(table, !=, NULL); + + spin_lock(&table->ht_lock); + dtor_entry = tsd_hash_search(table, *keyp, DTOR_PID); + if (dtor_entry == NULL) { + spin_unlock(&table->ht_lock); + SEXIT; + return; + } + + /* + * All threads which use this key must be linked off of the + * DTOR_PID entry. They are removed from the hash table and + * linked in to a private working list to be destroyed. + */ + while (!list_empty(&dtor_entry->he_key_list)) { + entry = list_entry(dtor_entry->he_key_list.next, + tsd_hash_entry_t, he_key_list); + ASSERT3U(dtor_entry->he_key, ==, entry->he_key); + ASSERT3P(dtor_entry->he_dtor, ==, entry->he_dtor); + tsd_hash_del(table, entry); + hlist_add_head(&entry->he_list, &work); + } + + tsd_hash_del(table, dtor_entry); + hlist_add_head(&dtor_entry->he_list, &work); + spin_unlock(&table->ht_lock); + + tsd_hash_dtor(&work); + *keyp = 0; + + SEXIT; +} +EXPORT_SYMBOL(tsd_destroy); + +/* + * tsd_exit - destroys all thread specific data for this thread + * + * Destroys all the thread specific data for this thread. + * + * Caller must prevent racing tsd_set() or tsd_get(), this function is + * safe from racing tsd_create(), tsd_destroy(), and tsd_exit(). + */ +void +tsd_exit(void) +{ + HLIST_HEAD(work); + tsd_hash_table_t *table; + tsd_hash_entry_t *pid_entry, *entry; + SENTRY; + + table = tsd_hash_table; + ASSERT3P(table, !=, NULL); + + spin_lock(&table->ht_lock); + pid_entry = tsd_hash_search(table, PID_KEY, curthread->pid); + if (pid_entry == NULL) { + spin_unlock(&table->ht_lock); + SEXIT; + return; + } + + /* + * All keys associated with this pid must be linked off of the + * PID_KEY entry. They are removed from the hash table and + * linked in to a private working to be destroyed. + */ + while (!list_empty(&pid_entry->he_pid_list)) { + entry = list_entry(pid_entry->he_pid_list.next, + tsd_hash_entry_t, he_pid_list); + ASSERT3U(pid_entry->he_pid, ==, entry->he_pid); + tsd_hash_del(table, entry); + hlist_add_head(&entry->he_list, &work); + } + + tsd_hash_del(table, pid_entry); + hlist_add_head(&pid_entry->he_list, &work); + spin_unlock(&table->ht_lock); + + tsd_hash_dtor(&work); + + SEXIT; +} +EXPORT_SYMBOL(tsd_exit); + +int tsd_init(void) +{ + SENTRY; + + tsd_hash_table = tsd_hash_table_init(TSD_HASH_TABLE_BITS_DEFAULT); + if (tsd_hash_table == NULL) + SRETURN(1); + + SRETURN(0); +} + +void tsd_fini(void) +{ + SENTRY; + tsd_hash_table_fini(tsd_hash_table); + tsd_hash_table = NULL; + SEXIT; +} From b7dc3138375ed4c73f55183371b48db4e6e25d79 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 3 Dec 2010 15:49:57 -0800 Subject: [PATCH 0464/1062] Add Thread Specific Data (TSD) Regression Test To validate the correct behavior of the TSD interfaces it's important that we add a regression test. This test is designed to minimally exercise the fundamental TSD behavior, it does not attempt to validate all potential corner cases. The test will first create 32 keys via tsd_create() and register a common destructor. Next 16 wait threads will be created each of which set/verify a random value for all 32 keys, then block waiting to be released by the control thread. Meanwhile the control thread verifies that none of the destructors have been run prematurely. The next phase of the test is to create 16 exit threads which set/verify a random value for all 32 keys. They then immediately exit. This is is designed to verify tsd_exit() which will be called via thread_exit(). This must result in all registered destructors being run and the memory for the tsd being free'd. After this tsd_destroy() is verified by destroying all 32 keys. Once again we must see the expected number of destructors run and the tsd memory free'd. At this point the blocked threads are released and they exit calling tsd_exit() which should do very little since all the tsd has already been destroyed. If this all goes off without a hitch the test passes. To ensure no memory has been leaked, I have manually verified that after spl module unload no memory is reported leaked. --- module/splat/splat-thread.c | 185 +++++++++++++++++++++++++++++++++++- 1 file changed, 184 insertions(+), 1 deletion(-) diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index 34810bfff..0f504836f 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -37,14 +37,23 @@ #define SPLAT_THREAD_TEST2_NAME "exit" #define SPLAT_THREAD_TEST2_DESC "Validate thread exit" +#define SPLAT_THREAD_TEST3_ID 0x6003 +#define SPLAT_THREAD_TEST3_NAME "tsd" +#define SPLAT_THREAD_TEST3_DESC "Validate thread specific data" + #define SPLAT_THREAD_TEST_MAGIC 0x4488CC00UL +#define SPLAT_THREAD_TEST_KEYS 32 +#define SPLAT_THREAD_TEST_THREADS 16 typedef struct thread_priv { unsigned long tp_magic; struct file *tp_file; spinlock_t tp_lock; wait_queue_head_t tp_waitq; + uint_t tp_keys[SPLAT_THREAD_TEST_KEYS]; int tp_rc; + int tp_count; + int tp_dtor_count; } thread_priv_t; static int @@ -59,6 +68,18 @@ splat_thread_rc(thread_priv_t *tp, int rc) return ret; } +static int +splat_thread_count(thread_priv_t *tp, int count) +{ + int ret; + + spin_lock(&tp->tp_lock); + ret = (tp->tp_count == count); + spin_unlock(&tp->tp_lock); + + return ret; +} + static void splat_thread_work1(void *priv) { @@ -139,7 +160,7 @@ splat_thread_test2(struct file *file, void *arg) /* Must never fail under Solaris, but we check anyway since this * can happen in the linux SPL, we may want to change this behavior */ if (thr == NULL) - return -ESRCH; + return -ESRCH; /* Sleep until the thread sets tp.tp_rc == 1 */ wait_event(tp.tp_waitq, splat_thread_rc(&tp, 1)); @@ -160,6 +181,165 @@ splat_thread_test2(struct file *file, void *arg) return rc; } +static void +splat_thread_work3_common(thread_priv_t *tp) +{ + ulong_t rnd; + int i, rc = 0; + + /* set a unique value for each key using a random value */ + get_random_bytes((void *)&rnd, 4); + for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) + tsd_set(tp->tp_keys[i], (void *)(i + rnd)); + + /* verify the unique value for each key */ + for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) + if (tsd_get(tp->tp_keys[i]) != (void *)(i + rnd)) + rc = -EINVAL; + + /* set the value to thread_priv_t for use by the destructor */ + for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) + tsd_set(tp->tp_keys[i], (void *)tp); + + spin_lock(&tp->tp_lock); + if (rc && !tp->tp_rc) + tp->tp_rc = rc; + + tp->tp_count++; + wake_up_all(&tp->tp_waitq); + spin_unlock(&tp->tp_lock); +} + +static void +splat_thread_work3_wait(void *priv) +{ + thread_priv_t *tp = (thread_priv_t *)priv; + + ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); + splat_thread_work3_common(tp); + wait_event(tp->tp_waitq, splat_thread_count(tp, 0)); + thread_exit(); +} + +static void +splat_thread_work3_exit(void *priv) +{ + thread_priv_t *tp = (thread_priv_t *)priv; + + ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); + splat_thread_work3_common(tp); + thread_exit(); +} + +static void +splat_thread_dtor3(void *priv) +{ + thread_priv_t *tp = (thread_priv_t *)priv; + + ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); + spin_lock(&tp->tp_lock); + tp->tp_dtor_count++; + spin_unlock(&tp->tp_lock); +} + +/* + * Create threads which set and verify SPLAT_THREAD_TEST_KEYS number of + * keys. These threads may then exit by calling thread_exit() which calls + * tsd_exit() resulting in all their thread specific data being reclaimed. + * Alternately, the thread may block in which case the thread specific + * data will be reclaimed as part of tsd_destroy(). In either case all + * thread specific data must be reclaimed, this is verified by ensuring + * the registered destructor is called the correct number of times. + */ +static int +splat_thread_test3(struct file *file, void *arg) +{ + int i, rc = 0, expected, wait_count = 0, exit_count = 0; + thread_priv_t tp; + + tp.tp_magic = SPLAT_THREAD_TEST_MAGIC; + tp.tp_file = file; + spin_lock_init(&tp.tp_lock); + init_waitqueue_head(&tp.tp_waitq); + tp.tp_rc = 0; + tp.tp_count = 0; + tp.tp_dtor_count = 0; + + for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) { + tp.tp_keys[i] = 0; + tsd_create(&tp.tp_keys[i], splat_thread_dtor3); + } + + /* Start tsd wait threads */ + for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) { + if (thread_create(NULL, 0, splat_thread_work3_wait, + &tp, 0, &p0, TS_RUN, minclsyspri)) + wait_count++; + } + + /* All wait threads have setup their tsd and are blocking. */ + wait_event(tp.tp_waitq, splat_thread_count(&tp, wait_count)); + + if (tp.tp_dtor_count != 0) { + splat_vprint(file, SPLAT_THREAD_TEST3_NAME, + "Prematurely ran %d tsd destructors\n", tp.tp_dtor_count); + if (!rc) + rc = -ERANGE; + } + + /* Start tsd exit threads */ + for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) { + if (thread_create(NULL, 0, splat_thread_work3_exit, + &tp, 0, &p0, TS_RUN, minclsyspri)) + exit_count++; + } + + /* All exit threads verified tsd and are in the process of exiting */ + wait_event(tp.tp_waitq,splat_thread_count(&tp, wait_count+exit_count)); + msleep(500); + + expected = (SPLAT_THREAD_TEST_KEYS * exit_count); + if (tp.tp_dtor_count != expected) { + splat_vprint(file, SPLAT_THREAD_TEST3_NAME, + "Expected %d exit tsd destructors but saw %d\n", + expected, tp.tp_dtor_count); + if (!rc) + rc = -ERANGE; + } + + /* Destroy all keys and associated tsd in blocked threads */ + for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) + tsd_destroy(&tp.tp_keys[i]); + + expected = (SPLAT_THREAD_TEST_KEYS * (exit_count + wait_count)); + if (tp.tp_dtor_count != expected) { + splat_vprint(file, SPLAT_THREAD_TEST3_NAME, + "Expected %d wait+exit tsd destructors but saw %d\n", + expected, tp.tp_dtor_count); + if (!rc) + rc = -ERANGE; + } + + /* Release the remaining wait threads, sleep briefly while they exit */ + spin_lock(&tp.tp_lock); + tp.tp_count = 0; + wake_up_all(&tp.tp_waitq); + spin_unlock(&tp.tp_lock); + msleep(500); + + if (tp.tp_rc) { + splat_vprint(file, SPLAT_THREAD_TEST3_NAME, + "Thread tsd_get()/tsd_set() error %d\n", tp.tp_rc); + if (!rc) + rc = tp.tp_rc; + } else if (!rc) { + splat_vprint(file, SPLAT_THREAD_TEST3_NAME, "%s", + "Thread specific data verified\n"); + } + + return rc; +} + splat_subsystem_t * splat_thread_init(void) { @@ -181,6 +361,8 @@ splat_thread_init(void) SPLAT_THREAD_TEST1_ID, splat_thread_test1); SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC, SPLAT_THREAD_TEST2_ID, splat_thread_test2); + SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC, + SPLAT_THREAD_TEST3_ID, splat_thread_test3); return sub; } @@ -189,6 +371,7 @@ void splat_thread_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST3_ID); SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST2_ID); SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST1_ID); From 6bf4d76f4782a13f3ed378d77a0bc17967c3642a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Jan 2011 12:35:22 -0800 Subject: [PATCH 0465/1062] Linux Compat: inode->i_mutex/i_sem Create spl_inode_lock/spl_inode_unlock compability macros to simply access to the inode mutex/sem. This avoids the need to have to ugly up the code with the required #define's at every call site. At the moment the SPL only uses this in one place but higher layers can benefit from the macro. --- include/linux/file_compat.h | 12 +++++++++++- module/spl/spl-vnode.c | 13 +++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 77d5a27c3..0bef014ab 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -51,11 +51,21 @@ spl_filp_open(const char *name, int flags, int mode, int *err) #define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) #ifdef HAVE_3ARGS_FILE_FSYNC -#define spl_filp_fsync(fp, sync) (fp)->f_op->fsync((fp), \ +#define spl_filp_fsync(fp, sync) (fp)->f_op->fsync((fp), \ (fp)->f_dentry, sync) #else #define spl_filp_fsync(fp, sync) (fp)->f_op->fsync((fp), sync) #endif +#ifdef HAVE_INODE_I_MUTEX +#define spl_inode_lock(ip) (mutex_lock(&(ip)->i_mutex)) +#define spl_inode_lock_nested(ip, type) (mutex_lock_nested((&(ip)->i_mutex), \ + (type))) +#define spl_inode_unlock(ip) (mutex_unlock(&(ip)->i_mutex)) +#else +#define spl_inode_lock(ip) (down(&(ip)->i_sem)) +#define spl_inode_unlock(ip) (up(&(ip)->i_sem)) +#endif /* HAVE_INODE_I_MUTEX */ + #endif /* SPL_FILE_COMPAT_H */ diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 5c64f05fb..1847c7794 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -295,11 +295,7 @@ vn_remove(const char *path, uio_seg_t seg, int flags) if (nd.last_type != LAST_NORM) SGOTO(exit1, rc); -#ifdef HAVE_INODE_I_MUTEX - mutex_lock_nested(&nd.nd_dentry->d_inode->i_mutex, I_MUTEX_PARENT); -#else - down(&nd.nd_dentry->d_inode->i_sem); -#endif /* HAVE_INODE_I_MUTEX */ + spl_inode_lock_nested(nd.nd_dentry->d_inode, I_MUTEX_PARENT); dentry = vn_lookup_hash(&nd); rc = PTR_ERR(dentry); if (!IS_ERR(dentry)) { @@ -318,11 +314,8 @@ vn_remove(const char *path, uio_seg_t seg, int flags) exit2: dput(dentry); } -#ifdef HAVE_INODE_I_MUTEX - mutex_unlock(&nd.nd_dentry->d_inode->i_mutex); -#else - up(&nd.nd_dentry->d_inode->i_sem); -#endif /* HAVE_INODE_I_MUTEX */ + + spl_inode_unlock(nd.nd_dentry->d_inode); if (inode) iput(inode); /* truncate the inode here */ exit1: From 3f688a8c381d298062467a318994bb5849b1c8c1 Mon Sep 17 00:00:00 2001 From: Neependra Khare Date: Mon, 6 Dec 2010 17:05:58 +0530 Subject: [PATCH 0466/1062] Add cv_timedwait_interruptible() function The cv_timedwait() function by definition must wait unconditionally for cv_signal()/cv_broadcast() before waking. This causes processes to go in the D state which increases the load average. The load average is the summation of processes in D state and run queue. To avoid this it can be desirable to sleep interruptibly. These processes do not count against the load average but may be woken by a signal. It is up to the caller to determine why the process was woken it may be for one of three reasons. 1) cv_signal()/cv_broadcast() 2) the timeout expired 3) a signal was received Signed-off-by: Brian Behlendorf --- include/sys/condvar.h | 28 ++++++++++++++++------------ module/spl/spl-condvar.c | 21 +++++++++++++++++---- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 18e5a6fcf..7566daed7 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -53,21 +53,25 @@ extern void __cv_destroy(kcondvar_t *cvp); extern void __cv_wait(kcondvar_t *cvp, kmutex_t *mp); extern void __cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp); extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time); +extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, + clock_t exp_time); extern void __cv_signal(kcondvar_t *cvp); extern void __cv_broadcast(kcondvar_t *cvp); -#define cv_init(cvp, name, type, arg) \ -({ \ - if ((name) == NULL) \ - __cv_init(cvp, #cvp, type, arg); \ - else \ - __cv_init(cvp, name, type, arg); \ +#define cv_init(cvp, name, type, arg) \ +({ \ + if ((name) == NULL) \ + __cv_init(cvp, #cvp, type, arg); \ + else \ + __cv_init(cvp, name, type, arg); \ }) -#define cv_destroy(cvp) __cv_destroy(cvp) -#define cv_wait(cvp, mp) __cv_wait(cvp, mp) -#define cv_wait_interruptible(cvp, mp) __cv_wait_interruptible(cvp, mp) -#define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) -#define cv_signal(cvp) __cv_signal(cvp) -#define cv_broadcast(cvp) __cv_broadcast(cvp) +#define cv_destroy(cvp) __cv_destroy(cvp) +#define cv_wait(cvp, mp) __cv_wait(cvp, mp) +#define cv_wait_interruptible(cvp, mp) __cv_wait_interruptible(cvp,mp) +#define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) +#define cv_timedwait_interruptible(cvp, mp, t) \ + __cv_timedwait_interruptible(cvp, mp, t) +#define cv_signal(cvp) __cv_signal(cvp) +#define cv_broadcast(cvp) __cv_broadcast(cvp) #endif /* _SPL_CONDVAR_H */ diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index edf048bb7..421f8806b 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -135,8 +135,9 @@ EXPORT_SYMBOL(__cv_wait_interruptible); /* 'expire_time' argument is an absolute wall clock time in jiffies. * Return value is time left (expire_time - now) or -1 if timeout occurred. */ -clock_t -__cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) +static clock_t +__cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, + clock_t expire_time, int state) { DEFINE_WAIT(wait); clock_t time_left; @@ -158,8 +159,7 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) if (time_left <= 0) SRETURN(-1); - prepare_to_wait_exclusive(&cvp->cv_event, &wait, - TASK_UNINTERRUPTIBLE); + prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); /* Mutex should be dropped after prepare_to_wait() this @@ -177,8 +177,21 @@ __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time) SRETURN(time_left > 0 ? time_left : -1); } + +clock_t +__cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) +{ + return __cv_timedwait_common(cvp, mp, exp_time, TASK_UNINTERRUPTIBLE); +} EXPORT_SYMBOL(__cv_timedwait); +clock_t +__cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) +{ + return __cv_timedwait_common(cvp, mp, exp_time, TASK_INTERRUPTIBLE); +} +EXPORT_SYMBOL(__cv_timedwait_interruptible); + void __cv_signal(kcondvar_t *cvp) { From 4295b530eeb68aaacbbeb5b2197ed14bf9295c2b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Jan 2011 11:53:05 -0800 Subject: [PATCH 0467/1062] Add vn_mode_to_vtype/vn_vtype to_mode helpers Add simple helpers to convert a vnode->v_type to a inode->i_mode. These should be used sparingly but they are handy to have. --- include/sys/mode.h | 4 ++++ include/sys/vnode.h | 2 ++ module/spl/spl-vnode.c | 41 +++++++++++++++++++++++++++++++++++------ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/include/sys/mode.h b/include/sys/mode.h index f3d890944..ddd504f9f 100644 --- a/include/sys/mode.h +++ b/include/sys/mode.h @@ -25,4 +25,8 @@ #ifndef _SPL_MODE_H #define _SPL_MODE_H +#define IFTOVT(mode) vn_mode_to_vtype(mode) +#define VTTOIF(vtype) vn_vtype_to_mode(vtype) +#define MAKEIMODE(T, M) (VTTOIF(T) | ((M) & ~S_IFMT)) + #endif /* SPL_MODE_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 104e65d15..b5969b352 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -202,6 +202,8 @@ typedef struct caller_context { extern vnode_t *vn_alloc(int flag); void vn_free(vnode_t *vp); +extern vtype_t vn_mode_to_vtype(mode_t); +extern mode_t vn_vtype_to_mode(vtype_t); extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, int x1, void *x2); extern int vn_openat(const char *path, uio_seg_t seg, int flags, int mode, diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 1847c7794..765dc4e2e 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -42,8 +42,8 @@ static spl_kmem_cache_t *vn_file_cache; static spinlock_t vn_file_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(vn_file_list); -static vtype_t -vn_get_sol_type(umode_t mode) +vtype_t +vn_mode_to_vtype(mode_t mode) { if (S_ISREG(mode)) return VREG; @@ -70,7 +70,36 @@ vn_get_sol_type(umode_t mode) return VCHR; return VNON; -} /* vn_get_sol_type() */ +} /* vn_mode_to_vtype() */ +EXPORT_SYMBOL(vn_mode_to_vtype); + +mode_t +vn_vtype_to_mode(vtype_t vtype) +{ + if (vtype == VREG) + return S_IFREG; + + if (vtype == VDIR) + return S_IFDIR; + + if (vtype == VCHR) + return S_IFCHR; + + if (vtype == VBLK) + return S_IFBLK; + + if (vtype == VFIFO) + return S_IFIFO; + + if (vtype == VLNK) + return S_IFLNK; + + if (vtype == VSOCK) + return S_IFSOCK; + + return VNON; +} /* vn_vtype_to_mode() */ +EXPORT_SYMBOL(vn_vtype_to_mode); vnode_t * vn_alloc(int flag) @@ -150,7 +179,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, mapping_set_gfp_mask(fp->f_mapping, saved_gfp & ~(__GFP_IO|__GFP_FS)); mutex_enter(&vp->v_lock); - vp->v_type = vn_get_sol_type(stat.mode); + vp->v_type = vn_mode_to_vtype(stat.mode); vp->v_file = fp; vp->v_gfp_mask = saved_gfp; *vpp = vp; @@ -439,7 +468,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) if (rc) SRETURN(-rc); - vap->va_type = vn_get_sol_type(stat.mode); + vap->va_type = vn_mode_to_vtype(stat.mode); vap->va_mode = stat.mode; vap->va_uid = stat.uid; vap->va_gid = stat.gid; @@ -539,7 +568,7 @@ vn_getf(int fd) SGOTO(out_vnode, rc); mutex_enter(&vp->v_lock); - vp->v_type = vn_get_sol_type(stat.mode); + vp->v_type = vn_mode_to_vtype(stat.mode); vp->v_file = lfp; mutex_exit(&vp->v_lock); From 1b439713f127db3ef5aad60aac63aad9b8384f6d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Jan 2011 11:54:21 -0800 Subject: [PATCH 0468/1062] FRSYNC Should Use O_SYNC The Solaris FRSYNC maps most logically to the Linux O_SYNC. There is no O_RSYNC on Linux but this wasn't noticed until just recently. --- include/sys/vnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index b5969b352..ef5c59203 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -61,7 +61,7 @@ #define FOFFMAX O_LARGEFILE #define FSYNC O_SYNC #define FDSYNC O_DSYNC -#define FRSYNC O_RSYNC +#define FRSYNC O_SYNC #define FEXCL O_EXCL #define FDIRECT O_DIRECT #define FAPPEND O_APPEND From dcd9cb5a17014b39a4440b26df1dbf78c0dde637 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Jan 2011 11:56:00 -0800 Subject: [PATCH 0469/1062] Clean vattr_t and vsecattr_t types Minor cleanup for the vattr_t and vsecattr_t types. --- include/sys/vnode.h | 19 ++++++++++--------- module/spl/spl-vnode.c | 15 ++++++--------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index ef5c59203..1c4b99ecc 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -121,18 +121,18 @@ typedef struct vattr { enum vtype va_type; /* vnode type */ u_int va_mask; /* attribute bit-mask */ u_short va_mode; /* acc mode */ - short va_uid; /* owner uid */ - short va_gid; /* owner gid */ + uid_t va_uid; /* owner uid */ + gid_t va_gid; /* owner gid */ long va_fsid; /* fs id */ long va_nodeid; /* node # */ - short va_nlink; /* # links */ - u_long va_size; /* file size */ - long va_blocksize; /* block size */ - struct timeval va_atime; /* last acc */ - struct timeval va_mtime; /* last mod */ - struct timeval va_ctime; /* last chg */ + uint32_t va_nlink; /* # links */ + uint64_t va_size; /* file size */ + uint32_t va_blocksize; /* block size */ + uint64_t va_nblocks; /* space used */ + struct timespec va_atime; /* last acc */ + struct timespec va_mtime; /* last mod */ + struct timespec va_ctime; /* last chg */ dev_t va_rdev; /* dev */ - long va_blocks; /* space used */ } vattr_t; typedef struct xoptattr { @@ -168,6 +168,7 @@ typedef struct vsecattr { int vsa_dfaclcnt; /* default ACL entry count */ void *vsa_dfaclentp; /* pointer to default ACL entries */ size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ + uint_t vsa_aclflags; /* ACE ACL flags */ } vsecattr_t; typedef struct vnode { diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 765dc4e2e..a7c7a7138 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -454,7 +454,7 @@ int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) { struct file *fp; - struct kstat stat; + struct kstat stat; int rc; SENTRY; @@ -477,16 +477,13 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) vap->va_nlink = stat.nlink; vap->va_size = stat.size; vap->va_blocksize = stat.blksize; - vap->va_atime.tv_sec = stat.atime.tv_sec; - vap->va_atime.tv_usec = stat.atime.tv_nsec / NSEC_PER_USEC; - vap->va_mtime.tv_sec = stat.mtime.tv_sec; - vap->va_mtime.tv_usec = stat.mtime.tv_nsec / NSEC_PER_USEC; - vap->va_ctime.tv_sec = stat.ctime.tv_sec; - vap->va_ctime.tv_usec = stat.ctime.tv_nsec / NSEC_PER_USEC; + vap->va_atime = stat.atime; + vap->va_mtime = stat.mtime; + vap->va_ctime = stat.ctime; vap->va_rdev = stat.rdev; - vap->va_blocks = stat.blocks; + vap->va_nblocks = stat.blocks; - SRETURN(0); + SRETURN(0); } EXPORT_SYMBOL(vn_getattr); From a5b40eed179887d8486c1831008400ec316c81cf Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Jan 2011 11:57:02 -0800 Subject: [PATCH 0470/1062] Make vn_cache|vn_file_cache kmem caches Both of these caches were previously allowed to be either a vmem or kmem cache based on the size of the object involved. Since we know the object won't be to large and performce is much better for a kmem cache for them to be kmem backed. --- module/spl/spl-vnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a7c7a7138..7630ffd33 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -795,13 +795,13 @@ vn_init(void) sizeof(struct vnode), 64, vn_cache_constructor, vn_cache_destructor, - NULL, NULL, NULL, 0); + NULL, NULL, NULL, KMC_KMEM); vn_file_cache = kmem_cache_create("spl_vn_file_cache", sizeof(file_t), 64, vn_file_cache_constructor, vn_file_cache_destructor, - NULL, NULL, NULL, 0); + NULL, NULL, NULL, KMC_KMEM); SRETURN(0); } /* vn_init() */ From bd6ac72b03701a3f37e6c8e706cec16192f873cd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Jan 2011 12:00:35 -0800 Subject: [PATCH 0471/1062] Add a few additional vnode #defines These additional constants now have users in dependant packages. --- include/sys/vnode.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 1c4b99ecc..e43d9ef62 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -94,6 +94,14 @@ #define B_INVAL 0x01 #define B_TRUNC 0x02 +#define V_ACE_MASK 0x0001 +#define V_APPEND 0x0002 + +#define LOOKUP_DIR 0x01 +#define LOOKUP_XATTR 0x02 +#define CREATE_XATTR_DIR 0x04 +#define ATTR_NOACLCHECK 0x20 + #ifdef HAVE_PATH_IN_NAMEIDATA # define nd_dentry path.dentry # define nd_mnt path.mnt From 647fa73cf33930f36259d00fd86c52b8e8113c30 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Jan 2011 11:46:49 -0800 Subject: [PATCH 0472/1062] Remove VN_HOLD/VN_RELE/VOP_PUTPAGE Previously these were defined to noops but rather than give the misleading impression that these are actually implemented I'm removing the type entirely for clarity. --- include/sys/vnode.h | 15 +-------------- module/spl/spl-kobj.c | 1 - module/splat/splat-vnode.c | 7 ------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index e43d9ef62..d017506ba 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -234,24 +234,11 @@ extern int vn_set_pwd(const char *filename); int vn_init(void); void vn_fini(void); -static __inline__ int -vn_rele(vnode_t *vp) -{ - return 0; -} /* vn_rele() */ - -static __inline__ int -vn_putpage(vnode_t *vp, offset_t off, ssize_t size, - int flags, void *x1, void *x2) { - return 0; -} /* vn_putpage() */ - #define VOP_CLOSE vn_close #define VOP_SEEK vn_seek -#define VN_RELE vn_rele #define VOP_GETATTR vn_getattr #define VOP_FSYNC vn_fsync -#define VOP_PUTPAGE vn_putpage +#define VOP_PUTPAGE(vp, o, s, f, x1, x2) ((void)0) #define vn_is_readonly(vp) 0 #define getf vn_getf #define releasef vn_releasef diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index 226a12971..684d57226 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -61,7 +61,6 @@ kobj_close_file(struct _buf *file) { SENTRY; VOP_CLOSE(file->vp, 0, 0, 0, 0, 0); - VN_RELE(file->vp); kfree(file); SEXIT; } /* kobj_close_file() */ diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index 1955841e2..0cd28a690 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -124,7 +124,6 @@ splat_vnode_test1(struct file *file, void *arg) } rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); - VN_RELE(vp); if (rc) { splat_vprint(file, SPLAT_VNODE_TEST1_NAME, @@ -154,7 +153,6 @@ splat_vnode_test2(struct file *file, void *arg) } rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); - VN_RELE(vp); if (rc) { splat_vprint(file, SPLAT_VNODE_TEST2_NAME, @@ -224,7 +222,6 @@ splat_vnode_test3(struct file *file, void *arg) out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); - VN_RELE(vp); vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); return -rc; @@ -259,7 +256,6 @@ splat_vnode_test4(struct file *file, void *arg) } VOP_CLOSE(vp, 0, 0, 0, 0, 0); - VN_RELE(vp); rc = vn_rename(SPLAT_VNODE_TEST_FILE_RW1,SPLAT_VNODE_TEST_FILE_RW2,0); if (rc) { @@ -305,7 +301,6 @@ splat_vnode_test4(struct file *file, void *arg) SPLAT_VNODE_TEST_FILE_RW1, SPLAT_VNODE_TEST_FILE_RW2); out2: VOP_CLOSE(vp, 0, 0, 0, 0, 0); - VN_RELE(vp); out: vn_remove(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, RMFILE); vn_remove(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE, RMFILE); @@ -350,7 +345,6 @@ splat_vnode_test5(struct file *file, void *arg) out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); - VN_RELE(vp); return -rc; } /* splat_vnode_test5() */ @@ -395,7 +389,6 @@ splat_vnode_test6(struct file *file, void *arg) "fsync'ed test file %s\n", SPLAT_VNODE_TEST_FILE_RW); out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); - VN_RELE(vp); vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); return -rc; From d700637207b7e3870badcdb8389646a865835627 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Jan 2011 11:22:34 -0800 Subject: [PATCH 0473/1062] Minimal VFS additions This patch simply removes the place holder vfs_t type and includes some generic Linux VFS headers. It also makes some minor fid_t additions for compatibility. --- include/sys/vfs.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/sys/vfs.h b/include/sys/vfs.h index b18c90928..cc6c3b693 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -25,11 +25,14 @@ #ifndef _SPL_ZFS_H #define _SPL_ZFS_H -typedef struct vfs { - int foo; -} vfs_t; +#include +#include +#include +#include +#include +#include -#define MAXFIDSZ 64 +#define MAXFIDSZ 64 typedef struct fid { union { @@ -41,4 +44,7 @@ typedef struct fid { } un; } fid_t; +#define fid_len un._fid.len +#define fid_data un._fid.data + #endif /* SPL_ZFS_H */ From 3e5d3d32858683d3410a63c712412167c345853b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Jan 2011 11:25:20 -0800 Subject: [PATCH 0474/1062] Add ksid_index_t and ksid_t types Add the ksid_index_t enum and ksid_t type for use. These types are now used by packages which depend on the SPL. --- include/sys/sid.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/sys/sid.h b/include/sys/sid.h index ac32d7bf7..17e32e25f 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -29,6 +29,15 @@ typedef struct ksiddomain { char *kd_name; } ksiddomain_t; +typedef enum ksid_index { + KSID_USER, + KSID_GROUP, + KSID_OWNER, + KSID_COUNT +} ksid_index_t; + +typedef int ksid_t; + static inline ksiddomain_t * ksid_lookupdomain(const char *dom) { From 5f46a517f17affc89591f0130870bca48a5b093e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Jan 2011 11:27:07 -0800 Subject: [PATCH 0475/1062] Add FIGNORECASE define The FIGNORECASE case define is now needed, place it with the related flags. --- include/sys/file.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sys/file.h b/include/sys/file.h index 4fee255fd..fbeb8e258 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -25,6 +25,7 @@ #ifndef _SPL_FILE_H #define _SPL_FILE_H -#define FKIOCTL 0x80000000 +#define FIGNORECASE 0x00080000 +#define FKIOCTL 0x80000000 #endif /* SPL_FILE_H */ From e2b25f698cecc7ab3a3073861ab81a8258644f89 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Jan 2011 11:29:17 -0800 Subject: [PATCH 0476/1062] Add MAXUID define For Linux the maximum uid can vary depending on how your kernel is built. The Linux kernel still can be compiled with 16 but uids and gids, although I'm not aware of a major distribution which does this (maybe an embedded one?). Given that caviot it is reasonably safe to define the MAXUID as 2147483647. --- include/sys/param.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/param.h b/include/sys/param.h index be3dd4bf3..60f3ae2a9 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -31,4 +31,6 @@ #define ptob(pages) (pages << PAGE_SHIFT) #define btop(bytes) (bytes >> PAGE_SHIFT) +#define MAXUID 2147483647 + #endif /* SPL_PARAM_H */ From 3fc97f93359ed6a74ea7165b102995cfe5d2c16d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Jan 2011 11:34:07 -0800 Subject: [PATCH 0477/1062] Add VSA_ACE_* and MAX_ACL_ENTRIES defines The following flags are use to get the proper mask when getting and setting ACLs. I'm hopeful this can all largely go away at some point. We also add a define for the maximum number of ACL entries. MAX_ACL_ENTRIES is used as the maximum number of entries for each type. --- include/sys/acl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/sys/acl.h b/include/sys/acl.h index 7b49b0bc2..39a1cc29c 100644 --- a/include/sys/acl.h +++ b/include/sys/acl.h @@ -43,6 +43,8 @@ typedef struct ace_object { uint8_t a_inherit_obj_type[16]; /* inherit obj */ } ace_object_t; +#define MAX_ACL_ENTRIES 1024 + #define ACE_READ_DATA 0x00000001 #define ACE_LIST_DIRECTORY 0x00000001 #define ACE_WRITE_DATA 0x00000002 @@ -107,4 +109,9 @@ typedef struct ace_object { ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \ ACE_WRITE_OWNER|ACE_SYNCHRONIZE) +#define VSA_ACE 0x0010 +#define VSA_ACECNT 0x0020 +#define VSA_ACE_ALLTYPES 0x0040 +#define VSA_ACE_ACLFLAGS 0x0080 + #endif /* _SPL_ACL_H */ From ef57fb98e4525e57973cbbe7279e39f0e7fef451 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 22 Dec 2010 13:41:57 -0800 Subject: [PATCH 0478/1062] Add missing headers Dependent packages require the following missing headers to simplify compilation. The headers are basically just stubbed out with minimal content required. --- include/sys/extdirent.h | 29 +++++++++++++++++++++++++++++ include/sys/fcntl.h | 39 +++++++++++++++++++++++++++++++++++++++ include/sys/idmap.h | 29 +++++++++++++++++++++++++++++ include/sys/kidmap.h | 2 ++ 4 files changed, 99 insertions(+) create mode 100644 include/sys/extdirent.h create mode 100644 include/sys/fcntl.h create mode 100644 include/sys/idmap.h diff --git a/include/sys/extdirent.h b/include/sys/extdirent.h new file mode 100644 index 000000000..d9af31039 --- /dev/null +++ b/include/sys/extdirent.h @@ -0,0 +1,29 @@ +/*****************************************************************************\ + * Copyright (C) 2010 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_EXTDIRENT_H +#define _SPL_EXTDIRENT_H + +#define ED_CASE_CONFLICT 0x10 + +#endif /* _SPL_EXTDIRENT_H */ diff --git a/include/sys/fcntl.h b/include/sys/fcntl.h new file mode 100644 index 000000000..c7bc02a6e --- /dev/null +++ b/include/sys/fcntl.h @@ -0,0 +1,39 @@ +/*****************************************************************************\ + * Copyright (C) 2010 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_FCNTL_H +#define _SPL_FCNTL_H + +#include + +#define F_FREESP 11 + +typedef struct flock64 { + short l_type; + short l_whence; + loff_t l_start; + loff_t l_len; + pid_t l_pid; +} flock64_t; + +#endif /* _SPL_FCNTL_H */ diff --git a/include/sys/idmap.h b/include/sys/idmap.h new file mode 100644 index 000000000..b3c7c0f43 --- /dev/null +++ b/include/sys/idmap.h @@ -0,0 +1,29 @@ +/*****************************************************************************\ + * Copyright (C) 2010 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_IDMAP_H +#define _SPL_IDMAP_H + +#define IDMAP_WK_CREATOR_OWNER_UID 2147483648U + +#endif /* SPL_IDMAP_H */ diff --git a/include/sys/kidmap.h b/include/sys/kidmap.h index f77656738..ed87b9f7f 100644 --- a/include/sys/kidmap.h +++ b/include/sys/kidmap.h @@ -25,4 +25,6 @@ #ifndef _SPL_KIDMAP_H #define _SPL_KIDMAP_H +#include + #endif /* SPL_KIDMAP_H */ From 0aff071d18bbef2fb6b2ab41f60ab3b957ae58c7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 22 Dec 2010 13:45:02 -0800 Subject: [PATCH 0479/1062] Minor policy interface Simply add the policy function wrappers. They are completely non-functional and always return that everything is OK, but once again they simplify compilation of dependent packages for now. These can/should be removed once the security policy of the dependent application is completely understood and intergrade as appropriate with Linux. --- include/sys/policy.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/include/sys/policy.h b/include/sys/policy.h index 2224c41a6..950ec9554 100644 --- a/include/sys/policy.h +++ b/include/sys/policy.h @@ -25,10 +25,23 @@ #ifndef _SPL_POLICY_H #define _SPL_POLICY_H -#define secpolicy_fs_unmount(c,vfs) (0) -#define secpolicy_nfs(c) (0) -#define secpolicy_sys_config(c,co) (0) -#define secpolicy_zfs(c) (0) -#define secpolicy_zinject(c) (0) +#define secpolicy_fs_unmount(c,vfs) (0) +#define secpolicy_nfs(c) (0) +#define secpolicy_sys_config(c,co) (0) +#define secpolicy_zfs(c) (0) +#define secpolicy_zinject(c) (0) +#define secpolicy_vnode_setids_setgids(c,id) (0) +#define secpolicy_vnode_setid_retain(c, sr) (0) +#define secpolicy_setid_clear(v, c) (0) +#define secpolicy_vnode_any_access(c,vp,o) (0) +#define secpolicy_vnode_access2(c,cp,o,m1,m2) (0) +#define secpolicy_vnode_chown(c,o) (0) +#define secpolicy_vnode_setdac(c,o) (0) +#define secpolicy_vnode_remove(c) (0) +#define secpolicy_vnode_setattr(c,v,a,o,f,func,n) (0) +#define secpolicy_xvattr(x, o, c, t) (0) +#define secpolicy_vnode_stky_modify(c) (0) +#define secpolicy_setid_setsticky_clear(v,a,o,c) (0) +#define secpolicy_basic_link(c) (0) #endif /* SPL_POLICY_H */ From d599e4fa793b304609d32e336c668b70831b6b3b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 4 Feb 2011 14:09:08 -0800 Subject: [PATCH 0480/1062] Block in cv_destroy() on all waiters Previously we would ASSERT in cv_destroy() if it was ever called with active waiters. However, I've now seen several instances in OpenSolaris code where they do the following: cv_broadcast(); cv_destroy(); This leaves no time for active waiters to be woken up and scheduled and we trip the ASSERT. This has not been observed to be an issue on OpenSolaris because their cv_destroy() basically does nothing. They still do run the risk of the memory being free'd after the cv_destroy() and hitting a bad paging request. But in practice this race is so small and unlikely it either doesn't happen, or is so unlikely when it does happen the root cause has not yet been identified. Rather than risk the same issue in our code this change updates cv_destroy() to block until all waiters have been woken and scheduled. This may take some time because each waiter must acquire the mutex. This change may have an impact on performance for frequently created and destroyed condition variables. That however is a price worth paying it avoid crashing your system. If performance issues are observed they can be addressed by the caller. --- include/sys/condvar.h | 1 + module/spl/spl-condvar.c | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 7566daed7..ca9dd0f52 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -42,6 +42,7 @@ typedef struct { char *cv_name; int cv_name_size; wait_queue_head_t cv_event; + wait_queue_head_t cv_destroy; atomic_t cv_waiters; kmutex_t *cv_mutex; } kcondvar_t; diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 421f8806b..2730435c7 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -46,6 +46,7 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) cvp->cv_magic = CV_MAGIC; init_waitqueue_head(&cvp->cv_event); + init_waitqueue_head(&cvp->cv_destroy); atomic_set(&cvp->cv_waiters, 0); cvp->cv_mutex = NULL; cvp->cv_name = NULL; @@ -65,12 +66,27 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) } EXPORT_SYMBOL(__cv_init); +static int +cv_destroy_wakeup(kcondvar_t *cvp) +{ + if ((waitqueue_active(&cvp->cv_event)) || + (atomic_read(&cvp->cv_waiters) > 0)) + return 0; + + return 1; +} + void __cv_destroy(kcondvar_t *cvp) { SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); + + /* Block until all waiters have woken */ + while (cv_destroy_wakeup(cvp) == 0) + wait_event_timeout(cvp->cv_destroy, cv_destroy_wakeup(cvp), 1); + ASSERT(cvp->cv_mutex == NULL); ASSERT(atomic_read(&cvp->cv_waiters) == 0); ASSERT(!waitqueue_active(&cvp->cv_event)); @@ -78,7 +94,6 @@ __cv_destroy(kcondvar_t *cvp) if (cvp->cv_name) kmem_free(cvp->cv_name, cvp->cv_name_size); - ASSERT3P(memset(cvp, CV_POISON, sizeof(*cvp)), ==, cvp); SEXIT; } EXPORT_SYMBOL(__cv_destroy); @@ -111,10 +126,13 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) mutex_enter(mp); /* No more waiters a different mutex could be used */ - if (atomic_dec_and_test(&cvp->cv_waiters)) + if (atomic_dec_and_test(&cvp->cv_waiters)) { cvp->cv_mutex = NULL; + wake_up(&cvp->cv_destroy); + } finish_wait(&cvp->cv_event, &wait); + SEXIT; } @@ -170,8 +188,10 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, mutex_enter(mp); /* No more waiters a different mutex could be used */ - if (atomic_dec_and_test(&cvp->cv_waiters)) + if (atomic_dec_and_test(&cvp->cv_waiters)) { cvp->cv_mutex = NULL; + wake_up(&cvp->cv_destroy); + } finish_wait(&cvp->cv_event, &wait); From 0d33908cdfb5502e35717adc14d2a0db8b596cd5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Feb 2011 16:41:08 -0800 Subject: [PATCH 0481/1062] Update META to 0.6.0 Roll the version forward to 0.6.0. While no major changes really warrant this I want to keep the version in step with ZFS for now which is the only SPL consumer. --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 71ed8b742..0a2ad8a65 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.5.2 +Version: 0.6.0 Release: 1 Release-Tags: relext From 22ccfaa8b5f6a6e8a770667a9d412828906a4332 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 Feb 2011 14:40:57 -0800 Subject: [PATCH 0482/1062] Prefer /lib/modules/$(uname -r)/ links Preferentially use the /lib/modules/$(uname -r)/source and /lib/modules/$(uname -r)/build links. Only if neither of these links exist fallback to alternate methods for deducing which kernel to build with. This resolves the need to manually specify --with-linux= and --with-linux-obj= on Debian systems. --- config/spl-build.m4 | 11 ++++++++--- configure | 22 ++++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c18db70df..d8eadb7e9 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -105,8 +105,11 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_CHECKING([kernel source directory]) if test -z "$kernelsrc"; then - headersdir="/lib/modules/$(uname -r)/build" - if test -e "$headersdir"; then + if test -e "/lib/modules/$(uname -r)/source"; then + headersdir="/lib/modules/$(uname -r)/source" + sourcelink=$(readlink -f "$headersdir") + elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ @@ -132,7 +135,9 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_RESULT([$kernelsrc]) AC_MSG_CHECKING([kernel build directory]) if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + if test -e "/lib/modules/$(uname -r)/build"; then + kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` + elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} elif test -d ${kernelsrc}-obj/${target_cpu}/default; then kernelbuild=${kernelsrc}-obj/${target_cpu}/default diff --git a/configure b/configure index 7876f6a16..c3b08440e 100755 --- a/configure +++ b/configure @@ -11676,8 +11676,11 @@ fi { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 $as_echo_n "checking kernel source directory... " >&6; } if test -z "$kernelsrc"; then - headersdir="/lib/modules/$(uname -r)/build" - if test -e "$headersdir"; then + if test -e "/lib/modules/$(uname -r)/source"; then + headersdir="/lib/modules/$(uname -r)/source" + sourcelink=$(readlink -f "$headersdir") + elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ @@ -11711,7 +11714,9 @@ $as_echo "$kernelsrc" >&6; } { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 $as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + if test -e "/lib/modules/$(uname -r)/build"; then + kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` + elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} elif test -d ${kernelsrc}-obj/${target_cpu}/default; then kernelbuild=${kernelsrc}-obj/${target_cpu}/default @@ -15365,8 +15370,11 @@ fi { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 $as_echo_n "checking kernel source directory... " >&6; } if test -z "$kernelsrc"; then - headersdir="/lib/modules/$(uname -r)/build" - if test -e "$headersdir"; then + if test -e "/lib/modules/$(uname -r)/source"; then + headersdir="/lib/modules/$(uname -r)/source" + sourcelink=$(readlink -f "$headersdir") + elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ @@ -15400,7 +15408,9 @@ $as_echo "$kernelsrc" >&6; } { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 $as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + if test -e "/lib/modules/$(uname -r)/build"; then + kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` + elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} elif test -d ${kernelsrc}-obj/${target_cpu}/default; then kernelbuild=${kernelsrc}-obj/${target_cpu}/default From bf665d4075e9777af089e669c65f72d5d652f26e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 18 Feb 2011 09:20:02 -0800 Subject: [PATCH 0483/1062] Prep spl-0.6.0-rc1 tag Create the first 0.6.0 release candidate tag (rc1). --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 0a2ad8a65..59f8b34b8 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: 1 +Release: rc1 Release-Tags: relext From 914b063133365a17b1f607cbe96102259e497753 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 23 Feb 2011 12:25:45 -0800 Subject: [PATCH 0484/1062] Linux compat 2.6.37, invalidate_inodes() In the 2.6.37 kernel the function invalidate_inodes() is no longer exported for use by modules. This memory management functionality is needed to invalidate the inodes attached to a super block without unmounting the filesystem. Because this function still exists in the kernel and the prototype is available is a common header all we strictly need is the symbol address. The address is obtained using spl_kallsyms_lookup_name() and assigned to the variable invalidate_inodes_fn. Then a #define is used to replace all instances of invalidate_inodes() with a call to the acquired address. All the complexity is hidden behind HAVE_INVALIDATE_INODES and invalidate_inodes() can be used as usual. Long term we should try to get this, or another, interface made available to modules again. --- config/spl-build.m4 | 16 ++++++++ configure | 82 +++++++++++++++++++++++++++++++++++++++ include/linux/mm_compat.h | 13 +++++++ module/spl/spl-kmem.c | 14 +++++++ spl_config.h.in | 3 ++ 5 files changed, 128 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d8eadb7e9..2356f209f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -74,6 +74,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KVASPRINTF SPL_AC_3ARGS_FILE_FSYNC SPL_AC_EXPORTED_RWSEM_IS_LOCKED + SPL_AC_KERNEL_INVALIDATE_INODES ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1685,3 +1686,18 @@ AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], [ [rwsem_is_locked() acquires sem->wait_lock])], []) ]) + +dnl # +dnl # 2.6.37 API compat, +dnl # The function invalidate_inodes() is no longer exported by the kernel. +dnl # The prototype however is still available which means it is safe +dnl # to acquire the symbol's address using spl_kallsyms_lookup_name(). +dnl # +AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ + SPL_CHECK_SYMBOL_EXPORT( + [invalidate_inodes], + [], + [AC_DEFINE(HAVE_INVALIDATE_INODES, 1, + [invalidate_inodes() is available])], + []) +]) diff --git a/configure b/configure index c3b08440e..535ca2e7d 100755 --- a/configure +++ b/configure @@ -15334,6 +15334,47 @@ _ACEOF fi + + { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes is exported" >&5 +$as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; } + grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES 1 +_ACEOF + + fi + + ;; user) @@ -19029,6 +19070,47 @@ _ACEOF + { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes is exported" >&5 +$as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; } + grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES 1 +_ACEOF + + fi + + + if test "x$AWK" != xgawk; then diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 57f83dcc9..5c5198b90 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -26,6 +26,7 @@ #define _SPL_MM_COMPAT_H #include +#include /* * Linux 2.6.31 API Change. @@ -43,4 +44,16 @@ #define high_wmark_pages(z) (z->pages_high) #endif +/* + * 2.6.37 API compat, + * The function invalidate_inodes() is no longer exported by the kernel. + * The prototype however is still available which means it is safe + * to acquire the symbol's address using spl_kallsyms_lookup_name(). + */ +#ifndef HAVE_INVALIDATE_INODES +typedef int (*invalidate_inodes_t)(struct super_block *sb); +extern invalidate_inodes_t invalidate_inodes_fn; +#define invalidate_inodes(sb) invalidate_inodes_fn(sb) +#endif /* HAVE_INVALIDATE_INODES */ + #endif /* SPL_MM_COMPAT_H */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 1a9c1fe96..100d674e5 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -180,6 +180,11 @@ spl_global_page_state(spl_zone_stat_item_t item) #endif /* NEED_GET_ZONE_COUNTS */ EXPORT_SYMBOL(spl_global_page_state); +#ifndef HAVE_INVALIDATE_INODES +invalidate_inodes_t invalidate_inodes_fn = SYMBOL_POISON; +EXPORT_SYMBOL(invalidate_inodes_fn); +#endif /* HAVE_INVALIDATE_INODES */ + pgcnt_t spl_kmem_availrmem(void) { @@ -2089,6 +2094,15 @@ spl_kmem_init_kallsyms_lookup(void) */ spl_kmem_init_globals(); +#ifndef HAVE_INVALIDATE_INODES + invalidate_inodes_fn = (invalidate_inodes_t) + spl_kallsyms_lookup_name("invalidate_inodes"); + if (!invalidate_inodes_fn) { + printk(KERN_ERR "Error: Unknown symbol invalidate_inodes\n"); + return -EFAULT; + } +#endif /* HAVE_INVALIDATE_INODES */ + return 0; } diff --git a/spl_config.h.in b/spl_config.h.in index 7863f7b3c..a58784119 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -102,6 +102,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* invalidate_inodes() is available */ +#undef HAVE_INVALIDATE_INODES + /* kallsyms_lookup_name() is available */ #undef HAVE_KALLSYMS_LOOKUP_NAME From 5a52a782a0a04efee3846e1a8f0bb4796930e0e4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 20 Feb 2011 14:02:48 -0800 Subject: [PATCH 0485/1062] Use Linux flock struct Rather than defining our own structure which will conflict with Linux's version when building 32-bit. Simply setup a typedef to always use the correct Linux version for both 32 ad 64-bit builds. --- include/sys/fcntl.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/sys/fcntl.h b/include/sys/fcntl.h index c7bc02a6e..4e260a4b8 100644 --- a/include/sys/fcntl.h +++ b/include/sys/fcntl.h @@ -28,12 +28,10 @@ #define F_FREESP 11 -typedef struct flock64 { - short l_type; - short l_whence; - loff_t l_start; - loff_t l_len; - pid_t l_pid; -} flock64_t; +#ifdef CONFIG_64BIT +typedef struct flock flock64_t; +#else +typedef struct flock64 flock64_t; +#endif /* CONFIG_64BIT */ #endif /* _SPL_FCNTL_H */ From 5c1967ebe2ad28f3c3229cba85159ccbd4dfe93a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 25 Feb 2011 13:26:19 -0800 Subject: [PATCH 0486/1062] Fix zlib compression While portions of the code needed to support z_compress_level() and z_uncompress() where in place. In reality the current implementation was non-functional, it just was compilable. The critical missing component was to setup a workspace for the compress/uncompress stream structures to use. A kmem_cache was added for the workspace area because we require a large chunk of memory. This avoids to need to continually alloc/free this memory and vmap() the pages which is very slow. Several objects will reside in the per-cpu kmem_cache making them quick to acquire and release. A further optimization would be to adjust the implementation to additional ensure the memory is local to the cpu. Currently that may not be the case. --- include/spl-debug.h | 1 + include/sys/zmod.h | 104 ++----------------- module/spl/Makefile.in | 1 + module/spl/spl-debug.c | 2 + module/spl/spl-generic.c | 13 ++- module/spl/spl-zlib.c | 217 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 238 insertions(+), 100 deletions(-) create mode 100644 module/spl/spl-zlib.c diff --git a/include/spl-debug.h b/include/spl-debug.h index 0028c29bd..8bd4c4495 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -64,6 +64,7 @@ #define SS_KSTAT 0x00020000 #define SS_XDR 0x00040000 #define SS_TSD 0x00080000 +#define SS_ZLIB 0x00100000 #define SS_USER1 0x01000000 #define SS_USER2 0x02000000 #define SS_USER3 0x04000000 diff --git a/include/sys/zmod.h b/include/sys/zmod.h index f1a63174a..246aa2aec 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -55,105 +55,15 @@ #ifndef _SPL_ZMOD_H #define _SPL_ZMOD_H +#include #include -/* - * Compresses the source buffer into the destination buffer. The level - * parameter has the same meaning as in deflateInit. sourceLen is the byte - * length of the source buffer. Upon entry, destLen is the total size of the - * destination buffer, which must be at least 0.1% larger than sourceLen plus - * 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. - * - * compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - * memory, Z_BUF_ERROR if there was not enough room in the output buffer, - * Z_STREAM_ERROR if the level parameter is invalid. - */ -static __inline__ int -z_compress_level(void *dest, size_t *destLen, const void *source, - size_t sourceLen, int level) -{ - z_stream stream; - int err; +extern int z_compress_level(void *dest, size_t *destLen, const void *source, + size_t sourceLen, int level); +extern int z_uncompress(void *dest, size_t *destLen, const void *source, + size_t sourceLen); - stream.next_in = (Byte *)source; - stream.avail_in = (uInt)sourceLen; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((size_t)stream.avail_in != sourceLen) - return Z_BUF_ERROR; -#endif - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - - if ((size_t)stream.avail_out != *destLen) - return Z_BUF_ERROR; - - err = zlib_deflateInit(&stream, level); - if (err != Z_OK) - return err; - - err = zlib_deflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - zlib_deflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; - } - *destLen = stream.total_out; - - err = zlib_deflateEnd(&stream); - return err; -} /* z_compress_level() */ - -/* - * Decompresses the source buffer into the destination buffer. sourceLen is - * the byte length of the source buffer. Upon entry, destLen is the total - * size of the destination buffer, which must be large enough to hold the - * entire uncompressed data. (The size of the uncompressed data must have - * been saved previously by the compressor and transmitted to the decompressor - * by some mechanism outside the scope of this compression library.) - * Upon exit, destLen is the actual size of the compressed buffer. - * This function can be used to decompress a whole file at once if the - * input file is mmap'ed. - * - * uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - * enough memory, Z_BUF_ERROR if there was not enough room in the output - * buffer, or Z_DATA_ERROR if the input data was corrupted. - */ -static __inline__ int -z_uncompress(void *dest, size_t *destLen, const void *source, size_t sourceLen) -{ - z_stream stream; - int err; - - stream.next_in = (Byte *)source; - stream.avail_in = (uInt)sourceLen; - /* Check for source > 64K on 16-bit machine: */ - if ((size_t)stream.avail_in != sourceLen) - return Z_BUF_ERROR; - - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - - if ((size_t)stream.avail_out != *destLen) - return Z_BUF_ERROR; - - err = zlib_inflateInit(&stream); - if (err != Z_OK) - return err; - - err = zlib_inflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - zlib_inflateEnd(&stream); - - if (err == Z_NEED_DICT || - (err == Z_BUF_ERROR && stream.avail_in == 0)) - return Z_DATA_ERROR; - - return err; - } - *destLen = stream.total_out; - - err = zlib_inflateEnd(&stream); - return err; -} /* z_uncompress() */ +int zlib_init(void); +void zlib_fini(void); #endif /* SPL_ZMOD_H */ diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 483933b64..a0211d2db 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -27,3 +27,4 @@ spl-objs += @top_srcdir@/module/spl/spl-condvar.o spl-objs += @top_srcdir@/module/spl/spl-xdr.o spl-objs += @top_srcdir@/module/spl/spl-cred.o spl-objs += @top_srcdir@/module/spl/spl-tsd.o +spl-objs += @top_srcdir@/module/spl/spl-zlib.o diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 2c76c7964..21e8c5d3d 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -160,6 +160,8 @@ spl_debug_subsys2str(int subsys) return "xdr"; case SS_TSD: return "tsd"; + case SS_ZLIB: + return "zlib"; case SS_USER1: return "user1"; case SS_USER2: diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index b83d753d8..2b43f0c33 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -471,20 +472,25 @@ __init spl_init(void) if ((rc = tsd_init())) SGOTO(out8, rc); + if ((rc = zlib_init())) + SGOTO(out9, rc); + if ((rc = set_hostid())) - SGOTO(out9, rc = -EADDRNOTAVAIL); + SGOTO(out10, rc = -EADDRNOTAVAIL); #ifndef HAVE_KALLSYMS_LOOKUP_NAME if ((rc = set_kallsyms_lookup_name())) - SGOTO(out9, rc = -EADDRNOTAVAIL); + SGOTO(out10, rc = -EADDRNOTAVAIL); #endif /* HAVE_KALLSYMS_LOOKUP_NAME */ if ((rc = spl_kmem_init_kallsyms_lookup())) - SGOTO(out9, rc); + SGOTO(out10, rc); printk(KERN_NOTICE "SPL: Loaded Solaris Porting Layer v%s%s\n", SPL_META_VERSION, SPL_DEBUG_STR); SRETURN(rc); +out10: + zlib_fini(); out9: tsd_fini(); out8: @@ -516,6 +522,7 @@ spl_fini(void) printk(KERN_NOTICE "SPL: Unloaded Solaris Porting Layer v%s%s\n", SPL_META_VERSION, SPL_DEBUG_STR); + zlib_fini(); tsd_fini(); kstat_fini(); proc_fini(); diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c new file mode 100644 index 000000000..02825b461 --- /dev/null +++ b/module/spl/spl-zlib.c @@ -0,0 +1,217 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . + ***************************************************************************** + * z_compress_level/z_uncompress are nearly identical copies of the + * compress2/uncompress functions provided by the official zlib package + * available at http://zlib.net/. The only changes made we to slightly + * adapt the functions called to match the linux kernel implementation + * of zlib. The full zlib license follows: + * + * zlib.h -- interface of the 'zlib' general purpose compression library + * version 1.2.5, April 19th, 2010 + * + * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + * Jean-loup Gailly + * Mark Adler +\*****************************************************************************/ + + +#include +#include +#include + +#ifdef DEBUG_SUBSYSTEM +#undef DEBUG_SUBSYSTEM +#endif + +#define DEBUG_SUBSYSTEM SS_ZLIB + +static spl_kmem_cache_t *zlib_workspace_cache; + +/* + * A kmem_cache is used for the zlib workspaces to avoid having to vmalloc + * and vfree for every call. Using a kmem_cache also has the advantage + * that improves the odds that the memory used will be local to this cpu. + * To further improve things it might be wise to create a dedicated per-cpu + * workspace for use. This would take some additional care because we then + * must disable preemption around the critical section, and verify that + * zlib_deflate* and zlib_inflate* never internally call schedule(). + */ +static void * +zlib_workspace_alloc(int flags) +{ + return kmem_cache_alloc(zlib_workspace_cache, flags & ~(__GFP_FS)); +} + +static void +zlib_workspace_free(void *workspace) +{ + kmem_cache_free(zlib_workspace_cache, workspace); +} + +/* + * Compresses the source buffer into the destination buffer. The level + * parameter has the same meaning as in deflateInit. sourceLen is the byte + * length of the source buffer. Upon entry, destLen is the total size of the + * destination buffer, which must be at least 0.1% larger than sourceLen plus + * 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + * + * compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + * memory, Z_BUF_ERROR if there was not enough room in the output buffer, + * Z_STREAM_ERROR if the level parameter is invalid. + */ +int +z_compress_level(void *dest, size_t *destLen, const void *source, + size_t sourceLen, int level) +{ + z_stream stream; + int err; + + stream.next_in = (Byte *)source; + stream.avail_in = (uInt)sourceLen; + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + + if ((size_t)stream.avail_out != *destLen) + return Z_BUF_ERROR; + + stream.workspace = zlib_workspace_alloc(KM_SLEEP); + if (!stream.workspace) + return Z_MEM_ERROR; + + err = zlib_deflateInit(&stream, level); + if (err != Z_OK) { + zlib_workspace_free(stream.workspace); + return err; + } + + err = zlib_deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + zlib_deflateEnd(&stream); + zlib_workspace_free(stream.workspace); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = zlib_deflateEnd(&stream); + zlib_workspace_free(stream.workspace); + + return err; +} +EXPORT_SYMBOL(z_compress_level); + +/* + * Decompresses the source buffer into the destination buffer. sourceLen is + * the byte length of the source buffer. Upon entry, destLen is the total + * size of the destination buffer, which must be large enough to hold the + * entire uncompressed data. (The size of the uncompressed data must have + * been saved previously by the compressor and transmitted to the decompressor + * by some mechanism outside the scope of this compression library.) + * Upon exit, destLen is the actual size of the compressed buffer. + * This function can be used to decompress a whole file at once if the + * input file is mmap'ed. + * + * uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + * enough memory, Z_BUF_ERROR if there was not enough room in the output + * buffer, or Z_DATA_ERROR if the input data was corrupted. + */ +int +z_uncompress(void *dest, size_t *destLen, const void *source, size_t sourceLen) +{ + z_stream stream; + int err; + + stream.next_in = (Byte *)source; + stream.avail_in = (uInt)sourceLen; + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + + if ((size_t)stream.avail_out != *destLen) + return Z_BUF_ERROR; + + stream.workspace = zlib_workspace_alloc(KM_SLEEP); + if (!stream.workspace) + return Z_MEM_ERROR; + + err = zlib_inflateInit(&stream); + if (err != Z_OK) { + zlib_workspace_free(stream.workspace); + return err; + } + + err = zlib_inflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + zlib_inflateEnd(&stream); + zlib_workspace_free(stream.workspace); + + if (err == Z_NEED_DICT || + (err == Z_BUF_ERROR && stream.avail_in == 0)) + return Z_DATA_ERROR; + + return err; + } + *destLen = stream.total_out; + + err = zlib_inflateEnd(&stream); + zlib_workspace_free(stream.workspace); + + return err; +} +EXPORT_SYMBOL(z_uncompress); + +int zlib_init(void) +{ + SENTRY; + zlib_workspace_cache = kmem_cache_create("spl_zlib_workspace_cache", + max(zlib_deflate_workspacesize(), zlib_inflate_workspacesize()), + 0, NULL, NULL, NULL, NULL, NULL, KMC_VMEM); + if (!zlib_workspace_cache) + SRETURN(1); + + SRETURN(0); +} + +void zlib_fini(void) +{ + SENTRY; + kmem_cache_destroy(zlib_workspace_cache); + zlib_workspace_cache = NULL; + SEXIT; +} From 19c1eb829d014cc64a5742710dae042bdaef25ae Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 25 Feb 2011 15:48:18 -0800 Subject: [PATCH 0487/1062] Add zlib regression test A zlib regression test has been added to verify the correct behavior of z_compress_level() and z_uncompress. The test case simply takes a 128k buffer, it compresses the buffer, it them uncompresses the buffer, and finally it compares the buffers after the transform. If the buffers match then everything is fine and no data was lost. It performs this test for all 9 zlib compression levels. --- include/splat-ctl.h | 1 + module/splat/Makefile.in | 1 + module/splat/splat-ctl.c | 2 + module/splat/splat-internal.h | 4 + module/splat/splat-zlib.c | 162 ++++++++++++++++++++++++++++++++++ scripts/check.sh | 2 + 6 files changed, 172 insertions(+) create mode 100644 module/splat/splat-zlib.c diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 61c7e0e3c..6f15ba2e8 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -104,6 +104,7 @@ typedef struct splat_cmd { #define SPLAT_SUBSYSTEM_LIST 0x0c00 #define SPLAT_SUBSYSTEM_GENERIC 0x0d00 #define SPLAT_SUBSYSTEM_CRED 0x0e00 +#define SPLAT_SUBSYSTEM_ZLIB 0x0f00 #define SPLAT_SUBSYSTEM_UNKNOWN 0xff00 #endif /* _SPLAT_CTL_H */ diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index 724f824d5..2bf25c5b2 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -23,3 +23,4 @@ splat-objs += @top_srcdir@/module/splat/splat-atomic.o splat-objs += @top_srcdir@/module/splat/splat-list.o splat-objs += @top_srcdir@/module/splat/splat-generic.o splat-objs += @top_srcdir@/module/splat/splat-cred.o +splat-objs += @top_srcdir@/module/splat/splat-zlib.o diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index de72b805f..65ad8c113 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -632,6 +632,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(list); SPLAT_SUBSYSTEM_INIT(generic); SPLAT_SUBSYSTEM_INIT(cred); + SPLAT_SUBSYSTEM_INIT(zlib); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, SPLAT_NAME))) @@ -680,6 +681,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(zlib); SPLAT_SUBSYSTEM_FINI(cred); SPLAT_SUBSYSTEM_FINI(generic); SPLAT_SUBSYSTEM_FINI(list); diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index c42e08d6f..072abb8c7 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -63,6 +63,7 @@ #include #include #include +#include #include #include "spl-device.h" @@ -218,6 +219,7 @@ splat_subsystem_t *splat_atomic_init(void); splat_subsystem_t *splat_list_init(void); splat_subsystem_t *splat_generic_init(void); splat_subsystem_t *splat_cred_init(void); +splat_subsystem_t *splat_zlib_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -233,6 +235,7 @@ void splat_atomic_fini(splat_subsystem_t *); void splat_list_fini(splat_subsystem_t *); void splat_generic_fini(splat_subsystem_t *); void splat_cred_fini(splat_subsystem_t *); +void splat_zlib_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -248,5 +251,6 @@ int splat_atomic_id(void); int splat_list_id(void); int splat_generic_id(void); int splat_cred_id(void); +int splat_zlib_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/module/splat/splat-zlib.c b/module/splat/splat-zlib.c new file mode 100644 index 000000000..465d34091 --- /dev/null +++ b/module/splat/splat-zlib.c @@ -0,0 +1,162 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Zlib Compression Tests. +\*****************************************************************************/ + +#include "splat-internal.h" + +#define SPLAT_ZLIB_NAME "zlib" +#define SPLAT_ZLIB_DESC "Zlib Compression Tests" + +#define SPLAT_ZLIB_TEST1_ID 0x0f01 +#define SPLAT_ZLIB_TEST1_NAME "compress/uncompress" +#define SPLAT_ZLIB_TEST1_DESC "Compress/Uncompress Test" + +#define BUFFER_SIZE (128 * 1024) + +static int +splat_zlib_test1_check(struct file *file, void *src, void *dst, void *chk, + int level) +{ + size_t dst_len = BUFFER_SIZE; + size_t chk_len = BUFFER_SIZE; + int rc; + + memset(dst, 0, BUFFER_SIZE); + memset(chk, 0, BUFFER_SIZE); + + rc = z_compress_level(dst, &dst_len, src, BUFFER_SIZE, level); + if (rc != Z_OK) { + splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, + "Failed level %d z_compress_level(), %d\n", level, rc); + return -EINVAL; + } + + rc = z_uncompress(chk, &chk_len, dst, dst_len); + if (rc != Z_OK) { + splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, + "Failed level %d z_uncompress(), %d\n", level, rc); + return -EINVAL; + } + + rc = memcmp(src, chk, BUFFER_SIZE); + if (rc) { + splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, + "Failed level %d memcmp()), %d\n", level, rc); + return -EINVAL; + } + + splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, + "Passed level %d, compressed %d bytes to %d bytes\n", + level, BUFFER_SIZE, (int)dst_len); + + return 0; +} + +/* + * Compress a buffer, uncompress the newly compressed buffer, then + * compare it to the original. Do this for all 9 compression levels. + */ +static int +splat_zlib_test1(struct file *file, void *arg) +{ + void *src = NULL, *dst = NULL, *chk = NULL; + int i, rc, level; + + src = vmalloc(BUFFER_SIZE); + if (src == NULL) { + rc = -ENOMEM; + goto out; + } + + dst = vmalloc(BUFFER_SIZE); + if (dst == NULL) { + rc = -ENOMEM; + goto out; + } + + chk = vmalloc(BUFFER_SIZE); + if (chk == NULL) { + rc = -ENOMEM; + goto out; + } + + /* Source buffer is a repeating 1024 byte random pattern. */ + random_get_pseudo_bytes(src, sizeof(uint8_t) * 1024); + for (i = 1; i < 128; i++) + memcpy(src + (i * 1024), src, 1024); + + for (level = 1; level <= 9; level++) + if ((rc = splat_zlib_test1_check(file, src, dst, chk, level))) + break; +out: + if (src) + vfree(src); + + if (dst) + vfree(dst); + + if (chk) + vfree(chk); + + return rc; +} + +splat_subsystem_t * +splat_zlib_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_ZLIB_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_ZLIB_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_ZLIB; + + SPLAT_TEST_INIT(sub, SPLAT_ZLIB_TEST1_NAME, SPLAT_ZLIB_TEST1_DESC, + SPLAT_ZLIB_TEST1_ID, splat_zlib_test1); + + return sub; +} + +void +splat_zlib_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + + SPLAT_TEST_FINI(sub, SPLAT_ZLIB_TEST1_ID); + + kfree(sub); +} + +int +splat_zlib_id(void) { + return SPLAT_SUBSYSTEM_ZLIB; +} diff --git a/scripts/check.sh b/scripts/check.sh index b44b31333..4e4940685 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -62,6 +62,8 @@ if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then die "Source tree must be built, run 'make'" fi +/sbin/modprobe zlib_deflate &>/dev/null + spl_module_params="spl_debug_mask=0xffffffff spl_debug_subsys=0xffffffff" echo "Loading ${spl_module}" /sbin/insmod ${spl_module} ${spl_module_params} || die "Failed to load ${spl_module}" From a4a1e1ecb42c3a0d9a25b5b0e0b400147b91bdb3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Mar 2011 15:21:38 -0800 Subject: [PATCH 0488/1062] Add TIMESPEC_OVERFLOW helper Add the TIMESPEC_OVERFLOW helper macro to allow easy checking of timespec overflow. --- include/sys/time.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/sys/time.h b/include/sys/time.h index e4470a491..ed3aae934 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -82,4 +82,7 @@ gethrestime_sec(void) return now.tv_sec; } +#define TIMESPEC_OVERFLOW(ts) \ + ((ts)->tv_sec < TIME32_MIN || (ts)->tv_sec > TIME32_MAX) + #endif /* _SPL_TIME_H */ From 47995fa691a789132373acaedf1e2a64cf213be1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Mar 2011 14:02:06 -0800 Subject: [PATCH 0489/1062] Remove xvattr support The xvattr support in the spl has always simply consisted of defining a couple structures and a few #defines. This was enough to enable compilation of code which just passed xvattr types around but not enough to effectively manipulate them. This change removes even this minimal support leaving it up to packages which leverage the spl to prove the full xvattr support. By removing it from the spl we ensure not conflict with the higher level packages. This just leaves minimal vnode support for basical manipulation of files. This code is does have the proper support functions in the spl and a set of regression tests. Additionally, this change removed the unused 'caller_context_t *' type and replaces it with a 'void *'. --- include/sys/vnode.h | 96 ++++++++++++------------------------------ module/spl/spl-vnode.c | 4 +- 2 files changed, 28 insertions(+), 72 deletions(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index d017506ba..09c22585a 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -42,9 +42,6 @@ #include #include -#define XVA_MAPSIZE 3 -#define XVA_MAGIC 0x78766174 - /* * Prior to linux-2.6.33 only O_DSYNC semantics were implemented and * they used the O_SYNC flag. As of linux-2.6.33 the this behavior @@ -69,24 +66,28 @@ #define FNODSYNC 0x10000 /* fsync pseudo flag */ #define FNOFOLLOW 0x20000 /* don't follow symlinks */ -#define AT_TYPE 0x00001 -#define AT_MODE 0x00002 -#undef AT_UID /* Conflicts with linux/auxvec.h */ -#define AT_UID 0x00004 -#undef AT_GID /* Conflicts with linux/auxvec.h */ -#define AT_GID 0x00008 -#define AT_FSID 0x00010 -#define AT_NODEID 0x00020 -#define AT_NLINK 0x00040 -#define AT_SIZE 0x00080 -#define AT_ATIME 0x00100 -#define AT_MTIME 0x00200 -#define AT_CTIME 0x00400 -#define AT_RDEV 0x00800 -#define AT_BLKSIZE 0x01000 -#define AT_NBLOCKS 0x02000 -#define AT_SEQ 0x08000 -#define AT_XVATTR 0x10000 +/* + * The vnode AT_ flags are mapped to the Linux ATTR_* flags. + * This allows them to be used safely with an iattr structure. + * The AT_XVATTR flag has been added and mapped to the upper + * bit range to avoid conflicting with the standard Linux set. + */ +#undef AT_UID +#undef AT_GID + +#define AT_MODE ATTR_MODE +#define AT_UID ATTR_UID +#define AT_GID ATTR_GID +#define AT_SIZE ATTR_SIZE +#define AT_ATIME ATTR_ATIME +#define AT_MTIME ATTR_MTIME +#define AT_CTIME ATTR_CTIME + +#define ATTR_XVATTR (1 << 31) +#define AT_XVATTR ATTR_XVATTR + +#define ATTR_IATTR_MASK (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_SIZE | \ + ATTR_ATIME | ATTR_MTIME | ATTR_CTIME | ATTR_FILE) #define CRCREAT 0x01 #define RMFILE 0x02 @@ -94,9 +95,6 @@ #define B_INVAL 0x01 #define B_TRUNC 0x02 -#define V_ACE_MASK 0x0001 -#define V_APPEND 0x0002 - #define LOOKUP_DIR 0x01 #define LOOKUP_XATTR 0x02 #define CREATE_XATTR_DIR 0x04 @@ -135,50 +133,15 @@ typedef struct vattr { long va_nodeid; /* node # */ uint32_t va_nlink; /* # links */ uint64_t va_size; /* file size */ - uint32_t va_blocksize; /* block size */ - uint64_t va_nblocks; /* space used */ struct timespec va_atime; /* last acc */ struct timespec va_mtime; /* last mod */ struct timespec va_ctime; /* last chg */ dev_t va_rdev; /* dev */ + uint64_t va_nblocks; /* space used */ + uint32_t va_blksize; /* block size */ + uint32_t va_seq; /* sequence */ } vattr_t; -typedef struct xoptattr { - timestruc_t xoa_createtime; /* Create time of file */ - uint8_t xoa_archive; - uint8_t xoa_system; - uint8_t xoa_readonly; - uint8_t xoa_hidden; - uint8_t xoa_nounlink; - uint8_t xoa_immutable; - uint8_t xoa_appendonly; - uint8_t xoa_nodump; - uint8_t xoa_settable; - uint8_t xoa_opaque; - uint8_t xoa_av_quarantined; - uint8_t xoa_av_modified; -} xoptattr_t; - -typedef struct xvattr { - vattr_t xva_vattr; /* Embedded vattr structure */ - uint32_t xva_magic; /* Magic Number */ - uint32_t xva_mapsize; /* Size of attr bitmap (32-bit words) */ - uint32_t *xva_rtnattrmapp; /* Ptr to xva_rtnattrmap[] */ - uint32_t xva_reqattrmap[XVA_MAPSIZE]; /* Requested attrs */ - uint32_t xva_rtnattrmap[XVA_MAPSIZE]; /* Returned attrs */ - xoptattr_t xva_xoptattrs; /* Optional attributes */ -} xvattr_t; - -typedef struct vsecattr { - uint_t vsa_mask; /* See below */ - int vsa_aclcnt; /* ACL entry count */ - void *vsa_aclentp; /* pointer to ACL entries */ - int vsa_dfaclcnt; /* default ACL entry count */ - void *vsa_dfaclentp; /* pointer to default ACL entries */ - size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ - uint_t vsa_aclflags; /* ACE ACL flags */ -} vsecattr_t; - typedef struct vnode { struct file *v_file; kmutex_t v_lock; /* protects vnode fields */ @@ -202,13 +165,6 @@ typedef struct vn_file { struct list_head f_list; /* list referenced file_t's */ } file_t; -typedef struct caller_context { - pid_t cc_pid; /* Process ID of the caller */ - int cc_sysid; /* System ID, used for remote calls */ - u_longlong_t cc_caller_id; /* Identifier for (set of) caller(s) */ - ulong_t cc_flags; -} caller_context_t; - extern vnode_t *vn_alloc(int flag); void vn_free(vnode_t *vp); extern vtype_t vn_mode_to_vtype(mode_t); @@ -221,7 +177,7 @@ extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, uio_seg_t seg, int x1, rlim64_t x2, void *x3, ssize_t *residp); extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4); -extern int vn_seek(vnode_t *vp, offset_t o, offset_t *op, caller_context_t *ct); +extern int vn_seek(vnode_t *vp, offset_t o, offset_t *op, void *ct); extern int vn_remove(const char *path, uio_seg_t seg, int flags); extern int vn_rename(const char *path1, const char *path2, int x1); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 7630ffd33..32ae4865d 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -283,7 +283,7 @@ EXPORT_SYMBOL(vn_close); * proposed seek. We perform minimal checking and allow vn_rdwr() to catch * anything more serious. */ int -vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, caller_context_t *ct) +vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct) { return ((*noffp < 0 || *noffp > MAXOFFSET_T) ? EINVAL : 0); } @@ -476,7 +476,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) vap->va_nodeid = stat.ino; vap->va_nlink = stat.nlink; vap->va_size = stat.size; - vap->va_blocksize = stat.blksize; + vap->va_blksize = stat.blksize; vap->va_atime = stat.atime; vap->va_mtime = stat.mtime; vap->va_ctime = stat.ctime; From 7731d46b69bd893d515c55e87ffa8a9bd2ddfb38 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Mar 2011 10:58:07 -0800 Subject: [PATCH 0490/1062] Make CONFIG_PREEMPT Fatal Until support is added for preemptible kernels detect this at configure time and make it fatal. Otherwise, it is possible to have a successful build and kernel modules with flakey behavior. --- config/spl-build.m4 | 8 +++ configure | 146 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2356f209f..2cf71f41c 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -8,6 +8,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL + SPL_AC_KERNEL_CONFIG if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" @@ -190,6 +191,13 @@ AC_DEFUN([SPL_AC_KERNEL], [ SPL_AC_MODULE_SYMVERS ]) +AC_DEFUN([SPL_AC_KERNEL_CONFIG], [ + SPL_LINUX_CONFIG([PREEMPT], + AC_MSG_ERROR([ + *** Kernel built with CONFIG_PREEMPT which is not supported. + ** You must rebuild your kernel without this option.]), []) +]) + dnl # dnl # Explicitly check for gawk, we require it for the the usermode dnl # helper. For some reason the standard awk command does not diff --git a/configure b/configure index 535ca2e7d..5f5001937 100755 --- a/configure +++ b/configure @@ -11793,6 +11793,79 @@ $as_echo "$LINUX_SYMBOLS" >&6; } + { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 +$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #ifndef AUTOCONF_INCLUDED + #include + #endif + +int +main (void) +{ + + #ifndef CONFIG_PREEMPT + #error CONFIG_PREEMPT not #defined + #endif + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + ** You must rebuild your kernel without this option." >&5 +$as_echo "$as_me: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + ** You must rebuild your kernel without this option." >&2;} + { (exit 1); exit 1; }; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + + +fi + + rm -Rf build + + + + + if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi @@ -15528,6 +15601,79 @@ $as_echo "$LINUX_SYMBOLS" >&6; } + { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 +$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #ifndef AUTOCONF_INCLUDED + #include + #endif + +int +main (void) +{ + + #ifndef CONFIG_PREEMPT + #error CONFIG_PREEMPT not #defined + #endif + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + ** You must rebuild your kernel without this option." >&5 +$as_echo "$as_me: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + ** You must rebuild your kernel without this option." >&2;} + { (exit 1); exit 1; }; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + + +fi + + rm -Rf build + + + + + if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi From 912fd84d13e2aa539695598df4daffeeec549c43 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Mar 2011 12:59:30 -0800 Subject: [PATCH 0491/1062] Make Missing Modules.symvers Fatal Detect early on in configure if the Modules.symvers file is missing. Without this file there will be build failures later and it's best to catch this early and provide a useful error. In this case the most likely problem is the kernel-devel packages are not installed. It may also be possible that they are using an unbuilt custom kernel in which case they must build the kernel first. --- config/spl-build.m4 | 8 ++++++++ configure | 28 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2cf71f41c..72bb3258e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -87,6 +87,14 @@ AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ else LINUX_SYMBOLS=Module.symvers fi + + if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + AC_MSG_ERROR([ + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source.]) + fi else LINUX_SYMBOLS=NONE fi diff --git a/configure b/configure index 5f5001937..f5c6a063a 100755 --- a/configure +++ b/configure @@ -11784,6 +11784,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; } else LINUX_SYMBOLS=Module.symvers fi + + if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&2;} + { (exit 1); exit 1; }; } + fi else LINUX_SYMBOLS=NONE fi @@ -15592,6 +15606,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; } else LINUX_SYMBOLS=Module.symvers fi + + if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&2;} + { (exit 1); exit 1; }; } + fi else LINUX_SYMBOLS=NONE fi From 6788762766d137754d164ced45d1e80540391531 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Mar 2011 13:52:00 -0800 Subject: [PATCH 0492/1062] Linux 2.6.31 compat, include linux/seq_file.h Explicitly include the linux/seq_file.h header in vfs.h. This header is required for the sequence handlers and is included indirectly in newer kernels. --- include/sys/vfs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/vfs.h b/include/sys/vfs.h index cc6c3b693..9399afbef 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -31,6 +31,7 @@ #include #include #include +#include #define MAXFIDSZ 64 From 181a9b89988a00a3faa06203b94cc155f10fe1e7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Mar 2011 15:16:10 -0800 Subject: [PATCH 0493/1062] Prep spl-0.6.0-rc2 tag Create the second 0.6.0 release candidate tag (rc2). --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 59f8b34b8..f33eda4ee 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc1 +Release: rc2 Release-Tags: relext From cb255ae57278be3206693b5116eff95e612e809a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 19 Mar 2011 13:49:14 -0700 Subject: [PATCH 0494/1062] Remove default GFP_NOFS allocations As originally described in commit 82b8c8fa64737edfb203156b245b48840139d2c1 this was done to prevent certain deadlocks from occuring in the system. However, as suspected the price for doing this proved to be too high. The VM is having a hard time effectively reclaiming memory thus we are reverting this change. However, we still need to fundamentally handle the issue. Under Solaris the KM_PUSHPAGE mask is used commonly in I/O paths to ensure a memory allocations will succeed. We leverage this fact and redefine KM_PUSHPAGE to include GFP_NOFS. This ensures that in these common I/O path we don't trigger additional reclaim. This minimizes the change to the Solaris code. --- include/sys/kmem.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index fd4c52e1e..6b6b95c12 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -41,13 +41,12 @@ /* * Memory allocation interfaces */ -#define KM_SLEEP GFP_NOFS -#define KM_NOSLEEP GFP_ATOMIC -#undef KM_PANIC /* No linux analog */ -#define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH) -#define KM_VMFLAGS GFP_LEVEL_MASK -#define KM_FLAGS __GFP_BITS_MASK -#define KM_NODEBUG __GFP_NOWARN +#define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */ +#define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */ +#define KM_PUSHPAGE (GFP_NOFS | __GFP_HIGH) /* Use reserved memory */ +#define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */ +#define KM_FLAGS __GFP_BITS_MASK +#define KM_VMFLAGS GFP_LEVEL_MASK /* * Used internally, the kernel does not need to support this flag From 2092cf68d89a51eb0d6193aeadabb579dfc4b4a0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 20 Mar 2011 15:03:18 -0700 Subject: [PATCH 0495/1062] Disable vmalloc() direct reclaim As part of vmalloc() a __pte_alloc_kernel() allocation may occur. This internal allocation does not honor the gfp flags passed to vmalloc(). This means even when vmalloc(GFP_NOFS) is called it is possible that a synchronous reclaim will occur. This reclaim can trigger file IO which can result in a deadlock. This issue can be avoided by explicitly setting PF_MEMALLOC on the process to subvert synchronous reclaim when vmalloc() is called with !__GFP_FS. An example stack of the deadlock can be found here (1), along with the upstream kernel bug (2), and the original bug discussion on the linux-mm mailing list (3). This code can be properly autoconf'ed when the upstream bug is fixed. 1) http://github.com/behlendorf/zfs/issues/labels/Vmalloc#issue/133 2) http://bugzilla.kernel.org/show_bug.cgi?id=30702 3) http://marc.info/?l=linux-mm&m=128942194520631&w=4 --- module/spl/spl-kmem.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 100d674e5..2f533bdf6 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -842,11 +842,31 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) ASSERT(ISP2(size)); - if (skc->skc_flags & KMC_KMEM) + if (skc->skc_flags & KMC_KMEM) { ptr = (void *)__get_free_pages(flags, get_order(size)); - else + } else { + /* + * As part of vmalloc() an __pte_alloc_kernel() allocation + * may occur. This internal allocation does not honor the + * gfp flags passed to vmalloc(). This means even when + * vmalloc(GFP_NOFS) is called it is possible synchronous + * reclaim will occur. This reclaim can trigger file IO + * which can result in a deadlock. This issue can be avoided + * by explicitly setting PF_MEMALLOC on the process to + * subvert synchronous reclaim. The following bug has + * been filed at kernel.org to track the issue. + * + * https://bugzilla.kernel.org/show_bug.cgi?id=30702 + */ + if (!(flags & __GFP_FS)) + current->flags |= PF_MEMALLOC; + ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); + if (!(flags & __GFP_FS)) + current->flags &= ~PF_MEMALLOC; + } + /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); From 9b0c3b2aa87610690cf6e1a792ff1484274a392d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 21 Mar 2011 16:32:29 -0700 Subject: [PATCH 0496/1062] Load zlib_inflate.ko Certain stock kernels (Debian Lenny) are built with zlib_inflate.ko as a kernel module. To ensure 'make check' works in-tree load this module before loading the spl module. This is now required for the zlib splat regression test. --- scripts/check.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check.sh b/scripts/check.sh index 4e4940685..8c0e0c5cb 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -62,6 +62,7 @@ if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then die "Source tree must be built, run 'make'" fi +/sbin/modprobe zlib_inflate &>/dev/null /sbin/modprobe zlib_deflate &>/dev/null spl_module_params="spl_debug_mask=0xffffffff spl_debug_subsys=0xffffffff" From 734fcac78d8c430aeb3731590b77dfcfa6de224f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 22 Mar 2011 11:18:15 -0700 Subject: [PATCH 0497/1062] Add crgetfsuid()/crgetfsgid() helpers Solaris credentials don't have an fsuid/fsguid field but Linux credentials do. To handle this case the Solaris API is being modestly extended to include the crgetfsuid()/crgetfsgid() helper functions. Addititionally, because the crget*() helpers are implemented identically regardless of HAVE_CRED_STRUCT they have been moved outside the #ifdef to common code. This simplification means we only have one version of the helper to keep to to date. --- include/sys/cred.h | 2 + module/spl/spl-cred.c | 136 ++++++++++++++++++------------------------ 2 files changed, 60 insertions(+), 78 deletions(-) diff --git a/include/sys/cred.h b/include/sys/cred.h index 6f4cde73c..778d05255 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -50,9 +50,11 @@ extern void crfree(cred_t *cr); extern uid_t crgetuid(const cred_t *cr); extern uid_t crgetruid(const cred_t *cr); extern uid_t crgetsuid(const cred_t *cr); +extern uid_t crgetfsuid(const cred_t *cr); extern gid_t crgetgid(const cred_t *cr); extern gid_t crgetrgid(const cred_t *cr); extern gid_t crgetsgid(const cred_t *cr); +extern gid_t crgetfsgid(const cred_t *cr); extern int crgetngroups(const cred_t *cr); extern gid_t * crgetgroups(const cred_t *cr); extern int groupmember(gid_t gid, const cred_t *cr); diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index dd5d9da01..ce3425d32 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -84,48 +84,6 @@ crfree(cred_t *cr) put_cred((const cred_t *)cr); } -/* Return the effective user id */ -uid_t -crgetuid(const cred_t *cr) -{ - return cr->euid; -} - -/* Return the real user id */ -uid_t -crgetruid(const cred_t *cr) -{ - return cr->uid; -} - -/* Return the saved user id */ -uid_t -crgetsuid(const cred_t *cr) -{ - return cr->suid; -} - -/* Return the effective group id */ -gid_t -crgetgid(const cred_t *cr) -{ - return cr->egid; -} - -/* Return the real group id */ -gid_t -crgetrgid(const cred_t *cr) -{ - return cr->gid; -} - -/* Return the saved group id */ -gid_t -crgetsgid(const cred_t *cr) -{ - return cr->sgid; -} - /* Return the number of supplemental groups */ int crgetngroups(const cred_t *cr) @@ -186,42 +144,6 @@ void crhold(cred_t *cr) { } /* Free a reference on the credential and group info */ void crfree(cred_t *cr) { } -/* Return the effective user id */ -uid_t -crgetuid(const cred_t *cr) { - return cr->euid; -} - -/* Return the effective real id */ -uid_t -crgetruid(const cred_t *cr) { - return cr->uid; -} - -/* Return the effective saved id */ -uid_t -crgetsuid(const cred_t *cr) { - return cr->suid; -} - -/* Return the effective group id */ -gid_t -crgetgid(const cred_t *cr) { - return cr->egid; -} - -/* Return the real group id */ -gid_t -crgetrgid(const cred_t *cr) { - return cr->gid; -} - -/* Return the saved group id */ -gid_t -crgetsgid(const cred_t *cr) { - return cr->sgid; -} - /* Return the number of supplemental groups */ int crgetngroups(const cred_t *cr) @@ -289,14 +211,72 @@ groupmember(gid_t gid, const cred_t *cr) #endif /* HAVE_CRED_STRUCT */ +/* Return the effective user id */ +uid_t +crgetuid(const cred_t *cr) +{ + return cr->euid; +} + +/* Return the real user id */ +uid_t +crgetruid(const cred_t *cr) +{ + return cr->uid; +} + +/* Return the saved user id */ +uid_t +crgetsuid(const cred_t *cr) +{ + return cr->suid; +} + +/* Return the filesystem user id */ +uid_t +crgetfsuid(const cred_t *cr) +{ + return cr->fsuid; +} + +/* Return the effective group id */ +gid_t +crgetgid(const cred_t *cr) +{ + return cr->egid; +} + +/* Return the real group id */ +gid_t +crgetrgid(const cred_t *cr) +{ + return cr->gid; +} + +/* Return the saved group id */ +gid_t +crgetsgid(const cred_t *cr) +{ + return cr->sgid; +} + +/* Return the filesystem group id */ +gid_t +crgetfsgid(const cred_t *cr) +{ + return cr->fsgid; +} + EXPORT_SYMBOL(crhold); EXPORT_SYMBOL(crfree); EXPORT_SYMBOL(crgetuid); EXPORT_SYMBOL(crgetruid); EXPORT_SYMBOL(crgetsuid); +EXPORT_SYMBOL(crgetfsuid); EXPORT_SYMBOL(crgetgid); EXPORT_SYMBOL(crgetrgid); EXPORT_SYMBOL(crgetsgid); +EXPORT_SYMBOL(crgetfsgid); EXPORT_SYMBOL(crgetngroups); EXPORT_SYMBOL(crgetgroups); EXPORT_SYMBOL(groupmember); From af67391e45967dfa63346fe5cc8d2748e79b8406 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 31 Mar 2011 13:43:49 -0700 Subject: [PATCH 0498/1062] Update CHAOS 5 Packaging The CHAOS 5 kernels are now packaged identially to the RHEL6 kernels. Therefore we can simply use the RHEL6 rules in the spec file when building packages. --- spl-modules.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 92ccbd21f..76dcfa643 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -66,8 +66,8 @@ %endif %else -# CHAOS 4.x/5.x: -%if %{defined ch4} || %{defined ch5} +# CHAOS 4.x: +%if %{defined ch4} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config %define kver %((echo X; %{__cat} %{klnk}/kernel.release @@ -85,8 +85,8 @@ %endif %else -# RHEL 5.x/6.x: -%if %{defined el5} || %{defined el6} +# RHEL 5.x/6.x, CHAOS 5.x: +%if %{defined el5} || %{defined el6} || %{defined ch5} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config %define kver %((echo X; %{__cat} %{klnk}/kernel.release From 91cb1d91a4cf0dfa360f09747915699d0bef3d6f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 29 Mar 2011 22:46:38 -0700 Subject: [PATCH 0499/1062] Add .va_dentry helper While this extra structure memory does not exist under Solaris it is needed under Linux to pass the dentry. This allows the dentry to be easily instantiated before the inode is unlocked. --- include/sys/vnode.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 09c22585a..7d655e5ef 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -140,6 +140,7 @@ typedef struct vattr { uint64_t va_nblocks; /* space used */ uint32_t va_blksize; /* block size */ uint32_t va_seq; /* sequence */ + struct dentry *va_dentry; /* dentry to wire */ } vattr_t; typedef struct vnode { From 495bd532ab4aaef46b57094d59707bad91e6ec25 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 23 Mar 2011 15:45:55 -0700 Subject: [PATCH 0500/1062] Linux shrinker compat The Linux shrinker has gone through three API changes since 2.6.22. Rather than force every caller to understand all three APIs this change consolidates the compatibility code in to the mm-compat.h header. The caller then can then use a single spl provided shrinker API which does the right thing for your kernel. SPL_SHRINKER_CALLBACK_PROTO(shrinker_callback, cb, nr_to_scan, gfp_mask); SPL_SHRINKER_DECLARE(shrinker_struct, shrinker_callback, seeks); spl_register_shrinker(&shrinker_struct); spl_unregister_shrinker(&&shrinker_struct); spl_exec_shrinker(&shrinker_struct, nr_to_scan, gfp_mask); --- include/linux/mm_compat.h | 46 +++++++++++++++++++++++++++++++++++ module/spl/spl-kmem.c | 50 +++++++-------------------------------- 2 files changed, 55 insertions(+), 41 deletions(-) diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 5c5198b90..7e2f6b8a5 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -56,4 +56,50 @@ extern invalidate_inodes_t invalidate_inodes_fn; #define invalidate_inodes(sb) invalidate_inodes_fn(sb) #endif /* HAVE_INVALIDATE_INODES */ +#ifdef HAVE_SET_SHRINKER +typedef struct spl_shrinker { + struct shrinker *shrinker; + shrinker_t fn; + int seeks; +} spl_shrinker_t; + +static inline void +spl_register_shrinker(spl_shrinker_t *ss) +{ + ss->shrinker = set_shrinker(ss->seeks, ss->fn); +} + +static inline void +spl_unregister_shrinker(spl_shrinker_t *ss) +{ + remove_shrinker(ss->shrinker); +} + +# define SPL_SHRINKER_DECLARE(s, x, y) \ + static spl_shrinker_t s = { .shrinker = NULL, .fn = x, .seeks = y } +# define SPL_SHRINKER_CALLBACK_PROTO(fn, x, y, z) \ + static int fn(int y, unsigned int z) +# define spl_exec_shrinker(ss, nr, gfp) \ + ((spl_shrinker_t *)ss)->fn(nr, gfp) + +#else /* HAVE_SET_SHRINKER */ + +# define spl_register_shrinker(x) register_shrinker(x) +# define spl_unregister_shrinker(x) unregister_shrinker(x) +# define SPL_SHRINKER_DECLARE(s, x, y) \ + static struct shrinker s = { .shrink = x, .seeks = y } + +# ifdef HAVE_3ARGS_SHRINKER_CALLBACK +# define SPL_SHRINKER_CALLBACK_PROTO(fn, x, y, z) \ + static int fn(struct shrinker *x, int y, unsigned int z) +# define spl_exec_shrinker(ss, nr, gfp) \ + ((struct shrinker *)ss)->shrink(NULL, nr, gfp) +# else /* HAVE_3ARGS_SHRINKER_CALLBACK */ +# define SPL_SHRINKER_CALLBACK_PROTO(fn, x, y, z) \ + static int fn(int y, unsigned int z) +# define spl_exec_shrinker(ss, nr, gfp) \ + ((struct shrinker *)ss)->shrink(nr, gfp) +# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ +#endif /* HAVE_SET_SHRINKER */ + #endif /* SPL_MM_COMPAT_H */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 2f533bdf6..87594bde9 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -819,21 +819,10 @@ struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush); -#ifdef HAVE_SET_SHRINKER -static struct shrinker *spl_kmem_cache_shrinker; -#else -# ifdef HAVE_3ARGS_SHRINKER_CALLBACK -static int spl_kmem_cache_generic_shrinker(struct shrinker *shrinker_cb, - int nr_to_scan, unsigned int gfp_mask); -# else -static int spl_kmem_cache_generic_shrinker( - int nr_to_scan, unsigned int gfp_mask); -# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ -static struct shrinker spl_kmem_cache_shrinker = { - .shrink = spl_kmem_cache_generic_shrinker, - .seeks = KMC_DEFAULT_SEEKS, -}; -#endif /* HAVE_SET_SHRINKER */ +SPL_SHRINKER_CALLBACK_PROTO(spl_kmem_cache_generic_shrinker, + shrinker_cb, nr_to_scan, gfp_mask); +SPL_SHRINKER_DECLARE(spl_kmem_cache_shrinker, + spl_kmem_cache_generic_shrinker, KMC_DEFAULT_SEEKS); static void * kv_alloc(spl_kmem_cache_t *skc, int size, int flags) @@ -1859,14 +1848,8 @@ EXPORT_SYMBOL(spl_kmem_cache_free); * objects should be freed, because Solaris semantics are to free * all available objects we may free more objects than requested. */ -#ifdef HAVE_3ARGS_SHRINKER_CALLBACK -static int -spl_kmem_cache_generic_shrinker(struct shrinker *shrinker_cb, - int nr_to_scan, unsigned int gfp_mask) -#else -static int -spl_kmem_cache_generic_shrinker(int nr_to_scan, unsigned int gfp_mask) -#endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ +SPL_SHRINKER_CALLBACK_PROTO(spl_kmem_cache_generic_shrinker, + shrinker_cb, nr_to_scan, gfp_mask) { spl_kmem_cache_t *skc; int unused = 0; @@ -1930,11 +1913,7 @@ EXPORT_SYMBOL(spl_kmem_cache_reap_now); void spl_kmem_reap(void) { -#ifdef HAVE_3ARGS_SHRINKER_CALLBACK - spl_kmem_cache_generic_shrinker(NULL, KMC_REAP_CHUNK, GFP_KERNEL); -#else - spl_kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL); -#endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ + spl_exec_shrinker(&spl_kmem_cache_shrinker, KMC_REAP_CHUNK, GFP_KERNEL); } EXPORT_SYMBOL(spl_kmem_reap); @@ -2135,14 +2114,7 @@ spl_kmem_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); -#ifdef HAVE_SET_SHRINKER - spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, - spl_kmem_cache_generic_shrinker); - if (spl_kmem_cache_shrinker == NULL) - SRETURN(rc = -ENOMEM); -#else - register_shrinker(&spl_kmem_cache_shrinker); -#endif + spl_register_shrinker(&spl_kmem_cache_shrinker); #ifdef DEBUG_KMEM kmem_alloc_used_set(0); @@ -2178,11 +2150,7 @@ spl_kmem_fini(void) #endif /* DEBUG_KMEM */ SENTRY; -#ifdef HAVE_SET_SHRINKER - remove_shrinker(spl_kmem_cache_shrinker); -#else - unregister_shrinker(&spl_kmem_cache_shrinker); -#endif + spl_unregister_shrinker(&spl_kmem_cache_shrinker); SEXIT; } From d0a1038ff39a082a098fc710dc16f8125369d084 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 25 Mar 2011 21:50:40 -0700 Subject: [PATCH 0501/1062] Update /proc/spl/kmem/slab output The 'slab_fail', 'slab_create', and 'slab_destroy' columns in the slab output have been removed because they are virtually always zero and not very useful. The much more useful 'size' and 'alloc' columns have been added which show the total slab size and how much of the total size has been allocated to objects. Finally, the formatting has been updated to be much more human readable while still being friendly for tool like awk to parse. --- module/spl/spl-proc.c | 46 ++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 789d8e129..39b65ff38 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -562,12 +562,16 @@ SPL_PROC_HANDLER(proc_dofreemem) static void slab_seq_show_headers(struct seq_file *f) { - seq_printf(f, "%-36s %-6s - %s %s %s - %s %s %s - " - "%s %s %s - %s %s %s\n", "name", "flags", - "obj_size", "slab_objs", "slab_size", - "slab_fail", "slab_create", "slab_destroy", - "slab_total", "slab_alloc", "slab_max", - "obj_total", "obj_alloc", "obj_max"); + seq_printf(f, + "--------------------- cache ----------" + "--------------------------------------------- " + "----- slab ------ " + "---- object -----\n"); + seq_printf(f, + "name " + " flags size alloc slabsize objsize " + "total alloc max " + "total alloc max\n"); } static int @@ -578,22 +582,20 @@ slab_seq_show(struct seq_file *f, void *p) ASSERT(skc->skc_magic == SKC_MAGIC); spin_lock(&skc->skc_lock); - seq_printf(f, "%-36s ", skc->skc_name); - seq_printf(f, "0x%04lx - %u %u %u - %lu %lu %lu - " - "%lu %lu %lu - %lu %lu %lu\n", - (long unsigned)skc->skc_flags, - (unsigned)skc->skc_obj_size, - (unsigned)skc->skc_slab_objs, - (unsigned)skc->skc_slab_size, - (long unsigned)skc->skc_slab_fail, - (long unsigned)skc->skc_slab_create, - (long unsigned)skc->skc_slab_destroy, - (long unsigned)skc->skc_slab_total, - (long unsigned)skc->skc_slab_alloc, - (long unsigned)skc->skc_slab_max, - (long unsigned)skc->skc_obj_total, - (long unsigned)skc->skc_obj_alloc, - (long unsigned)skc->skc_obj_max); + seq_printf(f, "%-36s ", skc->skc_name); + seq_printf(f, "0x%05lx %9lu %9lu %8u %8u " + "%5lu %5lu %5lu %5lu %5lu %5lu\n", + (long unsigned)skc->skc_flags, + (long unsigned)(skc->skc_slab_size * skc->skc_slab_total), + (long unsigned)(skc->skc_obj_size * skc->skc_obj_alloc), + (unsigned)skc->skc_slab_size, + (unsigned)skc->skc_obj_size, + (long unsigned)skc->skc_slab_total, + (long unsigned)skc->skc_slab_alloc, + (long unsigned)skc->skc_slab_max, + (long unsigned)skc->skc_obj_total, + (long unsigned)skc->skc_obj_alloc, + (long unsigned)skc->skc_obj_max); spin_unlock(&skc->skc_lock); From 3336e29cc2e328c6e665de9f4563aa8a4b874194 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 26 Mar 2011 00:03:32 -0700 Subject: [PATCH 0502/1062] Add slab usage summeries to /proc One of the most common things you want to know when looking at the slab is how much memory is being used. This information was available in /proc/spl/kmem/slab but only on a per-slab basis. This commit adds the following /proc/sys/kernel/spl/kmem/slab* entries to make total slab usage easily available at a glance. slab_kmem_total - Total kmem slab size slab_kmem_avail - Alloc'd kmem slab size slab_kmem_max - Max observed kmem slab size slab_vmem_total - Total vmem slab size slab_vmem_avail - Alloc'd vmem slab size slab_vmem_max - Max observed vmem slab size NOTE: The slab_*_max values are expected to over report because they show maximum values since boot, not current values. --- include/sys/kmem.h | 6 +++ module/spl/spl-proc.c | 120 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 6b6b95c12..d3972f1ca 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -293,6 +293,9 @@ enum { KMC_BIT_OFFSLAB = 7, /* Objects not on slab */ KMC_BIT_REAPING = 16, /* Reaping in progress */ KMC_BIT_DESTROY = 17, /* Destroy in progress */ + KMC_BIT_TOTAL = 18, /* Proc handler helper bit */ + KMC_BIT_ALLOC = 19, /* Proc handler helper bit */ + KMC_BIT_MAX = 20, /* Proc handler helper bit */ }; /* kmem move callback return values */ @@ -314,6 +317,9 @@ typedef enum kmem_cbrc { #define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) #define KMC_REAPING (1 << KMC_BIT_REAPING) #define KMC_DESTROY (1 << KMC_BIT_DESTROY) +#define KMC_TOTAL (1 << KMC_BIT_TOTAL) +#define KMC_ALLOC (1 << KMC_BIT_ALLOC) +#define KMC_MAX (1 << KMC_BIT_MAX) #define KMC_REAP_CHUNK INT_MAX #define KMC_DEFAULT_SEEKS 1 diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 39b65ff38..d2b295ce0 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -100,7 +100,12 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #define CTL_KMEM_KMEMMAX CTL_UNNUMBERED /* Max alloc'd by kmem bytes */ #define CTL_KMEM_VMEMUSED CTL_UNNUMBERED /* Alloc'd vmem bytes */ #define CTL_KMEM_VMEMMAX CTL_UNNUMBERED /* Max alloc'd by vmem bytes */ -#define CTL_KMEM_ALLOC_FAILED CTL_UNNUMBERED /* Cache allocations failed */ +#define CTL_KMEM_SLAB_KMEMTOTAL CTL_UNNUMBERED /* Total kmem slab size */ +#define CTL_KMEM_SLAB_KMEMALLOC CTL_UNNUMBERED /* Alloc'd kmem slab size */ +#define CTL_KMEM_SLAB_KMEMMAX CTL_UNNUMBERED /* Max kmem slab size */ +#define CTL_KMEM_SLAB_VMEMTOTAL CTL_UNNUMBERED /* Total vmem slab size */ +#define CTL_KMEM_SLAB_VMEMALLOC CTL_UNNUMBERED /* Alloc'd vmem slab size */ +#define CTL_KMEM_SLAB_VMEMMAX CTL_UNNUMBERED /* Max vmem slab size */ #endif #else /* HAVE_CTL_UNNUMBERED */ @@ -152,6 +157,12 @@ enum { CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ CTL_KMEM_VMEMUSED, /* Alloc'd vmem bytes */ CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ + CTL_KMEM_SLAB_KMEMTOTAL, /* Total kmem slab size */ + CTL_KMEM_SLAB_KMEMALLOC, /* Alloc'd kmem slab size */ + CTL_KMEM_SLAB_KMEMMAX, /* Max kmem slab size */ + CTL_KMEM_SLAB_VMEMTOTAL, /* Total vmem slab size */ + CTL_KMEM_SLAB_VMEMALLOC, /* Alloc'd vmem slab size */ + CTL_KMEM_SLAB_VMEMMAX, /* Max vmem slab size */ #endif }; #endif /* HAVE_CTL_UNNUMBERED */ @@ -424,6 +435,53 @@ SPL_PROC_HANDLER(proc_domemused) SRETURN(rc); } + +SPL_PROC_HANDLER(proc_doslab) +{ + int rc = 0; + unsigned long min = 0, max = ~0, val = 0, mask; + struct ctl_table dummy = *table; + spl_kmem_cache_t *skc; + SENTRY; + + dummy.data = &val; + dummy.proc_handler = &proc_dointvec; + dummy.extra1 = &min; + dummy.extra2 = &max; + + if (write) { + *ppos += *lenp; + } else { + down_read(&spl_kmem_cache_sem); + mask = (unsigned long)table->data; + + list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { + + /* Only use slabs of the correct kmem/vmem type */ + if (!(skc->skc_flags & mask)) + continue; + + /* Sum the specified field for selected slabs */ + switch (mask & (KMC_TOTAL | KMC_ALLOC | KMC_MAX)) { + case KMC_TOTAL: + val += skc->skc_slab_size * skc->skc_slab_total; + break; + case KMC_ALLOC: + val += skc->skc_obj_size * skc->skc_obj_alloc; + break; + case KMC_MAX: + val += skc->skc_obj_size * skc->skc_obj_max; + break; + } + } + + up_read(&spl_kmem_cache_sem); + rc = spl_proc_doulongvec_minmax(&dummy, write, filp, + buffer, lenp, ppos); + } + + SRETURN(rc); +} #endif /* DEBUG_KMEM */ SPL_PROC_HANDLER(proc_dohostid) @@ -895,6 +953,66 @@ static struct ctl_table spl_kmem_table[] = { .mode = 0444, .proc_handler = &proc_doulongvec_minmax, }, + { + CTL_NAME (CTL_KMEM_SLAB_KMEMTOTAL) + .procname = "slab_kmem_total", + .data = (void *)(KMC_KMEM | KMC_TOTAL), + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + CTL_NAME (CTL_KMEM_SLAB_KMEMALLOC) + .procname = "slab_kmem_alloc", + .data = (void *)(KMC_KMEM | KMC_ALLOC), + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + CTL_NAME (CTL_KMEM_SLAB_KMEMMAX) + .procname = "slab_kmem_max", + .data = (void *)(KMC_KMEM | KMC_MAX), + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + CTL_NAME (CTL_KMEM_SLAB_VMEMTOTAL) + .procname = "slab_vmem_total", + .data = (void *)(KMC_VMEM | KMC_TOTAL), + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + CTL_NAME (CTL_KMEM_SLAB_VMEMALLOC) + .procname = "slab_vmem_alloc", + .data = (void *)(KMC_VMEM | KMC_ALLOC), + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + CTL_NAME (CTL_KMEM_SLAB_VMEMMAX) + .procname = "slab_vmem_max", + .data = (void *)(KMC_VMEM | KMC_MAX), + .maxlen = sizeof(unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, {0}, }; #endif /* DEBUG_KMEM */ From 83150861e610701d44510816e2062bcf407f51ab Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 29 Mar 2011 22:38:53 -0700 Subject: [PATCH 0503/1062] Decrease target objects per slab By decreasing the number of target objects per slab we increase the likelyhood that a slab can be freed. This reduces the level of fragmentation in the slab which has been observed to be a problem for certain workloads. The penalty for this is that we also decrease the speed which need objects can be allocated. --- include/sys/kmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index d3972f1ca..72f70c282 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -334,7 +334,7 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ #define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 /* Target objects per slab */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ #define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 8 /* Minimum objects per slab */ #define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ From e76f4bf11d54479fe767d9647a10e8b98d7ffc4f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 30 Mar 2011 17:44:35 -0700 Subject: [PATCH 0504/1062] Add dnlc_reduce_cache() support Provide the dnlc_reduce_cache() function which attempts to prune cached entries from the dcache and icache. After the entries are pruned any slabs which they may have been using are reaped. Note the API takes a reclaim percentage but we don't have easy access to the total number of cache entries to calculate the reclaim count. However, in practice this doesn't need to be exactly correct. We simply need to reclaim some useful fraction (but not all) of the cache. The caller can determine if more needs to be done. --- config/spl-build.m4 | 32 ++++++++ configure | 164 ++++++++++++++++++++++++++++++++++++++ include/linux/mm_compat.h | 36 +++++++++ include/sys/dnlc.h | 18 ++++- module/spl/spl-kmem.c | 28 +++++++ spl_config.h.in | 6 ++ 6 files changed, 283 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 72bb3258e..94c7f3e74 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -76,6 +76,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_3ARGS_FILE_FSYNC SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_INVALIDATE_INODES + SPL_AC_SHRINK_DCACHE_MEMORY + SPL_AC_SHRINK_ICACHE_MEMORY ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1717,3 +1719,33 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ [invalidate_inodes() is available])], []) ]) + +dnl # +dnl # 2.6.xx API compat, +dnl # There currently exists no exposed API to partially shrink the dcache. +dnl # The expected mechanism to shrink the cache is a registered shrinker +dnl # which is called during memory pressure. +dnl # +AC_DEFUN([SPL_AC_SHRINK_DCACHE_MEMORY], [ + SPL_CHECK_SYMBOL_EXPORT( + [shrink_dcache_memory], + [fs/dcache.c], + [AC_DEFINE(HAVE_SHRINK_DCACHE_MEMORY, 1, + [shrink_dcache_memory() is available])], + []) +]) + +dnl # +dnl # 2.6.xx API compat, +dnl # There currently exists no exposed API to partially shrink the icache. +dnl # The expected mechanism to shrink the cache is a registered shrinker +dnl # which is called during memory pressure. +dnl # +AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], [ + SPL_CHECK_SYMBOL_EXPORT( + [shrink_icache_memory], + [fs/inode.c], + [AC_DEFINE(HAVE_SHRINK_ICACHE_MEMORY, 1, + [shrink_icache_memory() is available])], + []) +]) diff --git a/configure b/configure index f5c6a063a..317ab8ea7 100755 --- a/configure +++ b/configure @@ -15462,6 +15462,88 @@ _ACEOF fi + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + + ;; user) @@ -19285,6 +19367,88 @@ _ACEOF + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + + + if test "x$AWK" != xgawk; then diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 7e2f6b8a5..522db827f 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -56,6 +56,42 @@ extern invalidate_inodes_t invalidate_inodes_fn; #define invalidate_inodes(sb) invalidate_inodes_fn(sb) #endif /* HAVE_INVALIDATE_INODES */ +/* + * 2.6.xx API compat, + * There currently exists no exposed API to partially shrink the dcache. + * The expected mechanism to shrink the cache is a registered shrinker + * which is called during memory pressure. + */ +#ifndef HAVE_SHRINK_DCACHE_MEMORY +# ifdef HAVE_3ARGS_SHRINKER_CALLBACK +typedef int (*shrink_dcache_memory_t)(struct shrinker *, int, gfp_t); +extern shrink_dcache_memory_t shrink_dcache_memory_fn; +# define shrink_dcache_memory(nr, gfp) shrink_dcache_memory_fn(NULL, nr, gfp) +# else +typedef int (*shrink_dcache_memory_t)(int, gfp_t); +extern shrink_dcache_memory_t shrink_dcache_memory_fn; +# define shrink_dcache_memory(nr, gfp) shrink_dcache_memory_fn(nr, gfp) +# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ +#endif /* HAVE_SHRINK_DCACHE_MEMORY */ + +/* + * 2.6.xx API compat, + * There currently exists no exposed API to partially shrink the icache. + * The expected mechanism to shrink the cache is a registered shrinker + * which is called during memory pressure. + */ +#ifndef HAVE_SHRINK_ICACHE_MEMORY +# ifdef HAVE_3ARGS_SHRINKER_CALLBACK +typedef int (*shrink_icache_memory_t)(struct shrinker *, int, gfp_t); +extern shrink_icache_memory_t shrink_icache_memory_fn; +# define shrink_icache_memory(nr, gfp) shrink_icache_memory_fn(NULL, nr, gfp) +# else +typedef int (*shrink_icache_memory_t)(int, gfp_t); +extern shrink_icache_memory_t shrink_icache_memory_fn; +# define shrink_icache_memory(nr, gfp) shrink_icache_memory_fn(nr, gfp) +# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ +#endif /* HAVE_SHRINK_ICACHE_MEMORY */ + #ifdef HAVE_SET_SHRINKER typedef struct spl_shrinker { struct shrinker *shrinker; diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h index 693e3d294..b63c94fef 100644 --- a/include/sys/dnlc.h +++ b/include/sys/dnlc.h @@ -25,6 +25,22 @@ #ifndef _SPL_DNLC_H #define _SPL_DNLC_H -#define dnlc_reduce_cache(percent) ((void)0) +/* + * Reduce the dcache and icache then reap the free'd slabs. Note the + * interface takes a reclaim percentage but we don't have easy access to + * the total number of entries to calculate the reclaim count. However, + * in practice this doesn't need to be even close to correct. We simply + * need to reclaim some useful fraction of the cache. The caller can + * determine if more needs to be done. + */ +static inline void +dnlc_reduce_cache(void *reduce_percent) +{ + int nr = (uintptr_t)reduce_percent * 10000; + + shrink_dcache_memory(nr, GFP_KERNEL); + shrink_icache_memory(nr, GFP_KERNEL); + kmem_reap(); +} #endif /* SPL_DNLC_H */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 87594bde9..d96456cbc 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -185,6 +185,16 @@ invalidate_inodes_t invalidate_inodes_fn = SYMBOL_POISON; EXPORT_SYMBOL(invalidate_inodes_fn); #endif /* HAVE_INVALIDATE_INODES */ +#ifndef HAVE_SHRINK_DCACHE_MEMORY +shrink_dcache_memory_t shrink_dcache_memory_fn = SYMBOL_POISON; +EXPORT_SYMBOL(shrink_dcache_memory_fn); +#endif /* HAVE_SHRINK_DCACHE_MEMORY */ + +#ifndef HAVE_SHRINK_ICACHE_MEMORY +shrink_icache_memory_t shrink_icache_memory_fn = SYMBOL_POISON; +EXPORT_SYMBOL(shrink_icache_memory_fn); +#endif /* HAVE_SHRINK_ICACHE_MEMORY */ + pgcnt_t spl_kmem_availrmem(void) { @@ -2102,6 +2112,24 @@ spl_kmem_init_kallsyms_lookup(void) } #endif /* HAVE_INVALIDATE_INODES */ +#ifndef HAVE_SHRINK_DCACHE_MEMORY + shrink_dcache_memory_fn = (shrink_dcache_memory_t) + spl_kallsyms_lookup_name("shrink_dcache_memory"); + if (!shrink_dcache_memory_fn) { + printk(KERN_ERR "Error: Unknown symbol shrink_dcache_memory\n"); + return -EFAULT; + } +#endif /* HAVE_SHRINK_DCACHE_MEMORY */ + +#ifndef HAVE_SHRINK_ICACHE_MEMORY + shrink_icache_memory_fn = (shrink_icache_memory_t) + spl_kallsyms_lookup_name("shrink_icache_memory"); + if (!shrink_icache_memory_fn) { + printk(KERN_ERR "Error: Unknown symbol shrink_icache_memory\n"); + return -EFAULT; + } +#endif /* HAVE_SHRINK_ICACHE_MEMORY */ + return 0; } diff --git a/spl_config.h.in b/spl_config.h.in index a58784119..284b9b1e9 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -156,6 +156,12 @@ /* set_shrinker() available */ #undef HAVE_SET_SHRINKER +/* shrink_dcache_memory() is available */ +#undef HAVE_SHRINK_DCACHE_MEMORY + +/* shrink_icache_memory() is available */ +#undef HAVE_SHRINK_ICACHE_MEMORY + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H From a40c3fca6f6c8765c09d007283d0957a0b71dead Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 6 Apr 2011 20:10:57 -0700 Subject: [PATCH 0505/1062] Prep spl-0,6,0-rc3 tag Create the third 0.6.0 release candidate tag (rc3). --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index f33eda4ee..95261b3fe 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc2 +Release: rc3 Release-Tags: relext From 96cdefab84061e807f54ed17b93e0586393f9448 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 8 Apr 2011 10:20:08 -0700 Subject: [PATCH 0506/1062] Fix rebuildable RPMs for el6/ch5 When rebuilding the source RPM under el5 you need to append the target_cpu. However, under el6/ch5 things are packaged correctly and the arch is already part of kver. For this reason it also needs to be stripped from kver when setting kverpkg. --- spl-modules.spec.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 76dcfa643..e02d6c255 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -94,14 +94,18 @@ %endif %define kpkg kernel %define kdevpkg kernel-devel - %if %{defined el6} + %if %{defined el6} || %{defined ch5} %define kverpkg %(echo %{kver} | %{__sed} -e 's/.%{_target_cpu}//g') %else %define kverpkg %{kver} %endif %define koppkg = %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu} + %if %{defined el6} || %{defined ch5} + %define kdir %{_usrsrc}/kernels/%{kver} + %else + %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu} + %endif %endif %if %{undefined kobj} %define kobj %{kdir} From 9b0f9079d22f5a13903d3da4d94e8e306cfa40dd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 18 Apr 2011 13:47:43 -0700 Subject: [PATCH 0507/1062] Linux 2.6.39 compat, invalidate_inodes() To resolve a potiential filesystem corruption issue a second argument was added to invalidate_inodes(). This argument controls whether dirty inodes are dropped or treated as busy when invalidating a super block. When only the legacy API is available the second argument will be dropped for compatibility. --- config/spl-build.m4 | 31 +++++++++ configure | 128 ++++++++++++++++++++++++++++++++++++++ include/linux/mm_compat.h | 20 +++++- module/spl/spl-kmem.c | 2 +- spl_config.h.in | 3 + 5 files changed, 181 insertions(+), 3 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 94c7f3e74..84fbb8b92 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -76,6 +76,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_3ARGS_FILE_FSYNC SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_INVALIDATE_INODES + SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES SPL_AC_SHRINK_DCACHE_MEMORY SPL_AC_SHRINK_ICACHE_MEMORY ]) @@ -1720,6 +1721,36 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ []) ]) +dnl # +dnl # 2.6.39 API compat, +dnl # The function invalidate_inodes() now take 2 arguments. The second +dnl # 'kill_dirty' argument describes how invalidate_inodes() should +dnl # handle dirty inodes. Only when set will dirty inodes be discarded, +dnl # otherwise they will be handled as busy. +dnl # +dnl # Unfortunately, we don't have access to the invalidate_inodes() +dnl # prototype so it's not easy to check how many arguments it takes. +dnl # However, this change was done for the benefit of invalidate_device() +dnl # which also added an argument. The invalidate_device() symbol does +dnl # exist in the development headers so if it takes two arguments we +dnl # can fairly safely infer that invalidate_inodes() takes two arguments +dnl # as well. See commit 93b270f76e7ef3b81001576860c2701931cdc78b. +dnl # +AC_DEFUN([SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES], + [AC_MSG_CHECKING([whether invalidate_inodes() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + return __invalidate_device(NULL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_INVALIDATE_INODES, 1, + [invalidate_inodes() wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.xx API compat, dnl # There currently exists no exposed API to partially shrink the dcache. diff --git a/configure b/configure index 317ab8ea7..f8dbd6465 100755 --- a/configure +++ b/configure @@ -15462,6 +15462,70 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5 +$as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return __invalidate_device(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_INVALIDATE_INODES 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 $as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } @@ -19366,6 +19430,70 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5 +$as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return __invalidate_device(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_INVALIDATE_INODES 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 $as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 522db827f..07231c9a4 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -49,11 +49,27 @@ * The function invalidate_inodes() is no longer exported by the kernel. * The prototype however is still available which means it is safe * to acquire the symbol's address using spl_kallsyms_lookup_name(). + * + * 2.6.39 API compat, + * As for 2.6.39 invalidate_inodes() was updated to take a second + * argument which controls how dirty inodes should be handled. */ -#ifndef HAVE_INVALIDATE_INODES +#ifdef HAVE_INVALIDATE_INODES +# ifdef HAVE_2ARGS_INVALIDATE_INODES +# define spl_invalidate_inodes(sb, kd) invalidate_inodes(sb, kd) +# else +# define spl_invalidate_inodes(sb, kd) invalidate_inodes(sb) +# endif /* HAVE_2ARGS_INVALIDATE_INODES */ +#else +# ifdef HAVE_2ARGS_INVALIDATE_INODES +typedef int (*invalidate_inodes_t)(struct super_block *sb, bool kd); +extern invalidate_inodes_t invalidate_inodes_fn; +# define spl_invalidate_inodes(sb, kd) invalidate_inodes_fn(sb, kd) +# else typedef int (*invalidate_inodes_t)(struct super_block *sb); extern invalidate_inodes_t invalidate_inodes_fn; -#define invalidate_inodes(sb) invalidate_inodes_fn(sb) +# define spl_invalidate_inodes(sb, kd) invalidate_inodes_fn(sb) +# endif /* HAVE_2ARGS_INVALIDATE_INODES */ #endif /* HAVE_INVALIDATE_INODES */ /* diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index d96456cbc..e7fc5f2c9 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2105,7 +2105,7 @@ spl_kmem_init_kallsyms_lookup(void) #ifndef HAVE_INVALIDATE_INODES invalidate_inodes_fn = (invalidate_inodes_t) - spl_kallsyms_lookup_name("invalidate_inodes"); + spl_kallsyms_lookup_name("invalidate_inodes"); if (!invalidate_inodes_fn) { printk(KERN_ERR "Error: Unknown symbol invalidate_inodes\n"); return -EFAULT; diff --git a/spl_config.h.in b/spl_config.h.in index 284b9b1e9..afa1535fa 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -9,6 +9,9 @@ /* Define to 1 to enable detailed kmem tracking */ #undef DEBUG_KMEM_TRACKING +/* invalidate_inodes() wants 2 args */ +#undef HAVE_2ARGS_INVALIDATE_INODES + /* register_sysctl_table() wants 2 args */ #undef HAVE_2ARGS_REGISTER_SYSCTL From 03318641afc3e2d6dc18614aaa75d6a0125cb933 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 19 Apr 2011 09:26:48 -0700 Subject: [PATCH 0508/1062] Fix gcc configure warnings Newer versions of gcc are getting smart enough to detect the sloppy syntax used for the autoconf tests. It is now generating warnings for unused/undeclared variables. Newer version of gcc even have the -Wunused-but-set-variable option set by default. This isn't a problem except when -Werror is set and they get promoted to an error. In this case the autoconf test will return an incorrect result which will result in a build failure latter on. To handle this I'm tightening up many of the autoconf tests to explicitly mark variables as unused to suppress the gcc warning. Remember, all of the autoconf code can never actually be run we just want to get a clean build error to detect which APIs are available. Never using a variable is absolutely fine for this. --- config/spl-build.m4 | 45 +++++++++++++---------- configure | 90 +++++++++++++++++++++++++-------------------- 2 files changed, 75 insertions(+), 60 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 84fbb8b92..1a7512c96 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -638,7 +638,7 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - atomic64_t *ptr; + atomic64_t *ptr __attribute__ ((unused)); ],[ have_atomic64_t=yes AC_DEFINE(HAVE_ATOMIC64_T, 1, @@ -720,7 +720,7 @@ AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], SPL_LINUX_TRY_COMPILE([ #include ],[ - uintptr_t *ptr; + uintptr_t *ptr __attribute__ ((unused)); ],[ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_UINTPTR_T, 1, @@ -739,7 +739,7 @@ AC_DEFUN([SPL_AC_3ARGS_INIT_WORK], SPL_LINUX_TRY_COMPILE([ #include ],[ - struct work_struct work; + struct work_struct work __attribute__ ((unused)); INIT_WORK(&work, NULL, NULL); ],[ AC_MSG_RESULT(yes) @@ -759,7 +759,7 @@ AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], SPL_LINUX_TRY_COMPILE([ #include ],[ - return register_sysctl_table(NULL,0); + (void) register_sysctl_table(NULL, 0); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1, @@ -825,7 +825,7 @@ AC_DEFUN([SPL_AC_PATH_IN_NAMEIDATA], SPL_LINUX_TRY_COMPILE([ #include ],[ - struct nameidata nd; + struct nameidata nd __attribute__ ((unused)); nd.path.mnt = NULL; nd.path.dentry = NULL; @@ -877,7 +877,7 @@ AC_DEFUN([SPL_AC_CTL_NAME], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - struct ctl_table ctl; + struct ctl_table ctl __attribute__ ((unused)); ctl.ctl_name = 0; ],[ AC_MSG_RESULT(yes) @@ -997,7 +997,9 @@ AC_DEFUN([SPL_AC_TIMESPEC_SUB], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - struct timespec a, b, c = { 0 }; + struct timespec a = { 0 }; + struct timespec b = { 0 }; + struct timespec c __attribute__ ((unused)); c = timespec_sub(a, b); ],[ AC_MSG_RESULT(yes) @@ -1016,7 +1018,8 @@ AC_DEFUN([SPL_AC_INIT_UTSNAME], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - struct new_utsname *a = init_utsname(); + struct new_utsname *a __attribute__ ((unused)); + a = init_utsname(); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_INIT_UTSNAME, 1, [init_utsname() is available]) @@ -1047,7 +1050,8 @@ AC_DEFUN([SPL_AC_FILES_FDTABLE], [ #endif ],[ struct files_struct *files = current->files; - struct fdtable *fdt = files_fdtable(files); + struct fdtable *fdt __attribute__ ((unused)); + fdt = files_fdtable(files); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_FILES_FDTABLE, 1, [files_fdtable() is available]) @@ -1073,7 +1077,8 @@ AC_DEFUN([SPL_AC_KMALLOC_NODE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - void *a = kmalloc_node(1, GFP_KERNEL, 0); + void *a __attribute__ ((unused)); + a = kmalloc_node(1, GFP_KERNEL, 0); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_KMALLOC_NODE, 1, [kmalloc_node() is available]) @@ -1125,7 +1130,7 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - struct mutex mtx; + struct mutex mtx __attribute__ ((unused)); mtx.owner = NULL; ],[ AC_MSG_RESULT(yes) @@ -1301,7 +1306,7 @@ AC_DEFUN([SPL_AC_GLOBAL_PAGE_STATE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - unsigned long state; + unsigned long state __attribute__ ((unused)); state = global_page_state(0); ],[ AC_MSG_RESULT(yes) @@ -1327,7 +1332,7 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_FREE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_FREE_PAGES; ],[ AC_MSG_RESULT(yes) @@ -1354,7 +1359,7 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_INACTIVE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE; ],[ AC_MSG_RESULT(yes) @@ -1368,7 +1373,7 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_INACTIVE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE_ANON; ],[ AC_MSG_RESULT(yes) @@ -1382,7 +1387,7 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_INACTIVE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE_FILE; ],[ AC_MSG_RESULT(yes) @@ -1409,7 +1414,7 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_ACTIVE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE; ],[ AC_MSG_RESULT(yes) @@ -1423,7 +1428,7 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_ACTIVE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE_ANON; ],[ AC_MSG_RESULT(yes) @@ -1437,7 +1442,7 @@ AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_ACTIVE], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE_FILE; ],[ AC_MSG_RESULT(yes) @@ -1604,7 +1609,7 @@ AC_DEFUN([SPL_AC_CRED_STRUCT], [ SPL_LINUX_TRY_COMPILE([ #include ],[ - struct cred *cr; + struct cred *cr __attribute__ ((unused)); cr = NULL; ],[ AC_MSG_RESULT(yes) diff --git a/configure b/configure index f8dbd6465..6a322ce4e 100755 --- a/configure +++ b/configure @@ -11989,7 +11989,7 @@ int main (void) { - atomic64_t *ptr; + atomic64_t *ptr __attribute__ ((unused)); ; return 0; @@ -12232,7 +12232,7 @@ int main (void) { - uintptr_t *ptr; + uintptr_t *ptr __attribute__ ((unused)); ; return 0; @@ -12296,7 +12296,7 @@ int main (void) { - struct work_struct work; + struct work_struct work __attribute__ ((unused)); INIT_WORK(&work, NULL, NULL); ; @@ -12361,7 +12361,7 @@ int main (void) { - return register_sysctl_table(NULL,0); + (void) register_sysctl_table(NULL, 0); ; return 0; @@ -12563,7 +12563,7 @@ int main (void) { - struct nameidata nd; + struct nameidata nd __attribute__ ((unused)); nd.path.mnt = NULL; nd.path.dentry = NULL; @@ -12738,7 +12738,7 @@ int main (void) { - struct ctl_table ctl; + struct ctl_table ctl __attribute__ ((unused)); ctl.ctl_name = 0; ; @@ -13124,7 +13124,9 @@ int main (void) { - struct timespec a, b, c = { 0 }; + struct timespec a = { 0 }; + struct timespec b = { 0 }; + struct timespec c __attribute__ ((unused)); c = timespec_sub(a, b); ; @@ -13190,7 +13192,8 @@ int main (void) { - struct new_utsname *a = init_utsname(); + struct new_utsname *a __attribute__ ((unused)); + a = init_utsname(); ; return 0; @@ -13328,7 +13331,8 @@ main (void) { struct files_struct *files = current->files; - struct fdtable *fdt = files_fdtable(files); + struct fdtable *fdt __attribute__ ((unused)); + fdt = files_fdtable(files); ; return 0; @@ -13461,7 +13465,8 @@ int main (void) { - void *a = kmalloc_node(1, GFP_KERNEL, 0); + void *a __attribute__ ((unused)); + a = kmalloc_node(1, GFP_KERNEL, 0); ; return 0; @@ -13634,7 +13639,7 @@ int main (void) { - struct mutex mtx; + struct mutex mtx __attribute__ ((unused)); mtx.owner = NULL; ; @@ -14096,7 +14101,7 @@ int main (void) { - unsigned long state; + unsigned long state __attribute__ ((unused)); state = global_page_state(0); ; @@ -14162,7 +14167,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_FREE_PAGES; ; @@ -14228,7 +14233,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE; ; @@ -14293,7 +14298,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE_ANON; ; @@ -14358,7 +14363,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE_FILE; ; @@ -14424,7 +14429,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE; ; @@ -14489,7 +14494,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE_ANON; ; @@ -14554,7 +14559,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE_FILE; ; @@ -15080,7 +15085,7 @@ int main (void) { - struct cred *cr; + struct cred *cr __attribute__ ((unused)); cr = NULL; ; @@ -15957,7 +15962,7 @@ int main (void) { - atomic64_t *ptr; + atomic64_t *ptr __attribute__ ((unused)); ; return 0; @@ -16200,7 +16205,7 @@ int main (void) { - uintptr_t *ptr; + uintptr_t *ptr __attribute__ ((unused)); ; return 0; @@ -16264,7 +16269,7 @@ int main (void) { - struct work_struct work; + struct work_struct work __attribute__ ((unused)); INIT_WORK(&work, NULL, NULL); ; @@ -16329,7 +16334,7 @@ int main (void) { - return register_sysctl_table(NULL,0); + (void) register_sysctl_table(NULL, 0); ; return 0; @@ -16531,7 +16536,7 @@ int main (void) { - struct nameidata nd; + struct nameidata nd __attribute__ ((unused)); nd.path.mnt = NULL; nd.path.dentry = NULL; @@ -16706,7 +16711,7 @@ int main (void) { - struct ctl_table ctl; + struct ctl_table ctl __attribute__ ((unused)); ctl.ctl_name = 0; ; @@ -17092,7 +17097,9 @@ int main (void) { - struct timespec a, b, c = { 0 }; + struct timespec a = { 0 }; + struct timespec b = { 0 }; + struct timespec c __attribute__ ((unused)); c = timespec_sub(a, b); ; @@ -17158,7 +17165,8 @@ int main (void) { - struct new_utsname *a = init_utsname(); + struct new_utsname *a __attribute__ ((unused)); + a = init_utsname(); ; return 0; @@ -17296,7 +17304,8 @@ main (void) { struct files_struct *files = current->files; - struct fdtable *fdt = files_fdtable(files); + struct fdtable *fdt __attribute__ ((unused)); + fdt = files_fdtable(files); ; return 0; @@ -17429,7 +17438,8 @@ int main (void) { - void *a = kmalloc_node(1, GFP_KERNEL, 0); + void *a __attribute__ ((unused)); + a = kmalloc_node(1, GFP_KERNEL, 0); ; return 0; @@ -17602,7 +17612,7 @@ int main (void) { - struct mutex mtx; + struct mutex mtx __attribute__ ((unused)); mtx.owner = NULL; ; @@ -18064,7 +18074,7 @@ int main (void) { - unsigned long state; + unsigned long state __attribute__ ((unused)); state = global_page_state(0); ; @@ -18130,7 +18140,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_FREE_PAGES; ; @@ -18196,7 +18206,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE; ; @@ -18261,7 +18271,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE_ANON; ; @@ -18326,7 +18336,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_INACTIVE_FILE; ; @@ -18392,7 +18402,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE; ; @@ -18457,7 +18467,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE_ANON; ; @@ -18522,7 +18532,7 @@ int main (void) { - enum zone_stat_item zsi; + enum zone_stat_item zsi __attribute__ ((unused)); zsi = NR_ACTIVE_FILE; ; @@ -19048,7 +19058,7 @@ int main (void) { - struct cred *cr; + struct cred *cr __attribute__ ((unused)); cr = NULL; ; From 98e2afd1c5fc491413a80c7ef005127ac3add5d9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 19 Apr 2011 09:45:36 -0700 Subject: [PATCH 0509/1062] Fix unused variable Flagged by the default -Wunused-but-set-variable gcc option when running under Fedora 15. Since it's correct this variable is entirely unused this commit removes it. --- module/spl/spl-module.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index 3b5161b6d..2c665b5d4 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -95,7 +95,6 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, int flags, struct module *mod) { struct cdev *cdev; - struct dev_ops *dev_ops; struct cb_ops *cb_ops; struct file_operations *fops; int rc; @@ -118,8 +117,6 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, cdev->ops = fops; mutex_enter(&di->di_lock); - dev_ops = di->di_ops; - ASSERT(dev_ops); cb_ops = di->di_ops->devo_cb_ops; ASSERT(cb_ops); From 83c623aa1a8895879f03f07b060e1c53a9757f71 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 Apr 2011 12:01:11 -0700 Subject: [PATCH 0510/1062] Linux 2.6.39 compat, DEFINE_SPINLOCK() This is a long over due compatibility change. Way, way, way back in 2007 there was a push to remove all consumers of SPIN_LOCK_UNLOCKED. Finally, in 2011 with 2.6.39 all the consumers have been updated and SPIN_LOCK_UNLOCKED was removed. It's about time we use the new API as well, this change does exactly that. DEFINE_SPINLOCK() was available as far back as 2.6.12 so there doesn't need to be any additional autoconf-foo for this change. --- module/spl/spl-atomic.c | 4 ++-- module/spl/spl-module.c | 2 +- module/spl/spl-vnode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-atomic.c b/module/spl/spl-atomic.c index f2dd67384..e37b96907 100644 --- a/module/spl/spl-atomic.c +++ b/module/spl/spl-atomic.c @@ -34,8 +34,8 @@ #ifdef ATOMIC_SPINLOCK /* Global atomic lock declarations */ -spinlock_t atomic32_lock = SPIN_LOCK_UNLOCKED; -spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(atomic32_lock); +DEFINE_SPINLOCK(atomic64_lock); EXPORT_SYMBOL(atomic32_lock); EXPORT_SYMBOL(atomic64_lock); diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index 2c665b5d4..7a626ca71 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -33,7 +33,7 @@ #define SS_DEBUG_SUBSYS SS_MODULE -static spinlock_t dev_info_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(dev_info_lock); static LIST_HEAD(dev_info_list); static struct dev_info * diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 32ae4865d..1af9b2998 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -39,7 +39,7 @@ EXPORT_SYMBOL(rootdir); static spl_kmem_cache_t *vn_cache; static spl_kmem_cache_t *vn_file_cache; -static spinlock_t vn_file_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(vn_file_lock); static LIST_HEAD(vn_file_list); vtype_t From b1cbc4610c8b5a9b5de80cb850a6eb58bb811a1d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 Apr 2011 12:25:59 -0700 Subject: [PATCH 0511/1062] Linux 2.6.39 compat, kern_path_parent() The path_lookup() function has been renamed to kern_path_parent() and the flags argument has been removed. The only behavior now offered is that of LOOKUP_PARENT. The spl already always passed this flag so dropping the flag does not impact us. --- config/spl-build.m4 | 17 ++++++++ configure | 82 +++++++++++++++++++++++++++++++++++++ include/linux/file_compat.h | 6 +++ module/spl/spl-vnode.c | 6 +-- spl_config.h.in | 3 ++ 5 files changed, 111 insertions(+), 3 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 1a7512c96..13c68358b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -79,6 +79,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES SPL_AC_SHRINK_DCACHE_MEMORY SPL_AC_SHRINK_ICACHE_MEMORY + SPL_AC_KERN_PATH_PARENT ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1785,3 +1786,19 @@ AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], [ [shrink_icache_memory() is available])], []) ]) + +dnl # +dnl # 2.6.39 API compat, +dnl # The path_lookup() function has been renamed to kern_path_parent() +dnl # and the flags argument has been removed. The only behavior now +dnl # offered is that of LOOKUP_PARENT. The spl already always passed +dnl # this flag so dropping the flag does not impact us. +dnl # +AC_DEFUN([SPL_AC_KERN_PATH_PARENT], [ + SPL_CHECK_SYMBOL_EXPORT( + [kern_path_parent], + [fs/namei.c], + [AC_DEFINE(HAVE_KERN_PATH_PARENT, 1, + [kern_path_parent() is available])], + []) +]) diff --git a/configure b/configure index 6a322ce4e..476100181 100755 --- a/configure +++ b/configure @@ -15613,6 +15613,47 @@ _ACEOF fi + + { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5 +$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } + grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/namei.c; do + grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERN_PATH_PARENT 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERN_PATH_PARENT 1 +_ACEOF + + fi + + ;; user) @@ -19587,6 +19628,47 @@ _ACEOF + { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5 +$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } + grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/namei.c; do + grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERN_PATH_PARENT 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERN_PATH_PARENT 1 +_ACEOF + + fi + + + if test "x$AWK" != xgawk; then diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 0bef014ab..97bd76396 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -67,5 +67,11 @@ spl_filp_open(const char *name, int flags, int mode, int *err) #define spl_inode_unlock(ip) (up(&(ip)->i_sem)) #endif /* HAVE_INODE_I_MUTEX */ +#ifdef HAVE_KERN_PATH_PARENT +#define spl_kern_path_parent(path, nd) kern_path_parent(path, nd) +#else +#define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd) +#endif /* HAVE_KERN_PATH_PARENT */ + #endif /* SPL_FILE_COMPAT_H */ diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 1af9b2998..c46643175 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -316,7 +316,7 @@ vn_remove(const char *path, uio_seg_t seg, int flags) ASSERT(seg == UIO_SYSSPACE); ASSERT(flags == RMFILE); - rc = path_lookup(path, LOOKUP_PARENT, &nd); + rc = spl_kern_path_parent(path, &nd); if (rc) SGOTO(exit, rc); @@ -370,11 +370,11 @@ vn_rename(const char *oldname, const char *newname, int x1) int rc = 0; SENTRY; - rc = path_lookup(oldname, LOOKUP_PARENT, &oldnd); + rc = spl_kern_path_parent(oldname, &oldnd); if (rc) SGOTO(exit, rc); - rc = path_lookup(newname, LOOKUP_PARENT, &newnd); + rc = spl_kern_path_parent(newname, &newnd); if (rc) SGOTO(exit1, rc); diff --git a/spl_config.h.in b/spl_config.h.in index afa1535fa..7f084f544 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -111,6 +111,9 @@ /* kallsyms_lookup_name() is available */ #undef HAVE_KALLSYMS_LOOKUP_NAME +/* kern_path_parent() is available */ +#undef HAVE_KERN_PATH_PARENT + /* kmalloc_node() is available */ #undef HAVE_KMALLOC_NODE From 3dfc591ac4003d1c92159b5dfe8970f24e008f81 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 Apr 2011 14:22:35 -0700 Subject: [PATCH 0512/1062] Linux 2.6.39 compat, zlib_deflate_workspacesize() The function zlib_deflate_workspacesize() now take 2 arguments. This was done to avoid always having to allocate the maximum size workspace (268K). The caller can now specific the windowBits and memLevel compression parameters to get a smaller workspace. For our purposes we introduce a spl_zlib_deflate_workspacesize() wrapper which accepts both arguments. When the two argument version of zlib_deflate_workspacesize() is available the arguments are passed through. When it's not we assume the worst case and a maximally sized workspace is used. --- config/spl-build.m4 | 23 +++++++ configure | 128 ++++++++++++++++++++++++++++++++++++ include/linux/zlib_compat.h | 37 +++++++++++ include/sys/types.h | 1 + module/spl/spl-zlib.c | 8 ++- spl_config.h.in | 3 + 6 files changed, 198 insertions(+), 2 deletions(-) create mode 100644 include/linux/zlib_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 13c68358b..97b38234b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -80,6 +80,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SHRINK_DCACHE_MEMORY SPL_AC_SHRINK_ICACHE_MEMORY SPL_AC_KERN_PATH_PARENT + SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1802,3 +1803,25 @@ AC_DEFUN([SPL_AC_KERN_PATH_PARENT], [ [kern_path_parent() is available])], []) ]) + +dnl # +dnl # 2.6.39 API compat, +dnl # The function zlib_deflate_workspacesize() now take 2 arguments. +dnl # This was done to avoid always having to allocate the maximum size +dnl # workspace (268K). The caller can now specific the windowBits and +dnl # memLevel compression parameters to get a smaller workspace. +dnl # +AC_DEFUN([SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], + [AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1, + [zlib_deflate_workspacesize() wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index 476100181..d05ff84ac 100755 --- a/configure +++ b/configure @@ -15654,6 +15654,70 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5 +$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + ;; user) @@ -19668,6 +19732,70 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5 +$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + diff --git a/include/linux/zlib_compat.h b/include/linux/zlib_compat.h new file mode 100644 index 000000000..410dc485e --- /dev/null +++ b/include/linux/zlib_compat.h @@ -0,0 +1,37 @@ +/*****************************************************************************\ + * Copyright (C) 2011 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_ZLIB_COMPAT_H +#define _SPL_ZLIB_COMPAT_H + +#include + +#ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE +#define spl_zlib_deflate_workspacesize(wb, ml) \ + zlib_deflate_workspacesize(wb, ml) +#else +#define spl_zlib_deflate_workspacesize(wb, ml) \ + zlib_deflate_workspacesize() +#endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +#endif /* SPL_ZLIB_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 786474baa..0c3d88ec3 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -41,6 +41,7 @@ #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 02825b461..c42562f81 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -198,10 +198,14 @@ EXPORT_SYMBOL(z_uncompress); int zlib_init(void) { + int size; SENTRY; + + size = MAX(spl_zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL), + zlib_inflate_workspacesize()); + zlib_workspace_cache = kmem_cache_create("spl_zlib_workspace_cache", - max(zlib_deflate_workspacesize(), zlib_inflate_workspacesize()), - 0, NULL, NULL, NULL, NULL, NULL, KMC_VMEM); + size, 0, NULL, NULL, NULL, NULL, NULL, KMC_VMEM); if (!zlib_workspace_cache) SRETURN(1); diff --git a/spl_config.h.in b/spl_config.h.in index 7f084f544..b2ba74b8c 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -21,6 +21,9 @@ /* vfs_unlink() wants 2 args */ #undef HAVE_2ARGS_VFS_UNLINK +/* zlib_deflate_workspacesize() wants 2 args */ +#undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE + /* file_fsync() wants 3 args */ #undef HAVE_3ARGS_FILE_FSYNC From fa6f7d8f9d4760975ea5fe116a7366604f286195 Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Mon, 11 Apr 2011 14:49:50 -0500 Subject: [PATCH 0513/1062] Import spl_hostid as a module parameter. Provide a call_usermodehelper() alternative by letting the hostid be passed as a module parameter like this: $ modprobe spl spl_hostid=0x12345678 Internally change the spl_hostid variable to unsigned long because that is the type that the coreutils /usr/bin/hostid returns. Move the hostid command into GET_HOSTID_CMD for consistency with the similar GET_KALLSYMS_ADDR_CMD invocation. Use argv[0] instead of sh_path for consistency internally and with other Linux drivers. Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 2 +- module/spl/spl-generic.c | 20 ++++++++++++++------ module/spl/spl-proc.c | 9 +++------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 35f7cb5c1..29dcda7fa 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -143,7 +143,7 @@ /* Missing globals */ extern char spl_version[16]; -extern long spl_hostid; +extern unsigned long spl_hostid; extern char hw_serial[11]; /* Missing misc functions */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 2b43f0c33..680655d0f 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -52,8 +52,10 @@ char spl_version[16] = "SPL v" SPL_META_VERSION; EXPORT_SYMBOL(spl_version); -long spl_hostid = 0; +unsigned long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); +module_param(spl_hostid, ulong, 0644); +MODULE_PARM_DESC(spl_hostid, "The system hostid."); char hw_serial[HW_HOSTID_LEN] = ""; EXPORT_SYMBOL(hw_serial); @@ -362,13 +364,18 @@ struct new_utsname *__utsname(void) } EXPORT_SYMBOL(__utsname); +#define GET_HOSTID_CMD \ + "exec 0/proc/sys/kernel/spl/hostid " \ + " 2>/dev/null; " \ + "hostid" + static int set_hostid(void) { - char sh_path[] = "/bin/sh"; - char *argv[] = { sh_path, + char *argv[] = { "/bin/sh", "-c", - "/usr/bin/hostid >/proc/sys/kernel/spl/hostid", + GET_HOSTID_CMD, NULL }; char *envp[] = { "HOME=/", "TERM=linux", @@ -382,7 +389,7 @@ set_hostid(void) * '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid * for us to use. It's a horrific solution but it will do for now. */ - rc = call_usermodehelper(sh_path, argv, envp, 1); + rc = call_usermodehelper(argv[0], argv, envp, 1); if (rc) printk("SPL: Failed user helper '%s %s %s', rc = %d\n", argv[0], argv[1], argv[2], rc); @@ -475,7 +482,8 @@ __init spl_init(void) if ((rc = zlib_init())) SGOTO(out9, rc); - if ((rc = set_hostid())) + /* Get the hostid if it was not passed as a module parameter. */ + if (spl_hostid == 0 && (rc = set_hostid())) SGOTO(out10, rc = -EADDRNOTAVAIL); #ifndef HAVE_KALLSYMS_LOOKUP_NAME diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index d2b295ce0..fa0d1fb3d 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -487,7 +487,6 @@ SPL_PROC_HANDLER(proc_doslab) SPL_PROC_HANDLER(proc_dohostid) { int len, rc = 0; - int32_t val; char *end, str[32]; SENTRY; @@ -499,17 +498,15 @@ SPL_PROC_HANDLER(proc_dohostid) if (rc < 0) SRETURN(rc); - val = simple_strtol(str, &end, 16); + spl_hostid = simple_strtoul(str, &end, 16); if (str == end) SRETURN(-EINVAL); - spl_hostid = (long) val; - (void) snprintf(hw_serial, HW_HOSTID_LEN, "%u", - (val >= 0) ? val : -val); + (void) snprintf(hw_serial, HW_HOSTID_LEN, "%lu", spl_hostid); hw_serial[HW_HOSTID_LEN - 1] = '\0'; *ppos += *lenp; } else { - len = snprintf(str, sizeof(str), "%lx", spl_hostid); + len = snprintf(str, sizeof(str), "%lux", spl_hostid); if (*ppos >= len) rc = 0; else From ad35b6a6e99a0e0962d6a33e181784cada44c3c0 Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Thu, 14 Apr 2011 14:01:22 -0500 Subject: [PATCH 0514/1062] Remove the gawk dependency. This reverts commit 1814251453c8140f50170ad29d9105c1273d7e08. Demote the gawk call back to awk and ensure that stderr is attached. GNU gawk tolerates a missing stderr handle, but many utilities do not, which could be why a regular awk call was unexplainably failing on some systems. Use argv[0] instead of sh_path for consistency internally and with other Linux drivers. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 17 +---------------- configure | 34 ++-------------------------------- module/spl/spl-generic.c | 26 +++++++++++++++----------- 3 files changed, 18 insertions(+), 59 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 97b38234b..b25db38f3 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -211,25 +211,10 @@ AC_DEFUN([SPL_AC_KERNEL_CONFIG], [ ** You must rebuild your kernel without this option.]), []) ]) -dnl # -dnl # Explicitly check for gawk, we require it for the the usermode -dnl # helper. For some reason the standard awk command does not -dnl # behave correctly when invoked from the usermode helper. -dnl # -AC_DEFUN([SPL_AC_GAWK], [ - AS_IF([test "x$AWK" != xgawk], [ - AC_MSG_ERROR([ - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again.]) - ]) -]) - dnl # dnl # Default SPL user configuration dnl # -AC_DEFUN([SPL_AC_CONFIG_USER], [ - SPL_AC_GAWK -]) +AC_DEFUN([SPL_AC_CONFIG_USER], []) dnl # dnl # Check for rpm+rpmbuild to build RPM packages. If these tools diff --git a/configure b/configure index d05ff84ac..1fb10af36 100755 --- a/configure +++ b/configure @@ -15719,22 +15719,7 @@ fi ;; - user) - - if test "x$AWK" != xgawk; then - - { { $as_echo "$as_me:$LINENO: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&5 -$as_echo "$as_me: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&2;} - { (exit 1); exit 1; }; } - -fi - - - ;; + user) ;; all) @@ -19797,22 +19782,7 @@ fi - - - if test "x$AWK" != xgawk; then - - { { $as_echo "$as_me:$LINENO: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&5 -$as_echo "$as_me: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&2;} - { (exit 1); exit 1; }; } - -fi - - - ;; + ;; srpm) ;; *) { $as_echo "$as_me:$LINENO: result: Error!" >&5 diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 680655d0f..654654148 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -414,21 +414,25 @@ EXPORT_SYMBOL(zone_get_hostid); #ifndef HAVE_KALLSYMS_LOOKUP_NAME /* - * Because kallsyms_lookup_name() is no longer exported in the - * mainline kernel we are forced to resort to somewhat drastic - * measures. This function replaces the functionality by performing - * an upcall to user space where /proc/kallsyms is consulted for - * the requested address. + * The kallsyms_lookup_name() kernel function is not an exported symbol in + * Linux 2.6.19 through 2.6.32 inclusive. + * + * This function replaces the functionality by performing an upcall to user + * space where /proc/kallsyms is consulted for the requested address. + * */ -#define GET_KALLSYMS_ADDR_CMD \ - "gawk '{ if ( $3 == \"kallsyms_lookup_name\") { print $1 } }' " \ - "/proc/kallsyms >/proc/sys/kernel/spl/kallsyms_lookup_name" + +#define GET_KALLSYMS_ADDR_CMD \ + "exec 0/proc/sys/kernel/spl/kallsyms_lookup_name " \ + " 2>/dev/null; " \ + "awk '{ if ( $3 == \"kallsyms_lookup_name\" ) { print $1 } }' " \ + " /proc/kallsyms " static int set_kallsyms_lookup_name(void) { - char sh_path[] = "/bin/sh"; - char *argv[] = { sh_path, + char *argv[] = { "/bin/sh", "-c", GET_KALLSYMS_ADDR_CMD, NULL }; @@ -438,7 +442,7 @@ set_kallsyms_lookup_name(void) NULL }; int rc; - rc = call_usermodehelper(sh_path, argv, envp, 1); + rc = call_usermodehelper(argv[0], argv, envp, 1); if (rc) printk("SPL: Failed user helper '%s %s %s', rc = %d\n", argv[0], argv[1], argv[2], rc); From 5b8f76ea16f5634c6a28490f149e699afce09cdf Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Thu, 21 Apr 2011 10:11:45 -0500 Subject: [PATCH 0515/1062] Make the SPL kernel messages consistent with ZFS. Change the SPL kernel messages for module loading and module unloading so that they are similar to the ZFS kernel messages. Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 6 +++--- module/splat/splat-ctl.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 654654148..17626b782 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -498,8 +498,8 @@ __init spl_init(void) if ((rc = spl_kmem_init_kallsyms_lookup())) SGOTO(out10, rc); - printk(KERN_NOTICE "SPL: Loaded Solaris Porting Layer v%s%s\n", - SPL_META_VERSION, SPL_DEBUG_STR); + printk(KERN_NOTICE "SPL: Loaded module v%s%s, using hostid 0x%08x\n", + SPL_META_VERSION, SPL_DEBUG_STR, (unsigned int) spl_hostid); SRETURN(rc); out10: zlib_fini(); @@ -532,7 +532,7 @@ spl_fini(void) { SENTRY; - printk(KERN_NOTICE "SPL: Unloaded Solaris Porting Layer v%s%s\n", + printk(KERN_NOTICE "SPL: Unloaded module v%s%s\n", SPL_META_VERSION, SPL_DEBUG_STR); zlib_fini(); tsd_fini(); diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 65ad8c113..58e23051d 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -663,8 +663,8 @@ splat_init(void) MKDEV(SPLAT_MAJOR, 0), NULL, SPLAT_NAME); - printk(KERN_INFO "SPLAT: Loaded Solaris Porting LAyer " - "Tests v%s\n", SPL_META_VERSION); + printk(KERN_INFO "SPLAT: Loaded module v%s%s\n", + SPL_META_VERSION, SPL_DEBUG_STR); return 0; error: printk(KERN_ERR "SPLAT: Error registering splat device, %d\n", rc); @@ -698,8 +698,8 @@ splat_fini(void) SPLAT_SUBSYSTEM_FINI(kmem); ASSERT(list_empty(&splat_module_list)); - printk(KERN_INFO "SPLAT: Unloaded Solaris Porting LAyer " - "Tests v%s\n", SPL_META_VERSION); + printk(KERN_INFO "SPLAT: Unloaded module v%s%s\n", + SPL_META_VERSION, SPL_DEBUG_STR); return 0; } From d837ae395b3368bcdc13a7ef1ad8abfc8d24e88f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 Apr 2011 16:17:13 -0700 Subject: [PATCH 0516/1062] Fix 32-bit MAXOFFSET_T definition The correct definition of MAXOFFSET_T under Solaris is in reality tied to the maximum size of a 'long long' type. With this in mind MAXOFFSET_T is now defined as LLONG_MAX which ensures the correct value is used on both 32-bit and 64-bit systems. --- include/sys/sysmacros.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 29dcda7fa..7a4faa666 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -65,13 +65,7 @@ #define MAXMSGLEN 256 #define MAXNAMELEN 256 #define MAXPATHLEN PATH_MAX - -#ifdef _LP64 -#define MAXOFFSET_T 0x7fffffffffffffffl -#else -#define MAXOFFSET_T 0x7fffffffl -#endif - +#define MAXOFFSET_T LLONG_MAX #define MAXBSIZE 8192 #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ From c95b308d12be1a7f317d5b280a9f14e7d0b1f104 Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Sun, 24 Apr 2011 20:48:56 -0500 Subject: [PATCH 0517/1062] Correct typos in the spl proc handler. Correct a format typo that causes /proc/sys/kernel/spl/hostid to return a decimal number instead of a hexadecimal number. --- module/spl/spl-proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index fa0d1fb3d..1b353ceb2 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -492,7 +492,7 @@ SPL_PROC_HANDLER(proc_dohostid) if (write) { /* We can't use spl_proc_doulongvec_minmax() in the write - * case hear because hostid while a hex value has no + * case here because hostid while a hex value has no * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); if (rc < 0) @@ -506,7 +506,7 @@ SPL_PROC_HANDLER(proc_dohostid) hw_serial[HW_HOSTID_LEN - 1] = '\0'; *ppos += *lenp; } else { - len = snprintf(str, sizeof(str), "%lux", spl_hostid); + len = snprintf(str, sizeof(str), "%lx", spl_hostid); if (*ppos >= len) rc = 0; else @@ -534,7 +534,7 @@ SPL_PROC_HANDLER(proc_dokallsyms_lookup_name) SRETURN(-EEXIST); /* We can't use spl_proc_doulongvec_minmax() in the write - * case hear because the address while a hex value has no + * case here because the address while a hex value has no * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); if (rc < 0) From 9d4b7c17a0820a1bf48a7a3fd9dfb6e87b0306dd Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 24 Apr 2011 10:19:28 +0200 Subject: [PATCH 0518/1062] Renamed 'struct fid' for NFS Renamed 'struct fid' because its name conflicts with another struct in the Linux kernel headers. The fid_t typedef remains unchanged intentionally. --- include/sys/vfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/vfs.h b/include/sys/vfs.h index 9399afbef..88ca21d52 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -35,7 +35,7 @@ #define MAXFIDSZ 64 -typedef struct fid { +typedef struct spl_fid { union { long fid_pad; struct { From c1f95c2b94c0ee71b1fe1f71fd5e471802ffd73d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 29 Apr 2011 13:58:45 -0700 Subject: [PATCH 0519/1062] Correct MAXUID The uid_t on most systems is in fact and unsigned 32-bit value. This is almost always correct, however you could compile your kernel to use an unsigned 16-bit value for uid_t. In practice I've never encountered a distribution which does this so I'm willing to overlook this corner case for now. --- include/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/param.h b/include/sys/param.h index 60f3ae2a9..5a1994960 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -31,6 +31,6 @@ #define ptob(pages) (pages << PAGE_SHIFT) #define btop(bytes) (bytes >> PAGE_SHIFT) -#define MAXUID 2147483647 +#define MAXUID UINT32_MAX #endif /* SPL_PARAM_H */ From dde6b7b137f56894a45723e7b49227629cfd3bd5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 3 May 2011 10:31:12 -0700 Subject: [PATCH 0520/1062] Prep spl-0.6.0-rc4 tag Create the fourth 0.6.0 release candidate tag (rc4). --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 95261b3fe..5cc270dcd 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc3 +Release: rc4 Release-Tags: relext From 372c2572336468cbf60272aa7e735b7ca0c3807c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 6 May 2011 15:21:58 -0700 Subject: [PATCH 0521/1062] Add TASKQ_NORECLAIM flag It has become necessary to be able to optionally disable direct memory reclaim for certain taskqs. To support this the TASKQ_NORECLAIM flags has been added which sets the PF_MEMALLOC bit for all threads in the taskq. --- include/sys/taskq.h | 1 + module/spl/spl-taskq.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index c83409d49..57f8b1cb5 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -40,6 +40,7 @@ #define TASKQ_DYNAMIC 0x00000004 #define TASKQ_THREADS_CPU_PCT 0x00000008 #define TASKQ_DC_BATCH 0x00000010 +#define TASKQ_NORECLAIM 0x00000020 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 5a17f1ccf..f9ee57035 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -371,6 +371,10 @@ taskq_thread(void *args) ASSERT(tq); current->flags |= PF_NOFREEZE; + /* Disable the direct memory reclaim path */ + if (tq->tq_flags & TASKQ_NORECLAIM) + current->flags |= PF_MEMALLOC; + sigfillset(&blocked); sigprocmask(SIG_BLOCK, &blocked, NULL); flush_signals(current); From a32661a6c976c1d8100ddd8e60c958ae8db98747 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 16 Jun 2011 11:49:38 -0700 Subject: [PATCH 0522/1062] Avoid 'rpm -q' bug for 'make pkg' RPM version 4.9.0 has been observed to generate extra debug messages in certain cases. These debug messages prevent us from cleanly acquiring the architecture. This is clearly an upstream RPM bug which will get fixed. But until then a safe solution is to pipe the result through 'tail -1' to just grab the architecture bit we care about. Example 'rpm -qp spl-0.6.0-rc4.src.rpm --qf %{arch}' output: Freeing read locks for locker 0x166: 28031/47480843735008 Freeing read locks for locker 0x168: 28031/47480843735008 x86_64 --- Makefile.in | 8 ++++---- config/deb.am | 4 ++-- config/tgz.am | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index e5304d0a0..e47e16f0b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -910,7 +910,7 @@ deb-modules: deb-local rpm-modules name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ @@ -919,7 +919,7 @@ deb-modules: deb-local rpm-modules deb-utils: deb-local rpm-utils name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 @@ -939,7 +939,7 @@ tgz-modules: tgz-local rpm-modules name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ @@ -948,7 +948,7 @@ tgz-modules: tgz-local rpm-modules tgz-utils: tgz-local rpm-utils name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ $(RM) $$pkg1 diff --git a/config/deb.am b/config/deb.am index 766655dcf..ce84cfa9c 100644 --- a/config/deb.am +++ b/config/deb.am @@ -32,7 +32,7 @@ deb-modules: deb-local rpm-modules name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ @@ -41,7 +41,7 @@ deb-modules: deb-local rpm-modules deb-utils: deb-local rpm-utils name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 diff --git a/config/tgz.am b/config/tgz.am index 57d2eee3b..bbc204a65 100644 --- a/config/tgz.am +++ b/config/tgz.am @@ -25,7 +25,7 @@ tgz-modules: tgz-local rpm-modules name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ @@ -34,7 +34,7 @@ tgz-modules: tgz-local rpm-modules tgz-utils: tgz-local rpm-utils name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ $(RM) $$pkg1 From a55bcaad181096d764e12d847e3091cd7b15509a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 16 Jun 2011 15:39:08 -0700 Subject: [PATCH 0523/1062] Linux 3.0: Shrinker compatibility Update the the wrapper macros for the memory shrinker to handle this 4th API change. The callback function now takes a shrink_control structure. This is certainly a step in the right direction but it's annoying to have to accomidate yet another version of the API. --- config/spl-build.m4 | 23 +++++++ configure | 136 ++++++++++++++++++++++++++++++++++++++ include/linux/mm_compat.h | 127 +++++++++++++++++++++++++++++------ module/spl/spl-kmem.c | 19 ++++-- spl_config.h.in | 3 + 5 files changed, 280 insertions(+), 28 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b25db38f3..75267bb83 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -81,6 +81,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SHRINK_ICACHE_MEMORY SPL_AC_KERN_PATH_PARENT SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE + SPL_AC_SHRINK_CONTROL_STRUCT ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1810,3 +1811,25 @@ AC_DEFUN([SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.39 API change, +dnl # Shrinker adjust to use common shrink_control structure. +dnl # +AC_DEFUN([SPL_AC_SHRINK_CONTROL_STRUCT], [ + AC_MSG_CHECKING([whether struct shrink_control exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct shrink_control sc __attribute__ ((unused)); + + sc.nr_to_scan = 0; + sc.gfp_mask = GFP_KERNEL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SHRINK_CONTROL_STRUCT, 1, + [struct shrink_control exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index 1fb10af36..c537b9817 100755 --- a/configure +++ b/configure @@ -15712,6 +15712,74 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5 +$as_echo_n "checking whether struct shrink_control exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct shrink_control sc __attribute__ ((unused)); + + sc.nr_to_scan = 0; + sc.gfp_mask = GFP_KERNEL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_CONTROL_STRUCT 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build @@ -19775,6 +19843,74 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5 +$as_echo_n "checking whether struct shrink_control exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct shrink_control sc __attribute__ ((unused)); + + sc.nr_to_scan = 0; + sc.gfp_mask = GFP_KERNEL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_CONTROL_STRUCT 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 07231c9a4..173acd434 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -72,6 +72,13 @@ extern invalidate_inodes_t invalidate_inodes_fn; # endif /* HAVE_2ARGS_INVALIDATE_INODES */ #endif /* HAVE_INVALIDATE_INODES */ +#if !defined(HAVE_SHRINK_CONTROL_STRUCT) +struct shrink_control { + gfp_t gfp_mask; + unsigned long nr_to_scan; +}; +#endif /* HAVE_SHRINK_CONTROL_STRUCT */ + /* * 2.6.xx API compat, * There currently exists no exposed API to partially shrink the dcache. @@ -79,7 +86,16 @@ extern invalidate_inodes_t invalidate_inodes_fn; * which is called during memory pressure. */ #ifndef HAVE_SHRINK_DCACHE_MEMORY -# ifdef HAVE_3ARGS_SHRINKER_CALLBACK +# if defined(HAVE_SHRINK_CONTROL_STRUCT) +typedef int (*shrink_dcache_memory_t)(struct shrinker *, + struct shrink_control *); +extern shrink_dcache_memory_t shrink_dcache_memory_fn; +# define shrink_dcache_memory(nr, gfp) \ +({ \ + struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \ + shrink_dcache_memory_fn(NULL, &sc); \ +}) +# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) typedef int (*shrink_dcache_memory_t)(struct shrinker *, int, gfp_t); extern shrink_dcache_memory_t shrink_dcache_memory_fn; # define shrink_dcache_memory(nr, gfp) shrink_dcache_memory_fn(NULL, nr, gfp) @@ -97,7 +113,16 @@ extern shrink_dcache_memory_t shrink_dcache_memory_fn; * which is called during memory pressure. */ #ifndef HAVE_SHRINK_ICACHE_MEMORY -# ifdef HAVE_3ARGS_SHRINKER_CALLBACK +# if defined(HAVE_SHRINK_CONTROL_STRUCT) +typedef int (*shrink_icache_memory_t)(struct shrinker *, + struct shrink_control *); +extern shrink_icache_memory_t shrink_icache_memory_fn; +# define shrink_icache_memory(nr, gfp) \ +({ \ + struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \ + shrink_icache_memory_fn(NULL, &sc); \ +}) +# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) typedef int (*shrink_icache_memory_t)(struct shrinker *, int, gfp_t); extern shrink_icache_memory_t shrink_icache_memory_fn; # define shrink_icache_memory(nr, gfp) shrink_icache_memory_fn(NULL, nr, gfp) @@ -108,6 +133,9 @@ extern shrink_icache_memory_t shrink_icache_memory_fn; # endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ #endif /* HAVE_SHRINK_ICACHE_MEMORY */ +/* + * Linux 2.6. - 2.6. Shrinker API Compatibility. + */ #ifdef HAVE_SET_SHRINKER typedef struct spl_shrinker { struct shrinker *shrinker; @@ -127,31 +155,86 @@ spl_unregister_shrinker(spl_shrinker_t *ss) remove_shrinker(ss->shrinker); } -# define SPL_SHRINKER_DECLARE(s, x, y) \ - static spl_shrinker_t s = { .shrinker = NULL, .fn = x, .seeks = y } -# define SPL_SHRINKER_CALLBACK_PROTO(fn, x, y, z) \ - static int fn(int y, unsigned int z) -# define spl_exec_shrinker(ss, nr, gfp) \ - ((spl_shrinker_t *)ss)->fn(nr, gfp) +# define SPL_SHRINKER_DECLARE(s, x, y) \ + static spl_shrinker_t s = { \ + .shrinker = NULL, \ + .fn = x, \ + .seeks = y \ + } -#else /* HAVE_SET_SHRINKER */ +# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ + static int fn(int, unsigned int) +# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static int \ +fn(int nr_to_scan, unsigned int gfp_mask) \ +{ \ + struct shrink_control sc; \ + \ + sc.nr_to_scan = nr_to_scan; \ + sc.gfp_mask = gfp_mask; \ + \ + return __ ## fn(NULL, &sc); \ +} + +#else # define spl_register_shrinker(x) register_shrinker(x) # define spl_unregister_shrinker(x) unregister_shrinker(x) -# define SPL_SHRINKER_DECLARE(s, x, y) \ - static struct shrinker s = { .shrink = x, .seeks = y } +# define SPL_SHRINKER_DECLARE(s, x, y) \ + static struct shrinker s = { \ + .shrink = x, \ + .seeks = y \ + } -# ifdef HAVE_3ARGS_SHRINKER_CALLBACK -# define SPL_SHRINKER_CALLBACK_PROTO(fn, x, y, z) \ - static int fn(struct shrinker *x, int y, unsigned int z) -# define spl_exec_shrinker(ss, nr, gfp) \ - ((struct shrinker *)ss)->shrink(NULL, nr, gfp) -# else /* HAVE_3ARGS_SHRINKER_CALLBACK */ -# define SPL_SHRINKER_CALLBACK_PROTO(fn, x, y, z) \ - static int fn(int y, unsigned int z) -# define spl_exec_shrinker(ss, nr, gfp) \ - ((struct shrinker *)ss)->shrink(nr, gfp) -# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ +/* + * Linux 2.6. - 2.6. Shrinker API Compatibility. + */ +# if defined(HAVE_SHRINK_CONTROL_STRUCT) +# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ + static int fn(struct shrinker *, struct shrink_control *) +# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static int \ +fn(struct shrinker *shrink, struct shrink_control *sc) { \ + return __ ## fn(shrink, sc); \ +} + +/* + * Linux 2.6. - 2.6. Shrinker API Compatibility. + */ +# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) +# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ + static int fn(struct shrinker *, int, unsigned int) +# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static int \ +fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask) \ +{ \ + struct shrink_control sc; \ + \ + sc.nr_to_scan = nr_to_scan; \ + sc.gfp_mask = gfp_mask; \ + \ + return __ ## fn(shrink, &sc); \ +} + +/* + * Linux 2.6. - 2.6. Shrinker API Compatibility. + */ +# else +# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ + static int fn(int, unsigned int) +# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static int \ +fn(int nr_to_scan, unsigned int gfp_mask) \ +{ \ + struct shrink_control sc; \ + \ + sc.nr_to_scan = nr_to_scan; \ + sc.gfp_mask = gfp_mask; \ + \ + return __ ## fn(NULL, &sc); \ +} + +# endif #endif /* HAVE_SET_SHRINKER */ #endif /* SPL_MM_COMPAT_H */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e7fc5f2c9..d71ab11bb 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -829,8 +829,7 @@ struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush); -SPL_SHRINKER_CALLBACK_PROTO(spl_kmem_cache_generic_shrinker, - shrinker_cb, nr_to_scan, gfp_mask); +SPL_SHRINKER_CALLBACK_FWD_DECLARE(spl_kmem_cache_generic_shrinker); SPL_SHRINKER_DECLARE(spl_kmem_cache_shrinker, spl_kmem_cache_generic_shrinker, KMC_DEFAULT_SEEKS); @@ -1858,15 +1857,16 @@ EXPORT_SYMBOL(spl_kmem_cache_free); * objects should be freed, because Solaris semantics are to free * all available objects we may free more objects than requested. */ -SPL_SHRINKER_CALLBACK_PROTO(spl_kmem_cache_generic_shrinker, - shrinker_cb, nr_to_scan, gfp_mask) +static int +__spl_kmem_cache_generic_shrinker(struct shrinker *shrink, + struct shrink_control *sc) { spl_kmem_cache_t *skc; int unused = 0; down_read(&spl_kmem_cache_sem); list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { - if (nr_to_scan) + if (sc->nr_to_scan) spl_kmem_cache_reap_now(skc); /* @@ -1882,6 +1882,8 @@ SPL_SHRINKER_CALLBACK_PROTO(spl_kmem_cache_generic_shrinker, return (unused * sysctl_vfs_cache_pressure) / 100; } +SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); + /* * Call the registered reclaim function for a cache. Depending on how * many and which objects are released it may simply repopulate the @@ -1923,7 +1925,12 @@ EXPORT_SYMBOL(spl_kmem_cache_reap_now); void spl_kmem_reap(void) { - spl_exec_shrinker(&spl_kmem_cache_shrinker, KMC_REAP_CHUNK, GFP_KERNEL); + struct shrink_control sc; + + sc.nr_to_scan = KMC_REAP_CHUNK; + sc.gfp_mask = GFP_KERNEL; + + __spl_kmem_cache_generic_shrinker(NULL, &sc); } EXPORT_SYMBOL(spl_kmem_reap); diff --git a/spl_config.h.in b/spl_config.h.in index b2ba74b8c..95394e6e2 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -165,6 +165,9 @@ /* set_shrinker() available */ #undef HAVE_SET_SHRINKER +/* struct shrink_control exists */ +#undef HAVE_SHRINK_CONTROL_STRUCT + /* shrink_dcache_memory() is available */ #undef HAVE_SHRINK_DCACHE_MEMORY From bf0c60c060ac58c9bb835cb62b49f0cb68bb68e4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 21 Jun 2011 10:57:48 -0700 Subject: [PATCH 0524/1062] Add linux compatibility tests While the splat tests were originally designed to stress test the Solaris primatives. I am extending them to include some kernel compatibility tests. Certain linux APIs have changed frequently. These tests ensure that added compatibility is working properly and no unnoticed regression have slipped in. Test 1 and 2 add basic regression tests for shrink_icache_memory and shrink_dcache_memory. These are simply functional tests to ensure we can call these functions safely. Checking for correct behavior is more difficult since other running processes will influence the behavior. However, these functions are provided by the kernel so if we can successfully call them we assume they are working correctly. Test 3 checks that shrinker functions are being registered and called correctly. As of Linux 3.0 the shrinker API has changed four different times so I felt the need to add a trivial test case to ensure each variant works as expected. --- include/splat-ctl.h | 1 + module/splat/Makefile.in | 1 + module/splat/splat-ctl.c | 2 + module/splat/splat-internal.h | 3 + module/splat/splat-linux.c | 241 ++++++++++++++++++++++++++++++++++ 5 files changed, 248 insertions(+) create mode 100644 module/splat/splat-linux.c diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 6f15ba2e8..b800887b8 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -105,6 +105,7 @@ typedef struct splat_cmd { #define SPLAT_SUBSYSTEM_GENERIC 0x0d00 #define SPLAT_SUBSYSTEM_CRED 0x0e00 #define SPLAT_SUBSYSTEM_ZLIB 0x0f00 +#define SPLAT_SUBSYSTEM_LINUX 0x1000 #define SPLAT_SUBSYSTEM_UNKNOWN 0xff00 #endif /* _SPLAT_CTL_H */ diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index 2bf25c5b2..8340b7036 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -24,3 +24,4 @@ splat-objs += @top_srcdir@/module/splat/splat-list.o splat-objs += @top_srcdir@/module/splat/splat-generic.o splat-objs += @top_srcdir@/module/splat/splat-cred.o splat-objs += @top_srcdir@/module/splat/splat-zlib.o +splat-objs += @top_srcdir@/module/splat/splat-linux.o diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 58e23051d..dd1ece05b 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -633,6 +633,7 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(generic); SPLAT_SUBSYSTEM_INIT(cred); SPLAT_SUBSYSTEM_INIT(zlib); + SPLAT_SUBSYSTEM_INIT(linux); dev = MKDEV(SPLAT_MAJOR, 0); if ((rc = register_chrdev_region(dev, SPLAT_MINORS, SPLAT_NAME))) @@ -681,6 +682,7 @@ splat_fini(void) cdev_del(&splat_cdev); unregister_chrdev_region(dev, SPLAT_MINORS); + SPLAT_SUBSYSTEM_FINI(linux); SPLAT_SUBSYSTEM_FINI(zlib); SPLAT_SUBSYSTEM_FINI(cred); SPLAT_SUBSYSTEM_FINI(generic); diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 072abb8c7..501e42c32 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -220,6 +220,7 @@ splat_subsystem_t *splat_list_init(void); splat_subsystem_t *splat_generic_init(void); splat_subsystem_t *splat_cred_init(void); splat_subsystem_t *splat_zlib_init(void); +splat_subsystem_t *splat_linux_init(void); void splat_condvar_fini(splat_subsystem_t *); void splat_kmem_fini(splat_subsystem_t *); @@ -236,6 +237,7 @@ void splat_list_fini(splat_subsystem_t *); void splat_generic_fini(splat_subsystem_t *); void splat_cred_fini(splat_subsystem_t *); void splat_zlib_fini(splat_subsystem_t *); +void splat_linux_fini(splat_subsystem_t *); int splat_condvar_id(void); int splat_kmem_id(void); @@ -252,5 +254,6 @@ int splat_list_id(void); int splat_generic_id(void); int splat_cred_id(void); int splat_zlib_id(void); +int splat_linux_id(void); #endif /* _SPLAT_INTERNAL_H */ diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c new file mode 100644 index 000000000..07126411a --- /dev/null +++ b/module/splat/splat-linux.c @@ -0,0 +1,241 @@ +/*****************************************************************************\ + * Copyright (C) 2011 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting LAyer Tests (SPLAT) Kernel Compatibility Tests. +\*****************************************************************************/ + +#include "splat-internal.h" + +#define SPLAT_LINUX_NAME "linux" +#define SPLAT_LINUX_DESC "Kernel Compatibility Tests" + +#define SPLAT_LINUX_TEST1_ID 0x1001 +#define SPLAT_LINUX_TEST1_NAME "shrink_dcache" +#define SPLAT_LINUX_TEST1_DESC "Shrink dcache test" + +#define SPLAT_LINUX_TEST2_ID 0x1002 +#define SPLAT_LINUX_TEST2_NAME "shrink_icache" +#define SPLAT_LINUX_TEST2_DESC "Shrink icache test" + +#define SPLAT_LINUX_TEST3_ID 0x1003 +#define SPLAT_LINUX_TEST3_NAME "shrinker" +#define SPLAT_LINUX_TEST3_DESC "Shrinker test" + + +/* + * Attempt to shrink the dcache memory. This is simply a functional + * to ensure we can correctly call the shrinker. We don't check that + * the cache actually decreased because we have no control over what + * else may be running on the system. This avoid false positives. + */ +static int +splat_linux_test1(struct file *file, void *arg) +{ + int remain_before; + int remain_after; + + remain_before = shrink_dcache_memory(0, GFP_KERNEL); + remain_after = shrink_dcache_memory(KMC_REAP_CHUNK, GFP_KERNEL); + + splat_vprint(file, SPLAT_LINUX_TEST1_NAME, + "Shrink dcache memory, remain %d -> %d\n", + remain_before, remain_after); + + return 0; +} + +/* + * Attempt to shrink the icache memory. This is simply a functional + * to ensure we can correctly call the shrinker. We don't check that + * the cache actually decreased because we have no control over what + * else may be running on the system. This avoid false positives. + */ +static int +splat_linux_test2(struct file *file, void *arg) +{ + int remain_before; + int remain_after; + + remain_before = shrink_icache_memory(0, GFP_KERNEL); + remain_after = shrink_icache_memory(KMC_REAP_CHUNK, GFP_KERNEL); + + splat_vprint(file, SPLAT_LINUX_TEST2_NAME, + "Shrink icache memory, remain %d -> %d\n", + remain_before, remain_after); + + return 0; +} + +SPL_SHRINKER_CALLBACK_FWD_DECLARE(splat_linux_shrinker_fn); +SPL_SHRINKER_DECLARE(splat_linux_shrinker, splat_linux_shrinker_fn, 1); +static unsigned long splat_linux_shrinker_size = 0; +static struct file *splat_linux_shrinker_file = NULL; + +static int +__splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) +{ + static int failsafe = 0; + + if (sc->nr_to_scan) { + splat_linux_shrinker_size = splat_linux_shrinker_size - + MIN(sc->nr_to_scan, splat_linux_shrinker_size); + + splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST3_NAME, + "Reclaimed %lu objects, size now %lu\n", + sc->nr_to_scan, splat_linux_shrinker_size); + } else { + splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST3_NAME, + "Cache size is %lu\n", splat_linux_shrinker_size); + } + + /* Far more calls than expected abort drop_slab as a failsafe */ + if ((++failsafe % 1000) == 0) { + splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST3_NAME, + "Far more calls than expected (%d), size now %lu\n", + failsafe, splat_linux_shrinker_size); + return -1; + } + + return (int)splat_linux_shrinker_size; +} + +SPL_SHRINKER_CALLBACK_WRAPPER(splat_linux_shrinker_fn); + +#define DROP_SLAB_CMD \ + "exec 0/proc/sys/vm/drop_caches " \ + " 2>/dev/null; " \ + "echo 2" + +static int +splat_linux_drop_slab(struct file *file) +{ + char *argv[] = { "/bin/sh", + "-c", + DROP_SLAB_CMD, + NULL }; + char *envp[] = { "HOME=/", + "TERM=linux", + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", + NULL }; + int rc; + + rc = call_usermodehelper(argv[0], argv, envp, 1); + if (rc) + splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + "Failed user helper '%s %s %s', rc = %d\n", + argv[0], argv[1], argv[2], rc); + + return rc; +} + +/* + * Verify correct shrinker functionality by registering a shrinker + * with the required compatibility macros. We then use a simulated + * cache and force the systems caches to be dropped. The shrinker + * should be repeatedly called until it reports that the cache is + * empty. It is then cleanly unregistered and correct behavior is + * verified. There are now four slightly different supported shrinker + * API and this test ensures the compatibility code is correct. + */ +static int +splat_linux_test3(struct file *file, void *arg) +{ + int rc = -EINVAL; + + /* + * Globals used by the shrinker, it is not safe to run this + * test concurrently this is a safe assumption for SPLAT tests. + * Regardless we do some minimal checking a bail if concurrent + * use is detected. + */ + if (splat_linux_shrinker_size || splat_linux_shrinker_file) { + splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + "Failed due to concurrent shrinker test, rc = %d\n", rc); + return (rc); + } + + splat_linux_shrinker_size = 1024; + splat_linux_shrinker_file = file; + + spl_register_shrinker(&splat_linux_shrinker); + rc = splat_linux_drop_slab(file); + if (rc) + goto out; + + if (splat_linux_shrinker_size != 0) { + splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + "Failed cache was not shrunk to 0, size now %lu", + splat_linux_shrinker_size); + rc = -EDOM; + } +out: + spl_unregister_shrinker(&splat_linux_shrinker); + + splat_linux_shrinker_size = 0; + splat_linux_shrinker_file = NULL; + + return rc; +} + +splat_subsystem_t * +splat_linux_init(void) +{ + splat_subsystem_t *sub; + + sub = kmalloc(sizeof(*sub), GFP_KERNEL); + if (sub == NULL) + return NULL; + + memset(sub, 0, sizeof(*sub)); + strncpy(sub->desc.name, SPLAT_LINUX_NAME, SPLAT_NAME_SIZE); + strncpy(sub->desc.desc, SPLAT_LINUX_DESC, SPLAT_DESC_SIZE); + INIT_LIST_HEAD(&sub->subsystem_list); + INIT_LIST_HEAD(&sub->test_list); + spin_lock_init(&sub->test_lock); + sub->desc.id = SPLAT_SUBSYSTEM_LINUX; + + SPLAT_TEST_INIT(sub, SPLAT_LINUX_TEST1_NAME, SPLAT_LINUX_TEST1_DESC, + SPLAT_LINUX_TEST1_ID, splat_linux_test1); + SPLAT_TEST_INIT(sub, SPLAT_LINUX_TEST2_NAME, SPLAT_LINUX_TEST2_DESC, + SPLAT_LINUX_TEST2_ID, splat_linux_test2); + SPLAT_TEST_INIT(sub, SPLAT_LINUX_TEST3_NAME, SPLAT_LINUX_TEST3_DESC, + SPLAT_LINUX_TEST3_ID, splat_linux_test3); + + return sub; +} + +void +splat_linux_fini(splat_subsystem_t *sub) +{ + ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_LINUX_TEST3_ID); + SPLAT_TEST_FINI(sub, SPLAT_LINUX_TEST2_ID); + SPLAT_TEST_FINI(sub, SPLAT_LINUX_TEST1_ID); + + kfree(sub); +} + +int +splat_linux_id(void) { + return SPLAT_SUBSYSTEM_LINUX; +} From 0d54dcb56685ac58e68e46b7848f0f2c2863dc6e Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Mon, 20 Jun 2011 14:53:56 -0500 Subject: [PATCH 0525/1062] Read the /etc/hostid file directly. Deprecate the /usr/bin/hostid call by reading the /etc/hostid file directly. Add the spl_hostid_path parameter to override the default /etc/hostid path. Rename the set_hostid() function to hostid_exec() to better reflect actual behavior and complement the new hostid_read() function. Use HW_INVALID_HOSTID as the spl_hostid sentinel value because zero seems to be a valid gethostid() result on Linux. --- include/sys/systeminfo.h | 4 ++ module/spl/spl-generic.c | 110 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 109 insertions(+), 5 deletions(-) diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index 592d71584..a32f7142e 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -30,4 +30,8 @@ /* to hold a decimal or hex */ /* hostid string */ +/* Supplemental definitions for Linux. */ +#define HW_HOSTID_PATH "/etc/hostid" /* binary configuration file */ +#define HW_HOSTID_MASK 0xFFFFFFFF /* significant hostid bits */ + #endif /* SPL_SYSTEMINFO_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 17626b782..651d45ebc 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ char spl_version[16] = "SPL v" SPL_META_VERSION; EXPORT_SYMBOL(spl_version); -unsigned long spl_hostid = 0; +unsigned long spl_hostid = HW_INVALID_HOSTID; EXPORT_SYMBOL(spl_hostid); module_param(spl_hostid, ulong, 0644); MODULE_PARM_DESC(spl_hostid, "The system hostid."); @@ -364,6 +364,100 @@ struct new_utsname *__utsname(void) } EXPORT_SYMBOL(__utsname); + +/* + * Read the unique system identifier from the /etc/hostid file. + * + * The behavior of /usr/bin/hostid on Linux systems with the + * regular eglibc and coreutils is: + * + * 1. Generate the value if the /etc/hostid file does not exist + * or if the /etc/hostid file is less than four bytes in size. + * + * 2. If the /etc/hostid file is at least 4 bytes, then return + * the first four bytes [0..3] in native endian order. + * + * 3. Always ignore bytes [4..] if they exist in the file. + * + * Only the first four bytes are significant, even on systems that + * have a 64-bit word size. + * + * See: + * + * eglibc: sysdeps/unix/sysv/linux/gethostid.c + * coreutils: src/hostid.c + * + * Notes: + * + * The /etc/hostid file on Solaris is a text file that often reads: + * + * # DO NOT EDIT + * "0123456789" + * + * Directly copying this file to Linux results in a constant + * hostid of 4f442023 because the default comment constitutes + * the first four bytes of the file. + * + */ + +char *spl_hostid_path = HW_HOSTID_PATH; +module_param(spl_hostid_path, charp, 0444); +MODULE_PARM_DESC(spl_hostid_path, "The system hostid file (/etc/hostid)"); + +static int +hostid_read(void) +{ + int result; + uint64_t size; + struct _buf *file; + unsigned long hostid = 0; + + file = kobj_open_file(spl_hostid_path); + + if (file == (struct _buf *)-1) { + printk(KERN_WARNING + "SPL: The %s file is not found.\n", + spl_hostid_path); + return -1; + } + + result = kobj_get_filesize(file, &size); + + if (result != 0) { + printk(KERN_WARNING + "SPL: kobj_get_filesize returned %i on %s\n", + result, spl_hostid_path); + kobj_close_file(file); + return -2; + } + + if (size < sizeof(HW_HOSTID_MASK)) { + printk(KERN_WARNING + "SPL: Ignoring the %s file because it is %llu bytes; " + "expecting %lu bytes instead.\n", + spl_hostid_path, size, sizeof(HW_HOSTID_MASK)); + kobj_close_file(file); + return -3; + } + + /* Read directly into the variable like eglibc does. */ + /* Short reads are okay; native behavior is preserved. */ + result = kobj_read_file(file, (char *)&hostid, sizeof(hostid), 0); + + if (result < 0) { + printk(KERN_WARNING + "SPL: kobj_read_file returned %i on %s\n", + result, spl_hostid_path); + kobj_close_file(file); + return -4; + } + + /* Mask down to 32 bits like coreutils does. */ + spl_hostid = hostid & HW_HOSTID_MASK; + kobj_close_file(file); + return 0; +} + #define GET_HOSTID_CMD \ "exec 0/proc/sys/kernel/spl/hostid " \ @@ -371,7 +465,7 @@ EXPORT_SYMBOL(__utsname); "hostid" static int -set_hostid(void) +hostid_exec(void) { char *argv[] = { "/bin/sh", "-c", @@ -486,8 +580,14 @@ __init spl_init(void) if ((rc = zlib_init())) SGOTO(out9, rc); - /* Get the hostid if it was not passed as a module parameter. */ - if (spl_hostid == 0 && (rc = set_hostid())) + /* + * Get the hostid if it was not passed as a module parameter. Try + * reading the /etc/hostid file directly, and then fall back to calling + * the /usr/bin/hostid utility. + */ + + if (spl_hostid == HW_INVALID_HOSTID + && (rc = hostid_read()) && (rc = hostid_exec())) SGOTO(out10, rc = -EADDRNOTAVAIL); #ifndef HAVE_KALLSYMS_LOOKUP_NAME From 79593b0dec57ee94c5bb56cdc2770ebde81ecea9 Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Thu, 23 Jun 2011 22:10:27 -0500 Subject: [PATCH 0526/1062] Stabilize the hostid for RPM installations. ZFS requires a stable hostid to recognize foreign pool imports, but the hostid of a Linux system can change if the /etc/hostid file is missing, particularly during DHCP lease updates. Ensure that the system hostid is stable by creating the /etc/hostid file from the output of the /usr/bin/hostid utility. The /sbin/genhostid utility that is provided by the initscripts package is not used because it creates a random hostid, which breaks upgrades on systems that already have the SPL module installed. The external `printf` is used because the dash builtin lacks the byte format. Conveniences like a ${HOSTID:$ii:2} substring range or a `sed` one-liner are similarly avoided. --- spl-modules.spec.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index e02d6c255..ddeb2609d 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -233,6 +233,17 @@ rm -rf $RPM_BUILD_ROOT %{_prefix}/src/* %post +# The /sbin/genhostid utility writes a random value to the /etc/hostid +# file, which means that using it here will break upgrades on systems +# that already have spl installed. +if [ ! -f /etc/hostid ]; then + HOSTID=$(hostid) + AA=$(echo $HOSTID | cut -b 1,2) + BB=$(echo $HOSTID | cut -b 3,4) + CC=$(echo $HOSTID | cut -b 5,6) + DD=$(echo $HOSTID | cut -b 7,8) + "$(which printf)" "\x$DD\x$CC\x$BB\x$AA" >"/etc/hostid" +fi if [ -f /boot/System.map-%{kver} ]; then depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 else From 86fd39f354778eb10e77a7c1660b59ca16ffcc16 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 24 Jun 2011 11:57:14 -0700 Subject: [PATCH 0527/1062] Linux 2.6.39 compat, mutex owner Prior to Linux 2.6.39 when CONFIG_DEBUG_MUTEXES was defined the kernel stored a thread_info pointer as the mutex owner. From this you could get the pointer of the current task_struct to compare with get_current(). As of Linux 2.6.39 this behavior has changed and now the mutex stores a pointer to the task_struct. This commit detects the type of pointer stored in the mutex and adjusts the mutex_owner() and mutex_owned() functions to perform the correct comparision. --- config/spl-build.m4 | 27 +++++++++ configure | 138 ++++++++++++++++++++++++++++++++++++++++++++ include/sys/mutex.h | 21 +++---- spl_config.h.in | 3 + 4 files changed, 177 insertions(+), 12 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 75267bb83..ea5078507 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -48,6 +48,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX SPL_AC_MUTEX_OWNER + SPL_AC_MUTEX_OWNER_TASK_STRUCT SPL_AC_MUTEX_LOCK_NESTED SPL_AC_3ARGS_ON_EACH_CPU SPL_AC_KALLSYMS_LOOKUP_NAME @@ -1128,6 +1129,32 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER], [ ]) ]) +dnl # +dnl # 2.6.39 API change, +dnl # Owner type change. A Linux mutex prior to 2.6.39 would store +dnl # the owner as a thread_info pointer when CONFIG_DEBUG_MUTEXES +dnl # was defined. As of 2.6.39 this was changed to a task_struct +dnl # pointer which frankly makes a lot more sense. +dnl # +AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [ + AC_MSG_CHECKING([whether struct mutex owner is a task_struct]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct mutex mtx __attribute__ ((unused)); + mtx.owner = current; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MUTEX_OWNER_TASK_STRUCT, 1, + [struct mutex owner is a task_struct]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + dnl # dnl # 2.6.18 API change, dnl # First introduced 'mutex_lock_nested()' in include/linux/mutex.h, diff --git a/configure b/configure index c537b9817..cf396e484 100755 --- a/configure +++ b/configure @@ -13687,6 +13687,75 @@ fi + { $as_echo "$as_me:$LINENO: checking whether struct mutex owner is a task_struct" >&5 +$as_echo_n "checking whether struct mutex owner is a task_struct... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct mutex mtx __attribute__ ((unused)); + mtx.owner = current; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MUTEX_OWNER_TASK_STRUCT 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 $as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } @@ -17818,6 +17887,75 @@ fi + { $as_echo "$as_me:$LINENO: checking whether struct mutex owner is a task_struct" >&5 +$as_echo_n "checking whether struct mutex owner is a task_struct... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct mutex mtx __attribute__ ((unused)); + mtx.owner = current; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MUTEX_OWNER_TASK_STRUCT 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 $as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } diff --git a/include/sys/mutex.h b/include/sys/mutex.h index ebf9151f1..659214f50 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -48,21 +48,18 @@ typedef struct { static inline kthread_t * mutex_owner(kmutex_t *mp) { - struct thread_info *owner; +#if defined(HAVE_MUTEX_OWNER_TASK_STRUCT) + return ACCESS_ONCE(mp->m.owner); +#else + struct thread_info *owner = ACCESS_ONCE(mp->m.owner); + if (owner) + return owner->task; - owner = ACCESS_ONCE(mp->m.owner); - if (owner) - return owner->task; - - return NULL; -} - -static inline int -mutex_owned(kmutex_t *mp) -{ - return (ACCESS_ONCE(mp->m.owner) == current_thread_info()); + return NULL; +#endif } +#define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) #undef mutex_init diff --git a/spl_config.h.in b/spl_config.h.in index 95394e6e2..97f0e06f3 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -135,6 +135,9 @@ /* struct mutex has owner */ #undef HAVE_MUTEX_OWNER +/* struct mutex owner is a task_struct */ +#undef HAVE_MUTEX_OWNER_TASK_STRUCT + /* next_online_pgdat() is available */ #undef HAVE_NEXT_ONLINE_PGDAT From d9365224ea04562af1b0cf2a1c2e84ab429a13b2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 1 Jul 2011 15:23:17 -0700 Subject: [PATCH 0528/1062] Prep spl-0.6.0-rc5 tag Create the fifth 0.6.0 release candidate tag (rc5). --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 5cc270dcd..21edaff37 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc4 +Release: rc5 Release-Tags: relext From e80cd06b8e0428f3ca2c62e4cb0e4ec54fda1d5c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 19 Jul 2011 21:06:50 -0700 Subject: [PATCH 0529/1062] Fix 'make install' overly broad 'rm' When running 'make install' without DESTDIR set the module install rules would mistakenly destroy the 'modules.*' files for ALL of your installed kernels. This could lead to a non-functional system for the alternate kernels because 'depmod -a' will only be run for the kernel which was compiled against. This issue would not impact anyone using the 'make ' build targets to build and install packages. The fix for this issue is to only remove extraneous build products when DESTDIR is set. This almost exclusively indicates we are building packages and installed the build products in to a temporary staging location. Additionally, limit the removal the unneeded build products to the target kernel version. Signed-off-by: Brian Behlendorf Closes #328 --- module/Makefile.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/Makefile.in b/module/Makefile.in index 70a33ec14..355089aeb 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -16,7 +16,11 @@ modules_install: $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ INSTALL_MOD_PATH=$(DESTDIR) \ INSTALL_MOD_DIR=addon/spl $@ - find $(DESTDIR)/lib/modules/ -name 'modules.*' | xargs $(RM) + @# Remove extraneous build products when packaging + if [ -n "$(DESTDIR)" ]; then \ + find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ + -name 'modules.*' | xargs $(RM); \ + fi sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ if [ -f $$sysmap ]; then \ depmod -ae -F $$sysmap @LINUX_VERSION@; \ From c064bdee95583102e216354bbdece4818d59b644 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 Jul 2011 14:23:12 -0700 Subject: [PATCH 0530/1062] Fix the configure CONFIG_* option detection The latest kernels no longer define AUTOCONF_INCLUDED which was being used to detect the new style autoconf.h kernel configure options. This results in the CONFIG_* checks always failing incorrectly for newer kernels. The fix for this is a simplification of the testing method. Rather than attempting to explicitly include to renamed config header. It is simpler to unconditionally include which must pick up the correctly named header. Signed-off-by: Brian Behlendorf Closes #320 --- config/spl-build.m4 | 4 +--- configure | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ea5078507..f4652bce1 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -540,9 +540,7 @@ dnl # AC_DEFUN([SPL_LINUX_CONFIG], [AC_MSG_CHECKING([whether Linux was built with CONFIG_$1]) SPL_LINUX_TRY_COMPILE([ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #include ],[ #ifndef CONFIG_$1 #error CONFIG_$1 not #defined diff --git a/configure b/configure index cf396e484..72bef74a3 100755 --- a/configure +++ b/configure @@ -11819,9 +11819,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #include int main (void) @@ -16019,9 +16017,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #include int main (void) From 97fd6a07c2c2fd1d27fc79938eb1a451c92fbfc4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 19 Sep 2011 13:35:03 -0700 Subject: [PATCH 0531/1062] Fix HAVE_FS_STRUCT_SPINLOCK check for gcc-4.1.2 Older versions of gcc (gcc-4.1.2) will treat an 'incompatible pointer type' as a warning instead of an error. This results in HAVE_FS_STRUCT_SPINLOCK being defined incorrectly. This failure mode was observed when using a RHEL6 2.6.32 based kernel under RHEL5.5 which contains the old version of gcc. To resolve the issue the warning is explicitly promoted to an error. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 3 +++ configure | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index f4652bce1..c046db830 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1598,6 +1598,8 @@ dnl # a spinlock_t to improve the fastpath performance. dnl # AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [ AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" SPL_LINUX_TRY_COMPILE([ #include #include @@ -1611,6 +1613,7 @@ AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [ ],[ AC_MSG_RESULT(no) ]) + EXTRA_KCFLAGS="$tmp_flags" ]) dnl # diff --git a/configure b/configure index 72bef74a3..1369ca05d 100755 --- a/configure +++ b/configure @@ -15069,6 +15069,8 @@ fi { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 $as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -15132,6 +15134,7 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 @@ -19267,6 +19270,8 @@ fi { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 $as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -19330,6 +19335,7 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 From 39a87c69211aceef23889ceb4a33291e476237b9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Sep 2011 09:36:35 -0700 Subject: [PATCH 0532/1062] Revert "Stabilize the hostid for RPM installations." Creating an /etc/hostid file as part of the rpm post install causes problems for diskless systems which are sharing an image. While it's still critical to ensure the hostid doesn't change for zfs root filesystems. This will now be done by setting the /etc/hostid in the initramfs created by dracut. This reverts commit 79593b0dec57ee94c5bb56cdc2770ebde81ecea9. --- spl-modules.spec.in | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index ddeb2609d..e02d6c255 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -233,17 +233,6 @@ rm -rf $RPM_BUILD_ROOT %{_prefix}/src/* %post -# The /sbin/genhostid utility writes a random value to the /etc/hostid -# file, which means that using it here will break upgrades on systems -# that already have spl installed. -if [ ! -f /etc/hostid ]; then - HOSTID=$(hostid) - AA=$(echo $HOSTID | cut -b 1,2) - BB=$(echo $HOSTID | cut -b 3,4) - CC=$(echo $HOSTID | cut -b 5,6) - DD=$(echo $HOSTID | cut -b 7,8) - "$(which printf)" "\x$DD\x$CC\x$BB\x$AA" >"/etc/hostid" -fi if [ -f /boot/System.map-%{kver} ]; then depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 else From 6b3b569df30d13ed7bbbff877cffc71290a52f12 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 6 Oct 2011 14:55:17 -0700 Subject: [PATCH 0533/1062] Remove /etc/hostid missing warning No longer print the following warning to the console when the /etc/hostid file is missing. This is the expected default behavior. Keeping the hostid in sync with the initramfs is now accomplished by creating the /etc/hostid in the initramfs not on the system. SPL: The /etc/hostid file is not found. Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 651d45ebc..1dedf76cf 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -414,12 +414,8 @@ hostid_read(void) file = kobj_open_file(spl_hostid_path); - if (file == (struct _buf *)-1) { - printk(KERN_WARNING - "SPL: The %s file is not found.\n", - spl_hostid_path); + if (file == (struct _buf *)-1) return -1; - } result = kobj_get_filesize(file, &size); From 4a777c028c7e52ccfc1fb721448c84e10b9ee0f8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 6 Oct 2011 14:07:00 -0700 Subject: [PATCH 0534/1062] Prep spl-0.6.0-rc6 tag Create the sixth 0.6.0 release candidate tag (rc6). --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 21edaff37..699747fd0 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc5 +Release: rc6 Release-Tags: relext From 763b2f3b57af1febb0fd72c4976992e672a350b4 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 11 Oct 2011 09:50:52 -0700 Subject: [PATCH 0535/1062] Fixed invalid resource re-use in file_find() File descriptors are a per-process resource. The same descriptor in different processes can refer to different files. find_file() incorrectly assumed that file descriptors are globally unique. Signed-off-by: Brian Behlendorf Closes ZFS issue #386 --- include/sys/vnode.h | 1 + module/spl/spl-vnode.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 7d655e5ef..36605ca4a 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -158,6 +158,7 @@ typedef struct vnode { typedef struct vn_file { int f_fd; /* linux fd for lookup */ + struct task_struct *f_task; /* linux task this fd belongs to */ struct file *f_file; /* linux file struct */ atomic_t f_ref; /* ref count */ kmutex_t f_lock; /* struct lock */ diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index c46643175..1b5cc5a08 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -511,7 +511,7 @@ file_find(int fd) ASSERT(spin_is_locked(&vn_file_lock)); list_for_each_entry(fp, &vn_file_list, f_list) { - if (fd == fp->f_fd) { + if (fd == fp->f_fd && fp->f_task == current) { ASSERT(atomic_read(&fp->f_ref) != 0); return fp; } @@ -550,6 +550,7 @@ vn_getf(int fd) mutex_enter(&fp->f_lock); fp->f_fd = fd; + fp->f_task = current; fp->f_offset = 0; atomic_inc(&fp->f_ref); From 64c075c3f4381df02d206008b94498248cc49324 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 11 Oct 2011 09:59:02 -0700 Subject: [PATCH 0536/1062] Properly destroy work items in spl_kmem_cache_destroy() In a non-debug build the ASSERT() would be optimized away which could cause pending work items to not be cancelled. We must also use cancel_delayed_work_sync() rather than just cancel_delayed_work() to actually wait until work items have completed. Otherwise they might accidentally access free'd memory. Signed-off-by: Brian Behlendorf Closes ZFS bugs #279, #62, #363, #418 --- module/spl/spl-kmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index d71ab11bb..a916f7ef0 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1491,10 +1491,10 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) up_write(&spl_kmem_cache_sem); /* Cancel any and wait for any pending delayed work */ - ASSERT(!test_and_set_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - cancel_delayed_work(&skc->skc_work); + VERIFY(!test_and_set_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + cancel_delayed_work_sync(&skc->skc_work); for_each_online_cpu(i) - cancel_delayed_work(&skc->skc_mag[i]->skm_work); + cancel_delayed_work_sync(&skc->skc_mag[i]->skm_work); flush_scheduled_work(); From 8d177c181fb21c7cedd41e27aec2072ef2aed42e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 11 Oct 2011 10:03:29 -0700 Subject: [PATCH 0537/1062] Fixed typo in spl_slab_alloc() The typo did not have any effect (apart from a negligible performance impact) because skc->skc_flags * KMC_OFFSLAB is always non-null when at least one bit in skc->skc_flags is set. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index a916f7ef0..112b0e318 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -979,7 +979,7 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) sks->sks_ref = 0; obj_size = spl_obj_size(skc); - if (skc->skc_flags * KMC_OFFSLAB) + if (skc->skc_flags & KMC_OFFSLAB) offslab_size = spl_offslab_size(skc); for (i = 0; i < sks->sks_objs; i++) { From ecc39810077bbf3836fe9be0800c0d7668e33fc4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Oct 2011 10:11:26 -0700 Subject: [PATCH 0538/1062] Fix various typos in comments Just clean up some of the typos and spelling mistakes in the comments of spl-kmem.c. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 112b0e318..db009614f 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -36,7 +36,7 @@ /* * The minimum amount of memory measured in pages to be free at all * times on the system. This is similar to Linux's zone->pages_min - * multipled by the number of zones and is sized based on that. + * multiplied by the number of zones and is sized based on that. */ pgcnt_t minfree = 0; EXPORT_SYMBOL(minfree); @@ -44,9 +44,9 @@ EXPORT_SYMBOL(minfree); /* * The desired amount of memory measured in pages to be free at all * times on the system. This is similar to Linux's zone->pages_low - * multipled by the number of zones and is sized based on that. + * multiplied by the number of zones and is sized based on that. * Assuming all zones are being used roughly equally, when we drop - * below this threshold async page reclamation is triggered. + * below this threshold asynchronous page reclamation is triggered. */ pgcnt_t desfree = 0; EXPORT_SYMBOL(desfree); @@ -54,9 +54,9 @@ EXPORT_SYMBOL(desfree); /* * When above this amount of memory measures in pages the system is * determined to have enough free memory. This is similar to Linux's - * zone->pages_high multipled by the number of zones and is sized based + * zone->pages_high multiplied by the number of zones and is sized based * on that. Assuming all zones are being used roughly equally, when - * async page reclamation reaches this threshold it stops. + * asynchronous page reclamation reaches this threshold it stops. */ pgcnt_t lotsfree = 0; EXPORT_SYMBOL(lotsfree); @@ -782,7 +782,7 @@ EXPORT_SYMBOL(vmem_free_debug); * Slab allocation interfaces * * While the Linux slab implementation was inspired by the Solaris - * implemenation I cannot use it to emulate the Solaris APIs. I + * implementation I cannot use it to emulate the Solaris APIs. I * require two features which are not provided by the Linux slab. * * 1) Constructors AND destructors. Recent versions of the Linux @@ -797,7 +797,7 @@ EXPORT_SYMBOL(vmem_free_debug); * Because of memory fragmentation the Linux slab which is backed * by kmalloc'ed memory performs very badly when confronted with * large numbers of large allocations. Basing the slab on the - * virtual address space removes the need for contigeous pages + * virtual address space removes the need for contiguous pages * and greatly improve performance for large allocations. * * For these reasons, the SPL has its own slab implementation with @@ -811,12 +811,12 @@ EXPORT_SYMBOL(vmem_free_debug); * * XXX: Improve the partial slab list by carefully maintaining a * strict ordering of fullest to emptiest slabs based on - * the slab reference count. This gaurentees the when freeing + * the slab reference count. This guarantees the when freeing * slabs back to the system we need only linearly traverse the * last N slabs in the list to discover all the freeable slabs. * * XXX: NUMA awareness for optionally allocating memory close to a - * particular core. This can be adventageous if you know the slab + * particular core. This can be advantageous if you know the slab * object will be short lived and primarily accessed from one core. * * XXX: Slab coloring may also yield performance improvements and would @@ -935,12 +935,12 @@ spl_offslab_size(spl_kmem_cache_t *skc) * For small objects we use kmem_alloc() because as long as you are * only requesting a small number of pages (ideally just one) its cheap. * However, when you start requesting multiple pages with kmem_alloc() - * it gets increasingly expensive since it requires contigeous pages. + * it gets increasingly expensive since it requires contiguous pages. * For this reason we shift to vmem_alloc() for slabs of large objects - * which removes the need for contigeous pages. We do not use + * which removes the need for contiguous pages. We do not use * vmem_alloc() in all cases because there is significant locking * overhead in __get_vm_area_node(). This function takes a single - * global lock when aquiring an available virtual address range which + * global lock when acquiring an available virtual address range which * serializes all vmem_alloc()'s for all slab caches. Using slightly * different allocation functions for small and large objects should * give us the best of both worlds. @@ -1082,7 +1082,7 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) * All empty slabs are at the end of skc->skc_partial_list, * therefore once a non-empty slab is found we can stop * scanning. Additionally, stop when reaching the target - * reclaim 'count' if a non-zero threshhold is given. + * reclaim 'count' if a non-zero threshold is given. */ if ((sks->sks_ref > 0) || (count && i > count)) break; @@ -1157,7 +1157,7 @@ spl_magazine_age(void *data) /* * Called regularly to keep a downward pressure on the size of idle * magazines and to release free slabs from the cache. This function - * never calls the registered reclaim function, that only occures + * never calls the registered reclaim function, that only occurs * under memory pressure or with a direct call to spl_kmem_reap(). */ static void @@ -1247,7 +1247,7 @@ spl_magazine_size(spl_kmem_cache_t *skc) } /* - * Allocate a per-cpu magazine to assoicate with a specific core. + * Allocate a per-cpu magazine to associate with a specific core. */ static spl_kmem_magazine_t * spl_magazine_alloc(spl_kmem_cache_t *skc, int node) @@ -1272,7 +1272,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) } /* - * Free a per-cpu magazine assoicated with a specific core. + * Free a per-cpu magazine associated with a specific core. */ static void spl_magazine_free(spl_kmem_magazine_t *skm) @@ -1379,7 +1379,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (current_thread_info()->preempt_count || irqs_disabled()) kmem_flags = KM_NOSLEEP; - /* Allocate memry for a new cache an initialize it. Unfortunately, + /* Allocate memory for a new cache an initialize it. Unfortunately, * this usually ends up being a large allocation of ~32k because * we need to allocate enough memory for the worst case number of * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we @@ -1475,7 +1475,7 @@ spl_kmem_cache_set_move(kmem_cache_t *skc, EXPORT_SYMBOL(spl_kmem_cache_set_move); /* - * Destroy a cache and all objects assoicated with the cache. + * Destroy a cache and all objects associated with the cache. */ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) @@ -1564,9 +1564,9 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) } /* - * No available objects on any slabsi, create a new slab. Since this - * is an expensive operation we do it without holding the spinlock and - * only briefly aquire it when we link in the fully allocated and + * No available objects on any slabs, create a new slab. Since this + * is an expensive operation we do it without holding the spin lock and + * only briefly acquire it when we link in the fully allocated and * constructed slab. */ static spl_kmem_slab_t * @@ -1639,7 +1639,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) SGOTO(out, rc); /* Potentially rescheduled to the same CPU but - * allocations may have occured from this CPU while + * allocations may have occurred from this CPU while * we were sleeping so recalculate max refill. */ refill = MIN(refill, skm->skm_size - skm->skm_avail); @@ -1707,7 +1707,7 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) list_add(&sks->sks_list, &skc->skc_partial_list); } - /* Move emply slabs to the end of the partial list so + /* Move empty slabs to the end of the partial list so * they can be easily found and freed during reclamation. */ if (sks->sks_ref == 0) { list_del(&sks->sks_list); @@ -1774,7 +1774,7 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) restart: /* Safe to update per-cpu structure without lock, but - * in the restart case we must be careful to reaquire + * in the restart case we must be careful to reacquire * the local magazine since this may have changed * when we need to grow the cache. */ skm = skc->skc_mag[smp_processor_id()]; @@ -1845,9 +1845,9 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) EXPORT_SYMBOL(spl_kmem_cache_free); /* - * The generic shrinker function for all caches. Under linux a shrinker - * may not be tightly coupled with a slab cache. In fact linux always - * systematically trys calling all registered shrinker callbacks which + * The generic shrinker function for all caches. Under Linux a shrinker + * may not be tightly coupled with a slab cache. In fact Linux always + * systematically tries calling all registered shrinker callbacks which * report that they contain unused objects. Because of this we only * register one shrinker function in the shim layer for all slab caches. * We always attempt to shrink all caches when this generic shrinker From a49bc996897fb0f4c38ea6d3bbeafbe27dc82e72 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 17 Oct 2011 16:40:38 -0700 Subject: [PATCH 0539/1062] Fix package URLs to use the github repository The URL field in the spl-modules and spl package spec files were updated to point to the ZFS on Linux repository hosted by github. Signed-off-by: Brian Behlendorf --- spl-modules.spec.in | 2 +- spl.spec.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index e02d6c255..aaef47899 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -180,7 +180,7 @@ Name: %{name} Version: %{version} Release: %{release} License: @LICENSE@ -URL: git://eris.llnl.gov/spl.git +URL: git://github.com/zfsonlinux/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) Source: @PACKAGE@-%{version}.tar.gz %if %{defined krequires} diff --git a/spl.spec.in b/spl.spec.in index fcb3dcfc8..743316588 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -9,7 +9,7 @@ Name: %{name} Version: %{version} Release: %{release} License: @LICENSE@ -URL: git://eris.llnl.gov/spl.git +URL: git://github.com/zfsonlinux/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) Source: %{name}-%{version}.tar.gz From f3989ed3223363330af014062caeeb1afbd0503f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 12 Oct 2011 12:49:18 +0200 Subject: [PATCH 0540/1062] vn_rdwr() didn't properly advance the file position This would cause problems when using 'zfs send' with a file as the target (rather than a pipe or a socket as is usually the case) as for each write the destination offset in the file would be 0. Signed-off-by: Brian Behlendorf Closes ZFS issue #391 --- module/spl/spl-vnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 1b5cc5a08..354e8798b 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -247,6 +247,7 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, rc = vfs_read(fp, addr, len, &offset); set_fs(saved_fs); + fp->f_pos = offset; if (rc < 0) SRETURN(-rc); From 3160d4f56bf35492e9c400094f8c1ff2066d4459 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 18 Oct 2011 02:32:50 +0200 Subject: [PATCH 0541/1062] Fix race condition in mutex_exit() On kernels with CONFIG_DEBUG_MUTEXES mutex_exit() clears the mutex owner after releasing the mutex. This would cause mutex_owner() to return an incorrect owner if another thread managed to lock the mutex before mutex_exit() had a chance to clear the owner. Signed-off-by: Brian Behlendorf Closes ZFS issue #167 --- include/sys/mutex.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 659214f50..c55104a41 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -35,7 +35,7 @@ typedef enum { MUTEX_ADAPTIVE = 2 } kmutex_type_t; -#if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) +#if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES) /* * We define a 1-field struct rather than a straight typedef to enforce type @@ -79,17 +79,7 @@ mutex_owner(kmutex_t *mp) #define mutex_tryenter(mp) mutex_trylock(&(mp)->m) #define mutex_enter(mp) mutex_lock(&(mp)->m) - -/* mutex->owner is not cleared when CONFIG_DEBUG_MUTEXES is set */ -#ifdef CONFIG_DEBUG_MUTEXES -# define mutex_exit(mp) \ -({ \ - mutex_unlock(&(mp)->m); \ - (mp)->m.owner = NULL; \ -}) -#else -# define mutex_exit(mp) mutex_unlock(&(mp)->m) -#endif /* CONFIG_DEBUG_MUTEXES */ +#define mutex_exit(mp) mutex_unlock(&(mp)->m) #ifdef HAVE_GPL_ONLY_SYMBOLS # define mutex_enter_nested(mp, sc) mutex_lock_nested(&(mp)->m, sc) From 66cdc93b8c030db70a50563ac26f02301dde30ff Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 18 Oct 2011 02:54:35 +0200 Subject: [PATCH 0542/1062] Remove the spinlocks for mutex_enter()/mutex_exit() The m_owner variable is protected by the mutex itself. Reading the variable is guaranteed to be atomic (due to it being a word-sized reference) and ACCESS_ONCE() takes care of read cache effects. Signed-off-by: Brian Behlendorf --- include/sys/mutex.h | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index c55104a41..21f161cfb 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -103,45 +103,19 @@ extern int spl_mutex_spin_max(void); #define MUTEX(mp) ((struct mutex *)(mp)) -static inline kthread_t * -spl_mutex_get_owner(kmutex_t *mp) -{ - return mp->m_owner; -} - static inline void spl_mutex_set_owner(kmutex_t *mp) { - unsigned long flags; - - spin_lock_irqsave(&MUTEX(mp)->wait_lock, flags); mp->m_owner = current; - spin_unlock_irqrestore(&MUTEX(mp)->wait_lock, flags); } static inline void spl_mutex_clear_owner(kmutex_t *mp) { - unsigned long flags; - - spin_lock_irqsave(&MUTEX(mp)->wait_lock, flags); mp->m_owner = NULL; - spin_unlock_irqrestore(&MUTEX(mp)->wait_lock, flags); -} - -static inline kthread_t * -mutex_owner(kmutex_t *mp) -{ - unsigned long flags; - kthread_t *owner; - - spin_lock_irqsave(&MUTEX(mp)->wait_lock, flags); - owner = spl_mutex_get_owner(mp); - spin_unlock_irqrestore(&MUTEX(mp)->wait_lock, flags); - - return owner; } +#define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) From f5e76dea03453c72fb46ad90dd2e01c73b70654f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 19 Oct 2011 18:04:40 +0200 Subject: [PATCH 0543/1062] Cleaned up MUTEX() #define The old define assumed a specific layout of the kmutex_t struct. This patch makes the macro independent from the actual struct layout. Signed-off-by: Brian Behlendorf --- include/sys/mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 21f161cfb..b41b3cead 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -101,7 +101,7 @@ extern int spl_mutex_spin_max(void); # define spl_mutex_spin_max() 0 #endif /* HAVE_TASK_CURR */ -#define MUTEX(mp) ((struct mutex *)(mp)) +#define MUTEX(mp) (&((mp)->m_mutex)) static inline void spl_mutex_set_owner(kmutex_t *mp) From 16952a68f25d55da21578f562b3813559fd01c6b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 19 Oct 2011 11:23:38 -0700 Subject: [PATCH 0544/1062] Include distribution in release Common practice is to include the distribution in the package release. Signed-off-by: Brian Behlendorf --- spl-modules.spec.in | 2 +- spl.spec.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index aaef47899..9c6320171 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -178,7 +178,7 @@ Summary: Solaris Porting Layer Modules Group: Utilities/System Name: %{name} Version: %{version} -Release: %{release} +Release: %{release}%{?dist} License: @LICENSE@ URL: git://github.com/zfsonlinux/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) diff --git a/spl.spec.in b/spl.spec.in index 743316588..7ade5f163 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -7,7 +7,7 @@ Summary: SPL Utils Group: Utilities/System Name: %{name} Version: %{version} -Release: %{release} +Release: %{release}%{?dist} License: @LICENSE@ URL: git://github.com/zfsonlinux/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) From b8b6e4c453929596b630fa1cca1ee26a532a2ab4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Nov 2011 13:35:12 -0700 Subject: [PATCH 0545/1062] Fix NULL deref in balance_pgdat() Be careful not to unconditionally clear the PF_MEMALLOC bit in the task structure. It may have already been set when entering kv_alloc() in which case it must remain set on exit. In particular the kswapd thread will have PF_MEMALLOC set in order to prevent it from entering direct reclaim. By clearing it we allow the following NULL deref to potentially occur. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] balance_pgdat+0x25b/0x4ff Signed-off-by: Brian Behlendorf Closes ZFS issue #287 --- module/spl/spl-kmem.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index db009614f..b3c054a95 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -855,14 +855,17 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) * been filed at kernel.org to track the issue. * * https://bugzilla.kernel.org/show_bug.cgi?id=30702 + * + * NOTE: Only set PF_MEMALLOC if it's not already set, and + * then only clear it when we were the one who set it. */ - if (!(flags & __GFP_FS)) + if (!(flags & __GFP_FS) && !(current->flags & PF_MEMALLOC)) { current->flags |= PF_MEMALLOC; - - ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); - - if (!(flags & __GFP_FS)) + ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); current->flags &= ~PF_MEMALLOC; + } else { + ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); + } } /* Resulting allocated memory will be page aligned */ From 12ff95ff579d0203790aff69632c7ab12ce56140 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Nov 2011 12:29:51 -0800 Subject: [PATCH 0546/1062] Linux 3.1 compat, kern_path_parent() Prior to Linux 3.1 the kern_path_parent symbol was exported for use by kernel modules. As of Linux 3.1 it is now longer easily available. To handle this case the spl will now dynamically look up address of the missing symbol at module load time. Signed-off-by: Brian Behlendorf Issue #52 --- config/spl-build.m4 | 47 +++++++++++++++++++++++++-- configure | 64 ++++++++++++++++++++++++++++++++++--- include/linux/file_compat.h | 14 +++++--- include/sys/vnode.h | 5 +-- module/spl/spl-generic.c | 9 ++++-- module/spl/spl-vnode.c | 27 ++++++++++++++-- spl_config.h.in | 5 ++- 7 files changed, 152 insertions(+), 19 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c046db830..f5696b943 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -80,7 +80,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES SPL_AC_SHRINK_DCACHE_MEMORY SPL_AC_SHRINK_ICACHE_MEMORY - SPL_AC_KERN_PATH_PARENT + SPL_AC_KERN_PATH_PARENT_HEADER + SPL_AC_KERN_PATH_PARENT_SYMBOL SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT ]) @@ -587,6 +588,30 @@ AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], fi ]) +dnl # +dnl # SPL_CHECK_SYMBOL_HEADER +dnl # check if a symbol prototype is defined in listed headers. +dnl # +AC_DEFUN([SPL_CHECK_SYMBOL_HEADER], [ + AC_MSG_CHECKING([whether symbol $1 exists in header]) + header=0 + for file in $3; do + grep -q "$2" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + header=1 + break; + fi + done + if test $header -eq 0; then + AC_MSG_RESULT([no]) + $5 + else + AC_MSG_RESULT([yes]) + $4 + fi +]) + dnl # dnl # SPL_CHECK_HEADER dnl # check whether header exists and define HAVE_$2_HEADER @@ -1809,11 +1834,27 @@ dnl # and the flags argument has been removed. The only behavior now dnl # offered is that of LOOKUP_PARENT. The spl already always passed dnl # this flag so dropping the flag does not impact us. dnl # -AC_DEFUN([SPL_AC_KERN_PATH_PARENT], [ +AC_DEFUN([SPL_AC_KERN_PATH_PARENT_HEADER], [ + SPL_CHECK_SYMBOL_HEADER( + [kern_path_parent], + [int kern_path_parent(const char \*, struct nameidata \*)], + [include/linux/namei.h], + [AC_DEFINE(HAVE_KERN_PATH_PARENT_HEADER, 1, + [kern_path_parent() is available])], + []) +]) + +dnl # +dnl # 3.1 API compat, +dnl # The kern_path_parent() symbol is no longer exported by the kernel. +dnl # However, it remains the prefered interface and since we still have +dnl # access to the prototype we dynamically lookup the required address. +dnl # +AC_DEFUN([SPL_AC_KERN_PATH_PARENT_SYMBOL], [ SPL_CHECK_SYMBOL_EXPORT( [kern_path_parent], [fs/namei.c], - [AC_DEFINE(HAVE_KERN_PATH_PARENT, 1, + [AC_DEFINE(HAVE_KERN_PATH_PARENT_SYMBOL, 1, [kern_path_parent() is available])], []) ]) diff --git a/configure b/configure index 1369ca05d..beeb6d59d 100755 --- a/configure +++ b/configure @@ -15684,6 +15684,34 @@ _ACEOF + + { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent exists in header" >&5 +$as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; } + header=0 + for file in include/linux/namei.h; do + grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + header=1 + break; + fi + done + if test $header -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERN_PATH_PARENT_HEADER 1 +_ACEOF + + fi + + + { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5 $as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ @@ -15709,7 +15737,7 @@ $as_echo "no" >&6; } $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT 1 +#define HAVE_KERN_PATH_PARENT_SYMBOL 1 _ACEOF fi @@ -15718,7 +15746,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT 1 +#define HAVE_KERN_PATH_PARENT_SYMBOL 1 _ACEOF fi @@ -19885,6 +19913,34 @@ _ACEOF + + { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent exists in header" >&5 +$as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; } + header=0 + for file in include/linux/namei.h; do + grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + header=1 + break; + fi + done + if test $header -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERN_PATH_PARENT_HEADER 1 +_ACEOF + + fi + + + { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5 $as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ @@ -19910,7 +19966,7 @@ $as_echo "no" >&6; } $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT 1 +#define HAVE_KERN_PATH_PARENT_SYMBOL 1 _ACEOF fi @@ -19919,7 +19975,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT 1 +#define HAVE_KERN_PATH_PARENT_SYMBOL 1 _ACEOF fi diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 97bd76396..d5fb2bc60 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -67,11 +67,17 @@ spl_filp_open(const char *name, int flags, int mode, int *err) #define spl_inode_unlock(ip) (up(&(ip)->i_sem)) #endif /* HAVE_INODE_I_MUTEX */ -#ifdef HAVE_KERN_PATH_PARENT -#define spl_kern_path_parent(path, nd) kern_path_parent(path, nd) +#ifdef HAVE_KERN_PATH_PARENT_HEADER +# ifndef HAVE_KERN_PATH_PARENT_SYMBOL +typedef int (*kern_path_parent_t)(const char *, struct nameidata *); +extern kern_path_parent_t kern_path_parent_fn; +# define spl_kern_path_parent(path, nd) kern_path_parent_fn(path, nd) +# else +# define spl_kern_path_parent(path, nd) kern_path_parent(path, nd) +# endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ #else -#define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd) -#endif /* HAVE_KERN_PATH_PARENT */ +# define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd) +#endif /* HAVE_KERN_PATH_PARENT_HEADER */ #endif /* SPL_FILE_COMPAT_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 36605ca4a..03462bd70 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -189,8 +189,9 @@ extern file_t *vn_getf(int fd); extern void vn_releasef(int fd); extern int vn_set_pwd(const char *filename); -int vn_init(void); -void vn_fini(void); +int spl_vn_init_kallsyms_lookup(void); +int spl_vn_init(void); +void spl_vn_fini(void); #define VOP_CLOSE vn_close #define VOP_SEEK vn_seek diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 1dedf76cf..3f042cc0d 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -561,7 +561,7 @@ __init spl_init(void) if ((rc = spl_taskq_init())) SGOTO(out4, rc); - if ((rc = vn_init())) + if ((rc = spl_vn_init())) SGOTO(out5, rc); if ((rc = proc_init())) @@ -594,6 +594,9 @@ __init spl_init(void) if ((rc = spl_kmem_init_kallsyms_lookup())) SGOTO(out10, rc); + if ((rc = spl_vn_init_kallsyms_lookup())) + SGOTO(out10, rc); + printk(KERN_NOTICE "SPL: Loaded module v%s%s, using hostid 0x%08x\n", SPL_META_VERSION, SPL_DEBUG_STR, (unsigned int) spl_hostid); SRETURN(rc); @@ -606,7 +609,7 @@ out8: out7: proc_fini(); out6: - vn_fini(); + spl_vn_fini(); out5: spl_taskq_fini(); out4: @@ -634,7 +637,7 @@ spl_fini(void) tsd_fini(); kstat_fini(); proc_fini(); - vn_fini(); + spl_vn_fini(); spl_taskq_fini(); spl_rw_fini(); spl_mutex_fini(); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 354e8798b..cd0fa2cd1 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -42,6 +42,13 @@ static spl_kmem_cache_t *vn_file_cache; static DEFINE_SPINLOCK(vn_file_lock); static LIST_HEAD(vn_file_list); +#ifdef HAVE_KERN_PATH_PARENT_HEADER +#ifndef HAVE_KERN_PATH_PARENT_SYMBOL +kern_path_parent_t kern_path_parent_fn = SYMBOL_POISON; +EXPORT_SYMBOL(kern_path_parent_fn); +#endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ +#endif /* HAVE_KERN_PATH_PARENT_HEADER */ + vtype_t vn_mode_to_vtype(mode_t mode) { @@ -789,8 +796,24 @@ vn_file_cache_destructor(void *buf, void *cdrarg) mutex_destroy(&fp->f_lock); } /* vn_file_cache_destructor() */ +int spl_vn_init_kallsyms_lookup(void) +{ +#ifdef HAVE_KERN_PATH_PARENT_HEADER +#ifndef HAVE_KERN_PATH_PARENT_SYMBOL + kern_path_parent_fn = (kern_path_parent_t) + spl_kallsyms_lookup_name("kern_path_parent"); + if (!kern_path_parent_fn) { + printk(KERN_ERR "Error: Unknown symbol kern_path_parent\n"); + return -EFAULT; + } +#endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ +#endif /* HAVE_KERN_PATH_PARENT_HEADER */ + + return (0); +} + int -vn_init(void) +spl_vn_init(void) { SENTRY; vn_cache = kmem_cache_create("spl_vn_cache", @@ -808,7 +831,7 @@ vn_init(void) } /* vn_init() */ void -vn_fini(void) +spl_vn_fini(void) { file_t *fp, *next_fp; int leaked = 0; diff --git a/spl_config.h.in b/spl_config.h.in index 97f0e06f3..612205969 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -115,7 +115,10 @@ #undef HAVE_KALLSYMS_LOOKUP_NAME /* kern_path_parent() is available */ -#undef HAVE_KERN_PATH_PARENT +#undef HAVE_KERN_PATH_PARENT_HEADER + +/* kern_path_parent() is available */ +#undef HAVE_KERN_PATH_PARENT_SYMBOL /* kmalloc_node() is available */ #undef HAVE_KMALLOC_NODE From 0d0b523728b348b2d762fd9b27511ed9b138607b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Nov 2011 12:45:35 -0800 Subject: [PATCH 0547/1062] Linux 3.1 compat, vfs_fsync() Preferentially use the vfs_fsync() function. This function was initially introduced in 2.6.29 and took three arguments. As of 2.6.35 the dentry argument was dropped from the function. For older kernels fall back to using file_fsync() which also took three arguments including the dentry. Signed-off-by: Brian Behlendorf Issue #52 --- config/spl-build.m4 | 30 +++- configure | 342 ++++++++++++++++++++++-------------- include/linux/file_compat.h | 14 +- spl_config.h.in | 9 +- 4 files changed, 248 insertions(+), 147 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index f5696b943..d0bd97cb4 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -68,13 +68,14 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_SET_FS_PWD SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME + SPL_AC_VFS_FSYNC + SPL_AC_2ARGS_VFS_FSYNC SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_CRED_STRUCT SPL_AC_GROUPS_SEARCH SPL_AC_PUT_TASK_STRUCT SPL_AC_5ARGS_PROC_HANDLER SPL_AC_KVASPRINTF - SPL_AC_3ARGS_FILE_FSYNC SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_INVALIDATE_INODES SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES @@ -1718,19 +1719,30 @@ AC_DEFUN([SPL_AC_KVASPRINTF], [ ]) dnl # -dnl # 2.6.35 API change, -dnl # Unused 'struct dentry *' removed from prototype. +dnl # 2.6.29 API change, +dnl # vfs_fsync() funcation added, prior to this use file_fsync(). dnl # -AC_DEFUN([SPL_AC_3ARGS_FILE_FSYNC], [ - AC_MSG_CHECKING([whether file_fsync() wants 3 args]) +AC_DEFUN([SPL_AC_VFS_FSYNC], [ + SPL_CHECK_SYMBOL_EXPORT( + [vfs_fsync], + [fs/sync.c], + [AC_DEFINE(HAVE_VFS_FSYNC, 1, [vfs_fsync() is available])], + []) +]) + +dnl # +dnl # 2.6.35 API change, +dnl # Unused 'struct dentry *' removed from vfs_fsync() prototype. +dnl # +AC_DEFUN([SPL_AC_2ARGS_VFS_FSYNC], [ + AC_MSG_CHECKING([whether vfs_fsync() wants 2 args]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ - file_fsync(NULL, NULL, 0); + vfs_fsync(NULL, 0); ],[ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_FILE_FSYNC, 1, - [file_fsync() wants 3 args]) + AC_DEFINE(HAVE_2ARGS_VFS_FSYNC, 1, [vfs_fsync() wants 2 args]) ],[ AC_MSG_RESULT(no) ]) diff --git a/configure b/configure index beeb6d59d..901a91262 100755 --- a/configure +++ b/configure @@ -15067,6 +15067,112 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol vfs_fsync is exported" >&5 +$as_echo_n "checking whether symbol vfs_fsync is exported... " >&6; } + grep -q -E '[[:space:]]vfs_fsync[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/sync.c; do + grep -q -E "EXPORT_SYMBOL.*(vfs_fsync)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VFS_FSYNC 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VFS_FSYNC 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5 +$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_fsync(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_VFS_FSYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 $as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } tmp_flags="$EXTRA_KCFLAGS" @@ -15391,71 +15497,6 @@ _ACEOF - { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5 -$as_echo_n "checking whether file_fsync() wants 3 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - file_fsync(NULL, NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build - echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_FILE_FSYNC 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 $as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ @@ -19296,6 +19337,112 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol vfs_fsync is exported" >&5 +$as_echo_n "checking whether symbol vfs_fsync is exported... " >&6; } + grep -q -E '[[:space:]]vfs_fsync[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/sync.c; do + grep -q -E "EXPORT_SYMBOL.*(vfs_fsync)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VFS_FSYNC 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VFS_FSYNC 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5 +$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_fsync(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_VFS_FSYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 $as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } tmp_flags="$EXTRA_KCFLAGS" @@ -19620,71 +19767,6 @@ _ACEOF - { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5 -$as_echo_n "checking whether file_fsync() wants 3 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - file_fsync(NULL, NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build - echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_FILE_FSYNC 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 $as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index d5fb2bc60..5c7833d4a 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -50,12 +50,16 @@ spl_filp_open(const char *name, int flags, int mode, int *err) #define spl_filp_poff(f) (&(f)->f_pos) #define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) -#ifdef HAVE_3ARGS_FILE_FSYNC -#define spl_filp_fsync(fp, sync) (fp)->f_op->fsync((fp), \ - (fp)->f_dentry, sync) +#ifdef HAVE_VFS_FSYNC +# ifdef HAVE_2ARGS_VFS_FSYNC +# define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync) +# else +# define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync) +# endif /* HAVE_2ARGS_VFS_FSYNC */ #else -#define spl_filp_fsync(fp, sync) (fp)->f_op->fsync((fp), sync) -#endif +# include +# define spl_filp_fsync(fp, sync) file_fsync(fp, (fp)->f_dentry, sync) +#endif /* HAVE_VFS_FSYNC */ #ifdef HAVE_INODE_I_MUTEX #define spl_inode_lock(ip) (mutex_lock(&(ip)->i_mutex)) diff --git a/spl_config.h.in b/spl_config.h.in index 612205969..08b43426d 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -18,15 +18,15 @@ /* set_fs_pwd() wants 2 args */ #undef HAVE_2ARGS_SET_FS_PWD +/* vfs_fsync() wants 2 args */ +#undef HAVE_2ARGS_VFS_FSYNC + /* vfs_unlink() wants 2 args */ #undef HAVE_2ARGS_VFS_UNLINK /* zlib_deflate_workspacesize() wants 2 args */ #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE -/* file_fsync() wants 3 args */ -#undef HAVE_3ARGS_FILE_FSYNC - /* INIT_WORK wants 3 args */ #undef HAVE_3ARGS_INIT_WORK @@ -216,6 +216,9 @@ /* user_path_dir() is available */ #undef HAVE_USER_PATH_DIR +/* vfs_fsync() is available */ +#undef HAVE_VFS_FSYNC + /* Page state NR_ACTIVE is available */ #undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE From fe71c0e5677d35cbdb3a6bf0a81c71d12a2aff4a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Nov 2011 16:31:03 -0800 Subject: [PATCH 0548/1062] Linux 3.1 compat, shrink_*cache_memory As of Linux 3.1 the shrink_dcache_memory and shrink_icache_memory functions have been removed. This same task is now accomplished more cleanly with per super block shrinkers. This unfortunately leaves us no easy way to support the dnlc_reduce_cache() function. This support has always been entirely optional. So when no reasonable interface is available allow the dnlc_reduce_cache() function to effectively become a no-op. The downside of this change is that it will prevent the zfs arc meta data limts from being enforced. However, the current zfs implementation in this regard is already flawed and needs to be reworked. If the arc needs to enfore a meta data limit it will need to be extended to coordinate directly with the zpl. This will allow us to drop all this compatibility code and get more fine grained control over the cache management. Signed-off-by: Brian Behlendorf Issue #52 --- include/linux/mm_compat.h | 54 ++++++++++++++++++++++++++++++++++----- module/spl/spl-kmem.c | 14 +++------- 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 173acd434..b375f9b39 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -93,16 +93,37 @@ extern shrink_dcache_memory_t shrink_dcache_memory_fn; # define shrink_dcache_memory(nr, gfp) \ ({ \ struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \ - shrink_dcache_memory_fn(NULL, &sc); \ + int __ret__ = 0; \ + \ + if (shrink_dcache_memory_fn) \ + __ret__ = shrink_dcache_memory_fn(NULL, &sc); \ + \ + __ret__; \ }) # elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) typedef int (*shrink_dcache_memory_t)(struct shrinker *, int, gfp_t); extern shrink_dcache_memory_t shrink_dcache_memory_fn; -# define shrink_dcache_memory(nr, gfp) shrink_dcache_memory_fn(NULL, nr, gfp) +# define shrink_dcache_memory(nr, gfp) \ +({ \ + int __ret__ = 0; \ + \ + if (shrink_dcache_memory_fn) \ + __ret__ = shrink_dcache_memory_fn(NULL, nr, gfp); \ + \ + __ret__; \ +}) # else typedef int (*shrink_dcache_memory_t)(int, gfp_t); extern shrink_dcache_memory_t shrink_dcache_memory_fn; -# define shrink_dcache_memory(nr, gfp) shrink_dcache_memory_fn(nr, gfp) +# define shrink_dcache_memory(nr, gfp) \ +({ \ + int __ret__ = 0; \ + \ + if (shrink_dcache_memory_fn) \ + __ret__ = shrink_dcache_memory_fn(nr, gfp); \ + \ + __ret__; \ +}) # endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ #endif /* HAVE_SHRINK_DCACHE_MEMORY */ @@ -120,16 +141,37 @@ extern shrink_icache_memory_t shrink_icache_memory_fn; # define shrink_icache_memory(nr, gfp) \ ({ \ struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \ - shrink_icache_memory_fn(NULL, &sc); \ + int __ret__ = 0; \ + \ + if (shrink_icache_memory_fn) \ + __ret__ = shrink_icache_memory_fn(NULL, &sc); \ + \ + __ret__; \ }) # elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) typedef int (*shrink_icache_memory_t)(struct shrinker *, int, gfp_t); extern shrink_icache_memory_t shrink_icache_memory_fn; -# define shrink_icache_memory(nr, gfp) shrink_icache_memory_fn(NULL, nr, gfp) +# define shrink_icache_memory(nr, gfp) \ +({ \ + int __ret__ = 0; \ + \ + if (shrink_icache_memory_fn) \ + __ret__ = shrink_icache_memory_fn(NULL, nr, gfp); \ + \ + __ret__; \ +}) # else typedef int (*shrink_icache_memory_t)(int, gfp_t); extern shrink_icache_memory_t shrink_icache_memory_fn; -# define shrink_icache_memory(nr, gfp) shrink_icache_memory_fn(nr, gfp) +# define shrink_icache_memory(nr, gfp) \ +({ \ + int __ret__ = 0; \ + \ + if (shrink_icache_memory_fn) \ + __ret__ = shrink_icache_memory_fn(nr, gfp); \ + \ + __ret__; \ +}) # endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ #endif /* HAVE_SHRINK_ICACHE_MEMORY */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index b3c054a95..1d2fa9053 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2123,21 +2123,15 @@ spl_kmem_init_kallsyms_lookup(void) #endif /* HAVE_INVALIDATE_INODES */ #ifndef HAVE_SHRINK_DCACHE_MEMORY + /* When shrink_dcache_memory_fn == NULL support is disabled */ shrink_dcache_memory_fn = (shrink_dcache_memory_t) - spl_kallsyms_lookup_name("shrink_dcache_memory"); - if (!shrink_dcache_memory_fn) { - printk(KERN_ERR "Error: Unknown symbol shrink_dcache_memory\n"); - return -EFAULT; - } + spl_kallsyms_lookup_name("shrink_dcache_memory"); #endif /* HAVE_SHRINK_DCACHE_MEMORY */ #ifndef HAVE_SHRINK_ICACHE_MEMORY + /* When shrink_icache_memory_fn == NULL support is disabled */ shrink_icache_memory_fn = (shrink_icache_memory_t) - spl_kallsyms_lookup_name("shrink_icache_memory"); - if (!shrink_icache_memory_fn) { - printk(KERN_ERR "Error: Unknown symbol shrink_icache_memory\n"); - return -EFAULT; - } + spl_kallsyms_lookup_name("shrink_icache_memory"); #endif /* HAVE_SHRINK_ICACHE_MEMORY */ return 0; From 948914d2f10f6bf274bb51b96dd5337f01165b45 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 Nov 2011 10:36:21 -0800 Subject: [PATCH 0549/1062] Fix depmod warning The depmod utility from module-init-tools 3.12-pre3 generates a warning when the -e option is used without -E or -F. This was observed under OpenSuse 11.4. To resolve the issue when the exact System.map-* for your kernel cannot be found fallback to a generic safe '/sbin/depmod -a'. WARNING: -e needs -E or -F Signed-off-by: Brian Behlendorf --- spl-modules.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 9c6320171..7e01b2ce2 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -234,14 +234,14 @@ rm -rf $RPM_BUILD_ROOT %post if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 + /sbin/depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 else - depmod -ae %{kver} || exit 0 + /sbin/depmod -a || exit 0 fi %postun if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 + /sbin/depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 else - depmod -ae %{kver} || exit 0 + /sbin/depmod -a || exit 0 fi From 1114ae6ae74a287478cd8a34770fc4a907f84134 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Nov 2011 09:03:31 -0800 Subject: [PATCH 0550/1062] Prepend spl_ to all init/fini functions This is a bit of cleanup I'd been meaning to get to for a while to reduce the chance of a type conflict. Well that conflict finally occurred with the kstat_init() function which conflicts with a function in the 2.6.32-6-pve kernel. Signed-off-by: Brian Behlendorf Closes #56 --- include/linux/proc_compat.h | 4 ++-- include/spl-debug.h | 4 ++-- include/sys/kstat.h | 4 ++-- include/sys/tsd.h | 4 ++-- include/sys/zmod.h | 4 ++-- module/spl/spl-debug.c | 4 ++-- module/spl/spl-generic.c | 30 +++++++++++++++--------------- module/spl/spl-kstat.c | 4 ++-- module/spl/spl-proc.c | 4 ++-- module/spl/spl-tsd.c | 6 ++++-- module/spl/spl-zlib.c | 6 ++++-- 11 files changed, 39 insertions(+), 35 deletions(-) diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index 97d3c6c5a..3d8eda108 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -47,7 +47,7 @@ struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, const char *str); int proc_dir_entries(struct proc_dir_entry *root); -int proc_init(void); -void proc_fini(void); +int spl_proc_init(void); +void spl_proc_fini(void); #endif /* SPL_PROC_H */ diff --git a/include/spl-debug.h b/include/spl-debug.h index 8bd4c4495..1e08e77bc 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -186,7 +186,7 @@ extern void spl_debug_dumpstack(struct task_struct *tsk); extern int spl_debug_clear_buffer(void); extern int spl_debug_mark_buffer(char *text); -int debug_init(void); -void debug_fini(void); +int spl_debug_init(void); +void spl_debug_fini(void); #endif /* SPL_DEBUG_INTERNAL_H */ diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 42458bee5..3c2ad4c5b 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -146,8 +146,8 @@ typedef struct kstat_timer { hrtime_t stop_time; /* previous event stop time */ } kstat_timer_t; -int kstat_init(void); -void kstat_fini(void); +int spl_kstat_init(void); +void spl_kstat_fini(void); extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, const char *ks_name, const char *ks_class, diff --git a/include/sys/tsd.h b/include/sys/tsd.h index 56f3b4cd8..a31f60605 100644 --- a/include/sys/tsd.h +++ b/include/sys/tsd.h @@ -39,7 +39,7 @@ extern void tsd_create(uint_t *, dtor_func_t); extern void tsd_destroy(uint_t *); extern void tsd_exit(void); -int tsd_init(void); -void tsd_fini(void); +int spl_tsd_init(void); +void spl_tsd_fini(void); #endif /* _SPL_TSD_H */ diff --git a/include/sys/zmod.h b/include/sys/zmod.h index 246aa2aec..a6519dec2 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -63,7 +63,7 @@ extern int z_compress_level(void *dest, size_t *destLen, const void *source, extern int z_uncompress(void *dest, size_t *destLen, const void *source, size_t sourceLen); -int zlib_init(void); -void zlib_fini(void); +int spl_zlib_init(void); +void spl_zlib_fini(void); #endif /* SPL_ZMOD_H */ diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 21e8c5d3d..0dbbb5a7c 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -1176,7 +1176,7 @@ out: } int -debug_init(void) +spl_debug_init(void) { int rc, max = spl_debug_mb; @@ -1244,7 +1244,7 @@ trace_fini(void) } void -debug_fini(void) +spl_debug_fini(void) { trace_fini(); } diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 3f042cc0d..e62e4a7a9 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -546,7 +546,7 @@ __init spl_init(void) { int rc = 0; - if ((rc = debug_init())) + if ((rc = spl_debug_init())) return rc; if ((rc = spl_kmem_init())) @@ -564,16 +564,16 @@ __init spl_init(void) if ((rc = spl_vn_init())) SGOTO(out5, rc); - if ((rc = proc_init())) + if ((rc = spl_proc_init())) SGOTO(out6, rc); - if ((rc = kstat_init())) + if ((rc = spl_kstat_init())) SGOTO(out7, rc); - if ((rc = tsd_init())) + if ((rc = spl_tsd_init())) SGOTO(out8, rc); - if ((rc = zlib_init())) + if ((rc = spl_zlib_init())) SGOTO(out9, rc); /* @@ -601,13 +601,13 @@ __init spl_init(void) SPL_META_VERSION, SPL_DEBUG_STR, (unsigned int) spl_hostid); SRETURN(rc); out10: - zlib_fini(); + spl_zlib_fini(); out9: - tsd_fini(); + spl_tsd_fini(); out8: - kstat_fini(); + spl_kstat_fini(); out7: - proc_fini(); + spl_proc_fini(); out6: spl_vn_fini(); out5: @@ -619,7 +619,7 @@ out3: out2: spl_kmem_fini(); out1: - debug_fini(); + spl_debug_fini(); printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer v%s%s" ", rc = %d\n", SPL_META_VERSION, SPL_DEBUG_STR, rc); @@ -633,16 +633,16 @@ spl_fini(void) printk(KERN_NOTICE "SPL: Unloaded module v%s%s\n", SPL_META_VERSION, SPL_DEBUG_STR); - zlib_fini(); - tsd_fini(); - kstat_fini(); - proc_fini(); + spl_zlib_fini(); + spl_tsd_fini(); + spl_kstat_fini(); + spl_proc_fini(); spl_vn_fini(); spl_taskq_fini(); spl_rw_fini(); spl_mutex_fini(); spl_kmem_fini(); - debug_fini(); + spl_debug_fini(); } /* Called when a dependent module is loaded */ diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 5be1c21fc..ee9dfdf03 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -477,7 +477,7 @@ __kstat_delete(kstat_t *ksp) EXPORT_SYMBOL(__kstat_delete); int -kstat_init(void) +spl_kstat_init(void) { SENTRY; spin_lock_init(&kstat_lock); @@ -487,7 +487,7 @@ kstat_init(void) } void -kstat_fini(void) +spl_kstat_fini(void) { SENTRY; ASSERT(list_empty(&kstat_list)); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 1b353ceb2..745b10714 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -1139,7 +1139,7 @@ proc_dir_entries(struct proc_dir_entry *root) } int -proc_init(void) +spl_proc_init(void) { int rc = 0; SENTRY; @@ -1186,7 +1186,7 @@ out: } void -proc_fini(void) +spl_proc_fini(void) { SENTRY; diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index 0581e1b2e..ce5560a1e 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -618,7 +618,8 @@ tsd_exit(void) } EXPORT_SYMBOL(tsd_exit); -int tsd_init(void) +int +spl_tsd_init(void) { SENTRY; @@ -629,7 +630,8 @@ int tsd_init(void) SRETURN(0); } -void tsd_fini(void) +void +spl_tsd_fini(void) { SENTRY; tsd_hash_table_fini(tsd_hash_table); diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index c42562f81..7bed00ca4 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -196,7 +196,8 @@ z_uncompress(void *dest, size_t *destLen, const void *source, size_t sourceLen) } EXPORT_SYMBOL(z_uncompress); -int zlib_init(void) +int +spl_zlib_init(void) { int size; SENTRY; @@ -212,7 +213,8 @@ int zlib_init(void) SRETURN(0); } -void zlib_fini(void) +void +spl_zlib_fini(void) { SENTRY; kmem_cache_destroy(zlib_workspace_cache); From e05bec805b066e72266281a03e57e61e7dd53264 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 18 Nov 2011 14:27:37 -0800 Subject: [PATCH 0551/1062] Fix a typo referencing an incorrect symbol The splat_taskq_test4_common function was incorrectly referencing the splat_taskq-test13_func symbol, when it meant to be using the splat_taskq_test4_func symbol. Signed-off-by: Brian Behlendorf Closes #61 --- module/splat/splat-taskq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index a7c537236..0f74b5ae5 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -344,7 +344,7 @@ splat_taskq_test4_common(struct file *file, void *arg, int minalloc, splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' function '%s' dispatch " "%d failed\n", tq_arg.name, - sym2str(splat_taskq_test13_func), j); + sym2str(splat_taskq_test4_func), j); rc = -EINVAL; goto out; } From 791dc876eb59f1543fee0bcfc1a97691c643ea3c Mon Sep 17 00:00:00 2001 From: Chris Dunlop Date: Tue, 6 Dec 2011 15:29:58 +1100 Subject: [PATCH 0552/1062] Allow 64-bit timestamps to be set on 64-bit kernels ZFS and 64-bit linux are perfectly capable of dealing with 64-bit timestamps, but ZFS deliberately prevents setting them. Adjust the SPL such that TIMESPEC_OVERFLOW will not always assume 32-bit values and instead use the correct values for your kernel build. This effectively allows 64-bit timestamps on 64-bit systems. Signed-off-by: Brian Behlendorf Closes ZFS issue #487 --- include/sys/time.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/sys/time.h b/include/sys/time.h index ed3aae934..341b531ef 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -34,8 +34,13 @@ #include #include -#define TIME32_MAX INT32_MAX -#define TIME32_MIN INT32_MIN +#if defined(CONFIG_64BIT) +#define TIME_MAX INT64_MAX +#define TIME_MIN INT64_MIN +#else +#define TIME_MAX INT32_MAX +#define TIME_MIN INT32_MIN +#endif #define SEC 1 #define MILLISEC 1000 @@ -83,6 +88,6 @@ gethrestime_sec(void) } #define TIMESPEC_OVERFLOW(ts) \ - ((ts)->tv_sec < TIME32_MIN || (ts)->tv_sec > TIME32_MAX) + ((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX) #endif /* _SPL_TIME_H */ From 93806f58a620e3e0fabd75db538c789cdc653afe Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Mon, 12 Dec 2011 15:37:30 -0800 Subject: [PATCH 0553/1062] Fix usage of MUTEX macro in mutex_enter_nested A call site of the MUTEX macro had incorrectly placed its closing parenthesis, causing two parameters to be passed rather than one. This change moves the misplaced parenthesis to fix the typographical error. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #70 --- include/sys/mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index b41b3cead..213bc2477 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -195,7 +195,7 @@ spl_mutex_clear_owner(kmutex_t *mp) #ifdef HAVE_GPL_ONLY_SYMBOLS # define mutex_enter_nested(mp, sc) \ ({ \ - mutex_lock_nested(MUTEX(mp, sc)); \ + mutex_lock_nested(MUTEX(mp), sc); \ spl_mutex_set_owner(mp); \ }) #else From ed948fa72b28b0769758081d71d5ce5d30b428f9 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 2 Dec 2011 14:05:06 -0800 Subject: [PATCH 0554/1062] Add SPLAT_TEST_FINI call for SPLAT_TASKQ_TEST6_ID This change adds the neglected SPLAT_TEST_FINI call for the SPLAT_TASKQ_TEST6_ID, just as is done for the other 5 SPLAT_TASKQ_* tests. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #64 --- module/splat/splat-taskq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 0f74b5ae5..077a9df99 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -722,6 +722,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST4_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST3_ID); From 046a70c93b2951bd4c705fb09592d2555a8858f0 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 11 Nov 2011 15:06:35 -0800 Subject: [PATCH 0555/1062] Replace struct spl_task with struct taskq_ent The spl_task structure was renamed to taskq_ent, and all of its fields were renamed to have a prefix of 'tqent' rather than 't'. This was to align with the naming convention which the ZFS code assumes. Previously these fields were private so the name never mattered. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #65 --- module/spl/spl-taskq.c | 125 ++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 63 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index f9ee57035..50d32e021 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -38,22 +38,22 @@ taskq_t *system_taskq; EXPORT_SYMBOL(system_taskq); -typedef struct spl_task { - spinlock_t t_lock; - struct list_head t_list; - taskqid_t t_id; - task_func_t *t_func; - void *t_arg; -} spl_task_t; +typedef struct taskq_ent { + spinlock_t tqent_lock; + struct list_head tqent_list; + taskqid_t tqent_id; + task_func_t *tqent_func; + void *tqent_arg; +} taskq_ent_t; /* * NOTE: Must be called with tq->tq_lock held, returns a list_t which * is not attached to the free, work, or pending taskq lists. */ -static spl_task_t * +static taskq_ent_t * task_alloc(taskq_t *tq, uint_t flags) { - spl_task_t *t; + taskq_ent_t *t; int count = 0; SENTRY; @@ -62,10 +62,10 @@ task_alloc(taskq_t *tq, uint_t flags) ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ ASSERT(spin_is_locked(&tq->tq_lock)); retry: - /* Acquire spl_task_t's from free list if available */ + /* Acquire taskq_ent_t's from free list if available */ if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { - t = list_entry(tq->tq_free_list.next, spl_task_t, t_list); - list_del_init(&t->t_list); + t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); + list_del_init(&t->tqent_list); SRETURN(t); } @@ -73,15 +73,15 @@ retry: if (flags & TQ_NOALLOC) SRETURN(NULL); - /* Hit maximum spl_task_t pool size */ + /* Hit maximum taskq_ent_t pool size */ if (tq->tq_nalloc >= tq->tq_maxalloc) { if (flags & TQ_NOSLEEP) SRETURN(NULL); /* * Sleep periodically polling the free list for an available - * spl_task_t. Dispatching with TQ_SLEEP should always succeed - * but we cannot block forever waiting for an spl_taskq_t to + * taskq_ent_t. Dispatching with TQ_SLEEP should always succeed + * but we cannot block forever waiting for an taskq_entq_t to * show up in the free list, otherwise a deadlock can happen. * * Therefore, we need to allocate a new task even if the number @@ -97,15 +97,15 @@ retry: } spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - t = kmem_alloc(sizeof(spl_task_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); + t = kmem_alloc(sizeof(taskq_ent_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); if (t) { - spin_lock_init(&t->t_lock); - INIT_LIST_HEAD(&t->t_list); - t->t_id = 0; - t->t_func = NULL; - t->t_arg = NULL; + spin_lock_init(&t->tqent_lock); + INIT_LIST_HEAD(&t->tqent_list); + t->tqent_id = 0; + t->tqent_func = NULL; + t->tqent_arg = NULL; tq->tq_nalloc++; } @@ -113,20 +113,20 @@ retry: } /* - * NOTE: Must be called with tq->tq_lock held, expects the spl_task_t + * NOTE: Must be called with tq->tq_lock held, expects the taskq_ent_t * to already be removed from the free, work, or pending taskq lists. */ static void -task_free(taskq_t *tq, spl_task_t *t) +task_free(taskq_t *tq, taskq_ent_t *t) { SENTRY; ASSERT(tq); ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); - ASSERT(list_empty(&t->t_list)); + ASSERT(list_empty(&t->tqent_list)); - kmem_free(t, sizeof(spl_task_t)); + kmem_free(t, sizeof(taskq_ent_t)); tq->tq_nalloc--; SEXIT; @@ -134,23 +134,23 @@ task_free(taskq_t *tq, spl_task_t *t) /* * NOTE: Must be called with tq->tq_lock held, either destroys the - * spl_task_t if too many exist or moves it to the free list for later use. + * taskq_ent_t if too many exist or moves it to the free list for later use. */ static void -task_done(taskq_t *tq, spl_task_t *t) +task_done(taskq_t *tq, taskq_ent_t *t) { SENTRY; ASSERT(tq); ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); - list_del_init(&t->t_list); + list_del_init(&t->tqent_list); if (tq->tq_nalloc <= tq->tq_minalloc) { - t->t_id = 0; - t->t_func = NULL; - t->t_arg = NULL; - list_add_tail(&t->t_list, &tq->tq_free_list); + t->tqent_id = 0; + t->tqent_func = NULL; + t->tqent_arg = NULL; + list_add_tail(&t->tqent_list, &tq->tq_free_list); } else { task_free(tq, t); } @@ -245,7 +245,7 @@ EXPORT_SYMBOL(__taskq_member); taskqid_t __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { - spl_task_t *t; + taskq_ent_t *t; taskqid_t rc = 0; SENTRY; @@ -274,19 +274,19 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) if ((t = task_alloc(tq, flags)) == NULL) SGOTO(out, rc = 0); - spin_lock(&t->t_lock); + spin_lock(&t->tqent_lock); /* Queue to the priority list instead of the pending list */ if (flags & TQ_FRONT) - list_add_tail(&t->t_list, &tq->tq_prio_list); + list_add_tail(&t->tqent_list, &tq->tq_prio_list); else - list_add_tail(&t->t_list, &tq->tq_pend_list); + list_add_tail(&t->tqent_list, &tq->tq_pend_list); - t->t_id = rc = tq->tq_next_id; + t->tqent_id = rc = tq->tq_next_id; tq->tq_next_id++; - t->t_func = func; - t->t_arg = arg; - spin_unlock(&t->t_lock); + t->tqent_func = func; + t->tqent_arg = arg; + spin_unlock(&t->tqent_lock); wake_up(&tq->tq_work_waitq); out: @@ -294,7 +294,6 @@ out: SRETURN(rc); } EXPORT_SYMBOL(__taskq_dispatch); - /* * Returns the lowest incomplete taskqid_t. The taskqid_t may * be queued on the pending list, on the priority list, or on @@ -305,25 +304,25 @@ static taskqid_t taskq_lowest_id(taskq_t *tq) { taskqid_t lowest_id = tq->tq_next_id; - spl_task_t *t; + taskq_ent_t *t; SENTRY; ASSERT(tq); ASSERT(spin_is_locked(&tq->tq_lock)); if (!list_empty(&tq->tq_pend_list)) { - t = list_entry(tq->tq_pend_list.next, spl_task_t, t_list); - lowest_id = MIN(lowest_id, t->t_id); + t = list_entry(tq->tq_pend_list.next, taskq_ent_t, tqent_list); + lowest_id = MIN(lowest_id, t->tqent_id); } if (!list_empty(&tq->tq_prio_list)) { - t = list_entry(tq->tq_prio_list.next, spl_task_t, t_list); - lowest_id = MIN(lowest_id, t->t_id); + t = list_entry(tq->tq_prio_list.next, taskq_ent_t, tqent_list); + lowest_id = MIN(lowest_id, t->tqent_id); } if (!list_empty(&tq->tq_work_list)) { - t = list_entry(tq->tq_work_list.next, spl_task_t, t_list); - lowest_id = MIN(lowest_id, t->t_id); + t = list_entry(tq->tq_work_list.next, taskq_ent_t, tqent_list); + lowest_id = MIN(lowest_id, t->tqent_id); } SRETURN(lowest_id); @@ -334,9 +333,9 @@ taskq_lowest_id(taskq_t *tq) * taskqid. */ static void -taskq_insert_in_order(taskq_t *tq, spl_task_t *t) +taskq_insert_in_order(taskq_t *tq, taskq_ent_t *t) { - spl_task_t *w; + taskq_ent_t *w; struct list_head *l; SENTRY; @@ -345,14 +344,14 @@ taskq_insert_in_order(taskq_t *tq, spl_task_t *t) ASSERT(spin_is_locked(&tq->tq_lock)); list_for_each_prev(l, &tq->tq_work_list) { - w = list_entry(l, spl_task_t, t_list); - if (w->t_id < t->t_id) { - list_add(&t->t_list, l); + w = list_entry(l, taskq_ent_t, tqent_list); + if (w->tqent_id < t->tqent_id) { + list_add(&t->tqent_list, l); break; } } if (l == &tq->tq_work_list) - list_add(&t->t_list, &tq->tq_work_list); + list_add(&t->tqent_list, &tq->tq_work_list); SEXIT; } @@ -364,7 +363,7 @@ taskq_thread(void *args) sigset_t blocked; taskqid_t id; taskq_t *tq = args; - spl_task_t *t; + taskq_ent_t *t; struct list_head *pend_list; SENTRY; @@ -406,18 +405,18 @@ taskq_thread(void *args) pend_list = NULL; if (pend_list) { - t = list_entry(pend_list->next, spl_task_t, t_list); - list_del_init(&t->t_list); + t = list_entry(pend_list->next, taskq_ent_t, tqent_list); + list_del_init(&t->tqent_list); taskq_insert_in_order(tq, t); tq->tq_nactive++; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); /* Perform the requested task */ - t->t_func(t->t_arg); + t->tqent_func(t->tqent_arg); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; - id = t->t_id; + id = t->tqent_id; task_done(tq, t); /* When the current lowest outstanding taskqid is @@ -529,7 +528,7 @@ EXPORT_SYMBOL(__taskq_create); void __taskq_destroy(taskq_t *tq) { - spl_task_t *t; + taskq_ent_t *t; int i, nthreads; SENTRY; @@ -549,8 +548,8 @@ __taskq_destroy(taskq_t *tq) spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); while (!list_empty(&tq->tq_free_list)) { - t = list_entry(tq->tq_free_list.next, spl_task_t, t_list); - list_del_init(&t->t_list); + t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); + list_del_init(&t->tqent_list); task_free(tq, t); } @@ -562,7 +561,7 @@ __taskq_destroy(taskq_t *tq) ASSERT(list_empty(&tq->tq_prio_list)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - kmem_free(tq->tq_threads, nthreads * sizeof(spl_task_t *)); + kmem_free(tq->tq_threads, nthreads * sizeof(taskq_ent_t *)); kmem_free(tq, sizeof(taskq_t)); SEXIT; From 2c02b71b1411176905228666abf7a50a2e5f85dc Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Mon, 5 Dec 2011 17:32:48 -0800 Subject: [PATCH 0556/1062] Replace tq_work_list and tq_threads in taskq_t To lay the ground work for introducing the taskq_dispatch_prealloc() interface, the tq_work_list and tq_threads fields had to be replaced with new alternatives in the taskq_t structure. The tq_threads field was replaced with tq_thread_list. Rather than storing the pointers to the taskq's kernel threads in an array, they are now stored as a list. In addition to laying the ground work for the taskq_dispatch_prealloc() interface, this change could also enable taskq threads to be dynamically created and destroyed as threads can now be added and removed to this list relatively easily. The tq_work_list field was replaced with tq_active_list. Instead of keeping a list of taskq_ent_t's which are currently being serviced, a list of taskq_threads currently servicing a taskq_ent_t is kept. This frees up the taskq_ent_t's tqent_list field when it is being serviced (i.e. now when a taskq_ent_t is being serviced, it's tqent_list field will be empty). Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #65 --- include/sys/taskq.h | 20 ++++++- module/spl/spl-taskq.c | 132 ++++++++++++++++++++++++----------------- 2 files changed, 95 insertions(+), 57 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 57f8b1cb5..4ea29cb3b 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -45,6 +45,14 @@ typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); +typedef struct taskq_ent { + spinlock_t tqent_lock; + struct list_head tqent_list; + taskqid_t tqent_id; + task_func_t *tqent_func; + void *tqent_arg; +} taskq_ent_t; + /* * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as * KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly @@ -61,8 +69,9 @@ typedef void (task_func_t)(void *); typedef struct taskq { spinlock_t tq_lock; /* protects taskq_t */ unsigned long tq_lock_flags; /* interrupt state */ - struct task_struct **tq_threads; /* thread pointers */ const char *tq_name; /* taskq name */ + struct list_head tq_thread_list;/* list of all threads */ + struct list_head tq_active_list;/* list of active threads */ int tq_nactive; /* # of active threads */ int tq_nthreads; /* # of total threads */ int tq_pri; /* priority */ @@ -73,13 +82,20 @@ typedef struct taskq { taskqid_t tq_next_id; /* next pend/work id */ taskqid_t tq_lowest_id; /* lowest pend/work id */ struct list_head tq_free_list; /* free task_t's */ - struct list_head tq_work_list; /* work task_t's */ struct list_head tq_pend_list; /* pending task_t's */ struct list_head tq_prio_list; /* priority pending task_t's */ wait_queue_head_t tq_work_waitq; /* new work waitq */ wait_queue_head_t tq_wait_waitq; /* wait waitq */ } taskq_t; +typedef struct taskq_thread { + struct list_head tqt_thread_list; + struct list_head tqt_active_list; + struct task_struct *tqt_thread; + taskq_t *tqt_tq; + taskq_ent_t *tqt_ent; +} taskq_thread_t; + /* Global system-wide dynamic task queue available for all consumers */ extern taskq_t *system_taskq; diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 50d32e021..5c22544b8 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -38,14 +38,6 @@ taskq_t *system_taskq; EXPORT_SYMBOL(system_taskq); -typedef struct taskq_ent { - spinlock_t tqent_lock; - struct list_head tqent_list; - taskqid_t tqent_id; - task_func_t *tqent_func; - void *tqent_arg; -} taskq_ent_t; - /* * NOTE: Must be called with tq->tq_lock held, returns a list_t which * is not attached to the free, work, or pending taskq lists. @@ -228,15 +220,18 @@ EXPORT_SYMBOL(__taskq_wait); int __taskq_member(taskq_t *tq, void *t) { - int i; + struct list_head *l; + taskq_thread_t *tqt; SENTRY; ASSERT(tq); ASSERT(t); - for (i = 0; i < tq->tq_nthreads; i++) - if (tq->tq_threads[i] == (struct task_struct *)t) - SRETURN(1); + list_for_each(l, &tq->tq_thread_list) { + tqt = list_entry(l, taskq_thread_t, tqt_thread_list); + if (tqt->tqt_thread == (struct task_struct *)t) + SRETURN(1); + } SRETURN(0); } @@ -305,6 +300,7 @@ taskq_lowest_id(taskq_t *tq) { taskqid_t lowest_id = tq->tq_next_id; taskq_ent_t *t; + taskq_thread_t *tqt; SENTRY; ASSERT(tq); @@ -320,9 +316,11 @@ taskq_lowest_id(taskq_t *tq) lowest_id = MIN(lowest_id, t->tqent_id); } - if (!list_empty(&tq->tq_work_list)) { - t = list_entry(tq->tq_work_list.next, taskq_ent_t, tqent_list); - lowest_id = MIN(lowest_id, t->tqent_id); + if (!list_empty(&tq->tq_active_list)) { + tqt = list_entry(tq->tq_active_list.next, taskq_thread_t, + tqt_active_list); + ASSERT(tqt->tqt_ent != NULL); + lowest_id = MIN(lowest_id, tqt->tqt_ent->tqent_id); } SRETURN(lowest_id); @@ -333,25 +331,25 @@ taskq_lowest_id(taskq_t *tq) * taskqid. */ static void -taskq_insert_in_order(taskq_t *tq, taskq_ent_t *t) +taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) { - taskq_ent_t *w; + taskq_thread_t *w; struct list_head *l; SENTRY; ASSERT(tq); - ASSERT(t); + ASSERT(tqt); ASSERT(spin_is_locked(&tq->tq_lock)); - list_for_each_prev(l, &tq->tq_work_list) { - w = list_entry(l, taskq_ent_t, tqent_list); - if (w->tqent_id < t->tqent_id) { - list_add(&t->tqent_list, l); + list_for_each_prev(l, &tq->tq_active_list) { + w = list_entry(l, taskq_thread_t, tqt_active_list); + if (w->tqt_ent->tqent_id < tqt->tqt_ent->tqent_id) { + list_add(&tqt->tqt_active_list, l); break; } } - if (l == &tq->tq_work_list) - list_add(&t->tqent_list, &tq->tq_work_list); + if (l == &tq->tq_active_list) + list_add(&tqt->tqt_active_list, &tq->tq_active_list); SEXIT; } @@ -362,12 +360,14 @@ taskq_thread(void *args) DECLARE_WAITQUEUE(wait, current); sigset_t blocked; taskqid_t id; - taskq_t *tq = args; + taskq_thread_t *tqt = args; + taskq_t *tq; taskq_ent_t *t; struct list_head *pend_list; SENTRY; - ASSERT(tq); + ASSERT(tqt); + tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; /* Disable the direct memory reclaim path */ @@ -407,7 +407,8 @@ taskq_thread(void *args) if (pend_list) { t = list_entry(pend_list->next, taskq_ent_t, tqent_list); list_del_init(&t->tqent_list); - taskq_insert_in_order(tq, t); + tqt->tqt_ent = t; + taskq_insert_in_order(tq, tqt); tq->tq_nactive++; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -416,6 +417,8 @@ taskq_thread(void *args) spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; + list_del_init(&tqt->tqt_active_list); + tqt->tqt_ent = NULL; id = t->tqent_id; task_done(tq, t); @@ -435,6 +438,9 @@ taskq_thread(void *args) __set_current_state(TASK_RUNNING); tq->tq_nthreads--; + list_del_init(&tqt->tqt_thread_list); + kmem_free(tqt, sizeof(taskq_thread_t)); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); SRETURN(0); @@ -445,7 +451,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { taskq_t *tq; - struct task_struct *t; + taskq_thread_t *tqt; int rc = 0, i, j = 0; SENTRY; @@ -468,14 +474,10 @@ __taskq_create(const char *name, int nthreads, pri_t pri, if (tq == NULL) SRETURN(NULL); - tq->tq_threads = kmem_alloc(nthreads * sizeof(t), KM_SLEEP); - if (tq->tq_threads == NULL) { - kmem_free(tq, sizeof(*tq)); - SRETURN(NULL); - } - spin_lock_init(&tq->tq_lock); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + INIT_LIST_HEAD(&tq->tq_thread_list); + INIT_LIST_HEAD(&tq->tq_active_list); tq->tq_name = name; tq->tq_nactive = 0; tq->tq_nthreads = 0; @@ -487,7 +489,6 @@ __taskq_create(const char *name, int nthreads, pri_t pri, tq->tq_next_id = 1; tq->tq_lowest_id = 1; INIT_LIST_HEAD(&tq->tq_free_list); - INIT_LIST_HEAD(&tq->tq_work_list); INIT_LIST_HEAD(&tq->tq_pend_list); INIT_LIST_HEAD(&tq->tq_prio_list); init_waitqueue_head(&tq->tq_work_waitq); @@ -499,19 +500,26 @@ __taskq_create(const char *name, int nthreads, pri_t pri, spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - for (i = 0; i < nthreads; i++) { - t = kthread_create(taskq_thread, tq, "%s/%d", name, i); - if (t) { - tq->tq_threads[i] = t; - kthread_bind(t, i % num_online_cpus()); - set_user_nice(t, PRIO_TO_NICE(pri)); - wake_up_process(t); + for (i = 0; i < nthreads; i++) { + tqt = kmem_alloc(sizeof(*tqt), KM_SLEEP); + INIT_LIST_HEAD(&tqt->tqt_thread_list); + INIT_LIST_HEAD(&tqt->tqt_active_list); + tqt->tqt_tq = tq; + tqt->tqt_ent = NULL; + + tqt->tqt_thread = kthread_create(taskq_thread, tqt, + "%s/%d", name, i); + if (tqt->tqt_thread) { + list_add(&tqt->tqt_thread_list, &tq->tq_thread_list); + kthread_bind(tqt->tqt_thread, i % num_online_cpus()); + set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(pri)); + wake_up_process(tqt->tqt_thread); j++; - } else { - tq->tq_threads[i] = NULL; - rc = 1; - } - } + } else { + kmem_free(tqt, sizeof(taskq_thread_t)); + rc = 1; + } + } /* Wait for all threads to be started before potential destroy */ wait_event(tq->tq_wait_waitq, tq->tq_nthreads == j); @@ -528,8 +536,9 @@ EXPORT_SYMBOL(__taskq_create); void __taskq_destroy(taskq_t *tq) { + struct task_struct *thread; + taskq_thread_t *tqt; taskq_ent_t *t; - int i, nthreads; SENTRY; ASSERT(tq); @@ -540,13 +549,25 @@ __taskq_destroy(taskq_t *tq) /* TQ_ACTIVE cleared prevents new tasks being added to pending */ __taskq_wait(tq); - nthreads = tq->tq_nthreads; - for (i = 0; i < nthreads; i++) - if (tq->tq_threads[i]) - kthread_stop(tq->tq_threads[i]); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + /* + * Signal each thread to exit and block until it does. Each thread + * is responsible for removing itself from the list and freeing its + * taskq_thread_t. This allows for idle threads to opt to remove + * themselves from the taskq. They can be recreated as needed. + */ + while (!list_empty(&tq->tq_thread_list)) { + tqt = list_entry(tq->tq_thread_list.next, + taskq_thread_t, tqt_thread_list); + thread = tqt->tqt_thread; + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + kthread_stop(thread); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + } + while (!list_empty(&tq->tq_free_list)) { t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); list_del_init(&t->tqent_list); @@ -555,13 +576,14 @@ __taskq_destroy(taskq_t *tq) ASSERT(tq->tq_nthreads == 0); ASSERT(tq->tq_nalloc == 0); + ASSERT(list_empty(&tq->tq_thread_list)); + ASSERT(list_empty(&tq->tq_active_list)); ASSERT(list_empty(&tq->tq_free_list)); - ASSERT(list_empty(&tq->tq_work_list)); ASSERT(list_empty(&tq->tq_pend_list)); ASSERT(list_empty(&tq->tq_prio_list)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - kmem_free(tq->tq_threads, nthreads * sizeof(taskq_ent_t *)); + kmem_free(tq, sizeof(taskq_t)); SEXIT; From ac1e5b6033811e15f6e471e720bf506e4e3b4a08 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 6 Dec 2011 09:48:06 -0800 Subject: [PATCH 0557/1062] Add Test: "Single task queue, recursive dispatch" Added another splat taskq test to ensure tasks can be recursively submitted to a single task queue without issue. When the taskq_dispatch_prealloc() interface is introduced, this use case can potentially cause a deadlock if a taskq_ent_t is dispatched while its tqent_list field is not empty. This _should_ never be a problem with the existing taskq_dispatch() interface. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #65 --- module/splat/splat-taskq.c | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 077a9df99..cc054548b 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -53,13 +53,20 @@ #define SPLAT_TASKQ_TEST6_NAME "front" #define SPLAT_TASKQ_TEST6_DESC "Correct ordering with TQ_FRONT flag" +#define SPLAT_TASKQ_TEST7_ID 0x0207 +#define SPLAT_TASKQ_TEST7_NAME "recurse" +#define SPLAT_TASKQ_TEST7_DESC "Single task queue, recursive dispatch" + #define SPLAT_TASKQ_ORDER_MAX 8 +#define SPLAT_TASKQ_DEPTH_MAX 16 typedef struct splat_taskq_arg { int flag; int id; atomic_t count; int order[SPLAT_TASKQ_ORDER_MAX]; + unsigned int depth; + taskq_t *tq; spinlock_t lock; struct file *file; const char *name; @@ -685,6 +692,73 @@ out: return rc; } +static void +splat_taskq_test7_func(void *arg) +{ + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; + taskqid_t id; + + ASSERT(tq_arg); + + if (tq_arg->depth >= SPLAT_TASKQ_DEPTH_MAX) + return; + + tq_arg->depth++; + + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST7_NAME, + "Taskq '%s' function '%s' dispatching (depth = %u)\n", + tq_arg->name, sym2str(splat_taskq_test7_func), + tq_arg->depth); + + if ((id = taskq_dispatch(tq_arg->tq, splat_taskq_test7_func, + tq_arg, TQ_SLEEP)) == 0) { + splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST7_NAME, + "Taskq '%s' function '%s' dispatch failed " + "(depth = %u)\n", tq_arg->name, + sym2str(splat_taskq_test7_func), tq_arg->depth); + tq_arg->flag = -EINVAL; + return; + } +} + +static int +splat_taskq_test7(struct file *file, void *arg) +{ + taskq_t *tq; + splat_taskq_arg_t tq_arg; + + splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, + "Taskq '%s' creating\n", SPLAT_TASKQ_TEST7_NAME); + if ((tq = taskq_create(SPLAT_TASKQ_TEST7_NAME, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, + "Taskq '%s' create failed\n", + SPLAT_TASKQ_TEST7_NAME); + return -EINVAL; + } + + tq_arg.depth = 0; + tq_arg.flag = 0; + tq_arg.id = 0; + tq_arg.file = file; + tq_arg.name = SPLAT_TASKQ_TEST7_NAME; + tq_arg.tq = tq; + + splat_taskq_test7_func(&tq_arg); + + if (tq_arg.flag == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, + "Taskq '%s' waiting\n", tq_arg.name); + taskq_wait_id(tq, SPLAT_TASKQ_DEPTH_MAX); + } + + splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, + "Taskq '%s' destroying\n", tq_arg.name); + taskq_destroy(tq); + + return tq_arg.depth == SPLAT_TASKQ_DEPTH_MAX ? 0 : -EINVAL; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -714,6 +788,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST5_ID, splat_taskq_test5); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST6_NAME, SPLAT_TASKQ_TEST6_DESC, SPLAT_TASKQ_TEST6_ID, splat_taskq_test6); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST7_NAME, SPLAT_TASKQ_TEST7_DESC, + SPLAT_TASKQ_TEST7_ID, splat_taskq_test7); return sub; } @@ -722,6 +798,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST4_ID); From 44217f7aad12225c09e5fefbbce97ac6bf2f2d16 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 6 Dec 2011 10:04:51 -0800 Subject: [PATCH 0558/1062] Implement taskq_dispatch_prealloc() interface This patch implements the taskq_dispatch_prealloc() interface which was introduced by the following illumos-gate commit. It allows for a preallocated taskq_ent_t to be used when dispatching items to a taskq. This eliminates a memory allocation which helps minimize lock contention in the taskq when dispatching functions. commit 5aeb94743e3be0c51e86f73096334611ae3a058e Author: Garrett D'Amore Date: Wed Jul 27 07:13:44 2011 -0700 734 taskq_dispatch_prealloc() desired 943 zio_interrupt ends up calling taskq_dispatch with TQ_SLEEP Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #65 --- include/sys/taskq.h | 9 +++++ module/spl/spl-taskq.c | 92 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 95 insertions(+), 6 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 4ea29cb3b..54d869afe 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -51,8 +51,11 @@ typedef struct taskq_ent { taskqid_t tqent_id; task_func_t *tqent_func; void *tqent_arg; + uintptr_t tqent_flags; } taskq_ent_t; +#define TQENT_FLAG_PREALLOC 0x1 + /* * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as * KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly @@ -100,6 +103,9 @@ typedef struct taskq_thread { extern taskq_t *system_taskq; extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); +extern void __taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, taskq_ent_t *); +extern int __taskq_empty_ent(taskq_ent_t *); +extern void __taskq_init_ent(taskq_ent_t *); extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); extern void __taskq_destroy(taskq_t *); extern void __taskq_wait_id(taskq_t *, taskqid_t); @@ -113,6 +119,9 @@ void spl_taskq_fini(void); #define taskq_wait_id(tq, id) __taskq_wait_id(tq, id) #define taskq_wait(tq) __taskq_wait(tq) #define taskq_dispatch(tq, f, p, fl) __taskq_dispatch(tq, f, p, fl) +#define taskq_dispatch_ent(tq, f, p, fl, t) __taskq_dispatch_ent(tq, f, p, fl, t) +#define taskq_empty_ent(t) __taskq_empty_ent(t) +#define taskq_init_ent(t) __taskq_init_ent(t) #define taskq_create(n, th, p, mi, ma, fl) __taskq_create(n, th, p, mi, ma, fl) #define taskq_create_proc(n, th, p, mi, ma, pr, fl) \ __taskq_create(n, th, p, mi, ma, fl) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 5c22544b8..b2b0e6ca8 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -57,6 +57,9 @@ retry: /* Acquire taskq_ent_t's from free list if available */ if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); + + ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); + list_del_init(&t->tqent_list); SRETURN(t); } @@ -93,11 +96,7 @@ retry: spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); if (t) { - spin_lock_init(&t->tqent_lock); - INIT_LIST_HEAD(&t->tqent_list); - t->tqent_id = 0; - t->tqent_func = NULL; - t->tqent_arg = NULL; + taskq_init_ent(t); tq->tq_nalloc++; } @@ -136,12 +135,18 @@ task_done(taskq_t *tq, taskq_ent_t *t) ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); + /* For prealloc'd tasks, we don't free anything. */ + if ((!(tq->tq_flags & TASKQ_DYNAMIC)) && + (t->tqent_flags & TQENT_FLAG_PREALLOC)) + return; + list_del_init(&t->tqent_list); if (tq->tq_nalloc <= tq->tq_minalloc) { t->tqent_id = 0; t->tqent_func = NULL; t->tqent_arg = NULL; + t->tqent_flags = 0; list_add_tail(&t->tqent_list, &tq->tq_free_list); } else { task_free(tq, t); @@ -281,6 +286,9 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) tq->tq_next_id++; t->tqent_func = func; t->tqent_arg = arg; + + ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); + spin_unlock(&t->tqent_lock); wake_up(&tq->tq_work_waitq); @@ -289,6 +297,72 @@ out: SRETURN(rc); } EXPORT_SYMBOL(__taskq_dispatch); + +void +__taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, + taskq_ent_t *t) +{ + SENTRY; + + ASSERT(tq); + ASSERT(func); + ASSERT(!(tq->tq_flags & TASKQ_DYNAMIC)); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + + /* Taskq being destroyed and all tasks drained */ + if (!(tq->tq_flags & TQ_ACTIVE)) { + t->tqent_id = 0; + goto out; + } + + spin_lock(&t->tqent_lock); + + /* + * Mark it as a prealloc'd task. This is important + * to ensure that we don't free it later. + */ + t->tqent_flags |= TQENT_FLAG_PREALLOC; + + /* Queue to the priority list instead of the pending list */ + if (flags & TQ_FRONT) + list_add_tail(&t->tqent_list, &tq->tq_prio_list); + else + list_add_tail(&t->tqent_list, &tq->tq_pend_list); + + t->tqent_id = tq->tq_next_id; + tq->tq_next_id++; + t->tqent_func = func; + t->tqent_arg = arg; + + spin_unlock(&t->tqent_lock); + + wake_up(&tq->tq_work_waitq); +out: + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + SEXIT; +} +EXPORT_SYMBOL(__taskq_dispatch_ent); + +int +__taskq_empty_ent(taskq_ent_t *t) +{ + return list_empty(&t->tqent_list); +} +EXPORT_SYMBOL(__taskq_empty_ent); + +void +__taskq_init_ent(taskq_ent_t *t) +{ + spin_lock_init(&t->tqent_lock); + INIT_LIST_HEAD(&t->tqent_list); + t->tqent_id = 0; + t->tqent_func = NULL; + t->tqent_arg = NULL; + t->tqent_flags = 0; +} +EXPORT_SYMBOL(__taskq_init_ent); + /* * Returns the lowest incomplete taskqid_t. The taskqid_t may * be queued on the pending list, on the priority list, or on @@ -407,6 +481,10 @@ taskq_thread(void *args) if (pend_list) { t = list_entry(pend_list->next, taskq_ent_t, tqent_list); list_del_init(&t->tqent_list); + /* In order to support recursively dispatching a + * preallocated taskq_ent_t, tqent_id must be + * stored prior to executing tqent_func. */ + id = t->tqent_id; tqt->tqt_ent = t; taskq_insert_in_order(tq, tqt); tq->tq_nactive++; @@ -419,7 +497,6 @@ taskq_thread(void *args) tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); tqt->tqt_ent = NULL; - id = t->tqent_id; task_done(tq, t); /* When the current lowest outstanding taskqid is @@ -570,6 +647,9 @@ __taskq_destroy(taskq_t *tq) while (!list_empty(&tq->tq_free_list)) { t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); + + ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); + list_del_init(&t->tqent_list); task_free(tq, t); } From 699d5ee8a99471b49b07e69108045301b865b0d6 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 6 Dec 2011 10:11:36 -0800 Subject: [PATCH 0559/1062] Exercise new taskq interface in splat-taskq tests The splat-taskq test functions were slightly modified to exercise the new taskq interface in addition to the old interface. If the old interface passes each of its tests, the new interface is exercised. Both sub tests (old interface and new interface) must pass for each test as a whole to pass. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #65 --- module/splat/splat-taskq.c | 331 +++++++++++++++++++++++++++++++------ 1 file changed, 281 insertions(+), 50 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index cc054548b..b89b495f1 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -67,6 +67,7 @@ typedef struct splat_taskq_arg { int order[SPLAT_TASKQ_ORDER_MAX]; unsigned int depth; taskq_t *tq; + taskq_ent_t *tqe; spinlock_t lock; struct file *file; const char *name; @@ -94,14 +95,19 @@ splat_taskq_test13_func(void *arg) } static int -splat_taskq_test1(struct file *file, void *arg) +splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_t *tq; taskqid_t id; splat_taskq_arg_t tq_arg; + taskq_ent_t tqe; - splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' creating\n", - SPLAT_TASKQ_TEST1_NAME); + taskq_init_ent(&tqe); + + splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, + "Taskq '%s' creating (%s dispatch)\n", + SPLAT_TASKQ_TEST1_NAME, + prealloc ? "prealloc" : "dynamic"); if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, @@ -118,11 +124,19 @@ splat_taskq_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatching\n", tq_arg.name, sym2str(splat_taskq_test13_func)); - if ((id = taskq_dispatch(tq, splat_taskq_test13_func, - &tq_arg, TQ_SLEEP)) == 0) { + if (prealloc) { + taskq_dispatch_ent(tq, splat_taskq_test13_func, + &tq_arg, TQ_SLEEP, &tqe); + id = tqe.tqent_id; + } else { + id = taskq_dispatch(tq, splat_taskq_test13_func, + &tq_arg, TQ_SLEEP); + } + + if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, - "Taskq '%s' function '%s' dispatch failed\n", - tq_arg.name, sym2str(splat_taskq_test13_func)); + "Taskq '%s' function '%s' dispatch failed\n", + tq_arg.name, sym2str(splat_taskq_test13_func)); taskq_destroy(tq); return -EINVAL; } @@ -132,11 +146,26 @@ splat_taskq_test1(struct file *file, void *arg) taskq_wait(tq); splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' destroying\n", tq_arg.name); + taskq_destroy(tq); return (tq_arg.flag) ? 0 : -EINVAL; } +static int +splat_taskq_test1(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test1_impl(file, arg, B_FALSE); + if (rc) + return rc; + + rc = splat_taskq_test1_impl(file, arg, B_TRUE); + + return rc; +} + /* * Create multiple taskq's, each with multiple tasks, wait until * all tasks complete, ensure all tasks ran properly and in the @@ -175,16 +204,34 @@ splat_taskq_test2_func2(void *arg) #define TEST2_THREADS_PER_TASKQ 1 static int -splat_taskq_test2(struct file *file, void *arg) { +splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_t *tq[TEST2_TASKQS] = { NULL }; taskqid_t id; splat_taskq_arg_t tq_args[TEST2_TASKQS]; + taskq_ent_t *func1_tqes = NULL; + taskq_ent_t *func2_tqes = NULL; int i, rc = 0; - for (i = 0; i < TEST2_TASKQS; i++) { + func1_tqes = kmalloc(sizeof(*func1_tqes) * TEST2_TASKQS, GFP_KERNEL); + if (func1_tqes == NULL) { + rc = -ENOMEM; + goto out; + } - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' " - "creating\n", SPLAT_TASKQ_TEST2_NAME, i); + func2_tqes = kmalloc(sizeof(*func2_tqes) * TEST2_TASKQS, GFP_KERNEL); + if (func2_tqes == NULL) { + rc = -ENOMEM; + goto out; + } + + for (i = 0; i < TEST2_TASKQS; i++) { + taskq_init_ent(&func1_tqes[i]); + taskq_init_ent(&func2_tqes[i]); + + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, + "Taskq '%s/%d' creating (%s dispatch)\n", + SPLAT_TASKQ_TEST2_NAME, i, + prealloc ? "prealloc" : "dynamic"); if ((tq[i] = taskq_create(SPLAT_TASKQ_TEST2_NAME, TEST2_THREADS_PER_TASKQ, maxclsyspri, 50, INT_MAX, @@ -205,9 +252,16 @@ splat_taskq_test2(struct file *file, void *arg) { "Taskq '%s/%d' function '%s' dispatching\n", tq_args[i].name, tq_args[i].id, sym2str(splat_taskq_test2_func1)); - if ((id = taskq_dispatch( - tq[i], splat_taskq_test2_func1, - &tq_args[i], TQ_SLEEP)) == 0) { + if (prealloc) { + taskq_dispatch_ent(tq[i], splat_taskq_test2_func1, + &tq_args[i], TQ_SLEEP, &func1_tqes[i]); + id = func1_tqes[i].tqent_id; + } else { + id = taskq_dispatch(tq[i], splat_taskq_test2_func1, + &tq_args[i], TQ_SLEEP); + } + + if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch " "failed\n", tq_args[i].name, tq_args[i].id, @@ -220,13 +274,20 @@ splat_taskq_test2(struct file *file, void *arg) { "Taskq '%s/%d' function '%s' dispatching\n", tq_args[i].name, tq_args[i].id, sym2str(splat_taskq_test2_func2)); - if ((id = taskq_dispatch( - tq[i], splat_taskq_test2_func2, - &tq_args[i], TQ_SLEEP)) == 0) { - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' function '%s' dispatch failed\n", - tq_args[i].name, tq_args[i].id, - sym2str(splat_taskq_test2_func2)); + if (prealloc) { + taskq_dispatch_ent(tq[i], splat_taskq_test2_func2, + &tq_args[i], TQ_SLEEP, &func2_tqes[i]); + id = func2_tqes[i].tqent_id; + } else { + id = taskq_dispatch(tq[i], splat_taskq_test2_func2, + &tq_args[i], TQ_SLEEP); + } + + if (id == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq " + "'%s/%d' function '%s' dispatch failed\n", + tq_args[i].name, tq_args[i].id, + sym2str(splat_taskq_test2_func2)); rc = -EINVAL; break; } @@ -243,6 +304,7 @@ splat_taskq_test2(struct file *file, void *arg) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d; destroying\n", tq_args[i].name, tq_args[i].id); + taskq_destroy(tq[i]); if (!rc && tq_args[i].flag != ((i * 2) + 1)) { @@ -261,6 +323,25 @@ splat_taskq_test2(struct file *file, void *arg) { } } } +out: + if (func1_tqes) + kfree(func1_tqes); + + if (func2_tqes) + kfree(func2_tqes); + + return rc; +} + +static int +splat_taskq_test2(struct file *file, void *arg) { + int rc; + + rc = splat_taskq_test2_impl(file, arg, B_FALSE); + if (rc) + return rc; + + rc = splat_taskq_test2_impl(file, arg, B_TRUE); return rc; } @@ -270,10 +351,13 @@ splat_taskq_test2(struct file *file, void *arg) { * completes, ensure task ran properly. */ static int -splat_taskq_test3(struct file *file, void *arg) +splat_taskq_test3_impl(struct file *file, void *arg, boolean_t prealloc) { taskqid_t id; splat_taskq_arg_t tq_arg; + taskq_ent_t tqe; + + taskq_init_ent(&tqe); tq_arg.flag = 0; tq_arg.id = 0; @@ -281,10 +365,19 @@ splat_taskq_test3(struct file *file, void *arg) tq_arg.name = SPLAT_TASKQ_TEST3_NAME; splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, - "Taskq '%s' function '%s' dispatching\n", - tq_arg.name, sym2str(splat_taskq_test13_func)); - if ((id = taskq_dispatch(system_taskq, splat_taskq_test13_func, - &tq_arg, TQ_SLEEP)) == 0) { + "Taskq '%s' function '%s' %s dispatch\n", + tq_arg.name, sym2str(splat_taskq_test13_func), + prealloc ? "prealloc" : "dynamic"); + if (prealloc) { + taskq_dispatch_ent(system_taskq, splat_taskq_test13_func, + &tq_arg, TQ_SLEEP, &tqe); + id = tqe.tqent_id; + } else { + id = taskq_dispatch(system_taskq, splat_taskq_test13_func, + &tq_arg, TQ_SLEEP); + } + + if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test13_func)); @@ -298,6 +391,20 @@ splat_taskq_test3(struct file *file, void *arg) return (tq_arg.flag) ? 0 : -EINVAL; } +static int +splat_taskq_test3(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test3_impl(file, arg, B_FALSE); + if (rc) + return rc; + + rc = splat_taskq_test3_impl(file, arg, B_TRUE); + + return rc; +} + /* * Create a taskq and dispatch a large number of tasks to the queue. * Then use taskq_wait() to block until all the tasks complete, then @@ -319,21 +426,30 @@ splat_taskq_test4_func(void *arg) static int splat_taskq_test4_common(struct file *file, void *arg, int minalloc, - int maxalloc, int nr_tasks) + int maxalloc, int nr_tasks, boolean_t prealloc) { taskq_t *tq; + taskqid_t id; splat_taskq_arg_t tq_arg; + taskq_ent_t *tqes; int i, j, rc = 0; - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' creating " - "(%d/%d/%d)\n", SPLAT_TASKQ_TEST4_NAME, minalloc, maxalloc, - nr_tasks); + tqes = kmalloc(sizeof(*tqes) * nr_tasks, GFP_KERNEL); + if (tqes == NULL) + return -ENOMEM; + + splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, + "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", + SPLAT_TASKQ_TEST4_NAME, + prealloc ? "prealloc" : "dynamic", + minalloc, maxalloc, nr_tasks); if ((tq = taskq_create(SPLAT_TASKQ_TEST4_NAME, 1, maxclsyspri, minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST4_NAME); - return -EINVAL; + rc = -EINVAL; + goto out_free; } tq_arg.file = file; @@ -346,8 +462,18 @@ splat_taskq_test4_common(struct file *file, void *arg, int minalloc, tq_arg.name, sym2str(splat_taskq_test4_func), i); for (j = 0; j < i; j++) { - if ((taskq_dispatch(tq, splat_taskq_test4_func, - &tq_arg, TQ_SLEEP)) == 0) { + taskq_init_ent(&tqes[j]); + + if (prealloc) { + taskq_dispatch_ent(tq, splat_taskq_test4_func, + &tq_arg, TQ_SLEEP, &tqes[j]); + id = tqes[j].tqent_id; + } else { + id = taskq_dispatch(tq, splat_taskq_test4_func, + &tq_arg, TQ_SLEEP); + } + + if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' function '%s' dispatch " "%d failed\n", tq_arg.name, @@ -374,18 +500,36 @@ out: tq_arg.name); taskq_destroy(tq); +out_free: + kfree(tqes); + return rc; } -static int splat_taskq_test4(struct file *file, void *arg) +static int +splat_taskq_test4_impl(struct file *file, void *arg, boolean_t prealloc) { int rc; - rc = splat_taskq_test4_common(file, arg, 50, INT_MAX, 1024); + rc = splat_taskq_test4_common(file, arg, 50, INT_MAX, 1024, prealloc); if (rc) return rc; - rc = splat_taskq_test4_common(file, arg, 1, 1, 32); + rc = splat_taskq_test4_common(file, arg, 1, 1, 32, prealloc); + + return rc; +} + +static int +splat_taskq_test4(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test4_impl(file, arg, B_FALSE); + if (rc) + return rc; + + rc = splat_taskq_test4_impl(file, arg, B_TRUE); return rc; } @@ -498,7 +642,7 @@ splat_taskq_test_order(splat_taskq_arg_t *tq_arg, int *order) } static int -splat_taskq_test5(struct file *file, void *arg) +splat_taskq_test5_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_t *tq; taskqid_t id; @@ -506,10 +650,13 @@ splat_taskq_test5(struct file *file, void *arg) splat_taskq_arg_t tq_arg; int order1[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,0,0,0 }; int order2[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,8,6,7 }; + taskq_ent_t tqes[SPLAT_TASKQ_ORDER_MAX]; int i, rc = 0; - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' creating\n", - SPLAT_TASKQ_TEST5_NAME); + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, + "Taskq '%s' creating (%s dispatch)\n", + SPLAT_TASKQ_TEST5_NAME, + prealloc ? "prealloc" : "dynamic"); if ((tq = taskq_create(SPLAT_TASKQ_TEST5_NAME, 3, maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, @@ -525,11 +672,21 @@ splat_taskq_test5(struct file *file, void *arg) tq_arg.name = SPLAT_TASKQ_TEST5_NAME; for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { + taskq_init_ent(&tqes[i]); + tq_id[i].id = i + 1; tq_id[i].arg = &tq_arg; - if ((id = taskq_dispatch(tq, splat_taskq_test5_func, - &tq_id[i], TQ_SLEEP)) == 0) { + if (prealloc) { + taskq_dispatch_ent(tq, splat_taskq_test5_func, + &tq_id[i], TQ_SLEEP, &tqes[i]); + id = tqes[i].tqent_id; + } else { + id = taskq_dispatch(tq, splat_taskq_test5_func, + &tq_id[i], TQ_SLEEP); + } + + if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test5_func)); @@ -565,6 +722,20 @@ out: return rc; } +static int +splat_taskq_test5(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test5_impl(file, arg, B_FALSE); + if (rc) + return rc; + + rc = splat_taskq_test5_impl(file, arg, B_TRUE); + + return rc; +} + /* * Create a single task queue with three threads. Dispatch 8 tasks, * setting TQ_FRONT on only the last three. Sleep after @@ -624,18 +795,21 @@ splat_taskq_test6_func(void *arg) } static int -splat_taskq_test6(struct file *file, void *arg) +splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_t *tq; taskqid_t id; splat_taskq_id_t tq_id[SPLAT_TASKQ_ORDER_MAX]; splat_taskq_arg_t tq_arg; int order[SPLAT_TASKQ_ORDER_MAX] = { 1,2,3,6,7,8,4,5 }; + taskq_ent_t tqes[SPLAT_TASKQ_ORDER_MAX]; int i, rc = 0; uint_t tflags; - splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' creating\n", - SPLAT_TASKQ_TEST6_NAME); + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, + "Taskq '%s' creating (%s dispatch)\n", + SPLAT_TASKQ_TEST6_NAME, + prealloc ? "prealloc" : "dynamic"); if ((tq = taskq_create(SPLAT_TASKQ_TEST6_NAME, 3, maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, @@ -651,14 +825,24 @@ splat_taskq_test6(struct file *file, void *arg) tq_arg.name = SPLAT_TASKQ_TEST6_NAME; for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { + taskq_init_ent(&tqes[i]); + tq_id[i].id = i + 1; tq_id[i].arg = &tq_arg; tflags = TQ_SLEEP; if (i > 4) tflags |= TQ_FRONT; - if ((id = taskq_dispatch(tq, splat_taskq_test6_func, - &tq_id[i], tflags)) == 0) { + if (prealloc) { + taskq_dispatch_ent(tq, splat_taskq_test6_func, + &tq_id[i], tflags, &tqes[i]); + id = tqes[i].tqent_id; + } else { + id = taskq_dispatch(tq, splat_taskq_test6_func, + &tq_id[i], tflags); + } + + if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test6_func)); @@ -692,6 +876,20 @@ out: return rc; } +static int +splat_taskq_test6(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test6_impl(file, arg, B_FALSE); + if (rc) + return rc; + + rc = splat_taskq_test6_impl(file, arg, B_TRUE); + + return rc; +} + static void splat_taskq_test7_func(void *arg) { @@ -710,8 +908,17 @@ splat_taskq_test7_func(void *arg) tq_arg->name, sym2str(splat_taskq_test7_func), tq_arg->depth); - if ((id = taskq_dispatch(tq_arg->tq, splat_taskq_test7_func, - tq_arg, TQ_SLEEP)) == 0) { + if (tq_arg->tqe) { + VERIFY(taskq_empty_ent(tq_arg->tqe)); + taskq_dispatch_ent(tq_arg->tq, splat_taskq_test7_func, + tq_arg, TQ_SLEEP, tq_arg->tqe); + id = tq_arg->tqe->tqent_id; + } else { + id = taskq_dispatch(tq_arg->tq, splat_taskq_test7_func, + tq_arg, TQ_SLEEP); + } + + if (id == 0) { splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST7_NAME, "Taskq '%s' function '%s' dispatch failed " "(depth = %u)\n", tq_arg->name, @@ -722,13 +929,16 @@ splat_taskq_test7_func(void *arg) } static int -splat_taskq_test7(struct file *file, void *arg) +splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_t *tq; + taskq_ent_t tqe; splat_taskq_arg_t tq_arg; splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' creating\n", SPLAT_TASKQ_TEST7_NAME); + "Taskq '%s' creating (%s dispatch)\n", + SPLAT_TASKQ_TEST7_NAME, + prealloc ? "prealloc" : "dynamic"); if ((tq = taskq_create(SPLAT_TASKQ_TEST7_NAME, 1, maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, @@ -744,6 +954,13 @@ splat_taskq_test7(struct file *file, void *arg) tq_arg.name = SPLAT_TASKQ_TEST7_NAME; tq_arg.tq = tq; + if (prealloc) { + taskq_init_ent(&tqe); + tq_arg.tqe = &tqe; + } else { + tq_arg.tqe = NULL; + } + splat_taskq_test7_func(&tq_arg); if (tq_arg.flag == 0) { @@ -759,6 +976,20 @@ splat_taskq_test7(struct file *file, void *arg) return tq_arg.depth == SPLAT_TASKQ_DEPTH_MAX ? 0 : -EINVAL; } +static int +splat_taskq_test7(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test7_impl(file, arg, B_FALSE); + if (rc) + return rc; + + rc = splat_taskq_test7_impl(file, arg, B_TRUE); + + return rc; +} + splat_subsystem_t * splat_taskq_init(void) { From c2dceb5cd5221f7e1bde915218f5d2cf69920959 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 6 Dec 2011 17:33:51 -0800 Subject: [PATCH 0560/1062] Add make rule for building Arch Linux packages Added the necessary build infrastructure for building packages compatible with the Arch Linux distribution. As such, one can now run: $ ./configure $ make pkg # Alternatively, one can run 'make arch' as well on an Arch Linux machine to create two binary packages compatible with the pacman package manager, one for the spl userland utilties and another for the spl kernel modules. The new packages can then be installed by running: # pacman -U $package.pkg.tar.xz In addition, source-only packages suitable for an Arch Linux chroot environment or remote builder can also be built using the 'sarch' make rule. NOTE: Since the source dist tarball is created on the fly from the head of the build tree, it's MD5 hash signature will be continually influx. As a result, the md5sum variable was intentionally omitted from the PKGBUILD files, and the '--skipinteg' makepkg option is used. This may or may not have any serious security implications, as the source tarball is not being downloaded from an outside source. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes: #68 --- Makefile.am | 1 + Makefile.in | 64 +++++++++++++++++++++++++--- PKGBUILD-spl-modules.in | 23 ++++++++++ PKGBUILD-spl.in | 23 ++++++++++ cmd/Makefile.in | 6 +++ config/arch.am | 40 ++++++++++++++++++ config/spl-build.m4 | 46 ++++++++++++++++++++ configure | 93 ++++++++++++++++++++++++++++++++++------- configure.ac | 2 + include/Makefile.in | 6 +++ lib/Makefile.in | 6 +++ scripts/Makefile.in | 6 +++ 12 files changed, 296 insertions(+), 20 deletions(-) create mode 100644 PKGBUILD-spl-modules.in create mode 100644 PKGBUILD-spl.in create mode 100644 config/arch.am diff --git a/Makefile.am b/Makefile.am index 9f33db7cd..11fa8ec18 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/config/rpm.am include $(top_srcdir)/config/deb.am include $(top_srcdir)/config/tgz.am +include $(top_srcdir)/config/arch.am if CONFIG_USER USER_DIR = lib cmd scripts diff --git a/Makefile.in b/Makefile.in index e47e16f0b..23f20662f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -51,6 +51,12 @@ # ############################################################################### +############################################################################### +# Written by Prakash Surya +############################################################################### +# Build targets for RPM packages. +############################################################################### + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -73,10 +79,12 @@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/PKGBUILD-spl-modules.in $(srcdir)/PKGBUILD-spl.in \ $(srcdir)/spl-modules.spec.in $(srcdir)/spl.spec.in \ - $(srcdir)/spl_config.h.in $(top_srcdir)/config/deb.am \ - $(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \ - $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ + $(srcdir)/spl_config.h.in $(top_srcdir)/config/arch.am \ + $(top_srcdir)/config/deb.am $(top_srcdir)/config/rpm.am \ + $(top_srcdir)/config/tgz.am $(top_srcdir)/configure \ + $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ ChangeLog INSTALL config/config.guess config/config.sub \ @@ -93,7 +101,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = spl_config.h CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ - module/splat/Makefile spl.spec spl-modules.spec + module/splat/Makefile spl.spec spl-modules.spec PKGBUILD-spl \ + PKGBUILD-spl-modules CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -191,6 +200,8 @@ GREP = @GREP@ HAVE_ALIEN = @HAVE_ALIEN@ HAVE_DPKG = @HAVE_DPKG@ HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_MAKEPKG = @HAVE_MAKEPKG@ +HAVE_PACMAN = @HAVE_PACMAN@ HAVE_RPM = @HAVE_RPM@ HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ @@ -215,6 +226,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAKEPKG = @MAKEPKG@ +MAKEPKG_VERSION = @MAKEPKG_VERSION@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -228,6 +241,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACMAN = @PACMAN@ +PACMAN_VERSION = @PACMAN_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RPM = @RPM@ @@ -320,7 +335,7 @@ all: spl_config.h .SUFFIXES: am--refresh: @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(top_srcdir)/config/arch.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -379,6 +394,10 @@ spl.spec: $(top_builddir)/config.status $(srcdir)/spl.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ spl-modules.spec: $(top_builddir)/config.status $(srcdir)/spl-modules.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ +PKGBUILD-spl: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +PKGBUILD-spl-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl-modules.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -955,6 +974,41 @@ tgz-utils: tgz-local rpm-utils tgz: tgz-modules tgz-utils +sarch-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" sarch-common + +sarch-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" sarch-common + +sarch: sarch-modules sarch-utils + +arch-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common + +arch-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common + +arch: arch-modules arch-utils + +arch-local: + @(if test "${HAVE_MAKEPKG}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${MAKEPKG} missing. Please install the\n" \ + "*** package for your distribution which provides ${MAKEPKG},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi;) + +sarch-common: dist + pkgbuild=PKGBUILD-$(pkg); \ + $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ + $(MAKEPKG) --allsource --skipinteg --nodeps -p $$pkgbuild || exit 1; + +arch-common: dist + pkgbuild=PKGBUILD-$(pkg); \ + $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ + $(MAKEPKG) --skipinteg -p $$pkgbuild || exit 1; + distclean-local:: -$(RM) -R autom4te*.cache -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ diff --git a/PKGBUILD-spl-modules.in b/PKGBUILD-spl-modules.in new file mode 100644 index 000000000..a04bd4fcf --- /dev/null +++ b/PKGBUILD-spl-modules.in @@ -0,0 +1,23 @@ +# Maintainer: Prakash Surya +pkgname=@SPL_META_NAME@-modules +pkgver=@SPL_META_VERSION@ +pkgrel=@SPL_META_RELEASE@ +pkgdesc="Contains kernel modules for emulating Solaris style primatives in the linux kernel." +arch=(x86_64) +url="git://github.com/zfsonlinux/spl.git" +license=(@LICENSE@) +source=(@SPL_META_NAME@-@SPL_META_VERSION@.tar.gz) + +build() { + cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ + ./configure --with-config=kernel \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib + make +} + +package() { + cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ + make DESTDIR=$pkgdir install +} diff --git a/PKGBUILD-spl.in b/PKGBUILD-spl.in new file mode 100644 index 000000000..bc27f4626 --- /dev/null +++ b/PKGBUILD-spl.in @@ -0,0 +1,23 @@ +# Maintainer: Prakash Surya +pkgname=@SPL_META_NAME@ +pkgver=@SPL_META_VERSION@ +pkgrel=@SPL_META_RELEASE@ +pkgdesc="Contains the support utilities for the spl." +arch=(x86_64) +url="git://github.com/zfsonlinux/spl.git" +license=(@LICENSE@) +source=(@SPL_META_NAME@-@SPL_META_VERSION@.tar.gz) + +build() { + cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ + ./configure --with-config=user \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib + make +} + +package() { + cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ + make DESTDIR=$pkgdir install +} diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 7f87fb2ec..5d6e0c9f0 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -136,6 +136,8 @@ GREP = @GREP@ HAVE_ALIEN = @HAVE_ALIEN@ HAVE_DPKG = @HAVE_DPKG@ HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_MAKEPKG = @HAVE_MAKEPKG@ +HAVE_PACMAN = @HAVE_PACMAN@ HAVE_RPM = @HAVE_RPM@ HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ @@ -160,6 +162,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAKEPKG = @MAKEPKG@ +MAKEPKG_VERSION = @MAKEPKG_VERSION@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -173,6 +177,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACMAN = @PACMAN@ +PACMAN_VERSION = @PACMAN_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RPM = @RPM@ diff --git a/config/arch.am b/config/arch.am new file mode 100644 index 000000000..591013afd --- /dev/null +++ b/config/arch.am @@ -0,0 +1,40 @@ +############################################################################### +# Written by Prakash Surya +############################################################################### +# Build targets for RPM packages. +############################################################################### + +sarch-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" sarch-common + +sarch-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" sarch-common + +sarch: sarch-modules sarch-utils + +arch-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common + +arch-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common + +arch: arch-modules arch-utils + +arch-local: + @(if test "${HAVE_MAKEPKG}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${MAKEPKG} missing. Please install the\n" \ + "*** package for your distribution which provides ${MAKEPKG},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi;) + +sarch-common: dist + pkgbuild=PKGBUILD-$(pkg); \ + $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ + $(MAKEPKG) --allsource --skipinteg --nodeps -p $$pkgbuild || exit 1; + +arch-common: dist + pkgbuild=PKGBUILD-$(pkg); \ + $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ + $(MAKEPKG) --skipinteg -p $$pkgbuild || exit 1; diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d0bd97cb4..2297937c0 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -297,6 +297,48 @@ AC_DEFUN([SPL_AC_DPKG], [ AC_SUBST(DPKGBUILD_VERSION) ]) +dnl # +dnl # Check for pacman+makepkg to build Arch Linux packages. If these +dnl # tools are missing it is non-fatal but you will not be able to +dnl # build Arch Linux packages and will be warned if you try too. +dnl # +AC_DEFUN([SPL_AC_PACMAN], [ + PACMAN=pacman + MAKEPKG=makepkg + + AC_MSG_CHECKING([whether $PACMAN is available]) + tmp=$($PACMAN --version 2>/dev/null) + AS_IF([test -n "$tmp"], [ + PACMAN_VERSION=$(echo $tmp | + $AWK '/Pacman/ { print $[3] }' | + $SED 's/^v//') + HAVE_PACMAN=yes + AC_MSG_RESULT([$HAVE_PACMAN ($PACMAN_VERSION)]) + ],[ + HAVE_PACMAN=no + AC_MSG_RESULT([$HAVE_PACMAN]) + ]) + + AC_MSG_CHECKING([whether $MAKEPKG is available]) + tmp=$($MAKEPKG --version 2>/dev/null) + AS_IF([test -n "$tmp"], [ + MAKEPKG_VERSION=$(echo $tmp | $AWK '/makepkg/ { print $[3] }') + HAVE_MAKEPKG=yes + AC_MSG_RESULT([$HAVE_MAKEPKG ($MAKEPKG_VERSION)]) + ],[ + HAVE_MAKEPKG=no + AC_MSG_RESULT([$HAVE_MAKEPKG]) + ]) + + AC_SUBST(HAVE_PACMAN) + AC_SUBST(PACMAN) + AC_SUBST(PACMAN_VERSION) + + AC_SUBST(HAVE_MAKEPKG) + AC_SUBST(MAKEPKG) + AC_SUBST(MAKEPKG_VERSION) +]) + dnl # dnl # Until native packaging for various different packing systems dnl # can be added the least we can do is attempt to use alien to @@ -341,6 +383,8 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ VENDOR=slackware ; elif test -f /etc/gentoo-release ; then VENDOR=gentoo ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; else VENDOR= ; fi @@ -355,6 +399,7 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ ubuntu) DEFAULT_PACKAGE=deb ;; debian) DEFAULT_PACKAGE=deb ;; slackware) DEFAULT_PACKAGE=tgz ;; + arch) DEFAULT_PACKAGE=arch;; *) DEFAULT_PACKAGE=rpm ;; esac @@ -369,6 +414,7 @@ AC_DEFUN([SPL_AC_PACKAGE], [ SPL_AC_RPM SPL_AC_DPKG SPL_AC_ALIEN + SPL_AC_PACMAN SPL_AC_DEFAULT_PACKAGE ]) diff --git a/configure b/configure index 901a91262..0546de457 100755 --- a/configure +++ b/configure @@ -801,6 +801,12 @@ LINUX SPL_CONFIG DEFAULT_PACKAGE VENDOR +MAKEPKG_VERSION +MAKEPKG +HAVE_MAKEPKG +PACMAN_VERSION +PACMAN +HAVE_PACMAN ALIEN_VERSION ALIEN HAVE_ALIEN @@ -4777,13 +4783,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4780: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4786: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4783: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4789: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4786: output\"" >&5) + (eval echo "\"\$as_me:4792: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5989,7 +5995,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5992 "configure"' > conftest.$ac_ext + echo '#line 5998 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7842,11 +7848,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7845: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7851: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7849: \$? = $ac_status" >&5 + echo "$as_me:7855: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8181,11 +8187,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8184: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8190: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8188: \$? = $ac_status" >&5 + echo "$as_me:8194: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8286,11 +8292,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8289: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8295: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8293: \$? = $ac_status" >&5 + echo "$as_me:8299: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8341,11 +8347,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8344: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8350: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8348: \$? = $ac_status" >&5 + echo "$as_me:8354: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11144,7 +11150,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11147 "configure" +#line 11153 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11240,7 +11246,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11243 "configure" +#line 11249 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11601,6 +11607,58 @@ fi + PACMAN=pacman + MAKEPKG=makepkg + + { $as_echo "$as_me:$LINENO: checking whether $PACMAN is available" >&5 +$as_echo_n "checking whether $PACMAN is available... " >&6; } + tmp=$($PACMAN --version 2>/dev/null) + if test -n "$tmp"; then + + PACMAN_VERSION=$(echo $tmp | + $AWK '/Pacman/ { print $3 }' | + $SED 's/^v//') + HAVE_PACMAN=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN ($PACMAN_VERSION)" >&5 +$as_echo "$HAVE_PACMAN ($PACMAN_VERSION)" >&6; } + +else + + HAVE_PACMAN=no + { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN" >&5 +$as_echo "$HAVE_PACMAN" >&6; } + +fi + + + { $as_echo "$as_me:$LINENO: checking whether $MAKEPKG is available" >&5 +$as_echo_n "checking whether $MAKEPKG is available... " >&6; } + tmp=$($MAKEPKG --version 2>/dev/null) + if test -n "$tmp"; then + + MAKEPKG_VERSION=$(echo $tmp | $AWK '/makepkg/ { print $3 }') + HAVE_MAKEPKG=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&5 +$as_echo "$HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&6; } + +else + + HAVE_MAKEPKG=no + { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG" >&5 +$as_echo "$HAVE_MAKEPKG" >&6; } + +fi + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 $as_echo_n "checking linux distribution... " >&6; } if test -f /etc/redhat-release ; then @@ -11617,6 +11675,8 @@ $as_echo_n "checking linux distribution... " >&6; } VENDOR=slackware ; elif test -f /etc/gentoo-release ; then VENDOR=gentoo ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; else VENDOR= ; fi @@ -11633,6 +11693,7 @@ $as_echo_n "checking default package type... " >&6; } ubuntu) DEFAULT_PACKAGE=deb ;; debian) DEFAULT_PACKAGE=deb ;; slackware) DEFAULT_PACKAGE=tgz ;; + arch) DEFAULT_PACKAGE=arch;; *) DEFAULT_PACKAGE=rpm ;; esac @@ -20228,7 +20289,7 @@ fi -ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec" +ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules" cat >confcache <<\_ACEOF @@ -21147,6 +21208,8 @@ do "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "spl.spec") CONFIG_FILES="$CONFIG_FILES spl.spec" ;; "spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; + "PKGBUILD-spl") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl" ;; + "PKGBUILD-spl-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl-modules" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/configure.ac b/configure.ac index b09e31fd7..774f6f81a 100644 --- a/configure.ac +++ b/configure.ac @@ -56,6 +56,8 @@ AC_CONFIG_FILES([ scripts/Makefile spl.spec spl-modules.spec + PKGBUILD-spl + PKGBUILD-spl-modules ]) AC_OUTPUT diff --git a/include/Makefile.in b/include/Makefile.in index 823f50d4e..832ffb38d 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -95,6 +95,8 @@ GREP = @GREP@ HAVE_ALIEN = @HAVE_ALIEN@ HAVE_DPKG = @HAVE_DPKG@ HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_MAKEPKG = @HAVE_MAKEPKG@ +HAVE_PACMAN = @HAVE_PACMAN@ HAVE_RPM = @HAVE_RPM@ HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ @@ -119,6 +121,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAKEPKG = @MAKEPKG@ +MAKEPKG_VERSION = @MAKEPKG_VERSION@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -132,6 +136,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACMAN = @PACMAN@ +PACMAN_VERSION = @PACMAN_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RPM = @RPM@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 8c363b924..4fdae68e2 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -128,6 +128,8 @@ GREP = @GREP@ HAVE_ALIEN = @HAVE_ALIEN@ HAVE_DPKG = @HAVE_DPKG@ HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_MAKEPKG = @HAVE_MAKEPKG@ +HAVE_PACMAN = @HAVE_PACMAN@ HAVE_RPM = @HAVE_RPM@ HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ @@ -152,6 +154,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAKEPKG = @MAKEPKG@ +MAKEPKG_VERSION = @MAKEPKG_VERSION@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -165,6 +169,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACMAN = @PACMAN@ +PACMAN_VERSION = @PACMAN_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RPM = @RPM@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 07d181c52..d007d0bd8 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -90,6 +90,8 @@ GREP = @GREP@ HAVE_ALIEN = @HAVE_ALIEN@ HAVE_DPKG = @HAVE_DPKG@ HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ +HAVE_MAKEPKG = @HAVE_MAKEPKG@ +HAVE_PACMAN = @HAVE_PACMAN@ HAVE_RPM = @HAVE_RPM@ HAVE_RPMBUILD = @HAVE_RPMBUILD@ INSTALL = @INSTALL@ @@ -114,6 +116,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAKEPKG = @MAKEPKG@ +MAKEPKG_VERSION = @MAKEPKG_VERSION@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -127,6 +131,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACMAN = @PACMAN@ +PACMAN_VERSION = @PACMAN_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RPM = @RPM@ From e7e5f78e7bf6dc86337483f4d9f01becc017d185 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 16 Dec 2011 09:44:31 -0800 Subject: [PATCH 0561/1062] Swap taskq_ent_t with taskqid_t in taskq_thread_t The taskq_t's active thread list is sorted based on its tqt_ent->tqent_id field. The list is kept sorted solely by inserting new taskq_thread_t's in their correct sorted location; no other means is used. This means that once inserted, if a taskq_thread_t's tqt_ent->tqent_id field changes, the list runs the risk of no longer being sorted. Prior to the introduction of the taskq_dispatch_prealloc() interface, this was not a problem as a taskq_ent_t actively being serviced under the old interface should always have a static tqent_id field. Thus, once the taskq_thread_t is added to the taskq_t's active thread list, the taskq_thread_t's tqt_ent->tqent_id field would remain constant. Now, this is no longer the case. Currently, if using the taskq_dispatch_prealloc() interface, any given taskq_ent_t actively being serviced _may_ have its tqent_id value incremented. This happens when the preallocated taskq_ent_t structure is recursively dispatched. Thus, a taskq_thread_t could potentially have its tqt_ent->tqent_id field silently modified from under its feet. If this were to happen to a taskq_thread_t on a taskq_t's active thread list, this would compromise the integrity of the order of the list (as the list _may_ no longer be sorted). To get around this, the taskq_thread_t's taskq_ent_t pointer was replaced with its own static copy of the tqent_id. So, as a taskq_ent_t is pulled off of the taskq_t's pending list, a static copy of its tqent_id is made and this copy is used to sort the active thread list. Using a static copy is key in ensuring the integrity of the order of the active thread list. Even if the underlying taskq_ent_t is recursively dispatched (as has its tqent_id modified), this static copy stored inside the taskq_thread_t will remain constant. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #71 --- include/sys/taskq.h | 2 +- module/spl/spl-taskq.c | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 54d869afe..0a7143375 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -96,7 +96,7 @@ typedef struct taskq_thread { struct list_head tqt_active_list; struct task_struct *tqt_thread; taskq_t *tqt_tq; - taskq_ent_t *tqt_ent; + taskqid_t tqt_id; } taskq_thread_t; /* Global system-wide dynamic task queue available for all consumers */ diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index b2b0e6ca8..ccb713c20 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -393,8 +393,8 @@ taskq_lowest_id(taskq_t *tq) if (!list_empty(&tq->tq_active_list)) { tqt = list_entry(tq->tq_active_list.next, taskq_thread_t, tqt_active_list); - ASSERT(tqt->tqt_ent != NULL); - lowest_id = MIN(lowest_id, tqt->tqt_ent->tqent_id); + ASSERT(tqt->tqt_id != 0); + lowest_id = MIN(lowest_id, tqt->tqt_id); } SRETURN(lowest_id); @@ -417,7 +417,7 @@ taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) list_for_each_prev(l, &tq->tq_active_list) { w = list_entry(l, taskq_thread_t, tqt_active_list); - if (w->tqt_ent->tqent_id < tqt->tqt_ent->tqent_id) { + if (w->tqt_id < tqt->tqt_id) { list_add(&tqt->tqt_active_list, l); break; } @@ -433,7 +433,6 @@ taskq_thread(void *args) { DECLARE_WAITQUEUE(wait, current); sigset_t blocked; - taskqid_t id; taskq_thread_t *tqt = args; taskq_t *tq; taskq_ent_t *t; @@ -484,8 +483,7 @@ taskq_thread(void *args) /* In order to support recursively dispatching a * preallocated taskq_ent_t, tqent_id must be * stored prior to executing tqent_func. */ - id = t->tqent_id; - tqt->tqt_ent = t; + tqt->tqt_id = t->tqent_id; taskq_insert_in_order(tq, tqt); tq->tq_nactive++; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -496,16 +494,16 @@ taskq_thread(void *args) spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); - tqt->tqt_ent = NULL; task_done(tq, t); /* When the current lowest outstanding taskqid is * done calculate the new lowest outstanding id */ - if (tq->tq_lowest_id == id) { + if (tq->tq_lowest_id == tqt->tqt_id) { tq->tq_lowest_id = taskq_lowest_id(tq); - ASSERT(tq->tq_lowest_id > id); + ASSERT3S(tq->tq_lowest_id, >, tqt->tqt_id); } + tqt->tqt_id = 0; wake_up_all(&tq->tq_wait_waitq); } @@ -582,7 +580,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, INIT_LIST_HEAD(&tqt->tqt_thread_list); INIT_LIST_HEAD(&tqt->tqt_active_list); tqt->tqt_tq = tq; - tqt->tqt_ent = NULL; + tqt->tqt_id = 0; tqt->tqt_thread = kthread_create(taskq_thread, tqt, "%s/%d", name, i); From 8f2503e0af490ea253d6db1a15b4901437171cc1 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 16 Dec 2011 14:57:31 -0800 Subject: [PATCH 0562/1062] Store copy of tqent_flags prior to servicing task A preallocated taskq_ent_t's tqent_flags must be checked prior to servicing the taskq_ent_t. Once a preallocated taskq entry is serviced, the ownership of the entry is handed back to the caller of taskq_dispatch, thus the entry's contents can potentially be mangled. In particular, this is a problem in the case where a preallocated taskq entry is serviced, and the caller clears it's tqent_flags field. Thus, when the function returns and task_done is called, it looks as though the entry is **not** a preallocated task (when in fact it **is** a preallocated task). In this situation, task_done will place the preallocated taskq_ent_t structure onto the taskq_t's free list. This is a **huge** mistake. If the taskq_ent_t is then freed by the caller of taskq_dispatch, the taskq_t's free list will hold a pointer to garbage data. Even worse, if nothing has over written the freed memory before the pointer is dereferenced, it may still look as though it points to a valid list_head belonging to a taskq_ent_t structure. Thus, the task entry's flags are now copied prior to servicing the task. This copy is then checked to see if it is a preallocated task, and determine if the entry needs to be passed down to the task_done function. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #71 --- include/sys/taskq.h | 1 + module/spl/spl-taskq.c | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 0a7143375..fec4de8ca 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -97,6 +97,7 @@ typedef struct taskq_thread { struct task_struct *tqt_thread; taskq_t *tqt_tq; taskqid_t tqt_id; + uintptr_t tqt_flags; } taskq_thread_t; /* Global system-wide dynamic task queue available for all consumers */ diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index ccb713c20..ece99aad6 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -135,11 +135,6 @@ task_done(taskq_t *tq, taskq_ent_t *t) ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); - /* For prealloc'd tasks, we don't free anything. */ - if ((!(tq->tq_flags & TASKQ_DYNAMIC)) && - (t->tqent_flags & TQENT_FLAG_PREALLOC)) - return; - list_del_init(&t->tqent_list); if (tq->tq_nalloc <= tq->tq_minalloc) { @@ -147,6 +142,7 @@ task_done(taskq_t *tq, taskq_ent_t *t) t->tqent_func = NULL; t->tqent_arg = NULL; t->tqent_flags = 0; + list_add_tail(&t->tqent_list, &tq->tq_free_list); } else { task_free(tq, t); @@ -480,10 +476,19 @@ taskq_thread(void *args) if (pend_list) { t = list_entry(pend_list->next, taskq_ent_t, tqent_list); list_del_init(&t->tqent_list); + /* In order to support recursively dispatching a * preallocated taskq_ent_t, tqent_id must be * stored prior to executing tqent_func. */ tqt->tqt_id = t->tqent_id; + + /* We must store a copy of the flags prior to + * servicing the task (servicing a prealloc'd task + * returns the ownership of the tqent back to + * the caller of taskq_dispatch). Thus, + * tqent_flags _may_ change within the call. */ + tqt->tqt_flags = t->tqent_flags; + taskq_insert_in_order(tq, tqt); tq->tq_nactive++; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -494,7 +499,11 @@ taskq_thread(void *args) spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); - task_done(tq, t); + + /* For prealloc'd tasks, we don't free anything. */ + if ((tq->tq_flags & TASKQ_DYNAMIC) || + !(tqt->tqt_flags & TQENT_FLAG_PREALLOC)) + task_done(tq, t); /* When the current lowest outstanding taskqid is * done calculate the new lowest outstanding id */ @@ -504,6 +513,7 @@ taskq_thread(void *args) } tqt->tqt_id = 0; + tqt->tqt_flags = 0; wake_up_all(&tq->tq_wait_waitq); } From cd2817f8a6a3c0f7675c3ce954800c29eade5319 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 16 Dec 2011 22:16:47 -0800 Subject: [PATCH 0563/1062] Move Arch Linux's VENDOR check above Ubuntu's If the lsb-release package is installed on an Arch Linux distribution, the configure step will incorrectly detect the running distribution as Ubuntu. This is a result of both distributions providing an /etc/lsb-release file, and the Ubuntu VENDOR check being performed first. Since the Arch Linux test check's for a file more specific to the Arch Linux distribution, moving Arch Linux's VENDOR check above Unbuntu's check provides a quick and easy solution. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #72 --- config/spl-build.m4 | 4 ++-- configure | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2297937c0..7b6653559 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -373,6 +373,8 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ VENDOR=redhat ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; elif test -f /etc/lsb-release ; then VENDOR=ubuntu ; elif test -f /etc/debian_version ; then @@ -383,8 +385,6 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ VENDOR=slackware ; elif test -f /etc/gentoo-release ; then VENDOR=gentoo ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; else VENDOR= ; fi diff --git a/configure b/configure index 0546de457..fc27ad183 100755 --- a/configure +++ b/configure @@ -11665,6 +11665,8 @@ $as_echo_n "checking linux distribution... " >&6; } VENDOR=redhat ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; elif test -f /etc/lsb-release ; then VENDOR=ubuntu ; elif test -f /etc/debian_version ; then @@ -11675,8 +11677,6 @@ $as_echo_n "checking linux distribution... " >&6; } VENDOR=slackware ; elif test -f /etc/gentoo-release ; then VENDOR=gentoo ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; else VENDOR= ; fi From 5f6c14b1eda9c7b47d11a3b90e78dea6a7f429e0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Dec 2011 14:22:45 -0800 Subject: [PATCH 0564/1062] Proxmox VE kernel compat, invalidate_inodes() The Proxmox VE kernel contains a patch which renames the function invalidate_inodes() to invalidate_inodes_check(). In the process it adds a 'check' argument and a '#define invalidate_inodes(x)' compatibility wrapper for legacy callers. Therefore, if either of these functions are exported invalidate_inodes() can be safely used. Signed-off-by: Brian Behlendorf Closes #58 --- config/spl-build.m4 | 13 +++++++ configure | 78 +++++++++++++++++++++++++++++++++++++++ include/linux/mm_compat.h | 4 +- module/spl/spl-kmem.c | 8 ++-- spl_config.h.in | 3 ++ 5 files changed, 100 insertions(+), 6 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7b6653559..90ff68084 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1816,6 +1816,13 @@ dnl # The function invalidate_inodes() is no longer exported by the kernel. dnl # The prototype however is still available which means it is safe dnl # to acquire the symbol's address using spl_kallsyms_lookup_name(). dnl # +dnl # The Proxmox VE kernel contains a patch which renames the function +dnl # invalidate_inodes() to invalidate_inodes_check(). In the process +dnl # it adds a 'check' argument and a '#define invalidate_inodes(x)' +dnl # compatibility wrapper for legacy callers. Therefore, if either +dnl # of these functions are exported invalidate_inodes() can be +dnl # safely used. +dnl # AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ SPL_CHECK_SYMBOL_EXPORT( [invalidate_inodes], @@ -1823,6 +1830,12 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ [AC_DEFINE(HAVE_INVALIDATE_INODES, 1, [invalidate_inodes() is available])], []) + SPL_CHECK_SYMBOL_EXPORT( + [invalidate_inodes_check], + [], + [AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1, + [invalidate_inodes_check() is available])], + []) ]) dnl # diff --git a/configure b/configure index fc27ad183..9d95d7654 100755 --- a/configure +++ b/configure @@ -15638,6 +15638,45 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes_check is exported" >&5 +$as_echo_n "checking whether symbol invalidate_inodes_check is exported... " >&6; } + grep -q -E '[[:space:]]invalidate_inodes_check[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes_check)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES_CHECK 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES_CHECK 1 +_ACEOF + + fi + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5 $as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; } @@ -19908,6 +19947,45 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes_check is exported" >&5 +$as_echo_n "checking whether symbol invalidate_inodes_check is exported... " >&6; } + grep -q -E '[[:space:]]invalidate_inodes_check[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes_check)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES_CHECK 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INVALIDATE_INODES_CHECK 1 +_ACEOF + + fi + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5 $as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; } diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index b375f9b39..14fc3d7bb 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -54,7 +54,7 @@ * As for 2.6.39 invalidate_inodes() was updated to take a second * argument which controls how dirty inodes should be handled. */ -#ifdef HAVE_INVALIDATE_INODES +#if defined(HAVE_INVALIDATE_INODES) || defined(HAVE_INVALIDATE_INODES_CHECK) # ifdef HAVE_2ARGS_INVALIDATE_INODES # define spl_invalidate_inodes(sb, kd) invalidate_inodes(sb, kd) # else @@ -70,7 +70,7 @@ typedef int (*invalidate_inodes_t)(struct super_block *sb); extern invalidate_inodes_t invalidate_inodes_fn; # define spl_invalidate_inodes(sb, kd) invalidate_inodes_fn(sb) # endif /* HAVE_2ARGS_INVALIDATE_INODES */ -#endif /* HAVE_INVALIDATE_INODES */ +#endif /* HAVE_INVALIDATE_INODES || HAVE_INVALIDATE_INODES_CHECK */ #if !defined(HAVE_SHRINK_CONTROL_STRUCT) struct shrink_control { diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 1d2fa9053..5a6011ad6 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -180,10 +180,10 @@ spl_global_page_state(spl_zone_stat_item_t item) #endif /* NEED_GET_ZONE_COUNTS */ EXPORT_SYMBOL(spl_global_page_state); -#ifndef HAVE_INVALIDATE_INODES +#if !defined(HAVE_INVALIDATE_INODES) && !defined(HAVE_INVALIDATE_INODES_CHECK) invalidate_inodes_t invalidate_inodes_fn = SYMBOL_POISON; EXPORT_SYMBOL(invalidate_inodes_fn); -#endif /* HAVE_INVALIDATE_INODES */ +#endif /* !HAVE_INVALIDATE_INODES && !HAVE_INVALIDATE_INODES_CHECK */ #ifndef HAVE_SHRINK_DCACHE_MEMORY shrink_dcache_memory_t shrink_dcache_memory_fn = SYMBOL_POISON; @@ -2113,14 +2113,14 @@ spl_kmem_init_kallsyms_lookup(void) */ spl_kmem_init_globals(); -#ifndef HAVE_INVALIDATE_INODES +#if !defined(HAVE_INVALIDATE_INODES) && !defined(HAVE_INVALIDATE_INODES_CHECK) invalidate_inodes_fn = (invalidate_inodes_t) spl_kallsyms_lookup_name("invalidate_inodes"); if (!invalidate_inodes_fn) { printk(KERN_ERR "Error: Unknown symbol invalidate_inodes\n"); return -EFAULT; } -#endif /* HAVE_INVALIDATE_INODES */ +#endif /* !HAVE_INVALIDATE_INODES && !HAVE_INVALIDATE_INODES_CHECK */ #ifndef HAVE_SHRINK_DCACHE_MEMORY /* When shrink_dcache_memory_fn == NULL support is disabled */ diff --git a/spl_config.h.in b/spl_config.h.in index 08b43426d..94e28e70d 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -111,6 +111,9 @@ /* invalidate_inodes() is available */ #undef HAVE_INVALIDATE_INODES +/* invalidate_inodes_check() is available */ +#undef HAVE_INVALIDATE_INODES_CHECK + /* kallsyms_lookup_name() is available */ #undef HAVE_KALLSYMS_LOOKUP_NAME From 588d900433b03e33e4bbbfee7309bd15f71148fb Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Wed, 11 Jan 2012 11:44:34 -0600 Subject: [PATCH 0565/1062] Linux 3.2 compat: rw_semaphore.wait_lock is raw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wait_lock member of the rw_semaphore struct became a raw_spinlock_t in Linux 3.2 at torvalds/linux@ddb6c9b58a19edcfac93ac670b066c836ff729f1. Wrap spin_lock_* function calls in a new spl_rwsem_* interface to ensure type safety if raw_spinlock_t becomes architecture specific, and to satisfy these compiler warnings: warning: passing argument 1 of ‘spinlock_check’ from incompatible pointer type [enabled by default] note: expected ‘struct spinlock_t *’ but argument is of type ‘struct raw_spinlock_t *’ Signed-off-by: Brian Behlendorf Closes: #76 Closes: zfsonlinux/zfs#463 --- config/spl-build.m4 | 27 +++++++ configure | 140 +++++++++++++++++++++++++++++++++++ include/linux/rwsem_compat.h | 36 +++++++-- include/sys/rwlock.h | 16 ++-- spl_config.h.in | 3 + 5 files changed, 206 insertions(+), 16 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 90ff68084..27b2c4298 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -85,6 +85,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERN_PATH_PARENT_SYMBOL SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT + SPL_AC_RWSEM_SPINLOCK_IS_RAW ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1973,3 +1974,29 @@ AC_DEFUN([SPL_AC_SHRINK_CONTROL_STRUCT], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 3.1 API Change +dnl # +dnl # The rw_semaphore.wait_lock member was changed from spinlock_t to +dnl # raw_spinlock_t at commit ddb6c9b58a19edcfac93ac670b066c836ff729f1. +dnl # +AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ + AC_MSG_CHECKING([whether struct rw_semaphore member wait_lock is raw]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + raw_spinlock_t dummy_lock __attribute__ ((unused)); + dummy_semaphore.wait_lock = dummy_lock; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(RWSEM_SPINLOCK_IS_RAW, 1, + [struct rw_semaphore member wait_lock is raw_spinlock_t]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/configure b/configure index 9d95d7654..621773d9d 100755 --- a/configure +++ b/configure @@ -16025,6 +16025,76 @@ fi + + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5 +$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + raw_spinlock_t dummy_lock __attribute__ ((unused)); + dummy_semaphore.wait_lock = dummy_lock; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define RWSEM_SPINLOCK_IS_RAW 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + ;; user) ;; all) @@ -20335,6 +20405,76 @@ fi + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5 +$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + raw_spinlock_t dummy_lock __attribute__ ((unused)); + dummy_semaphore.wait_lock = dummy_lock; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define RWSEM_SPINLOCK_IS_RAW 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + ;; srpm) ;; *) diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index 67a82bb44..fe69f0154 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -27,6 +27,26 @@ #include +#ifdef RWSEM_SPINLOCK_IS_RAW +#define spl_rwsem_lock_irqsave(lock, flags) \ +({ \ + raw_spin_lock_irqsave(lock, flags); \ +}) +#define spl_rwsem_unlock_irqrestore(lock, flags) \ +({ \ + raw_spin_unlock_irqrestore(lock, flags); \ +}) +#else +#define spl_rwsem_lock_irqsave(lock, flags) \ +({ \ + spin_lock_irqsave(lock, flags); \ +}) +#define spl_rwsem_unlock_irqrestore(lock, flags) \ +({ \ + spin_unlock_irqrestore(lock, flags); \ +}) +#endif /* RWSEM_SPINLOCK_IS_RAW */ + #ifdef RWSEM_IS_LOCKED_TAKES_WAIT_LOCK /* * A race condition in rwsem_is_locked() was fixed in Linux 2.6.33 and the fix @@ -48,14 +68,14 @@ #else -#define spl_rwsem_is_locked(rwsem) \ -({ \ - unsigned long _flags_; \ - int _rc_; \ - spin_lock_irqsave(&rwsem->wait_lock, _flags_); \ - _rc_ = rwsem_is_locked(rwsem); \ - spin_unlock_irqrestore(&rwsem->wait_lock, _flags_); \ - _rc_; \ +#define spl_rwsem_is_locked(rwsem) \ +({ \ + unsigned long _flags_; \ + int _rc_; \ + spl_rwsem_lock_irqsave(&rwsem->wait_lock, _flags_); \ + _rc_ = rwsem_is_locked(rwsem); \ + spl_rwsem_unlock_irqrestore(&rwsem->wait_lock, _flags_); \ + _rc_; \ }) #endif /* RWSEM_IS_LOCKED_TAKES_WAIT_LOCK */ diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 3d9808599..9d29ad679 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -52,9 +52,9 @@ spl_rw_set_owner(krwlock_t *rwp) { unsigned long flags; - spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, flags); rwp->rw_owner = current; - spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); } static inline void @@ -62,9 +62,9 @@ spl_rw_clear_owner(krwlock_t *rwp) { unsigned long flags; - spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, flags); rwp->rw_owner = NULL; - spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); } static inline kthread_t * @@ -73,9 +73,9 @@ rw_owner(krwlock_t *rwp) unsigned long flags; kthread_t *owner; - spin_lock_irqsave(&SEM(rwp)->wait_lock, flags); + spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, flags); owner = rwp->rw_owner; - spin_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); return owner; } @@ -187,14 +187,14 @@ extern int __down_write_trylock_locked(struct rw_semaphore *); unsigned long _flags_; \ int _rc_ = 0; \ \ - spin_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ + spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ if ((list_empty(&SEM(rwp)->wait_list)) && \ (SEM(rwp)->activity == 1)) { \ __up_read_locked(SEM(rwp)); \ VERIFY(_rc_ = __down_write_trylock_locked(SEM(rwp))); \ (rwp)->rw_owner = current; \ } \ - spin_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ + spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ _rc_; \ }) #else diff --git a/spl_config.h.in b/spl_config.h.in index 94e28e70d..847da2137 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -271,6 +271,9 @@ /* rwsem_is_locked() acquires sem->wait_lock */ #undef RWSEM_IS_LOCKED_TAKES_WAIT_LOCK +/* struct rw_semaphore member wait_lock is raw_spinlock_t */ +#undef RWSEM_SPINLOCK_IS_RAW + /* Define the project alias string. */ #undef SPL_META_ALIAS From 0b14b9f32729f0e4b2c9da8b19a2bd848781d683 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 13 Jan 2012 09:08:12 -0800 Subject: [PATCH 0566/1062] Run SPL_AC_PACMAN only if $VENDOR is "arch" Unfortunately, Arch's package manager `pacman` shares it's name with a popular arcade video game. Thus, in order to refrain from executing the video game when we mean to execute the package manager, SPL_AC_PACMAN is now only run when $VENDOR is determined to be "arch". Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#517 --- config/spl-build.m4 | 5 ++- configure | 92 +++++++++++++++++++++++---------------------- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 27b2c4298..a20ee38d1 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -412,11 +412,12 @@ dnl # dnl # Default SPL user configuration dnl # AC_DEFUN([SPL_AC_PACKAGE], [ + SPL_AC_DEFAULT_PACKAGE SPL_AC_RPM SPL_AC_DPKG SPL_AC_ALIEN - SPL_AC_PACMAN - SPL_AC_DEFAULT_PACKAGE + + AS_IF([test "$VENDOR" = "arch"], [SPL_AC_PACMAN]) ]) AC_DEFUN([SPL_AC_LICENSE], [ diff --git a/configure b/configure index 621773d9d..7b93f564f 100755 --- a/configure +++ b/configure @@ -799,8 +799,6 @@ LINUX_VERSION LINUX_OBJ LINUX SPL_CONFIG -DEFAULT_PACKAGE -VENDOR MAKEPKG_VERSION MAKEPKG HAVE_MAKEPKG @@ -822,6 +820,8 @@ HAVE_RPMBUILD RPM_VERSION RPM HAVE_RPM +DEFAULT_PACKAGE +VENDOR LICENSE CPP OTOOL64 @@ -11485,6 +11485,49 @@ $as_echo "$LICENSE" >&6; } + { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 +$as_echo_n "checking linux distribution... " >&6; } + if test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/fedora-release ; then + VENDOR=fedora ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; + elif test -f /etc/SuSE-release ; then + VENDOR=sles ; + elif test -f /etc/slackware-version ; then + VENDOR=slackware ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; + else + VENDOR= ; + fi + { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 +$as_echo "$VENDOR" >&6; } + + + { $as_echo "$as_me:$LINENO: checking default package type" >&5 +$as_echo_n "checking default package type... " >&6; } + case "$VENDOR" in + fedora) DEFAULT_PACKAGE=rpm ;; + redhat) DEFAULT_PACKAGE=rpm ;; + sles) DEFAULT_PACKAGE=rpm ;; + ubuntu) DEFAULT_PACKAGE=deb ;; + debian) DEFAULT_PACKAGE=deb ;; + slackware) DEFAULT_PACKAGE=tgz ;; + arch) DEFAULT_PACKAGE=arch;; + *) DEFAULT_PACKAGE=rpm ;; + esac + + { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 +$as_echo "$DEFAULT_PACKAGE" >&6; } + + + RPM=rpm RPMBUILD=rpmbuild @@ -11607,6 +11650,8 @@ fi + if test "$VENDOR" = "arch"; then + PACMAN=pacman MAKEPKG=makepkg @@ -11658,48 +11703,7 @@ fi - - { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 -$as_echo_n "checking linux distribution... " >&6; } - if test -f /etc/redhat-release ; then - VENDOR=redhat ; - elif test -f /etc/fedora-release ; then - VENDOR=fedora ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; - elif test -f /etc/SuSE-release ; then - VENDOR=sles ; - elif test -f /etc/slackware-version ; then - VENDOR=slackware ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; - else - VENDOR= ; - fi - { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 -$as_echo "$VENDOR" >&6; } - - - { $as_echo "$as_me:$LINENO: checking default package type" >&5 -$as_echo_n "checking default package type... " >&6; } - case "$VENDOR" in - fedora) DEFAULT_PACKAGE=rpm ;; - redhat) DEFAULT_PACKAGE=rpm ;; - sles) DEFAULT_PACKAGE=rpm ;; - ubuntu) DEFAULT_PACKAGE=deb ;; - debian) DEFAULT_PACKAGE=deb ;; - slackware) DEFAULT_PACKAGE=tgz ;; - arch) DEFAULT_PACKAGE=arch;; - *) DEFAULT_PACKAGE=rpm ;; - esac - - { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 -$as_echo "$DEFAULT_PACKAGE" >&6; } - +fi From 966e5200d35a2c38cdb9e14bfaf698a10b31603b Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Fri, 13 Jan 2012 22:20:07 -0600 Subject: [PATCH 0567/1062] Fix `make distclean` for `--with-config=user` Apply the same fix to SPL that was applied to ZFS earlier at: zfsonlinux/zfs@d433c206515e567c52ce09589033405a0ae3716e Additionally quote @LINUX_SYMBOLS@ because it is a null substitution in this configuration, which results in a `[ -f ]` expression that incorrectly evaluates to true. # ./configure --with-config=user # make distclean Making distclean in module make[1]: Entering directory `/spl/module' make -C SUBDIRS=`pwd` clean make: Entering an unknown directory make: *** SUBDIRS=/spl/module: No such file or directory. Stop. Signed-off-by: Brian Behlendorf --- module/Makefile.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/Makefile.in b/module/Makefile.in index 355089aeb..0a7fd02a3 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -7,8 +7,11 @@ modules: $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ clean: - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ - if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi + @# Only cleanup the kernel build directories when CONFIG_KERNEL + @# is defined. This indicates that kernel modules should be built. +@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + + if [ -f '@LINUX_SYMBOLS@' ]; then $(RM) '@LINUX_SYMBOLS@'; fi if [ -f Module.markers ]; then $(RM) Module.markers; fi modules_install: From cf5d23fa1e953db970b04f593f83d7ffa9e9e0df Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Tue, 17 Jan 2012 14:23:58 -0800 Subject: [PATCH 0568/1062] Add taskq contention splat test Add a test designed to generate contention on the taskq spinlock by using a large number of threads (100) to perform a large number (131072) of trivial work items from a single queue. This simulates conditions that may occur with the zio free taskq when a 1TB file is removed from a ZFS filesystem, for example. This test should always pass. Its purpose is to provide a benchmark to easily measure the effectiveness of taskq optimizations using statistics from the kernel lock profiler. Signed-off-by: Brian Behlendorf Issue #32 --- module/splat/splat-taskq.c | 115 +++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index b89b495f1..73142f9b6 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -57,9 +57,14 @@ #define SPLAT_TASKQ_TEST7_NAME "recurse" #define SPLAT_TASKQ_TEST7_DESC "Single task queue, recursive dispatch" +#define SPLAT_TASKQ_TEST8_ID 0x0208 +#define SPLAT_TASKQ_TEST8_NAME "contention" +#define SPLAT_TASKQ_TEST8_DESC "1 queue, 100 threads, 131072 tasks" + #define SPLAT_TASKQ_ORDER_MAX 8 #define SPLAT_TASKQ_DEPTH_MAX 16 + typedef struct splat_taskq_arg { int flag; int id; @@ -990,6 +995,113 @@ splat_taskq_test7(struct file *file, void *arg) return rc; } +/* + * Create a taskq with 100 threads and dispatch a huge number of trivial + * tasks to generate contention on tq->tq_lock. This test should always + * pass. The purpose is to provide a benchmark for measuring the + * effectiveness of taskq optimizations. + */ +static void +splat_taskq_test8_func(void *arg) +{ + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; + ASSERT(tq_arg); + + atomic_inc(&tq_arg->count); +} + +#define TEST8_NUM_TASKS 0x20000 +#define TEST8_THREADS_PER_TASKQ 100 + +static int +splat_taskq_test8_common(struct file *file, void *arg, int minalloc, + int maxalloc) +{ + taskq_t *tq; + taskqid_t id; + splat_taskq_arg_t tq_arg; + taskq_ent_t **tqes; + int i, j, rc = 0; + + tqes = vmalloc(sizeof(*tqes) * TEST8_NUM_TASKS); + if (tqes == NULL) + return -ENOMEM; + memset(tqes, 0, sizeof(*tqes) * TEST8_NUM_TASKS); + + splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, + "Taskq '%s' creating (%d/%d/%d)\n", + SPLAT_TASKQ_TEST8_NAME, + minalloc, maxalloc, TEST8_NUM_TASKS); + if ((tq = taskq_create(SPLAT_TASKQ_TEST8_NAME, TEST8_THREADS_PER_TASKQ, + maxclsyspri, minalloc, maxalloc, + TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, + "Taskq '%s' create failed\n", + SPLAT_TASKQ_TEST8_NAME); + rc = -EINVAL; + goto out_free; + } + + tq_arg.file = file; + tq_arg.name = SPLAT_TASKQ_TEST8_NAME; + + atomic_set(&tq_arg.count, 0); + for (i = 0; i < TEST8_NUM_TASKS; i++) { + tqes[i] = kmalloc(sizeof(taskq_ent_t), GFP_KERNEL); + if (tqes[i] == NULL) { + rc = -ENOMEM; + goto out; + } + taskq_init_ent(tqes[i]); + + taskq_dispatch_ent(tq, splat_taskq_test8_func, + &tq_arg, TQ_SLEEP, tqes[i]); + + id = tqes[i]->tqent_id; + + if (id == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, + "Taskq '%s' function '%s' dispatch " + "%d failed\n", tq_arg.name, + sym2str(splat_taskq_test8_func), i); + rc = -EINVAL; + goto out; + } + } + + splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, "Taskq '%s' " + "waiting for %d dispatches\n", tq_arg.name, + TEST8_NUM_TASKS); + taskq_wait(tq); + splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, "Taskq '%s' " + "%d/%d dispatches finished\n", tq_arg.name, + atomic_read(&tq_arg.count), TEST8_NUM_TASKS); + + if (atomic_read(&tq_arg.count) != TEST8_NUM_TASKS) + rc = -ERANGE; + +out: + splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, "Taskq '%s' destroying\n", + tq_arg.name); + taskq_destroy(tq); +out_free: + for (j = 0; j < TEST8_NUM_TASKS && tqes[j] != NULL; j++) + kfree(tqes[j]); + vfree(tqes); + + return rc; +} + +static int +splat_taskq_test8(struct file *file, void *arg) +{ + int rc; + + rc = splat_taskq_test8_common(file, arg, 1, 100); + + return rc; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -1021,6 +1133,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST6_ID, splat_taskq_test6); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST7_NAME, SPLAT_TASKQ_TEST7_DESC, SPLAT_TASKQ_TEST7_ID, splat_taskq_test7); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST8_NAME, SPLAT_TASKQ_TEST8_DESC, + SPLAT_TASKQ_TEST8_ID, splat_taskq_test8); return sub; } @@ -1029,6 +1143,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST8_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST5_ID); From ec2b41049f7f576aaa772b326d083e5971212d33 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Tue, 17 Jan 2012 15:34:55 -0800 Subject: [PATCH 0569/1062] Taskq locking optimizations Testing has shown that tq->tq_lock can be highly contended when a large number of small work items are dispatched. The lock hold time is reduced by the following changes: 1) Use exclusive threads in the work_waitq When a single work item is dispatched we only need to wake a single thread to service it. The current implementation uses non-exclusive threads so all threads are woken when the dispatcher calls wake_up(). If a large number of threads are in the queue this overhead can become non-negligible. 2) Conditionally add/remove threads from work waitq outside of tq_lock Taskq threads need only add themselves to the work wait queue if there are no pending work items. Furthermore, the add and remove function calls can be made outside of the taskq lock since the wait queues are protected from concurrent access by their own spinlocks. 3) Call wake_up() outside of tq->tq_lock Again, the wait queues are protected by their own spinlock, so the dispatcher functions can drop tq->tq_lock before calling wake_up(). A new splat test taskq:contention was added in a prior commit to measure the impact of these changes. The following table summarizes the results using data from the kernel lock profiler. tq_lock time %diff Wall clock (s) %diff original: 39117614.10 0 41.72 0 exclusive threads: 31871483.61 18.5 34.2 18.0 unlocked add/rm waitq: 13794303.90 64.7 16.17 61.2 unlocked wake_up(): 1589172.08 95.9 16.61 60.2 Each row reflects the average result over 5 test runs. /proc/lock_stats was zeroed out before and collected after each run. Column 1 is the cumulative hold time in microseconds for tq->tq_lock. The tests are cumulative; each row reflects the code changes of the previous rows. %diff is calculated with respect to "original" as 100*(orig-new)/orig. Although calling wake_up() outside of the taskq lock dramatically reduced the taskq lock hold time, the test actually took slightly more wall clock time. This is because the point of contention shifts from the taskq lock to the wait queue lock. But the change still seems worthwhile since it removes our taskq implementation as a bottleneck, assuming the small increase in wall clock time to be statistical noise. Signed-off-by: Brian Behlendorf Closes #32 --- module/spl/spl-taskq.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index ece99aad6..b0677666d 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -286,10 +286,11 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); spin_unlock(&t->tqent_lock); - - wake_up(&tq->tq_work_waitq); out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + if (rc > 0) + wake_up(&tq->tq_work_waitq); + SRETURN(rc); } EXPORT_SYMBOL(__taskq_dispatch); @@ -309,6 +310,7 @@ __taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TQ_ACTIVE)) { t->tqent_id = 0; + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); goto out; } @@ -332,10 +334,10 @@ __taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, t->tqent_arg = arg; spin_unlock(&t->tqent_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); wake_up(&tq->tq_work_waitq); out: - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); SEXIT; } EXPORT_SYMBOL(__taskq_dispatch_ent); @@ -454,17 +456,17 @@ taskq_thread(void *args) while (!kthread_should_stop()) { - add_wait_queue(&tq->tq_work_waitq, &wait); if (list_empty(&tq->tq_pend_list) && list_empty(&tq->tq_prio_list)) { spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + add_wait_queue_exclusive(&tq->tq_work_waitq, &wait); schedule(); + remove_wait_queue(&tq->tq_work_waitq, &wait); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); } else { __set_current_state(TASK_RUNNING); } - remove_wait_queue(&tq->tq_work_waitq, &wait); if (!list_empty(&tq->tq_prio_list)) pend_list = &tq->tq_prio_list; From a2eda2ff48e6c38788d48b121f36ff7d280d569b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Jan 2012 16:14:35 -0800 Subject: [PATCH 0570/1062] Add the release component to headers When the original build system code was added the release component was accidentally omited from the development header install path. This patch adds the missing path component so it's always clear exactly what release your compiling against. Signed-off-by: Brian Behlendorf --- Makefile.am | 6 +++--- Makefile.in | 6 +++--- include/Makefile.am | 8 ++++---- include/Makefile.in | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index 11fa8ec18..209925969 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,9 +30,9 @@ distclean-local:: if CONFIG_KERNEL install-data-local: - destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/usr/src/$$destname; \ - echo "$(SPL_META_VERSION)" >$$instdest/spl.release; \ + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ + instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ + echo "$$release" >$$instdest/spl.release; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done diff --git a/Makefile.in b/Makefile.in index 23f20662f..90c10c074 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1022,9 +1022,9 @@ distclean-local:: -type f -print | xargs $(RM) @CONFIG_KERNEL_TRUE@install-data-local: -@CONFIG_KERNEL_TRUE@ destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ -@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/$$destname; \ -@CONFIG_KERNEL_TRUE@ echo "$(SPL_META_VERSION)" >$$instdest/spl.release; \ +@CONFIG_KERNEL_TRUE@ release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ +@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ +@CONFIG_KERNEL_TRUE@ echo "$$release" >$$instdest/spl.release; \ @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ @CONFIG_KERNEL_TRUE@ done diff --git a/include/Makefile.am b/include/Makefile.am index d1289f0a0..31acf7e99 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -15,14 +15,14 @@ noinst_HEADERS += $(top_srcdir)/include/util/*.h noinst_HEADERS += $(top_srcdir)/include/vm/*.h install-data-local: - destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/usr/src/$$destname; \ + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ + instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done uninstall-local: - destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/usr/src/$$destname; \ + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ + instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ $(RM) -R $$instdest diff --git a/include/Makefile.in b/include/Makefile.in index 832ffb38d..37fce0449 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -464,16 +464,16 @@ uninstall-am: uninstall-local install-data-local: - destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/usr/src/$$destname; \ + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ + instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done uninstall-local: - destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/usr/src/$$destname; \ + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ + instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ $(RM) -R $$instdest # Tell versions [3.59,3.63) of GNU make to not export all variables. From 87d112392415df7604888cf343df4e48a3404513 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 17 Jan 2012 16:14:59 -0800 Subject: [PATCH 0571/1062] Fix rpm dependencies This change updates the rpm spec files to have strictly correct package dependencies. That means a few things: * Add a dependency to the spl package for the spl-modules package. This ensures that when running 'yum install spl' that newest version of the spl-modules will be installed. * Remove the redundant distribution release extension. This is already added once because it is part of the kernel package release name. Signed-off-by: Brian Behlendorf --- spl-modules.spec.in | 2 +- spl.spec.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 7e01b2ce2..ace5cbcd6 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -178,7 +178,7 @@ Summary: Solaris Porting Layer Modules Group: Utilities/System Name: %{name} Version: %{version} -Release: %{release}%{?dist} +Release: %{release} License: @LICENSE@ URL: git://github.com/zfsonlinux/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) diff --git a/spl.spec.in b/spl.spec.in index 7ade5f163..673cf129f 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -12,6 +12,7 @@ License: @LICENSE@ URL: git://github.com/zfsonlinux/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) Source: %{name}-%{version}.tar.gz +Requires: spl-modules %description The %{name} package contains the support utilities for the spl. From 0bb43ca2823ab55a74565f6e17e2c36749cff3b9 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Thu, 19 Jan 2012 11:36:27 -0800 Subject: [PATCH 0572/1062] Revert "Taskq locking optimizations" This reverts commit ec2b41049f7f576aaa772b326d083e5971212d33. A race condition was introduced by which a wake_up() call can be lost after the taskq thread determines there is no pending work items, leading to deadlock: 1. taksq thread enables interrupts 2. dispatcher thread runs, queues work item, call wake_up() 3. taskq thread runs, adds self to waitq, sleeps This could easily happen if an interrupt for an IO completion was outstanding at the point where the taskq thread reenables interrupts, just before the call to add_wait_queue_exclusive(). The handler would run immediately within the race window. Signed-off-by: Brian Behlendorf Issue #32 --- module/spl/spl-taskq.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index b0677666d..ece99aad6 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -286,11 +286,10 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); spin_unlock(&t->tqent_lock); + + wake_up(&tq->tq_work_waitq); out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - if (rc > 0) - wake_up(&tq->tq_work_waitq); - SRETURN(rc); } EXPORT_SYMBOL(__taskq_dispatch); @@ -310,7 +309,6 @@ __taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TQ_ACTIVE)) { t->tqent_id = 0; - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); goto out; } @@ -334,10 +332,10 @@ __taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, t->tqent_arg = arg; spin_unlock(&t->tqent_lock); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); wake_up(&tq->tq_work_waitq); out: + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); SEXIT; } EXPORT_SYMBOL(__taskq_dispatch_ent); @@ -456,17 +454,17 @@ taskq_thread(void *args) while (!kthread_should_stop()) { + add_wait_queue(&tq->tq_work_waitq, &wait); if (list_empty(&tq->tq_pend_list) && list_empty(&tq->tq_prio_list)) { spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - add_wait_queue_exclusive(&tq->tq_work_waitq, &wait); schedule(); - remove_wait_queue(&tq->tq_work_waitq, &wait); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); } else { __set_current_state(TASK_RUNNING); } + remove_wait_queue(&tq->tq_work_waitq, &wait); if (!list_empty(&tq->tq_prio_list)) pend_list = &tq->tq_prio_list; From 3c6ed5410beb7a4f9e0c042229eb63c4c11a5fc9 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Thu, 19 Jan 2012 10:33:19 -0800 Subject: [PATCH 0573/1062] Taskq locking optimizations Testing has shown that tq->tq_lock can be highly contended when a large number of small work items are dispatched. The lock hold time is reduced by the following changes: 1) Use exclusive threads in the work_waitq When a single work item is dispatched we only need to wake a single thread to service it. The current implementation uses non-exclusive threads so all threads are woken when the dispatcher calls wake_up(). If a large number of threads are in the queue this overhead can become non-negligible. 2) Conditionally add/remove threads from work waitq Taskq threads need only add themselves to the work wait queue if there are no pending work items. Signed-off-by: Brian Behlendorf Issue #32 --- module/spl/spl-taskq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index ece99aad6..0b3b3a131 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -454,17 +454,17 @@ taskq_thread(void *args) while (!kthread_should_stop()) { - add_wait_queue(&tq->tq_work_waitq, &wait); if (list_empty(&tq->tq_pend_list) && list_empty(&tq->tq_prio_list)) { + add_wait_queue_exclusive(&tq->tq_work_waitq, &wait); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); schedule(); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + remove_wait_queue(&tq->tq_work_waitq, &wait); } else { __set_current_state(TASK_RUNNING); } - remove_wait_queue(&tq->tq_work_waitq, &wait); if (!list_empty(&tq->tq_prio_list)) pend_list = &tq->tq_prio_list; From 4b2220f0b937018b79154ac368c845e6176a8a66 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 20 Jan 2012 16:39:12 -0800 Subject: [PATCH 0574/1062] Add --enable-debug-log configure option Until now the notion of an internal debug logging infrastructure was conflated with enabling ASSERT()s. This patch clarifies things by cleanly breaking the two subsystem apart. The result of this is the following behavior. --enable-debug - Enable/disable code wrapped in ASSERT()s. --disable-debug ASSERT()s are used to check invariants and are never required for correct operation. They are disabled by default because they may impact performance. --enable-debug-log - Enable/disable the debug log infrastructure. --disable-debug-log This infrastructure allows the spl code and its consumer to log messages to an in-kernel log. The granularity of the logging can be controlled by a debug mask. By default the mask disables most debug messages resulting in a negligible performance impact. Because of this the debug log is enabled by default. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 28 +++++++++++++++ configure | 78 ++++++++++++++++++++++++++++++++++-------- include/spl-debug.h | 56 +++++++++++++++++++++--------- include/sys/debug.h | 7 ++-- module/spl/spl-debug.c | 5 +++ module/spl/spl-err.c | 2 +- module/spl/spl-kmem.c | 2 +- module/spl/spl-proc.c | 8 +++++ scripts/check.sh | 3 +- spl_config.h.in | 3 ++ 10 files changed, 152 insertions(+), 40 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index a20ee38d1..205eb6bc5 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -19,6 +19,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ AC_SUBST(KERNELCPPFLAGS) SPL_AC_DEBUG + SPL_AC_DEBUG_LOG SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_ATOMIC_SPINLOCK @@ -485,6 +486,33 @@ AC_DEFUN([SPL_AC_DEBUG], [ AC_MSG_RESULT([$enable_debug]) ]) +dnl # +dnl # Enabled by default it provides a basic debug log infrastructure. +dnl # Each subsystem registers itself with a name and logs messages +dnl # using predefined types. If the debug mask it set to allow the +dnl # message type it will be written to the internal log. The log +dnl # can be dumped to a file by echoing 1 to the 'dump' proc entry, +dnl # after dumping the log it must be decoded using the spl utility. +dnl # +dnl # echo 1 >/proc/sys/kernel/spl/debug/dump +dnl # spl /tmp/spl-log.xxx.yyy /tmp/spl-log.xxx.yyy.txt +dnl # +AC_DEFUN([SPL_AC_DEBUG_LOG], [ + AC_ARG_ENABLE([debug-log], + [AS_HELP_STRING([--enable-debug-log], + [Enable basic debug logging @<:@default=yes@:>@])], + [], + [enable_debug_log=yes]) + + AS_IF([test "x$enable_debug_log" = xyes], + [AC_DEFINE([DEBUG_LOG], [1], + [Define to 1 to enable basic debug logging]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"]) + + AC_MSG_CHECKING([whether basic debug logging is enabled]) + AC_MSG_RESULT([$enable_debug_log]) +]) + dnl # dnl # Enabled by default it provides a minimal level of memory tracking. dnl # A total count of bytes allocated is kept for each alloc and free. diff --git a/configure b/configure index 7b93f564f..3b3439ad1 100755 --- a/configure +++ b/configure @@ -961,6 +961,7 @@ with_config with_linux with_linux_obj enable_debug +enable_debug_log enable_debug_kmem enable_debug_kmem_tracking enable_atomic_spinlocks @@ -1615,6 +1616,7 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Enable generic debug support [default=no] + --enable-debug-log Enable basic debug logging [default=yes] --enable-debug-kmem Enable basic kmem accounting [default=yes] --enable-debug-kmem-tracking Enable detailed kmem tracking [default=no] @@ -4783,13 +4785,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4786: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4788: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4789: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4791: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4792: output\"" >&5) + (eval echo "\"\$as_me:4794: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5995,7 +5997,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5998 "configure"' > conftest.$ac_ext + echo '#line 6000 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7848,11 +7850,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7851: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7853: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7855: \$? = $ac_status" >&5 + echo "$as_me:7857: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8187,11 +8189,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8190: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8192: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8194: \$? = $ac_status" >&5 + echo "$as_me:8196: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8292,11 +8294,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8295: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8297: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8299: \$? = $ac_status" >&5 + echo "$as_me:8301: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8347,11 +8349,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8350: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8352: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8354: \$? = $ac_status" >&5 + echo "$as_me:8356: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11150,7 +11152,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11153 "configure" +#line 11155 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11246,7 +11248,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11249 "configure" +#line 11251 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11980,6 +11982,30 @@ fi $as_echo "$enable_debug" >&6; } + # Check whether --enable-debug-log was given. +if test "${enable_debug_log+set}" = set; then + enableval=$enable_debug_log; +else + enable_debug_log=yes +fi + + + if test "x$enable_debug_log" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_LOG 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" +fi + + + { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5 +$as_echo_n "checking whether basic debug logging is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5 +$as_echo "$enable_debug_log" >&6; } + + # Check whether --enable-debug-kmem was given. if test "${enable_debug_kmem+set}" = set; then enableval=$enable_debug_kmem; @@ -16359,6 +16385,30 @@ fi $as_echo "$enable_debug" >&6; } + # Check whether --enable-debug-log was given. +if test "${enable_debug_log+set}" = set; then + enableval=$enable_debug_log; +else + enable_debug_log=yes +fi + + + if test "x$enable_debug_log" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_LOG 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" +fi + + + { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5 +$as_echo_n "checking whether basic debug logging is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5 +$as_echo "$enable_debug_log" >&6; } + + # Check whether --enable-debug-kmem was given. if test "${enable_debug_kmem+set}" = set; then enableval=$enable_debug_kmem; diff --git a/include/spl-debug.h b/include/spl-debug.h index 1e08e77bc..98164966c 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -43,6 +43,7 @@ #define _SPL_DEBUG_INTERNAL_H #include +#include #define SS_UNDEFINED 0x00000001 #define SS_ATOMIC 0x00000002 @@ -86,21 +87,8 @@ #define SD_OTHER 0x00000100 #define SD_CANTMASK (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE) -#ifdef NDEBUG /* Debugging Disabled */ - -#define SDEBUG(mask, fmt, a...) ((void)0) -#define SDEBUG_LIMIT(x, y, fmt, a...) ((void)0) -#define SWARN(fmt, a...) ((void)0) -#define SERROR(fmt, a...) ((void)0) -#define SEMERG(fmt, a...) ((void)0) -#define SCONSOLE(mask, fmt, a...) ((void)0) - -#define SENTRY ((void)0) -#define SEXIT ((void)0) -#define SRETURN(x) return (x) -#define SGOTO(x, y) { ((void)(y)); goto x; } - -#else /* Debugging Enabled */ +/* Debug log support enabled */ +#ifdef DEBUG_LOG #define __SDEBUG(cdls, subsys, mask, format, a...) \ do { \ @@ -149,8 +137,6 @@ do { \ goto label; \ } while (0) -#endif /* NDEBUG */ - typedef struct { unsigned long cdls_next; int cdls_count; @@ -183,10 +169,46 @@ extern int spl_debug_set_mb(int mb); extern int spl_debug_get_mb(void); extern int spl_debug_dumplog(int flags); extern void spl_debug_dumpstack(struct task_struct *tsk); +extern void spl_debug_bug(char *file, const char *fn, const int line, int fl); +extern int spl_debug_msg(void *arg, int subsys, int mask, const char *file, + const char *fn, const int line, const char *format, ...); extern int spl_debug_clear_buffer(void); extern int spl_debug_mark_buffer(char *text); int spl_debug_init(void); void spl_debug_fini(void); +/* Debug log support disabled */ +#else /* DEBUG_LOG */ + +#define SDEBUG(mask, fmt, a...) ((void)0) +#define SDEBUG_LIMIT(x, y, fmt, a...) ((void)0) +#define SWARN(fmt, a...) ((void)0) +#define SERROR(fmt, a...) ((void)0) +#define SEMERG(fmt, a...) ((void)0) +#define SCONSOLE(mask, fmt, a...) ((void)0) + +#define SENTRY ((void)0) +#define SEXIT ((void)0) +#define SRETURN(x) return (x) +#define SGOTO(x, y) { ((void)(y)); goto x; } + +static inline int spl_debug_init(void) { return (0); } +static inline void spl_debug_fini(void) { return; } + +static inline void +spl_debug_bug(char *file, const char *fn, const int line, int fl) +{ + return; +} + +static inline int +spl_debug_msg(void *arg, int subsys, int mask, const char *file, + const char *fn, const int line, const char *format, ...) +{ + return (0); +} + +#endif /* DEBUG_LOG */ + #endif /* SPL_DEBUG_INTERNAL_H */ diff --git a/include/sys/debug.h b/include/sys/debug.h index fbf15143f..271dbc210 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -44,6 +44,8 @@ #ifndef _SPL_DEBUG_H #define _SPL_DEBUG_H +#include + #ifdef NDEBUG /* Debugging Disabled */ /* Define SPL_DEBUG_STR to make clear which ASSERT definitions are used */ @@ -137,9 +139,4 @@ do { \ #define VERIFY(x) ASSERT(x) #endif /* NDEBUG */ - -extern void spl_debug_bug(char *file, const char *fn, const int line, int fl); -extern int spl_debug_msg(void *arg, int subsys, int mask, const char *file, - const char *fn, const int line, const char *format, ...); - #endif /* SPL_DEBUG_H */ diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 0dbbb5a7c..4bcc34a8e 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -47,6 +47,9 @@ #define SS_DEBUG_SUBSYS SS_DEBUG +/* Debug log support enabled */ +#ifdef DEBUG_LOG + unsigned long spl_debug_subsys = ~0; EXPORT_SYMBOL(spl_debug_subsys); module_param(spl_debug_subsys, ulong, 0644); @@ -1248,3 +1251,5 @@ spl_debug_fini(void) { trace_fini(); } + +#endif /* DEBUG_LOG */ diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 200028f3b..c837d1eaa 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -34,7 +34,7 @@ #define SS_DEBUG_SUBSYS SS_GENERIC -#ifndef NDEBUG +#ifdef DEBUG_LOG static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; #endif diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 5a6011ad6..446dab128 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -672,7 +672,7 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, "large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); - spl_debug_dumpstack(NULL); + dump_stack(); } /* Use the correct allocator */ diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 745b10714..8149143ae 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -125,6 +125,7 @@ enum { CTL_HW_SERIAL, /* Hardware serial number from hostid */ CTL_KALLSYMS, /* Address of kallsyms_lookup_name */ +#ifdef DEBUG_LOG CTL_DEBUG_SUBSYS, /* Debug subsystem */ CTL_DEBUG_MASK, /* Debug mask */ CTL_DEBUG_PRINTK, /* Force all messages to console */ @@ -136,6 +137,7 @@ enum { CTL_DEBUG_DUMP, /* Dump debug buffer to file */ CTL_DEBUG_FORCE_BUG, /* Hook to force a BUG */ CTL_DEBUG_STACK_SIZE, /* Max observed stack size */ +#endif CTL_CONSOLE_RATELIMIT, /* Ratelimit console messages */ CTL_CONSOLE_MAX_DELAY_CS, /* Max delay which we skip messages */ @@ -221,6 +223,7 @@ proc_copyout_string(char *ubuffer, int ubuffer_size, return size; } +#ifdef DEBUG_LOG SPL_PROC_HANDLER(proc_dobitmasks) { unsigned long *mask = table->data; @@ -407,6 +410,7 @@ SPL_PROC_HANDLER(proc_console_backoff) SRETURN(rc); } +#endif /* DEBUG_LOG */ #ifdef DEBUG_KMEM SPL_PROC_HANDLER(proc_domemused) @@ -716,6 +720,7 @@ static struct file_operations proc_slab_operations = { }; #endif /* DEBUG_KMEM */ +#ifdef DEBUG_LOG static struct ctl_table spl_debug_table[] = { { CTL_NAME (CTL_DEBUG_SUBSYS) @@ -829,6 +834,7 @@ static struct ctl_table spl_debug_table[] = { }, {0}, }; +#endif /* DEBUG_LOG */ static struct ctl_table spl_vm_table[] = { { @@ -1056,12 +1062,14 @@ static struct ctl_table spl_table[] = { .proc_handler = &proc_dokallsyms_lookup_name, }, #endif +#ifdef DEBUG_LOG { CTL_NAME (CTL_SPL_DEBUG) .procname = "debug", .mode = 0555, .child = spl_debug_table, }, +#endif { CTL_NAME (CTL_SPL_VM) .procname = "vm", diff --git a/scripts/check.sh b/scripts/check.sh index 8c0e0c5cb..4334ff3a5 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -65,9 +65,8 @@ fi /sbin/modprobe zlib_inflate &>/dev/null /sbin/modprobe zlib_deflate &>/dev/null -spl_module_params="spl_debug_mask=0xffffffff spl_debug_subsys=0xffffffff" echo "Loading ${spl_module}" -/sbin/insmod ${spl_module} ${spl_module_params} || die "Failed to load ${spl_module}" +/sbin/insmod ${spl_module} || die "Failed to load ${spl_module}" echo "Loading ${splat_module}" /sbin/insmod ${splat_module} || die "Unable to load ${splat_module}" diff --git a/spl_config.h.in b/spl_config.h.in index 847da2137..05dcdc504 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -9,6 +9,9 @@ /* Define to 1 to enable detailed kmem tracking */ #undef DEBUG_KMEM_TRACKING +/* Define to 1 to enable basic debug logging */ +#undef DEBUG_LOG + /* invalidate_inodes() wants 2 args */ #undef HAVE_2ARGS_INVALIDATE_INODES From 9a8b7a7458a3d76d35b26e7f2b737abd9ab4c6ef Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 30 Jan 2012 12:15:31 -0800 Subject: [PATCH 0575/1062] Add basic dynamic kstat support Add the bare minimum functionality to support dynamic kstats. A complete kstat implementation should be done as part of issue #84. Signed-off-by: Brian Behlendorf Issue #84 --- include/sys/kstat.h | 11 ++++++++++- module/spl/spl-kstat.c | 12 ++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 3c2ad4c5b..e4c88c82b 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -72,7 +72,14 @@ #define KS_MAGIC 0x9d9d9d9d -typedef int kid_t; /* unique kstat id */ +/* Dynamic updates */ +#define KSTAT_READ 0 +#define KSTAT_WRITE 1 + +struct kstat_s; + +typedef int kid_t; /* unique kstat id */ +typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */ typedef struct kstat_s { int ks_magic; /* magic value */ @@ -89,6 +96,8 @@ typedef struct kstat_s { uint_t ks_ndata; /* # of type-specific data records */ size_t ks_data_size; /* size of kstat data section */ struct proc_dir_entry *ks_proc; /* proc linkage */ + kstat_update_t *ks_update; /* dynamic updates */ + void *ks_private; /* private data */ spinlock_t ks_lock; /* kstat data lock */ struct list_head ks_list; /* kstat linkage */ } kstat_t; diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index ee9dfdf03..48fab972b 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -223,6 +223,13 @@ kstat_seq_show(struct seq_file *f, void *p) return rc; } +int +kstat_default_update(kstat_t *ksp, int rw) +{ + ASSERT(ksp != NULL); + return 0; +} + static void * kstat_seq_data_addr(kstat_t *ksp, loff_t n) { @@ -260,6 +267,9 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) ASSERT(ksp->ks_magic == KS_MAGIC); SENTRY; + /* Dynamically update kstat, on error existing kstats are used */ + (void) ksp->ks_update(ksp, KSTAT_READ); + spin_lock(&ksp->ks_lock); ksp->ks_snaptime = gethrtime(); @@ -361,6 +371,8 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, strncpy(ksp->ks_class, ks_class, KSTAT_STRLEN); ksp->ks_type = ks_type; ksp->ks_flags = ks_flags; + ksp->ks_update = kstat_default_update; + ksp->ks_private = NULL; switch (ksp->ks_type) { case KSTAT_TYPE_RAW: From feedc4360114941021ff0053a8f979235dd673da Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 9 Feb 2012 16:38:42 -0800 Subject: [PATCH 0576/1062] Add missing spl_debug_* helpers When building the spl with --disable-debug-log the __SDEBUG() macro and spl_debug_* helper functions were undefined. This change adds the missing functions so the upper layers compiling against the spl don't need to be aware of how the spl was built. Signed-off-by: Brian Behlendorf --- include/spl-debug.h | 66 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/include/spl-debug.h b/include/spl-debug.h index 98164966c..42da3e4e8 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -181,6 +181,7 @@ void spl_debug_fini(void); /* Debug log support disabled */ #else /* DEBUG_LOG */ +#define __SDEBUG(x, y, mask, fmt, a...) ((void)0) #define SDEBUG(mask, fmt, a...) ((void)0) #define SDEBUG_LIMIT(x, y, fmt, a...) ((void)0) #define SWARN(fmt, a...) ((void)0) @@ -193,8 +194,47 @@ void spl_debug_fini(void); #define SRETURN(x) return (x) #define SGOTO(x, y) { ((void)(y)); goto x; } -static inline int spl_debug_init(void) { return (0); } -static inline void spl_debug_fini(void) { return; } +static inline unsigned long +spl_debug_set_mask(unsigned long mask) { + return (0); +} + +static inline unsigned long +spl_debug_get_mask(void) { + return (0); +} + +static inline unsigned long +spl_debug_set_subsys(unsigned long mask) { + return (0); +} + +static inline unsigned long +spl_debug_get_subsys(void) { + return (0); +} + +static inline int +spl_debug_set_mb(int mb) { + return (0); +} + +static inline int +spl_debug_get_mb(void) { + return (0); +} + +static inline int +spl_debug_dumplog(int flags) +{ + return (0); +} + +static inline void +spl_debug_dumpstack(struct task_struct *tsk) +{ + return; +} static inline void spl_debug_bug(char *file, const char *fn, const int line, int fl) @@ -209,6 +249,28 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, return (0); } +static inline int +spl_debug_clear_buffer(void) +{ + return (0); +} + +static inline int +spl_debug_mark_buffer(char *text) +{ + return (0); +} + +static inline int +spl_debug_init(void) { + return (0); +} + +static inline void +spl_debug_fini(void) { + return; +} + #endif /* DEBUG_LOG */ #endif /* SPL_DEBUG_INTERNAL_H */ From 3c208a5480960c9610676dbabeee35fd8b8bb3d8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 27 Feb 2012 10:42:07 -0800 Subject: [PATCH 0577/1062] Cleanly support debug packages Allow a source rpm to be rebuilt with debugging enabled. This avoids the need to have to manually modify the spec file. By default debugging is still largely disabled. To enable specific debugging features use the following options with rpmbuild. '--with debug' - Enables ASSERTs '--with debug-log' - Enables the internal debug log '--with debug-kmem' - Enables basic memory accounting '--with debug-kmem-tracking' - Enables detailed memory tracking # For example: $ rpmbuild --rebuild --with debug spl-modules-0.6.0-rc6.src.rpm Signed-off-by: Brian Behlendorf --- Makefile.in | 8 ++++ cmd/Makefile.in | 4 ++ config/rpm.am | 4 ++ config/spl-build.m4 | 36 +++++++++++++---- configure | 98 ++++++++++++++++++++++++++++++++++++--------- include/Makefile.in | 4 ++ lib/Makefile.in | 4 ++ scripts/Makefile.in | 4 ++ spl-modules.spec.in | 48 +++++++++++++++++++++- 9 files changed, 180 insertions(+), 30 deletions(-) diff --git a/Makefile.in b/Makefile.in index 90c10c074..7c8f696a5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -181,6 +181,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_KMEM = @DEBUG_KMEM@ +DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ +DEBUG_LOG = @DEBUG_LOG@ +DEBUG_SPL = @DEBUG_SPL@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -905,6 +909,10 @@ rpm-common: --define "require_kdir $(LINUX)" \ --define "require_kobj $(LINUX_OBJ)" \ --define "require_kver $(LINUX_VERSION)" \ + --define "$(DEBUG_SPL) 1" \ + --define "$(DEBUG_LOG) 1" \ + --define "$(DEBUG_KMEM) 1" \ + --define "$(DEBUG_KMEM_TRACKING) 1" \ --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 5d6e0c9f0..9406aeb2c 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -117,6 +117,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_KMEM = @DEBUG_KMEM@ +DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ +DEBUG_LOG = @DEBUG_LOG@ +DEBUG_SPL = @DEBUG_SPL@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ diff --git a/config/rpm.am b/config/rpm.am index 0aae42586..7dfe4fd9b 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -73,6 +73,10 @@ rpm-common: --define "require_kdir $(LINUX)" \ --define "require_kobj $(LINUX_OBJ)" \ --define "require_kver $(LINUX_VERSION)" \ + --define "$(DEBUG_SPL) 1" \ + --define "$(DEBUG_LOG) 1" \ + --define "$(DEBUG_KMEM) 1" \ + --define "$(DEBUG_KMEM_TRACKING) 1" \ --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 205eb6bc5..eee950c67 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -476,13 +476,15 @@ AC_DEFUN([SPL_AC_DEBUG], [ [ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" - ], - [ + DEBUG_SPL="_with_debug" + ], [ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" + DEBUG_SPL="_without_debug" ]) AC_SUBST(DEBUG_CFLAGS) + AC_SUBST(DEBUG_SPL) AC_MSG_RESULT([$enable_debug]) ]) @@ -505,10 +507,16 @@ AC_DEFUN([SPL_AC_DEBUG_LOG], [ [enable_debug_log=yes]) AS_IF([test "x$enable_debug_log" = xyes], - [AC_DEFINE([DEBUG_LOG], [1], + [ + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" + DEBUG_LOG="_with_debug_log" + AC_DEFINE([DEBUG_LOG], [1], [Define to 1 to enable basic debug logging]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"]) + ], [ + DEBUG_LOG="_without_debug_log" + ]) + AC_SUBST(DEBUG_LOG) AC_MSG_CHECKING([whether basic debug logging is enabled]) AC_MSG_RESULT([$enable_debug_log]) ]) @@ -528,10 +536,16 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM], [ [enable_debug_kmem=yes]) AS_IF([test "x$enable_debug_kmem" = xyes], - [AC_DEFINE([DEBUG_KMEM], [1], + [ + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + DEBUG_KMEM="_with_debug_kmem" + AC_DEFINE([DEBUG_KMEM], [1], [Define to 1 to enable basic kmem accounting]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"]) + ], [ + DEBUG_KMEM="_without_debug_kmem" + ]) + AC_SUBST(DEBUG_KMEM) AC_MSG_CHECKING([whether basic kmem accounting is enabled]) AC_MSG_RESULT([$enable_debug_kmem]) ]) @@ -553,10 +567,16 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [ [enable_debug_kmem_tracking=no]) AS_IF([test "x$enable_debug_kmem_tracking" = xyes], - [AC_DEFINE([DEBUG_KMEM_TRACKING], [1], + [ + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" + AC_DEFINE([DEBUG_KMEM_TRACKING], [1], [Define to 1 to enable detailed kmem tracking]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"]) + ], [ + DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" + ]) + AC_SUBST(DEBUG_KMEM_TRACKING) AC_MSG_CHECKING([whether detailed kmem tracking is enabled]) AC_MSG_RESULT([$enable_debug_kmem_tracking]) ]) diff --git a/configure b/configure index 3b3439ad1..3d67ecef2 100755 --- a/configure +++ b/configure @@ -791,6 +791,10 @@ CONFIG_KERNEL_FALSE CONFIG_KERNEL_TRUE CONFIG_USER_FALSE CONFIG_USER_TRUE +DEBUG_KMEM_TRACKING +DEBUG_KMEM +DEBUG_LOG +DEBUG_SPL DEBUG_CFLAGS KERNELCPPFLAGS KERNELMAKE_PARAMS @@ -4785,13 +4789,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4788: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4792: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4791: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4795: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4794: output\"" >&5) + (eval echo "\"\$as_me:4798: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5997,7 +6001,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6000 "configure"' > conftest.$ac_ext + echo '#line 6004 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7850,11 +7854,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7853: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7857: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7857: \$? = $ac_status" >&5 + echo "$as_me:7861: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8189,11 +8193,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8192: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8196: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8196: \$? = $ac_status" >&5 + echo "$as_me:8200: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8294,11 +8298,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8297: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8301: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8301: \$? = $ac_status" >&5 + echo "$as_me:8305: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8349,11 +8353,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8352: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8356: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8356: \$? = $ac_status" >&5 + echo "$as_me:8360: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11152,7 +11156,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11155 "configure" +#line 11159 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11248,7 +11252,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11251 "configure" +#line 11255 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11968,16 +11972,19 @@ fi KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" + DEBUG_SPL="_with_debug" else KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" + DEBUG_SPL="_without_debug" fi + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } @@ -11992,14 +11999,22 @@ fi if test "x$enable_debug_log" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" + DEBUG_LOG="_with_debug_log" + cat >>confdefs.h <<\_ACEOF #define DEBUG_LOG 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" + +else + + DEBUG_LOG="_without_debug_log" + fi + { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5 $as_echo_n "checking whether basic debug logging is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5 @@ -12016,14 +12031,22 @@ fi if test "x$enable_debug_kmem" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + DEBUG_KMEM="_with_debug_kmem" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + +else + + DEBUG_KMEM="_without_debug_kmem" + fi + { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 $as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 @@ -12040,14 +12063,22 @@ fi if test "x$enable_debug_kmem_tracking" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM_TRACKING 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + +else + + DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" + fi + { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 @@ -16371,16 +16402,19 @@ fi KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" + DEBUG_SPL="_with_debug" else KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" + DEBUG_SPL="_without_debug" fi + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } @@ -16395,14 +16429,22 @@ fi if test "x$enable_debug_log" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" + DEBUG_LOG="_with_debug_log" + cat >>confdefs.h <<\_ACEOF #define DEBUG_LOG 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" + +else + + DEBUG_LOG="_without_debug_log" + fi + { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5 $as_echo_n "checking whether basic debug logging is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5 @@ -16419,14 +16461,22 @@ fi if test "x$enable_debug_kmem" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + DEBUG_KMEM="_with_debug_kmem" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + +else + + DEBUG_KMEM="_without_debug_kmem" + fi + { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 $as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 @@ -16443,14 +16493,22 @@ fi if test "x$enable_debug_kmem_tracking" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM_TRACKING 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + +else + + DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" + fi + { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 diff --git a/include/Makefile.in b/include/Makefile.in index 37fce0449..1e6aa5fe6 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -76,6 +76,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_KMEM = @DEBUG_KMEM@ +DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ +DEBUG_LOG = @DEBUG_LOG@ +DEBUG_SPL = @DEBUG_SPL@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 4fdae68e2..12315faf0 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -109,6 +109,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_KMEM = @DEBUG_KMEM@ +DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ +DEBUG_LOG = @DEBUG_LOG@ +DEBUG_SPL = @DEBUG_SPL@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index d007d0bd8..ed9c78461 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -71,6 +71,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_KMEM = @DEBUG_KMEM@ +DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ +DEBUG_LOG = @DEBUG_LOG@ +DEBUG_SPL = @DEBUG_SPL@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ diff --git a/spl-modules.spec.in b/spl-modules.spec.in index ace5cbcd6..2a2c8f468 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -22,6 +22,50 @@ %define kobj %{require_kobj} %endif +# Set using 'rpmbuild ... --with debug ...', defaults to disabled. +%if %{defined _with_debug} + %define kdebug --enable-debug +%else + %if %{defined _without_debug} + %define kdebug --disable-debug + %else + %define kdebug --disable-debug + %endif +%endif + +# Set using 'rpmbuild ... --with debug-log ...', defaults to enabled. +%if %{defined _with_debug_log} + %define kdebug_log --enable-debug-log +%else + %if %{defined _without_debug_log} + %define kdebug_log --disable-debug-log + %else + %define kdebug_log --enable-debug-log + %endif +%endif + +# Set using 'rpmbuild ... --with debug-kmem ...', defaults to enabled. +%if %{defined _with_debug_kmem} + %define kdebug_kmem --enable-debug-kmem +%else + %if %{defined _without_debug_kmem} + %define kdebug_kmem --disable-debug-kmem + %else + %define kdebug_kmem --enable-debug-kmem + %endif +%endif + +# Set using 'rpmbuild ... --with debug-tracking ...', defaults to disabled. +%if %{defined _with_debug_kmem_tracking} + %define kdebug_kmem_tracking --enable-debug-kmem-tracking +%else + %if %{defined _without_debug_kmem_tracking} + %define kdebug_kmem_tracking --disable-debug-kmem-tracking + %else + %define kdebug_kmem_tracking --disable-debug-kmem-tracking + %endif +%endif + # SLES: %if %{defined suse_version} %if %{undefined kver} @@ -213,8 +257,8 @@ symbols needed for building additional modules which use %{name}. %prep %setup -n @PACKAGE@-%{version} %build -%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \ - --with-config=kernel +%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} --with-config=kernel \ + %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking} make %install From a3a69b74cdeb955b6924a534b809810e831b94fa Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Mar 2012 10:22:23 -0800 Subject: [PATCH 0578/1062] Fix distribution detection Improve the distribution detection by moving the tests for distribution specific files first. The Ubuntu and Debian checks are left for last because they are the least likely to be unique. This is particularly true in the case of Debian since so many distributions are based on Debian. Since this is currently only used to identify the correct packaging method for this system the result in many instances is simply cosmetic. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 39 +++++++++++++++++++++++---------------- configure | 39 +++++++++++++++++++++++---------------- 2 files changed, 46 insertions(+), 32 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index eee950c67..6605b826d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -371,22 +371,26 @@ dnl # package type for 'make pkg': (rpm | deb | tgz) dnl # AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([linux distribution]) - if test -f /etc/redhat-release ; then - VENDOR=redhat ; + if test -f /etc/toss-release ; then + VENDOR=toss ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; + elif test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; elif test -f /etc/arch-release ; then VENDOR=arch ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; elif test -f /etc/SuSE-release ; then VENDOR=sles ; elif test -f /etc/slackware-version ; then VENDOR=slackware ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; else VENDOR= ; fi @@ -395,14 +399,17 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default package type]) case "$VENDOR" in - fedora) DEFAULT_PACKAGE=rpm ;; - redhat) DEFAULT_PACKAGE=rpm ;; - sles) DEFAULT_PACKAGE=rpm ;; - ubuntu) DEFAULT_PACKAGE=deb ;; - debian) DEFAULT_PACKAGE=deb ;; - slackware) DEFAULT_PACKAGE=tgz ;; - arch) DEFAULT_PACKAGE=arch;; - *) DEFAULT_PACKAGE=rpm ;; + toss) DEFAULT_PACKAGE=rpm ;; + redhat) DEFAULT_PACKAGE=rpm ;; + fedora) DEFAULT_PACKAGE=rpm ;; + gentoo) DEFAULT_PACKAGE=tgz ;; + arch) DEFAULT_PACKAGE=arch ;; + sles) DEFAULT_PACKAGE=rpm ;; + slackware) DEFAULT_PACKAGE=tgz ;; + lunar) DEFAULT_PACKAGE=tgz ;; + ubuntu) DEFAULT_PACKAGE=deb ;; + debian) DEFAULT_PACKAGE=deb ;; + *) DEFAULT_PACKAGE=rpm ;; esac AC_MSG_RESULT([$DEFAULT_PACKAGE]) diff --git a/configure b/configure index 3d67ecef2..f4a9f139f 100755 --- a/configure +++ b/configure @@ -11493,22 +11493,26 @@ $as_echo "$LICENSE" >&6; } { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 $as_echo_n "checking linux distribution... " >&6; } - if test -f /etc/redhat-release ; then - VENDOR=redhat ; + if test -f /etc/toss-release ; then + VENDOR=toss ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; + elif test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; elif test -f /etc/arch-release ; then VENDOR=arch ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; elif test -f /etc/SuSE-release ; then VENDOR=sles ; elif test -f /etc/slackware-version ; then VENDOR=slackware ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; else VENDOR= ; fi @@ -11519,14 +11523,17 @@ $as_echo "$VENDOR" >&6; } { $as_echo "$as_me:$LINENO: checking default package type" >&5 $as_echo_n "checking default package type... " >&6; } case "$VENDOR" in - fedora) DEFAULT_PACKAGE=rpm ;; - redhat) DEFAULT_PACKAGE=rpm ;; - sles) DEFAULT_PACKAGE=rpm ;; - ubuntu) DEFAULT_PACKAGE=deb ;; - debian) DEFAULT_PACKAGE=deb ;; - slackware) DEFAULT_PACKAGE=tgz ;; - arch) DEFAULT_PACKAGE=arch;; - *) DEFAULT_PACKAGE=rpm ;; + toss) DEFAULT_PACKAGE=rpm ;; + redhat) DEFAULT_PACKAGE=rpm ;; + fedora) DEFAULT_PACKAGE=rpm ;; + gentoo) DEFAULT_PACKAGE=tgz ;; + arch) DEFAULT_PACKAGE=arch ;; + sles) DEFAULT_PACKAGE=rpm ;; + slackware) DEFAULT_PACKAGE=tgz ;; + lunar) DEFAULT_PACKAGE=tgz ;; + ubuntu) DEFAULT_PACKAGE=deb ;; + debian) DEFAULT_PACKAGE=deb ;; + *) DEFAULT_PACKAGE=rpm ;; esac { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 From 5d139aaa2b0d7c635e1f3ea0423dc428e844896a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 16 Mar 2012 11:28:28 -0700 Subject: [PATCH 0579/1062] SPL 0.6.0-rc7 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 699747fd0..69ccd79da 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc6 +Release: rc7 Release-Tags: relext From 0835057ee7ab61b3e0c794a70da984712fce4384 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 23 Mar 2012 12:03:57 -0700 Subject: [PATCH 0580/1062] Add SPL_META_RELEASE to module load/unload messages Include the ZFS_META_RELEASE in the module load/unload messages to more clearly indicate exactly what version of the SPL has been loaded. Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 2 +- module/spl/spl-generic.c | 16 +++++++++------- module/splat/splat-ctl.c | 8 ++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 7a4faa666..97257e078 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -136,7 +136,7 @@ #define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) /* Missing globals */ -extern char spl_version[16]; +extern char spl_version[32]; extern unsigned long spl_hostid; extern char hw_serial[11]; diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index e62e4a7a9..be099aaae 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -49,7 +49,7 @@ #define SS_DEBUG_SUBSYS SS_GENERIC -char spl_version[16] = "SPL v" SPL_META_VERSION; +char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; EXPORT_SYMBOL(spl_version); unsigned long spl_hostid = HW_INVALID_HOSTID; @@ -597,8 +597,9 @@ __init spl_init(void) if ((rc = spl_vn_init_kallsyms_lookup())) SGOTO(out10, rc); - printk(KERN_NOTICE "SPL: Loaded module v%s%s, using hostid 0x%08x\n", - SPL_META_VERSION, SPL_DEBUG_STR, (unsigned int) spl_hostid); + printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s, using hostid " + "0x%08x\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR, + (unsigned int) spl_hostid); SRETURN(rc); out10: spl_zlib_fini(); @@ -621,8 +622,9 @@ out2: out1: spl_debug_fini(); - printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer v%s%s" - ", rc = %d\n", SPL_META_VERSION, SPL_DEBUG_STR, rc); + printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer " + "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, + SPL_DEBUG_STR, rc); return rc; } @@ -631,8 +633,8 @@ spl_fini(void) { SENTRY; - printk(KERN_NOTICE "SPL: Unloaded module v%s%s\n", - SPL_META_VERSION, SPL_DEBUG_STR); + printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n", + SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); spl_zlib_fini(); spl_tsd_fini(); spl_kstat_fini(); diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index dd1ece05b..399b09c4d 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -664,8 +664,8 @@ splat_init(void) MKDEV(SPLAT_MAJOR, 0), NULL, SPLAT_NAME); - printk(KERN_INFO "SPLAT: Loaded module v%s%s\n", - SPL_META_VERSION, SPL_DEBUG_STR); + printk(KERN_INFO "SPLAT: Loaded module v%s-%s%s\n", + SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); return 0; error: printk(KERN_ERR "SPLAT: Error registering splat device, %d\n", rc); @@ -700,8 +700,8 @@ splat_fini(void) SPLAT_SUBSYSTEM_FINI(kmem); ASSERT(list_empty(&splat_module_list)); - printk(KERN_INFO "SPLAT: Unloaded module v%s%s\n", - SPL_META_VERSION, SPL_DEBUG_STR); + printk(KERN_INFO "SPLAT: Unloaded module v%s-%s%s\n", + SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); return 0; } From 8920c6918a984a9624c853460fe00e9a200bbd48 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 26 Mar 2012 11:57:13 -0700 Subject: [PATCH 0581/1062] SPL 0.6.0-rc8 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 69ccd79da..6140db347 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc7 +Release: rc8 Release-Tags: relext From b29012b99994ece46019b664d67dace29e5c2586 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 6 Apr 2012 11:29:23 -0700 Subject: [PATCH 0582/1062] Remove condition variable names Long ago I added support to the spl for condition variable names because I thought they might be needed. It turns out they aren't. In fact the official Solaris cv_init(9F) man page discourages their use in the kernel. cv_init(9F) Parameters name - Descriptive string. This is obsolete and should be NULL. (Non-NULL strings are legal, but they're a waste of kernel memory.) Therefore, I'm removing them from the spl to reclaim this memory and adding an ASSERT() to ensure no new consumers are added which make use of the name. Signed-off-by: Brian Behlendorf --- include/sys/condvar.h | 10 +--------- module/spl/spl-condvar.c | 11 +---------- module/splat/splat-condvar.c | 10 +++++----- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index ca9dd0f52..59407c2dd 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -39,8 +39,6 @@ typedef struct { int cv_magic; - char *cv_name; - int cv_name_size; wait_queue_head_t cv_event; wait_queue_head_t cv_destroy; atomic_t cv_waiters; @@ -59,13 +57,7 @@ extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, extern void __cv_signal(kcondvar_t *cvp); extern void __cv_broadcast(kcondvar_t *cvp); -#define cv_init(cvp, name, type, arg) \ -({ \ - if ((name) == NULL) \ - __cv_init(cvp, #cvp, type, arg); \ - else \ - __cv_init(cvp, name, type, arg); \ -}) +#define cv_init(cvp, name, type, arg) __cv_init(cvp, name, type, arg) #define cv_destroy(cvp) __cv_destroy(cvp) #define cv_wait(cvp, mp) __cv_wait(cvp, mp) #define cv_wait_interruptible(cvp, mp) __cv_wait_interruptible(cvp,mp) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 2730435c7..52131c1e8 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -40,7 +40,7 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) SENTRY; ASSERT(cvp); - ASSERT(name); + ASSERT(name == NULL); ASSERT(type == CV_DEFAULT); ASSERT(arg == NULL); @@ -49,8 +49,6 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) init_waitqueue_head(&cvp->cv_destroy); atomic_set(&cvp->cv_waiters, 0); cvp->cv_mutex = NULL; - cvp->cv_name = NULL; - cvp->cv_name_size = strlen(name) + 1; /* We may be called when there is a non-zero preempt_count or * interrupts are disabled is which case we must not sleep. @@ -58,10 +56,6 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) if (current_thread_info()->preempt_count || irqs_disabled()) flags = KM_NOSLEEP; - cvp->cv_name = kmem_alloc(cvp->cv_name_size, flags); - if (cvp->cv_name) - strcpy(cvp->cv_name, name); - SEXIT; } EXPORT_SYMBOL(__cv_init); @@ -91,9 +85,6 @@ __cv_destroy(kcondvar_t *cvp) ASSERT(atomic_read(&cvp->cv_waiters) == 0); ASSERT(!waitqueue_active(&cvp->cv_event)); - if (cvp->cv_name) - kmem_free(cvp->cv_name, cvp->cv_name_size); - SEXIT; } EXPORT_SYMBOL(__cv_destroy); diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index ace9823c3..14000adbd 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -102,7 +102,7 @@ splat_condvar_test1(struct file *file, void *arg) cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ @@ -166,7 +166,7 @@ splat_condvar_test2(struct file *file, void *arg) cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ @@ -248,7 +248,7 @@ splat_condvar_test3(struct file *file, void *arg) cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ @@ -317,7 +317,7 @@ splat_condvar_test4(struct file *file, void *arg) cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; cv.cv_file = file; mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ @@ -386,7 +386,7 @@ splat_condvar_test5(struct file *file, void *arg) int rc = 0; mutex_init(&mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&condvar, SPLAT_CONDVAR_TEST_NAME, CV_DEFAULT, NULL); + cv_init(&condvar, NULL, CV_DEFAULT, NULL); splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread going to sleep for " "%d second and expecting to be woken by timeout\n", 1); From 05b8f50c3318cc904059a6f36d83730790d7d9fe Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Thu, 15 Dec 2011 13:48:37 -0800 Subject: [PATCH 0583/1062] Update a comment to reflect new taskq internals As of the removal of the taskq work list made in commit: commit 2c02b71b1411176905228666abf7a50a2e5f85dc Author: Prakash Surya Date: Mon Dec 5 17:32:48 2011 -0800 Replace tq_work_list and tq_threads in taskq_t To lay the ground work for introducing the taskq_dispatch_prealloc() interface, the tq_work_list and tq_threads fields had to be replaced with new alternatives in the taskq_t structure. the comment above taskq_wait_check has been incorrect. This change is an attempt at bringing that description more in line with the current implementation. Essentially, references to the old task work list had to be updated to reference the new taskq thread active list. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #65 --- module/spl/spl-taskq.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 0b3b3a131..67a834572 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -156,19 +156,22 @@ task_done(taskq_t *tq, taskq_ent_t *t) * monotonically increasing taskqid and added to the tail of the pending * list. As worker threads become available the tasks are removed from * the head of the pending or priority list, giving preference to the - * priority list. The tasks are then added to the work list, preserving - * the ordering by taskqid. Finally, as tasks complete they are removed - * from the work list. This means that the pending and work lists are - * always kept sorted by taskqid. Thus the lowest outstanding - * incomplete taskqid can be determined simply by checking the min - * taskqid for each head item on the pending, priority, and work list. - * This value is stored in tq->tq_lowest_id and only updated to the new - * lowest id when the previous lowest id completes. All taskqids lower - * than tq->tq_lowest_id must have completed. It is also possible - * larger taskqid's have completed because they may be processed in - * parallel by several worker threads. However, this is not a problem - * because the behavior of taskq_wait_id() is to block until all - * previously submitted taskqid's have completed. + * priority list. The tasks are then removed from their respective + * list, and the taskq_thread servicing the task is added to the active + * list, preserving the order using the serviced task's taskqid. + * Finally, as tasks complete the taskq_thread servicing the task is + * removed from the active list. This means that the pending task and + * active taskq_thread lists are always kept sorted by taskqid. Thus the + * lowest outstanding incomplete taskqid can be determined simply by + * checking the min taskqid for each head item on the pending, priority, + * and active taskq_thread list. This value is stored in + * tq->tq_lowest_id and only updated to the new lowest id when the + * previous lowest id completes. All taskqids lower than + * tq->tq_lowest_id must have completed. It is also possible larger + * taskqid's have completed because they may be processed in parallel by + * several worker threads. However, this is not a problem because the + * behavior of taskq_wait_id() is to block until all previously + * submitted taskqid's have completed. * * XXX: Taskqid_t wrapping is not handled. However, taskqid_t's are * 64-bit values so even if a taskq is processing 2^24 (16,777,216) From cb75844e859f1b97294f53e8370d8e5110b14779 Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Sat, 28 Apr 2012 06:29:25 +0000 Subject: [PATCH 0584/1062] Define the needed ISA types for ARM Add the minimum required ISA types to support the ARM architecture. Signed-off-by: Brian Behlendorf --- include/sys/isa_defs.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 10c0e0d3d..02136c596 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -74,7 +74,24 @@ #define _LP64 #endif -#else /* Currently only x86_64, i386, and powerpc arches supported */ +/* arm arch specific defines */ +#elif defined(__arm) || defined(__arm__) + +#if !defined(__arm) +#define __arm +#endif + +#if !defined(__arm__) +#define __arm__ +#endif + +#if defined(__ARMEL__) +#define _LITTLE_ENDIAN +#else +#define _BIG_ENDIAN +#endif + +#else /* Currently only x86_64, i386, arm, and powerpc arches supported */ #error "Unsupported ISA type" #endif From ef6f91ce0c96f7440a6fab23cb605a7f67185790 Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Wed, 2 May 2012 00:15:28 +0000 Subject: [PATCH 0585/1062] Add missing 64-bit divide for 32-bit ARM Leverage the existing generic 64-bit division operations which were originally implemented for x86 to support ARM. All that is required is to make the symbols available to the linker with the expected names. Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index be099aaae..d22100ea3 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -183,7 +183,7 @@ __udivdi3(uint64_t u, uint64_t v) q0 = q0 - 1; // too small by 1. if ((u - q0 * v) >= v) q0 = q0 + 1; // Now q0 is correct. - + return q0; } } @@ -212,6 +212,27 @@ __umoddi3(uint64_t dividend, uint64_t divisor) } EXPORT_SYMBOL(__umoddi3); +#if defined(__arm) || defined(__arm__) +/* + * Implementation of 64-bit unsigned division for 32-bit arm machines. + */ +uint64_t +__aeabi_uldivmod(uint64_t u, uint64_t v) +{ + return __udivdi3(u, v); +} +EXPORT_SYMBOL(__aeabi_uldivmod); + +/* + * Implementation of 64-bit signed division for 32-bit arm machines. + */ +int64_t +__aeabi_ldivmod(int64_t u, int64_t v) +{ + return __divdi3(u, v); +} +EXPORT_SYMBOL(__aeabi_ldivmod); +#endif /* __arm || __arm__ */ #endif /* BITS_PER_LONG */ /* NOTE: The strtoxx behavior is solely based on my reading of the Solaris From cef7605c342a87eb108b6eac919cae737c08a230 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 27 Apr 2012 15:10:02 -0700 Subject: [PATCH 0586/1062] Throttle number of freed slabs based on nr_to_scan Previously, the SPL tried to maintain Solaris semantics by freeing all available (empty) slabs from its slab caches when the shrinker was called. This is not desirable when running on Linux. To make the SPL shrinker more Linux friendly, the actual number of freed slabs from each of the slab caches is now derived from nr_to_scan and skc_slab_objs. Additionally, an accounting bug was fixed in spl_slab_reclaim() which could cause us to reclaim one more slab than requested. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #101 --- include/sys/kmem.h | 5 +++-- module/spl/spl-kmem.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 72f70c282..aa5a45476 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -418,7 +418,7 @@ extern void spl_kmem_cache_set_move(kmem_cache_t *, extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); -extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc); +extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count); extern void spl_kmem_reap(void); int spl_kmem_init_kallsyms_lookup(void); @@ -431,7 +431,8 @@ void spl_kmem_fini(void); #define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) #define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) #define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) -#define kmem_cache_reap_now(skc) spl_kmem_cache_reap_now(skc) +#define kmem_cache_reap_now(skc) \ + spl_kmem_cache_reap_now(skc, skc->skc_reap) #define kmem_reap() spl_kmem_reap() #define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ ((ptr) < (void *)VMALLOC_END)) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 446dab128..eadf1cb17 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1087,7 +1087,7 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) * scanning. Additionally, stop when reaching the target * reclaim 'count' if a non-zero threshold is given. */ - if ((sks->sks_ref > 0) || (count && i > count)) + if ((sks->sks_ref > 0) || (count && i >= count)) break; if (time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)||flag) { @@ -1857,8 +1857,9 @@ EXPORT_SYMBOL(spl_kmem_cache_free); * is called. The shrinker should return the number of free objects * in the cache when called with nr_to_scan == 0 but not attempt to * free any objects. When nr_to_scan > 0 it is a request that nr_to_scan - * objects should be freed, because Solaris semantics are to free - * all available objects we may free more objects than requested. + * objects should be freed, which differs from Solaris semantics. + * Solaris semantics are to free all available objects which may (and + * probably will) be more objects than the requested nr_to_scan. */ static int __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, @@ -1870,7 +1871,8 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, down_read(&spl_kmem_cache_sem); list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { if (sc->nr_to_scan) - spl_kmem_cache_reap_now(skc); + spl_kmem_cache_reap_now(skc, + MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); /* * Presume everything alloc'ed in reclaimable, this ensures @@ -1896,7 +1898,7 @@ SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); * effort and we do not want to thrash creating and destroying slabs. */ void -spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) +spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) { SENTRY; @@ -1914,7 +1916,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc) if (skc->skc_reclaim) skc->skc_reclaim(skc->skc_private); - spl_slab_reclaim(skc, skc->skc_reap, 0); + spl_slab_reclaim(skc, count, 0); clear_bit(KMC_BIT_REAPING, &skc->skc_flags); atomic_dec(&skc->skc_ref); From c0e0fc14e3e65e519849dd9fbfb94a6c79d0d149 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 27 Apr 2012 12:43:49 -0700 Subject: [PATCH 0587/1062] Ignore slab cache age and delay in direct reclaim When memory pressure triggers direct memory reclaim, a slabs age and delay should not prevent it from being freed. This patch ensures these values are ignored, allowing an empty slab to be freed in this code path no matter the value of its age and delay. This prevents needless scanning of the partial slabs and has been observed to significantly reduce the total cpu usage. In addition, it should allow for snappier reclaim under memory pressure. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #102 --- module/spl/spl-kmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index eadf1cb17..361030b18 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1916,7 +1916,8 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) if (skc->skc_reclaim) skc->skc_reclaim(skc->skc_private); - spl_slab_reclaim(skc, count, 0); + /* Reclaim from the cache, ignoring it's age and delay. */ + spl_slab_reclaim(skc, count, 1); clear_bit(KMC_BIT_REAPING, &skc->skc_flags); atomic_dec(&skc->skc_ref); From 06089b9e1929440e07a9eb7a11e68197a4ab40f2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 May 2012 15:49:07 -0700 Subject: [PATCH 0588/1062] Ensure direct reclaim forward progress The Linux direct reclaim path uses this out of band value to determine if forward progress is being made. Normally this is incremented by kmem_freepages() which is part of the various Linux slab implementations. However, since we are using none of that infrastructure we're responsible for incrementing this count. If no forward progress is detected and a subsequent allocation fails the OOM killer will be invoked. If there was forward progress additional reclaim will be attempted via the page cache and registerd shrinker until the allocation succeeds. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #107 --- module/spl/spl-kmem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 361030b18..f7d5f7e86 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -880,6 +880,16 @@ kv_free(spl_kmem_cache_t *skc, void *ptr, int size) ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); ASSERT(ISP2(size)); + /* + * The Linux direct reclaim path uses this out of band value to + * determine if forward progress is being made. Normally this is + * incremented by kmem_freepages() which is part of the various + * Linux slab implementations. However, since we are using none + * of that infrastructure we are responsible for incrementing it. + */ + if (current->reclaim_state) + current->reclaim_state->reclaimed_slab += size >> PAGE_SHIFT; + if (skc->skc_flags & KMC_KMEM) free_pages((unsigned long)ptr, get_order(size)); else From b78d4b9d98b8486199ba9072d7fc345121a4601f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 May 2012 14:27:29 -0700 Subject: [PATCH 0589/1062] Ensure a minimum of one slab is reclaimed To minimize the chance of triggering an OOM during direct reclaim. The kmem caches have been improved to make a best effort to reclaim at least one slab when a reclaim function is registered. This helps avoid the case where objects are released but they are spread over multiple slabs so no memory gets reclaimed. Care has been taken to avoid deadlocking if the reclaim function is unable to make forward progress. Additionally, the reclaim function may be skipped entirely if there are already free slabs which can be safely reaped. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #107 --- module/spl/spl-kmem.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f7d5f7e86..e1d74d3c0 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1923,8 +1923,38 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) atomic_inc(&skc->skc_ref); - if (skc->skc_reclaim) - skc->skc_reclaim(skc->skc_private); + /* + * When a reclaim function is available it may be invoked repeatedly + * until at least a single slab can be freed. This ensures that we + * do free memory back to the system. This helps minimize the chance + * of an OOM event when the bulk of memory is used by the slab. + * + * When free slabs are already available the reclaim callback will be + * skipped. Additionally, if no forward progress is detected despite + * a reclaim function the cache will be skipped to avoid deadlock. + * + * Longer term this would be the correct place to add the code which + * repacks the slabs in order minimize fragmentation. + */ + if (skc->skc_reclaim) { + uint64_t objects = UINT64_MAX; + int do_reclaim; + + do { + spin_lock(&skc->skc_lock); + do_reclaim = + (skc->skc_slab_total > 0) && + ((skc->skc_slab_total - skc->skc_slab_alloc) == 0) && + (skc->skc_obj_alloc < objects); + + objects = skc->skc_obj_alloc; + spin_unlock(&skc->skc_lock); + + if (do_reclaim) + skc->skc_reclaim(skc->skc_private); + + } while (do_reclaim); + } /* Reclaim from the cache, ignoring it's age and delay. */ spl_slab_reclaim(skc, count, 1); From a9a7a01cf5a61fe170569ebb44d288111d0ddbeb Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Mon, 30 Apr 2012 15:37:49 -0700 Subject: [PATCH 0590/1062] Add SPLAT test to exercise slab direct reclaim This test is designed to verify that direct reclaim is functioning as expected. We allocate a large number of objects thus creating a large number of slabs. We then apply memory pressure and expect that the direct reclaim path can easily recover those slabs. The registered reclaim function will free the objects and the slab shrinker will call it repeatedly until at least a single slab can be freed. Note it may not be possible to reclaim every last slab via direct reclaim without a failure because the shrinker_rwsem may be contended. For this reason, quickly reclaiming 3/4 of the slabs is considered a success. This should all be possible within 10 seconds. For reference, on a system with 2G of memory this test takes roughly 0.2 seconds to run. It may take longer on larger memory systems but should still easily complete in the alloted 10 seconds. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #107 --- module/splat/splat-kmem.c | 195 ++++++++++++++++++++++++++++++++------ 1 file changed, 165 insertions(+), 30 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 168ab0ced..8613ddc29 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -79,6 +79,10 @@ #define SPLAT_KMEM_TEST12_NAME "vmem_size" #define SPLAT_KMEM_TEST12_DESC "Memory zone test" +#define SPLAT_KMEM_TEST13_ID 0x010d +#define SPLAT_KMEM_TEST13_NAME "slab_reclaim" +#define SPLAT_KMEM_TEST13_DESC "Slab direct memory reclaim test" + #define SPLAT_KMEM_ALLOC_COUNT 10 #define SPLAT_VMEM_ALLOC_COUNT 10 @@ -338,6 +342,28 @@ splat_kmem_cache_test_kct_free(kmem_cache_thread_t *kct) kct->kct_kcd_count * sizeof(kmem_cache_data_t *)); } +static void +splat_kmem_cache_test_debug(struct file *file, char *name, + kmem_cache_priv_t *kcp) +{ + int j; + + splat_vprint(file, name, + "%s cache objects %d, slabs %u/%u objs %u/%u mags ", + kcp->kcp_cache->skc_name, kcp->kcp_count, + (unsigned)kcp->kcp_cache->skc_slab_alloc, + (unsigned)kcp->kcp_cache->skc_slab_total, + (unsigned)kcp->kcp_cache->skc_obj_alloc, + (unsigned)kcp->kcp_cache->skc_obj_total); + + for_each_online_cpu(j) + splat_print(file, "%u/%u ", + kcp->kcp_cache->skc_mag[j]->skm_avail, + kcp->kcp_cache->skc_mag[j]->skm_size); + + splat_print(file, "%s\n", ""); +} + static int splat_kmem_cache_test_constructor(void *ptr, void *priv, int flags) { @@ -768,7 +794,7 @@ splat_kmem_test8(struct file *file, void *arg) { kmem_cache_priv_t *kcp; kmem_cache_data_t *kcd; - int i, j, rc = 0; + int i, rc = 0; kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST8_NAME, 256, 0, 0, SPLAT_KMEM_OBJ_COUNT); @@ -815,20 +841,7 @@ splat_kmem_test8(struct file *file, void *arg) */ for (i = 0; i < 60; i++) { kmem_cache_reap_now(kcp->kcp_cache); - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "%s cache objects %d, slabs %u/%u objs %u/%u mags ", - SPLAT_KMEM_CACHE_NAME, kcp->kcp_count, - (unsigned)kcp->kcp_cache->skc_slab_alloc, - (unsigned)kcp->kcp_cache->skc_slab_total, - (unsigned)kcp->kcp_cache->skc_obj_alloc, - (unsigned)kcp->kcp_cache->skc_obj_total); - - for_each_online_cpu(j) - splat_print(file, "%u/%u ", - kcp->kcp_cache->skc_mag[j]->skm_avail, - kcp->kcp_cache->skc_mag[j]->skm_size); - - splat_print(file, "%s\n", ""); + splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST8_NAME, kcp); if (kcp->kcp_cache->skc_obj_total == 0) break; @@ -868,7 +881,7 @@ splat_kmem_test9(struct file *file, void *arg) { kmem_cache_priv_t *kcp; kmem_cache_data_t *kcd; - int i, j, rc = 0, count = SPLAT_KMEM_OBJ_COUNT * 128; + int i, rc = 0, count = SPLAT_KMEM_OBJ_COUNT * 128; kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST9_NAME, 256, 0, 0, count); @@ -917,20 +930,7 @@ splat_kmem_test9(struct file *file, void *arg) * if it takes longer than this something has gone wrong. */ for (i = 0; i < 60; i++) { - splat_vprint(file, SPLAT_KMEM_TEST9_NAME, - "%s cache objects %d, slabs %u/%u objs %u/%u mags ", - SPLAT_KMEM_CACHE_NAME, kcp->kcp_count, - (unsigned)kcp->kcp_cache->skc_slab_alloc, - (unsigned)kcp->kcp_cache->skc_slab_total, - (unsigned)kcp->kcp_cache->skc_obj_alloc, - (unsigned)kcp->kcp_cache->skc_obj_total); - - for_each_online_cpu(j) - splat_print(file, "%u/%u ", - kcp->kcp_cache->skc_mag[j]->skm_avail, - kcp->kcp_cache->skc_mag[j]->skm_size); - - splat_print(file, "%s\n", ""); + splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST9_NAME, kcp); if (kcp->kcp_cache->skc_obj_total == 0) break; @@ -1106,6 +1106,138 @@ splat_kmem_test12(struct file *file, void *arg) return 0; } +typedef struct dummy_page { + struct list_head dp_list; + char dp_pad[PAGE_SIZE - sizeof(struct list_head)]; +} dummy_page_t; + +/* + * This test is designed to verify that direct reclaim is functioning as + * expected. We allocate a large number of objects thus creating a large + * number of slabs. We then apply memory pressure and expect that the + * direct reclaim path can easily recover those slabs. The registered + * reclaim function will free the objects and the slab shrinker will call + * it repeatedly until at least a single slab can be freed. + * + * Note it may not be possible to reclaim every last slab via direct reclaim + * without a failure because the shrinker_rwsem may be contended. For this + * reason, quickly reclaiming 3/4 of the slabs is considered a success. + * + * This should all be possible within 10 seconds. For reference, on a + * system with 2G of memory this test takes roughly 0.2 seconds to run. + * It may take longer on larger memory systems but should still easily + * complete in the alloted 10 seconds. + */ +static int +splat_kmem_test13(struct file *file, void *arg) +{ + kmem_cache_priv_t *kcp; + kmem_cache_data_t *kcd; + dummy_page_t *dp; + struct list_head list; + struct timespec start, delta; + int size, count, slabs, fails = 0; + int i, rc = 0, max_time = 10; + + size = 128 * 1024; + count = ((physmem * PAGE_SIZE) / 4 / size); + + kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST13_NAME, + size, 0, 0, count); + if (!kcp) { + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, + "Unable to create '%s'\n", "kcp"); + return -ENOMEM; + } + + kcp->kcp_cache = + kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, 0, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + splat_kmem_cache_test_reclaim, + kcp, NULL, 0); + if (!kcp->kcp_cache) { + splat_kmem_cache_test_kcp_free(kcp); + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, + "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); + return -ENOMEM; + } + + for (i = 0; i < count; i++) { + kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); + spin_lock(&kcp->kcp_lock); + kcp->kcp_kcd[i] = kcd; + spin_unlock(&kcp->kcp_lock); + if (!kcd) { + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, + "Unable to allocate from '%s'\n", + SPLAT_KMEM_CACHE_NAME); + } + } + + i = 0; + slabs = kcp->kcp_cache->skc_slab_total; + INIT_LIST_HEAD(&list); + start = current_kernel_time(); + + while (kcp->kcp_cache->skc_slab_total > (slabs >> 2)) { + + if ((i % 10000) == 0) + splat_kmem_cache_test_debug( + file, SPLAT_KMEM_TEST13_NAME, kcp); + + delta = timespec_sub(current_kernel_time(), start); + if (delta.tv_sec >= max_time) { + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, + "Failed to reclaim 3/4 of cache in %ds, " + "%u/%u slabs remain\n", max_time, + (unsigned)kcp->kcp_cache->skc_slab_total, + slabs); + rc = -ETIME; + break; + } + + dp = (dummy_page_t *)__get_free_page(GFP_KERNEL | __GFP_NORETRY); + if (!dp) { + fails++; + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, + "Failed (%d) to allocate page with %u " + "slabs still in the cache\n", fails, + (unsigned)kcp->kcp_cache->skc_slab_total); + continue; + } + + list_add(&dp->dp_list, &list); + i++; + } + + if (rc == 0) + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, + "Successfully created %u slabs and with %d alloc " + "failures reclaimed 3/4 of them in %d.%03ds\n", + slabs, fails, + (int)delta.tv_sec, (int)delta.tv_nsec / 1000000); + + /* Release memory pressure pages */ + while (!list_empty(&list)) { + dp = list_entry(list.next, dummy_page_t, dp_list); + list_del_init(&dp->dp_list); + free_page((unsigned long)dp); + } + + /* Release remaining kmem cache objects */ + spin_lock(&kcp->kcp_lock); + for (i = 0; i < count; i++) + if (kcp->kcp_kcd[i]) + kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); + spin_unlock(&kcp->kcp_lock); + + kmem_cache_destroy(kcp->kcp_cache); + splat_kmem_cache_test_kcp_free(kcp); + + return rc; +} + splat_subsystem_t * splat_kmem_init(void) { @@ -1149,6 +1281,8 @@ splat_kmem_init(void) #endif /* _LP64 */ SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST12_NAME, SPLAT_KMEM_TEST12_DESC, SPLAT_KMEM_TEST12_ID, splat_kmem_test12); + SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST13_NAME, SPLAT_KMEM_TEST13_DESC, + SPLAT_KMEM_TEST13_ID, splat_kmem_test13); return sub; } @@ -1157,6 +1291,7 @@ void splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST13_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST12_ID); #ifdef _LP64 SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST11_ID); From f90096c9056b5d3c653c53181a64f5ea6794163f Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 1 May 2012 09:34:39 -0400 Subject: [PATCH 0591/1062] Modify KM_PUSHPAGE to use GFP_NOIO instead of GFP_NOFS The resolution of issue #31 made KM_PUSHPAGE imply GFP_NOFS. This was done to prevent situations where filesystem operations which are holding locks enter direct reclaim and attempt to reaquire those same locks. This clearly will result in a deadlock. This works for datasets which are implemented in terms for filesystem operations. But unfortunately, swapping to a zvol will encounter many of the same deadlocks and GFP_NOFS will not prevent this. As such, it is appropriate to extend KM_PUSHPAGE to use the broader GFP_NOIO mask to handle these non-filesystem cases. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#342 Closes #105 --- include/sys/kmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index aa5a45476..eda4eee8d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -43,7 +43,7 @@ */ #define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */ #define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */ -#define KM_PUSHPAGE (GFP_NOFS | __GFP_HIGH) /* Use reserved memory */ +#define KM_PUSHPAGE (GFP_NOIO | __GFP_HIGH) /* Use reserved memory */ #define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */ #define KM_FLAGS __GFP_BITS_MASK #define KM_VMFLAGS GFP_LEVEL_MASK From 38d31a1e576fd7c6393b3039ad04b8be2ee95f81 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 May 2012 16:25:23 -0700 Subject: [PATCH 0592/1062] Remove Solaris module emulation Originally I believed that these interfaces would be needed. However, in practice it turned out that it was more straight forward and maintainable to use the native Linux interfaces. As such, this is all dead code and can be safely removed. Signed-off-by: Brian Behlendorf Closes #109 --- include/sys/sunddi.h | 262 ++-------------------------- module/spl/Makefile.in | 1 - module/spl/spl-module.c | 375 ---------------------------------------- 3 files changed, 10 insertions(+), 628 deletions(-) delete mode 100644 module/spl/spl-module.c diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 65df2a053..c3368083b 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -31,180 +31,23 @@ #include #include #include -#include -#include -#include -#include #include -#define DDI_MAX_NAME_LEN 32 - typedef int ddi_devid_t; -typedef enum { - DDI_INFO_DEVT2DEVINFO = 0, - DDI_INFO_DEVT2INSTANCE = 1 -} ddi_info_cmd_t; +#define DDI_DEV_T_NONE ((dev_t)-1) +#define DDI_DEV_T_ANY ((dev_t)-2) +#define DI_MAJOR_T_UNKNOWN ((major_t)0) -typedef enum { - DDI_ATTACH = 0, - DDI_RESUME = 1, - DDI_PM_RESUME = 2 -} ddi_attach_cmd_t; +#define DDI_PROP_DONTPASS 0x0001 +#define DDI_PROP_CANSLEEP 0x0002 -typedef enum { - DDI_DETACH = 0, - DDI_SUSPEND = 1, - DDI_PM_SUSPEND = 2, - DDI_HOTPLUG_DETACH = 3 -} ddi_detach_cmd_t; +#define DDI_SUCCESS 0 +#define DDI_FAILURE -1 -typedef enum { - DDI_RESET_FORCE = 0 -} ddi_reset_cmd_t; - -typedef enum { - PROP_LEN = 0, - PROP_LEN_AND_VAL_BUF = 1, - PROP_LEN_AND_VAL_ALLOC = 2, - PROP_EXISTS = 3 -} ddi_prop_op_t; - -typedef void *devmap_cookie_t; -typedef struct as { - uchar_t a_flags; -} as_t; - -typedef struct pollhead { - struct polldat *ph_list; -} pollhead_t; - -typedef struct dev_info { - kmutex_t di_lock; - char di_name[DDI_MAX_NAME_LEN]; - struct dev_ops *di_ops; - struct cdev *di_cdev; - spl_class *di_class; - spl_device *di_device; - major_t di_major; - minor_t di_minor; - dev_t di_dev; - unsigned di_minors; - int di_flags; - struct list_head di_list; -} dev_info_t; - -typedef struct cb_ops { - int (*cb_open)(dev_t *devp, int flag, int otyp, cred_t *credp); - int (*cb_close)(dev_t dev, int flag, int otyp, cred_t *credp); - int (*cb_strategy)(void *bp); - int (*cb_print)(dev_t dev, char *str); - int (*cb_dump)(dev_t dev, caddr_t addr, daddr_t blkno, int nblk); - int (*cb_read)(dev_t dev, struct uio *uiop, cred_t *credp); - int (*cb_write)(dev_t dev, struct uio *uiop, cred_t *credp); - int (*cb_ioctl)(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *credp, int *rvalp); - int (*cb_devmap)(dev_t dev, devmap_cookie_t dhp, offset_t off, - size_t len, size_t *maplen, uint_t model); - int (*cb_mmap)(dev_t dev, off_t off, int prot); - int (*cb_segmap)(dev_t dev, off_t off, struct as *asp, - caddr_t *addrp, off_t len, unsigned int prot, - unsigned int maxprot, unsigned int flags, - cred_t *credp); - int (*cb_chpoll)(dev_t dev, short events, int anyyet, - short *reventsp, struct pollhead **phpp); - int (*cb_prop_op)(dev_t dev, dev_info_t *dip, - ddi_prop_op_t prop_op, int mod_flags, - char *name, caddr_t valuep, int *length); - struct streamtab *cb_str; - int cb_flag; - int cb_rev; - int (*cb_aread)(dev_t dev, struct aio_req *aio, cred_t *credp); - int (*cb_awrite)(dev_t dev, struct aio_req *aio, cred_t *credp); -} cb_ops_t; - -typedef struct dev_ops { - int devo_rev; - int devo_refcnt; - - int (*devo_getinfo)(dev_info_t *dip, - ddi_info_cmd_t infocmd, void *arg, void **result); - int (*devo_identify)(dev_info_t *dip); - int (*devo_probe)(dev_info_t *dip); - int (*devo_attach)(dev_info_t *dip, ddi_attach_cmd_t cmd); - int (*devo_detach)(dev_info_t *dip, ddi_detach_cmd_t cmd); - int (*devo_reset)(dev_info_t *dip, ddi_reset_cmd_t cmd); - - struct cb_ops *devo_cb_ops; - struct bus_ops *devo_bus_ops; - int (*devo_power)(dev_info_t *dip, int component, int level); - int (*devo_quiesce)(dev_info_t *dip); -} dev_ops_t; - -typedef struct mod_ops { - int (*modm_install)(void); - int (*modm_remove)(void); - int (*modm_info)(void); -} mod_ops_t; - -typedef struct modldrv { - struct mod_ops *drv_modops; - char *drv_linkinfo; - struct dev_ops *drv_dev_ops; - struct dev_info *drv_dev_info; -} modldrv_t; - -#define MODREV_1 1 - -#define D_NEW 0x000 -#define D_MP 0x020 -#define D_64BIT 0x200 - -#define DEVO_REV 3 -#define CB_REV 1 - -#define DDI_SUCCESS 0 -#define DDI_FAILURE -1 - -#define DDI_PSEUDO "ddi_pseudo" - -#define nodev NULL -#define nochpoll NULL -#define nulldev NULL -#define mod_driverops NULL -#define ddi_prop_op NULL - -#define getminor(x) (x) -#define getmajor(x) (x) -#define ddi_driver_major(di) getmajor(di->di_dev) - -#define DDI_DEV_T_NONE ((dev_t)-1) -#define DDI_DEV_T_ANY ((dev_t)-2) -#define DDI_MAJOR_T_UNKNOWN ((major_t)0) - -#define DDI_PROP_DONTPASS 0x0001 -#define DDI_PROP_CANSLEEP 0x0002 - -#define GLOBAL_DEV 0x02 -#define NODEBOUND_DEV 0x04 -#define NODESPECIFIC_DEV 0x06 -#define ENUMERATED_DEV 0x08 - -#define ddi_prop_lookup_string(x1,x2,x3,x4,x5) (*x5 = NULL) -#define ddi_prop_free(x) (void)0 -#define ddi_root_node() (void)0 - -#define mod_install(x) 0 -#define mod_remove(x) 0 - -extern int __ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type, - minor_t minor_num, char *node_type, - int flags, struct module *mod); -extern void __ddi_remove_minor_node(dev_info_t *dip, char *name); -extern int ddi_quiesce_not_needed(dev_info_t *dip); -extern int __mod_install(struct modlinkage *modlp); -extern int __mod_remove(struct modlinkage *modlp); -extern int __mod_mknod(char *name, char *type, int major, int minor); +#define ddi_prop_lookup_string(x1,x2,x3,x4,x5) (*x5 = NULL) +#define ddi_prop_free(x) (void)0 +#define ddi_root_node() (void)0 extern int ddi_strtoul(const char *, char **, int, unsigned long *); extern int ddi_strtol(const char *, char **, int, long *); @@ -214,89 +57,4 @@ extern int ddi_strtoll(const char *, char **, int, long long *); extern int ddi_copyin(const void *from, void *to, size_t len, int flags); extern int ddi_copyout(const void *from, void *to, size_t len, int flags); -static __inline__ void ddi_report_dev(dev_info_t *d) { } -static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { } - -static __inline__ void -ddi_remove_minor_node(dev_info_t *di, char *name) -{ -#ifdef HAVE_GPL_ONLY_SYMBOLS - /* Cleanup udev (GPL-only symbols required). This is performed as - * part of an inline function to ensure that these symbols are not - * linked against the SPL which is GPL'ed. But instead they are - * linked against the package building against the SPL to ensure - * its license allows linking with GPL-only symbols. */ - if (di->di_class) { - spl_device_destroy(di->di_class, di->di_device, di->di_dev); - spl_class_destroy(di->di_class); - di->di_class = NULL; - di->di_dev = 0; - } -#else - /* When we do not have access to the GPL-only device interfaces we - * are forced to do something crude. We unlink the special device - * file in /dev/ ourselves from within the kernel. On the upside we - * are already providing this functionality for Solaris, and it is - * easy to leverage the Solaris API to perform the unlink. */ - if (strlen(di->di_name) > 0) - vn_remove(di->di_name, UIO_SYSSPACE, RMFILE); - -#endif /* HAVE_GPL_ONLY_SYMBOLS */ - - __ddi_remove_minor_node(di, name); -} - -static __inline__ int -ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, - minor_t minor_num, char *node_type, int flags) -{ - int rc; - - rc = __ddi_create_minor_node(di, name, spec_type, minor_num, - node_type, flags, THIS_MODULE); - if (rc) - return rc; - -#ifdef HAVE_GPL_ONLY_SYMBOLS - /* Setup udev (GPL-only symbols required). This is performed as - * part of an inline function to ensure that these symbols are not - * linked against the SPL which is GPL'ed. But instead they are - * linked against the package building against the SPL to ensure - * its license allows linking with GPL-only symbols. */ - di->di_class = spl_class_create(THIS_MODULE, name); - if (IS_ERR(di->di_class)) { - rc = PTR_ERR(di->di_class); - di->di_class = NULL; - ddi_remove_minor_node(di, name); - return DDI_FAILURE; - } - - /* Do not append a 0 to devices with minor nums of 0 */ - di->di_device = spl_device_create(di->di_class, NULL, di->di_dev, NULL, - (di->di_minor == 0) ? "%s" : "%s%d", - name, di->di_minor); -#else - /* When we do not have access to the GPL-only device interfaces we - * are forced to do something horible. We use a user mode helper to - * create the special device file in /dev/. By futher extending the - * Solaris vnode implementation we could potentially do a vn_create() - * from within the kernel but that's still a hack. */ - if (name) { - rc = __mod_mknod(di->di_name, "c", di->di_major, di->di_minor); - if (rc) { - ddi_remove_minor_node(di, name); - } - } - -#endif /* HAVE_GPL_ONLY_SYMBOLS */ - - return rc; -} - -#undef mod_install -#undef mod_remove - -#define mod_install __mod_install -#define mod_remove __mod_remove - #endif /* SPL_SUNDDI_H */ diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index a0211d2db..4f54f124f 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -18,7 +18,6 @@ spl-objs += @top_srcdir@/module/spl/spl-vnode.o spl-objs += @top_srcdir@/module/spl/spl-err.o spl-objs += @top_srcdir@/module/spl/spl-time.o spl-objs += @top_srcdir@/module/spl/spl-kobj.o -spl-objs += @top_srcdir@/module/spl/spl-module.o spl-objs += @top_srcdir@/module/spl/spl-generic.o spl-objs += @top_srcdir@/module/spl/spl-atomic.o spl-objs += @top_srcdir@/module/spl/spl-mutex.o diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c deleted file mode 100644 index 7a626ca71..000000000 --- a/module/spl/spl-module.c +++ /dev/null @@ -1,375 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting Layer (SPL) Module Implementation. -\*****************************************************************************/ - -#include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_MODULE - -static DEFINE_SPINLOCK(dev_info_lock); -static LIST_HEAD(dev_info_list); - -static struct dev_info * -get_dev_info(dev_t dev) -{ - struct dev_info *di; - - spin_lock(&dev_info_lock); - - list_for_each_entry(di, &dev_info_list, di_list) - if (di->di_dev == dev) - goto out; - - di = NULL; -out: - spin_unlock(&dev_info_lock); - return di; -} - -static long -mod_generic_unlocked_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct inode *ino = file->f_dentry->d_inode; - struct dev_info *di; - int rc, flags = 0, rvalp = 0; - cred_t *cr = NULL; - - di = get_dev_info(MKDEV(imajor(ino), iminor(ino))); - if (di == NULL) - return -EINVAL; - - rc = di->di_ops->devo_cb_ops->cb_ioctl(di->di_dev, - (int)cmd, (intptr_t)arg, - flags, cr, &rvalp); - /* - * The Solaris the kernel returns positive error codes to indicate - * a failure. Under linux the kernel is expected to return a - * small negative value which is trapped by libc and used to - * set errno correctly. For this reason we negate the Solaris - * return code to ensure errno gets set correctly. - */ - return -rc; -} - -#ifdef CONFIG_COMPAT -/* Compatibility handler for ioctls from 32-bit ELF binaries */ -static long -mod_generic_compat_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) -{ - return mod_generic_unlocked_ioctl(file, cmd, arg); -} -#endif /* CONFIG_COMPAT */ - -int -__ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, - minor_t minor_num, char *node_type, - int flags, struct module *mod) -{ - struct cdev *cdev; - struct cb_ops *cb_ops; - struct file_operations *fops; - int rc; - SENTRY; - - ASSERT(spec_type == S_IFCHR); - ASSERT(minor_num < di->di_minors); - ASSERT(!strcmp(node_type, DDI_PSEUDO)); - - fops = kzalloc(sizeof(struct file_operations), GFP_KERNEL); - if (fops == NULL) - SRETURN(DDI_FAILURE); - - cdev = cdev_alloc(); - if (cdev == NULL) { - kfree(fops); - SRETURN(DDI_FAILURE); - } - - cdev->ops = fops; - - mutex_enter(&di->di_lock); - cb_ops = di->di_ops->devo_cb_ops; - ASSERT(cb_ops); - - /* Setup the fops to cb_ops mapping */ - fops->owner = mod; - if (cb_ops->cb_ioctl) { - fops->unlocked_ioctl = mod_generic_unlocked_ioctl; -#ifdef CONFIG_COMPAT - fops->compat_ioctl = mod_generic_compat_ioctl; -#endif - } - -#if 0 - if (cb_ops->cb_open) - fops->open = mod_generic_open; - - if (cb_ops->cb_close) - fops->release = mod_generic_close; - - if (cb_ops->cb_read) - fops->read = mod_generic_read; - - if (cb_ops->cb_write) - fops->write = mod_generic_write; -#endif - /* XXX: Currently unsupported operations */ - ASSERT(cb_ops->cb_open == NULL); - ASSERT(cb_ops->cb_close == NULL); - ASSERT(cb_ops->cb_read == NULL); - ASSERT(cb_ops->cb_write == NULL); - ASSERT(cb_ops->cb_strategy == NULL); - ASSERT(cb_ops->cb_print == NULL); - ASSERT(cb_ops->cb_dump == NULL); - ASSERT(cb_ops->cb_devmap == NULL); - ASSERT(cb_ops->cb_mmap == NULL); - ASSERT(cb_ops->cb_segmap == NULL); - ASSERT(cb_ops->cb_chpoll == NULL); - ASSERT(cb_ops->cb_prop_op == NULL); - ASSERT(cb_ops->cb_str == NULL); - ASSERT(cb_ops->cb_aread == NULL); - ASSERT(cb_ops->cb_awrite == NULL); - - snprintf(di->di_name, DDI_MAX_NAME_LEN-1, "/dev/%s", name); - di->di_cdev = cdev; - di->di_flags = flags; - di->di_minor = minor_num; - di->di_dev = MKDEV(di->di_major, di->di_minor); - - rc = cdev_add(cdev, di->di_dev, 1); - if (rc) { - SERROR("Error adding cdev, %d\n", rc); - kfree(fops); - cdev_del(cdev); - mutex_exit(&di->di_lock); - SRETURN(DDI_FAILURE); - } - - spin_lock(&dev_info_lock); - list_add(&di->di_list, &dev_info_list); - spin_unlock(&dev_info_lock); - - mutex_exit(&di->di_lock); - - SRETURN(DDI_SUCCESS); -} -EXPORT_SYMBOL(__ddi_create_minor_node); - -static void -__ddi_remove_minor_node_locked(dev_info_t *di, char *name) -{ - if (di->di_cdev) { - cdev_del(di->di_cdev); - di->di_cdev = NULL; - } - - spin_lock(&dev_info_lock); - list_del_init(&di->di_list); - spin_unlock(&dev_info_lock); -} - -void -__ddi_remove_minor_node(dev_info_t *di, char *name) -{ - SENTRY; - mutex_enter(&di->di_lock); - __ddi_remove_minor_node_locked(di, name); - mutex_exit(&di->di_lock); - SEXIT; -} -EXPORT_SYMBOL(__ddi_remove_minor_node); - -int -ddi_quiesce_not_needed(dev_info_t *dip) -{ - SRETURN(DDI_SUCCESS); -} -EXPORT_SYMBOL(ddi_quiesce_not_needed); - -#if 0 -static int -mod_generic_open(struct inode *, struct file *) -{ - open(dev_t *devp, int flags, int otyp, cred_t *credp); -} - -static int -mod_generic_close(struct inode *, struct file *) -{ - close(dev_t dev, int flags, int otyp, cred_t *credp); -} - -static ssize_t -mod_generic_read(struct file *, char __user *, size_t, loff_t *) -{ - read(dev_t dev, struct uio *uiop, cred_t *credp); -} - -static ssize_t -mod_generic_write(struct file *, const char __user *, size_t, loff_t *) -{ - write(dev_t dev, struct uio *uiop, cred_t *credp); -} -#endif - -static struct dev_info * -dev_info_alloc(major_t major, minor_t minors, struct dev_ops *ops) { - struct dev_info *di; - - di = kmalloc(sizeof(struct dev_info), GFP_KERNEL); - if (di == NULL) - return NULL; - - mutex_init(&di->di_lock, NULL, MUTEX_DEFAULT, NULL); - INIT_LIST_HEAD(&di->di_list); - di->di_ops = ops; - di->di_class = NULL; - di->di_cdev = NULL; - di->di_major = major; - di->di_minor = 0; - di->di_minors = minors; - di->di_dev = 0; - - return di; -} - -static void -dev_info_free(struct dev_info *di) -{ - mutex_enter(&di->di_lock); - __ddi_remove_minor_node_locked(di, NULL); - mutex_exit(&di->di_lock); - mutex_destroy(&di->di_lock); - kfree(di); -} - -int -__mod_install(struct modlinkage *modlp) -{ - struct modldrv *drv = modlp->ml_modldrv; - struct dev_info *di; - int rc; - SENTRY; - - di = dev_info_alloc(modlp->ml_major, modlp->ml_minors, - drv->drv_dev_ops); - if (di == NULL) - SRETURN(ENOMEM); - - /* XXX: Really we need to be calling devo_probe if it's available - * and then calling devo_attach for each device discovered. However - * for now we just call it once and let the app sort it out. - */ - rc = drv->drv_dev_ops->devo_attach(di, DDI_ATTACH); - if (rc != DDI_SUCCESS) { - dev_info_free(di); - SRETURN(rc); - } - - drv->drv_dev_info = di; - - SRETURN(DDI_SUCCESS); -} -EXPORT_SYMBOL(__mod_install); - -int -__mod_mknod(char *name, char *type, int major, int minor) -{ - char cmd[] = "/bin/mknod"; - char major_str[8]; - char minor_str[8]; - char *argv[] = { cmd, - name, - type, - major_str, - minor_str, - NULL }; - char *envp[] = { "HOME=/", - "TERM=linux", - "PATH=/sbin:/usr/sbin:/bin:/usr/bin", - NULL }; - - snprintf(major_str, 8, "%d", major); - snprintf(minor_str, 8, "%d", minor); - - return call_usermodehelper(cmd, argv, envp, 1); -} -EXPORT_SYMBOL(__mod_mknod); - -int -__mod_remove(struct modlinkage *modlp) -{ - struct modldrv *drv = modlp->ml_modldrv; - struct dev_info *di = drv->drv_dev_info; - int rc; - SENTRY; - - rc = drv->drv_dev_ops->devo_detach(di, DDI_DETACH); - if (rc != DDI_SUCCESS) - SRETURN(rc); - - dev_info_free(di); - drv->drv_dev_info = NULL; - - SRETURN(DDI_SUCCESS); -} -EXPORT_SYMBOL(__mod_remove); - -int -ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip) -{ - ldi_ident_t li; - SENTRY; - - ASSERT(modlp); - ASSERT(lip); - - li = kmalloc(sizeof(struct ldi_ident), GFP_KERNEL); - if (li == NULL) - SRETURN(ENOMEM); - - li->li_dev = MKDEV(modlp->ml_major, 0); - *lip = li; - - SRETURN(0); -} -EXPORT_SYMBOL(ldi_ident_from_mod); - -void -ldi_ident_release(ldi_ident_t lip) -{ - SENTRY; - ASSERT(lip); - kfree(lip); - SEXIT; -} -EXPORT_SYMBOL(ldi_ident_release); From 93b0dc92eab55f8729b4798b383d4670073ebddc Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Tue, 15 May 2012 05:45:09 +0000 Subject: [PATCH 0593/1062] Fix ARM 64-bit division Correctly implementating 64-bit division for ARM requires more than just providing the __aeabi_uldivmod() and __aeabi_ldivmod() symbols. They are need to be implemented is such a way that the quotient and remainder and left in specific registers after the division operation completes. This change updates the wrapper functions to accomplish this according to the official ARM Run-time ABI. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#706 --- module/spl/spl-generic.c | 51 +++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index d22100ea3..785f668d6 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -214,22 +214,57 @@ EXPORT_SYMBOL(__umoddi3); #if defined(__arm) || defined(__arm__) /* - * Implementation of 64-bit unsigned division for 32-bit arm machines. + * Implementation of 64-bit (un)signed division for 32-bit arm machines. + * + * Run-time ABI for the ARM Architecture (page 20). A pair of (unsigned) + * long longs is returned in {{r0, r1}, {r2,r3}}, the quotient in {r0, r1}, + * and the remainder in {r2, r3}. The return type is specifically left + * set to 'void' to ensure the compiler does not overwrite these registers + * during the return. All results are in registers as per ABI */ -uint64_t +void __aeabi_uldivmod(uint64_t u, uint64_t v) { - return __udivdi3(u, v); + uint64_t res; + uint64_t mod; + + res = __udivdi3(u, v); + mod = __umoddi3(u, v); + { + register uint32_t r0 asm("r0") = (res & 0xFFFFFFFF); + register uint32_t r1 asm("r1") = (res >> 32); + register uint32_t r2 asm("r2") = (mod & 0xFFFFFFFF); + register uint32_t r3 asm("r3") = (mod >> 32); + + asm volatile("" + : "+r"(r0), "+r"(r1), "+r"(r2),"+r"(r3) /* output */ + : "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */ + + return; /* r0; */ + } } EXPORT_SYMBOL(__aeabi_uldivmod); -/* - * Implementation of 64-bit signed division for 32-bit arm machines. - */ -int64_t +void __aeabi_ldivmod(int64_t u, int64_t v) { - return __divdi3(u, v); + int64_t res; + uint64_t mod; + + res = __divdi3(u, v); + mod = __umoddi3(u, v); + { + register uint32_t r0 asm("r0") = (res & 0xFFFFFFFF); + register uint32_t r1 asm("r1") = (res >> 32); + register uint32_t r2 asm("r2") = (mod & 0xFFFFFFFF); + register uint32_t r3 asm("r3") = (mod >> 32); + + asm volatile("" + : "+r"(r0), "+r"(r1), "+r"(r2),"+r"(r3) /* output */ + : "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */ + + return; /* r0; */ + } } EXPORT_SYMBOL(__aeabi_ldivmod); #endif /* __arm || __arm__ */ From 2371321e8a3d29e19cbc3a280f48636211abb480 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 11 Jun 2012 09:12:37 -0700 Subject: [PATCH 0594/1062] Fix invalid context bug In the module unload path the vm_file_cache was being destroyed under a spin lock. Because this operation might sleep it was possible, although very very unlikely, that this could result in a deadlock. This issue was indentified by using a Linux debug kernel and has been fixed by moving the kmem_cache_destroy() out from under the spin lock. There is no need to lock this operation here. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#771 --- module/spl/spl-vnode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index cd0fa2cd1..2e55b007b 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -845,13 +845,12 @@ spl_vn_fini(void) leaked++; } - kmem_cache_destroy(vn_file_cache); - vn_file_cache = NULL; spin_unlock(&vn_file_lock); if (leaked > 0) SWARN("Warning %d files leaked\n", leaked); + kmem_cache_destroy(vn_file_cache); kmem_cache_destroy(vn_cache); SEXIT; From eaac9ba5102797e0a7e5a1eedb43d792a44770c8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 13 Jun 2012 13:43:29 -0700 Subject: [PATCH 0595/1062] Fix uninit variable in slab reclaim test Gcc version 4.7.0 reports the delta.tv_sec in the slab reclaim test as potentially unitialized. In practice this will never occur but to keep gcc happy we initialize the variable to zero. Signed-off-by: Brian Behlendorf --- module/splat/splat-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 8613ddc29..284c7c30e 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1135,7 +1135,7 @@ splat_kmem_test13(struct file *file, void *arg) kmem_cache_data_t *kcd; dummy_page_t *dp; struct list_head list; - struct timespec start, delta; + struct timespec start, delta = { 0, 0 }; int size, count, slabs, fails = 0; int i, rc = 0, max_time = 10; From e0093fea58f2ce2764b0b43337c960ed4a5d1b73 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 6 Jun 2012 16:51:53 +0000 Subject: [PATCH 0596/1062] Linux 3.4 compat, __clear_close_on_exec replaces FD_CLR torvalds/linux@1dce27c5aa6770e9d195f2bb7db1db3d4dde5591 introduced __clear_close_on_exec() as a replacement for FD_CLR. Further commits appear to have removed FD_CLR from the Linux source tree. This causes the following failure: error: implicit declaration of function '__FD_CLR' [-Werror=implicit-function-declaration] To correct this we update the code to use the current __clear_close_on_exec() interface for readability. Then we introduce an autotools check to determine if __clear_close_on_exec() is available. If it isn't then we define some compatibility logic which used the older FD_CLR() interface. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #124 --- config/spl-build.m4 | 23 ++++++ configure | 136 ++++++++++++++++++++++++++++++++++++ include/linux/file_compat.h | 4 ++ module/splat/splat-vnode.c | 2 +- spl_config.h.in | 3 + 5 files changed, 167 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 6605b826d..4d02a72ec 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -44,6 +44,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_INIT_UTSNAME SPL_AC_FDTABLE_HEADER SPL_AC_FILES_FDTABLE + SPL_AC_CLEAR_CLOSE_ON_EXEC SPL_AC_UACCESS_HEADER SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK @@ -1176,6 +1177,28 @@ AC_DEFUN([SPL_AC_FILES_FDTABLE], [ ]) ]) +dnl # +dnl # 3.4.0 API change, +dnl # check whether '__clear_close_on_exec()' exists +dnl # +AC_DEFUN([SPL_AC_CLEAR_CLOSE_ON_EXEC], [ + AC_MSG_CHECKING([whether __clear_close_on_exec() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct fdtable *fdt = NULL; + int fd = 0; + + __clear_close_on_exec(fd, fdt); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CLEAR_CLOSE_ON_EXEC, 1, + [__clear_close_on_exec() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.18 API change, dnl # added linux/uaccess.h diff --git a/configure b/configure index f4a9f139f..761fdc1cc 100755 --- a/configure +++ b/configure @@ -13506,6 +13506,74 @@ fi + { $as_echo "$as_me:$LINENO: checking whether __clear_close_on_exec() is available" >&5 +$as_echo_n "checking whether __clear_close_on_exec() is available... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct fdtable *fdt = NULL; + int fd = 0; + + __clear_close_on_exec(fd, fdt); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLEAR_CLOSE_ON_EXEC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 $as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } @@ -17936,6 +18004,74 @@ fi + { $as_echo "$as_me:$LINENO: checking whether __clear_close_on_exec() is available" >&5 +$as_echo_n "checking whether __clear_close_on_exec() is available... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct fdtable *fdt = NULL; + int fd = 0; + + __clear_close_on_exec(fd, fdt); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLEAR_CLOSE_ON_EXEC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 $as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 5c7833d4a..2b5b7d225 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -83,5 +83,9 @@ extern kern_path_parent_t kern_path_parent_fn; # define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd) #endif /* HAVE_KERN_PATH_PARENT_HEADER */ +#ifndef HAVE_CLEAR_CLOSE_ON_EXEC +#define __clear_close_on_exec(fd, fdt) FD_CLR(fd, fdt->close_on_exec) +#endif + #endif /* SPL_FILE_COMPAT_H */ diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index 0cd28a690..f5f010c9f 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -414,7 +414,7 @@ fd_uninstall(int fd) goto out_unlock; rcu_assign_pointer(fdt->fd[fd], NULL); - FD_CLR(fd, fdt->close_on_exec); + __clear_close_on_exec(fd, fdt); #else spin_lock(&files->file_lock); if (fd >= files->max_fds) diff --git a/spl_config.h.in b/spl_config.h.in index 05dcdc504..92c11df26 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -60,6 +60,9 @@ /* class_device_create() is available */ #undef HAVE_CLASS_DEVICE_CREATE +/* __clear_close_on_exec() is available */ +#undef HAVE_CLEAR_CLOSE_ON_EXEC + /* struct cred exists */ #undef HAVE_CRED_STRUCT From 50fe7a010c085f672d8dc6b8ef44fcadf4f704b0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 14 Jun 2012 11:45:11 -0700 Subject: [PATCH 0597/1062] SPL 0.6.0-rc9 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 6140db347..0b27b7058 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc8 +Release: rc9 Release-Tags: relext From 44e406d712bedc893e053ab3a7db8ff8a8be0790 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 29 Jun 2012 11:54:52 -0700 Subject: [PATCH 0598/1062] PowerPC Compatibility Usage of get_current() is not supported across all architectures. The correct interface to use is the '#define current' which will map to the appropriate function, usually current_thread_info(). Signed-off-by: Brian Behlendorf Closes #119 --- include/sys/sysmacros.h | 2 +- include/sys/thread.h | 2 +- module/spl/spl-thread.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 97257e078..04a62b196 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -71,7 +71,7 @@ #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #define proc_pageout NULL -#define curproc get_current() +#define curproc current #define max_ncpus num_possible_cpus() #define CPU_SEQID smp_processor_id() #define _NOTE(x) diff --git a/include/sys/thread.h b/include/sys/thread.h index c5f4234da..3a708236c 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -50,7 +50,7 @@ typedef void (*thread_func_t)(void *); #func, arg, len, pp, state, pri) #define thread_exit() __thread_exit() #define thread_join(t) VERIFY(0) -#define curthread get_current() +#define curthread current extern kthread_t *__thread_create(caddr_t stk, size_t stksize, thread_func_t func, const char *name, diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index b1aa8119b..9f6e22379 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -60,7 +60,7 @@ thread_generic_wrapper(void *arg) func = tp->tp_func; args = tp->tp_args; set_current_state(tp->tp_state); - set_user_nice((kthread_t *)get_current(), PRIO_TO_NICE(tp->tp_pri)); + set_user_nice((kthread_t *)current, PRIO_TO_NICE(tp->tp_pri)); kmem_free(tp->tp_name, tp->tp_name_size); kmem_free(tp, sizeof(thread_priv_t)); From 92c2f755ee063f3a010b47577c3479ad42f6e368 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Mon, 7 May 2012 11:26:05 -0700 Subject: [PATCH 0599/1062] Support debug and debug-devel sub packages This commit adds support for building debug and debug-devel sub packages of the spl-modules main package. This is to allow building packages which are built against a debug kernel. By default, only packages are built against a regular non-debug kernel. This can be toggled by passing the '--with kernel-debug' parameter to rpmbuild. Examples: # To build packages against only the non-debug kernel $ rpmbuild --rebuild --with kernel --without kernel-debug $SRPM # To build packages against only the debug kernel $ rpmbuild --rebuild --without kernel --with kernel-debug $SRPM # To build packages against debug and non-debug kernel $ rpmbuild --rebuild --with kernel --with kernel-debug $SRPM Note: Only the RHEL 5/6, CHAOS 5, and Fedora distributions are supported for building the debug and debug-devel packages. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #115 --- spl-modules.spec.in | 358 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 293 insertions(+), 65 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 2a2c8f468..83955da8a 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -22,6 +22,28 @@ %define kobj %{require_kobj} %endif +# Set using 'rpmbuild ... --with kernel ...', defaults to enabled. +%if %{defined _with_kernel} + %define with_kernel 1 +%else + %if %{defined _without_kernel} + %define with_kernel 0 + %else + %define with_kernel 1 + %endif +%endif + +# Set using 'rpmbuild ... --with kernel-debug ...', defaults to disabled. +%if %{defined _with_kernel_debug} + %define with_kernel_debug 1 +%else + %if %{defined _without_kernel_debug} + %define with_kernel_debug 0 + %else + %define with_kernel_debug 0 + %endif +%endif + # Set using 'rpmbuild ... --with debug ...', defaults to disabled. %if %{defined _with_debug} %define kdebug --enable-debug @@ -83,16 +105,25 @@ %define krelease %{klnk}/.kernelrelease %endif - %define kver %((echo X; %{__cat} %{krelease} 2>/dev/null)|tail -1) + %define kver_kern %((echo X; %{__cat} %{krelease} 2>/dev/null)|tail -1) + %define kver_dbug %{nil} + %else + %define kver_kern %{kver} + %define kver_dbug %{nil} %endif %if %{undefined kverextra} - %define kverextra %(echo %{kver} | cut -f3 -d'-') + %define kverextra %(echo %{kver_kern} | cut -f3 -d'-') %endif - %define kpkg kernel-%{kverextra} - %define kdevpkg kernel-source - %define kverpkg %(echo %{kver} | %{__sed} -e 's/-%{kverextra}//g') + %define kpkg_kern kernel-%{kverextra} + %define kpkg_dbug %{nil} + + %define kdevpkg_kern kernel-source + %define kdevpkg_dbug %{nil} + + %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/-%{kverextra}//g') + %define kverpkg_dbug %{nil} # The kernel and rpm versions do not strictly match under SLES11 # e.g. kernel version 2.6.27.19-5 != rpm version 2.6.27.19-5.1 @@ -103,10 +134,19 @@ %endif %if %{undefined kdir} - %define kdir %{_usrsrc}/linux-%{kverpkg} + %define kdir_kern %{_usrsrc}/linux-%{kverpkg_kern} + %define kdir_dbug %{nil} + %else + %define kdir_kern %{kdir} + %define kdir_dbug %{nil} %endif + %if %{undefined kobj} - %define kobj %{kdir}-obj/%{_target_cpu}/%{kverextra} + %define kobj_kern %{kdir_kern}-obj/%{_target_cpu}/%{kverextra} + %define kobj_dbug %{nil} + %else + %define kobj_kern %{kobj} + %define kobj_dbug %{nil} %endif %else @@ -114,18 +154,39 @@ %if %{defined ch4} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release + %define kver_kern %((echo X; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) + %define kver_dbug %{nil} + %else + %define kver_kern %{kver} + %define kver_dbug %{nil} %endif - %define kpkg chaos-kernel - %define kdevpkg chaos-kernel-devel - %define kverpkg %{kver} + + %define kpkg_kern chaos-kernel + %define kpkg_dbug %{nil} + + %define kdevpkg_kern chaos-kernel-devel + %define kdevpkg_dbug %{nil} + + %define kverpkg_kern %{kver_kern} + %define kverpkg_dbug %{nil} + %define koppkg = + %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} + %define kdir_kern %{_usrsrc}/kernels/%{kver_kern} + %define kdir_dbug %{nil} + %else + %define kdir_kern %{kdir} + %define kdir_dbug %{nil} %endif + %if %{undefined kobj} - %define kobj %{kdir} + %define kobj_kern %{kdir_kern} + %define kobj_dbug %{nil} + %else + %define kobj_kern %{kobj} + %define kobj_dbug %{nil} %endif %else @@ -133,26 +194,50 @@ %if %{defined el5} || %{defined el6} || %{defined ch5} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %if %{defined el6} || %{defined ch5} - %define kverpkg %(echo %{kver} | %{__sed} -e 's/.%{_target_cpu}//g') + %define kver_kern %((echo X; ((%{__cat} %{klnk}/kernel.release + 2>/dev/null) | %{__grep} -v debug)) | tail -1) + %define kver_dbug %((echo X; ((%{__cat} %{klnk}/kernel.release + 2>/dev/null) | %{__grep} debug)) | tail -1) %else - %define kverpkg %{kver} + %define kver_kern %{kver} + %define kver_dbug %{kver}.debug %endif + + %define kpkg_kern kernel + %define kpkg_dbug kernel-debug + + %define kdevpkg_kern kernel-devel + %define kdevpkg_dbug kernel-debug-devel + + %if %{defined el6} || %{defined ch5} + %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/.%{_target_cpu}//g') + %define kverpkg_dbug %(echo %{kver_dbug} | %{__sed} -e 's/.%{_target_cpu}//g' | %{__sed} -e 's/.debug//g') + %else + %define kverpkg_kern %{kver_kern} + %define kverpkg_dbug %{kver_dbug} + %endif + %define koppkg = + %if %{undefined kdir} %if %{defined el6} || %{defined ch5} - %define kdir %{_usrsrc}/kernels/%{kver} + %define kdir_kern %{_usrsrc}/kernels/%{kver_kern} + %define kdir_dbug %{_usrsrc}/kernels/%{kver_dbug} %else - %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu} + %define kdir_kern %{_usrsrc}/kernels/%{kver_kern}-%{_target_cpu} + %define kdir_dbug %{_usrsrc}/kernels/%{kver_dbug}-%{_target_cpu} %endif + %else + %define kdir_kern %{kdir} + %define kdir_dbug %{kdir}.debug %endif + %if %{undefined kobj} - %define kobj %{kdir} + %define kobj_kern %{kdir_kern} + %define kobj_dbug %{kdir_dbug} + %else + %define kobj_kern %{kobj} + %define kobj_dbug %{kobj}.debug %endif %else @@ -160,31 +245,69 @@ %if %{defined fedora} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) + %define kver_kern %((echo X; ((%{__cat} %{klnk}/kernel.release + 2>/dev/null) | %{__grep} -v debug)) | tail -1) + %define kver_dbug %((echo X; ((%{__cat} %{klnk}/kernel.release + 2>/dev/null) | %{__grep} debug)) | tail -1) + %else + %define kver_kern %{kver} + %define kver_dbug %{kver}.debug %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %(echo %{kver} | %{__sed} -e 's/.%{_target_cpu}//g') + + %define kpkg_kern kernel + %define kpkg_dbug kernel-debug + + %define kdevpkg_kern kernel-devel + %define kdevpkg_dbug kernel-debug-devel + + %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/.%{_target_cpu}//g') + %define kverpkg_dbug %(echo %{kver_dbug} | %{__sed} -e 's/.%{_target_cpu}//g' | %{__sed} -e 's/.debug//g') + %define koppkg = + %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} + %define kdir_kern %{_usrsrc}/kernels/%{kver_kern} + %define kdir_dbug %{_usrsrc}/kernels/%{kver_dbug} + %else + %define kdir_kern %{kdir} + %define kdir_dbug %{kdir}.debug %endif + %if %{undefined kobj} - %define kobj %{kdir} + %define kobj_kern %{kdir_kern} + %define kobj_dbug %{kdir_dbug} + %else + %define kobj_kern %{kobj} + %define kobj_dbug %{kobj}.debug %endif %else # Unsupported distro: %if %{undefined kver} - %define kver %(uname -r) + %define kver_kern %(uname -r) + %define kver_dbug %{nil} + %else + %define kver_kern %{kver} + %define kver_dbug %{nil} %endif - %define kverpkg %{kver} + + %define kverpkg_kern %{kver_kern} + %define kverpkg_dbug %{nil} + %if %{undefined kdir} - %define kdir /lib/modules/%{kver}/build + %define kdir_kern /lib/modules/%{kver_kern}/build + %define kdir_dbug %{nil} + %else + %define kdir_kern %{kdir} + %define kdir_dbug %{nil} %endif + %if %{undefined kobj} - %define kobj %{kdir} + %define kobj_kern %{kdir_kern} + %define kobj_dbug %{nil} + %else + %define kobj_kern %{kobj} + %define kobj_dbug %{nil} %endif %endif @@ -195,43 +318,65 @@ # Distro agnostic: %define name @PACKAGE@-modules %define version @VERSION@ -%define debug_package %{nil} # The kernel version should only be appended to a binary RPM. When # building a source RPM it must be kernel version agnostic. This means # the source RPM must never specify a required kernel version, but the # final RPM should be keyed to the kernel version it was built against. %if %{defined build_src_rpm} -%define release @SPL_META_RELEASE@ -%define requires %{kpkg} -%if %{defined kdevpkg} -%define devel_requires %{kdevpkg} +%define rel_kern @SPL_META_RELEASE@ +%define rel_dbug @SPL_META_RELEASE@ +%if %{defined kpkg_kern} +%define req_kern %{kpkg_kern} +%endif +%if %{defined kpkg_dbug} +%define req_dbug %{kpkg_dbug} +%endif +%if %{defined kdevpkg_kern} +%define devreq_kern %{kdevpkg_kern} +%endif +%if %{defined kdevpkg_dbug} +%define devreq_dbug %{kdevpkg_dbug} %endif %else -%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') -%define release @SPL_META_RELEASE@_%{relext} -%if %{defined kpkg} -%define krequires %{kpkg} %{koppkg} %{kverpkg} +%define relext_kern %(echo %{kverpkg_kern} | %{__sed} -e 's/-/_/g') +%define relext_dbug %(echo %{kverpkg_dbug} | %{__sed} -e 's/-/_/g') +%define rel_kern @SPL_META_RELEASE@_%{relext_kern} +%define rel_dbug @SPL_META_RELEASE@_%{relext_dbug} +%if %{defined kpkg_kern} +%define req_kern %{kpkg_kern} %{koppkg} %{kverpkg_kern} %endif -%if %{defined kdevpkg} -%define devel_requires %{kdevpkg} %{koppkg} %{kverpkg} +%if %{defined kpkg_dbug} +%define req_dbug %{kpkg_dbug} %{koppkg} %{kverpkg_dbug} +%endif +%if %{defined kdevpkg_kern} +%define devreq_kern %{kdevpkg_kern} %{koppkg} %{kverpkg_kern} +%endif +%if %{defined kdevpkg_dbug} +%define devreq_dbug %{kdevpkg_dbug} %{koppkg} %{kverpkg_dbug} %endif %endif + Summary: Solaris Porting Layer Modules Group: Utilities/System Name: %{name} Version: %{version} -Release: %{release} +Release: %{rel_kern} License: @LICENSE@ URL: git://github.com/zfsonlinux/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) Source: @PACKAGE@-%{version}.tar.gz -%if %{defined krequires} -Requires: %{krequires} + +%if %{?with_kernel} + +%if %{defined req_kern} +Requires: %{req_kern} %endif -%if %{defined kdevpkg} -BuildRequires: %{kdevpkg} +%if %{defined kdevpkg_kern} +BuildRequires: %{kdevpkg_kern} +%endif + %endif %description @@ -240,52 +385,135 @@ primatives in the linux kernel. These include, but are not limited to: atomic, condvar, debug, error, memory, kobject, kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. +%if %{?with_kernel} + %package devel Summary: Solaris Porting Layer Headers and Symbols Group: Development/Libraries -%if %{defined devel_requires} -Requires: %{devel_requires} +Release: %{rel_kern} +%if %{defined devreq_kern} +Requires: %{devreq_kern} %endif -%if %{defined kdevpkg} -BuildRequires: %{kdevpkg} +%if %{defined kdevpkg_kern} +BuildRequires: %{kdevpkg_kern} %endif %description devel The %{name}-devel package contains the header files and Module{s}.symvers symbols needed for building additional modules which use %{name}. +%endif +%if %{?with_kernel_debug} + +%package debug +Summary: Solaris Porting Layer Debug Modules +Group: Utilities/System +Release: %{rel_dbug} +%if %{defined req_dbug} +Requires: %{req_dbug} +%endif +%if %{defined kdevpkg_dbug} +BuildRequires: %{kdevpkg_dbug} +%endif + +%description debug +The %{name}-debug package contains kernel modules for emulating Solaris +style primatives in the linux kernel. These include, but are not limited +to: atomic, condvar, debug, error, memory, kobject, kstat, mutex, +rwlock, taskq, thread, time, and vnode APIs. + +%package debug-devel +Summary: Solaris Porting Layer Debug Headers and Symbols +Group: Development/Libraries +Release: %{rel_dbug} +%if %{defined devreq_dbug} +Requires: %{devreq_dbug} +%endif +%if %{defined kdevpkg_dbug} +BuildRequires: %{kdevpkg_dbug} +%endif + +%description debug-devel +The %{name}-debug-devel package contains the header files and +Module{s}.symvers symbols needed for building additional modules which +use %{name}-debug. + +%endif + %prep %setup -n @PACKAGE@-%{version} %build -%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} --with-config=kernel \ +rm -rf $RPM_BUILD_ROOT + +%if %{?with_kernel} + +%configure --with-config=kernel \ + --with-linux=%{kdir_kern} --with-linux-obj=%{kobj_kern} \ %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking} make - -%install -rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install +%endif +%if %{?with_kernel_debug} + +%configure --with-config=kernel \ + --with-linux=%{kdir_dbug} --with-linux-obj=%{kobj_dbug} \ + %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking} +make +make DESTDIR=$RPM_BUILD_ROOT install + +%endif + %clean rm -rf $RPM_BUILD_ROOT +%if %{?with_kernel} + %files %defattr(-, root, root) -/lib/modules/* +/lib/modules/%{kver_kern}/* %files devel %defattr(-,root,root) -%{_prefix}/src/* +%{_prefix}/src/*/%{kver_kern}/* %post -if [ -f /boot/System.map-%{kver} ]; then - /sbin/depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +if [ -f /boot/System.map-%{kver_kern} ]; then + /sbin/depmod -ae -F /boot/System.map-%{kver_kern} %{kver_kern} || exit 0 else /sbin/depmod -a || exit 0 fi %postun -if [ -f /boot/System.map-%{kver} ]; then - /sbin/depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +if [ -f /boot/System.map-%{kver_kern} ]; then + /sbin/depmod -ae -F /boot/System.map-%{kver_kern} %{kver_kern} || exit 0 else /sbin/depmod -a || exit 0 fi + +%endif +%if %{?with_kernel_debug} + +%files debug +%defattr(-, root, root) +/lib/modules/%{kver_dbug}/* + +%files debug-devel +%defattr(-,root,root) +%{_prefix}/src/*/%{kver_dbug}/* + +%post debug +if [ -f /boot/System.map-%{kver_dbug} ]; then + /sbin/depmod -ae -F /boot/System.map-%{kver_dbug} %{kver_dbug} || exit 0 +else + /sbin/depmod -a || exit 0 +fi + +%postun debug +if [ -f /boot/System.map-%{kver_dbug} ]; then + /sbin/depmod -ae -F /boot/System.map-%{kver_dbug} %{kver_dbug} || exit 0 +else + /sbin/depmod -a || exit 0 +fi + +%endif From 33f507c0f3fb9976274bcf081bc0ce6fc3d5a771 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 2 Jul 2012 11:27:45 -0700 Subject: [PATCH 0600/1062] Remove Chaos 4.x RPM support The Chaos 4.x distribution is based on RHEL 5.x which is no longer supported by ZoL since it uses a 2.6.18 kernel. Signed-off-by: Brian Behlendorf --- spl-modules.spec.in | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 83955da8a..c27d0a5f9 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -150,46 +150,6 @@ %endif %else -# CHAOS 4.x: -%if %{defined ch4} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver_kern %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %define kver_dbug %{nil} - %else - %define kver_kern %{kver} - %define kver_dbug %{nil} - %endif - - %define kpkg_kern chaos-kernel - %define kpkg_dbug %{nil} - - %define kdevpkg_kern chaos-kernel-devel - %define kdevpkg_dbug %{nil} - - %define kverpkg_kern %{kver_kern} - %define kverpkg_dbug %{nil} - - %define koppkg = - - %if %{undefined kdir} - %define kdir_kern %{_usrsrc}/kernels/%{kver_kern} - %define kdir_dbug %{nil} - %else - %define kdir_kern %{kdir} - %define kdir_dbug %{nil} - %endif - - %if %{undefined kobj} - %define kobj_kern %{kdir_kern} - %define kobj_dbug %{nil} - %else - %define kobj_kern %{kobj} - %define kobj_dbug %{nil} - %endif -%else - # RHEL 5.x/6.x, CHAOS 5.x: %if %{defined el5} || %{defined el6} || %{defined ch5} %if %{undefined kver} @@ -313,7 +273,6 @@ %endif %endif %endif -%endif # Distro agnostic: %define name @PACKAGE@-modules From 973e8269bd99f9440149892d598f8914113d0278 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 25 Jun 2012 13:22:21 -0400 Subject: [PATCH 0601/1062] Constify memory management functions This prevents warnings in ZFS that were caused by changes necessary to support PaX patched kernels. When debugging is enabled, these warnings become build failures. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #131 --- include/sys/kmem.h | 8 ++++---- module/spl/spl-kmem.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index eda4eee8d..796af44e8 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -214,9 +214,9 @@ extern unsigned long long vmem_alloc_max; # define vmem_free(ptr, sz) vmem_free_track((ptr), (sz)) extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); -extern void kmem_free_track(void *, size_t); +extern void kmem_free_track(const void *, size_t); extern void *vmem_alloc_track(size_t, int, const char *, int); -extern void vmem_free_track(void *, size_t); +extern void vmem_free_track(const void *, size_t); # else /* DEBUG_KMEM_TRACKING */ /* @@ -243,9 +243,9 @@ extern void vmem_free_track(void *, size_t); # define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz)) extern void *kmem_alloc_debug(size_t, int, const char *, int, int, int); -extern void kmem_free_debug(void *, size_t); +extern void kmem_free_debug(const void *, size_t); extern void *vmem_alloc_debug(size_t, int, const char *, int); -extern void vmem_free_debug(void *, size_t); +extern void vmem_free_debug(const void *, size_t); # endif /* DEBUG_KMEM_TRACKING */ #else /* DEBUG_KMEM */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e1d74d3c0..a6d09f9a2 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -385,7 +385,7 @@ EXPORT_SYMBOL(vmem_table); EXPORT_SYMBOL(vmem_list); static kmem_debug_t * -kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, void *addr) +kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void *addr) { struct hlist_head *head; struct hlist_node *node; @@ -504,7 +504,7 @@ out: EXPORT_SYMBOL(kmem_alloc_track); void -kmem_free_track(void *ptr, size_t size) +kmem_free_track(const void *ptr, size_t size) { kmem_debug_t *dptr; SENTRY; @@ -619,7 +619,7 @@ out: EXPORT_SYMBOL(vmem_alloc_track); void -vmem_free_track(void *ptr, size_t size) +vmem_free_track(const void *ptr, size_t size) { kmem_debug_t *dptr; SENTRY; @@ -706,7 +706,7 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, EXPORT_SYMBOL(kmem_alloc_debug); void -kmem_free_debug(void *ptr, size_t size) +kmem_free_debug(const void *ptr, size_t size) { SENTRY; @@ -758,7 +758,7 @@ vmem_alloc_debug(size_t size, int flags, const char *func, int line) EXPORT_SYMBOL(vmem_alloc_debug); void -vmem_free_debug(void *ptr, size_t size) +vmem_free_debug(const void *ptr, size_t size) { SENTRY; From 36811b4430aaea8c8b91bbe7d812a26799865499 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 6 Jun 2012 22:38:12 -0400 Subject: [PATCH 0602/1062] Detect kernels that honor gfp flags passed to vmalloc() zfsonlinux/spl@2092cf68d89a51eb0d6193aeadabb579dfc4b4a0 used PF_MEMALLOC to workaround a bug in the Linux kernel where allocations did not honor the gfp flags passed to vmalloc(). Unfortunately, PF_MEMALLOC has the side effect of permitting allocations to allocate pages outside of ZONE_NORMAL. This has been observed to result in the depletion of ZONE_DMA32. A kernel patch is available in the Gentoo bug tracker for this issue. https://bugs.gentoo.org/show_bug.cgi?id=416685 This negates any benefit PF_MEMALLOC provides, so we introduce an autotools check to disable the use of PF_MEMALLOC on systems with patched kernels. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #126 --- config/spl-build.m4 | 36 ++++++++++ configure | 156 ++++++++++++++++++++++++++++++++++++++++++ module/spl/spl-kmem.c | 4 ++ spl_config.h.in | 3 + 4 files changed, 199 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 4d02a72ec..c28ad0bf2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -88,6 +88,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW + SPL_AC_PMD_ALLOC_WITH_MASK ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2079,3 +2080,38 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # Proposed VM Subsystem Bug Fix +dnl # https://bugs.gentoo.org/show_bug.cgi?id=416685 +dnl # +dnl # Make __pte_alloc_kernel() honor gfp flags passed to vmalloc() +dnl # This is detected by checking a macro that is changed to support this. +dnl # +AC_DEFUN([SPL_AC_PMD_ALLOC_WITH_MASK], [ + AC_MSG_CHECKING([whether pmd_alloc_with_mask exists]) + SPL_LINUX_TRY_COMPILE([ + #if !defined(CONFIG_MMU) + #define CONFIG_MMU + #endif + + #if defined(RCH_HAS_4LEVEL_HACK) + #undef RCH_HAS_4LEVEL_HACK + #endif + + #include + ],[ + struct mm_struct init_mm; + pud_t *pud = NULL; + unsigned long addr = 0; + gfp_t gfp_mask = GFP_KERNEL; + + pmd_alloc_with_mask(&init_mm, pud, addr, gfp_mask); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PMD_ALLOC_WITH_MASK, 1, + [pmd_alloc_with_mask exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/configure b/configure index 761fdc1cc..2a5027983 100755 --- a/configure +++ b/configure @@ -16231,6 +16231,84 @@ fi EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether pmd_alloc_with_mask exists" >&5 +$as_echo_n "checking whether pmd_alloc_with_mask exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #if !defined(CONFIG_MMU) + #define CONFIG_MMU + #endif + + #if defined(RCH_HAS_4LEVEL_HACK) + #undef RCH_HAS_4LEVEL_HACK + #endif + + #include + +int +main (void) +{ + + struct mm_struct init_mm; + pud_t *pud = NULL; + unsigned long addr = 0; + gfp_t gfp_mask = GFP_KERNEL; + + pmd_alloc_with_mask(&init_mm, pud, addr, gfp_mask); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PMD_ALLOC_WITH_MASK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + ;; user) ;; all) @@ -20730,6 +20808,84 @@ fi EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether pmd_alloc_with_mask exists" >&5 +$as_echo_n "checking whether pmd_alloc_with_mask exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #if !defined(CONFIG_MMU) + #define CONFIG_MMU + #endif + + #if defined(RCH_HAS_4LEVEL_HACK) + #undef RCH_HAS_4LEVEL_HACK + #endif + + #include + +int +main (void) +{ + + struct mm_struct init_mm; + pud_t *pud = NULL; + unsigned long addr = 0; + gfp_t gfp_mask = GFP_KERNEL; + + pmd_alloc_with_mask(&init_mm, pud, addr, gfp_mask); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PMD_ALLOC_WITH_MASK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + ;; srpm) ;; *) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index a6d09f9a2..80c4ff4b9 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -843,6 +843,9 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) if (skc->skc_flags & KMC_KMEM) { ptr = (void *)__get_free_pages(flags, get_order(size)); } else { +#ifdef HAVE_PMD_ALLOC_WITH_MASK + ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); +#else /* * As part of vmalloc() an __pte_alloc_kernel() allocation * may occur. This internal allocation does not honor the @@ -866,6 +869,7 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) } else { ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); } +#endif } /* Resulting allocated memory will be page aligned */ diff --git a/spl_config.h.in b/spl_config.h.in index 92c11df26..1b4a129b2 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -165,6 +165,9 @@ /* pgdat_list is available */ #undef HAVE_PGDAT_LIST +/* pmd_alloc_with_mask exists */ +#undef HAVE_PMD_ALLOC_WITH_MASK + /* __put_task_struct() is available */ #undef HAVE_PUT_TASK_STRUCT From d801db1487205365b268efab4700e3541adab493 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Wed, 11 Jul 2012 15:47:56 -0700 Subject: [PATCH 0603/1062] Move spl.release generation to configure step Previously, the spl.release file was created at 'make install' time. This is slightly problematic when the file is needed without running 'make install'. Because of this, the step creating the file was removed from 'make install' and replaced with a more appropriate spl.release.in file. As a result, the spl.release file will now be created earlier as part of the 'configure' step as opposed to the 'make install' step. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #135 --- Makefile.am | 3 +-- Makefile.in | 17 +++++++++-------- configure | 3 ++- configure.ac | 1 + spl.release.in | 1 + 5 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 spl.release.in diff --git a/Makefile.am b/Makefile.am index 209925969..490d12802 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,7 @@ SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am -noinst_HEADERS = spl_config.h +noinst_HEADERS = spl_config.h spl.release distclean-local:: -$(RM) -R autom4te*.cache @@ -32,7 +32,6 @@ if CONFIG_KERNEL install-data-local: release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - echo "$$release" >$$instdest/spl.release; \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done diff --git a/Makefile.in b/Makefile.in index 7c8f696a5..5fd793e6e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -80,11 +80,11 @@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/PKGBUILD-spl-modules.in $(srcdir)/PKGBUILD-spl.in \ - $(srcdir)/spl-modules.spec.in $(srcdir)/spl.spec.in \ - $(srcdir)/spl_config.h.in $(top_srcdir)/config/arch.am \ - $(top_srcdir)/config/deb.am $(top_srcdir)/config/rpm.am \ - $(top_srcdir)/config/tgz.am $(top_srcdir)/configure \ - $(top_srcdir)/module/Makefile.in \ + $(srcdir)/spl-modules.spec.in $(srcdir)/spl.release.in \ + $(srcdir)/spl.spec.in $(srcdir)/spl_config.h.in \ + $(top_srcdir)/config/arch.am $(top_srcdir)/config/deb.am \ + $(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \ + $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ ChangeLog INSTALL config/config.guess config/config.sub \ @@ -102,7 +102,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = spl_config.h CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ module/splat/Makefile spl.spec spl-modules.spec PKGBUILD-spl \ - PKGBUILD-spl-modules + PKGBUILD-spl-modules spl.release CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -332,7 +332,7 @@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \ DISCLAIMER config/config.awk config/rpm.am config/deb.am \ config/tgz.am -noinst_HEADERS = spl_config.h +noinst_HEADERS = spl_config.h spl.release all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -402,6 +402,8 @@ PKGBUILD-spl: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl.in cd $(top_builddir) && $(SHELL) ./config.status $@ PKGBUILD-spl-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl-modules.in cd $(top_builddir) && $(SHELL) ./config.status $@ +spl.release: $(top_builddir)/config.status $(srcdir)/spl.release.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -1032,7 +1034,6 @@ distclean-local:: @CONFIG_KERNEL_TRUE@install-data-local: @CONFIG_KERNEL_TRUE@ release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ -@CONFIG_KERNEL_TRUE@ echo "$$release" >$$instdest/spl.release; \ @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ @CONFIG_KERNEL_TRUE@ done diff --git a/configure b/configure index 2a5027983..3f22988e2 100755 --- a/configure +++ b/configure @@ -20918,7 +20918,7 @@ fi -ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules" +ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules spl.release" cat >confcache <<\_ACEOF @@ -21839,6 +21839,7 @@ do "spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; "PKGBUILD-spl") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl" ;; "PKGBUILD-spl-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl-modules" ;; + "spl.release") CONFIG_FILES="$CONFIG_FILES spl.release" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/configure.ac b/configure.ac index 774f6f81a..75859f77e 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ AC_CONFIG_FILES([ spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules + spl.release ]) AC_OUTPUT diff --git a/spl.release.in b/spl.release.in new file mode 100644 index 000000000..fd7c84c13 --- /dev/null +++ b/spl.release.in @@ -0,0 +1 @@ +@SPL_META_VERSION@-@SPL_META_RELEASE@ From d503b971f4848f1b9d654684f1b3c864baad5d88 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 13 Jul 2012 12:49:40 -0700 Subject: [PATCH 0604/1062] Optimize spl_rwsem_is_locked() The spl_rwsem_is_locked() compatibility function has been observed to be a hot spot. The root cause of this is that we must check the rwsem activity under the rwsem->wait_lock to avoid a race. When the lock is busy significant contention can occur. The upstream kernel fix for this race had the insight that by using spin_trylock_irqsave() this contention could be avoided. When the lock is contended it's reasonable to return that it is locked. This change updates the SPLs implemention to be like the upstream kernel. Since the kernel code has been in use for years now this a low risk change. Signed-off-by: Brian Behlendorf --- include/linux/rwsem_compat.h | 67 ++++++++++++++---------------------- 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index fe69f0154..757bb42af 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -27,57 +27,40 @@ #include -#ifdef RWSEM_SPINLOCK_IS_RAW -#define spl_rwsem_lock_irqsave(lock, flags) \ -({ \ - raw_spin_lock_irqsave(lock, flags); \ -}) -#define spl_rwsem_unlock_irqrestore(lock, flags) \ -({ \ - raw_spin_unlock_irqrestore(lock, flags); \ -}) +#if defined(RWSEM_SPINLOCK_IS_RAW) +#define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl) +#define spl_rwsem_unlock_irqrestore(lk, fl) raw_spin_unlock_irqrestore(lk, fl) +#define spl_rwsem_trylock_irqsave(lk, fl) raw_spin_trylock_irqsave(lk, fl) #else -#define spl_rwsem_lock_irqsave(lock, flags) \ -({ \ - spin_lock_irqsave(lock, flags); \ -}) -#define spl_rwsem_unlock_irqrestore(lock, flags) \ -({ \ - spin_unlock_irqrestore(lock, flags); \ -}) +#define spl_rwsem_lock_irqsave(lk, fl) spin_lock_irqsave(lk, fl) +#define spl_rwsem_unlock_irqrestore(lk, fl) spin_unlock_irqrestore(lk, fl) +#define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl) #endif /* RWSEM_SPINLOCK_IS_RAW */ -#ifdef RWSEM_IS_LOCKED_TAKES_WAIT_LOCK /* - * A race condition in rwsem_is_locked() was fixed in Linux 2.6.33 and the fix - * was backported to RHEL5 as of kernel 2.6.18-190.el5. Details can be found - * here: + * Prior to Linux 2.6.33 there existed a race condition in rwsem_is_locked(). + * The semaphore's activity was checked outside of the wait_lock which + * could result in some readers getting the incorrect activity value. * - * https://bugzilla.redhat.com/show_bug.cgi?id=526092 - - * The race condition was fixed in the kernel by acquiring the semaphore's - * wait_lock inside rwsem_is_locked(). The SPL worked around the race - * condition by acquiring the wait_lock before calling that function, but - * with the fix in place we must not do that. + * When a kernel without this fix is detected the SPL takes responsibility + * for acquiring the wait_lock to avoid this race. */ - -#define spl_rwsem_is_locked(rwsem) \ -({ \ - rwsem_is_locked(rwsem); \ -}) - +#if defined(RWSEM_IS_LOCKED_TAKES_WAIT_LOCK) +#define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem) #else +static inline int +spl_rwsem_is_locked(struct rw_semaphore *rwsem) +{ + unsigned long flags; + int rc = 1; -#define spl_rwsem_is_locked(rwsem) \ -({ \ - unsigned long _flags_; \ - int _rc_; \ - spl_rwsem_lock_irqsave(&rwsem->wait_lock, _flags_); \ - _rc_ = rwsem_is_locked(rwsem); \ - spl_rwsem_unlock_irqrestore(&rwsem->wait_lock, _flags_); \ - _rc_; \ -}) + if (spl_rwsem_trylock_irqsave(&rwsem->wait_lock, flags)) { + rc = rwsem_is_locked(rwsem); + spl_rwsem_unlock_irqrestore(&rwsem->wait_lock, flags); + } + return (rc); +} #endif /* RWSEM_IS_LOCKED_TAKES_WAIT_LOCK */ #endif /* _SPL_RWSEM_COMPAT_H */ From e8267acd25ad566218187716739f0aec5d442e3f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 20 Jul 2012 11:12:19 -0700 Subject: [PATCH 0605/1062] 32-bit compat, hostid_read() Explicitly cast the sizeof in hostid_read() to prevent the following compiler warning on 32-bit systems. module/spl/spl-generic.c:490:10: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format] Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 785f668d6..13f426733 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -486,8 +486,8 @@ hostid_read(void) if (size < sizeof(HW_HOSTID_MASK)) { printk(KERN_WARNING "SPL: Ignoring the %s file because it is %llu bytes; " - "expecting %lu bytes instead.\n", - spl_hostid_path, size, sizeof(HW_HOSTID_MASK)); + "expecting %lu bytes instead.\n", spl_hostid_path, + size, (unsigned long)sizeof(HW_HOSTID_MASK)); kobj_close_file(file); return -3; } From 94aac9c9bcd1a222ac87d7452afa5284c16229bc Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Thu, 5 Jul 2012 10:23:42 +0200 Subject: [PATCH 0606/1062] Use MODULE variable in module Makefile like zfs. In zfs, each module Makefile contains a MODULE variable which contains the name of the module, and the following declarations reference this variable. In spl, there is a MODULES variable which is never used. Rename it to MODULE and use it like in zfs. This improves consistency between the two build systems. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- module/spl/Makefile.in | 42 ++++++++++++++++++++-------------------- module/splat/Makefile.in | 38 ++++++++++++++++++------------------ 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 4f54f124f..7e8aac502 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -1,29 +1,29 @@ # Makefile.in for spl kernel module -MODULES := spl +MODULE := spl EXTRA_CFLAGS = @KERNELCPPFLAGS@ EXTRA_CFLAGS += -I@abs_top_srcdir@/include EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h # Solaris porting layer module -obj-m := spl.o +obj-m := $(MODULE).o -spl-objs += @top_srcdir@/module/spl/spl-debug.o -spl-objs += @top_srcdir@/module/spl/spl-proc.o -spl-objs += @top_srcdir@/module/spl/spl-kmem.o -spl-objs += @top_srcdir@/module/spl/spl-thread.o -spl-objs += @top_srcdir@/module/spl/spl-taskq.o -spl-objs += @top_srcdir@/module/spl/spl-rwlock.o -spl-objs += @top_srcdir@/module/spl/spl-vnode.o -spl-objs += @top_srcdir@/module/spl/spl-err.o -spl-objs += @top_srcdir@/module/spl/spl-time.o -spl-objs += @top_srcdir@/module/spl/spl-kobj.o -spl-objs += @top_srcdir@/module/spl/spl-generic.o -spl-objs += @top_srcdir@/module/spl/spl-atomic.o -spl-objs += @top_srcdir@/module/spl/spl-mutex.o -spl-objs += @top_srcdir@/module/spl/spl-kstat.o -spl-objs += @top_srcdir@/module/spl/spl-condvar.o -spl-objs += @top_srcdir@/module/spl/spl-xdr.o -spl-objs += @top_srcdir@/module/spl/spl-cred.o -spl-objs += @top_srcdir@/module/spl/spl-tsd.o -spl-objs += @top_srcdir@/module/spl/spl-zlib.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-debug.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-thread.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-taskq.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-rwlock.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-vnode.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-err.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-time.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-kobj.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-generic.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-atomic.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-mutex.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-kstat.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-condvar.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-xdr.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-cred.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-tsd.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-zlib.o diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index 8340b7036..05007d42f 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -1,27 +1,27 @@ # Makefile.in for splat kernel module -MODULES := splat +MODULE := splat EXTRA_CFLAGS = @KERNELCPPFLAGS@ EXTRA_CFLAGS += -I@abs_top_srcdir@/include EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h # Solaris Porting LAyer Tests -obj-m := splat.o +obj-m := $(MODULE).o -splat-objs += @top_srcdir@/module/splat/splat-ctl.o -splat-objs += @top_srcdir@/module/splat/splat-kmem.o -splat-objs += @top_srcdir@/module/splat/splat-taskq.o -splat-objs += @top_srcdir@/module/splat/splat-random.o -splat-objs += @top_srcdir@/module/splat/splat-mutex.o -splat-objs += @top_srcdir@/module/splat/splat-condvar.o -splat-objs += @top_srcdir@/module/splat/splat-thread.o -splat-objs += @top_srcdir@/module/splat/splat-rwlock.o -splat-objs += @top_srcdir@/module/splat/splat-time.o -splat-objs += @top_srcdir@/module/splat/splat-vnode.o -splat-objs += @top_srcdir@/module/splat/splat-kobj.o -splat-objs += @top_srcdir@/module/splat/splat-atomic.o -splat-objs += @top_srcdir@/module/splat/splat-list.o -splat-objs += @top_srcdir@/module/splat/splat-generic.o -splat-objs += @top_srcdir@/module/splat/splat-cred.o -splat-objs += @top_srcdir@/module/splat/splat-zlib.o -splat-objs += @top_srcdir@/module/splat/splat-linux.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-ctl.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-kmem.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-taskq.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-random.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-mutex.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-condvar.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-thread.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-rwlock.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-time.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-vnode.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-kobj.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-atomic.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-list.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-generic.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-cred.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-zlib.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-linux.o From 016432fbeb625f3588039017c682f5df260c86d4 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Tue, 17 Jul 2012 10:08:22 +0200 Subject: [PATCH 0607/1062] Don't build packages that haven't been selected. Currently, when configure --with-config is used, selective compilation is only effective for the simple "make" case. Package builders (e.g. make rpm) still build everything (utils and modules). This patch fixes that. This patch also drops the duplicate rpm-modules build target. Signed-off-by: Brian Behlendorf Signed-off-by: Prakash Surya Issue zfsonlinux/zfs#851 --- Makefile.in | 70 ++++++++++++++++++++++++-------------------------- config/arch.am | 4 +++ config/deb.am | 4 +++ config/rpm.am | 10 ++++++-- config/tgz.am | 4 +++ 5 files changed, 54 insertions(+), 38 deletions(-) diff --git a/Makefile.in b/Makefile.in index 5fd793e6e..a70079893 100644 --- a/Makefile.in +++ b/Makefile.in @@ -845,20 +845,18 @@ uninstall-am: srpm-modules: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common +@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common srpm-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common +@CONFIG_USER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common srpm: srpm-modules srpm-utils rpm-modules: srpm-modules - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common +@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common rpm-utils: srpm-utils - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common - -rpm-modules: srpm-modules +@CONFIG_USER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common rpm: rpm-modules rpm-utils @@ -936,22 +934,22 @@ deb-local: fi) deb-modules: deb-local rpm-modules - name=${PACKAGE}-modules; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ - pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ - $(RM) $$pkg1 $$pkg2 +@CONFIG_KERNEL_TRUE@ name=${PACKAGE}-modules; \ +@CONFIG_KERNEL_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ +@CONFIG_KERNEL_TRUE@ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ +@CONFIG_KERNEL_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ +@CONFIG_KERNEL_TRUE@ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ +@CONFIG_KERNEL_TRUE@ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ +@CONFIG_KERNEL_TRUE@ fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ +@CONFIG_KERNEL_TRUE@ $(RM) $$pkg1 $$pkg2 deb-utils: deb-local rpm-utils - name=${PACKAGE}; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ - $(RM) $$pkg1 +@CONFIG_USER_TRUE@ name=${PACKAGE}; \ +@CONFIG_USER_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ +@CONFIG_USER_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ +@CONFIG_USER_TRUE@ pkg1=$${name}-$${version}.$${arch}.rpm; \ +@CONFIG_USER_TRUE@ fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ +@CONFIG_USER_TRUE@ $(RM) $$pkg1 deb: deb-modules deb-utils @@ -965,22 +963,22 @@ tgz-local: fi) tgz-modules: tgz-local rpm-modules - name=${PACKAGE}-modules; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ - pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ - $(RM) $$pkg1 $$pkg2 +@CONFIG_KERNEL_TRUE@ name=${PACKAGE}-modules; \ +@CONFIG_KERNEL_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ +@CONFIG_KERNEL_TRUE@ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ +@CONFIG_KERNEL_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ +@CONFIG_KERNEL_TRUE@ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ +@CONFIG_KERNEL_TRUE@ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ +@CONFIG_KERNEL_TRUE@ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ +@CONFIG_KERNEL_TRUE@ $(RM) $$pkg1 $$pkg2 tgz-utils: tgz-local rpm-utils - name=${PACKAGE}; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ - $(RM) $$pkg1 +@CONFIG_USER_TRUE@ name=${PACKAGE}; \ +@CONFIG_USER_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ +@CONFIG_USER_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ +@CONFIG_USER_TRUE@ pkg1=$${name}-$${version}.$${arch}.rpm; \ +@CONFIG_USER_TRUE@ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ +@CONFIG_USER_TRUE@ $(RM) $$pkg1 tgz: tgz-modules tgz-utils @@ -993,10 +991,10 @@ sarch-utils: sarch: sarch-modules sarch-utils arch-modules: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common +@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common arch-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common +@CONFIG_USER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common arch: arch-modules arch-utils diff --git a/config/arch.am b/config/arch.am index 591013afd..da43fe738 100644 --- a/config/arch.am +++ b/config/arch.am @@ -13,10 +13,14 @@ sarch-utils: sarch: sarch-modules sarch-utils arch-modules: +if CONFIG_KERNEL $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common +endif arch-utils: +if CONFIG_USER $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common +endif arch: arch-modules arch-utils diff --git a/config/deb.am b/config/deb.am index ce84cfa9c..75e31dfec 100644 --- a/config/deb.am +++ b/config/deb.am @@ -29,6 +29,7 @@ deb-local: fi) deb-modules: deb-local rpm-modules +if CONFIG_KERNEL name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ @@ -37,13 +38,16 @@ deb-modules: deb-local rpm-modules pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ $(RM) $$pkg1 $$pkg2 +endif deb-utils: deb-local rpm-utils +if CONFIG_USER name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 +endif deb: deb-modules deb-utils diff --git a/config/rpm.am b/config/rpm.am index 7dfe4fd9b..a0a4ed148 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -7,20 +7,26 @@ ############################################################################### srpm-modules: +if CONFIG_KERNEL $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common +endif srpm-utils: +if CONFIG_USER $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common +endif srpm: srpm-modules srpm-utils rpm-modules: srpm-modules +if CONFIG_KERNEL $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common +endif rpm-utils: srpm-utils +if CONFIG_USER $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common - -rpm-modules: srpm-modules +endif rpm: rpm-modules rpm-utils diff --git a/config/tgz.am b/config/tgz.am index bbc204a65..1aaf4dde2 100644 --- a/config/tgz.am +++ b/config/tgz.am @@ -22,6 +22,7 @@ tgz-local: fi) tgz-modules: tgz-local rpm-modules +if CONFIG_KERNEL name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ @@ -30,13 +31,16 @@ tgz-modules: tgz-local rpm-modules pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ $(RM) $$pkg1 $$pkg2 +endif tgz-utils: tgz-local rpm-utils +if CONFIG_USER name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ $(RM) $$pkg1 +endif tgz: tgz-modules tgz-utils From 38b5ff4d07146ad2359018c3f4707125d38c421f Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Mon, 16 Jul 2012 16:33:40 +0200 Subject: [PATCH 0608/1062] Fix undefined reference on spl_mutex_spin_max(). Commit 3160d4f56bf35492e9c400094f8c1ff2066d4459 changed the set of conditions under which spl_mutex_spin_max would be implemented as a function by changing an #if in sys/mutex.h. The corresponding implementation file spl-mutex.c, however, has not been updated to reflect the change. This results in undefined reference errors on spl_mutex_spin_max under the following condition: ((!CONFIG_SMP || CONFIG_DEBUG_MUTEXES) && HAVE_MUTEX_OWNER && HAVE_TASK_CURR) This patch fixes the issue by using the same #if in sys/mutex.h and spl-mutex.c. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- module/spl/spl-mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index 983245dc0..d452681b1 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -51,7 +51,7 @@ * unavailable we provide a standard mutex. */ -#ifndef HAVE_MUTEX_OWNER +#if !defined(HAVE_MUTEX_OWNER) || !defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES) #ifdef HAVE_TASK_CURR /* * mutex_spin_max = { 0, -1, 1-MAX_INT } From 0408008b33049dde7e1ec16af7806d2e57bab064 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Mon, 16 Jul 2012 16:34:43 +0200 Subject: [PATCH 0609/1062] Make configure builtin-aware. This patch adds a new option to configure: --enable-linux-builtin. When this option is used, the following happens: - Compilation of kernel modules is disabled. - A failure to find UTS_RELEASE is followed by a suggestion to run "make prepare" on the kernel source tree. This patch also adds a new test which tries to compile an empty module as a basic toolchain sanity test. If it fails and the option was specified, the error is followed by a suggestion to run "make scripts" on the kernel source tree. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- config/spl-build.m4 | 82 ++++++++++----- configure | 237 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 257 insertions(+), 62 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c28ad0bf2..eaca8f113 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -22,6 +22,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG_LOG SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_KMEM_TRACKING + SPL_AC_TEST_MODULE SPL_AC_ATOMIC_SPINLOCK SPL_AC_TYPE_ATOMIC64_CMPXCHG SPL_AC_TYPE_ATOMIC64_XCHG @@ -94,7 +95,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ modpost=$LINUX/scripts/Makefile.modpost AC_MSG_CHECKING([kernel file name for module symbols]) - if test -f "$modpost"; then + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then if grep -q Modules.symvers $modpost; then LINUX_SYMBOLS=Modules.symvers else @@ -196,7 +197,13 @@ AC_DEFUN([SPL_AC_KERNEL], [ fi else AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) + if test "x$enable_linux_builtin" != xyes; then + AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) + else + AC_MSG_ERROR([ + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree.]) + fi fi AC_MSG_RESULT([$kernsrcver]) @@ -439,34 +446,38 @@ AC_DEFUN([SPL_AC_LICENSE], [ ]) AC_DEFUN([SPL_AC_CONFIG], [ - SPL_CONFIG=all - AC_ARG_WITH([config], - AS_HELP_STRING([--with-config=CONFIG], - [Config file 'kernel|user|all|srpm']), - [SPL_CONFIG="$withval"]) + SPL_CONFIG=all + AC_ARG_WITH([config], + AS_HELP_STRING([--with-config=CONFIG], + [Config file 'kernel|user|all|srpm']), + [SPL_CONFIG="$withval"]) + AC_ARG_ENABLE([linux-builtin], + [AC_HELP_STRING([--enable-linux-builtin], + [Configure for builtin in-tree kernel modules @<:@default=no@:>@])], + [], + [enable_linux_builtin=no]) - AC_MSG_CHECKING([spl config]) - AC_MSG_RESULT([$SPL_CONFIG]); - AC_SUBST(SPL_CONFIG) + AC_MSG_CHECKING([spl config]) + AC_MSG_RESULT([$SPL_CONFIG]); + AC_SUBST(SPL_CONFIG) - case "$SPL_CONFIG" in - kernel) SPL_AC_CONFIG_KERNEL ;; - user) SPL_AC_CONFIG_USER ;; - all) SPL_AC_CONFIG_KERNEL - SPL_AC_CONFIG_USER ;; + case "$SPL_CONFIG" in + kernel) SPL_AC_CONFIG_KERNEL ;; + user) SPL_AC_CONFIG_USER ;; + all) SPL_AC_CONFIG_KERNEL + SPL_AC_CONFIG_USER ;; srpm) ;; - *) - AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$SPL_CONFIG" for --with-config, - user kernel|user|all|srpm]) ;; - esac + *) + AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$SPL_CONFIG" for --with-config, + user kernel|user|all|srpm]) ;; + esac - AM_CONDITIONAL([CONFIG_USER], - [test "$SPL_CONFIG" = user] || - [test "$SPL_CONFIG" = all]) - AM_CONDITIONAL([CONFIG_KERNEL], - [test "$SPL_CONFIG" = kernel] || - [test "$SPL_CONFIG" = all]) + AM_CONDITIONAL([CONFIG_USER], + [test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all]) + AM_CONDITIONAL([CONFIG_KERNEL], + [test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all] && + [test "x$enable_linux_builtin" != xyes ]) ]) dnl # @@ -738,6 +749,25 @@ AC_DEFUN([SPL_CHECK_HEADER], ]) ]) +dnl # +dnl # Basic toolchain sanity check. +dnl # +AC_DEFUN([SPL_AC_TEST_MODULE], + [AC_MSG_CHECKING([whether modules can be built]) + SPL_LINUX_TRY_COMPILE([],[],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + if test "x$enable_linux_builtin" != xyes; then + AC_MSG_ERROR([*** Unable to build an empty module.]) + else + AC_MSG_ERROR([ + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree.]) + fi + ]) +]) + dnl # dnl # Use the atomic implemenation based on global spinlocks. This dnl # should only be needed by 32-bit kernels which do not provide diff --git a/configure b/configure index 3f22988e2..35d46e17b 100755 --- a/configure +++ b/configure @@ -962,6 +962,7 @@ enable_fast_install with_gnu_ld enable_libtool_lock with_config +enable_linux_builtin with_linux with_linux_obj enable_debug @@ -1619,6 +1620,8 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-linux-builtin Configure for builtin in-tree kernel modules + [default=no] --enable-debug Enable generic debug support [default=no] --enable-debug-log Enable basic debug logging [default=yes] --enable-debug-kmem Enable basic kmem accounting [default=yes] @@ -4789,13 +4792,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4792: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4795: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4795: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4798: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4798: output\"" >&5) + (eval echo "\"\$as_me:4801: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6001,7 +6004,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6004 "configure"' > conftest.$ac_ext + echo '#line 6007 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7854,11 +7857,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7857: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7860: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7861: \$? = $ac_status" >&5 + echo "$as_me:7864: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8193,11 +8196,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8196: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8199: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8200: \$? = $ac_status" >&5 + echo "$as_me:8203: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8298,11 +8301,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8301: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8304: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8305: \$? = $ac_status" >&5 + echo "$as_me:8308: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8353,11 +8356,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8356: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8359: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8360: \$? = $ac_status" >&5 + echo "$as_me:8363: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11156,7 +11159,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11159 "configure" +#line 11162 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11252,7 +11255,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11255 "configure" +#line 11258 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11720,22 +11723,29 @@ fi - SPL_CONFIG=all + SPL_CONFIG=all # Check whether --with-config was given. if test "${with_config+set}" = set; then withval=$with_config; SPL_CONFIG="$withval" fi + # Check whether --enable-linux-builtin was given. +if test "${enable_linux_builtin+set}" = set; then + enableval=$enable_linux_builtin; +else + enable_linux_builtin=no +fi - { $as_echo "$as_me:$LINENO: checking spl config" >&5 + + { $as_echo "$as_me:$LINENO: checking spl config" >&5 $as_echo_n "checking spl config... " >&6; } - { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 + { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 $as_echo "$SPL_CONFIG" >&6; }; - case "$SPL_CONFIG" in - kernel) + case "$SPL_CONFIG" in + kernel) # Check whether --with-linux was given. @@ -11836,9 +11846,19 @@ $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi fi { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 @@ -11856,7 +11876,7 @@ $as_echo "$kernsrcver" >&6; } modpost=$LINUX/scripts/Makefile.modpost { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 $as_echo_n "checking kernel file name for module symbols... " >&6; } - if test -f "$modpost"; then + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then if grep -q Modules.symvers $modpost; then LINUX_SYMBOLS=Modules.symvers else @@ -12091,6 +12111,74 @@ $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 $as_echo "$enable_debug_kmem_tracking" >&6; } + { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 +$as_echo_n "checking whether modules can be built... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 +$as_echo "$as_me: error: *** Unable to build an empty module." >&2;} + { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi + + + +fi + + rm -Rf build + + + # Check whether --enable-atomic-spinlocks was given. if test "${enable_atomic_spinlocks+set}" = set; then @@ -16310,8 +16398,8 @@ fi ;; - user) ;; - all) + user) ;; + all) # Check whether --with-linux was given. @@ -16412,9 +16500,19 @@ $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi fi { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 @@ -16432,7 +16530,7 @@ $as_echo "$kernsrcver" >&6; } modpost=$LINUX/scripts/Makefile.modpost { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 $as_echo_n "checking kernel file name for module symbols... " >&6; } - if test -f "$modpost"; then + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then if grep -q Modules.symvers $modpost; then LINUX_SYMBOLS=Modules.symvers else @@ -16667,6 +16765,74 @@ $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 $as_echo "$enable_debug_kmem_tracking" >&6; } + { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 +$as_echo_n "checking whether modules can be built... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 +$as_echo "$as_me: error: *** Unable to build an empty module." >&2;} + { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi + + + +fi + + rm -Rf build + + + # Check whether --enable-atomic-spinlocks was given. if test "${enable_atomic_spinlocks+set}" = set; then @@ -20886,20 +21052,19 @@ fi - ;; + ;; srpm) ;; - *) - { $as_echo "$as_me:$LINENO: result: Error!" >&5 + *) + { $as_echo "$as_me:$LINENO: result: Error!" >&5 $as_echo "Error!" >&6; } - { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all|srpm" >&5 + { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, + user kernel|user|all|srpm" >&5 $as_echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all|srpm" >&2;} + user kernel|user|all|srpm" >&2;} { (exit 1); exit 1; }; } ;; - esac + esac - if test "$SPL_CONFIG" = user || - test "$SPL_CONFIG" = all; then + if test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all; then CONFIG_USER_TRUE= CONFIG_USER_FALSE='#' else @@ -20907,8 +21072,8 @@ else CONFIG_USER_FALSE= fi - if test "$SPL_CONFIG" = kernel || - test "$SPL_CONFIG" = all; then + if test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all && + test "x$enable_linux_builtin" != xyes ; then CONFIG_KERNEL_TRUE= CONFIG_KERNEL_FALSE='#' else From df7cc5bc7111ab7cef6e89522685c6b8dd4bb95c Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Mon, 16 Jul 2012 09:29:05 +0200 Subject: [PATCH 0610/1062] Fake modpost stage for LINUX_COMPILE. Currently, when building a test case, we're compiling an entire Linux module from beginning to end. This includes the MODPOST stage, which generates a "conftest.mod.c" file with some boilerplate module declaration code. This poses a problem when configuring for built-in on kernels which have loadable module support disabled. In this case conftest.mod.c is referencing disabled code, resulting in a compilation failure, thus breaking the tests. This patch fixes the issue by faking the modpost stage when the --enable-linux-builtin option is provided. It does so by forcing the modpost command to be /bin/true, and using an empty conftest.mod.c file. The test module still compiles fine, although the result isn't loadable, but we don't really care at this point. Note it is important to preserve the modpost stage when building out of tree. This allows for the posibility of configure checks to leverage this phase to identify GPL-only symbols. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- config/spl-build.m4 | 10 +- configure | 588 +++++++++++++++++++++++++++++--------------- 2 files changed, 398 insertions(+), 200 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index eaca8f113..466d9eb50 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -631,12 +631,14 @@ dnl # SPL_LINUX_COMPILE_IFELSE / like AC_COMPILE_IFELSE dnl # AC_DEFUN([SPL_LINUX_COMPILE_IFELSE], [ m4_ifvaln([$1], [SPL_LINUX_CONFTEST([$1])]) - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage AS_IF( - [AC_TRY_COMMAND(cp conftest.c build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], - [$4], - [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])] + [AC_TRY_COMMAND(cp conftest.c build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag) >/dev/null && AC_TRY_COMMAND([$3])], + [$4], + [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])] ) rm -Rf build ]) diff --git a/configure b/configure index 35d46e17b..04acdf1b1 100755 --- a/configure +++ b/configure @@ -11934,9 +11934,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12134,9 +12136,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12213,9 +12217,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12328,9 +12334,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12392,9 +12400,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12456,9 +12466,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12521,9 +12533,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12585,9 +12599,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12650,9 +12666,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12722,9 +12740,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12790,9 +12810,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12897,9 +12919,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12963,9 +12987,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13027,9 +13053,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13135,9 +13163,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13283,9 +13313,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13351,9 +13383,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13417,9 +13451,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13482,9 +13518,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13556,9 +13594,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13624,9 +13664,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13689,9 +13731,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13758,9 +13802,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13866,9 +13912,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13932,9 +13980,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14000,9 +14050,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14068,9 +14120,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14133,9 +14187,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14463,9 +14519,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14529,9 +14587,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14595,9 +14655,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14660,9 +14722,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14725,9 +14789,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14791,9 +14857,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14856,9 +14924,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14921,9 +14991,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14999,9 +15071,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15186,9 +15260,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15250,9 +15326,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15314,9 +15392,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15420,9 +15500,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15489,9 +15571,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15556,9 +15640,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15703,9 +15789,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15929,9 +16017,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16144,9 +16234,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16212,9 +16304,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16281,9 +16375,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16360,9 +16456,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16588,9 +16686,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16788,9 +16888,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16867,9 +16969,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16982,9 +17086,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17046,9 +17152,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17110,9 +17218,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17175,9 +17285,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17239,9 +17351,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17304,9 +17418,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17376,9 +17492,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17444,9 +17562,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17551,9 +17671,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17617,9 +17739,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17681,9 +17805,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17789,9 +17915,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17937,9 +18065,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18005,9 +18135,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18071,9 +18203,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18136,9 +18270,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18210,9 +18346,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18278,9 +18416,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18343,9 +18483,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18412,9 +18554,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18520,9 +18664,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18586,9 +18732,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18654,9 +18802,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18722,9 +18872,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18787,9 +18939,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19117,9 +19271,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19183,9 +19339,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19249,9 +19407,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19314,9 +19474,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19379,9 +19541,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19445,9 +19609,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19510,9 +19676,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19575,9 +19743,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19653,9 +19823,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19840,9 +20012,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19904,9 +20078,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19968,9 +20144,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20074,9 +20252,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20143,9 +20323,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20210,9 +20392,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20357,9 +20541,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20583,9 +20769,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20798,9 +20986,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20866,9 +21056,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20935,9 +21127,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21014,9 +21208,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? From 723aa3b0c2eed070f7eeadd2ce2d87f46da6d0f8 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Mon, 16 Jul 2012 17:04:05 +0200 Subject: [PATCH 0611/1062] When checking for symbol exports, try compiling. This patch adds a new autoconf function: SPL_LINUX_TRY_COMPILE_SYMBOL. This new function does the following: - Call LINUX_TRY_COMPILE with the specified parameters. - If unsuccessful, return false. - If successful and we're configuring with --enable-linux-builtin, return true. - Else, call CHECK_SYMBOL_EXPORT with the specified parameters and return the result. All calls to CHECK_SYMBOL_EXPORT are converted to LINUX_TRY_COMPILE_SYMBOL so that the tests work even when configuring for builtin on a kernel which doesn't have loadable module support, or hasn't been built yet. The only exception are: - AC_GET_VMALLOC_INFO, because we don't even have a public header to include in the test case, but that's okay considering this symbol can be ignored just fine. - SPL_AC_DEVICE_CREATE, which is legacy API for 2.6.18 kernels. Since kernels this old are no longer supported it should arguably just be removed entirely from the build system. Note that we're also checking for the correct prototype with an actual call, which was not the case with CHECK_SYMBOL_EXPORT. However, for "complicated" test cases like with multiple symbol versions (e.g. vfs_fsync), we stick with the original behavior and only check for the function's existence. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- config/spl-build.m4 | 508 +++-- configure | 4620 +++++++++++++++++++++++++++++++++++-------- spl_config.h.in | 2 +- 3 files changed, 4084 insertions(+), 1046 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 466d9eb50..7ec81e713 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -137,7 +137,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ + /usr/src/linux-* \ 2>/dev/null | grep -v obj | tail -1) fi @@ -678,8 +678,7 @@ dnl # dnl # SPL_CHECK_SYMBOL_EXPORT dnl # check symbol exported or not dnl # -AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], - [AC_MSG_CHECKING([whether symbol $1 is exported]) +AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], [ grep -q -E '[[[:space:]]]$1[[[:space:]]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -689,24 +688,42 @@ AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], grep -q -E "EXPORT_SYMBOL.*($1)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - AC_MSG_RESULT([no]) + if test $export -eq 0; then : $4 - else - AC_MSG_RESULT([yes]) + else : $3 fi - else - AC_MSG_RESULT([yes]) + else : $3 fi ]) +dnl # +dnl # SPL_LINUX_TRY_COMPILE_SYMBOL +dnl # like SPL_LINUX_TRY_COMPILE, except SPL_CHECK_SYMBOL_EXPORT +dnl # is called if not compiling for builtin +dnl # +AC_DEFUN([SPL_LINUX_TRY_COMPILE_SYMBOL], [ + SPL_LINUX_TRY_COMPILE([$1], [$2], [rc=0], [rc=1]) + if test $rc -ne 0; then : + $6 + else + if test "x$enable_linux_builtin" != xyes; then + SPL_CHECK_SYMBOL_EXPORT([$3], [$4], [rc=0], [rc=1]) + fi + if test $rc -ne 0; then : + $6 + else : + $5 + fi + fi +]) + dnl # dnl # SPL_CHECK_SYMBOL_HEADER dnl # check if a symbol prototype is defined in listed headers. @@ -717,10 +734,10 @@ AC_DEFUN([SPL_CHECK_SYMBOL_HEADER], [ for file in $3; do grep -q "$2" "$LINUX/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - header=1 - break; - fi + if test $rc -eq 0; then + header=1 + break; + fi done if test $header -eq 0; then AC_MSG_RESULT([no]) @@ -991,10 +1008,18 @@ AC_DEFUN([SPL_AC_PATH_IN_NAMEIDATA], dnl # dnl # Custom SPL patch may export this system it is not required dnl # -AC_DEFUN([SPL_AC_TASK_CURR], [ - SPL_CHECK_SYMBOL_EXPORT([task_curr], [kernel/sched.c], - [AC_DEFINE(HAVE_TASK_CURR, 1, [task_curr() exported])], - []) +AC_DEFUN([SPL_AC_TASK_CURR], + [AC_MSG_CHECKING([whether task_curr() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + task_curr(NULL); + ], [task_curr], [kernel/sched.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_TASK_CURR, 1, [task_curr() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1060,13 +1085,15 @@ dnl # 2.6.18 API change, check whether device_create() is available. dnl # Device_create() was introduced in 2.6.18 and depricated dnl # class_device_create() which was fully removed in 2.6.26. dnl # -AC_DEFUN([SPL_AC_DEVICE_CREATE], [ - SPL_CHECK_SYMBOL_EXPORT( - [device_create], - [drivers/base/core.c], - [AC_DEFINE(HAVE_DEVICE_CREATE, 1, - [device_create() is available])], - []) +AC_DEFUN([SPL_AC_DEVICE_CREATE], + [AC_MSG_CHECKING([whether device_create() is available]) + SPL_CHECK_SYMBOL_EXPORT([device_create], [drivers/base/core.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DEVICE_CREATE, 1, + [device_create() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1096,25 +1123,37 @@ dnl # 2.6.13 API change, check whether class_device_create() is available. dnl # Class_device_create() was introduced in 2.6.13 and depricated dnl # class_simple_device_add() which was fully removed in 2.6.13. dnl # -AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], [ - SPL_CHECK_SYMBOL_EXPORT( - [class_device_create], - [drivers/base/class.c], - [AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1, - [class_device_create() is available])], - []) +AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], + [AC_MSG_CHECKING([whether class_device_create() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + class_device_create(NULL, NULL, 0, NULL, NULL); + ], [class_device_create], [drivers/base/class.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1, + [class_device_create() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # dnl # 2.6.26 API change, set_normalized_timespec() is exported. dnl # -AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT], [ - SPL_CHECK_SYMBOL_EXPORT( - [set_normalized_timespec], - [kernel/time.c], - [AC_DEFINE(HAVE_SET_NORMALIZED_TIMESPEC_EXPORT, 1, - [set_normalized_timespec() is available as export])], - []) +AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT], + [AC_MSG_CHECKING([whether set_normalized_timespec() is available as export]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + set_normalized_timespec(NULL, 0, 0); + ], [set_normalized_timespec], [kernel/time.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SET_NORMALIZED_TIMESPEC_EXPORT, 1, + [set_normalized_timespec() is available as export]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1264,13 +1303,19 @@ dnl # 2.6.9 API change, dnl # check whether 'monotonic_clock()' is available it may dnl # be available for some archs but not others. dnl # -AC_DEFUN([SPL_AC_MONOTONIC_CLOCK], [ - SPL_CHECK_SYMBOL_EXPORT( - [monotonic_clock], - [], - [AC_DEFINE(HAVE_MONOTONIC_CLOCK, 1, - [monotonic_clock() is available])], - []) +AC_DEFUN([SPL_AC_MONOTONIC_CLOCK], + [AC_MSG_CHECKING([whether monotonic_clock() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + monotonic_clock(); + ], [monotonic_clock], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MONOTONIC_CLOCK, 1, + [monotonic_clock() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1384,13 +1429,19 @@ dnl # dnl # 2.6.18 API change, dnl # kallsyms_lookup_name no longer exported dnl # -AC_DEFUN([SPL_AC_KALLSYMS_LOOKUP_NAME], [ - SPL_CHECK_SYMBOL_EXPORT( - [kallsyms_lookup_name], - [], - [AC_DEFINE(HAVE_KALLSYMS_LOOKUP_NAME, 1, - [kallsyms_lookup_name() is available])], - []) +AC_DEFUN([SPL_AC_KALLSYMS_LOOKUP_NAME], + [AC_MSG_CHECKING([whether kallsyms_lookup_name() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + kallsyms_lookup_name(NULL); + ], [kallsyms_lookup_name], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KALLSYMS_LOOKUP_NAME, 1, + [kallsyms_lookup_name() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1400,13 +1451,15 @@ dnl # custom kernel with the *-spl-export-symbols.patch which will export dnl # these symbols for use. If your already rolling a custom kernel for dnl # your environment this is recommended. dnl # -AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], [ - SPL_CHECK_SYMBOL_EXPORT( - [get_vmalloc_info], - [], - [AC_DEFINE(HAVE_GET_VMALLOC_INFO, 1, - [get_vmalloc_info() is available])], - []) +AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], + [AC_MSG_CHECKING([whether get_vmalloc_info() is available]) + SPL_CHECK_SYMBOL_EXPORT([get_vmalloc_info], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GET_VMALLOC_INFO, 1, + [get_vmalloc_info() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1428,7 +1481,7 @@ AC_DEFUN([SPL_AC_PGDAT_HELPERS], [ rc=$? if test $rc -eq 0; then AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_PGDAT_HELPERS, 1, [pgdat helpers are available]) + AC_DEFINE(HAVE_PGDAT_HELPERS, 1, [pgdat helpers are available]) else AC_MSG_RESULT([no]) fi @@ -1441,13 +1494,19 @@ dnl # custom kernel with the *-spl-export-symbols.patch which will export dnl # these symbols for use. If your already rolling a custom kernel for dnl # your environment this is recommended. dnl # -AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], [ - SPL_CHECK_SYMBOL_EXPORT( - [first_online_pgdat], - [], - [AC_DEFINE(HAVE_FIRST_ONLINE_PGDAT, 1, - [first_online_pgdat() is available])], - []) +AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], + [AC_MSG_CHECKING([whether first_online_pgdat() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + first_online_pgdat(); + ], [first_online_pgdat], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FIRST_ONLINE_PGDAT, 1, + [first_online_pgdat() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1457,13 +1516,19 @@ dnl # custom kernel with the *-spl-export-symbols.patch which will export dnl # these symbols for use. If your already rolling a custom kernel for dnl # your environment this is recommended. dnl # -AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], [ - SPL_CHECK_SYMBOL_EXPORT( - [next_online_pgdat], - [], - [AC_DEFINE(HAVE_NEXT_ONLINE_PGDAT, 1, - [next_online_pgdat() is available])], - []) +AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], + [AC_MSG_CHECKING([whether next_online_pgdat() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + next_online_pgdat(NULL); + ], [next_online_pgdat], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_NEXT_ONLINE_PGDAT, 1, + [next_online_pgdat() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1473,26 +1538,35 @@ dnl # custom kernel with the *-spl-export-symbols.patch which will export dnl # these symbols for use. If your already rolling a custom kernel for dnl # your environment this is recommended. dnl # -AC_DEFUN([SPL_AC_NEXT_ZONE], [ - SPL_CHECK_SYMBOL_EXPORT( - [next_zone], - [], - [AC_DEFINE(HAVE_NEXT_ZONE, 1, - [next_zone() is available])], - []) +AC_DEFUN([SPL_AC_NEXT_ZONE], + [AC_MSG_CHECKING([whether next_zone() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + next_zone(NULL); + ], [next_zone], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_NEXT_ZONE, 1, [next_zone() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # dnl # 2.6.17 API change, dnl # See SPL_AC_PGDAT_HELPERS for details. dnl # -AC_DEFUN([SPL_AC_PGDAT_LIST], [ - SPL_CHECK_SYMBOL_EXPORT( - [pgdat_list], - [], - [AC_DEFINE(HAVE_PGDAT_LIST, 1, - [pgdat_list is available])], - []) +AC_DEFUN([SPL_AC_PGDAT_LIST], + [AC_MSG_CHECKING([whether pgdat_list is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + pg_data_t *tmp = pgdat_list; + ], [], [pgdat_list], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PGDAT_LIST, 1, [pgdat_list is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1684,12 +1758,18 @@ AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ AC_DEFINE(NEED_GET_ZONE_COUNTS, 1, [get_zone_counts() is needed]) - SPL_CHECK_SYMBOL_EXPORT( - [get_zone_counts], - [], - [AC_DEFINE(HAVE_GET_ZONE_COUNTS, 1, - [get_zone_counts() is available])], - []) + AC_MSG_CHECKING([whether get_zone_counts() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + get_zone_counts(NULL, NULL, NULL); + ], [get_zone_counts], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GET_ZONE_COUNTS, 1, + [get_zone_counts() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) ]) @@ -1697,25 +1777,37 @@ dnl # dnl # 2.6.27 API change, dnl # The user_path_dir() replaces __user_walk() dnl # -AC_DEFUN([SPL_AC_USER_PATH_DIR], [ - SPL_CHECK_SYMBOL_EXPORT( - [user_path_at], - [], - [AC_DEFINE(HAVE_USER_PATH_DIR, 1, - [user_path_dir() is available])], - []) +AC_DEFUN([SPL_AC_USER_PATH_DIR], + [AC_MSG_CHECKING([whether user_path_dir() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + #include + ], [ + user_path_dir(NULL, NULL); + ], [user_path_at], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_USER_PATH_DIR, 1, [user_path_dir() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # dnl # Symbol available in RHEL kernels not in stock kernels. dnl # -AC_DEFUN([SPL_AC_SET_FS_PWD], [ - SPL_CHECK_SYMBOL_EXPORT( - [set_fs_pwd], - [], - [AC_DEFINE(HAVE_SET_FS_PWD, 1, - [set_fs_pwd() is available])], - []) +AC_DEFUN([SPL_AC_SET_FS_PWD], + [AC_MSG_CHECKING([whether set_fs_pwd() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + #include + ], [ + (void) set_fs_pwd; + ], [set_fs_pwd], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SET_FS_PWD, 1, [set_fs_pwd() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1823,26 +1915,37 @@ AC_DEFUN([SPL_AC_CRED_STRUCT], [ dnl # dnl # Custom SPL patch may export this symbol. dnl # -AC_DEFUN([SPL_AC_GROUPS_SEARCH], [ - SPL_CHECK_SYMBOL_EXPORT( - [groups_search], - [], - [AC_DEFINE(HAVE_GROUPS_SEARCH, 1, - [groups_search() is available])], - []) +AC_DEFUN([SPL_AC_GROUPS_SEARCH], + [AC_MSG_CHECKING([whether groups_search() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + groups_search(NULL, 0); + ], [groups_search], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GROUPS_SEARCH, 1, [groups_search() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # dnl # 2.6.x API change, dnl # __put_task_struct() was exported in RHEL5 but unavailable elsewhere. dnl # -AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], [ - SPL_CHECK_SYMBOL_EXPORT( - [__put_task_struct], - [], - [AC_DEFINE(HAVE_PUT_TASK_STRUCT, 1, - [__put_task_struct() is available])], - []) +AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], + [AC_MSG_CHECKING([whether __put_task_struct() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + __put_task_struct(NULL); + ], [__put_task_struct], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PUT_TASK_STRUCT, 1, + [__put_task_struct() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1868,25 +1971,36 @@ dnl # dnl # 2.6.x API change, dnl # kvasprintf() function added. dnl # -AC_DEFUN([SPL_AC_KVASPRINTF], [ - SPL_CHECK_SYMBOL_EXPORT( - [kvasprintf], - [], - [AC_DEFINE(HAVE_KVASPRINTF, 1, - [kvasprintf() is available])], - []) +AC_DEFUN([SPL_AC_KVASPRINTF], + [AC_MSG_CHECKING([whether kvasprintf() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + kvasprintf(0, NULL, *((va_list*)NULL)); + ], [kvasprintf], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KVASPRINTF, 1, [kvasprintf() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # dnl # 2.6.29 API change, dnl # vfs_fsync() funcation added, prior to this use file_fsync(). dnl # -AC_DEFUN([SPL_AC_VFS_FSYNC], [ - SPL_CHECK_SYMBOL_EXPORT( - [vfs_fsync], - [fs/sync.c], - [AC_DEFINE(HAVE_VFS_FSYNC, 1, [vfs_fsync() is available])], - []) +AC_DEFUN([SPL_AC_VFS_FSYNC], + [AC_MSG_CHECKING([whether vfs_fsync() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + (void) vfs_fsync; + ], [vfs_fsync], [fs/sync.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VFS_FSYNC, 1, [vfs_fsync() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1914,13 +2028,18 @@ dnl # condition. The fixed version is exported as a symbol. The race dnl # condition is fixed by acquiring sem->wait_lock, so we must not dnl # call that version while holding sem->wait_lock. dnl # -AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], [ - SPL_CHECK_SYMBOL_EXPORT( - [rwsem_is_locked], - [lib/rwsem-spinlock.c], - [AC_DEFINE(RWSEM_IS_LOCKED_TAKES_WAIT_LOCK, 1, - [rwsem_is_locked() acquires sem->wait_lock])], - []) +AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], + [AC_MSG_CHECKING([whether rwsem_is_locked() acquires sem->wait_lock]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + int rwsem_is_locked(struct rw_semaphore *sem) { return 0; } + ], [], [rwsem_is_locked], [lib/rwsem-spinlock.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(RWSEM_IS_LOCKED_TAKES_WAIT_LOCK, 1, + [rwsem_is_locked() acquires sem->wait_lock]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1937,18 +2056,31 @@ dnl # of these functions are exported invalidate_inodes() can be dnl # safely used. dnl # AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ - SPL_CHECK_SYMBOL_EXPORT( - [invalidate_inodes], - [], - [AC_DEFINE(HAVE_INVALIDATE_INODES, 1, - [invalidate_inodes() is available])], - []) - SPL_CHECK_SYMBOL_EXPORT( - [invalidate_inodes_check], - [], - [AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1, - [invalidate_inodes_check() is available])], - []) + AC_MSG_CHECKING([whether invalidate_inodes() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + invalidate_inodes; + ], [invalidate_inodes], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INVALIDATE_INODES, 1, + [invalidate_inodes() is available]) + ], [ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([whether invalidate_inodes_check() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + invalidate_inodes_check(NULL, 0); + ], [invalidate_inodes_check], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1, + [invalidate_inodes_check() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -1987,13 +2119,19 @@ dnl # There currently exists no exposed API to partially shrink the dcache. dnl # The expected mechanism to shrink the cache is a registered shrinker dnl # which is called during memory pressure. dnl # -AC_DEFUN([SPL_AC_SHRINK_DCACHE_MEMORY], [ - SPL_CHECK_SYMBOL_EXPORT( - [shrink_dcache_memory], - [fs/dcache.c], - [AC_DEFINE(HAVE_SHRINK_DCACHE_MEMORY, 1, - [shrink_dcache_memory() is available])], - []) +AC_DEFUN([SPL_AC_SHRINK_DCACHE_MEMORY], + [AC_MSG_CHECKING([whether shrink_dcache_memory() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + shrink_dcache_memory(0, 0); + ], [shrink_dcache_memory], [fs/dcache.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SHRINK_DCACHE_MEMORY, 1, + [shrink_dcache_memory() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -2002,13 +2140,19 @@ dnl # There currently exists no exposed API to partially shrink the icache. dnl # The expected mechanism to shrink the cache is a registered shrinker dnl # which is called during memory pressure. dnl # -AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], [ - SPL_CHECK_SYMBOL_EXPORT( - [shrink_icache_memory], - [fs/inode.c], - [AC_DEFINE(HAVE_SHRINK_ICACHE_MEMORY, 1, - [shrink_icache_memory() is available])], - []) +AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], + [AC_MSG_CHECKING([whether shrink_icache_memory() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + shrink_icache_memory(0, 0); + ], [shrink_icache_memory], [fs/inode.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SHRINK_ICACHE_MEMORY, 1, + [shrink_icache_memory() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # @@ -2034,13 +2178,19 @@ dnl # The kern_path_parent() symbol is no longer exported by the kernel. dnl # However, it remains the prefered interface and since we still have dnl # access to the prototype we dynamically lookup the required address. dnl # -AC_DEFUN([SPL_AC_KERN_PATH_PARENT_SYMBOL], [ - SPL_CHECK_SYMBOL_EXPORT( - [kern_path_parent], - [fs/namei.c], - [AC_DEFINE(HAVE_KERN_PATH_PARENT_SYMBOL, 1, - [kern_path_parent() is available])], - []) +AC_DEFUN([SPL_AC_KERN_PATH_PARENT_SYMBOL], + [AC_MSG_CHECKING([whether kern_path_parent() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + kern_path_parent(NULL, NULL); + ], [kern_path_parent], [fs/namei.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERN_PATH_PARENT_SYMBOL, 1, + [kern_path_parent() is available]) + ], [ + AC_MSG_RESULT(no) + ]) ]) dnl # diff --git a/configure b/configure index 04acdf1b1..1ca8e847f 100755 --- a/configure +++ b/configure @@ -11772,7 +11772,7 @@ $as_echo_n "checking kernel source directory... " >&6; } sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ + /usr/src/linux-* \ 2>/dev/null | grep -v obj | tail -1) fi @@ -12849,9 +12849,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether task_curr() is available" >&5 +$as_echo_n "checking whether task_curr() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + task_curr(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 -$as_echo_n "checking whether symbol task_curr is exported... " >&6; } grep -q -E '[[:space:]]task_curr[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -12861,25 +12921,28 @@ $as_echo_n "checking whether symbol task_curr is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -12887,6 +12950,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TASK_CURR 1 _ACEOF + + fi fi @@ -13092,9 +13157,9 @@ fi + { $as_echo "$as_me:$LINENO: checking whether device_create() is available" >&5 +$as_echo_n "checking whether device_create() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 -$as_echo_n "checking whether symbol device_create is exported... " >&6; } grep -q -E '[[:space:]]device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -13104,25 +13169,18 @@ $as_echo_n "checking whether symbol device_create is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(device_create)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + if test $export -eq 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + else : -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -13130,6 +13188,18 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_CREATE 1 _ACEOF + + fi + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi @@ -13203,9 +13273,69 @@ fi EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether class_device_create() is available" >&5 +$as_echo_n "checking whether class_device_create() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + class_device_create(NULL, NULL, 0, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 -$as_echo_n "checking whether symbol class_device_create is exported... " >&6; } grep -q -E '[[:space:]]class_device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -13215,25 +13345,28 @@ $as_echo_n "checking whether symbol class_device_create is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -13241,12 +13374,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_CLASS_DEVICE_CREATE 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is available as export" >&5 +$as_echo_n "checking whether set_normalized_timespec() is available as export... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + set_normalized_timespec(NULL, 0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 -$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; } grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -13256,25 +13451,28 @@ $as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6 grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -13282,6 +13480,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 _ACEOF + + fi fi @@ -13841,9 +14041,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether monotonic_clock() is available" >&5 +$as_echo_n "checking whether monotonic_clock() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + monotonic_clock(); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 -$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -13853,25 +14113,28 @@ $as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -13879,6 +14142,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_MONOTONIC_CLOCK 1 _ACEOF + + fi fi @@ -14226,9 +14491,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether kallsyms_lookup_name() is available" >&5 +$as_echo_n "checking whether kallsyms_lookup_name() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kallsyms_lookup_name(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 -$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -14238,25 +14563,28 @@ $as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -14264,12 +14592,14 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_KALLSYMS_LOOKUP_NAME 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether get_vmalloc_info() is available" >&5 +$as_echo_n "checking whether get_vmalloc_info() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 -$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -14279,25 +14609,18 @@ $as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + if test $export -eq 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + else : -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 -_ACEOF - - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -14305,6 +14628,18 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GET_VMALLOC_INFO 1 _ACEOF + + fi + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi @@ -14326,9 +14661,69 @@ _ACEOF $as_echo "no" >&6; } fi + { $as_echo "$as_me:$LINENO: checking whether first_online_pgdat() is available" >&5 +$as_echo_n "checking whether first_online_pgdat() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + first_online_pgdat(); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -14338,25 +14733,28 @@ $as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -14364,12 +14762,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_FIRST_ONLINE_PGDAT 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether next_online_pgdat() is available" >&5 +$as_echo_n "checking whether next_online_pgdat() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + next_online_pgdat(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -14379,25 +14839,28 @@ $as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -14405,12 +14868,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ONLINE_PGDAT 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether next_zone() is available" >&5 +$as_echo_n "checking whether next_zone() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + next_zone(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 -$as_echo_n "checking whether symbol next_zone is exported... " >&6; } grep -q -E '[[:space:]]next_zone[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -14420,25 +14945,28 @@ $as_echo_n "checking whether symbol next_zone is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -14446,12 +14974,73 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ZONE 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether pgdat_list is available" >&5 +$as_echo_n "checking whether pgdat_list is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + pg_data_t *tmp = pgdat_list; + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 -$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -14461,25 +15050,28 @@ $as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -14487,6 +15079,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_LIST 1 _ACEOF + + fi fi @@ -15102,8 +15696,69 @@ cat >>confdefs.h <<\_ACEOF _ACEOF - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether get_zone_counts() is available" >&5 +$as_echo_n "checking whether get_zone_counts() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + get_zone_counts(NULL, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15113,16 +15768,28 @@ $as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15130,15 +15797,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GET_ZONE_COUNTS 1 _ACEOF + fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - fi @@ -15150,9 +15810,70 @@ fi + { $as_echo "$as_me:$LINENO: checking whether user_path_dir() is available" >&5 +$as_echo_n "checking whether user_path_dir() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + user_path_dir(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5 -$as_echo_n "checking whether symbol user_path_at is exported... " >&6; } grep -q -E '[[:space:]]user_path_at[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15162,25 +15883,28 @@ $as_echo_n "checking whether symbol user_path_at is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15188,12 +15912,75 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_USER_PATH_DIR 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() is available" >&5 +$as_echo_n "checking whether set_fs_pwd() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + (void) set_fs_pwd; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 -$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15203,25 +15990,28 @@ $as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15229,6 +16019,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SET_FS_PWD 1 _ACEOF + + fi fi @@ -15431,9 +16223,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() is available" >&5 +$as_echo_n "checking whether vfs_fsync() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + (void) vfs_fsync; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol vfs_fsync is exported" >&5 -$as_echo_n "checking whether symbol vfs_fsync is exported... " >&6; } grep -q -E '[[:space:]]vfs_fsync[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15443,25 +16295,28 @@ $as_echo_n "checking whether symbol vfs_fsync is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(vfs_fsync)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_VFS_FSYNC 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15469,6 +16324,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_VFS_FSYNC 1 _ACEOF + + fi fi @@ -15679,9 +16536,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether groups_search() is available" >&5 +$as_echo_n "checking whether groups_search() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + groups_search(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 -$as_echo_n "checking whether symbol groups_search is exported... " >&6; } grep -q -E '[[:space:]]groups_search[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15691,25 +16608,28 @@ $as_echo_n "checking whether symbol groups_search is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15717,12 +16637,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GROUPS_SEARCH 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether __put_task_struct() is available" >&5 +$as_echo_n "checking whether __put_task_struct() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + __put_task_struct(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 -$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15732,25 +16714,28 @@ $as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15758,6 +16743,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PUT_TASK_STRUCT 1 _ACEOF + + fi fi @@ -15828,9 +16815,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether kvasprintf() is available" >&5 +$as_echo_n "checking whether kvasprintf() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kvasprintf(0, NULL, *((va_list*)NULL)); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5 -$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15840,25 +16887,28 @@ $as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15866,12 +16916,73 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_KVASPRINTF 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether rwsem_is_locked() acquires sem->wait_lock" >&5 +$as_echo_n "checking whether rwsem_is_locked() acquires sem->wait_lock... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + int rwsem_is_locked(struct rw_semaphore *sem) { return 0; } + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 -$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15881,25 +16992,28 @@ $as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15907,12 +17021,75 @@ cat >>confdefs.h <<\_ACEOF #define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 _ACEOF + + fi fi - { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes is exported" >&5 -$as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() is available" >&5 +$as_echo_n "checking whether invalidate_inodes() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + invalidate_inodes; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15922,25 +17099,28 @@ $as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15948,10 +17128,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_INVALIDATE_INODES 1 _ACEOF + + fi fi - { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes_check is exported" >&5 -$as_echo_n "checking whether symbol invalidate_inodes_check is exported... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes_check() is available" >&5 +$as_echo_n "checking whether invalidate_inodes_check() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + invalidate_inodes_check(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]invalidate_inodes_check[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -15961,25 +17205,28 @@ $as_echo_n "checking whether symbol invalidate_inodes_check is exported... " >&6 grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes_check)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES_CHECK 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -15987,6 +17234,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_INVALIDATE_INODES_CHECK 1 _ACEOF + + fi fi @@ -16056,9 +17305,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether shrink_dcache_memory() is available" >&5 +$as_echo_n "checking whether shrink_dcache_memory() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + shrink_dcache_memory(0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 -$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -16068,25 +17377,28 @@ $as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_DCACHE_MEMORY 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -16094,12 +17406,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SHRINK_DCACHE_MEMORY 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether shrink_icache_memory() is available" >&5 +$as_echo_n "checking whether shrink_icache_memory() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + shrink_icache_memory(0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5 -$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -16109,25 +17483,28 @@ $as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_ICACHE_MEMORY 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -16135,6 +17512,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SHRINK_ICACHE_MEMORY 1 _ACEOF + + fi fi @@ -16146,10 +17525,10 @@ $as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; for file in include/linux/namei.h; do grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - header=1 - break; - fi + if test $rc -eq 0; then + header=1 + break; + fi done if test $header -eq 0; then { $as_echo "$as_me:$LINENO: result: no" >&5 @@ -16166,9 +17545,69 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether kern_path_parent() is available" >&5 +$as_echo_n "checking whether kern_path_parent() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kern_path_parent(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5 -$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -16178,25 +17617,28 @@ $as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT_SYMBOL 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -16204,6 +17646,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_KERN_PATH_PARENT_SYMBOL 1 _ACEOF + + fi fi @@ -16524,7 +17968,7 @@ $as_echo_n "checking kernel source directory... " >&6; } sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ + /usr/src/linux-* \ 2>/dev/null | grep -v obj | tail -1) fi @@ -17601,9 +19045,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether task_curr() is available" >&5 +$as_echo_n "checking whether task_curr() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + task_curr(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 -$as_echo_n "checking whether symbol task_curr is exported... " >&6; } grep -q -E '[[:space:]]task_curr[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -17613,25 +19117,28 @@ $as_echo_n "checking whether symbol task_curr is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -17639,6 +19146,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TASK_CURR 1 _ACEOF + + fi fi @@ -17844,9 +19353,9 @@ fi + { $as_echo "$as_me:$LINENO: checking whether device_create() is available" >&5 +$as_echo_n "checking whether device_create() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 -$as_echo_n "checking whether symbol device_create is exported... " >&6; } grep -q -E '[[:space:]]device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -17856,25 +19365,18 @@ $as_echo_n "checking whether symbol device_create is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(device_create)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + if test $export -eq 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + else : -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -17882,6 +19384,18 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_CREATE 1 _ACEOF + + fi + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi @@ -17955,9 +19469,69 @@ fi EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether class_device_create() is available" >&5 +$as_echo_n "checking whether class_device_create() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + class_device_create(NULL, NULL, 0, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 -$as_echo_n "checking whether symbol class_device_create is exported... " >&6; } grep -q -E '[[:space:]]class_device_create[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -17967,25 +19541,28 @@ $as_echo_n "checking whether symbol class_device_create is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -17993,12 +19570,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_CLASS_DEVICE_CREATE 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is available as export" >&5 +$as_echo_n "checking whether set_normalized_timespec() is available as export... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + set_normalized_timespec(NULL, 0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 -$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; } grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -18008,25 +19647,28 @@ $as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6 grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -18034,6 +19676,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 _ACEOF + + fi fi @@ -18593,9 +20237,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether monotonic_clock() is available" >&5 +$as_echo_n "checking whether monotonic_clock() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + monotonic_clock(); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 -$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -18605,25 +20309,28 @@ $as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -18631,6 +20338,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_MONOTONIC_CLOCK 1 _ACEOF + + fi fi @@ -18978,9 +20687,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether kallsyms_lookup_name() is available" >&5 +$as_echo_n "checking whether kallsyms_lookup_name() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kallsyms_lookup_name(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 -$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -18990,25 +20759,28 @@ $as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19016,12 +20788,14 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_KALLSYMS_LOOKUP_NAME 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether get_vmalloc_info() is available" >&5 +$as_echo_n "checking whether get_vmalloc_info() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 -$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19031,25 +20805,18 @@ $as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + if test $export -eq 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + else : -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 -_ACEOF - - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19057,6 +20824,18 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GET_VMALLOC_INFO 1 _ACEOF + + fi + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi @@ -19078,9 +20857,69 @@ _ACEOF $as_echo "no" >&6; } fi + { $as_echo "$as_me:$LINENO: checking whether first_online_pgdat() is available" >&5 +$as_echo_n "checking whether first_online_pgdat() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + first_online_pgdat(); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19090,25 +20929,28 @@ $as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19116,12 +20958,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_FIRST_ONLINE_PGDAT 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether next_online_pgdat() is available" >&5 +$as_echo_n "checking whether next_online_pgdat() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + next_online_pgdat(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19131,25 +21035,28 @@ $as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19157,12 +21064,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ONLINE_PGDAT 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether next_zone() is available" >&5 +$as_echo_n "checking whether next_zone() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + next_zone(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 -$as_echo_n "checking whether symbol next_zone is exported... " >&6; } grep -q -E '[[:space:]]next_zone[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19172,25 +21141,28 @@ $as_echo_n "checking whether symbol next_zone is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19198,12 +21170,73 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT_ZONE 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether pgdat_list is available" >&5 +$as_echo_n "checking whether pgdat_list is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + pg_data_t *tmp = pgdat_list; + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 -$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19213,25 +21246,28 @@ $as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19239,6 +21275,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PGDAT_LIST 1 _ACEOF + + fi fi @@ -19854,8 +21892,69 @@ cat >>confdefs.h <<\_ACEOF _ACEOF - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether get_zone_counts() is available" >&5 +$as_echo_n "checking whether get_zone_counts() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + get_zone_counts(NULL, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19865,16 +21964,28 @@ $as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19882,15 +21993,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GET_ZONE_COUNTS 1 _ACEOF + fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - fi @@ -19902,9 +22006,70 @@ fi + { $as_echo "$as_me:$LINENO: checking whether user_path_dir() is available" >&5 +$as_echo_n "checking whether user_path_dir() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + user_path_dir(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5 -$as_echo_n "checking whether symbol user_path_at is exported... " >&6; } grep -q -E '[[:space:]]user_path_at[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19914,25 +22079,28 @@ $as_echo_n "checking whether symbol user_path_at is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19940,12 +22108,75 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_USER_PATH_DIR 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() is available" >&5 +$as_echo_n "checking whether set_fs_pwd() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + (void) set_fs_pwd; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 -$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -19955,25 +22186,28 @@ $as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -19981,6 +22215,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SET_FS_PWD 1 _ACEOF + + fi fi @@ -20183,9 +22419,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() is available" >&5 +$as_echo_n "checking whether vfs_fsync() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + (void) vfs_fsync; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol vfs_fsync is exported" >&5 -$as_echo_n "checking whether symbol vfs_fsync is exported... " >&6; } grep -q -E '[[:space:]]vfs_fsync[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20195,25 +22491,28 @@ $as_echo_n "checking whether symbol vfs_fsync is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(vfs_fsync)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_VFS_FSYNC 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20221,6 +22520,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_VFS_FSYNC 1 _ACEOF + + fi fi @@ -20431,9 +22732,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether groups_search() is available" >&5 +$as_echo_n "checking whether groups_search() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + groups_search(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 -$as_echo_n "checking whether symbol groups_search is exported... " >&6; } grep -q -E '[[:space:]]groups_search[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20443,25 +22804,28 @@ $as_echo_n "checking whether symbol groups_search is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20469,12 +22833,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GROUPS_SEARCH 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether __put_task_struct() is available" >&5 +$as_echo_n "checking whether __put_task_struct() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + __put_task_struct(NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 -$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20484,25 +22910,28 @@ $as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20510,6 +22939,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PUT_TASK_STRUCT 1 _ACEOF + + fi fi @@ -20580,9 +23011,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether kvasprintf() is available" >&5 +$as_echo_n "checking whether kvasprintf() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kvasprintf(0, NULL, *((va_list*)NULL)); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5 -$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20592,25 +23083,28 @@ $as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20618,12 +23112,73 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_KVASPRINTF 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether rwsem_is_locked() acquires sem->wait_lock" >&5 +$as_echo_n "checking whether rwsem_is_locked() acquires sem->wait_lock... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + int rwsem_is_locked(struct rw_semaphore *sem) { return 0; } + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 -$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20633,25 +23188,28 @@ $as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20659,12 +23217,75 @@ cat >>confdefs.h <<\_ACEOF #define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 _ACEOF + + fi fi - { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes is exported" >&5 -$as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() is available" >&5 +$as_echo_n "checking whether invalidate_inodes() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + invalidate_inodes; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20674,25 +23295,28 @@ $as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20700,10 +23324,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_INVALIDATE_INODES 1 _ACEOF + + fi fi - { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes_check is exported" >&5 -$as_echo_n "checking whether symbol invalidate_inodes_check is exported... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes_check() is available" >&5 +$as_echo_n "checking whether invalidate_inodes_check() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + invalidate_inodes_check(NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]invalidate_inodes_check[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20713,25 +23401,28 @@ $as_echo_n "checking whether symbol invalidate_inodes_check is exported... " >&6 grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes_check)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES_CHECK 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20739,6 +23430,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_INVALIDATE_INODES_CHECK 1 _ACEOF + + fi fi @@ -20808,9 +23501,69 @@ fi + { $as_echo "$as_me:$LINENO: checking whether shrink_dcache_memory() is available" >&5 +$as_echo_n "checking whether shrink_dcache_memory() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + shrink_dcache_memory(0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 -$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20820,25 +23573,28 @@ $as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_DCACHE_MEMORY 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20846,12 +23602,74 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SHRINK_DCACHE_MEMORY 1 _ACEOF + + fi fi + { $as_echo "$as_me:$LINENO: checking whether shrink_icache_memory() is available" >&5 +$as_echo_n "checking whether shrink_icache_memory() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + shrink_icache_memory(0, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5 -$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20861,25 +23679,28 @@ $as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_ICACHE_MEMORY 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20887,6 +23708,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SHRINK_ICACHE_MEMORY 1 _ACEOF + + fi fi @@ -20898,10 +23721,10 @@ $as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; for file in include/linux/namei.h; do grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - header=1 - break; - fi + if test $rc -eq 0; then + header=1 + break; + fi done if test $header -eq 0; then { $as_echo "$as_me:$LINENO: result: no" >&5 @@ -20918,9 +23741,69 @@ _ACEOF fi + { $as_echo "$as_me:$LINENO: checking whether kern_path_parent() is available" >&5 +$as_echo_n "checking whether kern_path_parent() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kern_path_parent(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5 -$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ $LINUX_OBJ/Module*.symvers 2>/dev/null rc=$? @@ -20930,25 +23813,28 @@ $as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; } grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \ "$LINUX_OBJ/$file" 2>/dev/null rc=$? - if test $rc -eq 0; then - export=1 - break; - fi + if test $rc -eq 0; then + export=1 + break; + fi done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT_SYMBOL 1 -_ACEOF + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi fi - else + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -20956,6 +23842,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_KERN_PATH_PARENT_SYMBOL 1 _ACEOF + + fi fi diff --git a/spl_config.h.in b/spl_config.h.in index 1b4a129b2..4ee1b3353 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -210,7 +210,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* task_curr() exported */ +/* task_curr() is available */ #undef HAVE_TASK_CURR /* timespec_sub() is available */ From c167aadb27d51b7be9ee7bd582e2795061a68480 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Mon, 9 Jul 2012 11:10:31 +0200 Subject: [PATCH 0612/1062] Add script for builtin module building. This commit introduces a "copy-builtin" script designed to prepare a kernel source tree for building SPL as a builtin module. The script makes a full copy of all needed files, thus making the kernel source tree fully independent of the spl source package. To achieve that, some compilation flags (-include, -I) have been moved to module/Makefile. This Makefile is only used when compiling external modules; when compiling builtin modules, a Kbuild file generated by the configure-builtin script is used instead. This makes sure Makefiles inside the kernel source tree does not contain references to the spl source package. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- README.markdown | 6 ++ copy-builtin | 122 +++++++++++++++++++++++++++++++++++++++ module/Makefile.in | 6 +- module/spl/Makefile.in | 6 +- module/splat/Makefile.in | 6 +- 5 files changed, 137 insertions(+), 9 deletions(-) create mode 100755 copy-builtin diff --git a/README.markdown b/README.markdown index e0d8f76b6..81535aa22 100644 --- a/README.markdown +++ b/README.markdown @@ -11,5 +11,11 @@ To build packages for your distribution: $ ./configure $ make pkg +To copy the kernel code inside your kernel source tree for builtin +compilation: + + $ ./configure --enable-linux-builtin --with-linux=/usr/src/linux-... + $ ./copy-builtin /usr/src/linux-... + Full documentation for building, configuring, and using the SPL can be found at: diff --git a/copy-builtin b/copy-builtin new file mode 100755 index 000000000..3277270d9 --- /dev/null +++ b/copy-builtin @@ -0,0 +1,122 @@ +#!/bin/bash + +set -e + +usage() +{ + echo "usage: $0 " >&2 + exit 1 +} + +[ "$#" -eq 1 ] || usage +KERNEL_DIR="$(readlink --canonicalize-existing "$1")" + +MODULES=() +for MODULE_DIR in module/* +do + [ -d "$MODULE_DIR" ] || continue + MODULES+=("${MODULE_DIR##*/}") +done + +if ! [ -e 'spl_config.h' ] +then + echo >&2 + echo " $0: you did not run configure, or you're not in the SPL source directory." >&2 + echo " $0: run configure with --with-linux=$KERNEL_DIR and --enable-linux-builtin." >&2 + echo >&2 + exit 1 +fi + +make clean || true + +rm -rf "$KERNEL_DIR/include/spl" "$KERNEL_DIR/spl" +cp --recursive include "$KERNEL_DIR/include/spl" +cp --recursive module "$KERNEL_DIR/spl" +cp spl_config.h "$KERNEL_DIR/" + +adjust_obj_paths() +{ + local FILE="$1" + local LINE OBJPATH + + while IFS='' read -r LINE + do + OBJPATH="${LINE#\$(MODULE)-objs += }" + if [ "$OBJPATH" = "$LINE" ] + then + echo "$LINE" + else + echo "\$(MODULE)-objs += ${OBJPATH##*/}" + fi + done < "$FILE" > "$FILE.new" + mv "$FILE.new" "$FILE" +} + +for MODULE in "${MODULES[@]}" +do + adjust_obj_paths "$KERNEL_DIR/spl/$MODULE/Makefile" +done + +cat > "$KERNEL_DIR/spl/Kconfig" <<"EOF" +config SPL + tristate "Solaris Porting Layer (SPL)" + help + This is the SPL library from the ZFS On Linux project. + + See http://zfsonlinux.org/ + + To compile this library as a module, choose M here. + + If unsure, say N. +EOF + +{ + cat <<-"EOF" + SPL_MODULE_CFLAGS = -I$(srctree)/include/spl + SPL_MODULE_CFLAGS += -include $(srctree)/spl_config.h + export SPL_MODULE_CFLAGS + + obj-$(CONFIG_SPL) := + EOF + + for MODULE in "${MODULES[@]}" + do + echo 'obj-$(CONFIG_SPL) += ' "$MODULE/" + done +} > "$KERNEL_DIR/spl/Kbuild" + +add_after() +{ + local FILE="$1" + local MARKER="$2" + local NEW="$3" + local LINE + + while IFS='' read -r LINE + do + echo "$LINE" + + if [ -n "$MARKER" -a "$LINE" = "$MARKER" ] + then + echo "$NEW" + MARKER='' + if IFS='' read -r LINE + then + [ "$LINE" != "$NEW" ] && echo "$LINE" + fi + fi + done < "$FILE" > "$FILE.new" + + mv "$FILE.new" "$FILE" +} + +add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"' +# We must take care to build SPL before ZFS, else module initialization order will be wrong +sed -i 's#kernel/ mm/ fs/#kernel/ mm/ spl/ fs/#' "$KERNEL_DIR/Makefile" + +echo >&2 +echo " $0: done." >&2 +echo " $0: now you can build the kernel with SPL support." >&2 +echo " $0: make sure you enable SPL support (CONFIG_SPL) before building." >&2 +echo >&2 + diff --git a/module/Makefile.in b/module/Makefile.in index 0a7fd02a3..d291951f8 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -3,8 +3,12 @@ subdir-m += splat INSTALL=/usr/bin/install +SPL_MODULE_CFLAGS = -I@abs_top_srcdir@/include +SPL_MODULE_CFLAGS += -include @abs_top_builddir@/spl_config.h +export SPL_MODULE_CFLAGS + modules: - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_SPL=m $@ clean: @# Only cleanup the kernel build directories when CONFIG_KERNEL diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 7e8aac502..34b480127 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -1,12 +1,10 @@ # Makefile.in for spl kernel module MODULE := spl -EXTRA_CFLAGS = @KERNELCPPFLAGS@ -EXTRA_CFLAGS += -I@abs_top_srcdir@/include -EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h +EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@ # Solaris porting layer module -obj-m := $(MODULE).o +obj-$(CONFIG_SPL) := $(MODULE).o $(MODULE)-objs += @top_srcdir@/module/spl/spl-debug.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index 05007d42f..f4065196b 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -1,12 +1,10 @@ # Makefile.in for splat kernel module MODULE := splat -EXTRA_CFLAGS = @KERNELCPPFLAGS@ -EXTRA_CFLAGS += -I@abs_top_srcdir@/include -EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h +EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@ # Solaris Porting LAyer Tests -obj-m := $(MODULE).o +obj-$(CONFIG_SPL) := $(MODULE).o $(MODULE)-objs += @top_srcdir@/module/splat/splat-ctl.o $(MODULE)-objs += @top_srcdir@/module/splat/splat-kmem.o From a9f2397ee9f8c1e2c18072361f1f819155242ed2 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Thu, 5 Jul 2012 09:22:03 +0200 Subject: [PATCH 0613/1062] Determine the hostid on demand. Currently, the SPL tries to determine the hostid at module load. The hostid is usually determined by running the userland program "hostid" during module initialization. Unfortunately, when the module initializes, it may be way too soon to be able to run any userland programs. This is especially true when the module is compiled directly inside the kernel (built-in); in that case, the SPL would try to run hostid when the kernel is still initializing, which of course is doomed to fail. This patch fixes the issue by deferring hostid generation until something actually needs the hostid (that is, when zone_get_hostid() is called), thus switching to a "on-initialization" model to a "on-demand" (lazy loading) model. ZFS only needs the hostid when some pool operations are requested, and this always happens way after the kernel has finished initialization, thus solving the problem. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- module/spl/spl-generic.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 13f426733..cc2766452 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -546,11 +546,29 @@ hostid_exec(void) uint32_t zone_get_hostid(void *zone) { + static int first = 1; unsigned long hostid; + int rc; /* Only the global zone is supported */ ASSERT(zone == NULL); + if (first) { + first = 0; + + /* + * Get the hostid if it was not passed as a module parameter. + * Try reading the /etc/hostid file directly, and then fall + * back to calling the /usr/bin/hostid utility. + */ + if ((spl_hostid == HW_INVALID_HOSTID) && + (rc = hostid_read()) && (rc = hostid_exec())) + return HW_INVALID_HOSTID; + + printk(KERN_NOTICE "SPL: using hostid 0x%08x\n", + (unsigned int) spl_hostid); + } + if (ddi_strtoul(hw_serial, NULL, HW_HOSTID_LEN-1, &hostid) != 0) return HW_INVALID_HOSTID; @@ -632,16 +650,6 @@ __init spl_init(void) if ((rc = spl_zlib_init())) SGOTO(out9, rc); - /* - * Get the hostid if it was not passed as a module parameter. Try - * reading the /etc/hostid file directly, and then fall back to calling - * the /usr/bin/hostid utility. - */ - - if (spl_hostid == HW_INVALID_HOSTID - && (rc = hostid_read()) && (rc = hostid_exec())) - SGOTO(out10, rc = -EADDRNOTAVAIL); - #ifndef HAVE_KALLSYMS_LOOKUP_NAME if ((rc = set_kallsyms_lookup_name())) SGOTO(out10, rc = -EADDRNOTAVAIL); @@ -653,9 +661,8 @@ __init spl_init(void) if ((rc = spl_vn_init_kallsyms_lookup())) SGOTO(out10, rc); - printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s, using hostid " - "0x%08x\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR, - (unsigned int) spl_hostid); + printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, + SPL_META_RELEASE, SPL_DEBUG_STR); SRETURN(rc); out10: spl_zlib_fini(); From 6576a1a70dedfc7d5a5e1533a9e3e56074de4c79 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 1 Aug 2012 02:00:40 -0400 Subject: [PATCH 0614/1062] Fix incorrect type in spl_kmem_cache_set_move() parameter A preprocessor definition renders this harmless. However, it is a good idea to change this to be consistent. Signed-off-by: Richard Yao --- include/sys/kmem.h | 2 +- module/spl/spl-kmem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 796af44e8..4383efb7c 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -413,7 +413,7 @@ typedef struct spl_kmem_cache { extern spl_kmem_cache_t *spl_kmem_cache_create(char *name, size_t size, size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); -extern void spl_kmem_cache_set_move(kmem_cache_t *, +extern void spl_kmem_cache_set_move(spl_kmem_cache_t *, kmem_cbrc_t (*)(void *, void *, size_t, void *)); extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 80c4ff4b9..28afc6024 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1484,7 +1484,7 @@ EXPORT_SYMBOL(spl_kmem_cache_create); * XXX: Unimplemented but harmless to stub out for now. */ void -spl_kmem_cache_set_move(kmem_cache_t *skc, +spl_kmem_cache_set_move(spl_kmem_cache_t *skc, kmem_cbrc_t (move)(void *, void *, size_t, void *)) { ASSERT(move != NULL); From 476ff5a4daf804c28c87a0bb4a833e09eb01a050 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Thu, 2 Aug 2012 15:33:31 +0200 Subject: [PATCH 0615/1062] Handle any invalidate_inodes_check prototype. In the comments of commit 723aa3b0c2eed070f7eeadd2ce2d87f46da6d0f8, mmatuska reported that the test for invalidate_inodes_check() is broken if invalidate_inodes() takes two arguments. This patch fixes the issue by resorting to another approach for detecting invalidate_inodes_check(): is simply checks if invalidate_inodes is defined as a macro. If it is, then it concludes that invalidate_inodes_check() is available. This will continue to work even if the prototype of invalidate_inodes_check() changes over time. Signed-off-by: Brian Behlendorf Closes #148 --- config/spl-build.m4 | 7 ++++--- configure | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7ec81e713..d7c89bc48 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -2072,9 +2072,10 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ AC_MSG_CHECKING([whether invalidate_inodes_check() is available]) SPL_LINUX_TRY_COMPILE_SYMBOL([ #include - ], [ - invalidate_inodes_check(NULL, 0); - ], [invalidate_inodes_check], [], [ + #ifndef invalidate_inodes + #error invalidate_inodes is not a macro + #endif + ], [ ], [invalidate_inodes_check], [], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1, [invalidate_inodes_check() is available]) diff --git a/configure b/configure index 1ca8e847f..bbaedb053 100755 --- a/configure +++ b/configure @@ -17147,13 +17147,14 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #ifndef invalidate_inodes + #error invalidate_inodes is not a macro + #endif int main (void) { - invalidate_inodes_check(NULL, 0); - ; return 0; } @@ -23343,13 +23344,14 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #ifndef invalidate_inodes + #error invalidate_inodes is not a macro + #endif int main (void) { - invalidate_inodes_check(NULL, 0); - ; return 0; } From d83d25c2f81b2f7771d338ae03ea184b9e7ac40f Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 7 Aug 2012 13:57:03 -0700 Subject: [PATCH 0616/1062] Support building a spl-modules-dkms sub package This commit adds support for building a spl-modules-dkms sub package built around Dynamic Kernel Module Support. This is to allow building packages using the DKMS infrastructure which is intended to ease the burden of kernel version changes, upgrades, etc. By default spl-modules-dkms-* sub package will be built as part of the 'make rpm' target. Alternately, you can build only the DKMS module package using the 'make rpm-dkms' target. Examples: # To build packaged binaries as well as a dkms packages $ ./configure && make rpm # To build only the packaged binary utilities and dkms packages $ ./configure && make rpm-utils rpm-dkms Note: Only the RHEL 5/6, CHAOS 5, and Fedora distributions are supported for building the dkms sub package. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#535 --- Makefile.am | 1 + Makefile.in | 42 +++++++++++++++++---- config/rpm.am | 27 +++++++++++++- configure | 3 +- configure.ac | 1 + dkms.conf.in | 23 ++++++++++++ dkms.postinst | 24 ++++++++++++ spl-modules.spec.in | 90 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 201 insertions(+), 10 deletions(-) create mode 100644 dkms.conf.in create mode 100755 dkms.postinst diff --git a/Makefile.am b/Makefile.am index 490d12802..a60ce1a5e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,6 +14,7 @@ SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am +EXTRA_DIST += dkms.postinst noinst_HEADERS = spl_config.h spl.release distclean-local:: diff --git a/Makefile.in b/Makefile.in index a70079893..475ab084a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -80,11 +80,12 @@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/PKGBUILD-spl-modules.in $(srcdir)/PKGBUILD-spl.in \ - $(srcdir)/spl-modules.spec.in $(srcdir)/spl.release.in \ - $(srcdir)/spl.spec.in $(srcdir)/spl_config.h.in \ - $(top_srcdir)/config/arch.am $(top_srcdir)/config/deb.am \ - $(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \ - $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ + $(srcdir)/dkms.conf.in $(srcdir)/spl-modules.spec.in \ + $(srcdir)/spl.release.in $(srcdir)/spl.spec.in \ + $(srcdir)/spl_config.h.in $(top_srcdir)/config/arch.am \ + $(top_srcdir)/config/deb.am $(top_srcdir)/config/rpm.am \ + $(top_srcdir)/config/tgz.am $(top_srcdir)/configure \ + $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ ChangeLog INSTALL config/config.guess config/config.sub \ @@ -102,7 +103,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = spl_config.h CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ module/splat/Makefile spl.spec spl-modules.spec PKGBUILD-spl \ - PKGBUILD-spl-modules spl.release + PKGBUILD-spl-modules spl.release dkms.conf CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -331,7 +332,7 @@ SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \ DISCLAIMER config/config.awk config/rpm.am config/deb.am \ - config/tgz.am + config/tgz.am dkms.postinst noinst_HEADERS = spl_config.h spl.release all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -404,6 +405,8 @@ PKGBUILD-spl-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl-modul cd $(top_builddir) && $(SHELL) ./config.status $@ spl.release: $(top_builddir)/config.status $(srcdir)/spl.release.in cd $(top_builddir) && $(SHELL) ./config.status $@ +dkms.conf: $(top_builddir)/config.status $(srcdir)/dkms.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -852,13 +855,16 @@ srpm-utils: srpm: srpm-modules srpm-utils +rpm-dkms: srpm-modules +@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" dkms-common + rpm-modules: srpm-modules @CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common rpm-utils: srpm-utils @CONFIG_USER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common -rpm: rpm-modules rpm-utils +rpm: rpm-modules rpm-utils rpm-dkms rpm-local: @(if test "${HAVE_RPMBUILD}" = "no"; then \ @@ -877,6 +883,26 @@ rpm-local: mkdir -p $(rpmbuild)/SOURCES && \ cp $(distdir).tar.gz $(rpmbuild)/SOURCES) +dkms-common: + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmdkms=$(pkg)-dkms-$(SPL_META_VERSION)-$(SPL_META_RELEASE).noarch.rpm;\ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + $(RPMBUILD) \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "dist %{nil}" \ + --define "_without_kernel 1" \ + --define "_without_kernel_debug 1" \ + --define "_with_kernel_dkms 1" \ + --nodeps --rebuild $$rpmpkg || exit 1; \ + cp $$rpmbuild/RPMS/noarch/$$rpmdkms . || exit 1; \ + $(RM) -R $$rpmbuild + srpm-common: dist rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ rpmspec=$(pkg).spec; \ diff --git a/config/rpm.am b/config/rpm.am index a0a4ed148..7340b4fce 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -18,6 +18,11 @@ endif srpm: srpm-modules srpm-utils +rpm-dkms: srpm-modules +if CONFIG_KERNEL + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" dkms-common +endif + rpm-modules: srpm-modules if CONFIG_KERNEL $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common @@ -28,7 +33,7 @@ if CONFIG_USER $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common endif -rpm: rpm-modules rpm-utils +rpm: rpm-modules rpm-utils rpm-dkms rpm-local: @(if test "${HAVE_RPMBUILD}" = "no"; then \ @@ -47,6 +52,26 @@ rpm-local: mkdir -p $(rpmbuild)/SOURCES && \ cp $(distdir).tar.gz $(rpmbuild)/SOURCES) +dkms-common: + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmdkms=$(pkg)-dkms-$(SPL_META_VERSION)-$(SPL_META_RELEASE).noarch.rpm;\ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + $(RPMBUILD) \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "dist %{nil}" \ + --define "_without_kernel 1" \ + --define "_without_kernel_debug 1" \ + --define "_with_kernel_dkms 1" \ + --nodeps --rebuild $$rpmpkg || exit 1; \ + cp $$rpmbuild/RPMS/noarch/$$rpmdkms . || exit 1; \ + $(RM) -R $$rpmbuild + srpm-common: dist rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ rpmspec=$(pkg).spec; \ diff --git a/configure b/configure index bbaedb053..4d2d45895 100755 --- a/configure +++ b/configure @@ -24169,7 +24169,7 @@ fi -ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules spl.release" +ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules spl.release dkms.conf" cat >confcache <<\_ACEOF @@ -25091,6 +25091,7 @@ do "PKGBUILD-spl") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl" ;; "PKGBUILD-spl-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl-modules" ;; "spl.release") CONFIG_FILES="$CONFIG_FILES spl.release" ;; + "dkms.conf") CONFIG_FILES="$CONFIG_FILES dkms.conf" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/configure.ac b/configure.ac index 75859f77e..27d3356ec 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,7 @@ AC_CONFIG_FILES([ PKGBUILD-spl PKGBUILD-spl-modules spl.release + dkms.conf ]) AC_OUTPUT diff --git a/dkms.conf.in b/dkms.conf.in new file mode 100644 index 000000000..64f1f916f --- /dev/null +++ b/dkms.conf.in @@ -0,0 +1,23 @@ +AUTOINSTALL="yes" +PACKAGE_NAME="@PACKAGE@" +PACKAGE_VERSION="@VERSION@" +PRE_BUILD="configure + --prefix=/usr + --with-config=kernel + --with-linux=$(case `lsb_release -is` in + (Debian) echo ${kernel_source_dir/%build/source} ;; + (*) echo ${kernel_source_dir} ;; + esac) + --with-linux-obj=${kernel_source_dir} +" +POST_INSTALL="dkms.postinst -a ${arch} -k ${kernelver} -t ${dkms_tree} + -n ${PACKAGE_NAME} -v ${PACKAGE_VERSION} +" +REMAKE_INITRD="no" +MAKE[0]="make" +BUILT_MODULE_NAME[0]="spl" +BUILT_MODULE_LOCATION[0]="module/spl/" +DEST_MODULE_LOCATION[0]="/extra/spl/spl" +BUILT_MODULE_NAME[1]="splat" +BUILT_MODULE_LOCATION[1]="module/splat/" +DEST_MODULE_LOCATION[1]="/extra/splat/splat" diff --git a/dkms.postinst b/dkms.postinst new file mode 100755 index 000000000..cecf58e79 --- /dev/null +++ b/dkms.postinst @@ -0,0 +1,24 @@ +#!/bin/bash + +PROG=$0 + +while getopts "a:k:n:t:v:" opt; do + case $opt in + a) arch=$OPTARG ;; + k) kver=$OPTARG ;; + n) pkgname=$OPTARG ;; + t) tree=$OPTARG ;; + v) pkgver=$OPTARG ;; + esac +done + +if [ -z "${arch}" -o -z "${kver}" -o -z "${pkgname}" -o \ + -z "${tree}" -o -z "${pkgver}" ]; then + echo "Usage: $PROG -a -k -n " \ + "-t -v " + exit 1 +fi + +cp ${tree}/${pkgname}/${pkgver}/build/spl_config.h \ + ${tree}/${pkgname}/${pkgver}/build/module/Module.symvers \ + ${tree}/${pkgname}/${pkgver}/${kver}/${arch}/ diff --git a/spl-modules.spec.in b/spl-modules.spec.in index c27d0a5f9..044225098 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -44,6 +44,17 @@ %endif %endif +# Set using 'rpmbuild ... --with kernel-dkms ...', defaults to disabled. +%if %{defined _with_kernel_dkms} + %define with_kernel_dkms 1 +%else + %if %{defined _without_kernel_dkms} + %define with_kernel_dkms 0 + %else + %define with_kernel_dkms 0 + %endif +%endif + # Set using 'rpmbuild ... --with debug ...', defaults to disabled. %if %{defined _with_debug} %define kdebug --enable-debug @@ -118,12 +129,15 @@ %define kpkg_kern kernel-%{kverextra} %define kpkg_dbug %{nil} + %define kpkg_dkms dkms %define kdevpkg_kern kernel-source %define kdevpkg_dbug %{nil} + %define kdevpkg_dkms dkms %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/-%{kverextra}//g') %define kverpkg_dbug %{nil} + %define kverpkg_dkms 2.2.0.2 # The kernel and rpm versions do not strictly match under SLES11 # e.g. kernel version 2.6.27.19-5 != rpm version 2.6.27.19-5.1 @@ -165,10 +179,13 @@ %define kpkg_kern kernel %define kpkg_dbug kernel-debug + %define kpkg_dkms dkms %define kdevpkg_kern kernel-devel %define kdevpkg_dbug kernel-debug-devel + %define kdevpkg_dkms dkms + %define kverpkg_dkms 2.2.0.2 %if %{defined el6} || %{defined ch5} %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/.%{_target_cpu}//g') %define kverpkg_dbug %(echo %{kver_dbug} | %{__sed} -e 's/.%{_target_cpu}//g' | %{__sed} -e 's/.debug//g') @@ -216,10 +233,13 @@ %define kpkg_kern kernel %define kpkg_dbug kernel-debug + %define kpkg_dkms dkms %define kdevpkg_kern kernel-devel %define kdevpkg_dbug kernel-debug-devel + %define kdevpkg_dkms dkms + %define kverpkg_dkms 2.2.0.2 %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/.%{_target_cpu}//g') %define kverpkg_dbug %(echo %{kver_dbug} | %{__sed} -e 's/.%{_target_cpu}//g' | %{__sed} -e 's/.debug//g') @@ -253,6 +273,7 @@ %define kverpkg_kern %{kver_kern} %define kverpkg_dbug %{nil} + %define kverpkg_dkms %{nil} %if %{undefined kdir} %define kdir_kern /lib/modules/%{kver_kern}/build @@ -285,12 +306,16 @@ %if %{defined build_src_rpm} %define rel_kern @SPL_META_RELEASE@ %define rel_dbug @SPL_META_RELEASE@ +%define rel_dkms @SPL_META_RELEASE@ %if %{defined kpkg_kern} %define req_kern %{kpkg_kern} %endif %if %{defined kpkg_dbug} %define req_dbug %{kpkg_dbug} %endif +%if %{defined kpkg_dkms} +%define req_dkms %{kpkg_dkms} +%endif %if %{defined kdevpkg_kern} %define devreq_kern %{kdevpkg_kern} %endif @@ -302,12 +327,16 @@ %define relext_dbug %(echo %{kverpkg_dbug} | %{__sed} -e 's/-/_/g') %define rel_kern @SPL_META_RELEASE@_%{relext_kern} %define rel_dbug @SPL_META_RELEASE@_%{relext_dbug} +%define rel_dkms @SPL_META_RELEASE@ %if %{defined kpkg_kern} %define req_kern %{kpkg_kern} %{koppkg} %{kverpkg_kern} %endif %if %{defined kpkg_dbug} %define req_dbug %{kpkg_dbug} %{koppkg} %{kverpkg_dbug} %endif +%if %{defined kpkg_dkms} +%define req_dkms %{kpkg_dkms} >= %{kverpkg_dkms} +%endif %if %{defined kdevpkg_kern} %define devreq_kern %{kdevpkg_kern} %{koppkg} %{kverpkg_kern} %endif @@ -397,6 +426,30 @@ The %{name}-debug-devel package contains the header files and Module{s}.symvers symbols needed for building additional modules which use %{name}-debug. +%endif +%if %{?with_kernel_dkms} + +%package dkms +Summary: Solaris Porting Layer Modules (DKMS) +Group: Utilities/System +Release: %{rel_dkms} +Provides: %{name} +BuildArch: noarch +%if %{defined req_dkms} +Requires: %{req_dkms} +%endif +%if %{defined kdevpkg_dkms} +BuildRequires: %{kdevpkg_dkms} +%endif + +%description dkms +The %{name}-dkms package contains all the necessary pieces to build and +install Solaris Porting Layer (SPL) kernel modules with Dynamic Kernel +Modules Support (DKMS). The SPL modules emulate Solaris style primatives +in the the linux kernel. They include, but are not limited to: atomic, +condvar, debug, error, memory, kobject, kstat, mutex, rwlock, taskq, +thread, time, and vnode APIs. + %endif %prep @@ -421,6 +474,16 @@ make DESTDIR=$RPM_BUILD_ROOT install make make DESTDIR=$RPM_BUILD_ROOT install +%endif +%if %{?with_kernel_dkms} + +%configure --with-config=kernel \ + %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking} +make dist +mkdir -p $RPM_BUILD_ROOT/%{_prefix}/src +tar -xf @PACKAGE@-%{version}.tar.gz -C $RPM_BUILD_ROOT/%{_prefix}/src +cp -af dkms.conf $RPM_BUILD_ROOT/%{_prefix}/src/@PACKAGE@-%{version} + %endif %clean @@ -476,3 +539,30 @@ else fi %endif +%if %{?with_kernel_dkms} + +%files dkms +%defattr(-,root,root) +%{_prefix}/src/@PACKAGE@-%{version}/* + +%post dkms +for POSTINST in %{_prefix}/lib/dkms/common.postinst; do + if [ -f $POSTINST ]; then + $POSTINST @PACKAGE@ %{version} + exit $? + fi + echo "WARNING: $POSTINST does not exist." +done +echo -e "ERROR: DKMS version is too old and @PACKAGE@ was not" +echo -e "built with legacy DKMS support." +echo -e "You must either rebuild @PACKAGE@ with legacy postinst" +echo -e "support or upgrade DKMS to a more current version." +exit 1 + +%preun dkms +echo -e +echo -e "Uninstall of @PACKAGE@ module (version %{version}) beginning:" +dkms remove -m @PACKAGE@ -v %{version} --all --rpm_safe_upgrade +exit 0 + +%endif From 36798290928c4643f1be5e9d300f02846de12480 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 13 Aug 2012 16:23:45 -0700 Subject: [PATCH 0617/1062] Cleanly remove spl-modules-devel headers Add the /usr/src/spl--/ directory to the spl-modules-devel package. This ensures that this directory will be removed when the package is removed. We do not include the higher level /usr/src/spl-- directory since there may be builds for multiple kernels. Instead, a %postun rmdir is added which attempts to remove this directory. It will only succeed when the last spl-modules-devel-* package for this specific release is removed. Signed-off-by: Brian Behlendorf --- spl-modules.spec.in | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/spl-modules.spec.in b/spl-modules.spec.in index 044225098..d1315a27b 100644 --- a/spl-modules.spec.in +++ b/spl-modules.spec.in @@ -497,7 +497,7 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -%{_prefix}/src/*/%{kver_kern}/* +%{_prefix}/src/*/%{kver_kern} %post if [ -f /boot/System.map-%{kver_kern} ]; then @@ -513,6 +513,10 @@ else /sbin/depmod -a || exit 0 fi +%postun devel +rmdir %{_prefix}/src/@PACKAGE@-%{version}-@SPL_META_RELEASE@ 2>/dev/null +exit 0 + %endif %if %{?with_kernel_debug} @@ -522,7 +526,7 @@ fi %files debug-devel %defattr(-,root,root) -%{_prefix}/src/*/%{kver_dbug}/* +%{_prefix}/src/*/%{kver_dbug} %post debug if [ -f /boot/System.map-%{kver_dbug} ]; then @@ -538,12 +542,16 @@ else /sbin/depmod -a || exit 0 fi +%postun debug-devel +rmdir %{_prefix}/src/@PACKAGE@-%{version}-@SPL_META_RELEASE@ 2>/dev/null +exit 0 + %endif %if %{?with_kernel_dkms} %files dkms %defattr(-,root,root) -%{_prefix}/src/@PACKAGE@-%{version}/* +%{_prefix}/src/@PACKAGE@-%{version} %post dkms for POSTINST in %{_prefix}/lib/dkms/common.postinst; do From 3a9c241e555e98d364f1152c6cf22d091b7288b6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 13 Aug 2012 10:19:22 -0700 Subject: [PATCH 0618/1062] SPL 0.6.0-rc10 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 0b27b7058..9d3363166 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc9 +Release: rc10 Release-Tags: relext From 039bae18ca3037124cd99384e782e3a2dc3e13f7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 23 Aug 2012 09:46:38 -0700 Subject: [PATCH 0619/1062] Add copy-builtin to EXTRA_DIST The copy-builtin script was accidentally not being included in the tarballs. Signed-off-by: Brian Behlendorf Closes #159 --- Makefile.am | 2 +- Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index a60ce1a5e..6000a7d14 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,7 @@ SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am -EXTRA_DIST += dkms.postinst +EXTRA_DIST += dkms.postinst copy-builtin noinst_HEADERS = spl_config.h spl.release distclean-local:: diff --git a/Makefile.in b/Makefile.in index 475ab084a..7c43ef144 100644 --- a/Makefile.in +++ b/Makefile.in @@ -332,7 +332,7 @@ SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \ DISCLAIMER config/config.awk config/rpm.am config/deb.am \ - config/tgz.am dkms.postinst + config/tgz.am dkms.postinst copy-builtin noinst_HEADERS = spl_config.h spl.release all: spl_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive From 9baf44bc17ddbc01dae4feacda32e04aac73f730 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Wed, 22 Aug 2012 12:30:59 -0700 Subject: [PATCH 0620/1062] Wrap trace_set_debug_header in trace_[get|put]_tcd To properly support CONFIG_PREEMPT enabled kernels, we must refrain from using a CPU index when preemption is enabled. As a result, this change moves the trace_set_debug_header call (which calls smp_processor_id) within trace_get_tcd and trace_put_tcd (which disable and enable preemption respectively). Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #160 --- module/spl/spl-debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 4bcc34a8e..0dd59db56 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -686,9 +686,8 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, if (strchr(file, '/')) file = strrchr(file, '/') + 1; - trace_set_debug_header(&header, subsys, mask, line, 0); - tcd = trace_get_tcd(); + trace_set_debug_header(&header, subsys, mask, line, 0); if (tcd == NULL) goto console; From 15d0411297113cb2681f5522ed373d4d37fcf132 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 16 Aug 2012 14:55:42 -0400 Subject: [PATCH 0621/1062] Remove Makefile from non-toplevel .gitignore files When building SPL support into the kernel, ./copy-builtin will copy non-toplevel .gitignore files. These files list /Makefile, which causes git-archive to omit ./module/{spl,splat}/Makefile. The absence of these files result in build failures when SPL is selected. ZFS is unaffected because it puts Makefile in the toplevel .gitignore, which is not copied. We fix SPL by emulating that behavior. Reported-by: Fabio Erculiani Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #152 --- .gitignore | 1 + cmd/.gitignore | 1 - include/.gitignore | 1 - lib/.gitignore | 1 - module/.gitignore | 1 - module/spl/.gitignore | 1 - module/splat/.gitignore | 1 - scripts/.gitignore | 1 - 8 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 include/.gitignore delete mode 100644 lib/.gitignore delete mode 100644 module/spl/.gitignore delete mode 100644 module/splat/.gitignore delete mode 100644 scripts/.gitignore diff --git a/.gitignore b/.gitignore index 00b8b1229..ee69117f2 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ .libs .DS_Store modules.order +Makefile # # Top level generated files specific to this top level dir diff --git a/cmd/.gitignore b/cmd/.gitignore index 1b34aca0a..754846b75 100644 --- a/cmd/.gitignore +++ b/cmd/.gitignore @@ -1,3 +1,2 @@ -/Makefile /spl /splat diff --git a/include/.gitignore b/include/.gitignore deleted file mode 100644 index 5fc607b9e..000000000 --- a/include/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Makefile diff --git a/lib/.gitignore b/lib/.gitignore deleted file mode 100644 index 5fc607b9e..000000000 --- a/lib/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Makefile diff --git a/module/.gitignore b/module/.gitignore index 7a922a409..611c51c42 100644 --- a/module/.gitignore +++ b/module/.gitignore @@ -1,4 +1,3 @@ /.tmp_versions -/Makefile /Module.markers /Module.symvers diff --git a/module/spl/.gitignore b/module/spl/.gitignore deleted file mode 100644 index 5fc607b9e..000000000 --- a/module/spl/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Makefile diff --git a/module/splat/.gitignore b/module/splat/.gitignore deleted file mode 100644 index 5fc607b9e..000000000 --- a/module/splat/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Makefile diff --git a/scripts/.gitignore b/scripts/.gitignore deleted file mode 100644 index 5fc607b9e..000000000 --- a/scripts/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Makefile From 08850eddcb128cbdca584255324d71dfee2ccba9 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Thu, 23 Aug 2012 14:00:58 -0700 Subject: [PATCH 0622/1062] Avoid calling smp_processor_id in spl_magazine_age The spl_magazine_age function had the implied assumption that it will remain on its current cpu through its execution. In order to support preempt enabled kernels, this assumption had to be removed. The spl_kmem_magazine structure now holds the cpu id of the cpu it is local to. This allows spl_magazine_age to use this field when scheduling work to be done by the magazine's local cpu. Signed-off-by: Brian Behlendorf Issue #98 --- include/sys/kmem.h | 1 + module/spl/spl-kmem.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 4383efb7c..344e2716b 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -353,6 +353,7 @@ typedef struct spl_kmem_magazine { struct spl_kmem_cache *skm_cache; /* Owned by cache */ struct delayed_work skm_work; /* Magazine reclaim work */ unsigned long skm_age; /* Last cache access */ + unsigned int skm_cpu; /* Owned by cpu */ void *skm_objs[0]; /* Object pointers */ } spl_kmem_magazine_t; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 28afc6024..258d61478 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1156,18 +1156,17 @@ spl_magazine_age(void *data) spl_kmem_magazine_t *skm = spl_get_work_data(data, spl_kmem_magazine_t, skm_work.work); spl_kmem_cache_t *skc = skm->skm_cache; - int i = smp_processor_id(); ASSERT(skm->skm_magic == SKM_MAGIC); ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(skc->skc_mag[i] == skm); + ASSERT(skc->skc_mag[skm->skm_cpu] == skm); if (skm->skm_avail > 0 && time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) (void)spl_cache_flush(skc, skm, skm->skm_refill); if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) - schedule_delayed_work_on(i, &skm->skm_work, + schedule_delayed_work_on(skm->skm_cpu, &skm->skm_work, skc->skc_delay / 3 * HZ); } @@ -1267,14 +1266,14 @@ spl_magazine_size(spl_kmem_cache_t *skc) * Allocate a per-cpu magazine to associate with a specific core. */ static spl_kmem_magazine_t * -spl_magazine_alloc(spl_kmem_cache_t *skc, int node) +spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) { spl_kmem_magazine_t *skm; int size = sizeof(spl_kmem_magazine_t) + sizeof(void *) * skc->skc_mag_size; SENTRY; - skm = kmem_alloc_node(size, KM_SLEEP, node); + skm = kmem_alloc_node(size, KM_SLEEP, cpu_to_node(cpu)); if (skm) { skm->skm_magic = SKM_MAGIC; skm->skm_avail = 0; @@ -1283,6 +1282,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int node) skm->skm_cache = skc; spl_init_delayed_work(&skm->skm_work, spl_magazine_age, skm); skm->skm_age = jiffies; + skm->skm_cpu = cpu; } SRETURN(skm); @@ -1318,7 +1318,7 @@ spl_magazine_create(spl_kmem_cache_t *skc) skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; for_each_online_cpu(i) { - skc->skc_mag[i] = spl_magazine_alloc(skc, cpu_to_node(i)); + skc->skc_mag[i] = spl_magazine_alloc(skc, i); if (!skc->skc_mag[i]) { for (i--; i >= 0; i--) spl_magazine_free(skc->skc_mag[i]); From 45324c7c419b70397cae31b9f2b90ca0a97c9d77 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Fri, 24 Aug 2012 10:42:12 -0700 Subject: [PATCH 0623/1062] Add kpreempt_[dis|en]able macros in To support preempt enabled kernels in ZFS on Linux, there are a couple places where the ZFS code needs to disable interrupts. This change adds the Solaris preempt functions and maps them to the equivalent ZFS functions, allowing the ZFS to make use of them. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #98 --- include/sys/disp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sys/disp.h b/include/sys/disp.h index a0a1b0957..2a4b4ded8 100644 --- a/include/sys/disp.h +++ b/include/sys/disp.h @@ -25,4 +25,9 @@ #ifndef _SPL_DISP_H #define _SPL_DISP_H +#include + +#define kpreempt_disable() preempt_disable() +#define kpreempt_enable() preempt_enable() + #endif /* SPL_DISP_H */ From c638e9ad047f5192ee131ed8ec3d9851fbbedd2e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 26 Aug 2012 17:38:40 -0700 Subject: [PATCH 0624/1062] Remove autotools products Remove all of the generated autotools products from the repository and update the .gitignore files accordingly. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#718 --- .gitignore | 9 +- Makefile.in | 1081 -- autogen.sh | 1 - cmd/Makefile.in | 600 - config/.gitignore | 6 + config/config.guess | 1501 -- config/config.sub | 1705 -- config/depcomp | 630 - config/install-sh | 520 - config/ltmain.sh | 8406 --------- config/missing | 376 - configure | 26563 ----------------------------- include/Makefile.in | 485 - include/fs/Makefile.in | 414 - include/linux/Makefile.in | 414 - include/rpc/Makefile.in | 414 - include/sharefs/Makefile.in | 412 - include/sys/Makefile.in | 525 - include/sys/fm/Makefile.in | 412 - include/sys/fs/Makefile.in | 412 - include/sys/sysevent/Makefile.in | 412 - include/util/Makefile.in | 412 - include/vm/Makefile.in | 412 - lib/Makefile.in | 547 - scripts/Makefile.in | 409 - 25 files changed, 14 insertions(+), 47064 deletions(-) delete mode 100644 Makefile.in delete mode 100644 cmd/Makefile.in create mode 100644 config/.gitignore delete mode 100755 config/config.guess delete mode 100755 config/config.sub delete mode 100755 config/depcomp delete mode 100755 config/install-sh delete mode 100755 config/ltmain.sh delete mode 100755 config/missing delete mode 100755 configure delete mode 100644 include/Makefile.in delete mode 100644 include/fs/Makefile.in delete mode 100644 include/linux/Makefile.in delete mode 100644 include/rpc/Makefile.in delete mode 100644 include/sharefs/Makefile.in delete mode 100644 include/sys/Makefile.in delete mode 100644 include/sys/fm/Makefile.in delete mode 100644 include/sys/fs/Makefile.in delete mode 100644 include/sys/sysevent/Makefile.in delete mode 100644 include/util/Makefile.in delete mode 100644 include/vm/Makefile.in delete mode 100644 lib/Makefile.in delete mode 100644 scripts/Makefile.in diff --git a/.gitignore b/.gitignore index ee69117f2..868c81917 100644 --- a/.gitignore +++ b/.gitignore @@ -29,18 +29,25 @@ .DS_Store modules.order Makefile +Makefile.in # # Top level generated files specific to this top level dir # -/Makefile +/configure /config.log /config.status /libtool /spl_config.h /spl.spec /spl-modules.spec +/spl.release +/dkms.conf +/PKGBUILD-spl +/PKGBUILD-spl-modules /stamp-h1 +/aclocal.m4 +/autom4te.cache # # Top level generic files diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 7c43ef144..000000000 --- a/Makefile.in +++ /dev/null @@ -1,1081 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Written by Brian Behlendorf . -############################################################################### -# Build targets for RPM packages. -############################################################################### - -############################################################################### -# Copyright (C) 2010 Lawrence Livermore National Security, LLC. -# Written by Brian Behlendorf . -############################################################################### -# Build targets for DEB packages. -# -# Long term native distro specific Debian style packaging should be added. -# In the short term RPM packages are built and converted to DEB packages -# using alien. If someone familiar with Debian style packaging were to -# update the build system to correctly build Debian style packages I would -# happily take it. Until then we will have to make due with alien. -# -############################################################################### - -############################################################################### -# Copyright (C) 2010 Lawrence Livermore National Security, LLC. -# Written by Brian Behlendorf . -############################################################################### -# Build targets for TGZ packages. -# -# Long term native distro specific Slackware style packaging should be added. -# In the short term RPM packages are built and converted to TGZ packages -# using alien. If someone familiar with Slackware style packaging were to -# update the build system to correctly build Slackware style packages I would -# happily take it. Until then we will have to make due with alien. -# -############################################################################### - -############################################################################### -# Written by Prakash Surya -############################################################################### -# Build targets for RPM packages. -############################################################################### - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/PKGBUILD-spl-modules.in $(srcdir)/PKGBUILD-spl.in \ - $(srcdir)/dkms.conf.in $(srcdir)/spl-modules.spec.in \ - $(srcdir)/spl.release.in $(srcdir)/spl.spec.in \ - $(srcdir)/spl_config.h.in $(top_srcdir)/config/arch.am \ - $(top_srcdir)/config/deb.am $(top_srcdir)/config/rpm.am \ - $(top_srcdir)/config/tgz.am $(top_srcdir)/configure \ - $(top_srcdir)/module/Makefile.in \ - $(top_srcdir)/module/spl/Makefile.in \ - $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ - ChangeLog INSTALL config/config.guess config/config.sub \ - config/depcomp config/install-sh config/ltmain.sh \ - config/missing -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = spl_config.h -CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ - module/splat/Makefile spl.spec spl-modules.spec PKGBUILD-spl \ - PKGBUILD-spl-modules spl.release dkms.conf -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -HEADERS = $(noinst_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = lib cmd scripts module include -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -ALIEN = @ALIEN@ -ALIEN_VERSION = @ALIEN_VERSION@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_CFLAGS = @DEBUG_CFLAGS@ -DEBUG_KMEM = @DEBUG_KMEM@ -DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ -DEBUG_LOG = @DEBUG_LOG@ -DEBUG_SPL = @DEBUG_SPL@ -DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DPKG = @DPKG@ -DPKGBUILD = @DPKGBUILD@ -DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ -DPKG_VERSION = @DPKG_VERSION@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_ALIEN = @HAVE_ALIEN@ -HAVE_DPKG = @HAVE_DPKG@ -HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ -HAVE_MAKEPKG = @HAVE_MAKEPKG@ -HAVE_PACMAN = @HAVE_PACMAN@ -HAVE_RPM = @HAVE_RPM@ -HAVE_RPMBUILD = @HAVE_RPMBUILD@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LICENSE = @LICENSE@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_SYMBOLS = @LINUX_SYMBOLS@ -LINUX_VERSION = @LINUX_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKEPKG = @MAKEPKG@ -MAKEPKG_VERSION = @MAKEPKG_VERSION@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACMAN = @PACMAN@ -PACMAN_VERSION = @PACMAN_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RPM = @RPM@ -RPMBUILD = @RPMBUILD@ -RPMBUILD_VERSION = @RPMBUILD_VERSION@ -RPM_VERSION = @RPM_VERSION@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_CONFIG = @SPL_CONFIG@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VENDOR = @VENDOR@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@CONFIG_USER_TRUE@USER_DIR = lib cmd scripts -@CONFIG_KERNEL_TRUE@KERNEL_DIR = module include -SUBDIRS = $(USER_DIR) $(KERNEL_DIR) -AUTOMAKE_OPTIONS = foreign -EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \ - DISCLAIMER config/config.awk config/rpm.am config/deb.am \ - config/tgz.am dkms.postinst copy-builtin -noinst_HEADERS = spl_config.h spl.release -all: spl_config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(top_srcdir)/config/arch.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -spl_config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/spl_config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status spl_config.h -$(srcdir)/spl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f spl_config.h stamp-h1 -module/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/Makefile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -module/spl/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/spl/Makefile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -module/splat/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/splat/Makefile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -spl.spec: $(top_builddir)/config.status $(srcdir)/spl.spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -spl-modules.spec: $(top_builddir)/config.status $(srcdir)/spl-modules.spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -PKGBUILD-spl: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -PKGBUILD-spl-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl-modules.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -spl.release: $(top_builddir)/config.status $(srcdir)/spl.release.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -dkms.conf: $(top_builddir)/config.status $(srcdir)/dkms.conf.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique - -TAGS: tags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) spl_config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) spl_config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) spl_config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(HEADERS) spl_config.h -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -@CONFIG_KERNEL_FALSE@install-data-local: -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-local distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-data-local - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-local distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-local install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am - - -srpm-modules: -@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common - -srpm-utils: -@CONFIG_USER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common - -srpm: srpm-modules srpm-utils - -rpm-dkms: srpm-modules -@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" dkms-common - -rpm-modules: srpm-modules -@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common - -rpm-utils: srpm-utils -@CONFIG_USER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common - -rpm: rpm-modules rpm-utils rpm-dkms - -rpm-local: - @(if test "${HAVE_RPMBUILD}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${RPMBUILD} missing. Please install the\n" \ - "*** package for your distribution which provides ${RPMBUILD},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi; \ - mkdir -p $(rpmbuild)/TMP && \ - mkdir -p $(rpmbuild)/BUILD && \ - mkdir -p $(rpmbuild)/RPMS && \ - mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && \ - cp $(rpmspec) $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && \ - cp $(distdir).tar.gz $(rpmbuild)/SOURCES) - -dkms-common: - rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ - rpmspec=$(pkg).spec; \ - rpmdkms=$(pkg)-dkms-$(SPL_META_VERSION)-$(SPL_META_RELEASE).noarch.rpm;\ - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) \ - rpmbuild="$$rpmbuild" \ - rpmspec="$$rpmspec" \ - rpm-local || exit 1; \ - $(RPMBUILD) \ - --define "_tmppath $$rpmbuild/TMP" \ - --define "_topdir $$rpmbuild" \ - --define "dist %{nil}" \ - --define "_without_kernel 1" \ - --define "_without_kernel_debug 1" \ - --define "_with_kernel_dkms 1" \ - --nodeps --rebuild $$rpmpkg || exit 1; \ - cp $$rpmbuild/RPMS/noarch/$$rpmdkms . || exit 1; \ - $(RM) -R $$rpmbuild - -srpm-common: dist - rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ - rpmspec=$(pkg).spec; \ - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) \ - rpmbuild="$$rpmbuild" \ - rpmspec="$$rpmspec" \ - rpm-local || exit 1; \ - $(RPMBUILD) \ - --define "_tmppath $$rpmbuild/TMP" \ - --define "_topdir $$rpmbuild" \ - --define "build_src_rpm 1" \ - --define "dist %{nil}" \ - --nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ - cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ - $(RM) -R $$rpmbuild - -rpm-common: - rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ - rpmspec=$(pkg).spec; \ - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) \ - rpmbuild="$$rpmbuild" \ - rpmspec="$$rpmspec" \ - rpm-local || exit 1; \ - ${RPMBUILD} \ - --define "_tmppath $$rpmbuild/TMP" \ - --define "_topdir $$rpmbuild" \ - --define "dist %{nil}" \ - --define "require_kdir $(LINUX)" \ - --define "require_kobj $(LINUX_OBJ)" \ - --define "require_kver $(LINUX_VERSION)" \ - --define "$(DEBUG_SPL) 1" \ - --define "$(DEBUG_LOG) 1" \ - --define "$(DEBUG_KMEM) 1" \ - --define "$(DEBUG_KMEM_TRACKING) 1" \ - --nodeps --rebuild $$rpmpkg || exit 1; \ - cp $$rpmbuild/RPMS/*/* . || exit 1; \ - $(RM) -R $$rpmbuild - -deb-local: - @(if test "${HAVE_DPKGBUILD}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${DPKGBUILD} missing. Please install the\n" \ - "*** package for your distribution which provides ${DPKGBUILD},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi; \ - if test "${HAVE_ALIEN}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${ALIEN} missing. Please install the\n" \ - "*** package for your distribution which provides ${ALIEN},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi) - -deb-modules: deb-local rpm-modules -@CONFIG_KERNEL_TRUE@ name=${PACKAGE}-modules; \ -@CONFIG_KERNEL_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ -@CONFIG_KERNEL_TRUE@ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ -@CONFIG_KERNEL_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ -@CONFIG_KERNEL_TRUE@ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ -@CONFIG_KERNEL_TRUE@ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ -@CONFIG_KERNEL_TRUE@ fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ -@CONFIG_KERNEL_TRUE@ $(RM) $$pkg1 $$pkg2 - -deb-utils: deb-local rpm-utils -@CONFIG_USER_TRUE@ name=${PACKAGE}; \ -@CONFIG_USER_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ -@CONFIG_USER_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ -@CONFIG_USER_TRUE@ pkg1=$${name}-$${version}.$${arch}.rpm; \ -@CONFIG_USER_TRUE@ fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ -@CONFIG_USER_TRUE@ $(RM) $$pkg1 - -deb: deb-modules deb-utils - -tgz-local: - @(if test "${HAVE_ALIEN}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${ALIEN} missing. Please install the\n" \ - "*** package for your distribution which provides ${ALIEN},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi) - -tgz-modules: tgz-local rpm-modules -@CONFIG_KERNEL_TRUE@ name=${PACKAGE}-modules; \ -@CONFIG_KERNEL_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ -@CONFIG_KERNEL_TRUE@ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ -@CONFIG_KERNEL_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ -@CONFIG_KERNEL_TRUE@ pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ -@CONFIG_KERNEL_TRUE@ pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ -@CONFIG_KERNEL_TRUE@ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ -@CONFIG_KERNEL_TRUE@ $(RM) $$pkg1 $$pkg2 - -tgz-utils: tgz-local rpm-utils -@CONFIG_USER_TRUE@ name=${PACKAGE}; \ -@CONFIG_USER_TRUE@ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ -@CONFIG_USER_TRUE@ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ -@CONFIG_USER_TRUE@ pkg1=$${name}-$${version}.$${arch}.rpm; \ -@CONFIG_USER_TRUE@ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ -@CONFIG_USER_TRUE@ $(RM) $$pkg1 - -tgz: tgz-modules tgz-utils - -sarch-modules: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" sarch-common - -sarch-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" sarch-common - -sarch: sarch-modules sarch-utils - -arch-modules: -@CONFIG_KERNEL_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common - -arch-utils: -@CONFIG_USER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common - -arch: arch-modules arch-utils - -arch-local: - @(if test "${HAVE_MAKEPKG}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${MAKEPKG} missing. Please install the\n" \ - "*** package for your distribution which provides ${MAKEPKG},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi;) - -sarch-common: dist - pkgbuild=PKGBUILD-$(pkg); \ - $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ - $(MAKEPKG) --allsource --skipinteg --nodeps -p $$pkgbuild || exit 1; - -arch-common: dist - pkgbuild=PKGBUILD-$(pkg); \ - $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ - $(MAKEPKG) --skipinteg -p $$pkgbuild || exit 1; - -distclean-local:: - -$(RM) -R autom4te*.cache - -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ - -o -name .pc -o -name .hg -o -name .git \) -prune -o \ - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ - -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ - -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ - -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \ - -o -name '*.order' -o -name '*.markers' \) \ - -type f -print | xargs $(RM) - -@CONFIG_KERNEL_TRUE@install-data-local: -@CONFIG_KERNEL_TRUE@ release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ -@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ -@CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ -@CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ -@CONFIG_KERNEL_TRUE@ done - -ctags: - $(RM) $(top_srcdir)/tags - find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags - -etags: - $(RM) $(top_srcdir)/TAGS - find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a - -tags: ctags etags - -pkg: @DEFAULT_PACKAGE@ -pkg-modules: @DEFAULT_PACKAGE@-modules -pkg-utils: @DEFAULT_PACKAGE@-utils - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/autogen.sh b/autogen.sh index 12ed476c7..343265c83 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,4 +5,3 @@ libtoolize --automake --copy autoheader automake --add-missing --include-deps --copy autoconf -rm -rf autom4te.cache aclocal.m4 diff --git a/cmd/Makefile.in b/cmd/Makefile.in deleted file mode 100644 index 9406aeb2c..000000000 --- a/cmd/Makefile.in +++ /dev/null @@ -1,600 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Written by Brian Behlendorf . -############################################################################### -# Common rules for user space components. -############################################################################### - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/Rules.am -sbin_PROGRAMS = spl$(EXEEXT) splat$(EXEEXT) -subdir = cmd -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -PROGRAMS = $(sbin_PROGRAMS) -am_spl_OBJECTS = spl.$(OBJEXT) -spl_OBJECTS = $(am_spl_OBJECTS) -spl_LDADD = $(LDADD) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -am_splat_OBJECTS = splat.$(OBJEXT) -splat_OBJECTS = $(am_splat_OBJECTS) -splat_LDADD = $(LDADD) -splat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(splat_LDFLAGS) $(LDFLAGS) -o $@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(spl_SOURCES) $(splat_SOURCES) -DIST_SOURCES = $(spl_SOURCES) $(splat_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALIEN = @ALIEN@ -ALIEN_VERSION = @ALIEN_VERSION@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_CFLAGS = @DEBUG_CFLAGS@ -DEBUG_KMEM = @DEBUG_KMEM@ -DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ -DEBUG_LOG = @DEBUG_LOG@ -DEBUG_SPL = @DEBUG_SPL@ -DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DPKG = @DPKG@ -DPKGBUILD = @DPKGBUILD@ -DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ -DPKG_VERSION = @DPKG_VERSION@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_ALIEN = @HAVE_ALIEN@ -HAVE_DPKG = @HAVE_DPKG@ -HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ -HAVE_MAKEPKG = @HAVE_MAKEPKG@ -HAVE_PACMAN = @HAVE_PACMAN@ -HAVE_RPM = @HAVE_RPM@ -HAVE_RPMBUILD = @HAVE_RPMBUILD@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LICENSE = @LICENSE@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_SYMBOLS = @LINUX_SYMBOLS@ -LINUX_VERSION = @LINUX_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKEPKG = @MAKEPKG@ -MAKEPKG_VERSION = @MAKEPKG_VERSION@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACMAN = @PACMAN@ -PACMAN_VERSION = @PACMAN_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RPM = @RPM@ -RPMBUILD = @RPMBUILD@ -RPMBUILD_VERSION = @RPMBUILD_VERSION@ -RPM_VERSION = @RPM_VERSION@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_CONFIG = @SPL_CONFIG@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VENDOR = @VENDOR@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h \ - -I$(top_srcdir)/lib -AM_LIBTOOLFLAGS = --silent -AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \ - -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} -spl_SOURCES = spl.c -splat_SOURCES = splat.c -splat_LDFLAGS = $(top_builddir)/lib/libcommon.la -EXTRA_DIST = splat.h -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/Rules.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmd/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu cmd/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-sbinPROGRAMS: $(sbin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-sbinPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files - -clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -spl$(EXEEXT): $(spl_OBJECTS) $(spl_DEPENDENCIES) - @rm -f spl$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(spl_OBJECTS) $(spl_LDADD) $(LIBS) -splat$(EXEEXT): $(splat_OBJECTS) $(splat_DEPENDENCIES) - @rm -f splat$(EXEEXT) - $(AM_V_CCLD)$(splat_LINK) $(splat_OBJECTS) $(splat_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splat.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-sbinPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-sbinPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-sbinPROGRAMS - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/config/.gitignore b/config/.gitignore new file mode 100644 index 000000000..df81091c1 --- /dev/null +++ b/config/.gitignore @@ -0,0 +1,6 @@ +config.guess +config.sub +depcomp +install-sh +ltmain.sh +missing diff --git a/config/config.guess b/config/config.guess deleted file mode 100755 index dc84c68ef..000000000 --- a/config/config.guess +++ /dev/null @@ -1,1501 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config/config.sub b/config/config.sub deleted file mode 100755 index 2a55a5075..000000000 --- a/config/config.sub +++ /dev/null @@ -1,1705 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config/depcomp b/config/depcomp deleted file mode 100755 index df8eea7e4..000000000 --- a/config/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/config/install-sh b/config/install-sh deleted file mode 100755 index 6781b987b..000000000 --- a/config/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/config/ltmain.sh b/config/ltmain.sh deleted file mode 100755 index a72f2fd78..000000000 --- a/config/ltmain.sh +++ /dev/null @@ -1,8406 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=2.2.6b -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/config/missing b/config/missing deleted file mode 100755 index 28055d2ae..000000000 --- a/config/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/configure b/configure deleted file mode 100755 index 4d2d45895..000000000 --- a/configure +++ /dev/null @@ -1,26563 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -CONFIG_KERNEL_FALSE -CONFIG_KERNEL_TRUE -CONFIG_USER_FALSE -CONFIG_USER_TRUE -DEBUG_KMEM_TRACKING -DEBUG_KMEM -DEBUG_LOG -DEBUG_SPL -DEBUG_CFLAGS -KERNELCPPFLAGS -KERNELMAKE_PARAMS -LINUX_SYMBOLS -LINUX_VERSION -LINUX_OBJ -LINUX -SPL_CONFIG -MAKEPKG_VERSION -MAKEPKG -HAVE_MAKEPKG -PACMAN_VERSION -PACMAN -HAVE_PACMAN -ALIEN_VERSION -ALIEN -HAVE_ALIEN -DPKGBUILD_VERSION -DPKGBUILD -HAVE_DPKGBUILD -DPKG_VERSION -DPKG -HAVE_DPKG -RPMBUILD_VERSION -RPMBUILD -HAVE_RPMBUILD -RPM_VERSION -RPM -HAVE_RPM -DEFAULT_PACKAGE -VENDOR -LICENSE -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -SPL_META_LT_AGE -SPL_META_LT_REVISION -SPL_META_LT_CURRENT -SPL_META_AUTHOR -SPL_META_DATA -SPL_META_ALIAS -SPL_META_RELEASE -SPL_META_VERSION -SPL_META_NAME -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_maintainer_mode -enable_silent_rules -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -with_config -enable_linux_builtin -with_linux -with_linux_obj -enable_debug -enable_debug_log -enable_debug_kmem -enable_debug_kmem_tracking -enable_atomic_spinlocks -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-linux-builtin Configure for builtin in-tree kernel modules - [default=no] - --enable-debug Enable generic debug support [default=no] - --enable-debug-log Enable basic debug logging [default=yes] - --enable-debug-kmem Enable basic kmem accounting [default=yes] - --enable-debug-kmem-tracking - Enable detailed kmem tracking [default=no] - --enable-atomic-spinlocks - Atomic types use spinlocks [default=check] - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-config=CONFIG Config file 'kernel|user|all|srpm' - --with-linux=PATH Path to kernel source - --with-linux-obj=PATH Path to kernel build objects - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.63 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:$LINENO: checking metadata" >&5 -$as_echo_n "checking metadata... " >&6; } - - META="$srcdir/META" - _spl_ac_meta_got_file=no - if test -f "$META"; then - _spl_ac_meta_got_file=yes - - SPL_META_NAME=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - '(?:NAME|PROJECT|PACKAGE)' $META`; - if test -n "$SPL_META_NAME"; then - -cat >>confdefs.h <<_ACEOF -#define SPL_META_NAME "$SPL_META_NAME" -_ACEOF - - - fi - - SPL_META_VERSION=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'VERSION' $META`; - if test -n "$SPL_META_VERSION"; then - -cat >>confdefs.h <<_ACEOF -#define SPL_META_VERSION "$SPL_META_VERSION" -_ACEOF - - - fi - - SPL_META_RELEASE=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'RELEASE' $META`; - if test -n "$SPL_META_RELEASE"; then - -cat >>confdefs.h <<_ACEOF -#define SPL_META_RELEASE "$SPL_META_RELEASE" -_ACEOF - - - fi - - if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then - SPL_META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" - test -n "$SPL_META_RELEASE" && - SPL_META_ALIAS="$SPL_META_ALIAS-$SPL_META_RELEASE" - -cat >>confdefs.h <<_ACEOF -#define SPL_META_ALIAS "$SPL_META_ALIAS" -_ACEOF - - - fi - - SPL_META_DATA=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'DATE' $META`; - if test -n "$SPL_META_DATA"; then - -cat >>confdefs.h <<_ACEOF -#define SPL_META_DATA "$SPL_META_DATA" -_ACEOF - - - fi - - SPL_META_AUTHOR=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'AUTHOR' $META`; - if test -n "$SPL_META_AUTHOR"; then - -cat >>confdefs.h <<_ACEOF -#define SPL_META_AUTHOR "$SPL_META_AUTHOR" -_ACEOF - - - fi - - - SPL_META_LT_CURRENT=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'LT_CURRENT' $META`; - SPL_META_LT_REVISION=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'LT_REVISION' $META`; - SPL_META_LT_AGE=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'LT_AGE' $META`; - if test -n "$SPL_META_LT_CURRENT" \ - -o -n "$SPL_META_LT_REVISION" \ - -o -n "$SPL_META_LT_AGE"; then - test -n "$SPL_META_LT_CURRENT" || SPL_META_LT_CURRENT="0" - test -n "$SPL_META_LT_REVISION" || SPL_META_LT_REVISION="0" - test -n "$SPL_META_LT_AGE" || SPL_META_LT_AGE="0" - -cat >>confdefs.h <<_ACEOF -#define SPL_META_LT_CURRENT "$SPL_META_LT_CURRENT" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SPL_META_LT_REVISION "$SPL_META_LT_REVISION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SPL_META_LT_AGE "$SPL_META_LT_AGE" -_ACEOF - - - - - fi - fi - - { $as_echo "$as_me:$LINENO: result: $_spl_ac_meta_got_file" >&5 -$as_echo "$_spl_ac_meta_got_file" >&6; } - - -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -$as_echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=1;; -esac -AM_BACKSLASH='\' - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} - { (exit 1); exit 1; }; };; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} - { (exit 1); exit 1; }; };; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=$SPL_META_NAME - VERSION=$SPL_META_VERSION - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -ac_config_headers="$ac_config_headers spl_config.h" - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6b' -macro_revision='1.3017' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4795: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:4798: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:4801: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 6007 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_cc_needs_belf=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_ld_exported_symbols_list=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7860: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7864: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8199: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8203: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8304: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8308: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8359: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8363: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF -int foo(void) {} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_svld_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_dld_link=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11162 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11258 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - - { $as_echo "$as_me:$LINENO: checking spl license" >&5 -$as_echo_n "checking spl license... " >&6; } - LICENSE=GPL - { $as_echo "$as_me:$LINENO: result: $LICENSE" >&5 -$as_echo "$LICENSE" >&6; } - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" - - - - - { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 -$as_echo_n "checking linux distribution... " >&6; } - if test -f /etc/toss-release ; then - VENDOR=toss ; - elif test -f /etc/fedora-release ; then - VENDOR=fedora ; - elif test -f /etc/redhat-release ; then - VENDOR=redhat ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; - elif test -f /etc/SuSE-release ; then - VENDOR=sles ; - elif test -f /etc/slackware-version ; then - VENDOR=slackware ; - elif test -f /etc/lunar.release ; then - VENDOR=lunar ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; - else - VENDOR= ; - fi - { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 -$as_echo "$VENDOR" >&6; } - - - { $as_echo "$as_me:$LINENO: checking default package type" >&5 -$as_echo_n "checking default package type... " >&6; } - case "$VENDOR" in - toss) DEFAULT_PACKAGE=rpm ;; - redhat) DEFAULT_PACKAGE=rpm ;; - fedora) DEFAULT_PACKAGE=rpm ;; - gentoo) DEFAULT_PACKAGE=tgz ;; - arch) DEFAULT_PACKAGE=arch ;; - sles) DEFAULT_PACKAGE=rpm ;; - slackware) DEFAULT_PACKAGE=tgz ;; - lunar) DEFAULT_PACKAGE=tgz ;; - ubuntu) DEFAULT_PACKAGE=deb ;; - debian) DEFAULT_PACKAGE=deb ;; - *) DEFAULT_PACKAGE=rpm ;; - esac - - { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 -$as_echo "$DEFAULT_PACKAGE" >&6; } - - - - RPM=rpm - RPMBUILD=rpmbuild - - { $as_echo "$as_me:$LINENO: checking whether $RPM is available" >&5 -$as_echo_n "checking whether $RPM is available... " >&6; } - if tmp=$($RPM --version 2>/dev/null); then - - RPM_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }') - HAVE_RPM=yes - { $as_echo "$as_me:$LINENO: result: $HAVE_RPM ($RPM_VERSION)" >&5 -$as_echo "$HAVE_RPM ($RPM_VERSION)" >&6; } - -else - - HAVE_RPM=no - { $as_echo "$as_me:$LINENO: result: $HAVE_RPM" >&5 -$as_echo "$HAVE_RPM" >&6; } - -fi - - - { $as_echo "$as_me:$LINENO: checking whether $RPMBUILD is available" >&5 -$as_echo_n "checking whether $RPMBUILD is available... " >&6; } - if tmp=$($RPMBUILD --version 2>/dev/null); then - - RPMBUILD_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }') - HAVE_RPMBUILD=yes - { $as_echo "$as_me:$LINENO: result: $HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&5 -$as_echo "$HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&6; } - -else - - HAVE_RPMBUILD=no - { $as_echo "$as_me:$LINENO: result: $HAVE_RPMBUILD" >&5 -$as_echo "$HAVE_RPMBUILD" >&6; } - -fi - - - - - - - - - - - - DPKG=dpkg - DPKGBUILD=dpkg-buildpackage - - { $as_echo "$as_me:$LINENO: checking whether $DPKG is available" >&5 -$as_echo_n "checking whether $DPKG is available... " >&6; } - if tmp=$($DPKG --version 2>/dev/null); then - - DPKG_VERSION=$(echo $tmp | $AWK '/Debian/ { print $7 }') - HAVE_DPKG=yes - { $as_echo "$as_me:$LINENO: result: $HAVE_DPKG ($DPKG_VERSION)" >&5 -$as_echo "$HAVE_DPKG ($DPKG_VERSION)" >&6; } - -else - - HAVE_DPKG=no - { $as_echo "$as_me:$LINENO: result: $HAVE_DPKG" >&5 -$as_echo "$HAVE_DPKG" >&6; } - -fi - - - { $as_echo "$as_me:$LINENO: checking whether $DPKGBUILD is available" >&5 -$as_echo_n "checking whether $DPKGBUILD is available... " >&6; } - if tmp=$($DPKGBUILD --version 2>/dev/null); then - - DPKGBUILD_VERSION=$(echo $tmp | \ - $AWK '/Debian/ { print $4 }' | cut -f-4 -d'.') - HAVE_DPKGBUILD=yes - { $as_echo "$as_me:$LINENO: result: $HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&5 -$as_echo "$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&6; } - -else - - HAVE_DPKGBUILD=no - { $as_echo "$as_me:$LINENO: result: $HAVE_DPKGBUILD" >&5 -$as_echo "$HAVE_DPKGBUILD" >&6; } - -fi - - - - - - - - - - - - ALIEN=alien - - { $as_echo "$as_me:$LINENO: checking whether $ALIEN is available" >&5 -$as_echo_n "checking whether $ALIEN is available... " >&6; } - if tmp=$($ALIEN --version 2>/dev/null); then - - ALIEN_VERSION=$(echo $tmp | $AWK '{ print $3 }') - HAVE_ALIEN=yes - { $as_echo "$as_me:$LINENO: result: $HAVE_ALIEN ($ALIEN_VERSION)" >&5 -$as_echo "$HAVE_ALIEN ($ALIEN_VERSION)" >&6; } - -else - - HAVE_ALIEN=no - { $as_echo "$as_me:$LINENO: result: $HAVE_ALIEN" >&5 -$as_echo "$HAVE_ALIEN" >&6; } - -fi - - - - - - - - if test "$VENDOR" = "arch"; then - - PACMAN=pacman - MAKEPKG=makepkg - - { $as_echo "$as_me:$LINENO: checking whether $PACMAN is available" >&5 -$as_echo_n "checking whether $PACMAN is available... " >&6; } - tmp=$($PACMAN --version 2>/dev/null) - if test -n "$tmp"; then - - PACMAN_VERSION=$(echo $tmp | - $AWK '/Pacman/ { print $3 }' | - $SED 's/^v//') - HAVE_PACMAN=yes - { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN ($PACMAN_VERSION)" >&5 -$as_echo "$HAVE_PACMAN ($PACMAN_VERSION)" >&6; } - -else - - HAVE_PACMAN=no - { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN" >&5 -$as_echo "$HAVE_PACMAN" >&6; } - -fi - - - { $as_echo "$as_me:$LINENO: checking whether $MAKEPKG is available" >&5 -$as_echo_n "checking whether $MAKEPKG is available... " >&6; } - tmp=$($MAKEPKG --version 2>/dev/null) - if test -n "$tmp"; then - - MAKEPKG_VERSION=$(echo $tmp | $AWK '/makepkg/ { print $3 }') - HAVE_MAKEPKG=yes - { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&5 -$as_echo "$HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&6; } - -else - - HAVE_MAKEPKG=no - { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG" >&5 -$as_echo "$HAVE_MAKEPKG" >&6; } - -fi - - - - - - - - - - -fi - - - - SPL_CONFIG=all - -# Check whether --with-config was given. -if test "${with_config+set}" = set; then - withval=$with_config; SPL_CONFIG="$withval" -fi - - # Check whether --enable-linux-builtin was given. -if test "${enable_linux_builtin+set}" = set; then - enableval=$enable_linux_builtin; -else - enable_linux_builtin=no -fi - - - { $as_echo "$as_me:$LINENO: checking spl config" >&5 -$as_echo_n "checking spl config... " >&6; } - { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 -$as_echo "$SPL_CONFIG" >&6; }; - - - case "$SPL_CONFIG" in - kernel) - - -# Check whether --with-linux was given. -if test "${with_linux+set}" = set; then - withval=$with_linux; kernelsrc="$withval" -fi - - - -# Check whether --with-linux-obj was given. -if test "${with_linux_obj+set}" = set; then - withval=$with_linux_obj; kernelbuild="$withval" -fi - - - { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 -$as_echo_n "checking kernel source directory... " >&6; } - if test -z "$kernelsrc"; then - if test -e "/lib/modules/$(uname -r)/source"; then - headersdir="/lib/modules/$(uname -r)/source" - sourcelink=$(readlink -f "$headersdir") - elif test -e "/lib/modules/$(uname -r)/build"; then - headersdir="/lib/modules/$(uname -r)/build" - sourcelink=$(readlink -f "$headersdir") - else - sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ - 2>/dev/null | grep -v obj | tail -1) - fi - - if test -n "$sourcelink" && test -e ${sourcelink}; then - kernelsrc=`readlink -f ${sourcelink}` - else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&5 -$as_echo "$as_me: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&2;} - { (exit 1); exit 1; }; } - fi - else - if test "$kernelsrc" = "NONE"; then - kernsrcver=NONE - fi - fi - - { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 -$as_echo "$kernelsrc" >&6; } - { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 -$as_echo_n "checking kernel build directory... " >&6; } - if test -z "$kernelbuild"; then - if test -e "/lib/modules/$(uname -r)/build"; then - kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` - elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} - elif test -d ${kernelsrc}-obj/${target_cpu}/default; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/default - elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then - kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} - else - kernelbuild=${kernelsrc} - fi - fi - { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5 -$as_echo "$kernelbuild" >&6; } - - { $as_echo "$as_me:$LINENO: checking kernel source version" >&5 -$as_echo_n "checking kernel source version... " >&6; } - utsrelease1=$kernelbuild/include/linux/version.h - utsrelease2=$kernelbuild/include/linux/utsrelease.h - utsrelease3=$kernelbuild/include/generated/utsrelease.h - if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then - utsrelease=linux/version.h - elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then - utsrelease=linux/utsrelease.h - elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then - utsrelease=generated/utsrelease.h - fi - - if test "$utsrelease"; then - kernsrcver=`(echo "#include <$utsrelease>"; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - - if test -z "$kernsrcver"; then - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 -$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} - { (exit 1); exit 1; }; } - fi - else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - if test "x$enable_linux_builtin" != xyes; then - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 -$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} - { (exit 1); exit 1; }; } - else - { { $as_echo "$as_me:$LINENO: error: - *** Cannot find UTS_RELEASE definition. - *** Please run 'make prepare' inside the kernel source tree." >&5 -$as_echo "$as_me: error: - *** Cannot find UTS_RELEASE definition. - *** Please run 'make prepare' inside the kernel source tree." >&2;} - { (exit 1); exit 1; }; } - fi - fi - - { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 -$as_echo "$kernsrcver" >&6; } - - LINUX=${kernelsrc} - LINUX_OBJ=${kernelbuild} - LINUX_VERSION=${kernsrcver} - - - - - - - modpost=$LINUX/scripts/Makefile.modpost - { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 -$as_echo_n "checking kernel file name for module symbols... " >&6; } - if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then - if grep -q Modules.symvers $modpost; then - LINUX_SYMBOLS=Modules.symvers - else - LINUX_SYMBOLS=Module.symvers - fi - - if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then - { { $as_echo "$as_me:$LINENO: error: - *** Please make sure the kernel devel package for your distribution - *** is installed. If your building with a custom kernel make sure the - *** kernel is configured, built, and the '--with-linux=PATH' configure - *** option refers to the location of the kernel source." >&5 -$as_echo "$as_me: error: - *** Please make sure the kernel devel package for your distribution - *** is installed. If your building with a custom kernel make sure the - *** kernel is configured, built, and the '--with-linux=PATH' configure - *** option refers to the location of the kernel source." >&2;} - { (exit 1); exit 1; }; } - fi - else - LINUX_SYMBOLS=NONE - fi - { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 -$as_echo "$LINUX_SYMBOLS" >&6; } - - - - - { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 -$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - #ifndef CONFIG_PREEMPT - #error CONFIG_PREEMPT not #defined - #endif - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Kernel built with CONFIG_PREEMPT which is not supported. - ** You must rebuild your kernel without this option." >&5 -$as_echo "$as_me: error: - *** Kernel built with CONFIG_PREEMPT which is not supported. - ** You must rebuild your kernel without this option." >&2;} - { (exit 1); exit 1; }; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - - -fi - - rm -Rf build - - - - - - if test "${LINUX_OBJ}" != "${LINUX}"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" - fi - - - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" - - - - { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -$as_echo_n "checking whether debugging is enabled... " >&6; } - # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then - enableval=$enable_debug; -else - enable_debug=no -fi - - - if test "x$enable_debug" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" - DEBUG_CFLAGS="-DDEBUG -Werror" - DEBUG_SPL="_with_debug" - -else - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" - DEBUG_CFLAGS="-DNDEBUG" - DEBUG_SPL="_without_debug" - -fi - - - - - { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 -$as_echo "$enable_debug" >&6; } - - - # Check whether --enable-debug-log was given. -if test "${enable_debug_log+set}" = set; then - enableval=$enable_debug_log; -else - enable_debug_log=yes -fi - - - if test "x$enable_debug_log" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" - DEBUG_LOG="_with_debug_log" - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_LOG 1 -_ACEOF - - -else - - DEBUG_LOG="_without_debug_log" - -fi - - - - { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5 -$as_echo_n "checking whether basic debug logging is enabled... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5 -$as_echo "$enable_debug_log" >&6; } - - - # Check whether --enable-debug-kmem was given. -if test "${enable_debug_kmem+set}" = set; then - enableval=$enable_debug_kmem; -else - enable_debug_kmem=yes -fi - - - if test "x$enable_debug_kmem" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" - DEBUG_KMEM="_with_debug_kmem" - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_KMEM 1 -_ACEOF - - -else - - DEBUG_KMEM="_without_debug_kmem" - -fi - - - - { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 -$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 -$as_echo "$enable_debug_kmem" >&6; } - - - # Check whether --enable-debug-kmem-tracking was given. -if test "${enable_debug_kmem_tracking+set}" = set; then - enableval=$enable_debug_kmem_tracking; -else - enable_debug_kmem_tracking=no -fi - - - if test "x$enable_debug_kmem_tracking" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" - DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_KMEM_TRACKING 1 -_ACEOF - - -else - - DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" - -fi - - - - { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 -$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 -$as_echo "$enable_debug_kmem_tracking" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 -$as_echo_n "checking whether modules can be built... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - if test "x$enable_linux_builtin" != xyes; then - { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 -$as_echo "$as_me: error: *** Unable to build an empty module." >&2;} - { (exit 1); exit 1; }; } - else - { { $as_echo "$as_me:$LINENO: error: - *** Unable to build an empty module. - *** Please run 'make scripts' inside the kernel source tree." >&5 -$as_echo "$as_me: error: - *** Unable to build an empty module. - *** Please run 'make scripts' inside the kernel source tree." >&2;} - { (exit 1); exit 1; }; } - fi - - - -fi - - rm -Rf build - - - - - # Check whether --enable-atomic-spinlocks was given. -if test "${enable_atomic_spinlocks+set}" = set; then - enableval=$enable_atomic_spinlocks; -else - enable_atomic_spinlocks=check -fi - - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - atomic64_t *ptr __attribute__ ((unused)); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - have_atomic64_t=yes - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_T 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_atomic64_t=no - - - -fi - - rm -Rf build - - - - if test "x$enable_atomic_spinlocks" = xcheck; then - - if test "x$have_atomic64_t" = xyes; then - - enable_atomic_spinlocks=no - -else - - enable_atomic_spinlocks=yes - -fi - - -fi - - - if test "x$enable_atomic_spinlocks" = xyes; then - - -cat >>confdefs.h <<\_ACEOF -#define ATOMIC_SPINLOCK 1 -_ACEOF - - -else - - if test "x$have_atomic64_t" = xno; then - - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -fi - - -fi - - - { $as_echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 -$as_echo_n "checking whether atomic types use spinlocks... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 -$as_echo "$enable_atomic_spinlocks" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 -$as_echo_n "checking whether kernel defines atomic64_t... " >&6; } - { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 -$as_echo "$have_atomic64_t" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_CMPXCHG 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - atomic64_xchg((atomic64_t *)NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_XCHG 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -$as_echo_n "checking whether kernel defines uintptr_t... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - uintptr_t *ptr __attribute__ ((unused)); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 -$as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct work_struct work __attribute__ ((unused)); - INIT_WORK(&work, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_INIT_WORK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 -$as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - (void) register_sysctl_table(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_REGISTER_SYSCTL 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 -$as_echo_n "checking whether set_shrinker() available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return set_shrinker(DEFAULT_SEEKS, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_SHRINKER 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5 -$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - - int shrinker_cb(struct shrinker *, int, unsigned int); - -int -main (void) -{ - - struct shrinker cache_shrinker = { - .shrink = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_SHRINKER_CALLBACK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 -$as_echo_n "checking whether struct path used in struct nameidata... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct nameidata nd __attribute__ ((unused)); - - nd.path.mnt = NULL; - nd.path.dentry = NULL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PATH_IN_NAMEIDATA 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether task_curr() is available" >&5 -$as_echo_n "checking whether task_curr() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - task_curr(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]task_curr[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/sched.c; do - grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 -$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - #ifndef CTL_UNNUMBERED - #error CTL_UNNUMBERED undefined - #endif - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_UNNUMBERED 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 -$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct ctl_table ctl __attribute__ ((unused)); - ctl.ctl_name = 0; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_NAME 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5 -$as_echo_n "checking whether fls64() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return fls64(0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FLS64 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether device_create() is available" >&5 -$as_echo_n "checking whether device_create() is available... " >&6; } - - grep -q -E '[[:space:]]device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/core.c; do - grep -q -E "EXPORT_SYMBOL.*(device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - - fi - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 -$as_echo_n "checking whether device_create() wants 5 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - device_create(NULL, NULL, 0, NULL, "%d", 1); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_DEVICE_CREATE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether class_device_create() is available" >&5 -$as_echo_n "checking whether class_device_create() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - class_device_create(NULL, NULL, 0, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]class_device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/class.c; do - grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is available as export" >&5 -$as_echo_n "checking whether set_normalized_timespec() is available as export... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - set_normalized_timespec(NULL, 0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/time.c; do - grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 -$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - void set_normalized_timespec(struct timespec *ts, - time_t sec, long nsec) { } - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 -_ACEOF - - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 -$as_echo_n "checking whether timespec_sub() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct timespec a = { 0 }; - struct timespec b = { 0 }; - struct timespec c __attribute__ ((unused)); - c = timespec_sub(a, b); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMESPEC_SUB 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 -$as_echo_n "checking whether init_utsname() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct new_utsname *a __attribute__ ((unused)); - a = init_utsname(); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INIT_UTSNAME 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 -$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return 0; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FDTABLE_HEADER 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - - -fi - - rm -Rf build - - - - - - { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 -$as_echo_n "checking whether files_fdtable() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - #ifdef HAVE_FDTABLE_HEADER - #include - #endif - -int -main (void) -{ - - struct files_struct *files = current->files; - struct fdtable *fdt __attribute__ ((unused)); - fdt = files_fdtable(files); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FILES_FDTABLE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether __clear_close_on_exec() is available" >&5 -$as_echo_n "checking whether __clear_close_on_exec() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct fdtable *fdt = NULL; - int fd = 0; - - __clear_close_on_exec(fd, fdt); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLEAR_CLOSE_ON_EXEC 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 -$as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return 0; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UACCESS_HEADER 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - - -fi - - rm -Rf build - - - - - - { $as_echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 -$as_echo_n "checking whether kmalloc_node() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - void *a __attribute__ ((unused)); - a = kmalloc_node(1, GFP_KERNEL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KMALLOC_NODE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether monotonic_clock() is available" >&5 -$as_echo_n "checking whether monotonic_clock() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - monotonic_clock(); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 -$as_echo_n "checking whether struct inode has i_mutex... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - struct inode i; - mutex_init(&i.i_mutex); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INODE_I_MUTEX 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 -$as_echo_n "checking whether struct mutex has owner... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct mutex mtx __attribute__ ((unused)); - mtx.owner = NULL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_OWNER 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct mutex owner is a task_struct" >&5 -$as_echo_n "checking whether struct mutex owner is a task_struct... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct mutex mtx __attribute__ ((unused)); - mtx.owner = current; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_OWNER_TASK_STRUCT 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 -$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct mutex mutex; - mutex_init(&mutex); - mutex_lock_nested(&mutex, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_LOCK_NESTED 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 -$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - on_each_cpu(NULL, NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_ON_EACH_CPU 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kallsyms_lookup_name() is available" >&5 -$as_echo_n "checking whether kallsyms_lookup_name() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - kallsyms_lookup_name(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether get_vmalloc_info() is available" >&5 -$as_echo_n "checking whether get_vmalloc_info() is available... " >&6; } - - grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 -_ACEOF - - - fi - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 -_ACEOF - - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 -$as_echo_n "checking whether symbol *_pgdat exist... " >&6; } - grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null - rc=$? - if test $rc -eq 0; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_HELPERS 1 -_ACEOF - - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi - - { $as_echo "$as_me:$LINENO: checking whether first_online_pgdat() is available" >&5 -$as_echo_n "checking whether first_online_pgdat() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - first_online_pgdat(); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether next_online_pgdat() is available" >&5 -$as_echo_n "checking whether next_online_pgdat() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - next_online_pgdat(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether next_zone() is available" >&5 -$as_echo_n "checking whether next_zone() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - next_zone(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]next_zone[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether pgdat_list is available" >&5 -$as_echo_n "checking whether pgdat_list is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - pg_data_t *tmp = pgdat_list; - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 -$as_echo_n "checking whether global_page_state() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - unsigned long state __attribute__ ((unused)); - state = global_page_state(0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GLOBAL_PAGE_STATE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 -$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_FREE_PAGES; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE_ANON; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE_FILE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE_ANON; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE_FILE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 -$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - -int -main (void) -{ - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) - #error "global_page_state needs NR_FREE_PAGES" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) - #error "global_page_state needs NR_ACTIVE*" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) - #error "global_page_state needs NR_INACTIVE*" - #endif - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NEED_GET_ZONE_COUNTS 1 -_ACEOF - - - { $as_echo "$as_me:$LINENO: checking whether get_zone_counts() is available" >&5 -$as_echo_n "checking whether get_zone_counts() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - get_zone_counts(NULL, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - - - fi - fi - - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether user_path_dir() is available" >&5 -$as_echo_n "checking whether user_path_dir() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - user_path_dir(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]user_path_at[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() is available" >&5 -$as_echo_n "checking whether set_fs_pwd() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - (void) set_fs_pwd; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 -$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - set_fs_pwd(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_SET_FS_PWD 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 -$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - vfs_unlink(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_VFS_UNLINK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 -$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - vfs_rename(NULL, NULL, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_4ARGS_VFS_RENAME 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() is available" >&5 -$as_echo_n "checking whether vfs_fsync() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - (void) vfs_fsync; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]vfs_fsync[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/sync.c; do - grep -q -E "EXPORT_SYMBOL.*(vfs_fsync)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_VFS_FSYNC 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5 -$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - vfs_fsync(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_VFS_FSYNC 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 -$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - struct fs_struct fs; - spin_lock_init(&fs.lock); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FS_STRUCT_SPINLOCK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 -$as_echo_n "checking whether struct cred exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct cred *cr __attribute__ ((unused)); - cr = NULL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CRED_STRUCT 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether groups_search() is available" >&5 -$as_echo_n "checking whether groups_search() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - groups_search(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]groups_search[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether __put_task_struct() is available" >&5 -$as_echo_n "checking whether __put_task_struct() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - __put_task_struct(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 -$as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - proc_dostring(NULL, 0, NULL, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_PROC_HANDLER 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kvasprintf() is available" >&5 -$as_echo_n "checking whether kvasprintf() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - kvasprintf(0, NULL, *((va_list*)NULL)); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether rwsem_is_locked() acquires sem->wait_lock" >&5 -$as_echo_n "checking whether rwsem_is_locked() acquires sem->wait_lock... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - int rwsem_is_locked(struct rw_semaphore *sem) { return 0; } - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in lib/rwsem-spinlock.c; do - grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() is available" >&5 -$as_echo_n "checking whether invalidate_inodes() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - invalidate_inodes; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes_check() is available" >&5 -$as_echo_n "checking whether invalidate_inodes_check() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #ifndef invalidate_inodes - #error invalidate_inodes is not a macro - #endif - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]invalidate_inodes_check[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes_check)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES_CHECK 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5 -$as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return __invalidate_device(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_INVALIDATE_INODES 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether shrink_dcache_memory() is available" >&5 -$as_echo_n "checking whether shrink_dcache_memory() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - shrink_dcache_memory(0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/dcache.c; do - grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_DCACHE_MEMORY 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether shrink_icache_memory() is available" >&5 -$as_echo_n "checking whether shrink_icache_memory() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - shrink_icache_memory(0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/inode.c; do - grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_ICACHE_MEMORY 1 -_ACEOF - - - fi - fi - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent exists in header" >&5 -$as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; } - header=0 - for file in include/linux/namei.h; do - grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - header=1 - break; - fi - done - if test $header -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT_HEADER 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking whether kern_path_parent() is available" >&5 -$as_echo_n "checking whether kern_path_parent() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - kern_path_parent(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/namei.c; do - grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT_SYMBOL 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5 -$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5 -$as_echo_n "checking whether struct shrink_control exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct shrink_control sc __attribute__ ((unused)); - - sc.nr_to_scan = 0; - sc.gfp_mask = GFP_KERNEL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_CONTROL_STRUCT 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5 -$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct rw_semaphore dummy_semaphore __attribute__ ((unused)); - raw_spinlock_t dummy_lock __attribute__ ((unused)); - dummy_semaphore.wait_lock = dummy_lock; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_SPINLOCK_IS_RAW 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether pmd_alloc_with_mask exists" >&5 -$as_echo_n "checking whether pmd_alloc_with_mask exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #if !defined(CONFIG_MMU) - #define CONFIG_MMU - #endif - - #if defined(RCH_HAS_4LEVEL_HACK) - #undef RCH_HAS_4LEVEL_HACK - #endif - - #include - -int -main (void) -{ - - struct mm_struct init_mm; - pud_t *pud = NULL; - unsigned long addr = 0; - gfp_t gfp_mask = GFP_KERNEL; - - pmd_alloc_with_mask(&init_mm, pud, addr, gfp_mask); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PMD_ALLOC_WITH_MASK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - ;; - user) ;; - all) - - -# Check whether --with-linux was given. -if test "${with_linux+set}" = set; then - withval=$with_linux; kernelsrc="$withval" -fi - - - -# Check whether --with-linux-obj was given. -if test "${with_linux_obj+set}" = set; then - withval=$with_linux_obj; kernelbuild="$withval" -fi - - - { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 -$as_echo_n "checking kernel source directory... " >&6; } - if test -z "$kernelsrc"; then - if test -e "/lib/modules/$(uname -r)/source"; then - headersdir="/lib/modules/$(uname -r)/source" - sourcelink=$(readlink -f "$headersdir") - elif test -e "/lib/modules/$(uname -r)/build"; then - headersdir="/lib/modules/$(uname -r)/build" - sourcelink=$(readlink -f "$headersdir") - else - sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ - 2>/dev/null | grep -v obj | tail -1) - fi - - if test -n "$sourcelink" && test -e ${sourcelink}; then - kernelsrc=`readlink -f ${sourcelink}` - else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&5 -$as_echo "$as_me: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&2;} - { (exit 1); exit 1; }; } - fi - else - if test "$kernelsrc" = "NONE"; then - kernsrcver=NONE - fi - fi - - { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 -$as_echo "$kernelsrc" >&6; } - { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 -$as_echo_n "checking kernel build directory... " >&6; } - if test -z "$kernelbuild"; then - if test -e "/lib/modules/$(uname -r)/build"; then - kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` - elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} - elif test -d ${kernelsrc}-obj/${target_cpu}/default; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/default - elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then - kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} - else - kernelbuild=${kernelsrc} - fi - fi - { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5 -$as_echo "$kernelbuild" >&6; } - - { $as_echo "$as_me:$LINENO: checking kernel source version" >&5 -$as_echo_n "checking kernel source version... " >&6; } - utsrelease1=$kernelbuild/include/linux/version.h - utsrelease2=$kernelbuild/include/linux/utsrelease.h - utsrelease3=$kernelbuild/include/generated/utsrelease.h - if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then - utsrelease=linux/version.h - elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then - utsrelease=linux/utsrelease.h - elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then - utsrelease=generated/utsrelease.h - fi - - if test "$utsrelease"; then - kernsrcver=`(echo "#include <$utsrelease>"; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - - if test -z "$kernsrcver"; then - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 -$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} - { (exit 1); exit 1; }; } - fi - else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - if test "x$enable_linux_builtin" != xyes; then - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 -$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} - { (exit 1); exit 1; }; } - else - { { $as_echo "$as_me:$LINENO: error: - *** Cannot find UTS_RELEASE definition. - *** Please run 'make prepare' inside the kernel source tree." >&5 -$as_echo "$as_me: error: - *** Cannot find UTS_RELEASE definition. - *** Please run 'make prepare' inside the kernel source tree." >&2;} - { (exit 1); exit 1; }; } - fi - fi - - { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 -$as_echo "$kernsrcver" >&6; } - - LINUX=${kernelsrc} - LINUX_OBJ=${kernelbuild} - LINUX_VERSION=${kernsrcver} - - - - - - - modpost=$LINUX/scripts/Makefile.modpost - { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 -$as_echo_n "checking kernel file name for module symbols... " >&6; } - if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then - if grep -q Modules.symvers $modpost; then - LINUX_SYMBOLS=Modules.symvers - else - LINUX_SYMBOLS=Module.symvers - fi - - if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then - { { $as_echo "$as_me:$LINENO: error: - *** Please make sure the kernel devel package for your distribution - *** is installed. If your building with a custom kernel make sure the - *** kernel is configured, built, and the '--with-linux=PATH' configure - *** option refers to the location of the kernel source." >&5 -$as_echo "$as_me: error: - *** Please make sure the kernel devel package for your distribution - *** is installed. If your building with a custom kernel make sure the - *** kernel is configured, built, and the '--with-linux=PATH' configure - *** option refers to the location of the kernel source." >&2;} - { (exit 1); exit 1; }; } - fi - else - LINUX_SYMBOLS=NONE - fi - { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 -$as_echo "$LINUX_SYMBOLS" >&6; } - - - - - { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 -$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - #ifndef CONFIG_PREEMPT - #error CONFIG_PREEMPT not #defined - #endif - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Kernel built with CONFIG_PREEMPT which is not supported. - ** You must rebuild your kernel without this option." >&5 -$as_echo "$as_me: error: - *** Kernel built with CONFIG_PREEMPT which is not supported. - ** You must rebuild your kernel without this option." >&2;} - { (exit 1); exit 1; }; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - - -fi - - rm -Rf build - - - - - - if test "${LINUX_OBJ}" != "${LINUX}"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" - fi - - - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" - - - - { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 -$as_echo_n "checking whether debugging is enabled... " >&6; } - # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then - enableval=$enable_debug; -else - enable_debug=no -fi - - - if test "x$enable_debug" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" - DEBUG_CFLAGS="-DDEBUG -Werror" - DEBUG_SPL="_with_debug" - -else - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" - DEBUG_CFLAGS="-DNDEBUG" - DEBUG_SPL="_without_debug" - -fi - - - - - { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 -$as_echo "$enable_debug" >&6; } - - - # Check whether --enable-debug-log was given. -if test "${enable_debug_log+set}" = set; then - enableval=$enable_debug_log; -else - enable_debug_log=yes -fi - - - if test "x$enable_debug_log" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" - DEBUG_LOG="_with_debug_log" - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_LOG 1 -_ACEOF - - -else - - DEBUG_LOG="_without_debug_log" - -fi - - - - { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5 -$as_echo_n "checking whether basic debug logging is enabled... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5 -$as_echo "$enable_debug_log" >&6; } - - - # Check whether --enable-debug-kmem was given. -if test "${enable_debug_kmem+set}" = set; then - enableval=$enable_debug_kmem; -else - enable_debug_kmem=yes -fi - - - if test "x$enable_debug_kmem" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" - DEBUG_KMEM="_with_debug_kmem" - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_KMEM 1 -_ACEOF - - -else - - DEBUG_KMEM="_without_debug_kmem" - -fi - - - - { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 -$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 -$as_echo "$enable_debug_kmem" >&6; } - - - # Check whether --enable-debug-kmem-tracking was given. -if test "${enable_debug_kmem_tracking+set}" = set; then - enableval=$enable_debug_kmem_tracking; -else - enable_debug_kmem_tracking=no -fi - - - if test "x$enable_debug_kmem_tracking" = xyes; then - - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" - DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" - -cat >>confdefs.h <<\_ACEOF -#define DEBUG_KMEM_TRACKING 1 -_ACEOF - - -else - - DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" - -fi - - - - { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 -$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 -$as_echo "$enable_debug_kmem_tracking" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 -$as_echo_n "checking whether modules can be built... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - if test "x$enable_linux_builtin" != xyes; then - { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 -$as_echo "$as_me: error: *** Unable to build an empty module." >&2;} - { (exit 1); exit 1; }; } - else - { { $as_echo "$as_me:$LINENO: error: - *** Unable to build an empty module. - *** Please run 'make scripts' inside the kernel source tree." >&5 -$as_echo "$as_me: error: - *** Unable to build an empty module. - *** Please run 'make scripts' inside the kernel source tree." >&2;} - { (exit 1); exit 1; }; } - fi - - - -fi - - rm -Rf build - - - - - # Check whether --enable-atomic-spinlocks was given. -if test "${enable_atomic_spinlocks+set}" = set; then - enableval=$enable_atomic_spinlocks; -else - enable_atomic_spinlocks=check -fi - - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - atomic64_t *ptr __attribute__ ((unused)); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - have_atomic64_t=yes - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_T 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_atomic64_t=no - - - -fi - - rm -Rf build - - - - if test "x$enable_atomic_spinlocks" = xcheck; then - - if test "x$have_atomic64_t" = xyes; then - - enable_atomic_spinlocks=no - -else - - enable_atomic_spinlocks=yes - -fi - - -fi - - - if test "x$enable_atomic_spinlocks" = xyes; then - - -cat >>confdefs.h <<\_ACEOF -#define ATOMIC_SPINLOCK 1 -_ACEOF - - -else - - if test "x$have_atomic64_t" = xno; then - - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -fi - - -fi - - - { $as_echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5 -$as_echo_n "checking whether atomic types use spinlocks... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5 -$as_echo "$enable_atomic_spinlocks" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 -$as_echo_n "checking whether kernel defines atomic64_t... " >&6; } - { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 -$as_echo "$have_atomic64_t" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_CMPXCHG 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - atomic64_xchg((atomic64_t *)NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_XCHG 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -$as_echo_n "checking whether kernel defines uintptr_t... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - uintptr_t *ptr __attribute__ ((unused)); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 -$as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct work_struct work __attribute__ ((unused)); - INIT_WORK(&work, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_INIT_WORK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 -$as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - (void) register_sysctl_table(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_REGISTER_SYSCTL 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 -$as_echo_n "checking whether set_shrinker() available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return set_shrinker(DEFAULT_SEEKS, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_SHRINKER 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5 -$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - - int shrinker_cb(struct shrinker *, int, unsigned int); - -int -main (void) -{ - - struct shrinker cache_shrinker = { - .shrink = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_SHRINKER_CALLBACK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 -$as_echo_n "checking whether struct path used in struct nameidata... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct nameidata nd __attribute__ ((unused)); - - nd.path.mnt = NULL; - nd.path.dentry = NULL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PATH_IN_NAMEIDATA 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether task_curr() is available" >&5 -$as_echo_n "checking whether task_curr() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - task_curr(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]task_curr[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/sched.c; do - grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 -$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - #ifndef CTL_UNNUMBERED - #error CTL_UNNUMBERED undefined - #endif - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_UNNUMBERED 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 -$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct ctl_table ctl __attribute__ ((unused)); - ctl.ctl_name = 0; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_NAME 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5 -$as_echo_n "checking whether fls64() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return fls64(0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FLS64 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether device_create() is available" >&5 -$as_echo_n "checking whether device_create() is available... " >&6; } - - grep -q -E '[[:space:]]device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/core.c; do - grep -q -E "EXPORT_SYMBOL.*(device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - - fi - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 -$as_echo_n "checking whether device_create() wants 5 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - device_create(NULL, NULL, 0, NULL, "%d", 1); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_DEVICE_CREATE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether class_device_create() is available" >&5 -$as_echo_n "checking whether class_device_create() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - class_device_create(NULL, NULL, 0, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]class_device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/class.c; do - grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is available as export" >&5 -$as_echo_n "checking whether set_normalized_timespec() is available as export... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - set_normalized_timespec(NULL, 0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/time.c; do - grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 -$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - void set_normalized_timespec(struct timespec *ts, - time_t sec, long nsec) { } - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 -_ACEOF - - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 -$as_echo_n "checking whether timespec_sub() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct timespec a = { 0 }; - struct timespec b = { 0 }; - struct timespec c __attribute__ ((unused)); - c = timespec_sub(a, b); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMESPEC_SUB 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 -$as_echo_n "checking whether init_utsname() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct new_utsname *a __attribute__ ((unused)); - a = init_utsname(); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INIT_UTSNAME 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 -$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return 0; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FDTABLE_HEADER 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - - -fi - - rm -Rf build - - - - - - { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 -$as_echo_n "checking whether files_fdtable() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - #ifdef HAVE_FDTABLE_HEADER - #include - #endif - -int -main (void) -{ - - struct files_struct *files = current->files; - struct fdtable *fdt __attribute__ ((unused)); - fdt = files_fdtable(files); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FILES_FDTABLE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether __clear_close_on_exec() is available" >&5 -$as_echo_n "checking whether __clear_close_on_exec() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct fdtable *fdt = NULL; - int fd = 0; - - __clear_close_on_exec(fd, fdt); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLEAR_CLOSE_ON_EXEC 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 -$as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return 0; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UACCESS_HEADER 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - - -fi - - rm -Rf build - - - - - - { $as_echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 -$as_echo_n "checking whether kmalloc_node() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - void *a __attribute__ ((unused)); - a = kmalloc_node(1, GFP_KERNEL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KMALLOC_NODE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether monotonic_clock() is available" >&5 -$as_echo_n "checking whether monotonic_clock() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - monotonic_clock(); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 -$as_echo_n "checking whether struct inode has i_mutex... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - struct inode i; - mutex_init(&i.i_mutex); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INODE_I_MUTEX 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 -$as_echo_n "checking whether struct mutex has owner... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct mutex mtx __attribute__ ((unused)); - mtx.owner = NULL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_OWNER 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct mutex owner is a task_struct" >&5 -$as_echo_n "checking whether struct mutex owner is a task_struct... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct mutex mtx __attribute__ ((unused)); - mtx.owner = current; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_OWNER_TASK_STRUCT 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 -$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct mutex mutex; - mutex_init(&mutex); - mutex_lock_nested(&mutex, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_LOCK_NESTED 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 -$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - on_each_cpu(NULL, NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_ON_EACH_CPU 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kallsyms_lookup_name() is available" >&5 -$as_echo_n "checking whether kallsyms_lookup_name() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - kallsyms_lookup_name(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether get_vmalloc_info() is available" >&5 -$as_echo_n "checking whether get_vmalloc_info() is available... " >&6; } - - grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 -_ACEOF - - - fi - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 -_ACEOF - - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 -$as_echo_n "checking whether symbol *_pgdat exist... " >&6; } - grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null - rc=$? - if test $rc -eq 0; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_HELPERS 1 -_ACEOF - - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi - - { $as_echo "$as_me:$LINENO: checking whether first_online_pgdat() is available" >&5 -$as_echo_n "checking whether first_online_pgdat() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - first_online_pgdat(); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether next_online_pgdat() is available" >&5 -$as_echo_n "checking whether next_online_pgdat() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - next_online_pgdat(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether next_zone() is available" >&5 -$as_echo_n "checking whether next_zone() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - next_zone(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]next_zone[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether pgdat_list is available" >&5 -$as_echo_n "checking whether pgdat_list is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - pg_data_t *tmp = pgdat_list; - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 -$as_echo_n "checking whether global_page_state() is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - unsigned long state __attribute__ ((unused)); - state = global_page_state(0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GLOBAL_PAGE_STATE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 -$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_FREE_PAGES; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE_ANON; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE_FILE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE_ANON; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE_FILE; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 -$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - -int -main (void) -{ - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) - #error "global_page_state needs NR_FREE_PAGES" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) - #error "global_page_state needs NR_ACTIVE*" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) - #error "global_page_state needs NR_INACTIVE*" - #endif - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NEED_GET_ZONE_COUNTS 1 -_ACEOF - - - { $as_echo "$as_me:$LINENO: checking whether get_zone_counts() is available" >&5 -$as_echo_n "checking whether get_zone_counts() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - get_zone_counts(NULL, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - - - fi - fi - - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether user_path_dir() is available" >&5 -$as_echo_n "checking whether user_path_dir() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - user_path_dir(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]user_path_at[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() is available" >&5 -$as_echo_n "checking whether set_fs_pwd() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - (void) set_fs_pwd; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 -$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - set_fs_pwd(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_SET_FS_PWD 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 -$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - vfs_unlink(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_VFS_UNLINK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 -$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - vfs_rename(NULL, NULL, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_4ARGS_VFS_RENAME 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() is available" >&5 -$as_echo_n "checking whether vfs_fsync() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - (void) vfs_fsync; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]vfs_fsync[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/sync.c; do - grep -q -E "EXPORT_SYMBOL.*(vfs_fsync)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_VFS_FSYNC 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5 -$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - vfs_fsync(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_VFS_FSYNC 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 -$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #include - -int -main (void) -{ - - struct fs_struct fs; - spin_lock_init(&fs.lock); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FS_STRUCT_SPINLOCK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 -$as_echo_n "checking whether struct cred exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct cred *cr __attribute__ ((unused)); - cr = NULL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CRED_STRUCT 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether groups_search() is available" >&5 -$as_echo_n "checking whether groups_search() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - groups_search(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]groups_search[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether __put_task_struct() is available" >&5 -$as_echo_n "checking whether __put_task_struct() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - __put_task_struct(NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 -$as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - proc_dostring(NULL, 0, NULL, NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_PROC_HANDLER 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kvasprintf() is available" >&5 -$as_echo_n "checking whether kvasprintf() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - kvasprintf(0, NULL, *((va_list*)NULL)); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether rwsem_is_locked() acquires sem->wait_lock" >&5 -$as_echo_n "checking whether rwsem_is_locked() acquires sem->wait_lock... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - int rwsem_is_locked(struct rw_semaphore *sem) { return 0; } - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in lib/rwsem-spinlock.c; do - grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF - - - fi - fi - - - - { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() is available" >&5 -$as_echo_n "checking whether invalidate_inodes() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - invalidate_inodes; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes_check() is available" >&5 -$as_echo_n "checking whether invalidate_inodes_check() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - #ifndef invalidate_inodes - #error invalidate_inodes is not a macro - #endif - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]invalidate_inodes_check[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes_check)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INVALIDATE_INODES_CHECK 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5 -$as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return __invalidate_device(NULL, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_INVALIDATE_INODES 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether shrink_dcache_memory() is available" >&5 -$as_echo_n "checking whether shrink_dcache_memory() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - shrink_dcache_memory(0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/dcache.c; do - grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_DCACHE_MEMORY 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether shrink_icache_memory() is available" >&5 -$as_echo_n "checking whether shrink_icache_memory() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - shrink_icache_memory(0, 0); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/inode.c; do - grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_ICACHE_MEMORY 1 -_ACEOF - - - fi - fi - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent exists in header" >&5 -$as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; } - header=0 - for file in include/linux/namei.h; do - grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - header=1 - break; - fi - done - if test $header -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT_HEADER 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking whether kern_path_parent() is available" >&5 -$as_echo_n "checking whether kern_path_parent() is available... " >&6; } - - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - kern_path_parent(NULL, NULL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rc=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rc=1 - - -fi - - rm -Rf build - - - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - if test "x$enable_linux_builtin" != xyes; then - - grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/namei.c; do - grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - rc=1 - else : - rc=0 - fi - else : - rc=0 - fi - - fi - if test $rc -ne 0; then : - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else : - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KERN_PATH_PARENT_SYMBOL 1 -_ACEOF - - - fi - fi - - - { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5 -$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5 -$as_echo_n "checking whether struct shrink_control exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct shrink_control sc __attribute__ ((unused)); - - sc.nr_to_scan = 0; - sc.gfp_mask = GFP_KERNEL; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK_CONTROL_STRUCT 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5 -$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - struct rw_semaphore dummy_semaphore __attribute__ ((unused)); - raw_spinlock_t dummy_lock __attribute__ ((unused)); - dummy_semaphore.wait_lock = dummy_lock; - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_SPINLOCK_IS_RAW 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether pmd_alloc_with_mask exists" >&5 -$as_echo_n "checking whether pmd_alloc_with_mask exists... " >&6; } - - -cat confdefs.h - <<_ACEOF >conftest.c -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - #if !defined(CONFIG_MMU) - #define CONFIG_MMU - #endif - - #if defined(RCH_HAS_4LEVEL_HACK) - #undef RCH_HAS_4LEVEL_HACK - #endif - - #include - -int -main (void) -{ - - struct mm_struct init_mm; - pud_t *pud = NULL; - unsigned long addr = 0; - gfp_t gfp_mask = GFP_KERNEL; - - pmd_alloc_with_mask(&init_mm, pud, addr, gfp_mask); - - ; - return 0; -} - -_ACEOF - - - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PMD_ALLOC_WITH_MASK 1 -_ACEOF - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - ;; - srpm) ;; - *) - { $as_echo "$as_me:$LINENO: result: Error!" >&5 -$as_echo "Error!" >&6; } - { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all|srpm" >&5 -$as_echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all|srpm" >&2;} - { (exit 1); exit 1; }; } ;; - esac - - if test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all; then - CONFIG_USER_TRUE= - CONFIG_USER_FALSE='#' -else - CONFIG_USER_TRUE='#' - CONFIG_USER_FALSE= -fi - - if test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all && - test "x$enable_linux_builtin" != xyes ; then - CONFIG_KERNEL_TRUE= - CONFIG_KERNEL_FALSE='#' -else - CONFIG_KERNEL_TRUE='#' - CONFIG_KERNEL_FALSE= -fi - - - -ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules spl.release dkms.conf" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${CONFIG_USER_TRUE}" && test -z "${CONFIG_USER_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_USER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"CONFIG_USER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${CONFIG_KERNEL_TRUE}" && test -z "${CONFIG_KERNEL_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_KERNEL\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"CONFIG_KERNEL\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTION]... [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "spl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS spl_config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "cmd/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;; - "module/Makefile") CONFIG_FILES="$CONFIG_FILES module/Makefile" ;; - "module/spl/Makefile") CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;; - "module/splat/Makefile") CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;; - "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; - "spl.spec") CONFIG_FILES="$CONFIG_FILES spl.spec" ;; - "spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; - "PKGBUILD-spl") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl" ;; - "PKGBUILD-spl-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl-modules" ;; - "spl.release") CONFIG_FILES="$CONFIG_FILES spl.release" ;; - "dkms.conf") CONFIG_FILES="$CONFIG_FILES dkms.conf" ;; - - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=' ' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "spl_config.h":H) - (mv spl_config.h spl_config.h.tmp && - awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h && - rm spl_config.h.tmp) || exit 1 ;; - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/include/Makefile.in b/include/Makefile.in deleted file mode 100644 index 1e6aa5fe6..000000000 --- a/include/Makefile.in +++ /dev/null @@ -1,485 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALIEN = @ALIEN@ -ALIEN_VERSION = @ALIEN_VERSION@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_CFLAGS = @DEBUG_CFLAGS@ -DEBUG_KMEM = @DEBUG_KMEM@ -DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ -DEBUG_LOG = @DEBUG_LOG@ -DEBUG_SPL = @DEBUG_SPL@ -DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DPKG = @DPKG@ -DPKGBUILD = @DPKGBUILD@ -DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ -DPKG_VERSION = @DPKG_VERSION@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_ALIEN = @HAVE_ALIEN@ -HAVE_DPKG = @HAVE_DPKG@ -HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ -HAVE_MAKEPKG = @HAVE_MAKEPKG@ -HAVE_PACMAN = @HAVE_PACMAN@ -HAVE_RPM = @HAVE_RPM@ -HAVE_RPMBUILD = @HAVE_RPMBUILD@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LICENSE = @LICENSE@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_SYMBOLS = @LINUX_SYMBOLS@ -LINUX_VERSION = @LINUX_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKEPKG = @MAKEPKG@ -MAKEPKG_VERSION = @MAKEPKG_VERSION@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACMAN = @PACMAN@ -PACMAN_VERSION = @PACMAN_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RPM = @RPM@ -RPMBUILD = @RPMBUILD@ -RPMBUILD_VERSION = @RPMBUILD_VERSION@ -RPM_VERSION = @RPM_VERSION@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_CONFIG = @SPL_CONFIG@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VENDOR = @VENDOR@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# All headers are referenced by this top level Makefile.am are -# noinst_HEADERS because they are not installed in the usual include -# location. We do not want to be using $includedir for this. -# Installation is handled by the custom install-data-local rule. -noinst_HEADERS = $(top_srcdir)/include/*.h \ - $(top_srcdir)/include/fs/*.h $(top_srcdir)/include/linux/*.h \ - $(top_srcdir)/include/rpc/*.h \ - $(top_srcdir)/include/sharefs/*.h \ - $(top_srcdir)/include/sys/fm/*.h \ - $(top_srcdir)/include/sys/fs/*.h \ - $(top_srcdir)/include/sys/sysevent/*.h \ - $(top_srcdir)/include/sys/*.h $(top_srcdir)/include/util/*.h \ - $(top_srcdir)/include/vm/*.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-local - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-local install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-local - - -install-data-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ - instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - instfiles=`find . -name '*.h'`; \ - for instfile in $$instfiles; do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ - done - -uninstall-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ - instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - $(RM) -R $$instdest - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/fs/Makefile.in b/include/fs/Makefile.in deleted file mode 100644 index 78beaa5bf..000000000 --- a/include/fs/Makefile.in +++ /dev/null @@ -1,414 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/fs -DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -nobase_includeHEADERS_INSTALL = $(install_sh_DATA) -HEADERS = $(nobase_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -nobase_include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/fs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/fs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-nobase_includeHEADERS: $(nobase_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__vpath_adj) \ - echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-nobase_includeHEADERS: - @$(NORMAL_UNINSTALL) - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - $(am__vpath_adj) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-nobase_includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-nobase_includeHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in deleted file mode 100644 index eb19aec76..000000000 --- a/include/linux/Makefile.in +++ /dev/null @@ -1,414 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/linux -DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -nobase_includeHEADERS_INSTALL = $(install_sh_DATA) -HEADERS = $(nobase_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -nobase_include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/linux/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/linux/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-nobase_includeHEADERS: $(nobase_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__vpath_adj) \ - echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-nobase_includeHEADERS: - @$(NORMAL_UNINSTALL) - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - $(am__vpath_adj) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-nobase_includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-nobase_includeHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/rpc/Makefile.in b/include/rpc/Makefile.in deleted file mode 100644 index 68151f9be..000000000 --- a/include/rpc/Makefile.in +++ /dev/null @@ -1,414 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/rpc -DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -nobase_includeHEADERS_INSTALL = $(install_sh_DATA) -HEADERS = $(nobase_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -nobase_include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/rpc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/rpc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-nobase_includeHEADERS: $(nobase_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__vpath_adj) \ - echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-nobase_includeHEADERS: - @$(NORMAL_UNINSTALL) - @$(am__vpath_adj_setup) \ - list='$(nobase_include_HEADERS)'; for p in $$list; do \ - $(am__vpath_adj) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-nobase_includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-nobase_includeHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/sharefs/Makefile.in b/include/sharefs/Makefile.in deleted file mode 100644 index 69e3093d1..000000000 --- a/include/sharefs/Makefile.in +++ /dev/null @@ -1,412 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/sharefs -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sharefs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/sharefs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in deleted file mode 100644 index 76a7cdf47..000000000 --- a/include/sys/Makefile.in +++ /dev/null @@ -1,525 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/sys -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -SUBDIRS = fm fs sysevent -include_HEADERS = *.h -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/sys/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-recursive ctags \ - ctags-recursive distclean distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in deleted file mode 100644 index 8180b6f0a..000000000 --- a/include/sys/fm/Makefile.in +++ /dev/null @@ -1,412 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/sys/fm -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/fm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/sys/fm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in deleted file mode 100644 index 2d758f0cb..000000000 --- a/include/sys/fs/Makefile.in +++ /dev/null @@ -1,412 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/sys/fs -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/fs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/sys/fs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/sys/sysevent/Makefile.in b/include/sys/sysevent/Makefile.in deleted file mode 100644 index 740da4191..000000000 --- a/include/sys/sysevent/Makefile.in +++ /dev/null @@ -1,412 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/sys/sysevent -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/sys/sysevent/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/sys/sysevent/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/util/Makefile.in b/include/util/Makefile.in deleted file mode 100644 index f0b92cf7a..000000000 --- a/include/util/Makefile.in +++ /dev/null @@ -1,412 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/util -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/util/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/util/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/include/vm/Makefile.in b/include/vm/Makefile.in deleted file mode 100644 index 8e04bb980..000000000 --- a/include/vm/Makefile.in +++ /dev/null @@ -1,412 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = include/vm -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_VERSION = @LINUX_VERSION@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -include_HEADERS = *.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/vm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/vm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/lib/Makefile.in b/lib/Makefile.in deleted file mode 100644 index 12315faf0..000000000 --- a/lib/Makefile.in +++ /dev/null @@ -1,547 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Written by Brian Behlendorf . -############################################################################### -# Common rules for user space components. -############################################################################### - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/Rules.am -subdir = lib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libcommon_la_LIBADD = -am_libcommon_la_OBJECTS = list.lo -libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libcommon_la_SOURCES) -DIST_SOURCES = $(libcommon_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALIEN = @ALIEN@ -ALIEN_VERSION = @ALIEN_VERSION@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_CFLAGS = @DEBUG_CFLAGS@ -DEBUG_KMEM = @DEBUG_KMEM@ -DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ -DEBUG_LOG = @DEBUG_LOG@ -DEBUG_SPL = @DEBUG_SPL@ -DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DPKG = @DPKG@ -DPKGBUILD = @DPKGBUILD@ -DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ -DPKG_VERSION = @DPKG_VERSION@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_ALIEN = @HAVE_ALIEN@ -HAVE_DPKG = @HAVE_DPKG@ -HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ -HAVE_MAKEPKG = @HAVE_MAKEPKG@ -HAVE_PACMAN = @HAVE_PACMAN@ -HAVE_RPM = @HAVE_RPM@ -HAVE_RPMBUILD = @HAVE_RPMBUILD@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LICENSE = @LICENSE@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_SYMBOLS = @LINUX_SYMBOLS@ -LINUX_VERSION = @LINUX_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKEPKG = @MAKEPKG@ -MAKEPKG_VERSION = @MAKEPKG_VERSION@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACMAN = @PACMAN@ -PACMAN_VERSION = @PACMAN_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RPM = @RPM@ -RPMBUILD = @RPMBUILD@ -RPMBUILD_VERSION = @RPMBUILD_VERSION@ -RPM_VERSION = @RPM_VERSION@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_CONFIG = @SPL_CONFIG@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VENDOR = @VENDOR@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h -AM_LIBTOOLFLAGS = --silent -AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \ - -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} -noinst_LTLIBRARIES = libcommon.la -libcommon_la_SOURCES = list.c -EXTRA_DIST = list.h -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/Rules.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/scripts/Makefile.in b/scripts/Makefile.in deleted file mode 100644 index ed9c78461..000000000 --- a/scripts/Makefile.in +++ /dev/null @@ -1,409 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = scripts -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/spl-build.m4 \ - $(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/spl_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALIEN = @ALIEN@ -ALIEN_VERSION = @ALIEN_VERSION@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_CFLAGS = @DEBUG_CFLAGS@ -DEBUG_KMEM = @DEBUG_KMEM@ -DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ -DEBUG_LOG = @DEBUG_LOG@ -DEBUG_SPL = @DEBUG_SPL@ -DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DPKG = @DPKG@ -DPKGBUILD = @DPKGBUILD@ -DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ -DPKG_VERSION = @DPKG_VERSION@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_ALIEN = @HAVE_ALIEN@ -HAVE_DPKG = @HAVE_DPKG@ -HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ -HAVE_MAKEPKG = @HAVE_MAKEPKG@ -HAVE_PACMAN = @HAVE_PACMAN@ -HAVE_RPM = @HAVE_RPM@ -HAVE_RPMBUILD = @HAVE_RPMBUILD@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCPPFLAGS = @KERNELCPPFLAGS@ -KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LICENSE = @LICENSE@ -LINUX = @LINUX@ -LINUX_OBJ = @LINUX_OBJ@ -LINUX_SYMBOLS = @LINUX_SYMBOLS@ -LINUX_VERSION = @LINUX_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKEPKG = @MAKEPKG@ -MAKEPKG_VERSION = @MAKEPKG_VERSION@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACMAN = @PACMAN@ -PACMAN_VERSION = @PACMAN_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RPM = @RPM@ -RPMBUILD = @RPMBUILD@ -RPMBUILD_VERSION = @RPMBUILD_VERSION@ -RPM_VERSION = @RPM_VERSION@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPL_CONFIG = @SPL_CONFIG@ -SPL_META_ALIAS = @SPL_META_ALIAS@ -SPL_META_AUTHOR = @SPL_META_AUTHOR@ -SPL_META_DATA = @SPL_META_DATA@ -SPL_META_LT_AGE = @SPL_META_LT_AGE@ -SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ -SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ -SPL_META_NAME = @SPL_META_NAME@ -SPL_META_RELEASE = @SPL_META_RELEASE@ -SPL_META_VERSION = @SPL_META_VERSION@ -STRIP = @STRIP@ -VENDOR = @VENDOR@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = check.sh -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu scripts/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -check: - $(top_srcdir)/scripts/check.sh - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: From e3a436070283596bae22773fee3b56d846ab6cec Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Wed, 22 Aug 2012 13:07:05 -0700 Subject: [PATCH 0625/1062] Revert "Make CONFIG_PREEMPT Fatal" This reverts commit 7731d46b69bd893d515c55e87ffa8a9bd2ddfb38. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d7c89bc48..e3b65d05c 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -8,7 +8,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL - SPL_AC_KERNEL_CONFIG if test "${LINUX_OBJ}" != "${LINUX}"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" @@ -219,13 +218,6 @@ AC_DEFUN([SPL_AC_KERNEL], [ SPL_AC_MODULE_SYMVERS ]) -AC_DEFUN([SPL_AC_KERNEL_CONFIG], [ - SPL_LINUX_CONFIG([PREEMPT], - AC_MSG_ERROR([ - *** Kernel built with CONFIG_PREEMPT which is not supported. - ** You must rebuild your kernel without this option.]), []) -]) - dnl # dnl # Default SPL user configuration dnl # From 587045a6386d1e7a6256eb6ef825e046beabd9a3 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Wed, 22 Aug 2012 13:16:02 -0700 Subject: [PATCH 0626/1062] Remove SPL_LINUX_CONFIG autoconf macro Since removing the check for CONFIG_PREEMPT, there are no consumers of the SPL_LINUX_CONFIG macro. As such, there is no reason to keep it around. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #164 --- config/spl-build.m4 | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index e3b65d05c..dad4c8ed2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -646,26 +646,6 @@ AC_DEFUN([SPL_LINUX_TRY_COMPILE], [$3], [$4]) ]) -dnl # -dnl # SPL_LINUX_CONFIG -dnl # -AC_DEFUN([SPL_LINUX_CONFIG], - [AC_MSG_CHECKING([whether Linux was built with CONFIG_$1]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - #ifndef CONFIG_$1 - #error CONFIG_$1 not #defined - #endif - ],[ - AC_MSG_RESULT([yes]) - $2 - ],[ - AC_MSG_RESULT([no]) - $3 - ]) -]) - dnl # dnl # SPL_CHECK_SYMBOL_EXPORT dnl # check symbol exported or not From e2dcc6e2b818d6f996203c9f1b4dfaf449554790 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 7 Aug 2012 16:59:50 -0700 Subject: [PATCH 0627/1062] Emergency slab objects This patch is designed to resolve a deadlock which can occur with __vmalloc() based slabs. The issue is that the Linux kernel does not honor the flags passed to __vmalloc(). This makes it unsafe to use in a writeback context. Unfortunately, this is a use case ZFS depends on for correct operation. Fixing this issue in the upstream kernel was pursued and patches are available which resolve the issue. https://bugs.gentoo.org/show_bug.cgi?id=416685 However, these changes were rejected because upstream felt that using __vmalloc() in the context of writeback should never be done. Their solution was for us to rewrite parts of ZFS to accomidate the Linux VM. While that is probably the right long term solution, and it is something we want to pursue, it is not a trivial task and will likely destabilize the existing code. This work has been planned for the 0.7.0 release but in the meanwhile we want to improve the SPL slab implementation to accomidate this expected ZFS usage. This is accomplished by performing the __vmalloc() asynchronously in the context of a work queue. This doesn't prevent the posibility of the worker thread from deadlocking. However, the caller can now safely block on a wait queue for the slab allocation to complete. Normally this will occur in a reasonable amount of time and the caller will be woken up when the new slab is available,. The objects will then get cached in the per-cpu magazines and everything will proceed as usual. However, if the __vmalloc() deadlocks for the reasons described above, or is just very slow, then the callers on the wait queues will timeout out. When this rare situation occurs they will attempt to kmalloc() a single minimally sized object using the GFP_NOIO flags. This allocation will not deadlock because kmalloc() will honor the passed flags and the caller will be able to make forward progress. As long as forward progress can be maintained then even if the worker thread is deadlocked the critical thread will make progress. This will eventually allow the deadlocked worker thread to complete and normal operation will resume. These emergency allocations will likely be slow since they require contiguous pages. However, their use should be rare so the impact is expected to be minimal. If that turns out not to be the case in practice further optimizations are possible. One additional concern is if these emergency objects are long lived. Right now they are simply tracked on a list which must be walked when an object is freed. Is they accumulate on a system and the list grows freeing objects will become more expensive. This could be handled relatively easily by using a hash instead of a list, but that optimization (if needed) is left for a follow up patch. Additionally, these emeregency objects could be repacked in to existing slabs as objects are freed if the kmem_cache_set_move() functionality was implemented. See issue https://github.com/zfsonlinux/spl/issues/26 for full details. This work would also help reduce ZFS's memory fragmentation problems. The /proc/spl/kmem/slab file has had two new columns added at the end. The 'emerg' column reports the current number of these emergency objects in use for the cache, and the following 'max' column shows the historical worst case. These value should give us a good idea of how often these objects are needed. Based on these values under real use cases we can tune the default behavior. Lastly, as a side benefit using a single work queue for the slab allocations should reduce cpu contention on the global virtual address space lock. This should manifest itself as reduced cpu usage for the system. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 17 +++ module/spl/spl-kmem.c | 233 ++++++++++++++++++++++++++++++++++-------- module/spl/spl-proc.c | 10 +- 3 files changed, 216 insertions(+), 44 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 344e2716b..aaff6d046 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -291,6 +291,7 @@ enum { KMC_BIT_KMEM = 5, /* Use kmem cache */ KMC_BIT_VMEM = 6, /* Use vmem cache */ KMC_BIT_OFFSLAB = 7, /* Objects not on slab */ + KMC_BIT_GROWING = 15, /* Growing in progress */ KMC_BIT_REAPING = 16, /* Reaping in progress */ KMC_BIT_DESTROY = 17, /* Destroy in progress */ KMC_BIT_TOTAL = 18, /* Proc handler helper bit */ @@ -315,6 +316,7 @@ typedef enum kmem_cbrc { #define KMC_KMEM (1 << KMC_BIT_KMEM) #define KMC_VMEM (1 << KMC_BIT_VMEM) #define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) +#define KMC_GROWING (1 << KMC_BIT_GROWING) #define KMC_REAPING (1 << KMC_BIT_REAPING) #define KMC_DESTROY (1 << KMC_BIT_DESTROY) #define KMC_TOTAL (1 << KMC_BIT_TOTAL) @@ -374,6 +376,17 @@ typedef struct spl_kmem_slab { uint32_t sks_ref; /* Ref count used objects */ } spl_kmem_slab_t; +typedef struct spl_kmem_alloc { + struct spl_kmem_cache *ska_cache; /* Owned by cache */ + int ska_flags; /* Allocation flags */ + struct delayed_work ska_work; /* Allocation work */ +} spl_kmem_alloc_t; + +typedef struct spl_kmem_emergency { + void *ske_obj; /* Buffer address */ + struct list_head ske_list; /* Emergency list linkage */ +} spl_kmem_emergency_t; + typedef struct spl_kmem_cache { uint32_t skc_magic; /* Sanity magic */ uint32_t skc_name_size; /* Name length */ @@ -398,7 +411,9 @@ typedef struct spl_kmem_cache { struct list_head skc_list; /* List of caches linkage */ struct list_head skc_complete_list;/* Completely alloc'ed */ struct list_head skc_partial_list; /* Partially alloc'ed */ + struct list_head skc_emergency_list; /* Min sized objects */ spinlock_t skc_lock; /* Cache lock */ + wait_queue_head_t skc_waitq; /* Allocation waiters */ uint64_t skc_slab_fail; /* Slab alloc failures */ uint64_t skc_slab_create;/* Slab creates */ uint64_t skc_slab_destroy;/* Slab destroys */ @@ -408,6 +423,8 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_total; /* Obj total current */ uint64_t skc_obj_alloc; /* Obj alloc current */ uint64_t skc_obj_max; /* Obj max historic */ + uint64_t skc_obj_emergency; /* Obj emergency current */ + uint64_t skc_obj_emergency_max; /* Obj emergency max */ } spl_kmem_cache_t; #define kmem_cache_t spl_kmem_cache_t diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 258d61478..4cf3b26ad 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1143,6 +1143,86 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) SEXIT; } +/* + * Allocate a single emergency object for use by the caller. + */ +static int +spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) +{ + spl_kmem_emergency_t *ske; + int empty; + SENTRY; + + /* Last chance use a partial slab if one now exists */ + spin_lock(&skc->skc_lock); + empty = list_empty(&skc->skc_partial_list); + spin_unlock(&skc->skc_lock); + if (!empty) + SRETURN(-EEXIST); + + ske = kmalloc(sizeof(*ske), flags); + if (ske == NULL) + SRETURN(-ENOMEM); + + ske->ske_obj = kmalloc(skc->skc_obj_size, flags); + if (ske->ske_obj == NULL) { + kfree(ske); + SRETURN(-ENOMEM); + } + + if (skc->skc_ctor) + skc->skc_ctor(ske->ske_obj, skc->skc_private, flags); + + spin_lock(&skc->skc_lock); + skc->skc_obj_total++; + skc->skc_obj_emergency++; + if (skc->skc_obj_emergency > skc->skc_obj_emergency_max) + skc->skc_obj_emergency_max = skc->skc_obj_emergency; + + list_add(&ske->ske_list, &skc->skc_emergency_list); + spin_unlock(&skc->skc_lock); + + *obj = ske->ske_obj; + + SRETURN(0); +} + +/* + * Free the passed object if it is an emergency object or a normal slab + * object. Currently this is done by walking what should be a short list of + * emergency objects. If this proves to be too inefficient we can replace + * the simple list with a hash. + */ +static int +spl_emergency_free(spl_kmem_cache_t *skc, void *obj) +{ + spl_kmem_emergency_t *m, *n, *ske = NULL; + SENTRY; + + spin_lock(&skc->skc_lock); + list_for_each_entry_safe(m, n, &skc->skc_emergency_list, ske_list) { + if (m->ske_obj == obj) { + list_del(&m->ske_list); + skc->skc_obj_emergency--; + skc->skc_obj_total--; + ske = m; + break; + } + } + spin_unlock(&skc->skc_lock); + + if (ske == NULL) + SRETURN(-ENOENT); + + if (skc->skc_dtor) + skc->skc_dtor(ske->ske_obj, skc->skc_private); + + kfree(ske->ske_obj); + kfree(ske); + + SRETURN(0); +} + /* * Called regularly on all caches to age objects out of the magazines * which have not been access in skc->skc_delay seconds. This prevents @@ -1430,7 +1510,9 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, INIT_LIST_HEAD(&skc->skc_list); INIT_LIST_HEAD(&skc->skc_complete_list); INIT_LIST_HEAD(&skc->skc_partial_list); + INIT_LIST_HEAD(&skc->skc_emergency_list); spin_lock_init(&skc->skc_lock); + init_waitqueue_head(&skc->skc_waitq); skc->skc_slab_fail = 0; skc->skc_slab_create = 0; skc->skc_slab_destroy = 0; @@ -1440,6 +1522,8 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_total = 0; skc->skc_obj_alloc = 0; skc->skc_obj_max = 0; + skc->skc_obj_emergency = 0; + skc->skc_obj_emergency_max = 0; if (align) { VERIFY(ISP2(align)); @@ -1530,7 +1614,9 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) ASSERT3U(skc->skc_obj_alloc, ==, 0); ASSERT3U(skc->skc_slab_total, ==, 0); ASSERT3U(skc->skc_obj_total, ==, 0); + ASSERT3U(skc->skc_obj_emergency, ==, 0); ASSERT(list_empty(&skc->skc_complete_list)); + ASSERT(list_empty(&skc->skc_emergency_list)); kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); @@ -1581,59 +1667,112 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) } /* - * No available objects on any slabs, create a new slab. Since this - * is an expensive operation we do it without holding the spin lock and - * only briefly acquire it when we link in the fully allocated and - * constructed slab. + * Generic slab allocation function to run by the global work queues. + * It is responsible for allocating a new slab, linking it in to the list + * of partial slabs, and then waking any waiters. */ -static spl_kmem_slab_t * -spl_cache_grow(spl_kmem_cache_t *skc, int flags) +static void +spl_cache_grow_work(void *data) { + spl_kmem_alloc_t *ska = + spl_get_work_data(data, spl_kmem_alloc_t, ska_work.work); + spl_kmem_cache_t *skc = ska->ska_cache; spl_kmem_slab_t *sks; + + sks = spl_slab_alloc(skc, ska->ska_flags | __GFP_NORETRY | KM_NODEBUG); + spin_lock(&skc->skc_lock); + if (sks) { + skc->skc_slab_total++; + skc->skc_obj_total += sks->sks_objs; + list_add_tail(&sks->sks_list, &skc->skc_partial_list); + } + + atomic_dec(&skc->skc_ref); + clear_bit(KMC_BIT_GROWING, &skc->skc_flags); + wake_up_all(&skc->skc_waitq); + spin_unlock(&skc->skc_lock); + + kfree(ska); +} + +/* + * Returns non-zero when a new slab should be available. + */ +static int +spl_cache_grow_wait(spl_kmem_cache_t *skc) +{ + return !test_bit(KMC_BIT_GROWING, &skc->skc_flags); +} + +/* + * No available objects on any slabs, create a new slab. + */ +static int +spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) +{ + int remaining, rc = 0; SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); - local_irq_enable(); might_sleep(); + *obj = NULL; /* * Before allocating a new slab check if the slab is being reaped. * If it is there is a good chance we can wait until it finishes * and then use one of the newly freed but not aged-out slabs. */ - if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { - schedule(); - SGOTO(out, sks= NULL); + if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) + SRETURN(-EAGAIN); + + /* + * This is handled by dispatching a work request to the global work + * queue. This allows us to asynchronously allocate a new slab while + * retaining the ability to safely fall back to a smaller synchronous + * allocations to ensure forward progress is always maintained. + */ + if (test_and_set_bit(KMC_BIT_GROWING, &skc->skc_flags) == 0) { + spl_kmem_alloc_t *ska; + + ska = kmalloc(sizeof(*ska), flags); + if (ska == NULL) { + clear_bit(KMC_BIT_GROWING, &skc->skc_flags); + wake_up_all(&skc->skc_waitq); + SRETURN(-ENOMEM); + } + + atomic_inc(&skc->skc_ref); + ska->ska_cache = skc; + ska->ska_flags = flags; + spl_init_delayed_work(&ska->ska_work, spl_cache_grow_work, ska); + schedule_delayed_work(&ska->ska_work, 0); } - /* Allocate a new slab for the cache */ - sks = spl_slab_alloc(skc, flags | __GFP_NORETRY | KM_NODEBUG); - if (sks == NULL) - SGOTO(out, sks = NULL); + /* + * Allow a single timer tick before falling back to synchronously + * allocating the minimum about of memory required by the caller. + */ + remaining = wait_event_timeout(skc->skc_waitq, + spl_cache_grow_wait(skc), 1); + if (remaining == 0) + rc = spl_emergency_alloc(skc, flags, obj); - /* Link the new empty slab in to the end of skc_partial_list. */ - spin_lock(&skc->skc_lock); - skc->skc_slab_total++; - skc->skc_obj_total += sks->sks_objs; - list_add_tail(&sks->sks_list, &skc->skc_partial_list); - spin_unlock(&skc->skc_lock); -out: - local_irq_disable(); - - SRETURN(sks); + SRETURN(rc); } /* - * Refill a per-cpu magazine with objects from the slabs for this - * cache. Ideally the magazine can be repopulated using existing - * objects which have been released, however if we are unable to - * locate enough free objects new slabs of objects will be created. + * Refill a per-cpu magazine with objects from the slabs for this cache. + * Ideally the magazine can be repopulated using existing objects which have + * been released, however if we are unable to locate enough free objects new + * slabs of objects will be created. On success NULL is returned, otherwise + * the address of a single emergency object is returned for use by the caller. */ -static int +static void * spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) { spl_kmem_slab_t *sks; - int rc = 0, refill; + int count = 0, rc, refill; + void *obj = NULL; SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -1647,8 +1786,15 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) if (list_empty(&skc->skc_partial_list)) { spin_unlock(&skc->skc_lock); - sks = spl_cache_grow(skc, flags); - if (!sks) + local_irq_enable(); + rc = spl_cache_grow(skc, flags, &obj); + local_irq_disable(); + + /* Emergency object for immediate use by caller */ + if (rc == 0 && obj != NULL) + SRETURN(obj); + + if (rc) SGOTO(out, rc); /* Rescheduled to different CPU skm is not local */ @@ -1673,9 +1819,9 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) /* Consume as many objects as needed to refill the requested * cache. We must also be careful not to overfill it. */ - while (sks->sks_ref < sks->sks_objs && refill-- > 0 && ++rc) { + while (sks->sks_ref < sks->sks_objs && refill-- > 0 && ++count) { ASSERT(skm->skm_avail < skm->skm_size); - ASSERT(rc < skm->skm_size); + ASSERT(count < skm->skm_size); skm->skm_objs[skm->skm_avail++]=spl_cache_obj(skc,sks); } @@ -1688,8 +1834,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) spin_unlock(&skc->skc_lock); out: - /* Returns the number of entries added to cache */ - SRETURN(rc); + SRETURN(NULL); } /* @@ -1804,10 +1949,9 @@ restart: obj = skm->skm_objs[--skm->skm_avail]; skm->skm_age = jiffies; } else { - /* Per-CPU cache empty, directly allocate from - * the slab and refill the per-CPU cache. */ - (void)spl_cache_refill(skc, skm, flags); - SGOTO(restart, obj = NULL); + obj = spl_cache_refill(skc, skm, flags); + if (obj == NULL) + SGOTO(restart, obj = NULL); } local_irq_restore(irq_flags); @@ -1838,6 +1982,14 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); atomic_inc(&skc->skc_ref); + + /* + * Emergency objects are never part of the virtual address space + * so if we get a virtual address we can optimize this check out. + */ + if (!kmem_virt(obj) && !spl_emergency_free(skc, obj)) + SGOTO(out, 0); + local_irq_save(flags); /* Safe to update per-cpu structure without lock, but @@ -1855,6 +2007,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) skm->skm_objs[skm->skm_avail++] = obj; local_irq_restore(flags); +out: atomic_dec(&skc->skc_ref); SEXIT; diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 8149143ae..11a2d1068 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -625,12 +625,12 @@ slab_seq_show_headers(struct seq_file *f) "--------------------- cache ----------" "--------------------------------------------- " "----- slab ------ " - "---- object -----\n"); + "---- object -----------------\n"); seq_printf(f, "name " " flags size alloc slabsize objsize " "total alloc max " - "total alloc max\n"); + "total alloc max emerg max\n"); } static int @@ -643,7 +643,7 @@ slab_seq_show(struct seq_file *f, void *p) spin_lock(&skc->skc_lock); seq_printf(f, "%-36s ", skc->skc_name); seq_printf(f, "0x%05lx %9lu %9lu %8u %8u " - "%5lu %5lu %5lu %5lu %5lu %5lu\n", + "%5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu\n", (long unsigned)skc->skc_flags, (long unsigned)(skc->skc_slab_size * skc->skc_slab_total), (long unsigned)(skc->skc_obj_size * skc->skc_obj_alloc), @@ -654,7 +654,9 @@ slab_seq_show(struct seq_file *f, void *p) (long unsigned)skc->skc_slab_max, (long unsigned)skc->skc_obj_total, (long unsigned)skc->skc_obj_alloc, - (long unsigned)skc->skc_obj_max); + (long unsigned)skc->skc_obj_max, + (long unsigned)skc->skc_obj_emergency, + (long unsigned)skc->skc_obj_emergency_max); spin_unlock(&skc->skc_lock); From d47e664ad4b7468c43a97aa6d299d8756571155d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 18 Aug 2012 10:56:17 -0700 Subject: [PATCH 0628/1062] Revert "Add TASKQ_NORECLAIM flag" This reverts commit 372c2572336468cbf60272aa7e735b7ca0c3807c. The use of the PF_MEMALLOC flag was always a hack to work around memory reclaim deadlocks. Those issues are believed to be resolved so this workaround can be safely reverted. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 1 - module/spl/spl-taskq.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index fec4de8ca..a5d9492f2 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -40,7 +40,6 @@ #define TASKQ_DYNAMIC 0x00000004 #define TASKQ_THREADS_CPU_PCT 0x00000008 #define TASKQ_DC_BATCH 0x00000010 -#define TASKQ_NORECLAIM 0x00000020 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 67a834572..e4092b842 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -442,10 +442,6 @@ taskq_thread(void *args) tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; - /* Disable the direct memory reclaim path */ - if (tq->tq_flags & TASKQ_NORECLAIM) - current->flags |= PF_MEMALLOC; - sigfillset(&blocked); sigprocmask(SIG_BLOCK, &blocked, NULL); flush_signals(current); From bc03e07a7c43b134c7936bba5e87fb8a526b6692 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 18 Aug 2012 11:01:22 -0700 Subject: [PATCH 0629/1062] Revert "Detect kernels that honor gfp flags passed to vmalloc()" This reverts commit 36811b4430aaea8c8b91bbe7d812a26799865499. Which is no longer required because there is now SPL code in place to safely handle the deadlocks the kernel patch was designed to address. Therefore we can unconditionally use vmalloc() and drop all the PF_MEMALLOC code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 36 ------------------------------------ module/spl/spl-kmem.c | 4 ---- spl_config.h.in | 3 --- 3 files changed, 43 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index dad4c8ed2..b7ab54d32 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -88,7 +88,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW - SPL_AC_PMD_ALLOC_WITH_MASK ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2235,38 +2234,3 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) - -dnl # -dnl # Proposed VM Subsystem Bug Fix -dnl # https://bugs.gentoo.org/show_bug.cgi?id=416685 -dnl # -dnl # Make __pte_alloc_kernel() honor gfp flags passed to vmalloc() -dnl # This is detected by checking a macro that is changed to support this. -dnl # -AC_DEFUN([SPL_AC_PMD_ALLOC_WITH_MASK], [ - AC_MSG_CHECKING([whether pmd_alloc_with_mask exists]) - SPL_LINUX_TRY_COMPILE([ - #if !defined(CONFIG_MMU) - #define CONFIG_MMU - #endif - - #if defined(RCH_HAS_4LEVEL_HACK) - #undef RCH_HAS_4LEVEL_HACK - #endif - - #include - ],[ - struct mm_struct init_mm; - pud_t *pud = NULL; - unsigned long addr = 0; - gfp_t gfp_mask = GFP_KERNEL; - - pmd_alloc_with_mask(&init_mm, pud, addr, gfp_mask); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PMD_ALLOC_WITH_MASK, 1, - [pmd_alloc_with_mask exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 4cf3b26ad..2d5f751b0 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -843,9 +843,6 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) if (skc->skc_flags & KMC_KMEM) { ptr = (void *)__get_free_pages(flags, get_order(size)); } else { -#ifdef HAVE_PMD_ALLOC_WITH_MASK - ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); -#else /* * As part of vmalloc() an __pte_alloc_kernel() allocation * may occur. This internal allocation does not honor the @@ -869,7 +866,6 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) } else { ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); } -#endif } /* Resulting allocated memory will be page aligned */ diff --git a/spl_config.h.in b/spl_config.h.in index 4ee1b3353..29093c2e8 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -165,9 +165,6 @@ /* pgdat_list is available */ #undef HAVE_PGDAT_LIST -/* pmd_alloc_with_mask exists */ -#undef HAVE_PMD_ALLOC_WITH_MASK - /* __put_task_struct() is available */ #undef HAVE_PUT_TASK_STRUCT From 617f79de6aff55213bf233cf90d4425507acf56e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 18 Aug 2012 11:05:53 -0700 Subject: [PATCH 0630/1062] Revert "Fix NULL deref in balance_pgdat()" This reverts commit b8b6e4c453929596b630fa1cca1ee26a532a2ab4. The use of the PF_MEMALLOC flag was always a hack to work around memory reclaim deadlocks. Those issues are believed to be resolved so this workaround can be safely reverted. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 2d5f751b0..16eb4f884 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -855,17 +855,14 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) * been filed at kernel.org to track the issue. * * https://bugzilla.kernel.org/show_bug.cgi?id=30702 - * - * NOTE: Only set PF_MEMALLOC if it's not already set, and - * then only clear it when we were the one who set it. */ - if (!(flags & __GFP_FS) && !(current->flags & PF_MEMALLOC)) { + if (!(flags & __GFP_FS)) current->flags |= PF_MEMALLOC; - ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); + + ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); + + if (!(flags & __GFP_FS)) current->flags &= ~PF_MEMALLOC; - } else { - ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL); - } } /* Resulting allocated memory will be page aligned */ From 500e95c884f711883e094b48b58450ce2d80f2ea Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 18 Aug 2012 11:06:21 -0700 Subject: [PATCH 0631/1062] Revert "Disable vmalloc() direct reclaim" This reverts commit 2092cf68d89a51eb0d6193aeadabb579dfc4b4a0. The use of the PF_MEMALLOC flag was always a hack to work around memory reclaim deadlocks. Those issues are believed to be resolved so this workaround can be safely reverted. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 16eb4f884..e07e08c91 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -840,31 +840,11 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) ASSERT(ISP2(size)); - if (skc->skc_flags & KMC_KMEM) { + if (skc->skc_flags & KMC_KMEM) ptr = (void *)__get_free_pages(flags, get_order(size)); - } else { - /* - * As part of vmalloc() an __pte_alloc_kernel() allocation - * may occur. This internal allocation does not honor the - * gfp flags passed to vmalloc(). This means even when - * vmalloc(GFP_NOFS) is called it is possible synchronous - * reclaim will occur. This reclaim can trigger file IO - * which can result in a deadlock. This issue can be avoided - * by explicitly setting PF_MEMALLOC on the process to - * subvert synchronous reclaim. The following bug has - * been filed at kernel.org to track the issue. - * - * https://bugzilla.kernel.org/show_bug.cgi?id=30702 - */ - if (!(flags & __GFP_FS)) - current->flags |= PF_MEMALLOC; - + else ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); - if (!(flags & __GFP_FS)) - current->flags &= ~PF_MEMALLOC; - } - /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); From eb0f407a2b9089113ef6f2402ebd887511315b43 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 18 Aug 2012 12:42:28 -0700 Subject: [PATCH 0632/1062] Add PF_NOFS debugging flag PF_NOFS is a per-process debug flag which is set in current->flags to detect when a process is performing an unsafe allocation. All tasks with PF_NOFS set must strictly use KM_PUSHPAGE for allocations because if they enter direct reclaim and initiate I/O they may deadlock. When debugging is disabled, any incorrect usage will be detected and a call stack with a warning will be printed to the console. The flags will then be automatically corrected to allow for safe execution. If debugging is enabled this will be treated as a fatal condition. To avoid any risk of conflicting with the existing PF_ flags. The PF_NOFS bit shadows the rarely used PF_MUTEX_TESTER bit. Only when CONFIG_RT_MUTEX_TESTER is not set, and we know this bit is unused, will the PF_NOFS bit be valid. Happily, most existing distributions ship a kernel with CONFIG_RT_MUTEX_TESTER disabled. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index aaff6d046..116d6db0d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -55,6 +55,47 @@ # define __GFP_ZERO 0x8000 #endif +/* + * PF_NOFS is a per-process debug flag which is set in current->flags to + * detect when a process is performing an unsafe allocation. All tasks + * with PF_NOFS set must strictly use KM_PUSHPAGE for allocations because + * if they enter direct reclaim and initiate I/O the may deadlock. + * + * When debugging is disabled, any incorrect usage will be detected and + * a call stack with warning will be printed to the console. The flags + * will then be automatically corrected to allow for safe execution. If + * debugging is enabled this will be treated as a fatal condition. + * + * To avoid any risk of conflicting with the existing PF_ flags. The + * PF_NOFS bit shadows the rarely used PF_MUTEX_TESTER bit. Only when + * CONFIG_RT_MUTEX_TESTER is not set, and we know this bit is unused, + * will the PF_NOFS bit be valid. Happily, most existing distributions + * ship a kernel with CONFIG_RT_MUTEX_TESTER disabled. + */ +#if !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER) +# define PF_NOFS PF_MUTEX_TESTER + +static inline void +sanitize_flags(struct task_struct *p, gfp_t *flags) +{ + if (unlikely((p->flags & PF_NOFS) && (*flags & (__GFP_IO|__GFP_FS)))) { +# ifdef NDEBUG + SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "Fixing allocation for " + "task %s (%d) which used GFP flags 0x%x with PF_NOFS set\n", + p->comm, p->pid, flags); + spl_debug_dumpstack(p); + *flags &= ~(__GFP_IO|__GFP_FS); +# else + PANIC("FATAL allocation for task %s (%d) which used GFP " + "flags 0x%x with PF_NOFS set\n", p->comm, p->pid, flags); +# endif /* NDEBUG */ + } +} +#else +# define PF_NOFS 0x00000000 +# define sanitize_flags(p, fl) ((void)0) +#endif /* !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER) */ + /* * __GFP_NOFAIL looks like it will be removed from the kernel perhaps as * early as 2.6.32. To avoid this issue when it occurs in upstream kernels @@ -67,6 +108,8 @@ kmalloc_nofail(size_t size, gfp_t flags) { void *ptr; + sanitize_flags(current, &flags); + do { ptr = kmalloc(size, flags); } while (ptr == NULL && (flags & __GFP_WAIT)); @@ -79,6 +122,8 @@ kzalloc_nofail(size_t size, gfp_t flags) { void *ptr; + sanitize_flags(current, &flags); + do { ptr = kzalloc(size, flags); } while (ptr == NULL && (flags & __GFP_WAIT)); @@ -92,6 +137,8 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) #ifdef HAVE_KMALLOC_NODE void *ptr; + sanitize_flags(current, &flags); + do { ptr = kmalloc_node(size, flags, node); } while (ptr == NULL && (flags & __GFP_WAIT)); @@ -107,6 +154,8 @@ vmalloc_nofail(size_t size, gfp_t flags) { void *ptr; + sanitize_flags(current, &flags); + /* * Retry failed __vmalloc() allocations once every second. The * rational for the delay is that the likely failure modes are: From 3e904f40b4f24db61798ca8c8a9027731cf2ced6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 19 Aug 2012 12:10:19 -0700 Subject: [PATCH 0633/1062] Mutex ASSERT on self deadlock Generate an assertion if we're going to deadlock the system by attempting to acquire a mutex the process is already holding. There are currently no known instances of this under normal operation, but it _might_ be possible when using a ZVOL as a swap device. I want to ensure we catch this immediately if it were to occur. Signed-off-by: Brian Behlendorf --- include/sys/mutex.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 213bc2477..905eed50e 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -78,8 +78,12 @@ mutex_owner(kmutex_t *mp) }) #define mutex_tryenter(mp) mutex_trylock(&(mp)->m) -#define mutex_enter(mp) mutex_lock(&(mp)->m) -#define mutex_exit(mp) mutex_unlock(&(mp)->m) +#define mutex_enter(mp) \ +({ \ + ASSERT3P(mutex_owner(mp), !=, current); \ + mutex_lock(&(mp)->m); \ + }) +#define mutex_exit(mp) mutex_unlock(&(mp)->m) #ifdef HAVE_GPL_ONLY_SYMBOLS # define mutex_enter_nested(mp, sc) mutex_lock_nested(&(mp)->m, sc) @@ -171,6 +175,7 @@ spl_mutex_clear_owner(kmutex_t *mp) _rc_ = 0; \ _count_ = 0; \ _owner_ = mutex_owner(mp); \ + ASSERT3P(_owner_, !=, current); \ \ while (_owner_ && task_curr(_owner_) && \ _count_ <= spl_mutex_spin_max()) { \ From cd5ca4b2f86a606aa6ed68341a3672fdde1c9856 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 23 Aug 2012 15:36:28 -0700 Subject: [PATCH 0634/1062] Switch KM_SLEEP to KM_PUSHPAGE Under certain circumstances the following functions may be called in a context where KM_SLEEP is unsafe and can result in a deadlocked system. To avoid this problem the unconditional KM_SLEEPs are converted to KM_PUSHPAGEs. This will prevent them from attempting to initiate any I/O during direct reclaim. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 1 + module/spl/spl-taskq.c | 8 +++----- module/spl/spl-thread.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index a5d9492f2..a73f7703f 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -62,6 +62,7 @@ typedef struct taskq_ent { */ #define TQ_SLEEP KM_SLEEP #define TQ_NOSLEEP KM_NOSLEEP +#define TQ_PUSHPAGE KM_PUSHPAGE #define TQ_NOQUEUE 0x01000000 #define TQ_NOALLOC 0x02000000 #define TQ_NEW 0x04000000 diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index e4092b842..b58eb8e94 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -50,8 +50,6 @@ task_alloc(taskq_t *tq, uint_t flags) SENTRY; ASSERT(tq); - ASSERT(flags & (TQ_SLEEP | TQ_NOSLEEP)); /* One set */ - ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ ASSERT(spin_is_locked(&tq->tq_lock)); retry: /* Acquire taskq_ent_t's from free list if available */ @@ -554,7 +552,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, nthreads = MAX((num_online_cpus() * nthreads) / 100, 1); } - tq = kmem_alloc(sizeof(*tq), KM_SLEEP); + tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); if (tq == NULL) SRETURN(NULL); @@ -580,12 +578,12 @@ __taskq_create(const char *name, int nthreads, pri_t pri, if (flags & TASKQ_PREPOPULATE) for (i = 0; i < minalloc; i++) - task_done(tq, task_alloc(tq, TQ_SLEEP | TQ_NEW)); + task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); for (i = 0; i < nthreads; i++) { - tqt = kmem_alloc(sizeof(*tqt), KM_SLEEP); + tqt = kmem_alloc(sizeof(*tqt), KM_PUSHPAGE); INIT_LIST_HEAD(&tqt->tqt_thread_list); INIT_LIST_HEAD(&tqt->tqt_active_list); tqt->tqt_tq = tq; diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 9f6e22379..71e5f331d 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -98,14 +98,14 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, /* Variable stack size unsupported */ ASSERT(stk == NULL); - tp = kmem_alloc(sizeof(thread_priv_t), KM_SLEEP); + tp = kmem_alloc(sizeof(thread_priv_t), KM_PUSHPAGE); if (tp == NULL) SRETURN(NULL); tp->tp_magic = TP_MAGIC; tp->tp_name_size = strlen(name) + 1; - tp->tp_name = kmem_alloc(tp->tp_name_size, KM_SLEEP); + tp->tp_name = kmem_alloc(tp->tp_name_size, KM_PUSHPAGE); if (tp->tp_name == NULL) { kmem_free(tp, sizeof(thread_priv_t)); SRETURN(NULL); From efcd0ca32d099b0dcb556617c82403c150e6018b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 26 Aug 2012 13:34:06 -0700 Subject: [PATCH 0635/1062] Enhance SPLAT kmem:slab_overcommit test After the emergency slab objects were merged I started observing timeout failures in the kmem:slab_overcommit test. These were due to the ineffecient way the slab_overcommit reclaim function was implemented. And due to the additional cost of potentially allocating ten of thousands of emergency objects and tracking them on a single list. This patch addresses the first concern by enhansing the test case to trace all of the allocations objects as a linked list. This allows for a cleaner version of the reclaim function to simply release SPLAT_KMEM_OBJ_RECLAIM objects. Since this touches some common code all the tests which share these data structions were also updated. After making these changes slab_overcommit is reliably passing. However, there is certainly additional cleanup which could be done here. Signed-off-by: Brian Behlendorf --- module/splat/splat-kmem.c | 405 ++++++++++++++++++++------------------ 1 file changed, 210 insertions(+), 195 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 284c7c30e..d0ad9a666 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -242,23 +242,22 @@ splat_kmem_test4(struct file *file, void *arg) #define SPLAT_KMEM_TEST_MAGIC 0x004488CCUL #define SPLAT_KMEM_CACHE_NAME "kmem_test" #define SPLAT_KMEM_OBJ_COUNT 1024 -#define SPLAT_KMEM_OBJ_RECLAIM 20 /* percent */ +#define SPLAT_KMEM_OBJ_RECLAIM 1000 /* objects */ #define SPLAT_KMEM_THREADS 32 #define KCP_FLAG_READY 0x01 typedef struct kmem_cache_data { unsigned long kcd_magic; + struct list_head kcd_node; int kcd_flag; char kcd_buf[0]; } kmem_cache_data_t; typedef struct kmem_cache_thread { - kmem_cache_t *kct_cache; spinlock_t kct_lock; int kct_id; - int kct_kcd_count; - kmem_cache_data_t *kct_kcd[0]; + struct list_head kct_list; } kmem_cache_thread_t; typedef struct kmem_cache_priv { @@ -276,18 +275,15 @@ typedef struct kmem_cache_priv { int kcp_count; int kcp_alloc; int kcp_rc; - int kcp_kcd_count; - kmem_cache_data_t *kcp_kcd[0]; } kmem_cache_priv_t; static kmem_cache_priv_t * splat_kmem_cache_test_kcp_alloc(struct file *file, char *name, - int size, int align, int alloc, int count) + int size, int align, int alloc) { kmem_cache_priv_t *kcp; - kcp = vmem_zalloc(sizeof(kmem_cache_priv_t) + - count * sizeof(kmem_cache_data_t *), KM_SLEEP); + kcp = kmem_zalloc(sizeof(kmem_cache_priv_t), KM_SLEEP); if (!kcp) return NULL; @@ -304,7 +300,6 @@ splat_kmem_cache_test_kcp_alloc(struct file *file, char *name, kcp->kcp_count = 0; kcp->kcp_alloc = alloc; kcp->kcp_rc = 0; - kcp->kcp_kcd_count = count; return kcp; } @@ -312,34 +307,83 @@ splat_kmem_cache_test_kcp_alloc(struct file *file, char *name, static void splat_kmem_cache_test_kcp_free(kmem_cache_priv_t *kcp) { - vmem_free(kcp, sizeof(kmem_cache_priv_t) + - kcp->kcp_kcd_count * sizeof(kmem_cache_data_t *)); + kmem_free(kcp, sizeof(kmem_cache_priv_t)); } static kmem_cache_thread_t * -splat_kmem_cache_test_kct_alloc(int id, int count) +splat_kmem_cache_test_kct_alloc(kmem_cache_priv_t *kcp, int id) { kmem_cache_thread_t *kct; ASSERTF(id < SPLAT_KMEM_THREADS, "id=%d\n", id); - kct = vmem_zalloc(sizeof(kmem_cache_thread_t) + - count * sizeof(kmem_cache_data_t *), KM_SLEEP); + ASSERT(kcp->kcp_kct[id] == NULL); + + kct = kmem_zalloc(sizeof(kmem_cache_thread_t), KM_SLEEP); if (!kct) return NULL; spin_lock_init(&kct->kct_lock); - kct->kct_cache = NULL; kct->kct_id = id; - kct->kct_kcd_count = count; + INIT_LIST_HEAD(&kct->kct_list); + + spin_lock(&kcp->kcp_lock); + kcp->kcp_kct[id] = kct; + spin_unlock(&kcp->kcp_lock); return kct; } static void -splat_kmem_cache_test_kct_free(kmem_cache_thread_t *kct) +splat_kmem_cache_test_kct_free(kmem_cache_priv_t *kcp, + kmem_cache_thread_t *kct) { - vmem_free(kct, sizeof(kmem_cache_thread_t) + - kct->kct_kcd_count * sizeof(kmem_cache_data_t *)); + spin_lock(&kcp->kcp_lock); + kcp->kcp_kct[kct->kct_id] = NULL; + spin_unlock(&kcp->kcp_lock); + + kmem_free(kct, sizeof(kmem_cache_thread_t)); +} + +static void +splat_kmem_cache_test_kcd_free(kmem_cache_priv_t *kcp, + kmem_cache_thread_t *kct) +{ + kmem_cache_data_t *kcd; + + spin_lock(&kct->kct_lock); + while (!list_empty(&kct->kct_list)) { + kcd = list_entry(kct->kct_list.next, + kmem_cache_data_t, kcd_node); + list_del(&kcd->kcd_node); + spin_unlock(&kct->kct_lock); + + kmem_cache_free(kcp->kcp_cache, kcd); + + spin_lock(&kct->kct_lock); + } + spin_unlock(&kct->kct_lock); +} + +static int +splat_kmem_cache_test_kcd_alloc(kmem_cache_priv_t *kcp, + kmem_cache_thread_t *kct, int count) +{ + kmem_cache_data_t *kcd; + int i; + + for (i = 0; i < count; i++) { + kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); + if (kcd == NULL) { + splat_kmem_cache_test_kcd_free(kcp, kct); + return -ENOMEM; + } + + spin_lock(&kct->kct_lock); + list_add_tail(&kcd->kcd_node, &kct->kct_list); + spin_unlock(&kct->kct_lock); + } + + return 0; } static void @@ -372,6 +416,7 @@ splat_kmem_cache_test_constructor(void *ptr, void *priv, int flags) if (kcd && kcp) { kcd->kcd_magic = kcp->kcp_magic; + INIT_LIST_HEAD(&kcd->kcd_node); kcd->kcd_flag = 1; memset(kcd->kcd_buf, 0xaa, kcp->kcp_size - (sizeof *kcd)); kcp->kcp_count++; @@ -406,51 +451,41 @@ splat_kmem_cache_test_reclaim(void *priv) { kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; kmem_cache_thread_t *kct; - int i, j, count; + kmem_cache_data_t *kcd; + LIST_HEAD(reclaim); + int i, count; ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); - count = kcp->kcp_kcd_count * SPLAT_KMEM_OBJ_RECLAIM / 100; - /* Objects directly attached to the kcp */ + /* For each kct thread reclaim some objects */ spin_lock(&kcp->kcp_lock); - for (i = 0; i < kcp->kcp_kcd_count; i++) { - if (kcp->kcp_kcd[i]) { - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); - kcp->kcp_kcd[i] = NULL; + for (i = 0; i < SPLAT_KMEM_THREADS; i++) { + kct = kcp->kcp_kct[i]; + if (!kct) + continue; - if ((--count) == 0) - break; + spin_unlock(&kcp->kcp_lock); + spin_lock(&kct->kct_lock); + + count = SPLAT_KMEM_OBJ_RECLAIM; + while (count > 0 && !list_empty(&kct->kct_list)) { + kcd = list_entry(kct->kct_list.next, + kmem_cache_data_t, kcd_node); + list_del(&kcd->kcd_node); + list_add(&kcd->kcd_node, &reclaim); + count--; } + + spin_unlock(&kct->kct_lock); + spin_lock(&kcp->kcp_lock); } spin_unlock(&kcp->kcp_lock); - /* No threads containing objects to consider */ - if (kcp->kcp_kct_count == -1) - return; - - /* Objects attached to a kct thread */ - for (i = 0; i < kcp->kcp_kct_count; i++) { - spin_lock(&kcp->kcp_lock); - kct = kcp->kcp_kct[i]; - if (!kct) { - spin_unlock(&kcp->kcp_lock); - continue; - } - - spin_lock(&kct->kct_lock); - count = kct->kct_kcd_count * SPLAT_KMEM_OBJ_RECLAIM / 100; - - for (j = 0; j < kct->kct_kcd_count; j++) { - if (kct->kct_kcd[j]) { - kmem_cache_free(kcp->kcp_cache,kct->kct_kcd[j]); - kct->kct_kcd[j] = NULL; - - if ((--count) == 0) - break; - } - } - spin_unlock(&kct->kct_lock); - spin_unlock(&kcp->kcp_lock); + /* Freed outside the spin lock */ + while (!list_empty(&reclaim)) { + kcd = list_entry(reclaim.next, kmem_cache_data_t, kcd_node); + list_del(&kcd->kcd_node); + kmem_cache_free(kcp->kcp_cache, kcd); } return; @@ -485,8 +520,7 @@ splat_kmem_cache_test_thread(void *arg) { kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)arg; kmem_cache_thread_t *kct; - int rc = 0, id, i; - void *obj; + int rc = 0, id; ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); @@ -499,16 +533,12 @@ splat_kmem_cache_test_thread(void *arg) kcp->kcp_kct_count++; spin_unlock(&kcp->kcp_lock); - kct = splat_kmem_cache_test_kct_alloc(id, kcp->kcp_alloc); + kct = splat_kmem_cache_test_kct_alloc(kcp, id); if (!kct) { rc = -ENOMEM; goto out; } - spin_lock(&kcp->kcp_lock); - kcp->kcp_kct[id] = kct; - spin_unlock(&kcp->kcp_lock); - /* Wait for all threads to have started and report they are ready */ if (kcp->kcp_kct_count == SPLAT_KMEM_THREADS) wake_up(&kcp->kcp_ctl_waitq); @@ -516,34 +546,14 @@ splat_kmem_cache_test_thread(void *arg) wait_event(kcp->kcp_thr_waitq, splat_kmem_cache_test_flags(kcp, KCP_FLAG_READY)); - /* - * Updates to kct->kct_kcd[] are performed under a spin_lock so - * they may safely run concurrent with the reclaim function. If - * we are not in a low memory situation we have one lock per- - * thread so they are not expected to be contended. - */ - for (i = 0; i < kct->kct_kcd_count; i++) { - obj = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - spin_lock(&kct->kct_lock); - kct->kct_kcd[i] = obj; - spin_unlock(&kct->kct_lock); - } - - for (i = 0; i < kct->kct_kcd_count; i++) { - spin_lock(&kct->kct_lock); - if (kct->kct_kcd[i]) { - kmem_cache_free(kcp->kcp_cache, kct->kct_kcd[i]); - kct->kct_kcd[i] = NULL; - } - spin_unlock(&kct->kct_lock); - } + /* Create and destroy objects */ + rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, kcp->kcp_alloc); + splat_kmem_cache_test_kcd_free(kcp, kct); out: - spin_lock(&kcp->kcp_lock); - if (kct) { - splat_kmem_cache_test_kct_free(kct); - kcp->kcp_kct[id] = kct = NULL; - } + if (kct) + splat_kmem_cache_test_kct_free(kcp, kct); + spin_lock(&kcp->kcp_lock); if (!kcp->kcp_rc) kcp->kcp_rc = rc; @@ -560,16 +570,15 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, int size, int align, int flags) { kmem_cache_priv_t *kcp; - kmem_cache_data_t *kcd; + kmem_cache_data_t *kcd = NULL; int rc = 0, max; - kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, align, 0, 1); + kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, align, 0); if (!kcp) { splat_vprint(file, name, "Unable to create '%s'\n", "kcp"); return -ENOMEM; } - kcp->kcp_kcd[0] = NULL; kcp->kcp_cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, kcp->kcp_align, @@ -592,11 +601,8 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, rc = -EINVAL; goto out_free; } - spin_lock(&kcp->kcp_lock); - kcp->kcp_kcd[0] = kcd; - spin_unlock(&kcp->kcp_lock); - if (!kcp->kcp_kcd[0]->kcd_flag) { + if (!kcd->kcd_flag) { splat_vprint(file, name, "Failed to run contructor for '%s'\n", SPLAT_KMEM_CACHE_NAME); @@ -604,7 +610,7 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, goto out_free; } - if (kcp->kcp_kcd[0]->kcd_magic != kcp->kcp_magic) { + if (kcd->kcd_magic != kcp->kcp_magic) { splat_vprint(file, name, "Failed to pass private data to constructor " "for '%s'\n", SPLAT_KMEM_CACHE_NAME); @@ -613,10 +619,7 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, } max = kcp->kcp_count; - spin_lock(&kcp->kcp_lock); - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[0]); - kcp->kcp_kcd[0] = NULL; - spin_unlock(&kcp->kcp_lock); + kmem_cache_free(kcp->kcp_cache, kcd); /* Destroy the entire cache which will force destructors to * run and we can verify one was called for every object */ @@ -636,12 +639,8 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, return rc; out_free: - if (kcp->kcp_kcd[0]) { - spin_lock(&kcp->kcp_lock); - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[0]); - kcp->kcp_kcd[0] = NULL; - spin_unlock(&kcp->kcp_lock); - } + if (kcd) + kmem_cache_free(kcp->kcp_cache, kcd); if (kcp->kcp_cache) kmem_cache_destroy(kcp->kcp_cache); @@ -661,7 +660,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, char cache_name[32]; int i, rc = 0; - kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, 0, alloc, 0); + kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, 0, alloc); if (!kcp) { splat_vprint(file, name, "Unable to create '%s'\n", "kcp"); return -ENOMEM; @@ -755,7 +754,9 @@ splat_kmem_test5(struct file *file, void *arg) return splat_kmem_cache_test(file, arg, name, 128, 0, KMC_VMEM); } -/* Validate large object cache behavior for dynamic/kmem/vmem caches */ +/* + * Validate large object cache behavior for dynamic/kmem/vmem caches + */ static int splat_kmem_test6(struct file *file, void *arg) { @@ -773,7 +774,9 @@ splat_kmem_test6(struct file *file, void *arg) return splat_kmem_cache_test(file, arg, name, 1024*1024, 0, KMC_VMEM); } -/* Validate object alignment cache behavior for caches */ +/* + * Validate object alignment cache behavior for caches + */ static int splat_kmem_test7(struct file *file, void *arg) { @@ -789,19 +792,31 @@ splat_kmem_test7(struct file *file, void *arg) return rc; } +/* + * Validate kmem_cache_reap() by requesting the slab cache free any objects + * it can. For a few reasons this may not immediately result in more free + * memory even if objects are freed. First off, due to fragmentation we + * may not be able to reclaim any slabs. Secondly, even if we do we fully + * clear some slabs we will not want to immediately reclaim all of them + * because we may contend with cache allocations and thrash. What we want + * to see is the slab size decrease more gradually as it becomes clear they + * will not be needed. This should be achievable in less than a minute. + * If it takes longer than this something has gone wrong. + */ static int splat_kmem_test8(struct file *file, void *arg) { kmem_cache_priv_t *kcp; - kmem_cache_data_t *kcd; + kmem_cache_thread_t *kct; int i, rc = 0; kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST8_NAME, - 256, 0, 0, SPLAT_KMEM_OBJ_COUNT); + 256, 0, 0); if (!kcp) { splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Unable to create '%s'\n", "kcp"); - return -ENOMEM; + rc = -ENOMEM; + goto out; } kcp->kcp_cache = @@ -811,34 +826,27 @@ splat_kmem_test8(struct file *file, void *arg) splat_kmem_cache_test_reclaim, kcp, NULL, 0); if (!kcp->kcp_cache) { - splat_kmem_cache_test_kcp_free(kcp); splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - return -ENOMEM; + rc = -ENOMEM; + goto out_kcp; } - for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) { - kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - spin_lock(&kcp->kcp_lock); - kcp->kcp_kcd[i] = kcd; - spin_unlock(&kcp->kcp_lock); - if (!kcd) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); - } + kct = splat_kmem_cache_test_kct_alloc(kcp, 0); + if (!kct) { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Unable to create '%s'\n", "kct"); + rc = -ENOMEM; + goto out_cache; + } + + rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, SPLAT_KMEM_OBJ_COUNT); + if (rc) { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Unable to " + "allocate from '%s'\n", SPLAT_KMEM_CACHE_NAME); + goto out_kct; } - /* Request the slab cache free any objects it can. For a few reasons - * this may not immediately result in more free memory even if objects - * are freed. First off, due to fragmentation we may not be able to - * reclaim any slabs. Secondly, even if we do we fully clear some - * slabs we will not want to immedately reclaim all of them because - * we may contend with cache allocs and thrash. What we want to see - * is the slab size decrease more gradually as it becomes clear they - * will not be needed. This should be acheivable in less than minute - * if it takes longer than this something has gone wrong. - */ for (i = 0; i < 60; i++) { kmem_cache_reap_now(kcp->kcp_cache); splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST8_NAME, kcp); @@ -864,31 +872,39 @@ splat_kmem_test8(struct file *file, void *arg) } /* Cleanup our mess (for failure case of time expiring) */ - spin_lock(&kcp->kcp_lock); - for (i = 0; i < SPLAT_KMEM_OBJ_COUNT; i++) - if (kcp->kcp_kcd[i]) - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); - spin_unlock(&kcp->kcp_lock); - + splat_kmem_cache_test_kcd_free(kcp, kct); +out_kct: + splat_kmem_cache_test_kct_free(kcp, kct); +out_cache: kmem_cache_destroy(kcp->kcp_cache); +out_kcp: splat_kmem_cache_test_kcp_free(kcp); - +out: return rc; } +/* Test cache aging, we have allocated a large number of objects thus + * creating a large number of slabs and then free'd them all. However, + * since there should be little memory pressure at the moment those + * slabs have not been freed. What we want to see is the slab size + * decrease gradually as it becomes clear they will not be be needed. + * This should be achievable in less than minute. If it takes longer + * than this something has gone wrong. + */ static int splat_kmem_test9(struct file *file, void *arg) { kmem_cache_priv_t *kcp; - kmem_cache_data_t *kcd; + kmem_cache_thread_t *kct; int i, rc = 0, count = SPLAT_KMEM_OBJ_COUNT * 128; kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST9_NAME, - 256, 0, 0, count); + 256, 0, 0); if (!kcp) { splat_vprint(file, SPLAT_KMEM_TEST9_NAME, "Unable to create '%s'\n", "kcp"); - return -ENOMEM; + rc = -ENOMEM; + goto out; } kcp->kcp_cache = @@ -897,38 +913,29 @@ splat_kmem_test9(struct file *file, void *arg) splat_kmem_cache_test_destructor, NULL, kcp, NULL, 0); if (!kcp->kcp_cache) { - splat_kmem_cache_test_kcp_free(kcp); splat_vprint(file, SPLAT_KMEM_TEST9_NAME, "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - return -ENOMEM; + rc = -ENOMEM; + goto out_kcp; } - for (i = 0; i < count; i++) { - kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - spin_lock(&kcp->kcp_lock); - kcp->kcp_kcd[i] = kcd; - spin_unlock(&kcp->kcp_lock); - if (!kcd) { - splat_vprint(file, SPLAT_KMEM_TEST9_NAME, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); - } + kct = splat_kmem_cache_test_kct_alloc(kcp, 0); + if (!kct) { + splat_vprint(file, SPLAT_KMEM_TEST8_NAME, + "Unable to create '%s'\n", "kct"); + rc = -ENOMEM; + goto out_cache; } - spin_lock(&kcp->kcp_lock); - for (i = 0; i < count; i++) - if (kcp->kcp_kcd[i]) - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); - spin_unlock(&kcp->kcp_lock); + rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, count); + if (rc) { + splat_vprint(file, SPLAT_KMEM_TEST9_NAME, "Unable to " + "allocate from '%s'\n", SPLAT_KMEM_CACHE_NAME); + goto out_kct; + } + + splat_kmem_cache_test_kcd_free(kcp, kct); - /* We have allocated a large number of objects thus creating a - * large number of slabs and then free'd them all. However since - * there should be little memory pressure at the moment those - * slabs have not been freed. What we want to see is the slab - * size decrease gradually as it becomes clear they will not be - * be needed. This should be acheivable in less than minute - * if it takes longer than this something has gone wrong. - */ for (i = 0; i < 60; i++) { splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST9_NAME, kcp); @@ -952,9 +959,13 @@ splat_kmem_test9(struct file *file, void *arg) rc = -ENOMEM; } +out_kct: + splat_kmem_cache_test_kct_free(kcp, kct); +out_cache: kmem_cache_destroy(kcp->kcp_cache); +out_kcp: splat_kmem_cache_test_kcp_free(kcp); - +out: return rc; } @@ -971,7 +982,7 @@ splat_kmem_test10(struct file *file, void *arg) { uint64_t size, alloc, rc = 0; - for (size = 16; size <= 1024*1024; size *= 2) { + for (size = 32; size <= 1024*1024; size *= 2) { splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "name", "time (sec)\tslabs \tobjs \thash\n"); @@ -1013,7 +1024,7 @@ splat_kmem_test11(struct file *file, void *arg) { uint64_t size, alloc, rc; - size = 256*1024; + size = 8 * 1024; alloc = ((4 * physmem * PAGE_SIZE) / size) / SPLAT_KMEM_THREADS; splat_vprint(file, SPLAT_KMEM_TEST11_NAME, "%-22s %s", "name", @@ -1132,7 +1143,7 @@ static int splat_kmem_test13(struct file *file, void *arg) { kmem_cache_priv_t *kcp; - kmem_cache_data_t *kcd; + kmem_cache_thread_t *kct; dummy_page_t *dp; struct list_head list; struct timespec start, delta = { 0, 0 }; @@ -1143,11 +1154,12 @@ splat_kmem_test13(struct file *file, void *arg) count = ((physmem * PAGE_SIZE) / 4 / size); kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST13_NAME, - size, 0, 0, count); + size, 0, 0); if (!kcp) { splat_vprint(file, SPLAT_KMEM_TEST13_NAME, "Unable to create '%s'\n", "kcp"); - return -ENOMEM; + rc = -ENOMEM; + goto out; } kcp->kcp_cache = @@ -1157,22 +1169,25 @@ splat_kmem_test13(struct file *file, void *arg) splat_kmem_cache_test_reclaim, kcp, NULL, 0); if (!kcp->kcp_cache) { - splat_kmem_cache_test_kcp_free(kcp); splat_vprint(file, SPLAT_KMEM_TEST13_NAME, "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - return -ENOMEM; + rc = -ENOMEM; + goto out_kcp; } - for (i = 0; i < count; i++) { - kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - spin_lock(&kcp->kcp_lock); - kcp->kcp_kcd[i] = kcd; - spin_unlock(&kcp->kcp_lock); - if (!kcd) { - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); - } + kct = splat_kmem_cache_test_kct_alloc(kcp, 0); + if (!kct) { + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, + "Unable to create '%s'\n", "kct"); + rc = -ENOMEM; + goto out_cache; + } + + rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, count); + if (rc) { + splat_vprint(file, SPLAT_KMEM_TEST13_NAME, "Unable to " + "allocate from '%s'\n", SPLAT_KMEM_CACHE_NAME); + goto out_kct; } i = 0; @@ -1180,6 +1195,7 @@ splat_kmem_test13(struct file *file, void *arg) INIT_LIST_HEAD(&list); start = current_kernel_time(); + /* Apply memory pressure */ while (kcp->kcp_cache->skc_slab_total > (slabs >> 2)) { if ((i % 10000) == 0) @@ -1226,15 +1242,14 @@ splat_kmem_test13(struct file *file, void *arg) } /* Release remaining kmem cache objects */ - spin_lock(&kcp->kcp_lock); - for (i = 0; i < count; i++) - if (kcp->kcp_kcd[i]) - kmem_cache_free(kcp->kcp_cache, kcp->kcp_kcd[i]); - spin_unlock(&kcp->kcp_lock); - + splat_kmem_cache_test_kcd_free(kcp, kct); +out_kct: + splat_kmem_cache_test_kct_free(kcp, kct); +out_cache: kmem_cache_destroy(kcp->kcp_cache); +out_kcp: splat_kmem_cache_test_kcp_free(kcp); - +out: return rc; } From 46b3945d5da42fe8bf3c9ff8e28dbb8cb88095b9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 30 Aug 2012 20:56:22 -0700 Subject: [PATCH 0636/1062] Suppress task_hash_table_init() large allocation warning When various kernel debuging options are enabled this allocation may be larger than usual as shown by the following warning. It is in no way harmful so we suppress the warning. SPL: large kmem_alloc(40960, 0x80d0) at tsd_hash_table_init:358 (76495/76495) Signed-off-by: Brian Behlendorf Closes #93 --- module/spl/spl-tsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index ce5560a1e..b43da7746 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -355,7 +355,8 @@ tsd_hash_table_init(uint_t bits) if (table == NULL) SRETURN(NULL); - table->ht_bins = kmem_zalloc(sizeof(tsd_hash_bin_t) * size, KM_SLEEP); + table->ht_bins = kmem_zalloc(sizeof(tsd_hash_bin_t) * size, + KM_SLEEP | KM_NODEBUG); if (table->ht_bins == NULL) { kmem_free(table, sizeof(tsd_hash_table_t)); SRETURN(NULL); From ac8ca67a88bdb8be08456785116a8824fba735df Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Sat, 1 Sep 2012 15:02:25 +0200 Subject: [PATCH 0637/1062] Add DKIOCTRIM for TRIM support. See dechamps/zfs@cc6cd40ad71e1e611591929ad08184516357eaf5 for details. This harmless addition was merged to simplify testing the ZFS TRIM support patches. Signed-off-by: Brian Behlendorf Closes #167 --- include/sys/dkio.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/dkio.h b/include/sys/dkio.h index 0659e9082..591fbf51d 100644 --- a/include/sys/dkio.h +++ b/include/sys/dkio.h @@ -33,5 +33,6 @@ struct dk_callback { #define DKIOC (0x04 << 8) #define DKIOCFLUSHWRITECACHE (DKIOC | 34) +#define DKIOCTRIM (DKIOC | 35) #endif /* _SPL_DKIO_H */ From cb5c2acebb86da5b50f099b39209d22845eda8c7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 7 Sep 2012 14:24:17 -0700 Subject: [PATCH 0638/1062] Add KMC_NOEMERGENCY slab flag Provide a flag to disable the use of emergency objects for a specific kmem cache. There may be instances where under no circumstances should you kmalloc() an emergency object. For example, when you cache contains very large objects (>128k). Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 2 ++ module/spl/spl-kmem.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 116d6db0d..0149e754c 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -340,6 +340,7 @@ enum { KMC_BIT_KMEM = 5, /* Use kmem cache */ KMC_BIT_VMEM = 6, /* Use vmem cache */ KMC_BIT_OFFSLAB = 7, /* Objects not on slab */ + KMC_BIT_NOEMERGENCY = 8, /* Disable emergency objects */ KMC_BIT_GROWING = 15, /* Growing in progress */ KMC_BIT_REAPING = 16, /* Reaping in progress */ KMC_BIT_DESTROY = 17, /* Destroy in progress */ @@ -365,6 +366,7 @@ typedef enum kmem_cbrc { #define KMC_KMEM (1 << KMC_BIT_KMEM) #define KMC_VMEM (1 << KMC_BIT_VMEM) #define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) +#define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY) #define KMC_GROWING (1 << KMC_BIT_GROWING) #define KMC_REAPING (1 << KMC_BIT_REAPING) #define KMC_DESTROY (1 << KMC_BIT_DESTROY) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e07e08c91..eca809c47 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1727,8 +1727,13 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) */ remaining = wait_event_timeout(skc->skc_waitq, spl_cache_grow_wait(skc), 1); - if (remaining == 0) - rc = spl_emergency_alloc(skc, flags, obj); + + if (remaining == 0) { + if (test_bit(KMC_BIT_NOEMERGENCY, &skc->skc_flags)) + rc = -ENOMEM; + else + rc = spl_emergency_alloc(skc, flags, obj); + } SRETURN(rc); } From 95331f4437d57f0d0a719d38355159b90a52f40d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 7 Sep 2012 14:28:07 -0700 Subject: [PATCH 0639/1062] Set KMC_NOEMERGENCY for zlib workspaces The workspace required by zlib to perform compression is roughly 512MB (order-7). These allocations are so large that we should never attempt to directly kmalloc an emergency object for them. It is far preferable to asynchronously vmalloc an additional slab in case it's needed. Then simply block waiting for an existing object to be released or for the new slab to be allocated. This can be accomplished by disabling emergency slab objects by passing the KMC_NOEMERGENCY flag at slab creation time. Signed-off-by: Brian Behlendorf zfsonlinux/zfs#917 --- module/spl/spl-zlib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 7bed00ca4..4f88cb4e0 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -205,8 +205,10 @@ spl_zlib_init(void) size = MAX(spl_zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL), zlib_inflate_workspacesize()); - zlib_workspace_cache = kmem_cache_create("spl_zlib_workspace_cache", - size, 0, NULL, NULL, NULL, NULL, NULL, KMC_VMEM); + zlib_workspace_cache = kmem_cache_create( + "spl_zlib_workspace_cache", + size, 0, NULL, NULL, NULL, NULL, NULL, + KMC_VMEM | KMC_NOEMERGENCY); if (!zlib_workspace_cache) SRETURN(1); From 3c60f5054cf567ddc4a87e72d16d0a425721e422 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 7 Sep 2012 11:05:46 -0700 Subject: [PATCH 0640/1062] Debug cv_destroy() with mutex held There still appears to be a race in the condition variables where ->cv_mutex is set after we are woken from the cv_destroy wait queue. This might be possible when cv_destroy() is called immediately after cv_broadcast(). We had some troubles with this previously but there may still be a small race, see commit d599e4f. The following patch closes one small race and improves the ASSERTs such that they log the offending value. Signed-off-by: Brian Behlendorf zfsonlinux/zfs#943 --- module/spl/spl-condvar.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 52131c1e8..e9f727d72 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -63,7 +63,8 @@ EXPORT_SYMBOL(__cv_init); static int cv_destroy_wakeup(kcondvar_t *cvp) { - if ((waitqueue_active(&cvp->cv_event)) || + if ((cvp->cv_mutex != NULL) || + (waitqueue_active(&cvp->cv_event)) || (atomic_read(&cvp->cv_waiters) > 0)) return 0; @@ -81,9 +82,9 @@ __cv_destroy(kcondvar_t *cvp) while (cv_destroy_wakeup(cvp) == 0) wait_event_timeout(cvp->cv_destroy, cv_destroy_wakeup(cvp), 1); - ASSERT(cvp->cv_mutex == NULL); - ASSERT(atomic_read(&cvp->cv_waiters) == 0); - ASSERT(!waitqueue_active(&cvp->cv_event)); + ASSERT3P(cvp->cv_mutex, ==, NULL); + ASSERT3S(atomic_read(&cvp->cv_waiters), ==, 0); + ASSERT3S(waitqueue_active(&cvp->cv_event), ==, 0); SEXIT; } From dd87332f478b2a55c007aae568dd242fb2a34602 Mon Sep 17 00:00:00 2001 From: Chris Dunlop Date: Tue, 11 Sep 2012 16:48:01 +1000 Subject: [PATCH 0641/1062] Remove autotools products spl_config.h.in is a generated file: remove and .gitignore it Signed-off-by: Chris Dunlop Signed-off-by: Brian Behlendorf --- .gitignore | 1 + spl_config.h.in | 314 ------------------------------------------------ 2 files changed, 1 insertion(+), 314 deletions(-) delete mode 100644 spl_config.h.in diff --git a/.gitignore b/.gitignore index 868c81917..94308186f 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ Makefile.in /config.status /libtool /spl_config.h +/spl_config.h.in /spl.spec /spl-modules.spec /spl.release diff --git a/spl_config.h.in b/spl_config.h.in deleted file mode 100644 index 29093c2e8..000000000 --- a/spl_config.h.in +++ /dev/null @@ -1,314 +0,0 @@ -/* spl_config.h.in. Generated from configure.ac by autoheader. */ - -/* Atomic types use spinlocks */ -#undef ATOMIC_SPINLOCK - -/* Define to 1 to enable basic kmem accounting */ -#undef DEBUG_KMEM - -/* Define to 1 to enable detailed kmem tracking */ -#undef DEBUG_KMEM_TRACKING - -/* Define to 1 to enable basic debug logging */ -#undef DEBUG_LOG - -/* invalidate_inodes() wants 2 args */ -#undef HAVE_2ARGS_INVALIDATE_INODES - -/* register_sysctl_table() wants 2 args */ -#undef HAVE_2ARGS_REGISTER_SYSCTL - -/* set_fs_pwd() wants 2 args */ -#undef HAVE_2ARGS_SET_FS_PWD - -/* vfs_fsync() wants 2 args */ -#undef HAVE_2ARGS_VFS_FSYNC - -/* vfs_unlink() wants 2 args */ -#undef HAVE_2ARGS_VFS_UNLINK - -/* zlib_deflate_workspacesize() wants 2 args */ -#undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE - -/* INIT_WORK wants 3 args */ -#undef HAVE_3ARGS_INIT_WORK - -/* on_each_cpu wants 3 args */ -#undef HAVE_3ARGS_ON_EACH_CPU - -/* shrinker callback wants 3 args */ -#undef HAVE_3ARGS_SHRINKER_CALLBACK - -/* vfs_rename() wants 4 args */ -#undef HAVE_4ARGS_VFS_RENAME - -/* device_create wants 5 args */ -#undef HAVE_5ARGS_DEVICE_CREATE - -/* proc_handler() wants 5 args */ -#undef HAVE_5ARGS_PROC_HANDLER - -/* kernel defines atomic64_cmpxchg */ -#undef HAVE_ATOMIC64_CMPXCHG - -/* kernel defines atomic64_t */ -#undef HAVE_ATOMIC64_T - -/* kernel defines atomic64_xchg */ -#undef HAVE_ATOMIC64_XCHG - -/* class_device_create() is available */ -#undef HAVE_CLASS_DEVICE_CREATE - -/* __clear_close_on_exec() is available */ -#undef HAVE_CLEAR_CLOSE_ON_EXEC - -/* struct cred exists */ -#undef HAVE_CRED_STRUCT - -/* struct ctl_table has ctl_name */ -#undef HAVE_CTL_NAME - -/* unnumbered sysctl support exists */ -#undef HAVE_CTL_UNNUMBERED - -/* device_create() is available */ -#undef HAVE_DEVICE_CREATE - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* linux/fdtable.h exists */ -#undef HAVE_FDTABLE_HEADER - -/* files_fdtable() is available */ -#undef HAVE_FILES_FDTABLE - -/* first_online_pgdat() is available */ -#undef HAVE_FIRST_ONLINE_PGDAT - -/* fls64() is available */ -#undef HAVE_FLS64 - -/* struct fs_struct uses spinlock_t */ -#undef HAVE_FS_STRUCT_SPINLOCK - -/* get_vmalloc_info() is available */ -#undef HAVE_GET_VMALLOC_INFO - -/* get_zone_counts() is available */ -#undef HAVE_GET_ZONE_COUNTS - -/* global_page_state() is available */ -#undef HAVE_GLOBAL_PAGE_STATE - -/* groups_search() is available */ -#undef HAVE_GROUPS_SEARCH - -/* init_utsname() is available */ -#undef HAVE_INIT_UTSNAME - -/* struct inode has i_mutex */ -#undef HAVE_INODE_I_MUTEX - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* invalidate_inodes() is available */ -#undef HAVE_INVALIDATE_INODES - -/* invalidate_inodes_check() is available */ -#undef HAVE_INVALIDATE_INODES_CHECK - -/* kallsyms_lookup_name() is available */ -#undef HAVE_KALLSYMS_LOOKUP_NAME - -/* kern_path_parent() is available */ -#undef HAVE_KERN_PATH_PARENT_HEADER - -/* kern_path_parent() is available */ -#undef HAVE_KERN_PATH_PARENT_SYMBOL - -/* kmalloc_node() is available */ -#undef HAVE_KMALLOC_NODE - -/* kvasprintf() is available */ -#undef HAVE_KVASPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* monotonic_clock() is available */ -#undef HAVE_MONOTONIC_CLOCK - -/* mutex_lock_nested() is available */ -#undef HAVE_MUTEX_LOCK_NESTED - -/* struct mutex has owner */ -#undef HAVE_MUTEX_OWNER - -/* struct mutex owner is a task_struct */ -#undef HAVE_MUTEX_OWNER_TASK_STRUCT - -/* next_online_pgdat() is available */ -#undef HAVE_NEXT_ONLINE_PGDAT - -/* next_zone() is available */ -#undef HAVE_NEXT_ZONE - -/* struct path used in struct nameidata */ -#undef HAVE_PATH_IN_NAMEIDATA - -/* pgdat helpers are available */ -#undef HAVE_PGDAT_HELPERS - -/* pgdat_list is available */ -#undef HAVE_PGDAT_LIST - -/* __put_task_struct() is available */ -#undef HAVE_PUT_TASK_STRUCT - -/* set_fs_pwd() is available */ -#undef HAVE_SET_FS_PWD - -/* set_normalized_timespec() is available as export */ -#undef HAVE_SET_NORMALIZED_TIMESPEC_EXPORT - -/* set_normalized_timespec() is available as inline */ -#undef HAVE_SET_NORMALIZED_TIMESPEC_INLINE - -/* set_shrinker() available */ -#undef HAVE_SET_SHRINKER - -/* struct shrink_control exists */ -#undef HAVE_SHRINK_CONTROL_STRUCT - -/* shrink_dcache_memory() is available */ -#undef HAVE_SHRINK_DCACHE_MEMORY - -/* shrink_icache_memory() is available */ -#undef HAVE_SHRINK_ICACHE_MEMORY - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* task_curr() is available */ -#undef HAVE_TASK_CURR - -/* timespec_sub() is available */ -#undef HAVE_TIMESPEC_SUB - -/* linux/uaccess.h exists */ -#undef HAVE_UACCESS_HEADER - -/* kernel defines uintptr_t */ -#undef HAVE_UINTPTR_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* user_path_dir() is available */ -#undef HAVE_USER_PATH_DIR - -/* vfs_fsync() is available */ -#undef HAVE_VFS_FSYNC - -/* Page state NR_ACTIVE is available */ -#undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE - -/* Page state NR_ACTIVE_ANON is available */ -#undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON - -/* Page state NR_ACTIVE_FILE is available */ -#undef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE - -/* Page state NR_FREE_PAGES is available */ -#undef HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES - -/* Page state NR_INACTIVE is available */ -#undef HAVE_ZONE_STAT_ITEM_NR_INACTIVE - -/* Page state NR_INACTIVE_ANON is available */ -#undef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON - -/* Page state NR_INACTIVE_FILE is available */ -#undef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* get_zone_counts() is needed */ -#undef NEED_GET_ZONE_COUNTS - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* rwsem_is_locked() acquires sem->wait_lock */ -#undef RWSEM_IS_LOCKED_TAKES_WAIT_LOCK - -/* struct rw_semaphore member wait_lock is raw_spinlock_t */ -#undef RWSEM_SPINLOCK_IS_RAW - -/* Define the project alias string. */ -#undef SPL_META_ALIAS - -/* Define the project author. */ -#undef SPL_META_AUTHOR - -/* Define the project release date. */ -#undef SPL_META_DATA - -/* Define the libtool library 'age' version information. */ -#undef SPL_META_LT_AGE - -/* Define the libtool library 'current' version information. */ -#undef SPL_META_LT_CURRENT - -/* Define the libtool library 'revision' version information. */ -#undef SPL_META_LT_REVISION - -/* Define the project name. */ -#undef SPL_META_NAME - -/* Define the project release. */ -#undef SPL_META_RELEASE - -/* Define the project version. */ -#undef SPL_META_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION From 330fe010e42fcdbc70832583f95248b9227ac2c4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Sep 2012 10:06:13 -0700 Subject: [PATCH 0642/1062] Revert "Switch KM_SLEEP to KM_PUSHPAGE" This reverts commit cd5ca4b2f86a606aa6ed68341a3672fdde1c9856 due to conflicts in the higher TQ_ bits which caused incorrect behavior. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 1 - module/spl/spl-taskq.c | 8 +++++--- module/spl/spl-thread.c | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index a73f7703f..a5d9492f2 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -62,7 +62,6 @@ typedef struct taskq_ent { */ #define TQ_SLEEP KM_SLEEP #define TQ_NOSLEEP KM_NOSLEEP -#define TQ_PUSHPAGE KM_PUSHPAGE #define TQ_NOQUEUE 0x01000000 #define TQ_NOALLOC 0x02000000 #define TQ_NEW 0x04000000 diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index b58eb8e94..e4092b842 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -50,6 +50,8 @@ task_alloc(taskq_t *tq, uint_t flags) SENTRY; ASSERT(tq); + ASSERT(flags & (TQ_SLEEP | TQ_NOSLEEP)); /* One set */ + ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ ASSERT(spin_is_locked(&tq->tq_lock)); retry: /* Acquire taskq_ent_t's from free list if available */ @@ -552,7 +554,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, nthreads = MAX((num_online_cpus() * nthreads) / 100, 1); } - tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); + tq = kmem_alloc(sizeof(*tq), KM_SLEEP); if (tq == NULL) SRETURN(NULL); @@ -578,12 +580,12 @@ __taskq_create(const char *name, int nthreads, pri_t pri, if (flags & TASKQ_PREPOPULATE) for (i = 0; i < minalloc; i++) - task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); + task_done(tq, task_alloc(tq, TQ_SLEEP | TQ_NEW)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); for (i = 0; i < nthreads; i++) { - tqt = kmem_alloc(sizeof(*tqt), KM_PUSHPAGE); + tqt = kmem_alloc(sizeof(*tqt), KM_SLEEP); INIT_LIST_HEAD(&tqt->tqt_thread_list); INIT_LIST_HEAD(&tqt->tqt_active_list); tqt->tqt_tq = tq; diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 71e5f331d..9f6e22379 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -98,14 +98,14 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, /* Variable stack size unsupported */ ASSERT(stk == NULL); - tp = kmem_alloc(sizeof(thread_priv_t), KM_PUSHPAGE); + tp = kmem_alloc(sizeof(thread_priv_t), KM_SLEEP); if (tp == NULL) SRETURN(NULL); tp->tp_magic = TP_MAGIC; tp->tp_name_size = strlen(name) + 1; - tp->tp_name = kmem_alloc(tp->tp_name_size, KM_PUSHPAGE); + tp->tp_name = kmem_alloc(tp->tp_name_size, KM_SLEEP); if (tp->tp_name == NULL) { kmem_free(tp, sizeof(thread_priv_t)); SRETURN(NULL); From 9b51f218410ccdeb69a85d99bd5f09051ec2def1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Sep 2012 11:31:39 -0700 Subject: [PATCH 0643/1062] Remove TQ_SLEEP -> KM_SLEEP mapping When the taskq code was originally written it seemed like a good idea to simply map TQ_SLEEP to KM_SLEEP. Unfortunately, this assumed that the TQ_* flags would never confict with any of the Linux GFP_* flags. When adding the TQ_PUSHPAGE support in commit cd5ca4b this invariant was accidentally broken. Therefore to support TQ_PUSHPAGE, which is needed for Linux, and prevent any further confusion I have removed this direct mapping. The TQ_SLEEP, TQ_NOSLEEP, and TQ_PUSHPAGE are no longer defined in terms of their KM_* counterparts. Instead a simple mapping function is introduce to convert TQ_* -> KM_* where needed. Signed-off-by: Brian Behlendorf Issue #171 --- include/sys/taskq.h | 5 +++-- module/spl/spl-taskq.c | 30 ++++++++++++++++-------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index a5d9492f2..6b09bdf1b 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -60,8 +60,9 @@ typedef struct taskq_ent { * KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly * large so as not to conflict with already used GFP_* defines. */ -#define TQ_SLEEP KM_SLEEP -#define TQ_NOSLEEP KM_NOSLEEP +#define TQ_SLEEP 0x00000000 +#define TQ_NOSLEEP 0x00000001 +#define TQ_PUSHPAGE 0x00000002 #define TQ_NOQUEUE 0x01000000 #define TQ_NOALLOC 0x02000000 #define TQ_NEW 0x04000000 diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index e4092b842..7ea20461b 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -38,6 +38,18 @@ taskq_t *system_taskq; EXPORT_SYMBOL(system_taskq); +static int +task_km_flags(uint_t flags) +{ + if (flags & TQ_NOSLEEP) + return KM_NOSLEEP; + + if (flags & TQ_PUSHPAGE) + return KM_PUSHPAGE; + + return KM_SLEEP; +} + /* * NOTE: Must be called with tq->tq_lock held, returns a list_t which * is not attached to the free, work, or pending taskq lists. @@ -50,8 +62,6 @@ task_alloc(taskq_t *tq, uint_t flags) SENTRY; ASSERT(tq); - ASSERT(flags & (TQ_SLEEP | TQ_NOSLEEP)); /* One set */ - ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ ASSERT(spin_is_locked(&tq->tq_lock)); retry: /* Acquire taskq_ent_t's from free list if available */ @@ -92,7 +102,7 @@ retry: } spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - t = kmem_alloc(sizeof(taskq_ent_t), flags & (TQ_SLEEP | TQ_NOSLEEP)); + t = kmem_alloc(sizeof(taskq_ent_t), task_km_flags(flags)); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); if (t) { @@ -251,14 +261,6 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(tq); ASSERT(func); - /* Solaris assumes TQ_SLEEP if not passed explicitly */ - if (!(flags & (TQ_SLEEP | TQ_NOSLEEP))) - flags |= TQ_SLEEP; - - if (unlikely(in_atomic() && (flags & TQ_SLEEP))) - PANIC("May schedule while atomic: %s/0x%08x/%d\n", - current->comm, preempt_count(), current->pid); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); /* Taskq being destroyed and all tasks drained */ @@ -554,7 +556,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, nthreads = MAX((num_online_cpus() * nthreads) / 100, 1); } - tq = kmem_alloc(sizeof(*tq), KM_SLEEP); + tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); if (tq == NULL) SRETURN(NULL); @@ -580,12 +582,12 @@ __taskq_create(const char *name, int nthreads, pri_t pri, if (flags & TASKQ_PREPOPULATE) for (i = 0; i < minalloc; i++) - task_done(tq, task_alloc(tq, TQ_SLEEP | TQ_NEW)); + task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); for (i = 0; i < nthreads; i++) { - tqt = kmem_alloc(sizeof(*tqt), KM_SLEEP); + tqt = kmem_alloc(sizeof(*tqt), KM_PUSHPAGE); INIT_LIST_HEAD(&tqt->tqt_thread_list); INIT_LIST_HEAD(&tqt->tqt_active_list); tqt->tqt_tq = tq; From 3050c9314faf95a63f000577a1d9feebb86b26d9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 12 Sep 2012 12:24:41 -0700 Subject: [PATCH 0644/1062] Switch KM_SLEEP to KM_PUSHPAGE Under certain circumstances the following functions may be called in a context where KM_SLEEP is unsafe and can result in a deadlocked system. To avoid this problem the unconditional KM_SLEEPs are converted to KM_PUSHPAGEs. This will prevent them from attempting to initiate any I/O during direct reclaim. This change was originally part of cd5ca4b but was reverted by 330fe01. It always should have had its own commit for exactly this reason. Signed-off-by: Brian Behlendorf --- module/spl/spl-thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 9f6e22379..71e5f331d 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -98,14 +98,14 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, /* Variable stack size unsupported */ ASSERT(stk == NULL); - tp = kmem_alloc(sizeof(thread_priv_t), KM_SLEEP); + tp = kmem_alloc(sizeof(thread_priv_t), KM_PUSHPAGE); if (tp == NULL) SRETURN(NULL); tp->tp_magic = TP_MAGIC; tp->tp_name_size = strlen(name) + 1; - tp->tp_name = kmem_alloc(tp->tp_name_size, KM_SLEEP); + tp->tp_name = kmem_alloc(tp->tp_name_size, KM_PUSHPAGE); if (tp->tp_name == NULL) { kmem_free(tp, sizeof(thread_priv_t)); SRETURN(NULL); From a6c6839a88b7dc344f3cd8e875a01802b34645cd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 Sep 2012 11:28:57 -0700 Subject: [PATCH 0645/1062] SPL 0.6.0-rc11 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 9d3363166..cf77d076e 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc10 +Release: rc11 Release-Tags: relext From bbdc6ae49518a4be7230ab673370e9231e2f72e7 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Mon, 3 Sep 2012 14:56:26 +0200 Subject: [PATCH 0646/1062] Add interface for file hole punching. This adds an interface to "punch holes" (deallocate space) in VFS files. The interface is identical to the Solaris VOP_SPACE interface. This interface is necessary for TRIM support on file vdevs. This is implemented using Linux fallocate(FALLOC_FL_PUNCH_HOLE), which was introduced in 2.6.38. For a brief time before 2.6.38 this was done using the truncate_range inode operation, which was quickly deprecated. This patch only supports FALLOC_FL_PUNCH_HOLE. This adds support for the truncate_range() inode operation to VOP_SPACE() for file hole punching. This API is deprecated and removed in 3.5, so it's only useful for old kernels. On tmpfs, the truncate_range() inode operation translates to shmem_truncate_range(). Unfortunately, this function expects the end offset to be inclusive and aligned to the end of a page. If it is not, the kernel will stop with a BUG_ON(). This patch fixes the issue by adapting to the constraints set forth by shmem_truncate_range(). Signed-off-by: Brian Behlendorf Closes #168 --- config/spl-build.m4 | 22 ++++++++++++++++++ include/sys/vnode.h | 6 +++++ module/spl/spl-vnode.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b7ab54d32..0c7a03cf1 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -72,6 +72,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_4ARGS_VFS_RENAME SPL_AC_VFS_FSYNC SPL_AC_2ARGS_VFS_FSYNC + SPL_AC_INODE_TRUNCATE_RANGE SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_CRED_STRUCT SPL_AC_GROUPS_SEARCH @@ -1992,6 +1993,27 @@ AC_DEFUN([SPL_AC_2ARGS_VFS_FSYNC], [ ]) ]) +dnl # +dnl # 3.5 API change, +dnl # inode_operations.truncate_range removed +dnl # (deprecated in favor of FALLOC_FL_PUNCH_HOLE) +dnl # +AC_DEFUN([SPL_AC_INODE_TRUNCATE_RANGE], [ + AC_MSG_CHECKING([whether truncate_range() inode operation is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct inode_operations ops; + ops.truncate_range = NULL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1, + [truncate_range() inode operation is available]) + ],[ + AC_MSG_RESULT(no) + ]) +])) + dnl # dnl # 2.6.33 API change. Also backported in RHEL5 as of 2.6.18-190.el5. dnl # Earlier versions of rwsem_is_locked() were inline and had a race diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 03462bd70..99614d55b 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -66,6 +66,9 @@ #define FNODSYNC 0x10000 /* fsync pseudo flag */ #define FNOFOLLOW 0x20000 /* don't follow symlinks */ +#define F_FREESP 11 /* Free file space */ + + /* * The vnode AT_ flags are mapped to the Linux ATTR_* flags. * This allows them to be used safely with an iattr structure. @@ -185,6 +188,8 @@ extern int vn_remove(const char *path, uio_seg_t seg, int flags); extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); +extern int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, + offset_t offset, void *x6, void *x7); extern file_t *vn_getf(int fd); extern void vn_releasef(int fd); extern int vn_set_pwd(const char *filename); @@ -197,6 +202,7 @@ void spl_vn_fini(void); #define VOP_SEEK vn_seek #define VOP_GETATTR vn_getattr #define VOP_FSYNC vn_fsync +#define VOP_SPACE vn_space #define VOP_PUTPAGE(vp, o, s, f, x1, x2) ((void)0) #define vn_is_readonly(vp) 0 #define getf vn_getf diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 2e55b007b..f5fc65d26 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #include #ifdef SS_DEBUG_SUBSYS @@ -510,6 +511,58 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); +int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, + offset_t offset, void *x6, void *x7) +{ + int error = EOPNOTSUPP; + SENTRY; + + if (cmd != F_FREESP || bfp->l_whence != 0) + SRETURN(EOPNOTSUPP); + + ASSERT(vp); + ASSERT(vp->v_file); + ASSERT(bfp->l_start >= 0 && bfp->l_len > 0); + +#ifdef FALLOC_FL_PUNCH_HOLE + if (vp->v_file->f_op->fallocate) { + error = -vp->v_file->f_op->fallocate(vp->v_file, + FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, + bfp->l_start, bfp->l_len); + if (!error) + SRETURN(0); + } +#endif + +#ifdef HAVE_INODE_TRUNCATE_RANGE + if (vp->v_file->f_dentry && vp->v_file->f_dentry->d_inode && + vp->v_file->f_dentry->d_inode->i_op && + vp->v_file->f_dentry->d_inode->i_op->truncate_range) { + off_t end = bfp->l_start + bfp->l_len; + /* + * Judging from the code in shmem_truncate_range(), + * it seems the kernel expects the end offset to be + * inclusive and aligned to the end of a page. + */ + if (end % PAGE_SIZE != 0) { + end &= ~(off_t)(PAGE_SIZE - 1); + if (end <= bfp->l_start) + SRETURN(0); + } + --end; + + vp->v_file->f_dentry->d_inode->i_op->truncate_range( + vp->v_file->f_dentry->d_inode, + bfp->l_start, end + ); + SRETURN(0); + } +#endif + + SRETURN(error); +} +EXPORT_SYMBOL(vn_space); + /* Function must be called while holding the vn_file_lock */ static file_t * file_find(int fd) From dea3505dff1252b337eb1cb8744626fb0f796d86 Mon Sep 17 00:00:00 2001 From: Massimo Maggi Date: Thu, 11 Oct 2012 16:19:48 -0700 Subject: [PATCH 0647/1062] Switch KM_SLEEP to KM_PUSHPAGE In this particular instance the allocation occurred in the context of sys_msync()->...->zpl_putpage() where we must be careful not to initiate additional I/O. Signed-off-by: Massimo Maggi Signed-off-by: Brian Behlendorf --- module/spl/spl-tsd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index b43da7746..f5c579578 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -174,7 +174,7 @@ tsd_hash_add(tsd_hash_table_t *table, uint_t key, pid_t pid, void *value) ASSERT3P(tsd_hash_search(table, key, pid), ==, NULL); /* New entry allocate structure, set value, and add to hash */ - entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_SLEEP); + entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) SRETURN(ENOMEM); @@ -234,7 +234,7 @@ tsd_hash_add_key(tsd_hash_table_t *table, uint_t *keyp, dtor_func_t dtor) ASSERT3P(table, !=, NULL); /* Allocate entry to be used as a destructor for this key */ - entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_SLEEP); + entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) SRETURN(ENOMEM); @@ -293,7 +293,7 @@ tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid) SENTRY; /* Allocate entry to be used as the process reference */ - entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_SLEEP); + entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) SRETURN(ENOMEM); From bcb15891ab394e11615eee08bba1fd85ac32e158 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 11 Oct 2012 22:41:33 +0800 Subject: [PATCH 0648/1062] Linux 3.6 compat, kern_path_locked() added The kern_path_parent() function was removed from Linux 3.6 because it was observed that all the callers just want the parent dentry. The simpler kern_path_locked() function replaces kern_path_parent() and does the lookup while holding the ->i_mutex lock. This is good news for the vn implementation because it removes the need for us to handle the locking. However, it makes it harder to implement a single readable vn_remove()/vn_rename() function which is usually what we prefer. Therefore, we implement a new version of vn_remove()/vn_rename() for Linux 3.6 and newer kernels. This allows us to leave the existing working implementation untouched, and to add a simpler version for newer kernels. Long term I would very much like to see all of the vn code removed since what this code enabled is generally frowned upon in the kernel. But that can't happen util we either abondon the zpool.cache file or implement alternate infrastructure to update is correctly in user space. Signed-off-by: Yuxuan Shui Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #154 --- config/spl-build.m4 | 16 +++++ include/linux/file_compat.h | 6 ++ module/spl/spl-vnode.c | 136 ++++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 0c7a03cf1..eb644a188 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -86,6 +86,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SHRINK_ICACHE_MEMORY SPL_AC_KERN_PATH_PARENT_HEADER SPL_AC_KERN_PATH_PARENT_SYMBOL + SPL_AC_KERN_PATH_LOCKED SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW @@ -2187,6 +2188,21 @@ AC_DEFUN([SPL_AC_KERN_PATH_PARENT_SYMBOL], ]) ]) +dnl # +dnl # 3.6 API compat, +dnl # The kern_path_parent() function was replaced by the kern_path_locked() +dnl # function to eliminate all struct nameidata usage outside fs/namei.c. +dnl # +AC_DEFUN([SPL_AC_KERN_PATH_LOCKED], [ + SPL_CHECK_SYMBOL_HEADER( + [kern_path_locked], + [struct dentry \*kern_path_locked(const char \*, struct path \*)], + [include/linux/namei.h], + [AC_DEFINE(HAVE_KERN_PATH_LOCKED, 1, + [kern_path_locked() is available])], + []) +]) + dnl # dnl # 2.6.39 API compat, dnl # The function zlib_deflate_workspacesize() now take 2 arguments. diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 2b5b7d225..27819d5e5 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -83,6 +83,12 @@ extern kern_path_parent_t kern_path_parent_fn; # define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd) #endif /* HAVE_KERN_PATH_PARENT_HEADER */ +#ifdef HAVE_KERN_PATH_LOCKED +typedef struct dentry * (*kern_path_locked_t)(const char *, struct path *); +extern kern_path_locked_t kern_path_locked_fn; +# define spl_kern_path_locked(name, path) kern_path_locked_fn(name, path) +#endif /* HAVE_KERN_PATH_LOCKED */ + #ifndef HAVE_CLEAR_CLOSE_ON_EXEC #define __clear_close_on_exec(fd, fdt) FD_CLR(fd, fdt->close_on_exec) #endif diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index f5fc65d26..a0fed3201 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -50,6 +50,10 @@ EXPORT_SYMBOL(kern_path_parent_fn); #endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ #endif /* HAVE_KERN_PATH_PARENT_HEADER */ +#ifdef HAVE_KERN_PATH_LOCKED +kern_path_locked_t kern_path_locked_fn = SYMBOL_POISON; +#endif /* HAVE_KERN_PATH_LOCKED */ + vtype_t vn_mode_to_vtype(mode_t mode) { @@ -298,6 +302,128 @@ vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct) } EXPORT_SYMBOL(vn_seek); +#ifdef HAVE_KERN_PATH_LOCKED +/* Based on do_unlinkat() from linux/fs/namei.c */ +int +vn_remove(const char *path, uio_seg_t seg, int flags) +{ + struct dentry *dentry; + struct path parent; + struct inode *inode = NULL; + int rc = 0; + SENTRY; + + ASSERT(seg == UIO_SYSSPACE); + ASSERT(flags == RMFILE); + + dentry = spl_kern_path_locked(path, &parent); + rc = PTR_ERR(dentry); + if (!IS_ERR(dentry)) { + if (parent.dentry->d_name.name[parent.dentry->d_name.len]) + SGOTO(slashes, rc = 0); + + inode = dentry->d_inode; + if (!inode) + SGOTO(slashes, rc = 0); + + if (inode) + ihold(inode); + + rc = vfs_unlink(parent.dentry->d_inode, dentry); +exit1: + dput(dentry); + } + + spl_inode_unlock(parent.dentry->d_inode); + if (inode) + iput(inode); /* truncate the inode here */ + + path_put(&parent); + SRETURN(-rc); + +slashes: + rc = !dentry->d_inode ? -ENOENT : + S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR; + SGOTO(exit1, rc); +} /* vn_remove() */ +EXPORT_SYMBOL(vn_remove); + +/* Based on do_rename() from linux/fs/namei.c */ +int +vn_rename(const char *oldname, const char *newname, int x1) +{ + struct dentry *old_dir, *new_dir; + struct dentry *old_dentry, *new_dentry; + struct dentry *trap; + struct path old_parent, new_parent; + int rc = 0; + SENTRY; + + old_dentry = spl_kern_path_locked(oldname, &old_parent); + if (IS_ERR(old_dentry)) + SGOTO(exit, rc = PTR_ERR(old_dentry)); + + spl_inode_unlock(old_parent.dentry->d_inode); + + new_dentry = spl_kern_path_locked(newname, &new_parent); + if (IS_ERR(new_dentry)) + SGOTO(exit2, rc = PTR_ERR(new_dentry)); + + spl_inode_unlock(new_parent.dentry->d_inode); + + rc = -EXDEV; + if (old_parent.mnt != new_parent.mnt) + SGOTO(exit3, rc); + + old_dir = old_parent.dentry; + new_dir = new_parent.dentry; + trap = lock_rename(new_dir, old_dir); + + /* source should not be ancestor of target */ + rc = -EINVAL; + if (old_dentry == trap) + SGOTO(exit4, rc); + + /* target should not be an ancestor of source */ + rc = -ENOTEMPTY; + if (new_dentry == trap) + SGOTO(exit4, rc); + + /* source must exist */ + rc = -ENOENT; + if (!old_dentry->d_inode) + SGOTO(exit4, rc); + + /* unless the source is a directory trailing slashes give -ENOTDIR */ + if (!S_ISDIR(old_dentry->d_inode->i_mode)) { + rc = -ENOTDIR; + if (old_dentry->d_name.name[old_dentry->d_name.len]) + SGOTO(exit4, rc); + if (new_dentry->d_name.name[new_dentry->d_name.len]) + SGOTO(exit4, rc); + } + +#ifdef HAVE_4ARGS_VFS_RENAME + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry); +#else + rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt, + new_dir->d_inode, new_dentry, newnd.nd_mnt); +#endif /* HAVE_4ARGS_VFS_RENAME */ +exit4: + unlock_rename(new_dir, old_dir); +exit3: + dput(new_dentry); + path_put(&new_parent); +exit2: + dput(old_dentry); + path_put(&old_parent); +exit: + SRETURN(-rc); +} +EXPORT_SYMBOL(vn_rename); + +#else static struct dentry * vn_lookup_hash(struct nameidata *nd) { @@ -458,6 +584,7 @@ exit: SRETURN(-rc); } EXPORT_SYMBOL(vn_rename); +#endif /* HAVE_KERN_PATH_LOCKED */ int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) @@ -862,6 +989,15 @@ int spl_vn_init_kallsyms_lookup(void) #endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ #endif /* HAVE_KERN_PATH_PARENT_HEADER */ +#ifdef HAVE_KERN_PATH_LOCKED + kern_path_locked_fn = (kern_path_locked_t) + spl_kallsyms_lookup_name("kern_path_locked"); + if (!kern_path_locked_fn) { + printk(KERN_ERR "Error: Unknown symbol kern_path_locked\n"); + return -EFAULT; + } +#endif + return (0); } From 1e0c2c2ccfb720be81051a43c405fad173775963 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 18 Oct 2012 12:37:32 -0700 Subject: [PATCH 0649/1062] Linux 3.7 compat, __clear_close_on_exec() removed Commit torvalds/linux@b8318b0 moved the __clear_close_on_exec() function out of include/linux/fdtable.h and in to fs/file.c making it unavailable to the SPL. Now as it turns out we only used this function to tear down some test infrastructure for the vn_getf()/vn_releasef() SPLAT regression tests. Rather than implement even more autoconf compatibilty code to handle this we just remove the test case. This also allows us to drop three existing autoconf tests. This does mean the SPLAT tests will no longer verify these functions but historically they have never been a problem. And if we feel we absolutely need this test coverage I'm sure a more portable version of the test case could be added. Signed-off-by: Brian Behlendorf Closes #183 --- config/spl-build.m4 | 57 --------------- include/linux/file_compat.h | 4 -- module/splat/splat-vnode.c | 136 ------------------------------------ 3 files changed, 197 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index eb644a188..957d46c48 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -42,9 +42,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB SPL_AC_INIT_UTSNAME - SPL_AC_FDTABLE_HEADER - SPL_AC_FILES_FDTABLE - SPL_AC_CLEAR_CLOSE_ON_EXEC SPL_AC_UACCESS_HEADER SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK @@ -1190,60 +1187,6 @@ AC_DEFUN([SPL_AC_INIT_UTSNAME], [ ]) ]) -dnl # -dnl # 2.6.26 API change, -dnl # definition of struct fdtable relocated to linux/fdtable.h -dnl # -AC_DEFUN([SPL_AC_FDTABLE_HEADER], [ - SPL_CHECK_HEADER([linux/fdtable.h], [FDTABLE], [], []) -]) - -dnl # -dnl # 2.6.14 API change, -dnl # check whether 'files_fdtable()' exists -dnl # -AC_DEFUN([SPL_AC_FILES_FDTABLE], [ - AC_MSG_CHECKING([whether files_fdtable() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - #ifdef HAVE_FDTABLE_HEADER - #include - #endif - ],[ - struct files_struct *files = current->files; - struct fdtable *fdt __attribute__ ((unused)); - fdt = files_fdtable(files); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILES_FDTABLE, 1, [files_fdtable() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.4.0 API change, -dnl # check whether '__clear_close_on_exec()' exists -dnl # -AC_DEFUN([SPL_AC_CLEAR_CLOSE_ON_EXEC], [ - AC_MSG_CHECKING([whether __clear_close_on_exec() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct fdtable *fdt = NULL; - int fd = 0; - - __clear_close_on_exec(fd, fdt); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CLEAR_CLOSE_ON_EXEC, 1, - [__clear_close_on_exec() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.18 API change, dnl # added linux/uaccess.h diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 27819d5e5..8664df672 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -89,9 +89,5 @@ extern kern_path_locked_t kern_path_locked_fn; # define spl_kern_path_locked(name, path) kern_path_locked_fn(name, path) #endif /* HAVE_KERN_PATH_LOCKED */ -#ifndef HAVE_CLEAR_CLOSE_ON_EXEC -#define __clear_close_on_exec(fd, fdt) FD_CLR(fd, fdt->close_on_exec) -#endif - #endif /* SPL_FILE_COMPAT_H */ diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index f5f010c9f..a57edf0de 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -54,10 +54,6 @@ #define SPLAT_VNODE_TEST6_NAME "vn_sync" #define SPLAT_VNODE_TEST6_DESC "Vn_sync Test" -#define SPLAT_VNODE_TEST7_ID 0x0907 -#define SPLAT_VNODE_TEST7_NAME "vn_getf" -#define SPLAT_VNODE_TEST7_DESC "vn_getf/vn_releasef Test" - #define SPLAT_VNODE_TEST_FILE "/etc/fstab" #define SPLAT_VNODE_TEST_FILE_AT "etc/fstab" #define SPLAT_VNODE_TEST_FILE_RW "/tmp/spl.vnode.tmp" @@ -394,135 +390,6 @@ out: return -rc; } /* splat_vnode_test6() */ -/* Basically a slightly modified version of sys_close() */ -static int -fd_uninstall(int fd) -{ - struct file *fp; - struct files_struct *files = current->files; -#ifdef HAVE_FILES_FDTABLE - struct fdtable *fdt; - - spin_lock(&files->file_lock); - fdt = files_fdtable(files); - - if (fd >= fdt->max_fds) - goto out_unlock; - - fp = fdt->fd[fd]; - if (!fp) - goto out_unlock; - - rcu_assign_pointer(fdt->fd[fd], NULL); - __clear_close_on_exec(fd, fdt); -#else - spin_lock(&files->file_lock); - if (fd >= files->max_fds) - goto out_unlock; - - fp = files->fd[fd]; - if (!fp) - goto out_unlock; - - files->fd[fd] = NULL; - FD_CLR(fd, files->close_on_exec); -#endif - /* Dropping the lock here exposes a minor race but it allows me - * to use the existing kernel interfaces for this, and for a test - * case I think that's reasonable. */ - spin_unlock(&files->file_lock); - put_unused_fd(fd); - return 0; - -out_unlock: - spin_unlock(&files->file_lock); - return -EBADF; -} /* fd_uninstall() */ - -static int -splat_vnode_test7(struct file *file, void *arg) -{ - char buf1[32] = "SPL VNode Interface Test File\n"; - char buf2[32] = ""; - struct file *lfp; - file_t *fp; - int rc, fd; - - if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST7_NAME))) - return rc; - - /* Prep work needed to test getf/releasef */ - fd = get_unused_fd(); - if (fd < 0) { - splat_vprint(file, SPLAT_VNODE_TEST7_NAME, - "Failed to get unused fd (%d)\n", fd); - return fd; - } - - lfp = filp_open(SPLAT_VNODE_TEST_FILE_RW, O_RDWR|O_CREAT|O_EXCL, 0644); - if (IS_ERR(lfp)) { - put_unused_fd(fd); - rc = PTR_ERR(lfp); - splat_vprint(file, SPLAT_VNODE_TEST7_NAME, - "Failed to filp_open: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - return rc; - } - - /* Pair up the new fd and lfp in the current context, this allows - * getf to lookup the file struct simply by the known open fd */ - fd_install(fd, lfp); - - /* Actual getf()/releasef() test */ - fp = vn_getf(fd); - if (fp == NULL) { - rc = EINVAL; - splat_vprint(file, SPLAT_VNODE_TEST7_NAME, - "Failed to getf fd %d: (%d)\n", fd, rc); - goto out; - } - - rc = vn_rdwr(UIO_WRITE, fp->f_vnode, buf1, strlen(buf1), 0, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST7_NAME, - "Failed vn_rdwr write of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - goto out; - } - - rc = vn_rdwr(UIO_READ, fp->f_vnode, buf2, strlen(buf1), 0, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST7_NAME, - "Failed vn_rdwr read of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - goto out; - } - - if (strncmp(buf1, buf2, strlen(buf1))) { - rc = EINVAL; - splat_vprint(file, SPLAT_VNODE_TEST7_NAME, - "Failed strncmp data written does not match " - "data read\nWrote: %sRead: %s\n", buf1, buf2); - goto out; - } - - rc = 0; - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Wrote: %s", buf1); - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Read: %s", buf2); - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Successfully wrote and " - "read expected data pattern to test file: %s\n", - SPLAT_VNODE_TEST_FILE_RW); -out: - vn_releasef(fd); - fd_uninstall(fd); - filp_close(lfp, 0); - vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); - - return -rc; -} /* splat_vnode_test7() */ - splat_subsystem_t * splat_vnode_init(void) { @@ -552,8 +419,6 @@ splat_vnode_init(void) SPLAT_VNODE_TEST5_ID, splat_vnode_test5); SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, SPLAT_VNODE_TEST6_ID, splat_vnode_test6); - SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST7_NAME, SPLAT_VNODE_TEST7_DESC, - SPLAT_VNODE_TEST7_ID, splat_vnode_test7); return sub; } /* splat_vnode_init() */ @@ -563,7 +428,6 @@ splat_vnode_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST4_ID); From 71c9f0b00307e6ee703eef9eba91e7640731c458 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Oct 2012 09:17:29 -0700 Subject: [PATCH 0650/1062] Make kstat.ks_update() callback atomic Move the kstat ks_update() callback under the ks_lock. This enables dynamically sized kstats without modification to the kstat API. * Create a kstat with the KSTAT_FLAG_VIRTUAL flag. * Register a ->ks_update() callback which does: o Frees any existing ks_data buffer. o Set ks_data_size to the kstat array size. o Set ks_data to an allocated buffer of size ks_data_size o Populate the array of buffers with the required data. The buffer allocated in the ks_update() callback is guaranteed to remain allocated and valid while the proc sequence handler iterates over the buffer. The lock will not be dropped until kstat_seq_stop() function is run making it safe for concurrent access. To allow the ks_update() callback to perform memory allocations the lock was changed to a mutex. Signed-off-by: Brian Behlendorf --- include/sys/kstat.h | 3 ++- module/spl/spl-kstat.c | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index e4c88c82b..45386d49a 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -30,6 +30,7 @@ #include #include #include +#include #define KSTAT_STRLEN 31 @@ -98,7 +99,7 @@ typedef struct kstat_s { struct proc_dir_entry *ks_proc; /* proc linkage */ kstat_update_t *ks_update; /* dynamic updates */ void *ks_private; /* private data */ - spinlock_t ks_lock; /* kstat data lock */ + kmutex_t ks_lock; /* kstat data lock */ struct list_head ks_list; /* kstat linkage */ } kstat_t; diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 48fab972b..164a8436d 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -267,10 +267,11 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) ASSERT(ksp->ks_magic == KS_MAGIC); SENTRY; + mutex_enter(&ksp->ks_lock); + /* Dynamically update kstat, on error existing kstats are used */ (void) ksp->ks_update(ksp, KSTAT_READ); - spin_lock(&ksp->ks_lock); ksp->ks_snaptime = gethrtime(); if (!n) @@ -302,7 +303,7 @@ kstat_seq_stop(struct seq_file *f, void *v) kstat_t *ksp = (kstat_t *)f->private; ASSERT(ksp->ks_magic == KS_MAGIC); - spin_unlock(&ksp->ks_lock); + mutex_exit(&ksp->ks_lock); } static struct seq_operations kstat_seq_ops = { @@ -360,7 +361,7 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, spin_unlock(&kstat_lock); ksp->ks_magic = KS_MAGIC; - spin_lock_init(&ksp->ks_lock); + mutex_init(&ksp->ks_lock, NULL, MUTEX_DEFAULT, NULL); INIT_LIST_HEAD(&ksp->ks_list); ksp->ks_crtime = gethrtime(); @@ -445,11 +446,11 @@ __kstat_install(kstat_t *ksp) if (de_name == NULL) SGOTO(out, rc = -EUNATCH); - spin_lock(&ksp->ks_lock); + mutex_enter(&ksp->ks_lock); ksp->ks_proc = de_name; de_name->proc_fops = &proc_kstat_operations; de_name->data = (void *)ksp; - spin_unlock(&ksp->ks_lock); + mutex_exit(&ksp->ks_lock); out: if (rc) { spin_lock(&kstat_lock); @@ -482,6 +483,7 @@ __kstat_delete(kstat_t *ksp) if (!(ksp->ks_flags & KSTAT_FLAG_VIRTUAL)) kmem_free(ksp->ks_data, ksp->ks_data_size); + mutex_destroy(&ksp->ks_lock); kmem_free(ksp, sizeof(*ksp)); return; From dba79fcbf2cc50be5caef84ae01657e884ac5d89 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Oct 2012 16:57:27 -0700 Subject: [PATCH 0651/1062] Add KSTAT_TYPE_TXG type Add a new kstat type for tracking useful statistics about a TXG. The new KSTAT_TYPE_TXG type can be used to tracks the following statistics per-txg. txg - Unique txg number state - State (O)pen/(Q)uiescing/(S)yncing/(C)ommitted birth; - Creation time nread - Bytes read nwritten; - Bytes written reads - IOPs read writes - IOPs write open_time; - Length in nanoseconds the txg was open quiesce_time - Length in nanoseconds the txg was quiescing sync_time; - Length in nanoseconds the txg was syncing Signed-off-by: Brian Behlendorf --- include/sys/kstat.h | 23 ++++++++++++++++++++++- module/spl/spl-kstat.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 45386d49a..06379f827 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -43,7 +43,8 @@ #define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */ #define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */ #define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */ -#define KSTAT_NUM_TYPES 5 +#define KSTAT_TYPE_TXG 5 /* txg sync; ks_ndata >= 1 */ +#define KSTAT_NUM_TYPES 6 #define KSTAT_DATA_CHAR 0 #define KSTAT_DATA_INT32 1 @@ -156,6 +157,26 @@ typedef struct kstat_timer { hrtime_t stop_time; /* previous event stop time */ } kstat_timer_t; +typedef enum kstat_txg_state { + TXG_STATE_OPEN = 1, + TXG_STATE_QUIESCING = 2, + TXG_STATE_SYNCING = 3, + TXG_STATE_COMMITTED = 4, +} kstat_txg_state_t; + +typedef struct kstat_txg { + u_longlong_t txg; /* txg id */ + kstat_txg_state_t state; /* txg state */ + hrtime_t birth; /* birth time stamp */ + u_longlong_t nread; /* number of bytes read */ + u_longlong_t nwritten; /* number of bytes written */ + uint_t reads; /* number of read operations */ + uint_t writes; /* number of write operations */ + hrtime_t open_time; /* open time */ + hrtime_t quiesce_time;/* quiesce time */ + hrtime_t sync_time; /* sync time */ +} kstat_txg_t; + int spl_kstat_init(void); void spl_kstat_fini(void); diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 164a8436d..ea2d67dd4 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -78,6 +78,14 @@ kstat_seq_show_headers(struct seq_file *f) "name", "events", "elapsed", "min", "max", "start", "stop"); break; + case KSTAT_TYPE_TXG: + seq_printf(f, + "%-8s %-5s %-13s %-12s %-12s %-8s %-8s " + "%-12s %-12s %-12s\n", + "txg", "state", "birth", + "nread", "nwritten", "reads", "writes", + "otime", "qtime", "stime"); + break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } @@ -190,6 +198,27 @@ kstat_seq_show_timer(struct seq_file *f, kstat_timer_t *ktp) return 0; } +static int +kstat_seq_show_txg(struct seq_file *f, kstat_txg_t *ktp) +{ + char state; + + switch (ktp->state) { + case TXG_STATE_OPEN: state = 'O'; break; + case TXG_STATE_QUIESCING: state = 'Q'; break; + case TXG_STATE_SYNCING: state = 'S'; break; + case TXG_STATE_COMMITTED: state = 'C'; break; + default: state = '?'; break; + } + + seq_printf(f, + "%-8llu %-5c %-13llu %-12llu %-12llu %-8u %-8u " + "%12lld %12lld %12lld\n", ktp->txg, state, ktp->birth, + ktp->nread, ktp->nwritten, ktp->reads, ktp->writes, + ktp->open_time, ktp->quiesce_time, ktp->sync_time); + return 0; +} + static int kstat_seq_show(struct seq_file *f, void *p) { @@ -216,6 +245,9 @@ kstat_seq_show(struct seq_file *f, void *p) case KSTAT_TYPE_TIMER: rc = kstat_seq_show_timer(f, (kstat_timer_t *)p); break; + case KSTAT_TYPE_TXG: + rc = kstat_seq_show_txg(f, (kstat_txg_t *)p); + break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } @@ -252,6 +284,9 @@ kstat_seq_data_addr(kstat_t *ksp, loff_t n) case KSTAT_TYPE_TIMER: rc = ksp->ks_data + n * sizeof(kstat_timer_t); break; + case KSTAT_TYPE_TXG: + rc = ksp->ks_data + n * sizeof(kstat_txg_t); + break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } @@ -396,6 +431,10 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, ksp->ks_ndata = ks_ndata; ksp->ks_data_size = ks_ndata * sizeof(kstat_timer_t); break; + case KSTAT_TYPE_TXG: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof(kstat_timer_t); + break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } From d2733258d09b02fac76af0df9921e369d33e9642 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Nov 2012 09:04:50 -0800 Subject: [PATCH 0652/1062] Condition variable reference counts Reference count every entry and exit from the condition variable functions: cv_wait(), cv_wait_timeout(), cv_signal(), cv_broadcast(). This allows us to safely block in cv_destroy() until all consumers have been scheduled and are no longer accessing the condition variable memory. In addition poison the magic value at the start of cv_destroy() to ensure there are never any new callers after cv_destroy() is called. The consumer is responsible for ensuring this never occurs. Signed-off-by: Brian Behlendorf --- include/sys/condvar.h | 3 ++- module/spl/spl-condvar.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 59407c2dd..709a86d39 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -35,12 +35,13 @@ * calling any of the wait/signal funs, and passed into the wait funs. */ #define CV_MAGIC 0x346545f4 -#define CV_POISON 0x95 +#define CV_DESTROY 0x346545f5 typedef struct { int cv_magic; wait_queue_head_t cv_event; wait_queue_head_t cv_destroy; + atomic_t cv_refs; atomic_t cv_waiters; kmutex_t *cv_mutex; } kcondvar_t; diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index e9f727d72..6ed6579b3 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -48,6 +48,7 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) init_waitqueue_head(&cvp->cv_event); init_waitqueue_head(&cvp->cv_destroy); atomic_set(&cvp->cv_waiters, 0); + atomic_set(&cvp->cv_refs, 1); cvp->cv_mutex = NULL; /* We may be called when there is a non-zero preempt_count or @@ -63,12 +64,13 @@ EXPORT_SYMBOL(__cv_init); static int cv_destroy_wakeup(kcondvar_t *cvp) { - if ((cvp->cv_mutex != NULL) || - (waitqueue_active(&cvp->cv_event)) || - (atomic_read(&cvp->cv_waiters) > 0)) - return 0; + if (!atomic_read(&cvp->cv_waiters) && !atomic_read(&cvp->cv_refs)) { + ASSERT(cvp->cv_mutex == NULL); + ASSERT(!waitqueue_active(&cvp->cv_event)); + return 1; + } - return 1; + return 0; } void @@ -78,11 +80,15 @@ __cv_destroy(kcondvar_t *cvp) ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); - /* Block until all waiters have woken */ + cvp->cv_magic = CV_DESTROY; + atomic_dec(&cvp->cv_refs); + + /* Block until all waiters are woken and references dropped. */ while (cv_destroy_wakeup(cvp) == 0) wait_event_timeout(cvp->cv_destroy, cv_destroy_wakeup(cvp), 1); ASSERT3P(cvp->cv_mutex, ==, NULL); + ASSERT3S(atomic_read(&cvp->cv_refs), ==, 0); ASSERT3S(atomic_read(&cvp->cv_waiters), ==, 0); ASSERT3S(waitqueue_active(&cvp->cv_event), ==, 0); @@ -100,6 +106,7 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(mutex_owned(mp)); + atomic_inc(&cvp->cv_refs); if (cvp->cv_mutex == NULL) cvp->cv_mutex = mp; @@ -124,6 +131,7 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) } finish_wait(&cvp->cv_event, &wait); + atomic_dec(&cvp->cv_refs); SEXIT; } @@ -157,6 +165,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(mutex_owned(mp)); + atomic_inc(&cvp->cv_refs); if (cvp->cv_mutex == NULL) cvp->cv_mutex = mp; @@ -166,8 +175,10 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, /* XXX - Does not handle jiffie wrap properly */ time_left = expire_time - jiffies; - if (time_left <= 0) + if (time_left <= 0) { + atomic_dec(&cvp->cv_refs); SRETURN(-1); + } prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); @@ -186,6 +197,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, } finish_wait(&cvp->cv_event, &wait); + atomic_dec(&cvp->cv_refs); SRETURN(time_left > 0 ? time_left : -1); } @@ -210,6 +222,7 @@ __cv_signal(kcondvar_t *cvp) SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); + atomic_inc(&cvp->cv_refs); /* All waiters are added with WQ_FLAG_EXCLUSIVE so only one * waiter will be set runable with each call to wake_up(). @@ -218,6 +231,7 @@ __cv_signal(kcondvar_t *cvp) if (atomic_read(&cvp->cv_waiters) > 0) wake_up(&cvp->cv_event); + atomic_dec(&cvp->cv_refs); SEXIT; } EXPORT_SYMBOL(__cv_signal); @@ -225,15 +239,17 @@ EXPORT_SYMBOL(__cv_signal); void __cv_broadcast(kcondvar_t *cvp) { + SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); - SENTRY; + atomic_inc(&cvp->cv_refs); /* Wake_up_all() will wake up all waiters even those which * have the WQ_FLAG_EXCLUSIVE flag set. */ if (atomic_read(&cvp->cv_waiters) > 0) wake_up_all(&cvp->cv_event); + atomic_dec(&cvp->cv_refs); SEXIT; } EXPORT_SYMBOL(__cv_broadcast); From df870a697fc8669d63534b27a108335269a7884f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 2 Nov 2012 15:29:44 -0700 Subject: [PATCH 0653/1062] splat: Cleanup headers Restructure the the SPLAT headers such that each test only includes the minimal set of headers it requires. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 1 - include/sys/types.h | 2 ++ module/splat/splat-atomic.c | 2 ++ module/splat/splat-condvar.c | 1 + module/splat/splat-cred.c | 1 + module/splat/splat-ctl.c | 8 +++++++ module/splat/splat-generic.c | 1 + module/splat/splat-internal.h | 41 ----------------------------------- module/splat/splat-kmem.c | 2 ++ module/splat/splat-kobj.c | 1 + module/splat/splat-linux.c | 1 + module/splat/splat-list.c | 2 ++ module/splat/splat-mutex.c | 2 ++ module/splat/splat-random.c | 2 ++ module/splat/splat-rwlock.c | 3 +++ module/splat/splat-taskq.c | 2 ++ module/splat/splat-thread.c | 2 ++ module/splat/splat-time.c | 1 + module/splat/splat-vnode.c | 2 +- module/splat/splat-zlib.c | 3 +++ 20 files changed, 37 insertions(+), 43 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 0149e754c..e71a443a0 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/include/sys/types.h b/include/sys/types.h index 0c3d88ec3..35905eb97 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -42,6 +42,8 @@ #include #include #include +#include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index 6162d6abf..cdb3353f9 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -24,6 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) Atomic Tests. \*****************************************************************************/ +#include +#include #include "splat-internal.h" #define SPLAT_ATOMIC_NAME "atomic" diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index 14000adbd..69fefc955 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -24,6 +24,7 @@ * Solaris Porting LAyer Tests (SPLAT) Condition Variable Tests. \*****************************************************************************/ +#include #include "splat-internal.h" #define SPLAT_CONDVAR_NAME "condvar" diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index db36ece98..0efabd854 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -24,6 +24,7 @@ * Solaris Porting LAyer Tests (SPLAT) Credential Tests. \*****************************************************************************/ +#include #include "splat-internal.h" #define SPLAT_CRED_NAME "cred" diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 399b09c4d..53bf51dd6 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -43,6 +43,14 @@ * of regression tests or particular tests. \*****************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include #include "splat-internal.h" static spl_class *splat_class; diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index f9c3c7ec5..38df14d3b 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -24,6 +24,7 @@ * Solaris Porting LAyer Tests (SPLAT) Generic Tests. \*****************************************************************************/ +#include #include "splat-internal.h" #define SPLAT_GENERIC_NAME "generic" diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 501e42c32..b15db65e2 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -25,47 +25,6 @@ #ifndef _SPLAT_INTERNAL_H #define _SPLAT_INTERNAL_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "spl-device.h" #include "spl-debug.h" #include "splat-ctl.h" diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index d0ad9a666..f1c4613fa 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -24,6 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) Kmem Tests. \*****************************************************************************/ +#include +#include #include "splat-internal.h" #define SPLAT_KMEM_NAME "kmem" diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c index f0720dbf5..c76795418 100644 --- a/module/splat/splat-kobj.c +++ b/module/splat/splat-kobj.c @@ -24,6 +24,7 @@ * Solaris Porting LAyer Tests (SPLAT) Kobj Tests. \*****************************************************************************/ +#include #include "splat-internal.h" #define SPLAT_KOBJ_NAME "kobj" diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 07126411a..5303df4e0 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -23,6 +23,7 @@ * Solaris Porting LAyer Tests (SPLAT) Kernel Compatibility Tests. \*****************************************************************************/ +#include #include "splat-internal.h" #define SPLAT_LINUX_NAME "linux" diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index d517e7d22..34b570f39 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -24,6 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) List Tests. \*****************************************************************************/ +#include +#include #include "splat-internal.h" #define SPLAT_LIST_NAME "list" diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index d134e49ce..9e6b24708 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -24,6 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) Mutex Tests. \*****************************************************************************/ +#include +#include #include "splat-internal.h" #define SPLAT_MUTEX_NAME "mutex" diff --git a/module/splat/splat-random.c b/module/splat/splat-random.c index 3ee580df7..63d96444f 100644 --- a/module/splat/splat-random.c +++ b/module/splat/splat-random.c @@ -24,6 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) Random Number Generator Tests. \*****************************************************************************/ +#include +#include #include "splat-internal.h" #define SPLAT_KRNG_NAME "krng" diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 2b9dee939..9e335d756 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -24,6 +24,9 @@ * Solaris Porting LAyer Tests (SPLAT) Read/Writer Lock Tests. \*****************************************************************************/ +#include +#include +#include #include "splat-internal.h" #define SPLAT_RWLOCK_NAME "rwlock" diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 73142f9b6..38b563cc1 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -24,6 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) Task Queue Tests. \*****************************************************************************/ +#include +#include #include "splat-internal.h" #define SPLAT_TASKQ_NAME "taskq" diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index 0f504836f..c54cbcd8a 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -24,6 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) Thread Tests. \*****************************************************************************/ +#include +#include #include "splat-internal.h" #define SPLAT_THREAD_NAME "thread" diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index 3b06b9ef2..e6f8dc682 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -24,6 +24,7 @@ * Solaris Porting LAyer Tests (SPLAT) Time Tests. \*****************************************************************************/ +#include #include "splat-internal.h" #define SPLAT_TIME_NAME "time" diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index a57edf0de..7d1c75f17 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -24,8 +24,8 @@ * Solaris Porting LAyer Tests (SPLAT) Vnode Tests. \*****************************************************************************/ +#include #include "splat-internal.h" -#include #define SPLAT_VNODE_NAME "vnode" #define SPLAT_VNODE_DESC "Kernel Vnode Tests" diff --git a/module/splat/splat-zlib.c b/module/splat/splat-zlib.c index 465d34091..852cf818f 100644 --- a/module/splat/splat-zlib.c +++ b/module/splat/splat-zlib.c @@ -24,6 +24,9 @@ * Solaris Porting LAyer Tests (SPLAT) Zlib Compression Tests. \*****************************************************************************/ +#include +#include +#include #include "splat-internal.h" #define SPLAT_ZLIB_NAME "zlib" From 0e149d42049a0fc89c9ecdac428dbdfc6fd4e20a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 2 Nov 2012 15:31:04 -0700 Subject: [PATCH 0654/1062] splat: Fix log buffer locking The Fedora 3.6 debug kernel identified the following issue where we call copy_to_user() under a spin lock(). This used to be safe in older kernels but no longer appears to be true so the spin lock was changed to a mutex. None of this code is performance critical so allowing the process to sleep is harmless. Signed-off-by: Brian Behlendorf --- module/splat/splat-ctl.c | 23 ++++++++++++----------- module/splat/splat-internal.h | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 53bf51dd6..c68281a84 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -71,7 +71,7 @@ splat_open(struct inode *inode, struct file *file) if (info == NULL) return -ENOMEM; - spin_lock_init(&info->info_lock); + mutex_init(&info->info_lock); info->info_size = SPLAT_INFO_BUFFER_SIZE; info->info_buffer = (char *)vmalloc(SPLAT_INFO_BUFFER_SIZE); if (info->info_buffer == NULL) { @@ -100,6 +100,7 @@ splat_release(struct inode *inode, struct file *file) ASSERT(info); ASSERT(info->info_buffer); + mutex_destroy(&info->info_lock); vfree(info->info_buffer); kfree(info); @@ -114,10 +115,10 @@ splat_buffer_clear(struct file *file, splat_cfg_t *kcfg, unsigned long arg) ASSERT(info); ASSERT(info->info_buffer); - spin_lock(&info->info_lock); + mutex_lock(&info->info_lock); memset(info->info_buffer, 0, info->info_size); info->info_head = info->info_buffer; - spin_unlock(&info->info_lock); + mutex_unlock(&info->info_lock); return 0; } @@ -132,7 +133,7 @@ splat_buffer_size(struct file *file, splat_cfg_t *kcfg, unsigned long arg) ASSERT(info); ASSERT(info->info_buffer); - spin_lock(&info->info_lock); + mutex_lock(&info->info_lock); if (kcfg->cfg_arg1 > 0) { size = kcfg->cfg_arg1; @@ -157,7 +158,7 @@ splat_buffer_size(struct file *file, splat_cfg_t *kcfg, unsigned long arg) if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) rc = -EFAULT; out: - spin_unlock(&info->info_lock); + mutex_unlock(&info->info_lock); return rc; } @@ -508,7 +509,7 @@ static ssize_t splat_write(struct file *file, const char __user *buf, ASSERT(info); ASSERT(info->info_buffer); - spin_lock(&info->info_lock); + mutex_lock(&info->info_lock); /* Write beyond EOF */ if (*ppos >= info->info_size) { @@ -528,7 +529,7 @@ static ssize_t splat_write(struct file *file, const char __user *buf, *ppos += count; rc = count; out: - spin_unlock(&info->info_lock); + mutex_unlock(&info->info_lock); return rc; } @@ -545,7 +546,7 @@ static ssize_t splat_read(struct file *file, char __user *buf, ASSERT(info); ASSERT(info->info_buffer); - spin_lock(&info->info_lock); + mutex_lock(&info->info_lock); /* Read beyond EOF */ if (*ppos >= info->info_size) @@ -563,7 +564,7 @@ static ssize_t splat_read(struct file *file, char __user *buf, *ppos += count; rc = count; out: - spin_unlock(&info->info_lock); + mutex_unlock(&info->info_lock); return rc; } @@ -579,7 +580,7 @@ static loff_t splat_seek(struct file *file, loff_t offset, int origin) ASSERT(info); ASSERT(info->info_buffer); - spin_lock(&info->info_lock); + mutex_lock(&info->info_lock); switch (origin) { case 0: /* SEEK_SET - No-op just do it */ @@ -598,7 +599,7 @@ static loff_t splat_seek(struct file *file, loff_t offset, int origin) rc = offset; } - spin_unlock(&info->info_lock); + mutex_unlock(&info->info_lock); return rc; } diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index b15db65e2..14303a105 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -121,7 +121,7 @@ typedef struct splat_subsystem { #define SPLAT_INFO_BUFFER_REDZONE 256 typedef struct splat_info { - spinlock_t info_lock; + struct mutex info_lock; int info_size; char *info_buffer; char *info_head; /* Internal kernel use only */ @@ -136,7 +136,7 @@ typedef struct splat_info { ASSERT(_info_); \ ASSERT(_info_->info_buffer); \ \ - spin_lock(&_info_->info_lock); \ + mutex_lock(&_info_->info_lock); \ \ /* Don't allow the kernel to start a write in the red zone */ \ if ((int)(_info_->info_head - _info_->info_buffer) > \ @@ -148,7 +148,7 @@ typedef struct splat_info { _info_->info_head += _rc_; \ } \ \ - spin_unlock(&_info_->info_lock); \ + mutex_unlock(&_info_->info_lock); \ _rc_; \ }) From b8296bf3e664f1e583335c2ca3287199eb4e3863 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 2 Nov 2012 14:14:53 -0700 Subject: [PATCH 0655/1062] splat atomic:64-bit: Create thread outside spin lock The Fedora 3.6 debug kernel identified the following issue where we create a thread under a spin lock. This isn't safe because sleeping could result in a deadlock. Therefore the lock is changed to a mutex so it's safe to sleep. BUG: sleeping function called from invalid context at mm/slub.c:930 in_atomic(): 1, irqs_disabled(): 0, pid: 10583, name: splat 1 lock held by splat/10583: Signed-off-by: Brian Behlendorf --- module/splat/splat-atomic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index cdb3353f9..efb01578a 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -51,7 +51,7 @@ typedef enum { typedef struct atomic_priv { unsigned long ap_magic; struct file *ap_file; - spinlock_t ap_lock; + struct mutex ap_lock; wait_queue_head_t ap_waitq; volatile uint64_t ap_atomic; volatile uint64_t ap_atomic_exited; @@ -69,10 +69,10 @@ splat_atomic_work(void *priv) ap = (atomic_priv_t *)priv; ASSERT(ap->ap_magic == SPLAT_ATOMIC_TEST_MAGIC); - spin_lock(&ap->ap_lock); + mutex_lock(&ap->ap_lock); op = ap->ap_op; wake_up(&ap->ap_waitq); - spin_unlock(&ap->ap_lock); + mutex_unlock(&ap->ap_lock); splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, "Thread %d successfully started: %lu/%lu\n", op, @@ -142,13 +142,13 @@ splat_atomic_test1(struct file *file, void *arg) ap.ap_magic = SPLAT_ATOMIC_TEST_MAGIC; ap.ap_file = file; - spin_lock_init(&ap.ap_lock); + mutex_init(&ap.ap_lock); init_waitqueue_head(&ap.ap_waitq); ap.ap_atomic = SPLAT_ATOMIC_INIT_VALUE; ap.ap_atomic_exited = 0; for (i = 0; i < SPLAT_ATOMIC_COUNT_64; i++) { - spin_lock(&ap.ap_lock); + mutex_lock(&ap.ap_lock); ap.ap_op = i; thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work, @@ -156,14 +156,14 @@ splat_atomic_test1(struct file *file, void *arg) minclsyspri); if (thr == NULL) { rc = -ESRCH; - spin_unlock(&ap.ap_lock); + mutex_unlock(&ap.ap_lock); break; } /* Prepare to wait, the new thread will wake us once it * has made a copy of the unique private passed data */ prepare_to_wait(&ap.ap_waitq, &wait, TASK_UNINTERRUPTIBLE); - spin_unlock(&ap.ap_lock); + mutex_unlock(&ap.ap_lock); schedule(); } From 1112486356252d4bd1f9d62b3931314e7dc05a32 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 2 Nov 2012 16:13:50 -0700 Subject: [PATCH 0656/1062] splat kmem:slab_overcommit: Disabled Disable this test because it may result in an OOM event on the system which can result in the test infrastructure being killed. Signed-off-by: Brian Behlendorf --- module/splat/splat-kmem.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index f1c4613fa..30750aa01 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -71,11 +71,11 @@ #define SPLAT_KMEM_TEST10_NAME "slab_lock" #define SPLAT_KMEM_TEST10_DESC "Slab locking test" -#ifdef _LP64 +#if 0 #define SPLAT_KMEM_TEST11_ID 0x010b #define SPLAT_KMEM_TEST11_NAME "slab_overcommit" #define SPLAT_KMEM_TEST11_DESC "Slab memory overcommit test" -#endif /* _LP64 */ +#endif #define SPLAT_KMEM_TEST12_ID 0x010c #define SPLAT_KMEM_TEST12_NAME "vmem_size" @@ -1008,7 +1008,7 @@ splat_kmem_test10(struct file *file, void *arg) return rc; } -#ifdef _LP64 +#if 0 /* * This test creates N threads with a shared kmem cache which overcommits * memory by 4x. This makes it impossible for the slab to satify the @@ -1039,7 +1039,7 @@ splat_kmem_test11(struct file *file, void *arg) return rc; } -#endif /* _LP64 */ +#endif /* * Check vmem_size() behavior by acquiring the alloc/free/total vmem @@ -1292,10 +1292,10 @@ splat_kmem_init(void) SPLAT_KMEM_TEST9_ID, splat_kmem_test9); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST10_NAME, SPLAT_KMEM_TEST10_DESC, SPLAT_KMEM_TEST10_ID, splat_kmem_test10); -#ifdef _LP64 +#if 0 SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, SPLAT_KMEM_TEST11_ID, splat_kmem_test11); -#endif /* _LP64 */ +#endif SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST12_NAME, SPLAT_KMEM_TEST12_DESC, SPLAT_KMEM_TEST12_ID, splat_kmem_test12); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST13_NAME, SPLAT_KMEM_TEST13_DESC, @@ -1310,9 +1310,9 @@ splat_kmem_fini(splat_subsystem_t *sub) ASSERT(sub); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST13_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST12_ID); -#ifdef _LP64 +#if 0 SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST11_ID); -#endif /* _LP64 */ +#endif SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST10_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST9_ID); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST8_ID); From 165f13c33abadc06ccaea1c4f654fddfa316a80f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Oct 2012 16:51:59 -0700 Subject: [PATCH 0657/1062] Improved vmem cached deadlock detection The entire goal of performing the slab allocations asynchronously is to be able to detect when a vmalloc() deadlocks. In this case, and only this case, do we want to start allocating emergency objects. The trick here is to minimize false positives because the overhead of tracking emergency objects is far higher than normal slab objects. With that goal in mind the code was reworked to be less sensitive to slow allocations by increasing the wait time. Once a cache is is marked deadlocked all subsequent allocations which can not be satisfied with existing cache objects will immediately allocate new emergency objects. This behavior persists until the asynchronous allocation completes and clears the deadlocked flag. The result of these tweaks is that far fewer emergency objects get created which is important because this minimizes the cost of releasing them latter in kmem_cache_free(). Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 3 +++ module/spl/spl-kmem.c | 35 +++++++++++++++++++++++++---------- module/spl/spl-proc.c | 9 ++++++--- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index e71a443a0..b0f4208bd 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -340,6 +340,7 @@ enum { KMC_BIT_VMEM = 6, /* Use vmem cache */ KMC_BIT_OFFSLAB = 7, /* Objects not on slab */ KMC_BIT_NOEMERGENCY = 8, /* Disable emergency objects */ + KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */ KMC_BIT_GROWING = 15, /* Growing in progress */ KMC_BIT_REAPING = 16, /* Reaping in progress */ KMC_BIT_DESTROY = 17, /* Destroy in progress */ @@ -366,6 +367,7 @@ typedef enum kmem_cbrc { #define KMC_VMEM (1 << KMC_BIT_VMEM) #define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) #define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY) +#define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED) #define KMC_GROWING (1 << KMC_BIT_GROWING) #define KMC_REAPING (1 << KMC_BIT_REAPING) #define KMC_DESTROY (1 << KMC_BIT_DESTROY) @@ -473,6 +475,7 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_total; /* Obj total current */ uint64_t skc_obj_alloc; /* Obj alloc current */ uint64_t skc_obj_max; /* Obj max historic */ + uint64_t skc_obj_deadlock; /* Obj emergency deadlocks */ uint64_t skc_obj_emergency; /* Obj emergency current */ uint64_t skc_obj_emergency_max; /* Obj emergency max */ } spl_kmem_cache_t; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index eca809c47..045075cc0 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1495,6 +1495,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_total = 0; skc->skc_obj_alloc = 0; skc->skc_obj_max = 0; + skc->skc_obj_deadlock = 0; skc->skc_obj_emergency = 0; skc->skc_obj_emergency_max = 0; @@ -1662,6 +1663,7 @@ spl_cache_grow_work(void *data) atomic_dec(&skc->skc_ref); clear_bit(KMC_BIT_GROWING, &skc->skc_flags); + clear_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); wake_up_all(&skc->skc_waitq); spin_unlock(&skc->skc_lock); @@ -1683,7 +1685,7 @@ spl_cache_grow_wait(spl_kmem_cache_t *skc) static int spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) { - int remaining, rc = 0; + int remaining, rc; SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -1722,17 +1724,30 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) } /* - * Allow a single timer tick before falling back to synchronously - * allocating the minimum about of memory required by the caller. + * The goal here is to only detect the rare case where a virtual slab + * allocation has deadlocked. We must be careful to minimize the use + * of emergency objects which are more expensive to track. Therefore, + * we set a very long timeout for the asynchronous allocation and if + * the timeout is reached the cache is flagged as deadlocked. From + * this point only new emergency objects will be allocated until the + * asynchronous allocation completes and clears the deadlocked flag. */ - remaining = wait_event_timeout(skc->skc_waitq, - spl_cache_grow_wait(skc), 1); + if (test_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags)) { + rc = spl_emergency_alloc(skc, flags, obj); + } else { + remaining = wait_event_timeout(skc->skc_waitq, + spl_cache_grow_wait(skc), HZ); - if (remaining == 0) { - if (test_bit(KMC_BIT_NOEMERGENCY, &skc->skc_flags)) - rc = -ENOMEM; - else - rc = spl_emergency_alloc(skc, flags, obj); + if (!remaining && test_bit(KMC_BIT_VMEM, &skc->skc_flags)) { + spin_lock(&skc->skc_lock); + if (test_bit(KMC_BIT_GROWING, &skc->skc_flags)) { + set_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); + skc->skc_obj_deadlock++; + } + spin_unlock(&skc->skc_lock); + } + + rc = -ENOMEM; } SRETURN(rc); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 11a2d1068..152abff7f 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -625,12 +625,14 @@ slab_seq_show_headers(struct seq_file *f) "--------------------- cache ----------" "--------------------------------------------- " "----- slab ------ " - "---- object -----------------\n"); + "---- object ----- " + "--- emergency ---\n"); seq_printf(f, "name " " flags size alloc slabsize objsize " "total alloc max " - "total alloc max emerg max\n"); + "total alloc max " + "dlock alloc max\n"); } static int @@ -643,7 +645,7 @@ slab_seq_show(struct seq_file *f, void *p) spin_lock(&skc->skc_lock); seq_printf(f, "%-36s ", skc->skc_name); seq_printf(f, "0x%05lx %9lu %9lu %8u %8u " - "%5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu\n", + "%5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu\n", (long unsigned)skc->skc_flags, (long unsigned)(skc->skc_slab_size * skc->skc_slab_total), (long unsigned)(skc->skc_obj_size * skc->skc_obj_alloc), @@ -655,6 +657,7 @@ slab_seq_show(struct seq_file *f, void *p) (long unsigned)skc->skc_obj_total, (long unsigned)skc->skc_obj_alloc, (long unsigned)skc->skc_obj_max, + (long unsigned)skc->skc_obj_deadlock, (long unsigned)skc->skc_obj_emergency, (long unsigned)skc->skc_obj_emergency_max); From ed3163484d2e70df8d9c50bad9678891b26c0fa0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Oct 2012 10:45:50 -0700 Subject: [PATCH 0658/1062] Track emergency object in rbtree In the initial implementation emergency objects were tracked on a per-cache list. The assumption was that under normal operation we would never allocate more than a handful of these objects. So the cost of walking the list during free was expected to be negligible. However real world usage has shown that emergency objects tend to be allocated in batches. A deadlock will be detected and several thousand emergency objects will be allocated before the original blocked slab allocation can complete. Therefore the original list has been replaced by a red black tree which is sorted by the memory address of each allocated object. This bounds the worst case insertion and removal time to O(log n) which minimize contention on the assoicated spin lock. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 5 ++- module/spl/spl-kmem.c | 98 +++++++++++++++++++++++++++++++------------ 2 files changed, 75 insertions(+), 28 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index b0f4208bd..83adc8d2a 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -435,8 +436,8 @@ typedef struct spl_kmem_alloc { } spl_kmem_alloc_t; typedef struct spl_kmem_emergency { + struct rb_node ske_node; /* Emergency tree linkage */ void *ske_obj; /* Buffer address */ - struct list_head ske_list; /* Emergency list linkage */ } spl_kmem_emergency_t; typedef struct spl_kmem_cache { @@ -463,7 +464,7 @@ typedef struct spl_kmem_cache { struct list_head skc_list; /* List of caches linkage */ struct list_head skc_complete_list;/* Completely alloc'ed */ struct list_head skc_partial_list; /* Partially alloc'ed */ - struct list_head skc_emergency_list; /* Min sized objects */ + struct rb_root skc_emergency_tree; /* Min sized objects */ spinlock_t skc_lock; /* Cache lock */ wait_queue_head_t skc_waitq; /* Allocation waiters */ uint64_t skc_slab_fail; /* Slab alloc failures */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 045075cc0..7e68522ad 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1116,8 +1116,54 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) SEXIT; } +static spl_kmem_emergency_t * +spl_emergency_search(struct rb_root *root, void *obj) +{ + struct rb_node *node = root->rb_node; + spl_kmem_emergency_t *ske; + unsigned long address = (unsigned long)obj; + + while (node) { + ske = container_of(node, spl_kmem_emergency_t, ske_node); + + if (address < (unsigned long)ske->ske_obj) + node = node->rb_left; + else if (address > (unsigned long)ske->ske_obj) + node = node->rb_right; + else + return ske; + } + + return NULL; +} + +static int +spl_emergency_insert(struct rb_root *root, spl_kmem_emergency_t *ske) +{ + struct rb_node **new = &(root->rb_node), *parent = NULL; + spl_kmem_emergency_t *ske_tmp; + unsigned long address = (unsigned long)ske->ske_obj; + + while (*new) { + ske_tmp = container_of(*new, spl_kmem_emergency_t, ske_node); + + parent = *new; + if (address < (unsigned long)ske_tmp->ske_obj) + new = &((*new)->rb_left); + else if (address > (unsigned long)ske_tmp->ske_obj) + new = &((*new)->rb_right); + else + return 0; + } + + rb_link_node(&ske->ske_node, parent, new); + rb_insert_color(&ske->ske_node, root); + + return 1; +} + /* - * Allocate a single emergency object for use by the caller. + * Allocate a single emergency object and track it in a red black tree. */ static int spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) @@ -1143,48 +1189,49 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) SRETURN(-ENOMEM); } + spin_lock(&skc->skc_lock); + empty = spl_emergency_insert(&skc->skc_emergency_tree, ske); + if (likely(empty)) { + skc->skc_obj_total++; + skc->skc_obj_emergency++; + if (skc->skc_obj_emergency > skc->skc_obj_emergency_max) + skc->skc_obj_emergency_max = skc->skc_obj_emergency; + } + spin_unlock(&skc->skc_lock); + + if (unlikely(!empty)) { + kfree(ske->ske_obj); + kfree(ske); + SRETURN(-EINVAL); + } + if (skc->skc_ctor) skc->skc_ctor(ske->ske_obj, skc->skc_private, flags); - spin_lock(&skc->skc_lock); - skc->skc_obj_total++; - skc->skc_obj_emergency++; - if (skc->skc_obj_emergency > skc->skc_obj_emergency_max) - skc->skc_obj_emergency_max = skc->skc_obj_emergency; - - list_add(&ske->ske_list, &skc->skc_emergency_list); - spin_unlock(&skc->skc_lock); - *obj = ske->ske_obj; SRETURN(0); } /* - * Free the passed object if it is an emergency object or a normal slab - * object. Currently this is done by walking what should be a short list of - * emergency objects. If this proves to be too inefficient we can replace - * the simple list with a hash. + * Locate the passed object in the red black tree and free it. */ static int spl_emergency_free(spl_kmem_cache_t *skc, void *obj) { - spl_kmem_emergency_t *m, *n, *ske = NULL; + spl_kmem_emergency_t *ske; SENTRY; spin_lock(&skc->skc_lock); - list_for_each_entry_safe(m, n, &skc->skc_emergency_list, ske_list) { - if (m->ske_obj == obj) { - list_del(&m->ske_list); - skc->skc_obj_emergency--; - skc->skc_obj_total--; - ske = m; - break; - } + ske = spl_emergency_search(&skc->skc_emergency_tree, obj); + if (likely(ske)) { + rb_erase(&ske->ske_node, &skc->skc_emergency_tree); + skc->skc_obj_emergency--; + skc->skc_obj_total--; } spin_unlock(&skc->skc_lock); - if (ske == NULL) + if (unlikely(ske == NULL)) SRETURN(-ENOENT); if (skc->skc_dtor) @@ -1483,7 +1530,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, INIT_LIST_HEAD(&skc->skc_list); INIT_LIST_HEAD(&skc->skc_complete_list); INIT_LIST_HEAD(&skc->skc_partial_list); - INIT_LIST_HEAD(&skc->skc_emergency_list); + skc->skc_emergency_tree = RB_ROOT; spin_lock_init(&skc->skc_lock); init_waitqueue_head(&skc->skc_waitq); skc->skc_slab_fail = 0; @@ -1590,7 +1637,6 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) ASSERT3U(skc->skc_obj_total, ==, 0); ASSERT3U(skc->skc_obj_emergency, ==, 0); ASSERT(list_empty(&skc->skc_complete_list)); - ASSERT(list_empty(&skc->skc_emergency_list)); kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); From a1af8fb1eaa08e55f6e0799779a89f455a5017f2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Oct 2012 11:21:42 -0700 Subject: [PATCH 0659/1062] Optimize spl_kmem_cache_free() Because only virtual slabs may have emergency objects and these objects are guaranteed to have physical addresses. It can be easily determined if the passed object is a virtual slab object or an emergency object. This allows us to completely optimize the emergency object free case out of the common free path. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 7e68522ad..5627b5590 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2023,11 +2023,12 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) atomic_inc(&skc->skc_ref); /* - * Emergency objects are never part of the virtual address space - * so if we get a virtual address we can optimize this check out. + * Only virtual slabs may have emergency objects and these objects + * are guaranteed to have physical addresses. They must be removed + * from the tree of emergency objects and the freed. */ - if (!kmem_virt(obj) && !spl_emergency_free(skc, obj)) - SGOTO(out, 0); + if ((skc->skc_flags & KMC_VMEM) && !kmem_virt(obj)) + SGOTO(out, spl_emergency_free(skc, obj)); local_irq_save(flags); From dc1b30224f9b1587dbe383d9c8e16caa4b1f71d3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Nov 2012 13:54:20 -0800 Subject: [PATCH 0660/1062] Never spin in kmem_cache_alloc() If we are reaping from the cache and a concurrent allocation occurs then the caller must block until the reaping is complete. This is signaled by the clearing of the KMC_BIT_REAPING bit. Otherwise the caller will be in a tight loop which takes and releases the skc->skc_cache lock. When there are multiple concurrent callers the system will thrash on the lock and appear to lock up. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 5627b5590..f3113e0f4 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1725,6 +1725,13 @@ spl_cache_grow_wait(spl_kmem_cache_t *skc) return !test_bit(KMC_BIT_GROWING, &skc->skc_flags); } +static int +spl_cache_reclaim_wait(void *word) +{ + schedule(); + return 0; +} + /* * No available objects on any slabs, create a new slab. */ @@ -1739,12 +1746,14 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) *obj = NULL; /* - * Before allocating a new slab check if the slab is being reaped. - * If it is there is a good chance we can wait until it finishes - * and then use one of the newly freed but not aged-out slabs. + * Before allocating a new slab wait for any reaping to complete and + * then return so the local magazine can be rechecked for new objects. */ - if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) - SRETURN(-EAGAIN); + if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { + rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, + spl_cache_reclaim_wait, TASK_UNINTERRUPTIBLE); + SRETURN(rc ? rc : -EAGAIN); + } /* * This is handled by dispatching a work request to the global work @@ -2156,6 +2165,9 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) /* Reclaim from the cache, ignoring it's age and delay. */ spl_slab_reclaim(skc, count, 1); clear_bit(KMC_BIT_REAPING, &skc->skc_flags); + smp_mb__after_clear_bit(); + wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); + atomic_dec(&skc->skc_ref); SEXIT; From e71a4534b340228d2e73bdadacaff570ade5ab6a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 13 Nov 2012 14:28:25 -0800 Subject: [PATCH 0661/1062] SPL 0.6.0-rc12 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index cf77d076e..16f6fdef3 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc11 +Release: rc12 Release-Tags: relext From 043f9b57247eafb8e28e7b9465470ece87090228 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 26 Nov 2012 16:52:28 -0800 Subject: [PATCH 0662/1062] Disable FS reclaim when allocating new slabs Allowing the spl_cache_grow_work() function to reclaim inodes allows for two unlikely deadlocks. Therefore, we clear __GFP_FS for these allocations. The two deadlocks are: * While holding the ZFS_OBJ_HOLD_ENTER(zsb, obj1) lock a function calls kmem_cache_alloc() which happens to need to allocate a new slab. To allocate the new slab we enter FS level reclaim and attempt to evict several inodes. To evict these inodes we need to take the ZFS_OBJ_HOLD_ENTER(zsb, obj2) lock and it just happens that obj1 and obj2 use the same hashed lock. * Similar to the first case however instead of getting blocked on the hash lock we block in txg_wait_open() which is waiting for the next txg which isn't coming because the txg_sync thread is blocked in kmem_cache_alloc(). Note this isn't a 100% fix because vmalloc() won't strictly honor __GFP_FS. However, it practice this is sufficient because several very unlikely things must all occur concurrently. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#1101 --- module/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f3113e0f4..b171d446a 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1773,7 +1773,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) atomic_inc(&skc->skc_ref); ska->ska_cache = skc; - ska->ska_flags = flags; + ska->ska_flags = flags & ~__GFP_FS; spl_init_delayed_work(&ska->ska_work, spl_cache_grow_work, ska); schedule_delayed_work(&ska->ska_work, 0); } From 251677e98fd41170a885095626a9247d609661b0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 29 Nov 2012 19:26:19 -0800 Subject: [PATCH 0663/1062] Verify --with-linux source directory exists Previously this check was only performed when ./configure was attempting to autodetect your kernel source directory. But we should also handle the case where --with-linux was provided and is obviously wrong. This way we catch the error before invoking make and compiling the source with an incorrect autoconf results. Signed-off-by: Brian Behlendorf Closes #162 --- config/spl-build.m4 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 957d46c48..e8ecbc654 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -141,11 +141,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ if test -n "$sourcelink" && test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else - AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([ - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option.]) + kernelsrc="[Not found]" fi else if test "$kernelsrc" = "NONE"; then @@ -154,6 +150,13 @@ AC_DEFUN([SPL_AC_KERNEL], [ fi AC_MSG_RESULT([$kernelsrc]) + if test ! -d "$kernelsrc"; then + AC_MSG_ERROR([ + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option.]) + fi + AC_MSG_CHECKING([kernel build directory]) if test -z "$kernelbuild"; then if test -e "/lib/modules/$(uname -r)/build"; then From b84412a6e8a1d22780a8203e00049c6e43efacac Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 30 Nov 2012 15:46:30 -0800 Subject: [PATCH 0664/1062] Linux compat 3.7, kernel_thread() The preferred kernel interface for creating threads has been kthread_create() for a long time now. However, several of the SPLAT tests still use the legacy kernel_thread() function which has finally been dropped (mostly). Update the condvar and rwlock SPLAT tests to use the modern interface. Frankly this is something we should have done a long time ago. Signed-off-by: Brian Behlendorf Closes #194 --- module/splat/splat-condvar.c | 70 ++++++++++++++++++------------------ module/splat/splat-rwlock.c | 57 ++++++++++++++--------------- 2 files changed, 61 insertions(+), 66 deletions(-) diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index 69fefc955..1fe306cb2 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -24,6 +24,7 @@ * Solaris Porting LAyer Tests (SPLAT) Condition Variable Tests. \*****************************************************************************/ +#include #include #include "splat-internal.h" @@ -51,20 +52,20 @@ #define SPLAT_CONDVAR_TEST5_DESC "Timeout thread, cv_wait_timeout()" #define SPLAT_CONDVAR_TEST_MAGIC 0x115599DDUL -#define SPLAT_CONDVAR_TEST_NAME "condvar_test" +#define SPLAT_CONDVAR_TEST_NAME "condvar" #define SPLAT_CONDVAR_TEST_COUNT 8 typedef struct condvar_priv { - unsigned long cv_magic; - struct file *cv_file; + unsigned long cv_magic; + struct file *cv_file; kcondvar_t cv_condvar; kmutex_t cv_mtx; } condvar_priv_t; typedef struct condvar_thr { - int ct_id; const char *ct_name; condvar_priv_t *ct_cvp; + struct task_struct *ct_thread; int ct_rc; } condvar_thr_t; @@ -73,20 +74,17 @@ splat_condvar_test12_thread(void *arg) { condvar_thr_t *ct = (condvar_thr_t *)arg; condvar_priv_t *cv = ct->ct_cvp; - char name[16]; ASSERT(cv->cv_magic == SPLAT_CONDVAR_TEST_MAGIC); - snprintf(name, sizeof(name),"%s%d",SPLAT_CONDVAR_TEST_NAME,ct->ct_id); - daemonize(name); mutex_enter(&cv->cv_mtx); splat_vprint(cv->cv_file, ct->ct_name, - "%s thread sleeping with %d waiters\n", - name, atomic_read(&cv->cv_condvar.cv_waiters)); + "%s thread sleeping with %d waiters\n", + ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters)); cv_wait(&cv->cv_condvar, &cv->cv_mtx); splat_vprint(cv->cv_file, ct->ct_name, - "%s thread woken %d waiters remain\n", - name, atomic_read(&cv->cv_condvar.cv_waiters)); + "%s thread woken %d waiters remain\n", + ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters)); mutex_exit(&cv->cv_mtx); return 0; @@ -96,7 +94,6 @@ static int splat_condvar_test1(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[SPLAT_CONDVAR_TEST_COUNT]; condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; @@ -109,13 +106,15 @@ splat_condvar_test1(struct file *file, void *arg) * long as we know how many we managed to create and should expect. */ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; - ct[i].ct_id = i; ct[i].ct_name = SPLAT_CONDVAR_TEST1_NAME; ct[i].ct_rc = 0; + ct[i].ct_thread = kthread_create(splat_condvar_test12_thread, + &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - pids[i] = kernel_thread(splat_condvar_test12_thread, &ct[i], 0); - if (pids[i] >= 0) + if (!IS_ERR(ct[i].ct_thread)) { + wake_up_process(ct[i].ct_thread); count++; + } } /* Wait until all threads are waiting on the condition variable */ @@ -160,7 +159,6 @@ static int splat_condvar_test2(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[SPLAT_CONDVAR_TEST_COUNT]; condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; @@ -173,13 +171,15 @@ splat_condvar_test2(struct file *file, void *arg) * long as we know how many we managed to create and should expect. */ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; - ct[i].ct_id = i; ct[i].ct_name = SPLAT_CONDVAR_TEST2_NAME; ct[i].ct_rc = 0; + ct[i].ct_thread = kthread_create(splat_condvar_test12_thread, + &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - pids[i] = kernel_thread(splat_condvar_test12_thread, &ct[i], 0); - if (pids[i] > 0) + if (!IS_ERR(ct[i].ct_thread)) { + wake_up_process(ct[i].ct_thread); count++; + } } /* Wait until all threads are waiting on the condition variable */ @@ -208,17 +208,14 @@ splat_condvar_test34_thread(void *arg) { condvar_thr_t *ct = (condvar_thr_t *)arg; condvar_priv_t *cv = ct->ct_cvp; - char name[16]; clock_t rc; ASSERT(cv->cv_magic == SPLAT_CONDVAR_TEST_MAGIC); - snprintf(name, sizeof(name), "%s%d", SPLAT_CONDVAR_TEST_NAME, ct->ct_id); - daemonize(name); mutex_enter(&cv->cv_mtx); splat_vprint(cv->cv_file, ct->ct_name, - "%s thread sleeping with %d waiters\n", - name, atomic_read(&cv->cv_condvar.cv_waiters)); + "%s thread sleeping with %d waiters\n", + ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters)); /* Sleep no longer than 3 seconds, for this test we should * actually never sleep that long without being woken up. */ @@ -226,11 +223,12 @@ splat_condvar_test34_thread(void *arg) if (rc == -1) { ct->ct_rc = -ETIMEDOUT; splat_vprint(cv->cv_file, ct->ct_name, "%s thread timed out, " - "should have been woken\n", name); + "should have been woken\n", ct->ct_thread->comm); } else { splat_vprint(cv->cv_file, ct->ct_name, - "%s thread woken %d waiters remain\n", - name, atomic_read(&cv->cv_condvar.cv_waiters)); + "%s thread woken %d waiters remain\n", + ct->ct_thread->comm, + atomic_read(&cv->cv_condvar.cv_waiters)); } mutex_exit(&cv->cv_mtx); @@ -242,7 +240,6 @@ static int splat_condvar_test3(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[SPLAT_CONDVAR_TEST_COUNT]; condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; @@ -255,13 +252,15 @@ splat_condvar_test3(struct file *file, void *arg) * long as we know how many we managed to create and should expect. */ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; - ct[i].ct_id = i; ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; ct[i].ct_rc = 0; + ct[i].ct_thread = kthread_create(splat_condvar_test34_thread, + &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - pids[i] = kernel_thread(splat_condvar_test34_thread, &ct[i], 0); - if (pids[i] >= 0) + if (!IS_ERR(ct[i].ct_thread)) { + wake_up_process(ct[i].ct_thread); count++; + } } /* Wait until all threads are waiting on the condition variable */ @@ -311,7 +310,6 @@ static int splat_condvar_test4(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[SPLAT_CONDVAR_TEST_COUNT]; condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; condvar_priv_t cv; @@ -324,13 +322,15 @@ splat_condvar_test4(struct file *file, void *arg) * long as we know how many we managed to create and should expect. */ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { ct[i].ct_cvp = &cv; - ct[i].ct_id = i; ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; ct[i].ct_rc = 0; + ct[i].ct_thread = kthread_create(splat_condvar_test34_thread, + &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - pids[i] = kernel_thread(splat_condvar_test34_thread, &ct[i], 0); - if (pids[i] >= 0) + if (!IS_ERR(ct[i].ct_thread)) { + wake_up_process(ct[i].ct_thread); count++; + } } /* Wait until all threads are waiting on the condition variable */ diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 9e335d756..f4a010969 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -82,7 +82,7 @@ typedef struct rw_priv { typedef struct rw_thr { const char *rwt_name; rw_priv_t *rwt_rwp; - int rwt_id; + struct task_struct *rwt_thread; } rw_thr_t; void splat_init_rw_priv(rw_priv_t *rwp, struct file *file) @@ -106,17 +106,15 @@ splat_rwlock_wr_thr(void *arg) rw_thr_t *rwt = (rw_thr_t *)arg; rw_priv_t *rwp = rwt->rwt_rwp; uint8_t rnd; - char name[16]; ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - snprintf(name, sizeof(name), "rwlock_wr_thr%d", rwt->rwt_id); - daemonize(name); + get_random_bytes((void *)&rnd, 1); msleep((unsigned int)rnd); splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s trying to acquire rwlock (%d holding/%d waiting)\n", - name, rwp->rw_holders, rwp->rw_waiters); + "%s trying to acquire rwlock (%d holding/%d waiting)\n", + rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); spin_lock(&rwp->rw_lock); rwp->rw_waiters++; spin_unlock(&rwp->rw_lock); @@ -127,20 +125,20 @@ splat_rwlock_wr_thr(void *arg) rwp->rw_holders++; spin_unlock(&rwp->rw_lock); splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s acquired rwlock (%d holding/%d waiting)\n", - name, rwp->rw_holders, rwp->rw_waiters); + "%s acquired rwlock (%d holding/%d waiting)\n", + rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); /* Wait for control thread to signal we can release the write lock */ wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, - rwp->rw_release == SPLAT_RWLOCK_RELEASE_WR)); + rwp->rw_release == SPLAT_RWLOCK_RELEASE_WR)); spin_lock(&rwp->rw_lock); rwp->rw_completed++; rwp->rw_holders--; spin_unlock(&rwp->rw_lock); splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s dropped rwlock (%d holding/%d waiting)\n", - name, rwp->rw_holders, rwp->rw_waiters); + "%s dropped rwlock (%d holding/%d waiting)\n", + rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); rw_exit(&rwp->rw_rwlock); @@ -153,21 +151,19 @@ splat_rwlock_rd_thr(void *arg) rw_thr_t *rwt = (rw_thr_t *)arg; rw_priv_t *rwp = rwt->rwt_rwp; uint8_t rnd; - char name[16]; ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - snprintf(name, sizeof(name), "rwlock_rd_thr%d", rwt->rwt_id); - daemonize(name); + get_random_bytes((void *)&rnd, 1); msleep((unsigned int)rnd); /* Don't try and take the semaphore until after someone has it */ - wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, - rwp->rw_holders > 0)); + wait_event_interruptible(rwp->rw_waitq, + splat_locked_test(&rwp->rw_lock, rwp->rw_holders > 0)); splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s trying to acquire rwlock (%d holding/%d waiting)\n", - name, rwp->rw_holders, rwp->rw_waiters); + "%s trying to acquire rwlock (%d holding/%d waiting)\n", + rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); spin_lock(&rwp->rw_lock); rwp->rw_waiters++; spin_unlock(&rwp->rw_lock); @@ -178,20 +174,20 @@ splat_rwlock_rd_thr(void *arg) rwp->rw_holders++; spin_unlock(&rwp->rw_lock); splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s acquired rwlock (%d holding/%d waiting)\n", - name, rwp->rw_holders, rwp->rw_waiters); + "%s acquired rwlock (%d holding/%d waiting)\n", + rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); /* Wait for control thread to signal we can release the read lock */ wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, - rwp->rw_release == SPLAT_RWLOCK_RELEASE_RD)); + rwp->rw_release == SPLAT_RWLOCK_RELEASE_RD)); spin_lock(&rwp->rw_lock); rwp->rw_completed++; rwp->rw_holders--; spin_unlock(&rwp->rw_lock); splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s dropped rwlock (%d holding/%d waiting)\n", - name, rwp->rw_holders, rwp->rw_waiters); + "%s dropped rwlock (%d holding/%d waiting)\n", + rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); rw_exit(&rwp->rw_rwlock); @@ -202,7 +198,6 @@ static int splat_rwlock_test1(struct file *file, void *arg) { int i, count = 0, rc = 0; - long pids[SPLAT_RWLOCK_TEST_COUNT]; rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; rw_priv_t *rwp; @@ -214,22 +209,22 @@ splat_rwlock_test1(struct file *file, void *arg) /* Create some threads, the exact number isn't important just as * long as we know how many we managed to create and should expect. */ - - - for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { rwt[i].rwt_rwp = rwp; - rwt[i].rwt_id = i; rwt[i].rwt_name = SPLAT_RWLOCK_TEST1_NAME; /* The first thread will be the writer */ if (i == 0) - pids[i] = kernel_thread(splat_rwlock_wr_thr, &rwt[i], 0); + rwt[i].rwt_thread = kthread_create(splat_rwlock_wr_thr, + &rwt[i], "%s/%d", SPLAT_RWLOCK_TEST_NAME, i); else - pids[i] = kernel_thread(splat_rwlock_rd_thr, &rwt[i], 0); + rwt[i].rwt_thread = kthread_create(splat_rwlock_rd_thr, + &rwt[i], "%s/%d", SPLAT_RWLOCK_TEST_NAME, i); - if (pids[i] >= 0) + if (!IS_ERR(rwt[i].rwt_thread)) { + wake_up_process(rwt[i].rwt_thread); count++; + } } /* Wait for the writer */ From 053678f3b0572db442551dfa547dea939f45c96b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 3 Dec 2012 12:01:28 -0800 Subject: [PATCH 0665/1062] Handle errors from spl_kern_path_locked() When the Linux 3.6 KERN_PATH_LOCKED compatibility code was added by commit bcb1589 an entirely new vn_remove() implementation was added. That function did not properly handle an error from spl_kern_path_locked() which would result in an panic. This patch addresses the issue by returning the error to the caller. Signed-off-by: Brian Behlendorf Closes #187 --- module/spl/spl-vnode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a0fed3201..0ecd9addf 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -332,6 +332,8 @@ vn_remove(const char *path, uio_seg_t seg, int flags) rc = vfs_unlink(parent.dentry->d_inode, dentry); exit1: dput(dentry); + } else { + return (-rc); } spl_inode_unlock(parent.dentry->d_inode); From 9b88fa165f320d9fc19d965f0f918511fca460a9 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 5 Dec 2012 11:39:32 +0800 Subject: [PATCH 0666/1062] splat taskq:front: Fix race The taskq:front test has a race condition where task 4 and 8 race to complete, due to an incorrectly calculated set of delay "factors" (T). If task 4 wins and actually finishes first, the verification of the order of completion will fail. The delays calculated to order task completion do not take into account the terminal line in the table, and so are all off by a factor of 1. This causes all the tasks in all queues to finish sooner than expected and the accumulated error is the root cause of tasks 4 and 8 racing to complete first. Before the change the "actual" table looks like I commented in #130. I changed: * the table in the comment to correctly reflect the test and the factor timings needed. * the individual task delay factors of T so that ONLY 1 task will every 2T. (on average) * 1T was reduced from 100ms to 50ms. This halves the duration of the test and makes any remaining raciness more likely to cause failures, but it did not cause the test to fail. * simplified the delay factor logic by using a table look-up instead of a switch. * Added a "task started" message so that with -v it is possible to see the order tasks are started. * Moved the "task completed" message inside the spinlock so that with -v the message truly reflects the absolute order of completion as guaranteed by the spinlock. Signed-off-by: Brian Behlendorf Closes #130 --- module/splat/splat-taskq.c | 62 ++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 38b563cc1..b94930cc9 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -754,50 +754,52 @@ splat_taskq_test5(struct file *file, void *arg) * scheduled. Each rows represent one time unit and each column * one of the three worker threads. * - * +-----+ - * | | - * +-----+ | - * | | 5 +-----+ - * | | | | - * | +-----| | - * | 4 | | | - * +-----+ | 8 | - * | | | | - * | | 7 +-----+ - * | | | | - * | |-----+ | - * | 6 | | | - * +-----+ | | - * | | | | - * | 1 | 2 | 3 | - * +-----+-----+-----+ + * NB: The Horizontal Line is the LAST Time unit consumed by the Task, + * and must be included in the factor calculation. + * T + * 17-> +-----+ + * 16 | T6 | + * 15-> +-----+ | + * 14 | T6 | | + * 13-> | | 5 +-----+ + * 12 | | | T6 | + * 11-> | +-----| | + * 10 | 4 | T6 | | + * 9-> +-----+ | 8 | + * 8 | T5 | | | + * 7-> | | 7 +-----+ + * 6 | | | T7 | + * 5-> | +-----+ | + * 4 | 6 | T5 | | + * 3-> +-----+ | | + * 2 | T3 | | | + * 1 | 1 | 2 | 3 | + * 0 +-----+-----+-----+ * */ static void splat_taskq_test6_func(void *arg) { + /* Delays determined by above table */ + static const int factor[SPLAT_TASKQ_ORDER_MAX+1] = {0,3,5,7,6,6,5,6,6}; + splat_taskq_id_t *tq_id = (splat_taskq_id_t *)arg; splat_taskq_arg_t *tq_arg = tq_id->arg; - int factor; - - /* Delays determined by above table */ - switch (tq_id->id) { - default: factor = 0; break; - case 1: factor = 2; break; - case 2: case 4: case 5: factor = 4; break; - case 6: case 7: case 8: factor = 5; break; - case 3: factor = 6; break; - } - - msleep(factor * 100); splat_vprint(tq_arg->file, tq_arg->name, - "Taskqid %d complete for taskq '%s'\n", + "Taskqid %d starting for taskq '%s'\n", tq_id->id, tq_arg->name); + if (tq_id->id < SPLAT_TASKQ_ORDER_MAX+1) { + msleep(factor[tq_id->id] * 50); + } + spin_lock(&tq_arg->lock); tq_arg->order[tq_arg->flag] = tq_id->id; tq_arg->flag++; + splat_vprint(tq_arg->file, tq_arg->name, + "Taskqid %d complete for taskq '%s'\n", + tq_id->id, tq_arg->name); spin_unlock(&tq_arg->lock); } From 576ec6aac4a4a15754892824643cedb30d652c39 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 7 Dec 2012 09:53:55 -0800 Subject: [PATCH 0667/1062] splat command verbose behavior The splat command takes a verbose option which when set prints the internal debug log for every test. This is helpful when tracking down a common failure, but for a rare failure the volume of log data is distracting. Therefore, the verbose option has been adjusted to allow only printing the debug log on failure. The legacy behavior is still available by specifying the verbose option twice. For example: $ splat -t all:all # Never print the debug log $ splat -v -t all:all # Only print debug log on failure $ splat -vv -t all:all # Always print the debug log Signed-off-by: Brian Behlendorf --- cmd/splat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/splat.c b/cmd/splat.c index 2fa0c50c0..f4caa5639 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -431,7 +431,8 @@ static int test_run(cmd_args_t *args, test_t *test) fflush(stdout); free(cmd); - if (args->args_verbose) { + if ((args->args_verbose == 1 && rc) || + (args->args_verbose >= 2)) { if ((rc = read(splatctl_fd, splat_buffer, splat_buffer_size - 1)) < 0) { fprintf(stdout, "Error reading results: %d\n", rc); From ca072ee70f7beccd33c0363dc7951a10492b4782 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Mon, 3 Dec 2012 16:16:17 +0800 Subject: [PATCH 0668/1062] splat linux:shrinker: Fix race condition Ensure the test thread blocks until the shrinker has completed its work. This is done by putting the test thread to sleep and waking it each time the shrinker callback runs. Once the shrinker size drops to zero or we time out the test is allowed to proceed. Signed-off-by: Brian Behlendorf Closes #96 Closes #125 Closes #182 --- module/splat/splat-linux.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 5303df4e0..6c89fc034 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -86,6 +86,12 @@ splat_linux_test2(struct file *file, void *arg) return 0; } +/* + * Wait queue used to eliminate race between dropping of slab + * and execution of the shrinker callback + */ +DECLARE_WAIT_QUEUE_HEAD(shrinker_wait); + SPL_SHRINKER_CALLBACK_FWD_DECLARE(splat_linux_shrinker_fn); SPL_SHRINKER_DECLARE(splat_linux_shrinker, splat_linux_shrinker_fn, 1); static unsigned long splat_linux_shrinker_size = 0; @@ -116,6 +122,9 @@ __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) return -1; } + /* Shrinker has run, so signal back to test. */ + wake_up(&shrinker_wait); + return (int)splat_linux_shrinker_size; } @@ -183,7 +192,24 @@ splat_linux_test3(struct file *file, void *arg) if (rc) goto out; - if (splat_linux_shrinker_size != 0) { + /* + * By the time we get here, it is possible that the shrinker has not + * yet run. splat_linux_drop_slab sends a signal for it to run, but + * there is no guarantee of when it will actually run. We wait for it + * to run here, terminating when either the shrinker size is now 0 or + * we timeout after 1 second, which should be an eternity (error). + */ + rc = wait_event_timeout(shrinker_wait, !splat_linux_shrinker_size, HZ); + if (!rc) { + splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + "Failed cache shrinking timed out, size now %lu", + splat_linux_shrinker_size); + rc = -ETIMEDOUT; + } else { + rc = 0; + } + + if (!rc && splat_linux_shrinker_size != 0) { splat_vprint(file, SPLAT_LINUX_TEST3_NAME, "Failed cache was not shrunk to 0, size now %lu", splat_linux_shrinker_size); From 794f145bf9f39a0aad44ae66d379104a3dcd8984 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Tue, 4 Dec 2012 08:41:10 +0800 Subject: [PATCH 0669/1062] splat linux:shrinker: Fix fail-safe Ensure the fail-safe is reset between successive tests. Signed-off-by: Brian Behlendorf --- module/splat/splat-linux.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 6c89fc034..76e2398da 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -101,6 +101,17 @@ static int __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) { static int failsafe = 0; + static unsigned long last_splat_linux_shrinker_size = 0; + + /* + * shrinker_size can only decrease or stay the same between callbacks + * in the same run, so Reset failsafe whenever shrinker increases + * as this indicates a new run. + */ + if (last_splat_linux_shrinker_size < splat_linux_shrinker_size) + failsafe = 0; + + last_splat_linux_shrinker_size = splat_linux_shrinker_size; if (sc->nr_to_scan) { splat_linux_shrinker_size = splat_linux_shrinker_size - @@ -115,11 +126,17 @@ __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) } /* Far more calls than expected abort drop_slab as a failsafe */ - if ((++failsafe % 1000) == 0) { + if (failsafe > 100) { splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST3_NAME, "Far more calls than expected (%d), size now %lu\n", failsafe, splat_linux_shrinker_size); return -1; + } else { + /* + * We only increment failsafe if it doesn't trigger. This + * makes any failsafe failure persistent until the next test. + */ + failsafe++; } /* Shrinker has run, so signal back to test. */ @@ -180,7 +197,7 @@ splat_linux_test3(struct file *file, void *arg) */ if (splat_linux_shrinker_size || splat_linux_shrinker_file) { splat_vprint(file, SPLAT_LINUX_TEST3_NAME, - "Failed due to concurrent shrinker test, rc = %d\n", rc); + "Failed due to concurrent shrinker test, rc = %d\n", rc); return (rc); } @@ -202,7 +219,7 @@ splat_linux_test3(struct file *file, void *arg) rc = wait_event_timeout(shrinker_wait, !splat_linux_shrinker_size, HZ); if (!rc) { splat_vprint(file, SPLAT_LINUX_TEST3_NAME, - "Failed cache shrinking timed out, size now %lu", + "Failed cache shrinking timed out, size now %lu", splat_linux_shrinker_size); rc = -ETIMEDOUT; } else { @@ -211,7 +228,7 @@ splat_linux_test3(struct file *file, void *arg) if (!rc && splat_linux_shrinker_size != 0) { splat_vprint(file, SPLAT_LINUX_TEST3_NAME, - "Failed cache was not shrunk to 0, size now %lu", + "Failed cache was not shrunk to 0, size now %lu", splat_linux_shrinker_size); rc = -EDOM; } From 472a34caff3bc8b0f65e7cdb4b5960b0e2d616c2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 6 Dec 2012 12:57:42 -0800 Subject: [PATCH 0670/1062] taskq style, convert spaces to soft tabs Update the taskq implementation to conform with the style used throughout the rest of the code. There are no functional changes in this commit. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 120 +++++++++-------- module/spl/spl-taskq.c | 299 ++++++++++++++++++++--------------------- 2 files changed, 210 insertions(+), 209 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 6b09bdf1b..8260cf935 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -33,71 +33,71 @@ #include #include -#define TASKQ_NAMELEN 31 +#define TASKQ_NAMELEN 31 -#define TASKQ_PREPOPULATE 0x00000001 -#define TASKQ_CPR_SAFE 0x00000002 -#define TASKQ_DYNAMIC 0x00000004 -#define TASKQ_THREADS_CPU_PCT 0x00000008 -#define TASKQ_DC_BATCH 0x00000010 +#define TASKQ_PREPOPULATE 0x00000001 +#define TASKQ_CPR_SAFE 0x00000002 +#define TASKQ_DYNAMIC 0x00000004 +#define TASKQ_THREADS_CPU_PCT 0x00000008 +#define TASKQ_DC_BATCH 0x00000010 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); typedef struct taskq_ent { - spinlock_t tqent_lock; - struct list_head tqent_list; - taskqid_t tqent_id; - task_func_t *tqent_func; - void *tqent_arg; - uintptr_t tqent_flags; + spinlock_t tqent_lock; + struct list_head tqent_list; + taskqid_t tqent_id; + task_func_t *tqent_func; + void *tqent_arg; + uintptr_t tqent_flags; } taskq_ent_t; -#define TQENT_FLAG_PREALLOC 0x1 +#define TQENT_FLAG_PREALLOC 0x1 /* * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as * KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly * large so as not to conflict with already used GFP_* defines. */ -#define TQ_SLEEP 0x00000000 -#define TQ_NOSLEEP 0x00000001 -#define TQ_PUSHPAGE 0x00000002 -#define TQ_NOQUEUE 0x01000000 -#define TQ_NOALLOC 0x02000000 -#define TQ_NEW 0x04000000 -#define TQ_FRONT 0x08000000 -#define TQ_ACTIVE 0x80000000 +#define TQ_SLEEP 0x00000000 +#define TQ_NOSLEEP 0x00000001 +#define TQ_PUSHPAGE 0x00000002 +#define TQ_NOQUEUE 0x01000000 +#define TQ_NOALLOC 0x02000000 +#define TQ_NEW 0x04000000 +#define TQ_FRONT 0x08000000 +#define TQ_ACTIVE 0x80000000 typedef struct taskq { - spinlock_t tq_lock; /* protects taskq_t */ - unsigned long tq_lock_flags; /* interrupt state */ - const char *tq_name; /* taskq name */ - struct list_head tq_thread_list;/* list of all threads */ - struct list_head tq_active_list;/* list of active threads */ - int tq_nactive; /* # of active threads */ - int tq_nthreads; /* # of total threads */ - int tq_pri; /* priority */ - int tq_minalloc; /* min task_t pool size */ - int tq_maxalloc; /* max task_t pool size */ - int tq_nalloc; /* cur task_t pool size */ - uint_t tq_flags; /* flags */ - taskqid_t tq_next_id; /* next pend/work id */ - taskqid_t tq_lowest_id; /* lowest pend/work id */ - struct list_head tq_free_list; /* free task_t's */ - struct list_head tq_pend_list; /* pending task_t's */ - struct list_head tq_prio_list; /* priority pending task_t's */ - wait_queue_head_t tq_work_waitq; /* new work waitq */ - wait_queue_head_t tq_wait_waitq; /* wait waitq */ + spinlock_t tq_lock; /* protects taskq_t */ + unsigned long tq_lock_flags; /* interrupt state */ + const char *tq_name; /* taskq name */ + struct list_head tq_thread_list;/* list of all threads */ + struct list_head tq_active_list;/* list of active threads */ + int tq_nactive; /* # of active threads */ + int tq_nthreads; /* # of total threads */ + int tq_pri; /* priority */ + int tq_minalloc; /* min task_t pool size */ + int tq_maxalloc; /* max task_t pool size */ + int tq_nalloc; /* cur task_t pool size */ + uint_t tq_flags; /* flags */ + taskqid_t tq_next_id; /* next pend/work id */ + taskqid_t tq_lowest_id; /* lowest pend/work id */ + struct list_head tq_free_list; /* free task_t's */ + struct list_head tq_pend_list; /* pending task_t's */ + struct list_head tq_prio_list; /* priority pending task_t's */ + wait_queue_head_t tq_work_waitq; /* new work waitq */ + wait_queue_head_t tq_wait_waitq; /* wait waitq */ } taskq_t; typedef struct taskq_thread { - struct list_head tqt_thread_list; - struct list_head tqt_active_list; - struct task_struct *tqt_thread; - taskq_t *tqt_tq; - taskqid_t tqt_id; - uintptr_t tqt_flags; + struct list_head tqt_thread_list; + struct list_head tqt_active_list; + struct task_struct *tqt_thread; + taskq_t *tqt_tq; + taskqid_t tqt_id; + uintptr_t tqt_flags; } taskq_thread_t; /* Global system-wide dynamic task queue available for all consumers */ @@ -116,18 +116,20 @@ extern int __taskq_member(taskq_t *, void *); int spl_taskq_init(void); void spl_taskq_fini(void); -#define taskq_member(tq, t) __taskq_member(tq, t) -#define taskq_wait_id(tq, id) __taskq_wait_id(tq, id) -#define taskq_wait(tq) __taskq_wait(tq) -#define taskq_dispatch(tq, f, p, fl) __taskq_dispatch(tq, f, p, fl) -#define taskq_dispatch_ent(tq, f, p, fl, t) __taskq_dispatch_ent(tq, f, p, fl, t) -#define taskq_empty_ent(t) __taskq_empty_ent(t) -#define taskq_init_ent(t) __taskq_init_ent(t) -#define taskq_create(n, th, p, mi, ma, fl) __taskq_create(n, th, p, mi, ma, fl) -#define taskq_create_proc(n, th, p, mi, ma, pr, fl) \ - __taskq_create(n, th, p, mi, ma, fl) -#define taskq_create_sysdc(n, th, mi, ma, pr, dc, fl) \ - __taskq_create(n, th, maxclsyspri, mi, ma, fl) -#define taskq_destroy(tq) __taskq_destroy(tq) +#define taskq_member(tq, t) __taskq_member(tq, t) +#define taskq_wait_id(tq, id) __taskq_wait_id(tq, id) +#define taskq_wait(tq) __taskq_wait(tq) +#define taskq_dispatch(tq, f, p, fl) __taskq_dispatch(tq, f, p, fl) +#define taskq_dispatch_ent(tq, f, p, fl, t) \ + __taskq_dispatch_ent(tq, f, p, fl, t) +#define taskq_empty_ent(t) __taskq_empty_ent(t) +#define taskq_init_ent(t) __taskq_init_ent(t) +#define taskq_create(n, th, p, mi, ma, fl) \ + __taskq_create(n, th, p, mi, ma, fl) +#define taskq_create_proc(n, th, p, mi, ma, pr, fl) \ + __taskq_create(n, th, p, mi, ma, fl) +#define taskq_create_sysdc(n, th, mi, ma, pr, dc, fl) \ + __taskq_create(n, th, maxclsyspri, mi, ma, fl) +#define taskq_destroy(tq) __taskq_destroy(tq) #endif /* _SPL_TASKQ_H */ diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 7ea20461b..99bd361ad 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -57,60 +57,60 @@ task_km_flags(uint_t flags) static taskq_ent_t * task_alloc(taskq_t *tq, uint_t flags) { - taskq_ent_t *t; - int count = 0; - SENTRY; + taskq_ent_t *t; + int count = 0; + SENTRY; - ASSERT(tq); - ASSERT(spin_is_locked(&tq->tq_lock)); + ASSERT(tq); + ASSERT(spin_is_locked(&tq->tq_lock)); retry: - /* Acquire taskq_ent_t's from free list if available */ - if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { - t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); + /* Acquire taskq_ent_t's from free list if available */ + if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { + t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); - ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); + ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); - list_del_init(&t->tqent_list); - SRETURN(t); - } + list_del_init(&t->tqent_list); + SRETURN(t); + } - /* Free list is empty and memory allocations are prohibited */ - if (flags & TQ_NOALLOC) - SRETURN(NULL); + /* Free list is empty and memory allocations are prohibited */ + if (flags & TQ_NOALLOC) + SRETURN(NULL); - /* Hit maximum taskq_ent_t pool size */ - if (tq->tq_nalloc >= tq->tq_maxalloc) { - if (flags & TQ_NOSLEEP) - SRETURN(NULL); + /* Hit maximum taskq_ent_t pool size */ + if (tq->tq_nalloc >= tq->tq_maxalloc) { + if (flags & TQ_NOSLEEP) + SRETURN(NULL); - /* - * Sleep periodically polling the free list for an available - * taskq_ent_t. Dispatching with TQ_SLEEP should always succeed - * but we cannot block forever waiting for an taskq_entq_t to - * show up in the free list, otherwise a deadlock can happen. - * - * Therefore, we need to allocate a new task even if the number - * of allocated tasks is above tq->tq_maxalloc, but we still - * end up delaying the task allocation by one second, thereby - * throttling the task dispatch rate. - */ - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - schedule_timeout(HZ / 100); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - if (count < 100) - SGOTO(retry, count++); - } + /* + * Sleep periodically polling the free list for an available + * taskq_ent_t. Dispatching with TQ_SLEEP should always succeed + * but we cannot block forever waiting for an taskq_ent_t to + * show up in the free list, otherwise a deadlock can happen. + * + * Therefore, we need to allocate a new task even if the number + * of allocated tasks is above tq->tq_maxalloc, but we still + * end up delaying the task allocation by one second, thereby + * throttling the task dispatch rate. + */ + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + schedule_timeout(HZ / 100); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + if (count < 100) + SGOTO(retry, count++); + } - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - t = kmem_alloc(sizeof(taskq_ent_t), task_km_flags(flags)); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + t = kmem_alloc(sizeof(taskq_ent_t), task_km_flags(flags)); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - if (t) { - taskq_init_ent(t); - tq->tq_nalloc++; - } + if (t) { + taskq_init_ent(t); + tq->tq_nalloc++; + } - SRETURN(t); + SRETURN(t); } /* @@ -120,15 +120,15 @@ retry: static void task_free(taskq_t *tq, taskq_ent_t *t) { - SENTRY; + SENTRY; - ASSERT(tq); - ASSERT(t); + ASSERT(tq); + ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); ASSERT(list_empty(&t->tqent_list)); - kmem_free(t, sizeof(taskq_ent_t)); - tq->tq_nalloc--; + kmem_free(t, sizeof(taskq_ent_t)); + tq->tq_nalloc--; SEXIT; } @@ -147,18 +147,18 @@ task_done(taskq_t *tq, taskq_ent_t *t) list_del_init(&t->tqent_list); - if (tq->tq_nalloc <= tq->tq_minalloc) { + if (tq->tq_nalloc <= tq->tq_minalloc) { t->tqent_id = 0; t->tqent_func = NULL; t->tqent_arg = NULL; t->tqent_flags = 0; - list_add_tail(&t->tqent_list, &tq->tq_free_list); + list_add_tail(&t->tqent_list, &tq->tq_free_list); } else { task_free(tq, t); } - SEXIT; + SEXIT; } /* @@ -236,10 +236,10 @@ __taskq_member(taskq_t *tq, void *t) { struct list_head *l; taskq_thread_t *tqt; - SENTRY; + SENTRY; ASSERT(tq); - ASSERT(t); + ASSERT(t); list_for_each(l, &tq->tq_thread_list) { tqt = list_entry(l, taskq_thread_t, tqt_thread_list); @@ -247,21 +247,21 @@ __taskq_member(taskq_t *tq, void *t) SRETURN(1); } - SRETURN(0); + SRETURN(0); } EXPORT_SYMBOL(__taskq_member); taskqid_t __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { - taskq_ent_t *t; + taskq_ent_t *t; taskqid_t rc = 0; - SENTRY; + SENTRY; - ASSERT(tq); - ASSERT(func); + ASSERT(tq); + ASSERT(func); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TQ_ACTIVE)) @@ -272,7 +272,7 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) SGOTO(out, rc = 0); - if ((t = task_alloc(tq, flags)) == NULL) + if ((t = task_alloc(tq, flags)) == NULL) SGOTO(out, rc = 0); spin_lock(&t->tqent_lock); @@ -285,8 +285,8 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) t->tqent_id = rc = tq->tq_next_id; tq->tq_next_id++; - t->tqent_func = func; - t->tqent_arg = arg; + t->tqent_func = func; + t->tqent_arg = arg; ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); @@ -374,7 +374,7 @@ static taskqid_t taskq_lowest_id(taskq_t *tq) { taskqid_t lowest_id = tq->tq_next_id; - taskq_ent_t *t; + taskq_ent_t *t; taskq_thread_t *tqt; SENTRY; @@ -393,7 +393,7 @@ taskq_lowest_id(taskq_t *tq) if (!list_empty(&tq->tq_active_list)) { tqt = list_entry(tq->tq_active_list.next, taskq_thread_t, - tqt_active_list); + tqt_active_list); ASSERT(tqt->tqt_id != 0); lowest_id = MIN(lowest_id, tqt->tqt_id); } @@ -402,8 +402,7 @@ taskq_lowest_id(taskq_t *tq) } /* - * Insert a task into a list keeping the list sorted by increasing - * taskqid. + * Insert a task into a list keeping the list sorted by increasing taskqid. */ static void taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) @@ -432,28 +431,28 @@ taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) static int taskq_thread(void *args) { - DECLARE_WAITQUEUE(wait, current); - sigset_t blocked; + DECLARE_WAITQUEUE(wait, current); + sigset_t blocked; taskq_thread_t *tqt = args; - taskq_t *tq; - taskq_ent_t *t; + taskq_t *tq; + taskq_ent_t *t; struct list_head *pend_list; SENTRY; - ASSERT(tqt); + ASSERT(tqt); tq = tqt->tqt_tq; - current->flags |= PF_NOFREEZE; + current->flags |= PF_NOFREEZE; - sigfillset(&blocked); - sigprocmask(SIG_BLOCK, &blocked, NULL); - flush_signals(current); + sigfillset(&blocked); + sigprocmask(SIG_BLOCK, &blocked, NULL); + flush_signals(current); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - tq->tq_nthreads++; - wake_up(&tq->tq_wait_waitq); - set_current_state(TASK_INTERRUPTIBLE); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + tq->tq_nthreads++; + wake_up(&tq->tq_wait_waitq); + set_current_state(TASK_INTERRUPTIBLE); - while (!kthread_should_stop()) { + while (!kthread_should_stop()) { if (list_empty(&tq->tq_pend_list) && list_empty(&tq->tq_prio_list)) { @@ -475,8 +474,8 @@ taskq_thread(void *args) pend_list = NULL; if (pend_list) { - t = list_entry(pend_list->next, taskq_ent_t, tqent_list); - list_del_init(&t->tqent_list); + t = list_entry(pend_list->next,taskq_ent_t,tqent_list); + list_del_init(&t->tqent_list); /* In order to support recursively dispatching a * preallocated taskq_ent_t, tqent_id must be @@ -491,14 +490,14 @@ taskq_thread(void *args) tqt->tqt_flags = t->tqent_flags; taskq_insert_in_order(tq, tqt); - tq->tq_nactive++; + tq->tq_nactive++; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); /* Perform the requested task */ - t->tqent_func(t->tqent_arg); + t->tqent_func(t->tqent_arg); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - tq->tq_nactive--; + tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); /* For prealloc'd tasks, we don't free anything. */ @@ -515,37 +514,37 @@ taskq_thread(void *args) tqt->tqt_id = 0; tqt->tqt_flags = 0; - wake_up_all(&tq->tq_wait_waitq); + wake_up_all(&tq->tq_wait_waitq); } set_current_state(TASK_INTERRUPTIBLE); - } + } __set_current_state(TASK_RUNNING); - tq->tq_nthreads--; + tq->tq_nthreads--; list_del_init(&tqt->tqt_thread_list); kmem_free(tqt, sizeof(taskq_thread_t)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); SRETURN(0); } taskq_t * __taskq_create(const char *name, int nthreads, pri_t pri, - int minalloc, int maxalloc, uint_t flags) + int minalloc, int maxalloc, uint_t flags) { - taskq_t *tq; + taskq_t *tq; taskq_thread_t *tqt; - int rc = 0, i, j = 0; - SENTRY; + int rc = 0, i, j = 0; + SENTRY; - ASSERT(name != NULL); - ASSERT(pri <= maxclsyspri); - ASSERT(minalloc >= 0); - ASSERT(maxalloc <= INT_MAX); - ASSERT(!(flags & (TASKQ_CPR_SAFE | TASKQ_DYNAMIC))); /* Unsupported */ + ASSERT(name != NULL); + ASSERT(pri <= maxclsyspri); + ASSERT(minalloc >= 0); + ASSERT(maxalloc <= INT_MAX); + ASSERT(!(flags & (TASKQ_CPR_SAFE | TASKQ_DYNAMIC))); /* Unsupported */ /* Scale the number of threads using nthreads as a percentage */ if (flags & TASKQ_THREADS_CPU_PCT) { @@ -556,35 +555,35 @@ __taskq_create(const char *name, int nthreads, pri_t pri, nthreads = MAX((num_online_cpus() * nthreads) / 100, 1); } - tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); - if (tq == NULL) - SRETURN(NULL); + tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); + if (tq == NULL) + SRETURN(NULL); - spin_lock_init(&tq->tq_lock); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - INIT_LIST_HEAD(&tq->tq_thread_list); - INIT_LIST_HEAD(&tq->tq_active_list); - tq->tq_name = name; - tq->tq_nactive = 0; + spin_lock_init(&tq->tq_lock); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + INIT_LIST_HEAD(&tq->tq_thread_list); + INIT_LIST_HEAD(&tq->tq_active_list); + tq->tq_name = name; + tq->tq_nactive = 0; tq->tq_nthreads = 0; - tq->tq_pri = pri; - tq->tq_minalloc = minalloc; - tq->tq_maxalloc = maxalloc; + tq->tq_pri = pri; + tq->tq_minalloc = minalloc; + tq->tq_maxalloc = maxalloc; tq->tq_nalloc = 0; - tq->tq_flags = (flags | TQ_ACTIVE); + tq->tq_flags = (flags | TQ_ACTIVE); tq->tq_next_id = 1; tq->tq_lowest_id = 1; - INIT_LIST_HEAD(&tq->tq_free_list); - INIT_LIST_HEAD(&tq->tq_pend_list); - INIT_LIST_HEAD(&tq->tq_prio_list); - init_waitqueue_head(&tq->tq_work_waitq); - init_waitqueue_head(&tq->tq_wait_waitq); + INIT_LIST_HEAD(&tq->tq_free_list); + INIT_LIST_HEAD(&tq->tq_pend_list); + INIT_LIST_HEAD(&tq->tq_prio_list); + init_waitqueue_head(&tq->tq_work_waitq); + init_waitqueue_head(&tq->tq_wait_waitq); - if (flags & TASKQ_PREPOPULATE) - for (i = 0; i < minalloc; i++) - task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); + if (flags & TASKQ_PREPOPULATE) + for (i = 0; i < minalloc; i++) + task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); for (i = 0; i < nthreads; i++) { tqt = kmem_alloc(sizeof(*tqt), KM_PUSHPAGE); @@ -594,7 +593,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, tqt->tqt_id = 0; tqt->tqt_thread = kthread_create(taskq_thread, tqt, - "%s/%d", name, i); + "%s/%d", name, i); if (tqt->tqt_thread) { list_add(&tqt->tqt_thread_list, &tq->tq_thread_list); kthread_bind(tqt->tqt_thread, i % num_online_cpus()); @@ -607,15 +606,15 @@ __taskq_create(const char *name, int nthreads, pri_t pri, } } - /* Wait for all threads to be started before potential destroy */ + /* Wait for all threads to be started before potential destroy */ wait_event(tq->tq_wait_waitq, tq->tq_nthreads == j); - if (rc) { - __taskq_destroy(tq); - tq = NULL; - } + if (rc) { + __taskq_destroy(tq); + tq = NULL; + } - SRETURN(tq); + SRETURN(tq); } EXPORT_SYMBOL(__taskq_create); @@ -629,13 +628,13 @@ __taskq_destroy(taskq_t *tq) ASSERT(tq); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - tq->tq_flags &= ~TQ_ACTIVE; + tq->tq_flags &= ~TQ_ACTIVE; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); /* TQ_ACTIVE cleared prevents new tasks being added to pending */ - __taskq_wait(tq); + __taskq_wait(tq); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); /* * Signal each thread to exit and block until it does. Each thread @@ -651,29 +650,29 @@ __taskq_destroy(taskq_t *tq) kthread_stop(thread); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); } - while (!list_empty(&tq->tq_free_list)) { + while (!list_empty(&tq->tq_free_list)) { t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); - list_del_init(&t->tqent_list); - task_free(tq, t); - } + list_del_init(&t->tqent_list); + task_free(tq, t); + } - ASSERT(tq->tq_nthreads == 0); - ASSERT(tq->tq_nalloc == 0); - ASSERT(list_empty(&tq->tq_thread_list)); - ASSERT(list_empty(&tq->tq_active_list)); - ASSERT(list_empty(&tq->tq_free_list)); - ASSERT(list_empty(&tq->tq_pend_list)); - ASSERT(list_empty(&tq->tq_prio_list)); + ASSERT(tq->tq_nthreads == 0); + ASSERT(tq->tq_nalloc == 0); + ASSERT(list_empty(&tq->tq_thread_list)); + ASSERT(list_empty(&tq->tq_active_list)); + ASSERT(list_empty(&tq->tq_free_list)); + ASSERT(list_empty(&tq->tq_pend_list)); + ASSERT(list_empty(&tq->tq_prio_list)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - kmem_free(tq, sizeof(taskq_t)); + kmem_free(tq, sizeof(taskq_t)); SEXIT; } @@ -682,22 +681,22 @@ EXPORT_SYMBOL(__taskq_destroy); int spl_taskq_init(void) { - SENTRY; + SENTRY; /* Solaris creates a dynamic taskq of up to 64 threads, however in * a Linux environment 1 thread per-core is usually about right */ - system_taskq = taskq_create("spl_system_taskq", num_online_cpus(), + system_taskq = taskq_create("spl_system_taskq", num_online_cpus(), minclsyspri, 4, 512, TASKQ_PREPOPULATE); if (system_taskq == NULL) SRETURN(1); - SRETURN(0); + SRETURN(0); } void spl_taskq_fini(void) { - SENTRY; + SENTRY; taskq_destroy(system_taskq); - SEXIT; + SEXIT; } From aed8671cb0bfc18f6cd034ecad2e9cf49536d965 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 6 Dec 2012 13:04:27 -0800 Subject: [PATCH 0671/1062] taskq style, remove #define wrappers When the taskq implementation was originally written I wrapped all the API functions in #define's. This was done as a preventative measure to ensure that a taskq symbol never conflicted with an existing kernel symbol. However, in practice the taskq symbols never conflicted. The only major conflicts occured with the kmem cache API. Since this added layer of obfuscation never bought us anything for the taskq's I'm removing it. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 40 +++++++++++++++------------------------- module/spl/spl-taskq.c | 42 +++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 46 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 8260cf935..84b563208 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -103,33 +103,23 @@ typedef struct taskq_thread { /* Global system-wide dynamic task queue available for all consumers */ extern taskq_t *system_taskq; -extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); -extern void __taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, taskq_ent_t *); -extern int __taskq_empty_ent(taskq_ent_t *); -extern void __taskq_init_ent(taskq_ent_t *); -extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); -extern void __taskq_destroy(taskq_t *); -extern void __taskq_wait_id(taskq_t *, taskqid_t); -extern void __taskq_wait(taskq_t *); -extern int __taskq_member(taskq_t *, void *); +extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); +extern void taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, + taskq_ent_t *); +extern int taskq_empty_ent(taskq_ent_t *); +extern void taskq_init_ent(taskq_ent_t *); +extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); +extern void taskq_destroy(taskq_t *); +extern void taskq_wait_id(taskq_t *, taskqid_t); +extern void taskq_wait(taskq_t *); +extern int taskq_member(taskq_t *, void *); + +#define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ + taskq_create(name, nthreads, pri, min, max, flags) +#define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ + taskq_create(name, nthreads, maxclsyspri, min, max, flags) int spl_taskq_init(void); void spl_taskq_fini(void); -#define taskq_member(tq, t) __taskq_member(tq, t) -#define taskq_wait_id(tq, id) __taskq_wait_id(tq, id) -#define taskq_wait(tq) __taskq_wait(tq) -#define taskq_dispatch(tq, f, p, fl) __taskq_dispatch(tq, f, p, fl) -#define taskq_dispatch_ent(tq, f, p, fl, t) \ - __taskq_dispatch_ent(tq, f, p, fl, t) -#define taskq_empty_ent(t) __taskq_empty_ent(t) -#define taskq_init_ent(t) __taskq_init_ent(t) -#define taskq_create(n, th, p, mi, ma, fl) \ - __taskq_create(n, th, p, mi, ma, fl) -#define taskq_create_proc(n, th, p, mi, ma, pr, fl) \ - __taskq_create(n, th, p, mi, ma, fl) -#define taskq_create_sysdc(n, th, mi, ma, pr, dc, fl) \ - __taskq_create(n, th, maxclsyspri, mi, ma, fl) -#define taskq_destroy(tq) __taskq_destroy(tq) - #endif /* _SPL_TASKQ_H */ diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 99bd361ad..2007cf084 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -201,7 +201,7 @@ taskq_wait_check(taskq_t *tq, taskqid_t id) } void -__taskq_wait_id(taskq_t *tq, taskqid_t id) +taskq_wait_id(taskq_t *tq, taskqid_t id) { SENTRY; ASSERT(tq); @@ -210,10 +210,10 @@ __taskq_wait_id(taskq_t *tq, taskqid_t id) SEXIT; } -EXPORT_SYMBOL(__taskq_wait_id); +EXPORT_SYMBOL(taskq_wait_id); void -__taskq_wait(taskq_t *tq) +taskq_wait(taskq_t *tq) { taskqid_t id; SENTRY; @@ -224,15 +224,15 @@ __taskq_wait(taskq_t *tq) id = tq->tq_next_id - 1; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - __taskq_wait_id(tq, id); + taskq_wait_id(tq, id); SEXIT; } -EXPORT_SYMBOL(__taskq_wait); +EXPORT_SYMBOL(taskq_wait); int -__taskq_member(taskq_t *tq, void *t) +taskq_member(taskq_t *tq, void *t) { struct list_head *l; taskq_thread_t *tqt; @@ -249,10 +249,10 @@ __taskq_member(taskq_t *tq, void *t) SRETURN(0); } -EXPORT_SYMBOL(__taskq_member); +EXPORT_SYMBOL(taskq_member); taskqid_t -__taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) +taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { taskq_ent_t *t; taskqid_t rc = 0; @@ -297,10 +297,10 @@ out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); SRETURN(rc); } -EXPORT_SYMBOL(__taskq_dispatch); +EXPORT_SYMBOL(taskq_dispatch); void -__taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, +taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, taskq_ent_t *t) { SENTRY; @@ -343,17 +343,17 @@ out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); SEXIT; } -EXPORT_SYMBOL(__taskq_dispatch_ent); +EXPORT_SYMBOL(taskq_dispatch_ent); int -__taskq_empty_ent(taskq_ent_t *t) +taskq_empty_ent(taskq_ent_t *t) { return list_empty(&t->tqent_list); } -EXPORT_SYMBOL(__taskq_empty_ent); +EXPORT_SYMBOL(taskq_empty_ent); void -__taskq_init_ent(taskq_ent_t *t) +taskq_init_ent(taskq_ent_t *t) { spin_lock_init(&t->tqent_lock); INIT_LIST_HEAD(&t->tqent_list); @@ -362,7 +362,7 @@ __taskq_init_ent(taskq_ent_t *t) t->tqent_arg = NULL; t->tqent_flags = 0; } -EXPORT_SYMBOL(__taskq_init_ent); +EXPORT_SYMBOL(taskq_init_ent); /* * Returns the lowest incomplete taskqid_t. The taskqid_t may @@ -532,7 +532,7 @@ taskq_thread(void *args) } taskq_t * -__taskq_create(const char *name, int nthreads, pri_t pri, +taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { taskq_t *tq; @@ -610,16 +610,16 @@ __taskq_create(const char *name, int nthreads, pri_t pri, wait_event(tq->tq_wait_waitq, tq->tq_nthreads == j); if (rc) { - __taskq_destroy(tq); + taskq_destroy(tq); tq = NULL; } SRETURN(tq); } -EXPORT_SYMBOL(__taskq_create); +EXPORT_SYMBOL(taskq_create); void -__taskq_destroy(taskq_t *tq) +taskq_destroy(taskq_t *tq) { struct task_struct *thread; taskq_thread_t *tqt; @@ -632,7 +632,7 @@ __taskq_destroy(taskq_t *tq) spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); /* TQ_ACTIVE cleared prevents new tasks being added to pending */ - __taskq_wait(tq); + taskq_wait(tq); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); @@ -676,7 +676,7 @@ __taskq_destroy(taskq_t *tq) SEXIT; } -EXPORT_SYMBOL(__taskq_destroy); +EXPORT_SYMBOL(taskq_destroy); int spl_taskq_init(void) From d9acd930b52503582425c6398fc8dbc1d7d4a01b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 6 Dec 2012 12:38:19 -0800 Subject: [PATCH 0672/1062] taskq delay/cancel functionality Add the ability to dispatch a delayed task to a taskq. The desired behavior is for the task to be queued but not executed by a worker thread until the expiration time is reached. To achieve this two new functions were added. * taskq_dispatch_delay() - This function behaves exactly like taskq_dispatch() however it takes a third 'expire_time' argument. The caller should pass the desired time the task should be executed as an absolute value in jiffies. The task is guarenteed not to run before this time, it may run slightly latter if all the worker threads are busy. * taskq_cancel_id() - Given a task id attempt to cancel the task before it gets executed. This is primarily useful for canceling delay tasks but can be used for canceling any previously dispatched task. There are three possible return values. 0 - The task was found and canceled before it was executed. ENOENT - The task was not found, either it was already run or an invalid task id was supplied by the caller. EBUSY - The task is currently executing any may not be canceled. This function will block until the task has been completed. * taskq_wait_all() - The taskq_wait_id() function was renamed taskq_wait_all() to more clearly reflect its actual behavior. It is only curreny used by the splat taskq regression tests. * taskq_wait_id() - Historically, the only difference between this function and taskq_wait() was that you passed the task id. In both functions you would block until ALL lower task ids which executed. This was semantically correct but could be very slow particularly if there were delay tasks submitted. To better accomidate the delay tasks this function was reimplemnted. It will now only block until the passed task id has been completed. This is actually a fairly low risk change for a few reasons. * Only new ZFS callers will make use of the new interfaces and very little common code was changed to support the new functions. * The existing taskq_wait() implementation was not changed just slightly refactored. * The newly optimized taskq_wait_id() implementation was never used by ZFS we can't accidentally introduce a new bug there. NOTE: This functionality does not exist in the Illumos taskqs. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 38 ++- module/spl/spl-taskq.c | 640 ++++++++++++++++++++++++++----------- module/splat/splat-taskq.c | 18 +- 3 files changed, 483 insertions(+), 213 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 84b563208..3839de288 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -41,20 +41,6 @@ #define TASKQ_THREADS_CPU_PCT 0x00000008 #define TASKQ_DC_BATCH 0x00000010 -typedef unsigned long taskqid_t; -typedef void (task_func_t)(void *); - -typedef struct taskq_ent { - spinlock_t tqent_lock; - struct list_head tqent_list; - taskqid_t tqent_id; - task_func_t *tqent_func; - void *tqent_arg; - uintptr_t tqent_flags; -} taskq_ent_t; - -#define TQENT_FLAG_PREALLOC 0x1 - /* * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as * KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly @@ -69,6 +55,9 @@ typedef struct taskq_ent { #define TQ_FRONT 0x08000000 #define TQ_ACTIVE 0x80000000 +typedef unsigned long taskqid_t; +typedef void (task_func_t)(void *); + typedef struct taskq { spinlock_t tq_lock; /* protects taskq_t */ unsigned long tq_lock_flags; /* interrupt state */ @@ -87,16 +76,33 @@ typedef struct taskq { struct list_head tq_free_list; /* free task_t's */ struct list_head tq_pend_list; /* pending task_t's */ struct list_head tq_prio_list; /* priority pending task_t's */ + struct list_head tq_delay_list; /* delayed task_t's */ wait_queue_head_t tq_work_waitq; /* new work waitq */ wait_queue_head_t tq_wait_waitq; /* wait waitq */ } taskq_t; +typedef struct taskq_ent { + spinlock_t tqent_lock; + wait_queue_head_t tqent_waitq; + struct timer_list tqent_timer; + struct list_head tqent_list; + taskqid_t tqent_id; + task_func_t *tqent_func; + void *tqent_arg; + taskq_t *tqent_taskq; + uintptr_t tqent_flags; +} taskq_ent_t; + +#define TQENT_FLAG_PREALLOC 0x1 +#define TQENT_FLAG_CANCEL 0x2 + typedef struct taskq_thread { struct list_head tqt_thread_list; struct list_head tqt_active_list; struct task_struct *tqt_thread; taskq_t *tqt_tq; taskqid_t tqt_id; + taskq_ent_t *tqt_task; uintptr_t tqt_flags; } taskq_thread_t; @@ -104,6 +110,8 @@ typedef struct taskq_thread { extern taskq_t *system_taskq; extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); +extern taskqid_t taskq_dispatch_delay(taskq_t *, task_func_t, void *, + uint_t, clock_t); extern void taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, taskq_ent_t *); extern int taskq_empty_ent(taskq_ent_t *); @@ -111,7 +119,9 @@ extern void taskq_init_ent(taskq_ent_t *); extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); extern void taskq_destroy(taskq_t *); extern void taskq_wait_id(taskq_t *, taskqid_t); +extern void taskq_wait_all(taskq_t *, taskqid_t); extern void taskq_wait(taskq_t *); +extern int taskq_cancel_id(taskq_t *, taskqid_t); extern int taskq_member(taskq_t *, void *); #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 2007cf084..c9ae0a50b 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -69,6 +69,8 @@ retry: t = list_entry(tq->tq_free_list.next, taskq_ent_t, tqent_list); ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); + ASSERT(!(t->tqent_flags & TQENT_FLAG_CANCEL)); + ASSERT(!timer_pending(&t->tqent_timer)); list_del_init(&t->tqent_list); SRETURN(t); @@ -126,6 +128,7 @@ task_free(taskq_t *tq, taskq_ent_t *t) ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); ASSERT(list_empty(&t->tqent_list)); + ASSERT(!timer_pending(&t->tqent_timer)); kmem_free(t, sizeof(taskq_ent_t)); tq->tq_nalloc--; @@ -145,6 +148,9 @@ task_done(taskq_t *tq, taskq_ent_t *t) ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); + /* Wake tasks blocked in taskq_wait_id() */ + wake_up_all(&t->tqent_waitq); + list_del_init(&t->tqent_list); if (tq->tq_nalloc <= tq->tq_minalloc) { @@ -162,213 +168,49 @@ task_done(taskq_t *tq, taskq_ent_t *t) } /* - * As tasks are submitted to the task queue they are assigned a - * monotonically increasing taskqid and added to the tail of the pending - * list. As worker threads become available the tasks are removed from - * the head of the pending or priority list, giving preference to the - * priority list. The tasks are then removed from their respective - * list, and the taskq_thread servicing the task is added to the active - * list, preserving the order using the serviced task's taskqid. - * Finally, as tasks complete the taskq_thread servicing the task is - * removed from the active list. This means that the pending task and - * active taskq_thread lists are always kept sorted by taskqid. Thus the - * lowest outstanding incomplete taskqid can be determined simply by - * checking the min taskqid for each head item on the pending, priority, - * and active taskq_thread list. This value is stored in - * tq->tq_lowest_id and only updated to the new lowest id when the - * previous lowest id completes. All taskqids lower than - * tq->tq_lowest_id must have completed. It is also possible larger - * taskqid's have completed because they may be processed in parallel by - * several worker threads. However, this is not a problem because the - * behavior of taskq_wait_id() is to block until all previously - * submitted taskqid's have completed. - * - * XXX: Taskqid_t wrapping is not handled. However, taskqid_t's are - * 64-bit values so even if a taskq is processing 2^24 (16,777,216) - * taskqid_ts per second it will still take 2^40 seconds, 34,865 years, - * before the wrap occurs. I can live with that for now. + * When a delayed task timer expires remove it from the delay list and + * add it to the priority list in order for immediate processing. */ -static int -taskq_wait_check(taskq_t *tq, taskqid_t id) -{ - int rc; - - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - rc = (id < tq->tq_lowest_id); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - SRETURN(rc); -} - -void -taskq_wait_id(taskq_t *tq, taskqid_t id) -{ - SENTRY; - ASSERT(tq); - - wait_event(tq->tq_wait_waitq, taskq_wait_check(tq, id)); - - SEXIT; -} -EXPORT_SYMBOL(taskq_wait_id); - -void -taskq_wait(taskq_t *tq) -{ - taskqid_t id; - SENTRY; - ASSERT(tq); - - /* Wait for the largest outstanding taskqid */ - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - id = tq->tq_next_id - 1; - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - taskq_wait_id(tq, id); - - SEXIT; - -} -EXPORT_SYMBOL(taskq_wait); - -int -taskq_member(taskq_t *tq, void *t) +static void +task_expire(unsigned long data) { + taskq_ent_t *w, *t = (taskq_ent_t *)data; + taskq_t *tq = t->tqent_taskq; struct list_head *l; - taskq_thread_t *tqt; - SENTRY; - - ASSERT(tq); - ASSERT(t); - - list_for_each(l, &tq->tq_thread_list) { - tqt = list_entry(l, taskq_thread_t, tqt_thread_list); - if (tqt->tqt_thread == (struct task_struct *)t) - SRETURN(1); - } - - SRETURN(0); -} -EXPORT_SYMBOL(taskq_member); - -taskqid_t -taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) -{ - taskq_ent_t *t; - taskqid_t rc = 0; - SENTRY; - - ASSERT(tq); - ASSERT(func); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - /* Taskq being destroyed and all tasks drained */ - if (!(tq->tq_flags & TQ_ACTIVE)) - SGOTO(out, rc = 0); - - /* Do not queue the task unless there is idle thread for it */ - ASSERT(tq->tq_nactive <= tq->tq_nthreads); - if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) - SGOTO(out, rc = 0); - - if ((t = task_alloc(tq, flags)) == NULL) - SGOTO(out, rc = 0); - - spin_lock(&t->tqent_lock); - - /* Queue to the priority list instead of the pending list */ - if (flags & TQ_FRONT) - list_add_tail(&t->tqent_list, &tq->tq_prio_list); - else - list_add_tail(&t->tqent_list, &tq->tq_pend_list); - - t->tqent_id = rc = tq->tq_next_id; - tq->tq_next_id++; - t->tqent_func = func; - t->tqent_arg = arg; - - ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); - - spin_unlock(&t->tqent_lock); - - wake_up(&tq->tq_work_waitq); -out: - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - SRETURN(rc); -} -EXPORT_SYMBOL(taskq_dispatch); - -void -taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, - taskq_ent_t *t) -{ - SENTRY; - - ASSERT(tq); - ASSERT(func); - ASSERT(!(tq->tq_flags & TASKQ_DYNAMIC)); - - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - - /* Taskq being destroyed and all tasks drained */ - if (!(tq->tq_flags & TQ_ACTIVE)) { - t->tqent_id = 0; - goto out; + if (t->tqent_flags & TQENT_FLAG_CANCEL) { + ASSERT(list_empty(&t->tqent_list)); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + return; } - spin_lock(&t->tqent_lock); - /* - * Mark it as a prealloc'd task. This is important - * to ensure that we don't free it later. + * The priority list must be maintained in strict task id order + * from lowest to highest for lowest_id to be easily calculable. */ - t->tqent_flags |= TQENT_FLAG_PREALLOC; + list_del(&t->tqent_list); + list_for_each_prev(l, &tq->tq_prio_list) { + w = list_entry(l, taskq_ent_t, tqent_list); + if (w->tqent_id < t->tqent_id) { + list_add(&t->tqent_list, l); + break; + } + } + if (l == &tq->tq_prio_list) + list_add(&t->tqent_list, &tq->tq_prio_list); - /* Queue to the priority list instead of the pending list */ - if (flags & TQ_FRONT) - list_add_tail(&t->tqent_list, &tq->tq_prio_list); - else - list_add_tail(&t->tqent_list, &tq->tq_pend_list); - - t->tqent_id = tq->tq_next_id; - tq->tq_next_id++; - t->tqent_func = func; - t->tqent_arg = arg; - - spin_unlock(&t->tqent_lock); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); wake_up(&tq->tq_work_waitq); -out: - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - SEXIT; } -EXPORT_SYMBOL(taskq_dispatch_ent); - -int -taskq_empty_ent(taskq_ent_t *t) -{ - return list_empty(&t->tqent_list); -} -EXPORT_SYMBOL(taskq_empty_ent); - -void -taskq_init_ent(taskq_ent_t *t) -{ - spin_lock_init(&t->tqent_lock); - INIT_LIST_HEAD(&t->tqent_list); - t->tqent_id = 0; - t->tqent_func = NULL; - t->tqent_arg = NULL; - t->tqent_flags = 0; -} -EXPORT_SYMBOL(taskq_init_ent); /* * Returns the lowest incomplete taskqid_t. The taskqid_t may - * be queued on the pending list, on the priority list, or on - * the work list currently being handled, but it is not 100% - * complete yet. + * be queued on the pending list, on the priority list, on the + * delay list, or on the work list currently being handled, but + * it is not 100% complete yet. */ static taskqid_t taskq_lowest_id(taskq_t *tq) @@ -391,6 +233,11 @@ taskq_lowest_id(taskq_t *tq) lowest_id = MIN(lowest_id, t->tqent_id); } + if (!list_empty(&tq->tq_delay_list)) { + t = list_entry(tq->tq_delay_list.next, taskq_ent_t, tqent_list); + lowest_id = MIN(lowest_id, t->tqent_id); + } + if (!list_empty(&tq->tq_active_list)) { tqt = list_entry(tq->tq_active_list.next, taskq_thread_t, tqt_active_list); @@ -428,6 +275,415 @@ taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) SEXIT; } +/* + * Find and return a task from the given list if it exists. The list + * must be in lowest to highest task id order. + */ +static taskq_ent_t * +taskq_find_list(taskq_t *tq, struct list_head *lh, taskqid_t id) +{ + struct list_head *l; + taskq_ent_t *t; + SENTRY; + + ASSERT(spin_is_locked(&tq->tq_lock)); + + list_for_each(l, lh) { + t = list_entry(l, taskq_ent_t, tqent_list); + + if (t->tqent_id == id) + SRETURN(t); + + if (t->tqent_id > id) + break; + } + + SRETURN(NULL); +} + +/* + * Find an already dispatched task given the task id regardless of what + * state it is in. If a task is still pending or executing it will be + * returned and 'active' set appropriately. If the task has already + * been run then NULL is returned. + */ +static taskq_ent_t * +taskq_find(taskq_t *tq, taskqid_t id, int *active) +{ + taskq_thread_t *tqt; + struct list_head *l; + taskq_ent_t *t; + SENTRY; + + ASSERT(spin_is_locked(&tq->tq_lock)); + *active = 0; + + t = taskq_find_list(tq, &tq->tq_delay_list, id); + if (t) + SRETURN(t); + + t = taskq_find_list(tq, &tq->tq_prio_list, id); + if (t) + SRETURN(t); + + t = taskq_find_list(tq, &tq->tq_pend_list, id); + if (t) + SRETURN(t); + + list_for_each(l, &tq->tq_active_list) { + tqt = list_entry(l, taskq_thread_t, tqt_active_list); + if (tqt->tqt_id == id) { + t = tqt->tqt_task; + *active = 1; + SRETURN(t); + } + } + + SRETURN(NULL); +} + +/* + * The taskq_wait_id() function blocks until the passed task id completes. + * This does not guarantee that all lower task id's have completed. + */ +void +taskq_wait_id(taskq_t *tq, taskqid_t id) +{ + DEFINE_WAIT(wait); + taskq_ent_t *t; + int active = 0; + SENTRY; + + ASSERT(tq); + ASSERT(id > 0); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + t = taskq_find(tq, id, &active); + if (t) + prepare_to_wait(&t->tqent_waitq, &wait, TASK_UNINTERRUPTIBLE); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + /* + * We rely on the kernels autoremove_wake_function() function to + * remove us from the wait queue in the context of wake_up(). + * Once woken the taskq_ent_t pointer must never be accessed. + */ + if (t) { + t = NULL; + schedule(); + __set_current_state(TASK_RUNNING); + } + + SEXIT; +} +EXPORT_SYMBOL(taskq_wait_id); + +/* + * The taskq_wait() function will block until all previously submitted + * tasks have been completed. A previously submitted task is defined as + * a task with a lower task id than the current task queue id. Note that + * all task id's are assigned monotonically at dispatch time. + * + * Waiting for all previous tasks to complete is accomplished by tracking + * the lowest outstanding task id. As tasks are dispatched they are added + * added to the tail of the pending, priority, or delay lists. And as + * worker threads become available the tasks are removed from the heads + * of these lists and linked to the worker threads. This ensures the + * lists are kept in lowest to highest task id order. + * + * Therefore the lowest outstanding task id can be quickly determined by + * checking the head item from all of these lists. This value is stored + * with the task queue as the lowest id. It only needs to be recalculated + * when either the task with the current lowest id completes or is canceled. + * + * By blocking until the lowest task id exceeds the current task id when + * the function was called we ensure all previous tasks have completed. + * + * NOTE: When there are multiple worked threads it is possible for larger + * task ids to complete before smaller ones. Conversely when the task + * queue contains delay tasks with small task ids, you may block for a + * considerable length of time waiting for them to expire and execute. + */ +static int +taskq_wait_check(taskq_t *tq, taskqid_t id) +{ + int rc; + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + rc = (id < tq->tq_lowest_id); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + SRETURN(rc); +} + +void +taskq_wait_all(taskq_t *tq, taskqid_t id) +{ + wait_event(tq->tq_wait_waitq, taskq_wait_check(tq, id)); +} +EXPORT_SYMBOL(taskq_wait_all); + +void +taskq_wait(taskq_t *tq) +{ + taskqid_t id; + SENTRY; + ASSERT(tq); + + /* Wait for the largest outstanding taskqid */ + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + id = tq->tq_next_id - 1; + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + taskq_wait_all(tq, id); + + SEXIT; + +} +EXPORT_SYMBOL(taskq_wait); + +int +taskq_member(taskq_t *tq, void *t) +{ + struct list_head *l; + taskq_thread_t *tqt; + SENTRY; + + ASSERT(tq); + ASSERT(t); + + list_for_each(l, &tq->tq_thread_list) { + tqt = list_entry(l, taskq_thread_t, tqt_thread_list); + if (tqt->tqt_thread == (struct task_struct *)t) + SRETURN(1); + } + + SRETURN(0); +} +EXPORT_SYMBOL(taskq_member); + +/* + * Cancel an already dispatched task given the task id. Still pending tasks + * will be immediately canceled, and if the task is active the function will + * block until it completes. Preallocated tasks which are canceled must be + * freed by the caller. + */ +int +taskq_cancel_id(taskq_t *tq, taskqid_t id) +{ + taskq_ent_t *t; + int active = 0; + int rc = ENOENT; + SENTRY; + + ASSERT(tq); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + t = taskq_find(tq, id, &active); + if (t && !active) { + list_del_init(&t->tqent_list); + t->tqent_flags |= TQENT_FLAG_CANCEL; + + /* + * When canceling the lowest outstanding task id we + * must recalculate the new lowest outstanding id. + */ + if (tq->tq_lowest_id == t->tqent_id) { + tq->tq_lowest_id = taskq_lowest_id(tq); + ASSERT3S(tq->tq_lowest_id, >, t->tqent_id); + } + + /* + * The task_expire() function takes the tq->tq_lock so drop + * drop the lock before synchronously cancelling the timer. + */ + if (timer_pending(&t->tqent_timer)) { + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + del_timer_sync(&t->tqent_timer); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + } + + if (!(t->tqent_flags & TQENT_FLAG_PREALLOC)) + task_done(tq, t); + + rc = 0; + } + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + if (active) { + taskq_wait_id(tq, id); + rc = EBUSY; + } + + SRETURN(rc); +} +EXPORT_SYMBOL(taskq_cancel_id); + +taskqid_t +taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) +{ + taskq_ent_t *t; + taskqid_t rc = 0; + SENTRY; + + ASSERT(tq); + ASSERT(func); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + + /* Taskq being destroyed and all tasks drained */ + if (!(tq->tq_flags & TQ_ACTIVE)) + SGOTO(out, rc = 0); + + /* Do not queue the task unless there is idle thread for it */ + ASSERT(tq->tq_nactive <= tq->tq_nthreads); + if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) + SGOTO(out, rc = 0); + + if ((t = task_alloc(tq, flags)) == NULL) + SGOTO(out, rc = 0); + + spin_lock(&t->tqent_lock); + + /* Queue to the priority list instead of the pending list */ + if (flags & TQ_FRONT) + list_add_tail(&t->tqent_list, &tq->tq_prio_list); + else + list_add_tail(&t->tqent_list, &tq->tq_pend_list); + + t->tqent_id = rc = tq->tq_next_id; + tq->tq_next_id++; + t->tqent_func = func; + t->tqent_arg = arg; + t->tqent_taskq = tq; + t->tqent_timer.data = 0; + t->tqent_timer.function = NULL; + t->tqent_timer.expires = 0; + + ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); + + spin_unlock(&t->tqent_lock); + + wake_up(&tq->tq_work_waitq); +out: + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + SRETURN(rc); +} +EXPORT_SYMBOL(taskq_dispatch); + +taskqid_t +taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, + uint_t flags, clock_t expire_time) +{ + taskq_ent_t *t; + taskqid_t rc = 0; + SENTRY; + + ASSERT(tq); + ASSERT(func); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + + /* Taskq being destroyed and all tasks drained */ + if (!(tq->tq_flags & TQ_ACTIVE)) + SGOTO(out, rc = 0); + + if ((t = task_alloc(tq, flags)) == NULL) + SGOTO(out, rc = 0); + + spin_lock(&t->tqent_lock); + + /* Queue to the delay list for subsequent execution */ + list_add_tail(&t->tqent_list, &tq->tq_delay_list); + + t->tqent_id = rc = tq->tq_next_id; + tq->tq_next_id++; + t->tqent_func = func; + t->tqent_arg = arg; + t->tqent_taskq = tq; + t->tqent_timer.data = (unsigned long)t; + t->tqent_timer.function = task_expire; + t->tqent_timer.expires = (unsigned long)expire_time; + add_timer(&t->tqent_timer); + + ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); + + spin_unlock(&t->tqent_lock); +out: + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + SRETURN(rc); +} +EXPORT_SYMBOL(taskq_dispatch_delay); + +void +taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, + taskq_ent_t *t) +{ + SENTRY; + + ASSERT(tq); + ASSERT(func); + ASSERT(!(tq->tq_flags & TASKQ_DYNAMIC)); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + + /* Taskq being destroyed and all tasks drained */ + if (!(tq->tq_flags & TQ_ACTIVE)) { + t->tqent_id = 0; + goto out; + } + + spin_lock(&t->tqent_lock); + + /* + * Mark it as a prealloc'd task. This is important + * to ensure that we don't free it later. + */ + t->tqent_flags |= TQENT_FLAG_PREALLOC; + + /* Queue to the priority list instead of the pending list */ + if (flags & TQ_FRONT) + list_add_tail(&t->tqent_list, &tq->tq_prio_list); + else + list_add_tail(&t->tqent_list, &tq->tq_pend_list); + + t->tqent_id = tq->tq_next_id; + tq->tq_next_id++; + t->tqent_func = func; + t->tqent_arg = arg; + t->tqent_taskq = tq; + + spin_unlock(&t->tqent_lock); + + wake_up(&tq->tq_work_waitq); +out: + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + SEXIT; +} +EXPORT_SYMBOL(taskq_dispatch_ent); + +int +taskq_empty_ent(taskq_ent_t *t) +{ + return list_empty(&t->tqent_list); +} +EXPORT_SYMBOL(taskq_empty_ent); + +void +taskq_init_ent(taskq_ent_t *t) +{ + spin_lock_init(&t->tqent_lock); + init_waitqueue_head(&t->tqent_waitq); + init_timer(&t->tqent_timer); + INIT_LIST_HEAD(&t->tqent_list); + t->tqent_id = 0; + t->tqent_func = NULL; + t->tqent_arg = NULL; + t->tqent_flags = 0; + t->tqent_taskq = NULL; +} +EXPORT_SYMBOL(taskq_init_ent); + static int taskq_thread(void *args) { @@ -481,6 +737,7 @@ taskq_thread(void *args) * preallocated taskq_ent_t, tqent_id must be * stored prior to executing tqent_func. */ tqt->tqt_id = t->tqent_id; + tqt->tqt_task = t; /* We must store a copy of the flags prior to * servicing the task (servicing a prealloc'd task @@ -499,6 +756,7 @@ taskq_thread(void *args) spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); + tqt->tqt_task = NULL; /* For prealloc'd tasks, we don't free anything. */ if ((tq->tq_flags & TASKQ_DYNAMIC) || @@ -576,6 +834,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, INIT_LIST_HEAD(&tq->tq_free_list); INIT_LIST_HEAD(&tq->tq_pend_list); INIT_LIST_HEAD(&tq->tq_prio_list); + INIT_LIST_HEAD(&tq->tq_delay_list); init_waitqueue_head(&tq->tq_work_waitq); init_waitqueue_head(&tq->tq_wait_waitq); @@ -669,6 +928,7 @@ taskq_destroy(taskq_t *tq) ASSERT(list_empty(&tq->tq_free_list)); ASSERT(list_empty(&tq->tq_pend_list)); ASSERT(list_empty(&tq->tq_prio_list)); + ASSERT(list_empty(&tq->tq_delay_list)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index b94930cc9..7fad4627e 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -548,10 +548,10 @@ splat_taskq_test4(struct file *file, void *arg) * next pending task as soon as it completes its current task. This * means that tasks do not strictly complete in order in which they * were dispatched (increasing task id). This is fine but we need to - * verify that taskq_wait_id() blocks until the passed task id and all + * verify that taskq_wait_all() blocks until the passed task id and all * lower task ids complete. We do this by dispatching the following * specific sequence of tasks each of which block for N time units. - * We then use taskq_wait_id() to unblock at specific task id and + * We then use taskq_wait_all() to unblock at specific task id and * verify the only the expected task ids have completed and in the * correct order. The two cases of interest are: * @@ -562,17 +562,17 @@ splat_taskq_test4(struct file *file, void *arg) * * The following table shows each task id and how they will be * scheduled. Each rows represent one time unit and each column - * one of the three worker threads. The places taskq_wait_id() + * one of the three worker threads. The places taskq_wait_all() * must unblock for a specific id are identified as well as the * task ids which must have completed and their order. * - * +-----+ <--- taskq_wait_id(tq, 8) unblocks + * +-----+ <--- taskq_wait_all(tq, 8) unblocks * | | Required Completion Order: 1,2,4,5,3,8,6,7 * +-----+ | * | | | * | | +-----+ * | | | 8 | - * | | +-----+ <--- taskq_wait_id(tq, 3) unblocks + * | | +-----+ <--- taskq_wait_all(tq, 3) unblocks * | | 7 | | Required Completion Order: 1,2,4,5,3 * | +-----+ | * | 6 | | | @@ -712,13 +712,13 @@ splat_taskq_test5_impl(struct file *file, void *arg, boolean_t prealloc) splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, 3); - taskq_wait_id(tq, 3); + taskq_wait_all(tq, 3); if ((rc = splat_taskq_test_order(&tq_arg, order1))) goto out; splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, 8); - taskq_wait_id(tq, 8); + taskq_wait_all(tq, 8); rc = splat_taskq_test_order(&tq_arg, order2); out: @@ -874,7 +874,7 @@ splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, SPLAT_TASKQ_ORDER_MAX); - taskq_wait_id(tq, SPLAT_TASKQ_ORDER_MAX); + taskq_wait_all(tq, SPLAT_TASKQ_ORDER_MAX); rc = splat_taskq_test_order(&tq_arg, order); out: @@ -975,7 +975,7 @@ splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) if (tq_arg.flag == 0) { splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, "Taskq '%s' waiting\n", tq_arg.name); - taskq_wait_id(tq, SPLAT_TASKQ_DEPTH_MAX); + taskq_wait_all(tq, SPLAT_TASKQ_DEPTH_MAX); } splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, From 2f357826208085bacce9e0a29972c2e5728d5420 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 6 Dec 2012 14:52:35 -0800 Subject: [PATCH 0673/1062] splat taskq:delay: Add test case Add a test case for taskq_dispatch_delay() to verify it is working properly. The test dispatchs 100 tasks to a taskq with random expiration times spread over 5 seconds. As each task expires and gets executed by a worker thread it verifies that it was run at the correct time. Once all the delayed tasks have been executed we double check that all the dispatched tasks were successful. Signed-off-by: Brian Behlendorf --- module/splat/splat-taskq.c | 124 +++++++++++++++++++++++++++++++++---- 1 file changed, 113 insertions(+), 11 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 7fad4627e..272d334c0 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #include #include "splat-internal.h" @@ -63,6 +64,10 @@ #define SPLAT_TASKQ_TEST8_NAME "contention" #define SPLAT_TASKQ_TEST8_DESC "1 queue, 100 threads, 131072 tasks" +#define SPLAT_TASKQ_TEST9_ID 0x0209 +#define SPLAT_TASKQ_TEST9_NAME "delay" +#define SPLAT_TASKQ_TEST9_DESC "Delayed task execution" + #define SPLAT_TASKQ_ORDER_MAX 8 #define SPLAT_TASKQ_DEPTH_MAX 16 @@ -70,9 +75,10 @@ typedef struct splat_taskq_arg { int flag; int id; - atomic_t count; + atomic_t *count; int order[SPLAT_TASKQ_ORDER_MAX]; unsigned int depth; + unsigned long expire; taskq_t *tq; taskq_ent_t *tqe; spinlock_t lock; @@ -415,8 +421,8 @@ splat_taskq_test3(struct file *file, void *arg) /* * Create a taskq and dispatch a large number of tasks to the queue. * Then use taskq_wait() to block until all the tasks complete, then - * cross check that all the tasks ran by checking tg_arg->count which - * is incremented in the task function. Finally cleanup the taskq. + * cross check that all the tasks ran by checking the shared atomic + * counter which is incremented in the task function. * * First we try with a large 'maxalloc' value, then we try with a small one. * We should not drop tasks when TQ_SLEEP is used in taskq_dispatch(), even @@ -428,7 +434,7 @@ splat_taskq_test4_func(void *arg) splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; ASSERT(tq_arg); - atomic_inc(&tq_arg->count); + atomic_inc(tq_arg->count); } static int @@ -439,6 +445,7 @@ splat_taskq_test4_common(struct file *file, void *arg, int minalloc, taskqid_t id; splat_taskq_arg_t tq_arg; taskq_ent_t *tqes; + atomic_t count; int i, j, rc = 0; tqes = kmalloc(sizeof(*tqes) * nr_tasks, GFP_KERNEL); @@ -461,9 +468,10 @@ splat_taskq_test4_common(struct file *file, void *arg, int minalloc, tq_arg.file = file; tq_arg.name = SPLAT_TASKQ_TEST4_NAME; + tq_arg.count = &count; for (i = 1; i <= nr_tasks; i *= 2) { - atomic_set(&tq_arg.count, 0); + atomic_set(tq_arg.count, 0); splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' function '%s' dispatched %d times\n", tq_arg.name, sym2str(splat_taskq_test4_func), i); @@ -495,8 +503,8 @@ splat_taskq_test4_common(struct file *file, void *arg, int minalloc, taskq_wait(tq); splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' " "%d/%d dispatches finished\n", tq_arg.name, - atomic_read(&tq_arg.count), i); - if (atomic_read(&tq_arg.count) != i) { + atomic_read(&count), i); + if (atomic_read(&count) != i) { rc = -ERANGE; goto out; @@ -1011,7 +1019,7 @@ splat_taskq_test8_func(void *arg) splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; ASSERT(tq_arg); - atomic_inc(&tq_arg->count); + atomic_inc(tq_arg->count); } #define TEST8_NUM_TASKS 0x20000 @@ -1025,6 +1033,7 @@ splat_taskq_test8_common(struct file *file, void *arg, int minalloc, taskqid_t id; splat_taskq_arg_t tq_arg; taskq_ent_t **tqes; + atomic_t count; int i, j, rc = 0; tqes = vmalloc(sizeof(*tqes) * TEST8_NUM_TASKS); @@ -1048,8 +1057,9 @@ splat_taskq_test8_common(struct file *file, void *arg, int minalloc, tq_arg.file = file; tq_arg.name = SPLAT_TASKQ_TEST8_NAME; + tq_arg.count = &count; + atomic_set(tq_arg.count, 0); - atomic_set(&tq_arg.count, 0); for (i = 0; i < TEST8_NUM_TASKS; i++) { tqes[i] = kmalloc(sizeof(taskq_ent_t), GFP_KERNEL); if (tqes[i] == NULL) { @@ -1079,9 +1089,9 @@ splat_taskq_test8_common(struct file *file, void *arg, int minalloc, taskq_wait(tq); splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, "Taskq '%s' " "%d/%d dispatches finished\n", tq_arg.name, - atomic_read(&tq_arg.count), TEST8_NUM_TASKS); + atomic_read(tq_arg.count), TEST8_NUM_TASKS); - if (atomic_read(&tq_arg.count) != TEST8_NUM_TASKS) + if (atomic_read(tq_arg.count) != TEST8_NUM_TASKS) rc = -ERANGE; out: @@ -1106,6 +1116,95 @@ splat_taskq_test8(struct file *file, void *arg) return rc; } +/* + * Create a taskq and dispatch a number of delayed tasks to the queue. + * For each task verify that it was run no early than requested. + */ +static void +splat_taskq_test9_func(void *arg) +{ + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; + ASSERT(tq_arg); + + if (ddi_get_lbolt() >= tq_arg->expire) + atomic_inc(tq_arg->count); + + kmem_free(tq_arg, sizeof(splat_taskq_arg_t)); +} + +static int +splat_taskq_test9(struct file *file, void *arg) +{ + taskq_t *tq; + atomic_t count; + int i, rc = 0; + int minalloc = 1; + int maxalloc = 10; + int nr_tasks = 100; + + splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, + "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", + SPLAT_TASKQ_TEST9_NAME, "delay", minalloc, maxalloc, nr_tasks); + if ((tq = taskq_create(SPLAT_TASKQ_TEST9_NAME, 3, maxclsyspri, + minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, + "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST9_NAME); + return -EINVAL; + } + + atomic_set(&count, 0); + + for (i = 1; i <= nr_tasks; i++) { + splat_taskq_arg_t *tq_arg; + taskqid_t id; + uint32_t rnd; + + /* A random timeout in jiffies of at most 5 seconds */ + get_random_bytes((void *)&rnd, 4); + rnd = rnd % (5 * HZ); + + tq_arg = kmem_alloc(sizeof(splat_taskq_arg_t), KM_SLEEP); + tq_arg->file = file; + tq_arg->name = SPLAT_TASKQ_TEST9_NAME; + tq_arg->expire = ddi_get_lbolt() + rnd; + tq_arg->count = &count; + + splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, + "Taskq '%s' delay dispatch %u jiffies\n", + SPLAT_TASKQ_TEST9_NAME, rnd); + + id = taskq_dispatch_delay(tq, splat_taskq_test9_func, + tq_arg, TQ_SLEEP, ddi_get_lbolt() + rnd); + + if (id == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, + "Taskq '%s' delay dispatch failed\n", + SPLAT_TASKQ_TEST9_NAME); + kmem_free(tq_arg, sizeof(splat_taskq_arg_t)); + taskq_wait(tq); + rc = -EINVAL; + goto out; + } + } + + splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' waiting for " + "%d delay dispatches\n", SPLAT_TASKQ_TEST9_NAME, nr_tasks); + + taskq_wait(tq); + if (atomic_read(&count) != nr_tasks) + rc = -ERANGE; + + splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' %d/%d delay " + "dispatches finished on time\n", SPLAT_TASKQ_TEST9_NAME, + atomic_read(&count), nr_tasks); + splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' destroying\n", + SPLAT_TASKQ_TEST9_NAME); +out: + taskq_destroy(tq); + + return rc; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -1139,6 +1238,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST7_ID, splat_taskq_test7); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST8_NAME, SPLAT_TASKQ_TEST8_DESC, SPLAT_TASKQ_TEST8_ID, splat_taskq_test8); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST9_NAME, SPLAT_TASKQ_TEST9_DESC, + SPLAT_TASKQ_TEST9_ID, splat_taskq_test9); return sub; } @@ -1147,6 +1248,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST9_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST8_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST6_ID); From 3238e717631c68f6f44907b46733f4ae70452d3b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 6 Dec 2012 15:42:32 -0800 Subject: [PATCH 0674/1062] splat taskq:cancel: Add test case Add a test case for taskq_cancel_id() to verify it is working properly. Just like taskq:delay we start by dispatching 100 tasks. However this time 1/3 of the tasks use taskq_dispatch() and will be run immediately, and 2/3 use taskq_dispatch_delay(). The idea is to create a busy taskq with both active, pending, and delayed tasks. After all the items have been successfully dispatched the test begins randomly canceling known task ids. It will do this for 5 seconds randomly canceling a task id and then sleeping for a few milliseconds. The task being canceled may have already run, still be on the pending list, or may be currently being executed by a worker thread. The idea is to ensure we catch any subtle race conditions. Once all the non-canceled tasks have completed we cross check the number of tasks which ran with the number of tasks which were successfully canceled. Additionally, we verify that the taskq_cancel_id() function never blocks longer than needed. This time is bounded by the longest run time of the task which was dispatched. Signed-off-by: Brian Behlendorf --- module/splat/splat-taskq.c | 183 +++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 272d334c0..673f4bd33 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -68,6 +68,10 @@ #define SPLAT_TASKQ_TEST9_NAME "delay" #define SPLAT_TASKQ_TEST9_DESC "Delayed task execution" +#define SPLAT_TASKQ_TEST10_ID 0x020a +#define SPLAT_TASKQ_TEST10_NAME "cancel" +#define SPLAT_TASKQ_TEST10_DESC "Cancel task execution" + #define SPLAT_TASKQ_ORDER_MAX 8 #define SPLAT_TASKQ_DEPTH_MAX 16 @@ -1205,6 +1209,182 @@ out: return rc; } +/* + * Create a taskq and dispatch then cancel tasks in the queue. + */ +static void +splat_taskq_test10_func(void *arg) +{ + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; + uint8_t rnd; + + if (ddi_get_lbolt() >= tq_arg->expire) + atomic_inc(tq_arg->count); + + /* Randomly sleep to further perturb the system */ + get_random_bytes((void *)&rnd, 1); + msleep(1 + (rnd % 9)); +} + +static int +splat_taskq_test10(struct file *file, void *arg) +{ + taskq_t *tq; + splat_taskq_arg_t **tqas; + atomic_t count; + int i, j, rc = 0; + int minalloc = 1; + int maxalloc = 10; + int nr_tasks = 100; + int canceled = 0; + int completed = 0; + int blocked = 0; + unsigned long start, cancel; + + tqas = vmalloc(sizeof(*tqas) * nr_tasks); + if (tqas == NULL) + return -ENOMEM; + memset(tqas, 0, sizeof(*tqas) * nr_tasks); + + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, + "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", + SPLAT_TASKQ_TEST10_NAME, "delay", minalloc, maxalloc, nr_tasks); + if ((tq = taskq_create(SPLAT_TASKQ_TEST10_NAME, 3, maxclsyspri, + minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, + "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST10_NAME); + rc = -EINVAL; + goto out_free; + } + + atomic_set(&count, 0); + + for (i = 0; i < nr_tasks; i++) { + splat_taskq_arg_t *tq_arg; + uint32_t rnd; + + /* A random timeout in jiffies of at most 5 seconds */ + get_random_bytes((void *)&rnd, 4); + rnd = rnd % (5 * HZ); + + tq_arg = kmem_alloc(sizeof(splat_taskq_arg_t), KM_SLEEP); + tq_arg->file = file; + tq_arg->name = SPLAT_TASKQ_TEST10_NAME; + tq_arg->count = &count; + tqas[i] = tq_arg; + + /* + * Dispatch every 1/3 one immediately to mix it up, the cancel + * code is inherently racy and we want to try and provoke any + * subtle concurrently issues. + */ + if ((i % 3) == 0) { + tq_arg->expire = ddi_get_lbolt(); + tq_arg->id = taskq_dispatch(tq, splat_taskq_test10_func, + tq_arg, TQ_SLEEP); + } else { + tq_arg->expire = ddi_get_lbolt() + rnd; + tq_arg->id = taskq_dispatch_delay(tq, + splat_taskq_test10_func, + tq_arg, TQ_SLEEP, ddi_get_lbolt() + rnd); + } + + if (tq_arg->id == 0) { + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, + "Taskq '%s' dispatch failed\n", + SPLAT_TASKQ_TEST10_NAME); + kmem_free(tq_arg, sizeof(splat_taskq_arg_t)); + taskq_wait(tq); + rc = -EINVAL; + goto out; + } else { + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, + "Taskq '%s' dispatch %lu in %lu jiffies\n", + SPLAT_TASKQ_TEST10_NAME, (unsigned long)tq_arg->id, + !(i % 3) ? 0 : tq_arg->expire - ddi_get_lbolt()); + } + } + + /* + * Start randomly canceling tasks for the duration of the test. We + * happen to know the valid task id's will be in the range 1..nr_tasks + * because the taskq is private and was just created. However, we + * have no idea of a particular task has already executed or not. + */ + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' randomly " + "canceling task ids\n", SPLAT_TASKQ_TEST10_NAME); + + start = ddi_get_lbolt(); + i = 0; + + while (ddi_get_lbolt() < start + 5 * HZ) { + taskqid_t id; + uint32_t rnd; + + i++; + cancel = ddi_get_lbolt(); + get_random_bytes((void *)&rnd, 4); + id = 1 + (rnd % nr_tasks); + rc = taskq_cancel_id(tq, id); + + /* + * Keep track of the results of the random cancels. + */ + if (rc == 0) { + canceled++; + } else if (rc == ENOENT) { + completed++; + } else if (rc == EBUSY) { + blocked++; + } else { + rc = -EINVAL; + break; + } + + /* + * Verify we never get blocked to long in taskq_cancel_id(). + * The worst case is 10ms if we happen to cancel the task + * which is currently executing. We allow a factor of 2x. + */ + if (ddi_get_lbolt() - cancel > HZ / 50) { + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, + "Taskq '%s' cancel for %lu took %lu\n", + SPLAT_TASKQ_TEST10_NAME, (unsigned long)id, + ddi_get_lbolt() - cancel); + rc = -ETIMEDOUT; + break; + } + + get_random_bytes((void *)&rnd, 4); + msleep(1 + (rnd % 100)); + rc = 0; + } + + taskq_wait(tq); + + /* + * Cross check the results of taskq_cancel_id() with the number of + * times the dispatched function actually ran successfully. + */ + if ((rc == 0) && (nr_tasks - canceled != atomic_read(&count))) + rc = -EDOM; + + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' %d attempts, " + "%d canceled, %d completed, %d blocked, %d/%d tasks run\n", + SPLAT_TASKQ_TEST10_NAME, i, canceled, completed, blocked, + atomic_read(&count), nr_tasks); + splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' destroying %d\n", + SPLAT_TASKQ_TEST10_NAME, rc); +out: + taskq_destroy(tq); +out_free: + for (j = 0; j < nr_tasks && tqas[j] != NULL; j++) + kmem_free(tqas[j], sizeof(splat_taskq_arg_t)); + vfree(tqas); + + return rc; +} + splat_subsystem_t * splat_taskq_init(void) { @@ -1240,6 +1420,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST8_ID, splat_taskq_test8); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST9_NAME, SPLAT_TASKQ_TEST9_DESC, SPLAT_TASKQ_TEST9_ID, splat_taskq_test9); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST10_NAME, SPLAT_TASKQ_TEST10_DESC, + SPLAT_TASKQ_TEST10_ID, splat_taskq_test10); return sub; } @@ -1248,6 +1430,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST10_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST9_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST8_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST7_ID); From 94ff5d38e30e5c79a45099413ac642c94b55a619 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Dec 2012 15:24:39 -0800 Subject: [PATCH 0675/1062] splat taskq:order: Reduce stack frame The slightly increased size of the taskq_ent_t when debugging is enabled has pushed the taskq:order splat test over frame size limit. To resolve this dynamically allocate the taskq_ent_t structures so they are part of the heap instead of the stack. In function 'splat_taskq_test5_impl' error: the frame size of 1680 bytes is larger than 1024 bytes Signed-off-by: Brian Behlendorf --- module/splat/splat-taskq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 673f4bd33..f05d1c0eb 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -669,9 +669,12 @@ splat_taskq_test5_impl(struct file *file, void *arg, boolean_t prealloc) splat_taskq_arg_t tq_arg; int order1[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,0,0,0 }; int order2[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,8,6,7 }; - taskq_ent_t tqes[SPLAT_TASKQ_ORDER_MAX]; + taskq_ent_t *tqes; int i, rc = 0; + tqes = kmem_alloc(sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX, KM_SLEEP); + memset(tqes, 0, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); + splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' creating (%s dispatch)\n", SPLAT_TASKQ_TEST5_NAME, @@ -738,6 +741,8 @@ out: "Taskq '%s' destroying\n", tq_arg.name); taskq_destroy(tq); + kmem_free(tqes, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); + return rc; } From a5a98e72605c071f94b9fdc4bf1811f8ed8d7f32 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Dec 2012 15:27:05 -0800 Subject: [PATCH 0676/1062] splat taskq:front: Reduce stack frame The slightly increased size of the taskq_ent_t when debugging is enabled has pushed the taskq:front splat test over frame size limit. To resolve this dynamically allocate the taskq_ent_t structures so they are part of the heap instead of the stack. In function 'splat_taskq_test6_impl' error: the frame size of 1648 bytes is larger than 1024 bytes Signed-off-by: Brian Behlendorf --- module/splat/splat-taskq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index f05d1c0eb..5a9681e21 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -828,10 +828,13 @@ splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) splat_taskq_id_t tq_id[SPLAT_TASKQ_ORDER_MAX]; splat_taskq_arg_t tq_arg; int order[SPLAT_TASKQ_ORDER_MAX] = { 1,2,3,6,7,8,4,5 }; - taskq_ent_t tqes[SPLAT_TASKQ_ORDER_MAX]; + taskq_ent_t *tqes; int i, rc = 0; uint_t tflags; + tqes = kmem_alloc(sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX, KM_SLEEP); + memset(tqes, 0, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' creating (%s dispatch)\n", SPLAT_TASKQ_TEST6_NAME, @@ -899,6 +902,8 @@ out: "Taskq '%s' destroying\n", tq_arg.name); taskq_destroy(tq); + kmem_free(tqes, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); + return rc; } From 296a8e596dac344cf3af5e7f2dff5be12c979d80 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Dec 2012 11:01:08 -0800 Subject: [PATCH 0677/1062] kmem-cache: spl_kmem_cache_create() may always sleep When this code was originally written I went overboard and allowed for the possibility of creating a cache in an atomic context. In practice there are no callers which ever do this. This makes sense since a cache is by design a long lived data structure. To prevent abuse of this function going forward I'm removing the code which is supported to handle an atomic context. All allocators have been updated to use KM_SLEEP and the might_sleep() debug macro has been added to immediately detect atomic callers. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index b171d446a..f78f820aa 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1482,7 +1482,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, void *priv, void *vmp, int flags) { spl_kmem_cache_t *skc; - int rc, kmem_flags = KM_SLEEP; + int rc; SENTRY; ASSERTF(!(flags & KMC_NOMAGAZINE), "Bad KMC_NOMAGAZINE (%x)\n", flags); @@ -1490,25 +1490,22 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, ASSERTF(!(flags & KMC_QCACHE), "Bad KMC_QCACHE (%x)\n", flags); ASSERT(vmp == NULL); - /* We may be called when there is a non-zero preempt_count or - * interrupts are disabled is which case we must not sleep. - */ - if (current_thread_info()->preempt_count || irqs_disabled()) - kmem_flags = KM_NOSLEEP; + might_sleep(); - /* Allocate memory for a new cache an initialize it. Unfortunately, + /* + * Allocate memory for a new cache an initialize it. Unfortunately, * this usually ends up being a large allocation of ~32k because * we need to allocate enough memory for the worst case number of * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we - * explicitly pass KM_NODEBUG to suppress the kmem warning */ - skc = (spl_kmem_cache_t *)kmem_zalloc(sizeof(*skc), - kmem_flags | KM_NODEBUG); + * explicitly pass KM_NODEBUG to suppress the kmem warning + */ + skc = kmem_zalloc(sizeof(*skc), KM_SLEEP| KM_NODEBUG); if (skc == NULL) SRETURN(NULL); skc->skc_magic = SKC_MAGIC; skc->skc_name_size = strlen(name) + 1; - skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, kmem_flags); + skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, KM_SLEEP); if (skc->skc_name == NULL) { kmem_free(skc, sizeof(*skc)); SRETURN(NULL); From a10287e00d13c4c4dbbff14f42b00b03da363fcb Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Dec 2012 10:53:46 -0800 Subject: [PATCH 0678/1062] kmem-cache: Use taskqs for ageing Shift the cache and magazine ageing functionality over to the new delayed taskq interfaces. This allows us to abandon the kernels delayed work queue interface and all the compatibility code it requires. However, the delayed taskq interface does not allow us to schedule a task for a specfic cpu so the ageing code was slightly reworked. The magazine ageing delay has been directly linked to the cache ageing function. The spl_cache_age() function invokes on_each_cpu() in order to run spl_magazine_age() on each cpu. It then blocks waiting for them to complete and promptly reclaims any free slabs. When restructing the code wasn't the primary goal I think the new code is far more understable and maintainable. It also should help minimize magazine thrashing because free slabs are immediately released after the magazine is aged. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 4 +- module/spl/spl-kmem.c | 91 ++++++++++++++++++++++++------------------- 2 files changed, 52 insertions(+), 43 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 83adc8d2a..e189922ef 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -37,6 +37,7 @@ #include #include #include +#include /* * Memory allocation interfaces @@ -406,7 +407,6 @@ typedef struct spl_kmem_magazine { uint32_t skm_size; /* Magazine size */ uint32_t skm_refill; /* Batch refill size */ struct spl_kmem_cache *skm_cache; /* Owned by cache */ - struct delayed_work skm_work; /* Magazine reclaim work */ unsigned long skm_age; /* Last cache access */ unsigned int skm_cpu; /* Owned by cpu */ void *skm_objs[0]; /* Object pointers */ @@ -460,7 +460,7 @@ typedef struct spl_kmem_cache { uint32_t skc_delay; /* Slab reclaim interval */ uint32_t skc_reap; /* Slab reclaim count */ atomic_t skc_ref; /* Ref count callers */ - struct delayed_work skc_work; /* Slab reclaim work */ + taskqid_t skc_taskqid; /* Slab reclaim task */ struct list_head skc_list; /* List of caches linkage */ struct list_head skc_complete_list;/* Completely alloc'ed */ struct list_head skc_partial_list; /* Partially alloc'ed */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f78f820aa..3900c9cf0 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -825,6 +825,7 @@ EXPORT_SYMBOL(vmem_free_debug); struct list_head spl_kmem_cache_list; /* List of caches */ struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ +taskq_t *spl_kmem_cache_taskq; /* Task queue for ageing / reclaim */ static int spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush); @@ -1243,50 +1244,59 @@ spl_emergency_free(spl_kmem_cache_t *skc, void *obj) SRETURN(0); } -/* - * Called regularly on all caches to age objects out of the magazines - * which have not been access in skc->skc_delay seconds. This prevents - * idle magazines from holding memory which might be better used by - * other caches or parts of the system. The delay is present to - * prevent thrashing the magazine. - */ static void spl_magazine_age(void *data) { - spl_kmem_magazine_t *skm = - spl_get_work_data(data, spl_kmem_magazine_t, skm_work.work); - spl_kmem_cache_t *skc = skm->skm_cache; + spl_kmem_cache_t *skc = (spl_kmem_cache_t *)data; + spl_kmem_magazine_t *skm = skc->skc_mag[smp_processor_id()]; ASSERT(skm->skm_magic == SKM_MAGIC); - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(skc->skc_mag[skm->skm_cpu] == skm); + ASSERT(skm->skm_cpu == smp_processor_id()); - if (skm->skm_avail > 0 && - time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) - (void)spl_cache_flush(skc, skm, skm->skm_refill); - - if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) - schedule_delayed_work_on(skm->skm_cpu, &skm->skm_work, - skc->skc_delay / 3 * HZ); + if (skm->skm_avail > 0) + if (time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) + (void) spl_cache_flush(skc, skm, skm->skm_refill); } /* - * Called regularly to keep a downward pressure on the size of idle - * magazines and to release free slabs from the cache. This function - * never calls the registered reclaim function, that only occurs - * under memory pressure or with a direct call to spl_kmem_reap(). + * Called regularly to keep a downward pressure on the cache. + * + * Objects older than skc->skc_delay seconds in the per-cpu magazines will + * be returned to the caches. This is done to prevent idle magazines from + * holding memory which could be better used elsewhere. The delay is + * present to prevent thrashing the magazine. + * + * The newly released objects may result in empty partial slabs. Those + * slabs should be released to the system. Otherwise moving the objects + * out of the magazines is just wasted work. */ static void spl_cache_age(void *data) { - spl_kmem_cache_t *skc = - spl_get_work_data(data, spl_kmem_cache_t, skc_work.work); + spl_kmem_cache_t *skc = (spl_kmem_cache_t *)data; + taskqid_t id = 0; ASSERT(skc->skc_magic == SKC_MAGIC); + + atomic_inc(&skc->skc_ref); + spl_on_each_cpu(spl_magazine_age, skc, 1); spl_slab_reclaim(skc, skc->skc_reap, 0); - if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)) - schedule_delayed_work(&skc->skc_work, skc->skc_delay / 3 * HZ); + while (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && !id) { + id = taskq_dispatch_delay( + spl_kmem_cache_taskq, spl_cache_age, skc, TQ_SLEEP, + ddi_get_lbolt() + skc->skc_delay / 3 * HZ); + + /* Destroy issued after dispatch immediately cancel it */ + if (test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && id) + taskq_cancel_id(spl_kmem_cache_taskq, id); + } + + spin_lock(&skc->skc_lock); + skc->skc_taskqid = id; + spin_unlock(&skc->skc_lock); + + atomic_dec(&skc->skc_ref); } /* @@ -1380,7 +1390,6 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) skm->skm_size = skc->skc_mag_size; skm->skm_refill = skc->skc_mag_refill; skm->skm_cache = skc; - spl_init_delayed_work(&skm->skm_work, spl_magazine_age, skm); skm->skm_age = jiffies; skm->skm_cpu = cpu; } @@ -1427,11 +1436,6 @@ spl_magazine_create(spl_kmem_cache_t *skc) } } - /* Only after everything is allocated schedule magazine work */ - for_each_online_cpu(i) - schedule_delayed_work_on(i, &skc->skc_mag[i]->skm_work, - skc->skc_delay / 3 * HZ); - SRETURN(0); } @@ -1566,8 +1570,9 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (rc) SGOTO(out, rc); - spl_init_delayed_work(&skc->skc_work, spl_cache_age, skc); - schedule_delayed_work(&skc->skc_work, skc->skc_delay / 3 * HZ); + skc->skc_taskqid = taskq_dispatch_delay(spl_kmem_cache_taskq, + spl_cache_age, skc, TQ_SLEEP, + ddi_get_lbolt() + skc->skc_delay / 3 * HZ); down_write(&spl_kmem_cache_sem); list_add_tail(&skc->skc_list, &spl_kmem_cache_list); @@ -1600,7 +1605,7 @@ void spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { DECLARE_WAIT_QUEUE_HEAD(wq); - int i; + taskqid_t id; SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); @@ -1609,13 +1614,14 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) list_del_init(&skc->skc_list); up_write(&spl_kmem_cache_sem); - /* Cancel any and wait for any pending delayed work */ + /* Cancel any and wait for any pending delayed tasks */ VERIFY(!test_and_set_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - cancel_delayed_work_sync(&skc->skc_work); - for_each_online_cpu(i) - cancel_delayed_work_sync(&skc->skc_mag[i]->skm_work); - flush_scheduled_work(); + spin_lock(&skc->skc_lock); + id = skc->skc_taskqid; + spin_unlock(&skc->skc_lock); + + taskq_cancel_id(spl_kmem_cache_taskq, id); /* Wait until all current callers complete, this is mainly * to catch the case where a low memory situation triggers a @@ -2394,6 +2400,8 @@ spl_kmem_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); + spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", + 1, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); spl_register_shrinker(&spl_kmem_cache_shrinker); @@ -2432,6 +2440,7 @@ spl_kmem_fini(void) SENTRY; spl_unregister_shrinker(&spl_kmem_cache_shrinker); + taskq_destroy(spl_kmem_cache_taskq); SEXIT; } From 33e94ef1dd2678e28a5fbdb80f4ce35fd8c85974 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Dec 2012 13:40:03 -0800 Subject: [PATCH 0679/1062] kmem-cache: Use a taskq for async allocations Shift the asynchronous allocations over to use the taskq interfaces. This allows us to abandon the kernels delayed work queue interface and all the compatibility code it requires. This code never actually used the delay functionality it was just done this way to leverage the existing compatibility code. All that is required is a thread context to perform the allocation in. The only thing clever in this change is that we take advantage of the preallocated task queue entries to avoid a memory allocation. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 2 +- module/spl/spl-kmem.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index e189922ef..6904bec3f 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -432,7 +432,7 @@ typedef struct spl_kmem_slab { typedef struct spl_kmem_alloc { struct spl_kmem_cache *ska_cache; /* Owned by cache */ int ska_flags; /* Allocation flags */ - struct delayed_work ska_work; /* Allocation work */ + taskq_ent_t ska_tqe; /* Task queue entry */ } spl_kmem_alloc_t; typedef struct spl_kmem_emergency { diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 3900c9cf0..bc08a5598 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1697,8 +1697,7 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) static void spl_cache_grow_work(void *data) { - spl_kmem_alloc_t *ska = - spl_get_work_data(data, spl_kmem_alloc_t, ska_work.work); + spl_kmem_alloc_t *ska = (spl_kmem_alloc_t *)data; spl_kmem_cache_t *skc = ska->ska_cache; spl_kmem_slab_t *sks; @@ -1777,8 +1776,9 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) atomic_inc(&skc->skc_ref); ska->ska_cache = skc; ska->ska_flags = flags & ~__GFP_FS; - spl_init_delayed_work(&ska->ska_work, spl_cache_grow_work, ska); - schedule_delayed_work(&ska->ska_work, 0); + taskq_init_ent(&ska->ska_tqe); + taskq_dispatch_ent(spl_kmem_cache_taskq, + spl_cache_grow_work, ska, 0, &ska->ska_tqe); } /* From eb0be2ed46d3f0eb01378458f421a88798608592 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Dec 2012 13:53:25 -0800 Subject: [PATCH 0680/1062] Removed SPL_AC_3ARGS_INIT_WORK check All consumers of the kernel delayed work queues have been shifted over to rely on the taskq implementation. This compatibility code can now be removed. Any new callers which need this functionality should use the taskq interfaces for delayed work items. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 21 -------------- include/linux/workqueue_compat.h | 49 -------------------------------- include/sys/types.h | 1 - 3 files changed, 71 deletions(-) delete mode 100644 include/linux/workqueue_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index e8ecbc654..ea25e206f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -26,7 +26,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_TYPE_ATOMIC64_CMPXCHG SPL_AC_TYPE_ATOMIC64_XCHG SPL_AC_TYPE_UINTPTR_T - SPL_AC_3ARGS_INIT_WORK SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SET_SHRINKER SPL_AC_3ARGS_SHRINKER_CALLBACK @@ -870,26 +869,6 @@ AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], ]) ]) -dnl # -dnl # 2.6.20 API change, -dnl # INIT_WORK use 2 args and not store data inside -dnl # -AC_DEFUN([SPL_AC_3ARGS_INIT_WORK], - [AC_MSG_CHECKING([whether INIT_WORK wants 3 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct work_struct work __attribute__ ((unused)); - INIT_WORK(&work, NULL, NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_INIT_WORK, 1, - [INIT_WORK wants 3 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.21 API change, dnl # 'register_sysctl_table' use only one argument instead of two diff --git a/include/linux/workqueue_compat.h b/include/linux/workqueue_compat.h deleted file mode 100644 index a92800ce5..000000000 --- a/include/linux/workqueue_compat.h +++ /dev/null @@ -1,49 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_WORKQUEUE_COMPAT_H -#define _SPL_WORKQUEUE_COMPAT_H - -#include -#include - -#ifdef HAVE_3ARGS_INIT_WORK - -#define delayed_work work_struct - -#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb), \ - (void *)(d)) -#define spl_init_delayed_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), \ - (void *)(d)) -#define spl_get_work_data(d, t, f) (t *)(d) - -#else - -#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb)); -#define spl_init_delayed_work(wq,cb,d) INIT_DELAYED_WORK((wq), (void *)(cb)); -#define spl_get_work_data(d, t, f) (t *)container_of(d, t, f) - -#endif /* HAVE_3ARGS_INIT_WORK */ - -#endif /* _SPL_WORKQUEUE_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 35905eb97..b867be111 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include From 30196bfd42567a9bc3fccac8650dc2cd9f0f7c0a Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 17 Dec 2012 09:43:45 -0800 Subject: [PATCH 0681/1062] Do not use KERNEL_DIR env var in Makefile.am A Gentoo user reported an issue where the build system would attempt to recurse into the kernel source tree if KERNEL_DIR is set in the environment. KERNEL_DIR is an environment variable that is used when the kernel sources are in a non-standard location, so it is necessary to stop relying on it to prevent this issue. https://bugs.gentoo.org/show_bug.cgi?id=433946 Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6000a7d14..74c292093 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,13 +3,13 @@ include $(top_srcdir)/config/deb.am include $(top_srcdir)/config/tgz.am include $(top_srcdir)/config/arch.am +SUBDIRS = if CONFIG_USER -USER_DIR = lib cmd scripts +SUBDIRS += lib cmd scripts endif if CONFIG_KERNEL -KERNEL_DIR = module include +SUBDIRS += module include endif -SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER From 034f1b331e2c152e8e8954d715fa9a84f7b48d64 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 Dec 2012 17:02:27 -0800 Subject: [PATCH 0682/1062] Fix spl_kmem_init_kallsyms_lookup() panic Due to I/O buffering the helper may return successfully before the proc handler has a chance to execute. To catch this case wait up to 1 second to verify spl_kallsyms_lookup_name_fn was updated to a non SYMBOL_POISON value. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#699 Closes zfsonlinux/zfs#859 --- include/linux/kallsyms_compat.h | 1 + module/spl/spl-generic.c | 19 +++++++++++++++++++ module/spl/spl-proc.c | 2 ++ 3 files changed, 22 insertions(+) diff --git a/include/linux/kallsyms_compat.h b/include/linux/kallsyms_compat.h index 34c45ea3a..fbe33e8e6 100644 --- a/include/linux/kallsyms_compat.h +++ b/include/linux/kallsyms_compat.h @@ -34,6 +34,7 @@ #else +extern wait_queue_head_t spl_kallsyms_lookup_name_waitq; typedef unsigned long (*kallsyms_lookup_name_t)(const char *); extern kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn; #define spl_kallsyms_lookup_name(name) spl_kallsyms_lookup_name_fn(name) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index cc2766452..22ea50781 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -64,6 +64,7 @@ proc_t p0 = { 0 }; EXPORT_SYMBOL(p0); #ifndef HAVE_KALLSYMS_LOOKUP_NAME +DECLARE_WAIT_QUEUE_HEAD(spl_kallsyms_lookup_name_waitq); kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn = SYMBOL_POISON; #endif @@ -607,6 +608,24 @@ set_kallsyms_lookup_name(void) int rc; rc = call_usermodehelper(argv[0], argv, envp, 1); + + /* + * Due to I/O buffering the helper may return successfully before + * the proc handler has a chance to execute. To catch this case + * wait up to 1 second to verify spl_kallsyms_lookup_name_fn was + * updated to a non SYMBOL_POISON value. + */ + if (rc == 0) { + rc = wait_event_timeout(spl_kallsyms_lookup_name_waitq, + spl_kallsyms_lookup_name_fn != SYMBOL_POISON, HZ); + if (rc == 0) + rc = -ETIMEDOUT; + else if (spl_kallsyms_lookup_name_fn == SYMBOL_POISON) + rc = -EFAULT; + else + rc = 0; + } + if (rc) printk("SPL: Failed user helper '%s %s %s', rc = %d\n", argv[0], argv[1], argv[2], rc); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 152abff7f..2fb295439 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -546,6 +546,8 @@ SPL_PROC_HANDLER(proc_dokallsyms_lookup_name) spl_kallsyms_lookup_name_fn = (kallsyms_lookup_name_t)simple_strtoul(str, &end, 16); + wake_up(&spl_kallsyms_lookup_name_waitq); + if (str == end) SRETURN(-EINVAL); From dd5b6d96f1952df2f99486fbf0d665a43e92bbe3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 19 Dec 2012 09:28:18 -0800 Subject: [PATCH 0683/1062] Remove the ChangeLog The ChangeLog was retired long ago, the git commit logs are authoritative. To avoid any confusion remove the ChangeLog. Signed-off-by: Brian Behlendorf --- ChangeLog | 555 ---------------------------------------------------- spl.spec.in | 2 +- 2 files changed, 1 insertion(+), 556 deletions(-) delete mode 100644 ChangeLog diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index d02dbdc02..000000000 --- a/ChangeLog +++ /dev/null @@ -1,555 +0,0 @@ -2010-8-13 Brian Behlendorf - - * : Tag spl-0.5.0 - - * : The ChangeLog is being retired. Please use the git commit - logs for a full records of changes: 'git log' - -2010-05-21 Brian Behlendorf - - * : Tag spl-0.4.9 - - * : Build system improvements: - - Added support for the 'make -s' silent build option. - - Allow spl_config.h to be included by dependent packages. - - Minor spec file updates. - - * AUTHORS, COPYING, DISCLAIMER, and INSTALL: Updated. - - * *.c, *.h, *.sh, AUTHORS, COPYING, DISCLAIMER, and INSTALL: - Added standard header to source files which includes the copyright, - license, and author information. Additionally, updated the listed - top level files to the latest versions. - - * module/spl/spl-debug.c: Debugging defaults adjusted. The default - log dump path is now /tmp/spl-log and panic on SBUG has been disabled. - - * include/sys/processor.h, include/sys/systm.h, include/sys/types.h: - Added 3 missing typedefs processorid_t, pc_t, and index_t. - - * include/sys/console.h: Added support for console_* functions(). - - * module/spl/spl-time.c: Updated gethrtime() to use the function - do_posix_clock_monotonic_gettime() as described in the comment. - - * module/spl/spl-condvar.c: Added cv_wait_interruptible() function - as an extension to the existing condition variable ABI to enable - sleeping threads a way to cleanly handle signals in the kernel. - - * module/spl/spl-debug.c: Dump log from current process as required. - - * module/spl/spl-taskq.c: Assume TQ_SLEEP in taskq_dispatch() if - the caller does not specify, this is the Solaris default. - - * module/spl/spl-vnode.c: Extend the vn_rdwr() implementation to - correctly handle the FAPPEND option. - - * module/spl/spl-generic.c, module/spl/spl-vnode.c: Update - vn_set_pwd() to allow a kernal address as filename. This turns - out to be critical because spl_setup()->The vn_set_pwd("/") which - is called at module load time was failing with -EFAULT. - - * include/sys/rwlock.h: Disable rw_tryupgrade() for kernels built - without CONFIG_RWSEM_GENERIC_SPINLOCK defined. The existing - implementation is not safe in this case and needs to be replaced - with a correct native per-arch implementation. - - * module/spl/spl-kmem.c: Reduce maximum kmem based slab size. - Allowing MAX_ORDER-1 sized memory allocations while the system - is low on memory has been observed to result in deadlocks. Callers - should not be using the slab in this way but we should still handle - the case more cleanly. - - * module/spl/spl-kmem.c: Remove kmem_set_warning() interface and - replace it with KM_NODEBUG flag which can be specific per allocation. - - * module/splat/splat-kmem.c: Tweaked what the idea of a large object - is for the kmem:slab_large regression tests because failures were - observed for very large kmem objects in newer kernels. - - * include/sys/rwlock.h, module/splat/splat-rwlock.c: The rwlock - implementation was simplified because failures were being observed - when using the non-generic implementation. This change leverages - the rwsem_is_locked() function instead of directly consulting the - rwsem internals which differ per-arch and per-kernel-version. - -2010-03-11 Brian Behlendorf - - * : Tag spl-0.4.8 - - * : Build system improvements: - - Remove Module.markers and Module.symver{s} in clean target. - - Improved kernel source detection when none specified. - - Fix RPM definitions for the unknown distro/installation. - - * config/spl-build.m4: Linux 2.6.32 compat, SPL_AC_5ARGS_PROC_HANDLER - macro added to handle updated proc_handler () API. - - * module/spl/spl-err.c: Fix panic() string, which was being used as a - format string, instead of an already-formatted string. - - * /module/spl/spl-taskq.c: Optimize lowest outstanding taskqid - calculation in taskq_lowest_id(). The motivation for this change - was that I was observing as much as 10% of the total CPU time go - to waiting on the tq->tq_lock when the pending list was long. - - * module/spl/spl-kmem.c: Strip __GFP_ZERO from kmalloc it is not - available for older kernels. - - * module/spl/spl-proc.c: Add skc_flags and full header to - /proc/spl/kmem/slab - - * module/spl/spl-generic.c: Correctly handle division on 32-bit RHEL5 - systems by returning dividend. - - * include/sys/rwlock.h: When using x86 specific rwsem correctly - intepret rwsem->count. Additionally check for changed guard macro - in 2.6.28+ for rwsem implementation - - * module/splat/splat-vnode.c, module/splat/splat-kmem.c, - module/splat/splat-taskq.c: Several new tests were added to the - test suite and various bug fixes. - - * include/asm/atomic_compat.h: Atomic64 compatibility for 32-bit - systems without kernel support. - - * .gitignore: Added .gitignore files. - -2009-11-20 Brian Behlendorf - - * : Tag spl-0.4.7 - - * config/spl-build.m4: Linux 2.6.31 compat, SPL_AC_2ARGS_SET_FS_PWD - macro updated to explicitly include linux/fs_struct.h which was - dropped from linux/sched.h. - - * include/linux/mm_compat.h: Linux 2.6.31 compat, use the macros - min_wmark_pages, low_wmark_pages, and high_wmark_pages which were - introduced. For older kernels a compability macro is used. - - * include/sys/kmem.h: Linux 2.6.31 compat, the __GFP_NOFAIL flag - should no longer be used and it may disappear from the kernel at any - time. To handle this I have simply added *_nofail wrappers in the - kmem implementation which perform the retry for non-atomic allocations. - - * module/spl/spl-kmem.c: Linux 2.6.31 compat, kmem cache alignment - fixes and cleanup. Always perform allocations for the kmem cache - using __get_free_pages() or __vmalloc() to ensure the returned - memory is page aligned. Also introduce helper functions which use - P2ROUNDUP_TYPE instead of P2ROUNDUP force all types to be explicit. - - * include/sys/mutex.h: Add mutex_enter_nested() as wrapper for - mutex_lock_nested() to permit integration with the lock checker. - - * include/sys/mutex.h: Always use the generic mutex_destroy(). - - * Makefile.am: Ensure *.order and *.markers build products are - removed by distclean rule. - -2009-11-02 Brian Behlendorf - - * : Tag spl-0.4.6 - - * config/spl-build.m4: Cleanup --enable-debug-* configure options. - --enable-debug= generic debug support. - --enable-debug-kmem= basic kmem and slab accounting. - --enable-debug-kmem-tracking= detailed kmem tracking. - --enable-debug-kstat removed option support always enabled. - --enable-debug-callb removed option which never did anything. - - * module/spl/spl-atomic.c: Reimplemented atomic functions by - layering them on top of the Linux atomic functions. This improves - performance by removing the need for a global spinlock. - - * module/spl/spl-debug.c: Rebase cmn_err on vcmn_err. Handle the - case where the message contains a leading ! which means only send - it to syslog. And suppress warnings for messages which do not end - in a '\n'. - - * module/splat/splat-ctl.c: Update to use kobject_set_name() for - increased portability. - - * module/spl/spl-generic.c: Set cwd to '/' for the task during - module load for SPL dependent modules. Under Solaris this is - the expected behavior, on a Linux system your cwd remains set - to whatever the tasks cwd was when loading a module. - - * module/spl/spl-mutex.c: Reimplemented mutexs for improved - performance and cleaner integration with the Linux kernels built - in lock analyzer. As of 2.6.29 based kernels adaptive mutexs - are supported, for these newer kernels task_curr() does not need - to be exported. Finally, DEBUG_MUTEX support was dropped in - favor of more detailed kernel profiling which is now available. - - * module/spl/spl-rwlock.c: Reimplemented rwlocks for improved - performance and cleaner integration with the Linux kernels built - in lock analyzer. Additionally, the rwlock regression tests were - improved to help validate correctness. - - * spl-modules.spec.in: Various spec file tweaks for the supported - distros: RHEL5, RHEL6, SLES10, SLES11, Chaos4, Fedora 11. - -2009-08-04 Brian Behlendorf - - * : Tag spl-0.4.5 - - * FC11 and SLES11 support: This includes all compatibility changes - to support 2.6.29 based kernels and the required build system - improvements. - * module/spl/spl-module.c: Register a basic compat ioctl handler - for 32-bit user vs 64-bit kernel compatibility. This is the default - build environment for all 64-bit SLES systems. - * config/spl-build.m4: Check arch/default path when detecting kernel - objects under SLES. We still preferentially use arch/arch if - available but if that fails it is acceptable to use default. - * module/spl/spl-vnode.: Use HAVE_PATH_IN_NAMEIDATA compat macros - for maximum kernel compatibility. - * config/spl-build.m4: Remove LINUXINCLUDE from autoconf wrapper. - This breaks the 2.6.28+ kernels build system, all kernel build systems - at least post 2.6.16 will set this properly so we should not. - * include/sys/vmsystm.h, module/spl/spl-kmem.c: Perferentially use the - global_page_state() API when your kernel supports the required enums. - * include/sys/debug.h: Add ASSERTV macro to simplify removing - variables (the V in ASSERTV) which are only used in ASSERT(). - * include/sys/debug.h: Disable stack overflow checking by default - when build with --enable-debug, modern kernels now provide this. - * patches/fc11-spl-export-symbols.patch: Recommended missing symbols - patch for FC11. This is not required for correct functionality but - it is recommended for individuals who are already patching the kernel. - - * Additional Solaris API emulation: - * include/sys/taskq.h: Add basic taskq support for the flag - TASKQ_THREADS_CPU_PCT which is used to scale the number of threads - based on the number of online CPUs. - * include/sys/file.hi, module/spl/spl-generic.c: Add support for - fake ioctls which originate from the kernel instead of user space. - * include/sys/acl.h: Add ACE_ALL_PERMS ACL definition. - * include/sys/cred.h, module/splat/splat-cred.c: Add basic credential - support and splat regression tests. - - * Bug fixes: - * include/sys/isa_defs.h: Add more endianess paranoia. - * module/spl/spl-time.c: Integer overflow after ~164 days. - * include/sys/debug.h: NULL dereference by tcd_for_each(). - * module/splat/splat-kmem.c: Allow kmem or vmem based slabs for - slab_lock and slab_overcommit tests. This may still be an issue on - 32-bit systems due to the small virtual address space. - * module/spl/spl-module.c: Positive Solaris ioctl return codes are - need to be negated for use by libc to ensure errno is set correctly. - -2009-07-02 Brian Behlendorf - - * : Tag spl-0.4.4 - - * : Generic distro friendly build system / packaging improvements - for rpm based distros including CHAOS, RHEL, Fedora, and SLES. - - spl-.src.rpm - - Fully rebuildable source rpm for utils. - spl-modules-.src.rpm - - Fully rebuildable source rpm for kernel modules. - - spl-..rpm - - Binary rpm for utils. The utils in this package are compatible - with all spl-module rpms of the same version. - - spl-modules--.arch.rpm - - Binary rpm containing the kernel modules for a specific kernel build. - The package name contains the kernel version and you should have one - of these packages installed to match every kernel on your system. - spl-modules-devel--.arch.rpm - - Binary rpm containing development header and module symbols needed - for building additional kernel modules which are dependent on the - spl module. - - * : Added SLES10 support. This includes all compatibility - changes to support 2.6.16 based kernels and the required - build system improvements. - - * : Build System changes for SLES10: - - Exclude -obj when detecting installed kernel source. - - Detect -obj directory for out of tree kernel builds. - - Allow kernel build system to set CC to ensure -m64 is set properly. - This is an issue on 64-bit SLES systems which by default always - build 32-bit binaries (unlike RHEL/Fedora which default to 64-bit) - - * : Configure Checks added for SLES10: - - div64_64() renamed to div64_u64() as of 2.6.26. - - global_page_state() fuction was introduced in 2.6.18 kernels. - The earlier 2.6.16 based SLES10 must not try and use it, - thankfully get_zone_counts() is still available. - - monotonic_clock() is unavailable __gethrtime() must perform the - HZ division as an 'unsigned long long' because the SPL only - implements __udivdi3(), and not __divdi3() for 'long long' - division on 32-bit arches. - - mutex_lock_nested() was introduced as part of the mutex - validator in 2.6.18, when it is unavailable it is safe to - fallback to using a plain mutex_lock(). - - SLES specific API change to vfs_unlink() and vfs_rename() which - added a 'struct vfsmount *' argument. This was for something - called the linux-security-module, but it appears that it was - never adopted upstream. - - spl_device_create() correctly mapped to class_device_create() - for 2.6.13 to 2.6.17 based kernels, this is the preferred API. - - Prior to 2.6.17 there were no *_pgdat helper functions in - mm/mmzone.c. Instead for_each_zone() operated directly on - pgdat_list which may or may not have been exported depending on - how your kernel was compiled. A configure check was added to - determine if you have the helpers or not, and if the needed - symbols are exported. If they are not exported then they are - dynamically aquired at runtime by kallsyms_lookup_name(). - - * : Packaging changes for SLES10 - - Properly honor --prefix in build system and rpm spec file. - - Add '--define require_kdir' to spec file to support building - rpms against kernel sources installed in non-default locations. - - Add '--define require_kobj' to spec file to support building - rpms against kernel object installed in non-default locations. - - Stop suppressing errors in autogen.sh script. - - Improved logic to detect missing kernel objects when they are - not located with the source. This is the common case for SLES - as well as in-tree chaos kernel builds and is done to simply - support for multiple arches. - - Moved spl-devel build products to /usr/src/spl-, a - spl symlink is created to reference the last installed version. - - Allow checking for exported symbols in both Module.symvers - and Module.symvers. My stock SLES kernel ships an objects - directory with Module.symvers, yet produces a Module.symvers - in the local build directory. - - * : Added powerpc64 support. - - Enable builds for powerpc64 ISA type. - - Add DIV_ROUND_UP and roundup macros if unavailable. - - Cast 64-bit values for %lld format string to (long long) to - quiet compile warning. - - * module/splat/splat-ctl.c: Proper ioctl() 32/64-bit binary - compatibility. We need to ensure the ioctl data itself is always - packed the same for 32/64-bit binaries. Additionally, the correct - thing to do is encode this size in bytes as part of the command - using _IOC_SIZE(). - - * modules/spl/spl-kmem.c: Fixed a long standing bug in the debug - tracing. The tcd_for_each() macro expected a NULL to terminate - the trace_data[i] array but this was only ever true due to luck. - All trace_data[] iterators are now properly capped by TCD_TYPE_MAX. - - * modules/spl/spl-kmem.c: To simplify debugging all symbols aquired - dynamically using spl_kallsyms_lookup_name() are initially poisoned - with SYMBOL_POISON. - -2009-03-20 Brian Behlendorf - - * : Tag spl-0.4.3 - - * configure.ac, *Makefile.am: Build system update. This includes - resolving various build issues and adding support for the remaining - common build targets. Available targets now include: - - - make all # Build everything - - make install # Install everything - - make clean # Clean up build products - - make distclean # Clean up everything - - make dist # Create package tarball - - make srpm # Create package source RPM - - make rpm # Create package binary RPMs - - make tags # Create ctags and etags for everything - - Extra care was taken to ensure that the source RPMs are fully - rebuildable against Fedora/RHEL/Chaos kernels. To build binary - RPMs from the source RPM for your system simply run: - - rpmbuild --rebuild spl-x.y.z-1.src.rpm - - This will produce two binary RPMs with correct 'requires' - dependencies for your kernel. One will contain all zpl modules - and support utilities, the other is a devel package for compiling - additional kernel modules which are dependent on the spl. - - spl-x.y.z-1_.x86_64.rpm - spl-devel-x.y.2-1_.x86_64.rpm - - * : FC10 (linux-2.6.27.19) and i686 compatibility update. The - list of support platforms has been extended to include FC10 - systems and x86 architectures. It should be noted that kernels - older the 2.6.27.19 should work but have not have not been tested. - - * configure.ac: Fix build issue preventing spl_config.h from being - cleanly included by dependent packages. - - * module/spl/spl-taskq.c: Fix taskq_wait() not waiting bug. - - * module/spl/spl-xdr.c: Add XDR implementation provided by Ricardo - Correia from Sun. - - * module/spl/spl-kmem.c: Linux VM integration cleanup. - - * module/spl/spl-kmem.c: Slab cache improvements and fixes. - - * modules/splat/*: Include additional SPLAT regression tests. - - * : Various bug fixes are more clearly detailed in the git - commit logs. For a detailed summary of changes post version - 0.4.2 check the git commit logs. - - git log -35 - -2009-02-05 Brian Behlendorf - - * : Tag spl-0.4.2 - - * module/spl/spl-kmem.c include/sys/kmem.h: Slab cache improvements: - - Implement kmem cache alignment. - - Implement slab ageing. - - Optimized slab packing algorithm. - - Fixed deadlock due to calling call kv_free() under the skc_lock. - - Added additional SPLAT test cases - - Performance optimizations - - * module/spl/spl-kmem.c include/sys/kmem.h: Linux VM integration. - The Solaris global VM symbols minfree, desfree, lotsfree, needfree, - swapfs_minfree, swapfs_reserve, availrmem, freemem, and physmem are - now available and loosely integrating with the Linux VM. Some - tuning will undoubtably be needed and these tunables are available - in /proc/sys/kernel/spl/vm/* for this very reason. - - * config/spl-build.m4: New configure checks needed when building - against 2.6.27+ kernels. More work is needed here. - - * : Minor cleanup see the 'git log' for full details. - -2009-01-21 Brian Behlendorf - - * : Tag spl-0.4.1 - - * : Implement ksid_*, ddi_strto*, and system taskq functionality. - In addition, several other small Solaris compatibility changes - were made, see the 'git log' for full details. - -2008-11-26 Brian Behlendorf - - * : Tag spl-0.4.0 (Development now done with Git) - - * : Imported SPL SVN repo in to Git Repo for core development. - -2008-11-26 Brian Behlendorf - - * : Tag spl-0.3.5 - - * : Include META file support. - -2008-11-05 Jim Garlick - - * : Add autogen.sh products. - - * configure.ac : Use AC_CONFIG_AUX_DIR to put autograph products - in ./auotconf. - - * autogen.sh : Use --copy to avoid symlinks, remove error - redirection, run aclocal before libtoolize. - -2008-11-13 Brian Behlendorf - - * include/sys/sunddi.h, modules/spl/spl-module.c : Removed default - udev support from sunddi implementation because it uses GPL-only - symbols. This support is optionally available for SPL consumers - if they define HAVE_GPL_ONLY_SYMBOLS and license their module as - GPL using the MODULE_LICENSE("GPL") macro. - -2008-11-05 Brian Behlendorf - - * : Tag spl-0.3.4 - - * : Coverity clean. - - * : Patches from Ricardo M. Correia - applied with minor revisions: - - spl-00-rm-gpl-symbol-notifier_chain.patch - spl-01-rm-gpl-symbol-set_cpus_allowed.patch - spl-02-rm-gpl-symbols-device.patch - spl-03-rm-gpl-symbol-ktime_get_ts.patch - spl-04-fix-taskq-spinlock-lockup.patch - spl-05-div64.patch - spl-06-atomic64.patch - spl-07-kmem-cleanup.patch - spl-08-km-sleep-nofail.patch - spl-09-fix-kmem-track-oops.patch - spl-10-fix-assert-verify-ndebug.patch - -2008-06-30 Brian Behlendorf - - * : Tag spl-0.3.3 - - * : modules/sys/kmem-slab.c : Refined SPL slab to include - per-cpu caches, removed internal hash, other general - performance improvements. Much work remain but it's pretty - good for an initial implementation. - -2008-06-13 Brian Behlendorf - - * : modules/sys/kmem-slab.c : Re-implemented the slab to no - longer be based on the linux slab but to be it's own complete - implementation. The new slab behaves much more like the - Solaris slab than the Linux slab. - -2008-06-04 Brian Behlendorf - - * : Tag spl-0.3.2 - - * : Extensive improvements to the build system to detect kernel - API changes so we can flexibly build with a wider range of kernel - versions. The code has now been testing with the 2.6.18-32chaos - and 2.6.25.3-18.fc9 kernels, however we should also be compatible - with other kernels in the range of 2.6.18-2.6.25. - -2008-05-25 Brian Behlendorf - - * configure.ac, autoconf/* : Initial pass at resolving - API changes introduced by kernels newer than 2.6.18. - -2008-05-21 Brian Behlendorf - - * : Tag spl-0.3.1 - - * : License headers including URCL added for release. - -2008-05-21 Brian Behlendorf - - * : Tag spl-0.3.0 - - * configure.ac: Improved autotools support. - -2008-04-26 Brian Behlendorf - - * include/sys/mutex.h : Implemented a close approximation - of adaptive mutexes. These changes however required me to - export a new symbol from the kernel proper 'task_curr()' - which means we are now dependant on a patched kernel. - -2008-04-24 Brian Behlendorf - - * : Tag spl-0.2.1 - - * modules/spl/spl-proc.c : Add /proc/sys/spl/version. - -2008-04-24 Herb Wartens - - * include/sys/kmem.h : Make sure that when calling __vmem_alloc - that we do not have __GFP_ZERO set. Once the memory is allocated - then zero out the memory if __GFP_ZERO is passed to - __vmem_alloc. - -2008-04-16 Herb Wartens - - * modules/spl/spl-kmem.c : Make sure to disable interrupts - when necessary to avoid deadlocks. We were seeing the deadlock - when calling kmem_cache_generic_constructor() and then an interrupt - forced us to end up calling kmem_cache_generic_destructor() - which caused our deadlock. - -2008-02-26 Brian Behlendorf - - : Initial commit of the solaris porting layer (spl). Included - in addition to the source is an initial autoconf / configure - style build system. diff --git a/spl.spec.in b/spl.spec.in index 673cf129f..3872ae4b6 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -32,7 +32,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) -%doc AUTHORS ChangeLog COPYING DISCLAIMER INSTALL +%doc AUTHORS COPYING DISCLAIMER INSTALL %{_sbindir}/* %post From 5b2fdbb69cedd22fcb489b0cc28d36ee08992c31 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 19 Dec 2012 09:37:24 -0800 Subject: [PATCH 0684/1062] Refresh AUTHORS The AUTHORS file was getting stale. Refresh its contents using the authors listed in the git commit logs. Signed-off-by: Brian Behlendorf --- AUTHORS | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index 2b0fee00c..96757e86e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,10 +1,25 @@ -Brian Behlendorf -- Core Implementation. +Original author and maintainer. -Ricardo M. Correia -- Bug Fixes -- XDR Implementation. + Brian Behlendorf -Chris Dunlap -- LSD-Tools List Implementation. -- AutoConf META File Support. +Additionally the following individuals have all made contributions +to the project and deserve to be acknowledged. + + Alex Zhuravlev + Brian J. Murrell + Chris Dunlap + Chris Dunlop + Darik Horn + Etienne Dechamps + Gunnar Beutner + Jorgen Lundman + Lars Johannsen + Li Wei + Massimo Maggi + Ned Bass + Neependra Khare + Prakash Surya + Ricardo Correia + Richard Yao + Steven Johnson + Yuxuan Shui From 02d25048d293a44001de6967872476f7d78e2397 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 Dec 2012 11:01:47 -0800 Subject: [PATCH 0685/1062] SPL 0.6.0-rc13 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 16f6fdef3..1ee00055c 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc12 +Release: rc13 Release-Tags: relext From 46a75aadb7c08085a4ad2e55dcf5b6fb387c1253 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Fri, 21 Dec 2012 10:29:16 +0800 Subject: [PATCH 0686/1062] Add cv_wait_io() to account I/O time Under Linux when a task is waiting on I/O it should call the io_schedule() function for proper accounting. The Solaris cv_wait() function provides no way to specify what the cv is waiting on therefore cv_wait_io() is introduced. Signed-off-by: Brian Behlendorf Closes #206 --- include/sys/condvar.h | 2 ++ module/spl/spl-condvar.c | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 709a86d39..62210357d 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -51,6 +51,7 @@ typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; extern void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg); extern void __cv_destroy(kcondvar_t *cvp); extern void __cv_wait(kcondvar_t *cvp, kmutex_t *mp); +extern void __cv_wait_io(kcondvar_t *cvp, kmutex_t *mp); extern void __cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp); extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time); extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, @@ -61,6 +62,7 @@ extern void __cv_broadcast(kcondvar_t *cvp); #define cv_init(cvp, name, type, arg) __cv_init(cvp, name, type, arg) #define cv_destroy(cvp) __cv_destroy(cvp) #define cv_wait(cvp, mp) __cv_wait(cvp, mp) +#define cv_wait_io(cvp, mp) __cv_wait_io(cvp, mp) #define cv_wait_interruptible(cvp, mp) __cv_wait_interruptible(cvp,mp) #define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) #define cv_timedwait_interruptible(cvp, mp, t) \ diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 6ed6579b3..fefe98598 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -97,7 +97,7 @@ __cv_destroy(kcondvar_t *cvp) EXPORT_SYMBOL(__cv_destroy); static void -cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) +cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) { DEFINE_WAIT(wait); SENTRY; @@ -121,7 +121,10 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) * ensures we're linked in to the waiters list and avoids the * race where 'cvp->cv_waiters > 0' but the list is empty. */ mutex_exit(mp); - schedule(); + if (io) + io_schedule(); + else + schedule(); mutex_enter(mp); /* No more waiters a different mutex could be used */ @@ -139,17 +142,24 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state) void __cv_wait(kcondvar_t *cvp, kmutex_t *mp) { - cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE); + cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE, 0); } EXPORT_SYMBOL(__cv_wait); void __cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp) { - cv_wait_common(cvp, mp, TASK_INTERRUPTIBLE); + cv_wait_common(cvp, mp, TASK_INTERRUPTIBLE, 0); } EXPORT_SYMBOL(__cv_wait_interruptible); +void +__cv_wait_io(kcondvar_t *cvp, kmutex_t *mp) +{ + cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE, 1); +} +EXPORT_SYMBOL(__cv_wait_io); + /* 'expire_time' argument is an absolute wall clock time in jiffies. * Return value is time left (expire_time - now) or -1 if timeout occurred. */ From 1c7b3eaf87492e875d7ad05f183e98fa306e48c2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 8 Jan 2013 09:42:49 -0800 Subject: [PATCH 0687/1062] RHEL 6.4 compat, fallocate() In the upstream kernel the FALLOC_FL_PUNCH_HOLE #define was introduced after the fallocate() function was moved from the inode_operations to the file_operations structure. Therefore, the SPL code assumed that if FALLOC_FL_PUNCH_HOLE was defined it was safe to use f_ops->fallocate(). Unfortunately, the RHEL6.4 kernel has only backported the FALLOC_FL_PUNCH_HOLE #define and not the fallocate() change. To address this compatibility issue the spl_filp_fallocate() helper function was added to properly detect which interface is available. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 74 ++++++++++++++++++++++++++++++++++++- include/linux/file_compat.h | 20 ++++++++++ module/spl/spl-vnode.c | 16 ++++---- 3 files changed, 101 insertions(+), 9 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ea25e206f..f710d8e95 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -78,6 +78,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_INVALIDATE_INODES SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES + SPL_AC_KERNEL_FALLOCATE SPL_AC_SHRINK_DCACHE_MEMORY SPL_AC_SHRINK_ICACHE_MEMORY SPL_AC_KERN_PATH_PARENT_HEADER @@ -1922,7 +1923,6 @@ AC_DEFUN([SPL_AC_2ARGS_VFS_FSYNC], [ dnl # dnl # 3.5 API change, dnl # inode_operations.truncate_range removed -dnl # (deprecated in favor of FALLOC_FL_PUNCH_HOLE) dnl # AC_DEFUN([SPL_AC_INODE_TRUNCATE_RANGE], [ AC_MSG_CHECKING([whether truncate_range() inode operation is available]) @@ -1938,7 +1938,77 @@ AC_DEFUN([SPL_AC_INODE_TRUNCATE_RANGE], [ ],[ AC_MSG_RESULT(no) ]) -])) +]) + +dnl # +dnl # Linux 2.6.38 - 3.x API +dnl # +AC_DEFUN([SPL_AC_KERNEL_FILE_FALLOCATE], [ + AC_MSG_CHECKING([whether fops->fallocate() exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # Linux 2.6.x - 2.6.37 API +dnl # +AC_DEFUN([SPL_AC_KERNEL_INODE_FALLOCATE], [ + AC_MSG_CHECKING([whether iops->fallocate() exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # PaX Linux 2.6.38 - 3.x API +dnl # +AC_DEFUN([SPL_AC_PAX_KERNEL_FILE_FALLOCATE], [ + AC_MSG_CHECKING([whether fops->fallocate() exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # The fallocate callback was moved from the inode_operations +dnl # structure to the file_operations structure. +dnl # +AC_DEFUN([SPL_AC_KERNEL_FALLOCATE], [ + SPL_AC_KERNEL_FILE_FALLOCATE + SPL_AC_KERNEL_INODE_FALLOCATE + SPL_AC_PAX_KERNEL_FILE_FALLOCATE +]) dnl # dnl # 2.6.33 API change. Also backported in RHEL5 as of 2.6.18-190.el5. diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 8664df672..3dc33278f 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -50,6 +50,26 @@ spl_filp_open(const char *name, int flags, int mode, int *err) #define spl_filp_poff(f) (&(f)->f_pos) #define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) +static inline int +spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) +{ + int error = -EOPNOTSUPP; + +#ifdef HAVE_FILE_FALLOCATE + if (fp->f_op->fallocate) + error = fp->f_op->fallocate(fp, mode, offset, len); +#else +# ifdef HAVE_INODE_FALLOCATE + if (fp->f_dentry && fp->f_dentry->d_inode && + fp->f_dentry->d_inode->i_op->fallocate) + error = fp->f_dentry->d_inode->i_op->fallocate( + fp->f_dentry->d_inode, mode, offset, len); +# endif /* HAVE_INODE_FALLOCATE */ +#endif /*HAVE_FILE_FALLOCATE */ + + return (error); +} + #ifdef HAVE_VFS_FSYNC # ifdef HAVE_2ARGS_VFS_FSYNC # define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 0ecd9addf..d8da9814b 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -654,13 +654,15 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, ASSERT(bfp->l_start >= 0 && bfp->l_len > 0); #ifdef FALLOC_FL_PUNCH_HOLE - if (vp->v_file->f_op->fallocate) { - error = -vp->v_file->f_op->fallocate(vp->v_file, - FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, - bfp->l_start, bfp->l_len); - if (!error) - SRETURN(0); - } + /* + * When supported by the underlying file system preferentially + * use the fallocate() callback to preallocate the space. + */ + error = -spl_filp_fallocate(vp->v_file, + FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, + bfp->l_start, bfp->l_len); + if (error == 0) + SRETURN(0); #endif #ifdef HAVE_INODE_TRUNCATE_RANGE From 050cd84e628e5d827a0b345cda12b97253fccd37 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Jan 2013 14:09:09 -0800 Subject: [PATCH 0688/1062] Linux compat 3.7.1, on_each_cpu() Some kernels require that we include the 'linux/irqflags.h' header for the SPL_AC_3ARGS_ON_EACH_CPU check. Otherwise, the functions local_irq_enable()/local_irq_disable() will not be defined and the prototype will be misdetected as the four argument version. This change actually include 'linux/interrupt.h' which in turn includes 'linux/irqflags.h' to be as generic as possible. Additionally, passing NULL as the function can result in a gcc error because the on_each_cpu() macro executes it unconditionally. To make the test more robust we pass the dummy function on_each_cpu_func(). Signed-off-by: Brian Behlendorf Closes #204 --- config/spl-build.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index f710d8e95..6e4afedba 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1312,9 +1312,12 @@ dnl # AC_DEFUN([SPL_AC_3ARGS_ON_EACH_CPU], [ AC_MSG_CHECKING([whether on_each_cpu() wants 3 args]) SPL_LINUX_TRY_COMPILE([ + #include #include + + void on_each_cpu_func(void *data) { return; } ],[ - on_each_cpu(NULL, NULL, 0); + on_each_cpu(on_each_cpu_func, NULL, 0); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_3ARGS_ON_EACH_CPU, 1, From 42b3ce622f53001d819e6c8eabe4576e6dd38913 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Jan 2013 15:26:46 -0800 Subject: [PATCH 0689/1062] Check for ZLIB_INFLATE and ZLIB_DEFLATE Check at ./configure time that the kernel was built with zlib support enabled. This support may either be configured as a module or builtin to the kernel. But if it's missing the build will fail so it's best to catch this early. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#582 --- config/spl-build.m4 | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 6e4afedba..caca05889 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -84,6 +84,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERN_PATH_PARENT_HEADER SPL_AC_KERN_PATH_PARENT_SYMBOL SPL_AC_KERN_PATH_LOCKED + SPL_AC_CONFIG_ZLIB_INFLATE + SPL_AC_CONFIG_ZLIB_DEFLATE SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW @@ -2201,6 +2203,48 @@ AC_DEFUN([SPL_AC_KERN_PATH_LOCKED], [ []) ]) +dnl # +dnl # zlib inflate compat, +dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled. +dnl # +AC_DEFUN([SPL_AC_CONFIG_ZLIB_INFLATE], [ + AC_MSG_CHECKING([whether CONFIG_ZLIB_INFLATE is defined]) + SPL_LINUX_TRY_COMPILE([ + #if !defined(CONFIG_ZLIB_INFLATE) && \ + !defined(CONFIG_ZLIB_INFLATE_MODULE) + #error CONFIG_ZLIB_INFLATE not defined + #endif + ],[ ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ + *** This kernel does not include the required zlib inflate support. + *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set.]) + ]) +]) + +dnl # +dnl # zlib deflate compat, +dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled. +dnl # +AC_DEFUN([SPL_AC_CONFIG_ZLIB_DEFLATE], [ + AC_MSG_CHECKING([whether CONFIG_ZLIB_DEFLATE is defined]) + SPL_LINUX_TRY_COMPILE([ + #if !defined(CONFIG_ZLIB_DEFLATE) && \ + !defined(CONFIG_ZLIB_DEFLATE_MODULE) + #error CONFIG_ZLIB_DEFLATE not defined + #endif + ],[ ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ + *** This kernel does not include the required zlib deflate support. + *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set.]) + ]) +]) + dnl # dnl # 2.6.39 API compat, dnl # The function zlib_deflate_workspacesize() now take 2 arguments. From 8842263bd0f3c2f78c9cd52be8a74d4376396501 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Wed, 9 Jan 2013 16:09:47 -0800 Subject: [PATCH 0690/1062] call_usermodehelper() should wait for process As of Linux 3.4 the UMH_WAIT_* constants were renumbered. In particular, the meaning of "1" changed from UMH_WAIT_PROC (wait for process to complete), to UMH_WAIT_EXEC (wait for the exec, but not the process). A number of call sites used the number 1 instead of the constant name, so the behavior was not as expected on kernels with this change. Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 4 ++-- module/splat/splat-linux.c | 2 +- module/splat/splat-vnode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 22ea50781..39357617c 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -536,7 +536,7 @@ hostid_exec(void) * '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid * for us to use. It's a horrific solution but it will do for now. */ - rc = call_usermodehelper(argv[0], argv, envp, 1); + rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); if (rc) printk("SPL: Failed user helper '%s %s %s', rc = %d\n", argv[0], argv[1], argv[2], rc); @@ -607,7 +607,7 @@ set_kallsyms_lookup_name(void) NULL }; int rc; - rc = call_usermodehelper(argv[0], argv, envp, 1); + rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); /* * Due to I/O buffering the helper may return successfully before diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 76e2398da..0a1808f61 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -166,7 +166,7 @@ splat_linux_drop_slab(struct file *file) NULL }; int rc; - rc = call_usermodehelper(argv[0], argv, envp, 1); + rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); if (rc) splat_vprint(file, SPLAT_LINUX_TEST3_NAME, "Failed user helper '%s %s %s', rc = %d\n", diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index 7d1c75f17..a7034c115 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -75,7 +75,7 @@ splat_vnode_user_cmd(struct file *file, void *arg, NULL }; int rc; - rc = call_usermodehelper(sh_path, argv, envp, 1); + rc = call_usermodehelper(sh_path, argv, envp, UMH_WAIT_PROC); if (rc) { splat_vprint(file, name, "Failed command: %s %s %s (%d)\n", From d4899f4747fd03be748fd1a589b9db5786fa1375 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Jan 2013 14:29:32 -0800 Subject: [PATCH 0691/1062] kmem-cache: Fix slab ageing soft lockup Commit a10287e00d13c4c4dbbff14f42b00b03da363fcb slightly reworked the slab ageing code such that it is no longer dependent on the Linux delayed work queue interfaces. This was good for portability and performance, but it requires us to use the on_each_cpu() function to execute the spl_magazine_age() function. That means that the function is now executing in interrupt context whereas before it was scheduled in normal process context. And that means we need to be slightly more careful about the locking in the interrupt handler. With the reworked code it's possible that we'll be holding the skc->skc_lock and be interrupted to handle the spl_magazine_age() IRQ. This will result in a deadlock and soft lockup errors unless we're careful to detect the contention and avoid taking the lock in the interupt handler. So that's what this patch does. Alternately, (and slightly more conventionally) we could have used spin_lock_irqsave() to prevent this race entirely but I'd perfer to avoid disabling interrupts as much as possible due to performance concerns. There is absolutely no penalty for us not aging objects out of the magazine due to contention. Signed-off-by: Brian Behlendorf Signed-off-by: Prakash Surya Closes zfsonlinux/zfs#1193 --- module/spl/spl-kmem.c | 94 +++++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 43 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index bc08a5598..cc5961e21 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -827,8 +827,7 @@ struct list_head spl_kmem_cache_list; /* List of caches */ struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ taskq_t *spl_kmem_cache_taskq; /* Task queue for ageing / reclaim */ -static int spl_cache_flush(spl_kmem_cache_t *skc, - spl_kmem_magazine_t *skm, int flush); +static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj); SPL_SHRINKER_CALLBACK_FWD_DECLARE(spl_kmem_cache_generic_shrinker); SPL_SHRINKER_DECLARE(spl_kmem_cache_shrinker, @@ -1244,6 +1243,38 @@ spl_emergency_free(spl_kmem_cache_t *skc, void *obj) SRETURN(0); } +/* + * Release objects from the per-cpu magazine back to their slab. The flush + * argument contains the max number of entries to remove from the magazine. + */ +static void +__spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) +{ + int i, count = MIN(flush, skm->skm_avail); + SENTRY; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skm->skm_magic == SKM_MAGIC); + ASSERT(spin_is_locked(&skc->skc_lock)); + + for (i = 0; i < count; i++) + spl_cache_shrink(skc, skm->skm_objs[i]); + + skm->skm_avail -= count; + memmove(skm->skm_objs, &(skm->skm_objs[count]), + sizeof(void *) * skm->skm_avail); + + SEXIT; +} + +static void +spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) +{ + spin_lock(&skc->skc_lock); + __spl_cache_flush(skc, skm, flush); + spin_unlock(&skc->skc_lock); +} + static void spl_magazine_age(void *data) { @@ -1252,10 +1283,23 @@ spl_magazine_age(void *data) ASSERT(skm->skm_magic == SKM_MAGIC); ASSERT(skm->skm_cpu == smp_processor_id()); + ASSERT(irqs_disabled()); - if (skm->skm_avail > 0) - if (time_after(jiffies, skm->skm_age + skc->skc_delay * HZ)) - (void) spl_cache_flush(skc, skm, skm->skm_refill); + /* There are no available objects or they are too young to age out */ + if ((skm->skm_avail == 0) || + time_before(jiffies, skm->skm_age + skc->skc_delay * HZ)) + return; + + /* + * Because we're executing in interrupt context we may have + * interrupted the holder of this lock. To avoid a potential + * deadlock return if the lock is contended. + */ + if (!spin_trylock(&skc->skc_lock)) + return; + + __spl_cache_flush(skc, skm, skm->skm_refill); + spin_unlock(&skc->skc_lock); } /* @@ -1451,7 +1495,7 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) for_each_online_cpu(i) { skm = skc->skc_mag[i]; - (void)spl_cache_flush(skc, skm, skm->skm_avail); + spl_cache_flush(skc, skm, skm->skm_avail); spl_magazine_free(skm); } @@ -1931,42 +1975,6 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) SEXIT; } -/* - * Release a batch of objects from a per-cpu magazine back to their - * respective slabs. This occurs when we exceed the magazine size, - * are under memory pressure, when the cache is idle, or during - * cache cleanup. The flush argument contains the number of entries - * to remove from the magazine. - */ -static int -spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) -{ - int i, count = MIN(flush, skm->skm_avail); - SENTRY; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(skm->skm_magic == SKM_MAGIC); - - /* - * XXX: Currently we simply return objects from the magazine to - * the slabs in fifo order. The ideal thing to do from a memory - * fragmentation standpoint is to cheaply determine the set of - * objects in the magazine which will result in the largest - * number of free slabs if released from the magazine. - */ - spin_lock(&skc->skc_lock); - for (i = 0; i < count; i++) - spl_cache_shrink(skc, skm->skm_objs[i]); - - skm->skm_avail -= count; - memmove(skm->skm_objs, &(skm->skm_objs[count]), - sizeof(void *) * skm->skm_avail); - - spin_unlock(&skc->skc_lock); - - SRETURN(count); -} - /* * Allocate an object from the per-cpu magazine, or if the magazine * is empty directly allocate from a slab and repopulate the magazine. @@ -2053,7 +2061,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) /* Per-CPU cache full, flush it to make space */ if (unlikely(skm->skm_avail >= skm->skm_size)) - (void)spl_cache_flush(skc, skm, skm->skm_refill); + spl_cache_flush(skc, skm, skm->skm_refill); /* Available space in cache, use it */ skm->skm_objs[skm->skm_avail++] = obj; From 84dd1f4f158c2da72f50d5ee5cd798197303ab23 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 17 Jan 2013 11:33:24 -0800 Subject: [PATCH 0692/1062] Remove spl_invalidate_inodes() This functionality is no longer required by ZFS, see commit zfsonlinux/zfs@7b3e34ba5a7ee8d0fda44d214f6f11eb16cdb26f. Since there are no other consumers, and because it adds additional autoconf complexity which must be maintained the spl_invalidate_inodes() function has been removed. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#795 --- config/spl-build.m4 | 74 --------------------------------------- include/linux/mm_compat.h | 28 --------------- module/spl/spl-kmem.c | 14 -------- 3 files changed, 116 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index caca05889..dae1ac4fc 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -76,8 +76,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_5ARGS_PROC_HANDLER SPL_AC_KVASPRINTF SPL_AC_EXPORTED_RWSEM_IS_LOCKED - SPL_AC_KERNEL_INVALIDATE_INODES - SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES SPL_AC_KERNEL_FALLOCATE SPL_AC_SHRINK_DCACHE_MEMORY SPL_AC_SHRINK_ICACHE_MEMORY @@ -2036,78 +2034,6 @@ AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], ]) ]) -dnl # -dnl # 2.6.37 API compat, -dnl # The function invalidate_inodes() is no longer exported by the kernel. -dnl # The prototype however is still available which means it is safe -dnl # to acquire the symbol's address using spl_kallsyms_lookup_name(). -dnl # -dnl # The Proxmox VE kernel contains a patch which renames the function -dnl # invalidate_inodes() to invalidate_inodes_check(). In the process -dnl # it adds a 'check' argument and a '#define invalidate_inodes(x)' -dnl # compatibility wrapper for legacy callers. Therefore, if either -dnl # of these functions are exported invalidate_inodes() can be -dnl # safely used. -dnl # -AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ - AC_MSG_CHECKING([whether invalidate_inodes() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - invalidate_inodes; - ], [invalidate_inodes], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INVALIDATE_INODES, 1, - [invalidate_inodes() is available]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING([whether invalidate_inodes_check() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - #ifndef invalidate_inodes - #error invalidate_inodes is not a macro - #endif - ], [ ], [invalidate_inodes_check], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1, - [invalidate_inodes_check() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.39 API compat, -dnl # The function invalidate_inodes() now take 2 arguments. The second -dnl # 'kill_dirty' argument describes how invalidate_inodes() should -dnl # handle dirty inodes. Only when set will dirty inodes be discarded, -dnl # otherwise they will be handled as busy. -dnl # -dnl # Unfortunately, we don't have access to the invalidate_inodes() -dnl # prototype so it's not easy to check how many arguments it takes. -dnl # However, this change was done for the benefit of invalidate_device() -dnl # which also added an argument. The invalidate_device() symbol does -dnl # exist in the development headers so if it takes two arguments we -dnl # can fairly safely infer that invalidate_inodes() takes two arguments -dnl # as well. See commit 93b270f76e7ef3b81001576860c2701931cdc78b. -dnl # -AC_DEFUN([SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES], - [AC_MSG_CHECKING([whether invalidate_inodes() wants 2 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - return __invalidate_device(NULL, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_INVALIDATE_INODES, 1, - [invalidate_inodes() wants 2 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.xx API compat, dnl # There currently exists no exposed API to partially shrink the dcache. diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 14fc3d7bb..21a1ef2c0 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -44,34 +44,6 @@ #define high_wmark_pages(z) (z->pages_high) #endif -/* - * 2.6.37 API compat, - * The function invalidate_inodes() is no longer exported by the kernel. - * The prototype however is still available which means it is safe - * to acquire the symbol's address using spl_kallsyms_lookup_name(). - * - * 2.6.39 API compat, - * As for 2.6.39 invalidate_inodes() was updated to take a second - * argument which controls how dirty inodes should be handled. - */ -#if defined(HAVE_INVALIDATE_INODES) || defined(HAVE_INVALIDATE_INODES_CHECK) -# ifdef HAVE_2ARGS_INVALIDATE_INODES -# define spl_invalidate_inodes(sb, kd) invalidate_inodes(sb, kd) -# else -# define spl_invalidate_inodes(sb, kd) invalidate_inodes(sb) -# endif /* HAVE_2ARGS_INVALIDATE_INODES */ -#else -# ifdef HAVE_2ARGS_INVALIDATE_INODES -typedef int (*invalidate_inodes_t)(struct super_block *sb, bool kd); -extern invalidate_inodes_t invalidate_inodes_fn; -# define spl_invalidate_inodes(sb, kd) invalidate_inodes_fn(sb, kd) -# else -typedef int (*invalidate_inodes_t)(struct super_block *sb); -extern invalidate_inodes_t invalidate_inodes_fn; -# define spl_invalidate_inodes(sb, kd) invalidate_inodes_fn(sb) -# endif /* HAVE_2ARGS_INVALIDATE_INODES */ -#endif /* HAVE_INVALIDATE_INODES || HAVE_INVALIDATE_INODES_CHECK */ - #if !defined(HAVE_SHRINK_CONTROL_STRUCT) struct shrink_control { gfp_t gfp_mask; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index cc5961e21..6cd3acb72 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -180,11 +180,6 @@ spl_global_page_state(spl_zone_stat_item_t item) #endif /* NEED_GET_ZONE_COUNTS */ EXPORT_SYMBOL(spl_global_page_state); -#if !defined(HAVE_INVALIDATE_INODES) && !defined(HAVE_INVALIDATE_INODES_CHECK) -invalidate_inodes_t invalidate_inodes_fn = SYMBOL_POISON; -EXPORT_SYMBOL(invalidate_inodes_fn); -#endif /* !HAVE_INVALIDATE_INODES && !HAVE_INVALIDATE_INODES_CHECK */ - #ifndef HAVE_SHRINK_DCACHE_MEMORY shrink_dcache_memory_t shrink_dcache_memory_fn = SYMBOL_POISON; EXPORT_SYMBOL(shrink_dcache_memory_fn); @@ -2376,15 +2371,6 @@ spl_kmem_init_kallsyms_lookup(void) */ spl_kmem_init_globals(); -#if !defined(HAVE_INVALIDATE_INODES) && !defined(HAVE_INVALIDATE_INODES_CHECK) - invalidate_inodes_fn = (invalidate_inodes_t) - spl_kallsyms_lookup_name("invalidate_inodes"); - if (!invalidate_inodes_fn) { - printk(KERN_ERR "Error: Unknown symbol invalidate_inodes\n"); - return -EFAULT; - } -#endif /* !HAVE_INVALIDATE_INODES && !HAVE_INVALIDATE_INODES_CHECK */ - #ifndef HAVE_SHRINK_DCACHE_MEMORY /* When shrink_dcache_memory_fn == NULL support is disabled */ shrink_dcache_memory_fn = (shrink_dcache_memory_t) From 0936c3449fc81caeed49d23e1705a9decd964700 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 18 Jan 2013 15:44:27 -0800 Subject: [PATCH 0693/1062] Add spl_kmem_cache_expire module option Cache aging was implemented because it was part of the default Solaris kmem_cache behavior. The idea is that per-cpu objects which haven't been accessed in several seconds should be returned to the cache. On the other hand Linux slabs never move objects back to the slabs unless there is memory pressure on the system. This behavior is now configurable through the 'spl_kmem_cache_expire' module option. The value is a bit mask with the following meaning. 0x1 - Solaris style cache aging eviction is enabled. 0x2 - Linux style low memory eviction is enabled. Both methods may be safely enabled simultaneously, but by default both are disabled. It has never been clear if the kmem cache aging (which has been around from day one) actually does any good. It has however been the source of numerous bugs so I wouldn't mind retiring it entirely. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#1227 Closes #210 --- include/sys/kmem.h | 8 ++++++-- module/spl/spl-kmem.c | 36 ++++++++++++++++++++++++++++++++---- module/splat/splat-kmem.c | 14 ++++++++++++++ 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 6904bec3f..d5d3061a5 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -377,9 +377,13 @@ typedef enum kmem_cbrc { #define KMC_ALLOC (1 << KMC_BIT_ALLOC) #define KMC_MAX (1 << KMC_BIT_MAX) -#define KMC_REAP_CHUNK INT_MAX -#define KMC_DEFAULT_SEEKS 1 +#define KMC_REAP_CHUNK INT_MAX +#define KMC_DEFAULT_SEEKS 1 +#define KMC_EXPIRE_AGE 0x1 /* Due to age */ +#define KMC_EXPIRE_MEM 0x2 /* Due to low memory */ + +extern unsigned int spl_kmem_cache_expire; extern struct list_head spl_kmem_cache_list; extern struct rw_semaphore spl_kmem_cache_sem; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 6cd3acb72..413aa1245 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -33,6 +33,19 @@ #define SS_DEBUG_SUBSYS SS_KMEM +/* + * Cache expiration was implemented because it was part of the default Solaris + * kmem_cache behavior. The idea is that per-cpu objects which haven't been + * accessed in several seconds should be returned to the cache. On the other + * hand Linux slabs never move objects back to the slabs unless there is + * memory pressure on the system. By default both methods are disabled, but + * may be enabled by setting KMC_EXPIRE_AGE or KMC_EXPIRE_MEM. + */ +unsigned int spl_kmem_cache_expire = 0; +EXPORT_SYMBOL(spl_kmem_cache_expire); +module_param(spl_kmem_cache_expire, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); + /* * The minimum amount of memory measured in pages to be free at all * times on the system. This is similar to Linux's zone->pages_min @@ -1317,6 +1330,10 @@ spl_cache_age(void *data) ASSERT(skc->skc_magic == SKC_MAGIC); + /* Dynamically disabled at run time */ + if (!(spl_kmem_cache_expire & KMC_EXPIRE_AGE)) + return; + atomic_inc(&skc->skc_ref); spl_on_each_cpu(spl_magazine_age, skc, 1); spl_slab_reclaim(skc, skc->skc_reap, 0); @@ -1609,9 +1626,10 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (rc) SGOTO(out, rc); - skc->skc_taskqid = taskq_dispatch_delay(spl_kmem_cache_taskq, - spl_cache_age, skc, TQ_SLEEP, - ddi_get_lbolt() + skc->skc_delay / 3 * HZ); + if (spl_kmem_cache_expire & KMC_EXPIRE_AGE) + skc->skc_taskqid = taskq_dispatch_delay(spl_kmem_cache_taskq, + spl_cache_age, skc, TQ_SLEEP, + ddi_get_lbolt() + skc->skc_delay / 3 * HZ); down_write(&spl_kmem_cache_sem); list_add_tail(&skc->skc_list, &spl_kmem_cache_list); @@ -2168,7 +2186,17 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) } while (do_reclaim); } - /* Reclaim from the cache, ignoring it's age and delay. */ + /* Reclaim from the magazine then the slabs ignoring age and delay. */ + if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) { + spl_kmem_magazine_t *skm; + int i; + + for_each_online_cpu(i) { + skm = skc->skc_mag[i]; + spl_cache_flush(skc, skm, skm->skm_avail); + } + } + spl_slab_reclaim(skc, count, 1); clear_bit(KMC_BIT_REAPING, &skc->skc_flags); smp_mb__after_clear_bit(); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 30750aa01..789e75e56 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -810,8 +810,13 @@ splat_kmem_test8(struct file *file, void *arg) { kmem_cache_priv_t *kcp; kmem_cache_thread_t *kct; + unsigned int spl_kmem_cache_expire_old; int i, rc = 0; + /* Enable cache aging just for this test if it is disabled */ + spl_kmem_cache_expire_old = spl_kmem_cache_expire; + spl_kmem_cache_expire = KMC_EXPIRE_AGE; + kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST8_NAME, 256, 0, 0); if (!kcp) { @@ -882,6 +887,8 @@ out_cache: out_kcp: splat_kmem_cache_test_kcp_free(kcp); out: + spl_kmem_cache_expire = spl_kmem_cache_expire_old; + return rc; } @@ -898,8 +905,13 @@ splat_kmem_test9(struct file *file, void *arg) { kmem_cache_priv_t *kcp; kmem_cache_thread_t *kct; + unsigned int spl_kmem_cache_expire_old; int i, rc = 0, count = SPLAT_KMEM_OBJ_COUNT * 128; + /* Enable cache aging just for this test if it is disabled */ + spl_kmem_cache_expire_old = spl_kmem_cache_expire; + spl_kmem_cache_expire = KMC_EXPIRE_AGE; + kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST9_NAME, 256, 0, 0); if (!kcp) { @@ -968,6 +980,8 @@ out_cache: out_kcp: splat_kmem_cache_test_kcp_free(kcp); out: + spl_kmem_cache_expire = spl_kmem_cache_expire_old; + return rc; } From 3cbfd259b709e3561b4b407d4a27eeec6dc201d0 Mon Sep 17 00:00:00 2001 From: Eric Dillmann Date: Mon, 28 Jan 2013 23:48:11 +0100 Subject: [PATCH 0694/1062] Define BE_IN16 & BE_IN32 for lz4 compression The new lz4 compression algorithm, zfsonlinux/zfs@9759c60, requires the generic BE_IN16 and BE_IN32 functions. These are added to the SPL for other consumers to take advantage of. Signed-off-by: Brian Behlendorf --- include/sys/byteorder.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h index 30700f6b3..d09f5bf3e 100644 --- a/include/sys/byteorder.h +++ b/include/sys/byteorder.h @@ -34,4 +34,13 @@ #define BE_32(x) cpu_to_be32(x) #define BE_64(x) cpu_to_be64(x) +#define BE_IN8(xa) \ + *((uint8_t *)(xa)) + +#define BE_IN16(xa) \ + (((uint16_t)BE_IN8(xa) << 8) | BE_IN8((uint8_t *)(xa)+1)) + +#define BE_IN32(xa) \ + (((uint32_t)BE_IN16(xa) << 16) | BE_IN16((uint8_t *)(xa)+2)) + #endif /* SPL_BYTEORDER_H */ From de081a2ab4e911d2308b4f4055558f1d666f6b63 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 29 Jan 2013 16:13:07 -0800 Subject: [PATCH 0695/1062] Check for KALLSYMS Check at ./configure time that the kernel was built with kallsyms support. If the kernel doesn't have CONFIG_KALLSYMS defined the modules will still compile cleanly but will not be loadable. So we really want to catch this early during ./configure. Note that we do not require CONFIG_KALLSYMS_ALL but it may be safely defined. Signed-off-by: Brian Behlendorf Closes #6 --- config/spl-build.m4 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index dae1ac4fc..e9695de9a 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -82,6 +82,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERN_PATH_PARENT_HEADER SPL_AC_KERN_PATH_PARENT_SYMBOL SPL_AC_KERN_PATH_LOCKED + SPL_AC_CONFIG_KALLSYMS SPL_AC_CONFIG_ZLIB_INFLATE SPL_AC_CONFIG_ZLIB_DEFLATE SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE @@ -2129,6 +2130,26 @@ AC_DEFUN([SPL_AC_KERN_PATH_LOCKED], [ []) ]) +dnl # +dnl # /proc/kallsyms support, +dnl # Verify the kernel has CONFIG_KALLSYMS support enabled. +dnl # +AC_DEFUN([SPL_AC_CONFIG_KALLSYMS], [ + AC_MSG_CHECKING([whether CONFIG_KALLSYMS is defined]) + SPL_LINUX_TRY_COMPILE([ + #if !defined(CONFIG_KALLSYMS) + #error CONFIG_KALLSYMS not defined + #endif + ],[ ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ + *** This kernel does not include the required kallsyms support. + *** Rebuild the kernel with CONFIG_KALLSYMS=y set.]) + ]) +]) + dnl # dnl # zlib inflate compat, dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled. From 6ef94aa67a48792d98b76152661743e42c23a03f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 31 Jan 2013 12:59:39 -0800 Subject: [PATCH 0696/1062] Fix tsd_get/set() race with tsd_exit/destroy() The tsd_exit() and tsd_destroy() functions remove entries from hash bins without taking the hash bin lock. They do take the table lock, but tsd_get() and tsd_set() only take the hash bin lock to allow for maximum concurency. The result is that while tsd_get() and tsd_set() are traversing the hash bin list it can be modified by another thread in which happens to hash to the same value. To avoid this add the needed locking to tsd_exit() and tsd_destroy(). Signed-off-by: Brian Behlendorf Closes #174 --- module/spl/spl-tsd.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index f5c579578..c63a55274 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -531,6 +531,8 @@ tsd_destroy(uint_t *keyp) HLIST_HEAD(work); tsd_hash_table_t *table; tsd_hash_entry_t *dtor_entry, *entry; + tsd_hash_bin_t *dtor_entry_bin, *entry_bin; + ulong_t hash; SENTRY; table = tsd_hash_table; @@ -554,12 +556,25 @@ tsd_destroy(uint_t *keyp) tsd_hash_entry_t, he_key_list); ASSERT3U(dtor_entry->he_key, ==, entry->he_key); ASSERT3P(dtor_entry->he_dtor, ==, entry->he_dtor); + + hash = hash_long((ulong_t)entry->he_key * + (ulong_t)entry->he_pid, table->ht_bits); + entry_bin = &table->ht_bins[hash]; + + spin_lock(&entry_bin->hb_lock); tsd_hash_del(table, entry); hlist_add_head(&entry->he_list, &work); + spin_unlock(&entry_bin->hb_lock); } + hash = hash_long((ulong_t)dtor_entry->he_key * + (ulong_t)dtor_entry->he_pid, table->ht_bits); + dtor_entry_bin = &table->ht_bins[hash]; + + spin_lock(&dtor_entry_bin->hb_lock); tsd_hash_del(table, dtor_entry); hlist_add_head(&dtor_entry->he_list, &work); + spin_unlock(&dtor_entry_bin->hb_lock); spin_unlock(&table->ht_lock); tsd_hash_dtor(&work); @@ -583,6 +598,8 @@ tsd_exit(void) HLIST_HEAD(work); tsd_hash_table_t *table; tsd_hash_entry_t *pid_entry, *entry; + tsd_hash_bin_t *pid_entry_bin, *entry_bin; + ulong_t hash; SENTRY; table = tsd_hash_table; @@ -599,18 +616,32 @@ tsd_exit(void) /* * All keys associated with this pid must be linked off of the * PID_KEY entry. They are removed from the hash table and - * linked in to a private working to be destroyed. + * linked in to a private working list to be destroyed. */ + while (!list_empty(&pid_entry->he_pid_list)) { entry = list_entry(pid_entry->he_pid_list.next, tsd_hash_entry_t, he_pid_list); ASSERT3U(pid_entry->he_pid, ==, entry->he_pid); + + hash = hash_long((ulong_t)entry->he_key * + (ulong_t)entry->he_pid, table->ht_bits); + entry_bin = &table->ht_bins[hash]; + + spin_lock(&entry_bin->hb_lock); tsd_hash_del(table, entry); hlist_add_head(&entry->he_list, &work); + spin_unlock(&entry_bin->hb_lock); } + hash = hash_long((ulong_t)pid_entry->he_key * + (ulong_t)pid_entry->he_pid, table->ht_bits); + pid_entry_bin = &table->ht_bins[hash]; + + spin_lock(&pid_entry_bin->hb_lock); tsd_hash_del(table, pid_entry); hlist_add_head(&pid_entry->he_list, &work); + spin_unlock(&pid_entry_bin->hb_lock); spin_unlock(&table->ht_lock); tsd_hash_dtor(&work); From 869f30f1aecbb9fbd03c43980beb2ee16975f2a4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 1 Feb 2013 11:24:54 -0800 Subject: [PATCH 0697/1062] SPL 0.6.0-rc14 --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 1ee00055c..12384a0fe 100644 --- a/META +++ b/META @@ -2,5 +2,5 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.6.0 -Release: rc13 +Release: rc14 Release-Tags: relext From dd3678fc29d75286b57e705454bbd7e60e1b44e0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 5 Feb 2013 09:35:43 -0800 Subject: [PATCH 0698/1062] Fix atomic64_* autoconf checks The SPL_AC_ATOMIC_SPINLOCK, SPL_AC_TYPE_ATOMIC64_CMPXCHG, and SPL_AC_TYPE_ATOMIC64_XCHG were all directly including the 'asm/atomic.h' header. As of Linux 3.4 this header was removed which results in a build failure. The right thing to do is include 'linux/atomic.h' however we can't safely do this because it doesn't exist in 2.6.26 kernels. Therefore, we include 'linux/fs.h' which in turn includes the correct atomic header regardless of the kernel version. When these incorrect APIs are used in ZFS the following build failure results. arc.c:791:80: warning: '__ret' may be used uninitialized in this function [-Wuninitialized] arc.c:791:1875: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg Since this is all Linux 2.6.24 compatibility code there's an argument to be made that it should be removed because kernels this old are not supported. However, because we're so close to a release I'm going to leave it in place for now. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#814 Closes zfsonlinux/zfs#1254 --- config/spl-build.m4 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index e9695de9a..85184043c 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -777,7 +777,7 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ [enable_atomic_spinlocks=check]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ atomic64_t *ptr __attribute__ ((unused)); ],[ @@ -820,8 +820,7 @@ dnl # AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG], [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg]) SPL_LINUX_TRY_COMPILE([ - #include - #include + #include ],[ atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); ],[ @@ -840,7 +839,7 @@ dnl # AC_DEFUN([SPL_AC_TYPE_ATOMIC64_XCHG], [AC_MSG_CHECKING([whether kernel defines atomic64_xchg]) SPL_LINUX_TRY_COMPILE([ - #include + #include ],[ atomic64_xchg((atomic64_t *)NULL, 0); ],[ From a0625691b39468d04eb716919e237f96a3987b48 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 5 Feb 2013 16:42:29 -0500 Subject: [PATCH 0699/1062] Fix HAVE_MUTEX_OWNER_TASK_STRUCT autotools check on PPC64 The HAVE_MUTEX_OWNER_TASK_STRUCT fails on PPC64 with the following error: error: 'current' undeclared (first use in this function) We include linux/sched.h to ensure that current is available. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 85184043c..4cb7e1da2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1269,6 +1269,7 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [ EXTRA_KCFLAGS="-Werror" SPL_LINUX_TRY_COMPILE([ #include + #include ],[ struct mutex mtx __attribute__ ((unused)); mtx.owner = current; From 4bf3909e5186a978ea9bf5fb1409aa9777d40a35 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 5 Feb 2013 15:59:36 -0800 Subject: [PATCH 0700/1062] Disable automatic log dumping Long ago infrastructure was added to the SPL to keep an internal debug log of the last few seconds of activity. This was helpful during the early development, but these days it is no longer needed. I haven't had to resort to this debug buffer to resolve an issue for several years now. Today better more generic tools like systemtap and ftrace have evolved to the point where they can be used for this purpose. Along with the stack trace dumped to the system console, and in rare cases a crash dump we almost always have the debug we need. Therefore, I'm disabling the code which automatically dumps this log to disk during an assertion except for the case where spl_debug_panic_on_bug is set (disabled by default). This should be viewed as a first step towards either. a) Retiring this infrastructure and complexity entirely, or b) Integrating this logging more properly with ftrace. As part of this change I'm also removing from the packages the undocumented spl utility which is used to decode the binary logs. Signed-off-by: Brian Behlendorf --- cmd/Makefile.am | 3 ++- module/spl/spl-debug.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/Makefile.am b/cmd/Makefile.am index c1e841dfe..fed6feec2 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -3,7 +3,8 @@ include $(top_srcdir)/config/Rules.am DEFAULT_INCLUDES += \ -I$(top_srcdir)/lib -sbin_PROGRAMS = spl splat +noinst_PROGRAMS = spl +sbin_PROGRAMS = splat spl_SOURCES = spl.c diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 0dd59db56..3c3dab0c8 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -1099,10 +1099,11 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags) spl_panic_in_progress = 1; spl_debug_dumpstack(NULL); - spl_debug_dumplog(flags); - if (spl_debug_panic_on_bug) + if (spl_debug_panic_on_bug) { + spl_debug_dumplog(flags); panic("SPL PANIC"); + } set_task_state(current, TASK_UNINTERRUPTIBLE); while (1) From 8adf71e9b0e20d9f1ec2b3bc308db206cb6ceed7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 8 Feb 2013 12:17:18 -0800 Subject: [PATCH 0701/1062] Remove INSTALL The generic INSTALL instructions can be safely dropped. Signed-off-by: Brian Behlendorf --- INSTALL | 291 ---------------------------------------------------- spl.spec.in | 2 +- 2 files changed, 1 insertion(+), 292 deletions(-) delete mode 100644 INSTALL diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 8b82ade08..000000000 --- a/INSTALL +++ /dev/null @@ -1,291 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008 Free Software Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 6. Often, you can also type `make uninstall' to remove the installed - files again. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/spl.spec.in b/spl.spec.in index 3872ae4b6..712c3879d 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -32,7 +32,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) -%doc AUTHORS COPYING DISCLAIMER INSTALL +%doc AUTHORS COPYING DISCLAIMER %{_sbindir}/* %post From fea77534f0a865bad1c7456bd9fceb1f54976988 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 8 Feb 2013 13:54:24 -0800 Subject: [PATCH 0702/1062] Fix spl_config.h install permissions The default permissions used by install are 755. Since this file isn't executable 644 is more appropriate. Signed-off-by: Brian Behlendorf --- Makefile.am | 2 +- include/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 74c292093..1210c6d6b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,7 +34,7 @@ install-data-local: release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + $(INSTALL) -m 644 -D $$instfile $$instdest/$$instfile; \ done endif diff --git a/include/Makefile.am b/include/Makefile.am index 31acf7e99..9cca2840c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -19,7 +19,7 @@ install-data-local: instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ instfiles=`find . -name '*.h'`; \ for instfile in $$instfiles; do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + $(INSTALL) -m 644 -D $$instfile $$instdest/$$instfile; \ done uninstall-local: From 0298f3d67ff4971513ff848d640ca431a983de43 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 12 Feb 2013 15:56:02 -0800 Subject: [PATCH 0703/1062] Add KMODDIR to install target Provide a mechanism to control the directory name the modules are installed in. The kernel privdes INSTALL_MOD_DIR for this but it was hardcoded to be 'addon/spl'. Add a KMODDIR variable which can be passed to 'make install' to override the default directory name. While we're here change the default from 'addon/spl' to 'extra' which is the kernel.org default. Signed-off-by: Brian Behlendorf --- module/Makefile.in | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/module/Makefile.in b/module/Makefile.in index d291951f8..49bdaa808 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -1,7 +1,7 @@ subdir-m += spl subdir-m += splat -INSTALL=/usr/bin/install +INSTALL_MOD_DIR ?= extra SPL_MODULE_CFLAGS = -I@abs_top_srcdir@/include SPL_MODULE_CFLAGS += -include @abs_top_builddir@/spl_config.h @@ -15,27 +15,30 @@ clean: @# is defined. This indicates that kernel modules should be built. @CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ - if [ -f '@LINUX_SYMBOLS@' ]; then $(RM) '@LINUX_SYMBOLS@'; fi + if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi if [ -f Module.markers ]; then $(RM) Module.markers; fi modules_install: @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ - INSTALL_MOD_PATH=$(DESTDIR) \ - INSTALL_MOD_DIR=addon/spl $@ + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \ + INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \ + INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) @# Remove extraneous build products when packaging - if [ -n "$(DESTDIR)" ]; then \ - find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ + kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ + if [ -n $$kmoddir ]; then \ + find $$kmoddir -name 'modules.*' | xargs $(RM); \ fi - sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ + sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \ if [ -f $$sysmap ]; then \ depmod -ae -F $$sysmap @LINUX_VERSION@; \ fi modules_uninstall: @# Uninstall the kernel modules - $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/spl + kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@ + list='$(subdir-m)'; for subdir in $$list; do \ + $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$subdir; \ + done distdir: list='$(subdir-m)'; for subdir in $$list; do \ From d1142fbffe720cd5f82691d7a00816ce72f4e2b2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 13 Feb 2013 14:01:00 -0800 Subject: [PATCH 0704/1062] Remove custom install-data-local for headers Rather than use a custom install target it is cleaner to define a 'kerneldir' and set 'kernel_HEADERS' appropriately. This allows us to leverage the standing configure install support. Additionally, I took this opertunity add the missing make files to the include subdirectories. Signed-off-by: Brian Behlendorf --- Makefile.am | 4 +- configure.ac | 10 +++ include/Makefile.am | 45 ++++++------- include/fs/Makefile.am | 13 ++++ include/linux/Makefile.am | 28 ++++++++ include/rpc/Makefile.am | 14 ++++ include/sharefs/Makefile.am | 13 ++++ include/sys/Makefile.am | 110 +++++++++++++++++++++++++++++++ include/sys/fm/Makefile.am | 14 ++++ include/sys/fs/Makefile.am | 13 ++++ include/sys/sysevent/Makefile.am | 13 ++++ include/util/Makefile.am | 14 ++++ include/vm/Makefile.am | 15 +++++ 13 files changed, 278 insertions(+), 28 deletions(-) create mode 100644 include/fs/Makefile.am create mode 100644 include/linux/Makefile.am create mode 100644 include/rpc/Makefile.am create mode 100644 include/sharefs/Makefile.am create mode 100644 include/sys/Makefile.am create mode 100644 include/sys/fm/Makefile.am create mode 100644 include/sys/fs/Makefile.am create mode 100644 include/sys/sysevent/Makefile.am create mode 100644 include/util/Makefile.am create mode 100644 include/vm/Makefile.am diff --git a/Makefile.am b/Makefile.am index 1210c6d6b..3a6b61438 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,12 +3,12 @@ include $(top_srcdir)/config/deb.am include $(top_srcdir)/config/tgz.am include $(top_srcdir)/config/arch.am -SUBDIRS = +SUBDIRS = include if CONFIG_USER SUBDIRS += lib cmd scripts endif if CONFIG_KERNEL -SUBDIRS += module include +SUBDIRS += module endif AUTOMAKE_OPTIONS = foreign diff --git a/configure.ac b/configure.ac index 27d3356ec..f739a58bc 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,16 @@ AC_CONFIG_FILES([ module/spl/Makefile module/splat/Makefile include/Makefile + include/fs/Makefile + include/linux/Makefile + include/rpc/Makefile + include/sharefs/Makefile + include/sys/Makefile + include/sys/fm/Makefile + include/sys/fs/Makefile + include/sys/sysevent/Makefile + include/util/Makefile + include/vm/Makefile scripts/Makefile spl.spec spl-modules.spec diff --git a/include/Makefile.am b/include/Makefile.am index 9cca2840c..952c4a267 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,28 +1,21 @@ -# All headers are referenced by this top level Makefile.am are -# noinst_HEADERS because they are not installed in the usual include -# location. We do not want to be using $includedir for this. -# Installation is handled by the custom install-data-local rule. -noinst_HEADERS = $(top_srcdir)/include/*.h -noinst_HEADERS += $(top_srcdir)/include/fs/*.h -noinst_HEADERS += $(top_srcdir)/include/linux/*.h -noinst_HEADERS += $(top_srcdir)/include/rpc/*.h -noinst_HEADERS += $(top_srcdir)/include/sharefs/*.h -noinst_HEADERS += $(top_srcdir)/include/sys/fm/*.h -noinst_HEADERS += $(top_srcdir)/include/sys/fs/*.h -noinst_HEADERS += $(top_srcdir)/include/sys/sysevent/*.h -noinst_HEADERS += $(top_srcdir)/include/sys/*.h -noinst_HEADERS += $(top_srcdir)/include/util/*.h -noinst_HEADERS += $(top_srcdir)/include/vm/*.h +SUBDIRS = fs linux rpc sharefs sys util vm -install-data-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ - instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - instfiles=`find . -name '*.h'`; \ - for instfile in $$instfiles; do \ - $(INSTALL) -m 644 -D $$instfile $$instdest/$$instfile; \ - done +COMMON_H = -uninstall-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ - instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - $(RM) -R $$instdest +KERNEL_H = \ + $(top_srcdir)/include/splat-ctl.h \ + $(top_srcdir)/include/spl-ctl.h \ + $(top_srcdir)/include/spl-debug.h \ + $(top_srcdir)/include/spl-device.h \ + $(top_srcdir)/include/spl-trace.h \ + $(top_srcdir)/include/strings.h \ + $(top_srcdir)/include/unistd.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION) +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am new file mode 100644 index 000000000..2a3673712 --- /dev/null +++ b/include/fs/Makefile.am @@ -0,0 +1,13 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/fs/fs_subr.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/fs +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am new file mode 100644 index 000000000..cf1f62ad1 --- /dev/null +++ b/include/linux/Makefile.am @@ -0,0 +1,28 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/linux/bitops_compat.h \ + $(top_srcdir)/include/linux/compiler_compat.h \ + $(top_srcdir)/include/linux/file_compat.h \ + $(top_srcdir)/include/linux/kallsyms_compat.h \ + $(top_srcdir)/include/linux/list_compat.h \ + $(top_srcdir)/include/linux/math64_compat.h \ + $(top_srcdir)/include/linux/mm_compat.h \ + $(top_srcdir)/include/linux/module_compat.h \ + $(top_srcdir)/include/linux/mutex_compat.h \ + $(top_srcdir)/include/linux/proc_compat.h \ + $(top_srcdir)/include/linux/rwsem_compat.h \ + $(top_srcdir)/include/linux/smp_compat.h \ + $(top_srcdir)/include/linux/sysctl_compat.h \ + $(top_srcdir)/include/linux/time_compat.h \ + $(top_srcdir)/include/linux/uaccess_compat.h \ + $(top_srcdir)/include/linux/zlib_compat.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/linux +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am new file mode 100644 index 000000000..cb68f4501 --- /dev/null +++ b/include/rpc/Makefile.am @@ -0,0 +1,14 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/rpc/types.h \ + $(top_srcdir)/include/rpc/xdr.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/rpc +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am new file mode 100644 index 000000000..b343c75b7 --- /dev/null +++ b/include/sharefs/Makefile.am @@ -0,0 +1,13 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/sharefs/share.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sharefs +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am new file mode 100644 index 000000000..37e958229 --- /dev/null +++ b/include/sys/Makefile.am @@ -0,0 +1,110 @@ +SUBDIRS = fm fs sysevent + +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/sys/acl.h \ + $(top_srcdir)/include/sys/acl_impl.h \ + $(top_srcdir)/include/sys/atomic.h \ + $(top_srcdir)/include/sys/attr.h \ + $(top_srcdir)/include/sys/bitmap.h \ + $(top_srcdir)/include/sys/bootconf.h \ + $(top_srcdir)/include/sys/bootprops.h \ + $(top_srcdir)/include/sys/buf.h \ + $(top_srcdir)/include/sys/byteorder.h \ + $(top_srcdir)/include/sys/callb.h \ + $(top_srcdir)/include/sys/cmn_err.h \ + $(top_srcdir)/include/sys/compress.h \ + $(top_srcdir)/include/sys/condvar.h \ + $(top_srcdir)/include/sys/conf.h \ + $(top_srcdir)/include/sys/console.h \ + $(top_srcdir)/include/sys/cpupart.h \ + $(top_srcdir)/include/sys/cpuvar.h \ + $(top_srcdir)/include/sys/crc32.h \ + $(top_srcdir)/include/sys/cred.h \ + $(top_srcdir)/include/sys/ctype.h \ + $(top_srcdir)/include/sys/ddi.h \ + $(top_srcdir)/include/sys/debug.h \ + $(top_srcdir)/include/sys/dirent.h \ + $(top_srcdir)/include/sys/disp.h \ + $(top_srcdir)/include/sys/dkio.h \ + $(top_srcdir)/include/sys/dklabel.h \ + $(top_srcdir)/include/sys/dnlc.h \ + $(top_srcdir)/include/sys/dumphdr.h \ + $(top_srcdir)/include/sys/efi_partition.h \ + $(top_srcdir)/include/sys/errno.h \ + $(top_srcdir)/include/sys/extdirent.h \ + $(top_srcdir)/include/sys/fcntl.h \ + $(top_srcdir)/include/sys/file.h \ + $(top_srcdir)/include/sys/idmap.h \ + $(top_srcdir)/include/sys/int_limits.h \ + $(top_srcdir)/include/sys/int_types.h \ + $(top_srcdir)/include/sys/inttypes.h \ + $(top_srcdir)/include/sys/isa_defs.h \ + $(top_srcdir)/include/sys/kidmap.h \ + $(top_srcdir)/include/sys/kmem.h \ + $(top_srcdir)/include/sys/kobj.h \ + $(top_srcdir)/include/sys/kstat.h \ + $(top_srcdir)/include/sys/list.h \ + $(top_srcdir)/include/sys/mkdev.h \ + $(top_srcdir)/include/sys/mntent.h \ + $(top_srcdir)/include/sys/modctl.h \ + $(top_srcdir)/include/sys/mode.h \ + $(top_srcdir)/include/sys/mount.h \ + $(top_srcdir)/include/sys/mutex.h \ + $(top_srcdir)/include/sys/note.h \ + $(top_srcdir)/include/sys/open.h \ + $(top_srcdir)/include/sys/param.h \ + $(top_srcdir)/include/sys/pathname.h \ + $(top_srcdir)/include/sys/policy.h \ + $(top_srcdir)/include/sys/pool.h \ + $(top_srcdir)/include/sys/priv_impl.h \ + $(top_srcdir)/include/sys/processor.h \ + $(top_srcdir)/include/sys/proc.h \ + $(top_srcdir)/include/sys/pset.h \ + $(top_srcdir)/include/sys/random.h \ + $(top_srcdir)/include/sys/refstr.h \ + $(top_srcdir)/include/sys/resource.h \ + $(top_srcdir)/include/sys/rwlock.h \ + $(top_srcdir)/include/sys/sdt.h \ + $(top_srcdir)/include/sys/sid.h \ + $(top_srcdir)/include/sys/signal.h \ + $(top_srcdir)/include/sys/stat.h \ + $(top_srcdir)/include/sys/stropts.h \ + $(top_srcdir)/include/sys/sunddi.h \ + $(top_srcdir)/include/sys/sunldi.h \ + $(top_srcdir)/include/sys/sysdc.h \ + $(top_srcdir)/include/sys/sysevent.h \ + $(top_srcdir)/include/sys/sysmacros.h \ + $(top_srcdir)/include/sys/systeminfo.h \ + $(top_srcdir)/include/sys/systm.h \ + $(top_srcdir)/include/sys/taskq.h \ + $(top_srcdir)/include/sys/thread.h \ + $(top_srcdir)/include/sys/time.h \ + $(top_srcdir)/include/sys/timer.h \ + $(top_srcdir)/include/sys/t_lock.h \ + $(top_srcdir)/include/sys/tsd.h \ + $(top_srcdir)/include/sys/types32.h \ + $(top_srcdir)/include/sys/types.h \ + $(top_srcdir)/include/sys/u8_textprep.h \ + $(top_srcdir)/include/sys/uio.h \ + $(top_srcdir)/include/sys/unistd.h \ + $(top_srcdir)/include/sys/utsname.h \ + $(top_srcdir)/include/sys/va_list.h \ + $(top_srcdir)/include/sys/varargs.h \ + $(top_srcdir)/include/sys/vfs.h \ + $(top_srcdir)/include/sys/vfs_opreg.h \ + $(top_srcdir)/include/sys/vmsystm.h \ + $(top_srcdir)/include/sys/vnode.h \ + $(top_srcdir)/include/sys/zmod.h \ + $(top_srcdir)/include/sys/zone.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys +kernel_HEADERS = $(KERNEL_H) +endif + diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am new file mode 100644 index 000000000..a073d2a3b --- /dev/null +++ b/include/sys/fm/Makefile.am @@ -0,0 +1,14 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/sys/fm/protocol.h \ + $(top_srcdir)/include/sys/fm/util.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/fm +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am new file mode 100644 index 000000000..3805a5ed3 --- /dev/null +++ b/include/sys/fs/Makefile.am @@ -0,0 +1,13 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/sys/fs/swapnode.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/fs +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am new file mode 100644 index 000000000..d2247d747 --- /dev/null +++ b/include/sys/sysevent/Makefile.am @@ -0,0 +1,13 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/sys/sysevent/eventdefs.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/sysevent +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/util/Makefile.am b/include/util/Makefile.am new file mode 100644 index 000000000..61fdff0bc --- /dev/null +++ b/include/util/Makefile.am @@ -0,0 +1,14 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/util/qsort.h \ + $(top_srcdir)/include/util/sscanf.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/util +kernel_HEADERS = $(KERNEL_H) +endif diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am new file mode 100644 index 000000000..9b09929db --- /dev/null +++ b/include/vm/Makefile.am @@ -0,0 +1,15 @@ +COMMON_H = + +KERNEL_H = \ + $(top_srcdir)/include/vm/anon.h \ + $(top_srcdir)/include/vm/pvn.h \ + $(top_srcdir)/include/vm/seg_kmem.h + +USER_H = + +EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + +if CONFIG_KERNEL +kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/vm +kernel_HEADERS = $(KERNEL_H) +endif From 5f0a4b0847ae19a5e647734cb3ca1c5af8bd9cf9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 16 Feb 2013 15:32:08 -0800 Subject: [PATCH 0705/1062] Remove ARCH packaging The kernel modules are now available in the Arch User Repository (AUR) via zfs. Since their packaging is maintained and superior to ours it is being removed from the tree. https://wiki.archlinux.org/index.php/ZFS Now that various distributions are picking up the packages we should eventually be able to remove most of this infrastructure. Packaging belongs with the distributions not upstream. Signed-off-by: Brian Behlendorf --- .gitignore | 2 -- Makefile.am | 1 - PKGBUILD-spl-modules.in | 23 --------------------- PKGBUILD-spl.in | 23 --------------------- config/arch.am | 44 --------------------------------------- config/spl-build.m4 | 46 +---------------------------------------- configure.ac | 2 -- 7 files changed, 1 insertion(+), 140 deletions(-) delete mode 100644 PKGBUILD-spl-modules.in delete mode 100644 PKGBUILD-spl.in delete mode 100644 config/arch.am diff --git a/.gitignore b/.gitignore index 94308186f..97887eb0e 100644 --- a/.gitignore +++ b/.gitignore @@ -44,8 +44,6 @@ Makefile.in /spl-modules.spec /spl.release /dkms.conf -/PKGBUILD-spl -/PKGBUILD-spl-modules /stamp-h1 /aclocal.m4 /autom4te.cache diff --git a/Makefile.am b/Makefile.am index 3a6b61438..4d8ab0e33 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/config/rpm.am include $(top_srcdir)/config/deb.am include $(top_srcdir)/config/tgz.am -include $(top_srcdir)/config/arch.am SUBDIRS = include if CONFIG_USER diff --git a/PKGBUILD-spl-modules.in b/PKGBUILD-spl-modules.in deleted file mode 100644 index a04bd4fcf..000000000 --- a/PKGBUILD-spl-modules.in +++ /dev/null @@ -1,23 +0,0 @@ -# Maintainer: Prakash Surya -pkgname=@SPL_META_NAME@-modules -pkgver=@SPL_META_VERSION@ -pkgrel=@SPL_META_RELEASE@ -pkgdesc="Contains kernel modules for emulating Solaris style primatives in the linux kernel." -arch=(x86_64) -url="git://github.com/zfsonlinux/spl.git" -license=(@LICENSE@) -source=(@SPL_META_NAME@-@SPL_META_VERSION@.tar.gz) - -build() { - cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ - ./configure --with-config=kernel \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib - make -} - -package() { - cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ - make DESTDIR=$pkgdir install -} diff --git a/PKGBUILD-spl.in b/PKGBUILD-spl.in deleted file mode 100644 index bc27f4626..000000000 --- a/PKGBUILD-spl.in +++ /dev/null @@ -1,23 +0,0 @@ -# Maintainer: Prakash Surya -pkgname=@SPL_META_NAME@ -pkgver=@SPL_META_VERSION@ -pkgrel=@SPL_META_RELEASE@ -pkgdesc="Contains the support utilities for the spl." -arch=(x86_64) -url="git://github.com/zfsonlinux/spl.git" -license=(@LICENSE@) -source=(@SPL_META_NAME@-@SPL_META_VERSION@.tar.gz) - -build() { - cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ - ./configure --with-config=user \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib - make -} - -package() { - cd $srcdir/@SPL_META_NAME@-@SPL_META_VERSION@ - make DESTDIR=$pkgdir install -} diff --git a/config/arch.am b/config/arch.am deleted file mode 100644 index da43fe738..000000000 --- a/config/arch.am +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################### -# Written by Prakash Surya -############################################################################### -# Build targets for RPM packages. -############################################################################### - -sarch-modules: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" sarch-common - -sarch-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" sarch-common - -sarch: sarch-modules sarch-utils - -arch-modules: -if CONFIG_KERNEL - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common -endif - -arch-utils: -if CONFIG_USER - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common -endif - -arch: arch-modules arch-utils - -arch-local: - @(if test "${HAVE_MAKEPKG}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${MAKEPKG} missing. Please install the\n" \ - "*** package for your distribution which provides ${MAKEPKG},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi;) - -sarch-common: dist - pkgbuild=PKGBUILD-$(pkg); \ - $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ - $(MAKEPKG) --allsource --skipinteg --nodeps -p $$pkgbuild || exit 1; - -arch-common: dist - pkgbuild=PKGBUILD-$(pkg); \ - $(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ - $(MAKEPKG) --skipinteg -p $$pkgbuild || exit 1; diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 4cb7e1da2..3dcc05e65 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -302,48 +302,6 @@ AC_DEFUN([SPL_AC_DPKG], [ AC_SUBST(DPKGBUILD_VERSION) ]) -dnl # -dnl # Check for pacman+makepkg to build Arch Linux packages. If these -dnl # tools are missing it is non-fatal but you will not be able to -dnl # build Arch Linux packages and will be warned if you try too. -dnl # -AC_DEFUN([SPL_AC_PACMAN], [ - PACMAN=pacman - MAKEPKG=makepkg - - AC_MSG_CHECKING([whether $PACMAN is available]) - tmp=$($PACMAN --version 2>/dev/null) - AS_IF([test -n "$tmp"], [ - PACMAN_VERSION=$(echo $tmp | - $AWK '/Pacman/ { print $[3] }' | - $SED 's/^v//') - HAVE_PACMAN=yes - AC_MSG_RESULT([$HAVE_PACMAN ($PACMAN_VERSION)]) - ],[ - HAVE_PACMAN=no - AC_MSG_RESULT([$HAVE_PACMAN]) - ]) - - AC_MSG_CHECKING([whether $MAKEPKG is available]) - tmp=$($MAKEPKG --version 2>/dev/null) - AS_IF([test -n "$tmp"], [ - MAKEPKG_VERSION=$(echo $tmp | $AWK '/makepkg/ { print $[3] }') - HAVE_MAKEPKG=yes - AC_MSG_RESULT([$HAVE_MAKEPKG ($MAKEPKG_VERSION)]) - ],[ - HAVE_MAKEPKG=no - AC_MSG_RESULT([$HAVE_MAKEPKG]) - ]) - - AC_SUBST(HAVE_PACMAN) - AC_SUBST(PACMAN) - AC_SUBST(PACMAN_VERSION) - - AC_SUBST(HAVE_MAKEPKG) - AC_SUBST(MAKEPKG) - AC_SUBST(MAKEPKG_VERSION) -]) - dnl # dnl # Until native packaging for various different packing systems dnl # can be added the least we can do is attempt to use alien to @@ -406,7 +364,7 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ redhat) DEFAULT_PACKAGE=rpm ;; fedora) DEFAULT_PACKAGE=rpm ;; gentoo) DEFAULT_PACKAGE=tgz ;; - arch) DEFAULT_PACKAGE=arch ;; + arch) DEFAULT_PACKAGE=tgz ;; sles) DEFAULT_PACKAGE=rpm ;; slackware) DEFAULT_PACKAGE=tgz ;; lunar) DEFAULT_PACKAGE=tgz ;; @@ -427,8 +385,6 @@ AC_DEFUN([SPL_AC_PACKAGE], [ SPL_AC_RPM SPL_AC_DPKG SPL_AC_ALIEN - - AS_IF([test "$VENDOR" = "arch"], [SPL_AC_PACMAN]) ]) AC_DEFUN([SPL_AC_LICENSE], [ diff --git a/configure.ac b/configure.ac index f739a58bc..7a4a729db 100644 --- a/configure.ac +++ b/configure.ac @@ -66,8 +66,6 @@ AC_CONFIG_FILES([ scripts/Makefile spl.spec spl-modules.spec - PKGBUILD-spl - PKGBUILD-spl-modules spl.release dkms.conf ]) From 3d6af2dd6d598bebf6ab04d0e2b6f6ba6e5d0f00 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Mon, 4 Mar 2013 17:26:55 -0800 Subject: [PATCH 0706/1062] Refresh links to web site Update links to refer to the official ZFS on Linux website instead of @behlendorf's personal fork on github. Signed-off-by: Brian Behlendorf --- cmd/spl.c | 2 +- cmd/splat.c | 2 +- cmd/splat.h | 2 +- configure.ac | 2 +- include/fs/fs_subr.h | 2 +- include/linux/bitops_compat.h | 2 +- include/linux/compiler_compat.h | 2 +- include/linux/file_compat.h | 2 +- include/linux/kallsyms_compat.h | 2 +- include/linux/list_compat.h | 2 +- include/linux/math64_compat.h | 2 +- include/linux/mm_compat.h | 2 +- include/linux/module_compat.h | 2 +- include/linux/mutex_compat.h | 2 +- include/linux/proc_compat.h | 2 +- include/linux/rwsem_compat.h | 2 +- include/linux/smp_compat.h | 2 +- include/linux/sysctl_compat.h | 2 +- include/linux/time_compat.h | 2 +- include/linux/uaccess_compat.h | 2 +- include/linux/zlib_compat.h | 2 +- include/rpc/types.h | 2 +- include/rpc/xdr.h | 2 +- include/sharefs/share.h | 2 +- include/spl-ctl.h | 2 +- include/spl-debug.h | 2 +- include/spl-device.h | 2 +- include/spl-trace.h | 2 +- include/splat-ctl.h | 2 +- include/strings.h | 2 +- include/sys/acl.h | 2 +- include/sys/acl_impl.h | 2 +- include/sys/atomic.h | 2 +- include/sys/attr.h | 2 +- include/sys/bitmap.h | 2 +- include/sys/bootconf.h | 2 +- include/sys/bootprops.h | 2 +- include/sys/buf.h | 2 +- include/sys/byteorder.h | 2 +- include/sys/callb.h | 2 +- include/sys/cmn_err.h | 2 +- include/sys/compress.h | 2 +- include/sys/condvar.h | 2 +- include/sys/conf.h | 2 +- include/sys/console.h | 2 +- include/sys/cpupart.h | 2 +- include/sys/cpuvar.h | 2 +- include/sys/crc32.h | 2 +- include/sys/cred.h | 2 +- include/sys/ctype.h | 2 +- include/sys/ddi.h | 2 +- include/sys/debug.h | 2 +- include/sys/dirent.h | 2 +- include/sys/disp.h | 2 +- include/sys/dkio.h | 2 +- include/sys/dklabel.h | 2 +- include/sys/dnlc.h | 2 +- include/sys/dumphdr.h | 2 +- include/sys/efi_partition.h | 2 +- include/sys/errno.h | 2 +- include/sys/extdirent.h | 2 +- include/sys/fcntl.h | 2 +- include/sys/file.h | 2 +- include/sys/fm/protocol.h | 2 +- include/sys/fm/util.h | 2 +- include/sys/fs/swapnode.h | 2 +- include/sys/idmap.h | 2 +- include/sys/int_limits.h | 2 +- include/sys/int_types.h | 2 +- include/sys/inttypes.h | 2 +- include/sys/isa_defs.h | 2 +- include/sys/kidmap.h | 2 +- include/sys/kmem.h | 2 +- include/sys/kobj.h | 2 +- include/sys/kstat.h | 2 +- include/sys/list.h | 2 +- include/sys/mkdev.h | 2 +- include/sys/mntent.h | 2 +- include/sys/modctl.h | 2 +- include/sys/mode.h | 2 +- include/sys/mount.h | 2 +- include/sys/mutex.h | 2 +- include/sys/note.h | 2 +- include/sys/open.h | 2 +- include/sys/param.h | 2 +- include/sys/pathname.h | 2 +- include/sys/policy.h | 2 +- include/sys/pool.h | 2 +- include/sys/priv_impl.h | 2 +- include/sys/proc.h | 2 +- include/sys/processor.h | 2 +- include/sys/pset.h | 2 +- include/sys/random.h | 2 +- include/sys/refstr.h | 2 +- include/sys/resource.h | 2 +- include/sys/rwlock.h | 2 +- include/sys/sdt.h | 2 +- include/sys/sid.h | 2 +- include/sys/signal.h | 2 +- include/sys/stat.h | 2 +- include/sys/stropts.h | 2 +- include/sys/sunddi.h | 2 +- include/sys/sunldi.h | 2 +- include/sys/sysdc.h | 2 +- include/sys/sysevent.h | 2 +- include/sys/sysevent/eventdefs.h | 2 +- include/sys/sysmacros.h | 2 +- include/sys/systeminfo.h | 2 +- include/sys/systm.h | 2 +- include/sys/t_lock.h | 2 +- include/sys/taskq.h | 2 +- include/sys/thread.h | 2 +- include/sys/time.h | 2 +- include/sys/timer.h | 2 +- include/sys/tsd.h | 2 +- include/sys/types.h | 2 +- include/sys/types32.h | 2 +- include/sys/u8_textprep.h | 2 +- include/sys/uio.h | 2 +- include/sys/unistd.h | 2 +- include/sys/utsname.h | 2 +- include/sys/va_list.h | 2 +- include/sys/varargs.h | 2 +- include/sys/vfs.h | 2 +- include/sys/vfs_opreg.h | 2 +- include/sys/vmsystm.h | 2 +- include/sys/vnode.h | 2 +- include/sys/zmod.h | 2 +- include/sys/zone.h | 2 +- include/unistd.h | 2 +- include/util/qsort.h | 2 +- include/util/sscanf.h | 2 +- include/vm/anon.h | 2 +- include/vm/pvn.h | 2 +- include/vm/seg_kmem.h | 2 +- module/spl/spl-atomic.c | 2 +- module/spl/spl-condvar.c | 2 +- module/spl/spl-cred.c | 2 +- module/spl/spl-debug.c | 2 +- module/spl/spl-err.c | 2 +- module/spl/spl-generic.c | 2 +- module/spl/spl-kmem.c | 2 +- module/spl/spl-kobj.c | 2 +- module/spl/spl-kstat.c | 2 +- module/spl/spl-mutex.c | 2 +- module/spl/spl-proc.c | 2 +- module/spl/spl-rwlock.c | 2 +- module/spl/spl-taskq.c | 2 +- module/spl/spl-thread.c | 2 +- module/spl/spl-time.c | 2 +- module/spl/spl-tsd.c | 2 +- module/spl/spl-vnode.c | 2 +- module/spl/spl-xdr.c | 2 +- module/spl/spl-zlib.c | 2 +- module/splat/splat-atomic.c | 2 +- module/splat/splat-condvar.c | 2 +- module/splat/splat-cred.c | 2 +- module/splat/splat-ctl.c | 2 +- module/splat/splat-generic.c | 2 +- module/splat/splat-internal.h | 2 +- module/splat/splat-kmem.c | 2 +- module/splat/splat-kobj.c | 2 +- module/splat/splat-linux.c | 2 +- module/splat/splat-list.c | 2 +- module/splat/splat-mutex.c | 2 +- module/splat/splat-random.c | 2 +- module/splat/splat-rwlock.c | 2 +- module/splat/splat-taskq.c | 2 +- module/splat/splat-thread.c | 2 +- module/splat/splat-time.c | 2 +- module/splat/splat-vnode.c | 2 +- module/splat/splat-zlib.c | 2 +- scripts/check.sh | 2 +- 173 files changed, 173 insertions(+), 173 deletions(-) diff --git a/cmd/spl.c b/cmd/spl.c index a77ad9ca4..3028e3ab0 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/cmd/splat.c b/cmd/splat.c index f4caa5639..92962393d 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/cmd/splat.h b/cmd/splat.h index dd943124e..5b838af3a 100644 --- a/cmd/splat.h +++ b/cmd/splat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/configure.ac b/configure.ac index 7a4a729db..c71bc1f53 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ # UCRL-CODE-235197 # # This file is part of the SPL, Solaris Porting Layer. -# For details, see . +# For details, see . # # The SPL is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the diff --git a/include/fs/fs_subr.h b/include/fs/fs_subr.h index 39499b532..33ccc684e 100644 --- a/include/fs/fs_subr.h +++ b/include/fs/fs_subr.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h index d466e0718..9c55844ad 100644 --- a/include/linux/bitops_compat.h +++ b/include/linux/bitops_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/compiler_compat.h b/include/linux/compiler_compat.h index de3b3c391..8dbbeee72 100644 --- a/include/linux/compiler_compat.h +++ b/include/linux/compiler_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 3dc33278f..4588d6442 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/kallsyms_compat.h b/include/linux/kallsyms_compat.h index fbe33e8e6..1c7afa5dd 100644 --- a/include/linux/kallsyms_compat.h +++ b/include/linux/kallsyms_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/list_compat.h b/include/linux/list_compat.h index 26d5dfe07..d1e0d9d96 100644 --- a/include/linux/list_compat.h +++ b/include/linux/list_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/math64_compat.h b/include/linux/math64_compat.h index 652082ea2..2c911a64b 100644 --- a/include/linux/math64_compat.h +++ b/include/linux/math64_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 21a1ef2c0..cb1bef9a4 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/module_compat.h b/include/linux/module_compat.h index 0261f6958..02f42a924 100644 --- a/include/linux/module_compat.h +++ b/include/linux/module_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/mutex_compat.h b/include/linux/mutex_compat.h index 39eb68c34..5955fc9a4 100644 --- a/include/linux/mutex_compat.h +++ b/include/linux/mutex_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index 3d8eda108..434ffa3f1 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index 757bb42af..80f348e4c 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/smp_compat.h b/include/linux/smp_compat.h index 31d42f909..8c2b54091 100644 --- a/include/linux/smp_compat.h +++ b/include/linux/smp_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/sysctl_compat.h b/include/linux/sysctl_compat.h index 93210e829..bc226537d 100644 --- a/include/linux/sysctl_compat.h +++ b/include/linux/sysctl_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/time_compat.h b/include/linux/time_compat.h index fa996d346..efa023299 100644 --- a/include/linux/time_compat.h +++ b/include/linux/time_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/uaccess_compat.h b/include/linux/uaccess_compat.h index c00669a57..c84e61d30 100644 --- a/include/linux/uaccess_compat.h +++ b/include/linux/uaccess_compat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/zlib_compat.h b/include/linux/zlib_compat.h index 410dc485e..ba853c395 100644 --- a/include/linux/zlib_compat.h +++ b/include/linux/zlib_compat.h @@ -5,7 +5,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/rpc/types.h b/include/rpc/types.h index 137a381dc..b57b4bd73 100644 --- a/include/rpc/types.h +++ b/include/rpc/types.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index c828a38e3..d0f06b55f 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -3,7 +3,7 @@ * Written by Ricardo Correia * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sharefs/share.h b/include/sharefs/share.h index b3ad6993f..fc248a233 100644 --- a/include/sharefs/share.h +++ b/include/sharefs/share.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/spl-ctl.h b/include/spl-ctl.h index 9db139073..bb24490d9 100644 --- a/include/spl-ctl.h +++ b/include/spl-ctl.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/spl-debug.h b/include/spl-debug.h index 42da3e4e8..c91b864c2 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/spl-device.h b/include/spl-device.h index 6c3789cd7..b237cf1b0 100644 --- a/include/spl-device.h +++ b/include/spl-device.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/spl-trace.h b/include/spl-trace.h index 709b1326e..8ef173e76 100644 --- a/include/spl-trace.h +++ b/include/spl-trace.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/splat-ctl.h b/include/splat-ctl.h index b800887b8..ccf3644bd 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/strings.h b/include/strings.h index 65ee3e7c3..dc0f31466 100644 --- a/include/strings.h +++ b/include/strings.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/acl.h b/include/sys/acl.h index 39a1cc29c..f4a3de599 100644 --- a/include/sys/acl.h +++ b/include/sys/acl.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/acl_impl.h b/include/sys/acl_impl.h index 9bc45ff96..67af71371 100644 --- a/include/sys/acl_impl.h +++ b/include/sys/acl_impl.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 1d1173894..31d35eb14 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/attr.h b/include/sys/attr.h index 42f21cfeb..5fb609c93 100644 --- a/include/sys/attr.h +++ b/include/sys/attr.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/bitmap.h b/include/sys/bitmap.h index 85dcb2e3b..e4acb0b7d 100644 --- a/include/sys/bitmap.h +++ b/include/sys/bitmap.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/bootconf.h b/include/sys/bootconf.h index b9d40527c..4e032ad2f 100644 --- a/include/sys/bootconf.h +++ b/include/sys/bootconf.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/bootprops.h b/include/sys/bootprops.h index e4b355032..a562ec9f9 100644 --- a/include/sys/bootprops.h +++ b/include/sys/bootprops.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/buf.h b/include/sys/buf.h index b1ffa479c..8596c835c 100644 --- a/include/sys/buf.h +++ b/include/sys/buf.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h index d09f5bf3e..5350a0b33 100644 --- a/include/sys/byteorder.h +++ b/include/sys/byteorder.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/callb.h b/include/sys/callb.h index 9db823650..fbe4128f8 100644 --- a/include/sys/callb.h +++ b/include/sys/callb.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h index 9359c1a3b..1291510ec 100644 --- a/include/sys/cmn_err.h +++ b/include/sys/cmn_err.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/compress.h b/include/sys/compress.h index 8095cff9c..55822f0e5 100644 --- a/include/sys/compress.h +++ b/include/sys/compress.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 62210357d..c825bd2e4 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/conf.h b/include/sys/conf.h index bca0ebf05..eece0c798 100644 --- a/include/sys/conf.h +++ b/include/sys/conf.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/console.h b/include/sys/console.h index 31d419923..76ef61838 100644 --- a/include/sys/console.h +++ b/include/sys/console.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/cpupart.h b/include/sys/cpupart.h index 8416c99b6..fddeed6d0 100644 --- a/include/sys/cpupart.h +++ b/include/sys/cpupart.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/cpuvar.h b/include/sys/cpuvar.h index ca5a8b0a0..1284f940f 100644 --- a/include/sys/cpuvar.h +++ b/include/sys/cpuvar.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/crc32.h b/include/sys/crc32.h index 000a1dca5..1981f3579 100644 --- a/include/sys/crc32.h +++ b/include/sys/crc32.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/cred.h b/include/sys/cred.h index 778d05255..6c905884b 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/ctype.h b/include/sys/ctype.h index 7ec2bc7fa..52037f9a1 100644 --- a/include/sys/ctype.h +++ b/include/sys/ctype.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/ddi.h b/include/sys/ddi.h index 903b1dd13..2fa1388fd 100644 --- a/include/sys/ddi.h +++ b/include/sys/ddi.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/debug.h b/include/sys/debug.h index 271dbc210..25ff88e3a 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/dirent.h b/include/sys/dirent.h index b99542e85..68f75da57 100644 --- a/include/sys/dirent.h +++ b/include/sys/dirent.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/disp.h b/include/sys/disp.h index 2a4b4ded8..9614a47c4 100644 --- a/include/sys/disp.h +++ b/include/sys/disp.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/dkio.h b/include/sys/dkio.h index 591fbf51d..d8c700718 100644 --- a/include/sys/dkio.h +++ b/include/sys/dkio.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/dklabel.h b/include/sys/dklabel.h index bd42622d1..74c0d506f 100644 --- a/include/sys/dklabel.h +++ b/include/sys/dklabel.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h index b63c94fef..6834e067d 100644 --- a/include/sys/dnlc.h +++ b/include/sys/dnlc.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/dumphdr.h b/include/sys/dumphdr.h index 07396e2e6..1b45058ad 100644 --- a/include/sys/dumphdr.h +++ b/include/sys/dumphdr.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/efi_partition.h b/include/sys/efi_partition.h index 75df64f92..c39236423 100644 --- a/include/sys/efi_partition.h +++ b/include/sys/efi_partition.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/errno.h b/include/sys/errno.h index e6b446803..64d8482dc 100644 --- a/include/sys/errno.h +++ b/include/sys/errno.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/extdirent.h b/include/sys/extdirent.h index d9af31039..1a5c03145 100644 --- a/include/sys/extdirent.h +++ b/include/sys/extdirent.h @@ -5,7 +5,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/fcntl.h b/include/sys/fcntl.h index 4e260a4b8..88b7a6928 100644 --- a/include/sys/fcntl.h +++ b/include/sys/fcntl.h @@ -5,7 +5,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/file.h b/include/sys/file.h index fbeb8e258..67b301c6e 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/fm/protocol.h b/include/sys/fm/protocol.h index 8c47f7c9b..e9ce6ff6c 100644 --- a/include/sys/fm/protocol.h +++ b/include/sys/fm/protocol.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h index 40b8d47b2..7f2dbde9c 100644 --- a/include/sys/fm/util.h +++ b/include/sys/fm/util.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/fs/swapnode.h b/include/sys/fs/swapnode.h index 31be71620..a5df1298d 100644 --- a/include/sys/fs/swapnode.h +++ b/include/sys/fs/swapnode.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/idmap.h b/include/sys/idmap.h index b3c7c0f43..3618c655c 100644 --- a/include/sys/idmap.h +++ b/include/sys/idmap.h @@ -5,7 +5,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/int_limits.h b/include/sys/int_limits.h index ed4ad9d19..64f0a1102 100644 --- a/include/sys/int_limits.h +++ b/include/sys/int_limits.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/int_types.h b/include/sys/int_types.h index c97f47f6b..582fded20 100644 --- a/include/sys/int_types.h +++ b/include/sys/int_types.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/inttypes.h b/include/sys/inttypes.h index 6f7020134..82e555cdd 100644 --- a/include/sys/inttypes.h +++ b/include/sys/inttypes.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 02136c596..35aee61c9 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/kidmap.h b/include/sys/kidmap.h index ed87b9f7f..3d67b51a8 100644 --- a/include/sys/kidmap.h +++ b/include/sys/kidmap.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/kmem.h b/include/sys/kmem.h index d5d3061a5..516114fd7 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/kobj.h b/include/sys/kobj.h index b682e3f9d..f95fa8039 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 06379f827..9275c1ea4 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/list.h b/include/sys/list.h index 303b959de..563784ae4 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/mkdev.h b/include/sys/mkdev.h index 89a9000d4..d765b7374 100644 --- a/include/sys/mkdev.h +++ b/include/sys/mkdev.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/mntent.h b/include/sys/mntent.h index 5f0565f4c..66fae87d4 100644 --- a/include/sys/mntent.h +++ b/include/sys/mntent.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/modctl.h b/include/sys/modctl.h index 52f679ad5..8d79e5312 100644 --- a/include/sys/modctl.h +++ b/include/sys/modctl.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/mode.h b/include/sys/mode.h index ddd504f9f..d09965e4a 100644 --- a/include/sys/mode.h +++ b/include/sys/mode.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/mount.h b/include/sys/mount.h index 5b33a6d3a..ca1796d7d 100644 --- a/include/sys/mount.h +++ b/include/sys/mount.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 905eed50e..ec3cfd529 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/note.h b/include/sys/note.h index 6fcffc22e..511756272 100644 --- a/include/sys/note.h +++ b/include/sys/note.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/open.h b/include/sys/open.h index aafedd0a1..e3ebd8c84 100644 --- a/include/sys/open.h +++ b/include/sys/open.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/param.h b/include/sys/param.h index 5a1994960..5b5b5f550 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/pathname.h b/include/sys/pathname.h index d22c4f297..71ea441cb 100644 --- a/include/sys/pathname.h +++ b/include/sys/pathname.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/policy.h b/include/sys/policy.h index 950ec9554..45e724bc5 100644 --- a/include/sys/policy.h +++ b/include/sys/policy.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/pool.h b/include/sys/pool.h index 95aea6a09..bf6a0bb7d 100644 --- a/include/sys/pool.h +++ b/include/sys/pool.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/priv_impl.h b/include/sys/priv_impl.h index 28fa203a6..f1507a89e 100644 --- a/include/sys/priv_impl.h +++ b/include/sys/priv_impl.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/proc.h b/include/sys/proc.h index 1c02c676e..dbaf4162f 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/processor.h b/include/sys/processor.h index 65438a4da..60b1a211b 100644 --- a/include/sys/processor.h +++ b/include/sys/processor.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/pset.h b/include/sys/pset.h index 9b0ebc4f8..2723d310b 100644 --- a/include/sys/pset.h +++ b/include/sys/pset.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/random.h b/include/sys/random.h index 8960240b1..2bf581f26 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/refstr.h b/include/sys/refstr.h index a8d0edbfe..49a3417d1 100644 --- a/include/sys/refstr.h +++ b/include/sys/refstr.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/resource.h b/include/sys/resource.h index 68e3d2500..fe336555f 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 9d29ad679..9dfbfe545 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sdt.h b/include/sys/sdt.h index ed4680df9..6c8395f99 100644 --- a/include/sys/sdt.h +++ b/include/sys/sdt.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sid.h b/include/sys/sid.h index 17e32e25f..8ee5d0727 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/signal.h b/include/sys/signal.h index 254bf0641..823fea329 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/stat.h b/include/sys/stat.h index ccc01a025..cde7556a6 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/stropts.h b/include/sys/stropts.h index ae20c4d70..25c7ee18f 100644 --- a/include/sys/stropts.h +++ b/include/sys/stropts.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index c3368083b..545803afd 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index a1a6a12c2..b4ff7391a 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sysdc.h b/include/sys/sysdc.h index b1000013f..14ab48aa6 100644 --- a/include/sys/sysdc.h +++ b/include/sys/sysdc.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sysevent.h b/include/sys/sysevent.h index 723220f0f..5a7ca41ce 100644 --- a/include/sys/sysevent.h +++ b/include/sys/sysevent.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sysevent/eventdefs.h b/include/sys/sysevent/eventdefs.h index 2112e29ed..592c78a64 100644 --- a/include/sys/sysevent/eventdefs.h +++ b/include/sys/sysevent/eventdefs.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 04a62b196..7c4da67fc 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index a32f7142e..e22a08530 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/systm.h b/include/sys/systm.h index f3e310a13..3336fb357 100644 --- a/include/sys/systm.h +++ b/include/sys/systm.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/t_lock.h b/include/sys/t_lock.h index 1055f7f6a..6c159f933 100644 --- a/include/sys/t_lock.h +++ b/include/sys/t_lock.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 3839de288..7b44e8b8a 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/thread.h b/include/sys/thread.h index 3a708236c..369b3061d 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/time.h b/include/sys/time.h index 341b531ef..f8d78d194 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/timer.h b/include/sys/timer.h index ea6043696..096eb1a4e 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/tsd.h b/include/sys/tsd.h index a31f60605..ebc55b09b 100644 --- a/include/sys/tsd.h +++ b/include/sys/tsd.h @@ -5,7 +5,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/types.h b/include/sys/types.h index b867be111..decb6bba8 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/types32.h b/include/sys/types32.h index 25c4642dc..6ee580f4e 100644 --- a/include/sys/types32.h +++ b/include/sys/types32.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h index 456077c6f..0a21c708c 100644 --- a/include/sys/u8_textprep.h +++ b/include/sys/u8_textprep.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/uio.h b/include/sys/uio.h index 87da72701..25c5f4a01 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/unistd.h b/include/sys/unistd.h index a2acfa705..e1d93c61e 100644 --- a/include/sys/unistd.h +++ b/include/sys/unistd.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/utsname.h b/include/sys/utsname.h index fa403ff52..3d979c13a 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/va_list.h b/include/sys/va_list.h index 644812881..9fa173b58 100644 --- a/include/sys/va_list.h +++ b/include/sys/va_list.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/varargs.h b/include/sys/varargs.h index b74570c21..bf360ff4d 100644 --- a/include/sys/varargs.h +++ b/include/sys/varargs.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/vfs.h b/include/sys/vfs.h index 88ca21d52..f01dc11cb 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/vfs_opreg.h b/include/sys/vfs_opreg.h index 5dda4d36b..d3540c593 100644 --- a/include/sys/vfs_opreg.h +++ b/include/sys/vfs_opreg.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index b8191f3ac..9c52d2824 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 99614d55b..35607e1ea 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/zmod.h b/include/sys/zmod.h index a6519dec2..15b0bc8e7 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/zone.h b/include/sys/zone.h index 9c2652fd2..6b7a1c65f 100644 --- a/include/sys/zone.h +++ b/include/sys/zone.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/unistd.h b/include/unistd.h index a2acfa705..e1d93c61e 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/util/qsort.h b/include/util/qsort.h index 890674acd..e55c4f8cc 100644 --- a/include/util/qsort.h +++ b/include/util/qsort.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/util/sscanf.h b/include/util/sscanf.h index 4ea907148..23f0b5db0 100644 --- a/include/util/sscanf.h +++ b/include/util/sscanf.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/vm/anon.h b/include/vm/anon.h index 51e8512ba..9c9c23959 100644 --- a/include/vm/anon.h +++ b/include/vm/anon.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/vm/pvn.h b/include/vm/pvn.h index c206b1b77..f3b308137 100644 --- a/include/vm/pvn.h +++ b/include/vm/pvn.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/vm/seg_kmem.h b/include/vm/seg_kmem.h index b21f71a52..17df7b961 100644 --- a/include/vm/seg_kmem.h +++ b/include/vm/seg_kmem.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-atomic.c b/module/spl/spl-atomic.c index e37b96907..c46252c10 100644 --- a/module/spl/spl-atomic.c +++ b/module/spl/spl-atomic.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index fefe98598..60cf726f9 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index ce3425d32..e669cbf5d 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 3c3dab0c8..37599acdd 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index c837d1eaa..b6d15f019 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 39357617c..3cef48946 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 413aa1245..e3538b5ff 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index 684d57226..f14f47f5d 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index ea2d67dd4..b7e4b9426 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index d452681b1..f0e786da5 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 2fb295439..cd4fa1b47 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index c0f974f1b..462a6f0de 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index c9ae0a50b..4feca0452 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 71e5f331d..6b3bec509 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 6ef9b8fc8..8f43b54cd 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index c63a55274..d7749cf7b 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -5,7 +5,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index d8da9814b..4d571c6c4 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index eba470a4b..62efa31a5 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -3,7 +3,7 @@ * Written by Ricardo Correia * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 4f88cb4e0..807e743d5 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index efb01578a..df3b38f58 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index 1fe306cb2..1ddde39bb 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index 0efabd854..47dfa02f6 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index c68281a84..54b2ff459 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index 38df14d3b..ad03651d0 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 14303a105..b138196f5 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 789e75e56..0eab14217 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c index c76795418..a0d4097d5 100644 --- a/module/splat/splat-kobj.c +++ b/module/splat/splat-kobj.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 0a1808f61..ce809e647 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -5,7 +5,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index 34b570f39..f59394c14 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 9e6b24708..cc1d36869 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-random.c b/module/splat/splat-random.c index 63d96444f..33b799bad 100644 --- a/module/splat/splat-random.c +++ b/module/splat/splat-random.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index f4a010969..a865fb310 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 5a9681e21..e4793d457 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index c54cbcd8a..a1e70db47 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index e6f8dc682..ca60c45c6 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index a7034c115..f3f17ec92 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/module/splat/splat-zlib.c b/module/splat/splat-zlib.c index 852cf818f..c614c5e6c 100644 --- a/module/splat/splat-zlib.c +++ b/module/splat/splat-zlib.c @@ -6,7 +6,7 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see . + * For details, see . * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/scripts/check.sh b/scripts/check.sh index 4334ff3a5..fc97cec23 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -7,7 +7,7 @@ # UCRL-CODE-235197 # # This file is part of the SPL, Solaris Porting Layer. -# For details, see . +# For details, see . # # The SPL is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the From 10087fe1fa3e4aa4b6722a1d27a47853ebdf47c8 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 3 Mar 2013 23:42:32 -0500 Subject: [PATCH 0707/1062] Linux 3.9 compat: Include linux/sched/rt.h Linux 3.9 reorganized sched.h, splitting it into numerous files. torvalds/linux@8bd75c77b7c6a3954140dd2e20346aef3efe4a35 moved MAX_PRIO and MAX_RT_PRIO to linux/sched/rt.h. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 20 ++++++++++++++++++++ include/sys/sysmacros.h | 5 +++++ 2 files changed, 25 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 3dcc05e65..eef3a76ae 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -88,6 +88,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW + SPL_AC_SCHED_RT_HEADER ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2217,3 +2218,22 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # 3.9 API change, +dnl # Moved things from linux/sched.h to linux/sched/rt.h +dnl # +AC_DEFUN([SPL_AC_SCHED_RT_HEADER], + [AC_MSG_CHECKING([whether header linux/sched/rt.h exists]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + return 0; + ],[ + AC_DEFINE(HAVE_SCHED_RT_HEADER, 1, [linux/sched/rt.h exists]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 7c4da67fc..b4778b70e 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -26,12 +26,17 @@ #define _SPL_SYSMACROS_H #include +#include #include #include #include #include #include +#ifdef HAVE_SCHED_RT_HEADER +#include +#endif + #ifndef _KERNEL #define _KERNEL __KERNEL__ #endif From bc90df66887af63bd67223616f9084c4e9567056 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 3 Mar 2013 23:45:33 -0500 Subject: [PATCH 0708/1062] Linux 3.9 compat: Do not depend on f_vfsmnt torvalds/linux@182be684784334598eee1d90274e7f7aa0063616 removed the preprocessor definition for f_vfsmnt. The ability to access the mountpoint via ->f_path.mnt has been stable for a long time, so we switch to that. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- module/spl/spl-vnode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 4d571c6c4..fb8f1fc7e 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -175,7 +175,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, if (IS_ERR(fp)) SRETURN(-PTR_ERR(fp)); - rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); + rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); if (rc) { filp_close(fp, 0); SRETURN(-rc); @@ -602,7 +602,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) fp = vp->v_file; - rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); + rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); if (rc) SRETURN(-rc); @@ -754,7 +754,7 @@ vn_getf(int fd) if (vp == NULL) SGOTO(out_fget, rc); - if (vfs_getattr(lfp->f_vfsmnt, lfp->f_dentry, &stat)) + if (vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat)) SGOTO(out_vnode, rc); mutex_enter(&vp->v_lock); From 2a305c34c8876c06f55475e5ff5163923baa5491 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 4 Mar 2013 00:02:43 -0500 Subject: [PATCH 0709/1062] Linux 3.9 compat: vfs_getattr takes two arguments The function prototype of vfs_getattr previoulsy took struct vfsmount * and struct dentry * as arguments. These would always be defined together in a struct path *. torvalds/linux@3dadecce20603aa380023c65e6f55f108fd5e952 modified vfs_getattr to take struct path * is taken as an argument instead. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 32 ++++++++++++++++++++++++++++++++ module/spl/spl-vnode.c | 17 +++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index eef3a76ae..83cefabd4 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -89,6 +89,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW SPL_AC_SCHED_RT_HEADER + SPL_AC_2ARGS_VFS_GETATTR ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2237,3 +2238,34 @@ AC_DEFUN([SPL_AC_SCHED_RT_HEADER], AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 3.9 API change, +dnl # vfs_getattr() uses 2 args +dnl # It takes struct path * instead of struct vfsmount * and struct dentry * +dnl # +AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [ + AC_MSG_CHECKING([whether vfs_getattr() wants]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_getattr((struct path *) NULL, + (struct kstat *)NULL); + ],[ + AC_MSG_RESULT(2 args) + AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1, + [vfs_getattr wants 2 args]) + ],[ + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_getattr((struct vfsmount *)NULL, + (struct dentry *)NULL, + (struct kstat *)NULL); + ],[ + AC_MSG_RESULT(3 args) + ],[ + AC_MSG_ERROR(unknown) + ]) + ]) +]) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index fb8f1fc7e..e264fba05 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -175,7 +175,11 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, if (IS_ERR(fp)) SRETURN(-PTR_ERR(fp)); +#ifdef HAVE_2ARGS_VFS_GETATTR + rc = vfs_getattr(&fp->f_path, &stat); +#else rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); +#endif if (rc) { filp_close(fp, 0); SRETURN(-rc); @@ -602,7 +606,11 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) fp = vp->v_file; - rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); +#ifdef HAVE_2ARGS_VFS_GETATTR + rc = vfs_getattr(&fp->f_path, &stat); +#else + rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); +#endif if (rc) SRETURN(-rc); @@ -754,7 +762,12 @@ vn_getf(int fd) if (vp == NULL) SGOTO(out_fget, rc); - if (vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat)) +#ifdef HAVE_2ARGS_VFS_GETATTR + rc = vfs_getattr(&lfp->f_path, &stat); +#else + rc = vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat); +#endif + if (rc) SGOTO(out_vnode, rc); mutex_enter(&vp->v_lock); From a54718cfe0d8e8a4b124f176f0d5c94141f9aea0 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 4 Mar 2013 00:24:04 -0500 Subject: [PATCH 0710/1062] Linux 3.9 compat: set_fs_root takes const struct path * torvalds/linux@dcf787f39162ce32ca325b3e784aba2d2444619a enforces const-correctness in passing struct path *. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 44 ++++++++++++++++++++++++++++++++++++++++++ module/spl/spl-vnode.c | 4 ++++ 2 files changed, 48 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 83cefabd4..6a8e658a2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -64,6 +64,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_USER_PATH_DIR SPL_AC_SET_FS_PWD SPL_AC_2ARGS_SET_FS_PWD + SPL_AC_SET_FS_PWD_WITH_CONST SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME SPL_AC_VFS_FSYNC @@ -1686,11 +1687,54 @@ AC_DEFUN([SPL_AC_2ARGS_SET_FS_PWD], AC_MSG_RESULT(yes) AC_DEFINE(HAVE_2ARGS_SET_FS_PWD, 1, [set_fs_pwd() wants 2 args]) + HAVE_2ARGS_SET_FS_PWD=yes ],[ AC_MSG_RESULT(no) ]) ]) +dnl # +dnl # 3.9 API change +dnl # set_fs_pwd takes const struct path * +dnl # +AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], +if test "x$HAVE_2ARGS_SET_FS_PWD" = xyes; then + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, const struct path *) + = set_fs_pwd; + ],[ + return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SET_FS_PWD_WITH_CONST, 1, + [set_fs_pwd() needs const path *]) + ],[ + SPL_LINUX_TRY_COMPILE([ + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, struct path *) + = set_fs_pwd; + ],[ + return 0; + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_ERROR(unknown) + ]) + ]) + EXTRA_KCFLAGS="$tmp_flags" +fi +]) + dnl # dnl # SLES API change, never adopted in mainline, dnl # Third 'struct vfsmount *' argument removed. diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index e264fba05..dac452c10 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -840,7 +840,11 @@ EXPORT_SYMBOL(releasef); # ifdef HAVE_2ARGS_SET_FS_PWD /* Used from 2.6.25 - 2.6.31+ */ void +# ifdef HAVE_SET_FS_PWD_WITH_CONST +set_fs_pwd(struct fs_struct *fs, const struct path *path) +# else set_fs_pwd(struct fs_struct *fs, struct path *path) +# endif { struct path old_pwd; From 8274ed598801255626b8c1648c3a4cdfea07b738 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 11 Mar 2013 22:02:45 -0400 Subject: [PATCH 0711/1062] Drop support for 3 argument version of set_fs_pwd This was a suggestion that Brian Behlendorf made when reviewing an early pull request for Linux 3.9 support. This commit was made intentionally easy to revert should we ever have a reason to reintroduce support for older kernels. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 24 ----------------------- module/spl/spl-vnode.c | 43 ++---------------------------------------- 2 files changed, 2 insertions(+), 65 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 6a8e658a2..14a7d9740 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -63,7 +63,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_GET_ZONE_COUNTS SPL_AC_USER_PATH_DIR SPL_AC_SET_FS_PWD - SPL_AC_2ARGS_SET_FS_PWD SPL_AC_SET_FS_PWD_WITH_CONST SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME @@ -1672,33 +1671,11 @@ AC_DEFUN([SPL_AC_SET_FS_PWD], ]) ]) -dnl # -dnl # 2.6.25 API change, -dnl # Simplied API by replacing mnt+dentry args with a single path arg. -dnl # -AC_DEFUN([SPL_AC_2ARGS_SET_FS_PWD], - [AC_MSG_CHECKING([whether set_fs_pwd() wants 2 args]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - set_fs_pwd(NULL, NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_SET_FS_PWD, 1, - [set_fs_pwd() wants 2 args]) - HAVE_2ARGS_SET_FS_PWD=yes - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 3.9 API change dnl # set_fs_pwd takes const struct path * dnl # AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], -if test "x$HAVE_2ARGS_SET_FS_PWD" = xyes; then tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Werror" [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *]) @@ -1732,7 +1709,6 @@ if test "x$HAVE_2ARGS_SET_FS_PWD" = xyes; then ]) ]) EXTRA_KCFLAGS="$tmp_flags" -fi ]) dnl # diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index dac452c10..4f56f1039 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -837,8 +837,6 @@ vn_releasef(int fd) EXPORT_SYMBOL(releasef); #ifndef HAVE_SET_FS_PWD -# ifdef HAVE_2ARGS_SET_FS_PWD -/* Used from 2.6.25 - 2.6.31+ */ void # ifdef HAVE_SET_FS_PWD_WITH_CONST set_fs_pwd(struct fs_struct *fs, const struct path *path) @@ -865,37 +863,16 @@ set_fs_pwd(struct fs_struct *fs, struct path *path) if (old_pwd.dentry) path_put(&old_pwd); } -# else -/* Used from 2.6.11 - 2.6.24 */ -void -set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, struct dentry *dentry) -{ - struct dentry *old_pwd; - struct vfsmount *old_pwdmnt; - - write_lock(&fs->lock); - old_pwd = fs->pwd; - old_pwdmnt = fs->pwdmnt; - fs->pwdmnt = mntget(mnt); - fs->pwd = dget(dentry); - write_unlock(&fs->lock); - - if (old_pwd) { - dput(old_pwd); - mntput(old_pwdmnt); - } -} -# endif /* HAVE_2ARGS_SET_FS_PWD */ #endif /* HAVE_SET_FS_PWD */ int vn_set_pwd(const char *filename) { -#if defined(HAVE_2ARGS_SET_FS_PWD) && defined(HAVE_USER_PATH_DIR) +#ifdef HAVE_USER_PATH_DIR struct path path; #else struct nameidata nd; -#endif /* HAVE_2ARGS_SET_FS_PWD */ +#endif /* HAVE_USER_PATH_DIR */ mm_segment_t saved_fs; int rc; SENTRY; @@ -908,7 +885,6 @@ vn_set_pwd(const char *filename) saved_fs = get_fs(); set_fs(get_ds()); -#ifdef HAVE_2ARGS_SET_FS_PWD # ifdef HAVE_USER_PATH_DIR rc = user_path_dir(filename, &path); if (rc) @@ -937,21 +913,6 @@ dput_and_out: dput_and_out: path_put(&nd.path); # endif /* HAVE_USER_PATH_DIR */ -#else - rc = __user_walk(filename, - LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); - if (rc) - SGOTO(out, rc); - - rc = vfs_permission(&nd, MAY_EXEC); - if (rc) - SGOTO(dput_and_out, rc); - - set_fs_pwd(current->fs, nd.nd_mnt, nd.nd_dentry); - -dput_and_out: - vn_path_release(&nd); -#endif /* HAVE_2ARGS_SET_FS_PWD */ out: set_fs(saved_fs); From 4a31e5aa9be561a450a2741f5305932e0b9df241 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 4 Mar 2013 15:17:03 -0500 Subject: [PATCH 0712/1062] Linux 3.9 compat: Switch to hlist_for_each{,_rcu} torvalds/linux@b67bfe0d42cac56c512dd5da4b1b347a23f4b70a changed hlist_for_each_entry{,_rcu} to take 3 arguments instead of 4. We handle this by switching to hlist_for_each{,_rcu}, which works across all supported kernels. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 3 ++- module/spl/spl-tsd.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e3538b5ff..f9c111491 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -404,7 +404,8 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void * spin_lock_irqsave(lock, flags); head = &table[hash_ptr(addr, bits)]; - hlist_for_each_entry_rcu(p, node, head, kd_hlist) { + hlist_for_each_rcu(node, head) { + p = list_entry_rcu(node, struct kmem_debug, kd_hlist); if (p->kd_addr == addr) { hlist_del_init(&p->kd_hlist); list_del_init(&p->kd_list); diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index d7749cf7b..6e5605b9d 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -113,7 +113,8 @@ tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid) hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); bin = &table->ht_bins[hash]; spin_lock(&bin->hb_lock); - hlist_for_each_entry(entry, node, &bin->hb_head, he_list) { + hlist_for_each(node, &bin->hb_head) { + entry = list_entry(node, tsd_hash_entry_t, he_list); if ((entry->he_key == key) && (entry->he_pid == pid)) { spin_unlock(&bin->hb_lock); SRETURN(entry); From 4a6d8d2c3e72345463de1db97d7d016c95443679 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 Feb 2013 13:58:05 -0800 Subject: [PATCH 0713/1062] Change spl-kmod-devel install path Install the common spl kernel development headers under /usr/src/spl-/ rather than in a kernel specific directory. The kernel specific build products such as spl_config.h and Modules.symvers are left installed under /usr/src/spl-/. This was done to be consistent with where dkms expects kernel module source to be packaged. It also allows for a common spl-kmod-devel package which includes the headers, and per-kernel spl-kmod-devel- packages. Signed-off-by: Brian Behlendorf --- Makefile.am | 16 ++++++---------- include/Makefile.am | 2 +- include/fs/Makefile.am | 2 +- include/linux/Makefile.am | 2 +- include/rpc/Makefile.am | 2 +- include/sharefs/Makefile.am | 2 +- include/sys/Makefile.am | 2 +- include/sys/fm/Makefile.am | 2 +- include/sys/fs/Makefile.am | 2 +- include/sys/sysevent/Makefile.am | 2 +- include/util/Makefile.am | 2 +- include/vm/Makefile.am | 2 +- 12 files changed, 17 insertions(+), 21 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4d8ab0e33..0bb3e46f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,13 +8,18 @@ SUBDIRS += lib cmd scripts endif if CONFIG_KERNEL SUBDIRS += module + +extradir = /usr/src/spl-$(VERSION) +extra_HEADERS = spl.release.in spl_config.h.in + +kerneldir = /usr/src/spl-$(VERSION)/$(LINUX_VERSION) +nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS) endif AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am EXTRA_DIST += dkms.postinst copy-builtin -noinst_HEADERS = spl_config.h spl.release distclean-local:: -$(RM) -R autom4te*.cache @@ -28,15 +33,6 @@ distclean-local:: -o -name '*.order' -o -name '*.markers' \) \ -type f -print | xargs $(RM) -if CONFIG_KERNEL -install-data-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ - instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -m 644 -D $$instfile $$instdest/$$instfile; \ - done -endif - ctags: $(RM) $(top_srcdir)/tags find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags diff --git a/include/Makefile.am b/include/Makefile.am index 952c4a267..463bea1d1 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -16,6 +16,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION) +kerneldir = /usr/src/spl-$(VERSION)/include kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am index 2a3673712..530172ddc 100644 --- a/include/fs/Makefile.am +++ b/include/fs/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/fs +kerneldir = /usr/src/spl-$(VERSION)/include/fs kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index cf1f62ad1..730f7695b 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -23,6 +23,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/linux +kerneldir = /usr/src/spl-$(VERSION)/include/linux kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am index cb68f4501..2f8aa29dd 100644 --- a/include/rpc/Makefile.am +++ b/include/rpc/Makefile.am @@ -9,6 +9,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/rpc +kerneldir = /usr/src/spl-$(VERSION)/include/rpc kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am index b343c75b7..d6175a502 100644 --- a/include/sharefs/Makefile.am +++ b/include/sharefs/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sharefs +kerneldir = /usr/src/spl-$(VERSION)/include/sharefs kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 37e958229..0e86a2894 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -104,7 +104,7 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys +kerneldir = /usr/src/spl-$(VERSION)/include/sys kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am index a073d2a3b..1c9cf8416 100644 --- a/include/sys/fm/Makefile.am +++ b/include/sys/fm/Makefile.am @@ -9,6 +9,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/fm +kerneldir = /usr/src/spl-$(VERSION)/include/sys/fm kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am index 3805a5ed3..27ae10988 100644 --- a/include/sys/fs/Makefile.am +++ b/include/sys/fs/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/fs +kerneldir = /usr/src/spl-$(VERSION)/include/sys/fs kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am index d2247d747..bf395eb2d 100644 --- a/include/sys/sysevent/Makefile.am +++ b/include/sys/sysevent/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/sysevent +kerneldir = /usr/src/spl-$(VERSION)/include/sys/sysevent kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/util/Makefile.am b/include/util/Makefile.am index 61fdff0bc..5ac96e8cc 100644 --- a/include/util/Makefile.am +++ b/include/util/Makefile.am @@ -9,6 +9,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/util +kerneldir = /usr/src/spl-$(VERSION)/include/util kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am index 9b09929db..413a6e325 100644 --- a/include/vm/Makefile.am +++ b/include/vm/Makefile.am @@ -10,6 +10,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/vm +kerneldir = /usr/src/spl-$(VERSION)/include/vm kernel_HEADERS = $(KERNEL_H) endif From 493972c8964174d0ec767c4e780bb3add71363fe Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 8 Feb 2013 11:02:08 -0800 Subject: [PATCH 0714/1062] Refresh RPM packaging Refresh the existing RPM packaging to conform to the 'Fedora Packaging Guidelines'. This includes adopting the kmods2 packaging standard which is used fod kmods distributed by rpmfusion for Fedora/RHEL. http://fedoraproject.org/wiki/Packaging:Guidelines http://rpmfusion.org/Packaging/KernelModules/Kmods2 While the spec files have been entirely rewritten from a user perspective the only major changes are: * The Fedora packages now have a build dependency on the rpmfusion repositories. The generic kmod packages also have a new dependency on kmodtool-1.22 but it is bundled with the source rpm so no additional packages are needed. * The kernel binary module packages have been renamed from spl-modules-* to kmod-spl-* as specificed by kmods2. * The is now a common kmod-spl-devel-* package in addition to the per-kernel devel packages. The common package contains the development headers while the per-kernel package contains kernel specific build products. Signed-off-by: Brian Behlendorf Closes #222 --- .gitignore | 3 - Makefile.am | 7 +- config/deb.am | 20 +- config/rpm.am | 90 ++-- config/spl-build.m4 | 34 ++ config/spl-meta.m4 | 3 + config/tgz.am | 20 +- configure.ac | 12 +- dkms.conf.in | 23 - rpm/Makefile.am | 1 + rpm/fedora/.gitignore | 3 + rpm/fedora/Makefile.am | 1 + rpm/fedora/spl-dkms.spec.in | 1 + rpm/fedora/spl-kmod.spec.in | 138 ++++++ rpm/fedora/spl.spec.in | 1 + rpm/generic/.gitignore | 3 + rpm/generic/Makefile.am | 1 + rpm/generic/spl-dkms.spec.in | 68 +++ rpm/generic/spl-kmod.spec.in | 148 +++++++ rpm/generic/spl.spec.in | 40 ++ scripts/Makefile.am | 2 +- scripts/dkms.mkconf | 81 ++++ dkms.postinst => scripts/dkms.postinst | 2 +- scripts/kmodtool | 552 ++++++++++++++++++++++++ spl-modules.spec.in | 576 ------------------------- spl.spec.in | 39 -- 26 files changed, 1139 insertions(+), 730 deletions(-) delete mode 100644 dkms.conf.in create mode 100644 rpm/Makefile.am create mode 100644 rpm/fedora/.gitignore create mode 100644 rpm/fedora/Makefile.am create mode 120000 rpm/fedora/spl-dkms.spec.in create mode 100644 rpm/fedora/spl-kmod.spec.in create mode 120000 rpm/fedora/spl.spec.in create mode 100644 rpm/generic/.gitignore create mode 100644 rpm/generic/Makefile.am create mode 100644 rpm/generic/spl-dkms.spec.in create mode 100644 rpm/generic/spl-kmod.spec.in create mode 100644 rpm/generic/spl.spec.in create mode 100755 scripts/dkms.mkconf rename dkms.postinst => scripts/dkms.postinst (97%) create mode 100755 scripts/kmodtool delete mode 100644 spl-modules.spec.in delete mode 100644 spl.spec.in diff --git a/.gitignore b/.gitignore index 97887eb0e..27069f5c7 100644 --- a/.gitignore +++ b/.gitignore @@ -40,10 +40,7 @@ Makefile.in /libtool /spl_config.h /spl_config.h.in -/spl.spec -/spl-modules.spec /spl.release -/dkms.conf /stamp-h1 /aclocal.m4 /autom4te.cache diff --git a/Makefile.am b/Makefile.am index 0bb3e46f2..3e149cb31 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/config/rpm.am include $(top_srcdir)/config/deb.am include $(top_srcdir)/config/tgz.am -SUBDIRS = include +SUBDIRS = include rpm if CONFIG_USER SUBDIRS += lib cmd scripts endif @@ -17,9 +17,8 @@ nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS) endif AUTOMAKE_OPTIONS = foreign -EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER +EXTRA_DIST = autogen.sh META DISCLAIMER copy-builtin EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am -EXTRA_DIST += dkms.postinst copy-builtin distclean-local:: -$(RM) -R autom4te*.cache @@ -44,5 +43,5 @@ etags: tags: ctags etags pkg: @DEFAULT_PACKAGE@ -pkg-modules: @DEFAULT_PACKAGE@-modules +pkg-kmod: @DEFAULT_PACKAGE@-kmod pkg-utils: @DEFAULT_PACKAGE@-utils diff --git a/config/deb.am b/config/deb.am index 75e31dfec..5efbd9d36 100644 --- a/config/deb.am +++ b/config/deb.am @@ -28,26 +28,24 @@ deb-local: exit 1; \ fi) -deb-modules: deb-local rpm-modules +deb-kmod: deb-local rpm-kmod if CONFIG_KERNEL - name=${PACKAGE}-modules; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ - pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ - $(RM) $$pkg1 $$pkg2 + name=${PACKAGE}; \ + version=${VERSION}-${RELEASE}; \ + arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ + pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ + $(RM) $$pkg1 endif deb-utils: deb-local rpm-utils if CONFIG_USER name=${PACKAGE}; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 endif -deb: deb-modules deb-utils +deb: deb-kmod deb-utils diff --git a/config/rpm.am b/config/rpm.am index 7340b4fce..8b33bb5b6 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -1,39 +1,40 @@ ############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. +# Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. # Copyright (C) 2007 The Regents of the University of California. # Written by Brian Behlendorf . ############################################################################### # Build targets for RPM packages. ############################################################################### -srpm-modules: -if CONFIG_KERNEL - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common -endif +srpm-kmod: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \ + def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_KMOD}' srpm-common + +srpm-dkms: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \ + def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_DKMS}' srpm-common srpm-utils: -if CONFIG_USER - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common -endif + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \ + def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_UTIL}' srpm-common -srpm: srpm-modules srpm-utils +srpm: srpm-kmod srpm-dkms srpm-utils +srpms: srpm-kmod srpm-dkms srpm-utils -rpm-dkms: srpm-modules -if CONFIG_KERNEL - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" dkms-common -endif +rpm-kmod: srpm-kmod + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \ + def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_KMOD}' rpm-common -rpm-modules: srpm-modules -if CONFIG_KERNEL - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common -endif +rpm-dkms: srpm-dkms + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \ + def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_DKMS}' rpm-common rpm-utils: srpm-utils -if CONFIG_USER - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common -endif + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \ + def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_UTIL}' rpm-common -rpm: rpm-modules rpm-utils rpm-dkms +rpm: rpm-kmod rpm-dkms rpm-utils +rpms: rpm-kmod rpm-dkms rpm-utils rpm-local: @(if test "${HAVE_RPMBUILD}" = "no"; then \ @@ -48,32 +49,14 @@ rpm-local: mkdir -p $(rpmbuild)/RPMS && \ mkdir -p $(rpmbuild)/SRPMS && \ mkdir -p $(rpmbuild)/SPECS && \ - cp $(rpmspec) $(rpmbuild)/SPECS && \ + cp ${RPM_SPEC_DIR}/$(rpmspec) $(rpmbuild)/SPECS && \ mkdir -p $(rpmbuild)/SOURCES && \ + cp scripts/kmodtool $(rpmbuild)/SOURCES && \ cp $(distdir).tar.gz $(rpmbuild)/SOURCES) -dkms-common: - rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ - rpmspec=$(pkg).spec; \ - rpmdkms=$(pkg)-dkms-$(SPL_META_VERSION)-$(SPL_META_RELEASE).noarch.rpm;\ - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) \ - rpmbuild="$$rpmbuild" \ - rpmspec="$$rpmspec" \ - rpm-local || exit 1; \ - $(RPMBUILD) \ - --define "_tmppath $$rpmbuild/TMP" \ - --define "_topdir $$rpmbuild" \ - --define "dist %{nil}" \ - --define "_without_kernel 1" \ - --define "_without_kernel_debug 1" \ - --define "_with_kernel_dkms 1" \ - --nodeps --rebuild $$rpmpkg || exit 1; \ - cp $$rpmbuild/RPMS/noarch/$$rpmdkms . || exit 1; \ - $(RM) -R $$rpmbuild - srpm-common: dist - rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + @(dist=`$(RPM) --eval %{?dist}`; \ + rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \ rpmspec=$(pkg).spec; \ rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ $(MAKE) $(AM_MAKEFLAGS) \ @@ -83,14 +66,13 @@ srpm-common: dist $(RPMBUILD) \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ - --define "build_src_rpm 1" \ - --define "dist %{nil}" \ - --nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ + $(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ - $(RM) -R $$rpmbuild + rm -R $$rpmbuild) rpm-common: - rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + @(dist=`$(RPM) --eval %{?dist}`; \ + rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \ rpmspec=$(pkg).spec; \ rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ $(MAKE) $(AM_MAKEFLAGS) \ @@ -100,14 +82,6 @@ rpm-common: ${RPMBUILD} \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ - --define "dist %{nil}" \ - --define "require_kdir $(LINUX)" \ - --define "require_kobj $(LINUX_OBJ)" \ - --define "require_kver $(LINUX_VERSION)" \ - --define "$(DEBUG_SPL) 1" \ - --define "$(DEBUG_LOG) 1" \ - --define "$(DEBUG_KMEM) 1" \ - --define "$(DEBUG_KMEM_TRACKING) 1" \ - --nodeps --rebuild $$rpmpkg || exit 1; \ + $(def) --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ - $(RM) -R $$rpmbuild + rm -R $$rpmbuild) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 14a7d9740..233eea004 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -232,6 +232,11 @@ dnl # Check for rpm+rpmbuild to build RPM packages. If these tools dnl # are missing it is non-fatal but you will not be able to build dnl # RPM packages and will be warned if you try too. dnl # +dnl # By default the generic spec file will be used because it requires +dnl # minimal dependencies. Distribution specific spec files can be +dnl # placed under the 'rpm/' directory and enabled using +dnl # the --with-spec= configure option. +dnl # AC_DEFUN([SPL_AC_RPM], [ RPM=rpm RPMBUILD=rpmbuild @@ -256,6 +261,25 @@ AC_DEFUN([SPL_AC_RPM], [ AC_MSG_RESULT([$HAVE_RPMBUILD]) ]) + RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_LOG) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"' + RPM_DEFINE_UTIL= + RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"' + RPM_DEFINE_DKMS= + + SRPM_DEFINE_COMMON='--define "build_src_rpm 1"' + SRPM_DEFINE_UTIL= + SRPM_DEFINE_KMOD= + SRPM_DEFINE_DKMS= + + RPM_SPEC_DIR="rpm/generic" + AC_ARG_WITH([spec], + AS_HELP_STRING([--with-spec=SPEC], + [Spec files 'generic|fedora']), + [RPM_SPEC_DIR="rpm/$withval"]) + + AC_MSG_CHECKING([whether spec files are available]) + AC_MSG_RESULT([yes ($RPM_SPEC_DIR/*.spec.in)]) + AC_SUBST(HAVE_RPM) AC_SUBST(RPM) AC_SUBST(RPM_VERSION) @@ -263,6 +287,16 @@ AC_DEFUN([SPL_AC_RPM], [ AC_SUBST(HAVE_RPMBUILD) AC_SUBST(RPMBUILD) AC_SUBST(RPMBUILD_VERSION) + + AC_SUBST(RPM_SPEC_DIR) + AC_SUBST(RPM_DEFINE_UTIL) + AC_SUBST(RPM_DEFINE_KMOD) + AC_SUBST(RPM_DEFINE_DKMS) + AC_SUBST(RPM_DEFINE_COMMON) + AC_SUBST(SRPM_DEFINE_UTIL) + AC_SUBST(SRPM_DEFINE_KMOD) + AC_SUBST(SRPM_DEFINE_DKMS) + AC_SUBST(SRPM_DEFINE_COMMON) ]) dnl # diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index b76cc8dc6..af8be801a 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -35,6 +35,9 @@ AC_DEFUN([SPL_AC_META], [ [Define the project release.] ) AC_SUBST([SPL_META_RELEASE]) + + RELEASE="$SPL_META_RELEASE" + AC_SUBST([RELEASE]) fi if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then diff --git a/config/tgz.am b/config/tgz.am index 1aaf4dde2..765be43b9 100644 --- a/config/tgz.am +++ b/config/tgz.am @@ -21,26 +21,24 @@ tgz-local: exit 1; \ fi) -tgz-modules: tgz-local rpm-modules +tgz-kmod: tgz-local rpm-kmod if CONFIG_KERNEL - name=${PACKAGE}-modules; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ - release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ - pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ - $(RM) $$pkg1 $$pkg2 + name=${PACKAGE}; \ + version=${VERSION}-${RELEASE}; \ + arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ + pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ + $(RM) $$pkg1 endif tgz-utils: tgz-local rpm-utils if CONFIG_USER name=${PACKAGE}; \ - version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ $(RM) $$pkg1 endif -tgz: tgz-modules tgz-utils +tgz: tgz-kmod tgz-utils diff --git a/configure.ac b/configure.ac index c71bc1f53..d5951ac3a 100644 --- a/configure.ac +++ b/configure.ac @@ -64,10 +64,16 @@ AC_CONFIG_FILES([ include/util/Makefile include/vm/Makefile scripts/Makefile - spl.spec - spl-modules.spec + rpm/Makefile + rpm/fedora/Makefile + rpm/fedora/spl.spec + rpm/fedora/spl-kmod.spec + rpm/fedora/spl-dkms.spec + rpm/generic/Makefile + rpm/generic/spl.spec + rpm/generic/spl-kmod.spec + rpm/generic/spl-dkms.spec spl.release - dkms.conf ]) AC_OUTPUT diff --git a/dkms.conf.in b/dkms.conf.in deleted file mode 100644 index 64f1f916f..000000000 --- a/dkms.conf.in +++ /dev/null @@ -1,23 +0,0 @@ -AUTOINSTALL="yes" -PACKAGE_NAME="@PACKAGE@" -PACKAGE_VERSION="@VERSION@" -PRE_BUILD="configure - --prefix=/usr - --with-config=kernel - --with-linux=$(case `lsb_release -is` in - (Debian) echo ${kernel_source_dir/%build/source} ;; - (*) echo ${kernel_source_dir} ;; - esac) - --with-linux-obj=${kernel_source_dir} -" -POST_INSTALL="dkms.postinst -a ${arch} -k ${kernelver} -t ${dkms_tree} - -n ${PACKAGE_NAME} -v ${PACKAGE_VERSION} -" -REMAKE_INITRD="no" -MAKE[0]="make" -BUILT_MODULE_NAME[0]="spl" -BUILT_MODULE_LOCATION[0]="module/spl/" -DEST_MODULE_LOCATION[0]="/extra/spl/spl" -BUILT_MODULE_NAME[1]="splat" -BUILT_MODULE_LOCATION[1]="module/splat/" -DEST_MODULE_LOCATION[1]="/extra/splat/splat" diff --git a/rpm/Makefile.am b/rpm/Makefile.am new file mode 100644 index 000000000..e41cdda2e --- /dev/null +++ b/rpm/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = fedora generic diff --git a/rpm/fedora/.gitignore b/rpm/fedora/.gitignore new file mode 100644 index 000000000..67129ff14 --- /dev/null +++ b/rpm/fedora/.gitignore @@ -0,0 +1,3 @@ +/spl-dkms.spec +/spl-kmod.spec +/spl.spec diff --git a/rpm/fedora/Makefile.am b/rpm/fedora/Makefile.am new file mode 100644 index 000000000..da6c4abe2 --- /dev/null +++ b/rpm/fedora/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = spl.spec.in spl-kmod.spec.in spl-dkms.spec.in diff --git a/rpm/fedora/spl-dkms.spec.in b/rpm/fedora/spl-dkms.spec.in new file mode 120000 index 000000000..900f524aa --- /dev/null +++ b/rpm/fedora/spl-dkms.spec.in @@ -0,0 +1 @@ +../generic/spl-dkms.spec.in \ No newline at end of file diff --git a/rpm/fedora/spl-kmod.spec.in b/rpm/fedora/spl-kmod.spec.in new file mode 100644 index 000000000..30121591c --- /dev/null +++ b/rpm/fedora/spl-kmod.spec.in @@ -0,0 +1,138 @@ +%define module @PACKAGE@ +%define repo rpmfusion + +%define buildforkernels newest +#define buildforkernels current +#define buildforkernels akmod + +%bcond_with debug +%bcond_with debug_log +%bcond_with debug_kmem +%bcond_with debug_kmem_tracking +%bcond_with atomic_spinlocks + + +Name: %{module}-kmod + +Version: @VERSION@ +Release: @RELEASE@%{?dist} +Summary: Kernel module(s) + +Group: System Environment/Kernel +License: GPLv2+ +URL: http://zfsonlinux.org/ +Source0: %{module}-%{version}.tar.gz +Source10: kmodtool + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExclusiveArch: i586 i686 x86_64 + +# Likely compiles but is not supported. +ExcludeArch: ppc ppc64 + +# The developments headers will conflict with the dkms packages. +Conflicts: %{module}-dkms + +BuildRequires: %{_bindir}/kmodtool + +%if 0%{?fedora} >= 17 +%define prefix /usr +%endif + +%{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} } + +# Kmodtool does its magic here. A patched version of kmodtool is shipped +# with the source rpm until kmod development packages are supported upstream. +# https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714 +%{expand:%(sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + + +%description +This package contains the kernel modules required to emulate +several interfaces provided by the Solaris kernel. + +%prep +# Error out if there was something wrong with kmodtool. +%{?kmodtool_check} + +# Print kmodtool output for debugging purposes: +sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%if %{with debug} + %define debug --enable-debug +%else + %define debug --disable-debug +%endif + +%if %{with debug_log} + %define debug_log --enable-debug-log +%else + %define debug_log --disable-debug-log +%endif + +%if %{with debug_kmem} + %define debug_kmem --enable-debug-kmem +%else + %define debug_kmem --disable-debug-kmem +%endif + +%if %{with debug_kmem_tracking} + %define debug_kmem_tracking --enable-debug-kmem-tracking +%else + %define debug_kmem_tracking --disable-debug-kmem-tracking +%endif + +%if %{with atomic_spinlocks} + %define atomic_spinlocks --enable-atomic-spinlocks +%else + %define atomic_spinlocks --disable-atomic-spinlocks +%endif + +# Leverage VPATH from configure to avoid making multiple copies. +%define _configure ../%{module}-%{version}/configure + +%setup -q -c -T -a 0 + +for kernel_version in %{?kernel_versions}; do + %{__mkdir} _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*} + %configure \ + --with-config=kernel \ + --with-linux="${kernel_version##*___}" \ + --with-linux-obj="${kernel_version##*___}" \ + %{debug} \ + %{debug_log} \ + %{debug_kmem} \ + %{debug_kmem_tracking} \ + %{atomic_spinlocks} + make %{?_smp_mflags} + popd +done + + +%install +rm -rf ${RPM_BUILD_ROOT} + +# Relies on the kernel 'modules_install' make target. +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*} + make install \ + DESTDIR=${RPM_BUILD_ROOT} \ + %{?prefix:INSTALL_MOD_PATH=%{?prefix}} \ + INSTALL_MOD_DIR=%{kmodinstdir_postfix} + popd +done +chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* +%{?akmod_install} + + +%clean +rm -rf $RPM_BUILD_ROOT + +%changelog +* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 +- Initial kmods2 packaging. diff --git a/rpm/fedora/spl.spec.in b/rpm/fedora/spl.spec.in new file mode 120000 index 000000000..d3276f013 --- /dev/null +++ b/rpm/fedora/spl.spec.in @@ -0,0 +1 @@ +../generic/spl.spec.in \ No newline at end of file diff --git a/rpm/generic/.gitignore b/rpm/generic/.gitignore new file mode 100644 index 000000000..67129ff14 --- /dev/null +++ b/rpm/generic/.gitignore @@ -0,0 +1,3 @@ +/spl-dkms.spec +/spl-kmod.spec +/spl.spec diff --git a/rpm/generic/Makefile.am b/rpm/generic/Makefile.am new file mode 100644 index 000000000..da6c4abe2 --- /dev/null +++ b/rpm/generic/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = spl.spec.in spl-kmod.spec.in spl-dkms.spec.in diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in new file mode 100644 index 000000000..d395bf07a --- /dev/null +++ b/rpm/generic/spl-dkms.spec.in @@ -0,0 +1,68 @@ +%define module @PACKAGE@ +%define mkconf scripts/dkms.mkconf + +Name: %{module}-dkms + +Version: @VERSION@ +Release: @RELEASE@%{?dist} +Summary: Kernel module(s) (dkms) + +Group: System Environment/Kernel +License: GPLv2+ +URL: http://zfsonlinux.org/ +Source0: %{module}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +Requires: dkms >= 2.2.0.2 +Provides: %{module}-kmod = %{version} +Conflicts: %{module}-kmod + +%description +This package contains the dkms kernel modules required to emulate +several interfaces provided by the Solaris kernel. + +%prep +%setup -q -n %{module}-%{version} + +%build +%{mkconf} -n %{module} -v %{version} -f dkms.conf + +%install +if [ "$RPM_BUILD_ROOT" != "/" ]; then + rm -rf $RPM_BUILD_ROOT +fi +mkdir -p $RPM_BUILD_ROOT/usr/src/ +cp -rf ${RPM_BUILD_DIR}/%{module}-%{version} $RPM_BUILD_ROOT/usr/src/ + +%clean +if [ "$RPM_BUILD_ROOT" != "/" ]; then + rm -rf $RPM_BUILD_ROOT +fi + +%files +%defattr(-,root,root) +/usr/src/%{module}-%{version} + +%post +for POSTINST in /usr/lib/dkms/common.postinst; do + if [ -f $POSTINST ]; then + $POSTINST %{module} %{version} + exit $? + fi + echo "WARNING: $POSTINST does not exist." +done +echo -e "ERROR: DKMS version is too old and %{module} was not" +echo -e "built with legacy DKMS support." +echo -e "You must either rebuild %{module} with legacy postinst" +echo -e "support or upgrade DKMS to a more current version." +exit 1 + +%preun +dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade +exit 0 + +%changelog +* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 +- Initial dkms packaging. + diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in new file mode 100644 index 000000000..dc23548a0 --- /dev/null +++ b/rpm/generic/spl-kmod.spec.in @@ -0,0 +1,148 @@ +%define module @PACKAGE@ + +%bcond_with debug +%bcond_with debug_log +%bcond_with debug_kmem +%bcond_with debug_kmem_tracking +%bcond_with atomic_spinlocks + + +Name: %{module}-kmod + +Version: @VERSION@ +Release: @RELEASE@%{?dist} +Summary: Kernel module(s) + +Group: System Environment/Kernel +License: GPLv2+ +URL: http://zfsonlinux.org/ +Source0: %{module}-%{version}.tar.gz +Source10: kmodtool +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# The developments headers will conflict with the dkms packages. +Conflicts: %{module}-dkms + +# Source packages minimally require a kernel-devel dependency. +%{?rhel:BuildRequires: kernel-devel} +%{?fedora:BuildRequires: kernel-devel} +%{?suse_version:BuildRequires: kernel-source} + +# Binary packages build against all installed kernels by default. +%if !%{defined kernels} && !%{defined build_src_rpm} + %if 0%{?rhel}%{?fedora}%{?suse_version} + %define kernels %(ls -1 /usr/src/kernels) + %else + %define kernels %(ls -1 /lib/modules) + %endif +%endif + +%if 0%{?fedora} >= 17 +%define prefix /usr +%endif + +# Kmodtool does its magic here. A patched version of kmodtool is shipped +# because the latest versions may not be available for your distribution. +# https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714 +%{expand:%(bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + + +%description +This package contains the kernel modules required to emulate +several interfaces provided by the Solaris kernel. + +%prep +# Error out if there was something wrong with kmodtool. +%{?kmodtool_check} + +# Print kmodtool output for debugging purposes: +bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%if %{with debug} + %define debug --enable-debug +%else + %define debug --disable-debug +%endif + +%if %{with debug_log} + %define debug_log --enable-debug-log +%else + %define debug_log --disable-debug-log +%endif + +%if %{with debug_kmem} + %define debug_kmem --enable-debug-kmem +%else + %define debug_kmem --disable-debug-kmem +%endif + +%if %{with debug_kmem_tracking} + %define debug_kmem_tracking --enable-debug-kmem-tracking +%else + %define debug_kmem_tracking --disable-debug-kmem-tracking +%endif + +%if %{with atomic_spinlocks} + %define atomic_spinlocks --enable-atomic-spinlocks +%else + %define atomic_spinlocks --disable-atomic-spinlocks +%endif + +# Leverage VPATH from configure to avoid making multiple copies. +%define _configure ../%{module}-%{version}/configure + +%setup -q -c -T -a 0 + +for kernel_version in %{?kernel_versions}; do + %{__mkdir} _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + cd _kmod_build_${kernel_version%%___*} + %configure \ + --with-config=kernel \ +%if 0%{?rhel}%{?fedora} + --with-linux="${kernel_version##*___}" \ + --with-linux-obj="${kernel_version##*___}" \ +%else + --with-linux=\ + %(if [ -e /lib/modules/${kernel_version%%___*}/source ]; then \ + echo "/lib/modules/${kernel_version%%___*}/source" \ + else \ + echo "/lib/modules/${kernel_version%%___*}/build" \ + fi) \ + --with-linux-obj="/lib/modules/${kernel_version%%___*}/build" \ +%endif + %{debug} \ + %{debug_log} \ + %{debug_kmem} \ + %{debug_kmem_tracking} \ + %{atomic_spinlocks} + make %{?_smp_mflags} + cd .. +done + + +%install +rm -rf ${RPM_BUILD_ROOT} + +# Relies on the kernel 'modules_install' make target. +for kernel_version in %{?kernel_versions}; do + cd _kmod_build_${kernel_version%%___*} + make install \ + DESTDIR=${RPM_BUILD_ROOT} \ + %{?prefix:INSTALL_MOD_PATH=%{?prefix}} \ + INSTALL_MOD_DIR=%{kmodinstdir_postfix} + cd .. +done +chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* +%{?akmod_install} + + +%clean +rm -rf $RPM_BUILD_ROOT + +%changelog +* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 +- Initial kmods2 packaging. diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in new file mode 100644 index 000000000..4b8cf0756 --- /dev/null +++ b/rpm/generic/spl.spec.in @@ -0,0 +1,40 @@ +Name: @PACKAGE@ +Version: @VERSION@ +Release: @RELEASE@%{?dist} +Summary: Commands to control the kernel modules + +Group: System Environment/Kernel +License: GPLv2+ +URL: http://zfsonlinux.org/ +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExclusiveArch: i386 i686 x86_64 + +# May build but untested on ppc/ppc64 +ExcludeArch: ppc ppc64 + +Requires: %{name}-kmod >= %{version} +Provides: %{name}-kmod-common = %{version} + +%description +This package contains the commands to verify the SPL +kernel modules are functioning properly. + +%prep +%setup -q + +%build +%configure --with-config=user +make %{?_smp_mflags} + +%install +%{__rm} -rf $RPM_BUILD_ROOT +make install DESTDIR=%{?buildroot} + +%files +%doc AUTHORS COPYING DISCLAIMER +%{_sbindir}/* + +%changelog +* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 +- Refreshed RPM packaging. diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 33700ee44..4c0d7ba40 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = check.sh +EXTRA_DIST = check.sh dkms.mkconf dkms.postinst kmodtool check: $(top_srcdir)/scripts/check.sh diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf new file mode 100755 index 000000000..3bfe2be7b --- /dev/null +++ b/scripts/dkms.mkconf @@ -0,0 +1,81 @@ +#!/bin/sh + +PROG=$0 + +pkgcfg=/etc/sysconfig/spl + +while getopts "n:v:c:f:" opt; do + case $opt in + n) pkgname=$OPTARG ;; + v) pkgver=$OPTARG ;; + c) pkgcfg=$OPTARG ;; + f) filename=$OPTARG ;; + esac +done + +if [ -z "${pkgname}" -o -z "${pkgver}" -o -z "${filename}" ]; then + echo "Usage: $PROG -n -v -c -f " + exit 1 +fi + +cat >${filename} <, +# Thorsten Leemhuis +# Nicolas Chauvet +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +shopt -s extglob + +myprog="kmodtool-${repo}" +myver="0.12.1" + +kmodname= +build_kernels="current" +kernels_known_variants= +kernel_versions= +kernel_versions_to_build_for= +prefix= +filterfile= +target= + +error_out() +{ + local errorlevel=${1} + shift + echo "Error: $@" >&2 + # the next line is not multi-line safe -- not needed *yet* + echo "%global kmodtool_check echo \"kmodtool error: $@\"; exit ${errorlevel};" + exit ${errorlevel} +} + +print_rpmtemplate_header() +{ + echo + echo '%global kmodinstdir_prefix '${prefix}/lib/modules/ + echo '%global kmodinstdir_postfix '/extra/${kmodname}/ + echo '%global kernel_versions '${kernel_versions} + echo +} + +print_akmodtemplate () +{ + echo + cat <= %{?epoch:%{epoch}:}%{version} +Provides: ${kmodname}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} +EOF + + if [[ ${obsolete_name} ]]; then + echo "Provides: akmod-${obsolete_name} = ${obsolete_version}" + echo "Obsoletes: akmod-${obsolete_name} < ${obsolete_version}" + fi + + cat < /dev/null & + +%files -n akmod-${kmodname} +%defattr(-,root,root,-) +%{_usrsrc}/akmods/* + +EOF +} + +print_akmodmeta () +{ + cat <= %{?epoch:%{epoch}:}%{version} +Requires(post): ${prefix}/sbin/depmod +Requires(postun): ${prefix}/sbin/depmod +%{?KmodsRequires:Requires: %{KmodsRequires}-uname-r = ${kernel_uname_r}} +%{?KmodsBuildRequires:BuildRequires: %{KmodsBuildRequires}-uname-r = ${kernel_uname_r}} +%{?KmodsBuildRequires:BuildRequires: %{KmodsBuildRequires}} +EOF + + if [[ ${obsolete_name} ]]; then + echo "Provides: kmod-${obsolete_name}-${kernel_uname_r} = ${obsolete_version}" + echo "Obsoletes: kmod-${obsolete_name}-${kernel_uname_r} < ${obsolete_version}" + fi + + # second part + if [[ ! "${customkernel}" ]]; then + cat < /dev/null || : +%postun -n kmod-${kmodname}-${kernel_uname_r} +${prefix}/sbin/depmod -aF /boot/System.map-${kernel_uname_r} ${kernel_uname_r} &> /dev/null || : + +EOF + else + cat < /dev/null || : +%postun -n kmod-${kmodname}-${kernel_uname_r} +[[ "$(uname -r)" == "${kernel_uname_r}" ]] && ${prefix}/sbin/depmod -a > /dev/null || : + +EOF + fi + + # third part + cat <= %{?epoch:%{epoch}:}%{version}-%{release} +EOF + + if [[ ${obsolete_name} ]]; then + echo "Provides: kmod-${obsolete_name}${kernel_variant} = ${obsolete_version}" + echo "Obsoletes: kmod-${obsolete_name}${kernel_variant} < ${obsolete_version}" + fi + + cat < -- look for our shared files in " + echo " --filterfile -- filter the results with grep --file " + echo " --for-kernels -- created templates only for these kernels" + echo " --kmodname -- name of the kmod (required)" + echo " --devel -- make kmod-devel package" + echo " --noakmod -- no akmod package" + echo " --repo -- use buildsys-build--kerneldevpkgs" + echo " --target -- target-arch (required)" +} + +while [ "${1}" ] ; do + case "${1}" in + --filterfile) + shift + if [[ ! "${1}" ]] ; then + error_out 2 "Please provide path to a filter-file together with --filterfile" >&2 + elif [[ ! -e "${1}" ]]; then + error_out 2 "Filterfile ${1} not found" >&2 + fi + filterfile="${1}" + shift + ;; + --kmodname) + shift + if [[ ! "${1}" ]] ; then + error_out 2 "Please provide the name of the kmod together with --kmodname" >&2 + fi + # strip pending -kmod + kmodname="${1%%-kmod}" + shift + ;; + --devel) + shift + devel="true" + ;; + --prefix) + shift + if [[ ! "${1}" ]] ; then + error_out 2 "Please provide a prefix with --prefix" >&2 + fi + prefix="${1}" + shift + ;; + --repo) + shift + if [[ ! "${1}" ]] ; then + error_out 2 "Please provide the name of the repo together with --repo" >&2 + fi + repo=${1} + shift + ;; + --for-kernels) + shift + if [[ ! "${1}" ]] ; then + error_out 2 "Please provide the name of the kmod together with --kmodname" >&2 + fi + for_kernels="${1}" + shift + ;; + --noakmod) + shift + noakmod="true" + ;; + --obsolete-name) + shift + if [[ ! "${1}" ]] ; then + error_out 2 "Please provide the name of the kmod to obsolte together with --obsolete-name" >&2 + fi + obsolete_name="${1}" + shift + ;; + --obsolete-version) + shift + if [[ ! "${1}" ]] ; then + error_out 2 "Please provide the version of the kmod to obsolte together with --obsolete-version" >&2 + fi + obsolete_version="${1}" + shift + ;; + --target) + shift + target="${1}" + shift + ;; + --akmod) + shift + build_kernels="akmod" + ;; + --newest) + shift + build_kernels="newest" + ;; + --current) + shift + build_kernels="current" + ;; + --help) + myprog_help + exit 0 + ;; + --version) + echo "${myprog} ${myver}" + exit 0 + ;; + *) + echo "Error: Unknown option '${1}'." >&2 + usage >&2 + exit 2 + ;; + esac +done + +if [[ -e ./kmodtool-kernel-variants ]]; then + kernels_known_variants="$(cat ./kmodtool-kernel-variants)" +elif [[ -e /usr/share/kmodtool/kernel-variants ]] ; then + kernels_known_variants="$(cat /usr/share/kmodtool/kernel-variants)" +else + kernels_known_variants="@(smp?(-debug)|PAE?(-debug)|debug|kdump|xen|kirkwood|highbank|imx|omap|tegra)" +fi + +# general sanity checks +if [[ ! "${target}" ]]; then + error_out 2 "please pass target arch with --target" +elif [[ ! "${kmodname}" ]]; then + error_out 2 "please pass kmodname with --kmodname" +elif [[ ! "${kernels_known_variants}" ]] ; then + error_out 2 "could not determine known variants" +elif ( [[ "${obsolete_name}" ]] && [[ ! "${obsolete_version}" ]] ) || ( [[ ! "${obsolete_name}" ]] && [[ "${obsolete_version}" ]] ) ; then + error_out 2 "you need to provide both --obsolete-name and --obsolete-version" +fi + +# go +if [[ "${for_kernels}" ]]; then + # this is easy: + print_customrpmtemplate "${for_kernels}" +elif [[ "${build_kernels}" == "akmod" ]]; then + # do only a akmod package + print_akmodtemplate + print_akmodmeta +else + # seems we are on out own to decide for which kernels to build + + # we need more sanity checks in this case + if [[ ! "${repo}" ]]; then + error_out 2 "please provide repo name with --repo" + elif ! $(which buildsys-build-${repo}-kerneldevpkgs &> /dev/null) ; then + error_out 2 "buildsys-build-${repo}-kerneldevpkgs not found" + fi + + # call buildsys-build-${repo}-kerneldevpkgs to get the list of kernels + cmdoptions="--target ${target}" + + # filterfile to filter list of kernels? + if [[ "${filterfile}" ]] ; then + cmdoptions="${cmdoptions} --filterfile ${filterfile}" + fi + + kernel_versions_to_build_for="$(buildsys-build-${repo}-kerneldevpkgs --${build_kernels} ${cmdoptions})" + returncode=$? + if (( ${returncode} != 0 )); then + error_out 2 "buildsys-build-${repo}-kerneldevpkgs failed: $(buildsys-build-${repo}-kerneldevpkgs --${build_kernels} ${cmdoptions})" + fi + + if [[ "${build_kernels}" == "current" ]] && [[ ! "${noakmod}" ]]; then + print_akmodtemplate + fi + + print_rpmtemplate +fi diff --git a/spl-modules.spec.in b/spl-modules.spec.in deleted file mode 100644 index d1315a27b..000000000 --- a/spl-modules.spec.in +++ /dev/null @@ -1,576 +0,0 @@ -# The following block is used to allow the source RPM to be rebuilt -# against specific kernels. It is preferable that rpmbuild define the -# require_kver, require_kdir, require_obj constants for us, but if it does not -# not we attempt to determine the correct values based on your distro. - -# kdir: Full path to the kernel source headers -# kobj: Full path to the kernel build objects -# kver: Kernel version -# kpkg: Kernel package name -# kdevpkg: Kernel devel package name -# kverpkg: Kernel package version - -%if %{defined require_kver} -%define kver %{require_kver} -%endif - -%if %{defined require_kdir} -%define kdir %{require_kdir} -%endif - -%if %{defined require_kobj} -%define kobj %{require_kobj} -%endif - -# Set using 'rpmbuild ... --with kernel ...', defaults to enabled. -%if %{defined _with_kernel} - %define with_kernel 1 -%else - %if %{defined _without_kernel} - %define with_kernel 0 - %else - %define with_kernel 1 - %endif -%endif - -# Set using 'rpmbuild ... --with kernel-debug ...', defaults to disabled. -%if %{defined _with_kernel_debug} - %define with_kernel_debug 1 -%else - %if %{defined _without_kernel_debug} - %define with_kernel_debug 0 - %else - %define with_kernel_debug 0 - %endif -%endif - -# Set using 'rpmbuild ... --with kernel-dkms ...', defaults to disabled. -%if %{defined _with_kernel_dkms} - %define with_kernel_dkms 1 -%else - %if %{defined _without_kernel_dkms} - %define with_kernel_dkms 0 - %else - %define with_kernel_dkms 0 - %endif -%endif - -# Set using 'rpmbuild ... --with debug ...', defaults to disabled. -%if %{defined _with_debug} - %define kdebug --enable-debug -%else - %if %{defined _without_debug} - %define kdebug --disable-debug - %else - %define kdebug --disable-debug - %endif -%endif - -# Set using 'rpmbuild ... --with debug-log ...', defaults to enabled. -%if %{defined _with_debug_log} - %define kdebug_log --enable-debug-log -%else - %if %{defined _without_debug_log} - %define kdebug_log --disable-debug-log - %else - %define kdebug_log --enable-debug-log - %endif -%endif - -# Set using 'rpmbuild ... --with debug-kmem ...', defaults to enabled. -%if %{defined _with_debug_kmem} - %define kdebug_kmem --enable-debug-kmem -%else - %if %{defined _without_debug_kmem} - %define kdebug_kmem --disable-debug-kmem - %else - %define kdebug_kmem --enable-debug-kmem - %endif -%endif - -# Set using 'rpmbuild ... --with debug-tracking ...', defaults to disabled. -%if %{defined _with_debug_kmem_tracking} - %define kdebug_kmem_tracking --enable-debug-kmem-tracking -%else - %if %{defined _without_debug_kmem_tracking} - %define kdebug_kmem_tracking --disable-debug-kmem-tracking - %else - %define kdebug_kmem_tracking --disable-debug-kmem-tracking - %endif -%endif - -# SLES: -%if %{defined suse_version} - %if %{undefined kver} - %ifarch ppc64 - %define kverextra ppc64 - %else - %define kverextra default - %endif - - %if %{suse_version} >= 1100 - %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{kverextra} - %define krelease %{klnk}/include/config/kernel.release - %else - %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{kverextra} - %define krelease %{klnk}/.kernelrelease - %endif - - %define kver_kern %((echo X; %{__cat} %{krelease} 2>/dev/null)|tail -1) - %define kver_dbug %{nil} - %else - %define kver_kern %{kver} - %define kver_dbug %{nil} - %endif - - %if %{undefined kverextra} - %define kverextra %(echo %{kver_kern} | cut -f3 -d'-') - %endif - - %define kpkg_kern kernel-%{kverextra} - %define kpkg_dbug %{nil} - %define kpkg_dkms dkms - - %define kdevpkg_kern kernel-source - %define kdevpkg_dbug %{nil} - %define kdevpkg_dkms dkms - - %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/-%{kverextra}//g') - %define kverpkg_dbug %{nil} - %define kverpkg_dkms 2.2.0.2 - - # The kernel and rpm versions do not strictly match under SLES11 - # e.g. kernel version 2.6.27.19-5 != rpm version 2.6.27.19-5.1 - %if %{suse_version} >= 1100 - %define koppkg >= - %else - %define koppkg = - %endif - - %if %{undefined kdir} - %define kdir_kern %{_usrsrc}/linux-%{kverpkg_kern} - %define kdir_dbug %{nil} - %else - %define kdir_kern %{kdir} - %define kdir_dbug %{nil} - %endif - - %if %{undefined kobj} - %define kobj_kern %{kdir_kern}-obj/%{_target_cpu}/%{kverextra} - %define kobj_dbug %{nil} - %else - %define kobj_kern %{kobj} - %define kobj_dbug %{nil} - %endif -%else - -# RHEL 5.x/6.x, CHAOS 5.x: -%if %{defined el5} || %{defined el6} || %{defined ch5} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver_kern %((echo X; ((%{__cat} %{klnk}/kernel.release - 2>/dev/null) | %{__grep} -v debug)) | tail -1) - %define kver_dbug %((echo X; ((%{__cat} %{klnk}/kernel.release - 2>/dev/null) | %{__grep} debug)) | tail -1) - %else - %define kver_kern %{kver} - %define kver_dbug %{kver}.debug - %endif - - %define kpkg_kern kernel - %define kpkg_dbug kernel-debug - %define kpkg_dkms dkms - - %define kdevpkg_kern kernel-devel - %define kdevpkg_dbug kernel-debug-devel - %define kdevpkg_dkms dkms - - %define kverpkg_dkms 2.2.0.2 - %if %{defined el6} || %{defined ch5} - %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/.%{_target_cpu}//g') - %define kverpkg_dbug %(echo %{kver_dbug} | %{__sed} -e 's/.%{_target_cpu}//g' | %{__sed} -e 's/.debug//g') - %else - %define kverpkg_kern %{kver_kern} - %define kverpkg_dbug %{kver_dbug} - %endif - - %define koppkg = - - %if %{undefined kdir} - %if %{defined el6} || %{defined ch5} - %define kdir_kern %{_usrsrc}/kernels/%{kver_kern} - %define kdir_dbug %{_usrsrc}/kernels/%{kver_dbug} - %else - %define kdir_kern %{_usrsrc}/kernels/%{kver_kern}-%{_target_cpu} - %define kdir_dbug %{_usrsrc}/kernels/%{kver_dbug}-%{_target_cpu} - %endif - %else - %define kdir_kern %{kdir} - %define kdir_dbug %{kdir}.debug - %endif - - %if %{undefined kobj} - %define kobj_kern %{kdir_kern} - %define kobj_dbug %{kdir_dbug} - %else - %define kobj_kern %{kobj} - %define kobj_dbug %{kobj}.debug - %endif -%else - -# Fedora: -%if %{defined fedora} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver_kern %((echo X; ((%{__cat} %{klnk}/kernel.release - 2>/dev/null) | %{__grep} -v debug)) | tail -1) - %define kver_dbug %((echo X; ((%{__cat} %{klnk}/kernel.release - 2>/dev/null) | %{__grep} debug)) | tail -1) - %else - %define kver_kern %{kver} - %define kver_dbug %{kver}.debug - %endif - - %define kpkg_kern kernel - %define kpkg_dbug kernel-debug - %define kpkg_dkms dkms - - %define kdevpkg_kern kernel-devel - %define kdevpkg_dbug kernel-debug-devel - %define kdevpkg_dkms dkms - - %define kverpkg_dkms 2.2.0.2 - %define kverpkg_kern %(echo %{kver_kern} | %{__sed} -e 's/.%{_target_cpu}//g') - %define kverpkg_dbug %(echo %{kver_dbug} | %{__sed} -e 's/.%{_target_cpu}//g' | %{__sed} -e 's/.debug//g') - - %define koppkg = - - %if %{undefined kdir} - %define kdir_kern %{_usrsrc}/kernels/%{kver_kern} - %define kdir_dbug %{_usrsrc}/kernels/%{kver_dbug} - %else - %define kdir_kern %{kdir} - %define kdir_dbug %{kdir}.debug - %endif - - %if %{undefined kobj} - %define kobj_kern %{kdir_kern} - %define kobj_dbug %{kdir_dbug} - %else - %define kobj_kern %{kobj} - %define kobj_dbug %{kobj}.debug - %endif -%else - -# Unsupported distro: - %if %{undefined kver} - %define kver_kern %(uname -r) - %define kver_dbug %{nil} - %else - %define kver_kern %{kver} - %define kver_dbug %{nil} - %endif - - %define kverpkg_kern %{kver_kern} - %define kverpkg_dbug %{nil} - %define kverpkg_dkms %{nil} - - %if %{undefined kdir} - %define kdir_kern /lib/modules/%{kver_kern}/build - %define kdir_dbug %{nil} - %else - %define kdir_kern %{kdir} - %define kdir_dbug %{nil} - %endif - - %if %{undefined kobj} - %define kobj_kern %{kdir_kern} - %define kobj_dbug %{nil} - %else - %define kobj_kern %{kobj} - %define kobj_dbug %{nil} - %endif - -%endif -%endif -%endif - -# Distro agnostic: -%define name @PACKAGE@-modules -%define version @VERSION@ - -# The kernel version should only be appended to a binary RPM. When -# building a source RPM it must be kernel version agnostic. This means -# the source RPM must never specify a required kernel version, but the -# final RPM should be keyed to the kernel version it was built against. -%if %{defined build_src_rpm} -%define rel_kern @SPL_META_RELEASE@ -%define rel_dbug @SPL_META_RELEASE@ -%define rel_dkms @SPL_META_RELEASE@ -%if %{defined kpkg_kern} -%define req_kern %{kpkg_kern} -%endif -%if %{defined kpkg_dbug} -%define req_dbug %{kpkg_dbug} -%endif -%if %{defined kpkg_dkms} -%define req_dkms %{kpkg_dkms} -%endif -%if %{defined kdevpkg_kern} -%define devreq_kern %{kdevpkg_kern} -%endif -%if %{defined kdevpkg_dbug} -%define devreq_dbug %{kdevpkg_dbug} -%endif -%else -%define relext_kern %(echo %{kverpkg_kern} | %{__sed} -e 's/-/_/g') -%define relext_dbug %(echo %{kverpkg_dbug} | %{__sed} -e 's/-/_/g') -%define rel_kern @SPL_META_RELEASE@_%{relext_kern} -%define rel_dbug @SPL_META_RELEASE@_%{relext_dbug} -%define rel_dkms @SPL_META_RELEASE@ -%if %{defined kpkg_kern} -%define req_kern %{kpkg_kern} %{koppkg} %{kverpkg_kern} -%endif -%if %{defined kpkg_dbug} -%define req_dbug %{kpkg_dbug} %{koppkg} %{kverpkg_dbug} -%endif -%if %{defined kpkg_dkms} -%define req_dkms %{kpkg_dkms} >= %{kverpkg_dkms} -%endif -%if %{defined kdevpkg_kern} -%define devreq_kern %{kdevpkg_kern} %{koppkg} %{kverpkg_kern} -%endif -%if %{defined kdevpkg_dbug} -%define devreq_dbug %{kdevpkg_dbug} %{koppkg} %{kverpkg_dbug} -%endif -%endif - - -Summary: Solaris Porting Layer Modules -Group: Utilities/System -Name: %{name} -Version: %{version} -Release: %{rel_kern} -License: @LICENSE@ -URL: git://github.com/zfsonlinux/spl.git -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) -Source: @PACKAGE@-%{version}.tar.gz - -%if %{?with_kernel} - -%if %{defined req_kern} -Requires: %{req_kern} -%endif -%if %{defined kdevpkg_kern} -BuildRequires: %{kdevpkg_kern} -%endif - -%endif - -%description -The %{name} package contains kernel modules for emulating Solaris style -primatives in the linux kernel. These include, but are not limited to: -atomic, condvar, debug, error, memory, kobject, kstat, mutex, rwlock, -taskq, thread, time, and vnode APIs. - -%if %{?with_kernel} - -%package devel -Summary: Solaris Porting Layer Headers and Symbols -Group: Development/Libraries -Release: %{rel_kern} -%if %{defined devreq_kern} -Requires: %{devreq_kern} -%endif -%if %{defined kdevpkg_kern} -BuildRequires: %{kdevpkg_kern} -%endif - -%description devel -The %{name}-devel package contains the header files and Module{s}.symvers -symbols needed for building additional modules which use %{name}. - -%endif -%if %{?with_kernel_debug} - -%package debug -Summary: Solaris Porting Layer Debug Modules -Group: Utilities/System -Release: %{rel_dbug} -%if %{defined req_dbug} -Requires: %{req_dbug} -%endif -%if %{defined kdevpkg_dbug} -BuildRequires: %{kdevpkg_dbug} -%endif - -%description debug -The %{name}-debug package contains kernel modules for emulating Solaris -style primatives in the linux kernel. These include, but are not limited -to: atomic, condvar, debug, error, memory, kobject, kstat, mutex, -rwlock, taskq, thread, time, and vnode APIs. - -%package debug-devel -Summary: Solaris Porting Layer Debug Headers and Symbols -Group: Development/Libraries -Release: %{rel_dbug} -%if %{defined devreq_dbug} -Requires: %{devreq_dbug} -%endif -%if %{defined kdevpkg_dbug} -BuildRequires: %{kdevpkg_dbug} -%endif - -%description debug-devel -The %{name}-debug-devel package contains the header files and -Module{s}.symvers symbols needed for building additional modules which -use %{name}-debug. - -%endif -%if %{?with_kernel_dkms} - -%package dkms -Summary: Solaris Porting Layer Modules (DKMS) -Group: Utilities/System -Release: %{rel_dkms} -Provides: %{name} -BuildArch: noarch -%if %{defined req_dkms} -Requires: %{req_dkms} -%endif -%if %{defined kdevpkg_dkms} -BuildRequires: %{kdevpkg_dkms} -%endif - -%description dkms -The %{name}-dkms package contains all the necessary pieces to build and -install Solaris Porting Layer (SPL) kernel modules with Dynamic Kernel -Modules Support (DKMS). The SPL modules emulate Solaris style primatives -in the the linux kernel. They include, but are not limited to: atomic, -condvar, debug, error, memory, kobject, kstat, mutex, rwlock, taskq, -thread, time, and vnode APIs. - -%endif - -%prep -%setup -n @PACKAGE@-%{version} -%build -rm -rf $RPM_BUILD_ROOT - -%if %{?with_kernel} - -%configure --with-config=kernel \ - --with-linux=%{kdir_kern} --with-linux-obj=%{kobj_kern} \ - %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking} -make -make DESTDIR=$RPM_BUILD_ROOT install - -%endif -%if %{?with_kernel_debug} - -%configure --with-config=kernel \ - --with-linux=%{kdir_dbug} --with-linux-obj=%{kobj_dbug} \ - %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking} -make -make DESTDIR=$RPM_BUILD_ROOT install - -%endif -%if %{?with_kernel_dkms} - -%configure --with-config=kernel \ - %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking} -make dist -mkdir -p $RPM_BUILD_ROOT/%{_prefix}/src -tar -xf @PACKAGE@-%{version}.tar.gz -C $RPM_BUILD_ROOT/%{_prefix}/src -cp -af dkms.conf $RPM_BUILD_ROOT/%{_prefix}/src/@PACKAGE@-%{version} - -%endif - -%clean -rm -rf $RPM_BUILD_ROOT - -%if %{?with_kernel} - -%files -%defattr(-, root, root) -/lib/modules/%{kver_kern}/* - -%files devel -%defattr(-,root,root) -%{_prefix}/src/*/%{kver_kern} - -%post -if [ -f /boot/System.map-%{kver_kern} ]; then - /sbin/depmod -ae -F /boot/System.map-%{kver_kern} %{kver_kern} || exit 0 -else - /sbin/depmod -a || exit 0 -fi - -%postun -if [ -f /boot/System.map-%{kver_kern} ]; then - /sbin/depmod -ae -F /boot/System.map-%{kver_kern} %{kver_kern} || exit 0 -else - /sbin/depmod -a || exit 0 -fi - -%postun devel -rmdir %{_prefix}/src/@PACKAGE@-%{version}-@SPL_META_RELEASE@ 2>/dev/null -exit 0 - -%endif -%if %{?with_kernel_debug} - -%files debug -%defattr(-, root, root) -/lib/modules/%{kver_dbug}/* - -%files debug-devel -%defattr(-,root,root) -%{_prefix}/src/*/%{kver_dbug} - -%post debug -if [ -f /boot/System.map-%{kver_dbug} ]; then - /sbin/depmod -ae -F /boot/System.map-%{kver_dbug} %{kver_dbug} || exit 0 -else - /sbin/depmod -a || exit 0 -fi - -%postun debug -if [ -f /boot/System.map-%{kver_dbug} ]; then - /sbin/depmod -ae -F /boot/System.map-%{kver_dbug} %{kver_dbug} || exit 0 -else - /sbin/depmod -a || exit 0 -fi - -%postun debug-devel -rmdir %{_prefix}/src/@PACKAGE@-%{version}-@SPL_META_RELEASE@ 2>/dev/null -exit 0 - -%endif -%if %{?with_kernel_dkms} - -%files dkms -%defattr(-,root,root) -%{_prefix}/src/@PACKAGE@-%{version} - -%post dkms -for POSTINST in %{_prefix}/lib/dkms/common.postinst; do - if [ -f $POSTINST ]; then - $POSTINST @PACKAGE@ %{version} - exit $? - fi - echo "WARNING: $POSTINST does not exist." -done -echo -e "ERROR: DKMS version is too old and @PACKAGE@ was not" -echo -e "built with legacy DKMS support." -echo -e "You must either rebuild @PACKAGE@ with legacy postinst" -echo -e "support or upgrade DKMS to a more current version." -exit 1 - -%preun dkms -echo -e -echo -e "Uninstall of @PACKAGE@ module (version %{version}) beginning:" -dkms remove -m @PACKAGE@ -v %{version} --all --rpm_safe_upgrade -exit 0 - -%endif diff --git a/spl.spec.in b/spl.spec.in deleted file mode 100644 index 712c3879d..000000000 --- a/spl.spec.in +++ /dev/null @@ -1,39 +0,0 @@ -%define name @PACKAGE@ -%define version @VERSION@ -%define release @SPL_META_RELEASE@ -%define debug_package %{nil} - -Summary: SPL Utils -Group: Utilities/System -Name: %{name} -Version: %{version} -Release: %{release}%{?dist} -License: @LICENSE@ -URL: git://github.com/zfsonlinux/spl.git -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) -Source: %{name}-%{version}.tar.gz -Requires: spl-modules - -%description -The %{name} package contains the support utilities for the spl. - -%prep -%setup -%build -%configure --with-config=user -make - -%install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-, root, root) -%doc AUTHORS COPYING DISCLAIMER -%{_sbindir}/* - -%post -%postun From 407482090470bfb25d508595116995aad88cd55a Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Fri, 15 Mar 2013 12:25:32 -0700 Subject: [PATCH 0715/1062] Create splat man page The automake templates have been updated to install this man page and the existing packaging was updated to include it. Signed-off-by: Brian Behlendorf --- Makefile.am | 2 +- configure.ac | 2 + man/Makefile.am | 1 + man/man1/Makefile.am | 5 +++ man/man1/splat.1 | 94 +++++++++++++++++++++++++++++++++++++++++ rpm/generic/spl.spec.in | 1 + 6 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 man/Makefile.am create mode 100644 man/man1/Makefile.am create mode 100644 man/man1/splat.1 diff --git a/Makefile.am b/Makefile.am index 3e149cb31..232c30523 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ include $(top_srcdir)/config/tgz.am SUBDIRS = include rpm if CONFIG_USER -SUBDIRS += lib cmd scripts +SUBDIRS += lib cmd man scripts endif if CONFIG_KERNEL SUBDIRS += module diff --git a/configure.ac b/configure.ac index d5951ac3a..f9cd54297 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,8 @@ SPL_AC_CONFIG AC_CONFIG_FILES([ Makefile + man/Makefile + man/man1/Makefile lib/Makefile cmd/Makefile module/Makefile diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 000000000..7dc2a57d1 --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = man1 diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am new file mode 100644 index 000000000..c91f63855 --- /dev/null +++ b/man/man1/Makefile.am @@ -0,0 +1,5 @@ +man_MANS = splat.1 +EXTRA_DIST = $(man_MANS) + +install-data-local: + $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man1" diff --git a/man/man1/splat.1 b/man/man1/splat.1 new file mode 100644 index 000000000..37f8435b0 --- /dev/null +++ b/man/man1/splat.1 @@ -0,0 +1,94 @@ +'\" t +.\" +.\" Copyright 2013 Darik Horn . All rights reserved. +.\" +.TH splat 1 "2013 MAR 16" "ZFS on Linux" "User Commands" + +.SH NAME +splat \- Solaris Porting LAyer Tests +.SH SYNOPSIS +.LP +.BI "splat [\-chvx] < \-\-all | \-\-list | \-\-test " "subsystem" ":" "test" " [...] >" + +.SH DESCRIPTION +This utility uses the splat.ko kernel module to test the spl.ko kernel +module. Run "modprobe splat" before invoking \fBsplat\fR. + +.SH OPTIONS +.HP +.BI "\-a" "" ", \-\-all" "" +.IP +Run all available tests on all subsystems. +.HP +.BI "\-c" "" ", \-\-nocolor" "" +.IP +Disable output highlighting. By default, "Fail" is printed in red text +and "Pass" is printed in green text. +.HP +.BI "\-h" "" ", \-\-help" "" +.IP +Print the usage message. +.HP +.BI "\-l" "" ", \-\-list" "" +.IP +For each spl.ko subsystem, print all available test names and +hexidecimal identifiers with a short description. +.HP +.BI "\-t" " subsystem" ":" "test" ", \-\-test" " subsystem" ":" "test" +.HP +.BI "\-t" " subsystem" ":all" "" ", \-\-test" " subsystem" ":all" "" +.IP +Run the \fItest\fR diagnostic routine for the spl.ko \fIsubsystem\fR. +Specify this option more than once to run multiple tests. + +The \fItest\fR and \fIsubsystem\fR parameters are the names or +hexidecimal identifiers returned by the \fBsplat --list\fR command. + +If \fIsubsystem\fR is a name and not a hexidecimal identifier, then the +\fBall\fR keyword can be used to run all available \fIsubsystem\fR +tests. + +.HP +.BI "\-v" "" ", \-\-verbose" "" +.HP +.IP +Increase verbosity. +.HP +.BI "\-x" "" ", \-\-exit" "" +.IP +Stop running tests after the first failure. + +.SH "EXAMPLES" +.LP +Test everything in the spl.ko kernel module: +.IP +# splat --all --verbose +.LP +Test the entire kernel memory subsystem: +.IP +# splat --test kmem:all +.LP +Test the kernel compression and queue waiting facilities: +.IP +# splat --test zlib:compress/uncompress --test taskq:wait +.LP +This is the same as the previous command, except that the subsystems +and tests are referenced by hexidecimal identifier instead of by name: +.IP +# splat -t 0x0f00:0x0f01 -t 0x0200:0x0204 + +.SH "NOTES" +All tests always return a green "Pass" result on a healthy system. Any +red "Fail" result should be investigated or reported. + +.SH "BUGS" +Some tests can deadlock the kernel if an X11 desktop is running, +especially if a proprietary blob driver is loaded for the video +hardware. + +.SH "AUTHORS" +This man page was written by Darik Horn . + +.SH "SEE ALSO" +.BR zpios (1), +.BR ztest (1) diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 4b8cf0756..b44d85297 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -34,6 +34,7 @@ make install DESTDIR=%{?buildroot} %files %doc AUTHORS COPYING DISCLAIMER %{_sbindir}/* +%{_mandir}/man1/* %changelog * Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 From 19e9d8fd618e7cc6385911b5cf329d2f00c2b638 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 Mar 2013 11:33:15 -0700 Subject: [PATCH 0716/1062] Remove spl-dkms conflict with spl-kmod Because the spl-dkms package also provides spl-kmod for the spl user package yum flags this as a conflict. To avoid the problem remove the Conflicts tag from spl-dkms and just rely on the one in spl-kmod. spl-dkms-0.6.0-rc14.fc18.noarch has installed conflicts spl-kmod: spl-dkms-0.6.0-rc14.fc18.noarch Signed-off-by: Brian Behlendorf --- rpm/generic/spl-dkms.spec.in | 1 - 1 file changed, 1 deletion(-) diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index d395bf07a..a57441bb5 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -16,7 +16,6 @@ BuildArch: noarch Requires: dkms >= 2.2.0.2 Provides: %{module}-kmod = %{version} -Conflicts: %{module}-kmod %description This package contains the dkms kernel modules required to emulate From bef14fbc8c29fb07a34fc3ac7f70ef8c2f8d1c0e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 20 Mar 2013 15:11:24 -0700 Subject: [PATCH 0717/1062] Use requested kernel for dkms builds The --with-linux and --with-linux-obj options must be specified as part of the dkms build otherwise the package will be built against the running kernel. Signed-off-by: Brian Behlendorf --- scripts/dkms.mkconf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf index 3bfe2be7b..f9cf69692 100755 --- a/scripts/dkms.mkconf +++ b/scripts/dkms.mkconf @@ -25,6 +25,8 @@ PACKAGE_CONFIG="${pkgcfg}" PRE_BUILD="configure --prefix=/usr --with-config=kernel + --with-linux=\${kernel_source_dir} + --with-linux-obj=\${kernel_source_dir} \$( [[ -r \${PACKAGE_CONFIG} ]] \\ && source \${PACKAGE_CONFIG} \\ From feaf1e321da97ab0aaa60edc121fb6aa2d03952d Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 21 Mar 2013 13:21:11 -0400 Subject: [PATCH 0718/1062] Do not call cond_resched() in spl_slab_reclaim() Calling cond_resched() after each object is freed and then after each slab is freed can cause slabs of objects to live for excessive periods of time following reclaimation. This interferes with the kernel's own memory management when called from kswapd and can cause direct reclaim to occur in response to memory pressure that should have been resolved. Signed-off-by: Richard Yao --- module/spl/spl-kmem.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f9c111491..a0ca2d2be 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1112,14 +1112,11 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) if (skc->skc_flags & KMC_OFFSLAB) kv_free(skc, sko->sko_addr, size); - - cond_resched(); } list_for_each_entry_safe(sks, m, &sks_list, sks_list) { ASSERT(sks->sks_magic == SKS_MAGIC); kv_free(skc, sks, skc->skc_slab_size); - cond_resched(); } SEXIT; From c14183adcabd020b72c29f224f94bd90f9cead12 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 Mar 2013 11:27:20 -0700 Subject: [PATCH 0719/1062] Use 'git describe' for working builds When building from an arbitrary commit in the git tree it's useful for the resulting packages to be uniquely identifiable. Therefore, the build system has been updated to detect if your compiling in git tree. If you are building in a git tree, and there are commits after the last annotated tag. Then the - component of 'git describe' will be used to overwrite the 'Release:' field in the META file. The only tricky part is that to ensure the 'make dist' tarball is built using the correct release. A dist-hook was added to the top level make file to rewrite the META file using the correct release. Signed-off-by: Brian Behlendorf Closes #195 Issue #111 --- Makefile.am | 4 ++++ config/spl-meta.m4 | 22 ++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 232c30523..cea9db97b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,6 +32,10 @@ distclean-local:: -o -name '*.order' -o -name '*.markers' \) \ -type f -print | xargs $(RM) +dist-hook: + sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ + $(distdir)/META + ctags: $(RM) $(top_srcdir)/tags find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index af8be801a..28103bc10 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -2,16 +2,20 @@ # Written by Chris Dunlap . # Modified by Brian Behlendorf . ############################################################################### -# SPL_AC_META: Read metadata from the META file. +# SPL_AC_META: Read metadata from the META file. When building from a +# git repository the SPL_META_RELEASE field will be overwritten if there +# is an annotated tag matching the form SPL_META_NAME-SPL_META_VERSION-*. +# This allows for working builds to be uniquely identified using the git +# commit hash. ############################################################################### AC_DEFUN([SPL_AC_META], [ AC_MSG_CHECKING([metadata]) META="$srcdir/META" - _spl_ac_meta_got_file=no + _spl_ac_meta_type="none" if test -f "$META"; then - _spl_ac_meta_got_file=yes + _spl_ac_meta_type="META file" SPL_META_NAME=_SPL_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]); if test -n "$SPL_META_NAME"; then @@ -30,6 +34,16 @@ AC_DEFUN([SPL_AC_META], [ fi SPL_META_RELEASE=_SPL_AC_META_GETVAL([RELEASE]); + if git rev-parse --git-dir > /dev/null 2>&1; then + _match="${SPL_META_NAME}-${SPL_META_VERSION}*" + _alias=$(git describe --match=${_match} 2>/dev/null) + _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') + if test -n "${_release}"; then + SPL_META_RELEASE=${_release} + _spl_ac_meta_type="git describe" + fi + fi + if test -n "$SPL_META_RELEASE"; then AC_DEFINE_UNQUOTED([SPL_META_RELEASE], ["$SPL_META_RELEASE"], [Define the project release.] @@ -97,7 +111,7 @@ AC_DEFUN([SPL_AC_META], [ fi fi - AC_MSG_RESULT([$_spl_ac_meta_got_file]) + AC_MSG_RESULT([$_spl_ac_meta_type]) ] ) From 8636968f9a24e4a1cce1753ca68631a0ae2ced71 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 25 Mar 2013 11:18:11 -0700 Subject: [PATCH 0720/1062] Provide ${kmodname}-devel-kmod for yum-builddep In order to ensure that yum-builddep pulls in all the build requirements a generic ${kmodname}-devel-kmod provides line is added. This allows a version of the development headers to be included without requiring knowledge of the kernel version. This is important because unlike rpmbuild which does correctly expand the source rpm spec file, yum-builddep does not. Without this generic provides line mock which relies on yum-builddep is unable to automatically satisfy the dependency. Signed-off-by: Brian Behlendorf --- scripts/kmodtool | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/kmodtool b/scripts/kmodtool index 2170c4a90..2fe014c7f 100755 --- a/scripts/kmodtool +++ b/scripts/kmodtool @@ -243,7 +243,8 @@ print_rpmtemplate_per_kmoddevelpkg () Summary: ${kmodname} kernel module(s) devel for ${kernel_uname_r} Group: System Environment/Kernel Requires: ${kmodname}-devel-kmod-common = %{?epoch:%{epoch}:}%{version}-%{release} -Provides: kmod-${kmodname}-devel-uname-r = ${kernel_uname_r} +Provides: ${kmodname}-devel-kmod = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: ${kmodname}-devel-kmod-uname-r = ${kernel_uname_r} EOF # second part From 6385874dbfe0478a5f3d70c5e5983e800b038d49 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 25 Mar 2013 13:46:47 -0700 Subject: [PATCH 0721/1062] Tag spl-0.6.1 META file and release log updated. Signed-off-by: Brian Behlendorf --- META | 4 ++-- rpm/fedora/spl-kmod.spec.in | 4 ++-- rpm/generic/spl-dkms.spec.in | 5 ++--- rpm/generic/spl-kmod.spec.in | 4 ++-- rpm/generic/spl.spec.in | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/META b/META index 12384a0fe..4e64a99a7 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.6.0 -Release: rc14 +Version: 0.6.1 +Release: 1 Release-Tags: relext diff --git a/rpm/fedora/spl-kmod.spec.in b/rpm/fedora/spl-kmod.spec.in index 30121591c..f83ff60c1 100644 --- a/rpm/fedora/spl-kmod.spec.in +++ b/rpm/fedora/spl-kmod.spec.in @@ -134,5 +134,5 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog -* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 -- Initial kmods2 packaging. +* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 +- First official stable release. diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index a57441bb5..148d612ed 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -62,6 +62,5 @@ dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade exit 0 %changelog -* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 -- Initial dkms packaging. - +* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 +- First official stable release. diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index dc23548a0..224660be0 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -144,5 +144,5 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog -* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 -- Initial kmods2 packaging. +* Tue Mar 22 2013 Brian Behlendorf - 0.6.1-1 +- First official stable release. diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index b44d85297..3db301516 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -37,5 +37,5 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man1/* %changelog -* Tue Mar 12 2013 Brian Behlendorf - 0.6.0-1 -- Refreshed RPM packaging. +* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 +- First official stable release. From 7a8a639390c290a9351943b42216bea64d92e77d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 30 Mar 2013 03:27:50 +0100 Subject: [PATCH 0722/1062] build: resolve orthographic and other grammatical errors Signed-off-by: Jan Engelhardt Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 233eea004..8a8e3ba28 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -105,7 +105,7 @@ AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then AC_MSG_ERROR([ *** Please make sure the kernel devel package for your distribution - *** is installed. If your building with a custom kernel make sure the + *** is installed. If you are building with a custom kernel, make sure the *** kernel is configured, built, and the '--with-linux=PATH' configure *** option refers to the location of the kernel source.]) fi @@ -156,7 +156,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ if test ! -d "$kernelsrc"; then AC_MSG_ERROR([ *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the + *** is installed and then try again. If that fails, you can specify the *** location of the kernel source with the '--with-linux=PATH' option.]) fi @@ -229,10 +229,10 @@ AC_DEFUN([SPL_AC_CONFIG_USER], []) dnl # dnl # Check for rpm+rpmbuild to build RPM packages. If these tools -dnl # are missing it is non-fatal but you will not be able to build +dnl # are missing, it is non-fatal, but you will not be able to build dnl # RPM packages and will be warned if you try too. dnl # -dnl # By default the generic spec file will be used because it requires +dnl # By default, the generic spec file will be used because it requires dnl # minimal dependencies. Distribution specific spec files can be dnl # placed under the 'rpm/' directory and enabled using dnl # the --with-spec= configure option. From 92c4ea38c9bd4dc619e4e82bb15c30618878793a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 30 Mar 2013 03:30:25 +0100 Subject: [PATCH 0723/1062] build: use CPPFLAGS -D and -I are preprocessor flags, so should preferably be in the appropriate variable. Signed-off-by: Jan Engelhardt Signed-off-by: Brian Behlendorf --- config/Rules.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/Rules.am b/config/Rules.am index 0b41ec460..7c5d3283f 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -9,5 +9,6 @@ DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h AM_LIBTOOLFLAGS = --silent +AM_CPPFLAGS = -D__USE_LARGEFILE64 AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing -AM_CFLAGS += -D__USE_LARGEFILE64 ${DEBUG_CFLAGS} +AM_CFLAGS += ${DEBUG_CFLAGS} From a9e86ac4fd080328742a52362110c1d344fb2799 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 30 Mar 2013 03:31:52 +0100 Subject: [PATCH 0724/1062] gitignore: anchor entries at their respective directory .ko is specific to module, .m4 to config, etc. Signed-off-by: Jan Engelhardt Signed-off-by: Brian Behlendorf --- .gitignore | 7 ------- config/.gitignore | 12 ++++++------ module/.gitignore | 8 ++++++++ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 27069f5c7..4e0a2db93 100644 --- a/.gitignore +++ b/.gitignore @@ -14,20 +14,13 @@ # Normal rules # *.[oa] -*.ko -*.ko.unsigned -*.ko.out -*.ko.out.sig *.lo *.la -*.mod.c *~ *.swp -.*.cmd .deps .libs .DS_Store -modules.order Makefile Makefile.in diff --git a/config/.gitignore b/config/.gitignore index df81091c1..dcd88d7c6 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -1,6 +1,6 @@ -config.guess -config.sub -depcomp -install-sh -ltmain.sh -missing +/config.guess +/config.sub +/depcomp +/install-sh +/ltmain.sh +/missing diff --git a/module/.gitignore b/module/.gitignore index 611c51c42..95e2d8cbd 100644 --- a/module/.gitignore +++ b/module/.gitignore @@ -1,3 +1,11 @@ +*.ko +*.ko.unsigned +*.ko.out +*.ko.out.sig +*.mod.c +.*.cmd +modules.order + /.tmp_versions /Module.markers /Module.symvers From 83918aebe5547370b6d377aa2d17f378c44054b7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 30 Mar 2013 03:33:09 +0100 Subject: [PATCH 0725/1062] build: do not call boilerplate ourself Rationale see section 3.5 "Using `autoreconf' to Update `configure' Scripts" of the autoconf manual. Signed-off-by: Jan Engelhardt Signed-off-by: Brian Behlendorf --- Makefile.am | 3 +++ autogen.sh | 7 ++----- config/.gitignore | 2 ++ configure.ac | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index cea9db97b..23dc2572a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ + +ACLOCAL_AMFLAGS = -I config + include $(top_srcdir)/config/rpm.am include $(top_srcdir)/config/deb.am include $(top_srcdir)/config/tgz.am diff --git a/autogen.sh b/autogen.sh index 343265c83..427394af4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,4 @@ #!/bin/sh -aclocal -I config -libtoolize --automake --copy -autoheader -automake --add-missing --include-deps --copy -autoconf +autoreconf -fiv +rm -Rf autom4te.cache diff --git a/config/.gitignore b/config/.gitignore index dcd88d7c6..12e6ecab1 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -4,3 +4,5 @@ /install-sh /ltmain.sh /missing +/libtool.m4 +/lt*.m4 diff --git a/configure.ac b/configure.ac index f9cd54297..76184b431 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,7 @@ AC_INIT AC_LANG(C) SPL_AC_META AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_MACRO_DIR([config]) AC_CANONICAL_SYSTEM AM_MAINTAINER_MODE AM_SILENT_RULES From c76b1dab8d24a833f0867b69e6c8576a1b6b28e4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 2 Apr 2013 15:09:29 -0700 Subject: [PATCH 0726/1062] Automake 1.10.1 compat: AM_SILENT_RULES Part of the automated testing involves building the source on Debian Lenny which ships an ancient version of automake (1.10.1). Historically, this has caused a non-fatal warning about AM_SILENT_RULES not being defined. But when the autogen.sh script was updated to use autoreconf the warning became fatal. configure.ac:31: warning: macro `AM_SILENT_RULES' not found in library autoreconf: running: /usr/bin/autoconf --force configure.ac:34: error: possibly undefined macro: AM_SILENT_RULES If this token and others are legitimate, please use m4_pattern_allow. To resolve this build issue the call to AM_SILENT_RULES has been wrapped by m4_ifdef(). This prevents the macro from being expanded on platforms where it's undefined. Signed-off-by: Brian Behlendorf --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 76184b431..477229829 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([config]) AC_CANONICAL_SYSTEM AM_MAINTAINER_MODE -AM_SILENT_RULES +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) AC_CONFIG_HEADERS([spl_config.h], [ (mv spl_config.h spl_config.h.tmp && From 7fd629d4304d1335963e61802c38c9ab3856c171 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 2 Apr 2013 14:05:23 -0700 Subject: [PATCH 0727/1062] Replace the SPL_AC_META perl dependency with awk The only remaining perl dependency is part of the SPL_AC_META macro. By eliminating this and replacing it with awk we can avoid the need to pull in perl to rebuild the packages. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#1380 --- config/spl-meta.m4 | 85 ++++++++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 30 deletions(-) diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index 28103bc10..ccda74d87 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -1,15 +1,37 @@ -############################################################################### -# Written by Chris Dunlap . -# Modified by Brian Behlendorf . -############################################################################### -# SPL_AC_META: Read metadata from the META file. When building from a -# git repository the SPL_META_RELEASE field will be overwritten if there -# is an annotated tag matching the form SPL_META_NAME-SPL_META_VERSION-*. -# This allows for working builds to be uniquely identified using the git -# commit hash. -############################################################################### - +dnl # +dnl # DESCRIPTION: +dnl # Read meta data from the META file. When building from a git repository +dnl # the SPL_META_RELEASE field will be overwritten if there is an annotated +dnl # tag matching the form SPL_META_NAME-SPL_META_VERSION-*. This allows +dnl # for working builds to be uniquely identified using the git commit hash. +dnl # +dnl # The META file format is as follows: +dnl # ^[ ]*KEY:[ \t]+VALUE$ +dnl # +dnl # In other words: +dnl # - KEY is separated from VALUE by a colon and one or more spaces/tabs. +dnl # - KEY and VALUE are case sensitive. +dnl # - Leading spaces are ignored. +dnl # - First match wins for duplicate keys. +dnl # +dnl # A line can be commented out by preceding it with a '#' (or technically +dnl # any non-space character since that will prevent the regex from +dnl # matching). +dnl # +dnl # WARNING: +dnl # Placing a colon followed by a space or tab (ie, ":[ \t]+") within the +dnl # VALUE will prematurely terminate the string since that sequence is +dnl # used as the awk field separator. +dnl # +dnl # KEYS: +dnl # The following META keys are recognized: +dnl # Name, Version, Release, Date, Author, LT_Current, LT_Revision, LT_Age +dnl # +dnl # Written by Chris Dunlap . +dnl # Modified by Brian Behlendorf . +dnl # AC_DEFUN([SPL_AC_META], [ + AC_PROG_AWK AC_MSG_CHECKING([metadata]) META="$srcdir/META" @@ -17,7 +39,7 @@ AC_DEFUN([SPL_AC_META], [ if test -f "$META"; then _spl_ac_meta_type="META file" - SPL_META_NAME=_SPL_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]); + SPL_META_NAME=_SPL_AC_META_GETVAL([(Name|Project|Package)]); if test -n "$SPL_META_NAME"; then AC_DEFINE_UNQUOTED([SPL_META_NAME], ["$SPL_META_NAME"], [Define the project name.] @@ -25,7 +47,7 @@ AC_DEFUN([SPL_AC_META], [ AC_SUBST([SPL_META_NAME]) fi - SPL_META_VERSION=_SPL_AC_META_GETVAL([VERSION]); + SPL_META_VERSION=_SPL_AC_META_GETVAL([Version]); if test -n "$SPL_META_VERSION"; then AC_DEFINE_UNQUOTED([SPL_META_VERSION], ["$SPL_META_VERSION"], [Define the project version.] @@ -33,7 +55,7 @@ AC_DEFUN([SPL_AC_META], [ AC_SUBST([SPL_META_VERSION]) fi - SPL_META_RELEASE=_SPL_AC_META_GETVAL([RELEASE]); + SPL_META_RELEASE=_SPL_AC_META_GETVAL([Release]); if git rev-parse --git-dir > /dev/null 2>&1; then _match="${SPL_META_NAME}-${SPL_META_VERSION}*" _alias=$(git describe --match=${_match} 2>/dev/null) @@ -65,7 +87,7 @@ AC_DEFUN([SPL_AC_META], [ AC_SUBST([SPL_META_ALIAS]) fi - SPL_META_DATA=_SPL_AC_META_GETVAL([DATE]); + SPL_META_DATA=_SPL_AC_META_GETVAL([Date]); if test -n "$SPL_META_DATA"; then AC_DEFINE_UNQUOTED([SPL_META_DATA], ["$SPL_META_DATA"], [Define the project release date.] @@ -73,7 +95,7 @@ AC_DEFUN([SPL_AC_META], [ AC_SUBST([SPL_META_DATA]) fi - SPL_META_AUTHOR=_SPL_AC_META_GETVAL([AUTHOR]); + SPL_META_AUTHOR=_SPL_AC_META_GETVAL([Author]); if test -n "$SPL_META_AUTHOR"; then AC_DEFINE_UNQUOTED([SPL_META_AUTHOR], ["$SPL_META_AUTHOR"], [Define the project author.] @@ -82,9 +104,9 @@ AC_DEFUN([SPL_AC_META], [ fi m4_pattern_allow([^LT_(CURRENT|REVISION|AGE)$]) - SPL_META_LT_CURRENT=_SPL_AC_META_GETVAL([LT_CURRENT]); - SPL_META_LT_REVISION=_SPL_AC_META_GETVAL([LT_REVISION]); - SPL_META_LT_AGE=_SPL_AC_META_GETVAL([LT_AGE]); + SPL_META_LT_CURRENT=_SPL_AC_META_GETVAL([LT_Current]); + SPL_META_LT_REVISION=_SPL_AC_META_GETVAL([LT_Revision]); + SPL_META_LT_AGE=_SPL_AC_META_GETVAL([LT_Age]); if test -n "$SPL_META_LT_CURRENT" \ -o -n "$SPL_META_LT_REVISION" \ -o -n "$SPL_META_LT_AGE"; then @@ -115,15 +137,18 @@ AC_DEFUN([SPL_AC_META], [ ] ) -AC_DEFUN([_SPL_AC_META_GETVAL], - [`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key@<:@:=@:>@//i;"\ - -e "s/^((?:@<:@^'\"#@:>@*(?:(@<:@'\"@:>@)@<:@^\2@:>@*\2)*)*)#.*/\\@S|@1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(@<:@'\"@:>@)(.*)\1/\\@S|@2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - '$1' $META`]dnl +dnl # _SPL_AC_META_GETVAL (KEY_NAME_OR_REGEX) +dnl # +dnl # Returns the META VALUE associated with the given KEY_NAME_OR_REGEX expr. +dnl # +dnl # Despite their resemblance to line noise, +dnl # the "@<:@" and "@:>@" constructs are quadrigraphs for "[" and "]". +dnl # +dnl # +dnl # The "$[]1" and "$[]2" constructs prevent M4 parameter expansion +dnl # so a literal $1 and $2 will be passed to the resulting awk script, +dnl # whereas the "$1" will undergo M4 parameter expansion for the META key. +dnl # +AC_DEFUN([_SPL_AC_META_GETVAL], + [`$AWK -F ':@<:@ \t@:>@+' '$[]1 ~ /^ *$1$/ { print $[]2; exit }' $META`]dnl ) From 352bd194827fc0b6425bf701b095969f9fb80b4f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 2 Apr 2013 13:56:28 -0700 Subject: [PATCH 0728/1062] Add additional dependencies for DKMS package For the DKMS package to successfully build the kernel-devel headers must be included along gcc, make, and perl. The SPL code never directly invokes perl but the kernel build system depends on it. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#1380 --- rpm/generic/spl-dkms.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index 148d612ed..dbf47233c 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -15,6 +15,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: dkms >= 2.2.0.2 +Requires: gcc, make, perl +Requires: kernel-devel Provides: %{module}-kmod = %{version} %description From c1b20ce32084fa946f446400a66c4b606d7649d7 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Sun, 21 Apr 2013 19:54:29 +0100 Subject: [PATCH 0729/1062] Fix various generic kmod RPM spec issues. There are a number of issues with the generic kmod RPM spec in its current state: - The "%{__id_u}" macro seems to not be available on some systems (e.g. Debian squeeze). It appears it has been deprecated. Use "${__id} -u" instead. - The way the "--with-linux=" configure option is generated in the non-RHEL/Fedora case is completely wrong with various newline and escaping issues (also, $kernel_version is not available in the generator context). The second issue made the generator shell snippet (almost) silently fail, which under specific circumstances can result in broken builds against the wrong kernel sources. Signed-off-by: Brian Behlendorf Closes #231 --- rpm/generic/spl-kmod.spec.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 224660be0..01918699a 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -18,7 +18,7 @@ License: GPLv2+ URL: http://zfsonlinux.org/ Source0: %{module}-%{version}.tar.gz Source10: kmodtool -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n) # The developments headers will conflict with the dkms packages. Conflicts: %{module}-dkms @@ -106,12 +106,12 @@ for kernel_version in %{?kernel_versions}; do --with-linux="${kernel_version##*___}" \ --with-linux-obj="${kernel_version##*___}" \ %else - --with-linux=\ - %(if [ -e /lib/modules/${kernel_version%%___*}/source ]; then \ - echo "/lib/modules/${kernel_version%%___*}/source" \ + --with-linux="$( \ + if [ -e "/lib/modules/${kernel_version%%___*}/source" ]; then \ + echo "/lib/modules/${kernel_version%%___*}/source"; \ else \ - echo "/lib/modules/${kernel_version%%___*}/build" \ - fi) \ + echo "/lib/modules/${kernel_version%%___*}/build"; \ + fi)" \ --with-linux-obj="/lib/modules/${kernel_version%%___*}/build" \ %endif %{debug} \ From 2c213707465e8e904064f97ead08a23ed51b79b9 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Tue, 23 Apr 2013 15:35:37 -0700 Subject: [PATCH 0730/1062] Support .nogitrelease file When building a custom release in a git tree provide the ability to prevent the release field from being overwritten by the `git describe` output. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#1402 --- config/spl-meta.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index ccda74d87..a51fa797e 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -56,7 +56,7 @@ AC_DEFUN([SPL_AC_META], [ fi SPL_META_RELEASE=_SPL_AC_META_GETVAL([Release]); - if git rev-parse --git-dir > /dev/null 2>&1; then + if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then _match="${SPL_META_NAME}-${SPL_META_VERSION}*" _alias=$(git describe --match=${_match} 2>/dev/null) _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') From 16253cff43bf4865be01fb6f0b03cc7eeb1ece1b Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Tue, 23 Apr 2013 16:45:45 -0700 Subject: [PATCH 0731/1062] Add --bump=0 to alien Preserve the release field when creating Debian packages. The --keep-version option was not used because it results in a failure when the git '_' syntax is used for the release. The '_' is a valid character for RPM packages but not for DEBs. Signed-off-by: Brian Behlendorf Signed-off-by: Turbo Fredriksson Issue zfsonlinux/zfs#1402 Issue zfsonlinux/zfs#928 --- config/deb.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/deb.am b/config/deb.am index 5efbd9d36..a2bad0260 100644 --- a/config/deb.am +++ b/config/deb.am @@ -34,7 +34,7 @@ if CONFIG_KERNEL version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 endif @@ -44,7 +44,7 @@ if CONFIG_USER version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 endif From 8bbda8df3ea618cd994d477d6d5c0e0acec80089 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Tue, 23 Apr 2013 16:49:06 -0700 Subject: [PATCH 0732/1062] Ignore *.{deb,rpm,tar.gz} files in the top directory. These are build products and should be ignored. Signed-off-by: Brian Behlendorf Signed-off-by: Turbo Fredriksson Issue zfsonlinux/zfs#1402 --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 4e0a2db93..a44e4323c 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,6 @@ Makefile.in tags TAGS cscope.* +*.rpm +*.deb +*.tar.gz From f6437b60c2b2bf514a0c2e82f51fde5803b57b93 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Apr 2013 09:46:33 -0700 Subject: [PATCH 0733/1062] Add msec/usec/nsec to tick convertors Add wrappers for the Solaris MSEC_TO_TICK, USEC_TO_TICK, and NSEC_TO_TICK conversion functions. They are mapped directly to their Linux counterparts with the exception of NSEC_TO_TICK can cannot use usecs_to_jiffies() because it is not exported by the kernel. Signed-off-by: Brian Behlendorf --- include/sys/timer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sys/timer.h b/include/sys/timer.h index 096eb1a4e..13ef40452 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -37,5 +37,10 @@ #define delay(ticks) schedule_timeout((long)(ticks)) +#define SEC_TO_TICK(sec) ((sec) * HZ) +#define MSEC_TO_TICK(ms) msecs_to_jiffies(ms) +#define USEC_TO_TICK(us) usecs_to_jiffies(us) +#define NSEC_TO_TICK(ns) usecs_to_jiffies(ns / NSEC_PER_USEC) + #endif /* _SPL_TIMER_H */ From ab59be7bc752481db64df07c821e2ae6bf2ae71b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 May 2013 16:20:28 -0700 Subject: [PATCH 0734/1062] Fix delay() Somewhat amazingly it went unnoticed that the delay() function doesn't actually cause the task to block. Since the task state is never changed from TASK_RUNNING before schedule_timeout() the scheduler allows to task to continue running without any delay. Using schedule_timeout_interruptible() resolves the issue by correctly setting TASK_UNINTERRUPTIBLE. Signed-off-by: Brian Behlendorf --- include/sys/timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/timer.h b/include/sys/timer.h index 13ef40452..2542510dd 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -35,7 +35,7 @@ #define ddi_get_lbolt() ((clock_t)jiffies) #define ddi_get_lbolt64() ((int64_t)get_jiffies_64()) -#define delay(ticks) schedule_timeout((long)(ticks)) +#define delay(ticks) schedule_timeout_uninterruptible(ticks) #define SEC_TO_TICK(sec) ((sec) * HZ) #define MSEC_TO_TICK(ms) msecs_to_jiffies(ms) From 99c452bbbaeaa8fae498da1774d81e146bdd45ed Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Apr 2013 13:47:59 -0700 Subject: [PATCH 0735/1062] Fix taskq_wait_id() The existing taskq_wait_id() function can incorrectly block indefinitely. Reimplement it more simply using wait_event() in a similar fashion to taskq_wait_all(). This flaw was uncovered in the context of moving vn_rdwr() to a taskq. Previously taskq_wait_id() had no consumers outside the SPLAT task framework which is why the issue went unnoticed. Signed-off-by: Brian Behlendorf --- module/spl/spl-taskq.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 4feca0452..bcdc98f97 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -342,39 +342,27 @@ taskq_find(taskq_t *tq, taskqid_t id, int *active) SRETURN(NULL); } +static int +taskq_wait_id_check(taskq_t *tq, taskqid_t id) +{ + int active = 0; + int rc; + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + rc = (taskq_find(tq, id, &active) == NULL); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + return (rc); +} + /* * The taskq_wait_id() function blocks until the passed task id completes. - * This does not guarantee that all lower task id's have completed. + * This does not guarantee that all lower task ids have completed. */ void taskq_wait_id(taskq_t *tq, taskqid_t id) { - DEFINE_WAIT(wait); - taskq_ent_t *t; - int active = 0; - SENTRY; - - ASSERT(tq); - ASSERT(id > 0); - - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - t = taskq_find(tq, id, &active); - if (t) - prepare_to_wait(&t->tqent_waitq, &wait, TASK_UNINTERRUPTIBLE); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - /* - * We rely on the kernels autoremove_wake_function() function to - * remove us from the wait queue in the context of wake_up(). - * Once woken the taskq_ent_t pointer must never be accessed. - */ - if (t) { - t = NULL; - schedule(); - __set_current_state(TASK_RUNNING); - } - - SEXIT; + wait_event(tq->tq_wait_waitq, taskq_wait_id_check(tq, id)); } EXPORT_SYMBOL(taskq_wait_id); From 5c7a0369e225d306e53bd8011c58fa0f5e827865 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Thu, 30 May 2013 21:52:36 -0500 Subject: [PATCH 0736/1062] Fix --enable-debug-kmem-tracking option Re-order initialization in spl_kmem_init to allow for kmem tracing to work. The spl_kmem_init function calls taskq_create prior to initializing the tracking (calling spl_kmem_init_tracking). Since taskq_create uses kmem_alloc, NULL dereferences occur because the global kmem_list hasn't had its next & prev pointers initialized yet. This commit moves the calls to spl_kmem_init_tracking earlier in the spl_kmem_init function in order that the subsequent kmem_alloc calls (by taskq_create) work properly. Signed-off-by: Brian Behlendorf Closes #243 --- module/spl/spl-kmem.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index a0ca2d2be..f64c0441d 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2418,13 +2418,6 @@ spl_kmem_init(void) int rc = 0; SENTRY; - init_rwsem(&spl_kmem_cache_sem); - INIT_LIST_HEAD(&spl_kmem_cache_list); - spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", - 1, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); - - spl_register_shrinker(&spl_kmem_cache_shrinker); - #ifdef DEBUG_KMEM kmem_alloc_used_set(0); vmem_alloc_used_set(0); @@ -2432,6 +2425,14 @@ spl_kmem_init(void) spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); #endif + + init_rwsem(&spl_kmem_cache_sem); + INIT_LIST_HEAD(&spl_kmem_cache_list); + spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", + 1, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); + + spl_register_shrinker(&spl_kmem_cache_shrinker); + SRETURN(rc); } From 1c6d149feb4033e4a56fb987004edc5d45288bcb Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 10 May 2013 14:27:30 -0700 Subject: [PATCH 0737/1062] Add ASSERT0 and VERIFY0 macros The Illumos code introduced the ASSERT0 and VERIFY0 macros which are to be used instead of ASSERT3S(x, ==, 0) and VERIFY3S(x, ==, 0). Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Signed-off-by: Madhav Suresh Closes #246 --- include/sys/debug.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sys/debug.h b/include/sys/debug.h index 25ff88e3a..ac716c9a0 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -35,10 +35,12 @@ * ASSERT3S() - Assert signed X OP Y is true, if not panic. * ASSERT3U() - Assert unsigned X OP Y is true, if not panic. * ASSERT3P() - Assert pointer X OP Y is true, if not panic. + * ASSERT0() - Assert value is zero, if not panic. * VERIFY() - Verify X is true, if not panic. * VERIFY3S() - Verify signed X OP Y is true, if not panic. * VERIFY3U() - Verify unsigned X OP Y is true, if not panic. * VERIFY3P() - Verify pointer X OP Y is true, if not panic. + * VERIFY0() - Verify value is zero, if not panic. */ #ifndef _SPL_DEBUG_H @@ -79,10 +81,12 @@ do { \ #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) +#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (uint64_t)) #define ASSERT3S(x,y,z) ((void)0) #define ASSERT3U(x,y,z) ((void)0) #define ASSERT3P(x,y,z) ((void)0) +#define ASSERT0(x) ((void)0) #else /* Debugging Enabled */ @@ -130,10 +134,12 @@ do { \ #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) +#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (uint64_t)) #define ASSERT3S(x,y,z) VERIFY3S(x, y, z) #define ASSERT3U(x,y,z) VERIFY3U(x, y, z) #define ASSERT3P(x,y,z) VERIFY3P(x, y, z) +#define ASSERT0(x) VERIFY0(x) #define ASSERTV(x) x #define VERIFY(x) ASSERT(x) From ab0fdfef52b4770f8039c0871ff514e079a09a4c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 21 Jun 2013 10:02:26 -0700 Subject: [PATCH 0738/1062] Fix ASSERT0 and VERIFY0 macro typo Ensure the value is cast to a 'long long' for printing purposes. The expectation is that ASSERT0/VERIFY0 are mostly used for validating return values and thus may commonly be negative. Signed-off-by: Brian Behlendorf Issue #246 --- include/sys/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index ac716c9a0..f3f3529a9 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -81,7 +81,7 @@ do { \ #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (uint64_t)) +#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) #define ASSERT3S(x,y,z) ((void)0) #define ASSERT3U(x,y,z) ((void)0) @@ -134,7 +134,7 @@ do { \ #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (uint64_t)) +#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) #define ASSERT3S(x,y,z) VERIFY3S(x, y, z) #define ASSERT3U(x,y,z) VERIFY3U(x, y, z) From 991857cac5929fa149820722b8e8cd90f874670c Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Fri, 21 Jun 2013 14:55:07 -0400 Subject: [PATCH 0739/1062] Copy spl.release.in to kernel dir Required when compiling ZFS in the kernel. Signed-off-by: Brian Behlendorf Closes #253 --- copy-builtin | 1 + 1 file changed, 1 insertion(+) diff --git a/copy-builtin b/copy-builtin index 3277270d9..cd98b7a86 100755 --- a/copy-builtin +++ b/copy-builtin @@ -33,6 +33,7 @@ rm -rf "$KERNEL_DIR/include/spl" "$KERNEL_DIR/spl" cp --recursive include "$KERNEL_DIR/include/spl" cp --recursive module "$KERNEL_DIR/spl" cp spl_config.h "$KERNEL_DIR/" +cp spl.release.in "$KERNEL_DIR/" adjust_obj_paths() { From 485b471eb29cfa3a6dbac7de8fda5e020068044a Mon Sep 17 00:00:00 2001 From: Nathaniel Clark Date: Fri, 3 May 2013 08:23:20 -0400 Subject: [PATCH 0740/1062] Add --buildroot option to kmod build This allows rpmbuild to define buildroot to point to where kernel data is located. Signed-off-by: Brian Behlendorf Closes #242 --- rpm/fedora/spl-kmod.spec.in | 4 ++-- rpm/generic/spl-kmod.spec.in | 4 ++-- scripts/kmodtool | 12 +++++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) mode change 100755 => 100644 scripts/kmodtool diff --git a/rpm/fedora/spl-kmod.spec.in b/rpm/fedora/spl-kmod.spec.in index f83ff60c1..79e1f9d9f 100644 --- a/rpm/fedora/spl-kmod.spec.in +++ b/rpm/fedora/spl-kmod.spec.in @@ -44,7 +44,7 @@ BuildRequires: %{_bindir}/kmodtool # Kmodtool does its magic here. A patched version of kmodtool is shipped # with the source rpm until kmod development packages are supported upstream. # https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714 -%{expand:%(sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } +%{expand:%(sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) } %description @@ -56,7 +56,7 @@ several interfaces provided by the Solaris kernel. %{?kmodtool_check} # Print kmodtool output for debugging purposes: -sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null +sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null %if %{with debug} %define debug --enable-debug diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 01918699a..1b0a6f1ec 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -44,7 +44,7 @@ Conflicts: %{module}-dkms # Kmodtool does its magic here. A patched version of kmodtool is shipped # because the latest versions may not be available for your distribution. # https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714 -%{expand:%(bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } +%{expand:%(bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) } %description @@ -56,7 +56,7 @@ several interfaces provided by the Solaris kernel. %{?kmodtool_check} # Print kmodtool output for debugging purposes: -bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null +bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null %if %{with debug} %define debug --enable-debug diff --git a/scripts/kmodtool b/scripts/kmodtool old mode 100755 new mode 100644 index 2fe014c7f..6b7378098 --- a/scripts/kmodtool +++ b/scripts/kmodtool @@ -37,6 +37,7 @@ kernel_versions_to_build_for= prefix= filterfile= target= +buildroot= error_out() { @@ -305,9 +306,9 @@ print_customrpmtemplate () { for kernel in ${1} do - if [[ -e "/usr/src/kernels/${kernel}" ]] ; then + if [[ -e "${buildroot}/usr/src/kernels/${kernel}" ]] ; then # this looks like a Fedora/RH kernel -- print a normal template (which includes the proper BR) and be happy :) - kernel_versions="${kernel_versions}${kernel}___%{_usrsrc}/kernels/${kernel} " + kernel_versions="${kernel_versions}${kernel}___${buildroot}%{_usrsrc}/kernels/${kernel} " # parse kernel versions string and print template local kernel_verrelarch=${kernel%%${kernels_known_variants}} @@ -382,7 +383,6 @@ myprog_help () echo "Usage: $(basename ${0}) [OPTIONS]" echo $'\n'"Creates a template to be used during kmod building" echo $'\n'"Available options:" - # FIXME echo " --datadir -- look for our shared files in " echo " --filterfile -- filter the results with grep --file " echo " --for-kernels -- created templates only for these kernels" echo " --kmodname -- name of the kmod (required)" @@ -390,6 +390,7 @@ myprog_help () echo " --noakmod -- no akmod package" echo " --repo -- use buildsys-build--kerneldevpkgs" echo " --target -- target-arch (required)" + echo " --buildroot -- Build root (place to look for build files)" } while [ "${1}" ] ; do @@ -478,6 +479,11 @@ while [ "${1}" ] ; do shift build_kernels="current" ;; + --buildroot) + shift + buildroot="${1}" + shift + ;; --help) myprog_help exit 0 From c02ab72fb9d557e8d98c5e089faa6557b6d83127 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 14 May 2013 08:31:53 +0800 Subject: [PATCH 0741/1062] Linux 3.10 compat: struct vmalloc_info moved Linux kernel commmit torvalds/linux@db3808c1 moved the vmalloc_info structure from a private to a public header. Now that it's available for kernel modules use it. Signed-off-by: Yuxuan Shui Signed-off-by: Brian Behlendorf Issue #257 --- config/spl-build.m4 | 20 ++++++++++++++++++++ include/sys/vmsystm.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 8a8e3ba28..34d5c4f0b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -33,6 +33,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED SPL_AC_CTL_NAME + SPL_AC_VMALLOC_INFO SPL_AC_FLS64 SPL_AC_DEVICE_CREATE SPL_AC_5ARGS_DEVICE_CREATE @@ -1357,6 +1358,25 @@ AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], ]) ]) +dnl # +dnl # 3.10 API change, +dnl # struct vmalloc_info is now declared in linux/vmalloc.h +dnl # +AC_DEFUN([SPL_AC_VMALLOC_INFO], [ + AC_MSG_CHECKING([whether struct vmalloc_info is declared]) + SPL_LINUX_TRY_COMPILE([ + #include + struct vmalloc_info { void *a; }; + ],[ + return 0; + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VMALLOC_INFO, 1, [yes]) + ]) +]) + dnl # dnl # 2.6.17 API change dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 9c52d2824..34aea2b98 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -74,10 +74,12 @@ extern size_t vmem_size(vmem_t *vmp, int typemask); #ifndef HAVE_GET_VMALLOC_INFO #ifdef CONFIG_MMU +#ifndef HAVE_VMALLOC_INFO struct vmalloc_info { unsigned long used; unsigned long largest_chunk; }; +#endif typedef void (*get_vmalloc_info_t)(struct vmalloc_info *); extern get_vmalloc_info_t get_vmalloc_info_fn; From 1ddf9722dcb6429d38fcbc5ff791779ec89be9fc Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 14 May 2013 08:39:26 +0800 Subject: [PATCH 0742/1062] Linux 3.10 compat: replace PDE()->data with PDE_DATA() Linux kernel commit torvalds/linux@d9dda78b renamed PDE() to PDE_DATA(). To handle this detect the prefered interface and define a PDE_DATA() wrapper for consistency. Signed-off-by: Yuxuan Shui Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Issue #257 --- config/spl-build.m4 | 19 +++++++++++++++++++ module/spl/spl-kstat.c | 5 ++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 34d5c4f0b..da179e33d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -34,6 +34,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CTL_UNNUMBERED SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO + SPL_AC_PDE_DATA SPL_AC_FLS64 SPL_AC_DEVICE_CREATE SPL_AC_5ARGS_DEVICE_CREATE @@ -1377,6 +1378,24 @@ AC_DEFUN([SPL_AC_VMALLOC_INFO], [ ]) ]) +dnl # +dnl # 3.10 API change, +dnl # PDE is replaced by PDE_DATA +dnl # +AC_DEFUN([SPL_AC_PDE_DATA], [ + AC_MSG_CHECKING([whether PDE_DATA() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + PDE_DATA(NULL); + ], [PDE_DATA], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PDE_DATA, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 2.6.17 API change dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index b7e4b9426..2e5590101 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -33,6 +33,9 @@ #endif #define SS_DEBUG_SUBSYS SS_KSTAT +#ifndef HAVE_PDE_DATA +#define PDE_DATA(x) (PDE(x)->data) +#endif static spinlock_t kstat_lock; static struct list_head kstat_list; @@ -359,7 +362,7 @@ proc_kstat_open(struct inode *inode, struct file *filp) return rc; f = filp->private_data; - f->private = PDE(inode)->data; + f->private = PDE_DATA(inode); return rc; } From 79a7ab25812d2701230aaff62904570ef7dbecef Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 14 May 2013 08:40:20 +0800 Subject: [PATCH 0743/1062] Linux 3.10 compat: add missing include of linux/slab.h Linux kernel commit torvalds/linux@0d01ff2 changes some includes we were depending on through linux/proc_fs.h. Signed-off-by: Yuxuan Shui Signed-off-by: Brian Behlendorf Issue #257 --- module/splat/splat-atomic.c | 1 + module/splat/splat-thread.c | 1 + module/splat/splat-time.c | 1 + 3 files changed, 3 insertions(+) diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index df3b38f58..f702196be 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -26,6 +26,7 @@ #include #include +#include #include "splat-internal.h" #define SPLAT_ATOMIC_NAME "atomic" diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index a1e70db47..e55acd0c8 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -26,6 +26,7 @@ #include #include +#include #include "splat-internal.h" #define SPLAT_THREAD_NAME "thread" diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index ca60c45c6..cd513c93f 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #include "splat-internal.h" #define SPLAT_TIME_NAME "time" From f2a745c41df44c32149abb27b80e92cede772551 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 3 Jul 2013 16:34:52 -0400 Subject: [PATCH 0744/1062] Linux 3.10 compat: Do not rely on struct proc_dir_entry definition Linux kernel commit torvalds/linux#59d8053f moved the definition of struct proc_dir_entry from include/linux/proc_fs.h to the private header fs/proc/internal.h. The SPL relied on that to map Solaris' kstat to entries in /proc/spl/kstat. Since the proc_dir_entry structure is now private the only safe thing to do is wrap the opaque proc handle with our own structure. This actually ends up simplify the code and is good because it moves us away from depending on implementation details of /proc. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Issue #257 --- include/linux/proc_compat.h | 3 - include/sys/kstat.h | 8 +++ module/spl/spl-kstat.c | 135 +++++++++++++++++++++++------------- module/spl/spl-proc.c | 37 +--------- 4 files changed, 95 insertions(+), 88 deletions(-) diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index 434ffa3f1..7b044e7e1 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -43,9 +43,6 @@ #endif extern struct proc_dir_entry *proc_spl_kstat; -struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root, - const char *str); -int proc_dir_entries(struct proc_dir_entry *root); int spl_proc_init(void); void spl_proc_fini(void); diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 9275c1ea4..da3c5899d 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -83,6 +83,13 @@ struct kstat_s; typedef int kid_t; /* unique kstat id */ typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */ +typedef struct kstat_module { + char ksm_name[KSTAT_STRLEN+1]; /* module name */ + struct list_head ksm_module_list; /* module linkage */ + struct list_head ksm_kstat_list; /* list of kstat entries */ + struct proc_dir_entry *ksm_proc; /* proc entry */ +} kstat_module_t; + typedef struct kstat_s { int ks_magic; /* magic value */ kid_t ks_kid; /* unique kstat ID */ @@ -102,6 +109,7 @@ typedef struct kstat_s { void *ks_private; /* private data */ kmutex_t ks_lock; /* kstat data lock */ struct list_head ks_list; /* kstat linkage */ + kstat_module_t *ks_owner; /* kstat module linkage */ } kstat_t; typedef struct kstat_named_s { diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 2e5590101..4e900c066 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -37,8 +37,8 @@ #define PDE_DATA(x) (PDE(x)->data) #endif -static spinlock_t kstat_lock; -static struct list_head kstat_list; +static kmutex_t kstat_module_lock; +static struct list_head kstat_module_list; static kid_t kstat_id; static void @@ -351,6 +351,47 @@ static struct seq_operations kstat_seq_ops = { .stop = kstat_seq_stop, }; +static kstat_module_t * +kstat_find_module(char *name) +{ + kstat_module_t *module; + + list_for_each_entry(module, &kstat_module_list, ksm_module_list) + if (strncmp(name, module->ksm_name, KSTAT_STRLEN) == 0) + return (module); + + return (NULL); +} + +static kstat_module_t * +kstat_create_module(char *name) +{ + kstat_module_t *module; + struct proc_dir_entry *pde; + + pde = proc_mkdir(name, proc_spl_kstat); + if (pde == NULL) + return (NULL); + + module = kmem_alloc(sizeof (kstat_module_t), KM_SLEEP); + module->ksm_proc = pde; + strlcpy(module->ksm_name, name, KSTAT_STRLEN+1); + INIT_LIST_HEAD(&module->ksm_kstat_list); + list_add_tail(&module->ksm_module_list, &kstat_module_list); + + return (module); + +} + +static void +kstat_delete_module(kstat_module_t *module) +{ + ASSERT(list_empty(&module->ksm_kstat_list)); + remove_proc_entry(module->ksm_name, proc_spl_kstat); + list_del(&module->ksm_module_list); + kmem_free(module, sizeof(kstat_module_t)); +} + static int proc_kstat_open(struct inode *inode, struct file *filp) { @@ -393,10 +434,10 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, if (ksp == NULL) return ksp; - spin_lock(&kstat_lock); + mutex_enter(&kstat_module_lock); ksp->ks_kid = kstat_id; kstat_id++; - spin_unlock(&kstat_lock); + mutex_exit(&kstat_module_lock); ksp->ks_magic = KS_MAGIC; mutex_init(&ksp->ks_lock, NULL, MUTEX_DEFAULT, NULL); @@ -459,71 +500,64 @@ EXPORT_SYMBOL(__kstat_create); void __kstat_install(kstat_t *ksp) { - struct proc_dir_entry *de_module, *de_name; + kstat_module_t *module; kstat_t *tmp; - int rc = 0; - SENTRY; - spin_lock(&kstat_lock); + ASSERT(ksp); - /* Item may only be added to the list once */ - list_for_each_entry(tmp, &kstat_list, ks_list) { - if (tmp == ksp) { - spin_unlock(&kstat_lock); - SGOTO(out, rc = -EEXIST); - } + mutex_enter(&kstat_module_lock); + + module = kstat_find_module(ksp->ks_module); + if (module == NULL) { + module = kstat_create_module(ksp->ks_module); + if (module == NULL) + goto out; } - list_add_tail(&ksp->ks_list, &kstat_list); - spin_unlock(&kstat_lock); + /* + * Only one entry by this name per-module, on failure the module + * shouldn't be deleted because we know it has at least one entry. + */ + list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) + if (strncmp(tmp->ks_name, ksp->ks_name, KSTAT_STRLEN) == 0) + goto out; - de_module = proc_dir_entry_find(proc_spl_kstat, ksp->ks_module); - if (de_module == NULL) { - de_module = proc_mkdir(ksp->ks_module, proc_spl_kstat); - if (de_module == NULL) - SGOTO(out, rc = -EUNATCH); - } - - de_name = create_proc_entry(ksp->ks_name, 0444, de_module); - if (de_name == NULL) - SGOTO(out, rc = -EUNATCH); + list_add_tail(&ksp->ks_list, &module->ksm_kstat_list); mutex_enter(&ksp->ks_lock); - ksp->ks_proc = de_name; - de_name->proc_fops = &proc_kstat_operations; - de_name->data = (void *)ksp; + ksp->ks_owner = module; + ksp->ks_proc = proc_create_data(ksp->ks_name, 0444, + module->ksm_proc, &proc_kstat_operations, (void *)ksp); + if (ksp->ks_proc == NULL) { + list_del_init(&ksp->ks_list); + if (list_empty(&module->ksm_kstat_list)) + kstat_delete_module(module); + } mutex_exit(&ksp->ks_lock); out: - if (rc) { - spin_lock(&kstat_lock); - list_del_init(&ksp->ks_list); - spin_unlock(&kstat_lock); - } - - SEXIT; + mutex_exit(&kstat_module_lock); } EXPORT_SYMBOL(__kstat_install); void __kstat_delete(kstat_t *ksp) { - struct proc_dir_entry *de_module; + kstat_module_t *module = ksp->ks_owner; - spin_lock(&kstat_lock); - list_del_init(&ksp->ks_list); - spin_unlock(&kstat_lock); + mutex_enter(&kstat_module_lock); + list_del_init(&ksp->ks_list); + mutex_exit(&kstat_module_lock); - if (ksp->ks_proc) { - de_module = ksp->ks_proc->parent; - remove_proc_entry(ksp->ks_name, de_module); + if (ksp->ks_proc) { + remove_proc_entry(ksp->ks_name, module->ksm_proc); - /* Remove top level module directory if it's empty */ - if (proc_dir_entries(de_module) == 0) - remove_proc_entry(de_module->name, de_module->parent); + /* Remove top level module directory if it's empty */ + if (list_empty(&module->ksm_kstat_list)) + kstat_delete_module(module); } if (!(ksp->ks_flags & KSTAT_FLAG_VIRTUAL)) - kmem_free(ksp->ks_data, ksp->ks_data_size); + kmem_free(ksp->ks_data, ksp->ks_data_size); mutex_destroy(&ksp->ks_lock); kmem_free(ksp, sizeof(*ksp)); @@ -536,8 +570,8 @@ int spl_kstat_init(void) { SENTRY; - spin_lock_init(&kstat_lock); - INIT_LIST_HEAD(&kstat_list); + mutex_init(&kstat_module_lock, NULL, MUTEX_DEFAULT, NULL); + INIT_LIST_HEAD(&kstat_module_list); kstat_id = 0; SRETURN(0); } @@ -546,7 +580,8 @@ void spl_kstat_fini(void) { SENTRY; - ASSERT(list_empty(&kstat_list)); + ASSERT(list_empty(&kstat_module_list)); + mutex_destroy(&kstat_module_lock); SEXIT; } diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index cd4fa1b47..b8379d0fe 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -1120,39 +1120,6 @@ static struct ctl_table spl_root[] = { { 0 } }; -static int -proc_dir_entry_match(int len, const char *name, struct proc_dir_entry *de) -{ - if (de->namelen != len) - return 0; - - return !memcmp(name, de->name, len); -} - -struct proc_dir_entry * -proc_dir_entry_find(struct proc_dir_entry *root, const char *str) -{ - struct proc_dir_entry *de; - - for (de = root->subdir; de; de = de->next) - if (proc_dir_entry_match(strlen(str), str, de)) - return de; - - return NULL; -} - -int -proc_dir_entries(struct proc_dir_entry *root) -{ - struct proc_dir_entry *de; - int i = 0; - - for (de = root->subdir; de; de = de->next) - i++; - - return i; -} - int spl_proc_init(void) { @@ -1174,11 +1141,11 @@ spl_proc_init(void) if (proc_spl_kmem == NULL) SGOTO(out, rc = -EUNATCH); - proc_spl_kmem_slab = create_proc_entry("slab", 0444, proc_spl_kmem); + proc_spl_kmem_slab = proc_create_data("slab", 0444, + proc_spl_kmem, &proc_slab_operations, NULL); if (proc_spl_kmem_slab == NULL) SGOTO(out, rc = -EUNATCH); - proc_spl_kmem_slab->proc_fops = &proc_slab_operations; #endif /* DEBUG_KMEM */ proc_spl_kstat = proc_mkdir("kstat", proc_spl); From b1424adda53eba1b6342aab4547330acc6d783fd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 3 Jul 2013 10:14:35 -0700 Subject: [PATCH 0745/1062] Fix --enable-debug-kmem-tracking option This code has gotten something stale and no longer builds cleanly against modern kernels. The two issues addressed here are as follows: * The hlist_*_rcu interfaces in the kernel have been relatively unstable. Since this isn't performance critical code just use the long standing hlist_* variants. * In older kernels the hash_ptr() function takes a 'void *' but in newer kernels it expects a 'const void *'. To silence the compiler warnings about this explicitly cast it to a 'void *'. The memset function is a similar case but it always expects a 'void *'. Signed-off-by: Brian Behlendorf Closes #256 --- module/spl/spl-kmem.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f64c0441d..f982ed0ad 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -403,9 +403,9 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void * spin_lock_irqsave(lock, flags); - head = &table[hash_ptr(addr, bits)]; - hlist_for_each_rcu(node, head) { - p = list_entry_rcu(node, struct kmem_debug, kd_hlist); + head = &table[hash_ptr((void *)addr, bits)]; + hlist_for_each(node, head) { + p = list_entry(node, struct kmem_debug, kd_hlist); if (p->kd_addr == addr) { hlist_del_init(&p->kd_hlist); list_del_init(&p->kd_list); @@ -497,7 +497,7 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, dptr->kd_line = line; spin_lock_irqsave(&kmem_lock, irq_flags); - hlist_add_head_rcu(&dptr->kd_hlist, + hlist_add_head(&dptr->kd_hlist, &kmem_table[hash_ptr(ptr, KMEM_HASH_BITS)]); list_add_tail(&dptr->kd_list, &kmem_list); spin_unlock_irqrestore(&kmem_lock, irq_flags); @@ -538,10 +538,10 @@ kmem_free_track(const void *ptr, size_t size) kfree(dptr->kd_func); - memset(dptr, 0x5a, sizeof(kmem_debug_t)); + memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); kfree(dptr); - memset(ptr, 0x5a, size); + memset((void *)ptr, 0x5a, size); kfree(ptr); SEXIT; @@ -612,7 +612,7 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) dptr->kd_line = line; spin_lock_irqsave(&vmem_lock, irq_flags); - hlist_add_head_rcu(&dptr->kd_hlist, + hlist_add_head(&dptr->kd_hlist, &vmem_table[hash_ptr(ptr, VMEM_HASH_BITS)]); list_add_tail(&dptr->kd_list, &vmem_list); spin_unlock_irqrestore(&vmem_lock, irq_flags); @@ -653,10 +653,10 @@ vmem_free_track(const void *ptr, size_t size) kfree(dptr->kd_func); - memset(dptr, 0x5a, sizeof(kmem_debug_t)); + memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); kfree(dptr); - memset(ptr, 0x5a, size); + memset((void *)ptr, 0x5a, size); vfree(ptr); SEXIT; From ab4e74cc38359a1e909febe31e8440a2908bd10e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 10 Jul 2013 15:04:07 -0700 Subject: [PATCH 0746/1062] Fix bogus kmem leak warning Commit 5c7a036 correctly relocated the creation of a taskq and the registraction of the kmem_cache_shrinker after the initialization of the kmem tracking code. However, the cleanup of these structures was not done before the leak checks in spl_kmem_fini(). This resulted in an incorrect 'kmem leaked' warning even though there was no actual leak. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#1569 --- module/spl/spl-kmem.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f982ed0ad..8547fa74f 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2439,6 +2439,11 @@ spl_kmem_init(void) void spl_kmem_fini(void) { + SENTRY; + + spl_unregister_shrinker(&spl_kmem_cache_shrinker); + taskq_destroy(spl_kmem_cache_taskq); + #ifdef DEBUG_KMEM /* Display all unreclaimed memory addresses, including the * allocation size and the first few bytes of what's located @@ -2458,10 +2463,6 @@ spl_kmem_fini(void) spl_kmem_fini_tracking(&kmem_list, &kmem_lock); spl_kmem_fini_tracking(&vmem_list, &vmem_lock); #endif /* DEBUG_KMEM */ - SENTRY; - - spl_unregister_shrinker(&spl_kmem_cache_shrinker); - taskq_destroy(spl_kmem_cache_taskq); SEXIT; } From f7f344f1b099732908f47232858e68518bb4393a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Jul 2013 16:07:15 -0700 Subject: [PATCH 0747/1062] Improve build instructions Make it clear that when building directly from the Git tree the configure script must be manually generated by running the autogen.sh script. This requires that the GNU autotools packages be installed for your distribution. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#1448 --- README.markdown | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 81535aa22..49c7f21ba 100644 --- a/README.markdown +++ b/README.markdown @@ -2,7 +2,7 @@ The Solaris Porting Layer (SPL) is a Linux kernel module which provides many of the Solaris kernel APIs. This shim layer makes it possible to run Solaris kernel code in the Linux kernel with relatively minimal modification. This can be particularly useful when you want to track -upstream Solaris development closely and don’t want the overhead of +upstream Solaris development closely and do not want the overhead of maintaining a large patch which converts Solaris primitives to Linux primitives. @@ -11,6 +11,11 @@ To build packages for your distribution: $ ./configure $ make pkg +If you are building directly from the git tree and not an officially +released tarball you will need to generate the configure script. +This can be done by executing the autogen.sh script after installing +the GNU autotools for your distribution. + To copy the kernel code inside your kernel source tree for builtin compilation: From c47efbc7fda5eaed9b60b3767347d9f88553309b Mon Sep 17 00:00:00 2001 From: James H Date: Sat, 13 Jul 2013 21:25:04 +0100 Subject: [PATCH 0748/1062] Modify gethrestime to use current_kernel_time() This allows us to get nanosecond resolution. It also means we use the same time source as utimensat(now) etc. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #255 --- module/spl/spl-time.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 8f43b54cd..20fd0e3e7 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -40,11 +40,10 @@ extern unsigned long long monotonic_clock(void); void __gethrestime(timestruc_t *ts) { - struct timeval tv; + struct timespec tspec = current_kernel_time(); - do_gettimeofday(&tv); - ts->tv_sec = tv.tv_sec; - ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC; + ts->tv_sec = tspec.tv_sec; + ts->tv_nsec = tspec.tv_nsec; } EXPORT_SYMBOL(__gethrestime); From b9b3715346b2748b2e512099862f1eabf076cf51 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 23 Jul 2013 15:52:11 -0700 Subject: [PATCH 0749/1062] Return -1 for generic kmem cache shrinker It has been observed that it's possible to get in a state where shrink_slabs() will spin repeated invoking the generic kmem cache shrinker. It fails to detect it's not making forward progress reclaiming from the cache and doesn't give up. To ensure this never occurs we unconditionally return -1 after reclaiming what we can. Signed-off-by: Brian Behlendorf Signed-off-by: Richard Yao Closes zfsonlinux/zfs#1276 Closes zfsonlinux/zfs#1598 Closes zfsonlinux/zfs#1432 --- module/spl/spl-kmem.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 8547fa74f..9e1b0db0f 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2122,7 +2122,15 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, } up_read(&spl_kmem_cache_sem); - return (unused * sysctl_vfs_cache_pressure) / 100; + /* + * After performing reclaim always return -1 to indicate we cannot + * perform additional reclaim. This prevents shrink_slabs() from + * repeatedly invoking this generic shrinker and potentially spinning. + */ + if (sc->nr_to_scan) + return -1; + + return unused; } SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); From ceb387282577b872264143515fc4f55043368b0f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 19 Jul 2013 14:39:35 -0700 Subject: [PATCH 0750/1062] Fix KMC_OFFSLAB type caches Because spl_slab_size() was always returning -ENOSPC for caches of type KMC_OFFSLAB the cache could never be created. Additionally the slab size is rounded up to a page which is what kv_alloc() expects. The kv_alloc() code will minimally allocate a page, in the KMC_OFFSLAB case this could be reduced. The basic regression tests kmem:slab_small, kmem:slab_large, and kmem:slab_align regression were updated to test KMC_OFFSLAB. Signed-off-by: Brian Behlendorf Signed-off-by: Ying Zhu Closes #266 --- module/spl/spl-kmem.c | 3 ++- module/splat/splat-kmem.c | 45 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 9e1b0db0f..3c01ab69c 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1368,7 +1368,8 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) if (skc->skc_flags & KMC_OFFSLAB) { *objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; - *size = sizeof(spl_kmem_slab_t); + *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), PAGE_SIZE); + SRETURN(0); } else { sks_size = spl_sks_size(skc); obj_size = spl_obj_size(skc); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 0eab14217..c7f36caac 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -745,6 +745,7 @@ splat_kmem_test5(struct file *file, void *arg) char *name = SPLAT_KMEM_TEST5_NAME; int rc; + /* On slab (default + kmem + vmem) */ rc = splat_kmem_cache_test(file, arg, name, 128, 0, 0); if (rc) return rc; @@ -753,7 +754,24 @@ splat_kmem_test5(struct file *file, void *arg) if (rc) return rc; - return splat_kmem_cache_test(file, arg, name, 128, 0, KMC_VMEM); + rc = splat_kmem_cache_test(file, arg, name, 128, 0, KMC_VMEM); + if (rc) + return rc; + + /* Off slab (default + kmem + vmem) */ + rc = splat_kmem_cache_test(file, arg, name, 128, 0, KMC_OFFSLAB); + if (rc) + return rc; + + rc = splat_kmem_cache_test(file, arg, name, 128, 0, + KMC_KMEM | KMC_OFFSLAB); + if (rc) + return rc; + + rc = splat_kmem_cache_test(file, arg, name, 128, 0, + KMC_VMEM | KMC_OFFSLAB); + + return rc; } /* @@ -765,6 +783,7 @@ splat_kmem_test6(struct file *file, void *arg) char *name = SPLAT_KMEM_TEST6_NAME; int rc; + /* On slab (default + kmem + vmem) */ rc = splat_kmem_cache_test(file, arg, name, 256*1024, 0, 0); if (rc) return rc; @@ -773,7 +792,24 @@ splat_kmem_test6(struct file *file, void *arg) if (rc) return rc; - return splat_kmem_cache_test(file, arg, name, 1024*1024, 0, KMC_VMEM); + rc = splat_kmem_cache_test(file, arg, name, 1024*1024, 0, KMC_VMEM); + if (rc) + return rc; + + /* Off slab (default + kmem + vmem) */ + rc = splat_kmem_cache_test(file, arg, name, 256*1024, 0, KMC_OFFSLAB); + if (rc) + return rc; + + rc = splat_kmem_cache_test(file, arg, name, 64*1024, 0, + KMC_KMEM | KMC_OFFSLAB); + if (rc) + return rc; + + rc = splat_kmem_cache_test(file, arg, name, 1024*1024, 0, + KMC_VMEM | KMC_OFFSLAB); + + return rc; } /* @@ -789,6 +825,11 @@ splat_kmem_test7(struct file *file, void *arg) rc = splat_kmem_cache_test(file, arg, name, 157, i, 0); if (rc) return rc; + + rc = splat_kmem_cache_test(file, arg, name, 157, i, + KMC_OFFSLAB); + if (rc) + return rc; } return rc; From 0b15402db3819115953127078192d804ff36b27f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 27 Jul 2013 02:37:38 -0700 Subject: [PATCH 0751/1062] Add kmod repo integration When the kmod packaging infrastructure was originally added the dependency on the rpmfusion yum repositories was disabled. This was done at the time in favour of getting local builds working. Now the time has come to conditionally re-enable that functionality so we can properly provide binary kmod packages. ./configure --with-config=srpm make SRPM_DEFINE_KMOD='--define="repo rpmfusion"' srpm-kmod mock rebuild spl-kmod-x.y.z-r.el6.src.rpm One nice benefit of finishing this work is that the generic and fedora spl-kmod spec files can be merged again. Signed-off-by: Brian Behlendorf --- rpm/fedora/spl-kmod.spec.in | 139 +---------------------------------- rpm/generic/spl-kmod.spec.in | 24 +++++- scripts/kmodtool | 73 +++++++++++++----- 3 files changed, 74 insertions(+), 162 deletions(-) mode change 100644 => 120000 rpm/fedora/spl-kmod.spec.in diff --git a/rpm/fedora/spl-kmod.spec.in b/rpm/fedora/spl-kmod.spec.in deleted file mode 100644 index 79e1f9d9f..000000000 --- a/rpm/fedora/spl-kmod.spec.in +++ /dev/null @@ -1,138 +0,0 @@ -%define module @PACKAGE@ -%define repo rpmfusion - -%define buildforkernels newest -#define buildforkernels current -#define buildforkernels akmod - -%bcond_with debug -%bcond_with debug_log -%bcond_with debug_kmem -%bcond_with debug_kmem_tracking -%bcond_with atomic_spinlocks - - -Name: %{module}-kmod - -Version: @VERSION@ -Release: @RELEASE@%{?dist} -Summary: Kernel module(s) - -Group: System Environment/Kernel -License: GPLv2+ -URL: http://zfsonlinux.org/ -Source0: %{module}-%{version}.tar.gz -Source10: kmodtool - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExclusiveArch: i586 i686 x86_64 - -# Likely compiles but is not supported. -ExcludeArch: ppc ppc64 - -# The developments headers will conflict with the dkms packages. -Conflicts: %{module}-dkms - -BuildRequires: %{_bindir}/kmodtool - -%if 0%{?fedora} >= 17 -%define prefix /usr -%endif - -%{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} } - -# Kmodtool does its magic here. A patched version of kmodtool is shipped -# with the source rpm until kmod development packages are supported upstream. -# https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714 -%{expand:%(sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) } - - -%description -This package contains the kernel modules required to emulate -several interfaces provided by the Solaris kernel. - -%prep -# Error out if there was something wrong with kmodtool. -%{?kmodtool_check} - -# Print kmodtool output for debugging purposes: -sh %{SOURCE10} --target %{_target_cpu} --repo %{repo} --kmodname %{name} --devel %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null - -%if %{with debug} - %define debug --enable-debug -%else - %define debug --disable-debug -%endif - -%if %{with debug_log} - %define debug_log --enable-debug-log -%else - %define debug_log --disable-debug-log -%endif - -%if %{with debug_kmem} - %define debug_kmem --enable-debug-kmem -%else - %define debug_kmem --disable-debug-kmem -%endif - -%if %{with debug_kmem_tracking} - %define debug_kmem_tracking --enable-debug-kmem-tracking -%else - %define debug_kmem_tracking --disable-debug-kmem-tracking -%endif - -%if %{with atomic_spinlocks} - %define atomic_spinlocks --enable-atomic-spinlocks -%else - %define atomic_spinlocks --disable-atomic-spinlocks -%endif - -# Leverage VPATH from configure to avoid making multiple copies. -%define _configure ../%{module}-%{version}/configure - -%setup -q -c -T -a 0 - -for kernel_version in %{?kernel_versions}; do - %{__mkdir} _kmod_build_${kernel_version%%___*} -done - -%build -for kernel_version in %{?kernel_versions}; do - pushd _kmod_build_${kernel_version%%___*} - %configure \ - --with-config=kernel \ - --with-linux="${kernel_version##*___}" \ - --with-linux-obj="${kernel_version##*___}" \ - %{debug} \ - %{debug_log} \ - %{debug_kmem} \ - %{debug_kmem_tracking} \ - %{atomic_spinlocks} - make %{?_smp_mflags} - popd -done - - -%install -rm -rf ${RPM_BUILD_ROOT} - -# Relies on the kernel 'modules_install' make target. -for kernel_version in %{?kernel_versions}; do - pushd _kmod_build_${kernel_version%%___*} - make install \ - DESTDIR=${RPM_BUILD_ROOT} \ - %{?prefix:INSTALL_MOD_PATH=%{?prefix}} \ - INSTALL_MOD_DIR=%{kmodinstdir_postfix} - popd -done -chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* -%{?akmod_install} - - -%clean -rm -rf $RPM_BUILD_ROOT - -%changelog -* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 -- First official stable release. diff --git a/rpm/fedora/spl-kmod.spec.in b/rpm/fedora/spl-kmod.spec.in new file mode 120000 index 000000000..311c24d84 --- /dev/null +++ b/rpm/fedora/spl-kmod.spec.in @@ -0,0 +1 @@ +../generic/spl-kmod.spec.in \ No newline at end of file diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 1b0a6f1ec..635b81872 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -1,4 +1,11 @@ %define module @PACKAGE@ +#define repo rpmfusion +#define repo chaos + +# (un)define the next line to either build for the newest or all current kernels +%define buildforkernels newest +#define buildforkernels current +#define buildforkernels akmod %bcond_with debug %bcond_with debug_log @@ -23,12 +30,20 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n) # The developments headers will conflict with the dkms packages. Conflicts: %{module}-dkms -# Source packages minimally require a kernel-devel dependency. +%if %{defined repo} + +# Building for a repository use the proper build-sysbuild package +# to determine which kernel-devel packages should be installed. +BuildRequires: %{_bindir}/kmodtool +%{!?kernels:BuildRequires: buildsys-build-%{repo}-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}} + +%else + +# Building local packages attempt to to use the installed kernel. %{?rhel:BuildRequires: kernel-devel} %{?fedora:BuildRequires: kernel-devel} %{?suse_version:BuildRequires: kernel-source} -# Binary packages build against all installed kernels by default. %if !%{defined kernels} && !%{defined build_src_rpm} %if 0%{?rhel}%{?fedora}%{?suse_version} %define kernels %(ls -1 /usr/src/kernels) @@ -36,6 +51,7 @@ Conflicts: %{module}-dkms %define kernels %(ls -1 /lib/modules) %endif %endif +%endif %if 0%{?fedora} >= 17 %define prefix /usr @@ -44,7 +60,7 @@ Conflicts: %{module}-dkms # Kmodtool does its magic here. A patched version of kmodtool is shipped # because the latest versions may not be available for your distribution. # https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714 -%{expand:%(bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) } +%{expand:%(bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) } %description @@ -56,7 +72,7 @@ several interfaces provided by the Solaris kernel. %{?kmodtool_check} # Print kmodtool output for debugging purposes: -bash %{SOURCE10} --target %{_target_cpu} --kmodname %{name} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null +bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null %if %{with debug} %define debug --enable-debug diff --git a/scripts/kmodtool b/scripts/kmodtool index 6b7378098..852ade021 100644 --- a/scripts/kmodtool +++ b/scripts/kmodtool @@ -155,9 +155,6 @@ Provides: ${kmodname}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} Requires: ${kmodname}-kmod-common >= %{?epoch:%{epoch}:}%{version} Requires(post): ${prefix}/sbin/depmod Requires(postun): ${prefix}/sbin/depmod -%{?KmodsRequires:Requires: %{KmodsRequires}-uname-r = ${kernel_uname_r}} -%{?KmodsBuildRequires:BuildRequires: %{KmodsBuildRequires}-uname-r = ${kernel_uname_r}} -%{?KmodsBuildRequires:BuildRequires: %{KmodsBuildRequires}} EOF if [[ ${obsolete_name} ]]; then @@ -170,6 +167,8 @@ EOF cat < /dev/null || : %postun -n kmod-${kmodname}-${kernel_uname_r} @@ -202,15 +201,38 @@ EOF print_rpmtemplate_kmoddevelpkg () { + if [[ "${1}" == "--custom" ]]; then + shift + local customkernel=true + elif [[ "${1}" == "--redhat" ]]; then + shift + local redhatkernel=true + fi + + local kernel_uname_r=${1} + cat <= %{?epoch:%{epoch}:}%{version}-%{release}" + fi + + if [[ ${obsolete_name} ]]; then + echo "Provides: kmod-${obsolete_name}-devel = ${obsolete_version}" + echo "Obsoletes: kmod-${obsolete_name}-devel < ${obsolete_version}" + fi + + cat < objects for the newest kernel. + %files -n kmod-${kmodname}-devel %defattr(644,root,root,755) %{_usrsrc}/${kmodname}-%{version} @@ -239,23 +261,32 @@ print_rpmtemplate_per_kmoddevelpkg () local kernel_uname_r=${1} local kernel_variant="${2:+-${2}}" + # first part cat <= %{?epoch:%{epoch}:}%{version}-%{release} +%{?KmodsMetaRequires:Requires: %{?KmodsMetaRequires}} EOF - + if [[ ${obsolete_name} ]]; then echo "Provides: kmod-${obsolete_name}${kernel_variant} = ${obsolete_version}" echo "Obsoletes: kmod-${obsolete_name}${kernel_variant} < ${obsolete_version}" @@ -316,6 +348,10 @@ print_customrpmtemplate () # create development package if [[ "${devel}" ]]; then + # create devel package including common headers + print_rpmtemplate_kmoddevelpkg --redhat ${kernel} ${kernel##${kernel_verrelarch}} + + # create devel package print_rpmtemplate_per_kmoddevelpkg --redhat ${kernel} ${kernel##${kernel_verrelarch}} fi elif [[ -e ${prefix}/lib/modules/"${kernel}"/build/Makefile ]] ; then @@ -327,6 +363,10 @@ print_customrpmtemplate () # create development package if [[ "${devel}" ]]; then + # create devel package including common headers + print_rpmtemplate_kmoddevelpkg --custom "${kernel}" + + # create devel package print_rpmtemplate_per_kmoddevelpkg --custom "${kernel}" fi else @@ -334,11 +374,6 @@ print_customrpmtemplate () fi done - # create common development package - if [[ "${devel}" ]]; then - print_rpmtemplate_kmoddevelpkg "${1}" - fi - # well, it's no header anymore, but who cares ;-) print_rpmtemplate_header } @@ -366,16 +401,14 @@ print_rpmtemplate () # create package print_rpmtemplate_per_kmodpkg ${kernel} ${kernel##${kernel_verrelarch}} - # create development package if [[ "${devel}" ]]; then + # create devel package including common headers + print_rpmtemplate_kmoddevelpkg ${kernel} ${kernel##${kernel_verrelarch}} + + # create devel package print_rpmtemplate_per_kmoddevelpkg ${kernel} ${kernel##${kernel_verrelarch}} fi done - - # create common development package - if [[ "${devel}" ]]; then - print_rpmtemplate_kmoddevelpkg "${1}" - fi } myprog_help () From ba062980728bbd09c4b829f5d801a773af7381cf Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 7 Aug 2013 04:50:04 -0400 Subject: [PATCH 0752/1062] Linux 3.11 compat: Replace num_physpages with totalram_pages num_physpages was removed by torvalds/linux@cfa11e08ed39eb28a9eff9a907b20913020c69b5, so lets replace it with totalram_pages. This is a bug fix as much as it is a compatibility fix because num_physpages did not reflect the number of pages actually available to the kernel: http://lkml.indiana.edu/hypermail/linux/kernel/0908.2/01001.html Also, there are known issues with memory calculations when ZFS is in a Xen dom0. There is a chance that using totalram_pages could resolve them. This conjecture is untested at the time of writing. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #273 --- include/sys/vmsystm.h | 2 +- module/spl/spl-debug.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 34aea2b98..909749103 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -41,7 +41,7 @@ */ #define membar_producer() smp_wmb() -#define physmem num_physpages +#define physmem totalram_pages #define freemem nr_free_pages() #define availrmem spl_kmem_availrmem() diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 37599acdd..d450368b1 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -548,7 +549,7 @@ trace_print_to_console(struct spl_debug_header *hdr, int mask, const char *buf, static int trace_max_debug_mb(void) { - return MAX(512, ((num_physpages >> (20 - PAGE_SHIFT)) * 80) / 100); + return MAX(512, ((totalram_pages >> (20 - PAGE_SHIFT)) * 80) / 100); } static struct trace_page * @@ -1188,7 +1189,7 @@ spl_debug_init(void) /* If spl_debug_mb is set to an invalid value or uninitialized * then just make the total buffers smp_num_cpus TCD_MAX_PAGES */ - if (max > (num_physpages >> (20 - 2 - PAGE_SHIFT)) / 5 || + if (max > (totalram_pages >> (20 - 2 - PAGE_SHIFT)) / 5 || max >= 512 || max < 0) { max = TCD_MAX_PAGES; } else { From 251e7a779ba5d4b5e46c42d8b792c481380da28b Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 4 Aug 2013 19:35:08 -0400 Subject: [PATCH 0753/1062] Fix race in spl_kmem_cache_reap_now() The current code contains a race condition that triggers when bit 2 in spl.spl_kmem_cache_expire is set, spl_kmem_cache_reap_now() is invoked and another thread is concurrently accessing its magazine. spl_kmem_cache_reap_now() currently invokes spl_cache_flush() on each magazine in the same thread when bit 2 in spl.spl_kmem_cache_expire is set. This is unsafe because there is one magazine per CPU and the magazines are lockless, so it is impossible to guarentee that another CPU is not using its magazine when this function is called. The solution is to only touch the local CPU's magazine and leave other CPU's magazines to other CPUs. Reported-by: DHE Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #274 --- module/spl/spl-kmem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 3c01ab69c..a2dcea039 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2196,12 +2196,12 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) /* Reclaim from the magazine then the slabs ignoring age and delay. */ if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) { spl_kmem_magazine_t *skm; - int i; + unsigned long irq_flags; - for_each_online_cpu(i) { - skm = skc->skc_mag[i]; - spl_cache_flush(skc, skm, skm->skm_avail); - } + local_irq_save(irq_flags); + skm = skc->skc_mag[smp_processor_id()]; + spl_cache_flush(skc, skm, skm->skm_avail); + local_irq_restore(irq_flags); } spl_slab_reclaim(skc, count, 1); From e3c4d44886a8564e84aa697477b0e37211d634cd Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 27 Mar 2013 11:33:14 -0400 Subject: [PATCH 0754/1062] PaX/GrSecurity Linux 3.8.y compat: Use __no_const on struct ctl_table The PaX team started constifying `struct ctl_table` as of their Linux 3.8.0 patchset. This lead to zfsonlinux/spl#225 and Gentoo bug #463012. While investigating our options, I learned that there is a preprocessor directive called CONSTIFY_PLUGIN that we can use to detect the presence of the PaX changes and adjust the code accordingly. The PaX Team had suggested adopting ctl_table_no_const, but supporting older kernels required declaring that whenever the CONSTIFY_PLUGIN was set. Future compiler changes could potentially cause that to break in the presence of -Werror, so instead we define our own spl_ctl_table typdef and use that. This should be compatible with all PaX kernels. This introduces a Linux kernel version number check to prevent a build failure on versions of the PaX GCC plugin that existed for kernels before Linux 3.8.0. Affected versions of the PaX plugin will trigger a compiler error when they see no_const cast on a non-constified structure. Ordinarily, we would need an autotools check to catch that. However, it is safe to do a kernel version check instead of an autotools check in this specific instance because the affected versions of the PaX GCC plugin only exist for Linux kernels before 3.8.0 and the constification of `struct ctl_table` by the PaX developers only occurs in Linux 3.8.0 and later. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #225 --- module/spl/spl-proc.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index b8379d0fe..f25239aca 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef SS_DEBUG_SUBSYS @@ -37,6 +38,12 @@ #define SS_DEBUG_SUBSYS SS_PROC +#if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) +typedef struct ctl_table __no_const spl_ctl_table; +#else +typedef struct ctl_table spl_ctl_table; +#endif + #ifdef DEBUG_KMEM static unsigned long table_min = 0; static unsigned long table_max = ~0; @@ -323,7 +330,7 @@ SPL_PROC_HANDLER(proc_force_bug) SPL_PROC_HANDLER(proc_console_max_delay_cs) { int rc, max_delay_cs; - struct ctl_table dummy = *table; + spl_ctl_table dummy = *table; long d; SENTRY; @@ -355,7 +362,7 @@ SPL_PROC_HANDLER(proc_console_max_delay_cs) SPL_PROC_HANDLER(proc_console_min_delay_cs) { int rc, min_delay_cs; - struct ctl_table dummy = *table; + spl_ctl_table dummy = *table; long d; SENTRY; @@ -387,7 +394,7 @@ SPL_PROC_HANDLER(proc_console_min_delay_cs) SPL_PROC_HANDLER(proc_console_backoff) { int rc, backoff; - struct ctl_table dummy = *table; + spl_ctl_table dummy = *table; SENTRY; dummy.data = &backoff; @@ -417,7 +424,7 @@ SPL_PROC_HANDLER(proc_domemused) { int rc = 0; unsigned long min = 0, max = ~0, val; - struct ctl_table dummy = *table; + spl_ctl_table dummy = *table; SENTRY; dummy.data = &val; @@ -444,7 +451,7 @@ SPL_PROC_HANDLER(proc_doslab) { int rc = 0; unsigned long min = 0, max = ~0, val = 0, mask; - struct ctl_table dummy = *table; + spl_ctl_table dummy = *table; spl_kmem_cache_t *skc; SENTRY; From f7fd6ddd96fae173d64bf2982ba4ceda28db56e2 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sat, 13 Jul 2013 16:34:56 -0400 Subject: [PATCH 0755/1062] Linux 3.8 compat: Use kuid_t/kgid_t when required When CONFIG_UIDGID_STRICT_TYPE_CHECKS is enabled uid_t/git_t are replaced by kuid_t/kgid_t, which are structures instead of integral types. This causes any code that uses an integral type to fail to build. The User Namespace functionality introduced in Linux 3.8 requires CONFIG_UIDGID_STRICT_TYPE_CHECKS, so we could not build against any kernel that supported it. We resolve this by converting between the new kuid_t/kgid_t structures and the original uid_t/gid_t types. Original-patch-by: DHE Rewrite-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #260 --- config/spl-build.m4 | 38 ++++++++++++++++++++++++++++++++++++++ include/sys/cred.h | 30 ++++++++++++++++++++++++++++++ module/spl/spl-cred.c | 28 ++++++++++++++++------------ module/spl/spl-vnode.c | 5 +++-- 4 files changed, 87 insertions(+), 14 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index da179e33d..f54c5b166 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -73,6 +73,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_INODE_TRUNCATE_RANGE SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_CRED_STRUCT + SPL_AC_KUIDGID_T SPL_AC_GROUPS_SEARCH SPL_AC_PUT_TASK_STRUCT SPL_AC_5ARGS_PROC_HANDLER @@ -1866,6 +1867,36 @@ AC_DEFUN([SPL_AC_CRED_STRUCT], [ ]) ]) + +dnl # +dnl # User namespaces, use kuid_t in place of uid_t +dnl # where available. Not strictly a user namespaces thing +dnl # but it should prevent surprises +dnl # +AC_DEFUN([SPL_AC_KUIDGID_T], [ + AC_MSG_CHECKING([whether kuid_t/kgid_t is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ], [ + kuid_t userid = KUIDT_INIT(0); + kgid_t groupid = KGIDT_INIT(0); + ],[ + SPL_LINUX_TRY_COMPILE([ + #include + ], [ + kuid_t userid = 0; + kgid_t groupid = 0; + ],[ + AC_MSG_RESULT(yes; optional) + ],[ + AC_MSG_RESULT(yes; mandatory) + AC_DEFINE(HAVE_KUIDGID_T, 1, [kuid_t/kgid_t in use]) + ]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # Custom SPL patch may export this symbol. dnl # @@ -1873,8 +1904,15 @@ AC_DEFUN([SPL_AC_GROUPS_SEARCH], [AC_MSG_CHECKING([whether groups_search() is available]) SPL_LINUX_TRY_COMPILE_SYMBOL([ #include + #ifdef HAVE_KUIDGID_T + #include + #endif ], [ + #ifdef HAVE_KUIDGID_T + groups_search(NULL, KGIDT_INIT(0)); + #else groups_search(NULL, 0); + #endif ], [groups_search], [], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GROUPS_SEARCH, 1, [groups_search() is available]) diff --git a/include/sys/cred.h b/include/sys/cred.h index 6c905884b..3ba5c141b 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -45,6 +45,36 @@ typedef struct task_struct cred_t; #endif /* HAVE_CRED_STRUCT */ +#ifdef HAVE_KUIDGID_T + + /* + * Linux 3.8+ uses typedefs to redefine uid_t and gid_t. We have to rename the + * typedefs to recover the original types. We then can use them provided that + * we are careful about translating from k{g,u}id_t to the original versions + * and vice versa. + */ + #define uid_t xuid_t + #define gid_t xgid_t + #include + #undef uid_t + #undef gid_t + + #define KUID_TO_SUID(x) (__kuid_val(x)) + #define KGID_TO_SGID(x) (__kgid_val(x)) + #define SUID_TO_KUID(x) (KUIDT_INIT(x)) + #define SGID_TO_KGID(x) (KGIDT_INIT(x)) + #define KGIDP_TO_SGIDP(x) (&(x)->val) + +#else /* HAVE_KUIDGID_T */ + + #define KUID_TO_SUID(x) (x) + #define KGID_TO_SGID(x) (x) + #define SUID_TO_KUID(x) (x) + #define SGID_TO_KGID(x) (x) + #define KGIDP_TO_SGIDP(x) (x) + +#endif /* HAVE_KUIDGID_T */ + extern void crhold(cred_t *cr); extern void crfree(cred_t *cr); extern uid_t crgetuid(const cred_t *cr); diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index e669cbf5d..0ed65725e 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -38,7 +38,11 @@ #else /* Implementation from 2.6.30 kernel */ static int +#ifdef HAVE_KUIDGID_T +cr_groups_search(const struct group_info *group_info, kgid_t grp) +#else cr_groups_search(const struct group_info *group_info, gid_t grp) +#endif { unsigned int left, right; @@ -49,7 +53,7 @@ cr_groups_search(const struct group_info *group_info, gid_t grp) right = group_info->ngroups; while (left < right) { unsigned int mid = (left+right)/2; - int cmp = grp - GROUP_AT(group_info, mid); + int cmp = KGID_TO_SGID(grp) - KGID_TO_SGID(GROUP_AT(group_info, mid)); if (cmp > 0) left = mid + 1; else if (cmp < 0) @@ -110,7 +114,7 @@ crgetgroups(const cred_t *cr) gid_t *gids; gi = get_group_info(cr->group_info); - gids = gi->blocks[0]; + gids = KGIDP_TO_SGIDP(gi->blocks[0]); put_group_info(gi); return gids; @@ -124,7 +128,7 @@ groupmember(gid_t gid, const cred_t *cr) int rc; gi = get_group_info(cr->group_info); - rc = cr_groups_search(cr->group_info, gid); + rc = cr_groups_search(cr->group_info, SGID_TO_KGID(gid)); put_group_info(gi); return rc; @@ -180,7 +184,7 @@ crgetgroups(const cred_t *cr) task_lock((struct task_struct *)cr); get_group_info(cr->group_info); - gids = cr->group_info->blocks[0]; + gids = KGID_TO_SGID(cr->group_info->blocks[0]); put_group_info(cr->group_info); if (lock) @@ -215,56 +219,56 @@ groupmember(gid_t gid, const cred_t *cr) uid_t crgetuid(const cred_t *cr) { - return cr->euid; + return KUID_TO_SUID(cr->euid); } /* Return the real user id */ uid_t crgetruid(const cred_t *cr) { - return cr->uid; + return KUID_TO_SUID(cr->uid); } /* Return the saved user id */ uid_t crgetsuid(const cred_t *cr) { - return cr->suid; + return KUID_TO_SUID(cr->suid); } /* Return the filesystem user id */ uid_t crgetfsuid(const cred_t *cr) { - return cr->fsuid; + return KUID_TO_SUID(cr->fsuid); } /* Return the effective group id */ gid_t crgetgid(const cred_t *cr) { - return cr->egid; + return KGID_TO_SGID(cr->egid); } /* Return the real group id */ gid_t crgetrgid(const cred_t *cr) { - return cr->gid; + return KGID_TO_SGID(cr->gid); } /* Return the saved group id */ gid_t crgetsgid(const cred_t *cr) { - return cr->sgid; + return KGID_TO_SGID(cr->sgid); } /* Return the filesystem group id */ gid_t crgetfsgid(const cred_t *cr) { - return cr->fsgid; + return KGID_TO_SGID(cr->fsgid); } EXPORT_SYMBOL(crhold); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 4f56f1039..0784ff261 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -24,6 +24,7 @@ * Solaris Porting Layer (SPL) Vnode Implementation. \*****************************************************************************/ +#include #include #include #include @@ -616,8 +617,8 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) vap->va_type = vn_mode_to_vtype(stat.mode); vap->va_mode = stat.mode; - vap->va_uid = stat.uid; - vap->va_gid = stat.gid; + vap->va_uid = KUID_TO_SUID(stat.uid); + vap->va_gid = KGID_TO_SGID(stat.gid); vap->va_fsid = 0; vap->va_nodeid = stat.ino; vap->va_nlink = stat.nlink; From e90856f1d2ac1c5135802b802a66e60439b2ac1a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 16 Aug 2013 15:14:17 -0700 Subject: [PATCH 0756/1062] Tag spl-0.6.2 META file and release log updated. Signed-off-by: Brian Behlendorf --- META | 2 +- rpm/generic/spl-dkms.spec.in | 2 ++ rpm/generic/spl-kmod.spec.in | 2 ++ rpm/generic/spl.spec.in | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/META b/META index 4e64a99a7..d83c53644 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.6.1 +Version: 0.6.2 Release: 1 Release-Tags: relext diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index dbf47233c..d0a649036 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -64,5 +64,7 @@ dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade exit 0 %changelog +* Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 +- Released 0.6.2-1 * Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 - First official stable release. diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 635b81872..e8d88c170 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -160,5 +160,7 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog +* Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 +- Released 0.6.2-1 * Tue Mar 22 2013 Brian Behlendorf - 0.6.1-1 - First official stable release. diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 3db301516..804584a63 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -37,5 +37,7 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man1/* %changelog +* Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 +- Released 0.6.2-1 * Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 - First official stable release. From df2c0f18498d1c98e4f211fdb623376b18f18134 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 18 Aug 2013 10:51:06 -0400 Subject: [PATCH 0757/1062] Replace current_kernel_time() with getnstimeofday() current_kernel_time() is used by the SPLAT, but it is not meant for performance measurement. We modify the SPLAT to use getnstimeofday(), which is equivalent to the gethrestime() function on Solaris. Additionally, we update gethrestime() to invoke getnstimeofday(). Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #279 --- module/spl/spl-time.c | 4 +++- module/splat/splat-kmem.c | 11 ++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 20fd0e3e7..0ed49cc26 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -40,7 +40,9 @@ extern unsigned long long monotonic_clock(void); void __gethrestime(timestruc_t *ts) { - struct timespec tspec = current_kernel_time(); + struct timespec tspec; + + getnstimeofday(&tspec); ts->tv_sec = tspec.tv_sec; ts->tv_nsec = tspec.tv_nsec; diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index c7f36caac..28ff83721 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -682,7 +682,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, goto out_kcp; } - start = current_kernel_time(); + getnstimeofday(&start); for (i = 0; i < SPLAT_KMEM_THREADS; i++) { thr = thread_create(NULL, 0, @@ -707,7 +707,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, /* Sleep until all thread have finished */ wait_event(kcp->kcp_ctl_waitq, splat_kmem_cache_test_threads(kcp, 0)); - stop = current_kernel_time(); + getnstimeofday(&stop); delta = timespec_sub(stop, start); splat_vprint(file, name, @@ -1203,7 +1203,7 @@ splat_kmem_test13(struct file *file, void *arg) kmem_cache_thread_t *kct; dummy_page_t *dp; struct list_head list; - struct timespec start, delta = { 0, 0 }; + struct timespec start, stop, delta = { 0, 0 }; int size, count, slabs, fails = 0; int i, rc = 0, max_time = 10; @@ -1250,7 +1250,7 @@ splat_kmem_test13(struct file *file, void *arg) i = 0; slabs = kcp->kcp_cache->skc_slab_total; INIT_LIST_HEAD(&list); - start = current_kernel_time(); + getnstimeofday(&start); /* Apply memory pressure */ while (kcp->kcp_cache->skc_slab_total > (slabs >> 2)) { @@ -1259,7 +1259,8 @@ splat_kmem_test13(struct file *file, void *arg) splat_kmem_cache_test_debug( file, SPLAT_KMEM_TEST13_NAME, kcp); - delta = timespec_sub(current_kernel_time(), start); + getnstimeofday(&stop); + delta = timespec_sub(stop, start); if (delta.tv_sec >= max_time) { splat_vprint(file, SPLAT_KMEM_TEST13_NAME, "Failed to reclaim 3/4 of cache in %ds, " From 3ecf2d2bb66b36917520c9b66154547f3510a66a Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Wed, 28 Aug 2013 20:08:03 -0700 Subject: [PATCH 0758/1062] Add kpreempt() compatibility macro This is needed for the Illumos #4045 write throttle patch. It is used in the arc eviction code to avoid blocking all arc activity by sitting on arcs_mtx too long. Signed-off-by: Brian Behlendorf Issue #286 --- include/sys/disp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/disp.h b/include/sys/disp.h index 9614a47c4..c3077a73f 100644 --- a/include/sys/disp.h +++ b/include/sys/disp.h @@ -27,6 +27,7 @@ #include +#define kpreempt(unused) schedule() #define kpreempt_disable() preempt_disable() #define kpreempt_enable() preempt_enable() From 6a696939617503e5c34dbb88ba62d556ce994bf1 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Sun, 22 Sep 2013 09:45:54 -0700 Subject: [PATCH 0759/1062] Document how to run SPLAT Signed-off-by: Brian Behlendorf Closes #294 --- README.markdown | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 49c7f21ba..1de82ef93 100644 --- a/README.markdown +++ b/README.markdown @@ -22,5 +22,13 @@ compilation: $ ./configure --enable-linux-builtin --with-linux=/usr/src/linux-... $ ./copy-builtin /usr/src/linux-... -Full documentation for building, configuring, and using the SPL can -be found at: +The SPL comes with an automated test suite called SPLAT. The test suite +is implemented in two parts. There is a kernel module which contains +the tests and a user space utility which controls which tests are run. +To run the full test suite: + + $ sudo insmod ./module/splat/splat.ko + $ sudo ./cmd/splat --all + +Full documentation for building, configuring, testing, and using the +SPL can be found at: From 429fe89ceefa033120f220787265eb10d77991e7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 25 Sep 2013 14:52:29 -0700 Subject: [PATCH 0760/1062] Consistently use local_irq_disable/local_irq_enable It was observed that spl_kmem_cache_alloc() uses local_irq_save() and saves the interrupt state in a local variable. This would normally be fine except that spl_kmem_cache_alloc() calls spl_cache_refill() which re-enables interrupts. It is then possible that while interrupts are enabled the process is rescheduled to a different cpu before being disable again. This could result in us restoring the saved interrupt state from one cpu to another. What the consequences of this are aren't perfectly clear, but this is clearly a bug and it has the potential to cause issues. The code has been updated to just use local_irq_enable() and local_irq_disable() to avoid this. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index a2dcea039..23e47808a 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1995,7 +1995,6 @@ void * spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) { spl_kmem_magazine_t *skm; - unsigned long irq_flags; void *obj = NULL; SENTRY; @@ -2003,7 +2002,7 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); ASSERT(flags & KM_SLEEP); atomic_inc(&skc->skc_ref); - local_irq_save(irq_flags); + local_irq_disable(); restart: /* Safe to update per-cpu structure without lock, but @@ -2025,7 +2024,7 @@ restart: SGOTO(restart, obj = NULL); } - local_irq_restore(irq_flags); + local_irq_enable(); ASSERT(obj); ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); From 4768c0d0a61497f2f3a52678154f2742a355618f Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sat, 5 Oct 2013 22:19:05 -0400 Subject: [PATCH 0761/1062] Define SET_ERROR() Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- include/sys/sdt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/sdt.h b/include/sys/sdt.h index 6c8395f99..287bfaa71 100644 --- a/include/sys/sdt.h +++ b/include/sys/sdt.h @@ -25,4 +25,6 @@ #ifndef _SPL_SDT_H #define _SPL_SDT_H +#define SET_ERROR(x) (x) + #endif /* SPL_SDT_H */ From 56d40a686b0504042a088943154ba7b0dde36d51 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Thu, 12 Sep 2013 16:14:51 -0700 Subject: [PATCH 0762/1062] Add callbacks for displaying KSTAT_TYPE_RAW kstats The current implementation for displaying kstats of type KSTAT_TYPE_RAW is rather crude. This patch attempts to enhance this handling by allowing a kstat user to register formatting callbacks which can optionally be used. The callbacks allow the user to implement functions for interpreting their data and transposing it into a character buffer. This buffer, containing a string representation of the raw data, is then be displayed through the current /proc textual interface. Additionally the kstats are made writable because it's now possible to provide a useful handler via the existing ks_update() interface. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #296 --- include/sys/kstat.h | 20 ++++++- module/spl/spl-kstat.c | 119 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 123 insertions(+), 16 deletions(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index da3c5899d..75b384714 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -33,6 +33,7 @@ #include #define KSTAT_STRLEN 31 +#define KSTAT_RAW_MAX (128*1024) /* For reference valid classes are: * disk, tape, net, controller, vm, kvm, hat, streams, kstat, misc @@ -79,6 +80,7 @@ #define KSTAT_WRITE 1 struct kstat_s; +typedef struct kstat_s kstat_t; typedef int kid_t; /* unique kstat id */ typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */ @@ -90,7 +92,13 @@ typedef struct kstat_module { struct proc_dir_entry *ksm_proc; /* proc entry */ } kstat_module_t; -typedef struct kstat_s { +typedef struct kstat_raw_ops { + int (*headers)(char *buf, size_t size); + int (*data)(char *buf, size_t size, void *data); + void *(*addr)(kstat_t *ksp, loff_t index); +} kstat_raw_ops_t; + +struct kstat_s { int ks_magic; /* magic value */ kid_t ks_kid; /* unique kstat ID */ hrtime_t ks_crtime; /* creation time */ @@ -110,7 +118,10 @@ typedef struct kstat_s { kmutex_t ks_lock; /* kstat data lock */ struct list_head ks_list; /* kstat linkage */ kstat_module_t *ks_owner; /* kstat module linkage */ -} kstat_t; + kstat_raw_ops_t ks_raw_ops; /* ops table for raw type */ + char *ks_raw_buf; /* buf used for raw ops */ + size_t ks_raw_bufsize; /* size of raw ops buffer */ +}; typedef struct kstat_named_s { char name[KSTAT_STRLEN]; /* name of counter */ @@ -188,6 +199,10 @@ typedef struct kstat_txg { int spl_kstat_init(void); void spl_kstat_fini(void); +extern void __kstat_set_raw_ops(kstat_t *ksp, + int (*headers)(char *buf, size_t size), + int (*data)(char *buf, size_t size, void *data), + void* (*addr)(kstat_t *ksp, loff_t index)); extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, const char *ks_name, const char *ks_class, uchar_t ks_type, uint_t ks_ndata, @@ -195,6 +210,7 @@ extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, extern void __kstat_install(kstat_t *ksp); extern void __kstat_delete(kstat_t *ksp); +#define kstat_set_raw_ops(k,h,d,a) __kstat_set_raw_ops(k,h,d,a) #define kstat_create(m,i,n,c,t,s,f) __kstat_create(m,i,n,c,t,s,f) #define kstat_install(k) __kstat_install(k) #define kstat_delete(k) __kstat_delete(k) diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 4e900c066..57aabe2d0 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -41,10 +41,25 @@ static kmutex_t kstat_module_lock; static struct list_head kstat_module_list; static kid_t kstat_id; -static void +static int +kstat_resize_raw(kstat_t *ksp) +{ + if (ksp->ks_raw_bufsize == KSTAT_RAW_MAX) + return ENOMEM; + + vmem_free(ksp->ks_raw_buf, ksp->ks_raw_bufsize); + ksp->ks_raw_bufsize = MIN(ksp->ks_raw_bufsize * 2, KSTAT_RAW_MAX); + ksp->ks_raw_buf = vmem_alloc(ksp->ks_raw_bufsize, KM_SLEEP); + + return 0; +} + +static int kstat_seq_show_headers(struct seq_file *f) { kstat_t *ksp = (kstat_t *)f->private; + int rc = 0; + ASSERT(ksp->ks_magic == KS_MAGIC); seq_printf(f, "%d %d 0x%02x %d %d %lld %lld\n", @@ -54,7 +69,17 @@ kstat_seq_show_headers(struct seq_file *f) switch (ksp->ks_type) { case KSTAT_TYPE_RAW: - seq_printf(f, "raw data"); +restart: + if (ksp->ks_raw_ops.headers) { + rc = ksp->ks_raw_ops.headers( + ksp->ks_raw_buf, ksp->ks_raw_bufsize); + if (rc == ENOMEM && !kstat_resize_raw(ksp)) + goto restart; + if (!rc) + seq_puts(f, ksp->ks_raw_buf); + } else { + seq_printf(f, "raw data\n"); + } break; case KSTAT_TYPE_NAMED: seq_printf(f, "%-31s %-4s %s\n", @@ -92,6 +117,8 @@ kstat_seq_show_headers(struct seq_file *f) default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } + + return -rc; } static int @@ -232,9 +259,19 @@ kstat_seq_show(struct seq_file *f, void *p) switch (ksp->ks_type) { case KSTAT_TYPE_RAW: - ASSERT(ksp->ks_ndata == 1); - rc = kstat_seq_show_raw(f, ksp->ks_data, - ksp->ks_data_size); +restart: + if (ksp->ks_raw_ops.data) { + rc = ksp->ks_raw_ops.data( + ksp->ks_raw_buf, ksp->ks_raw_bufsize, p); + if (rc == ENOMEM && !kstat_resize_raw(ksp)) + goto restart; + if (!rc) + seq_puts(f, ksp->ks_raw_buf); + } else { + ASSERT(ksp->ks_ndata == 1); + rc = kstat_seq_show_raw(f, ksp->ks_data, + ksp->ks_data_size); + } break; case KSTAT_TYPE_NAMED: rc = kstat_seq_show_named(f, (kstat_named_t *)p); @@ -255,13 +292,17 @@ kstat_seq_show(struct seq_file *f, void *p) PANIC("Undefined kstat type %d\n", ksp->ks_type); } - return rc; + return -rc; } int kstat_default_update(kstat_t *ksp, int rw) { ASSERT(ksp != NULL); + + if (rw == KSTAT_WRITE) + return (EACCES); + return 0; } @@ -273,7 +314,10 @@ kstat_seq_data_addr(kstat_t *ksp, loff_t n) switch (ksp->ks_type) { case KSTAT_TYPE_RAW: - rc = ksp->ks_data; + if (ksp->ks_raw_ops.addr) + rc = ksp->ks_raw_ops.addr(ksp, n); + else + rc = ksp->ks_data; break; case KSTAT_TYPE_NAMED: rc = ksp->ks_data + n * sizeof(kstat_named_t); @@ -307,13 +351,18 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) mutex_enter(&ksp->ks_lock); + if (ksp->ks_type == KSTAT_TYPE_RAW) { + ksp->ks_raw_bufsize = PAGE_SIZE; + ksp->ks_raw_buf = vmem_alloc(ksp->ks_raw_bufsize, KM_SLEEP); + } + /* Dynamically update kstat, on error existing kstats are used */ (void) ksp->ks_update(ksp, KSTAT_READ); ksp->ks_snaptime = gethrtime(); - if (!n) - kstat_seq_show_headers(f); + if (!n && kstat_seq_show_headers(f)) + SRETURN(NULL); if (n >= ksp->ks_ndata) SRETURN(NULL); @@ -341,6 +390,9 @@ kstat_seq_stop(struct seq_file *f, void *v) kstat_t *ksp = (kstat_t *)f->private; ASSERT(ksp->ks_magic == KS_MAGIC); + if (ksp->ks_type == KSTAT_TYPE_RAW) + vmem_free(ksp->ks_raw_buf, ksp->ks_raw_bufsize); + mutex_exit(&ksp->ks_lock); } @@ -408,13 +460,47 @@ proc_kstat_open(struct inode *inode, struct file *filp) return rc; } +static ssize_t +proc_kstat_write(struct file *filp, const char __user *buf, + size_t len, loff_t *ppos) +{ + struct seq_file *f = filp->private_data; + kstat_t *ksp = f->private; + int rc; + + ASSERT(ksp->ks_magic == KS_MAGIC); + + mutex_enter(ksp->ks_lock); + rc = ksp->ks_update(ksp, KSTAT_WRITE); + mutex_exit(ksp->ks_lock); + + if (rc) + return (-rc); + + *ppos += len; + return (len); +} + static struct file_operations proc_kstat_operations = { - .open = proc_kstat_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, + .open = proc_kstat_open, + .write = proc_kstat_write, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, }; +void +__kstat_set_raw_ops(kstat_t *ksp, + int (*headers)(char *buf, size_t size), + int (*data)(char *buf, size_t size, void *data), + void *(*addr)(kstat_t *ksp, loff_t index)) +{ + ksp->ks_raw_ops.headers = headers; + ksp->ks_raw_ops.data = data; + ksp->ks_raw_ops.addr = addr; +} +EXPORT_SYMBOL(__kstat_set_raw_ops); + kstat_t * __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, const char *ks_class, uchar_t ks_type, uint_t ks_ndata, @@ -453,6 +539,11 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, ksp->ks_flags = ks_flags; ksp->ks_update = kstat_default_update; ksp->ks_private = NULL; + ksp->ks_raw_ops.headers = NULL; + ksp->ks_raw_ops.data = NULL; + ksp->ks_raw_ops.addr = NULL; + ksp->ks_raw_buf = NULL; + ksp->ks_raw_bufsize = 0; switch (ksp->ks_type) { case KSTAT_TYPE_RAW: @@ -526,7 +617,7 @@ __kstat_install(kstat_t *ksp) mutex_enter(&ksp->ks_lock); ksp->ks_owner = module; - ksp->ks_proc = proc_create_data(ksp->ks_name, 0444, + ksp->ks_proc = proc_create_data(ksp->ks_name, 0644, module->ksm_proc, &proc_kstat_operations, (void *)ksp); if (ksp->ks_proc == NULL) { list_del_init(&ksp->ks_list); From 09f38b7e60eea27637780822f86f80da8938bb1f Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 24 Sep 2013 16:11:56 -0700 Subject: [PATCH 0763/1062] Add wrappers for accessing PID and command info This change adds simple wrappers for accessing a thread's PID and command character string. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #296 --- include/sys/thread.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/thread.h b/include/sys/thread.h index 369b3061d..864a74bba 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -51,6 +51,8 @@ typedef void (*thread_func_t)(void *); #define thread_exit() __thread_exit() #define thread_join(t) VERIFY(0) #define curthread current +#define getcomm() current->comm +#define getpid() current->pid extern kthread_t *__thread_create(caddr_t stk, size_t stksize, thread_func_t func, const char *name, From ce07767f79c926acdbdf7bb272f05e89820f31c3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 30 Sep 2013 11:32:42 -0700 Subject: [PATCH 0764/1062] Revert "Add KSTAT_TYPE_TXG type" This reverts commit dba79fcbf2cc50be5caef84ae01657e884ac5d89 in favor of using the generic KSTAT_TYPE_RAW callbacks. The advantage of this approach is that arbitrary types can be added without the need to add them to the SPL. Signed-off-by: Brian Behlendorf Issue #296 --- include/sys/kstat.h | 23 +---------------------- module/spl/spl-kstat.c | 39 --------------------------------------- 2 files changed, 1 insertion(+), 61 deletions(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 75b384714..6e3c0cdfe 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -44,8 +44,7 @@ #define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */ #define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */ #define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */ -#define KSTAT_TYPE_TXG 5 /* txg sync; ks_ndata >= 1 */ -#define KSTAT_NUM_TYPES 6 +#define KSTAT_NUM_TYPES 5 #define KSTAT_DATA_CHAR 0 #define KSTAT_DATA_INT32 1 @@ -176,26 +175,6 @@ typedef struct kstat_timer { hrtime_t stop_time; /* previous event stop time */ } kstat_timer_t; -typedef enum kstat_txg_state { - TXG_STATE_OPEN = 1, - TXG_STATE_QUIESCING = 2, - TXG_STATE_SYNCING = 3, - TXG_STATE_COMMITTED = 4, -} kstat_txg_state_t; - -typedef struct kstat_txg { - u_longlong_t txg; /* txg id */ - kstat_txg_state_t state; /* txg state */ - hrtime_t birth; /* birth time stamp */ - u_longlong_t nread; /* number of bytes read */ - u_longlong_t nwritten; /* number of bytes written */ - uint_t reads; /* number of read operations */ - uint_t writes; /* number of write operations */ - hrtime_t open_time; /* open time */ - hrtime_t quiesce_time;/* quiesce time */ - hrtime_t sync_time; /* sync time */ -} kstat_txg_t; - int spl_kstat_init(void); void spl_kstat_fini(void); diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 57aabe2d0..ee65f4a77 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -106,14 +106,6 @@ restart: "name", "events", "elapsed", "min", "max", "start", "stop"); break; - case KSTAT_TYPE_TXG: - seq_printf(f, - "%-8s %-5s %-13s %-12s %-12s %-8s %-8s " - "%-12s %-12s %-12s\n", - "txg", "state", "birth", - "nread", "nwritten", "reads", "writes", - "otime", "qtime", "stime"); - break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } @@ -228,27 +220,6 @@ kstat_seq_show_timer(struct seq_file *f, kstat_timer_t *ktp) return 0; } -static int -kstat_seq_show_txg(struct seq_file *f, kstat_txg_t *ktp) -{ - char state; - - switch (ktp->state) { - case TXG_STATE_OPEN: state = 'O'; break; - case TXG_STATE_QUIESCING: state = 'Q'; break; - case TXG_STATE_SYNCING: state = 'S'; break; - case TXG_STATE_COMMITTED: state = 'C'; break; - default: state = '?'; break; - } - - seq_printf(f, - "%-8llu %-5c %-13llu %-12llu %-12llu %-8u %-8u " - "%12lld %12lld %12lld\n", ktp->txg, state, ktp->birth, - ktp->nread, ktp->nwritten, ktp->reads, ktp->writes, - ktp->open_time, ktp->quiesce_time, ktp->sync_time); - return 0; -} - static int kstat_seq_show(struct seq_file *f, void *p) { @@ -285,9 +256,6 @@ restart: case KSTAT_TYPE_TIMER: rc = kstat_seq_show_timer(f, (kstat_timer_t *)p); break; - case KSTAT_TYPE_TXG: - rc = kstat_seq_show_txg(f, (kstat_txg_t *)p); - break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } @@ -331,9 +299,6 @@ kstat_seq_data_addr(kstat_t *ksp, loff_t n) case KSTAT_TYPE_TIMER: rc = ksp->ks_data + n * sizeof(kstat_timer_t); break; - case KSTAT_TYPE_TXG: - rc = ksp->ks_data + n * sizeof(kstat_txg_t); - break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } @@ -566,10 +531,6 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, ksp->ks_ndata = ks_ndata; ksp->ks_data_size = ks_ndata * sizeof(kstat_timer_t); break; - case KSTAT_TYPE_TXG: - ksp->ks_ndata = ks_ndata; - ksp->ks_data_size = ks_ndata * sizeof(kstat_timer_t); - break; default: PANIC("Undefined kstat type %d\n", ksp->ks_type); } From ffbf0e57c2ad9e72ab437c7982f443926cb26325 Mon Sep 17 00:00:00 2001 From: Cyril Plisko Date: Tue, 13 Aug 2013 15:15:36 +0300 Subject: [PATCH 0765/1062] Kstat to use private lock by default While porting Illumos #3537 I found that ks_lock member of kstat_t structure is different between Illumos and SPL. It is a pointer to the kmutex_t in Illumos, but the mutex lock itself in SPL. Apparently Illumos kstat API allows consumer to override the lock if required. With SPL implementation it is not possible anymore. Things were alright until the first attempt to actually override the lock. Porting of Illumos #3537 introduced such code for the first time. In order to provide the Solaris/Illumos like functionality we: 1. convert ks_lock to "kmutex_t *ks_lock" 2. create a new field "kmutex_t ks_private_lock" 3. On kstat_create() ks_lock = &ks_private_lock Thus if consumer doesn't care we still have our internal lock in use. If, however, consumer does care she has a chance to set ks_lock to anything else before calling kstat_install(). The rest of the code will use ks_lock regardless of its origin. Signed-off-by: Ned Bass Signed-off-by: Brian Behlendorf Issue #286 --- include/sys/kstat.h | 3 ++- module/spl/spl-kstat.c | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 6e3c0cdfe..97d8596f7 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -114,7 +114,8 @@ struct kstat_s { struct proc_dir_entry *ks_proc; /* proc linkage */ kstat_update_t *ks_update; /* dynamic updates */ void *ks_private; /* private data */ - kmutex_t ks_lock; /* kstat data lock */ + kmutex_t ks_private_lock; /* kstat private data lock */ + kmutex_t *ks_lock; /* kstat data lock */ struct list_head ks_list; /* kstat linkage */ kstat_module_t *ks_owner; /* kstat module linkage */ kstat_raw_ops_t ks_raw_ops; /* ops table for raw type */ diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index ee65f4a77..7932678d7 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -314,7 +314,7 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) ASSERT(ksp->ks_magic == KS_MAGIC); SENTRY; - mutex_enter(&ksp->ks_lock); + mutex_enter(ksp->ks_lock); if (ksp->ks_type == KSTAT_TYPE_RAW) { ksp->ks_raw_bufsize = PAGE_SIZE; @@ -352,13 +352,13 @@ kstat_seq_next(struct seq_file *f, void *p, loff_t *pos) static void kstat_seq_stop(struct seq_file *f, void *v) { - kstat_t *ksp = (kstat_t *)f->private; - ASSERT(ksp->ks_magic == KS_MAGIC); + kstat_t *ksp = (kstat_t *)f->private; + ASSERT(ksp->ks_magic == KS_MAGIC); if (ksp->ks_type == KSTAT_TYPE_RAW) vmem_free(ksp->ks_raw_buf, ksp->ks_raw_bufsize); - mutex_exit(&ksp->ks_lock); + mutex_exit(ksp->ks_lock); } static struct seq_operations kstat_seq_ops = { @@ -491,7 +491,8 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, mutex_exit(&kstat_module_lock); ksp->ks_magic = KS_MAGIC; - mutex_init(&ksp->ks_lock, NULL, MUTEX_DEFAULT, NULL); + mutex_init(&ksp->ks_private_lock, NULL, MUTEX_DEFAULT, NULL); + ksp->ks_lock = &ksp->ks_private_lock; INIT_LIST_HEAD(&ksp->ks_list); ksp->ks_crtime = gethrtime(); @@ -576,7 +577,7 @@ __kstat_install(kstat_t *ksp) list_add_tail(&ksp->ks_list, &module->ksm_kstat_list); - mutex_enter(&ksp->ks_lock); + mutex_enter(ksp->ks_lock); ksp->ks_owner = module; ksp->ks_proc = proc_create_data(ksp->ks_name, 0644, module->ksm_proc, &proc_kstat_operations, (void *)ksp); @@ -585,7 +586,7 @@ __kstat_install(kstat_t *ksp) if (list_empty(&module->ksm_kstat_list)) kstat_delete_module(module); } - mutex_exit(&ksp->ks_lock); + mutex_exit(ksp->ks_lock); out: mutex_exit(&kstat_module_lock); } @@ -611,7 +612,8 @@ __kstat_delete(kstat_t *ksp) if (!(ksp->ks_flags & KSTAT_FLAG_VIRTUAL)) kmem_free(ksp->ks_data, ksp->ks_data_size); - mutex_destroy(&ksp->ks_lock); + ksp->ks_lock = NULL; + mutex_destroy(&ksp->ks_private_lock); kmem_free(ksp, sizeof(*ksp)); return; From f483a97a417ca7292d6a7d516a72558d385f2370 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Mon, 26 Aug 2013 16:42:11 -0700 Subject: [PATCH 0766/1062] 3537 add kstat_waitq_enter and friends These kstat interfaces are required to port "Illumos #3537 want pool io kstats" to ZFS on Linux. kstat_waitq_enter() kstat_waitq_exit() kstat_runq_enter() kstat_runq_exit() Additionally, zero out the ks_data buffer in __kstat_create() so that the kstat_io_t counters are initialized to zero. Signed-off-by: Brian Behlendorf --- include/sys/kstat.h | 4 +++ module/spl/spl-kstat.c | 68 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 97d8596f7..faf6b81da 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -189,6 +189,10 @@ extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, uchar_t ks_flags); extern void __kstat_install(kstat_t *ksp); extern void __kstat_delete(kstat_t *ksp); +extern void kstat_waitq_enter(kstat_io_t *); +extern void kstat_waitq_exit(kstat_io_t *); +extern void kstat_runq_enter(kstat_io_t *); +extern void kstat_runq_exit(kstat_io_t *); #define kstat_set_raw_ops(k,h,d,a) __kstat_set_raw_ops(k,h,d,a) #define kstat_create(m,i,n,c,t,s,f) __kstat_create(m,i,n,c,t,s,f) diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 7932678d7..c604a32f2 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -54,6 +54,72 @@ kstat_resize_raw(kstat_t *ksp) return 0; } +void +kstat_waitq_enter(kstat_io_t *kiop) +{ + hrtime_t new, delta; + ulong_t wcnt; + + new = gethrtime(); + delta = new - kiop->wlastupdate; + kiop->wlastupdate = new; + wcnt = kiop->wcnt++; + if (wcnt != 0) { + kiop->wlentime += delta * wcnt; + kiop->wtime += delta; + } +} +EXPORT_SYMBOL(kstat_waitq_enter); + +void +kstat_waitq_exit(kstat_io_t *kiop) +{ + hrtime_t new, delta; + ulong_t wcnt; + + new = gethrtime(); + delta = new - kiop->wlastupdate; + kiop->wlastupdate = new; + wcnt = kiop->wcnt--; + ASSERT((int)wcnt > 0); + kiop->wlentime += delta * wcnt; + kiop->wtime += delta; +} +EXPORT_SYMBOL(kstat_waitq_exit); + +void +kstat_runq_enter(kstat_io_t *kiop) +{ + hrtime_t new, delta; + ulong_t rcnt; + + new = gethrtime(); + delta = new - kiop->rlastupdate; + kiop->rlastupdate = new; + rcnt = kiop->rcnt++; + if (rcnt != 0) { + kiop->rlentime += delta * rcnt; + kiop->rtime += delta; + } +} +EXPORT_SYMBOL(kstat_runq_enter); + +void +kstat_runq_exit(kstat_io_t *kiop) +{ + hrtime_t new, delta; + ulong_t rcnt; + + new = gethrtime(); + delta = new - kiop->rlastupdate; + kiop->rlastupdate = new; + rcnt = kiop->rcnt--; + ASSERT((int)rcnt > 0); + kiop->rlentime += delta * rcnt; + kiop->rtime += delta; +} +EXPORT_SYMBOL(kstat_runq_exit); + static int kstat_seq_show_headers(struct seq_file *f) { @@ -539,7 +605,7 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, if (ksp->ks_flags & KSTAT_FLAG_VIRTUAL) { ksp->ks_data = NULL; } else { - ksp->ks_data = kmem_alloc(ksp->ks_data_size, KM_SLEEP); + ksp->ks_data = kmem_zalloc(ksp->ks_data_size, KM_SLEEP); if (ksp->ks_data == NULL) { kmem_free(ksp, sizeof(*ksp)); ksp = NULL; From 184c6873874c350bfb0b74f9e08ec8d89750d603 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 1 Nov 2013 13:37:58 -0700 Subject: [PATCH 0767/1062] Emulate illumos interface cv_timedwait_hires() Needed for Illumos #3582. This interface is supposed to support a variable-resolution timeout with nanosecond granularity. This implementation rounds up to microsecond resolution, as nanosecond- precision timing is rarely needed for real-world performance tuning and may incur unnecessary busy-waiting. usleep_range() is used if available, otherwise udelay() or msleep() are used depending on the length of the delay interval. Add flags from sys/callo.h as these are used to control the behavior of cv_timedwait_hires(). Specifically, CALLOUT_FLAG_ABSOLUTE Normally, the expiration passed to the timeout API functions is an expiration interval. If this flag is specified, then it is interpreted as the expiration time itself. CALLOUT_FLAG_ROUNDUP Roundup the expiration time to the next resolution boundary. If this flag is not specified, the expiration time is rounded down. References: https://www.illumos.org/issues/3582 illumos/illumos-gate@0689f76 Signed-off-by: Brian Behlendorf Closes #304 --- config/spl-build.m4 | 23 ++++++++++ include/linux/Makefile.am | 1 + include/linux/delay_compat.h | 47 +++++++++++++++++++++ include/sys/Makefile.am | 1 + include/sys/callo.h | 52 +++++++++++++++++++++++ include/sys/condvar.h | 4 ++ include/sys/time.h | 3 ++ module/spl/spl-condvar.c | 81 ++++++++++++++++++++++++++++++++++++ 8 files changed, 212 insertions(+) create mode 100644 include/linux/delay_compat.h create mode 100644 include/sys/callo.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index f54c5b166..b0e334815 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -93,6 +93,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_RWSEM_SPINLOCK_IS_RAW SPL_AC_SCHED_RT_HEADER SPL_AC_2ARGS_VFS_GETATTR + SPL_AC_USLEEP_RANGE ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2400,3 +2401,25 @@ AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [ ]) ]) ]) + +dnl # +dnl # 2.6.36 API compatibility. +dnl # Added usleep_range timer. +dnl # usleep_range is a finer precision implementation of msleep +dnl # designed to be a drop-in replacement for udelay where a precise +dnl # sleep / busy-wait is unnecessary. +dnl # +AC_DEFUN([SPL_AC_USLEEP_RANGE], [ + AC_MSG_CHECKING([whether usleep_range() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + usleep_range(0, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_USLEEP_RANGE, 1, + [usleep_range is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 730f7695b..59f2ec5ab 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -3,6 +3,7 @@ COMMON_H = KERNEL_H = \ $(top_srcdir)/include/linux/bitops_compat.h \ $(top_srcdir)/include/linux/compiler_compat.h \ + $(top_srcdir)/include/linux/delay_compat.h \ $(top_srcdir)/include/linux/file_compat.h \ $(top_srcdir)/include/linux/kallsyms_compat.h \ $(top_srcdir)/include/linux/list_compat.h \ diff --git a/include/linux/delay_compat.h b/include/linux/delay_compat.h new file mode 100644 index 000000000..fc9ff66f5 --- /dev/null +++ b/include/linux/delay_compat.h @@ -0,0 +1,47 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_DELAY_COMPAT_H +#define _SPL_DELAY_COMPAT_H + +#include +#include + +/* usleep_range() introduced in 2.6.36 */ +#ifndef HAVE_USLEEP_RANGE + +static inline void +usleep_range(unsigned long min, unsigned long max) +{ + unsigned int min_ms = min / USEC_PER_MSEC; + + if (min >= MAX_UDELAY_MS) + msleep(min_ms); + else + udelay(min); +} + +#endif /* HAVE_USLEEP_RANGE */ + +#endif /* _SPL_DELAY_COMPAT_H */ diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 0e86a2894..9d8263657 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -13,6 +13,7 @@ KERNEL_H = \ $(top_srcdir)/include/sys/buf.h \ $(top_srcdir)/include/sys/byteorder.h \ $(top_srcdir)/include/sys/callb.h \ + $(top_srcdir)/include/sys/callo.h \ $(top_srcdir)/include/sys/cmn_err.h \ $(top_srcdir)/include/sys/compress.h \ $(top_srcdir)/include/sys/condvar.h \ diff --git a/include/sys/callo.h b/include/sys/callo.h new file mode 100644 index 000000000..0d9fbcbc4 --- /dev/null +++ b/include/sys/callo.h @@ -0,0 +1,52 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_CALLO_H +#define _SPL_CALLO_H + +/* + * Callout flags: + * + * CALLOUT_FLAG_ROUNDUP + * Roundup the expiration time to the next resolution boundary. + * If this flag is not specified, the expiration time is rounded down. + * CALLOUT_FLAG_ABSOLUTE + * Normally, the expiration passed to the timeout API functions is an + * expiration interval. If this flag is specified, then it is + * interpreted as the expiration time itself. + * CALLOUT_FLAG_HRESTIME + * Normally, callouts are not affected by changes to system time + * (hrestime). This flag is used to create a callout that is affected + * by system time. If system time changes, these timers must be + * handled in a special way (see callout.c). These are used by condition + * variables and LWP timers that need this behavior. + * CALLOUT_FLAG_32BIT + * Legacy interfaces timeout() and realtime_timeout() pass this flag + * to timeout_generic() to indicate that a 32-bit ID should be allocated. + */ +#define CALLOUT_FLAG_ROUNDUP 0x1 +#define CALLOUT_FLAG_ABSOLUTE 0x2 +#define CALLOUT_FLAG_HRESTIME 0x4 +#define CALLOUT_FLAG_32BIT 0x8 + +#endif /* _SPL_CALLB_H */ diff --git a/include/sys/condvar.h b/include/sys/condvar.h index c825bd2e4..c9f2bea12 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -27,8 +27,10 @@ #include #include +#include #include #include +#include /* * The kcondvar_t struct is protected by mutex taken externally before @@ -56,6 +58,8 @@ extern void __cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp); extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time); extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time); +extern clock_t cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, + hrtime_t tim, hrtime_t res, int flag); extern void __cv_signal(kcondvar_t *cvp); extern void __cv_broadcast(kcondvar_t *cvp); diff --git a/include/sys/time.h b/include/sys/time.h index f8d78d194..d8e81c9a7 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -47,6 +47,9 @@ #define MICROSEC 1000000 #define NANOSEC 1000000000 +#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC)) +#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC)) + /* Already defined in include/linux/time.h */ #undef CLOCK_THREAD_CPUTIME_ID #undef CLOCK_REALTIME diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 60cf726f9..283648aac 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -226,6 +226,87 @@ __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) } EXPORT_SYMBOL(__cv_timedwait_interruptible); +/* + *'expire_time' argument is an absolute clock time in nanoseconds. + * Return value is time left (expire_time - now) or -1 if timeout occurred. + */ +static clock_t +__cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, + hrtime_t expire_time, int state) +{ + DEFINE_WAIT(wait); + hrtime_t time_left, now; + unsigned long time_left_us; + SENTRY; + + ASSERT(cvp); + ASSERT(mp); + ASSERT(cvp->cv_magic == CV_MAGIC); + ASSERT(mutex_owned(mp)); + atomic_inc(&cvp->cv_refs); + + if (cvp->cv_mutex == NULL) + cvp->cv_mutex = mp; + + /* Ensure the same mutex is used by all callers */ + ASSERT(cvp->cv_mutex == mp); + + now = gethrtime(); + time_left = expire_time - now; + if (time_left <= 0) { + atomic_dec(&cvp->cv_refs); + SRETURN(-1); + } + time_left_us = time_left / NSEC_PER_USEC; + + prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); + atomic_inc(&cvp->cv_waiters); + + /* Mutex should be dropped after prepare_to_wait() this + * ensures we're linked in to the waiters list and avoids the + * race where 'cvp->cv_waiters > 0' but the list is empty. */ + mutex_exit(mp); + /* Allow a 100 us range to give kernel an opportunity to coalesce + * interrupts */ + usleep_range(time_left_us, time_left_us + 100); + mutex_enter(mp); + + /* No more waiters a different mutex could be used */ + if (atomic_dec_and_test(&cvp->cv_waiters)) { + cvp->cv_mutex = NULL; + wake_up(&cvp->cv_destroy); + } + + finish_wait(&cvp->cv_event, &wait); + atomic_dec(&cvp->cv_refs); + + time_left = expire_time - gethrtime(); + SRETURN(time_left > 0 ? time_left : -1); +} + +/* + * Compatibility wrapper for the cv_timedwait_hires() Illumos interface. + */ +clock_t +cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, + hrtime_t res, int flag) +{ + if (res > 1) { + /* + * Align expiration to the specified resolution. + */ + if (flag & CALLOUT_FLAG_ROUNDUP) + tim += res - 1; + tim = (tim / res) * res; + } + + if (!(flag & CALLOUT_FLAG_ABSOLUTE)) + tim += gethrtime(); + + return __cv_timedwait_hires(cvp, mp, tim, TASK_UNINTERRUPTIBLE); +} +EXPORT_SYMBOL(cv_timedwait_hires); + void __cv_signal(kcondvar_t *cvp) { From c3d9c0df3ee8d43db22815ebbfbe8b803fa46e46 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 5 Nov 2013 11:35:54 -0500 Subject: [PATCH 0768/1062] Linux 3.12 compat: New shrinker API torvalds/linux@24f7c6 introduced a new shrinker API while torvalds/linux@a0b021 dropped support for the old shrinker API. This patch adds support for the new shrinker API by wrapping the old one with the new one. This change also reorganizes the autotools checks on the shrinker API such that the configure script will fail early if an unknown API is encountered in the future. Support for the set_shrinker() API which was used by Linux 2.6.22 and older has been dropped. As a general rule compatibility is only maintained back to Linux 2.6.26. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#1732 Closes zfsonlinux/zfs#1822 Closes #293 Closes #307 --- config/spl-build.m4 | 116 +++++++++++++----- include/linux/mm_compat.h | 242 ++++++++++++++++++++++++-------------- 2 files changed, 237 insertions(+), 121 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b0e334815..7d744db13 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -27,8 +27,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_TYPE_ATOMIC64_XCHG SPL_AC_TYPE_UINTPTR_T SPL_AC_2ARGS_REGISTER_SYSCTL - SPL_AC_SET_SHRINKER - SPL_AC_3ARGS_SHRINKER_CALLBACK + SPL_AC_SHRINKER_CALLBACK SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED @@ -885,37 +884,18 @@ AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], ]) ]) -dnl # -dnl # 2.6.23 API change -dnl # Old set_shrinker API replaced with register_shrinker -dnl # -AC_DEFUN([SPL_AC_SET_SHRINKER], [ - AC_MSG_CHECKING([whether set_shrinker() available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - return set_shrinker(DEFAULT_SEEKS, NULL); - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_SET_SHRINKER, 1, - [set_shrinker() available]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) - -dnl # -dnl # 2.6.35 API change, -dnl # Add context to shrinker callback -dnl # -AC_DEFUN([SPL_AC_3ARGS_SHRINKER_CALLBACK], - [AC_MSG_CHECKING([whether shrinker callback wants 3 args]) +AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Werror" + dnl # + dnl # 2.6.23 to 2.6.34 API change + dnl # ->shrink(int nr_to_scan, gfp_t gfp_mask) + dnl # + AC_MSG_CHECKING([whether old 2-argument shrinker exists]) SPL_LINUX_TRY_COMPILE([ #include - int shrinker_cb(struct shrinker *, int, unsigned int); + int shrinker_cb(int nr_to_scan, gfp_t gfp_mask); ],[ struct shrinker cache_shrinker = { .shrink = shrinker_cb, @@ -924,10 +904,86 @@ AC_DEFUN([SPL_AC_3ARGS_SHRINKER_CALLBACK], register_shrinker(&cache_shrinker); ],[ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1, - [shrinker callback wants 3 args]) + AC_DEFINE(HAVE_2ARGS_OLD_SHRINKER_CALLBACK, 1, + [old shrinker callback wants 2 args]) ],[ AC_MSG_RESULT(no) + dnl # + dnl # 2.6.35 - 2.6.39 API change + dnl # ->shrink(struct shrinker *, + dnl # int nr_to_scan, gfp_t gfp_mask) + dnl # + AC_MSG_CHECKING([whether old 3-argument shrinker exists]) + SPL_LINUX_TRY_COMPILE([ + #include + + int shrinker_cb(struct shrinker *, int nr_to_scan, + gfp_t gfp_mask); + ],[ + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1, + [old shrinker callback wants 3 args]) + ],[ + AC_MSG_RESULT(no) + dnl # + dnl # 3.0 - 3.11 API change + dnl # ->shrink(struct shrinker *, + dnl # struct shrink_control *sc) + dnl # + AC_MSG_CHECKING( + [whether new 2-argument shrinker exists]) + SPL_LINUX_TRY_COMPILE([ + #include + + int shrinker_cb(struct shrinker *, + struct shrink_control *sc); + ],[ + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_NEW_SHRINKER_CALLBACK, 1, + [new shrinker callback wants 2 args]) + ],[ + AC_MSG_RESULT(no) + dnl # + dnl # 3.12 API change, + dnl # ->shrink() is logically split in to + dnl # ->count_objects() and ->scan_objects() + dnl # + AC_MSG_CHECKING( + [whether ->count_objects callback exists]) + SPL_LINUX_TRY_COMPILE([ + #include + + unsigned long shrinker_cb( + struct shrinker *, + struct shrink_control *sc); + ],[ + struct shrinker cache_shrinker = { + .count_objects = shrinker_cb, + .scan_objects = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK, + 1, [->count_objects exists]) + ],[ + AC_MSG_ERROR(error) + ]) + ]) + ]) ]) EXTRA_KCFLAGS="$tmp_flags" ]) diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index cb1bef9a4..37c9b0875 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -148,107 +148,167 @@ extern shrink_icache_memory_t shrink_icache_memory_fn; #endif /* HAVE_SHRINK_ICACHE_MEMORY */ /* - * Linux 2.6. - 2.6. Shrinker API Compatibility. + * Due to frequent changes in the shrinker API the following + * compatibility wrappers should be used. They are as follows: + * + * SPL_SHRINKER_DECLARE is used to declare the shrinker which is + * passed to spl_register_shrinker()/spl_unregister_shrinker(). Use + * shrinker_name to set the shrinker variable name, shrinker_callback + * to set the callback function, and seek_cost to define the cost of + * reclaiming an object. + * + * SPL_SHRINKER_DECLARE(shrinker_name, shrinker_callback, seek_cost); + * + * SPL_SHRINKER_CALLBACK_FWD_DECLARE is used when a forward declaration + * of the shrinker callback function is required. Only the callback + * function needs to be passed. + * + * SPL_SHRINKER_CALLBACK_FWD_DECLARE(shrinker_callback); + * + * SPL_SHRINKER_CALLBACK_WRAPPER is used to declare the callback function + * which is registered with the shrinker. This function will call your + * custom shrinker which must use the following prototype. Notice the + * leading __'s, these must be appended to the callback_function name. + * + * int __shrinker_callback(struct shrinker *, struct shrink_control *) + * SPL_SHRINKER_CALLBACK_WRAPPER(shrinker_callback);a + * + * + * Example: + * + * SPL_SHRINKER_CALLBACK_FWD_DECLARE(my_shrinker_fn); + * SPL_SHRINKER_DECLARE(my_shrinker, my_shrinker_fn, 1); + * + * static int + * __my_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) + * { + * if (sc->nr_to_scan) { + * ...scan objects in the cache and reclaim them... + * } + * + * ...calculate number of objects in the cache... + * + * return (number of objects in the cache); + * } + * SPL_SHRINKER_CALLBACK_WRAPPER(my_shrinker_fn); */ -#ifdef HAVE_SET_SHRINKER -typedef struct spl_shrinker { - struct shrinker *shrinker; - shrinker_t fn; - int seeks; -} spl_shrinker_t; -static inline void -spl_register_shrinker(spl_shrinker_t *ss) -{ - ss->shrinker = set_shrinker(ss->seeks, ss->fn); +#define spl_register_shrinker(x) register_shrinker(x) +#define spl_unregister_shrinker(x) unregister_shrinker(x) + +/* + * Linux 2.6.23 - 2.6.34 Shrinker API Compatibility. + */ +#if defined(HAVE_2ARGS_OLD_SHRINKER_CALLBACK) +#define SPL_SHRINKER_DECLARE(s, x, y) \ +static struct shrinker s = { \ + .shrink = x, \ + .seeks = y \ } -static inline void -spl_unregister_shrinker(spl_shrinker_t *ss) -{ - remove_shrinker(ss->shrinker); +#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ +static int fn(int nr_to_scan, unsigned int gfp_mask) + +#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static int \ +fn(int nr_to_scan, unsigned int gfp_mask) \ +{ \ + struct shrink_control sc; \ + \ + sc.nr_to_scan = nr_to_scan; \ + sc.gfp_mask = gfp_mask; \ + \ + return (__ ## fn(NULL, &sc)); \ } -# define SPL_SHRINKER_DECLARE(s, x, y) \ - static spl_shrinker_t s = { \ - .shrinker = NULL, \ - .fn = x, \ - .seeks = y \ - } - -# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ - static int fn(int, unsigned int) -# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ -static int \ -fn(int nr_to_scan, unsigned int gfp_mask) \ -{ \ - struct shrink_control sc; \ - \ - sc.nr_to_scan = nr_to_scan; \ - sc.gfp_mask = gfp_mask; \ - \ - return __ ## fn(NULL, &sc); \ +/* + * Linux 2.6.35 to 2.6.39 Shrinker API Compatibility. + */ +#elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) +#define SPL_SHRINKER_DECLARE(s, x, y) \ +static struct shrinker s = { \ + .shrink = x, \ + .seeks = y \ } +#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ +static int fn(struct shrinker *, int, unsigned int) + +#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static int \ +fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask) \ +{ \ + struct shrink_control sc; \ + \ + sc.nr_to_scan = nr_to_scan; \ + sc.gfp_mask = gfp_mask; \ + \ + return (__ ## fn(shrink, &sc)); \ +} + +/* + * Linux 3.0 to 3.11 Shrinker API Compatibility. + */ +#elif defined(HAVE_2ARGS_NEW_SHRINKER_CALLBACK) +#define SPL_SHRINKER_DECLARE(s, x, y) \ +static struct shrinker s = { \ + .shrink = x, \ + .seeks = y \ +} + +#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ +static int fn(struct shrinker *, struct shrink_control *) + +#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static int \ +fn(struct shrinker *shrink, struct shrink_control *sc) \ +{ \ + return (__ ## fn(shrink, sc)); \ +} + +/* + * Linux 3.12 and later Shrinker API Compatibility. + */ +#elif defined(HAVE_SPLIT_SHRINKER_CALLBACK) +#define SPL_SHRINKER_DECLARE(s, x, y) \ +static struct shrinker s = { \ + .count_objects = x ## _count_objects, \ + .scan_objects = x ## _scan_objects, \ + .seeks = y \ +} + +#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ +static unsigned long fn ## _count_objects(struct shrinker *, \ + struct shrink_control *); \ +static unsigned long fn ## _scan_objects(struct shrinker *, \ + struct shrink_control *) + +#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ +static unsigned long \ +fn ## _count_objects(struct shrinker *shrink, struct shrink_control *sc)\ +{ \ + int __ret__; \ + \ + sc->nr_to_scan = 0; \ + __ret__ = __ ## fn(NULL, sc); \ + \ + /* Errors may not be returned and must be converted to zeros */ \ + return ((__ret__ < 0) ? 0 : __ret__); \ +} \ + \ +static unsigned long \ +fn ## _scan_objects(struct shrinker *shrink, struct shrink_control *sc) \ +{ \ + int __ret__; \ + \ + __ret__ = __ ## fn(NULL, sc); \ + return ((__ret__ < 0) ? SHRINK_STOP : __ret__); \ +} #else - -# define spl_register_shrinker(x) register_shrinker(x) -# define spl_unregister_shrinker(x) unregister_shrinker(x) -# define SPL_SHRINKER_DECLARE(s, x, y) \ - static struct shrinker s = { \ - .shrink = x, \ - .seeks = y \ - } - /* - * Linux 2.6. - 2.6. Shrinker API Compatibility. + * Linux 2.x to 2.6.22, or a newer shrinker API has been introduced. */ -# if defined(HAVE_SHRINK_CONTROL_STRUCT) -# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ - static int fn(struct shrinker *, struct shrink_control *) -# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ -static int \ -fn(struct shrinker *shrink, struct shrink_control *sc) { \ - return __ ## fn(shrink, sc); \ -} - -/* - * Linux 2.6. - 2.6. Shrinker API Compatibility. - */ -# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) -# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ - static int fn(struct shrinker *, int, unsigned int) -# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ -static int \ -fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask) \ -{ \ - struct shrink_control sc; \ - \ - sc.nr_to_scan = nr_to_scan; \ - sc.gfp_mask = gfp_mask; \ - \ - return __ ## fn(shrink, &sc); \ -} - -/* - * Linux 2.6. - 2.6. Shrinker API Compatibility. - */ -# else -# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ - static int fn(int, unsigned int) -# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \ -static int \ -fn(int nr_to_scan, unsigned int gfp_mask) \ -{ \ - struct shrink_control sc; \ - \ - sc.nr_to_scan = nr_to_scan; \ - sc.gfp_mask = gfp_mask; \ - \ - return __ ## fn(NULL, &sc); \ -} - -# endif -#endif /* HAVE_SET_SHRINKER */ +#error "Unknown shrinker callback" +#endif #endif /* SPL_MM_COMPAT_H */ From 9bd8cbc53d46c09d2f465d4207eaa00c26e29fc5 Mon Sep 17 00:00:00 2001 From: Cyril Plisko Date: Thu, 14 Nov 2013 13:58:35 -0800 Subject: [PATCH 0769/1062] Tighten spl dependency on spl-kmod Make spl depend on the same version of spl-kmod, rather than on same or better. When yum repository contains a number of versions the dependency resolution breaks on trying to install non-latest version. Signed-off-by: Cyril Plisko Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#1677 --- rpm/generic/spl.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 804584a63..7f4a65ef5 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -13,7 +13,7 @@ ExclusiveArch: i386 i686 x86_64 # May build but untested on ppc/ppc64 ExcludeArch: ppc ppc64 -Requires: %{name}-kmod >= %{version} +Requires: %{name}-kmod = %{version} Provides: %{name}-kmod-common = %{version} %description From dd33a169ef1e071c2eb777328fe91df30ce542ae Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 14 Nov 2013 14:05:45 -0800 Subject: [PATCH 0770/1062] Retroactively fix bogus %changelog date New versions of rpmbuild detect the invalid date which was added incorrectly to the changelog. To silence this noise fix it. Signed-off-by: Brian Behlendorf Closes #306 --- rpm/generic/spl-kmod.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index e8d88c170..50947c035 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -162,5 +162,5 @@ rm -rf $RPM_BUILD_ROOT %changelog * Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 - Released 0.6.2-1 -* Tue Mar 22 2013 Brian Behlendorf - 0.6.1-1 +* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 - First official stable release. From 30607d9b7b82dcb50eebe15d5b78cfd6deef07a5 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Mon, 18 Nov 2013 13:46:10 +0000 Subject: [PATCH 0771/1062] Document SPL module parameters. This is a first draft of a spl-module-parameters(5) man page. I have just extracted the parameter name and its description with modinfo, then checked the source what type it is and its default value. This will need more work, preferably someone that actually know these values and what to use them for. Similar to zfsonlinux/zfs#1856, but for the spl. Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#1856 --- configure.ac | 1 + man/Makefile.am | 2 +- man/man5/Makefile.am | 5 ++ man/man5/spl-module-parameters.5 | 126 +++++++++++++++++++++++++++++++ rpm/generic/spl.spec.in | 1 + 5 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 man/man5/Makefile.am create mode 100644 man/man5/spl-module-parameters.5 diff --git a/configure.ac b/configure.ac index 477229829..e81ddfbc8 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,7 @@ AC_CONFIG_FILES([ Makefile man/Makefile man/man1/Makefile + man/man5/Makefile lib/Makefile cmd/Makefile module/Makefile diff --git a/man/Makefile.am b/man/Makefile.am index 7dc2a57d1..7791945cf 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1 +1 @@ -SUBDIRS = man1 +SUBDIRS = man1 man5 diff --git a/man/man5/Makefile.am b/man/man5/Makefile.am new file mode 100644 index 000000000..06a823325 --- /dev/null +++ b/man/man5/Makefile.am @@ -0,0 +1,5 @@ +man_MANS = spl-module-parameters.5 +EXTRA_DIST = $(man_MANS) + +install-data-local: + $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man5" diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 new file mode 100644 index 000000000..3c134f775 --- /dev/null +++ b/man/man5/spl-module-parameters.5 @@ -0,0 +1,126 @@ +'\" te +.\" +.\" Copyright 2013 Turbo Fredriksson . All rights reserved. +.\" +.TH SPL-MODULE-PARAMETERS 5 "Nov 18, 2013" +.SH NAME +spl\-module\-parameters \- SPL module parameters +.SH DESCRIPTION +.sp +.LP +Description of the different parameters to the SPL module. + +.SS "Module parameters" +.sp +.LP + +.sp +.ne 2 +.na +\fBspl_debug_subsys\fR (ulong) +.ad +.RS 12n +Subsystem debugging level mask. +.sp +Default value: \fB~0\fR. +.RE + +.sp +.ne 2 +.na +\fBspl_debug_mask\fR (ulong) +.ad +.RS 12n +Debugging level mask. +.sp +Default value: \fB8 | 10 | 4 | 20\fR (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE). +.RE + +.sp +.ne 2 +.na +\fBspl_debug_printk\fR (ulong) +.ad +.RS 12n +Console printk level mask. +.sp +Default value: \fB8 | 10 | 4 | 20\fR (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE). +.RE + +.sp +.ne 2 +.na +\fBspl_debug_mb\fR (int) +.ad +.RS 12n +Total debug buffer size. +.sp +Default value: \fB-1\fR. +.RE + +.sp +.ne 2 +.na +\fBspl_debug_panic_on_bug\fR (int) +.ad +.RS 12n +Panic on BUG +.sp +Use \fB1\fR for yes and \fB0\fR for no (default). +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_cache_expire\fR (uint) +.ad +.RS 12n +By age (0x1) or low memory (0x2) +.sp +Default value: \fB0\fR. +.RE + +.sp +.ne 2 +.na +\fBspl_hostid\fR (ulong) +.ad +.RS 12n +The system hostid. +.sp +Default value: \fB0xFFFFFFFF\fR (an invalid hostid!) +.RE + +.sp +.ne 2 +.na +\fBspl_hostid_path\fR (charp) +.ad +.RS 12n +The system hostid file +.sp +Default value: \fB/etc/hostid\fR. +.RE + +.sp +.ne 2 +.na +\fBmutex_spin_max\fR (int) +.ad +.RS 12n +Spin a maximum of N times to acquire lock +.sp +.ne 2 +.na +\fBPossible values:\fR +.sp +.RS 12n + \fB0\fR Never spin when trying to acquire lock +.sp +\fB-1\fR Spin until acquired or holder yields without dropping lock +.sp +\fB1-MAX_INT\fR Spin for N attempts before sleeping for lock +.RE +.sp +.ne -4 +Default value: \fB0\fR. diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 7f4a65ef5..a0fe29817 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -35,6 +35,7 @@ make install DESTDIR=%{?buildroot} %doc AUTHORS COPYING DISCLAIMER %{_sbindir}/* %{_mandir}/man1/* +%{_mandir}/man5/* %changelog * Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 From 3e96de17d723d6f6c9e2fd04b059b50d4e0bbef0 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 8 Aug 2013 04:30:55 -0400 Subject: [PATCH 0772/1062] Linux 3.13 compat: Remove unused flags variable from __cv_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 4.8.1 complained about an unused flags variable when building against Linux 2.6.26.8: /var/tmp/portage/sys-kernel/spl-9999/work/spl-9999/module/spl/../../module/spl/spl-condvar.c: In function ‘__cv_init’: /var/tmp/portage/sys-kernel/spl-9999/work/spl-9999/module/spl/../../module/spl/spl-condvar.c:39:6: error: variable ‘flags’ set but not used [-Werror=unused-but-set-variable] int flags = KM_SLEEP; ^ cc1: all warnings being treated as errors Additionally, the superfluous code uses a preempt_count variable that is no longer available on Linux 3.13. Deleting the unnecessary code fixes a Linux 3.13 compatibility issue. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #312 --- module/spl/spl-condvar.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 283648aac..8236412dd 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -36,8 +36,6 @@ void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) { - int flags = KM_SLEEP; - SENTRY; ASSERT(cvp); ASSERT(name == NULL); @@ -51,12 +49,6 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) atomic_set(&cvp->cv_refs, 1); cvp->cv_mutex = NULL; - /* We may be called when there is a non-zero preempt_count or - * interrupts are disabled is which case we must not sleep. - */ - if (current_thread_info()->preempt_count || irqs_disabled()) - flags = KM_NOSLEEP; - SEXIT; } EXPORT_SYMBOL(__cv_init); From 50a0749eba31e821a7edf286f1e3b149f7d13c59 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 25 Nov 2013 11:22:33 -0500 Subject: [PATCH 0773/1062] Linux 3.13 compat: Pass NULL for new delegated inode argument This check was originally added for SLES10, a093c6a, to check for a 'struct vfsmount *' argument which they added. However, since SLES10 is based on a 2.6.16 kernel which is no longer supported this functionality was dropped. The checks were refactored to support Linux 3.13 without concern for historical versions. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #312 --- config/spl-build.m4 | 52 ++++++++++++++++++++++++++++++++++-------- module/spl/spl-vnode.c | 22 ++++++++++-------- 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7d744db13..84267807d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1842,41 +1842,73 @@ AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # SLES API change, never adopted in mainline, -dnl # Third 'struct vfsmount *' argument removed. -dnl # AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK], [AC_MSG_CHECKING([whether vfs_unlink() wants 2 args]) SPL_LINUX_TRY_COMPILE([ #include ],[ - vfs_unlink(NULL, NULL); + vfs_unlink((struct inode *) NULL, (struct dentry *) NULL); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_2ARGS_VFS_UNLINK, 1, [vfs_unlink() wants 2 args]) ],[ AC_MSG_RESULT(no) + dnl # + dnl # Linux 3.13 API change + dnl # Added delegated inode + dnl # + AC_MSG_CHECKING([whether vfs_unlink() wants 3 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_unlink((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_VFS_UNLINK, 1, + [vfs_unlink() wants 3 args]) + ],[ + AC_MSG_ERROR(no) + ]) + ]) ]) -dnl # -dnl # SLES API change, never adopted in mainline, -dnl # Third and sixth 'struct vfsmount *' argument removed. -dnl # AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME], [AC_MSG_CHECKING([whether vfs_rename() wants 4 args]) SPL_LINUX_TRY_COMPILE([ #include ],[ - vfs_rename(NULL, NULL, NULL, NULL); + vfs_rename((struct inode *) NULL, (struct dentry *) NULL, + (struct inode *) NULL, (struct dentry *) NULL); ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_4ARGS_VFS_RENAME, 1, [vfs_rename() wants 4 args]) ],[ AC_MSG_RESULT(no) + dnl # + dnl # Linux 3.13 API change + dnl # Added delegated inode + dnl # + AC_MSG_CHECKING([whether vfs_rename() wants 5 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_rename((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_5ARGS_VFS_RENAME, 1, + [vfs_rename() wants 5 args]) + ],[ + AC_MSG_ERROR(no) + ]) ]) ]) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 0784ff261..549606770 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -334,7 +334,11 @@ vn_remove(const char *path, uio_seg_t seg, int flags) if (inode) ihold(inode); +#ifdef HAVE_2ARGS_VFS_UNLINK rc = vfs_unlink(parent.dentry->d_inode, dentry); +#else + rc = vfs_unlink(parent.dentry->d_inode, dentry, NULL); +#endif /* HAVE_2ARGS_VFS_UNLINK */ exit1: dput(dentry); } else { @@ -412,10 +416,10 @@ vn_rename(const char *oldname, const char *newname, int x1) #ifdef HAVE_4ARGS_VFS_RENAME rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry); + new_dir->d_inode, new_dentry); #else - rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt, - new_dir->d_inode, new_dentry, newnd.nd_mnt); + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry, NULL); #endif /* HAVE_4ARGS_VFS_RENAME */ exit4: unlock_rename(new_dir, old_dir); @@ -478,9 +482,9 @@ vn_remove(const char *path, uio_seg_t seg, int flags) if (inode) atomic_inc(&inode->i_count); #ifdef HAVE_2ARGS_VFS_UNLINK - rc = vfs_unlink(nd.nd_dentry->d_inode, dentry); + rc = vfs_unlink(nd.nd_dentry->d_inode, dentry); #else - rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, nd.nd_mnt); + rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, NULL); #endif /* HAVE_2ARGS_VFS_UNLINK */ exit2: dput(dentry); @@ -571,11 +575,11 @@ vn_rename(const char *oldname, const char *newname, int x1) SGOTO(exit5, rc); #ifdef HAVE_4ARGS_VFS_RENAME - rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry); + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry); #else - rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt, - new_dir->d_inode, new_dentry, newnd.nd_mnt); + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry, NULL); #endif /* HAVE_4ARGS_VFS_RENAME */ exit5: dput(new_dentry); From 921a35adeb9ccfa123add942bfe20837454138fa Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 4 Dec 2013 10:14:14 -0800 Subject: [PATCH 0774/1062] Add module versioning Use the standard Linux MODULE_VERSION macro to expose the installed spl and splat module versions. This will also automatically add a checksum of the .c files and headers in "srcversion". See: /sys/module/spl/version /sys/module/spl/srcversion /sys/module/splat/version /sys/module/splat/srcversion Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#1923 Signed-off-by: Brian Behlendorf --- module/spl/spl-generic.c | 1 + module/splat/splat-ctl.c | 1 + 2 files changed, 2 insertions(+) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 3cef48946..351f53670 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -759,3 +759,4 @@ module_exit(spl_fini); MODULE_AUTHOR("Lawrence Livermore National Labs"); MODULE_DESCRIPTION("Solaris Porting Layer"); MODULE_LICENSE("GPL"); +MODULE_VERSION(SPL_META_VERSION "-" SPL_META_RELEASE); diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 54b2ff459..6bbe0abba 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -721,3 +721,4 @@ spl_module_exit(splat_fini); MODULE_AUTHOR("Lawrence Livermore National Labs"); MODULE_DESCRIPTION("Solaris Porting LAyer Tests"); MODULE_LICENSE("GPL"); +MODULE_VERSION(SPL_META_VERSION "-" SPL_META_RELEASE); From 2f117de8beca7da1d22103df4630e9298afae370 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 6 Jan 2014 15:08:35 -0800 Subject: [PATCH 0775/1062] Include linux/vmalloc.h for ARM and Sparc Related to issue #257 which added Linux 3.10 compatibility. For ARM and Sparc architectures we must explicitly include the header to ensure the vmalloc_info structure is always defined when available. Signed-off-by: Brian Behlendorf Issue #257 Closes #291 --- include/sys/vmsystm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 909749103..adff77429 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include From aeeb4e0c0ae75b99ebbaa3056f0afc8e12949532 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 6 Jan 2014 16:31:49 -0800 Subject: [PATCH 0776/1062] Remove default taskq thread to CPU bindings When this code was written it appears to have been assumed that every taskq would have a large number of threads. In this case it would make sense to attempt to evenly bind the threads over all available CPUs. However, it failed to consider that creating taskqs with a small number of threads will cause the CPUs with lower ids become over-subscribed. For this reason the kthread_bind() call is being removed and we're leaving the kernel to schedule these threads as it sees fit. Signed-off-by: Brian Behlendorf Closes #325 --- module/spl/spl-taskq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index bcdc98f97..3605a0f3b 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -843,7 +843,6 @@ taskq_create(const char *name, int nthreads, pri_t pri, "%s/%d", name, i); if (tqt->tqt_thread) { list_add(&tqt->tqt_thread_list, &tq->tq_thread_list); - kthread_bind(tqt->tqt_thread, i % num_online_cpus()); set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(pri)); wake_up_process(tqt->tqt_thread); j++; From d58a99af2f308dde912639c66af7f9c2cb9e8680 Mon Sep 17 00:00:00 2001 From: marku89 Date: Tue, 7 Jan 2014 20:33:19 +0100 Subject: [PATCH 0777/1062] Define the needed ISA types for Sparc Add the minimum required ISA types to support the Sparc architecture. Signed-off-by: Brian Behlendorf Signed-off-by: Ned Bass Signed-off-by: marku89 Closes #317 --- include/sys/isa_defs.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 35aee61c9..cc59a3aab 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -91,7 +91,35 @@ #define _BIG_ENDIAN #endif -#else /* Currently only x86_64, i386, arm, and powerpc arches supported */ +/* sparc arch specific defines */ +#elif defined(__sparc) || defined(__sparc__) + +#if !defined(__sparc) +#define __sparc +#endif + +#if !defined(__sparc__) +#define __sparc__ +#endif + +#define _BIG_ENDIAN +#define _SUNOS_VTOC_16 + +/* sparc64 arch specific defines */ +#elif defined(__sparc64) || defined(__sparc64__) + +#if !defined(__sparc64) +#define __sparc64 +#endif + +#if !defined(__sparc64__) +#define __sparc64__ +#endif + +#define _BIG_ENDIAN +#define _SUNOS_VTOC_16 + +#else /* Currently x86_64, i386, arm, powerpc, and sparc are supported */ #error "Unsupported ISA type" #endif From 4c995417bc4207118eb9ae4848086c89bf1132f7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 17 Jan 2014 11:40:59 -0800 Subject: [PATCH 0778/1062] Remove incorrect use of EXTRA_DIST for man pages Setting the 'dist_' prefix is the correct way to instruct Automake to include these files in the distribution. The EXTRA_DIST variable is reserved for files which are not covered by the automatic rules. http://www.gnu.org/software/automake/manual/automake.html#Basics Signed-off-by: Brian Behlendorf --- man/man1/Makefile.am | 3 +-- man/man5/Makefile.am | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am index c91f63855..d6becca6e 100644 --- a/man/man1/Makefile.am +++ b/man/man1/Makefile.am @@ -1,5 +1,4 @@ -man_MANS = splat.1 -EXTRA_DIST = $(man_MANS) +dist_man_MANS = splat.1 install-data-local: $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man1" diff --git a/man/man5/Makefile.am b/man/man5/Makefile.am index 06a823325..fb22beb11 100644 --- a/man/man5/Makefile.am +++ b/man/man5/Makefile.am @@ -1,5 +1,4 @@ -man_MANS = spl-module-parameters.5 -EXTRA_DIST = $(man_MANS) +dist_man_MANS = spl-module-parameters.5 install-data-local: $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man5" From 668d2a0da5d542983ab200b35732d44c8b724305 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Apr 2014 15:40:20 -0700 Subject: [PATCH 0779/1062] splat kmem:slab_reclaim: Test cleanup By setting __GFP_NORETRY the kernel memory reclaim logic was allowed to abort early and dump a falled allocation stack to the console. Since this was done in a tight loop to fill memory it could result in a large number of stacks being dumped to the console. This in turn slowed down the test sufficiently so it exceeded the time limit and failed. To resolve this issue the __GFP_NORETRY flag is being removed. This is how it should have been called originally to ensure we're simulating the behavior of most callers which will use the GFP_KERNEL flag. In addition, the reclaim granularity of 1000 objects was far to coarse for this to be a realistic test. For kmem:slab_reclaim there might only be a few thousand objects total in the cache. Therefore, the SPLAT_KMEM_OBJ_RECLAIM constant for these tests was lowered. This will cause the reclaim callback to run more frequently which makes for a better test case. The frequency of the cache reaping in kmem:slab_reap was increased to accommodate the reduced number of objects released during the reclaim. These changes only impact the test cases and were done to remove false positives caused by the test case itself. Signed-off-by: Brian Behlendorf --- module/splat/splat-kmem.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 28ff83721..25a52b43d 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -244,7 +244,7 @@ splat_kmem_test4(struct file *file, void *arg) #define SPLAT_KMEM_TEST_MAGIC 0x004488CCUL #define SPLAT_KMEM_CACHE_NAME "kmem_test" #define SPLAT_KMEM_OBJ_COUNT 1024 -#define SPLAT_KMEM_OBJ_RECLAIM 1000 /* objects */ +#define SPLAT_KMEM_OBJ_RECLAIM 32 /* objects */ #define SPLAT_KMEM_THREADS 32 #define KCP_FLAG_READY 0x01 @@ -895,7 +895,8 @@ splat_kmem_test8(struct file *file, void *arg) goto out_kct; } - for (i = 0; i < 60; i++) { + /* Force reclaim every 1/10 a second for 60 seconds. */ + for (i = 0; i < 600; i++) { kmem_cache_reap_now(kcp->kcp_cache); splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST8_NAME, kcp); @@ -903,7 +904,7 @@ splat_kmem_test8(struct file *file, void *arg) break; set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(HZ / 10); } if (kcp->kcp_cache->skc_obj_total == 0) { @@ -1271,7 +1272,7 @@ splat_kmem_test13(struct file *file, void *arg) break; } - dp = (dummy_page_t *)__get_free_page(GFP_KERNEL | __GFP_NORETRY); + dp = (dummy_page_t *)__get_free_page(GFP_KERNEL); if (!dp) { fails++; splat_vprint(file, SPLAT_KMEM_TEST13_NAME, From e19101e08f25708b03e5ff98a4da5756cfd709f7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Apr 2014 14:31:21 -0700 Subject: [PATCH 0780/1062] splat cred:groupmember: Fix false positives Due to certain assumptions made in the the cred:groupmember test it could result in false positives when run on specific distributions. This was solely a bug in the test case and not in the groupmember() function which the test case was validating. To prevent future false positives the test case has been rewritten to be both more rigerous and to make fewer assumptions about the system. Minor style cleanup was done to cr_groups_search() and groupmember() functions. Signed-off-by: Brian Behlendorf --- module/spl/spl-cred.c | 13 ++++-- module/splat/splat-cred.c | 96 +++++++++++++++++++++++++++++---------- 2 files changed, 80 insertions(+), 29 deletions(-) diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index 0ed65725e..602bd74e8 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -44,7 +44,8 @@ cr_groups_search(const struct group_info *group_info, kgid_t grp) cr_groups_search(const struct group_info *group_info, gid_t grp) #endif { - unsigned int left, right; + unsigned int left, right, mid; + int cmp; if (!group_info) return 0; @@ -52,8 +53,10 @@ cr_groups_search(const struct group_info *group_info, gid_t grp) left = 0; right = group_info->ngroups; while (left < right) { - unsigned int mid = (left+right)/2; - int cmp = KGID_TO_SGID(grp) - KGID_TO_SGID(GROUP_AT(group_info, mid)); + mid = (left + right) / 2; + cmp = KGID_TO_SGID(grp) - + KGID_TO_SGID(GROUP_AT(group_info, mid)); + if (cmp > 0) left = mid + 1; else if (cmp < 0) @@ -120,7 +123,7 @@ crgetgroups(const cred_t *cr) return gids; } -/* Check if the passed gid is available is in supplied credential. */ +/* Check if the passed gid is available in supplied credential. */ int groupmember(gid_t gid, const cred_t *cr) { @@ -128,7 +131,7 @@ groupmember(gid_t gid, const cred_t *cr) int rc; gi = get_group_info(cr->group_info); - rc = cr_groups_search(cr->group_info, SGID_TO_KGID(gid)); + rc = cr_groups_search(gi, SGID_TO_KGID(gid)); put_group_info(gi); return rc; diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index 47dfa02f6..fadf9bca0 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #include "splat-internal.h" #define SPLAT_CRED_NAME "cred" @@ -166,42 +167,89 @@ splat_cred_test2(struct file *file, void *arg) } /* splat_cred_test2() */ /* - * On most/all systems it can be expected that a task with root - * permissions also is a member of the root group, Since the - * test suite is always run as root we check first that CRED() is - * a member of the root group, and secondly that it is not a member - * of our fake group. This test will break is someone happens to - * create group number NGROUPS_MAX-1 and then added root to it. + * Verify the groupmember() works correctly by constructing an interesting + * CRED() and checking that the expected gids are part of it. */ static int splat_cred_test3(struct file *file, void *arg) { - gid_t root_gid, fake_gid; - int rc; + gid_t known_gid, missing_gid, tmp_gid; + unsigned char rnd; + struct group_info *gi; + int i, rc; - root_gid = 0; - fake_gid = NGROUPS_MAX-1; + get_random_bytes((void *)&rnd, 1); + known_gid = (rnd > 0) ? rnd : 1; + missing_gid = 0; - rc = groupmember(root_gid, CRED()); - if (!rc) { - splat_vprint(file, SPLAT_CRED_TEST3_NAME, - "Failed root git %d expected to be member " - "of CRED() groups: %d\n", root_gid, rc); - return -EIDRM; + /* + * Create an interesting known set of gids for test purposes. The + * gids are pseudo randomly selected are will be in the range of + * 1:(NGROUPS_MAX-1). Gid 0 is explicitly avoided so we can reliably + * test for its absence in the test cases. + */ + gi = groups_alloc(NGROUPS_SMALL); + if (gi == NULL) { + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed create " + "group_info for known gids: %d\n", -ENOMEM); + rc = -ENOMEM; + goto show_groups; } - rc = groupmember(fake_gid, CRED()); + for (i = 0, tmp_gid = known_gid; i < NGROUPS_SMALL; i++) { + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Adding gid %d " + "to current CRED() (%d/%d)\n", tmp_gid, i, gi->ngroups); +#ifdef HAVE_KUIDGID_T + GROUP_AT(gi, i) = make_kgid(current_user_ns(), tmp_gid); +#else + GROUP_AT(gi, i) = tmp_gid; +#endif /* HAVE_KUIDGID_T */ + tmp_gid = ((tmp_gid * 17) % (NGROUPS_MAX - 1)) + 1; + } + + /* Set the new groups in the CRED() and release our reference. */ + rc = set_current_groups(gi); + put_group_info(gi); + if (rc) { - splat_vprint(file, SPLAT_CRED_TEST3_NAME, - "Failed fake git %d expected not to be member " - "of CRED() groups: %d\n", fake_gid, rc); - return -EIDRM; + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed to add " + "gid %d to current group: %d\n", known_gid, rc); + goto show_groups; } - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Success root gid " - "is a member of the expected groups: %d\n", rc); + /* Verify groupmember() finds the known_gid in the CRED() */ + rc = groupmember(known_gid, CRED()); + if (!rc) { + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed to find " + "known gid %d in CRED()'s groups.\n", known_gid); + rc = -EIDRM; + goto show_groups; + } - return rc; + /* Verify groupmember() does NOT finds the missing gid in the CRED() */ + rc = groupmember(missing_gid, CRED()); + if (rc) { + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed missing " + "gid %d was found in CRED()'s groups.\n", missing_gid); + rc = -EIDRM; + goto show_groups; + } + + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Success groupmember() " + "correctly detects expected gids in CRED(): %d\n", rc); + +show_groups: + if (rc) { + int i, grps = crgetngroups(CRED()); + + splat_vprint(file, SPLAT_CRED_TEST3_NAME, "%d groups: ", grps); + for (i = 0; i < grps; i++) + splat_print(file, "%d ", crgetgroups(CRED())[i]); + splat_print(file, "%s", "\n"); + } + + + return (rc); } /* splat_cred_test3() */ splat_subsystem_t * From 17a527cb0f44cef6582583e502621541061d8817 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Wed, 26 Mar 2014 08:29:24 -0500 Subject: [PATCH 0781/1062] Support post-3.13 kthread_create() semantics. Provide spl_kthread_create() as a wrapper to the kernel's kthread_create() to provide pre-3.13 semantics. Re-try if the call is interrupted or if it would have returned -ENOMEM. Otherwise return NULL. Signed-off-by: Chunwei Chen Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #339 --- include/sys/thread.h | 28 ++++++++++++++++++++++++++++ module/spl/spl-debug.c | 3 ++- module/spl/spl-taskq.c | 2 +- module/spl/spl-thread.c | 2 +- module/splat/splat-condvar.c | 8 ++++---- module/splat/splat-rwlock.c | 4 ++-- 6 files changed, 38 insertions(+), 9 deletions(-) diff --git a/include/sys/thread.h b/include/sys/thread.h index 864a74bba..f6c197255 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -60,4 +60,32 @@ extern kthread_t *__thread_create(caddr_t stk, size_t stksize, int state, pri_t pri); extern void __thread_exit(void); +/* + * spl_kthread_create - Wrapper providing pre-3.13 semantics for + * kthread_create() in which it is not killable and less likely + * to return -ENOMEM. + */ +static inline struct task_struct * +spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...) +{ + struct task_struct *tsk; + va_list args; + + va_start(args, namefmt); + do { + tsk = kthread_create_on_node(func, data, + -1, namefmt, args); + if (IS_ERR(tsk)) { + if (signal_pending(current)) { + clear_thread_flag(TIF_SIGPENDING); + continue; + } + if (PTR_ERR(tsk) == -ENOMEM) + continue; + return (NULL); + } else + return (tsk); + } while (1); +} + #endif /* _SPL_THREAD_H */ diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index d450368b1..93c3f31b8 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -415,7 +416,7 @@ spl_debug_dumplog(int flags) spl_debug_dumplog_internal(&dp); } else { - tsk = kthread_create(spl_debug_dumplog_thread,(void *)&dp,"spl_debug"); + tsk = spl_kthread_create(spl_debug_dumplog_thread,(void *)&dp,"spl_debug"); if (tsk == NULL) return -ENOMEM; diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 3605a0f3b..48feb1d22 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -839,7 +839,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, tqt->tqt_tq = tq; tqt->tqt_id = 0; - tqt->tqt_thread = kthread_create(taskq_thread, tqt, + tqt->tqt_thread = spl_kthread_create(taskq_thread, tqt, "%s/%d", name, i); if (tqt->tqt_thread) { list_add(&tqt->tqt_thread_list, &tq->tq_thread_list); diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 6b3bec509..b0fa4d795 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -126,7 +126,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp->tp_state = state; tp->tp_pri = pri; - tsk = kthread_create(thread_generic_wrapper, (void *)tp, + tsk = spl_kthread_create(thread_generic_wrapper, (void *)tp, "%s", tp->tp_name); if (IS_ERR(tsk)) { SERROR("Failed to create thread: %ld\n", PTR_ERR(tsk)); diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index 1ddde39bb..3ee2ffc9e 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -108,7 +108,7 @@ splat_condvar_test1(struct file *file, void *arg) ct[i].ct_cvp = &cv; ct[i].ct_name = SPLAT_CONDVAR_TEST1_NAME; ct[i].ct_rc = 0; - ct[i].ct_thread = kthread_create(splat_condvar_test12_thread, + ct[i].ct_thread = spl_kthread_create(splat_condvar_test12_thread, &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); if (!IS_ERR(ct[i].ct_thread)) { @@ -173,7 +173,7 @@ splat_condvar_test2(struct file *file, void *arg) ct[i].ct_cvp = &cv; ct[i].ct_name = SPLAT_CONDVAR_TEST2_NAME; ct[i].ct_rc = 0; - ct[i].ct_thread = kthread_create(splat_condvar_test12_thread, + ct[i].ct_thread = spl_kthread_create(splat_condvar_test12_thread, &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); if (!IS_ERR(ct[i].ct_thread)) { @@ -254,7 +254,7 @@ splat_condvar_test3(struct file *file, void *arg) ct[i].ct_cvp = &cv; ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; ct[i].ct_rc = 0; - ct[i].ct_thread = kthread_create(splat_condvar_test34_thread, + ct[i].ct_thread = spl_kthread_create(splat_condvar_test34_thread, &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); if (!IS_ERR(ct[i].ct_thread)) { @@ -324,7 +324,7 @@ splat_condvar_test4(struct file *file, void *arg) ct[i].ct_cvp = &cv; ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; ct[i].ct_rc = 0; - ct[i].ct_thread = kthread_create(splat_condvar_test34_thread, + ct[i].ct_thread = spl_kthread_create(splat_condvar_test34_thread, &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); if (!IS_ERR(ct[i].ct_thread)) { diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index a865fb310..6faf7d24e 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -215,10 +215,10 @@ splat_rwlock_test1(struct file *file, void *arg) /* The first thread will be the writer */ if (i == 0) - rwt[i].rwt_thread = kthread_create(splat_rwlock_wr_thr, + rwt[i].rwt_thread = spl_kthread_create(splat_rwlock_wr_thr, &rwt[i], "%s/%d", SPLAT_RWLOCK_TEST_NAME, i); else - rwt[i].rwt_thread = kthread_create(splat_rwlock_rd_thr, + rwt[i].rwt_thread = spl_kthread_create(splat_rwlock_rd_thr, &rwt[i], "%s/%d", SPLAT_RWLOCK_TEST_NAME, i); if (!IS_ERR(rwt[i].rwt_thread)) { From ed650dee76e928ce266e9d204637516d3a375b77 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Wed, 9 Apr 2014 13:40:12 -0500 Subject: [PATCH 0782/1062] De-inline spl_kthread_create(). The function was defined as a static inline with variable arguments which causes gcc to generate errors on some distros. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #346 --- include/sys/thread.h | 30 ++---------------------------- module/spl/spl-thread.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/include/sys/thread.h b/include/sys/thread.h index f6c197255..433a0761d 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -59,33 +59,7 @@ extern kthread_t *__thread_create(caddr_t stk, size_t stksize, void *args, size_t len, proc_t *pp, int state, pri_t pri); extern void __thread_exit(void); - -/* - * spl_kthread_create - Wrapper providing pre-3.13 semantics for - * kthread_create() in which it is not killable and less likely - * to return -ENOMEM. - */ -static inline struct task_struct * -spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...) -{ - struct task_struct *tsk; - va_list args; - - va_start(args, namefmt); - do { - tsk = kthread_create_on_node(func, data, - -1, namefmt, args); - if (IS_ERR(tsk)) { - if (signal_pending(current)) { - clear_thread_flag(TIF_SIGPENDING); - continue; - } - if (PTR_ERR(tsk) == -ENOMEM) - continue; - return (NULL); - } else - return (tsk); - } while (1); -} +extern struct task_struct *spl_kthread_create(int (*func)(void *), + void *data, const char namefmt[], ...); #endif /* _SPL_THREAD_H */ diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index b0fa4d795..a74b9d9ac 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -137,3 +137,31 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, SRETURN((kthread_t *)tsk); } EXPORT_SYMBOL(__thread_create); + +/* + * spl_kthread_create - Wrapper providing pre-3.13 semantics for + * kthread_create() in which it is not killable and less likely + * to return -ENOMEM. + */ +struct task_struct * +spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...) +{ + struct task_struct *tsk; + va_list args; + + va_start(args, namefmt); + do { + tsk = kthread_create(func, data, namefmt, args); + if (IS_ERR(tsk)) { + if (signal_pending(current)) { + clear_thread_flag(TIF_SIGPENDING); + continue; + } + if (PTR_ERR(tsk) == -ENOMEM) + continue; + return (NULL); + } else + return (tsk); + } while (1); +} +EXPORT_SYMBOL(spl_kthread_create); From 3ceb71e8966e5f1895885eeaaa9354ffd940b490 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Fri, 11 Apr 2014 08:55:10 -0500 Subject: [PATCH 0783/1062] Call kthread_create() correctly with fixed arguments. The kernel's kthread_create() function is defined as "..." and there is no va_list variant at the moment. The task name is pre-formatted into a local buffer and passed to kthread_create() with fixed arguments. Signed-off-by: Chunwei Chen Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #347 --- module/spl/spl-thread.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index a74b9d9ac..5c8514051 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -148,10 +148,13 @@ spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...) { struct task_struct *tsk; va_list args; + char name[TASK_COMM_LEN]; va_start(args, namefmt); + vsnprintf(name, sizeof(name), namefmt, args); + va_end(args); do { - tsk = kthread_create(func, data, namefmt, args); + tsk = kthread_create(func, data, "%s", name); if (IS_ERR(tsk)) { if (signal_pending(current)) { clear_thread_flag(TIF_SIGPENDING); From acf0ade362cb8b26d67770114ee6fa17816e6b65 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 11 Mar 2013 21:16:36 -0400 Subject: [PATCH 0784/1062] Simplify hostid logic There is plenty of compatibility code for a hw_hostid that isn't used by anything. At the same time, there are apparently issues with the current hostid logic. coredumb in #zfsonlinux on freenode reported that Fedora 17 changes its hostid on every boot, which required force importing his pool. A suggestion by wca was to adopt FreeBSD's behavior, where it treats hostid as zero if /etc/hostid does not exist Adopting FreeBSD's behavior permits us to eliminate plenty of code, including a userland helper that invokes the system's hostid as a fallback. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #224 --- include/sys/sysmacros.h | 1 - include/sys/systeminfo.h | 1 - module/spl/spl-generic.c | 55 +++++----------------------------------- module/spl/spl-proc.c | 13 ---------- 4 files changed, 6 insertions(+), 64 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index b4778b70e..1ac49b4f0 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -143,7 +143,6 @@ /* Missing globals */ extern char spl_version[32]; extern unsigned long spl_hostid; -extern char hw_serial[11]; /* Missing misc functions */ extern int highbit(unsigned long i); diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index e22a08530..5c0cc4663 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -25,7 +25,6 @@ #ifndef _SPL_SYSTEMINFO_H #define _SPL_SYSTEMINFO_H -#define HW_INVALID_HOSTID 0xFFFFFFFF /* an invalid hostid */ #define HW_HOSTID_LEN 11 /* minimum buffer size needed */ /* to hold a decimal or hex */ /* hostid string */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 351f53670..4f0842b1a 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -52,14 +52,11 @@ char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; EXPORT_SYMBOL(spl_version); -unsigned long spl_hostid = HW_INVALID_HOSTID; +unsigned long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); module_param(spl_hostid, ulong, 0644); MODULE_PARM_DESC(spl_hostid, "The system hostid."); -char hw_serial[HW_HOSTID_LEN] = ""; -EXPORT_SYMBOL(hw_serial); - proc_t p0 = { 0 }; EXPORT_SYMBOL(p0); @@ -467,7 +464,7 @@ hostid_read(void) int result; uint64_t size; struct _buf *file; - unsigned long hostid = 0; + uint32_t hostid = 0; file = kobj_open_file(spl_hostid_path); @@ -511,45 +508,10 @@ hostid_read(void) return 0; } -#define GET_HOSTID_CMD \ - "exec 0/proc/sys/kernel/spl/hostid " \ - " 2>/dev/null; " \ - "hostid" - -static int -hostid_exec(void) -{ - char *argv[] = { "/bin/sh", - "-c", - GET_HOSTID_CMD, - NULL }; - char *envp[] = { "HOME=/", - "TERM=linux", - "PATH=/sbin:/usr/sbin:/bin:/usr/bin", - NULL }; - int rc; - - /* Doing address resolution in the kernel is tricky and just - * not a good idea in general. So to set the proper 'hw_serial' - * use the usermodehelper support to ask '/bin/sh' to run - * '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid - * for us to use. It's a horrific solution but it will do for now. - */ - rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); - if (rc) - printk("SPL: Failed user helper '%s %s %s', rc = %d\n", - argv[0], argv[1], argv[2], rc); - - return rc; -} - uint32_t zone_get_hostid(void *zone) { static int first = 1; - unsigned long hostid; - int rc; /* Only the global zone is supported */ ASSERT(zone == NULL); @@ -559,21 +521,16 @@ zone_get_hostid(void *zone) /* * Get the hostid if it was not passed as a module parameter. - * Try reading the /etc/hostid file directly, and then fall - * back to calling the /usr/bin/hostid utility. + * Try reading the /etc/hostid file directly. */ - if ((spl_hostid == HW_INVALID_HOSTID) && - (rc = hostid_read()) && (rc = hostid_exec())) - return HW_INVALID_HOSTID; + if (hostid_read()) + spl_hostid = 0; printk(KERN_NOTICE "SPL: using hostid 0x%08x\n", (unsigned int) spl_hostid); } - if (ddi_strtoul(hw_serial, NULL, HW_HOSTID_LEN-1, &hostid) != 0) - return HW_INVALID_HOSTID; - - return (uint32_t)hostid; + return spl_hostid; } EXPORT_SYMBOL(zone_get_hostid); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index f25239aca..2bbc8d790 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -72,7 +72,6 @@ struct proc_dir_entry *proc_spl_kstat = NULL; #define CTL_VERSION CTL_UNNUMBERED /* Version */ #define CTL_HOSTID CTL_UNNUMBERED /* Host id by /usr/bin/hostid */ -#define CTL_HW_SERIAL CTL_UNNUMBERED /* HW serial number by hostid */ #define CTL_KALLSYMS CTL_UNNUMBERED /* kallsyms_lookup_name addr */ #define CTL_DEBUG_SUBSYS CTL_UNNUMBERED /* Debug subsystem */ @@ -129,7 +128,6 @@ enum { enum { CTL_VERSION = 1, /* Version */ CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ - CTL_HW_SERIAL, /* Hardware serial number from hostid */ CTL_KALLSYMS, /* Address of kallsyms_lookup_name */ #ifdef DEBUG_LOG @@ -513,9 +511,6 @@ SPL_PROC_HANDLER(proc_dohostid) if (str == end) SRETURN(-EINVAL); - (void) snprintf(hw_serial, HW_HOSTID_LEN, "%lu", spl_hostid); - hw_serial[HW_HOSTID_LEN - 1] = '\0'; - *ppos += *lenp; } else { len = snprintf(str, sizeof(str), "%lx", spl_hostid); if (*ppos >= len) @@ -1058,14 +1053,6 @@ static struct ctl_table spl_table[] = { .mode = 0644, .proc_handler = &proc_dohostid, }, - { - CTL_NAME (CTL_HW_SERIAL) - .procname = "hw_serial", - .data = hw_serial, - .maxlen = sizeof(hw_serial), - .mode = 0444, - .proc_handler = &proc_dostring, - }, #ifndef HAVE_KALLSYMS_LOOKUP_NAME { CTL_NAME (CTL_KALLSYMS) From 6c48cd8ac223eb00cb4dadebcbe4ce1dfdfc6b76 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 2 Nov 2013 00:14:05 +0800 Subject: [PATCH 0785/1062] This patch add a CTASSERT macro for compile time assertion. This macro makes the compile to spit "mixed definition and code" warning, I can't find a way to avoid it. This patch lays some groundwork for the persistent l2arc feature. See https://www.illumos.org/issues/3525. Signed-off-by: Yuxuan Shui Signed-off-by: Brian Behlendorf Closes #303 --- include/sys/debug.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/sys/debug.h b/include/sys/debug.h index f3f3529a9..9fa2653d4 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -145,4 +145,15 @@ do { \ #define VERIFY(x) ASSERT(x) #endif /* NDEBUG */ + +/* + * Compile-time assertion. The condition 'x' must be constant. + */ +#define CTASSERT_GLOBAL(x) _CTASSERT(x, __LINE__) +#define CTASSERT(x) { _CTASSERT(x, __LINE__); } +#define _CTASSERT(x, y) __CTASSERT(x, y) +#define __CTASSERT(x, y) \ + typedef char __attribute__ ((unused)) \ + __compile_time_assertion__ ## y[(x) ? 1 : -1] + #endif /* SPL_DEBUG_H */ From 545e9ac00a813ed13d6b67c86d058c9048d78552 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 25 Feb 2014 17:16:55 +0800 Subject: [PATCH 0786/1062] Add ddi_time_after and friends When comparing times gotten from ddi_get_lbolt, we have to take account of wrap around of jiffies. Therefore, we cannot use 't1 < t2'. Instead we should use 't1 - t2 < 0'. This patch add ddi_time_after and friends to address this issue. They have strict type restriction, clock_t for vanilla and int64_t for 64 version, to prevent type conversion from screwing things. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #335 --- include/sys/timer.h | 14 ++++++++++++++ module/splat/splat-taskq.c | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/sys/timer.h b/include/sys/timer.h index 2542510dd..33d577e71 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -35,6 +35,20 @@ #define ddi_get_lbolt() ((clock_t)jiffies) #define ddi_get_lbolt64() ((int64_t)get_jiffies_64()) +#define ddi_time_before(a, b) (typecheck(clock_t, a) && \ + typecheck(clock_t, b) && \ + ((a) - (b) < 0)) +#define ddi_time_after(a, b) ddi_time_before(b, a) +#define ddi_time_before_eq(a, b) (!ddi_time_after(a, b)) +#define ddi_time_after_eq(a, b) ddi_time_before_eq(b, a) + +#define ddi_time_before64(a, b) (typecheck(int64_t, a) && \ + typecheck(int64_t, b) && \ + ((a) - (b) < 0)) +#define ddi_time_after64(a, b) ddi_time_before64(b, a) +#define ddi_time_before_eq64(a, b) (!ddi_time_after64(a, b)) +#define ddi_time_after_eq64(a, b) ddi_time_before_eq64(b, a) + #define delay(ticks) schedule_timeout_uninterruptible(ticks) #define SEC_TO_TICK(sec) ((sec) * HZ) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index e4793d457..074af895b 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -82,7 +82,7 @@ typedef struct splat_taskq_arg { atomic_t *count; int order[SPLAT_TASKQ_ORDER_MAX]; unsigned int depth; - unsigned long expire; + clock_t expire; taskq_t *tq; taskq_ent_t *tqe; spinlock_t lock; @@ -1140,7 +1140,7 @@ splat_taskq_test9_func(void *arg) splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; ASSERT(tq_arg); - if (ddi_get_lbolt() >= tq_arg->expire) + if (ddi_time_after_eq(ddi_get_lbolt(), tq_arg->expire)) atomic_inc(tq_arg->count); kmem_free(tq_arg, sizeof(splat_taskq_arg_t)); @@ -1228,7 +1228,7 @@ splat_taskq_test10_func(void *arg) splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; uint8_t rnd; - if (ddi_get_lbolt() >= tq_arg->expire) + if (ddi_time_after_eq(ddi_get_lbolt(), tq_arg->expire)) atomic_inc(tq_arg->count); /* Randomly sleep to further perturb the system */ @@ -1249,7 +1249,7 @@ splat_taskq_test10(struct file *file, void *arg) int canceled = 0; int completed = 0; int blocked = 0; - unsigned long start, cancel; + clock_t start, cancel; tqas = vmalloc(sizeof(*tqas) * nr_tasks); if (tqas == NULL) @@ -1327,7 +1327,7 @@ splat_taskq_test10(struct file *file, void *arg) start = ddi_get_lbolt(); i = 0; - while (ddi_get_lbolt() < start + 5 * HZ) { + while (ddi_time_before(ddi_get_lbolt(), start + 5 * HZ)) { taskqid_t id; uint32_t rnd; From bdfbe594a109933e72103bd720d2c6aa560dc400 Mon Sep 17 00:00:00 2001 From: Andrey Vesnovaty Date: Thu, 6 Feb 2014 12:08:46 +0200 Subject: [PATCH 0787/1062] Expose max/min objs per slab and max slab size By default maximal number of objects in slab can't exceed (16*2 - 1) and slab size can't exceed 32M. Today's high end servers having couple hundreds of RAM available for ARC may run into a trouble with virtual memory because of the restriction mentioned above. Problem: Reasons for very high number of virtual memory allocations: * Real slab size very small relative to the size of the entire RAM * Slabs allocated on virtual memory and fill entire ARC The result is very high number of allocated virtual memory ranges (hundreds of ranges). When virtual memory subsystem manages high number of ranges its performance become so poor that it freezes from time to time. Solution: Number of objects per slab should be increased taking into account maximal slab size which can also be increased if needed. Signed-off-by: Andrey Vesnovaty Signed-off-by: Brian Behlendorf Closes #337 --- module/spl/spl-kmem.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 23e47808a..e43e9170b 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -46,6 +46,19 @@ EXPORT_SYMBOL(spl_kmem_cache_expire); module_param(spl_kmem_cache_expire, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); +unsigned int spl_kmem_cache_obj_per_slab = SPL_KMEM_CACHE_OBJ_PER_SLAB; +module_param(spl_kmem_cache_obj_per_slab, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab, "Number of objects per slab"); + +unsigned int spl_kmem_cache_obj_per_slab_min = SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN; +module_param(spl_kmem_cache_obj_per_slab_min, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab_min, + "Minimal number of objects per slab"); + +unsigned int spl_kmem_cache_max_size = 32; +module_param(spl_kmem_cache_max_size, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB"); + /* * The minimum amount of memory measured in pages to be free at all * times on the system. This is similar to Linux's zone->pages_min @@ -1355,10 +1368,10 @@ spl_cache_age(void *data) /* * Size a slab based on the size of each aligned object plus spl_kmem_obj_t. - * When on-slab we want to target SPL_KMEM_CACHE_OBJ_PER_SLAB. However, + * When on-slab we want to target spl_kmem_cache_obj_per_slab. However, * for very small objects we may end up with more than this so as not * to waste space in the minimal allocation of a single page. Also for - * very large objects we may use as few as SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN, + * very large objects we may use as few as spl_kmem_cache_obj_per_slab_min, * lower than this and we will fail. */ static int @@ -1367,7 +1380,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) uint32_t sks_size, obj_size, max_size; if (skc->skc_flags & KMC_OFFSLAB) { - *objs = SPL_KMEM_CACHE_OBJ_PER_SLAB; + *objs = spl_kmem_cache_obj_per_slab; *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), PAGE_SIZE); SRETURN(0); } else { @@ -1377,12 +1390,12 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) if (skc->skc_flags & KMC_KMEM) max_size = ((uint32_t)1 << (MAX_ORDER-3)) * PAGE_SIZE; else - max_size = (32 * 1024 * 1024); + max_size = (spl_kmem_cache_max_size * 1024 * 1024); /* Power of two sized slab */ for (*size = PAGE_SIZE; *size <= max_size; *size *= 2) { *objs = (*size - sks_size) / obj_size; - if (*objs >= SPL_KMEM_CACHE_OBJ_PER_SLAB) + if (*objs >= spl_kmem_cache_obj_per_slab) SRETURN(0); } @@ -1393,7 +1406,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) */ *size = max_size; *objs = (*size - sks_size) / obj_size; - if (*objs >= SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN) + if (*objs >= (spl_kmem_cache_obj_per_slab_min)) SRETURN(0); } From 89aa97059d7ddad668a5118aef7914743162a5e8 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 4 Aug 2013 19:48:24 -0400 Subject: [PATCH 0788/1062] Change spl_kmem_cache_expire default setting to 2 This behavior is more consistent with the way memory reclaim is expected to work under Linux. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #349 --- module/spl/spl-kmem.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e43e9170b..55c467b97 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -38,10 +38,11 @@ * kmem_cache behavior. The idea is that per-cpu objects which haven't been * accessed in several seconds should be returned to the cache. On the other * hand Linux slabs never move objects back to the slabs unless there is - * memory pressure on the system. By default both methods are disabled, but - * may be enabled by setting KMC_EXPIRE_AGE or KMC_EXPIRE_MEM. + * memory pressure on the system. By default the Linux method is enabled + * because it has been shown to improve responsiveness on low memory systems. + * This policy may be changed by setting KMC_EXPIRE_AGE or KMC_EXPIRE_MEM. */ -unsigned int spl_kmem_cache_expire = 0; +unsigned int spl_kmem_cache_expire = KMC_EXPIRE_MEM; EXPORT_SYMBOL(spl_kmem_cache_expire); module_param(spl_kmem_cache_expire, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); From d6e6e4a98eef03971213044d4277edd56dda61ab Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Wed, 16 Apr 2014 12:18:38 +0900 Subject: [PATCH 0789/1062] Add support for aarch64 (ARMv8) Using the ARM reference simulation (fast model foundation v8) I cross compiled spl and zfs, to confirm it works on ARMv8 (64 bit arm architecture, called aarch64 in Linux). As it is based on previous ARM porting, the resulting patch is disappointingly small, there was very little to do. The code fixes the compile issues and has light testing done. Signed-off-by: Jorgen Lundman Signed-off-by: Brian Behlendorf Closes #351 --- include/sys/isa_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index cc59a3aab..aa5ae43c2 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -75,7 +75,7 @@ #endif /* arm arch specific defines */ -#elif defined(__arm) || defined(__arm__) +#elif defined(__arm) || defined(__arm__) || defined(__aarch64__) #if !defined(__arm) #define __arm @@ -85,7 +85,7 @@ #define __arm__ #endif -#if defined(__ARMEL__) +#if defined(__ARMEL__) || defined(__AARCH64EL__) #define _LITTLE_ENDIAN #else #define _BIG_ENDIAN From ae16ed992bd0ef5a55b04d9edaaa6456674315f9 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 22 Apr 2014 16:45:36 +0800 Subject: [PATCH 0790/1062] Fix crash when using ZFS on Ceph rbd When using __get_free_pages to get high order memory, only the first page's _count will set to 1, other's will be 0. When an internal page get passed into rbd, it will eventully go into tcp_sendpage. There, it will be called with get_page and put_page, and get freed erroneously when _count jump back to 0. The solution to this problem is to use compound page. All pages in a high order compound page share a single _count. So get_page and put_page in tcp_sendpage will not cause _count jump to 0. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #251 --- module/spl/spl-kmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 55c467b97..b673c2915 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -864,7 +864,8 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) ASSERT(ISP2(size)); if (skc->skc_flags & KMC_KMEM) - ptr = (void *)__get_free_pages(flags, get_order(size)); + ptr = (void *)__get_free_pages(flags | __GFP_COMP, + get_order(size)); else ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); From 703371d8c734bc2cc6350f1bca014f08245dcc69 Mon Sep 17 00:00:00 2001 From: Andrey Vesnovaty Date: Wed, 28 Aug 2013 05:09:25 +0300 Subject: [PATCH 0791/1062] Evenly distribute the taskq threads across available CPUs The problem is described in commit aeeb4e0c0ae75b99ebbaa3056f0afc8e12949532. However, instead of disabling the binding to CPU altogether we just keep the last CPU index across calls to taskq_create() and thus achieve even distribution of the taskq threads across all available CPUs. The implementation based on assumption that task queues initialization performed in serial manner. Signed-off-by: Andrey Vesnovaty Signed-off-by: Andrey Vesnovaty Signed-off-by: Brian Behlendorf Closes #336 --- man/man5/spl-module-parameters.5 | 12 ++++++++++++ module/spl/spl-taskq.c | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 3c134f775..9b351762c 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -124,3 +124,15 @@ Spin a maximum of N times to acquire lock .sp .ne -4 Default value: \fB0\fR. +.RE + +.sp +.ne 2 +.na +\fBspl_taskq_thread_bind\fR (int) +.ad +.RS 12n +Bind taskq thread to CPU +.sp +Default value: \fB0\fR. +.RE diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 48feb1d22..0cb2ceeaf 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -34,6 +34,10 @@ #define SS_DEBUG_SUBSYS SS_TASKQ +int spl_taskq_thread_bind = 0; +module_param(spl_taskq_thread_bind, int, 0644); +MODULE_PARM_DESC(spl_taskq_thread_bind, "Bind taskq thread to CPU by default"); + /* Global system-wide dynamic task queue available for all consumers */ taskq_t *system_taskq; EXPORT_SYMBOL(system_taskq); @@ -781,6 +785,7 @@ taskq_t * taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { + static int last_used_cpu = 0; taskq_t *tq; taskq_thread_t *tqt; int rc = 0, i, j = 0; @@ -843,6 +848,10 @@ taskq_create(const char *name, int nthreads, pri_t pri, "%s/%d", name, i); if (tqt->tqt_thread) { list_add(&tqt->tqt_thread_list, &tq->tq_thread_list); + if (spl_taskq_thread_bind) { + last_used_cpu = (last_used_cpu + 1) % num_online_cpus(); + kthread_bind(tqt->tqt_thread, last_used_cpu); + } set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(pri)); wake_up_process(tqt->tqt_thread); j++; From 1538f4b6e3cc08c334f58b0025aa7de1d6c97e1a Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 7 May 2014 10:57:19 -0700 Subject: [PATCH 0792/1062] Linux 3.15 compat: NICE_TO_PRIO and PRIO_TO_NICE These macro's were exposed to make them available to other parts of the kernel and modules. References: torvalds/linux@6b6350f Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue #355 --- include/sys/sysmacros.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 1ac49b4f0..e73c7fd1e 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -95,8 +95,12 @@ #define minclsyspri (MAX_RT_PRIO) #define maxclsyspri (MAX_PRIO-1) +#ifndef NICE_TO_PRIO #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) +#endif +#ifndef PRIO_TO_NICE #define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) +#endif /* Missing macros */ From ad3412efd7cc2debb0f9f354d3f5e105a99d97e1 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 7 May 2014 10:54:37 -0700 Subject: [PATCH 0793/1062] Linux 3.15: vfs_rename() added a flags argument Detect the updated vfs_rename() interface and call it with an extra flags argument. References: torvalds/linux@520c8b1 Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue #355 --- config/spl-build.m4 | 23 ++++++++++++++++++++++- module/spl/spl-vnode.c | 18 ++++++++++++------ 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 84267807d..08b84efe9 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1907,7 +1907,28 @@ AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME], AC_DEFINE(HAVE_5ARGS_VFS_RENAME, 1, [vfs_rename() wants 5 args]) ],[ - AC_MSG_ERROR(no) + AC_MSG_RESULT(no) + dnl # + dnl # Linux 3.15 API change + dnl # Added flags + dnl # + AC_MSG_CHECKING([whether vfs_rename() wants 6 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_rename((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL, + (unsigned int) 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_6ARGS_VFS_RENAME, 1, + [vfs_rename() wants 6 args]) + ],[ + AC_MSG_ERROR(no) + ]) ]) ]) ]) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 549606770..fa3e49054 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -414,13 +414,16 @@ vn_rename(const char *oldname, const char *newname, int x1) SGOTO(exit4, rc); } -#ifdef HAVE_4ARGS_VFS_RENAME +#if defined(HAVE_4ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); -#else +#elif defined(HAVE_5ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry, NULL); -#endif /* HAVE_4ARGS_VFS_RENAME */ +#else + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry, NULL, 0); +#endif exit4: unlock_rename(new_dir, old_dir); exit3: @@ -574,13 +577,16 @@ vn_rename(const char *oldname, const char *newname, int x1) if (new_dentry == trap) SGOTO(exit5, rc); -#ifdef HAVE_4ARGS_VFS_RENAME +#if defined(HAVE_4ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); -#else +#elif defined(HAVE_5ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry, NULL); -#endif /* HAVE_4ARGS_VFS_RENAME */ +#else + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry, NULL, 0); +#endif exit5: dput(new_dentry); exit4: From a073aeb0604b7d410be58135fb9d5c43671af263 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 8 Dec 2013 17:01:45 -0500 Subject: [PATCH 0794/1062] Add KMC_SLAB cache type For small objects the Linux slab allocator has several advantages over its counterpart in the SPL. These include: 1) It is more memory-efficient and packs objects more tightly. 2) It is continually tuned to maximize performance. Therefore it makes sense to layer the SPLs slab allocator on top of the Linux slab allocator. This allows us to leverage the advantages above while preserving the Illumos semantics we depend on. However, there are some things we need to be careful of: 1) The Linux slab allocator was never designed to work well with large objects. Because the SPL slab must still handle this use case a cut off limit was added to transition from Linux slab backed objects to kmem or vmem backed slabs. spl_kmem_cache_slab_limit - Objects less than or equal to this size in bytes will be backed by the Linux slab. By default this value is zero which disables the Linux slab functionality. Reasonable values for this cut off limit are in the range of 4096-16386 bytes. spl_kmem_cache_kmem_limit - Objects less than or equal to this size in bytes will be backed by a kmem slab. Objects over this size will be vmem backed instead. This value defaults to 1/8 a page, or 512 bytes on an x86_64 architecture. 2) Be aware that using the Linux slab may inadvertently introduce new deadlocks. Care has been taken previously to ensure that all allocations which occur in the write path use GFP_NOIO. However, there may be internal allocations performed in the Linux slab which do not honor these flags. If this is the case a deadlock may occur. The path forward is definitely to start relying on the Linux slab. But for that to happen we need to start building confidence that there aren't any unexpected surprises lurking for us. And ideally need to move completely away from using the SPLs slab for large memory allocations. This patch is a first step. NOTES: 1) The KMC_NOMAGAZINE flag was leveraged to support the Linux slab backed caches but it is not supported for kmem/vmem backed caches. 2) Regardless of the spl_kmem_cache_*_limit settings a cache may be explicitly set to a given type by passed the KMC_KMEM, KMC_VMEM, or KMC_SLAB flags during cache creation. 3) The constructors, destructors, and reclaim callbacks are all functional and will be called regardless of the cache type. 4) KMC_SLAB caches will not appear in /proc/spl/kmem/slab due to the issues involved in presenting correct object accounting. Instead they will appear in /proc/slabinfo under the same names. 5) Several kmem SPLAT tests needed to be fixed because they relied incorrectly on internal kmem slab accounting. With the updated test cases all the SPLAT tests pass as expected. 6) An autoconf test was added to ensure that the __GFP_COMP flag was correctly added to the default flags used when allocating a slab. This is required to ensure all pages in higher order slabs are properly refcounted, see ae16ed9. 7) When using the SLUB allocator there is no need to attempt to set the __GFP_COMP flag. This has been the default behavior for the SLUB since Linux 2.6.25. 8) When using the SLUB it may be desirable to set the slub_nomerge kernel parameter to prevent caches from being merged. Original-patch-by: DHE Signed-off-by: Brian Behlendorf Signed-off-by: Prakash Surya Signed-off-by: Tim Chase Signed-off-by: DHE Signed-off-by: Chunwei Chen Closes #356 --- config/spl-build.m4 | 38 +++++++++ include/sys/kmem.h | 27 +++++- module/spl/spl-kmem.c | 174 +++++++++++++++++++++++++++++++++----- module/spl/spl-proc.c | 6 ++ module/splat/splat-kmem.c | 33 +++++--- 5 files changed, 241 insertions(+), 37 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 08b84efe9..eef52334f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -93,6 +93,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SCHED_RT_HEADER SPL_AC_2ARGS_VFS_GETATTR SPL_AC_USLEEP_RANGE + SPL_AC_KMEM_CACHE_ALLOCFLAGS ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2532,3 +2533,40 @@ AC_DEFUN([SPL_AC_USLEEP_RANGE], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 2.6.35 API change, +dnl # The cachep->gfpflags member was renamed cachep->allocflags. These are +dnl # private allocation flags which are applied when allocating a new slab +dnl # in kmem_getpages(). Unfortunately there is no public API for setting +dnl # non-default flags. +dnl # +AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [ + AC_MSG_CHECKING([whether struct kmem_cache has allocflags]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct kmem_cache cachep __attribute__ ((unused)); + cachep.allocflags = GFP_KERNEL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_ALLOCFLAGS, 1, + [struct kmem_cache has allocflags]) + ],[ + AC_MSG_RESULT(no) + + AC_MSG_CHECKING([whether struct kmem_cache has gfpflags]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct kmem_cache cachep __attribute__ ((unused)); + cachep.gfpflags = GFP_KERNEL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_GFPFLAGS, 1, + [struct kmem_cache has gfpflags]) + ],[ + AC_MSG_RESULT(no) + ]) + ]) +]) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 516114fd7..18533fe39 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -340,8 +340,9 @@ enum { KMC_BIT_QCACHE = 4, /* XXX: Unsupported */ KMC_BIT_KMEM = 5, /* Use kmem cache */ KMC_BIT_VMEM = 6, /* Use vmem cache */ - KMC_BIT_OFFSLAB = 7, /* Objects not on slab */ - KMC_BIT_NOEMERGENCY = 8, /* Disable emergency objects */ + KMC_BIT_SLAB = 7, /* Use Linux slab cache */ + KMC_BIT_OFFSLAB = 8, /* Objects not on slab */ + KMC_BIT_NOEMERGENCY = 9, /* Disable emergency objects */ KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */ KMC_BIT_GROWING = 15, /* Growing in progress */ KMC_BIT_REAPING = 16, /* Reaping in progress */ @@ -367,6 +368,7 @@ typedef enum kmem_cbrc { #define KMC_QCACHE (1 << KMC_BIT_QCACHE) #define KMC_KMEM (1 << KMC_BIT_KMEM) #define KMC_VMEM (1 << KMC_BIT_VMEM) +#define KMC_SLAB (1 << KMC_BIT_SLAB) #define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) #define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY) #define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED) @@ -456,6 +458,7 @@ typedef struct spl_kmem_cache { spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ void *skc_private; /* Private data */ void *skc_vmp; /* Unused */ + struct kmem_cache *skc_linux_cache; /* Linux slab cache if used */ unsigned long skc_flags; /* Flags */ uint32_t skc_obj_size; /* Object size */ uint32_t skc_obj_align; /* Object alignment */ @@ -513,4 +516,24 @@ void spl_kmem_fini(void); #define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ ((ptr) < (void *)VMALLOC_END)) +/* + * Allow custom slab allocation flags to be set for KMC_SLAB based caches. + * One use for this function is to ensure the __GFP_COMP flag is part of + * the default allocation mask which ensures higher order allocations are + * properly refcounted. This flag was added to the default ->allocflags + * as of Linux 3.11. + */ +static inline void +kmem_cache_set_allocflags(spl_kmem_cache_t *skc, gfp_t flags) +{ + if (skc->skc_linux_cache == NULL) + return; + +#if defined(HAVE_KMEM_CACHE_ALLOCFLAGS) + skc->skc_linux_cache->allocflags |= flags; +#elif defined(HAVE_KMEM_CACHE_GFPFLAGS) + skc->skc_linux_cache->gfpflags |= flags; +#endif +} + #endif /* _SPL_KMEM_H */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index b673c2915..fc04604d5 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -33,6 +33,16 @@ #define SS_DEBUG_SUBSYS SS_KMEM +/* + * Within the scope of spl-kmem.c file the kmem_cache_* definitions + * are removed to allow access to the real Linux slab allocator. + */ +#undef kmem_cache_destroy +#undef kmem_cache_create +#undef kmem_cache_alloc +#undef kmem_cache_free + + /* * Cache expiration was implemented because it was part of the default Solaris * kmem_cache behavior. The idea is that per-cpu objects which haven't been @@ -60,6 +70,16 @@ unsigned int spl_kmem_cache_max_size = 32; module_param(spl_kmem_cache_max_size, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB"); +unsigned int spl_kmem_cache_slab_limit = 0; +module_param(spl_kmem_cache_slab_limit, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_slab_limit, + "Objects less than N bytes use the Linux slab"); + +unsigned int spl_kmem_cache_kmem_limit = (PAGE_SIZE / 4); +module_param(spl_kmem_cache_kmem_limit, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, + "Objects less than N bytes use the kmalloc"); + /* * The minimum amount of memory measured in pages to be free at all * times on the system. This is similar to Linux's zone->pages_min @@ -1348,7 +1368,10 @@ spl_cache_age(void *data) return; atomic_inc(&skc->skc_ref); - spl_on_each_cpu(spl_magazine_age, skc, 1); + + if (!(skc->skc_flags & KMC_NOMAGAZINE)) + spl_on_each_cpu(spl_magazine_age, skc, 1); + spl_slab_reclaim(skc, skc->skc_reap, 0); while (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && !id) { @@ -1493,6 +1516,9 @@ spl_magazine_create(spl_kmem_cache_t *skc) int i; SENTRY; + if (skc->skc_flags & KMC_NOMAGAZINE) + SRETURN(0); + skc->skc_mag_size = spl_magazine_size(skc); skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; @@ -1519,6 +1545,11 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) int i; SENTRY; + if (skc->skc_flags & KMC_NOMAGAZINE) { + SEXIT; + return; + } + for_each_online_cpu(i) { skm = skc->skc_mag[i]; spl_cache_flush(skc, skm, skm->skm_avail); @@ -1541,11 +1572,12 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) * flags * KMC_NOTOUCH Disable cache object aging (unsupported) * KMC_NODEBUG Disable debugging (unsupported) - * KMC_NOMAGAZINE Disable magazine (unsupported) * KMC_NOHASH Disable hashing (unsupported) * KMC_QCACHE Disable qcache (unsupported) + * KMC_NOMAGAZINE Enabled for kmem/vmem, Disabled for Linux slab * KMC_KMEM Force kmem backed cache * KMC_VMEM Force vmem backed cache + * KMC_SLAB Force Linux slab backed cache * KMC_OFFSLAB Locate objects off the slab */ spl_kmem_cache_t * @@ -1591,6 +1623,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_reclaim = reclaim; skc->skc_private = priv; skc->skc_vmp = vmp; + skc->skc_linux_cache = NULL; skc->skc_flags = flags; skc->skc_obj_size = size; skc->skc_obj_align = SPL_KMEM_CACHE_ALIGN; @@ -1617,28 +1650,69 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_obj_emergency = 0; skc->skc_obj_emergency_max = 0; + /* + * Verify the requested alignment restriction is sane. + */ if (align) { VERIFY(ISP2(align)); - VERIFY3U(align, >=, SPL_KMEM_CACHE_ALIGN); /* Min alignment */ - VERIFY3U(align, <=, PAGE_SIZE); /* Max alignment */ + VERIFY3U(align, >=, SPL_KMEM_CACHE_ALIGN); + VERIFY3U(align, <=, PAGE_SIZE); skc->skc_obj_align = align; } - /* If none passed select a cache type based on object size */ - if (!(skc->skc_flags & (KMC_KMEM | KMC_VMEM))) { - if (spl_obj_size(skc) < (PAGE_SIZE / 8)) + /* + * When no specific type of slab is requested (kmem, vmem, or + * linuxslab) then select a cache type based on the object size + * and default tunables. + */ + if (!(skc->skc_flags & (KMC_KMEM | KMC_VMEM | KMC_SLAB))) { + + /* + * Objects smaller than spl_kmem_cache_slab_limit can + * use the Linux slab for better space-efficiency. By + * default this functionality is disabled until its + * performance characters are fully understood. + */ + if (spl_kmem_cache_slab_limit && + size <= (size_t)spl_kmem_cache_slab_limit) + skc->skc_flags |= KMC_SLAB; + + /* + * Small objects, less than spl_kmem_cache_kmem_limit per + * object should use kmem because their slabs are small. + */ + else if (spl_obj_size(skc) <= spl_kmem_cache_kmem_limit) skc->skc_flags |= KMC_KMEM; + + /* + * All other objects are considered large and are placed + * on vmem backed slabs. + */ else skc->skc_flags |= KMC_VMEM; } - rc = spl_slab_size(skc, &skc->skc_slab_objs, &skc->skc_slab_size); - if (rc) - SGOTO(out, rc); + /* + * Given the type of slab allocate the required resources. + */ + if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { + rc = spl_slab_size(skc, + &skc->skc_slab_objs, &skc->skc_slab_size); + if (rc) + SGOTO(out, rc); - rc = spl_magazine_create(skc); - if (rc) - SGOTO(out, rc); + rc = spl_magazine_create(skc); + if (rc) + SGOTO(out, rc); + } else { + skc->skc_linux_cache = kmem_cache_create( + skc->skc_name, size, align, 0, NULL); + if (skc->skc_linux_cache == NULL) + SGOTO(out, rc = ENOMEM); + + kmem_cache_set_allocflags(skc, __GFP_COMP); + skc->skc_flags |= KMC_NOMAGAZINE; + } if (spl_kmem_cache_expire & KMC_EXPIRE_AGE) skc->skc_taskqid = taskq_dispatch_delay(spl_kmem_cache_taskq, @@ -1680,6 +1754,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skc->skc_flags & (KMC_KMEM | KMC_VMEM | KMC_SLAB)); down_write(&spl_kmem_cache_sem); list_del_init(&skc->skc_list); @@ -1699,8 +1774,14 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) * cache reaping action which races with this destroy. */ wait_event(wq, atomic_read(&skc->skc_ref) == 0); - spl_magazine_destroy(skc); - spl_slab_reclaim(skc, 0, 1); + if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { + spl_magazine_destroy(skc); + spl_slab_reclaim(skc, 0, 1); + } else { + ASSERT(skc->skc_flags & KMC_SLAB); + kmem_cache_destroy(skc->skc_linux_cache); + } + spin_lock(&skc->skc_lock); /* Validate there are no objects in use and free all the @@ -1806,7 +1887,9 @@ spl_cache_reclaim_wait(void *word) } /* - * No available objects on any slabs, create a new slab. + * No available objects on any slabs, create a new slab. Note that this + * functionality is disabled for KMC_SLAB caches which are backed by the + * Linux slab. */ static int spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) @@ -1815,6 +1898,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT((skc->skc_flags & KMC_SLAB) == 0); might_sleep(); *obj = NULL; @@ -2016,7 +2100,28 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); ASSERT(flags & KM_SLEEP); + atomic_inc(&skc->skc_ref); + + /* + * Allocate directly from a Linux slab. All optimizations are left + * to the underlying cache we only need to guarantee that KM_SLEEP + * callers will never fail. + */ + if (skc->skc_flags & KMC_SLAB) { + struct kmem_cache *slc = skc->skc_linux_cache; + + do { + obj = kmem_cache_alloc(slc, flags | __GFP_COMP); + if (obj && skc->skc_ctor) + skc->skc_ctor(obj, skc->skc_private, flags); + + } while ((obj == NULL) && !(flags & KM_NOSLEEP)); + + atomic_dec(&skc->skc_ref); + SRETURN(obj); + } + local_irq_disable(); restart: @@ -2068,6 +2173,17 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); atomic_inc(&skc->skc_ref); + /* + * Free the object from the Linux underlying Linux slab. + */ + if (skc->skc_flags & KMC_SLAB) { + if (skc->skc_dtor) + skc->skc_dtor(obj, skc->skc_private); + + kmem_cache_free(skc->skc_linux_cache, obj); + goto out; + } + /* * Only virtual slabs may have emergency objects and these objects * are guaranteed to have physical addresses. They must be removed @@ -2166,13 +2282,27 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - /* Prevent concurrent cache reaping when contended */ - if (test_and_set_bit(KMC_BIT_REAPING, &skc->skc_flags)) { - SEXIT; - return; + atomic_inc(&skc->skc_ref); + + /* + * Execute the registered reclaim callback if it exists. The + * per-cpu caches will be drained when is set KMC_EXPIRE_MEM. + */ + if (skc->skc_flags & KMC_SLAB) { + if (skc->skc_reclaim) + skc->skc_reclaim(skc->skc_private); + + if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) + kmem_cache_shrink(skc->skc_linux_cache); + + SGOTO(out, 0); } - atomic_inc(&skc->skc_ref); + /* + * Prevent concurrent cache reaping when contended. + */ + if (test_and_set_bit(KMC_BIT_REAPING, &skc->skc_flags)) + SGOTO(out, 0); /* * When a reclaim function is available it may be invoked repeatedly @@ -2222,7 +2352,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) clear_bit(KMC_BIT_REAPING, &skc->skc_flags); smp_mb__after_clear_bit(); wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); - +out: atomic_dec(&skc->skc_ref); SEXIT; diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 2bbc8d790..b4be84fef 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -646,6 +646,12 @@ slab_seq_show(struct seq_file *f, void *p) ASSERT(skc->skc_magic == SKC_MAGIC); + /* + * Backed by Linux slab see /proc/slabinfo. + */ + if (skc->skc_flags & KMC_SLAB) + return (0); + spin_lock(&skc->skc_lock); seq_printf(f, "%-36s ", skc->skc_name); seq_printf(f, "0x%05lx %9lu %9lu %8u %8u " diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 25a52b43d..4d060c138 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -394,18 +394,25 @@ splat_kmem_cache_test_debug(struct file *file, char *name, { int j; - splat_vprint(file, name, - "%s cache objects %d, slabs %u/%u objs %u/%u mags ", - kcp->kcp_cache->skc_name, kcp->kcp_count, + splat_vprint(file, name, "%s cache objects %d", + kcp->kcp_cache->skc_name, kcp->kcp_count); + + if (kcp->kcp_cache->skc_flags & (KMC_KMEM | KMC_VMEM)) { + splat_vprint(file, name, ", slabs %u/%u objs %u/%u", (unsigned)kcp->kcp_cache->skc_slab_alloc, (unsigned)kcp->kcp_cache->skc_slab_total, (unsigned)kcp->kcp_cache->skc_obj_alloc, (unsigned)kcp->kcp_cache->skc_obj_total); - for_each_online_cpu(j) - splat_print(file, "%u/%u ", - kcp->kcp_cache->skc_mag[j]->skm_avail, - kcp->kcp_cache->skc_mag[j]->skm_size); + if (!(kcp->kcp_cache->skc_flags & KMC_NOMAGAZINE)) { + splat_vprint(file, name, "%s", "mags"); + + for_each_online_cpu(j) + splat_print(file, "%u/%u ", + kcp->kcp_cache->skc_mag[j]->skm_avail, + kcp->kcp_cache->skc_mag[j]->skm_size); + } + } splat_print(file, "%s\n", ""); } @@ -900,14 +907,14 @@ splat_kmem_test8(struct file *file, void *arg) kmem_cache_reap_now(kcp->kcp_cache); splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST8_NAME, kcp); - if (kcp->kcp_cache->skc_obj_total == 0) + if (kcp->kcp_count == 0) break; set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ / 10); } - if (kcp->kcp_cache->skc_obj_total == 0) { + if (kcp->kcp_count == 0) { splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Successfully created %d objects " "in cache %s and reclaimed them\n", @@ -915,7 +922,7 @@ splat_kmem_test8(struct file *file, void *arg) } else { splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Failed to reclaim %u/%d objects from cache %s\n", - (unsigned)kcp->kcp_cache->skc_obj_total, + (unsigned)kcp->kcp_count, SPLAT_KMEM_OBJ_COUNT, SPLAT_KMEM_CACHE_NAME); rc = -ENOMEM; } @@ -995,14 +1002,14 @@ splat_kmem_test9(struct file *file, void *arg) for (i = 0; i < 60; i++) { splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST9_NAME, kcp); - if (kcp->kcp_cache->skc_obj_total == 0) + if (kcp->kcp_count == 0) break; set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ); } - if (kcp->kcp_cache->skc_obj_total == 0) { + if (kcp->kcp_count == 0) { splat_vprint(file, SPLAT_KMEM_TEST9_NAME, "Successfully created %d objects " "in cache %s and reclaimed them\n", @@ -1010,7 +1017,7 @@ splat_kmem_test9(struct file *file, void *arg) } else { splat_vprint(file, SPLAT_KMEM_TEST9_NAME, "Failed to reclaim %u/%d objects from cache %s\n", - (unsigned)kcp->kcp_cache->skc_obj_total, count, + (unsigned)kcp->kcp_count, count, SPLAT_KMEM_CACHE_NAME); rc = -ENOMEM; } From 376dc35e228498da7703e7ca4c2b75d16763c23b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 16 May 2014 09:29:21 -0700 Subject: [PATCH 0795/1062] Add spl_kmem_cache_reclaim module option The correct behavior for all registered shrinkers is to return the number of objects in their cache. In theory this allows the Linux VM to balance memory reclaim across all registered caches. In commit b9b3715 this behavior was disabled in favor of returning -1 which notifies the VM that no additional objects are available for reclaim. This was done as a workaround to resolve thrashing in shrink_slabs() which could occur when memory was low and numerous core where in reclaim. Unfortunately, this has been observed to increase the likelihood of OOM events when SPL slab consumers are responsible for consuming the majority of memory. Therefore, this patch makes this behavior tunable. Setting the spl_kmem_cache_reclaim module option to 0x1 will result in the shrinker only being called once. This is the default behavior. Signed-off-by: Brian Behlendorf Signed-off-by: Prakash Surya Closes #358 --- include/sys/kmem.h | 2 ++ module/spl/spl-kmem.c | 29 ++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 18533fe39..3418d3dd4 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -385,6 +385,8 @@ typedef enum kmem_cbrc { #define KMC_EXPIRE_AGE 0x1 /* Due to age */ #define KMC_EXPIRE_MEM 0x2 /* Due to low memory */ +#define KMC_RECLAIM_ONCE 0x1 /* Force a single shrinker pass */ + extern unsigned int spl_kmem_cache_expire; extern struct list_head spl_kmem_cache_list; extern struct rw_semaphore spl_kmem_cache_sem; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index fc04604d5..e458c2020 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -57,6 +57,16 @@ EXPORT_SYMBOL(spl_kmem_cache_expire); module_param(spl_kmem_cache_expire, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); +/* + * KMC_RECLAIM_ONCE is set as the default until zfsonlinux/spl#268 is + * definitively resolved. Depending on the system configuration and + * workload this may increase the likelihood of out of memory events. + * For those cases it is advised that this option be set to zero. + */ +unsigned int spl_kmem_cache_reclaim = KMC_RECLAIM_ONCE; +module_param(spl_kmem_cache_reclaim, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_reclaim, "Single reclaim pass (0x1)"); + unsigned int spl_kmem_cache_obj_per_slab = SPL_KMEM_CACHE_OBJ_PER_SLAB; module_param(spl_kmem_cache_obj_per_slab, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab, "Number of objects per slab"); @@ -2235,7 +2245,7 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, struct shrink_control *sc) { spl_kmem_cache_t *skc; - int unused = 0; + int alloc = 0; down_read(&spl_kmem_cache_sem); list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { @@ -2244,24 +2254,25 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); /* - * Presume everything alloc'ed in reclaimable, this ensures + * Presume everything alloc'ed is reclaimable, this ensures * we are called again with nr_to_scan > 0 so can try and * reclaim. The exact number is not important either so * we forgo taking this already highly contented lock. */ - unused += skc->skc_obj_alloc; + alloc += skc->skc_obj_alloc; } up_read(&spl_kmem_cache_sem); /* - * After performing reclaim always return -1 to indicate we cannot - * perform additional reclaim. This prevents shrink_slabs() from - * repeatedly invoking this generic shrinker and potentially spinning. + * When KMC_RECLAIM_ONCE is set allow only a single reclaim pass. + * This functionality only exists to work around a rare issue where + * shrink_slabs() is repeatedly invoked by many cores causing the + * system to thrash. */ - if (sc->nr_to_scan) - return -1; + if ((spl_kmem_cache_reclaim & KMC_RECLAIM_ONCE) && sc->nr_to_scan) + return (-1); - return unused; + return MAX((alloc * sysctl_vfs_cache_pressure) / 100, 0); } SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); From c4f38ddd8003ef51e7f4e92607b1838216650730 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 29 May 2014 14:55:40 -0700 Subject: [PATCH 0796/1062] Restrict release number to META version When creating packages in a git repository the release number can be automatically set by 'git describe'. This normally works well but if your repository has newer tags which match the form NAME-VERSION* the release may be incorrectly calculated. To prevent this the match patten has been restricted to NAME-VERSION. Signed-off-by: Brian Behlendorf --- config/spl-meta.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index a51fa797e..e98cc2ea6 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -57,7 +57,7 @@ AC_DEFUN([SPL_AC_META], [ SPL_META_RELEASE=_SPL_AC_META_GETVAL([Release]); if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then - _match="${SPL_META_NAME}-${SPL_META_VERSION}*" + _match="${SPL_META_NAME}-${SPL_META_VERSION}" _alias=$(git describe --match=${_match} 2>/dev/null) _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') if test -n "${_release}"; then From 4cdcdbff636763fbdae72e2f7e1f9e7971649cca Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 29 May 2014 14:06:32 -0700 Subject: [PATCH 0797/1062] Fix DKMS package upgrade and packager Running 'yum upgrade spl-dkms' package could appear to work properly and still leave you with no spl modules installed. This will occur when only the spl release, and not the version, are incremented. This may be the case for a fast moving spl-testing repository. During the upgrade process DKMS will realize that spl-x.y.z is already installed and remove it. DKMS then correctly builds the new modules for spl-x.y.z. However, as a final step when the old spl-x.y.z-r is removed the %preun script runs and removes the newly build modules. To handle this case the %preun script has been updated to only run when the installed version exactly matches the full spec file version. This change also updated ChangeLog section based on the DKMS reference spec file. Signed-off-by: Brian Behlendorf --- rpm/generic/spl-dkms.spec.in | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index d0a649036..6d8e058cb 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -1,3 +1,5 @@ +%{?!packager: %define packager Brian Behlendorf } + %define module @PACKAGE@ %define mkconf scripts/dkms.mkconf @@ -60,11 +62,16 @@ echo -e "support or upgrade DKMS to a more current version." exit 1 %preun -dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade +# Only remove the modules if they are for this %{version}-%{release}. A +# package upgrade can replace them if only the %{release} is changed. +RELEASE="/var/lib/dkms/%{module}/%{version}/build/%{module}.release" +if [ -f $RELEASE ] && [ `cat $RELEASE`%{?dist} = "%{version}-%{release}" ]; then + echo -e + echo -e "Uninstall of %{module} module (version %{version}) beginning:" + dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade +fi exit 0 %changelog -* Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 -- Released 0.6.2-1 -* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 -- First official stable release. +* %(date "+%a %b %d %Y") %packager %{version}-%{release} +- Automatic build by DKMS From 1e929b97ac3fd0aa752feba9f08caeb5356e9a43 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Mon, 9 Jun 2014 23:35:42 +0200 Subject: [PATCH 0798/1062] Set LANG to a reasonable default (C) Set LANG=C before calling 'rpmbuild' to avoid rpmbuild failing on the translated date string in the changelog. Signed-off-by: Turbo Fredriksson Signed-off-by: Brian Behlendorf Closes #306 --- config/rpm.am | 4 ++-- scripts/kmodtool | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/rpm.am b/config/rpm.am index 8b33bb5b6..311c754d4 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -63,7 +63,7 @@ srpm-common: dist rpmbuild="$$rpmbuild" \ rpmspec="$$rpmspec" \ rpm-local || exit 1; \ - $(RPMBUILD) \ + LANG=C $(RPMBUILD) \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ $(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ @@ -79,7 +79,7 @@ rpm-common: rpmbuild="$$rpmbuild" \ rpmspec="$$rpmspec" \ rpm-local || exit 1; \ - ${RPMBUILD} \ + LANG=C ${RPMBUILD} \ --define "_tmppath $$rpmbuild/TMP" \ --define "_topdir $$rpmbuild" \ $(def) --rebuild $$rpmpkg || exit 1; \ diff --git a/scripts/kmodtool b/scripts/kmodtool index 852ade021..ce3f04294 100644 --- a/scripts/kmodtool +++ b/scripts/kmodtool @@ -64,7 +64,7 @@ print_akmodtemplate () cat < Date: Thu, 12 Jun 2014 11:32:38 -0700 Subject: [PATCH 0799/1062] Tag spl-0.6.3 META file and release log updated. Signed-off-by: Brian Behlendorf --- META | 2 +- rpm/generic/spl-kmod.spec.in | 2 ++ rpm/generic/spl.spec.in | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/META b/META index d83c53644..117c3e336 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.6.2 +Version: 0.6.3 Release: 1 Release-Tags: relext diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 50947c035..490734667 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -160,6 +160,8 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 +- Released 0.6.3-1 * Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 - Released 0.6.2-1 * Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index a0fe29817..7934787c5 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -38,6 +38,8 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog +* Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 +- Released 0.6.3-1 * Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 - Released 0.6.2-1 * Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 From f6a869614e5bdf9a3819a845f7a90d8c9ede0fc3 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Wed, 18 Jun 2014 15:22:50 -0500 Subject: [PATCH 0800/1062] Safer debugging and assertion macros. Spl's debugging and assertion macros macro used the typical do/while(0) form for if/else friendliness, however, this limits their use in contexts where a do loop is not valid; such as within another multi-statement style macro. The following macros have been converted to not use do/while(0): PANIC, ASSERT, ASSERTF, VERIFY, VERIFY3_IMPL PANIC has been converted to a wrapper around the new spl_PANIC() function. The other macros have been converted to use the "&&" operator for the branch-predicition conditional and also to use spl_PANIC(). The __ASSERT() macro was not touched. It is only used by the debugging infrastructure and that code, including this macro, will be retired when the tracepoint patches are merged. Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #367 --- include/sys/debug.h | 56 ++++++++++++++++++++------------------------ module/spl/spl-err.c | 21 +++++++++++++++++ 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 9fa2653d4..3a4b1352f 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -54,28 +54,23 @@ #define SPL_DEBUG_STR "" #define PANIC(fmt, a...) \ -do { \ - printk(KERN_EMERG fmt, ## a); \ - spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); \ -} while (0) + spl_PANIC(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) #define __ASSERT(x) ((void)0) #define ASSERT(x) ((void)0) #define ASSERTF(x, y, z...) ((void)0) #define ASSERTV(x) #define VERIFY(cond) \ -do { \ - if (unlikely(!(cond))) \ - PANIC("VERIFY(" #cond ") failed\n"); \ -} while (0) + (void)(unlikely(!(cond)) && \ + spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ + "%s", "VERIFY(" #cond ") failed\n")) #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ -do { \ - if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) \ - PANIC("VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + (void)((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ + spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (" FMT " " #OP " " FMT ")\n", \ - CAST (LEFT), CAST (RIGHT)); \ -} while (0) + CAST (LEFT), CAST (RIGHT))) #define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ @@ -94,11 +89,7 @@ do { \ #define SPL_DEBUG_STR " (DEBUG mode)" #define PANIC(fmt, a...) \ -do { \ - spl_debug_msg(NULL, 0, 0, \ - __FILE__, __FUNCTION__, __LINE__, fmt, ## a); \ - spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); \ -} while (0) + spl_PANIC(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) /* ASSERTION that is safe to use within the debug system */ #define __ASSERT(cond) \ @@ -111,24 +102,21 @@ do { \ /* ASSERTION that will debug log used outside the debug sysytem */ #define ASSERT(cond) \ -do { \ - if (unlikely(!(cond))) \ - PANIC("ASSERTION(" #cond ") failed\n"); \ -} while (0) + (void)(unlikely(!(cond)) && \ + spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ + "%s", "ASSERTION(" #cond ") failed\n")) #define ASSERTF(cond, fmt, a...) \ -do { \ - if (unlikely(!(cond))) \ - PANIC("ASSERTION(" #cond ") failed: " fmt, ## a); \ -} while (0) + (void)(unlikely(!(cond)) && \ + spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ + "ASSERTION(" #cond ") failed: " fmt, ## a)) #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ -do { \ - if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) \ - PANIC("VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + (void)((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ + spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (" FMT " " #OP " " FMT ")\n", \ - CAST (LEFT), CAST (RIGHT)); \ -} while (0) + CAST (LEFT), CAST (RIGHT))) #define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ @@ -146,6 +134,12 @@ do { \ #endif /* NDEBUG */ +/* + * Helpers for the Solaris debug macros above + */ +extern int spl_PANIC(char *filename, const char *functionname, + int lineno, const char *fmt, ...); + /* * Compile-time assertion. The condition 'x' must be constant. */ diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index b6d15f019..2706f9bd1 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -39,6 +39,27 @@ static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; #endif +int +spl_PANIC(char *filename, const char *functionname, + int lineno, const char *fmt, ...) { + char msg[MAXMSGLEN]; + va_list ap; + + va_start(ap, fmt); + if (vsnprintf(msg, sizeof (msg), fmt, ap) == sizeof (msg)) + msg[sizeof (msg) - 1] = '\0'; + va_end(ap); +#ifdef NDEBUG + printk(KERN_EMERG "%s", msg); +#else + spl_debug_msg(NULL, 0, 0, + filename, functionname, lineno, "%s", msg); +#endif + spl_debug_bug(filename, functionname, lineno, 0); + return 1; +} +EXPORT_SYMBOL(spl_PANIC); + void vpanic(const char *fmt, va_list ap) { From 377e12f14a2c3694c3a733782b91ae7beecc44f3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 16 Jul 2014 14:00:57 -0700 Subject: [PATCH 0801/1062] Rate limit debugging stack traces There have been issues in the past where excessive debug logging to the console has resulted in significant performance impacts. In the vast majority of these cases only a few stack traces are required to diagnose the issue. Therefore, stack traces dumped to the console will now we limited to 5 every 60s. Signed-off-by: Brian Behlendorf Signed-off-by: Prakash Surya Closes #374 --- module/spl/spl-debug.c | 22 +++++++++++++++------- module/spl/spl-kmem.c | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 93c3f31b8..6c4e043f0 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1073,15 +1074,22 @@ spl_debug_get_mb(void) } EXPORT_SYMBOL(spl_debug_get_mb); -void spl_debug_dumpstack(struct task_struct *tsk) +/* + * Limit the number of stack traces dumped to not more than 5 every + * 60 seconds to prevent denial-of-service attacks from debug code. + */ +DEFINE_RATELIMIT_STATE(dumpstack_ratelimit_state, 60 * HZ, 5); + +void +spl_debug_dumpstack(struct task_struct *tsk) { - extern void show_task(struct task_struct *); + if (__ratelimit(&dumpstack_ratelimit_state)) { + if (tsk == NULL) + tsk = current; - if (tsk == NULL) - tsk = current; - - printk("SPL: Showing stack for process %d\n", tsk->pid); - dump_stack(); + printk("SPL: Showing stack for process %d\n", tsk->pid); + dump_stack(); + } } EXPORT_SYMBOL(spl_debug_dumpstack); diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e458c2020..6389dc5aa 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -725,7 +725,7 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, "large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); - dump_stack(); + spl_debug_dumpstack(NULL); } /* Use the correct allocator */ From 7f23e0010977ffa492d6df57aee0c97ce8e74278 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Sat, 26 Apr 2014 20:56:03 -0500 Subject: [PATCH 0802/1062] Add functions and macros as used upstream. Added highbit64() and howmany() which are used in recent upstream code. Both highbit() and highbit64() should at some point be re-factored to use the optimized fls() and fls64() functions. Signed-off-by: Brian Behlendorf Signed-off-by: Prakash Surya Signed-off-by: Tim Chase Closes #363 --- include/sys/sysmacros.h | 4 ++++ module/spl/spl-generic.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index e73c7fd1e..565fc5600 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -150,6 +150,7 @@ extern unsigned long spl_hostid; /* Missing misc functions */ extern int highbit(unsigned long i); +extern int highbit64(uint64_t i); extern uint32_t zone_get_hostid(void *zone); extern void spl_setup(void); extern void spl_cleanup(void); @@ -172,6 +173,9 @@ extern void spl_cleanup(void); #ifndef roundup #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #endif +#ifndef howmany +#define howmany(x, y) (((x) + ((y) - 1)) / (y)) +#endif /* * Compatibility macros/typedefs needed for Solaris -> Linux port diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 4f0842b1a..6cb73ddb7 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -97,6 +97,36 @@ highbit(unsigned long i) } EXPORT_SYMBOL(highbit); +int +highbit64(uint64_t i) +{ + register int h = 1; + SENTRY; + + if (i == 0) + SRETURN(0); + if (i & 0xffffffff00000000ull) { + h += 32; i >>= 32; + } + if (i & 0xffff0000) { + h += 16; i >>= 16; + } + if (i & 0xff00) { + h += 8; i >>= 8; + } + if (i & 0xf0) { + h += 4; i >>= 4; + } + if (i & 0xc) { + h += 2; i >>= 2; + } + if (i & 0x2) { + h += 1; + } + SRETURN(h); +} +EXPORT_SYMBOL(highbit64); + #if BITS_PER_LONG == 32 /* * Support 64/64 => 64 division on a 32-bit platform. While the kernel From 2bf35fb7547f2b66a1905b5ee86b467ff2d3c4b6 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Fri, 25 Jul 2014 23:45:26 -0500 Subject: [PATCH 0803/1062] Add atomic_swap_32() and atomic_swap_64() The atomic_swap_32() function maps to atomic_xchg(), and the atomic_swap_64() function maps to atomic64_xchg(). Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #377 --- include/sys/atomic.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 31d35eb14..e034f2e2c 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -156,6 +156,19 @@ atomic_cas_32(volatile uint32_t *target, uint32_t cmp, return rc; } +static __inline__ uint32_t +atomic_swap_32(volatile uint32_t *target, uint32_t newval) +{ + uint32_t rc; + + spin_lock(&atomic32_lock); + rc = *target; + *target = newval; + spin_unlock(&atomic32_lock); + + return rc; +} + static __inline__ void atomic_inc_64(volatile uint64_t *target) { @@ -253,6 +266,18 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, return rc; } +static __inline__ uint64_t +atomic_swap_64(volatile uint64_t *target, uint64_t newval) +{ + uint64_t rc; + + spin_lock(&atomic64_lock); + rc = *target; + *target = newval; + spin_unlock(&atomic64_lock); + + return rc; +} #else /* ATOMIC_SPINLOCK */ @@ -265,6 +290,7 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, #define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) #define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) #define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) +#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x) #define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v)) #define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) #define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) @@ -274,6 +300,7 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, #define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) #define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) #define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) +#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x) #endif /* ATOMIC_SPINLOCK */ From c1aef26944ca8bc18e9f46f464c2957890c707e9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 7 Aug 2014 16:14:41 -0700 Subject: [PATCH 0804/1062] Set spl_kmem_cache_reclaim=0 to default Reinstate the correct default behavior of returning the number of objects in the cache for reclaim. This behavior was disabled in recent releases to do occasional reports of spinning in shrink_slabs(). Those issues have been resolved and can no longer can be reproduced. See commit 376dc35. Signed-off-by: Brian Behlendorf Signed-off-by: DHE Issue #358 Closes #379 --- module/spl/spl-kmem.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 6389dc5aa..0d1da4378 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -58,12 +58,13 @@ module_param(spl_kmem_cache_expire, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); /* - * KMC_RECLAIM_ONCE is set as the default until zfsonlinux/spl#268 is - * definitively resolved. Depending on the system configuration and - * workload this may increase the likelihood of out of memory events. - * For those cases it is advised that this option be set to zero. + * The default behavior is to report the number of objects remaining in the + * cache. This allows the Linux VM to repeatedly reclaim objects from the + * cache when memory is low satisfy other memory allocations. Alternately, + * setting this value to KMC_RECLAIM_ONCE limits how aggressively the cache + * is reclaimed. This may increase the likelihood of out of memory events. */ -unsigned int spl_kmem_cache_reclaim = KMC_RECLAIM_ONCE; +unsigned int spl_kmem_cache_reclaim = 0; module_param(spl_kmem_cache_reclaim, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_reclaim, "Single reclaim pass (0x1)"); From f2297b5a8932594a45c99d3d01b0d53a16ea9753 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 7 Aug 2014 16:23:04 -0700 Subject: [PATCH 0805/1062] Set spl_kmem_cache_slab_limit=16384 to default For small objects the Linux slab allocator should be used to make the most efficient use of the memory. However, large objects are not supported by the Linux slab and therefore the SPL implementation is preferred. A cutoff of 16K was determined to be optimal for architectures using 4K pages. Signed-off-by: Brian Behlendorf Signed-off-by: DHE Issue #356 Closes #379 --- module/spl/spl-kmem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 0d1da4378..0a9d77534 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -81,7 +81,17 @@ unsigned int spl_kmem_cache_max_size = 32; module_param(spl_kmem_cache_max_size, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB"); +/* + * For small objects the Linux slab allocator should be used to make the most + * efficient use of the memory. However, large objects are not supported by + * the Linux slab and therefore the SPL implementation is preferred. A cutoff + * of 16K was determined to be optimal for architectures using 4K pages. + */ +#if PAGE_SIZE == 4096 +unsigned int spl_kmem_cache_slab_limit = 16384; +#else unsigned int spl_kmem_cache_slab_limit = 0; +#endif module_param(spl_kmem_cache_slab_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_slab_limit, "Objects less than N bytes use the Linux slab"); From 2fc44f66ec9b83069593d87cf311069458c0d5ae Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 8 Aug 2014 17:41:22 -0700 Subject: [PATCH 0806/1062] Linux 3.17 compat: remove wait_on_bit action function Linux kernel 3.17 removes the action function argument from wait_on_bit(). Add autoconf test and compatibility macro to support the new interface. The former "wait_on_bit" interface required an 'action' function to be provided which does the actual waiting. There were over 20 such functions in the kernel, many of them identical, though most cases can be satisfied by one of just two functions: one which uses io_schedule() and one which just uses schedule(). This API change was made to consolidate all of those redundant wait functions. References: torvalds/linux@7431620 Signed-off-by: Ned Bass Signed-off-by: Brian Behlendorf Closes #378 --- config/spl-build.m4 | 26 +++++++++++++++++++++ include/linux/Makefile.am | 1 + include/linux/wait_compat.h | 45 +++++++++++++++++++++++++++++++++++++ include/sys/types.h | 1 + module/spl/spl-kmem.c | 11 ++------- 5 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 include/linux/wait_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index eef52334f..2514d8c5b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -94,6 +94,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_VFS_GETATTR SPL_AC_USLEEP_RANGE SPL_AC_KMEM_CACHE_ALLOCFLAGS + SPL_AC_WAIT_ON_BIT ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2570,3 +2571,28 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [ ]) ]) ]) + +dnl # +dnl # 3.17 API change, +dnl # wait_on_bit() no longer requires an action argument. The former +dnl # "wait_on_bit" interface required an 'action' function to be provided +dnl # which does the actual waiting. There were over 20 such functions in the +dnl # kernel, many of them identical, though most cases can be satisfied by one +dnl # of just two functions: one which uses io_schedule() and one which just +dnl # uses schedule(). This API change was made to consolidate all of those +dnl # redundant wait functions. +dnl # +AC_DEFUN([SPL_AC_WAIT_ON_BIT], [ + AC_MSG_CHECKING([whether wait_on_bit() takes an action]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + int (*action)(void *) = NULL; + wait_on_bit(NULL, 0, action, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 59f2ec5ab..ec7023d15 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -17,6 +17,7 @@ KERNEL_H = \ $(top_srcdir)/include/linux/sysctl_compat.h \ $(top_srcdir)/include/linux/time_compat.h \ $(top_srcdir)/include/linux/uaccess_compat.h \ + $(top_srcdir)/include/linux/wait_compat.h \ $(top_srcdir)/include/linux/zlib_compat.h USER_H = diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h new file mode 100644 index 000000000..66f9a9a61 --- /dev/null +++ b/include/linux/wait_compat.h @@ -0,0 +1,45 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2014 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_WAIT_COMPAT_H +#define _SPL_WAIT_COMPAT_H + + +#ifndef HAVE_WAIT_ON_BIT_ACTION +# define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode) +#else + +static inline int +spl_bit_wait(void *word) +{ + schedule(); + return 0; +} + +#define spl_wait_on_bit(word, bit, mode) \ + wait_on_bit(word, bit, spl_bit_wait, mode) + +#endif /* HAVE_WAIT_ON_BIT_ACTION */ + +#endif /* SPL_WAIT_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index decb6bba8..fcec0fa31 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -43,6 +43,7 @@ #include #include #include +#include #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 0a9d77534..6de513e45 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1900,13 +1900,6 @@ spl_cache_grow_wait(spl_kmem_cache_t *skc) return !test_bit(KMC_BIT_GROWING, &skc->skc_flags); } -static int -spl_cache_reclaim_wait(void *word) -{ - schedule(); - return 0; -} - /* * No available objects on any slabs, create a new slab. Note that this * functionality is disabled for KMC_SLAB caches which are backed by the @@ -1928,8 +1921,8 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) * then return so the local magazine can be rechecked for new objects. */ if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { - rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, - spl_cache_reclaim_wait, TASK_UNINTERRUPTIBLE); + rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, + TASK_UNINTERRUPTIBLE); SRETURN(rc ? rc : -EAGAIN); } From ec18fe3ce8f27cfd86743f091d2d57e78dd8a5af Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 29 Jun 2014 01:00:02 -0400 Subject: [PATCH 0807/1062] Cleanup vn_rename() and vn_remove() zfsonlinux/spl#bcb15891ab394e11615eee08bba1fd85ac32e158 implemented Linux 3.6+ support by adding duplicate vn_rename and vn_remove functions. The new ones were cleaner, but the duplicate functions made the codebase less maintainable. This adds some compatibility shims that allow us to retire the older vn_rename and vn_remove in favor of the new ones on old kernels. The result is a net 143 line reduction in lines of code and a cleaner codebase. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #370 --- config/spl-build.m4 | 96 ++++------- include/linux/file_compat.h | 18 --- include/sys/vnode.h | 9 -- module/spl/spl-generic.c | 3 - module/spl/spl-vnode.c | 308 ++++++++++++------------------------ 5 files changed, 129 insertions(+), 305 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2514d8c5b..4b821e980 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -28,7 +28,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_TYPE_UINTPTR_T SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SHRINKER_CALLBACK - SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED SPL_AC_CTL_NAME @@ -81,9 +80,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KERNEL_FALLOCATE SPL_AC_SHRINK_DCACHE_MEMORY SPL_AC_SHRINK_ICACHE_MEMORY - SPL_AC_KERN_PATH_PARENT_HEADER - SPL_AC_KERN_PATH_PARENT_SYMBOL - SPL_AC_KERN_PATH_LOCKED + SPL_AC_KERN_PATH SPL_AC_CONFIG_KALLSYMS SPL_AC_CONFIG_ZLIB_INFLATE SPL_AC_CONFIG_ZLIB_DEFLATE @@ -990,28 +987,6 @@ AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # 2.6.25 API change, -dnl # struct path entry added to struct nameidata -dnl # -AC_DEFUN([SPL_AC_PATH_IN_NAMEIDATA], - [AC_MSG_CHECKING([whether struct path used in struct nameidata]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct nameidata nd __attribute__ ((unused)); - - nd.path.mnt = NULL; - nd.path.dentry = NULL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PATH_IN_NAMEIDATA, 1, - [struct path used in struct nameidata]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # Custom SPL patch may export this system it is not required dnl # @@ -2279,56 +2254,41 @@ AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], ]) dnl # -dnl # 2.6.39 API compat, -dnl # The path_lookup() function has been renamed to kern_path_parent() -dnl # and the flags argument has been removed. The only behavior now -dnl # offered is that of LOOKUP_PARENT. The spl already always passed -dnl # this flag so dropping the flag does not impact us. +dnl # 2.6.28 API change +dnl # The kern_path() function has been introduced. We adopt it as the new way +dnl # of looking up paths. When it is not available, we emulate it using the +dnl # older interfaces. dnl # -AC_DEFUN([SPL_AC_KERN_PATH_PARENT_HEADER], [ - SPL_CHECK_SYMBOL_HEADER( - [kern_path_parent], - [int kern_path_parent(const char \*, struct nameidata \*)], - [include/linux/namei.h], - [AC_DEFINE(HAVE_KERN_PATH_PARENT_HEADER, 1, - [kern_path_parent() is available])], - []) -]) - -dnl # -dnl # 3.1 API compat, -dnl # The kern_path_parent() symbol is no longer exported by the kernel. -dnl # However, it remains the prefered interface and since we still have -dnl # access to the prototype we dynamically lookup the required address. -dnl # -AC_DEFUN([SPL_AC_KERN_PATH_PARENT_SYMBOL], - [AC_MSG_CHECKING([whether kern_path_parent() is available]) +AC_DEFUN([SPL_AC_KERN_PATH], + [AC_MSG_CHECKING([whether kern_path() is available]) SPL_LINUX_TRY_COMPILE_SYMBOL([ #include ], [ - kern_path_parent(NULL, NULL); - ], [kern_path_parent], [fs/namei.c], [ + int r = kern_path(NULL, 0, NULL); + ], [kern_path], [fs/namei.c], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERN_PATH_PARENT_SYMBOL, 1, - [kern_path_parent() is available]) + AC_DEFINE(HAVE_KERN_PATH, 1, + [kern_path() is available]) ], [ AC_MSG_RESULT(no) - ]) -]) + AC_MSG_CHECKING([whether path_lookup() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + int r = path_lookup(NULL, 0, NULL); + ], [path_lookup], [fs/namei.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERN_PATH, 1, + [kern_path() is available]) + ], [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + *** Neither kern_path() nor path_lookup() is available. + *** Please file an issue: + *** https://github.com/zfsonlinux/spl/issues/new]) -dnl # -dnl # 3.6 API compat, -dnl # The kern_path_parent() function was replaced by the kern_path_locked() -dnl # function to eliminate all struct nameidata usage outside fs/namei.c. -dnl # -AC_DEFUN([SPL_AC_KERN_PATH_LOCKED], [ - SPL_CHECK_SYMBOL_HEADER( - [kern_path_locked], - [struct dentry \*kern_path_locked(const char \*, struct path \*)], - [include/linux/namei.h], - [AC_DEFINE(HAVE_KERN_PATH_LOCKED, 1, - [kern_path_locked() is available])], - []) + ]) + ]) ]) dnl # diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 4588d6442..949d844e7 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -91,23 +91,5 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) #define spl_inode_unlock(ip) (up(&(ip)->i_sem)) #endif /* HAVE_INODE_I_MUTEX */ -#ifdef HAVE_KERN_PATH_PARENT_HEADER -# ifndef HAVE_KERN_PATH_PARENT_SYMBOL -typedef int (*kern_path_parent_t)(const char *, struct nameidata *); -extern kern_path_parent_t kern_path_parent_fn; -# define spl_kern_path_parent(path, nd) kern_path_parent_fn(path, nd) -# else -# define spl_kern_path_parent(path, nd) kern_path_parent(path, nd) -# endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ -#else -# define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd) -#endif /* HAVE_KERN_PATH_PARENT_HEADER */ - -#ifdef HAVE_KERN_PATH_LOCKED -typedef struct dentry * (*kern_path_locked_t)(const char *, struct path *); -extern kern_path_locked_t kern_path_locked_fn; -# define spl_kern_path_locked(name, path) kern_path_locked_fn(name, path) -#endif /* HAVE_KERN_PATH_LOCKED */ - #endif /* SPL_FILE_COMPAT_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 35607e1ea..07a344938 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -103,14 +103,6 @@ #define CREATE_XATTR_DIR 0x04 #define ATTR_NOACLCHECK 0x20 -#ifdef HAVE_PATH_IN_NAMEIDATA -# define nd_dentry path.dentry -# define nd_mnt path.mnt -#else -# define nd_dentry dentry -# define nd_mnt mnt -#endif - typedef enum vtype { VNON = 0, VREG = 1, @@ -194,7 +186,6 @@ extern file_t *vn_getf(int fd); extern void vn_releasef(int fd); extern int vn_set_pwd(const char *filename); -int spl_vn_init_kallsyms_lookup(void); int spl_vn_init(void); void spl_vn_fini(void); diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 6cb73ddb7..194cd7df1 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -664,9 +664,6 @@ __init spl_init(void) if ((rc = spl_kmem_init_kallsyms_lookup())) SGOTO(out10, rc); - if ((rc = spl_vn_init_kallsyms_lookup())) - SGOTO(out10, rc); - printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); SRETURN(rc); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index fa3e49054..e4eac22eb 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -44,17 +44,6 @@ static spl_kmem_cache_t *vn_file_cache; static DEFINE_SPINLOCK(vn_file_lock); static LIST_HEAD(vn_file_list); -#ifdef HAVE_KERN_PATH_PARENT_HEADER -#ifndef HAVE_KERN_PATH_PARENT_SYMBOL -kern_path_parent_t kern_path_parent_fn = SYMBOL_POISON; -EXPORT_SYMBOL(kern_path_parent_fn); -#endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ -#endif /* HAVE_KERN_PATH_PARENT_HEADER */ - -#ifdef HAVE_KERN_PATH_LOCKED -kern_path_locked_t kern_path_locked_fn = SYMBOL_POISON; -#endif /* HAVE_KERN_PATH_LOCKED */ - vtype_t vn_mode_to_vtype(mode_t mode) { @@ -307,7 +296,104 @@ vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct) } EXPORT_SYMBOL(vn_seek); -#ifdef HAVE_KERN_PATH_LOCKED +/* + * kern_path() was introduced in Linux 2.6.28. We duplicate it as a + * compatibility shim for earlier kernels. + */ +#ifndef HAVE_KERN_PATH +int +kern_path(const char *name, unsigned int flags, struct path *path) +{ + struct nameidata nd; + int rc = path_lookup(name, flags, &nd); + if (!rc) + *path = nd.path; + return rc; +} +#endif /* HAVE_KERN_PATH */ + +/* + * spl_basename() takes a NULL-terminated string s as input containing a path. + * It returns a char pointer to a string and a length that describe the + * basename of the path. If the basename is not "." or "/", it will be an index + * into the string. While the string should be NULL terminated, the section + * referring to the basename is not. spl_basename is dual-licensed GPLv2+ and + * CC0. Anyone wishing to reuse it in another codebase may pick either license. + */ +static void +spl_basename(const char *s, const char **str, int *len) +{ + size_t i, end; + + ASSERT(str); + ASSERT(len); + + if (!s || !*s) { + *str = "."; + *len = 1; + return; + } + + i = strlen(s) - 1; + + while (i && s[i--] == '/'); + + if (i == 0) { + *str = "/"; + *len = 1; + return; + } + + end = i; + + for (end = i; i; i--) { + if (s[i] == '/') { + *str = &s[i+1]; + *len = end - i + 1; + return; + } + } + + *str = s; + *len = end + 1; +} + +static struct dentry * +spl_kern_path_locked(const char *name, struct path *path) +{ + struct path parent; + struct dentry *dentry; + const char *basename; + int len; + int rc; + + ASSERT(name); + ASSERT(path); + + spl_basename(name, &basename, &len); + + /* We do not accept "." or ".." */ + if (len <= 2 && basename[0] == '.') + if (len == 1 || basename[1] == '.') + return (ERR_PTR(-EACCES)); + + rc = kern_path(name, LOOKUP_PARENT, &parent); + if (rc) + return (ERR_PTR(rc)); + + spl_inode_lock_nested(parent.dentry->d_inode, I_MUTEX_PARENT); + + dentry = lookup_one_len(basename, parent.dentry, len); + if (IS_ERR(dentry)) { + spl_inode_unlock(parent.dentry->d_inode); + path_put(&parent); + } else { + *path = parent; + } + + return (dentry); +} + /* Based on do_unlinkat() from linux/fs/namei.c */ int vn_remove(const char *path, uio_seg_t seg, int flags) @@ -328,11 +414,10 @@ vn_remove(const char *path, uio_seg_t seg, int flags) SGOTO(slashes, rc = 0); inode = dentry->d_inode; - if (!inode) - SGOTO(slashes, rc = 0); - if (inode) - ihold(inode); + atomic_inc(&inode->i_count); + else + SGOTO(slashes, rc = 0); #ifdef HAVE_2ARGS_VFS_UNLINK rc = vfs_unlink(parent.dentry->d_inode, dentry); @@ -437,172 +522,6 @@ exit: } EXPORT_SYMBOL(vn_rename); -#else -static struct dentry * -vn_lookup_hash(struct nameidata *nd) -{ - return lookup_one_len((const char *)nd->last.name, - nd->nd_dentry, nd->last.len); -} /* lookup_hash() */ - -static void -vn_path_release(struct nameidata *nd) -{ - dput(nd->nd_dentry); - mntput(nd->nd_mnt); -} - -/* Modified do_unlinkat() from linux/fs/namei.c, only uses exported symbols */ -int -vn_remove(const char *path, uio_seg_t seg, int flags) -{ - struct dentry *dentry; - struct nameidata nd; - struct inode *inode = NULL; - int rc = 0; - SENTRY; - - ASSERT(seg == UIO_SYSSPACE); - ASSERT(flags == RMFILE); - - rc = spl_kern_path_parent(path, &nd); - if (rc) - SGOTO(exit, rc); - - rc = -EISDIR; - if (nd.last_type != LAST_NORM) - SGOTO(exit1, rc); - - spl_inode_lock_nested(nd.nd_dentry->d_inode, I_MUTEX_PARENT); - dentry = vn_lookup_hash(&nd); - rc = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { - /* Why not before? Because we want correct rc value */ - if (nd.last.name[nd.last.len]) - SGOTO(slashes, rc); - - inode = dentry->d_inode; - if (inode) - atomic_inc(&inode->i_count); -#ifdef HAVE_2ARGS_VFS_UNLINK - rc = vfs_unlink(nd.nd_dentry->d_inode, dentry); -#else - rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, NULL); -#endif /* HAVE_2ARGS_VFS_UNLINK */ -exit2: - dput(dentry); - } - - spl_inode_unlock(nd.nd_dentry->d_inode); - if (inode) - iput(inode); /* truncate the inode here */ -exit1: - vn_path_release(&nd); -exit: - SRETURN(-rc); - -slashes: - rc = !dentry->d_inode ? -ENOENT : - S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR; - SGOTO(exit2, rc); -} /* vn_remove() */ -EXPORT_SYMBOL(vn_remove); - -/* Modified do_rename() from linux/fs/namei.c, only uses exported symbols */ -int -vn_rename(const char *oldname, const char *newname, int x1) -{ - struct dentry *old_dir, *new_dir; - struct dentry *old_dentry, *new_dentry; - struct dentry *trap; - struct nameidata oldnd, newnd; - int rc = 0; - SENTRY; - - rc = spl_kern_path_parent(oldname, &oldnd); - if (rc) - SGOTO(exit, rc); - - rc = spl_kern_path_parent(newname, &newnd); - if (rc) - SGOTO(exit1, rc); - - rc = -EXDEV; - if (oldnd.nd_mnt != newnd.nd_mnt) - SGOTO(exit2, rc); - - old_dir = oldnd.nd_dentry; - rc = -EBUSY; - if (oldnd.last_type != LAST_NORM) - SGOTO(exit2, rc); - - new_dir = newnd.nd_dentry; - if (newnd.last_type != LAST_NORM) - SGOTO(exit2, rc); - - trap = lock_rename(new_dir, old_dir); - - old_dentry = vn_lookup_hash(&oldnd); - - rc = PTR_ERR(old_dentry); - if (IS_ERR(old_dentry)) - SGOTO(exit3, rc); - - /* source must exist */ - rc = -ENOENT; - if (!old_dentry->d_inode) - SGOTO(exit4, rc); - - /* unless the source is a directory trailing slashes give -ENOTDIR */ - if (!S_ISDIR(old_dentry->d_inode->i_mode)) { - rc = -ENOTDIR; - if (oldnd.last.name[oldnd.last.len]) - SGOTO(exit4, rc); - if (newnd.last.name[newnd.last.len]) - SGOTO(exit4, rc); - } - - /* source should not be ancestor of target */ - rc = -EINVAL; - if (old_dentry == trap) - SGOTO(exit4, rc); - - new_dentry = vn_lookup_hash(&newnd); - rc = PTR_ERR(new_dentry); - if (IS_ERR(new_dentry)) - SGOTO(exit4, rc); - - /* target should not be an ancestor of source */ - rc = -ENOTEMPTY; - if (new_dentry == trap) - SGOTO(exit5, rc); - -#if defined(HAVE_4ARGS_VFS_RENAME) - rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry); -#elif defined(HAVE_5ARGS_VFS_RENAME) - rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry, NULL); -#else - rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry, NULL, 0); -#endif -exit5: - dput(new_dentry); -exit4: - dput(old_dentry); -exit3: - unlock_rename(new_dir, old_dir); -exit2: - vn_path_release(&newnd); -exit1: - vn_path_release(&oldnd); -exit: - SRETURN(-rc); -} -EXPORT_SYMBOL(vn_rename); -#endif /* HAVE_KERN_PATH_LOCKED */ - int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) { @@ -969,31 +888,6 @@ vn_file_cache_destructor(void *buf, void *cdrarg) mutex_destroy(&fp->f_lock); } /* vn_file_cache_destructor() */ -int spl_vn_init_kallsyms_lookup(void) -{ -#ifdef HAVE_KERN_PATH_PARENT_HEADER -#ifndef HAVE_KERN_PATH_PARENT_SYMBOL - kern_path_parent_fn = (kern_path_parent_t) - spl_kallsyms_lookup_name("kern_path_parent"); - if (!kern_path_parent_fn) { - printk(KERN_ERR "Error: Unknown symbol kern_path_parent\n"); - return -EFAULT; - } -#endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ -#endif /* HAVE_KERN_PATH_PARENT_HEADER */ - -#ifdef HAVE_KERN_PATH_LOCKED - kern_path_locked_fn = (kern_path_locked_t) - spl_kallsyms_lookup_name("kern_path_locked"); - if (!kern_path_locked_fn) { - printk(KERN_ERR "Error: Unknown symbol kern_path_locked\n"); - return -EFAULT; - } -#endif - - return (0); -} - int spl_vn_init(void) { From f9bde4f74be5e5030571415d9c869400dff3eda6 Mon Sep 17 00:00:00 2001 From: stf Date: Sun, 17 Aug 2014 00:16:08 +0200 Subject: [PATCH 0808/1062] Avoid PAGESIZE redefinition Add #ifndef PAGESIZE to avoid redefinition warning on platforms where this value is already provided. Signed-off-by: stf Signed-off-by: Brian Behlendorf Closes #382 --- include/sys/sysmacros.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 565fc5600..33e92b6d8 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -102,9 +102,12 @@ #define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) #endif -/* Missing macros +/* + * Missing macros */ +#ifndef PAGESIZE #define PAGESIZE PAGE_SIZE +#endif /* from Solaris sys/byteorder.h */ #define BSWAP_8(x) ((x) & 0xff) From e3020723dc43af2bc22af0d68571a61daf9b44d0 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Sun, 14 Sep 2014 15:47:22 +0000 Subject: [PATCH 0809/1062] Linux 3.16 compat: smp_mb__after_clear_bit() The smp_mb__{before,after}_clear_bit functions have been renamed smp_mb__{before,after}_atomic. Rather than adding a compatibility function to handle this the code has been updated to use smp_wmb(). This has the advantage of being a stable functionally equivalent interface. On many architectures smp_mb__after_clear_bit() expands to smp_wmb(). Others might be able to do something slightly more efficient but this will be safe and correct on all of them. Signed-off-by: Turbo Fredriksson Signed-off-by: Brian Behlendorf Closes #386 --- module/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 6de513e45..79954eb2a 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2365,7 +2365,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) spl_slab_reclaim(skc, count, 1); clear_bit(KMC_BIT_REAPING, &skc->skc_flags); - smp_mb__after_clear_bit(); + smp_wmb(); wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); out: atomic_dec(&skc->skc_ref); From 81857a34d1d767abf40aea7e6db074d8cbf7b49f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Sep 2014 17:47:10 -0400 Subject: [PATCH 0810/1062] Fix bug in SPLAT taskq:front While running SPLAT on a kernel with CONFIG_DEBUG_ATOMIC_SLEEP enabled the taskq:front was flagged as a test which might sleep which in an unsafe context. Specifically, the splat_vprint() function which internally takes a mutex was being called under a spin lock. Moving the log function outside the spin lock cleanly solves this issue. Signed-off-by: Brian Behlendorf --- module/splat/splat-taskq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 074af895b..33e49b2f1 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -814,10 +814,11 @@ splat_taskq_test6_func(void *arg) spin_lock(&tq_arg->lock); tq_arg->order[tq_arg->flag] = tq_id->id; tq_arg->flag++; + spin_unlock(&tq_arg->lock); + splat_vprint(tq_arg->file, tq_arg->name, "Taskqid %d complete for taskq '%s'\n", tq_id->id, tq_arg->name); - spin_unlock(&tq_arg->lock); } static int From de2a22fcb3e7e8d7c4f695aeb0caf9cdc8f82c9a Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Thu, 9 Oct 2014 14:08:00 -0300 Subject: [PATCH 0811/1062] Install header during post-build rather than post-install. New versions of dkms clean up the build directory after installing. It appears that this was always intended, but had rm -rf "/path/to/build/*" (note the quotes), which prevented it from working. Also, the build step is already installing stuff into the directory where these files go, so installing our stuff there as part of build rather than install makes sense. Signed-off-by: Tom Prince Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #399 --- scripts/Makefile.am | 2 +- scripts/dkms.mkconf | 2 +- scripts/{dkms.postinst => dkms.postbuild} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename scripts/{dkms.postinst => dkms.postbuild} (100%) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 4c0d7ba40..f146ec6e6 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = check.sh dkms.mkconf dkms.postinst kmodtool +EXTRA_DIST = check.sh dkms.mkconf dkms.postbuild kmodtool check: $(top_srcdir)/scripts/check.sh diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf index f9cf69692..2fa3dd2b4 100755 --- a/scripts/dkms.mkconf +++ b/scripts/dkms.mkconf @@ -56,7 +56,7 @@ PRE_BUILD="configure } ) " -POST_INSTALL="scripts/dkms.postinst +POST_BUILD="scripts/dkms.postbuild -n \${PACKAGE_NAME} -v \${PACKAGE_VERSION} -a \${arch} diff --git a/scripts/dkms.postinst b/scripts/dkms.postbuild similarity index 100% rename from scripts/dkms.postinst rename to scripts/dkms.postbuild From 62032954383dc6d1200890f07f56bb0ad85451be Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Sep 2014 16:01:22 -0400 Subject: [PATCH 0812/1062] Make license compatibility checks consistent Apply the license specified in the META file to ensure the compatibility checks are all performed consistently. Signed-off-by: Brian Behlendorf --- META | 2 ++ config/spl-build.m4 | 23 ++++++++++++++++++----- config/spl-meta.m4 | 8 ++++++++ include/sys/mutex.h | 19 ------------------- module/spl/spl-generic.c | 4 ++-- module/splat/splat-ctl.c | 4 ++-- 6 files changed, 32 insertions(+), 28 deletions(-) diff --git a/META b/META index 117c3e336..13d0d028a 100644 --- a/META +++ b/META @@ -4,3 +4,5 @@ Branch: 1.0 Version: 0.6.3 Release: 1 Release-Tags: relext +License: GPL +Author: OpenZFS on Linux diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 4b821e980..f9287e2de 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -426,11 +426,11 @@ AC_DEFUN([SPL_AC_PACKAGE], [ ]) AC_DEFUN([SPL_AC_LICENSE], [ + AC_MSG_CHECKING([spl author]) + AC_MSG_RESULT([$SPL_META_AUTHOR]) + AC_MSG_CHECKING([spl license]) - LICENSE=GPL - AC_MSG_RESULT([$LICENSE]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" - AC_SUBST(LICENSE) + AC_MSG_RESULT([$SPL_META_LICENSE]) ]) AC_DEFUN([SPL_AC_CONFIG], [ @@ -737,7 +737,8 @@ AC_DEFUN([SPL_CHECK_HEADER], ]) dnl # -dnl # Basic toolchain sanity check. +dnl # Basic toolchain sanity check. Verify that kernel modules can +dnl # be built and which symbols can be used. dnl # AC_DEFUN([SPL_AC_TEST_MODULE], [AC_MSG_CHECKING([whether modules can be built]) @@ -753,6 +754,18 @@ AC_DEFUN([SPL_AC_TEST_MODULE], *** Please run 'make scripts' inside the kernel source tree.]) fi ]) + + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([ + #include "$LINUX/include/linux/license.h" + ], [ + return !license_is_gpl_compatible("$SPL_META_LICENSE"); + ]) + ], [ + AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1], + [Define to 1 if GPL-only symbols can be used]) + ], [ + ]) ]) dnl # diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index e98cc2ea6..0561fbbc5 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -76,6 +76,14 @@ AC_DEFUN([SPL_AC_META], [ AC_SUBST([RELEASE]) fi + SPL_META_LICENSE=_SPL_AC_META_GETVAL([License]); + if test -n "$SPL_META_LICENSE"; then + AC_DEFINE_UNQUOTED([SPL_META_LICENSE], ["$SPL_META_LICENSE"], + [Define the project license.] + ) + AC_SUBST([SPL_META_LICENSE]) + fi + if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then SPL_META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" test -n "$SPL_META_RELEASE" && diff --git a/include/sys/mutex.h b/include/sys/mutex.h index ec3cfd529..cc63a6be0 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -85,12 +85,6 @@ mutex_owner(kmutex_t *mp) }) #define mutex_exit(mp) mutex_unlock(&(mp)->m) -#ifdef HAVE_GPL_ONLY_SYMBOLS -# define mutex_enter_nested(mp, sc) mutex_lock_nested(&(mp)->m, sc) -#else -# define mutex_enter_nested(mp, sc) mutex_enter(mp) -#endif /* HAVE_GPL_ONLY_SYMBOLS */ - #else /* HAVE_MUTEX_OWNER */ typedef struct { @@ -197,19 +191,6 @@ spl_mutex_clear_owner(kmutex_t *mp) mutex_unlock(MUTEX(mp)); \ }) -#ifdef HAVE_GPL_ONLY_SYMBOLS -# define mutex_enter_nested(mp, sc) \ -({ \ - mutex_lock_nested(MUTEX(mp), sc); \ - spl_mutex_set_owner(mp); \ -}) -#else -# define mutex_enter_nested(mp, sc) \ -({ \ - mutex_enter(mp); \ -}) -#endif - #endif /* HAVE_MUTEX_OWNER */ int spl_mutex_init(void); diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 194cd7df1..039ee7319 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -740,7 +740,7 @@ EXPORT_SYMBOL(spl_cleanup); module_init(spl_init); module_exit(spl_fini); -MODULE_AUTHOR("Lawrence Livermore National Labs"); MODULE_DESCRIPTION("Solaris Porting Layer"); -MODULE_LICENSE("GPL"); +MODULE_AUTHOR(SPL_META_AUTHOR); +MODULE_LICENSE(SPL_META_LICENSE); MODULE_VERSION(SPL_META_VERSION "-" SPL_META_RELEASE); diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 6bbe0abba..c4337a9f5 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -718,7 +718,7 @@ splat_fini(void) spl_module_init(splat_init); spl_module_exit(splat_fini); -MODULE_AUTHOR("Lawrence Livermore National Labs"); MODULE_DESCRIPTION("Solaris Porting LAyer Tests"); -MODULE_LICENSE("GPL"); +MODULE_AUTHOR(SPL_META_AUTHOR); +MODULE_LICENSE(SPL_META_LICENSE); MODULE_VERSION(SPL_META_VERSION "-" SPL_META_RELEASE); From 0cb3dafccdffd00167275416730332cd5570a07a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Sep 2014 18:00:46 -0400 Subject: [PATCH 0813/1062] Update SPLAT to use kmutex_t for portability For consistency throughout the code update the SPLAT infrastructure to use the wrapped mutex interfaces. Signed-off-by: Brian Behlendorf --- module/splat/splat-atomic.c | 17 ++++++++++------- module/splat/splat-ctl.c | 23 ++++++++++++----------- module/splat/splat-internal.h | 7 ++++--- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index f702196be..7a1bd859d 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -26,6 +26,7 @@ #include #include +#include #include #include "splat-internal.h" @@ -52,7 +53,7 @@ typedef enum { typedef struct atomic_priv { unsigned long ap_magic; struct file *ap_file; - struct mutex ap_lock; + kmutex_t ap_lock; wait_queue_head_t ap_waitq; volatile uint64_t ap_atomic; volatile uint64_t ap_atomic_exited; @@ -70,10 +71,10 @@ splat_atomic_work(void *priv) ap = (atomic_priv_t *)priv; ASSERT(ap->ap_magic == SPLAT_ATOMIC_TEST_MAGIC); - mutex_lock(&ap->ap_lock); + mutex_enter(&ap->ap_lock); op = ap->ap_op; wake_up(&ap->ap_waitq); - mutex_unlock(&ap->ap_lock); + mutex_exit(&ap->ap_lock); splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, "Thread %d successfully started: %lu/%lu\n", op, @@ -143,13 +144,13 @@ splat_atomic_test1(struct file *file, void *arg) ap.ap_magic = SPLAT_ATOMIC_TEST_MAGIC; ap.ap_file = file; - mutex_init(&ap.ap_lock); + mutex_init(&ap.ap_lock, SPLAT_ATOMIC_TEST1_NAME, NULL, NULL); init_waitqueue_head(&ap.ap_waitq); ap.ap_atomic = SPLAT_ATOMIC_INIT_VALUE; ap.ap_atomic_exited = 0; for (i = 0; i < SPLAT_ATOMIC_COUNT_64; i++) { - mutex_lock(&ap.ap_lock); + mutex_enter(&ap.ap_lock); ap.ap_op = i; thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work, @@ -157,14 +158,14 @@ splat_atomic_test1(struct file *file, void *arg) minclsyspri); if (thr == NULL) { rc = -ESRCH; - mutex_unlock(&ap.ap_lock); + mutex_exit(&ap.ap_lock); break; } /* Prepare to wait, the new thread will wake us once it * has made a copy of the unique private passed data */ prepare_to_wait(&ap.ap_waitq, &wait, TASK_UNINTERRUPTIBLE); - mutex_unlock(&ap.ap_lock); + mutex_exit(&ap.ap_lock); schedule(); } @@ -187,6 +188,8 @@ splat_atomic_test1(struct file *file, void *arg) "Success initial and final values match, %lu == %lu\n", (long unsigned)ap.ap_atomic, SPLAT_ATOMIC_INIT_VALUE); + mutex_destroy(&ap.ap_lock); + return 0; } diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index c4337a9f5..4048e0817 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -51,6 +51,7 @@ #include #include #include +#include #include "splat-internal.h" static spl_class *splat_class; @@ -71,7 +72,7 @@ splat_open(struct inode *inode, struct file *file) if (info == NULL) return -ENOMEM; - mutex_init(&info->info_lock); + mutex_init(&info->info_lock, SPLAT_NAME, MUTEX_DEFAULT, NULL); info->info_size = SPLAT_INFO_BUFFER_SIZE; info->info_buffer = (char *)vmalloc(SPLAT_INFO_BUFFER_SIZE); if (info->info_buffer == NULL) { @@ -115,10 +116,10 @@ splat_buffer_clear(struct file *file, splat_cfg_t *kcfg, unsigned long arg) ASSERT(info); ASSERT(info->info_buffer); - mutex_lock(&info->info_lock); + mutex_enter(&info->info_lock); memset(info->info_buffer, 0, info->info_size); info->info_head = info->info_buffer; - mutex_unlock(&info->info_lock); + mutex_exit(&info->info_lock); return 0; } @@ -133,7 +134,7 @@ splat_buffer_size(struct file *file, splat_cfg_t *kcfg, unsigned long arg) ASSERT(info); ASSERT(info->info_buffer); - mutex_lock(&info->info_lock); + mutex_enter(&info->info_lock); if (kcfg->cfg_arg1 > 0) { size = kcfg->cfg_arg1; @@ -158,7 +159,7 @@ splat_buffer_size(struct file *file, splat_cfg_t *kcfg, unsigned long arg) if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) rc = -EFAULT; out: - mutex_unlock(&info->info_lock); + mutex_exit(&info->info_lock); return rc; } @@ -509,7 +510,7 @@ static ssize_t splat_write(struct file *file, const char __user *buf, ASSERT(info); ASSERT(info->info_buffer); - mutex_lock(&info->info_lock); + mutex_enter(&info->info_lock); /* Write beyond EOF */ if (*ppos >= info->info_size) { @@ -529,7 +530,7 @@ static ssize_t splat_write(struct file *file, const char __user *buf, *ppos += count; rc = count; out: - mutex_unlock(&info->info_lock); + mutex_exit(&info->info_lock); return rc; } @@ -546,7 +547,7 @@ static ssize_t splat_read(struct file *file, char __user *buf, ASSERT(info); ASSERT(info->info_buffer); - mutex_lock(&info->info_lock); + mutex_enter(&info->info_lock); /* Read beyond EOF */ if (*ppos >= info->info_size) @@ -564,7 +565,7 @@ static ssize_t splat_read(struct file *file, char __user *buf, *ppos += count; rc = count; out: - mutex_unlock(&info->info_lock); + mutex_exit(&info->info_lock); return rc; } @@ -580,7 +581,7 @@ static loff_t splat_seek(struct file *file, loff_t offset, int origin) ASSERT(info); ASSERT(info->info_buffer); - mutex_lock(&info->info_lock); + mutex_enter(&info->info_lock); switch (origin) { case 0: /* SEEK_SET - No-op just do it */ @@ -599,7 +600,7 @@ static loff_t splat_seek(struct file *file, loff_t offset, int origin) rc = offset; } - mutex_unlock(&info->info_lock); + mutex_exit(&info->info_lock); return rc; } diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index b138196f5..2ff19541b 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -28,6 +28,7 @@ #include "spl-device.h" #include "spl-debug.h" #include "splat-ctl.h" +#include #define SPLAT_SUBSYSTEM_INIT(type) \ ({ splat_subsystem_t *_sub_; \ @@ -121,7 +122,7 @@ typedef struct splat_subsystem { #define SPLAT_INFO_BUFFER_REDZONE 256 typedef struct splat_info { - struct mutex info_lock; + kmutex_t info_lock; int info_size; char *info_buffer; char *info_head; /* Internal kernel use only */ @@ -136,7 +137,7 @@ typedef struct splat_info { ASSERT(_info_); \ ASSERT(_info_->info_buffer); \ \ - mutex_lock(&_info_->info_lock); \ + mutex_enter(&_info_->info_lock); \ \ /* Don't allow the kernel to start a write in the red zone */ \ if ((int)(_info_->info_head - _info_->info_buffer) > \ @@ -148,7 +149,7 @@ typedef struct splat_info { _info_->info_head += _rc_; \ } \ \ - mutex_unlock(&_info_->info_lock); \ + mutex_exit(&_info_->info_lock); \ _rc_; \ }) From 3a9253056345e27cd79433a52a63929d6bef907b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Sep 2014 19:42:15 -0400 Subject: [PATCH 0814/1062] Update code to use misc_register()/misc_deregister() When the SPL was originally written it was designed to use the device_create() and device_destroy() functions. Unfortunately, these functions changed considerably over the years making them difficult to rely on. As it turns out a better choice would have been to use the misc_register()/misc_deregister() functions. This interface for registering character devices has remained stable, is simple, and provides everything we need. Therefore the code has been reworked to use this interface. The higher level ZFS code has always depended on these same interfaces so this is also as a step towards minimizing our kernel dependencies. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 61 ------------------------ include/Makefile.am | 1 - include/spl-device.h | 90 ----------------------------------- include/splat-ctl.h | 2 - include/sys/sunddi.h | 1 - module/splat/splat-ctl.c | 90 ++++++++--------------------------- module/splat/splat-internal.h | 1 - 7 files changed, 21 insertions(+), 225 deletions(-) delete mode 100644 include/spl-device.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index f9287e2de..1acacb5b6 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -34,9 +34,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA SPL_AC_FLS64 - SPL_AC_DEVICE_CREATE - SPL_AC_5ARGS_DEVICE_CREATE - SPL_AC_CLASS_DEVICE_CREATE SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB @@ -1075,64 +1072,6 @@ AC_DEFUN([SPL_AC_FLS64], ]) ]) -dnl # -dnl # 2.6.18 API change, check whether device_create() is available. -dnl # Device_create() was introduced in 2.6.18 and depricated -dnl # class_device_create() which was fully removed in 2.6.26. -dnl # -AC_DEFUN([SPL_AC_DEVICE_CREATE], - [AC_MSG_CHECKING([whether device_create() is available]) - SPL_CHECK_SYMBOL_EXPORT([device_create], [drivers/base/core.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DEVICE_CREATE, 1, - [device_create() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.27 API change, -dnl # device_create() uses 5 args, new 'drvdata' argument. -dnl # -AC_DEFUN([SPL_AC_5ARGS_DEVICE_CREATE], [ - AC_MSG_CHECKING([whether device_create() wants 5 args]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - device_create(NULL, NULL, 0, NULL, "%d", 1); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_5ARGS_DEVICE_CREATE, 1, - [device_create wants 5 args]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 2.6.13 API change, check whether class_device_create() is available. -dnl # Class_device_create() was introduced in 2.6.13 and depricated -dnl # class_simple_device_add() which was fully removed in 2.6.13. -dnl # -AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], - [AC_MSG_CHECKING([whether class_device_create() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - class_device_create(NULL, NULL, 0, NULL, NULL); - ], [class_device_create], [drivers/base/class.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1, - [class_device_create() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.26 API change, set_normalized_timespec() is exported. dnl # diff --git a/include/Makefile.am b/include/Makefile.am index 463bea1d1..a7508fb34 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -6,7 +6,6 @@ KERNEL_H = \ $(top_srcdir)/include/splat-ctl.h \ $(top_srcdir)/include/spl-ctl.h \ $(top_srcdir)/include/spl-debug.h \ - $(top_srcdir)/include/spl-device.h \ $(top_srcdir)/include/spl-trace.h \ $(top_srcdir)/include/strings.h \ $(top_srcdir)/include/unistd.h diff --git a/include/spl-device.h b/include/spl-device.h deleted file mode 100644 index b237cf1b0..000000000 --- a/include/spl-device.h +++ /dev/null @@ -1,90 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_DEVICE_H -#define _SPL_DEVICE_H - -#include - -/* - * Preferred API from 2.6.18 to 2.6.26+ - */ -#ifdef HAVE_DEVICE_CREATE - -typedef struct class spl_class; -typedef struct device spl_device; - -#define spl_class_create(mod, name) class_create(mod, name) -#define spl_class_destroy(cls) class_destroy(cls) - -# ifdef HAVE_5ARGS_DEVICE_CREATE -# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \ - device_create(cls, parent, devt, drvdata, fmt, ## args) -# else -# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \ - device_create(cls, parent, devt, fmt, ## args) -# endif - -#define spl_device_destroy(cls, cls_dev, devt) \ - device_destroy(cls, devt) - -/* - * Preferred API from 2.6.13 to 2.6.17 - * Depricated in 2.6.18 - * Removed in 2.6.26 - */ -#else -#ifdef HAVE_CLASS_DEVICE_CREATE - -typedef struct class spl_class; -typedef struct class_device spl_device; - -#define spl_class_create(mod, name) class_create(mod, name) -#define spl_class_destroy(cls) class_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ - class_device_create(cls, parent, devt, device, fmt, ## args) -#define spl_device_destroy(cls, cls_dev, devt) \ - class_device_unregister(cls_dev) - -/* - * Prefered API from 2.6.0 to 2.6.12 - * Depricated in 2.6.13 - * Removed in 2.6.13 - */ -#else /* Legacy API */ - -typedef struct class_simple spl_class; -typedef struct class_device spl_class_device; - -#define spl_class_create(mod, name) class_simple_create(mod, name) -#define spl_class_destroy(cls) class_simple_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ - class_simple_device_add(cls, devt, device, fmt, ## args) -#define spl_device_destroy(cls, cls_dev, devt) \ - class_simple_device_remove(devt) - -#endif /* HAVE_CLASS_DEVICE_CREATE */ -#endif /* HAVE_DEVICE_CREATE */ - -#endif /* _SPL_DEVICE_H */ diff --git a/include/splat-ctl.h b/include/splat-ctl.h index ccf3644bd..15fd01b54 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -32,8 +32,6 @@ * ensure 32-bit/64-bit interoperability over ioctl()'s only types with * fixed sizes can be used. */ -#define SPLAT_MAJOR 225 /* XXX - Arbitrary */ -#define SPLAT_MINORS 1 #define SPLAT_NAME "splatctl" #define SPLAT_DEV "/dev/splatctl" diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 545803afd..c49b0c26c 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -31,7 +31,6 @@ #include #include #include -#include typedef int ddi_devid_t; diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 4048e0817..46bc6d1a6 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -49,25 +49,20 @@ #include #include #include +#include #include #include #include #include "splat-internal.h" -static spl_class *splat_class; -static spl_device *splat_device; static struct list_head splat_module_list; static spinlock_t splat_module_lock; static int splat_open(struct inode *inode, struct file *file) { - unsigned int minor = iminor(inode); splat_info_t *info; - if (minor >= SPLAT_MINORS) - return -ENXIO; - info = (splat_info_t *)kmalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) return -ENOMEM; @@ -92,12 +87,8 @@ splat_open(struct inode *inode, struct file *file) static int splat_release(struct inode *inode, struct file *file) { - unsigned int minor = iminor(inode); splat_info_t *info = (splat_info_t *)file->private_data; - if (minor >= SPLAT_MINORS) - return -ENXIO; - ASSERT(info); ASSERT(info->info_buffer); @@ -458,16 +449,12 @@ splat_ioctl_cmd(struct file *file, unsigned int cmd, unsigned long arg) static long splat_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - unsigned int minor = iminor(file->f_dentry->d_inode); int rc = 0; /* Ignore tty ioctls */ if ((cmd & 0xffffff00) == ((int)'T') << 8) return -ENOTTY; - if (minor >= SPLAT_MINORS) - return -ENXIO; - switch (cmd) { case SPLAT_CFG: rc = splat_ioctl_cfg(file, cmd, arg); @@ -500,13 +487,9 @@ splat_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static ssize_t splat_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - unsigned int minor = iminor(file->f_dentry->d_inode); splat_info_t *info = (splat_info_t *)file->private_data; int rc = 0; - if (minor >= SPLAT_MINORS) - return -ENXIO; - ASSERT(info); ASSERT(info->info_buffer); @@ -537,13 +520,9 @@ out: static ssize_t splat_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - unsigned int minor = iminor(file->f_dentry->d_inode); splat_info_t *info = (splat_info_t *)file->private_data; int rc = 0; - if (minor >= SPLAT_MINORS) - return -ENXIO; - ASSERT(info); ASSERT(info->info_buffer); @@ -571,13 +550,9 @@ out: static loff_t splat_seek(struct file *file, loff_t offset, int origin) { - unsigned int minor = iminor(file->f_dentry->d_inode); splat_info_t *info = (splat_info_t *)file->private_data; int rc = -EINVAL; - if (minor >= SPLAT_MINORS) - return -ENXIO; - ASSERT(info); ASSERT(info->info_buffer); @@ -605,7 +580,6 @@ static loff_t splat_seek(struct file *file, loff_t offset, int origin) return rc; } -static struct cdev splat_cdev; static struct file_operations splat_fops = { .owner = THIS_MODULE, .open = splat_open, @@ -619,11 +593,16 @@ static struct file_operations splat_fops = { .llseek = splat_seek, }; +static struct miscdevice splat_misc = { + .minor = MISC_DYNAMIC_MINOR, + .name = SPLAT_NAME, + .fops = &splat_fops, +}; + static int splat_init(void) { - dev_t dev; - int rc; + int error; spin_lock_init(&splat_module_lock); INIT_LIST_HEAD(&splat_module_list); @@ -645,52 +624,25 @@ splat_init(void) SPLAT_SUBSYSTEM_INIT(zlib); SPLAT_SUBSYSTEM_INIT(linux); - dev = MKDEV(SPLAT_MAJOR, 0); - if ((rc = register_chrdev_region(dev, SPLAT_MINORS, SPLAT_NAME))) - goto error; - - /* Support for registering a character driver */ - cdev_init(&splat_cdev, &splat_fops); - splat_cdev.owner = THIS_MODULE; - kobject_set_name(&splat_cdev.kobj, SPLAT_NAME); - if ((rc = cdev_add(&splat_cdev, dev, SPLAT_MINORS))) { - printk(KERN_ERR "SPLAT: Error adding cdev, %d\n", rc); - kobject_put(&splat_cdev.kobj); - unregister_chrdev_region(dev, SPLAT_MINORS); - goto error; + error = misc_register(&splat_misc); + if (error) { + printk(KERN_INFO "SPLAT: misc_register() failed %d\n", error); + } else { + printk(KERN_INFO "SPLAT: Loaded module v%s-%s%s\n", + SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); } - /* Support for udev make driver info available in sysfs */ - splat_class = spl_class_create(THIS_MODULE, "splat"); - if (IS_ERR(splat_class)) { - rc = PTR_ERR(splat_class); - printk(KERN_ERR "SPLAT: Error creating splat class, %d\n", rc); - cdev_del(&splat_cdev); - unregister_chrdev_region(dev, SPLAT_MINORS); - goto error; - } - - splat_device = spl_device_create(splat_class, NULL, - MKDEV(SPLAT_MAJOR, 0), - NULL, SPLAT_NAME); - - printk(KERN_INFO "SPLAT: Loaded module v%s-%s%s\n", - SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); - return 0; -error: - printk(KERN_ERR "SPLAT: Error registering splat device, %d\n", rc); - return rc; + return (error); } static int splat_fini(void) { - dev_t dev = MKDEV(SPLAT_MAJOR, 0); + int error; - spl_device_destroy(splat_class, splat_device, dev); - spl_class_destroy(splat_class); - cdev_del(&splat_cdev); - unregister_chrdev_region(dev, SPLAT_MINORS); + error = misc_deregister(&splat_misc); + if (error) + printk(KERN_INFO "SPLAT: misc_deregister() failed %d\n", error); SPLAT_SUBSYSTEM_FINI(linux); SPLAT_SUBSYSTEM_FINI(zlib); @@ -711,9 +663,9 @@ splat_fini(void) ASSERT(list_empty(&splat_module_list)); printk(KERN_INFO "SPLAT: Unloaded module v%s-%s%s\n", - SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); + SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); - return 0; + return (0); } spl_module_init(splat_init); diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 2ff19541b..ea0a88f0c 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -25,7 +25,6 @@ #ifndef _SPLAT_INTERNAL_H #define _SPLAT_INTERNAL_H -#include "spl-device.h" #include "spl-debug.h" #include "splat-ctl.h" #include From 56cfabd3e8ceac79703edd4453c2c2d89a15ff6f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Sep 2014 16:34:45 -0400 Subject: [PATCH 0815/1062] Remove patches directory There is no longer a need to carry these stale patches in the SPL source tree. Signed-off-by: Brian Behlendorf --- patches/fc11-spl-export-symbols.patch | 106 ------------------------- patches/rhel5-spl-export-symbols.patch | 91 --------------------- 2 files changed, 197 deletions(-) delete mode 100644 patches/fc11-spl-export-symbols.patch delete mode 100644 patches/rhel5-spl-export-symbols.patch diff --git a/patches/fc11-spl-export-symbols.patch b/patches/fc11-spl-export-symbols.patch deleted file mode 100644 index c9d3ec880..000000000 --- a/patches/fc11-spl-export-symbols.patch +++ /dev/null @@ -1,106 +0,0 @@ -Required missing symbols for FC11 kernels (2.6.29.4-167.fc11.x86_64) - -* get_vmalloc_info() -There is no clean API in the kernel for modules to check the virtual -memory state of the system. This information is available in user -space under /proc/meminfo and the details for every virtual memory -node are available under /proc/vmallocinfo. - -* groups_search() -This support is easily replicated if the symbol is not provided by the -kernel. However exporting the symbol from the kernel is preferable. -This is required by the solaris credential API. - -* task_curr() -This symbol is used by the solaris adaptive mutex implementation. If -unavailable then all solaris mutexs behave strictly like linux style -semaphones. If available then the mutex may spin for a short while, -rather than sleep, if the holder of the lock is currently executing. - -* first_online_pgdat() -* next_online_pgdat() -* next_zone() -Required helper functions for the zone iterators for_each_zone() and -for_each_populated_zone(). These symbols were previously available -in 2.6.17 kernels, marked unused in 2.6.18 kernels, and removed as -of the 2.6.19 kernel series. The information is available in user -space under /proc/zoneinfo. - -diff --git a/fs/proc/mmu.c b/fs/proc/mmu.c -index 8ae221d..081c7b5 100644 ---- a/fs/proc/mmu.c -+++ b/fs/proc/mmu.c -@@ -58,3 +58,4 @@ void get_vmalloc_info(struct vmalloc_info *vmi) - read_unlock(&vmlist_lock); - } - } -+EXPORT_SYMBOL(get_vmalloc_info); -diff --git a/kernel/groups.c b/kernel/groups.c -index 2b45b2e..24b62f8 100644 ---- a/kernel/groups.c -+++ b/kernel/groups.c -@@ -153,6 +153,7 @@ int groups_search(const struct group_info *group_info, gid_t grp) - } - return 0; - } -+EXPORT_SYMBOL(groups_search); - - /** - * set_groups - Change a group subscription in a set of credentials -diff --git a/kernel/sched.c b/kernel/sched.c -index 1b59e26..8728c52 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -1883,10 +1883,11 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep) - * task_curr - is this task currently executing on a CPU? - * @p: the task in question. - */ --inline int task_curr(const struct task_struct *p) -+task_curr(const struct task_struct *p) - { - return cpu_curr(task_cpu(p)) == p; - } -+EXPORT_SYMBOL(task_curr); - - static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu) - { -diff --git a/mm/mmzone.c b/mm/mmzone.c -index f5b7d17..1468a22 100644 ---- a/mm/mmzone.c -+++ b/mm/mmzone.c -@@ -14,6 +14,7 @@ struct pglist_data *first_online_pgdat(void) - { - return NODE_DATA(first_online_node); - } -+EXPORT_SYMBOL(first_online_pgdat); - - struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) - { -@@ -23,6 +24,7 @@ struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) - return NULL; - return NODE_DATA(nid); - } -+EXPORT_SYMBOL(next_online_pgdat); - - /* - * next_zone - helper magic for for_each_zone() -@@ -42,6 +44,7 @@ struct zone *next_zone(struct zone *zone) - } - return zone; - } -+EXPORT_SYMBOL(next_zone); - - static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) - { -diff --git a/kernel/fork.c b/kernel/fork.c -index 9b42695..852499e 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -159,6 +159,7 @@ void __put_task_struct(struct task_struct *tsk) - if (!profile_handoff_task(tsk)) - free_task(tsk); - } -+EXPORT_SYMBOL(__put_task_struct); - - /* - * macro override instead of weak attribute alias, to workaround diff --git a/patches/rhel5-spl-export-symbols.patch b/patches/rhel5-spl-export-symbols.patch deleted file mode 100644 index 772242cf4..000000000 --- a/patches/rhel5-spl-export-symbols.patch +++ /dev/null @@ -1,91 +0,0 @@ -Index: linux+rh+chaos/kernel/sched.c -=================================================================== ---- linux+rh+chaos.orig/kernel/sched.c -+++ linux+rh+chaos/kernel/sched.c -@@ -1034,10 +1034,11 @@ static inline void resched_task(struct t - * task_curr - is this task currently executing on a CPU? - * @p: the task in question. - */ --inline int task_curr(const struct task_struct *p) -+int task_curr(const struct task_struct *p) - { - return cpu_curr(task_cpu(p)) == p; - } -+EXPORT_SYMBOL(task_curr); /* Request export upstream */ - - /* Used instead of source_load when we know the type == 0 */ - unsigned long weighted_cpuload(const int cpu) -Index: linux+rh+chaos/kernel/time.c -=================================================================== ---- linux+rh+chaos.orig/kernel/time.c -+++ linux+rh+chaos/kernel/time.c -@@ -605,6 +605,7 @@ void set_normalized_timespec(struct time - ts->tv_sec = sec; - ts->tv_nsec = nsec; - } -+EXPORT_SYMBOL(set_normalized_timespec); /* Exported as of 2.6.26 */ - - /** - * ns_to_timespec - Convert nanoseconds to timespec -Index: linux+rh+chaos/kernel/kallsyms.c -=================================================================== ---- linux+rh+chaos.orig/kernel/kallsyms.c -+++ linux+rh+chaos/kernel/kallsyms.c -@@ -154,6 +154,7 @@ unsigned long kallsyms_lookup_name(const - } - return module_kallsyms_lookup_name(name); - } -+EXPORT_SYMBOL(kallsyms_lookup_name); /* Exported prior to 2.6.19 */ - - /* - * Lookup an address -Index: linux+rh+chaos/fs/proc/mmu.c -=================================================================== ---- linux+rh+chaos.orig/fs/proc/mmu.c -+++ linux+rh+chaos/fs/proc/mmu.c -@@ -75,3 +75,4 @@ void get_vmalloc_info(struct vmalloc_inf - read_unlock(&vmlist_lock); - } - } -+EXPORT_SYMBOL(get_vmalloc_info); /* Request clean upstream API for this */ -Index: linux+rh+chaos/mm/mmzone.c -=================================================================== ---- linux+rh+chaos.orig/mm/mmzone.c -+++ linux+rh+chaos/mm/mmzone.c -@@ -14,7 +14,7 @@ struct pglist_data *first_online_pgdat(v - return NODE_DATA(first_online_node); - } - --EXPORT_UNUSED_SYMBOL(first_online_pgdat); /* June 2006 */ -+EXPORT_SYMBOL(first_online_pgdat); /* Exported prior to 2.6.18 */ - - struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) - { -@@ -24,7 +24,7 @@ struct pglist_data *next_online_pgdat(st - return NULL; - return NODE_DATA(nid); - } --EXPORT_UNUSED_SYMBOL(next_online_pgdat); /* June 2006 */ -+EXPORT_SYMBOL(next_online_pgdat); /* Exported prior to 2.6.18 */ - - - /* -@@ -45,5 +45,5 @@ struct zone *next_zone(struct zone *zone - } - return zone; - } --EXPORT_UNUSED_SYMBOL(next_zone); /* June 2006 */ -+EXPORT_SYMBOL(next_zone); /* Exported prior to 2.6.18 */ - -Index: linux+rh+chaos/mm/vmstat.c -=================================================================== ---- linux+rh+chaos.orig/mm/vmstat.c -+++ linux+rh+chaos/mm/vmstat.c -@@ -45,6 +45,7 @@ void get_zone_counts(unsigned long *acti - *free += n; - } - } -+EXPORT_SYMBOL(get_zone_counts); /* Request clean upstream API for this */ - - #ifdef CONFIG_VM_EVENT_COUNTERS - DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}}; From a80d69caf0daa28d661c88cb699bee02de2e312d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Sep 2014 16:48:35 -0400 Subject: [PATCH 0816/1062] Remove adaptive mutex implementation Since the Linux 2.6.29 kernel all mutexes have been adaptive mutexs. There is no longer any point in keeping this code so it is being removed to simplify the code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 22 +++------------ include/sys/mutex.h | 46 +++++--------------------------- man/man5/spl-module-parameters.5 | 24 ----------------- module/spl/spl-mutex.c | 41 ---------------------------- 4 files changed, 9 insertions(+), 124 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 1acacb5b6..d8cc018de 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -28,7 +28,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_TYPE_UINTPTR_T SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SHRINKER_CALLBACK - SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO @@ -997,23 +996,6 @@ AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # Custom SPL patch may export this system it is not required -dnl # -AC_DEFUN([SPL_AC_TASK_CURR], - [AC_MSG_CHECKING([whether task_curr() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - task_curr(NULL); - ], [task_curr], [kernel/sched.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TASK_CURR, 1, [task_curr() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.19 API change, dnl # Use CTL_UNNUMBERED when binary sysctl is not required @@ -1220,7 +1202,9 @@ AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ dnl # dnl # 2.6.29 API change, -dnl # Adaptive mutexs introduced. +dnl # Adaptive mutexs were introduced which track the mutex owner. The +dnl # mutex wrappers leverage this functionality to avoid tracking the +dnl # owner multipe times. dnl # AC_DEFUN([SPL_AC_MUTEX_OWNER], [ AC_MSG_CHECKING([whether struct mutex has owner]) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index cc63a6be0..d946ff366 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -35,7 +35,8 @@ typedef enum { MUTEX_ADAPTIVE = 2 } kmutex_type_t; -#if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES) +#if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) && \ + !defined(CONFIG_DEBUG_MUTEXES) /* * We define a 1-field struct rather than a straight typedef to enforce type @@ -82,7 +83,7 @@ mutex_owner(kmutex_t *mp) ({ \ ASSERT3P(mutex_owner(mp), !=, current); \ mutex_lock(&(mp)->m); \ - }) +}) #define mutex_exit(mp) mutex_unlock(&(mp)->m) #else /* HAVE_MUTEX_OWNER */ @@ -92,13 +93,6 @@ typedef struct { kthread_t *m_owner; } kmutex_t; -#ifdef HAVE_TASK_CURR -extern int spl_mutex_spin_max(void); -#else /* HAVE_TASK_CURR */ -# define task_curr(owner) 0 -# define spl_mutex_spin_max() 0 -#endif /* HAVE_TASK_CURR */ - #define MUTEX(mp) (&((mp)->m_mutex)) static inline void @@ -150,39 +144,11 @@ spl_mutex_clear_owner(kmutex_t *mp) _rc_; \ }) -/* - * Adaptive mutexs assume that the lock may be held by a task running - * on a different cpu. The expectation is that the task will drop the - * lock before leaving the head of the run queue. So the ideal thing - * to do is spin until we acquire the lock and avoid a context switch. - * However it is also possible the task holding the lock yields the - * processor with out dropping lock. In this case, we know it's going - * to be a while so we stop spinning and go to sleep waiting for the - * lock to be available. This should strike the optimum balance - * between spinning and sleeping waiting for a lock. - */ #define mutex_enter(mp) \ ({ \ - kthread_t *_owner_; \ - int _rc_, _count_; \ - \ - _rc_ = 0; \ - _count_ = 0; \ - _owner_ = mutex_owner(mp); \ - ASSERT3P(_owner_, !=, current); \ - \ - while (_owner_ && task_curr(_owner_) && \ - _count_ <= spl_mutex_spin_max()) { \ - if ((_rc_ = mutex_trylock(MUTEX(mp)))) \ - break; \ - \ - _count_++; \ - } \ - \ - if (!_rc_) \ - mutex_lock(MUTEX(mp)); \ - \ - spl_mutex_set_owner(mp); \ + ASSERT3P(mutex_owner(mp), !=, current); \ + mutex_lock(MUTEX(mp)); \ + spl_mutex_set_owner(mp); \ }) #define mutex_exit(mp) \ diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 9b351762c..33e10b53c 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -102,30 +102,6 @@ The system hostid file Default value: \fB/etc/hostid\fR. .RE -.sp -.ne 2 -.na -\fBmutex_spin_max\fR (int) -.ad -.RS 12n -Spin a maximum of N times to acquire lock -.sp -.ne 2 -.na -\fBPossible values:\fR -.sp -.RS 12n - \fB0\fR Never spin when trying to acquire lock -.sp -\fB-1\fR Spin until acquired or holder yields without dropping lock -.sp -\fB1-MAX_INT\fR Spin for N attempts before sleeping for lock -.RE -.sp -.ne -4 -Default value: \fB0\fR. -.RE - .sp .ne 2 .na diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index f0e786da5..a29d488d1 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -32,46 +32,5 @@ #define DEBUG_SUBSYSTEM S_MUTEX -/* - * While a standard mutex implementation has been available in the kernel - * for quite some time. It was not until 2.6.29 and latter kernels that - * adaptive mutexs were embraced and integrated with the scheduler. This - * brought a significant performance improvement, but just as importantly - * it added a lock owner to the generic mutex outside CONFIG_DEBUG_MUTEXES - * builds. This is critical for correctly supporting the mutex_owner() - * Solaris primitive. When the owner is available we use a pure Linux - * mutex implementation. When the owner is not available we still use - * Linux mutexs as a base but also reserve space for an owner field right - * after the mutex structure. - * - * In the case when HAVE_MUTEX_OWNER is not defined your code may - * still me able to leverage adaptive mutexs. As long as the task_curr() - * symbol is exported this code will provide a poor mans adaptive mutex - * implementation. However, this is not required and if the symbol is - * unavailable we provide a standard mutex. - */ - -#if !defined(HAVE_MUTEX_OWNER) || !defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES) -#ifdef HAVE_TASK_CURR -/* - * mutex_spin_max = { 0, -1, 1-MAX_INT } - * 0: Never spin when trying to acquire lock - * -1: Spin until acquired or holder yields without dropping lock - * 1-MAX_INT: Spin for N attempts before sleeping for lock - */ -int mutex_spin_max = 0; -module_param(mutex_spin_max, int, 0644); -MODULE_PARM_DESC(mutex_spin_max, "Spin a maximum of N times to acquire lock"); - -int -spl_mutex_spin_max(void) -{ - return mutex_spin_max; -} -EXPORT_SYMBOL(spl_mutex_spin_max); - -#endif /* HAVE_TASK_CURR */ -#endif /* !HAVE_MUTEX_OWNER */ - int spl_mutex_init(void) { return 0; } void spl_mutex_fini(void) { } From aa363c5c0507ed660f57655211df1fe2c30b380e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Sep 2014 14:51:53 -0400 Subject: [PATCH 0817/1062] Remove sysctl_vfs_cache_pressure assumption The generic SPL cache shrinkers make the assumption that the caches only contain VFS cache data and therefore should be scaled based on vfs_cache_pressure. This is not strictly true and it should not be assumed. Removing this tuning should not have any impact on the stock behavior because vfs_cache_pressure=100 by default. This means that no scaling will take place. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 79954eb2a..55b265696 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2276,7 +2276,7 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, if ((spl_kmem_cache_reclaim & KMC_RECLAIM_ONCE) && sc->nr_to_scan) return (-1); - return MAX((alloc * sysctl_vfs_cache_pressure) / 100, 0); + return (MAX(alloc, 0)); } SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); From bb4dee3df2a191032201ce7f367be12fd898e08d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 17 Oct 2014 15:10:19 -0700 Subject: [PATCH 0818/1062] Remove utsname() wrapper There is no longer a need to wrap this because utsname() is provided by the kernel and can be called directly. This will require a small change in the ZFS code because utsname is expected to be a global structure and not a function. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 20 -------------------- include/sys/Makefile.am | 1 - include/sys/utsname.h | 34 ---------------------------------- module/spl/spl-generic.c | 12 ------------ 4 files changed, 67 deletions(-) delete mode 100644 include/sys/utsname.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d8cc018de..ba9902599 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -36,7 +36,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB - SPL_AC_INIT_UTSNAME SPL_AC_UACCESS_HEADER SPL_AC_KMALLOC_NODE SPL_AC_MONOTONIC_CLOCK @@ -1114,25 +1113,6 @@ AC_DEFUN([SPL_AC_TIMESPEC_SUB], [ ]) ]) -dnl # -dnl # 2.6.19 API change, -dnl # check if init_utsname() is available in linux/utsname.h -dnl # -AC_DEFUN([SPL_AC_INIT_UTSNAME], [ - AC_MSG_CHECKING([whether init_utsname() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct new_utsname *a __attribute__ ((unused)); - a = init_utsname(); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INIT_UTSNAME, 1, [init_utsname() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.18 API change, dnl # added linux/uaccess.h diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 9d8263657..985c51319 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -90,7 +90,6 @@ KERNEL_H = \ $(top_srcdir)/include/sys/u8_textprep.h \ $(top_srcdir)/include/sys/uio.h \ $(top_srcdir)/include/sys/unistd.h \ - $(top_srcdir)/include/sys/utsname.h \ $(top_srcdir)/include/sys/va_list.h \ $(top_srcdir)/include/sys/varargs.h \ $(top_srcdir)/include/sys/vfs.h \ diff --git a/include/sys/utsname.h b/include/sys/utsname.h deleted file mode 100644 index 3d979c13a..000000000 --- a/include/sys/utsname.h +++ /dev/null @@ -1,34 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_UTSNAME_H -#define _SPL_UTSNAME_H - -#include - -extern struct new_utsname *__utsname(void); - -#define utsname (*__utsname()) - -#endif /* SPL_UTSNAME_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 039ee7319..3e8f874de 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -438,17 +437,6 @@ __put_task_struct(struct task_struct *t) EXPORT_SYMBOL(__put_task_struct); #endif /* HAVE_PUT_TASK_STRUCT */ -struct new_utsname *__utsname(void) -{ -#ifdef HAVE_INIT_UTSNAME - return init_utsname(); -#else - return &system_utsname; -#endif -} -EXPORT_SYMBOL(__utsname); - - /* * Read the unique system identifier from the /etc/hostid file. * From b38bf6a4e3bb321b1e4fad1be5a77faf22dcdcbc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Sep 2014 17:10:35 -0400 Subject: [PATCH 0819/1062] Remove register_sysctl() compatibility code The register_sysctl() interface has been stable since Linux 2.6.21. There is no longer a need to maintain compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 20 -------------------- include/linux/proc_compat.h | 9 --------- module/spl/spl-proc.c | 6 +++--- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ba9902599..93834c1ab 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -26,7 +26,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_TYPE_ATOMIC64_CMPXCHG SPL_AC_TYPE_ATOMIC64_XCHG SPL_AC_TYPE_UINTPTR_T - SPL_AC_2ARGS_REGISTER_SYSCTL SPL_AC_SHRINKER_CALLBACK SPL_AC_CTL_UNNUMBERED SPL_AC_CTL_NAME @@ -872,25 +871,6 @@ AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], ]) ]) -dnl # -dnl # 2.6.21 API change, -dnl # 'register_sysctl_table' use only one argument instead of two -dnl # -AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL], - [AC_MSG_CHECKING([whether register_sysctl_table() wants 2 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - (void) register_sysctl_table(NULL, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1, - [register_sysctl_table() wants 2 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Werror" diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index 7b044e7e1..edd2df5f6 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -27,15 +27,6 @@ #include -#ifdef CONFIG_SYSCTL -#ifdef HAVE_2ARGS_REGISTER_SYSCTL -#define spl_register_sysctl_table(t, a) register_sysctl_table(t, a) -#else -#define spl_register_sysctl_table(t, a) register_sysctl_table(t) -#endif /* HAVE_2ARGS_REGISTER_SYSCTL */ -#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t) -#endif /* CONFIG_SYSCTL */ - #ifdef HAVE_CTL_NAME #define CTL_NAME(cname) .ctl_name = (cname), #else diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index b4be84fef..3559c95bf 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -1127,7 +1127,7 @@ spl_proc_init(void) SENTRY; #ifdef CONFIG_SYSCTL - spl_header = spl_register_sysctl_table(spl_root, 0); + spl_header = register_sysctl_table(spl_root); if (spl_header == NULL) SRETURN(-EUNATCH); #endif /* CONFIG_SYSCTL */ @@ -1160,7 +1160,7 @@ out: #endif remove_proc_entry("spl", NULL); #ifdef CONFIG_SYSCTL - spl_unregister_sysctl_table(spl_header); + unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ } @@ -1181,7 +1181,7 @@ spl_proc_fini(void) #ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); - spl_unregister_sysctl_table(spl_header); + unregister_sysctl_table(spl_header); #endif /* CONFIG_SYSCTL */ SEXIT; From 9c91800d199c65c7d893445bae9b9a9a5590c335 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Sep 2014 18:15:22 -0400 Subject: [PATCH 0820/1062] Remove CTL_UNNUMBERED sysctl interface Support for the CTL_UNNUMBERED sysctl interface was removed in Linux 2.6.19. There is no longer any reason to maintain this compatibility code. There also issue any reason to keep around the CTL_NAME macro and helpers so they have been retired. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 22 ----- include/linux/proc_compat.h | 6 -- module/spl/spl-proc.c | 171 +----------------------------------- 3 files changed, 4 insertions(+), 195 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 93834c1ab..08609b80a 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -27,7 +27,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_TYPE_ATOMIC64_XCHG SPL_AC_TYPE_UINTPTR_T SPL_AC_SHRINKER_CALLBACK - SPL_AC_CTL_UNNUMBERED SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA @@ -975,27 +974,6 @@ AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # 2.6.19 API change, -dnl # Use CTL_UNNUMBERED when binary sysctl is not required -dnl # -AC_DEFUN([SPL_AC_CTL_UNNUMBERED], - [AC_MSG_CHECKING([whether unnumbered sysctl support exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - #ifndef CTL_UNNUMBERED - #error CTL_UNNUMBERED undefined - #endif - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CTL_UNNUMBERED, 1, - [unnumbered sysctl support exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.33 API change, dnl # Removed .ctl_name from struct ctl_table. diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index edd2df5f6..5bbe85081 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -27,12 +27,6 @@ #include -#ifdef HAVE_CTL_NAME -#define CTL_NAME(cname) .ctl_name = (cname), -#else -#define CTL_NAME(cname) -#endif - extern struct proc_dir_entry *proc_spl_kstat; int spl_proc_init(void); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 3559c95bf..3daa3deea 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -49,10 +49,7 @@ static unsigned long table_min = 0; static unsigned long table_max = ~0; #endif -#ifdef CONFIG_SYSCTL static struct ctl_table_header *spl_header = NULL; -#endif /* CONFIG_SYSCTL */ - static struct proc_dir_entry *proc_spl = NULL; #ifdef DEBUG_KMEM static struct proc_dir_entry *proc_spl_kmem = NULL; @@ -60,121 +57,6 @@ static struct proc_dir_entry *proc_spl_kmem_slab = NULL; #endif /* DEBUG_KMEM */ struct proc_dir_entry *proc_spl_kstat = NULL; -#ifdef HAVE_CTL_NAME -#ifdef HAVE_CTL_UNNUMBERED - -#define CTL_SPL CTL_UNNUMBERED -#define CTL_SPL_DEBUG CTL_UNNUMBERED -#define CTL_SPL_VM CTL_UNNUMBERED -#define CTL_SPL_MUTEX CTL_UNNUMBERED -#define CTL_SPL_KMEM CTL_UNNUMBERED -#define CTL_SPL_KSTAT CTL_UNNUMBERED - -#define CTL_VERSION CTL_UNNUMBERED /* Version */ -#define CTL_HOSTID CTL_UNNUMBERED /* Host id by /usr/bin/hostid */ -#define CTL_KALLSYMS CTL_UNNUMBERED /* kallsyms_lookup_name addr */ - -#define CTL_DEBUG_SUBSYS CTL_UNNUMBERED /* Debug subsystem */ -#define CTL_DEBUG_MASK CTL_UNNUMBERED /* Debug mask */ -#define CTL_DEBUG_PRINTK CTL_UNNUMBERED /* All messages to console */ -#define CTL_DEBUG_MB CTL_UNNUMBERED /* Debug buffer size */ -#define CTL_DEBUG_BINARY CTL_UNNUMBERED /* Binary data in buffer */ -#define CTL_DEBUG_CATASTROPHE CTL_UNNUMBERED /* Set if BUG'd or panic'd */ -#define CTL_DEBUG_PANIC_ON_BUG CTL_UNNUMBERED /* Should panic on BUG */ -#define CTL_DEBUG_PATH CTL_UNNUMBERED /* Dump log location */ -#define CTL_DEBUG_DUMP CTL_UNNUMBERED /* Dump debug buffer to file */ -#define CTL_DEBUG_FORCE_BUG CTL_UNNUMBERED /* Hook to force a BUG */ -#define CTL_DEBUG_STACK_SIZE CTL_UNNUMBERED /* Max observed stack size */ - -#define CTL_CONSOLE_RATELIMIT CTL_UNNUMBERED /* Ratelimit console messages */ -#define CTL_CONSOLE_MAX_DELAY_CS CTL_UNNUMBERED /* Max delay skip messages */ -#define CTL_CONSOLE_MIN_DELAY_CS CTL_UNNUMBERED /* Init delay skip messages */ -#define CTL_CONSOLE_BACKOFF CTL_UNNUMBERED /* Delay increase factor */ - -#define CTL_VM_MINFREE CTL_UNNUMBERED /* Minimum free memory */ -#define CTL_VM_DESFREE CTL_UNNUMBERED /* Desired free memory */ -#define CTL_VM_LOTSFREE CTL_UNNUMBERED /* Lots of free memory */ -#define CTL_VM_NEEDFREE CTL_UNNUMBERED /* Need free memory */ -#define CTL_VM_SWAPFS_MINFREE CTL_UNNUMBERED /* Minimum swapfs memory */ -#define CTL_VM_SWAPFS_RESERVE CTL_UNNUMBERED /* Reserved swapfs memory */ -#define CTL_VM_AVAILRMEM CTL_UNNUMBERED /* Easily available memory */ -#define CTL_VM_FREEMEM CTL_UNNUMBERED /* Free memory */ -#define CTL_VM_PHYSMEM CTL_UNNUMBERED /* Total physical memory */ - -#ifdef DEBUG_KMEM -#define CTL_KMEM_KMEMUSED CTL_UNNUMBERED /* Alloc'd kmem bytes */ -#define CTL_KMEM_KMEMMAX CTL_UNNUMBERED /* Max alloc'd by kmem bytes */ -#define CTL_KMEM_VMEMUSED CTL_UNNUMBERED /* Alloc'd vmem bytes */ -#define CTL_KMEM_VMEMMAX CTL_UNNUMBERED /* Max alloc'd by vmem bytes */ -#define CTL_KMEM_SLAB_KMEMTOTAL CTL_UNNUMBERED /* Total kmem slab size */ -#define CTL_KMEM_SLAB_KMEMALLOC CTL_UNNUMBERED /* Alloc'd kmem slab size */ -#define CTL_KMEM_SLAB_KMEMMAX CTL_UNNUMBERED /* Max kmem slab size */ -#define CTL_KMEM_SLAB_VMEMTOTAL CTL_UNNUMBERED /* Total vmem slab size */ -#define CTL_KMEM_SLAB_VMEMALLOC CTL_UNNUMBERED /* Alloc'd vmem slab size */ -#define CTL_KMEM_SLAB_VMEMMAX CTL_UNNUMBERED /* Max vmem slab size */ -#endif - -#else /* HAVE_CTL_UNNUMBERED */ - -enum { - CTL_SPL = 0x87, - CTL_SPL_DEBUG = 0x88, - CTL_SPL_VM = 0x89, - CTL_SPL_MUTEX = 0x90, - CTL_SPL_KMEM = 0x91, - CTL_SPL_KSTAT = 0x92, -}; - -enum { - CTL_VERSION = 1, /* Version */ - CTL_HOSTID, /* Host id reported by /usr/bin/hostid */ - CTL_KALLSYMS, /* Address of kallsyms_lookup_name */ - -#ifdef DEBUG_LOG - CTL_DEBUG_SUBSYS, /* Debug subsystem */ - CTL_DEBUG_MASK, /* Debug mask */ - CTL_DEBUG_PRINTK, /* Force all messages to console */ - CTL_DEBUG_MB, /* Debug buffer size */ - CTL_DEBUG_BINARY, /* Include binary data in buffer */ - CTL_DEBUG_CATASTROPHE, /* Set if we have BUG'd or panic'd */ - CTL_DEBUG_PANIC_ON_BUG, /* Set if we should panic on BUG */ - CTL_DEBUG_PATH, /* Dump log location */ - CTL_DEBUG_DUMP, /* Dump debug buffer to file */ - CTL_DEBUG_FORCE_BUG, /* Hook to force a BUG */ - CTL_DEBUG_STACK_SIZE, /* Max observed stack size */ -#endif - - CTL_CONSOLE_RATELIMIT, /* Ratelimit console messages */ - CTL_CONSOLE_MAX_DELAY_CS, /* Max delay which we skip messages */ - CTL_CONSOLE_MIN_DELAY_CS, /* Init delay which we skip messages */ - CTL_CONSOLE_BACKOFF, /* Delay increase factor */ - - CTL_VM_MINFREE, /* Minimum free memory threshold */ - CTL_VM_DESFREE, /* Desired free memory threshold */ - CTL_VM_LOTSFREE, /* Lots of free memory threshold */ - CTL_VM_NEEDFREE, /* Need free memory deficit */ - CTL_VM_SWAPFS_MINFREE, /* Minimum swapfs memory */ - CTL_VM_SWAPFS_RESERVE, /* Reserved swapfs memory */ - CTL_VM_AVAILRMEM, /* Easily available memory */ - CTL_VM_FREEMEM, /* Free memory */ - CTL_VM_PHYSMEM, /* Total physical memory */ - -#ifdef DEBUG_KMEM - CTL_KMEM_KMEMUSED, /* Alloc'd kmem bytes */ - CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */ - CTL_KMEM_VMEMUSED, /* Alloc'd vmem bytes */ - CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */ - CTL_KMEM_SLAB_KMEMTOTAL, /* Total kmem slab size */ - CTL_KMEM_SLAB_KMEMALLOC, /* Alloc'd kmem slab size */ - CTL_KMEM_SLAB_KMEMMAX, /* Max kmem slab size */ - CTL_KMEM_SLAB_VMEMTOTAL, /* Total vmem slab size */ - CTL_KMEM_SLAB_VMEMALLOC, /* Alloc'd vmem slab size */ - CTL_KMEM_SLAB_VMEMMAX, /* Max vmem slab size */ -#endif -}; -#endif /* HAVE_CTL_UNNUMBERED */ -#endif /* HAVE_CTL_NAME */ - static int proc_copyin_string(char *kbuffer, int kbuffer_size, const char *ubuffer, int ubuffer_size) @@ -738,7 +620,6 @@ static struct file_operations proc_slab_operations = { #ifdef DEBUG_LOG static struct ctl_table spl_debug_table[] = { { - CTL_NAME (CTL_DEBUG_SUBSYS) .procname = "subsystem", .data = &spl_debug_subsys, .maxlen = sizeof(unsigned long), @@ -746,7 +627,6 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dobitmasks }, { - CTL_NAME (CTL_DEBUG_MASK) .procname = "mask", .data = &spl_debug_mask, .maxlen = sizeof(unsigned long), @@ -754,7 +634,6 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dobitmasks }, { - CTL_NAME (CTL_DEBUG_PRINTK) .procname = "printk", .data = &spl_debug_printk, .maxlen = sizeof(unsigned long), @@ -762,13 +641,11 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dobitmasks }, { - CTL_NAME (CTL_DEBUG_MB) .procname = "mb", .mode = 0644, .proc_handler = &proc_debug_mb, }, { - CTL_NAME (CTL_DEBUG_BINARY) .procname = "binary", .data = &spl_debug_binary, .maxlen = sizeof(int), @@ -776,7 +653,6 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_DEBUG_CATASTROPHE) .procname = "catastrophe", .data = &spl_debug_catastrophe, .maxlen = sizeof(int), @@ -784,7 +660,6 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_DEBUG_PANIC_ON_BUG) .procname = "panic_on_bug", .data = &spl_debug_panic_on_bug, .maxlen = sizeof(int), @@ -792,7 +667,6 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec }, { - CTL_NAME (CTL_DEBUG_PATH) .procname = "path", .data = spl_debug_file_path, .maxlen = sizeof(spl_debug_file_path), @@ -800,18 +674,16 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dostring, }, { - CTL_NAME (CTL_DEBUG_DUMP) .procname = "dump", .mode = 0200, .proc_handler = &proc_dump_kernel, }, - { CTL_NAME (CTL_DEBUG_FORCE_BUG) + { .procname = "force_bug", .mode = 0200, .proc_handler = &proc_force_bug, }, { - CTL_NAME (CTL_CONSOLE_RATELIMIT) .procname = "console_ratelimit", .data = &spl_console_ratelimit, .maxlen = sizeof(int), @@ -819,28 +691,24 @@ static struct ctl_table spl_debug_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_CONSOLE_MAX_DELAY_CS) .procname = "console_max_delay_centisecs", .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_console_max_delay_cs, }, { - CTL_NAME (CTL_CONSOLE_MIN_DELAY_CS) .procname = "console_min_delay_centisecs", .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_console_min_delay_cs, }, { - CTL_NAME (CTL_CONSOLE_BACKOFF) .procname = "console_backoff", .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_console_backoff, }, { - CTL_NAME (CTL_DEBUG_STACK_SIZE) .procname = "stack_max", .data = &spl_debug_stack, .maxlen = sizeof(int), @@ -853,7 +721,6 @@ static struct ctl_table spl_debug_table[] = { static struct ctl_table spl_vm_table[] = { { - CTL_NAME (CTL_VM_MINFREE) .procname = "minfree", .data = &minfree, .maxlen = sizeof(int), @@ -861,7 +728,6 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_VM_DESFREE) .procname = "desfree", .data = &desfree, .maxlen = sizeof(int), @@ -869,7 +735,6 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_VM_LOTSFREE) .procname = "lotsfree", .data = &lotsfree, .maxlen = sizeof(int), @@ -877,7 +742,6 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_VM_NEEDFREE) .procname = "needfree", .data = &needfree, .maxlen = sizeof(int), @@ -885,7 +749,6 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_VM_SWAPFS_MINFREE) .procname = "swapfs_minfree", .data = &swapfs_minfree, .maxlen = sizeof(int), @@ -893,7 +756,6 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_VM_SWAPFS_RESERVE) .procname = "swapfs_reserve", .data = &swapfs_reserve, .maxlen = sizeof(int), @@ -901,13 +763,11 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dointvec, }, { - CTL_NAME (CTL_VM_AVAILRMEM) .procname = "availrmem", .mode = 0444, .proc_handler = &proc_doavailrmem, }, { - CTL_NAME (CTL_VM_FREEMEM) .procname = "freemem", .data = (void *)2, .maxlen = sizeof(int), @@ -915,7 +775,6 @@ static struct ctl_table spl_vm_table[] = { .proc_handler = &proc_dofreemem, }, { - CTL_NAME (CTL_VM_PHYSMEM) .procname = "physmem", .data = &physmem, .maxlen = sizeof(int), @@ -928,7 +787,6 @@ static struct ctl_table spl_vm_table[] = { #ifdef DEBUG_KMEM static struct ctl_table spl_kmem_table[] = { { - CTL_NAME (CTL_KMEM_KMEMUSED) .procname = "kmem_used", .data = &kmem_alloc_used, # ifdef HAVE_ATOMIC64_T @@ -940,7 +798,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_domemused, }, { - CTL_NAME (CTL_KMEM_KMEMMAX) .procname = "kmem_max", .data = &kmem_alloc_max, .maxlen = sizeof(unsigned long), @@ -950,7 +807,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doulongvec_minmax, }, { - CTL_NAME (CTL_KMEM_VMEMUSED) .procname = "vmem_used", .data = &vmem_alloc_used, # ifdef HAVE_ATOMIC64_T @@ -962,7 +818,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_domemused, }, { - CTL_NAME (CTL_KMEM_VMEMMAX) .procname = "vmem_max", .data = &vmem_alloc_max, .maxlen = sizeof(unsigned long), @@ -972,7 +827,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doulongvec_minmax, }, { - CTL_NAME (CTL_KMEM_SLAB_KMEMTOTAL) .procname = "slab_kmem_total", .data = (void *)(KMC_KMEM | KMC_TOTAL), .maxlen = sizeof(unsigned long), @@ -982,7 +836,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doslab, }, { - CTL_NAME (CTL_KMEM_SLAB_KMEMALLOC) .procname = "slab_kmem_alloc", .data = (void *)(KMC_KMEM | KMC_ALLOC), .maxlen = sizeof(unsigned long), @@ -992,7 +845,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doslab, }, { - CTL_NAME (CTL_KMEM_SLAB_KMEMMAX) .procname = "slab_kmem_max", .data = (void *)(KMC_KMEM | KMC_MAX), .maxlen = sizeof(unsigned long), @@ -1002,7 +854,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doslab, }, { - CTL_NAME (CTL_KMEM_SLAB_VMEMTOTAL) .procname = "slab_vmem_total", .data = (void *)(KMC_VMEM | KMC_TOTAL), .maxlen = sizeof(unsigned long), @@ -1012,7 +863,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doslab, }, { - CTL_NAME (CTL_KMEM_SLAB_VMEMALLOC) .procname = "slab_vmem_alloc", .data = (void *)(KMC_VMEM | KMC_ALLOC), .maxlen = sizeof(unsigned long), @@ -1022,7 +872,6 @@ static struct ctl_table spl_kmem_table[] = { .proc_handler = &proc_doslab, }, { - CTL_NAME (CTL_KMEM_SLAB_VMEMMAX) .procname = "slab_vmem_max", .data = (void *)(KMC_VMEM | KMC_MAX), .maxlen = sizeof(unsigned long), @@ -1044,7 +893,6 @@ static struct ctl_table spl_table[] = { * sysctl(8) prefers to go via /proc for portability. */ { - CTL_NAME (CTL_VERSION) .procname = "version", .data = spl_version, .maxlen = sizeof(spl_version), @@ -1052,7 +900,6 @@ static struct ctl_table spl_table[] = { .proc_handler = &proc_dostring, }, { - CTL_NAME (CTL_HOSTID) .procname = "hostid", .data = &spl_hostid, .maxlen = sizeof(unsigned long), @@ -1061,7 +908,6 @@ static struct ctl_table spl_table[] = { }, #ifndef HAVE_KALLSYMS_LOOKUP_NAME { - CTL_NAME (CTL_KALLSYMS) .procname = "kallsyms_lookup_name", .data = &spl_kallsyms_lookup_name_fn, .maxlen = sizeof(unsigned long), @@ -1071,28 +917,24 @@ static struct ctl_table spl_table[] = { #endif #ifdef DEBUG_LOG { - CTL_NAME (CTL_SPL_DEBUG) .procname = "debug", .mode = 0555, .child = spl_debug_table, }, #endif { - CTL_NAME (CTL_SPL_VM) .procname = "vm", .mode = 0555, .child = spl_vm_table, }, #ifdef DEBUG_KMEM { - CTL_NAME (CTL_SPL_KMEM) .procname = "kmem", .mode = 0555, .child = spl_kmem_table, }, #endif { - CTL_NAME (CTL_SPL_KSTAT) .procname = "kstat", .mode = 0555, .child = spl_kstat_table, @@ -1102,7 +944,6 @@ static struct ctl_table spl_table[] = { static struct ctl_table spl_dir[] = { { - CTL_NAME (CTL_SPL) .procname = "spl", .mode = 0555, .child = spl_table, @@ -1112,7 +953,9 @@ static struct ctl_table spl_dir[] = { static struct ctl_table spl_root[] = { { - CTL_NAME (CTL_KERN) +#ifdef HAVE_CTL_NAME + .ctl_name = CTL_KERN, +#endif .procname = "kernel", .mode = 0555, .child = spl_dir, @@ -1126,11 +969,9 @@ spl_proc_init(void) int rc = 0; SENTRY; -#ifdef CONFIG_SYSCTL spl_header = register_sysctl_table(spl_root); if (spl_header == NULL) SRETURN(-EUNATCH); -#endif /* CONFIG_SYSCTL */ proc_spl = proc_mkdir("spl", NULL); if (proc_spl == NULL) @@ -1159,9 +1000,7 @@ out: remove_proc_entry("kmem", proc_spl); #endif remove_proc_entry("spl", NULL); -#ifdef CONFIG_SYSCTL unregister_sysctl_table(spl_header); -#endif /* CONFIG_SYSCTL */ } SRETURN(rc); @@ -1179,10 +1018,8 @@ spl_proc_fini(void) #endif remove_proc_entry("spl", NULL); -#ifdef CONFIG_SYSCTL ASSERT(spl_header != NULL); unregister_sysctl_table(spl_header); -#endif /* CONFIG_SYSCTL */ SEXIT; } From 87f8055a91940e6408420091e1a1601113f7912e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Sep 2014 18:07:07 -0400 Subject: [PATCH 0821/1062] Map highbit64() to fls64() The fls64() function has been available since Linux 2.6.16 and it should be used to implemented highbit64(). This allows us to provide an optimized implementation and simplify the code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 19 ----------- include/linux/bitops_compat.h | 12 ------- include/sys/sysmacros.h | 5 ++- module/spl/spl-generic.c | 62 ----------------------------------- module/spl/spl-kmem.c | 2 +- 5 files changed, 3 insertions(+), 97 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 08609b80a..fbe880836 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -30,7 +30,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA - SPL_AC_FLS64 SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB @@ -993,24 +992,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [ ]) ]) -dnl # -dnl # 2.6.16 API change. -dnl # Check if 'fls64()' is available -dnl # -AC_DEFUN([SPL_AC_FLS64], - [AC_MSG_CHECKING([whether fls64() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - return fls64(0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FLS64, 1, [fls64() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.26 API change, set_normalized_timespec() is exported. dnl # diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h index 9c55844ad..0a3ac16f4 100644 --- a/include/linux/bitops_compat.h +++ b/include/linux/bitops_compat.h @@ -27,17 +27,5 @@ #include -#ifndef HAVE_FLS64 - -static inline int fls64(__u64 x) -{ - __u32 h = x >> 32; - if (h) - return fls(h) + 32; - return fls(x); -} - -#endif /* HAVE_FLS64 */ - #endif /* _SPL_BITOPS_COMPAT_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 33e92b6d8..c56d7e12a 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -152,13 +152,12 @@ extern char spl_version[32]; extern unsigned long spl_hostid; /* Missing misc functions */ -extern int highbit(unsigned long i); -extern int highbit64(uint64_t i); extern uint32_t zone_get_hostid(void *zone); extern void spl_setup(void); extern void spl_cleanup(void); -#define makedevice(maj,min) makedev(maj,min) +#define highbit64(x) fls64(x) +#define makedevice(maj,min) makedev(maj,min) /* common macros */ #ifndef MIN diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 3e8f874de..1059fb3cc 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -64,68 +64,6 @@ DECLARE_WAIT_QUEUE_HEAD(spl_kallsyms_lookup_name_waitq); kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn = SYMBOL_POISON; #endif -int -highbit(unsigned long i) -{ - register int h = 1; - SENTRY; - - if (i == 0) - SRETURN(0); -#if BITS_PER_LONG == 64 - if (i & 0xffffffff00000000ul) { - h += 32; i >>= 32; - } -#endif - if (i & 0xffff0000) { - h += 16; i >>= 16; - } - if (i & 0xff00) { - h += 8; i >>= 8; - } - if (i & 0xf0) { - h += 4; i >>= 4; - } - if (i & 0xc) { - h += 2; i >>= 2; - } - if (i & 0x2) { - h += 1; - } - SRETURN(h); -} -EXPORT_SYMBOL(highbit); - -int -highbit64(uint64_t i) -{ - register int h = 1; - SENTRY; - - if (i == 0) - SRETURN(0); - if (i & 0xffffffff00000000ull) { - h += 32; i >>= 32; - } - if (i & 0xffff0000) { - h += 16; i >>= 16; - } - if (i & 0xff00) { - h += 8; i >>= 8; - } - if (i & 0xf0) { - h += 4; i >>= 4; - } - if (i & 0xc) { - h += 2; i >>= 2; - } - if (i & 0x2) { - h += 1; - } - SRETURN(h); -} -EXPORT_SYMBOL(highbit64); - #if BITS_PER_LONG == 32 /* * Support 64/64 => 64 division on a 32-bit platform. While the kernel diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 55b265696..8b52dfede 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -977,7 +977,7 @@ spl_sko_from_obj(spl_kmem_cache_t *skc, void *obj) static inline uint32_t spl_offslab_size(spl_kmem_cache_t *skc) { - return 1UL << (highbit(spl_obj_size(skc)) + 1); + return 1UL << (fls64(spl_obj_size(skc)) + 1); } /* From 82f2f1a3af28d8ceadab53aeba3e94ab02138f85 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 30 Sep 2014 18:48:25 -0400 Subject: [PATCH 0822/1062] Simplify the time compatibility wrappers Many of the time functions had grown overly complex in order to handle kernel compatibility issues. However, as of Linux 2.6.26 all the required functionality is available. This allows us to retire numerous configure checks and greatly simplify the time compatibility wrappers. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 84 --------------------------------- include/linux/Makefile.am | 1 - include/linux/time_compat.h | 45 ------------------ include/sys/time.h | 89 ++++++++++++++--------------------- include/sys/types.h | 1 - module/spl/Makefile.in | 1 - module/spl/spl-time.c | 94 ------------------------------------- 7 files changed, 36 insertions(+), 279 deletions(-) delete mode 100644 include/linux/time_compat.h delete mode 100644 module/spl/spl-time.c diff --git a/config/spl-build.m4 b/config/spl-build.m4 index fbe880836..109c653c1 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -30,12 +30,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA - SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT - SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE - SPL_AC_TIMESPEC_SUB SPL_AC_UACCESS_HEADER SPL_AC_KMALLOC_NODE - SPL_AC_MONOTONIC_CLOCK SPL_AC_INODE_I_MUTEX SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT @@ -992,66 +988,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [ ]) ]) -dnl # -dnl # 2.6.26 API change, set_normalized_timespec() is exported. -dnl # -AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT], - [AC_MSG_CHECKING([whether set_normalized_timespec() is available as export]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - set_normalized_timespec(NULL, 0, 0); - ], [set_normalized_timespec], [kernel/time.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SET_NORMALIZED_TIMESPEC_EXPORT, 1, - [set_normalized_timespec() is available as export]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.16 API change, set_normalize_timespec() moved to time.c -dnl # previously it was available in time.h as an inline. -dnl # -AC_DEFUN([SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE], [ - AC_MSG_CHECKING([whether set_normalized_timespec() is an inline]) - SPL_LINUX_TRY_COMPILE([ - #include - void set_normalized_timespec(struct timespec *ts, - time_t sec, long nsec) { } - ], - [], - [ - AC_MSG_RESULT(no) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SET_NORMALIZED_TIMESPEC_INLINE, 1, - [set_normalized_timespec() is available as inline]) - ]) -]) - -dnl # -dnl # 2.6.18 API change, -dnl # timespec_sub() inline function available in linux/time.h -dnl # -AC_DEFUN([SPL_AC_TIMESPEC_SUB], [ - AC_MSG_CHECKING([whether timespec_sub() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct timespec a = { 0 }; - struct timespec b = { 0 }; - struct timespec c __attribute__ ((unused)); - c = timespec_sub(a, b); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TIMESPEC_SUB, 1, [timespec_sub() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.18 API change, dnl # added linux/uaccess.h @@ -1079,26 +1015,6 @@ AC_DEFUN([SPL_AC_KMALLOC_NODE], [ ]) ]) -dnl # -dnl # 2.6.9 API change, -dnl # check whether 'monotonic_clock()' is available it may -dnl # be available for some archs but not others. -dnl # -AC_DEFUN([SPL_AC_MONOTONIC_CLOCK], - [AC_MSG_CHECKING([whether monotonic_clock() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - monotonic_clock(); - ], [monotonic_clock], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MONOTONIC_CLOCK, 1, - [monotonic_clock() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.16 API change, dnl # check whether 'struct inode' has i_mutex diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index ec7023d15..c921cc576 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -15,7 +15,6 @@ KERNEL_H = \ $(top_srcdir)/include/linux/rwsem_compat.h \ $(top_srcdir)/include/linux/smp_compat.h \ $(top_srcdir)/include/linux/sysctl_compat.h \ - $(top_srcdir)/include/linux/time_compat.h \ $(top_srcdir)/include/linux/uaccess_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \ $(top_srcdir)/include/linux/zlib_compat.h diff --git a/include/linux/time_compat.h b/include/linux/time_compat.h deleted file mode 100644 index efa023299..000000000 --- a/include/linux/time_compat.h +++ /dev/null @@ -1,45 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_TIME_COMPAT_H -#define _SPL_TIME_COMPAT_H - -#include - -/* timespec_sub() API changes - * 2.6.18 - 2.6.x: Inline function provided by linux/time.h - */ -#ifndef HAVE_TIMESPEC_SUB -static inline struct timespec -timespec_sub(struct timespec lhs, struct timespec rhs) -{ - struct timespec ts_delta; - set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, - lhs.tv_nsec - rhs.tv_nsec); - return ts_delta; -} -#endif /* HAVE_TIMESPEC_SUB */ - -#endif /* _SPL_TIME_COMPAT_H */ - diff --git a/include/sys/time.h b/include/sys/time.h index d8e81c9a7..b9826d2b7 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -23,74 +23,57 @@ \*****************************************************************************/ #ifndef _SPL_TIME_H -#define _SPL_TIME_H +#define _SPL_TIME_H -/* - * Structure returned by gettimeofday(2) system call, - * and used in other calls. - */ #include #include #include #include #if defined(CONFIG_64BIT) -#define TIME_MAX INT64_MAX -#define TIME_MIN INT64_MIN +#define TIME_MAX INT64_MAX +#define TIME_MIN INT64_MIN #else -#define TIME_MAX INT32_MAX -#define TIME_MIN INT32_MIN +#define TIME_MAX INT32_MAX +#define TIME_MIN INT32_MIN #endif -#define SEC 1 -#define MILLISEC 1000 -#define MICROSEC 1000000 -#define NANOSEC 1000000000 +#define SEC 1 +#define MILLISEC 1000 +#define MICROSEC 1000000 +#define NANOSEC 1000000000 #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC)) #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC)) -/* Already defined in include/linux/time.h */ -#undef CLOCK_THREAD_CPUTIME_ID -#undef CLOCK_REALTIME -#undef CLOCK_MONOTONIC -#undef CLOCK_PROCESS_CPUTIME_ID +#define hz HZ -typedef enum clock_type { - __CLOCK_REALTIME0 = 0, /* obsolete; same as CLOCK_REALTIME */ - CLOCK_VIRTUAL = 1, /* thread's user-level CPU clock */ - CLOCK_THREAD_CPUTIME_ID = 2, /* thread's user+system CPU clock */ - CLOCK_REALTIME = 3, /* wall clock */ - CLOCK_MONOTONIC = 4, /* high resolution monotonic clock */ - CLOCK_PROCESS_CPUTIME_ID = 5, /* process's user+system CPU clock */ - CLOCK_HIGHRES = CLOCK_MONOTONIC, /* alternate name */ - CLOCK_PROF = CLOCK_THREAD_CPUTIME_ID,/* alternate name */ -} clock_type_t; - -#define hz \ -({ \ - ASSERT(HZ >= 100 && HZ <= MICROSEC); \ - HZ; \ -}) - -extern void __gethrestime(timestruc_t *); -extern int __clock_gettime(clock_type_t, timespec_t *); -extern hrtime_t __gethrtime(void); - -#define gethrestime(ts) __gethrestime(ts) -#define clock_gettime(fl, tp) __clock_gettime(fl, tp) -#define gethrtime() __gethrtime() - -static __inline__ time_t -gethrestime_sec(void) -{ - timestruc_t now; - - __gethrestime(&now); - return now.tv_sec; -} - -#define TIMESPEC_OVERFLOW(ts) \ +#define TIMESPEC_OVERFLOW(ts) \ ((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX) +static inline void +gethrestime(timestruc_t *now) +{ + struct timespec ts; + getnstimeofday(&ts); + now->tv_sec = ts.tv_sec; + now->tv_nsec = ts.tv_nsec; +} + +static inline time_t +gethrestime_sec(void) +{ + struct timespec ts; + getnstimeofday(&ts); + return (ts.tv_sec); +} + +static inline hrtime_t +gethrtime(void) +{ + struct timespec now; + getrawmonotonic(&now); + return (((hrtime_t)now.tv_sec * NSEC_PER_SEC) + now.tv_nsec); +} + #endif /* _SPL_TIME_H */ diff --git a/include/sys/types.h b/include/sys/types.h index fcec0fa31..11a325494 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 34b480127..30620349f 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -14,7 +14,6 @@ $(MODULE)-objs += @top_srcdir@/module/spl/spl-taskq.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-rwlock.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-vnode.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-err.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-time.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-kobj.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-generic.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-atomic.o diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c deleted file mode 100644 index 0ed49cc26..000000000 --- a/module/spl/spl-time.c +++ /dev/null @@ -1,94 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting Layer (SPL) Time Implementation. -\*****************************************************************************/ - -#include -#include - -#ifdef HAVE_MONOTONIC_CLOCK -extern unsigned long long monotonic_clock(void); -#endif - -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM -#endif - -#define DEBUG_SUBSYSTEM S_TIME - -void -__gethrestime(timestruc_t *ts) -{ - struct timespec tspec; - - getnstimeofday(&tspec); - - ts->tv_sec = tspec.tv_sec; - ts->tv_nsec = tspec.tv_nsec; -} -EXPORT_SYMBOL(__gethrestime); - -/* Use monotonic_clock() by default. It's faster and is available on older - * kernels, but few architectures have them, so we must fallback to - * do_posix_clock_monotonic_gettime(). - */ -hrtime_t -__gethrtime(void) { -#ifdef HAVE_MONOTONIC_CLOCK - unsigned long long res = monotonic_clock(); - - /* Deal with signed/unsigned mismatch */ - return (hrtime_t)(res & ~(1ULL << 63)); -#else - struct timespec ts; - - do_posix_clock_monotonic_gettime(&ts); - return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec); -#endif -} -EXPORT_SYMBOL(__gethrtime); - -/* set_normalized_timespec() API changes - * 2.6.0 - 2.6.15: Inline function provided by linux/time.h - * 2.6.16 - 2.6.25: Function prototype defined but not exported - * 2.6.26 - 2.6.x: Function defined and exported - */ -#if !defined(HAVE_SET_NORMALIZED_TIMESPEC_INLINE) && \ - !defined(HAVE_SET_NORMALIZED_TIMESPEC_EXPORT) -void -set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) -{ - while (nsec >= NSEC_PER_SEC) { - nsec -= NSEC_PER_SEC; - ++sec; - } - while (nsec < 0) { - nsec += NSEC_PER_SEC; - --sec; - } - ts->tv_sec = sec; - ts->tv_nsec = nsec; -} -EXPORT_SYMBOL(set_normalized_timespec); -#endif From ff0582cb395a8fd9be61926023a3923b9a908cc2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 16:31:11 -0400 Subject: [PATCH 0823/1062] Remove atomic64_xchg() wrappers The atomic64_xchg() and atomic64_cmpxchg() functions have been available since Linux 2.6.24. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 40 ---------------------------------------- include/sys/atomic.h | 8 -------- 2 files changed, 48 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 109c653c1..2a3d278de 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -23,8 +23,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_TEST_MODULE SPL_AC_ATOMIC_SPINLOCK - SPL_AC_TYPE_ATOMIC64_CMPXCHG - SPL_AC_TYPE_ATOMIC64_XCHG SPL_AC_TYPE_UINTPTR_T SPL_AC_SHRINKER_CALLBACK SPL_AC_CTL_NAME @@ -808,44 +806,6 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ AC_MSG_RESULT([$have_atomic64_t]) ]) -dnl # -dnl # 2.6.24 API change, -dnl # check if atomic64_cmpxchg is defined -dnl # -AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG], - [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_ATOMIC64_CMPXCHG, 1, - [kernel defines atomic64_cmpxchg]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) - -dnl # -dnl # 2.6.24 API change, -dnl # check if atomic64_xchg is defined -dnl # -AC_DEFUN([SPL_AC_TYPE_ATOMIC64_XCHG], - [AC_MSG_CHECKING([whether kernel defines atomic64_xchg]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - atomic64_xchg((atomic64_t *)NULL, 0); - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_ATOMIC64_XCHG, 1, - [kernel defines atomic64_xchg]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) - dnl # dnl # 2.6.24 API change, dnl # check if uintptr_t typedef is defined diff --git a/include/sys/atomic.h b/include/sys/atomic.h index e034f2e2c..07b460ef7 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -29,14 +29,6 @@ #include #include -#ifndef HAVE_ATOMIC64_CMPXCHG -#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -#endif - -#ifndef HAVE_ATOMIC64_XCHG -#define atomic64_xchg(v, n) (xchg(&((v)->counter), n)) -#endif - /* * Two approaches to atomic operations are implemented each with its * own benefits are drawbacks imposed by the Solaris API. Neither From e5b65e317948926f082740a331900eb9aaddc624 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 16:35:11 -0400 Subject: [PATCH 0824/1062] Remove uintptr_t typedef The uintptr_t typedef has been available since Linux 2.6.24. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 20 -------------------- include/sys/types.h | 4 ---- 2 files changed, 24 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2a3d278de..af3ce23d1 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -23,7 +23,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_TEST_MODULE SPL_AC_ATOMIC_SPINLOCK - SPL_AC_TYPE_UINTPTR_T SPL_AC_SHRINKER_CALLBACK SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO @@ -806,25 +805,6 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ AC_MSG_RESULT([$have_atomic64_t]) ]) -dnl # -dnl # 2.6.24 API change, -dnl # check if uintptr_t typedef is defined -dnl # -AC_DEFUN([SPL_AC_TYPE_UINTPTR_T], - [AC_MSG_CHECKING([whether kernel defines uintptr_t]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - uintptr_t *ptr __attribute__ ((unused)); - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_UINTPTR_T, 1, - [kernel defines uintptr_t]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) - AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Werror" diff --git a/include/sys/types.h b/include/sys/types.h index 11a325494..a2b68efe3 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -44,10 +44,6 @@ #include #include -#ifndef HAVE_UINTPTR_T -typedef unsigned long uintptr_t; -#endif - #ifndef ULLONG_MAX #define ULLONG_MAX (~0ULL) #endif From d227e114edd65356c928b660c19d6f1f471c9f8d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 16:40:37 -0400 Subject: [PATCH 0825/1062] Remove linux/uaccess.h header check The uaccess header has been available in the same location since Linux 2.6.18. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 9 --------- include/linux/Makefile.am | 1 - include/linux/uaccess_compat.h | 35 ---------------------------------- include/sys/types.h | 2 +- 4 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 include/linux/uaccess_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index af3ce23d1..346c40b64 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -27,7 +27,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA - SPL_AC_UACCESS_HEADER SPL_AC_KMALLOC_NODE SPL_AC_INODE_I_MUTEX SPL_AC_MUTEX_OWNER @@ -928,14 +927,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [ ]) ]) -dnl # -dnl # 2.6.18 API change, -dnl # added linux/uaccess.h -dnl # -AC_DEFUN([SPL_AC_UACCESS_HEADER], [ - SPL_CHECK_HEADER([linux/uaccess.h], [UACCESS], [], []) -]) - dnl # dnl # 2.6.12 API change, dnl # check whether 'kmalloc_node()' is available. diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index c921cc576..94ffc4721 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -15,7 +15,6 @@ KERNEL_H = \ $(top_srcdir)/include/linux/rwsem_compat.h \ $(top_srcdir)/include/linux/smp_compat.h \ $(top_srcdir)/include/linux/sysctl_compat.h \ - $(top_srcdir)/include/linux/uaccess_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \ $(top_srcdir)/include/linux/zlib_compat.h diff --git a/include/linux/uaccess_compat.h b/include/linux/uaccess_compat.h deleted file mode 100644 index c84e61d30..000000000 --- a/include/linux/uaccess_compat.h +++ /dev/null @@ -1,35 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_UACCESS_COMPAT_H -#define _SPL_UACCESS_COMPAT_H - -#ifdef HAVE_UACCESS_HEADER -#include -#else -#include -#endif - -#endif /* _SPL_UACCESS_COMPAT_H */ - diff --git a/include/sys/types.h b/include/sys/types.h index a2b68efe3..3bd0cfd92 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -43,6 +42,7 @@ #include #include #include +#include #ifndef ULLONG_MAX #define ULLONG_MAX (~0ULL) From 9f36cace4154f7dd855c42aae2eb13a6e1d79362 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 16:58:57 -0400 Subject: [PATCH 0826/1062] Remove kmalloc_node() compatibility code The kmalloc_node() function has been available since Linux 2.6.12. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 20 -------------------- include/sys/kmem.h | 4 ---- 2 files changed, 24 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 346c40b64..b1e8d930e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -27,7 +27,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA - SPL_AC_KMALLOC_NODE SPL_AC_INODE_I_MUTEX SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT @@ -927,25 +926,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [ ]) ]) -dnl # -dnl # 2.6.12 API change, -dnl # check whether 'kmalloc_node()' is available. -dnl # -AC_DEFUN([SPL_AC_KMALLOC_NODE], [ - AC_MSG_CHECKING([whether kmalloc_node() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - void *a __attribute__ ((unused)); - a = kmalloc_node(1, GFP_KERNEL, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMALLOC_NODE, 1, [kmalloc_node() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.16 API change, dnl # check whether 'struct inode' has i_mutex diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 3418d3dd4..f38d364e2 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -135,7 +135,6 @@ kzalloc_nofail(size_t size, gfp_t flags) static inline void * kmalloc_node_nofail(size_t size, gfp_t flags, int node) { -#ifdef HAVE_KMALLOC_NODE void *ptr; sanitize_flags(current, &flags); @@ -145,9 +144,6 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) } while (ptr == NULL && (flags & __GFP_WAIT)); return ptr; -#else - return kmalloc_nofail(size, flags); -#endif /* HAVE_KMALLOC_NODE */ } static inline void * From 2bc5666f53685c6631f9a5d1d8beebdf1325f8e0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 17:07:46 -0400 Subject: [PATCH 0827/1062] Remove i_mutex() configure check The inode structure has used i_mutex as its internal locking primitive since 2.6.16. The compatibility code to check for the previous semaphore primitive has been removed. However, the wrapper function itself is being kept because it's entirely possible this primitive will change again to allow finer grained locking. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 21 --------------------- include/linux/file_compat.h | 11 ++--------- module/spl/spl-vnode.c | 2 +- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b1e8d930e..b7ce61fc8 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -27,7 +27,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CTL_NAME SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA - SPL_AC_INODE_I_MUTEX SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT SPL_AC_MUTEX_LOCK_NESTED @@ -926,26 +925,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [ ]) ]) -dnl # -dnl # 2.6.16 API change, -dnl # check whether 'struct inode' has i_mutex -dnl # -AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ - AC_MSG_CHECKING([whether struct inode has i_mutex]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - struct inode i; - mutex_init(&i.i_mutex); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_I_MUTEX, 1, [struct inode has i_mutex]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.29 API change, dnl # Adaptive mutexs were introduced which track the mutex owner. The diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 949d844e7..09d0e8250 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -81,15 +81,8 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) # define spl_filp_fsync(fp, sync) file_fsync(fp, (fp)->f_dentry, sync) #endif /* HAVE_VFS_FSYNC */ -#ifdef HAVE_INODE_I_MUTEX -#define spl_inode_lock(ip) (mutex_lock(&(ip)->i_mutex)) -#define spl_inode_lock_nested(ip, type) (mutex_lock_nested((&(ip)->i_mutex), \ - (type))) -#define spl_inode_unlock(ip) (mutex_unlock(&(ip)->i_mutex)) -#else -#define spl_inode_lock(ip) (down(&(ip)->i_sem)) -#define spl_inode_unlock(ip) (up(&(ip)->i_sem)) -#endif /* HAVE_INODE_I_MUTEX */ +#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex) +#define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex) #endif /* SPL_FILE_COMPAT_H */ diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index e4eac22eb..a8c5f974d 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -381,7 +381,7 @@ spl_kern_path_locked(const char *name, struct path *path) if (rc) return (ERR_PTR(rc)); - spl_inode_lock_nested(parent.dentry->d_inode, I_MUTEX_PARENT); + spl_inode_lock(parent.dentry->d_inode); dentry = lookup_one_len(basename, parent.dentry, len); if (IS_ERR(dentry)) { From b652d169b05cc1c75fdb04421feb83713a0e36c4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 17:31:53 -0400 Subject: [PATCH 0828/1062] Remove mutex_lock_nested() wrapper The mutex_lock_nested() function has been available since Linux 2.6.18. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 24 ------------------------ include/linux/Makefile.am | 1 - include/linux/mutex_compat.h | 36 ------------------------------------ include/sys/types.h | 1 - 4 files changed, 62 deletions(-) delete mode 100644 include/linux/mutex_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b7ce61fc8..89556f5f8 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -29,7 +29,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PDE_DATA SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT - SPL_AC_MUTEX_LOCK_NESTED SPL_AC_3ARGS_ON_EACH_CPU SPL_AC_KALLSYMS_LOOKUP_NAME SPL_AC_GET_VMALLOC_INFO @@ -973,29 +972,6 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [ EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # 2.6.18 API change, -dnl # First introduced 'mutex_lock_nested()' in include/linux/mutex.h, -dnl # as part of the mutex validator. Fallback to using 'mutex_lock()' -dnl # if the mutex validator is disabled or otherwise unavailable. -dnl # -AC_DEFUN([SPL_AC_MUTEX_LOCK_NESTED], [ - AC_MSG_CHECKING([whether mutex_lock_nested() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct mutex mutex; - mutex_init(&mutex); - mutex_lock_nested(&mutex, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MUTEX_LOCK_NESTED, 1, - [mutex_lock_nested() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.27 API change, dnl # on_each_cpu() uses 3 args, no 'retry' argument diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 94ffc4721..2a99661bf 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -10,7 +10,6 @@ KERNEL_H = \ $(top_srcdir)/include/linux/math64_compat.h \ $(top_srcdir)/include/linux/mm_compat.h \ $(top_srcdir)/include/linux/module_compat.h \ - $(top_srcdir)/include/linux/mutex_compat.h \ $(top_srcdir)/include/linux/proc_compat.h \ $(top_srcdir)/include/linux/rwsem_compat.h \ $(top_srcdir)/include/linux/smp_compat.h \ diff --git a/include/linux/mutex_compat.h b/include/linux/mutex_compat.h deleted file mode 100644 index 5955fc9a4..000000000 --- a/include/linux/mutex_compat.h +++ /dev/null @@ -1,36 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_MUTEX_COMPAT_H -#define _SPL_MUTEX_COMPAT_H - -#include - -/* mutex_lock_nested() introduced in 2.6.18 */ -#ifndef HAVE_MUTEX_LOCK_NESTED -# define mutex_lock_nested(lock, subclass) mutex_lock(lock) -#endif /* HAVE_MUTEX_LOCK_NESTED */ - -#endif /* _SPL_MUTEX_COMPAT_H */ - diff --git a/include/sys/types.h b/include/sys/types.h index 3bd0cfd92..4a31f88e9 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include From 50e41ab1e12f0b007239c55bfa77d02f6e8ba890 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 17:35:41 -0400 Subject: [PATCH 0829/1062] Remove on_each_cpu() wrapper The on_each_cpu() function has been available since Linux 2.6.27. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 23 ---------------------- include/linux/Makefile.am | 1 - include/linux/smp_compat.h | 40 -------------------------------------- include/sys/types.h | 1 - module/spl/spl-kmem.c | 2 +- 5 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 include/linux/smp_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 89556f5f8..65b95d1f9 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -29,7 +29,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PDE_DATA SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT - SPL_AC_3ARGS_ON_EACH_CPU SPL_AC_KALLSYMS_LOOKUP_NAME SPL_AC_GET_VMALLOC_INFO SPL_AC_PGDAT_HELPERS @@ -972,28 +971,6 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [ EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # 2.6.27 API change, -dnl # on_each_cpu() uses 3 args, no 'retry' argument -dnl # -AC_DEFUN([SPL_AC_3ARGS_ON_EACH_CPU], [ - AC_MSG_CHECKING([whether on_each_cpu() wants 3 args]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - - void on_each_cpu_func(void *data) { return; } - ],[ - on_each_cpu(on_each_cpu_func, NULL, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_ON_EACH_CPU, 1, - [on_each_cpu wants 3 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.18 API change, dnl # kallsyms_lookup_name no longer exported diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 2a99661bf..ac7064d24 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -12,7 +12,6 @@ KERNEL_H = \ $(top_srcdir)/include/linux/module_compat.h \ $(top_srcdir)/include/linux/proc_compat.h \ $(top_srcdir)/include/linux/rwsem_compat.h \ - $(top_srcdir)/include/linux/smp_compat.h \ $(top_srcdir)/include/linux/sysctl_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \ $(top_srcdir)/include/linux/zlib_compat.h diff --git a/include/linux/smp_compat.h b/include/linux/smp_compat.h deleted file mode 100644 index 8c2b54091..000000000 --- a/include/linux/smp_compat.h +++ /dev/null @@ -1,40 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_SMP_COMPAT_H -#define _SPL_SMP_COMPAT_H - -#include - -#ifdef HAVE_3ARGS_ON_EACH_CPU - -#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,wait) - -#else - -#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,0,wait) - -#endif /* HAVE_3ARGS_ON_EACH_CPU */ - -#endif /* _SPL_SMP_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 4a31f88e9..d34070c3d 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 8b52dfede..ed2510865 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1391,7 +1391,7 @@ spl_cache_age(void *data) atomic_inc(&skc->skc_ref); if (!(skc->skc_flags & KMC_NOMAGAZINE)) - spl_on_each_cpu(spl_magazine_age, skc, 1); + on_each_cpu(spl_magazine_age, skc, 1); spl_slab_reclaim(skc, skc->skc_reap, 0); From e1310afae3bdb17628b40c35561f2daedfaf4062 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 18:05:39 -0400 Subject: [PATCH 0830/1062] Remove get_vmalloc_info() wrapper The get_vmalloc_info() function was used to back the vmem_size() function. This was always problematic and resulted in brittle code because the kernel never provided a clean interface for modules. However, it turns out that the only caller of this function in ZFS uses it to determine the total virtual address space size. This can be determined easily without get_vmalloc_info() so vmem_size() has been updated to take this approach which allows us to shed the get_vmalloc_info() dependency. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 39 ------------------ include/sys/vmsystm.h | 35 ++-------------- module/spl/spl-kmem.c | 31 ++------------ module/splat/splat-kmem.c | 85 --------------------------------------- 4 files changed, 8 insertions(+), 182 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 65b95d1f9..4f84c1e1f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -25,12 +25,10 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_ATOMIC_SPINLOCK SPL_AC_SHRINKER_CALLBACK SPL_AC_CTL_NAME - SPL_AC_VMALLOC_INFO SPL_AC_PDE_DATA SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT SPL_AC_KALLSYMS_LOOKUP_NAME - SPL_AC_GET_VMALLOC_INFO SPL_AC_PGDAT_HELPERS SPL_AC_FIRST_ONLINE_PGDAT SPL_AC_NEXT_ONLINE_PGDAT @@ -990,43 +988,6 @@ AC_DEFUN([SPL_AC_KALLSYMS_LOOKUP_NAME], ]) ]) -dnl # -dnl # Proposed API change, -dnl # This symbol is not available in stock kernels. You may build a -dnl # custom kernel with the *-spl-export-symbols.patch which will export -dnl # these symbols for use. If your already rolling a custom kernel for -dnl # your environment this is recommended. -dnl # -AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], - [AC_MSG_CHECKING([whether get_vmalloc_info() is available]) - SPL_CHECK_SYMBOL_EXPORT([get_vmalloc_info], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GET_VMALLOC_INFO, 1, - [get_vmalloc_info() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.10 API change, -dnl # struct vmalloc_info is now declared in linux/vmalloc.h -dnl # -AC_DEFUN([SPL_AC_VMALLOC_INFO], [ - AC_MSG_CHECKING([whether struct vmalloc_info is declared]) - SPL_LINUX_TRY_COMPILE([ - #include - struct vmalloc_info { void *a; }; - ],[ - return 0; - ],[ - AC_MSG_RESULT(no) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VMALLOC_INFO, 1, [yes]) - ]) -]) - dnl # dnl # 3.10 API change, dnl # PDE is replaced by PDE_DATA diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index adff77429..ee3ed6d72 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -60,40 +60,13 @@ extern vmem_t *zio_arena; /* arena for allocating zio memory */ extern pgcnt_t spl_kmem_availrmem(void); extern size_t vmem_size(vmem_t *vmp, int typemask); -/* - * The following symbols are available for use within the kernel - * itself, and they used to be available in older kernels. But it - * looks like they have been removed perhaps due to lack of use. - * For our purposes we need them to access the global memory state - * of the system, which is even available to user space process - * in /proc/meminfo. It's odd to me that there is no kernel API - * to get the same information, minimally the proc handler for - * the above mentioned /proc/meminfo file would make use of it. - */ +#define VMEM_ALLOC 0x01 +#define VMEM_FREE 0x02 -/* Source linux/fs/proc/mmu.c */ -#ifndef HAVE_GET_VMALLOC_INFO -#ifdef CONFIG_MMU - -#ifndef HAVE_VMALLOC_INFO -struct vmalloc_info { - unsigned long used; - unsigned long largest_chunk; -}; +#ifndef VMALLOC_TOTAL +#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) #endif -typedef void (*get_vmalloc_info_t)(struct vmalloc_info *); -extern get_vmalloc_info_t get_vmalloc_info_fn; - -# define VMEM_ALLOC 0x01 -# define VMEM_FREE 0x02 -# define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) -# define get_vmalloc_info(vmi) get_vmalloc_info_fn(vmi) -#else -# error "CONFIG_MMU must be defined" -#endif /* CONFIG_MMU */ -#endif /* HAVE_GET_VMALLOC_INFO */ - #ifdef HAVE_PGDAT_HELPERS /* Source linux/mm/mmzone.c */ # ifndef HAVE_FIRST_ONLINE_PGDAT diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index ed2510865..7626a2951 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -148,11 +148,6 @@ EXPORT_SYMBOL(zio_alloc_arena); vmem_t *zio_arena = NULL; EXPORT_SYMBOL(zio_arena); -#ifndef HAVE_GET_VMALLOC_INFO -get_vmalloc_info_t get_vmalloc_info_fn = SYMBOL_POISON; -EXPORT_SYMBOL(get_vmalloc_info_fn); -#endif /* HAVE_GET_VMALLOC_INFO */ - #ifdef HAVE_PGDAT_HELPERS # ifndef HAVE_FIRST_ONLINE_PGDAT first_online_pgdat_t first_online_pgdat_fn = SYMBOL_POISON; @@ -270,20 +265,11 @@ EXPORT_SYMBOL(spl_kmem_availrmem); size_t vmem_size(vmem_t *vmp, int typemask) { - struct vmalloc_info vmi; - size_t size = 0; + ASSERT3P(vmp, ==, NULL); + ASSERT3S(typemask & VMEM_ALLOC, ==, VMEM_ALLOC); + ASSERT3S(typemask & VMEM_FREE, ==, VMEM_FREE); - ASSERT(vmp == NULL); - ASSERT(typemask & (VMEM_ALLOC | VMEM_FREE)); - - get_vmalloc_info(&vmi); - if (typemask & VMEM_ALLOC) - size += (size_t)vmi.used; - - if (typemask & VMEM_FREE) - size += (size_t)(VMALLOC_TOTAL - vmi.used); - - return size; + return (VMALLOC_TOTAL); } EXPORT_SYMBOL(vmem_size); @@ -2500,15 +2486,6 @@ spl_kmem_init_globals(void) int spl_kmem_init_kallsyms_lookup(void) { -#ifndef HAVE_GET_VMALLOC_INFO - get_vmalloc_info_fn = (get_vmalloc_info_t) - spl_kallsyms_lookup_name("get_vmalloc_info"); - if (!get_vmalloc_info_fn) { - printk(KERN_ERR "Error: Unknown symbol get_vmalloc_info\n"); - return -EFAULT; - } -#endif /* HAVE_GET_VMALLOC_INFO */ - #ifdef HAVE_PGDAT_HELPERS # ifndef HAVE_FIRST_ONLINE_PGDAT first_online_pgdat_fn = (first_online_pgdat_t) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 4d060c138..ebc6a042f 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -77,10 +77,6 @@ #define SPLAT_KMEM_TEST11_DESC "Slab memory overcommit test" #endif -#define SPLAT_KMEM_TEST12_ID 0x010c -#define SPLAT_KMEM_TEST12_NAME "vmem_size" -#define SPLAT_KMEM_TEST12_DESC "Memory zone test" - #define SPLAT_KMEM_TEST13_ID 0x010d #define SPLAT_KMEM_TEST13_NAME "slab_reclaim" #define SPLAT_KMEM_TEST13_DESC "Slab direct memory reclaim test" @@ -1104,84 +1100,6 @@ splat_kmem_test11(struct file *file, void *arg) } #endif -/* - * Check vmem_size() behavior by acquiring the alloc/free/total vmem - * space, then allocate a known buffer size from vmem space. We can - * then check that vmem_size() values were updated properly with in - * a fairly small tolerence. The tolerance is important because we - * are not the only vmem consumer on the system. Other unrelated - * allocations might occur during the small test window. The vmem - * allocation itself may also add in a little extra private space to - * the buffer. Finally, verify total space always remains unchanged. - */ -static int -splat_kmem_test12(struct file *file, void *arg) -{ - size_t alloc1, free1, total1; - size_t alloc2, free2, total2; - int size = 8*1024*1024; - void *ptr; - - alloc1 = vmem_size(NULL, VMEM_ALLOC); - free1 = vmem_size(NULL, VMEM_FREE); - total1 = vmem_size(NULL, VMEM_ALLOC | VMEM_FREE); - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%lu " - "free=%lu total=%lu\n", (unsigned long)alloc1, - (unsigned long)free1, (unsigned long)total1); - - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Alloc %d bytes\n", size); - ptr = vmem_alloc(size, KM_SLEEP); - if (!ptr) { - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "Failed to alloc %d bytes\n", size); - return -ENOMEM; - } - - alloc2 = vmem_size(NULL, VMEM_ALLOC); - free2 = vmem_size(NULL, VMEM_FREE); - total2 = vmem_size(NULL, VMEM_ALLOC | VMEM_FREE); - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Vmem alloc=%lu " - "free=%lu total=%lu\n", (unsigned long)alloc2, - (unsigned long)free2, (unsigned long)total2); - - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Free %d bytes\n", size); - vmem_free(ptr, size); - if (alloc2 < (alloc1 + size - (size / 100)) || - alloc2 > (alloc1 + size + (size / 100))) { - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Failed " - "VMEM_ALLOC size: %lu != %lu+%d (+/- 1%%)\n", - (unsigned long)alloc2,(unsigned long)alloc1,size); - return -ERANGE; - } - - if (free2 < (free1 - size - (size / 100)) || - free2 > (free1 - size + (size / 100))) { - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Failed " - "VMEM_FREE size: %lu != %lu-%d (+/- 1%%)\n", - (unsigned long)free2, (unsigned long)free1, size); - return -ERANGE; - } - - if (total1 != total2) { - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, "Failed " - "VMEM_ALLOC | VMEM_FREE not constant: " - "%lu != %lu\n", (unsigned long)total2, - (unsigned long)total1); - return -ERANGE; - } - - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "VMEM_ALLOC within tolerance: ~%ld%% (%ld/%d)\n", - (long)abs(alloc1 + (long)size - alloc2) * 100 / (long)size, - (long)abs(alloc1 + (long)size - alloc2), size); - splat_vprint(file, SPLAT_KMEM_TEST12_NAME, - "VMEM_FREE within tolerance: ~%ld%% (%ld/%d)\n", - (long)abs((free1 - (long)size) - free2) * 100 / (long)size, - (long)abs((free1 - (long)size) - free2), size); - - return 0; -} - typedef struct dummy_page { struct list_head dp_list; char dp_pad[PAGE_SIZE - sizeof(struct list_head)]; @@ -1360,8 +1278,6 @@ splat_kmem_init(void) SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, SPLAT_KMEM_TEST11_ID, splat_kmem_test11); #endif - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST12_NAME, SPLAT_KMEM_TEST12_DESC, - SPLAT_KMEM_TEST12_ID, splat_kmem_test12); SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST13_NAME, SPLAT_KMEM_TEST13_DESC, SPLAT_KMEM_TEST13_ID, splat_kmem_test13); @@ -1373,7 +1289,6 @@ splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST13_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST12_ID); #if 0 SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST11_ID); #endif From 8bbbe46f8680389888d6111f8d81429dcc5defac Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 18:34:41 -0400 Subject: [PATCH 0831/1062] Remove global memory variables Platforms such as Illumos and FreeBSD have historically provided global variables which summerize the memory state of a system. Linux on the otherhand doesn't expose any of this information to kernel modules and uses entirely different mechanisms for memory management. In order to simplify the original ZFS port to Linux these global variables were emulated by the SPL for the benefit of ZFS. As ZoL has matured over the years it has moved steadily away from these interfaces and now no longer depends on them at all. Therefore, this patch completely removes the global variables availrmem, minfree, desfree, lotsfree, needfree, swapfs_minfree, and swapfs_reserve. This greatly simplifies the memory management code and eliminates a common area of confusion. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 321 -------------------------------------- include/linux/mm_compat.h | 16 -- include/sys/vmsystm.h | 73 +-------- module/spl/spl-kmem.c | 220 -------------------------- module/spl/spl-proc.c | 119 -------------- module/splat/splat-kmem.c | 5 +- 6 files changed, 7 insertions(+), 747 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 4f84c1e1f..8a7486c55 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -29,16 +29,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT SPL_AC_KALLSYMS_LOOKUP_NAME - SPL_AC_PGDAT_HELPERS - SPL_AC_FIRST_ONLINE_PGDAT - SPL_AC_NEXT_ONLINE_PGDAT - SPL_AC_NEXT_ZONE - SPL_AC_PGDAT_LIST - SPL_AC_GLOBAL_PAGE_STATE - SPL_AC_ZONE_STAT_ITEM_FREE - SPL_AC_ZONE_STAT_ITEM_INACTIVE - SPL_AC_ZONE_STAT_ITEM_ACTIVE - SPL_AC_GET_ZONE_COUNTS SPL_AC_USER_PATH_DIR SPL_AC_SET_FS_PWD SPL_AC_SET_FS_PWD_WITH_CONST @@ -1006,317 +996,6 @@ AC_DEFUN([SPL_AC_PDE_DATA], [ ]) ]) -dnl # -dnl # 2.6.17 API change -dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and -dnl # next_zone() are introduced to simplify for_each_zone(). These symbols -dnl # were exported in 2.6.17 for use by modules which was consistent with -dnl # the previous implementation of for_each_zone(). From 2.6.18 - 2.6.19 -dnl # the symbols were exported as 'unused', and by 2.6.20 they exports -dnl # were dropped entirely leaving modules no way to directly iterate over -dnl # the zone list. Because we need access to the zone helpers we check -dnl # if the kernel contains the old or new implementation. Then we check -dnl # to see if the symbols we need for each version are available. If they -dnl # are not, dynamically aquire the addresses with kallsyms_lookup_name(). -dnl # -AC_DEFUN([SPL_AC_PGDAT_HELPERS], [ - AC_MSG_CHECKING([whether symbol *_pgdat exist]) - grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null - rc=$? - if test $rc -eq 0; then - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_PGDAT_HELPERS, 1, [pgdat helpers are available]) - else - AC_MSG_RESULT([no]) - fi -]) - -dnl # -dnl # Proposed API change, -dnl # This symbol is not available in stock kernels. You may build a -dnl # custom kernel with the *-spl-export-symbols.patch which will export -dnl # these symbols for use. If your already rolling a custom kernel for -dnl # your environment this is recommended. -dnl # -AC_DEFUN([SPL_AC_FIRST_ONLINE_PGDAT], - [AC_MSG_CHECKING([whether first_online_pgdat() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - first_online_pgdat(); - ], [first_online_pgdat], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FIRST_ONLINE_PGDAT, 1, - [first_online_pgdat() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # Proposed API change, -dnl # This symbol is not available in stock kernels. You may build a -dnl # custom kernel with the *-spl-export-symbols.patch which will export -dnl # these symbols for use. If your already rolling a custom kernel for -dnl # your environment this is recommended. -dnl # -AC_DEFUN([SPL_AC_NEXT_ONLINE_PGDAT], - [AC_MSG_CHECKING([whether next_online_pgdat() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - next_online_pgdat(NULL); - ], [next_online_pgdat], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_NEXT_ONLINE_PGDAT, 1, - [next_online_pgdat() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # Proposed API change, -dnl # This symbol is not available in stock kernels. You may build a -dnl # custom kernel with the *-spl-export-symbols.patch which will export -dnl # these symbols for use. If your already rolling a custom kernel for -dnl # your environment this is recommended. -dnl # -AC_DEFUN([SPL_AC_NEXT_ZONE], - [AC_MSG_CHECKING([whether next_zone() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - next_zone(NULL); - ], [next_zone], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_NEXT_ZONE, 1, [next_zone() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.17 API change, -dnl # See SPL_AC_PGDAT_HELPERS for details. -dnl # -AC_DEFUN([SPL_AC_PGDAT_LIST], - [AC_MSG_CHECKING([whether pgdat_list is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - pg_data_t *tmp = pgdat_list; - ], [], [pgdat_list], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PGDAT_LIST, 1, [pgdat_list is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.18 API change, -dnl # First introduced global_page_state() support as an inline. -dnl # -AC_DEFUN([SPL_AC_GLOBAL_PAGE_STATE], [ - AC_MSG_CHECKING([whether global_page_state() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - unsigned long state __attribute__ ((unused)); - state = global_page_state(0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GLOBAL_PAGE_STATE, 1, - [global_page_state() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.21 API change (plus subsequent naming convention changes), -dnl # Public global zone stats now include a free page count. However -dnl # the enumerated names of the counters have changed since this API -dnl # was introduced. We need to deduce the corrent name to use. This -dnl # replaces the priviate get_zone_counts() interface. -dnl # -dnl # NR_FREE_PAGES was available from 2.6.21 to current kernels, which -dnl # is 2.6.30 as of when this was written. -dnl # -AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_FREE], [ - AC_MSG_CHECKING([whether page state NR_FREE_PAGES is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_FREE_PAGES; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES, 1, - [Page state NR_FREE_PAGES is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.21 API change (plus subsequent naming convention changes), -dnl # Public global zone stats now include an inactive page count. However -dnl # the enumerated names of the counters have changed since this API -dnl # was introduced. We need to deduce the corrent name to use. This -dnl # replaces the priviate get_zone_counts() interface. -dnl # -dnl # NR_INACTIVE was available from 2.6.21 to 2.6.27 and included both -dnl # anonymous and file inactive pages. As of 2.6.28 it was split in -dnl # to NR_INACTIVE_ANON and NR_INACTIVE_FILE. -dnl # -AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_INACTIVE], [ - AC_MSG_CHECKING([whether page state NR_INACTIVE is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_INACTIVE, 1, - [Page state NR_INACTIVE is available]) - ],[ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING([whether page state NR_INACTIVE_ANON is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE_ANON; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON, 1, - [Page state NR_INACTIVE_ANON is available]) - ],[ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING([whether page state NR_INACTIVE_FILE is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_INACTIVE_FILE; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE, 1, - [Page state NR_INACTIVE_FILE is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.21 API change (plus subsequent naming convention changes), -dnl # Public global zone stats now include an active page count. However -dnl # the enumerated names of the counters have changed since this API -dnl # was introduced. We need to deduce the corrent name to use. This -dnl # replaces the priviate get_zone_counts() interface. -dnl # -dnl # NR_ACTIVE was available from 2.6.21 to 2.6.27 and included both -dnl # anonymous and file active pages. As of 2.6.28 it was split in -dnl # to NR_ACTIVE_ANON and NR_ACTIVE_FILE. -dnl # -AC_DEFUN([SPL_AC_ZONE_STAT_ITEM_ACTIVE], [ - AC_MSG_CHECKING([whether page state NR_ACTIVE is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_ACTIVE, 1, - [Page state NR_ACTIVE is available]) - ],[ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING([whether page state NR_ACTIVE_ANON is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE_ANON; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON, 1, - [Page state NR_ACTIVE_ANON is available]) - ],[ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING([whether page state NR_ACTIVE_FILE is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - enum zone_stat_item zsi __attribute__ ((unused)); - zsi = NR_ACTIVE_FILE; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE, 1, - [Page state NR_ACTIVE_FILE is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # Proposed API change for legacy kernels. -dnl # This symbol is not available in older kernels. For kernels post -dnl # 2.6.21 the global_page_state() API is used to get free/inactive/active -dnl # page state information. This symbol is only used in legacy kernels -dnl # any only as a last resort. -dnl -AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [ - AC_MSG_CHECKING([whether symbol get_zone_counts is needed]) - SPL_LINUX_TRY_COMPILE([ - ],[ - #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) - #error "global_page_state needs NR_FREE_PAGES" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) - #error "global_page_state needs NR_ACTIVE*" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) - #error "global_page_state needs NR_INACTIVE*" - #endif - ],[ - AC_MSG_RESULT(no) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(NEED_GET_ZONE_COUNTS, 1, - [get_zone_counts() is needed]) - - AC_MSG_CHECKING([whether get_zone_counts() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - get_zone_counts(NULL, NULL, NULL); - ], [get_zone_counts], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GET_ZONE_COUNTS, 1, - [get_zone_counts() is available]) - ], [ - AC_MSG_RESULT(no) - ]) - ]) -]) - dnl # dnl # 2.6.27 API change, dnl # The user_path_dir() replaces __user_walk() diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 37c9b0875..97e5af012 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -28,22 +28,6 @@ #include #include -/* - * Linux 2.6.31 API Change. - * Individual pages_{min,low,high} moved in to watermark array. - */ -#ifndef min_wmark_pages -#define min_wmark_pages(z) (z->pages_min) -#endif - -#ifndef low_wmark_pages -#define low_wmark_pages(z) (z->pages_low) -#endif - -#ifndef high_wmark_pages -#define high_wmark_pages(z) (z->pages_high) -#endif - #if !defined(HAVE_SHRINK_CONTROL_STRUCT) struct shrink_control { gfp_t gfp_mask; diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index ee3ed6d72..c6b86866b 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -33,31 +33,14 @@ #include #include -/* These values are loosely coupled with the VM page reclaim. - * Linux uses its own heuristics to trigger page reclamation, and - * because those interface are difficult to interface with. These - * values should only be considered as a rough guide to the system - * memory state and not as direct evidence that page reclamation. - * is or is not currently in progress. - */ -#define membar_producer() smp_wmb() - -#define physmem totalram_pages -#define freemem nr_free_pages() -#define availrmem spl_kmem_availrmem() - -extern pgcnt_t minfree; /* Sum of zone->pages_min */ -extern pgcnt_t desfree; /* Sum of zone->pages_low */ -extern pgcnt_t lotsfree; /* Sum of zone->pages_high */ -extern pgcnt_t needfree; /* Always 0 unused in new Solaris */ -extern pgcnt_t swapfs_minfree; /* Solaris default value */ -extern pgcnt_t swapfs_reserve; /* Solaris default value */ +#define membar_producer() smp_wmb() +#define physmem totalram_pages +#define freemem nr_free_pages() extern vmem_t *heap_arena; /* primary kernel heap arena */ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ extern vmem_t *zio_arena; /* arena for allocating zio memory */ -extern pgcnt_t spl_kmem_availrmem(void); extern size_t vmem_size(vmem_t *vmp, int typemask); #define VMEM_ALLOC 0x01 @@ -67,54 +50,8 @@ extern size_t vmem_size(vmem_t *vmp, int typemask); #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) #endif -#ifdef HAVE_PGDAT_HELPERS -/* Source linux/mm/mmzone.c */ -# ifndef HAVE_FIRST_ONLINE_PGDAT -typedef struct pglist_data *(*first_online_pgdat_t)(void); -extern first_online_pgdat_t first_online_pgdat_fn; -# define first_online_pgdat() first_online_pgdat_fn() -# endif /* HAVE_FIRST_ONLINE_PGDAT */ - -# ifndef HAVE_NEXT_ONLINE_PGDAT -typedef struct pglist_data *(*next_online_pgdat_t)(struct pglist_data *); -extern next_online_pgdat_t next_online_pgdat_fn; -# define next_online_pgdat(pgd) next_online_pgdat_fn(pgd) -# endif /* HAVE_NEXT_ONLINE_PGDAT */ - -# ifndef HAVE_NEXT_ZONE -typedef struct zone *(*next_zone_t)(struct zone *); -extern next_zone_t next_zone_fn; -# define next_zone(zone) next_zone_fn(zone) -# endif /* HAVE_NEXT_ZONE */ - -#else /* HAVE_PGDAT_HELPERS */ - -# ifndef HAVE_PGDAT_LIST -extern struct pglist_data *pgdat_list_addr; -# define pgdat_list pgdat_list_addr -# endif /* HAVE_PGDAT_LIST */ - -#endif /* HAVE_PGDAT_HELPERS */ - -/* Source linux/mm/vmstat.c */ -#if defined(NEED_GET_ZONE_COUNTS) && !defined(HAVE_GET_ZONE_COUNTS) -typedef void (*get_zone_counts_t)(unsigned long *, unsigned long *, - unsigned long *); -extern get_zone_counts_t get_zone_counts_fn; -# define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f) -#endif /* NEED_GET_ZONE_COUNTS && !HAVE_GET_ZONE_COUNTS */ - -typedef enum spl_zone_stat_item { - SPL_NR_FREE_PAGES, - SPL_NR_INACTIVE, - SPL_NR_ACTIVE, - SPL_NR_ZONE_STAT_ITEMS -} spl_zone_stat_item_t; - -extern unsigned long spl_global_page_state(spl_zone_stat_item_t); - -#define xcopyin(from, to, size) copy_from_user(to, from, size) -#define xcopyout(from, to, size) copy_to_user(to, from, size) +#define xcopyin(from, to, size) copy_from_user(to, from, size) +#define xcopyout(from, to, size) copy_to_user(to, from, size) static __inline__ int copyin(const void *from, void *to, size_t len) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 7626a2951..aeb1d2a06 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -101,44 +101,6 @@ module_param(spl_kmem_cache_kmem_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, "Objects less than N bytes use the kmalloc"); -/* - * The minimum amount of memory measured in pages to be free at all - * times on the system. This is similar to Linux's zone->pages_min - * multiplied by the number of zones and is sized based on that. - */ -pgcnt_t minfree = 0; -EXPORT_SYMBOL(minfree); - -/* - * The desired amount of memory measured in pages to be free at all - * times on the system. This is similar to Linux's zone->pages_low - * multiplied by the number of zones and is sized based on that. - * Assuming all zones are being used roughly equally, when we drop - * below this threshold asynchronous page reclamation is triggered. - */ -pgcnt_t desfree = 0; -EXPORT_SYMBOL(desfree); - -/* - * When above this amount of memory measures in pages the system is - * determined to have enough free memory. This is similar to Linux's - * zone->pages_high multiplied by the number of zones and is sized based - * on that. Assuming all zones are being used roughly equally, when - * asynchronous page reclamation reaches this threshold it stops. - */ -pgcnt_t lotsfree = 0; -EXPORT_SYMBOL(lotsfree); - -/* Unused always 0 in this implementation */ -pgcnt_t needfree = 0; -EXPORT_SYMBOL(needfree); - -pgcnt_t swapfs_minfree = 0; -EXPORT_SYMBOL(swapfs_minfree); - -pgcnt_t swapfs_reserve = 0; -EXPORT_SYMBOL(swapfs_reserve); - vmem_t *heap_arena = NULL; EXPORT_SYMBOL(heap_arena); @@ -148,101 +110,6 @@ EXPORT_SYMBOL(zio_alloc_arena); vmem_t *zio_arena = NULL; EXPORT_SYMBOL(zio_arena); -#ifdef HAVE_PGDAT_HELPERS -# ifndef HAVE_FIRST_ONLINE_PGDAT -first_online_pgdat_t first_online_pgdat_fn = SYMBOL_POISON; -EXPORT_SYMBOL(first_online_pgdat_fn); -# endif /* HAVE_FIRST_ONLINE_PGDAT */ - -# ifndef HAVE_NEXT_ONLINE_PGDAT -next_online_pgdat_t next_online_pgdat_fn = SYMBOL_POISON; -EXPORT_SYMBOL(next_online_pgdat_fn); -# endif /* HAVE_NEXT_ONLINE_PGDAT */ - -# ifndef HAVE_NEXT_ZONE -next_zone_t next_zone_fn = SYMBOL_POISON; -EXPORT_SYMBOL(next_zone_fn); -# endif /* HAVE_NEXT_ZONE */ - -#else /* HAVE_PGDAT_HELPERS */ - -# ifndef HAVE_PGDAT_LIST -struct pglist_data *pgdat_list_addr = SYMBOL_POISON; -EXPORT_SYMBOL(pgdat_list_addr); -# endif /* HAVE_PGDAT_LIST */ - -#endif /* HAVE_PGDAT_HELPERS */ - -#ifdef NEED_GET_ZONE_COUNTS -# ifndef HAVE_GET_ZONE_COUNTS -get_zone_counts_t get_zone_counts_fn = SYMBOL_POISON; -EXPORT_SYMBOL(get_zone_counts_fn); -# endif /* HAVE_GET_ZONE_COUNTS */ - -unsigned long -spl_global_page_state(spl_zone_stat_item_t item) -{ - unsigned long active; - unsigned long inactive; - unsigned long free; - - get_zone_counts(&active, &inactive, &free); - switch (item) { - case SPL_NR_FREE_PAGES: return free; - case SPL_NR_INACTIVE: return inactive; - case SPL_NR_ACTIVE: return active; - default: ASSERT(0); /* Unsupported */ - } - - return 0; -} -#else -# ifdef HAVE_GLOBAL_PAGE_STATE -unsigned long -spl_global_page_state(spl_zone_stat_item_t item) -{ - unsigned long pages = 0; - - switch (item) { - case SPL_NR_FREE_PAGES: -# ifdef HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES - pages += global_page_state(NR_FREE_PAGES); -# endif - break; - case SPL_NR_INACTIVE: -# ifdef HAVE_ZONE_STAT_ITEM_NR_INACTIVE - pages += global_page_state(NR_INACTIVE); -# endif -# ifdef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON - pages += global_page_state(NR_INACTIVE_ANON); -# endif -# ifdef HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE - pages += global_page_state(NR_INACTIVE_FILE); -# endif - break; - case SPL_NR_ACTIVE: -# ifdef HAVE_ZONE_STAT_ITEM_NR_ACTIVE - pages += global_page_state(NR_ACTIVE); -# endif -# ifdef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON - pages += global_page_state(NR_ACTIVE_ANON); -# endif -# ifdef HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE - pages += global_page_state(NR_ACTIVE_FILE); -# endif - break; - default: - ASSERT(0); /* Unsupported */ - } - - return pages; -} -# else -# error "Both global_page_state() and get_zone_counts() unavailable" -# endif /* HAVE_GLOBAL_PAGE_STATE */ -#endif /* NEED_GET_ZONE_COUNTS */ -EXPORT_SYMBOL(spl_global_page_state); - #ifndef HAVE_SHRINK_DCACHE_MEMORY shrink_dcache_memory_t shrink_dcache_memory_fn = SYMBOL_POISON; EXPORT_SYMBOL(shrink_dcache_memory_fn); @@ -253,15 +120,6 @@ shrink_icache_memory_t shrink_icache_memory_fn = SYMBOL_POISON; EXPORT_SYMBOL(shrink_icache_memory_fn); #endif /* HAVE_SHRINK_ICACHE_MEMORY */ -pgcnt_t -spl_kmem_availrmem(void) -{ - /* The amount of easily available memory */ - return (spl_global_page_state(SPL_NR_FREE_PAGES) + - spl_global_page_state(SPL_NR_INACTIVE)); -} -EXPORT_SYMBOL(spl_kmem_availrmem); - size_t vmem_size(vmem_t *vmp, int typemask) { @@ -2458,90 +2316,12 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) #define spl_kmem_fini_tracking(list, lock) #endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ -static void -spl_kmem_init_globals(void) -{ - struct zone *zone; - - /* For now all zones are includes, it may be wise to restrict - * this to normal and highmem zones if we see problems. */ - for_each_zone(zone) { - - if (!populated_zone(zone)) - continue; - - minfree += min_wmark_pages(zone); - desfree += low_wmark_pages(zone); - lotsfree += high_wmark_pages(zone); - } - - /* Solaris default values */ - swapfs_minfree = MAX(2*1024*1024 >> PAGE_SHIFT, physmem >> 3); - swapfs_reserve = MIN(4*1024*1024 >> PAGE_SHIFT, physmem >> 4); -} - /* * Called at module init when it is safe to use spl_kallsyms_lookup_name() */ int spl_kmem_init_kallsyms_lookup(void) { -#ifdef HAVE_PGDAT_HELPERS -# ifndef HAVE_FIRST_ONLINE_PGDAT - first_online_pgdat_fn = (first_online_pgdat_t) - spl_kallsyms_lookup_name("first_online_pgdat"); - if (!first_online_pgdat_fn) { - printk(KERN_ERR "Error: Unknown symbol first_online_pgdat\n"); - return -EFAULT; - } -# endif /* HAVE_FIRST_ONLINE_PGDAT */ - -# ifndef HAVE_NEXT_ONLINE_PGDAT - next_online_pgdat_fn = (next_online_pgdat_t) - spl_kallsyms_lookup_name("next_online_pgdat"); - if (!next_online_pgdat_fn) { - printk(KERN_ERR "Error: Unknown symbol next_online_pgdat\n"); - return -EFAULT; - } -# endif /* HAVE_NEXT_ONLINE_PGDAT */ - -# ifndef HAVE_NEXT_ZONE - next_zone_fn = (next_zone_t) - spl_kallsyms_lookup_name("next_zone"); - if (!next_zone_fn) { - printk(KERN_ERR "Error: Unknown symbol next_zone\n"); - return -EFAULT; - } -# endif /* HAVE_NEXT_ZONE */ - -#else /* HAVE_PGDAT_HELPERS */ - -# ifndef HAVE_PGDAT_LIST - pgdat_list_addr = *(struct pglist_data **) - spl_kallsyms_lookup_name("pgdat_list"); - if (!pgdat_list_addr) { - printk(KERN_ERR "Error: Unknown symbol pgdat_list\n"); - return -EFAULT; - } -# endif /* HAVE_PGDAT_LIST */ -#endif /* HAVE_PGDAT_HELPERS */ - -#if defined(NEED_GET_ZONE_COUNTS) && !defined(HAVE_GET_ZONE_COUNTS) - get_zone_counts_fn = (get_zone_counts_t) - spl_kallsyms_lookup_name("get_zone_counts"); - if (!get_zone_counts_fn) { - printk(KERN_ERR "Error: Unknown symbol get_zone_counts\n"); - return -EFAULT; - } -#endif /* NEED_GET_ZONE_COUNTS && !HAVE_GET_ZONE_COUNTS */ - - /* - * It is now safe to initialize the global tunings which rely on - * the use of the for_each_zone() macro. This macro in turns - * depends on the *_pgdat symbols which are now available. - */ - spl_kmem_init_globals(); - #ifndef HAVE_SHRINK_DCACHE_MEMORY /* When shrink_dcache_memory_fn == NULL support is disabled */ shrink_dcache_memory_fn = (shrink_dcache_memory_t) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 3daa3deea..9c42c96ea 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -454,55 +454,6 @@ SPL_PROC_HANDLER(proc_dokallsyms_lookup_name) } #endif /* HAVE_KALLSYMS_LOOKUP_NAME */ -SPL_PROC_HANDLER(proc_doavailrmem) -{ - int len, rc = 0; - char str[32]; - SENTRY; - - if (write) { - *ppos += *lenp; - } else { - len = snprintf(str, sizeof(str), "%lu", - (unsigned long)availrmem); - if (*ppos >= len) - rc = 0; - else - rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); - - if (rc >= 0) { - *lenp = rc; - *ppos += rc; - } - } - - SRETURN(rc); -} - -SPL_PROC_HANDLER(proc_dofreemem) -{ - int len, rc = 0; - char str[32]; - SENTRY; - - if (write) { - *ppos += *lenp; - } else { - len = snprintf(str, sizeof(str), "%lu", (unsigned long)freemem); - if (*ppos >= len) - rc = 0; - else - rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); - - if (rc >= 0) { - *lenp = rc; - *ppos += rc; - } - } - - SRETURN(rc); -} - #ifdef DEBUG_KMEM static void slab_seq_show_headers(struct seq_file *f) @@ -719,71 +670,6 @@ static struct ctl_table spl_debug_table[] = { }; #endif /* DEBUG_LOG */ -static struct ctl_table spl_vm_table[] = { - { - .procname = "minfree", - .data = &minfree, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .procname = "desfree", - .data = &desfree, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .procname = "lotsfree", - .data = &lotsfree, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .procname = "needfree", - .data = &needfree, - .maxlen = sizeof(int), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, - { - .procname = "swapfs_minfree", - .data = &swapfs_minfree, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .procname = "swapfs_reserve", - .data = &swapfs_reserve, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .procname = "availrmem", - .mode = 0444, - .proc_handler = &proc_doavailrmem, - }, - { - .procname = "freemem", - .data = (void *)2, - .maxlen = sizeof(int), - .mode = 0444, - .proc_handler = &proc_dofreemem, - }, - { - .procname = "physmem", - .data = &physmem, - .maxlen = sizeof(int), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, - {0}, -}; - #ifdef DEBUG_KMEM static struct ctl_table spl_kmem_table[] = { { @@ -922,11 +808,6 @@ static struct ctl_table spl_table[] = { .child = spl_debug_table, }, #endif - { - .procname = "vm", - .mode = 0555, - .child = spl_vm_table, - }, #ifdef DEBUG_KMEM { .procname = "kmem", diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index ebc6a042f..76643db18 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1052,9 +1052,8 @@ splat_kmem_test10(struct file *file, void *arg) for (alloc = 1; alloc <= 1024; alloc *= 2) { - /* Skip tests which exceed available memory. We - * leverage availrmem here for some extra testing */ - if (size * alloc * SPLAT_KMEM_THREADS > availrmem / 2) + /* Skip tests which exceed 1/2 of physical memory. */ + if (size * alloc * SPLAT_KMEM_THREADS > physmem / 2) continue; rc = splat_kmem_cache_thread_test(file, arg, From 89a461e70c13c860d336dc36358bb02172ed6346 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 19:27:29 -0400 Subject: [PATCH 0832/1062] Remove shrink_{i,d}node_cache() wrappers This is optional functionality which may or may not be useful to ZFS when using older kernels. It is never a hard requirement. Therefore this functionality is being removed from the SPL and a simpler slimmed down version will be added to ZFS. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 44 ----------------- include/linux/mm_compat.h | 96 -------------------------------------- include/sys/dnlc.h | 18 ------- include/sys/kmem.h | 1 - module/spl/spl-generic.c | 14 ++---- module/spl/spl-kmem.c | 31 ------------ module/splat/splat-linux.c | 79 ++++--------------------------- 7 files changed, 15 insertions(+), 268 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 8a7486c55..8761be485 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -46,8 +46,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KVASPRINTF SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_FALLOCATE - SPL_AC_SHRINK_DCACHE_MEMORY - SPL_AC_SHRINK_ICACHE_MEMORY SPL_AC_KERN_PATH SPL_AC_CONFIG_KALLSYMS SPL_AC_CONFIG_ZLIB_INFLATE @@ -1465,48 +1463,6 @@ AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], ]) ]) -dnl # -dnl # 2.6.xx API compat, -dnl # There currently exists no exposed API to partially shrink the dcache. -dnl # The expected mechanism to shrink the cache is a registered shrinker -dnl # which is called during memory pressure. -dnl # -AC_DEFUN([SPL_AC_SHRINK_DCACHE_MEMORY], - [AC_MSG_CHECKING([whether shrink_dcache_memory() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - shrink_dcache_memory(0, 0); - ], [shrink_dcache_memory], [fs/dcache.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SHRINK_DCACHE_MEMORY, 1, - [shrink_dcache_memory() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.xx API compat, -dnl # There currently exists no exposed API to partially shrink the icache. -dnl # The expected mechanism to shrink the cache is a registered shrinker -dnl # which is called during memory pressure. -dnl # -AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], - [AC_MSG_CHECKING([whether shrink_icache_memory() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - shrink_icache_memory(0, 0); - ], [shrink_icache_memory], [fs/inode.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SHRINK_ICACHE_MEMORY, 1, - [shrink_icache_memory() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.28 API change dnl # The kern_path() function has been introduced. We adopt it as the new way diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 97e5af012..456fc51fc 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -35,102 +35,6 @@ struct shrink_control { }; #endif /* HAVE_SHRINK_CONTROL_STRUCT */ -/* - * 2.6.xx API compat, - * There currently exists no exposed API to partially shrink the dcache. - * The expected mechanism to shrink the cache is a registered shrinker - * which is called during memory pressure. - */ -#ifndef HAVE_SHRINK_DCACHE_MEMORY -# if defined(HAVE_SHRINK_CONTROL_STRUCT) -typedef int (*shrink_dcache_memory_t)(struct shrinker *, - struct shrink_control *); -extern shrink_dcache_memory_t shrink_dcache_memory_fn; -# define shrink_dcache_memory(nr, gfp) \ -({ \ - struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \ - int __ret__ = 0; \ - \ - if (shrink_dcache_memory_fn) \ - __ret__ = shrink_dcache_memory_fn(NULL, &sc); \ - \ - __ret__; \ -}) -# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) -typedef int (*shrink_dcache_memory_t)(struct shrinker *, int, gfp_t); -extern shrink_dcache_memory_t shrink_dcache_memory_fn; -# define shrink_dcache_memory(nr, gfp) \ -({ \ - int __ret__ = 0; \ - \ - if (shrink_dcache_memory_fn) \ - __ret__ = shrink_dcache_memory_fn(NULL, nr, gfp); \ - \ - __ret__; \ -}) -# else -typedef int (*shrink_dcache_memory_t)(int, gfp_t); -extern shrink_dcache_memory_t shrink_dcache_memory_fn; -# define shrink_dcache_memory(nr, gfp) \ -({ \ - int __ret__ = 0; \ - \ - if (shrink_dcache_memory_fn) \ - __ret__ = shrink_dcache_memory_fn(nr, gfp); \ - \ - __ret__; \ -}) -# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ -#endif /* HAVE_SHRINK_DCACHE_MEMORY */ - -/* - * 2.6.xx API compat, - * There currently exists no exposed API to partially shrink the icache. - * The expected mechanism to shrink the cache is a registered shrinker - * which is called during memory pressure. - */ -#ifndef HAVE_SHRINK_ICACHE_MEMORY -# if defined(HAVE_SHRINK_CONTROL_STRUCT) -typedef int (*shrink_icache_memory_t)(struct shrinker *, - struct shrink_control *); -extern shrink_icache_memory_t shrink_icache_memory_fn; -# define shrink_icache_memory(nr, gfp) \ -({ \ - struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \ - int __ret__ = 0; \ - \ - if (shrink_icache_memory_fn) \ - __ret__ = shrink_icache_memory_fn(NULL, &sc); \ - \ - __ret__; \ -}) -# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) -typedef int (*shrink_icache_memory_t)(struct shrinker *, int, gfp_t); -extern shrink_icache_memory_t shrink_icache_memory_fn; -# define shrink_icache_memory(nr, gfp) \ -({ \ - int __ret__ = 0; \ - \ - if (shrink_icache_memory_fn) \ - __ret__ = shrink_icache_memory_fn(NULL, nr, gfp); \ - \ - __ret__; \ -}) -# else -typedef int (*shrink_icache_memory_t)(int, gfp_t); -extern shrink_icache_memory_t shrink_icache_memory_fn; -# define shrink_icache_memory(nr, gfp) \ -({ \ - int __ret__ = 0; \ - \ - if (shrink_icache_memory_fn) \ - __ret__ = shrink_icache_memory_fn(nr, gfp); \ - \ - __ret__; \ -}) -# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */ -#endif /* HAVE_SHRINK_ICACHE_MEMORY */ - /* * Due to frequent changes in the shrinker API the following * compatibility wrappers should be used. They are as follows: diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h index 6834e067d..99d16c885 100644 --- a/include/sys/dnlc.h +++ b/include/sys/dnlc.h @@ -25,22 +25,4 @@ #ifndef _SPL_DNLC_H #define _SPL_DNLC_H -/* - * Reduce the dcache and icache then reap the free'd slabs. Note the - * interface takes a reclaim percentage but we don't have easy access to - * the total number of entries to calculate the reclaim count. However, - * in practice this doesn't need to be even close to correct. We simply - * need to reclaim some useful fraction of the cache. The caller can - * determine if more needs to be done. - */ -static inline void -dnlc_reduce_cache(void *reduce_percent) -{ - int nr = (uintptr_t)reduce_percent * 10000; - - shrink_dcache_memory(nr, GFP_KERNEL); - shrink_icache_memory(nr, GFP_KERNEL); - kmem_reap(); -} - #endif /* SPL_DNLC_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index f38d364e2..adbaea931 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -498,7 +498,6 @@ extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count); extern void spl_kmem_reap(void); -int spl_kmem_init_kallsyms_lookup(void); int spl_kmem_init(void); void spl_kmem_fini(void); diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 1059fb3cc..dacd0e260 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -490,7 +490,6 @@ zone_get_hostid(void *zone) } EXPORT_SYMBOL(zone_get_hostid); -#ifndef HAVE_KALLSYMS_LOOKUP_NAME /* * The kallsyms_lookup_name() kernel function is not an exported symbol in * Linux 2.6.19 through 2.6.32 inclusive. @@ -499,7 +498,6 @@ EXPORT_SYMBOL(zone_get_hostid); * space where /proc/kallsyms is consulted for the requested address. * */ - #define GET_KALLSYMS_ADDR_CMD \ "exec 0/proc/sys/kernel/spl/kallsyms_lookup_name " \ @@ -510,6 +508,7 @@ EXPORT_SYMBOL(zone_get_hostid); static int set_kallsyms_lookup_name(void) { +#ifndef HAVE_KALLSYMS_LOOKUP_NAME char *argv[] = { "/bin/sh", "-c", GET_KALLSYMS_ADDR_CMD, @@ -543,9 +542,11 @@ set_kallsyms_lookup_name(void) printk("SPL: Failed user helper '%s %s %s', rc = %d\n", argv[0], argv[1], argv[2], rc); - return rc; + return (rc); +#else + return (0); +#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ } -#endif static int __init spl_init(void) @@ -582,13 +583,8 @@ __init spl_init(void) if ((rc = spl_zlib_init())) SGOTO(out9, rc); -#ifndef HAVE_KALLSYMS_LOOKUP_NAME if ((rc = set_kallsyms_lookup_name())) SGOTO(out10, rc = -EADDRNOTAVAIL); -#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ - - if ((rc = spl_kmem_init_kallsyms_lookup())) - SGOTO(out10, rc); printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index aeb1d2a06..caeb324b3 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -110,16 +110,6 @@ EXPORT_SYMBOL(zio_alloc_arena); vmem_t *zio_arena = NULL; EXPORT_SYMBOL(zio_arena); -#ifndef HAVE_SHRINK_DCACHE_MEMORY -shrink_dcache_memory_t shrink_dcache_memory_fn = SYMBOL_POISON; -EXPORT_SYMBOL(shrink_dcache_memory_fn); -#endif /* HAVE_SHRINK_DCACHE_MEMORY */ - -#ifndef HAVE_SHRINK_ICACHE_MEMORY -shrink_icache_memory_t shrink_icache_memory_fn = SYMBOL_POISON; -EXPORT_SYMBOL(shrink_icache_memory_fn); -#endif /* HAVE_SHRINK_ICACHE_MEMORY */ - size_t vmem_size(vmem_t *vmp, int typemask) { @@ -2316,27 +2306,6 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) #define spl_kmem_fini_tracking(list, lock) #endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ -/* - * Called at module init when it is safe to use spl_kallsyms_lookup_name() - */ -int -spl_kmem_init_kallsyms_lookup(void) -{ -#ifndef HAVE_SHRINK_DCACHE_MEMORY - /* When shrink_dcache_memory_fn == NULL support is disabled */ - shrink_dcache_memory_fn = (shrink_dcache_memory_t) - spl_kallsyms_lookup_name("shrink_dcache_memory"); -#endif /* HAVE_SHRINK_DCACHE_MEMORY */ - -#ifndef HAVE_SHRINK_ICACHE_MEMORY - /* When shrink_icache_memory_fn == NULL support is disabled */ - shrink_icache_memory_fn = (shrink_icache_memory_t) - spl_kallsyms_lookup_name("shrink_icache_memory"); -#endif /* HAVE_SHRINK_ICACHE_MEMORY */ - - return 0; -} - int spl_kmem_init(void) { diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index ce809e647..c1dc7ce41 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -30,61 +30,8 @@ #define SPLAT_LINUX_DESC "Kernel Compatibility Tests" #define SPLAT_LINUX_TEST1_ID 0x1001 -#define SPLAT_LINUX_TEST1_NAME "shrink_dcache" -#define SPLAT_LINUX_TEST1_DESC "Shrink dcache test" - -#define SPLAT_LINUX_TEST2_ID 0x1002 -#define SPLAT_LINUX_TEST2_NAME "shrink_icache" -#define SPLAT_LINUX_TEST2_DESC "Shrink icache test" - -#define SPLAT_LINUX_TEST3_ID 0x1003 -#define SPLAT_LINUX_TEST3_NAME "shrinker" -#define SPLAT_LINUX_TEST3_DESC "Shrinker test" - - -/* - * Attempt to shrink the dcache memory. This is simply a functional - * to ensure we can correctly call the shrinker. We don't check that - * the cache actually decreased because we have no control over what - * else may be running on the system. This avoid false positives. - */ -static int -splat_linux_test1(struct file *file, void *arg) -{ - int remain_before; - int remain_after; - - remain_before = shrink_dcache_memory(0, GFP_KERNEL); - remain_after = shrink_dcache_memory(KMC_REAP_CHUNK, GFP_KERNEL); - - splat_vprint(file, SPLAT_LINUX_TEST1_NAME, - "Shrink dcache memory, remain %d -> %d\n", - remain_before, remain_after); - - return 0; -} - -/* - * Attempt to shrink the icache memory. This is simply a functional - * to ensure we can correctly call the shrinker. We don't check that - * the cache actually decreased because we have no control over what - * else may be running on the system. This avoid false positives. - */ -static int -splat_linux_test2(struct file *file, void *arg) -{ - int remain_before; - int remain_after; - - remain_before = shrink_icache_memory(0, GFP_KERNEL); - remain_after = shrink_icache_memory(KMC_REAP_CHUNK, GFP_KERNEL); - - splat_vprint(file, SPLAT_LINUX_TEST2_NAME, - "Shrink icache memory, remain %d -> %d\n", - remain_before, remain_after); - - return 0; -} +#define SPLAT_LINUX_TEST1_NAME "shrinker" +#define SPLAT_LINUX_TEST1_DESC "Shrinker test" /* * Wait queue used to eliminate race between dropping of slab @@ -117,17 +64,17 @@ __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) splat_linux_shrinker_size = splat_linux_shrinker_size - MIN(sc->nr_to_scan, splat_linux_shrinker_size); - splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST3_NAME, + splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, "Reclaimed %lu objects, size now %lu\n", sc->nr_to_scan, splat_linux_shrinker_size); } else { - splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST3_NAME, + splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, "Cache size is %lu\n", splat_linux_shrinker_size); } /* Far more calls than expected abort drop_slab as a failsafe */ if (failsafe > 100) { - splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST3_NAME, + splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, "Far more calls than expected (%d), size now %lu\n", failsafe, splat_linux_shrinker_size); return -1; @@ -168,7 +115,7 @@ splat_linux_drop_slab(struct file *file) rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); if (rc) - splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + splat_vprint(file, SPLAT_LINUX_TEST1_NAME, "Failed user helper '%s %s %s', rc = %d\n", argv[0], argv[1], argv[2], rc); @@ -185,7 +132,7 @@ splat_linux_drop_slab(struct file *file) * API and this test ensures the compatibility code is correct. */ static int -splat_linux_test3(struct file *file, void *arg) +splat_linux_test1(struct file *file, void *arg) { int rc = -EINVAL; @@ -196,7 +143,7 @@ splat_linux_test3(struct file *file, void *arg) * use is detected. */ if (splat_linux_shrinker_size || splat_linux_shrinker_file) { - splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + splat_vprint(file, SPLAT_LINUX_TEST1_NAME, "Failed due to concurrent shrinker test, rc = %d\n", rc); return (rc); } @@ -218,7 +165,7 @@ splat_linux_test3(struct file *file, void *arg) */ rc = wait_event_timeout(shrinker_wait, !splat_linux_shrinker_size, HZ); if (!rc) { - splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + splat_vprint(file, SPLAT_LINUX_TEST1_NAME, "Failed cache shrinking timed out, size now %lu", splat_linux_shrinker_size); rc = -ETIMEDOUT; @@ -227,7 +174,7 @@ splat_linux_test3(struct file *file, void *arg) } if (!rc && splat_linux_shrinker_size != 0) { - splat_vprint(file, SPLAT_LINUX_TEST3_NAME, + splat_vprint(file, SPLAT_LINUX_TEST1_NAME, "Failed cache was not shrunk to 0, size now %lu", splat_linux_shrinker_size); rc = -EDOM; @@ -260,10 +207,6 @@ splat_linux_init(void) SPLAT_TEST_INIT(sub, SPLAT_LINUX_TEST1_NAME, SPLAT_LINUX_TEST1_DESC, SPLAT_LINUX_TEST1_ID, splat_linux_test1); - SPLAT_TEST_INIT(sub, SPLAT_LINUX_TEST2_NAME, SPLAT_LINUX_TEST2_DESC, - SPLAT_LINUX_TEST2_ID, splat_linux_test2); - SPLAT_TEST_INIT(sub, SPLAT_LINUX_TEST3_NAME, SPLAT_LINUX_TEST3_DESC, - SPLAT_LINUX_TEST3_ID, splat_linux_test3); return sub; } @@ -272,8 +215,6 @@ void splat_linux_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_LINUX_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_LINUX_TEST2_ID); SPLAT_TEST_FINI(sub, SPLAT_LINUX_TEST1_ID); kfree(sub); From 44778f41100f88e7458d4deb2335ad09ce0bd0ea Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 19:58:11 -0400 Subject: [PATCH 0833/1062] Remove kallsyms_lookup_name() wrapper After the removable of get_vmalloc_info(), the unused global memory variables, and the optional dcache/icache shrinkers there is no longer a need for the kallsyms compatibility code. This allows us to eliminate another brittle area of the code by removing the kernel upcall this functionality depended on for older kernels. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 41 -------------------- include/linux/Makefile.am | 1 - include/linux/kallsyms_compat.h | 44 --------------------- include/sys/types.h | 1 - module/spl/spl-generic.c | 69 +-------------------------------- module/spl/spl-proc.c | 54 -------------------------- 6 files changed, 1 insertion(+), 209 deletions(-) delete mode 100644 include/linux/kallsyms_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 8761be485..712ad8470 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -28,7 +28,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PDE_DATA SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT - SPL_AC_KALLSYMS_LOOKUP_NAME SPL_AC_USER_PATH_DIR SPL_AC_SET_FS_PWD SPL_AC_SET_FS_PWD_WITH_CONST @@ -47,7 +46,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_FALLOCATE SPL_AC_KERN_PATH - SPL_AC_CONFIG_KALLSYMS SPL_AC_CONFIG_ZLIB_INFLATE SPL_AC_CONFIG_ZLIB_DEFLATE SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE @@ -957,25 +955,6 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [ EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # 2.6.18 API change, -dnl # kallsyms_lookup_name no longer exported -dnl # -AC_DEFUN([SPL_AC_KALLSYMS_LOOKUP_NAME], - [AC_MSG_CHECKING([whether kallsyms_lookup_name() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - kallsyms_lookup_name(NULL); - ], [kallsyms_lookup_name], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KALLSYMS_LOOKUP_NAME, 1, - [kallsyms_lookup_name() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 3.10 API change, dnl # PDE is replaced by PDE_DATA @@ -1501,26 +1480,6 @@ AC_DEFUN([SPL_AC_KERN_PATH], ]) ]) -dnl # -dnl # /proc/kallsyms support, -dnl # Verify the kernel has CONFIG_KALLSYMS support enabled. -dnl # -AC_DEFUN([SPL_AC_CONFIG_KALLSYMS], [ - AC_MSG_CHECKING([whether CONFIG_KALLSYMS is defined]) - SPL_LINUX_TRY_COMPILE([ - #if !defined(CONFIG_KALLSYMS) - #error CONFIG_KALLSYMS not defined - #endif - ],[ ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_ERROR([ - *** This kernel does not include the required kallsyms support. - *** Rebuild the kernel with CONFIG_KALLSYMS=y set.]) - ]) -]) - dnl # dnl # zlib inflate compat, dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled. diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index ac7064d24..bbd422770 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -5,7 +5,6 @@ KERNEL_H = \ $(top_srcdir)/include/linux/compiler_compat.h \ $(top_srcdir)/include/linux/delay_compat.h \ $(top_srcdir)/include/linux/file_compat.h \ - $(top_srcdir)/include/linux/kallsyms_compat.h \ $(top_srcdir)/include/linux/list_compat.h \ $(top_srcdir)/include/linux/math64_compat.h \ $(top_srcdir)/include/linux/mm_compat.h \ diff --git a/include/linux/kallsyms_compat.h b/include/linux/kallsyms_compat.h deleted file mode 100644 index 1c7afa5dd..000000000 --- a/include/linux/kallsyms_compat.h +++ /dev/null @@ -1,44 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_KALLSYMS_COMPAT_H -#define _SPL_KALLSYMS_COMPAT_H - -#define SYMBOL_POISON ((void*)0xabcddcba) - -#ifdef HAVE_KALLSYMS_LOOKUP_NAME - -#include -#define spl_kallsyms_lookup_name(name) kallsyms_lookup_name(name) - -#else - -extern wait_queue_head_t spl_kallsyms_lookup_name_waitq; -typedef unsigned long (*kallsyms_lookup_name_t)(const char *); -extern kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn; -#define spl_kallsyms_lookup_name(name) spl_kallsyms_lookup_name_fn(name) - -#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ - -#endif /* _SPL_KALLSYMS_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index d34070c3d..2745db9c7 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index dacd0e260..fd68789bc 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -59,11 +59,6 @@ MODULE_PARM_DESC(spl_hostid, "The system hostid."); proc_t p0 = { 0 }; EXPORT_SYMBOL(p0); -#ifndef HAVE_KALLSYMS_LOOKUP_NAME -DECLARE_WAIT_QUEUE_HEAD(spl_kallsyms_lookup_name_waitq); -kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn = SYMBOL_POISON; -#endif - #if BITS_PER_LONG == 32 /* * Support 64/64 => 64 division on a 32-bit platform. While the kernel @@ -490,64 +485,6 @@ zone_get_hostid(void *zone) } EXPORT_SYMBOL(zone_get_hostid); -/* - * The kallsyms_lookup_name() kernel function is not an exported symbol in - * Linux 2.6.19 through 2.6.32 inclusive. - * - * This function replaces the functionality by performing an upcall to user - * space where /proc/kallsyms is consulted for the requested address. - * - */ -#define GET_KALLSYMS_ADDR_CMD \ - "exec 0/proc/sys/kernel/spl/kallsyms_lookup_name " \ - " 2>/dev/null; " \ - "awk '{ if ( $3 == \"kallsyms_lookup_name\" ) { print $1 } }' " \ - " /proc/kallsyms " - -static int -set_kallsyms_lookup_name(void) -{ -#ifndef HAVE_KALLSYMS_LOOKUP_NAME - char *argv[] = { "/bin/sh", - "-c", - GET_KALLSYMS_ADDR_CMD, - NULL }; - char *envp[] = { "HOME=/", - "TERM=linux", - "PATH=/sbin:/usr/sbin:/bin:/usr/bin", - NULL }; - int rc; - - rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); - - /* - * Due to I/O buffering the helper may return successfully before - * the proc handler has a chance to execute. To catch this case - * wait up to 1 second to verify spl_kallsyms_lookup_name_fn was - * updated to a non SYMBOL_POISON value. - */ - if (rc == 0) { - rc = wait_event_timeout(spl_kallsyms_lookup_name_waitq, - spl_kallsyms_lookup_name_fn != SYMBOL_POISON, HZ); - if (rc == 0) - rc = -ETIMEDOUT; - else if (spl_kallsyms_lookup_name_fn == SYMBOL_POISON) - rc = -EFAULT; - else - rc = 0; - } - - if (rc) - printk("SPL: Failed user helper '%s %s %s', rc = %d\n", - argv[0], argv[1], argv[2], rc); - - return (rc); -#else - return (0); -#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ -} - static int __init spl_init(void) { @@ -583,14 +520,10 @@ __init spl_init(void) if ((rc = spl_zlib_init())) SGOTO(out9, rc); - if ((rc = set_kallsyms_lookup_name())) - SGOTO(out10, rc = -EADDRNOTAVAIL); - printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); SRETURN(rc); -out10: - spl_zlib_fini(); + out9: spl_tsd_fini(); out8: diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 9c42c96ea..42733e0d7 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -409,51 +409,6 @@ SPL_PROC_HANDLER(proc_dohostid) SRETURN(rc); } -#ifndef HAVE_KALLSYMS_LOOKUP_NAME -SPL_PROC_HANDLER(proc_dokallsyms_lookup_name) -{ - int len, rc = 0; - char *end, str[32]; - SENTRY; - - if (write) { - /* This may only be set once at module load time */ - if (spl_kallsyms_lookup_name_fn != SYMBOL_POISON) - SRETURN(-EEXIST); - - /* We can't use spl_proc_doulongvec_minmax() in the write - * case here because the address while a hex value has no - * leading 0x which confuses the helper function. */ - rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); - if (rc < 0) - SRETURN(rc); - - spl_kallsyms_lookup_name_fn = - (kallsyms_lookup_name_t)simple_strtoul(str, &end, 16); - wake_up(&spl_kallsyms_lookup_name_waitq); - - if (str == end) - SRETURN(-EINVAL); - - *ppos += *lenp; - } else { - len = snprintf(str, sizeof(str), "%lx", - (unsigned long)spl_kallsyms_lookup_name_fn); - if (*ppos >= len) - rc = 0; - else - rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); - - if (rc >= 0) { - *lenp = rc; - *ppos += rc; - } - } - - SRETURN(rc); -} -#endif /* HAVE_KALLSYMS_LOOKUP_NAME */ - #ifdef DEBUG_KMEM static void slab_seq_show_headers(struct seq_file *f) @@ -792,15 +747,6 @@ static struct ctl_table spl_table[] = { .mode = 0644, .proc_handler = &proc_dohostid, }, -#ifndef HAVE_KALLSYMS_LOOKUP_NAME - { - .procname = "kallsyms_lookup_name", - .data = &spl_kallsyms_lookup_name_fn, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = &proc_dokallsyms_lookup_name, - }, -#endif #ifdef DEBUG_LOG { .procname = "debug", From 3c49a1698986861d76dc2c08dcce8774bde36e25 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 20:14:15 -0400 Subject: [PATCH 0834/1062] Remove user_path_dir() wrapper The user_path_dir() function has been available since Linux 2.6.27. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 20 -------------------- module/spl/spl-vnode.c | 20 -------------------- 2 files changed, 40 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 712ad8470..264989d5c 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -28,7 +28,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PDE_DATA SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT - SPL_AC_USER_PATH_DIR SPL_AC_SET_FS_PWD SPL_AC_SET_FS_PWD_WITH_CONST SPL_AC_2ARGS_VFS_UNLINK @@ -973,25 +972,6 @@ AC_DEFUN([SPL_AC_PDE_DATA], [ ]) ]) -dnl # -dnl # 2.6.27 API change, -dnl # The user_path_dir() replaces __user_walk() -dnl # -AC_DEFUN([SPL_AC_USER_PATH_DIR], - [AC_MSG_CHECKING([whether user_path_dir() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - #include - ], [ - user_path_dir(NULL, NULL); - ], [user_path_at], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_USER_PATH_DIR, 1, [user_path_dir() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # Symbol available in RHEL kernels not in stock kernels. dnl # diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a8c5f974d..5b0dd4235 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -798,11 +798,7 @@ set_fs_pwd(struct fs_struct *fs, struct path *path) int vn_set_pwd(const char *filename) { -#ifdef HAVE_USER_PATH_DIR struct path path; -#else - struct nameidata nd; -#endif /* HAVE_USER_PATH_DIR */ mm_segment_t saved_fs; int rc; SENTRY; @@ -815,7 +811,6 @@ vn_set_pwd(const char *filename) saved_fs = get_fs(); set_fs(get_ds()); -# ifdef HAVE_USER_PATH_DIR rc = user_path_dir(filename, &path); if (rc) SGOTO(out, rc); @@ -828,21 +823,6 @@ vn_set_pwd(const char *filename) dput_and_out: path_put(&path); -# else - rc = __user_walk(filename, - LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd); - if (rc) - SGOTO(out, rc); - - rc = vfs_permission(&nd, MAY_EXEC); - if (rc) - SGOTO(dput_and_out, rc); - - set_fs_pwd(current->fs, &nd.path); - -dput_and_out: - path_put(&nd.path); -# endif /* HAVE_USER_PATH_DIR */ out: set_fs(saved_fs); From 137af025f687dd19994666a6c7d38661c209f0c9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 12:47:09 -0400 Subject: [PATCH 0835/1062] Remove set_fs_pwd() configure check This function has never been exported by any mainline and was only briefly available under RHEL5. Therefore this check is being removed and the code update to always use the wrapper function. The next step will be to eliminate all this code. If ZFS were updated not to assume that it's pwd was / there would be no need for this. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 19 ------------------- module/spl/spl-vnode.c | 22 ++++++++++------------ 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 264989d5c..dfa22aa85 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -28,7 +28,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PDE_DATA SPL_AC_MUTEX_OWNER SPL_AC_MUTEX_OWNER_TASK_STRUCT - SPL_AC_SET_FS_PWD SPL_AC_SET_FS_PWD_WITH_CONST SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME @@ -972,24 +971,6 @@ AC_DEFUN([SPL_AC_PDE_DATA], [ ]) ]) -dnl # -dnl # Symbol available in RHEL kernels not in stock kernels. -dnl # -AC_DEFUN([SPL_AC_SET_FS_PWD], - [AC_MSG_CHECKING([whether set_fs_pwd() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - #include - ], [ - (void) set_fs_pwd; - ], [set_fs_pwd], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SET_FS_PWD, 1, [set_fs_pwd() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 3.9 API change dnl # set_fs_pwd takes const struct path * diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 5b0dd4235..63e5a39ef 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -766,34 +766,32 @@ vn_releasef(int fd) } /* releasef() */ EXPORT_SYMBOL(releasef); -#ifndef HAVE_SET_FS_PWD -void -# ifdef HAVE_SET_FS_PWD_WITH_CONST -set_fs_pwd(struct fs_struct *fs, const struct path *path) -# else -set_fs_pwd(struct fs_struct *fs, struct path *path) -# endif +static void +#ifdef HAVE_SET_FS_PWD_WITH_CONST +vn_set_fs_pwd(struct fs_struct *fs, const struct path *path) +#else +vn_set_fs_pwd(struct fs_struct *fs, struct path *path) +#endif /* HAVE_SET_FS_PWD_WITH_CONST */ { struct path old_pwd; -# ifdef HAVE_FS_STRUCT_SPINLOCK +#ifdef HAVE_FS_STRUCT_SPINLOCK spin_lock(&fs->lock); old_pwd = fs->pwd; fs->pwd = *path; path_get(path); spin_unlock(&fs->lock); -# else +#else write_lock(&fs->lock); old_pwd = fs->pwd; fs->pwd = *path; path_get(path); write_unlock(&fs->lock); -# endif /* HAVE_FS_STRUCT_SPINLOCK */ +#endif /* HAVE_FS_STRUCT_SPINLOCK */ if (old_pwd.dentry) path_put(&old_pwd); } -#endif /* HAVE_SET_FS_PWD */ int vn_set_pwd(const char *filename) @@ -819,7 +817,7 @@ vn_set_pwd(const char *filename) if (rc) SGOTO(dput_and_out, rc); - set_fs_pwd(current->fs, &path); + vn_set_fs_pwd(current->fs, &path); dput_and_out: path_put(&path); From e39174ed56acd418ef744d43876fc8cf6e9823ab Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 12:59:38 -0400 Subject: [PATCH 0836/1062] Add vfs_unlink() and vfs_rename() comments Just for consistency with the other autoconf checks a small comment block was added before these checks. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index dfa22aa85..1eda1772a 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1011,6 +1011,10 @@ AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], EXTRA_KCFLAGS="$tmp_flags" ]) +dnl # +dnl # 3.13 API change +dnl # vfs_unlink() updated to take a third delegated_inode argument. +dnl # AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK], [AC_MSG_CHECKING([whether vfs_unlink() wants 2 args]) SPL_LINUX_TRY_COMPILE([ @@ -1045,6 +1049,10 @@ AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK], ]) ]) +dnl # +dnl # 3.13 and 3.15 API changes +dnl # Added delegated inode and flags argument. +dnl # AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME], [AC_MSG_CHECKING([whether vfs_rename() wants 4 args]) SPL_LINUX_TRY_COMPILE([ From 68a829b29d50b2a0e83222e93cf4897527673a41 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 13:41:09 -0400 Subject: [PATCH 0837/1062] Remove credential configure checks. The groups_search() function was never exported by a mainline kernel therefore we drop this compatibility code and always provide our own implementation. Additionally, the cred_t structure has been available since 2.6.29 so there is no longer a need to maintain compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 46 --------------------- include/sys/cred.h | 57 +++++++++++--------------- module/spl/spl-cred.c | 94 ------------------------------------------- 3 files changed, 23 insertions(+), 174 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 1eda1772a..91318efc3 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -35,9 +35,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_VFS_FSYNC SPL_AC_INODE_TRUNCATE_RANGE SPL_AC_FS_STRUCT_SPINLOCK - SPL_AC_CRED_STRUCT SPL_AC_KUIDGID_T - SPL_AC_GROUPS_SEARCH SPL_AC_PUT_TASK_STRUCT SPL_AC_5ARGS_PROC_HANDLER SPL_AC_KVASPRINTF @@ -1135,26 +1133,6 @@ AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [ EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # 2.6.29 API change, -dnl # check whether 'struct cred' exists -dnl # -AC_DEFUN([SPL_AC_CRED_STRUCT], [ - AC_MSG_CHECKING([whether struct cred exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct cred *cr __attribute__ ((unused)); - cr = NULL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CRED_STRUCT, 1, [struct cred exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - - dnl # dnl # User namespaces, use kuid_t in place of uid_t dnl # where available. Not strictly a user namespaces thing @@ -1184,30 +1162,6 @@ AC_DEFUN([SPL_AC_KUIDGID_T], [ ]) ]) -dnl # -dnl # Custom SPL patch may export this symbol. -dnl # -AC_DEFUN([SPL_AC_GROUPS_SEARCH], - [AC_MSG_CHECKING([whether groups_search() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - #ifdef HAVE_KUIDGID_T - #include - #endif - ], [ - #ifdef HAVE_KUIDGID_T - groups_search(NULL, KGIDT_INIT(0)); - #else - groups_search(NULL, 0); - #endif - ], [groups_search], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GROUPS_SEARCH, 1, [groups_search() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.x API change, dnl # __put_task_struct() was exported in RHEL5 but unavailable elsewhere. diff --git a/include/sys/cred.h b/include/sys/cred.h index 3ba5c141b..4f62b00fd 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -29,49 +29,38 @@ #include #include -#ifdef HAVE_CRED_STRUCT - typedef struct cred cred_t; -#define kcred ((cred_t *)(init_task.cred)) -#define CRED() ((cred_t *)current_cred()) - -#else - -typedef struct task_struct cred_t; - -#define kcred ((cred_t *)&init_task) -#define CRED() ((cred_t *)current) - -#endif /* HAVE_CRED_STRUCT */ +#define kcred ((cred_t *)(init_task.cred)) +#define CRED() ((cred_t *)current_cred()) #ifdef HAVE_KUIDGID_T - /* - * Linux 3.8+ uses typedefs to redefine uid_t and gid_t. We have to rename the - * typedefs to recover the original types. We then can use them provided that - * we are careful about translating from k{g,u}id_t to the original versions - * and vice versa. - */ - #define uid_t xuid_t - #define gid_t xgid_t - #include - #undef uid_t - #undef gid_t +/* + * Linux 3.8+ uses typedefs to redefine uid_t and gid_t. We have to rename the + * typedefs to recover the original types. We then can use them provided that + * we are careful about translating from k{g,u}id_t to the original versions + * and vice versa. + */ +#define uid_t xuid_t +#define gid_t xgid_t +#include +#undef uid_t +#undef gid_t - #define KUID_TO_SUID(x) (__kuid_val(x)) - #define KGID_TO_SGID(x) (__kgid_val(x)) - #define SUID_TO_KUID(x) (KUIDT_INIT(x)) - #define SGID_TO_KGID(x) (KGIDT_INIT(x)) - #define KGIDP_TO_SGIDP(x) (&(x)->val) +#define KUID_TO_SUID(x) (__kuid_val(x)) +#define KGID_TO_SGID(x) (__kgid_val(x)) +#define SUID_TO_KUID(x) (KUIDT_INIT(x)) +#define SGID_TO_KGID(x) (KGIDT_INIT(x)) +#define KGIDP_TO_SGIDP(x) (&(x)->val) #else /* HAVE_KUIDGID_T */ - #define KUID_TO_SUID(x) (x) - #define KGID_TO_SGID(x) (x) - #define SUID_TO_KUID(x) (x) - #define SGID_TO_KGID(x) (x) - #define KGIDP_TO_SGIDP(x) (x) +#define KUID_TO_SUID(x) (x) +#define KGID_TO_SGID(x) (x) +#define SUID_TO_KUID(x) (x) +#define SGID_TO_KGID(x) (x) +#define KGIDP_TO_SGIDP(x) (x) #endif /* HAVE_KUIDGID_T */ diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index 602bd74e8..a03f459e0 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -32,11 +32,6 @@ #define DEBUG_SUBSYSTEM S_CRED -#ifdef HAVE_GROUPS_SEARCH -/* Symbol may be exported by custom kernel patch */ -#define cr_groups_search(gi, grp) groups_search(gi, grp) -#else -/* Implementation from 2.6.30 kernel */ static int #ifdef HAVE_KUIDGID_T cr_groups_search(const struct group_info *group_info, kgid_t grp) @@ -66,14 +61,6 @@ cr_groups_search(const struct group_info *group_info, gid_t grp) } return 0; } -#endif - -#ifdef HAVE_CRED_STRUCT - -/* - * As of 2.6.29 a clean credential API appears in the linux kernel. - * We attempt to layer the Solaris API on top of the linux API. - */ /* Hold a reference on the credential and group info */ void @@ -137,87 +124,6 @@ groupmember(gid_t gid, const cred_t *cr) return rc; } -#else /* HAVE_CRED_STRUCT */ - -/* - * Until very recently all credential information was embedded in - * the linux task struct. For this reason to simulate a Solaris - * cred_t we need to pass the entire task structure around. - */ - -/* Hold a reference on the credential and group info */ -void crhold(cred_t *cr) { } - -/* Free a reference on the credential and group info */ -void crfree(cred_t *cr) { } - -/* Return the number of supplemental groups */ -int -crgetngroups(const cred_t *cr) -{ - int lock, rc; - - lock = (cr != current); - if (lock) - task_lock((struct task_struct *)cr); - - get_group_info(cr->group_info); - rc = cr->group_info->ngroups; - put_group_info(cr->group_info); - - if (lock) - task_unlock((struct task_struct *)cr); - - return rc; -} - -/* - * Return an array of supplemental gids. The returned address is safe - * to use as long as the caller has taken a reference with crhold(). - * The caller is responsible for releasing the reference with crfree(). - */ -gid_t * -crgetgroups(const cred_t *cr) -{ - gid_t *gids; - int lock; - - lock = (cr != current); - if (lock) - task_lock((struct task_struct *)cr); - - get_group_info(cr->group_info); - gids = KGID_TO_SGID(cr->group_info->blocks[0]); - put_group_info(cr->group_info); - - if (lock) - task_unlock((struct task_struct *)cr); - - return gids; -} - -/* Check if the passed gid is available is in supplied credential. */ -int -groupmember(gid_t gid, const cred_t *cr) -{ - int lock, rc; - - lock = (cr != current); - if (lock) - task_lock((struct task_struct *)cr); - - get_group_info(cr->group_info); - rc = cr_groups_search(cr->group_info, gid); - put_group_info(cr->group_info); - - if (lock) - task_unlock((struct task_struct *)cr); - - return rc; -} - -#endif /* HAVE_CRED_STRUCT */ - /* Return the effective user id */ uid_t crgetuid(const cred_t *cr) From e03119e86f695851f68b9a52de64075a89fb41bd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 13:59:26 -0400 Subject: [PATCH 0838/1062] Update put_task_struct() comments Update the comments to correctly reflect when this interface was added. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 91318efc3..49cbfb624 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1163,8 +1163,8 @@ AC_DEFUN([SPL_AC_KUIDGID_T], [ ]) dnl # -dnl # 2.6.x API change, -dnl # __put_task_struct() was exported in RHEL5 but unavailable elsewhere. +dnl # 2.6.39 API change, +dnl # __put_task_struct() was exported by the mainline kernel. dnl # AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], [AC_MSG_CHECKING([whether __put_task_struct() is available]) From 0fac9c9e6d8d74f56be09cd84ffb30197d2dcaad Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 14:15:19 -0400 Subject: [PATCH 0839/1062] Remove proc_handler() wrapper As of Linux 2.6.32 the proc handlers where updated to expect only five arguments. Therefore there is no longer a need to maintain this compatibility code and this infrastructure can be simplified. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 20 -------- include/linux/Makefile.am | 1 - include/linux/sysctl_compat.h | 96 ----------------------------------- include/sys/types.h | 1 - module/spl/spl-proc.c | 60 ++++++++++++++-------- 5 files changed, 39 insertions(+), 139 deletions(-) delete mode 100644 include/linux/sysctl_compat.h diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 49cbfb624..253a51390 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -37,7 +37,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_KUIDGID_T SPL_AC_PUT_TASK_STRUCT - SPL_AC_5ARGS_PROC_HANDLER SPL_AC_KVASPRINTF SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_FALLOCATE @@ -1181,25 +1180,6 @@ AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], ]) ]) -dnl # -dnl # 2.6.32 API change, -dnl # Unused 'struct file *' removed from prototype. -dnl # -AC_DEFUN([SPL_AC_5ARGS_PROC_HANDLER], [ - AC_MSG_CHECKING([whether proc_handler() wants 5 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - proc_dostring(NULL, 0, NULL, NULL, NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_5ARGS_PROC_HANDLER, 1, - [proc_handler() wants 5 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.x API change, dnl # kvasprintf() function added. diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index bbd422770..422159497 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -11,7 +11,6 @@ KERNEL_H = \ $(top_srcdir)/include/linux/module_compat.h \ $(top_srcdir)/include/linux/proc_compat.h \ $(top_srcdir)/include/linux/rwsem_compat.h \ - $(top_srcdir)/include/linux/sysctl_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \ $(top_srcdir)/include/linux/zlib_compat.h diff --git a/include/linux/sysctl_compat.h b/include/linux/sysctl_compat.h deleted file mode 100644 index bc226537d..000000000 --- a/include/linux/sysctl_compat.h +++ /dev/null @@ -1,96 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_SYSCTL_COMPAT_H -#define _SPL_SYSCTL_COMPAT_H - -#include - -/* proc_handler() / proc_do* API changes - * 2.6.x - 2.6.31: 6 args, prototype includes 'struct file *' - * 2.6.32 - 2.6.y: 5 args, removed unused 'struct file *' from prototype - * - * Generic SPL_PROC_HANDLER() macro should be used for correct prototypes. - * It will define the following function arguments which can and should be - * used with the spl_proc_* helper macros. - * - * struct ctl_table *table, - * int write, - * struct file *filp [2.6.31 and earlier kernels], - * void __user *buffer, - * size_t *lenp, - * loff_t *ppos, - */ -#ifdef HAVE_5ARGS_PROC_HANDLER - -#define SPL_PROC_HANDLER(proc_handler) \ -static int \ -proc_handler(struct ctl_table *table, int write, \ - void __user *buffer, size_t *lenp, loff_t *ppos) - -#define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \ - proc_dostring(table, write, buffer, lenp, ppos) -#define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec(table, write, buffer, lenp, ppos) -#define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec_minmax(table, write, buffer, lenp, ppos) -#define spl_proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec_jiffies(table, write, buffer, lenp, ppos) -#define spl_proc_dointvec_userhz_jiffies(table,write,filp,buffer,lenp,ppos) \ - proc_dointvec_userhz_jiffies(table, write, buffer, lenp, ppos) -#define spl_proc_dointvec_ms_jiffies(table,write,filp,buffer,lenp,ppos) \ - proc_dointvec_ms_jiffies(table, write, buffer, lenp, ppos) -#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \ - proc_doulongvec_minmax(table, write, buffer, lenp, ppos) -#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos)\ - proc_doulongvec_ms_jiffies_minmax(table, write, buffer, lenp, ppos) - -#else /* HAVE_5ARGS_PROC_HANDLER */ - -#define SPL_PROC_HANDLER(proc_handler) \ -static int \ -proc_handler(struct ctl_table *table, int write, struct file *filp, \ - void __user *buffer, size_t *lenp, loff_t *ppos) - -#define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \ - proc_dostring(table, write, filp, buffer, lenp, ppos) -#define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec(table, write, filp, buffer, lenp, ppos) -#define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) -#define spl_proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) -#define spl_proc_dointvec_userhz_jiffies(table,write,filp,buffer,lenp,ppos) \ - proc_dointvec_userhz_jiffies(table, write, filp, buffer, lenp, ppos) -#define spl_proc_dointvec_ms_jiffies(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec_ms_jiffies(table, write, filp, buffer, lenp, ppos) -#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \ - proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) -#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos) \ - proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos) - - -#endif /* HAVE_5ARGS_PROC_HANDLER */ - -#endif /* _SPL_SYSCTL_COMPAT_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 2745db9c7..b7b8b7bfc 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 42733e0d7..6ecc0c31c 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -111,7 +111,9 @@ proc_copyout_string(char *ubuffer, int ubuffer_size, } #ifdef DEBUG_LOG -SPL_PROC_HANDLER(proc_dobitmasks) +static int +proc_dobitmasks(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { unsigned long *mask = table->data; int is_subsys = (mask == &spl_debug_subsys) ? 1 : 0; @@ -152,7 +154,9 @@ SPL_PROC_HANDLER(proc_dobitmasks) SRETURN(rc); } -SPL_PROC_HANDLER(proc_debug_mb) +static int +proc_debug_mb(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { char str[32]; int rc, len; @@ -181,7 +185,9 @@ SPL_PROC_HANDLER(proc_debug_mb) SRETURN(rc); } -SPL_PROC_HANDLER(proc_dump_kernel) +static int +proc_dump_kernel(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { SENTRY; @@ -195,7 +201,9 @@ SPL_PROC_HANDLER(proc_dump_kernel) SRETURN(0); } -SPL_PROC_HANDLER(proc_force_bug) +static int +proc_force_bug(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { SENTRY; @@ -207,7 +215,9 @@ SPL_PROC_HANDLER(proc_force_bug) SRETURN(0); } -SPL_PROC_HANDLER(proc_console_max_delay_cs) +static int +proc_console_max_delay_cs(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { int rc, max_delay_cs; spl_ctl_table dummy = *table; @@ -219,7 +229,7 @@ SPL_PROC_HANDLER(proc_console_max_delay_cs) if (write) { max_delay_cs = 0; - rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); + rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); if (rc < 0) SRETURN(rc); @@ -233,13 +243,15 @@ SPL_PROC_HANDLER(proc_console_max_delay_cs) spl_console_max_delay = d; } else { max_delay_cs = (spl_console_max_delay * 100) / HZ; - rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); + rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); } SRETURN(rc); } -SPL_PROC_HANDLER(proc_console_min_delay_cs) +static int +proc_console_min_delay_cs(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { int rc, min_delay_cs; spl_ctl_table dummy = *table; @@ -251,7 +263,7 @@ SPL_PROC_HANDLER(proc_console_min_delay_cs) if (write) { min_delay_cs = 0; - rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); + rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); if (rc < 0) SRETURN(rc); @@ -265,13 +277,15 @@ SPL_PROC_HANDLER(proc_console_min_delay_cs) spl_console_min_delay = d; } else { min_delay_cs = (spl_console_min_delay * 100) / HZ; - rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); + rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); } SRETURN(rc); } -SPL_PROC_HANDLER(proc_console_backoff) +static int +proc_console_backoff(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { int rc, backoff; spl_ctl_table dummy = *table; @@ -282,7 +296,7 @@ SPL_PROC_HANDLER(proc_console_backoff) if (write) { backoff = 0; - rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); + rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); if (rc < 0) SRETURN(rc); @@ -292,7 +306,7 @@ SPL_PROC_HANDLER(proc_console_backoff) spl_console_backoff = backoff; } else { backoff = spl_console_backoff; - rc = spl_proc_dointvec(&dummy,write,filp,buffer,lenp,ppos); + rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); } SRETURN(rc); @@ -300,7 +314,9 @@ SPL_PROC_HANDLER(proc_console_backoff) #endif /* DEBUG_LOG */ #ifdef DEBUG_KMEM -SPL_PROC_HANDLER(proc_domemused) +static int +proc_domemused(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { int rc = 0; unsigned long min = 0, max = ~0, val; @@ -320,14 +336,15 @@ SPL_PROC_HANDLER(proc_domemused) # else val = atomic_read((atomic_t *)table->data); # endif /* HAVE_ATOMIC64_T */ - rc = spl_proc_doulongvec_minmax(&dummy, write, filp, - buffer, lenp, ppos); + rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); } SRETURN(rc); } -SPL_PROC_HANDLER(proc_doslab) +static int +proc_doslab(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { int rc = 0; unsigned long min = 0, max = ~0, val = 0, mask; @@ -367,22 +384,23 @@ SPL_PROC_HANDLER(proc_doslab) } up_read(&spl_kmem_cache_sem); - rc = spl_proc_doulongvec_minmax(&dummy, write, filp, - buffer, lenp, ppos); + rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); } SRETURN(rc); } #endif /* DEBUG_KMEM */ -SPL_PROC_HANDLER(proc_dohostid) +static int +proc_dohostid(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { int len, rc = 0; char *end, str[32]; SENTRY; if (write) { - /* We can't use spl_proc_doulongvec_minmax() in the write + /* We can't use proc_doulongvec_minmax() in the write * case here because hostid while a hex value has no * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); From 3d5392cefabc1a9b7dd9c853439d3262c5374829 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 14:42:26 -0400 Subject: [PATCH 0840/1062] Remove kvasprintf() wrapper The kvasprintf() function has been available since Linux 2.6.22. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 19 ------------------- module/spl/spl-kmem.c | 23 ----------------------- 2 files changed, 42 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 253a51390..b30a6f581 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -37,7 +37,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_KUIDGID_T SPL_AC_PUT_TASK_STRUCT - SPL_AC_KVASPRINTF SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_FALLOCATE SPL_AC_KERN_PATH @@ -1180,24 +1179,6 @@ AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], ]) ]) -dnl # -dnl # 2.6.x API change, -dnl # kvasprintf() function added. -dnl # -AC_DEFUN([SPL_AC_KVASPRINTF], - [AC_MSG_CHECKING([whether kvasprintf() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - kvasprintf(0, NULL, *((va_list*)NULL)); - ], [kvasprintf], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KVASPRINTF, 1, [kvasprintf() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.29 API change, dnl # vfs_fsync() funcation added, prior to this use file_fsync(). diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index caeb324b3..425dfd421 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -128,29 +128,6 @@ kmem_debugging(void) } EXPORT_SYMBOL(kmem_debugging); -#ifndef HAVE_KVASPRINTF -/* Simplified asprintf. */ -char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap) -{ - unsigned int len; - char *p; - va_list aq; - - va_copy(aq, ap); - len = vsnprintf(NULL, 0, fmt, aq); - va_end(aq); - - p = kmalloc(len+1, gfp); - if (!p) - return NULL; - - vsnprintf(p, len+1, fmt, ap); - - return p; -} -EXPORT_SYMBOL(kvasprintf); -#endif /* HAVE_KVASPRINTF */ - char * kmem_vasprintf(const char *fmt, va_list ap) { From 599662c538d06054608b16a1d6a3ce10f4fdd08c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 14:48:23 -0400 Subject: [PATCH 0841/1062] Remove kern_path() wrapper The kern_path() function has been available since Linux 2.6.28. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 39 --------------------------------------- module/spl/spl-vnode.c | 16 ---------------- 2 files changed, 55 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b30a6f581..6c34b9999 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -39,7 +39,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PUT_TASK_STRUCT SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_FALLOCATE - SPL_AC_KERN_PATH SPL_AC_CONFIG_ZLIB_INFLATE SPL_AC_CONFIG_ZLIB_DEFLATE SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE @@ -1326,44 +1325,6 @@ AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], ]) ]) -dnl # -dnl # 2.6.28 API change -dnl # The kern_path() function has been introduced. We adopt it as the new way -dnl # of looking up paths. When it is not available, we emulate it using the -dnl # older interfaces. -dnl # -AC_DEFUN([SPL_AC_KERN_PATH], - [AC_MSG_CHECKING([whether kern_path() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - int r = kern_path(NULL, 0, NULL); - ], [kern_path], [fs/namei.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERN_PATH, 1, - [kern_path() is available]) - ], [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING([whether path_lookup() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - int r = path_lookup(NULL, 0, NULL); - ], [path_lookup], [fs/namei.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERN_PATH, 1, - [kern_path() is available]) - ], [ - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - *** Neither kern_path() nor path_lookup() is available. - *** Please file an issue: - *** https://github.com/zfsonlinux/spl/issues/new]) - - ]) - ]) -]) - dnl # dnl # zlib inflate compat, dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled. diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 63e5a39ef..b9f9d7b1f 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -296,22 +296,6 @@ vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct) } EXPORT_SYMBOL(vn_seek); -/* - * kern_path() was introduced in Linux 2.6.28. We duplicate it as a - * compatibility shim for earlier kernels. - */ -#ifndef HAVE_KERN_PATH -int -kern_path(const char *name, unsigned int flags, struct path *path) -{ - struct nameidata nd; - int rc = path_lookup(name, flags, &nd); - if (!rc) - *path = nd.path; - return rc; -} -#endif /* HAVE_KERN_PATH */ - /* * spl_basename() takes a NULL-terminated string s as input containing a path. * It returns a char pointer to a string and a length that describe the From dcf91382b9cfad776f4de9458e53319e5a106331 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 2 Oct 2014 14:52:47 -0400 Subject: [PATCH 0842/1062] Remove vfs_fsync() wrapper The vfs_fsync() function has been available since Linux 2.6.29. There is no longer a need to maintain this compatibility code. However, the HAVE_2ARGS_VFS_FSYNC check was left in place since that change occured after 2.6.32. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 19 ------------------- include/linux/file_compat.h | 17 ++++++----------- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 6c34b9999..5a33f5e8e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -31,7 +31,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SET_FS_PWD_WITH_CONST SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME - SPL_AC_VFS_FSYNC SPL_AC_2ARGS_VFS_FSYNC SPL_AC_INODE_TRUNCATE_RANGE SPL_AC_FS_STRUCT_SPINLOCK @@ -1178,24 +1177,6 @@ AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], ]) ]) -dnl # -dnl # 2.6.29 API change, -dnl # vfs_fsync() funcation added, prior to this use file_fsync(). -dnl # -AC_DEFUN([SPL_AC_VFS_FSYNC], - [AC_MSG_CHECKING([whether vfs_fsync() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - (void) vfs_fsync; - ], [vfs_fsync], [fs/sync.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VFS_FSYNC, 1, [vfs_fsync() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.35 API change, dnl # Unused 'struct dentry *' removed from vfs_fsync() prototype. diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 09d0e8250..a2db2590a 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -59,27 +59,22 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) if (fp->f_op->fallocate) error = fp->f_op->fallocate(fp, mode, offset, len); #else -# ifdef HAVE_INODE_FALLOCATE +#ifdef HAVE_INODE_FALLOCATE if (fp->f_dentry && fp->f_dentry->d_inode && fp->f_dentry->d_inode->i_op->fallocate) error = fp->f_dentry->d_inode->i_op->fallocate( fp->f_dentry->d_inode, mode, offset, len); -# endif /* HAVE_INODE_FALLOCATE */ +#endif /* HAVE_INODE_FALLOCATE */ #endif /*HAVE_FILE_FALLOCATE */ return (error); } -#ifdef HAVE_VFS_FSYNC -# ifdef HAVE_2ARGS_VFS_FSYNC -# define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync) -# else -# define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync) -# endif /* HAVE_2ARGS_VFS_FSYNC */ +#ifdef HAVE_2ARGS_VFS_FSYNC +#define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync) #else -# include -# define spl_filp_fsync(fp, sync) file_fsync(fp, (fp)->f_dentry, sync) -#endif /* HAVE_VFS_FSYNC */ +#define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync) +#endif /* HAVE_2ARGS_VFS_FSYNC */ #define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex) #define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex) From 802a4a2ad53f6844ce2dbbf219a5e373ebd24688 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Thu, 2 Oct 2014 07:40:05 -0500 Subject: [PATCH 0843/1062] Linux 3.12 compat: shrinker semantics The new shrinker API as of Linux 3.12 modifies "struct shrinker" by replacing the @shrink callback with the pair of @count_objects and @scan_objects. It also requires the return value of @count_objects to return the number of objects actually freed whereas the previous @shrink callback returned the number of remaining freeable objects. This patch adds support for the new @scan_objects return value semantics and updates the splat shrinker test case appropriately. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #403 --- include/linux/mm_compat.h | 7 +++++ module/spl/spl-kmem.c | 53 ++++++++++++++++++++++++-------------- module/splat/splat-linux.c | 22 +++++++++++----- 3 files changed, 57 insertions(+), 25 deletions(-) diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 456fc51fc..7ae940a75 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -199,4 +199,11 @@ fn ## _scan_objects(struct shrinker *shrink, struct shrink_control *sc) \ #error "Unknown shrinker callback" #endif +#if defined(HAVE_SPLIT_SHRINKER_CALLBACK) +typedef unsigned long spl_shrinker_t; +#else +typedef int spl_shrinker_t; +#define SHRINK_STOP (-1) +#endif + #endif /* SPL_MM_COMPAT_H */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 425dfd421..6054f11d8 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -64,7 +64,7 @@ MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); * setting this value to KMC_RECLAIM_ONCE limits how aggressively the cache * is reclaimed. This may increase the likelihood of out of memory events. */ -unsigned int spl_kmem_cache_reclaim = 0; +unsigned int spl_kmem_cache_reclaim = 0 /* KMC_RECLAIM_ONCE */; module_param(spl_kmem_cache_reclaim, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_reclaim, "Single reclaim pass (0x1)"); @@ -2048,14 +2048,24 @@ EXPORT_SYMBOL(spl_kmem_cache_free); * report that they contain unused objects. Because of this we only * register one shrinker function in the shim layer for all slab caches. * We always attempt to shrink all caches when this generic shrinker - * is called. The shrinker should return the number of free objects - * in the cache when called with nr_to_scan == 0 but not attempt to - * free any objects. When nr_to_scan > 0 it is a request that nr_to_scan - * objects should be freed, which differs from Solaris semantics. - * Solaris semantics are to free all available objects which may (and - * probably will) be more objects than the requested nr_to_scan. + * is called. + * + * If sc->nr_to_scan is zero, the caller is requesting a query of the + * number of objects which can potentially be freed. If it is nonzero, + * the request is to free that many objects. + * + * Linux kernels >= 3.12 have the count_objects and scan_objects callbacks + * in struct shrinker and also require the shrinker to return the number + * of objects freed. + * + * Older kernels require the shrinker to return the number of freeable + * objects following the freeing of nr_to_free. + * + * Linux semantics differ from those under Solaris, which are to + * free all available objects which may (and probably will) be more + * objects than the requested nr_to_scan. */ -static int +static spl_shrinker_t __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, struct shrink_control *sc) { @@ -2064,17 +2074,22 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, down_read(&spl_kmem_cache_sem); list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { - if (sc->nr_to_scan) + if (sc->nr_to_scan) { +#ifdef HAVE_SPLIT_SHRINKER_CALLBACK + uint64_t oldalloc = skc->skc_obj_alloc; spl_kmem_cache_reap_now(skc, MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); - - /* - * Presume everything alloc'ed is reclaimable, this ensures - * we are called again with nr_to_scan > 0 so can try and - * reclaim. The exact number is not important either so - * we forgo taking this already highly contented lock. - */ - alloc += skc->skc_obj_alloc; + if (oldalloc > skc->skc_obj_alloc) + alloc += oldalloc - skc->skc_obj_alloc; +#else + spl_kmem_cache_reap_now(skc, + MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); + alloc += skc->skc_obj_alloc; +#endif /* HAVE_SPLIT_SHRINKER_CALLBACK */ + } else { + /* Request to query number of freeable objects */ + alloc += skc->skc_obj_alloc; + } } up_read(&spl_kmem_cache_sem); @@ -2085,7 +2100,7 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, * system to thrash. */ if ((spl_kmem_cache_reclaim & KMC_RECLAIM_ONCE) && sc->nr_to_scan) - return (-1); + return (SHRINK_STOP); return (MAX(alloc, 0)); } @@ -2196,7 +2211,7 @@ spl_kmem_reap(void) sc.nr_to_scan = KMC_REAP_CHUNK; sc.gfp_mask = GFP_KERNEL; - __spl_kmem_cache_generic_shrinker(NULL, &sc); + (void) __spl_kmem_cache_generic_shrinker(NULL, &sc); } EXPORT_SYMBOL(spl_kmem_reap); diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index c1dc7ce41..880b30152 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -44,11 +44,13 @@ SPL_SHRINKER_DECLARE(splat_linux_shrinker, splat_linux_shrinker_fn, 1); static unsigned long splat_linux_shrinker_size = 0; static struct file *splat_linux_shrinker_file = NULL; -static int +static spl_shrinker_t __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) { static int failsafe = 0; static unsigned long last_splat_linux_shrinker_size = 0; + unsigned long size; + spl_shrinker_t count; /* * shrinker_size can only decrease or stay the same between callbacks @@ -61,13 +63,21 @@ __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) last_splat_linux_shrinker_size = splat_linux_shrinker_size; if (sc->nr_to_scan) { - splat_linux_shrinker_size = splat_linux_shrinker_size - - MIN(sc->nr_to_scan, splat_linux_shrinker_size); + size = MIN(sc->nr_to_scan, splat_linux_shrinker_size); + splat_linux_shrinker_size -= size; splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, "Reclaimed %lu objects, size now %lu\n", - sc->nr_to_scan, splat_linux_shrinker_size); + size, splat_linux_shrinker_size); + +#ifdef HAVE_SPLIT_SHRINKER_CALLBACK + count = size; +#else + count = splat_linux_shrinker_size; +#endif /* HAVE_SPLIT_SHRINKER_CALLBACK */ + } else { + count = splat_linux_shrinker_size; splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, "Cache size is %lu\n", splat_linux_shrinker_size); } @@ -77,7 +87,7 @@ __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, "Far more calls than expected (%d), size now %lu\n", failsafe, splat_linux_shrinker_size); - return -1; + return (SHRINK_STOP); } else { /* * We only increment failsafe if it doesn't trigger. This @@ -89,7 +99,7 @@ __splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) /* Shrinker has run, so signal back to test. */ wake_up(&shrinker_wait); - return (int)splat_linux_shrinker_size; + return (count); } SPL_SHRINKER_CALLBACK_WRAPPER(splat_linux_shrinker_fn); From ad9863e80be35825229d0638c5e69c0ea30f82de Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 17 Jun 2014 19:37:02 -0400 Subject: [PATCH 0844/1062] kmem_cache: Call constructor/destructor on each alloc/free This has a few benefits. First, it fixes a regression that "Rework generic memory allocation interfaces" appears to have triggered in splat's slab_reap and slab_age tests. Second, it makes porting code from Illumos to ZFSOnLinux easier. Third, it has the side effect of making reclaim from slab caches that specify reclaim functions an order of magnitude faster. The splat slab_reap test usually took 30 to 40 seconds. With this change, it takes 3 to 4. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Issue #369 --- module/spl/spl-kmem.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 6054f11d8..65aa27739 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -866,9 +866,6 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) list_add_tail(&sko->sko_list, &sks->sks_free_list); } - list_for_each_entry(sko, &sks->sks_free_list, sko_list) - if (skc->skc_ctor) - skc->skc_ctor(sko->sko_addr, skc->skc_private, flags); out: if (rc) { if (skc->skc_flags & KMC_OFFSLAB) @@ -974,9 +971,6 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) list_for_each_entry_safe(sko, n, &sko_list, sko_list) { ASSERT(sko->sko_magic == SKO_MAGIC); - if (skc->skc_dtor) - skc->skc_dtor(sko->sko_addr, skc->skc_private); - if (skc->skc_flags & KMC_OFFSLAB) kv_free(skc, sko->sko_addr, size); } @@ -1078,9 +1072,6 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) SRETURN(-EINVAL); } - if (skc->skc_ctor) - skc->skc_ctor(ske->ske_obj, skc->skc_private, flags); - *obj = ske->ske_obj; SRETURN(0); @@ -1107,9 +1098,6 @@ spl_emergency_free(spl_kmem_cache_t *skc, void *obj) if (unlikely(ske == NULL)) SRETURN(-ENOENT); - if (skc->skc_dtor) - skc->skc_dtor(ske->ske_obj, skc->skc_private); - kfree(ske->ske_obj); kfree(ske); @@ -1938,13 +1926,9 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) do { obj = kmem_cache_alloc(slc, flags | __GFP_COMP); - if (obj && skc->skc_ctor) - skc->skc_ctor(obj, skc->skc_private, flags); - } while ((obj == NULL) && !(flags & KM_NOSLEEP)); - atomic_dec(&skc->skc_ref); - SRETURN(obj); + goto ret; } local_irq_disable(); @@ -1973,12 +1957,20 @@ restart: ASSERT(obj); ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); +ret: /* Pre-emptively migrate object to CPU L1 cache */ - prefetchw(obj); + if (obj) { + if (obj && skc->skc_ctor) + skc->skc_ctor(obj, skc->skc_private, flags); + else + prefetchw(obj); + } + atomic_dec(&skc->skc_ref); SRETURN(obj); } + EXPORT_SYMBOL(spl_kmem_cache_alloc); /* @@ -1998,13 +1990,16 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); atomic_inc(&skc->skc_ref); + /* + * Run the destructor + */ + if (skc->skc_dtor) + skc->skc_dtor(obj, skc->skc_private); + /* * Free the object from the Linux underlying Linux slab. */ if (skc->skc_flags & KMC_SLAB) { - if (skc->skc_dtor) - skc->skc_dtor(obj, skc->skc_private); - kmem_cache_free(skc->skc_linux_cache, obj); goto out; } From fd05dde75d1abbb3dd906f9efa298b12ffc9d7d7 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Fri, 29 Aug 2014 11:12:47 -0400 Subject: [PATCH 0845/1062] Kernel header installation should respect --prefix This is the upstream component of work that enables preliminary support for building Gentoo's ZFS packaging on other Linux systems via Gentoo Prefix. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #384 --- Makefile.am | 4 ++-- include/Makefile.am | 2 +- include/fs/Makefile.am | 2 +- include/linux/Makefile.am | 2 +- include/rpc/Makefile.am | 2 +- include/sharefs/Makefile.am | 2 +- include/sys/Makefile.am | 2 +- include/sys/fm/Makefile.am | 2 +- include/sys/fs/Makefile.am | 2 +- include/sys/sysevent/Makefile.am | 2 +- include/util/Makefile.am | 2 +- include/vm/Makefile.am | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile.am b/Makefile.am index 23dc2572a..89af931ae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,10 +12,10 @@ endif if CONFIG_KERNEL SUBDIRS += module -extradir = /usr/src/spl-$(VERSION) +extradir = @prefix@/src/spl-$(VERSION) extra_HEADERS = spl.release.in spl_config.h.in -kerneldir = /usr/src/spl-$(VERSION)/$(LINUX_VERSION) +kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION) nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS) endif diff --git a/include/Makefile.am b/include/Makefile.am index a7508fb34..f9b812de3 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -15,6 +15,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include +kerneldir = @prefix@/src/spl-$(VERSION)/include kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am index 530172ddc..e0da4b32a 100644 --- a/include/fs/Makefile.am +++ b/include/fs/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/fs +kerneldir = @prefix@/src/spl-$(VERSION)/include/fs kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 422159497..1cca44a2b 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -19,6 +19,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/linux +kerneldir = @prefix@/src/spl-$(VERSION)/include/linux kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am index 2f8aa29dd..cfc824685 100644 --- a/include/rpc/Makefile.am +++ b/include/rpc/Makefile.am @@ -9,6 +9,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/rpc +kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am index d6175a502..10e709325 100644 --- a/include/sharefs/Makefile.am +++ b/include/sharefs/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/sharefs +kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 985c51319..2d21c5728 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -104,7 +104,7 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/sys +kerneldir = @prefix@/src/spl-$(VERSION)/include/sys kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am index 1c9cf8416..2821cbe33 100644 --- a/include/sys/fm/Makefile.am +++ b/include/sys/fm/Makefile.am @@ -9,6 +9,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/sys/fm +kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am index 27ae10988..581083e9c 100644 --- a/include/sys/fs/Makefile.am +++ b/include/sys/fs/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/sys/fs +kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am index bf395eb2d..63d9af310 100644 --- a/include/sys/sysevent/Makefile.am +++ b/include/sys/sysevent/Makefile.am @@ -8,6 +8,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/sys/sysevent +kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/sysevent kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/util/Makefile.am b/include/util/Makefile.am index 5ac96e8cc..b721b5099 100644 --- a/include/util/Makefile.am +++ b/include/util/Makefile.am @@ -9,6 +9,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/util +kerneldir = @prefix@/src/spl-$(VERSION)/include/util kernel_HEADERS = $(KERNEL_H) endif diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am index 413a6e325..7faab0aab 100644 --- a/include/vm/Makefile.am +++ b/include/vm/Makefile.am @@ -10,6 +10,6 @@ USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) if CONFIG_KERNEL -kerneldir = /usr/src/spl-$(VERSION)/include/vm +kerneldir = @prefix@/src/spl-$(VERSION)/include/vm kernel_HEADERS = $(KERNEL_H) endif From 3f4a13c49709ab4bc6abb6b3159be77ce168a5e0 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Tue, 28 Oct 2014 09:48:50 -0700 Subject: [PATCH 0846/1062] Fix modules installation directory When building zfs modules with kernel, compiled from deb.src, the packaging process ends up installing the modules in the wrong place. Signed-off-by: Alexander Pyhalov Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#2822 --- module/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/Makefile.in b/module/Makefile.in index 49bdaa808..41c10101e 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -22,7 +22,8 @@ modules_install: @# Install the kernel modules $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \ INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \ - INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) + INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \ + KERNELRELEASE=@LINUX_VERSION@ @# Remove extraneous build products when packaging kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ if [ -n $$kmoddir ]; then \ From 7f118e836e3533d85aa0f859eb463cf9e54dc3fc Mon Sep 17 00:00:00 2001 From: Marcel Wysocki Date: Fri, 31 Oct 2014 16:26:29 -0700 Subject: [PATCH 0847/1062] Add config/compile to config/.gitignore This file may be added by automake and therefore should be added to config/.gitignore. For the full list of possible auxiliary programs see the full automake documentation. http://www.gnu.org/software/automake/manual/automake.html#Auxiliary-Programs Signed-off-by: Marcel Wysocki Signed-off-by: Brian Behlendorf --- config/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/config/.gitignore b/config/.gitignore index 12e6ecab1..cd811a0a9 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -1,3 +1,4 @@ +/compile /config.guess /config.sub /depcomp From 917fef273295616c563bbb0a5f6986cfce543d2f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 3 Nov 2014 13:50:39 -0800 Subject: [PATCH 0848/1062] Lower minimum objects/slab threshold As long as we can fit a minimum of one object/slab there's no reason to prevent the creation of the cache. This effectively pushes the maximum object size up to 32MB. The splat cache tests were extended accordingly to verify this functionality. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 2 +- module/splat/splat-kmem.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index adbaea931..5875dfff6 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -395,7 +395,7 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ #define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ #define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 8 /* Minimum objects per slab */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 1 /* Minimum objects per slab */ #define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ #define POINTER_IS_VALID(p) 0 /* Unimplemented */ diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 76643db18..db787ae92 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -799,6 +799,10 @@ splat_kmem_test6(struct file *file, void *arg) if (rc) return rc; + rc = splat_kmem_cache_test(file, arg, name, 16*1024*1024, 0, KMC_VMEM); + if (rc) + return rc; + /* Off slab (default + kmem + vmem) */ rc = splat_kmem_cache_test(file, arg, name, 256*1024, 0, KMC_OFFSLAB); if (rc) @@ -811,6 +815,11 @@ splat_kmem_test6(struct file *file, void *arg) rc = splat_kmem_cache_test(file, arg, name, 1024*1024, 0, KMC_VMEM | KMC_OFFSLAB); + if (rc) + return rc; + + rc = splat_kmem_cache_test(file, arg, name, 16*1024*1024, 0, + KMC_VMEM | KMC_OFFSLAB); return rc; } From 8d9a23e82cea5d897e9357d569ef364106703d5a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 5 Nov 2014 17:30:35 -0500 Subject: [PATCH 0849/1062] Retire legacy debugging infrastructure When the SPL was originally written Linux tracepoints were still in their infancy. Therefore, an entire debugging subsystem was added to facilite tracing which served us well for many years. Now that Linux tracepoints have matured they provide all the functionality of the previous tracing subsystem. Rather than maintain parallel functionality it makes sense to fully adopt tracepoints. Therefore, this patch retires the legacy debugging infrastructure. See zfsonlinux/zfs@bc9f413 for the tracepoint changes. Signed-off-by: Ned Bass Signed-off-by: Brian Behlendorf Closes #408 --- cmd/Makefile.am | 3 - cmd/spl.c | 243 ------- config/spl-build.m4 | 36 +- include/Makefile.am | 2 - include/spl-debug.h | 276 ------- include/spl-trace.h | 132 ---- include/sys/debug.h | 154 ++-- include/sys/kmem.h | 22 +- module/spl/Makefile.in | 1 - module/spl/spl-condvar.c | 30 +- module/spl/spl-debug.c | 1265 --------------------------------- module/spl/spl-err.c | 98 +-- module/spl/spl-generic.c | 36 +- module/spl/spl-kmem.c | 302 +++----- module/spl/spl-kobj.c | 24 +- module/spl/spl-kstat.c | 26 +- module/spl/spl-proc.c | 373 +--------- module/spl/spl-taskq.c | 106 +-- module/spl/spl-thread.c | 22 +- module/spl/spl-tsd.c | 87 +-- module/spl/spl-vnode.c | 133 ++-- module/spl/spl-xdr.c | 13 +- module/spl/spl-zlib.c | 14 +- module/splat/splat-internal.h | 1 - module/splat/splat-kmem.c | 2 +- scripts/dkms.mkconf | 4 - 26 files changed, 397 insertions(+), 3008 deletions(-) delete mode 100644 cmd/spl.c delete mode 100644 include/spl-debug.h delete mode 100644 include/spl-trace.h delete mode 100644 module/spl/spl-debug.c diff --git a/cmd/Makefile.am b/cmd/Makefile.am index fed6feec2..01afdcf25 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -3,11 +3,8 @@ include $(top_srcdir)/config/Rules.am DEFAULT_INCLUDES += \ -I$(top_srcdir)/lib -noinst_PROGRAMS = spl sbin_PROGRAMS = splat -spl_SOURCES = spl.c - splat_SOURCES = splat.c splat_LDFLAGS = $(top_builddir)/lib/libcommon.la diff --git a/cmd/spl.c b/cmd/spl.c deleted file mode 100644 index 3028e3ab0..000000000 --- a/cmd/spl.c +++ /dev/null @@ -1,243 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting Layer (SPL) User Space Interface. -\*****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/spl-ctl.h" - -static int spl_debug_mask = ~0; -static int spl_debug_subsystem = ~0; - -/* all strings nul-terminated; only the struct and hdr need to be freed */ -struct dbg_line { - struct spl_debug_header *hdr; - char *file; - char *fn; - char *text; -}; - -static int -cmp_rec(const void *p1, const void *p2) -{ - struct dbg_line *d1 = *(struct dbg_line **)p1; - struct dbg_line *d2 = *(struct dbg_line **)p2; - - if (d1->hdr->ph_sec < d2->hdr->ph_sec) - return -1; - - if (d1->hdr->ph_sec == d2->hdr->ph_sec && - d1->hdr->ph_usec < d2->hdr->ph_usec) - return -1; - - if (d1->hdr->ph_sec == d2->hdr->ph_sec && - d1->hdr->ph_usec == d2->hdr->ph_usec) - return 0; - - return 1; -} - -static void -print_rec(struct dbg_line **linev, int used, FILE *out) -{ - int i; - - for (i = 0; i < used; i++) { - struct dbg_line *line = linev[i]; - struct spl_debug_header *hdr = line->hdr; - - fprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:%u:(%s:%u:%s()) %s", - hdr->ph_subsys, hdr->ph_mask, hdr->ph_cpu_id, - hdr->ph_sec, (unsigned long long)hdr->ph_usec, - hdr->ph_stack, hdr->ph_pid, hdr->ph_stack, line->file, - hdr->ph_line_num, line->fn, line->text); - free(line->hdr); - free(line); - } - - free(linev); -} - -static int -add_rec(struct dbg_line *line, struct dbg_line ***linevp, int *lenp, int used) -{ - struct dbg_line **linev = *linevp; - - if (used == *lenp) { - int nlen = *lenp + 512; - int nsize = nlen * sizeof(struct dbg_line *); - - linev = *linevp ? realloc(*linevp, nsize) : malloc(nsize); - if (!linev) - return 0; - *linevp = linev; - *lenp = nlen; - } - linev[used] = line; - return 1; -} - -static int -parse_buffer(FILE *in, FILE *out) -{ - struct dbg_line *line; - struct spl_debug_header *hdr; - char buf[4097], *p; - unsigned long dropped = 0, kept = 0; - struct dbg_line **linev = NULL; - const int phl = sizeof(hdr->ph_len); - const int phf = sizeof(hdr->ph_flags); - int rc, linev_len = 0; - - while (1) { - rc = fread(buf, phl + phf, 1, in); - if (rc <= 0) - break; - - hdr = (void *)buf; - if (hdr->ph_len == 0) - break; - if (hdr->ph_len > 4094) { - fprintf(stderr, "unexpected large record: %d bytes. " - "aborting.\n", hdr->ph_len); - break; - } - - rc = fread(buf + phl + phf, 1, hdr->ph_len - phl - phf, in); - if (rc <= 0) - break; - - if (hdr->ph_mask && - (!(spl_debug_subsystem & hdr->ph_subsys) || - (!(spl_debug_mask & hdr->ph_mask)))) { - dropped++; - continue; - } - - line = malloc(sizeof(*line)); - if (line == NULL) { - fprintf(stderr, "malloc failed; printing accumulated " - "records and exiting.\n"); - break; - } - - line->hdr = malloc(hdr->ph_len + 1); - if (line->hdr == NULL) { - free(line); - fprintf(stderr, "malloc failed; printing accumulated " - "records and exiting.\n"); - break; - } - - p = (void *)line->hdr; - memcpy(line->hdr, buf, hdr->ph_len); - p[hdr->ph_len] = '\0'; - - p += sizeof(*hdr); - line->file = p; - p += strlen(line->file) + 1; - line->fn = p; - p += strlen(line->fn) + 1; - line->text = p; - - if (!add_rec(line, &linev, &linev_len, kept)) { - fprintf(stderr, "malloc failed; printing accumulated " - "records and exiting.\n"); - break; - } - kept++; - } - - if (linev) { - qsort(linev, kept, sizeof(struct dbg_line *), cmp_rec); - print_rec(linev, kept, out); - } - - printf("Debug log: %lu lines, %lu kept, %lu dropped.\n", - dropped + kept, kept, dropped); - return 0; -} - -int -main(int argc, char *argv[]) -{ - int fdin, fdout; - FILE *in, *out = stdout; - int rc, o_lf = 0; - - if (argc > 3 || argc < 2) { - fprintf(stderr, "usage: %s [output]\n", argv[0]); - return 0; - } - -#ifdef __USE_LARGEFILE64 - o_lf = O_LARGEFILE; -#endif - - fdin = open(argv[1], O_RDONLY | o_lf); - if (fdin == -1) { - fprintf(stderr, "open(%s) failed: %s\n", argv[1], - strerror(errno)); - return 1; - } - in = fdopen(fdin, "r"); - if (in == NULL) { - fprintf(stderr, "fopen(%s) failed: %s\n", argv[1], - strerror(errno)); - close(fdin); - return 1; - } - if (argc > 2) { - fdout = open(argv[2], O_CREAT | O_TRUNC | O_WRONLY | o_lf, 0600); - if (fdout == -1) { - fprintf(stderr, "open(%s) failed: %s\n", argv[2], - strerror(errno)); - fclose(in); - return 1; - } - out = fdopen(fdout, "w"); - if (out == NULL) { - fprintf(stderr, "fopen(%s) failed: %s\n", argv[2], - strerror(errno)); - fclose(in); - close(fdout); - return 1; - } - } - - rc = parse_buffer(in, out); - - fclose(in); - if (out != stdout) - fclose(out); - - return rc; -} diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 5a33f5e8e..d2cb68b6b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -18,7 +18,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ AC_SUBST(KERNELCPPFLAGS) SPL_AC_DEBUG - SPL_AC_DEBUG_LOG SPL_AC_DEBUG_KMEM SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_TEST_MODULE @@ -219,7 +218,7 @@ AC_DEFUN([SPL_AC_RPM], [ AC_MSG_RESULT([$HAVE_RPMBUILD]) ]) - RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_LOG) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"' + RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"' RPM_DEFINE_UTIL= RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"' RPM_DEFINE_DKMS= @@ -452,39 +451,6 @@ AC_DEFUN([SPL_AC_DEBUG], [ AC_MSG_RESULT([$enable_debug]) ]) -dnl # -dnl # Enabled by default it provides a basic debug log infrastructure. -dnl # Each subsystem registers itself with a name and logs messages -dnl # using predefined types. If the debug mask it set to allow the -dnl # message type it will be written to the internal log. The log -dnl # can be dumped to a file by echoing 1 to the 'dump' proc entry, -dnl # after dumping the log it must be decoded using the spl utility. -dnl # -dnl # echo 1 >/proc/sys/kernel/spl/debug/dump -dnl # spl /tmp/spl-log.xxx.yyy /tmp/spl-log.xxx.yyy.txt -dnl # -AC_DEFUN([SPL_AC_DEBUG_LOG], [ - AC_ARG_ENABLE([debug-log], - [AS_HELP_STRING([--enable-debug-log], - [Enable basic debug logging @<:@default=yes@:>@])], - [], - [enable_debug_log=yes]) - - AS_IF([test "x$enable_debug_log" = xyes], - [ - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG" - DEBUG_LOG="_with_debug_log" - AC_DEFINE([DEBUG_LOG], [1], - [Define to 1 to enable basic debug logging]) - ], [ - DEBUG_LOG="_without_debug_log" - ]) - - AC_SUBST(DEBUG_LOG) - AC_MSG_CHECKING([whether basic debug logging is enabled]) - AC_MSG_RESULT([$enable_debug_log]) -]) - dnl # dnl # Enabled by default it provides a minimal level of memory tracking. dnl # A total count of bytes allocated is kept for each alloc and free. diff --git a/include/Makefile.am b/include/Makefile.am index f9b812de3..3200222db 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -5,8 +5,6 @@ COMMON_H = KERNEL_H = \ $(top_srcdir)/include/splat-ctl.h \ $(top_srcdir)/include/spl-ctl.h \ - $(top_srcdir)/include/spl-debug.h \ - $(top_srcdir)/include/spl-trace.h \ $(top_srcdir)/include/strings.h \ $(top_srcdir)/include/unistd.h diff --git a/include/spl-debug.h b/include/spl-debug.h deleted file mode 100644 index c91b864c2..000000000 --- a/include/spl-debug.h +++ /dev/null @@ -1,276 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -/* - * Available debug functions. These function should be used by any - * package which needs to integrate with the SPL log infrastructure. - * - * SDEBUG() - Log debug message with specified mask. - * SDEBUG_LIMIT() - Log just 1 debug message with specified mask. - * SWARN() - Log a warning message. - * SERROR() - Log an error message. - * SEMERG() - Log an emergency error message. - * SCONSOLE() - Log a generic message to the console. - * - * SENTRY - Log entry point to a function. - * SEXIT - Log exit point from a function. - * SRETURN(x) - Log return from a function. - * SGOTO(x, y) - Log goto within a function. - */ - -#ifndef _SPL_DEBUG_INTERNAL_H -#define _SPL_DEBUG_INTERNAL_H - -#include -#include - -#define SS_UNDEFINED 0x00000001 -#define SS_ATOMIC 0x00000002 -#define SS_KOBJ 0x00000004 -#define SS_VNODE 0x00000008 -#define SS_TIME 0x00000010 -#define SS_RWLOCK 0x00000020 -#define SS_THREAD 0x00000040 -#define SS_CONDVAR 0x00000080 -#define SS_MUTEX 0x00000100 -#define SS_RNG 0x00000200 -#define SS_TASKQ 0x00000400 -#define SS_KMEM 0x00000800 -#define SS_DEBUG 0x00001000 -#define SS_GENERIC 0x00002000 -#define SS_PROC 0x00004000 -#define SS_MODULE 0x00008000 -#define SS_CRED 0x00010000 -#define SS_KSTAT 0x00020000 -#define SS_XDR 0x00040000 -#define SS_TSD 0x00080000 -#define SS_ZLIB 0x00100000 -#define SS_USER1 0x01000000 -#define SS_USER2 0x02000000 -#define SS_USER3 0x04000000 -#define SS_USER4 0x08000000 -#define SS_USER5 0x10000000 -#define SS_USER6 0x20000000 -#define SS_USER7 0x40000000 -#define SS_USER8 0x80000000 -#define SS_DEBUG_SUBSYS SS_UNDEFINED - -#define SD_TRACE 0x00000001 -#define SD_INFO 0x00000002 -#define SD_WARNING 0x00000004 -#define SD_ERROR 0x00000008 -#define SD_EMERG 0x00000010 -#define SD_CONSOLE 0x00000020 -#define SD_IOCTL 0x00000040 -#define SD_DPRINTF 0x00000080 -#define SD_OTHER 0x00000100 -#define SD_CANTMASK (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE) - -/* Debug log support enabled */ -#ifdef DEBUG_LOG - -#define __SDEBUG(cdls, subsys, mask, format, a...) \ -do { \ - if (((mask) & SD_CANTMASK) != 0 || \ - ((spl_debug_mask & (mask)) != 0 && \ - (spl_debug_subsys & (subsys)) != 0)) \ - spl_debug_msg(cdls, subsys, mask, __FILE__, \ - __FUNCTION__, __LINE__, format, ## a); \ -} while (0) - -#define SDEBUG(mask, format, a...) \ - __SDEBUG(NULL, SS_DEBUG_SUBSYS, mask, format, ## a) - -#define __SDEBUG_LIMIT(subsys, mask, format, a...) \ -do { \ - static spl_debug_limit_state_t cdls; \ - \ - __SDEBUG(&cdls, subsys, mask, format, ## a); \ -} while (0) - -#define SDEBUG_LIMIT(mask, format, a...) \ - __SDEBUG_LIMIT(SS_DEBUG_SUBSYS, mask, format, ## a) - -#define SWARN(fmt, a...) SDEBUG_LIMIT(SD_WARNING, fmt, ## a) -#define SERROR(fmt, a...) SDEBUG_LIMIT(SD_ERROR, fmt, ## a) -#define SEMERG(fmt, a...) SDEBUG_LIMIT(SD_EMERG, fmt, ## a) -#define SCONSOLE(mask, fmt, a...) SDEBUG(SD_CONSOLE | (mask), fmt, ## a) - -#define SENTRY SDEBUG(SD_TRACE, "Process entered\n") -#define SEXIT SDEBUG(SD_TRACE, "Process leaving\n") - -#define SRETURN(rc) \ -do { \ - typeof(rc) RETURN__ret = (rc); \ - SDEBUG(SD_TRACE, "Process leaving (rc=%lu : %ld : %lx)\n", \ - (long)RETURN__ret, (long)RETURN__ret, (long)RETURN__ret); \ - return RETURN__ret; \ -} while (0) - -#define SGOTO(label, rc) \ -do { \ - long GOTO__ret = (long)(rc); \ - SDEBUG(SD_TRACE,"Process leaving via %s (rc=%lu : %ld : %lx)\n",\ - #label, (unsigned long)GOTO__ret, (signed long)GOTO__ret, \ - (signed long)GOTO__ret); \ - goto label; \ -} while (0) - -typedef struct { - unsigned long cdls_next; - int cdls_count; - long cdls_delay; -} spl_debug_limit_state_t; - -/* Global debug variables */ -extern unsigned long spl_debug_subsys; -extern unsigned long spl_debug_mask; -extern unsigned long spl_debug_printk; -extern int spl_debug_mb; -extern unsigned int spl_debug_binary; -extern unsigned int spl_debug_catastrophe; -extern unsigned int spl_debug_panic_on_bug; -extern char spl_debug_file_path[PATH_MAX]; -extern unsigned int spl_console_ratelimit; -extern long spl_console_max_delay; -extern long spl_console_min_delay; -extern unsigned int spl_console_backoff; -extern unsigned int spl_debug_stack; - -/* Exported debug functions */ -extern int spl_debug_mask2str(char *str, int size, unsigned long mask, int ss); -extern int spl_debug_str2mask(unsigned long *mask, const char *str, int ss); -extern unsigned long spl_debug_set_mask(unsigned long mask); -extern unsigned long spl_debug_get_mask(void); -extern unsigned long spl_debug_set_subsys(unsigned long mask); -extern unsigned long spl_debug_get_subsys(void); -extern int spl_debug_set_mb(int mb); -extern int spl_debug_get_mb(void); -extern int spl_debug_dumplog(int flags); -extern void spl_debug_dumpstack(struct task_struct *tsk); -extern void spl_debug_bug(char *file, const char *fn, const int line, int fl); -extern int spl_debug_msg(void *arg, int subsys, int mask, const char *file, - const char *fn, const int line, const char *format, ...); -extern int spl_debug_clear_buffer(void); -extern int spl_debug_mark_buffer(char *text); - -int spl_debug_init(void); -void spl_debug_fini(void); - -/* Debug log support disabled */ -#else /* DEBUG_LOG */ - -#define __SDEBUG(x, y, mask, fmt, a...) ((void)0) -#define SDEBUG(mask, fmt, a...) ((void)0) -#define SDEBUG_LIMIT(x, y, fmt, a...) ((void)0) -#define SWARN(fmt, a...) ((void)0) -#define SERROR(fmt, a...) ((void)0) -#define SEMERG(fmt, a...) ((void)0) -#define SCONSOLE(mask, fmt, a...) ((void)0) - -#define SENTRY ((void)0) -#define SEXIT ((void)0) -#define SRETURN(x) return (x) -#define SGOTO(x, y) { ((void)(y)); goto x; } - -static inline unsigned long -spl_debug_set_mask(unsigned long mask) { - return (0); -} - -static inline unsigned long -spl_debug_get_mask(void) { - return (0); -} - -static inline unsigned long -spl_debug_set_subsys(unsigned long mask) { - return (0); -} - -static inline unsigned long -spl_debug_get_subsys(void) { - return (0); -} - -static inline int -spl_debug_set_mb(int mb) { - return (0); -} - -static inline int -spl_debug_get_mb(void) { - return (0); -} - -static inline int -spl_debug_dumplog(int flags) -{ - return (0); -} - -static inline void -spl_debug_dumpstack(struct task_struct *tsk) -{ - return; -} - -static inline void -spl_debug_bug(char *file, const char *fn, const int line, int fl) -{ - return; -} - -static inline int -spl_debug_msg(void *arg, int subsys, int mask, const char *file, - const char *fn, const int line, const char *format, ...) -{ - return (0); -} - -static inline int -spl_debug_clear_buffer(void) -{ - return (0); -} - -static inline int -spl_debug_mark_buffer(char *text) -{ - return (0); -} - -static inline int -spl_debug_init(void) { - return (0); -} - -static inline void -spl_debug_fini(void) { - return; -} - -#endif /* DEBUG_LOG */ - -#endif /* SPL_DEBUG_INTERNAL_H */ diff --git a/include/spl-trace.h b/include/spl-trace.h deleted file mode 100644 index 8ef173e76..000000000 --- a/include/spl-trace.h +++ /dev/null @@ -1,132 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_TRACE_H -#define _SPL_TRACE_H - -#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) -#define TCD_STOCK_PAGES (TCD_MAX_PAGES) -#define TRACE_CONSOLE_BUFFER_SIZE 1024 - -#define SPL_DEFAULT_MAX_DELAY (600 * HZ) -#define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2) -#define SPL_DEFAULT_BACKOFF 2 - -#define DL_NOTHREAD 0x0001 /* Do not create a new thread */ -#define DL_SINGLE_CPU 0x0002 /* Collect pages from this CPU*/ - -typedef struct dumplog_priv { - wait_queue_head_t dp_waitq; - pid_t dp_pid; - int dp_flags; - atomic_t dp_done; -} dumplog_priv_t; - -/* Three trace data types */ -typedef enum { - TCD_TYPE_PROC, - TCD_TYPE_SOFTIRQ, - TCD_TYPE_IRQ, - TCD_TYPE_MAX -} tcd_type_t; - -union trace_data_union { - struct trace_cpu_data { - /* pages with trace records not yet processed by tracefiled */ - struct list_head tcd_pages; - /* number of pages on ->tcd_pages */ - unsigned long tcd_cur_pages; - /* Max number of pages allowed on ->tcd_pages */ - unsigned long tcd_max_pages; - - /* - * preallocated pages to write trace records into. Pages from - * ->tcd_stock_pages are moved to ->tcd_pages by spl_debug_msg(). - * - * This list is necessary, because on some platforms it's - * impossible to perform efficient atomic page allocation in a - * non-blockable context. - * - * Such platforms fill ->tcd_stock_pages "on occasion", when - * tracing code is entered in blockable context. - * - * trace_get_tage_try() tries to get a page from - * ->tcd_stock_pages first and resorts to atomic page - * allocation only if this queue is empty. ->tcd_stock_pages - * is replenished when tracing code is entered in blocking - * context (darwin-tracefile.c:trace_get_tcd()). We try to - * maintain TCD_STOCK_PAGES (40 by default) pages in this - * queue. Atomic allocation is only required if more than - * TCD_STOCK_PAGES pagesful are consumed by trace records all - * emitted in non-blocking contexts. Which is quite unlikely. - */ - struct list_head tcd_stock_pages; - /* number of pages on ->tcd_stock_pages */ - unsigned long tcd_cur_stock_pages; - - unsigned short tcd_shutting_down; - unsigned short tcd_cpu; - unsigned short tcd_type; - /* The factors to share debug memory. */ - unsigned short tcd_pages_factor; - - /* - * This spinlock is needed to workaround the problem of - * set_cpus_allowed() being GPL-only. Since we cannot - * schedule a thread on a specific CPU when dumping the - * pages, we must use the spinlock for mutual exclusion. - */ - spinlock_t tcd_lock; - unsigned long tcd_lock_flags; - } tcd; - char __pad[L1_CACHE_ALIGN(sizeof(struct trace_cpu_data))]; -}; - -extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; - -#define tcd_for_each(tcd, i, j) \ - for (i = 0; i < TCD_TYPE_MAX && trace_data[i]; i++) \ - for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ - j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) - -#define tcd_for_each_type_lock(tcd, i, cpu) \ - for (i = 0; i < TCD_TYPE_MAX && trace_data[i] && \ - (tcd = &(*trace_data[i])[cpu].tcd) && \ - trace_lock_tcd(tcd); trace_unlock_tcd(tcd), i++) - -struct trace_page { - struct page *page; /* page itself */ - struct list_head linkage; /* Used by trace_data_union */ - unsigned int used; /* number of bytes used within this page */ - unsigned short cpu; /* cpu that owns this page */ - unsigned short type; /* type(context) of this page */ -}; - -struct page_collection { - struct list_head pc_pages; - spinlock_t pc_lock; - int pc_want_daemon_pages; -}; - -#endif /* SPL_TRACE_H */ diff --git a/include/sys/debug.h b/include/sys/debug.h index 3a4b1352f..cae2d49e4 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -30,7 +30,6 @@ * * PANIC() - Panic the node and print message. * ASSERT() - Assert X is true, if not panic. - * ASSERTF() - Assert X is true, if not panic and print message. * ASSERTV() - Wraps a variable declaration which is only used by ASSERT(). * ASSERT3S() - Assert signed X OP Y is true, if not panic. * ASSERT3U() - Assert unsigned X OP Y is true, if not panic. @@ -44,110 +43,69 @@ */ #ifndef _SPL_DEBUG_H -#define _SPL_DEBUG_H - -#include - -#ifdef NDEBUG /* Debugging Disabled */ - -/* Define SPL_DEBUG_STR to make clear which ASSERT definitions are used */ -#define SPL_DEBUG_STR "" - -#define PANIC(fmt, a...) \ - spl_PANIC(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) - -#define __ASSERT(x) ((void)0) -#define ASSERT(x) ((void)0) -#define ASSERTF(x, y, z...) ((void)0) -#define ASSERTV(x) -#define VERIFY(cond) \ - (void)(unlikely(!(cond)) && \ - spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ - "%s", "VERIFY(" #cond ") failed\n")) - -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ - (void)((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ - spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (" FMT " " #OP " " FMT ")\n", \ - CAST (LEFT), CAST (RIGHT))) - -#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) -#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ - (unsigned long long)) -#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) - -#define ASSERT3S(x,y,z) ((void)0) -#define ASSERT3U(x,y,z) ((void)0) -#define ASSERT3P(x,y,z) ((void)0) -#define ASSERT0(x) ((void)0) - -#else /* Debugging Enabled */ - -/* Define SPL_DEBUG_STR to make clear which ASSERT definitions are used */ -#define SPL_DEBUG_STR " (DEBUG mode)" - -#define PANIC(fmt, a...) \ - spl_PANIC(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) - -/* ASSERTION that is safe to use within the debug system */ -#define __ASSERT(cond) \ -do { \ - if (unlikely(!(cond))) { \ - printk(KERN_EMERG "ASSERTION(" #cond ") failed\n"); \ - BUG(); \ - } \ -} while (0) - -/* ASSERTION that will debug log used outside the debug sysytem */ -#define ASSERT(cond) \ - (void)(unlikely(!(cond)) && \ - spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ - "%s", "ASSERTION(" #cond ") failed\n")) - -#define ASSERTF(cond, fmt, a...) \ - (void)(unlikely(!(cond)) && \ - spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ - "ASSERTION(" #cond ") failed: " fmt, ## a)) - -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ - (void)((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ - spl_PANIC(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (" FMT " " #OP " " FMT ")\n", \ - CAST (LEFT), CAST (RIGHT))) - -#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) -#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ - (unsigned long long)) -#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) - -#define ASSERT3S(x,y,z) VERIFY3S(x, y, z) -#define ASSERT3U(x,y,z) VERIFY3U(x, y, z) -#define ASSERT3P(x,y,z) VERIFY3P(x, y, z) -#define ASSERT0(x) VERIFY0(x) - -#define ASSERTV(x) x -#define VERIFY(x) ASSERT(x) - -#endif /* NDEBUG */ +#define _SPL_DEBUG_H /* - * Helpers for the Solaris debug macros above + * Common DEBUG functionality. */ -extern int spl_PANIC(char *filename, const char *functionname, - int lineno, const char *fmt, ...); +int spl_panic(const char *file, const char *func, int line, + const char *fmt, ...); +void spl_dumpstack(void); + +#define PANIC(fmt, a...) \ + spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) + +#define VERIFY(cond) \ + (void)(unlikely(!(cond)) && \ + spl_panic(__FILE__, __FUNCTION__, __LINE__, \ + "%s", "VERIFY(" #cond ") failed\n")) + +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ + (void)((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ + spl_panic(__FILE__, __FUNCTION__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ + CAST (LEFT), CAST (RIGHT))) + +#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) +#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ + (unsigned long long)) +#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) +#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) -/* - * Compile-time assertion. The condition 'x' must be constant. - */ #define CTASSERT_GLOBAL(x) _CTASSERT(x, __LINE__) #define CTASSERT(x) { _CTASSERT(x, __LINE__); } #define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) \ - typedef char __attribute__ ((unused)) \ +#define __CTASSERT(x, y) \ + typedef char __attribute__ ((unused)) \ __compile_time_assertion__ ## y[(x) ? 1 : -1] +/* + * Debugging disabled (--disable-debug) + */ +#ifdef NDEBUG + +#define SPL_DEBUG_STR "" +#define ASSERT(x) ((void)0) +#define ASSERTV(x) +#define ASSERT3S(x,y,z) ((void)0) +#define ASSERT3U(x,y,z) ((void)0) +#define ASSERT3P(x,y,z) ((void)0) +#define ASSERT0(x) ((void)0) + +/* + * Debugging enabled (--enable-debug) + */ +#else + +#define SPL_DEBUG_STR " (DEBUG mode)" +#define ASSERT(cond) VERIFY(cond) +#define ASSERTV(x) x +#define ASSERT3S(x,y,z) VERIFY3S(x, y, z) +#define ASSERT3U(x,y,z) VERIFY3U(x, y, z) +#define ASSERT3P(x,y,z) VERIFY3P(x, y, z) +#define ASSERT0(x) VERIFY0(x) + +#endif /* NDEBUG */ + #endif /* SPL_DEBUG_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 5875dfff6..936e49d6d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -74,27 +74,27 @@ * ship a kernel with CONFIG_RT_MUTEX_TESTER disabled. */ #if !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER) -# define PF_NOFS PF_MUTEX_TESTER +#define PF_NOFS PF_MUTEX_TESTER static inline void sanitize_flags(struct task_struct *p, gfp_t *flags) { if (unlikely((p->flags & PF_NOFS) && (*flags & (__GFP_IO|__GFP_FS)))) { -# ifdef NDEBUG - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "Fixing allocation for " - "task %s (%d) which used GFP flags 0x%x with PF_NOFS set\n", - p->comm, p->pid, flags); - spl_debug_dumpstack(p); +#ifdef NDEBUG + printk(KERN_WARNING "Fixing allocation for task %s (%d) " + "which used GFP flags 0x%x with PF_NOFS set\n", + p->comm, p->pid, *flags); + spl_dumpstack(); *flags &= ~(__GFP_IO|__GFP_FS); -# else +#else PANIC("FATAL allocation for task %s (%d) which used GFP " - "flags 0x%x with PF_NOFS set\n", p->comm, p->pid, flags); -# endif /* NDEBUG */ + "flags 0x%x with PF_NOFS set\n", p->comm, p->pid, *flags); +#endif /* NDEBUG */ } } #else -# define PF_NOFS 0x00000000 -# define sanitize_flags(p, fl) ((void)0) +#define PF_NOFS 0x00000000 +#define sanitize_flags(p, fl) ((void)0) #endif /* !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER) */ /* diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 30620349f..9f67ed646 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -6,7 +6,6 @@ EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@ # Solaris porting layer module obj-$(CONFIG_SPL) := $(MODULE).o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-debug.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-thread.o diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 8236412dd..2a0052f56 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -25,18 +25,10 @@ \*****************************************************************************/ #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_CONDVAR void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) { - SENTRY; ASSERT(cvp); ASSERT(name == NULL); ASSERT(type == CV_DEFAULT); @@ -48,8 +40,6 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) atomic_set(&cvp->cv_waiters, 0); atomic_set(&cvp->cv_refs, 1); cvp->cv_mutex = NULL; - - SEXIT; } EXPORT_SYMBOL(__cv_init); @@ -68,7 +58,6 @@ cv_destroy_wakeup(kcondvar_t *cvp) void __cv_destroy(kcondvar_t *cvp) { - SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); @@ -83,8 +72,6 @@ __cv_destroy(kcondvar_t *cvp) ASSERT3S(atomic_read(&cvp->cv_refs), ==, 0); ASSERT3S(atomic_read(&cvp->cv_waiters), ==, 0); ASSERT3S(waitqueue_active(&cvp->cv_event), ==, 0); - - SEXIT; } EXPORT_SYMBOL(__cv_destroy); @@ -92,7 +79,6 @@ static void cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) { DEFINE_WAIT(wait); - SENTRY; ASSERT(cvp); ASSERT(mp); @@ -127,8 +113,6 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) finish_wait(&cvp->cv_event, &wait); atomic_dec(&cvp->cv_refs); - - SEXIT; } void @@ -161,7 +145,6 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, { DEFINE_WAIT(wait); clock_t time_left; - SENTRY; ASSERT(cvp); ASSERT(mp); @@ -179,7 +162,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, time_left = expire_time - jiffies; if (time_left <= 0) { atomic_dec(&cvp->cv_refs); - SRETURN(-1); + return (-1); } prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); @@ -201,7 +184,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, finish_wait(&cvp->cv_event, &wait); atomic_dec(&cvp->cv_refs); - SRETURN(time_left > 0 ? time_left : -1); + return (time_left > 0 ? time_left : -1); } clock_t @@ -229,7 +212,6 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, DEFINE_WAIT(wait); hrtime_t time_left, now; unsigned long time_left_us; - SENTRY; ASSERT(cvp); ASSERT(mp); @@ -247,7 +229,7 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, time_left = expire_time - now; if (time_left <= 0) { atomic_dec(&cvp->cv_refs); - SRETURN(-1); + return (-1); } time_left_us = time_left / NSEC_PER_USEC; @@ -273,7 +255,7 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, atomic_dec(&cvp->cv_refs); time_left = expire_time - gethrtime(); - SRETURN(time_left > 0 ? time_left : -1); + return (time_left > 0 ? time_left : -1); } /* @@ -302,7 +284,6 @@ EXPORT_SYMBOL(cv_timedwait_hires); void __cv_signal(kcondvar_t *cvp) { - SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); atomic_inc(&cvp->cv_refs); @@ -315,14 +296,12 @@ __cv_signal(kcondvar_t *cvp) wake_up(&cvp->cv_event); atomic_dec(&cvp->cv_refs); - SEXIT; } EXPORT_SYMBOL(__cv_signal); void __cv_broadcast(kcondvar_t *cvp) { - SENTRY; ASSERT(cvp); ASSERT(cvp->cv_magic == CV_MAGIC); atomic_inc(&cvp->cv_refs); @@ -333,6 +312,5 @@ __cv_broadcast(kcondvar_t *cvp) wake_up_all(&cvp->cv_event); atomic_dec(&cvp->cv_refs); - SEXIT; } EXPORT_SYMBOL(__cv_broadcast); diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c deleted file mode 100644 index 6c4e043f0..000000000 --- a/module/spl/spl-debug.c +++ /dev/null @@ -1,1265 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting Layer (SPL) Debug Implementation. -\*****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_DEBUG - -/* Debug log support enabled */ -#ifdef DEBUG_LOG - -unsigned long spl_debug_subsys = ~0; -EXPORT_SYMBOL(spl_debug_subsys); -module_param(spl_debug_subsys, ulong, 0644); -MODULE_PARM_DESC(spl_debug_subsys, "Subsystem debugging level mask."); - -unsigned long spl_debug_mask = SD_CANTMASK; -EXPORT_SYMBOL(spl_debug_mask); -module_param(spl_debug_mask, ulong, 0644); -MODULE_PARM_DESC(spl_debug_mask, "Debugging level mask."); - -unsigned long spl_debug_printk = SD_CANTMASK; -EXPORT_SYMBOL(spl_debug_printk); -module_param(spl_debug_printk, ulong, 0644); -MODULE_PARM_DESC(spl_debug_printk, "Console printk level mask."); - -int spl_debug_mb = -1; -EXPORT_SYMBOL(spl_debug_mb); -module_param(spl_debug_mb, int, 0644); -MODULE_PARM_DESC(spl_debug_mb, "Total debug buffer size."); - -unsigned int spl_debug_binary = 1; -EXPORT_SYMBOL(spl_debug_binary); - -unsigned int spl_debug_catastrophe; -EXPORT_SYMBOL(spl_debug_catastrophe); - -unsigned int spl_debug_panic_on_bug = 0; -EXPORT_SYMBOL(spl_debug_panic_on_bug); -module_param(spl_debug_panic_on_bug, uint, 0644); -MODULE_PARM_DESC(spl_debug_panic_on_bug, "Panic on BUG"); - -static char spl_debug_file_name[PATH_MAX]; -char spl_debug_file_path[PATH_MAX] = "/tmp/spl-log"; - -unsigned int spl_console_ratelimit = 1; -EXPORT_SYMBOL(spl_console_ratelimit); - -long spl_console_max_delay; -EXPORT_SYMBOL(spl_console_max_delay); - -long spl_console_min_delay; -EXPORT_SYMBOL(spl_console_min_delay); - -unsigned int spl_console_backoff = SPL_DEFAULT_BACKOFF; -EXPORT_SYMBOL(spl_console_backoff); - -unsigned int spl_debug_stack; -EXPORT_SYMBOL(spl_debug_stack); - -static int spl_panic_in_progress; - -union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS] __cacheline_aligned; -char *trace_console_buffers[NR_CPUS][3]; -struct rw_semaphore trace_sem; -atomic_t trace_tage_allocated = ATOMIC_INIT(0); - -static int spl_debug_dump_all_pages(dumplog_priv_t *dp, char *); -static void trace_fini(void); - - -/* Memory percentage breakdown by type */ -static unsigned int pages_factor[TCD_TYPE_MAX] = { - 80, /* 80% pages for TCD_TYPE_PROC */ - 10, /* 10% pages for TCD_TYPE_SOFTIRQ */ - 10 /* 10% pages for TCD_TYPE_IRQ */ -}; - -const char * -spl_debug_subsys2str(int subsys) -{ - switch (subsys) { - default: - return NULL; - case SS_UNDEFINED: - return "undefined"; - case SS_ATOMIC: - return "atomic"; - case SS_KOBJ: - return "kobj"; - case SS_VNODE: - return "vnode"; - case SS_TIME: - return "time"; - case SS_RWLOCK: - return "rwlock"; - case SS_THREAD: - return "thread"; - case SS_CONDVAR: - return "condvar"; - case SS_MUTEX: - return "mutex"; - case SS_RNG: - return "rng"; - case SS_TASKQ: - return "taskq"; - case SS_KMEM: - return "kmem"; - case SS_DEBUG: - return "debug"; - case SS_GENERIC: - return "generic"; - case SS_PROC: - return "proc"; - case SS_MODULE: - return "module"; - case SS_CRED: - return "cred"; - case SS_KSTAT: - return "kstat"; - case SS_XDR: - return "xdr"; - case SS_TSD: - return "tsd"; - case SS_ZLIB: - return "zlib"; - case SS_USER1: - return "user1"; - case SS_USER2: - return "user2"; - case SS_USER3: - return "user3"; - case SS_USER4: - return "user4"; - case SS_USER5: - return "user5"; - case SS_USER6: - return "user6"; - case SS_USER7: - return "user7"; - case SS_USER8: - return "user8"; - } -} - -const char * -spl_debug_dbg2str(int debug) -{ - switch (debug) { - default: - return NULL; - case SD_TRACE: - return "trace"; - case SD_INFO: - return "info"; - case SD_WARNING: - return "warning"; - case SD_ERROR: - return "error"; - case SD_EMERG: - return "emerg"; - case SD_CONSOLE: - return "console"; - case SD_IOCTL: - return "ioctl"; - case SD_DPRINTF: - return "dprintf"; - case SD_OTHER: - return "other"; - } -} - -int -spl_debug_mask2str(char *str, int size, unsigned long mask, int is_subsys) -{ - const char *(*fn)(int bit) = is_subsys ? spl_debug_subsys2str : - spl_debug_dbg2str; - const char *token; - int i, bit, len = 0; - - if (mask == 0) { /* "0" */ - if (size > 0) - str[0] = '0'; - len = 1; - } else { /* space-separated tokens */ - for (i = 0; i < 32; i++) { - bit = 1 << i; - - if ((mask & bit) == 0) - continue; - - token = fn(bit); - if (token == NULL) /* unused bit */ - continue; - - if (len > 0) { /* separator? */ - if (len < size) - str[len] = ' '; - len++; - } - - while (*token != 0) { - if (len < size) - str[len] = *token; - token++; - len++; - } - } - } - - /* terminate 'str' */ - if (len < size) - str[len] = 0; - else - str[size - 1] = 0; - - return len; -} - -static int -spl_debug_token2mask(int *mask, const char *str, int len, int is_subsys) -{ - const char *(*fn)(int bit) = is_subsys ? spl_debug_subsys2str : - spl_debug_dbg2str; - const char *token; - int i, j, bit; - - /* match against known tokens */ - for (i = 0; i < 32; i++) { - bit = 1 << i; - - token = fn(bit); - if (token == NULL) /* unused? */ - continue; - - /* strcasecmp */ - for (j = 0; ; j++) { - if (j == len) { /* end of token */ - if (token[j] == 0) { - *mask = bit; - return 0; - } - break; - } - - if (token[j] == 0) - break; - - if (str[j] == token[j]) - continue; - - if (str[j] < 'A' || 'Z' < str[j]) - break; - - if (str[j] - 'A' + 'a' != token[j]) - break; - } - } - - return -EINVAL; /* no match */ -} - -int -spl_debug_str2mask(unsigned long *mask, const char *str, int is_subsys) -{ - char op = 0; - int m = 0, matched, n, t; - - /* Allow a number for backwards compatibility */ - for (n = strlen(str); n > 0; n--) - if (!isspace(str[n-1])) - break; - matched = n; - - if ((t = sscanf(str, "%i%n", &m, &matched)) >= 1 && matched == n) { - *mask = m; - return 0; - } - - /* must be a list of debug tokens or numbers separated by - * whitespace and optionally an operator ('+' or '-'). If an operator - * appears first in , '*mask' is used as the starting point - * (relative), otherwise 0 is used (absolute). An operator applies to - * all following tokens up to the next operator. */ - matched = 0; - while (*str != 0) { - while (isspace(*str)) /* skip whitespace */ - str++; - - if (*str == 0) - break; - - if (*str == '+' || *str == '-') { - op = *str++; - - /* op on first token == relative */ - if (!matched) - m = *mask; - - while (isspace(*str)) /* skip whitespace */ - str++; - - if (*str == 0) /* trailing op */ - return -EINVAL; - } - - /* find token length */ - for (n = 0; str[n] != 0 && !isspace(str[n]); n++); - - /* match token */ - if (spl_debug_token2mask(&t, str, n, is_subsys) != 0) - return -EINVAL; - - matched = 1; - if (op == '-') - m &= ~t; - else - m |= t; - - str += n; - } - - if (!matched) - return -EINVAL; - - *mask = m; - return 0; -} - -static void -spl_debug_dumplog_internal(dumplog_priv_t *dp) -{ - void *journal_info; - - journal_info = current->journal_info; - current->journal_info = NULL; - - snprintf(spl_debug_file_name, sizeof(spl_debug_file_path) - 1, - "%s.%ld.%ld", spl_debug_file_path, - get_seconds(), (long)dp->dp_pid); - printk("SPL: Dumping log to %s\n", spl_debug_file_name); - spl_debug_dump_all_pages(dp, spl_debug_file_name); - - current->journal_info = journal_info; -} - -static int -spl_debug_dumplog_thread(void *arg) -{ - dumplog_priv_t *dp = (dumplog_priv_t *)arg; - - spl_debug_dumplog_internal(dp); - atomic_set(&dp->dp_done, 1); - wake_up(&dp->dp_waitq); - complete_and_exit(NULL, 0); - - return 0; /* Unreachable */ -} - -/* When flag is set do not use a new thread for the debug dump */ -int -spl_debug_dumplog(int flags) -{ - struct task_struct *tsk; - dumplog_priv_t dp; - - init_waitqueue_head(&dp.dp_waitq); - dp.dp_pid = current->pid; - dp.dp_flags = flags; - atomic_set(&dp.dp_done, 0); - - if (dp.dp_flags & DL_NOTHREAD) { - spl_debug_dumplog_internal(&dp); - } else { - - tsk = spl_kthread_create(spl_debug_dumplog_thread,(void *)&dp,"spl_debug"); - if (tsk == NULL) - return -ENOMEM; - - wake_up_process(tsk); - wait_event(dp.dp_waitq, atomic_read(&dp.dp_done)); - } - - return 0; -} -EXPORT_SYMBOL(spl_debug_dumplog); - -static char * -trace_get_console_buffer(void) -{ - int cpu = get_cpu(); - int idx; - - if (in_irq()) { - idx = 0; - } else if (in_softirq()) { - idx = 1; - } else { - idx = 2; - } - - return trace_console_buffers[cpu][idx]; -} - -static void -trace_put_console_buffer(char *buffer) -{ - put_cpu(); -} - -static int -trace_lock_tcd(struct trace_cpu_data *tcd) -{ - __ASSERT(tcd->tcd_type < TCD_TYPE_MAX); - - spin_lock_irqsave(&tcd->tcd_lock, tcd->tcd_lock_flags); - - return 1; -} - -static void -trace_unlock_tcd(struct trace_cpu_data *tcd) -{ - __ASSERT(tcd->tcd_type < TCD_TYPE_MAX); - - spin_unlock_irqrestore(&tcd->tcd_lock, tcd->tcd_lock_flags); -} - -static struct trace_cpu_data * -trace_get_tcd(void) -{ - int cpu; - struct trace_cpu_data *tcd; - - cpu = get_cpu(); - if (in_irq()) - tcd = &(*trace_data[TCD_TYPE_IRQ])[cpu].tcd; - else if (in_softirq()) - tcd = &(*trace_data[TCD_TYPE_SOFTIRQ])[cpu].tcd; - else - tcd = &(*trace_data[TCD_TYPE_PROC])[cpu].tcd; - - trace_lock_tcd(tcd); - - return tcd; -} - -static void -trace_put_tcd (struct trace_cpu_data *tcd) -{ - trace_unlock_tcd(tcd); - - put_cpu(); -} - -static void -trace_set_debug_header(struct spl_debug_header *header, int subsys, - int mask, const int line, unsigned long stack) -{ - struct timeval tv; - - do_gettimeofday(&tv); - - header->ph_subsys = subsys; - header->ph_mask = mask; - header->ph_cpu_id = smp_processor_id(); - header->ph_sec = (__u32)tv.tv_sec; - header->ph_usec = tv.tv_usec; - header->ph_stack = stack; - header->ph_pid = current->pid; - header->ph_line_num = line; - - return; -} - -static void -trace_print_to_console(struct spl_debug_header *hdr, int mask, const char *buf, - int len, const char *file, const char *fn) -{ - char *prefix = "SPL", *ptype = NULL; - - if ((mask & SD_EMERG) != 0) { - prefix = "SPLError"; - ptype = KERN_EMERG; - } else if ((mask & SD_ERROR) != 0) { - prefix = "SPLError"; - ptype = KERN_ERR; - } else if ((mask & SD_WARNING) != 0) { - prefix = "SPL"; - ptype = KERN_WARNING; - } else if ((mask & (SD_CONSOLE | spl_debug_printk)) != 0) { - prefix = "SPL"; - ptype = KERN_INFO; - } - - if ((mask & SD_CONSOLE) != 0) { - printk("%s%s: %.*s", ptype, prefix, len, buf); - } else { - printk("%s%s: %d:%d:(%s:%d:%s()) %.*s", ptype, prefix, - hdr->ph_pid, hdr->ph_stack, file, - hdr->ph_line_num, fn, len, buf); - } - - return; -} - -static int -trace_max_debug_mb(void) -{ - return MAX(512, ((totalram_pages >> (20 - PAGE_SHIFT)) * 80) / 100); -} - -static struct trace_page * -tage_alloc(int gfp) -{ - struct page *page; - struct trace_page *tage; - - page = alloc_pages(gfp | __GFP_NOWARN, 0); - if (page == NULL) - return NULL; - - tage = kmalloc(sizeof(*tage), gfp); - if (tage == NULL) { - __free_pages(page, 0); - return NULL; - } - - tage->page = page; - atomic_inc(&trace_tage_allocated); - - return tage; -} - -static void -tage_free(struct trace_page *tage) -{ - __ASSERT(tage != NULL); - __ASSERT(tage->page != NULL); - - __free_pages(tage->page, 0); - kfree(tage); - atomic_dec(&trace_tage_allocated); -} - -static struct trace_page * -tage_from_list(struct list_head *list) -{ - return list_entry(list, struct trace_page, linkage); -} - -static void -tage_to_tail(struct trace_page *tage, struct list_head *queue) -{ - __ASSERT(tage != NULL); - __ASSERT(queue != NULL); - - list_move_tail(&tage->linkage, queue); -} - -/* try to return a page that has 'len' bytes left at the end */ -static struct trace_page * -trace_get_tage_try(struct trace_cpu_data *tcd, unsigned long len) -{ - struct trace_page *tage; - - if (tcd->tcd_cur_pages > 0) { - __ASSERT(!list_empty(&tcd->tcd_pages)); - tage = tage_from_list(tcd->tcd_pages.prev); - if (tage->used + len <= PAGE_SIZE) - return tage; - } - - if (tcd->tcd_cur_pages < tcd->tcd_max_pages) { - if (tcd->tcd_cur_stock_pages > 0) { - tage = tage_from_list(tcd->tcd_stock_pages.prev); - tcd->tcd_cur_stock_pages--; - list_del_init(&tage->linkage); - } else { - tage = tage_alloc(GFP_ATOMIC); - if (tage == NULL) { - printk(KERN_WARNING - "failure to allocate a tage (%ld)\n", - tcd->tcd_cur_pages); - return NULL; - } - } - - tage->used = 0; - tage->cpu = smp_processor_id(); - tage->type = tcd->tcd_type; - list_add_tail(&tage->linkage, &tcd->tcd_pages); - tcd->tcd_cur_pages++; - - return tage; - } - - return NULL; -} - -/* return a page that has 'len' bytes left at the end */ -static struct trace_page * -trace_get_tage(struct trace_cpu_data *tcd, unsigned long len) -{ - struct trace_page *tage; - - __ASSERT(len <= PAGE_SIZE); - - tage = trace_get_tage_try(tcd, len); - if (tage) - return tage; - - if (tcd->tcd_cur_pages > 0) { - tage = tage_from_list(tcd->tcd_pages.next); - tage->used = 0; - tage_to_tail(tage, &tcd->tcd_pages); - } - - return tage; -} - -int -spl_debug_msg(void *arg, int subsys, int mask, const char *file, - const char *fn, const int line, const char *format, ...) -{ - spl_debug_limit_state_t *cdls = arg; - struct trace_cpu_data *tcd = NULL; - struct spl_debug_header header = { 0, }; - struct trace_page *tage; - /* string_buf is used only if tcd != NULL, and is always set then */ - char *string_buf = NULL; - char *debug_buf; - int known_size; - int needed = 85; /* average message length */ - int max_nob; - va_list ap; - int i; - - if (subsys == 0) - subsys = SS_DEBUG_SUBSYS; - - if (mask == 0) - mask = SD_EMERG; - - if (strchr(file, '/')) - file = strrchr(file, '/') + 1; - - tcd = trace_get_tcd(); - trace_set_debug_header(&header, subsys, mask, line, 0); - if (tcd == NULL) - goto console; - - if (tcd->tcd_shutting_down) { - trace_put_tcd(tcd); - tcd = NULL; - goto console; - } - - known_size = strlen(file) + 1; - if (fn) - known_size += strlen(fn) + 1; - - if (spl_debug_binary) - known_size += sizeof(header); - - /* '2' used because vsnprintf returns real size required for output - * _without_ terminating NULL. */ - for (i = 0; i < 2; i++) { - tage = trace_get_tage(tcd, needed + known_size + 1); - if (tage == NULL) { - if (needed + known_size > PAGE_SIZE) - mask |= SD_ERROR; - - trace_put_tcd(tcd); - tcd = NULL; - goto console; - } - - string_buf = (char *)page_address(tage->page) + - tage->used + known_size; - - max_nob = PAGE_SIZE - tage->used - known_size; - if (max_nob <= 0) { - printk(KERN_EMERG "negative max_nob: %i\n", max_nob); - mask |= SD_ERROR; - trace_put_tcd(tcd); - tcd = NULL; - goto console; - } - - needed = 0; - if (format) { - va_start(ap, format); - needed += vsnprintf(string_buf, max_nob, format, ap); - va_end(ap); - } - - if (needed < max_nob) - break; - } - - header.ph_len = known_size + needed; - debug_buf = (char *)page_address(tage->page) + tage->used; - - if (spl_debug_binary) { - memcpy(debug_buf, &header, sizeof(header)); - tage->used += sizeof(header); - debug_buf += sizeof(header); - } - - strcpy(debug_buf, file); - tage->used += strlen(file) + 1; - debug_buf += strlen(file) + 1; - - if (fn) { - strcpy(debug_buf, fn); - tage->used += strlen(fn) + 1; - debug_buf += strlen(fn) + 1; - } - - __ASSERT(debug_buf == string_buf); - - tage->used += needed; - __ASSERT (tage->used <= PAGE_SIZE); - -console: - if ((mask & spl_debug_printk) == 0) { - /* no console output requested */ - if (tcd != NULL) - trace_put_tcd(tcd); - return 1; - } - - if (cdls != NULL) { - if (spl_console_ratelimit && cdls->cdls_next != 0 && - !time_before(cdls->cdls_next, jiffies)) { - /* skipping a console message */ - cdls->cdls_count++; - if (tcd != NULL) - trace_put_tcd(tcd); - return 1; - } - - if (time_before(cdls->cdls_next + spl_console_max_delay + - (10 * HZ), jiffies)) { - /* last timeout was a long time ago */ - cdls->cdls_delay /= spl_console_backoff * 4; - } else { - cdls->cdls_delay *= spl_console_backoff; - - if (cdls->cdls_delay < spl_console_min_delay) - cdls->cdls_delay = spl_console_min_delay; - else if (cdls->cdls_delay > spl_console_max_delay) - cdls->cdls_delay = spl_console_max_delay; - } - - /* ensure cdls_next is never zero after it's been seen */ - cdls->cdls_next = (jiffies + cdls->cdls_delay) | 1; - } - - if (tcd != NULL) { - trace_print_to_console(&header, mask, string_buf, needed, file, fn); - trace_put_tcd(tcd); - } else { - string_buf = trace_get_console_buffer(); - - needed = 0; - if (format != NULL) { - va_start(ap, format); - needed += vsnprintf(string_buf, - TRACE_CONSOLE_BUFFER_SIZE, format, ap); - va_end(ap); - } - trace_print_to_console(&header, mask, - string_buf, needed, file, fn); - - trace_put_console_buffer(string_buf); - } - - if (cdls != NULL && cdls->cdls_count != 0) { - string_buf = trace_get_console_buffer(); - - needed = snprintf(string_buf, TRACE_CONSOLE_BUFFER_SIZE, - "Skipped %d previous similar message%s\n", - cdls->cdls_count, (cdls->cdls_count > 1) ? "s" : ""); - - trace_print_to_console(&header, mask, - string_buf, needed, file, fn); - - trace_put_console_buffer(string_buf); - cdls->cdls_count = 0; - } - - return 0; -} -EXPORT_SYMBOL(spl_debug_msg); - -/* Do the collect_pages job on a single CPU: assumes that all other - * CPUs have been stopped during a panic. If this isn't true for - * some arch, this will have to be implemented separately in each arch. - */ -static void -collect_pages_from_single_cpu(struct page_collection *pc) -{ - struct trace_cpu_data *tcd; - int i, j; - - tcd_for_each(tcd, i, j) { - list_splice_init(&tcd->tcd_pages, &pc->pc_pages); - tcd->tcd_cur_pages = 0; - } -} - -static void -collect_pages_on_all_cpus(struct page_collection *pc) -{ - struct trace_cpu_data *tcd; - int i, cpu; - - spin_lock(&pc->pc_lock); - for_each_possible_cpu(cpu) { - tcd_for_each_type_lock(tcd, i, cpu) { - list_splice_init(&tcd->tcd_pages, &pc->pc_pages); - tcd->tcd_cur_pages = 0; - } - } - spin_unlock(&pc->pc_lock); -} - -static void -collect_pages(dumplog_priv_t *dp, struct page_collection *pc) -{ - INIT_LIST_HEAD(&pc->pc_pages); - - if (spl_panic_in_progress || dp->dp_flags & DL_SINGLE_CPU) - collect_pages_from_single_cpu(pc); - else - collect_pages_on_all_cpus(pc); -} - -static void -put_pages_back_on_all_cpus(struct page_collection *pc) -{ - struct trace_cpu_data *tcd; - struct list_head *cur_head; - struct trace_page *tage; - struct trace_page *tmp; - int i, cpu; - - spin_lock(&pc->pc_lock); - - for_each_possible_cpu(cpu) { - tcd_for_each_type_lock(tcd, i, cpu) { - cur_head = tcd->tcd_pages.next; - - list_for_each_entry_safe(tage, tmp, &pc->pc_pages, - linkage) { - if (tage->cpu != cpu || tage->type != i) - continue; - - tage_to_tail(tage, cur_head); - tcd->tcd_cur_pages++; - } - } - } - - spin_unlock(&pc->pc_lock); -} - -static void -put_pages_back(struct page_collection *pc) -{ - if (!spl_panic_in_progress) - put_pages_back_on_all_cpus(pc); -} - -static int -spl_debug_dump_all_pages(dumplog_priv_t *dp, char *filename) -{ - struct page_collection pc; - struct file *filp; - struct trace_page *tage; - struct trace_page *tmp; - mm_segment_t oldfs; - int rc = 0; - - down_write(&trace_sem); - - filp = spl_filp_open(filename, O_CREAT|O_EXCL|O_WRONLY|O_LARGEFILE, - 0600, &rc); - if (filp == NULL) { - if (rc != -EEXIST) - printk(KERN_ERR "SPL: Can't open %s for dump: %d\n", - filename, rc); - goto out; - } - - spin_lock_init(&pc.pc_lock); - collect_pages(dp, &pc); - if (list_empty(&pc.pc_pages)) { - rc = 0; - goto close; - } - - oldfs = get_fs(); - set_fs(get_ds()); - - list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { - rc = spl_filp_write(filp, page_address(tage->page), - tage->used, spl_filp_poff(filp)); - if (rc != (int)tage->used) { - printk(KERN_WARNING "SPL: Wanted to write %u " - "but wrote %d\n", tage->used, rc); - put_pages_back(&pc); - __ASSERT(list_empty(&pc.pc_pages)); - break; - } - list_del(&tage->linkage); - tage_free(tage); - } - - set_fs(oldfs); - - rc = spl_filp_fsync(filp, 1); - if (rc) - printk(KERN_ERR "SPL: Unable to sync: %d\n", rc); - close: - spl_filp_close(filp); - out: - up_write(&trace_sem); - - return rc; -} - -static void -spl_debug_flush_pages(void) -{ - dumplog_priv_t dp; - struct page_collection pc; - struct trace_page *tage; - struct trace_page *tmp; - - spin_lock_init(&pc.pc_lock); - init_waitqueue_head(&dp.dp_waitq); - dp.dp_pid = current->pid; - dp.dp_flags = 0; - atomic_set(&dp.dp_done, 0); - - collect_pages(&dp, &pc); - list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) { - list_del(&tage->linkage); - tage_free(tage); - } -} - -unsigned long -spl_debug_set_mask(unsigned long mask) { - spl_debug_mask = mask; - return 0; -} -EXPORT_SYMBOL(spl_debug_set_mask); - -unsigned long -spl_debug_get_mask(void) { - return spl_debug_mask; -} -EXPORT_SYMBOL(spl_debug_get_mask); - -unsigned long -spl_debug_set_subsys(unsigned long subsys) { - spl_debug_subsys = subsys; - return 0; -} -EXPORT_SYMBOL(spl_debug_set_subsys); - -unsigned long -spl_debug_get_subsys(void) { - return spl_debug_subsys; -} -EXPORT_SYMBOL(spl_debug_get_subsys); - -int -spl_debug_set_mb(int mb) -{ - int i, j, pages; - int limit = trace_max_debug_mb(); - struct trace_cpu_data *tcd; - - if (mb < num_possible_cpus()) { - printk(KERN_ERR "SPL: Refusing to set debug buffer size to " - "%dMB - lower limit is %d\n", mb, num_possible_cpus()); - return -EINVAL; - } - - if (mb > limit) { - printk(KERN_ERR "SPL: Refusing to set debug buffer size to " - "%dMB - upper limit is %d\n", mb, limit); - return -EINVAL; - } - - mb /= num_possible_cpus(); - pages = mb << (20 - PAGE_SHIFT); - - down_write(&trace_sem); - - tcd_for_each(tcd, i, j) - tcd->tcd_max_pages = (pages * tcd->tcd_pages_factor) / 100; - - up_write(&trace_sem); - - return 0; -} -EXPORT_SYMBOL(spl_debug_set_mb); - -int -spl_debug_get_mb(void) -{ - int i, j; - struct trace_cpu_data *tcd; - int total_pages = 0; - - down_read(&trace_sem); - - tcd_for_each(tcd, i, j) - total_pages += tcd->tcd_max_pages; - - up_read(&trace_sem); - - return (total_pages >> (20 - PAGE_SHIFT)) + 1; -} -EXPORT_SYMBOL(spl_debug_get_mb); - -/* - * Limit the number of stack traces dumped to not more than 5 every - * 60 seconds to prevent denial-of-service attacks from debug code. - */ -DEFINE_RATELIMIT_STATE(dumpstack_ratelimit_state, 60 * HZ, 5); - -void -spl_debug_dumpstack(struct task_struct *tsk) -{ - if (__ratelimit(&dumpstack_ratelimit_state)) { - if (tsk == NULL) - tsk = current; - - printk("SPL: Showing stack for process %d\n", tsk->pid); - dump_stack(); - } -} -EXPORT_SYMBOL(spl_debug_dumpstack); - -void spl_debug_bug(char *file, const char *func, const int line, int flags) -{ - spl_debug_catastrophe = 1; - spl_debug_msg(NULL, 0, SD_EMERG, file, func, line, "SPL PANIC\n"); - - if (in_interrupt()) - panic("SPL PANIC in interrupt.\n"); - - if (in_atomic() || irqs_disabled()) - flags |= DL_NOTHREAD; - - /* Ensure all debug pages and dumped by current cpu */ - if (spl_debug_panic_on_bug) - spl_panic_in_progress = 1; - - spl_debug_dumpstack(NULL); - - if (spl_debug_panic_on_bug) { - spl_debug_dumplog(flags); - panic("SPL PANIC"); - } - - set_task_state(current, TASK_UNINTERRUPTIBLE); - while (1) - schedule(); -} -EXPORT_SYMBOL(spl_debug_bug); - -int -spl_debug_clear_buffer(void) -{ - spl_debug_flush_pages(); - return 0; -} -EXPORT_SYMBOL(spl_debug_clear_buffer); - -int -spl_debug_mark_buffer(char *text) -{ - SDEBUG(SD_WARNING, "*************************************\n"); - SDEBUG(SD_WARNING, "DEBUG MARKER: %s\n", text); - SDEBUG(SD_WARNING, "*************************************\n"); - - return 0; -} -EXPORT_SYMBOL(spl_debug_mark_buffer); - -static int -trace_init(int max_pages) -{ - struct trace_cpu_data *tcd; - int i, j; - - init_rwsem(&trace_sem); - - /* initialize trace_data */ - memset(trace_data, 0, sizeof(trace_data)); - for (i = 0; i < TCD_TYPE_MAX; i++) { - trace_data[i] = kmalloc(sizeof(union trace_data_union) * - NR_CPUS, GFP_KERNEL); - if (trace_data[i] == NULL) - goto out; - } - - tcd_for_each(tcd, i, j) { - spin_lock_init(&tcd->tcd_lock); - tcd->tcd_pages_factor = pages_factor[i]; - tcd->tcd_type = i; - tcd->tcd_cpu = j; - INIT_LIST_HEAD(&tcd->tcd_pages); - INIT_LIST_HEAD(&tcd->tcd_stock_pages); - tcd->tcd_cur_pages = 0; - tcd->tcd_cur_stock_pages = 0; - tcd->tcd_max_pages = (max_pages * pages_factor[i]) / 100; - tcd->tcd_shutting_down = 0; - } - - for (i = 0; i < num_possible_cpus(); i++) { - for (j = 0; j < 3; j++) { - trace_console_buffers[i][j] = - kmalloc(TRACE_CONSOLE_BUFFER_SIZE, - GFP_KERNEL); - - if (trace_console_buffers[i][j] == NULL) - goto out; - } - } - - return 0; -out: - trace_fini(); - printk(KERN_ERR "SPL: Insufficient memory for debug logs\n"); - return -ENOMEM; -} - -int -spl_debug_init(void) -{ - int rc, max = spl_debug_mb; - - spl_console_max_delay = SPL_DEFAULT_MAX_DELAY; - spl_console_min_delay = SPL_DEFAULT_MIN_DELAY; - - /* If spl_debug_mb is set to an invalid value or uninitialized - * then just make the total buffers smp_num_cpus TCD_MAX_PAGES */ - if (max > (totalram_pages >> (20 - 2 - PAGE_SHIFT)) / 5 || - max >= 512 || max < 0) { - max = TCD_MAX_PAGES; - } else { - max = (max / num_online_cpus()) << (20 - PAGE_SHIFT); - } - - rc = trace_init(max); - if (rc) - return rc; - - return rc; -} - -static void -trace_cleanup_on_all_cpus(void) -{ - struct trace_cpu_data *tcd; - struct trace_page *tage; - struct trace_page *tmp; - int i, cpu; - - for_each_possible_cpu(cpu) { - tcd_for_each_type_lock(tcd, i, cpu) { - tcd->tcd_shutting_down = 1; - - list_for_each_entry_safe(tage, tmp, &tcd->tcd_pages, - linkage) { - list_del(&tage->linkage); - tage_free(tage); - } - tcd->tcd_cur_pages = 0; - } - } -} - -static void -trace_fini(void) -{ - int i, j; - - trace_cleanup_on_all_cpus(); - - for (i = 0; i < num_possible_cpus(); i++) { - for (j = 0; j < 3; j++) { - if (trace_console_buffers[i][j] != NULL) { - kfree(trace_console_buffers[i][j]); - trace_console_buffers[i][j] = NULL; - } - } - } - - for (i = 0; i < TCD_TYPE_MAX && trace_data[i] != NULL; i++) { - kfree(trace_data[i]); - trace_data[i] = NULL; - } -} - -void -spl_debug_fini(void) -{ - trace_fini(); -} - -#endif /* DEBUG_LOG */ diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 2706f9bd1..14ff8a337 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -26,66 +26,81 @@ #include #include -#include +#include -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif +/* + * Limit the number of stack traces dumped to not more than 5 every + * 60 seconds to prevent denial-of-service attacks from debug code. + */ +DEFINE_RATELIMIT_STATE(dumpstack_ratelimit_state, 60 * HZ, 5); -#define SS_DEBUG_SUBSYS SS_GENERIC - -#ifdef DEBUG_LOG -static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" }; -static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" }; -#endif +void +spl_dumpstack(void) +{ + if (__ratelimit(&dumpstack_ratelimit_state)) { + printk("Showing stack for process %d\n", current->pid); + dump_stack(); + } +} +EXPORT_SYMBOL(spl_dumpstack); int -spl_PANIC(char *filename, const char *functionname, - int lineno, const char *fmt, ...) { +spl_panic(const char *file, const char *func, int line, const char *fmt, ...) { + const char *newfile; char msg[MAXMSGLEN]; va_list ap; + newfile = strrchr(file, '/'); + if (newfile != NULL) + newfile = newfile + 1; + else + newfile = file; + va_start(ap, fmt); - if (vsnprintf(msg, sizeof (msg), fmt, ap) == sizeof (msg)) - msg[sizeof (msg) - 1] = '\0'; + (void) vsnprintf(msg, sizeof (msg), fmt, ap); va_end(ap); -#ifdef NDEBUG + printk(KERN_EMERG "%s", msg); -#else - spl_debug_msg(NULL, 0, 0, - filename, functionname, lineno, "%s", msg); -#endif - spl_debug_bug(filename, functionname, lineno, 0); - return 1; + printk(KERN_EMERG "PANIC at %s:%d:%s()\n", newfile, line, func); + spl_dumpstack(); + + /* Halt the thread to facilitate further debugging */ + set_task_state(current, TASK_UNINTERRUPTIBLE); + while (1) + schedule(); + + /* Unreachable */ + return (1); } -EXPORT_SYMBOL(spl_PANIC); - -void -vpanic(const char *fmt, va_list ap) -{ - char msg[MAXMSGLEN]; - - vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); - PANIC("%s", msg); -} /* vpanic() */ -EXPORT_SYMBOL(vpanic); +EXPORT_SYMBOL(spl_panic); void vcmn_err(int ce, const char *fmt, va_list ap) { char msg[MAXMSGLEN]; - if (ce == CE_PANIC) - vpanic(fmt, ap); + vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); - if (ce != CE_NOTE) { - vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); + switch (ce) { + case CE_IGNORE: + break; + case CE_CONT: + printk("%s", msg); + break; + case CE_NOTE: + printk(KERN_NOTICE "NOTICE: %s\n", msg); + break; + case CE_WARN: + printk(KERN_WARNING "WARNING: %s\n", msg); + break; + case CE_PANIC: + printk(KERN_EMERG "PANIC: %s\n", msg); + spl_dumpstack(); - if (fmt[0] == '!') - SDEBUG(SD_INFO, "%s%s%s", - ce_prefix[ce], msg, ce_suffix[ce]); - else - SERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]); + /* Halt the thread to facilitate further debugging */ + set_task_state(current, TASK_UNINTERRUPTIBLE); + while (1) + schedule(); } } /* vcmn_err() */ EXPORT_SYMBOL(vcmn_err); @@ -100,4 +115,3 @@ cmn_err(int ce, const char *fmt, ...) va_end(ap); } /* cmn_err() */ EXPORT_SYMBOL(cmn_err); - diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index fd68789bc..ecfb663de 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -40,13 +40,6 @@ #include #include #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_GENERIC char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; EXPORT_SYMBOL(spl_version); @@ -490,39 +483,36 @@ __init spl_init(void) { int rc = 0; - if ((rc = spl_debug_init())) - return rc; - if ((rc = spl_kmem_init())) - SGOTO(out1, rc); + goto out1; if ((rc = spl_mutex_init())) - SGOTO(out2, rc); + goto out2; if ((rc = spl_rw_init())) - SGOTO(out3, rc); + goto out3; if ((rc = spl_taskq_init())) - SGOTO(out4, rc); + goto out4; if ((rc = spl_vn_init())) - SGOTO(out5, rc); + goto out5; if ((rc = spl_proc_init())) - SGOTO(out6, rc); + goto out6; if ((rc = spl_kstat_init())) - SGOTO(out7, rc); + goto out7; if ((rc = spl_tsd_init())) - SGOTO(out8, rc); + goto out8; if ((rc = spl_zlib_init())) - SGOTO(out9, rc); + goto out9; printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); - SRETURN(rc); + return (rc); out9: spl_tsd_fini(); @@ -541,19 +531,16 @@ out3: out2: spl_kmem_fini(); out1: - spl_debug_fini(); - printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer " "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR, rc); + return rc; } static void spl_fini(void) { - SENTRY; - printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); spl_zlib_fini(); @@ -565,7 +552,6 @@ spl_fini(void) spl_rw_fini(); spl_mutex_fini(); spl_kmem_fini(); - spl_debug_fini(); } /* Called when a dependent module is loaded */ diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 65aa27739..37849f504 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -25,13 +25,6 @@ \*****************************************************************************/ #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_KMEM /* * Within the scope of spl-kmem.c file the kmem_cache_* definitions @@ -265,7 +258,6 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void * struct hlist_node *node; struct kmem_debug *p; unsigned long flags; - SENTRY; spin_lock_irqsave(lock, flags); @@ -282,7 +274,7 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void * spin_unlock_irqrestore(lock, flags); - SRETURN(NULL); + return (NULL); } void * @@ -292,28 +284,26 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, void *ptr = NULL; kmem_debug_t *dptr; unsigned long irq_flags; - SENTRY; /* Function may be called with KM_NOSLEEP so failure is possible */ dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); if (unlikely(dptr == NULL)) { - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug " - "kmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", - sizeof(kmem_debug_t), flags, func, line, - kmem_alloc_used_read(), kmem_alloc_max); + printk(KERN_WARNING "debug kmem_alloc(%ld, 0x%x) at %s:%d " + "failed (%lld/%llu)\n", sizeof(kmem_debug_t), flags, + func, line, kmem_alloc_used_read(), kmem_alloc_max); } else { /* * Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ if (unlikely((size > PAGE_SIZE*2) && !(flags & KM_NODEBUG))) { - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "large " - "kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, + printk(KERN_WARNING "large kmem_alloc(%llu, 0x%x) " + "at %s:%d failed (%lld/%llu)\n", + (unsigned long long)size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); - spl_debug_dumpstack(NULL); + spl_dumpstack(); } /* @@ -325,9 +315,9 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, - "debug __strdup() at %s:%d failed (%lld/%llu)\n", - func, line, kmem_alloc_used_read(), kmem_alloc_max); + printk(KERN_WARNING "debug __strdup() at %s:%d " + "failed (%lld/%llu)\n", func, line, + kmem_alloc_used_read(), kmem_alloc_max); goto out; } @@ -344,8 +334,8 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, if (unlikely(ptr == NULL)) { kfree(dptr->kd_func); kfree(dptr); - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "kmem_alloc" - "(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", + printk(KERN_WARNING "kmem_alloc(%llu, 0x%x) " + "at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); goto out; @@ -367,14 +357,9 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, &kmem_table[hash_ptr(ptr, KMEM_HASH_BITS)]); list_add_tail(&dptr->kd_list, &kmem_list); spin_unlock_irqrestore(&kmem_lock, irq_flags); - - SDEBUG_LIMIT(SD_INFO, - "kmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, ptr, - kmem_alloc_used_read(), kmem_alloc_max); } out: - SRETURN(ptr); + return (ptr); } EXPORT_SYMBOL(kmem_alloc_track); @@ -382,14 +367,12 @@ void kmem_free_track(const void *ptr, size_t size) { kmem_debug_t *dptr; - SENTRY; ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); - dptr = kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr); - /* Must exist in hash due to kmem_alloc() */ + dptr = kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr); ASSERT(dptr); /* Size must match */ @@ -398,10 +381,6 @@ kmem_free_track(const void *ptr, size_t size) (unsigned long long) size, dptr->kd_func, dptr->kd_line); kmem_alloc_used_sub(size); - SDEBUG_LIMIT(SD_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, kmem_alloc_used_read(), - kmem_alloc_max); - kfree(dptr->kd_func); memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); @@ -409,8 +388,6 @@ kmem_free_track(const void *ptr, size_t size) memset((void *)ptr, 0x5a, size); kfree(ptr); - - SEXIT; } EXPORT_SYMBOL(kmem_free_track); @@ -420,7 +397,6 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) void *ptr = NULL; kmem_debug_t *dptr; unsigned long irq_flags; - SENTRY; ASSERT(flags & KM_SLEEP); @@ -428,8 +404,8 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags & ~__GFP_ZERO); if (unlikely(dptr == NULL)) { - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "debug " - "vmem_alloc(%ld, 0x%x) at %s:%d failed (%lld/%llu)\n", + printk(KERN_WARNING "debug vmem_alloc(%ld, 0x%x) " + "at %s:%d failed (%lld/%llu)\n", sizeof(kmem_debug_t), flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); } else { @@ -443,9 +419,9 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); if (unlikely(dptr->kd_func == NULL)) { kfree(dptr); - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, - "debug __strdup() at %s:%d failed (%lld/%llu)\n", - func, line, vmem_alloc_used_read(), vmem_alloc_max); + printk(KERN_WARNING "debug __strdup() at %s:%d " + "failed (%lld/%llu)\n", func, line, + vmem_alloc_used_read(), vmem_alloc_max); goto out; } @@ -459,8 +435,8 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) if (unlikely(ptr == NULL)) { kfree(dptr->kd_func); kfree(dptr); - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "vmem_alloc" - "(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", + printk(KERN_WARNING "vmem_alloc (%llu, 0x%x) " + "at %s:%d failed (%lld/%llu)\n", (unsigned long long) size, flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); goto out; @@ -482,14 +458,9 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) &vmem_table[hash_ptr(ptr, VMEM_HASH_BITS)]); list_add_tail(&dptr->kd_list, &vmem_list); spin_unlock_irqrestore(&vmem_lock, irq_flags); - - SDEBUG_LIMIT(SD_INFO, - "vmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, - ptr, vmem_alloc_used_read(), vmem_alloc_max); } out: - SRETURN(ptr); + return (ptr); } EXPORT_SYMBOL(vmem_alloc_track); @@ -497,14 +468,12 @@ void vmem_free_track(const void *ptr, size_t size) { kmem_debug_t *dptr; - SENTRY; ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, (unsigned long long) size); - dptr = kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr); - /* Must exist in hash due to vmem_alloc() */ + dptr = kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr); ASSERT(dptr); /* Size must match */ @@ -513,10 +482,6 @@ vmem_free_track(const void *ptr, size_t size) (unsigned long long) size, dptr->kd_func, dptr->kd_line); vmem_alloc_used_sub(size); - SDEBUG_LIMIT(SD_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, vmem_alloc_used_read(), - vmem_alloc_max); - kfree(dptr->kd_func); memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); @@ -524,8 +489,6 @@ vmem_free_track(const void *ptr, size_t size) memset((void *)ptr, 0x5a, size); vfree(ptr); - - SEXIT; } EXPORT_SYMBOL(vmem_free_track); @@ -536,18 +499,17 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, int node_alloc, int node) { void *ptr; - SENTRY; /* * Marked unlikely because we should never be doing this, * we tolerate to up 2 pages but a single page is best. */ if (unlikely((size > PAGE_SIZE * 2) && !(flags & KM_NODEBUG))) { - SDEBUG(SD_CONSOLE | SD_WARNING, + printk(KERN_WARNING "large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, - kmem_alloc_used_read(), kmem_alloc_max); - spl_debug_dumpstack(NULL); + (unsigned long long)size, flags, func, line, + (unsigned long long)kmem_alloc_used_read(), kmem_alloc_max); + spl_dumpstack(); } /* Use the correct allocator */ @@ -561,40 +523,26 @@ kmem_alloc_debug(size_t size, int flags, const char *func, int line, } if (unlikely(ptr == NULL)) { - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, + printk(KERN_WARNING "kmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, - kmem_alloc_used_read(), kmem_alloc_max); + (unsigned long long)size, flags, func, line, + (unsigned long long)kmem_alloc_used_read(), kmem_alloc_max); } else { kmem_alloc_used_add(size); if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) kmem_alloc_max = kmem_alloc_used_read(); - - SDEBUG_LIMIT(SD_INFO, - "kmem_alloc(%llu, 0x%x) at %s:%d = %p (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, ptr, - kmem_alloc_used_read(), kmem_alloc_max); } - SRETURN(ptr); + return (ptr); } EXPORT_SYMBOL(kmem_alloc_debug); void kmem_free_debug(const void *ptr, size_t size) { - SENTRY; - - ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, - (unsigned long long) size); - + ASSERT(ptr || size > 0); kmem_alloc_used_sub(size); - SDEBUG_LIMIT(SD_INFO, "kmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, kmem_alloc_used_read(), - kmem_alloc_max); kfree(ptr); - - SEXIT; } EXPORT_SYMBOL(kmem_free_debug); @@ -602,7 +550,6 @@ void * vmem_alloc_debug(size_t size, int flags, const char *func, int line) { void *ptr; - SENTRY; ASSERT(flags & KM_SLEEP); @@ -614,39 +561,26 @@ vmem_alloc_debug(size_t size, int flags, const char *func, int line) } if (unlikely(ptr == NULL)) { - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, + printk(KERN_WARNING "vmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, - vmem_alloc_used_read(), vmem_alloc_max); + (unsigned long long)size, flags, func, line, + (unsigned long long)vmem_alloc_used_read(), vmem_alloc_max); } else { vmem_alloc_used_add(size); if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) vmem_alloc_max = vmem_alloc_used_read(); - - SDEBUG_LIMIT(SD_INFO, "vmem_alloc(%llu, 0x%x) = %p " - "(%lld/%llu)\n", (unsigned long long) size, flags, ptr, - vmem_alloc_used_read(), vmem_alloc_max); } - SRETURN(ptr); + return (ptr); } EXPORT_SYMBOL(vmem_alloc_debug); void vmem_free_debug(const void *ptr, size_t size) { - SENTRY; - - ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, - (unsigned long long) size); - + ASSERT(ptr || size > 0); vmem_alloc_used_sub(size); - SDEBUG_LIMIT(SD_INFO, "vmem_free(%p, %llu) (%lld/%llu)\n", ptr, - (unsigned long long) size, vmem_alloc_used_read(), - vmem_alloc_max); vfree(ptr); - - SEXIT; } EXPORT_SYMBOL(vmem_free_debug); @@ -833,7 +767,7 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) base = kv_alloc(skc, skc->skc_slab_size, flags); if (base == NULL) - SRETURN(NULL); + return (NULL); sks = (spl_kmem_slab_t *)base; sks->sks_magic = SKS_MAGIC; @@ -851,8 +785,10 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) for (i = 0; i < sks->sks_objs; i++) { if (skc->skc_flags & KMC_OFFSLAB) { obj = kv_alloc(skc, offslab_size, flags); - if (!obj) - SGOTO(out, rc = -ENOMEM); + if (!obj) { + rc = -ENOMEM; + goto out; + } } else { obj = base + spl_sks_size(skc) + (i * obj_size); } @@ -877,7 +813,7 @@ out: sks = NULL; } - SRETURN(sks); + return (sks); } /* @@ -890,7 +826,6 @@ spl_slab_free(spl_kmem_slab_t *sks, struct list_head *sks_list, struct list_head *sko_list) { spl_kmem_cache_t *skc; - SENTRY; ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(sks->sks_ref == 0); @@ -910,8 +845,6 @@ spl_slab_free(spl_kmem_slab_t *sks, list_del(&sks->sks_list); list_add(&sks->sks_list, sks_list); list_splice_init(&sks->sks_free_list, sko_list); - - SEXIT; } /* @@ -931,7 +864,6 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) LIST_HEAD(sko_list); uint32_t size = 0; int i = 0; - SENTRY; /* * Move empty slabs and objects which have not been touched in @@ -979,8 +911,6 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) ASSERT(sks->sks_magic == SKS_MAGIC); kv_free(skc, sks, skc->skc_slab_size); } - - SEXIT; } static spl_kmem_emergency_t * @@ -1037,23 +967,22 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) { spl_kmem_emergency_t *ske; int empty; - SENTRY; /* Last chance use a partial slab if one now exists */ spin_lock(&skc->skc_lock); empty = list_empty(&skc->skc_partial_list); spin_unlock(&skc->skc_lock); if (!empty) - SRETURN(-EEXIST); + return (-EEXIST); ske = kmalloc(sizeof(*ske), flags); if (ske == NULL) - SRETURN(-ENOMEM); + return (-ENOMEM); ske->ske_obj = kmalloc(skc->skc_obj_size, flags); if (ske->ske_obj == NULL) { kfree(ske); - SRETURN(-ENOMEM); + return (-ENOMEM); } spin_lock(&skc->skc_lock); @@ -1069,12 +998,12 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) if (unlikely(!empty)) { kfree(ske->ske_obj); kfree(ske); - SRETURN(-EINVAL); + return (-EINVAL); } *obj = ske->ske_obj; - SRETURN(0); + return (0); } /* @@ -1084,7 +1013,6 @@ static int spl_emergency_free(spl_kmem_cache_t *skc, void *obj) { spl_kmem_emergency_t *ske; - SENTRY; spin_lock(&skc->skc_lock); ske = spl_emergency_search(&skc->skc_emergency_tree, obj); @@ -1096,12 +1024,12 @@ spl_emergency_free(spl_kmem_cache_t *skc, void *obj) spin_unlock(&skc->skc_lock); if (unlikely(ske == NULL)) - SRETURN(-ENOENT); + return (-ENOENT); kfree(ske->ske_obj); kfree(ske); - SRETURN(0); + return (0); } /* @@ -1112,7 +1040,6 @@ static void __spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) { int i, count = MIN(flush, skm->skm_avail); - SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); @@ -1124,8 +1051,6 @@ __spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) skm->skm_avail -= count; memmove(skm->skm_objs, &(skm->skm_objs[count]), sizeof(void *) * skm->skm_avail); - - SEXIT; } static void @@ -1227,7 +1152,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) if (skc->skc_flags & KMC_OFFSLAB) { *objs = spl_kmem_cache_obj_per_slab; *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), PAGE_SIZE); - SRETURN(0); + return (0); } else { sks_size = spl_sks_size(skc); obj_size = spl_obj_size(skc); @@ -1241,7 +1166,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) for (*size = PAGE_SIZE; *size <= max_size; *size *= 2) { *objs = (*size - sks_size) / obj_size; if (*objs >= spl_kmem_cache_obj_per_slab) - SRETURN(0); + return (0); } /* @@ -1252,10 +1177,10 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) *size = max_size; *objs = (*size - sks_size) / obj_size; if (*objs >= (spl_kmem_cache_obj_per_slab_min)) - SRETURN(0); + return (0); } - SRETURN(-ENOSPC); + return (-ENOSPC); } /* @@ -1268,7 +1193,6 @@ spl_magazine_size(spl_kmem_cache_t *skc) { uint32_t obj_size = spl_obj_size(skc); int size; - SENTRY; /* Per-magazine sizes below assume a 4Kib page size */ if (obj_size > (PAGE_SIZE * 256)) @@ -1282,7 +1206,7 @@ spl_magazine_size(spl_kmem_cache_t *skc) else size = 256; - SRETURN(size); + return (size); } /* @@ -1294,7 +1218,6 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) spl_kmem_magazine_t *skm; int size = sizeof(spl_kmem_magazine_t) + sizeof(void *) * skc->skc_mag_size; - SENTRY; skm = kmem_alloc_node(size, KM_SLEEP, cpu_to_node(cpu)); if (skm) { @@ -1307,7 +1230,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) skm->skm_cpu = cpu; } - SRETURN(skm); + return (skm); } /* @@ -1319,12 +1242,10 @@ spl_magazine_free(spl_kmem_magazine_t *skm) int size = sizeof(spl_kmem_magazine_t) + sizeof(void *) * skm->skm_size; - SENTRY; ASSERT(skm->skm_magic == SKM_MAGIC); ASSERT(skm->skm_avail == 0); kmem_free(skm, size); - SEXIT; } /* @@ -1334,10 +1255,9 @@ static int spl_magazine_create(spl_kmem_cache_t *skc) { int i; - SENTRY; if (skc->skc_flags & KMC_NOMAGAZINE) - SRETURN(0); + return (0); skc->skc_mag_size = spl_magazine_size(skc); skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; @@ -1348,11 +1268,11 @@ spl_magazine_create(spl_kmem_cache_t *skc) for (i--; i >= 0; i--) spl_magazine_free(skc->skc_mag[i]); - SRETURN(-ENOMEM); + return (-ENOMEM); } } - SRETURN(0); + return (0); } /* @@ -1363,20 +1283,15 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) { spl_kmem_magazine_t *skm; int i; - SENTRY; - if (skc->skc_flags & KMC_NOMAGAZINE) { - SEXIT; + if (skc->skc_flags & KMC_NOMAGAZINE) return; - } for_each_online_cpu(i) { skm = skc->skc_mag[i]; spl_cache_flush(skc, skm, skm->skm_avail); spl_magazine_free(skm); } - - SEXIT; } /* @@ -1409,11 +1324,13 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, { spl_kmem_cache_t *skc; int rc; - SENTRY; - ASSERTF(!(flags & KMC_NOMAGAZINE), "Bad KMC_NOMAGAZINE (%x)\n", flags); - ASSERTF(!(flags & KMC_NOHASH), "Bad KMC_NOHASH (%x)\n", flags); - ASSERTF(!(flags & KMC_QCACHE), "Bad KMC_QCACHE (%x)\n", flags); + /* + * Unsupported flags + */ + ASSERT0(flags & KMC_NOMAGAZINE); + ASSERT0(flags & KMC_NOHASH); + ASSERT0(flags & KMC_QCACHE); ASSERT(vmp == NULL); might_sleep(); @@ -1427,14 +1344,14 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, */ skc = kmem_zalloc(sizeof(*skc), KM_SLEEP| KM_NODEBUG); if (skc == NULL) - SRETURN(NULL); + return (NULL); skc->skc_magic = SKC_MAGIC; skc->skc_name_size = strlen(name) + 1; skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, KM_SLEEP); if (skc->skc_name == NULL) { kmem_free(skc, sizeof(*skc)); - SRETURN(NULL); + return (NULL); } strncpy(skc->skc_name, name, skc->skc_name_size); @@ -1519,16 +1436,18 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, rc = spl_slab_size(skc, &skc->skc_slab_objs, &skc->skc_slab_size); if (rc) - SGOTO(out, rc); + goto out; rc = spl_magazine_create(skc); if (rc) - SGOTO(out, rc); + goto out; } else { skc->skc_linux_cache = kmem_cache_create( skc->skc_name, size, align, 0, NULL); - if (skc->skc_linux_cache == NULL) - SGOTO(out, rc = ENOMEM); + if (skc->skc_linux_cache == NULL) { + rc = ENOMEM; + goto out; + } kmem_cache_set_allocflags(skc, __GFP_COMP); skc->skc_flags |= KMC_NOMAGAZINE; @@ -1543,11 +1462,11 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, list_add_tail(&skc->skc_list, &spl_kmem_cache_list); up_write(&spl_kmem_cache_sem); - SRETURN(skc); + return (skc); out: kmem_free(skc->skc_name, skc->skc_name_size); kmem_free(skc, sizeof(*skc)); - SRETURN(NULL); + return (NULL); } EXPORT_SYMBOL(spl_kmem_cache_create); @@ -1571,7 +1490,6 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) { DECLARE_WAIT_QUEUE_HEAD(wq); taskqid_t id; - SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skc->skc_flags & (KMC_KMEM | KMC_VMEM | KMC_SLAB)); @@ -1617,8 +1535,6 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) spin_unlock(&skc->skc_lock); kmem_free(skc, sizeof(*skc)); - - SEXIT; } EXPORT_SYMBOL(spl_kmem_cache_destroy); @@ -1708,7 +1624,6 @@ static int spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) { int remaining, rc; - SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT((skc->skc_flags & KMC_SLAB) == 0); @@ -1722,7 +1637,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, TASK_UNINTERRUPTIBLE); - SRETURN(rc ? rc : -EAGAIN); + return (rc ? rc : -EAGAIN); } /* @@ -1738,7 +1653,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) if (ska == NULL) { clear_bit(KMC_BIT_GROWING, &skc->skc_flags); wake_up_all(&skc->skc_waitq); - SRETURN(-ENOMEM); + return (-ENOMEM); } atomic_inc(&skc->skc_ref); @@ -1776,7 +1691,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) rc = -ENOMEM; } - SRETURN(rc); + return (rc); } /* @@ -1792,7 +1707,6 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) spl_kmem_slab_t *sks; int count = 0, rc, refill; void *obj = NULL; - SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); @@ -1811,14 +1725,14 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) /* Emergency object for immediate use by caller */ if (rc == 0 && obj != NULL) - SRETURN(obj); + return (obj); if (rc) - SGOTO(out, rc); + goto out; /* Rescheduled to different CPU skm is not local */ if (skm != skc->skc_mag[smp_processor_id()]) - SGOTO(out, rc); + goto out; /* Potentially rescheduled to the same CPU but * allocations may have occurred from this CPU while @@ -1853,7 +1767,7 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) spin_unlock(&skc->skc_lock); out: - SRETURN(NULL); + return (NULL); } /* @@ -1864,7 +1778,6 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) { spl_kmem_slab_t *sks = NULL; spl_kmem_obj_t *sko = NULL; - SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(spin_is_locked(&skc->skc_lock)); @@ -1895,8 +1808,6 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) list_add_tail(&sks->sks_list, &skc->skc_partial_list); skc->skc_slab_alloc--; } - - SEXIT; } /* @@ -1908,7 +1819,6 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) { spl_kmem_magazine_t *skm; void *obj = NULL; - SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); @@ -1939,9 +1849,7 @@ restart: * the local magazine since this may have changed * when we need to grow the cache. */ skm = skc->skc_mag[smp_processor_id()]; - ASSERTF(skm->skm_magic == SKM_MAGIC, "%x != %x: %s/%p/%p %x/%x/%x\n", - skm->skm_magic, SKM_MAGIC, skc->skc_name, skc, skm, - skm->skm_size, skm->skm_refill, skm->skm_avail); + ASSERT(skm->skm_magic == SKM_MAGIC); if (likely(skm->skm_avail)) { /* Object available in CPU cache, use it */ @@ -1950,7 +1858,7 @@ restart: } else { obj = spl_cache_refill(skc, skm, flags); if (obj == NULL) - SGOTO(restart, obj = NULL); + goto restart; } local_irq_enable(); @@ -1968,7 +1876,7 @@ ret: atomic_dec(&skc->skc_ref); - SRETURN(obj); + return (obj); } EXPORT_SYMBOL(spl_kmem_cache_alloc); @@ -1984,7 +1892,6 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) { spl_kmem_magazine_t *skm; unsigned long flags; - SENTRY; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); @@ -2009,8 +1916,10 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) * are guaranteed to have physical addresses. They must be removed * from the tree of emergency objects and the freed. */ - if ((skc->skc_flags & KMC_VMEM) && !kmem_virt(obj)) - SGOTO(out, spl_emergency_free(skc, obj)); + if ((skc->skc_flags & KMC_VMEM) && !kmem_virt(obj)) { + spl_emergency_free(skc, obj); + goto out; + } local_irq_save(flags); @@ -2031,8 +1940,6 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) local_irq_restore(flags); out: atomic_dec(&skc->skc_ref); - - SEXIT; } EXPORT_SYMBOL(spl_kmem_cache_free); @@ -2113,8 +2020,6 @@ SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) { - SENTRY; - ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); @@ -2131,14 +2036,14 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) kmem_cache_shrink(skc->skc_linux_cache); - SGOTO(out, 0); + goto out; } /* * Prevent concurrent cache reaping when contended. */ if (test_and_set_bit(KMC_BIT_REAPING, &skc->skc_flags)) - SGOTO(out, 0); + goto out; /* * When a reclaim function is available it may be invoked repeatedly @@ -2190,8 +2095,6 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); out: atomic_dec(&skc->skc_ref); - - SEXIT; } EXPORT_SYMBOL(spl_kmem_cache_reap_now); @@ -2256,7 +2159,6 @@ static int spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) { int i; - SENTRY; spin_lock_init(lock); INIT_LIST_HEAD(list); @@ -2264,7 +2166,7 @@ spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) for (i = 0; i < size; i++) INIT_HLIST_HEAD(&kmem_table[i]); - SRETURN(0); + return (0); } static void @@ -2273,7 +2175,6 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) unsigned long flags; kmem_debug_t *kd; char str[17]; - SENTRY; spin_lock_irqsave(lock, flags); if (!list_empty(list)) @@ -2286,7 +2187,6 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) kd->kd_func, kd->kd_line); spin_unlock_irqrestore(lock, flags); - SEXIT; } #else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ #define spl_kmem_init_tracking(list, lock, size) @@ -2297,7 +2197,6 @@ int spl_kmem_init(void) { int rc = 0; - SENTRY; #ifdef DEBUG_KMEM kmem_alloc_used_set(0); @@ -2314,14 +2213,12 @@ spl_kmem_init(void) spl_register_shrinker(&spl_kmem_cache_shrinker); - SRETURN(rc); + return (rc); } void spl_kmem_fini(void) { - SENTRY; - spl_unregister_shrinker(&spl_kmem_cache_shrinker); taskq_destroy(spl_kmem_cache_taskq); @@ -2331,19 +2228,14 @@ spl_kmem_fini(void) * at that address to aid in debugging. Performance is not * a serious concern here since it is module unload time. */ if (kmem_alloc_used_read() != 0) - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, - "kmem leaked %ld/%ld bytes\n", + printk(KERN_WARNING "kmem leaked %ld/%llu bytes\n", kmem_alloc_used_read(), kmem_alloc_max); - if (vmem_alloc_used_read() != 0) - SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, - "vmem leaked %ld/%ld bytes\n", + printk(KERN_WARNING "vmem leaked %ld/%llu bytes\n", vmem_alloc_used_read(), vmem_alloc_max); spl_kmem_fini_tracking(&kmem_list, &kmem_lock); spl_kmem_fini_tracking(&vmem_list, &vmem_lock); #endif /* DEBUG_KMEM */ - - SEXIT; } diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index f14f47f5d..5b29fdb58 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -25,13 +25,6 @@ \*****************************************************************************/ #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_KOBJ struct _buf * kobj_open_file(const char *name) @@ -39,38 +32,34 @@ kobj_open_file(const char *name) struct _buf *file; vnode_t *vp; int rc; - SENTRY; file = kmalloc(sizeof(_buf_t), GFP_KERNEL); if (file == NULL) - SRETURN((_buf_t *)-1UL); + return ((_buf_t *)-1UL); if ((rc = vn_open(name, UIO_SYSSPACE, FREAD, 0644, &vp, 0, 0))) { kfree(file); - SRETURN((_buf_t *)-1UL); + return ((_buf_t *)-1UL); } file->vp = vp; - SRETURN(file); + return (file); } /* kobj_open_file() */ EXPORT_SYMBOL(kobj_open_file); void kobj_close_file(struct _buf *file) { - SENTRY; VOP_CLOSE(file->vp, 0, 0, 0, 0, 0); kfree(file); - SEXIT; } /* kobj_close_file() */ EXPORT_SYMBOL(kobj_close_file); int kobj_read_file(struct _buf *file, char *buf, ssize_t size, offset_t off) { - SENTRY; - SRETURN(vn_rdwr(UIO_READ, file->vp, buf, size, off, + return (vn_rdwr(UIO_READ, file->vp, buf, size, off, UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL)); } /* kobj_read_file() */ EXPORT_SYMBOL(kobj_read_file); @@ -80,14 +69,13 @@ kobj_get_filesize(struct _buf *file, uint64_t *size) { vattr_t vap; int rc; - SENTRY; rc = VOP_GETATTR(file->vp, &vap, 0, 0, NULL); if (rc) - SRETURN(rc); + return (rc); *size = vap.va_size; - SRETURN(rc); + return (rc); } /* kobj_get_filesize() */ EXPORT_SYMBOL(kobj_get_filesize); diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index c604a32f2..cb27ed3d3 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -26,13 +26,7 @@ #include #include -#include -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_KSTAT #ifndef HAVE_PDE_DATA #define PDE_DATA(x) (PDE(x)->data) #endif @@ -344,7 +338,6 @@ static void * kstat_seq_data_addr(kstat_t *ksp, loff_t n) { void *rc = NULL; - SENTRY; switch (ksp->ks_type) { case KSTAT_TYPE_RAW: @@ -369,7 +362,7 @@ kstat_seq_data_addr(kstat_t *ksp, loff_t n) PANIC("Undefined kstat type %d\n", ksp->ks_type); } - SRETURN(rc); + return (rc); } static void * @@ -378,7 +371,6 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) loff_t n = *pos; kstat_t *ksp = (kstat_t *)f->private; ASSERT(ksp->ks_magic == KS_MAGIC); - SENTRY; mutex_enter(ksp->ks_lock); @@ -393,12 +385,12 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) ksp->ks_snaptime = gethrtime(); if (!n && kstat_seq_show_headers(f)) - SRETURN(NULL); + return (NULL); if (n >= ksp->ks_ndata) - SRETURN(NULL); + return (NULL); - SRETURN(kstat_seq_data_addr(ksp, n)); + return (kstat_seq_data_addr(ksp, n)); } static void * @@ -406,13 +398,12 @@ kstat_seq_next(struct seq_file *f, void *p, loff_t *pos) { kstat_t *ksp = (kstat_t *)f->private; ASSERT(ksp->ks_magic == KS_MAGIC); - SENTRY; ++*pos; if (*pos >= ksp->ks_ndata) - SRETURN(NULL); + return (NULL); - SRETURN(kstat_seq_data_addr(ksp, *pos)); + return (kstat_seq_data_addr(ksp, *pos)); } static void @@ -689,19 +680,16 @@ EXPORT_SYMBOL(__kstat_delete); int spl_kstat_init(void) { - SENTRY; mutex_init(&kstat_module_lock, NULL, MUTEX_DEFAULT, NULL); INIT_LIST_HEAD(&kstat_module_list); kstat_id = 0; - SRETURN(0); + return (0); } void spl_kstat_fini(void) { - SENTRY; ASSERT(list_empty(&kstat_module_list)); mutex_destroy(&kstat_module_lock); - SEXIT; } diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 6ecc0c31c..137af7188 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -30,13 +30,6 @@ #include #include #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_PROC #if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) typedef struct ctl_table __no_const spl_ctl_table; @@ -110,209 +103,6 @@ proc_copyout_string(char *ubuffer, int ubuffer_size, return size; } -#ifdef DEBUG_LOG -static int -proc_dobitmasks(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - unsigned long *mask = table->data; - int is_subsys = (mask == &spl_debug_subsys) ? 1 : 0; - int is_printk = (mask == &spl_debug_printk) ? 1 : 0; - int size = 512, rc; - char *str; - SENTRY; - - str = kmem_alloc(size, KM_SLEEP); - if (str == NULL) - SRETURN(-ENOMEM); - - if (write) { - rc = proc_copyin_string(str, size, buffer, *lenp); - if (rc < 0) - SRETURN(rc); - - rc = spl_debug_str2mask(mask, str, is_subsys); - /* Always print BUG/ASSERT to console, so keep this mask */ - if (is_printk) - *mask |= SD_EMERG; - - *ppos += *lenp; - } else { - rc = spl_debug_mask2str(str, size, *mask, is_subsys); - if (*ppos >= rc) - rc = 0; - else - rc = proc_copyout_string(buffer, *lenp, - str + *ppos, "\n"); - if (rc >= 0) { - *lenp = rc; - *ppos += rc; - } - } - - kmem_free(str, size); - SRETURN(rc); -} - -static int -proc_debug_mb(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - char str[32]; - int rc, len; - SENTRY; - - if (write) { - rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); - if (rc < 0) - SRETURN(rc); - - rc = spl_debug_set_mb(simple_strtoul(str, NULL, 0)); - *ppos += *lenp; - } else { - len = snprintf(str, sizeof(str), "%d", spl_debug_get_mb()); - if (*ppos >= len) - rc = 0; - else - rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); - - if (rc >= 0) { - *lenp = rc; - *ppos += rc; - } - } - - SRETURN(rc); -} - -static int -proc_dump_kernel(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - SENTRY; - - if (write) { - spl_debug_dumplog(0); - *ppos += *lenp; - } else { - *lenp = 0; - } - - SRETURN(0); -} - -static int -proc_force_bug(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - SENTRY; - - if (write) - PANIC("Crashing due to forced panic\n"); - else - *lenp = 0; - - SRETURN(0); -} - -static int -proc_console_max_delay_cs(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - int rc, max_delay_cs; - spl_ctl_table dummy = *table; - long d; - SENTRY; - - dummy.data = &max_delay_cs; - dummy.proc_handler = &proc_dointvec; - - if (write) { - max_delay_cs = 0; - rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); - if (rc < 0) - SRETURN(rc); - - if (max_delay_cs <= 0) - SRETURN(-EINVAL); - - d = (max_delay_cs * HZ) / 100; - if (d == 0 || d < spl_console_min_delay) - SRETURN(-EINVAL); - - spl_console_max_delay = d; - } else { - max_delay_cs = (spl_console_max_delay * 100) / HZ; - rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); - } - - SRETURN(rc); -} - -static int -proc_console_min_delay_cs(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - int rc, min_delay_cs; - spl_ctl_table dummy = *table; - long d; - SENTRY; - - dummy.data = &min_delay_cs; - dummy.proc_handler = &proc_dointvec; - - if (write) { - min_delay_cs = 0; - rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); - if (rc < 0) - SRETURN(rc); - - if (min_delay_cs <= 0) - SRETURN(-EINVAL); - - d = (min_delay_cs * HZ) / 100; - if (d == 0 || d > spl_console_max_delay) - SRETURN(-EINVAL); - - spl_console_min_delay = d; - } else { - min_delay_cs = (spl_console_min_delay * 100) / HZ; - rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); - } - - SRETURN(rc); -} - -static int -proc_console_backoff(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - int rc, backoff; - spl_ctl_table dummy = *table; - SENTRY; - - dummy.data = &backoff; - dummy.proc_handler = &proc_dointvec; - - if (write) { - backoff = 0; - rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); - if (rc < 0) - SRETURN(rc); - - if (backoff <= 0) - SRETURN(-EINVAL); - - spl_console_backoff = backoff; - } else { - backoff = spl_console_backoff; - rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); - } - - SRETURN(rc); -} -#endif /* DEBUG_LOG */ - #ifdef DEBUG_KMEM static int proc_domemused(struct ctl_table *table, int write, @@ -321,7 +111,6 @@ proc_domemused(struct ctl_table *table, int write, int rc = 0; unsigned long min = 0, max = ~0, val; spl_ctl_table dummy = *table; - SENTRY; dummy.data = &val; dummy.proc_handler = &proc_dointvec; @@ -339,7 +128,7 @@ proc_domemused(struct ctl_table *table, int write, rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); } - SRETURN(rc); + return (rc); } static int @@ -350,7 +139,6 @@ proc_doslab(struct ctl_table *table, int write, unsigned long min = 0, max = ~0, val = 0, mask; spl_ctl_table dummy = *table; spl_kmem_cache_t *skc; - SENTRY; dummy.data = &val; dummy.proc_handler = &proc_dointvec; @@ -387,7 +175,7 @@ proc_doslab(struct ctl_table *table, int write, rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); } - SRETURN(rc); + return (rc); } #endif /* DEBUG_KMEM */ @@ -397,7 +185,6 @@ proc_dohostid(struct ctl_table *table, int write, { int len, rc = 0; char *end, str[32]; - SENTRY; if (write) { /* We can't use proc_doulongvec_minmax() in the write @@ -405,11 +192,11 @@ proc_dohostid(struct ctl_table *table, int write, * leading 0x which confuses the helper function. */ rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); if (rc < 0) - SRETURN(rc); + return (rc); spl_hostid = simple_strtoul(str, &end, 16); if (str == end) - SRETURN(-EINVAL); + return (-EINVAL); } else { len = snprintf(str, sizeof(str), "%lx", spl_hostid); @@ -424,7 +211,7 @@ proc_dohostid(struct ctl_table *table, int write, } } - SRETURN(rc); + return (rc); } #ifdef DEBUG_KMEM @@ -487,7 +274,6 @@ slab_seq_start(struct seq_file *f, loff_t *pos) { struct list_head *p; loff_t n = *pos; - SENTRY; down_read(&spl_kmem_cache_sem); if (!n) @@ -497,20 +283,19 @@ slab_seq_start(struct seq_file *f, loff_t *pos) while (n--) { p = p->next; if (p == &spl_kmem_cache_list) - SRETURN(NULL); + return (NULL); } - SRETURN(list_entry(p, spl_kmem_cache_t, skc_list)); + return (list_entry(p, spl_kmem_cache_t, skc_list)); } static void * slab_seq_next(struct seq_file *f, void *p, loff_t *pos) { spl_kmem_cache_t *skc = p; - SENTRY; ++*pos; - SRETURN((skc->skc_list.next == &spl_kmem_cache_list) ? + return ((skc->skc_list.next == &spl_kmem_cache_list) ? NULL : list_entry(skc->skc_list.next,spl_kmem_cache_t,skc_list)); } @@ -541,108 +326,6 @@ static struct file_operations proc_slab_operations = { }; #endif /* DEBUG_KMEM */ -#ifdef DEBUG_LOG -static struct ctl_table spl_debug_table[] = { - { - .procname = "subsystem", - .data = &spl_debug_subsys, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = &proc_dobitmasks - }, - { - .procname = "mask", - .data = &spl_debug_mask, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = &proc_dobitmasks - }, - { - .procname = "printk", - .data = &spl_debug_printk, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = &proc_dobitmasks - }, - { - .procname = "mb", - .mode = 0644, - .proc_handler = &proc_debug_mb, - }, - { - .procname = "binary", - .data = &spl_debug_binary, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .procname = "catastrophe", - .data = &spl_debug_catastrophe, - .maxlen = sizeof(int), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, - { - .procname = "panic_on_bug", - .data = &spl_debug_panic_on_bug, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, - { - .procname = "path", - .data = spl_debug_file_path, - .maxlen = sizeof(spl_debug_file_path), - .mode = 0644, - .proc_handler = &proc_dostring, - }, - { - .procname = "dump", - .mode = 0200, - .proc_handler = &proc_dump_kernel, - }, - { - .procname = "force_bug", - .mode = 0200, - .proc_handler = &proc_force_bug, - }, - { - .procname = "console_ratelimit", - .data = &spl_console_ratelimit, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .procname = "console_max_delay_centisecs", - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_console_max_delay_cs, - }, - { - .procname = "console_min_delay_centisecs", - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_console_min_delay_cs, - }, - { - .procname = "console_backoff", - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_console_backoff, - }, - { - .procname = "stack_max", - .data = &spl_debug_stack, - .maxlen = sizeof(int), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, - {0}, -}; -#endif /* DEBUG_LOG */ - #ifdef DEBUG_KMEM static struct ctl_table spl_kmem_table[] = { { @@ -765,13 +448,6 @@ static struct ctl_table spl_table[] = { .mode = 0644, .proc_handler = &proc_dohostid, }, -#ifdef DEBUG_LOG - { - .procname = "debug", - .mode = 0555, - .child = spl_debug_table, - }, -#endif #ifdef DEBUG_KMEM { .procname = "kmem", @@ -812,31 +488,38 @@ int spl_proc_init(void) { int rc = 0; - SENTRY; spl_header = register_sysctl_table(spl_root); if (spl_header == NULL) - SRETURN(-EUNATCH); + return (-EUNATCH); proc_spl = proc_mkdir("spl", NULL); - if (proc_spl == NULL) - SGOTO(out, rc = -EUNATCH); + if (proc_spl == NULL) { + rc = -EUNATCH; + goto out; + } #ifdef DEBUG_KMEM proc_spl_kmem = proc_mkdir("kmem", proc_spl); - if (proc_spl_kmem == NULL) - SGOTO(out, rc = -EUNATCH); + if (proc_spl_kmem == NULL) { + rc = -EUNATCH; + goto out; + } proc_spl_kmem_slab = proc_create_data("slab", 0444, proc_spl_kmem, &proc_slab_operations, NULL); - if (proc_spl_kmem_slab == NULL) - SGOTO(out, rc = -EUNATCH); + if (proc_spl_kmem_slab == NULL) { + rc = -EUNATCH; + goto out; + } #endif /* DEBUG_KMEM */ proc_spl_kstat = proc_mkdir("kstat", proc_spl); - if (proc_spl_kstat == NULL) - SGOTO(out, rc = -EUNATCH); + if (proc_spl_kstat == NULL) { + rc = -EUNATCH; + goto out; + } out: if (rc) { remove_proc_entry("kstat", proc_spl); @@ -848,14 +531,12 @@ out: unregister_sysctl_table(spl_header); } - SRETURN(rc); + return (rc); } void spl_proc_fini(void) { - SENTRY; - remove_proc_entry("kstat", proc_spl); #ifdef DEBUG_KMEM remove_proc_entry("slab", proc_spl_kmem); @@ -865,6 +546,4 @@ spl_proc_fini(void) ASSERT(spl_header != NULL); unregister_sysctl_table(spl_header); - - SEXIT; } diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 0cb2ceeaf..951298d9f 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -26,13 +26,6 @@ #include #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_TASKQ int spl_taskq_thread_bind = 0; module_param(spl_taskq_thread_bind, int, 0644); @@ -63,7 +56,6 @@ task_alloc(taskq_t *tq, uint_t flags) { taskq_ent_t *t; int count = 0; - SENTRY; ASSERT(tq); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -77,17 +69,17 @@ retry: ASSERT(!timer_pending(&t->tqent_timer)); list_del_init(&t->tqent_list); - SRETURN(t); + return (t); } /* Free list is empty and memory allocations are prohibited */ if (flags & TQ_NOALLOC) - SRETURN(NULL); + return (NULL); /* Hit maximum taskq_ent_t pool size */ if (tq->tq_nalloc >= tq->tq_maxalloc) { if (flags & TQ_NOSLEEP) - SRETURN(NULL); + return (NULL); /* * Sleep periodically polling the free list for an available @@ -103,8 +95,10 @@ retry: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); schedule_timeout(HZ / 100); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - if (count < 100) - SGOTO(retry, count++); + if (count < 100) { + count++; + goto retry; + } } spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -116,7 +110,7 @@ retry: tq->tq_nalloc++; } - SRETURN(t); + return (t); } /* @@ -126,8 +120,6 @@ retry: static void task_free(taskq_t *tq, taskq_ent_t *t) { - SENTRY; - ASSERT(tq); ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -136,8 +128,6 @@ task_free(taskq_t *tq, taskq_ent_t *t) kmem_free(t, sizeof(taskq_ent_t)); tq->tq_nalloc--; - - SEXIT; } /* @@ -147,7 +137,6 @@ task_free(taskq_t *tq, taskq_ent_t *t) static void task_done(taskq_t *tq, taskq_ent_t *t) { - SENTRY; ASSERT(tq); ASSERT(t); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -167,8 +156,6 @@ task_done(taskq_t *tq, taskq_ent_t *t) } else { task_free(tq, t); } - - SEXIT; } /* @@ -222,7 +209,6 @@ taskq_lowest_id(taskq_t *tq) taskqid_t lowest_id = tq->tq_next_id; taskq_ent_t *t; taskq_thread_t *tqt; - SENTRY; ASSERT(tq); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -249,7 +235,7 @@ taskq_lowest_id(taskq_t *tq) lowest_id = MIN(lowest_id, tqt->tqt_id); } - SRETURN(lowest_id); + return (lowest_id); } /* @@ -261,7 +247,6 @@ taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) taskq_thread_t *w; struct list_head *l; - SENTRY; ASSERT(tq); ASSERT(tqt); ASSERT(spin_is_locked(&tq->tq_lock)); @@ -275,8 +260,6 @@ taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) } if (l == &tq->tq_active_list) list_add(&tqt->tqt_active_list, &tq->tq_active_list); - - SEXIT; } /* @@ -288,7 +271,6 @@ taskq_find_list(taskq_t *tq, struct list_head *lh, taskqid_t id) { struct list_head *l; taskq_ent_t *t; - SENTRY; ASSERT(spin_is_locked(&tq->tq_lock)); @@ -296,13 +278,13 @@ taskq_find_list(taskq_t *tq, struct list_head *lh, taskqid_t id) t = list_entry(l, taskq_ent_t, tqent_list); if (t->tqent_id == id) - SRETURN(t); + return (t); if (t->tqent_id > id) break; } - SRETURN(NULL); + return (NULL); } /* @@ -317,33 +299,32 @@ taskq_find(taskq_t *tq, taskqid_t id, int *active) taskq_thread_t *tqt; struct list_head *l; taskq_ent_t *t; - SENTRY; ASSERT(spin_is_locked(&tq->tq_lock)); *active = 0; t = taskq_find_list(tq, &tq->tq_delay_list, id); if (t) - SRETURN(t); + return (t); t = taskq_find_list(tq, &tq->tq_prio_list, id); if (t) - SRETURN(t); + return (t); t = taskq_find_list(tq, &tq->tq_pend_list, id); if (t) - SRETURN(t); + return (t); list_for_each(l, &tq->tq_active_list) { tqt = list_entry(l, taskq_thread_t, tqt_active_list); if (tqt->tqt_id == id) { t = tqt->tqt_task; *active = 1; - SRETURN(t); + return (t); } } - SRETURN(NULL); + return (NULL); } static int @@ -405,7 +386,7 @@ taskq_wait_check(taskq_t *tq, taskqid_t id) rc = (id < tq->tq_lowest_id); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - SRETURN(rc); + return (rc); } void @@ -419,7 +400,7 @@ void taskq_wait(taskq_t *tq) { taskqid_t id; - SENTRY; + ASSERT(tq); /* Wait for the largest outstanding taskqid */ @@ -428,9 +409,6 @@ taskq_wait(taskq_t *tq) spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); taskq_wait_all(tq, id); - - SEXIT; - } EXPORT_SYMBOL(taskq_wait); @@ -439,7 +417,6 @@ taskq_member(taskq_t *tq, void *t) { struct list_head *l; taskq_thread_t *tqt; - SENTRY; ASSERT(tq); ASSERT(t); @@ -447,10 +424,10 @@ taskq_member(taskq_t *tq, void *t) list_for_each(l, &tq->tq_thread_list) { tqt = list_entry(l, taskq_thread_t, tqt_thread_list); if (tqt->tqt_thread == (struct task_struct *)t) - SRETURN(1); + return (1); } - SRETURN(0); + return (0); } EXPORT_SYMBOL(taskq_member); @@ -466,7 +443,6 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) taskq_ent_t *t; int active = 0; int rc = ENOENT; - SENTRY; ASSERT(tq); @@ -507,7 +483,7 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) rc = EBUSY; } - SRETURN(rc); + return (rc); } EXPORT_SYMBOL(taskq_cancel_id); @@ -516,7 +492,6 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { taskq_ent_t *t; taskqid_t rc = 0; - SENTRY; ASSERT(tq); ASSERT(func); @@ -525,15 +500,15 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TQ_ACTIVE)) - SGOTO(out, rc = 0); + goto out; /* Do not queue the task unless there is idle thread for it */ ASSERT(tq->tq_nactive <= tq->tq_nthreads); if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) - SGOTO(out, rc = 0); + goto out; if ((t = task_alloc(tq, flags)) == NULL) - SGOTO(out, rc = 0); + goto out; spin_lock(&t->tqent_lock); @@ -559,7 +534,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - SRETURN(rc); + return (rc); } EXPORT_SYMBOL(taskq_dispatch); @@ -567,9 +542,8 @@ taskqid_t taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, uint_t flags, clock_t expire_time) { - taskq_ent_t *t; taskqid_t rc = 0; - SENTRY; + taskq_ent_t *t; ASSERT(tq); ASSERT(func); @@ -578,10 +552,10 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TQ_ACTIVE)) - SGOTO(out, rc = 0); + goto out; if ((t = task_alloc(tq, flags)) == NULL) - SGOTO(out, rc = 0); + goto out; spin_lock(&t->tqent_lock); @@ -603,7 +577,7 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, spin_unlock(&t->tqent_lock); out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - SRETURN(rc); + return (rc); } EXPORT_SYMBOL(taskq_dispatch_delay); @@ -611,8 +585,6 @@ void taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, taskq_ent_t *t) { - SENTRY; - ASSERT(tq); ASSERT(func); ASSERT(!(tq->tq_flags & TASKQ_DYNAMIC)); @@ -650,7 +622,6 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, wake_up(&tq->tq_work_waitq); out: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - SEXIT; } EXPORT_SYMBOL(taskq_dispatch_ent); @@ -685,7 +656,6 @@ taskq_thread(void *args) taskq_t *tq; taskq_ent_t *t; struct list_head *pend_list; - SENTRY; ASSERT(tqt); tq = tqt->tqt_tq; @@ -778,7 +748,7 @@ taskq_thread(void *args) spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - SRETURN(0); + return (0); } taskq_t * @@ -789,7 +759,6 @@ taskq_create(const char *name, int nthreads, pri_t pri, taskq_t *tq; taskq_thread_t *tqt; int rc = 0, i, j = 0; - SENTRY; ASSERT(name != NULL); ASSERT(pri <= maxclsyspri); @@ -808,7 +777,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); if (tq == NULL) - SRETURN(NULL); + return (NULL); spin_lock_init(&tq->tq_lock); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); @@ -869,7 +838,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, tq = NULL; } - SRETURN(tq); + return (tq); } EXPORT_SYMBOL(taskq_create); @@ -879,7 +848,6 @@ taskq_destroy(taskq_t *tq) struct task_struct *thread; taskq_thread_t *tqt; taskq_ent_t *t; - SENTRY; ASSERT(tq); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); @@ -929,30 +897,24 @@ taskq_destroy(taskq_t *tq) spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); kmem_free(tq, sizeof(taskq_t)); - - SEXIT; } EXPORT_SYMBOL(taskq_destroy); int spl_taskq_init(void) { - SENTRY; - /* Solaris creates a dynamic taskq of up to 64 threads, however in * a Linux environment 1 thread per-core is usually about right */ system_taskq = taskq_create("spl_system_taskq", num_online_cpus(), minclsyspri, 4, 512, TASKQ_PREPOPULATE); if (system_taskq == NULL) - SRETURN(1); + return (1); - SRETURN(0); + return (0); } void spl_taskq_fini(void) { - SENTRY; taskq_destroy(system_taskq); - SEXIT; } diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 5c8514051..b0f4d5715 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -27,13 +27,6 @@ #include #include #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_THREAD /* * Thread interfaces @@ -73,8 +66,6 @@ thread_generic_wrapper(void *arg) void __thread_exit(void) { - SENTRY; - SEXIT; tsd_exit(); complete_and_exit(NULL, 0); /* Unreachable */ @@ -92,7 +83,6 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, thread_priv_t *tp; struct task_struct *tsk; char *p; - SENTRY; /* Option pp is simply ignored */ /* Variable stack size unsupported */ @@ -100,7 +90,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp = kmem_alloc(sizeof(thread_priv_t), KM_PUSHPAGE); if (tp == NULL) - SRETURN(NULL); + return (NULL); tp->tp_magic = TP_MAGIC; tp->tp_name_size = strlen(name) + 1; @@ -108,7 +98,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp->tp_name = kmem_alloc(tp->tp_name_size, KM_PUSHPAGE); if (tp->tp_name == NULL) { kmem_free(tp, sizeof(thread_priv_t)); - SRETURN(NULL); + return (NULL); } strncpy(tp->tp_name, name, tp->tp_name_size); @@ -128,13 +118,11 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tsk = spl_kthread_create(thread_generic_wrapper, (void *)tp, "%s", tp->tp_name); - if (IS_ERR(tsk)) { - SERROR("Failed to create thread: %ld\n", PTR_ERR(tsk)); - SRETURN(NULL); - } + if (IS_ERR(tsk)) + return (NULL); wake_up_process(tsk); - SRETURN((kthread_t *)tsk); + return ((kthread_t *)tsk); } EXPORT_SYMBOL(__thread_create); diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index 6e5605b9d..c9d532f4e 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -61,14 +61,6 @@ #include #include #include -#include - -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM -#endif - -#define DEBUG_SUBSYSTEM SS_TSD -#define DEBUG_SUBSYSTEM SS_TSD typedef struct tsd_hash_bin { spinlock_t hb_lock; @@ -108,7 +100,6 @@ tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid) tsd_hash_entry_t *entry; tsd_hash_bin_t *bin; ulong_t hash; - SENTRY; hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); bin = &table->ht_bins[hash]; @@ -117,12 +108,12 @@ tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid) entry = list_entry(node, tsd_hash_entry_t, he_list); if ((entry->he_key == key) && (entry->he_pid == pid)) { spin_unlock(&bin->hb_lock); - SRETURN(entry); + return (entry); } } spin_unlock(&bin->hb_lock); - SRETURN(NULL); + return (NULL); } /* @@ -136,7 +127,6 @@ static void tsd_hash_dtor(struct hlist_head *work) { tsd_hash_entry_t *entry; - SENTRY; while (!hlist_empty(work)) { entry = hlist_entry(work->first, tsd_hash_entry_t, he_list); @@ -147,8 +137,6 @@ tsd_hash_dtor(struct hlist_head *work) kmem_free(entry, sizeof(tsd_hash_entry_t)); } - - SEXIT; } /* @@ -170,14 +158,13 @@ tsd_hash_add(tsd_hash_table_t *table, uint_t key, pid_t pid, void *value) tsd_hash_bin_t *bin; ulong_t hash; int rc = 0; - SENTRY; ASSERT3P(tsd_hash_search(table, key, pid), ==, NULL); /* New entry allocate structure, set value, and add to hash */ entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) - SRETURN(ENOMEM); + return (ENOMEM); entry->he_key = key; entry->he_pid = pid; @@ -209,7 +196,7 @@ tsd_hash_add(tsd_hash_table_t *table, uint_t key, pid_t pid, void *value) spin_unlock(&bin->hb_lock); spin_unlock(&table->ht_lock); - SRETURN(rc); + return (rc); } /* @@ -230,14 +217,13 @@ tsd_hash_add_key(tsd_hash_table_t *table, uint_t *keyp, dtor_func_t dtor) tsd_hash_bin_t *bin; ulong_t hash; int keys_checked = 0; - SENTRY; ASSERT3P(table, !=, NULL); /* Allocate entry to be used as a destructor for this key */ entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) - SRETURN(ENOMEM); + return (ENOMEM); /* Determine next available key value */ spin_lock(&table->ht_lock); @@ -249,7 +235,7 @@ tsd_hash_add_key(tsd_hash_table_t *table, uint_t *keyp, dtor_func_t dtor) /* Ensure failure when all TSD_KEYS_MAX keys are in use */ if (keys_checked++ >= TSD_KEYS_MAX) { spin_unlock(&table->ht_lock); - SRETURN(ENOENT); + return (ENOENT); } tmp_entry = tsd_hash_search(table, table->ht_key, DTOR_PID); @@ -273,7 +259,7 @@ tsd_hash_add_key(tsd_hash_table_t *table, uint_t *keyp, dtor_func_t dtor) spin_unlock(&bin->hb_lock); spin_unlock(&table->ht_lock); - SRETURN(0); + return (0); } /* @@ -291,12 +277,11 @@ tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid) tsd_hash_entry_t *entry; tsd_hash_bin_t *bin; ulong_t hash; - SENTRY; /* Allocate entry to be used as the process reference */ entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) - SRETURN(ENOMEM); + return (ENOMEM); spin_lock(&table->ht_lock); entry->he_key = PID_KEY; @@ -316,7 +301,7 @@ tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid) spin_unlock(&bin->hb_lock); spin_unlock(&table->ht_lock); - SRETURN(0); + return (0); } /* @@ -328,14 +313,10 @@ tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid) static void tsd_hash_del(tsd_hash_table_t *table, tsd_hash_entry_t *entry) { - SENTRY; - ASSERT(spin_is_locked(&table->ht_lock)); hlist_del(&entry->he_list); list_del_init(&entry->he_key_list); list_del_init(&entry->he_pid_list); - - SEXIT; } /* @@ -350,17 +331,16 @@ tsd_hash_table_init(uint_t bits) { tsd_hash_table_t *table; int hash, size = (1 << bits); - SENTRY; table = kmem_zalloc(sizeof(tsd_hash_table_t), KM_SLEEP); if (table == NULL) - SRETURN(NULL); + return (NULL); table->ht_bins = kmem_zalloc(sizeof(tsd_hash_bin_t) * size, KM_SLEEP | KM_NODEBUG); if (table->ht_bins == NULL) { kmem_free(table, sizeof(tsd_hash_table_t)); - SRETURN(NULL); + return (NULL); } for (hash = 0; hash < size; hash++) { @@ -372,7 +352,7 @@ tsd_hash_table_init(uint_t bits) table->ht_bits = bits; table->ht_key = 1; - SRETURN(table); + return (table); } /* @@ -390,7 +370,6 @@ tsd_hash_table_fini(tsd_hash_table_t *table) tsd_hash_bin_t *bin; tsd_hash_entry_t *entry; int size, i; - SENTRY; ASSERT3P(table, !=, NULL); spin_lock(&table->ht_lock); @@ -410,8 +389,6 @@ tsd_hash_table_fini(tsd_hash_table_t *table) tsd_hash_dtor(&work); kmem_free(table->ht_bins, sizeof(tsd_hash_bin_t)*(1<ht_bits)); kmem_free(table, sizeof(tsd_hash_table_t)); - - SEXIT; } /* @@ -432,20 +409,19 @@ tsd_set(uint_t key, void *value) tsd_hash_entry_t *entry; pid_t pid; int rc; - SENTRY; table = tsd_hash_table; pid = curthread->pid; ASSERT3P(table, !=, NULL); if ((key == 0) || (key > TSD_KEYS_MAX)) - SRETURN(EINVAL); + return (EINVAL); /* Entry already exists in hash table update value */ entry = tsd_hash_search(table, key, pid); if (entry) { entry->he_value = value; - SRETURN(0); + return (0); } /* Add a process entry to the hash if not yet exists */ @@ -453,11 +429,11 @@ tsd_set(uint_t key, void *value) if (entry == NULL) { rc = tsd_hash_add_pid(table, pid); if (rc) - SRETURN(rc); + return (rc); } rc = tsd_hash_add(table, key, pid, value); - SRETURN(rc); + return (rc); } EXPORT_SYMBOL(tsd_set); @@ -473,18 +449,17 @@ void * tsd_get(uint_t key) { tsd_hash_entry_t *entry; - SENTRY; ASSERT3P(tsd_hash_table, !=, NULL); if ((key == 0) || (key > TSD_KEYS_MAX)) - SRETURN(NULL); + return (NULL); entry = tsd_hash_search(tsd_hash_table, key, curthread->pid); if (entry == NULL) - SRETURN(NULL); + return (NULL); - SRETURN(entry->he_value); + return (entry->he_value); } EXPORT_SYMBOL(tsd_get); @@ -503,17 +478,11 @@ EXPORT_SYMBOL(tsd_get); void tsd_create(uint_t *keyp, dtor_func_t dtor) { - SENTRY; - ASSERT3P(keyp, !=, NULL); - if (*keyp) { - SEXIT; + if (*keyp) return; - } (void)tsd_hash_add_key(tsd_hash_table, keyp, dtor); - - SEXIT; } EXPORT_SYMBOL(tsd_create); @@ -534,7 +503,6 @@ tsd_destroy(uint_t *keyp) tsd_hash_entry_t *dtor_entry, *entry; tsd_hash_bin_t *dtor_entry_bin, *entry_bin; ulong_t hash; - SENTRY; table = tsd_hash_table; ASSERT3P(table, !=, NULL); @@ -543,7 +511,6 @@ tsd_destroy(uint_t *keyp) dtor_entry = tsd_hash_search(table, *keyp, DTOR_PID); if (dtor_entry == NULL) { spin_unlock(&table->ht_lock); - SEXIT; return; } @@ -580,8 +547,6 @@ tsd_destroy(uint_t *keyp) tsd_hash_dtor(&work); *keyp = 0; - - SEXIT; } EXPORT_SYMBOL(tsd_destroy); @@ -601,7 +566,6 @@ tsd_exit(void) tsd_hash_entry_t *pid_entry, *entry; tsd_hash_bin_t *pid_entry_bin, *entry_bin; ulong_t hash; - SENTRY; table = tsd_hash_table; ASSERT3P(table, !=, NULL); @@ -610,7 +574,6 @@ tsd_exit(void) pid_entry = tsd_hash_search(table, PID_KEY, curthread->pid); if (pid_entry == NULL) { spin_unlock(&table->ht_lock); - SEXIT; return; } @@ -646,28 +609,22 @@ tsd_exit(void) spin_unlock(&table->ht_lock); tsd_hash_dtor(&work); - - SEXIT; } EXPORT_SYMBOL(tsd_exit); int spl_tsd_init(void) { - SENTRY; - tsd_hash_table = tsd_hash_table_init(TSD_HASH_TABLE_BITS_DEFAULT); if (tsd_hash_table == NULL) - SRETURN(1); + return (1); - SRETURN(0); + return (0); } void spl_tsd_fini(void) { - SENTRY; tsd_hash_table_fini(tsd_hash_table); tsd_hash_table = NULL; - SEXIT; } diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index b9f9d7b1f..cac0aaf29 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -27,13 +27,6 @@ #include #include #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_VNODE vnode_t *rootdir = (vnode_t *)0xabcd1234; EXPORT_SYMBOL(rootdir); @@ -107,7 +100,6 @@ vnode_t * vn_alloc(int flag) { vnode_t *vp; - SENTRY; vp = kmem_cache_alloc(vn_cache, flag); if (vp != NULL) { @@ -115,16 +107,14 @@ vn_alloc(int flag) vp->v_type = 0; } - SRETURN(vp); + return (vp); } /* vn_alloc() */ EXPORT_SYMBOL(vn_alloc); void vn_free(vnode_t *vp) { - SENTRY; kmem_cache_free(vn_cache, vp); - SEXIT; } /* vn_free() */ EXPORT_SYMBOL(vn_free); @@ -137,7 +127,6 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, int rc, saved_umask = 0; gfp_t saved_gfp; vnode_t *vp; - SENTRY; ASSERT(flags & (FWRITE | FREAD)); ASSERT(seg == UIO_SYSSPACE); @@ -163,7 +152,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, (void)xchg(¤t->fs->umask, saved_umask); if (IS_ERR(fp)) - SRETURN(-PTR_ERR(fp)); + return (-PTR_ERR(fp)); #ifdef HAVE_2ARGS_VFS_GETATTR rc = vfs_getattr(&fp->f_path, &stat); @@ -172,13 +161,13 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, #endif if (rc) { filp_close(fp, 0); - SRETURN(-rc); + return (-rc); } vp = vn_alloc(KM_SLEEP); if (!vp) { filp_close(fp, 0); - SRETURN(ENOMEM); + return (ENOMEM); } saved_gfp = mapping_gfp_mask(fp->f_mapping); @@ -191,7 +180,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, *vpp = vp; mutex_exit(&vp->v_lock); - SRETURN(0); + return (0); } /* vn_open() */ EXPORT_SYMBOL(vn_open); @@ -201,20 +190,19 @@ vn_openat(const char *path, uio_seg_t seg, int flags, int mode, { char *realpath; int len, rc; - SENTRY; ASSERT(vp == rootdir); len = strlen(path) + 2; realpath = kmalloc(len, GFP_KERNEL); if (!realpath) - SRETURN(ENOMEM); + return (ENOMEM); (void)snprintf(realpath, len, "/%s", path); rc = vn_open(realpath, seg, flags, mode, vpp, x1, x2); kfree(realpath); - SRETURN(rc); + return (rc); } /* vn_openat() */ EXPORT_SYMBOL(vn_openat); @@ -226,7 +214,6 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, mm_segment_t saved_fs; struct file *fp; int rc; - SENTRY; ASSERT(uio == UIO_WRITE || uio == UIO_READ); ASSERT(vp); @@ -256,16 +243,16 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, fp->f_pos = offset; if (rc < 0) - SRETURN(-rc); + return (-rc); if (residp) { *residp = len - rc; } else { if (rc != len) - SRETURN(EIO); + return (EIO); } - SRETURN(0); + return (0); } /* vn_rdwr() */ EXPORT_SYMBOL(vn_rdwr); @@ -273,7 +260,6 @@ int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) { int rc; - SENTRY; ASSERT(vp); ASSERT(vp->v_file); @@ -282,7 +268,7 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) rc = filp_close(vp->v_file, 0); vn_free(vp); - SRETURN(-rc); + return (-rc); } /* vn_close() */ EXPORT_SYMBOL(vn_close); @@ -386,7 +372,6 @@ vn_remove(const char *path, uio_seg_t seg, int flags) struct path parent; struct inode *inode = NULL; int rc = 0; - SENTRY; ASSERT(seg == UIO_SYSSPACE); ASSERT(flags == RMFILE); @@ -394,14 +379,18 @@ vn_remove(const char *path, uio_seg_t seg, int flags) dentry = spl_kern_path_locked(path, &parent); rc = PTR_ERR(dentry); if (!IS_ERR(dentry)) { - if (parent.dentry->d_name.name[parent.dentry->d_name.len]) - SGOTO(slashes, rc = 0); + if (parent.dentry->d_name.name[parent.dentry->d_name.len]) { + rc = 0; + goto slashes; + } inode = dentry->d_inode; - if (inode) + if (inode) { atomic_inc(&inode->i_count); - else - SGOTO(slashes, rc = 0); + } else { + rc = 0; + goto slashes; + } #ifdef HAVE_2ARGS_VFS_UNLINK rc = vfs_unlink(parent.dentry->d_inode, dentry); @@ -419,12 +408,12 @@ exit1: iput(inode); /* truncate the inode here */ path_put(&parent); - SRETURN(-rc); + return (-rc); slashes: rc = !dentry->d_inode ? -ENOENT : S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR; - SGOTO(exit1, rc); + goto exit1; } /* vn_remove() */ EXPORT_SYMBOL(vn_remove); @@ -437,23 +426,26 @@ vn_rename(const char *oldname, const char *newname, int x1) struct dentry *trap; struct path old_parent, new_parent; int rc = 0; - SENTRY; old_dentry = spl_kern_path_locked(oldname, &old_parent); - if (IS_ERR(old_dentry)) - SGOTO(exit, rc = PTR_ERR(old_dentry)); + if (IS_ERR(old_dentry)) { + rc = PTR_ERR(old_dentry); + goto exit; + } spl_inode_unlock(old_parent.dentry->d_inode); new_dentry = spl_kern_path_locked(newname, &new_parent); - if (IS_ERR(new_dentry)) - SGOTO(exit2, rc = PTR_ERR(new_dentry)); + if (IS_ERR(new_dentry)) { + rc = PTR_ERR(new_dentry); + goto exit2; + } spl_inode_unlock(new_parent.dentry->d_inode); rc = -EXDEV; if (old_parent.mnt != new_parent.mnt) - SGOTO(exit3, rc); + goto exit3; old_dir = old_parent.dentry; new_dir = new_parent.dentry; @@ -462,25 +454,25 @@ vn_rename(const char *oldname, const char *newname, int x1) /* source should not be ancestor of target */ rc = -EINVAL; if (old_dentry == trap) - SGOTO(exit4, rc); + goto exit4; /* target should not be an ancestor of source */ rc = -ENOTEMPTY; if (new_dentry == trap) - SGOTO(exit4, rc); + goto exit4; /* source must exist */ rc = -ENOENT; if (!old_dentry->d_inode) - SGOTO(exit4, rc); + goto exit4; /* unless the source is a directory trailing slashes give -ENOTDIR */ if (!S_ISDIR(old_dentry->d_inode->i_mode)) { rc = -ENOTDIR; if (old_dentry->d_name.name[old_dentry->d_name.len]) - SGOTO(exit4, rc); + goto exit4; if (new_dentry->d_name.name[new_dentry->d_name.len]) - SGOTO(exit4, rc); + goto exit4; } #if defined(HAVE_4ARGS_VFS_RENAME) @@ -502,7 +494,7 @@ exit2: dput(old_dentry); path_put(&old_parent); exit: - SRETURN(-rc); + return (-rc); } EXPORT_SYMBOL(vn_rename); @@ -512,7 +504,6 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) struct file *fp; struct kstat stat; int rc; - SENTRY; ASSERT(vp); ASSERT(vp->v_file); @@ -526,7 +517,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); #endif if (rc) - SRETURN(-rc); + return (-rc); vap->va_type = vn_mode_to_vtype(stat.mode); vap->va_mode = stat.mode; @@ -543,14 +534,13 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) vap->va_rdev = stat.rdev; vap->va_nblocks = stat.blocks; - SRETURN(0); + return (0); } EXPORT_SYMBOL(vn_getattr); int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) { int datasync = 0; - SENTRY; ASSERT(vp); ASSERT(vp->v_file); @@ -558,7 +548,7 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) if (flags & FDSYNC) datasync = 1; - SRETURN(-spl_filp_fsync(vp->v_file, datasync)); + return (-spl_filp_fsync(vp->v_file, datasync)); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); @@ -566,10 +556,9 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, offset_t offset, void *x6, void *x7) { int error = EOPNOTSUPP; - SENTRY; if (cmd != F_FREESP || bfp->l_whence != 0) - SRETURN(EOPNOTSUPP); + return (EOPNOTSUPP); ASSERT(vp); ASSERT(vp->v_file); @@ -584,7 +573,7 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, bfp->l_start, bfp->l_len); if (error == 0) - SRETURN(0); + return (0); #endif #ifdef HAVE_INODE_TRUNCATE_RANGE @@ -600,7 +589,7 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, if (end % PAGE_SIZE != 0) { end &= ~(off_t)(PAGE_SIZE - 1); if (end <= bfp->l_start) - SRETURN(0); + return (0); } --end; @@ -608,11 +597,11 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, vp->v_file->f_dentry->d_inode, bfp->l_start, end ); - SRETURN(0); + return (0); } #endif - SRETURN(error); + return (error); } EXPORT_SYMBOL(vn_space); @@ -642,7 +631,6 @@ vn_getf(int fd) file_t *fp; vnode_t *vp; int rc = 0; - SENTRY; /* Already open just take an extra reference */ spin_lock(&vn_file_lock); @@ -651,7 +639,7 @@ vn_getf(int fd) if (fp) { atomic_inc(&fp->f_ref); spin_unlock(&vn_file_lock); - SRETURN(fp); + return (fp); } spin_unlock(&vn_file_lock); @@ -659,7 +647,7 @@ vn_getf(int fd) /* File was not yet opened create the object and setup */ fp = kmem_cache_alloc(vn_file_cache, KM_SLEEP); if (fp == NULL) - SGOTO(out, rc); + goto out; mutex_enter(&fp->f_lock); @@ -670,11 +658,11 @@ vn_getf(int fd) lfp = fget(fd); if (lfp == NULL) - SGOTO(out_mutex, rc); + goto out_mutex; vp = vn_alloc(KM_SLEEP); if (vp == NULL) - SGOTO(out_fget, rc); + goto out_fget; #ifdef HAVE_2ARGS_VFS_GETATTR rc = vfs_getattr(&lfp->f_path, &stat); @@ -682,7 +670,7 @@ vn_getf(int fd) rc = vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat); #endif if (rc) - SGOTO(out_vnode, rc); + goto out_vnode; mutex_enter(&vp->v_lock); vp->v_type = vn_mode_to_vtype(stat.mode); @@ -698,7 +686,7 @@ vn_getf(int fd) spin_unlock(&vn_file_lock); mutex_exit(&fp->f_lock); - SRETURN(fp); + return (fp); out_vnode: vn_free(vp); @@ -708,7 +696,7 @@ out_mutex: mutex_exit(&fp->f_lock); kmem_cache_free(vn_file_cache, fp); out: - SRETURN(NULL); + return (NULL); } /* getf() */ EXPORT_SYMBOL(getf); @@ -728,7 +716,6 @@ void vn_releasef(int fd) { file_t *fp; - SENTRY; spin_lock(&vn_file_lock); fp = file_find(fd); @@ -736,7 +723,6 @@ vn_releasef(int fd) atomic_dec(&fp->f_ref); if (atomic_read(&fp->f_ref) > 0) { spin_unlock(&vn_file_lock); - SEXIT; return; } @@ -745,7 +731,6 @@ vn_releasef(int fd) } spin_unlock(&vn_file_lock); - SEXIT; return; } /* releasef() */ EXPORT_SYMBOL(releasef); @@ -783,7 +768,6 @@ vn_set_pwd(const char *filename) struct path path; mm_segment_t saved_fs; int rc; - SENTRY; /* * user_path_dir() and __user_walk() both expect 'filename' to be @@ -795,11 +779,11 @@ vn_set_pwd(const char *filename) rc = user_path_dir(filename, &path); if (rc) - SGOTO(out, rc); + goto out; rc = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_ACCESS); if (rc) - SGOTO(dput_and_out, rc); + goto dput_and_out; vn_set_fs_pwd(current->fs, &path); @@ -808,7 +792,7 @@ dput_and_out: out: set_fs(saved_fs); - SRETURN(-rc); + return (-rc); } /* vn_set_pwd() */ EXPORT_SYMBOL(vn_set_pwd); @@ -853,7 +837,6 @@ vn_file_cache_destructor(void *buf, void *cdrarg) int spl_vn_init(void) { - SENTRY; vn_cache = kmem_cache_create("spl_vn_cache", sizeof(struct vnode), 64, vn_cache_constructor, @@ -865,7 +848,7 @@ spl_vn_init(void) vn_file_cache_constructor, vn_file_cache_destructor, NULL, NULL, NULL, KMC_KMEM); - SRETURN(0); + return (0); } /* vn_init() */ void @@ -873,7 +856,6 @@ spl_vn_fini(void) { file_t *fp, *next_fp; int leaked = 0; - SENTRY; spin_lock(&vn_file_lock); @@ -886,11 +868,10 @@ spl_vn_fini(void) spin_unlock(&vn_file_lock); if (leaked > 0) - SWARN("Warning %d files leaked\n", leaked); + printk(KERN_WARNING "WARNING: %d vnode files leaked\n", leaked); kmem_cache_destroy(vn_file_cache); kmem_cache_destroy(vn_cache); - SEXIT; return; } /* vn_fini() */ diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index 62efa31a5..9405dc88d 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -27,13 +27,6 @@ #include #include #include -#include - -#ifdef SS_DEBUG_SUBSYS -#undef SS_DEBUG_SUBSYS -#endif - -#define SS_DEBUG_SUBSYS SS_XDR /* * SPL's XDR mem implementation. @@ -150,7 +143,6 @@ xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, xdrs->x_ops = &xdrmem_decode_ops; break; default: - SWARN("Invalid op value: %d\n", op); xdrs->x_ops = NULL; /* Let the caller know we failed */ return; } @@ -160,7 +152,6 @@ xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, xdrs->x_addr_end = addr + size; if (xdrs->x_addr_end < xdrs->x_addr) { - SWARN("Overflow while creating xdrmem: %p, %u\n", addr, size); xdrs->x_ops = NULL; } } @@ -171,10 +162,8 @@ xdrmem_control(XDR *xdrs, int req, void *info) { struct xdr_bytesrec *rec = (struct xdr_bytesrec *) info; - if (req != XDR_GET_BYTES_AVAIL) { - SWARN("Called with unknown request: %d\n", req); + if (req != XDR_GET_BYTES_AVAIL) return FALSE; - } rec->xc_is_last_record = TRUE; /* always TRUE in xdrmem streams */ rec->xc_num_avail = xdrs->x_addr_end - xdrs->x_addr; diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 807e743d5..2b8aab865 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -55,13 +55,6 @@ #include #include -#include - -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM -#endif - -#define DEBUG_SUBSYSTEM SS_ZLIB static spl_kmem_cache_t *zlib_workspace_cache; @@ -200,7 +193,6 @@ int spl_zlib_init(void) { int size; - SENTRY; size = MAX(spl_zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL), zlib_inflate_workspacesize()); @@ -210,16 +202,14 @@ spl_zlib_init(void) size, 0, NULL, NULL, NULL, NULL, NULL, KMC_VMEM | KMC_NOEMERGENCY); if (!zlib_workspace_cache) - SRETURN(1); + return (1); - SRETURN(0); + return (0); } void spl_zlib_fini(void) { - SENTRY; kmem_cache_destroy(zlib_workspace_cache); zlib_workspace_cache = NULL; - SEXIT; } diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index ea0a88f0c..eff8a9e74 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -25,7 +25,6 @@ #ifndef _SPLAT_INTERNAL_H #define _SPLAT_INTERNAL_H -#include "spl-debug.h" #include "splat-ctl.h" #include diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index db787ae92..cf47ce65a 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -313,7 +313,7 @@ splat_kmem_cache_test_kct_alloc(kmem_cache_priv_t *kcp, int id) { kmem_cache_thread_t *kct; - ASSERTF(id < SPLAT_KMEM_THREADS, "id=%d\n", id); + ASSERT3S(id, <, SPLAT_KMEM_THREADS); ASSERT(kcp->kcp_kct[id] == NULL); kct = kmem_zalloc(sizeof(kmem_cache_thread_t), KM_SLEEP); diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf index 2fa3dd2b4..67b9dad58 100755 --- a/scripts/dkms.mkconf +++ b/scripts/dkms.mkconf @@ -37,10 +37,6 @@ PRE_BUILD="configure then echo --enable-debug fi - if [[ \${SPL_DKMS_ENABLE_DEBUG_LOG,,} == @(y|yes) ]] - then - echo --enable-debug-log - fi if [[ \${SPL_DKMS_ENABLE_DEBUG_KMEM,,} == @(y|yes) ]] then echo --enable-debug-kmem From 52479ecf58fa89190e384edcf838fecccc786af5 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 14 Nov 2014 10:18:05 -0800 Subject: [PATCH 0850/1062] Remove compat includes from sys/types.h Don't include the compatibility code in linux/*_compat.h in the public header sys/types.h. This causes problems when an external code base includes the ZFS headers and has its own conflicting compatibility code. Lustre, in particular, defined SHRINK_STOP for compatibility with pre-3.12 kernels in a way that conflicted with the SPL's definition. Because Lustre ZFS OSD includes ZFS headers it fails to build due to a '"SHRINK_STOP" redefined' compiler warning. To avoid such conflicts only include the compat headers from .c files or private headers. Also, for consistency, include sys/*.h before linux/*.h then sort by header name. Signed-off-by: Ned Bass Signed-off-by: Brian Behlendorf Closes #411 --- include/linux/wait_compat.h | 1 + include/sys/types.h | 12 ------------ module/spl/spl-generic.c | 1 + module/spl/spl-kmem.c | 2 ++ module/spl/spl-vnode.c | 1 + module/spl/spl-zlib.c | 1 + module/splat/splat-atomic.c | 1 + module/splat/splat-ctl.c | 17 +++++++++-------- module/splat/splat-generic.c | 1 + module/splat/splat-linux.c | 1 + module/splat/splat-mutex.c | 2 ++ module/splat/splat-rwlock.c | 4 +++- module/splat/splat-taskq.c | 5 +++-- module/splat/splat-thread.c | 2 ++ module/splat/splat-time.c | 1 + 15 files changed, 29 insertions(+), 23 deletions(-) diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h index 66f9a9a61..d8cd09b9e 100644 --- a/include/linux/wait_compat.h +++ b/include/linux/wait_compat.h @@ -25,6 +25,7 @@ #ifndef _SPL_WAIT_COMPAT_H #define _SPL_WAIT_COMPAT_H +#include #ifndef HAVE_WAIT_ON_BIT_ACTION # define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode) diff --git a/include/sys/types.h b/include/sys/types.h index b7b8b7bfc..3b3a42ede 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -28,18 +28,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #ifndef ULLONG_MAX #define ULLONG_MAX (~0ULL) #endif diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index ecfb663de..803f03a85 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -39,6 +39,7 @@ #include #include #include +#include #include char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 37849f504..502f5365b 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -25,6 +25,8 @@ \*****************************************************************************/ #include +#include +#include /* * Within the scope of spl-kmem.c file the kmem_cache_* definitions diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index cac0aaf29..e5db0ec2c 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -27,6 +27,7 @@ #include #include #include +#include vnode_t *rootdir = (vnode_t *)0xabcd1234; EXPORT_SYMBOL(rootdir); diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 2b8aab865..2967b03ce 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -55,6 +55,7 @@ #include #include +#include static spl_kmem_cache_t *zlib_workspace_cache; diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index 7a1bd859d..a270dc42f 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "splat-internal.h" diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 46bc6d1a6..bedf5d2d8 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -43,16 +43,17 @@ * of regression tests or particular tests. \*****************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "splat-internal.h" static struct list_head splat_module_list; diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index ad03651d0..3f8119b1e 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #include "splat-internal.h" #define SPLAT_GENERIC_NAME "generic" diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 880b30152..3652267f9 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -24,6 +24,7 @@ \*****************************************************************************/ #include +#include #include "splat-internal.h" #define SPLAT_LINUX_NAME "linux" diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index cc1d36869..909d730cb 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -26,6 +26,8 @@ #include #include +#include +#include #include "splat-internal.h" #define SPLAT_MUTEX_NAME "mutex" diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 6faf7d24e..6c623792e 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -24,9 +24,11 @@ * Solaris Porting LAyer Tests (SPLAT) Read/Writer Lock Tests. \*****************************************************************************/ +#include #include #include -#include +#include +#include #include "splat-internal.h" #define SPLAT_RWLOCK_NAME "rwlock" diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 33e49b2f1..6c2b43579 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -24,9 +24,10 @@ * Solaris Porting LAyer Tests (SPLAT) Task Queue Tests. \*****************************************************************************/ -#include -#include #include +#include +#include +#include #include "splat-internal.h" #define SPLAT_TASKQ_NAME "taskq" diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index e55acd0c8..3255e37e5 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -26,6 +26,8 @@ #include #include +#include +#include #include #include "splat-internal.h" diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index cd513c93f..b4e94c866 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include #include #include "splat-internal.h" From a3c1eb77721a0d511b4fe7111bb2314686570c4b Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 19 Dec 2014 11:31:59 +0800 Subject: [PATCH 0851/1062] mutex: force serialization on mutex_exit() to fix races It is known that mutexes in Linux are not safe when using them to synchronize the freeing of object in which the mutex is embedded: http://lwn.net/Articles/575477/ The known places in ZFS which are suspected to suffer from the race condition are zio->io_lock and dbuf->db_mtx. * zio uses zio->io_lock and zio->io_cv to synchronize freeing between zio_wait() and zio_done(). * dbuf uses dbuf->db_mtx to protect reference counting. This patch fixes this kind of race by forcing serialization on mutex_exit() with a spin lock, making the mutex safe by sacrificing a bit of performance and memory overhead. This issue most commonly manifests itself as a deadlock in the zio pipeline caused by a process spinning on the damaged mutex. Similar deadlocks have been reported for the dbuf->db_mtx mutex. And it can also cause a NULL dereference or bad paging request under the right circumstances. This issue any many like it are linked off the zfsonlinux/zfs#2523 issue. Specifically this fix resolves at least the following outstanding issues: zfsonlinux/zfs#401 zfsonlinux/zfs#2523 zfsonlinux/zfs#2679 zfsonlinux/zfs#2684 zfsonlinux/zfs#2704 zfsonlinux/zfs#2708 zfsonlinux/zfs#2517 zfsonlinux/zfs#2827 zfsonlinux/zfs#2850 zfsonlinux/zfs#2891 zfsonlinux/zfs#2897 zfsonlinux/zfs#2247 zfsonlinux/zfs#2939 Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #421 --- include/sys/mutex.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index d946ff366..31497f6a1 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -44,6 +44,7 @@ typedef enum { */ typedef struct { struct mutex m; + spinlock_t m_lock; /* used for serializing mutex_exit */ } kmutex_t; static inline kthread_t * @@ -70,6 +71,7 @@ mutex_owner(kmutex_t *mp) ASSERT(type == MUTEX_DEFAULT); \ \ __mutex_init(&(mp)->m, #mp, &__key); \ + spin_lock_init(&(mp)->m_lock); \ }) #undef mutex_destroy @@ -84,12 +86,37 @@ mutex_owner(kmutex_t *mp) ASSERT3P(mutex_owner(mp), !=, current); \ mutex_lock(&(mp)->m); \ }) -#define mutex_exit(mp) mutex_unlock(&(mp)->m) +/* + * The reason for the spinlock: + * + * The Linux mutex is designed with a fast-path/slow-path design such that it + * does not guarantee serialization upon itself, allowing a race where latter + * acquirers finish mutex_unlock before former ones. + * + * The race renders it unsafe to be used for serializing the freeing of an + * object in which the mutex is embedded, where the latter acquirer could go + * on to free the object while the former one is still doing mutex_unlock and + * causing memory corruption. + * + * However, there are many places in ZFS where the mutex is used for + * serializing object freeing, and the code is shared among other OSes without + * this issue. Thus, we need the spinlock to force the serialization on + * mutex_exit(). + * + * See http://lwn.net/Articles/575477/ for the information about the race. + */ +#define mutex_exit(mp) \ +({ \ + spin_lock(&(mp)->m_lock); \ + mutex_unlock(&(mp)->m); \ + spin_unlock(&(mp)->m_lock); \ +}) #else /* HAVE_MUTEX_OWNER */ typedef struct { struct mutex m_mutex; + spinlock_t m_lock; kthread_t *m_owner; } kmutex_t; @@ -125,6 +152,7 @@ spl_mutex_clear_owner(kmutex_t *mp) ASSERT(type == MUTEX_DEFAULT); \ \ __mutex_init(MUTEX(mp), #mp, &__key); \ + spin_lock_init(&(mp)->m_lock); \ spl_mutex_clear_owner(mp); \ }) @@ -153,8 +181,10 @@ spl_mutex_clear_owner(kmutex_t *mp) #define mutex_exit(mp) \ ({ \ + spin_lock(&(mp)->m_lock); \ spl_mutex_clear_owner(mp); \ mutex_unlock(MUTEX(mp)); \ + spin_unlock(&(mp)->m_lock); \ }) #endif /* HAVE_MUTEX_OWNER */ From 03a783534ad9ea1db71d978f9f850f9dd13ccd51 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 19 Nov 2014 20:01:20 -0500 Subject: [PATCH 0852/1062] Fix debug object on stack warning When running the SPLAT tests on a kernel with CONFIG_DEBUG_OBJECTS=y enabled the following warning is generated. ODEBUG: object is on stack, but not annotated WARNING: at lib/debugobjects.c:300 __debug_object_init+0x221/0x480() This is caused by the test cases placing a debug object on the stack rather than the heap. This isn't harmful since they are small objects but to make CONFIG_DEBUG_OBJECTS=y happy the objects have been relocated to the heap. This impacted taskq tests 1, 3, and 7. Signed-off-by: Brian Behlendorf Closes #424 --- module/splat/splat-taskq.c | 91 ++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 34 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 6c2b43579..d8406f159 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -118,9 +118,10 @@ splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) taskq_t *tq; taskqid_t id; splat_taskq_arg_t tq_arg; - taskq_ent_t tqe; + taskq_ent_t *tqe; - taskq_init_ent(&tqe); + tqe = kmem_alloc(sizeof (taskq_ent_t), KM_SLEEP); + taskq_init_ent(tqe); splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' creating (%s dispatch)\n", @@ -131,6 +132,7 @@ splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST1_NAME); + kmem_free(tqe, sizeof (taskq_ent_t)); return -EINVAL; } @@ -144,8 +146,8 @@ splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) tq_arg.name, sym2str(splat_taskq_test13_func)); if (prealloc) { taskq_dispatch_ent(tq, splat_taskq_test13_func, - &tq_arg, TQ_SLEEP, &tqe); - id = tqe.tqent_id; + &tq_arg, TQ_SLEEP, tqe); + id = tqe->tqent_id; } else { id = taskq_dispatch(tq, splat_taskq_test13_func, &tq_arg, TQ_SLEEP); @@ -155,6 +157,7 @@ splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test13_func)); + kmem_free(tqe, sizeof (taskq_ent_t)); taskq_destroy(tq); return -EINVAL; } @@ -165,6 +168,7 @@ splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' destroying\n", tq_arg.name); + kmem_free(tqe, sizeof (taskq_ent_t)); taskq_destroy(tq); return (tq_arg.flag) ? 0 : -EINVAL; @@ -372,41 +376,51 @@ static int splat_taskq_test3_impl(struct file *file, void *arg, boolean_t prealloc) { taskqid_t id; - splat_taskq_arg_t tq_arg; - taskq_ent_t tqe; + splat_taskq_arg_t *tq_arg; + taskq_ent_t *tqe; + int error; - taskq_init_ent(&tqe); + tq_arg = kmem_alloc(sizeof (splat_taskq_arg_t), KM_SLEEP); + tqe = kmem_alloc(sizeof (taskq_ent_t), KM_SLEEP); + taskq_init_ent(tqe); - tq_arg.flag = 0; - tq_arg.id = 0; - tq_arg.file = file; - tq_arg.name = SPLAT_TASKQ_TEST3_NAME; + tq_arg->flag = 0; + tq_arg->id = 0; + tq_arg->file = file; + tq_arg->name = SPLAT_TASKQ_TEST3_NAME; splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, "Taskq '%s' function '%s' %s dispatch\n", - tq_arg.name, sym2str(splat_taskq_test13_func), + tq_arg->name, sym2str(splat_taskq_test13_func), prealloc ? "prealloc" : "dynamic"); if (prealloc) { taskq_dispatch_ent(system_taskq, splat_taskq_test13_func, - &tq_arg, TQ_SLEEP, &tqe); - id = tqe.tqent_id; + tq_arg, TQ_SLEEP, tqe); + id = tqe->tqent_id; } else { id = taskq_dispatch(system_taskq, splat_taskq_test13_func, - &tq_arg, TQ_SLEEP); + tq_arg, TQ_SLEEP); } if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, "Taskq '%s' function '%s' dispatch failed\n", - tq_arg.name, sym2str(splat_taskq_test13_func)); + tq_arg->name, sym2str(splat_taskq_test13_func)); + kmem_free(tqe, sizeof (taskq_ent_t)); + kmem_free(tq_arg, sizeof (splat_taskq_arg_t)); return -EINVAL; } splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, "Taskq '%s' waiting\n", - tq_arg.name); + tq_arg->name); taskq_wait(system_taskq); - return (tq_arg.flag) ? 0 : -EINVAL; + error = (tq_arg->flag) ? 0 : -EINVAL; + + kmem_free(tqe, sizeof (taskq_ent_t)); + kmem_free(tq_arg, sizeof (splat_taskq_arg_t)); + + return (error); } static int @@ -965,8 +979,9 @@ static int splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_t *tq; - taskq_ent_t tqe; - splat_taskq_arg_t tq_arg; + splat_taskq_arg_t *tq_arg; + taskq_ent_t *tqe; + int error; splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, "Taskq '%s' creating (%s dispatch)\n", @@ -980,33 +995,41 @@ splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) return -EINVAL; } - tq_arg.depth = 0; - tq_arg.flag = 0; - tq_arg.id = 0; - tq_arg.file = file; - tq_arg.name = SPLAT_TASKQ_TEST7_NAME; - tq_arg.tq = tq; + tq_arg = kmem_alloc(sizeof (splat_taskq_arg_t), KM_SLEEP); + tqe = kmem_alloc(sizeof (taskq_ent_t), KM_SLEEP); + + tq_arg->depth = 0; + tq_arg->flag = 0; + tq_arg->id = 0; + tq_arg->file = file; + tq_arg->name = SPLAT_TASKQ_TEST7_NAME; + tq_arg->tq = tq; if (prealloc) { - taskq_init_ent(&tqe); - tq_arg.tqe = &tqe; + taskq_init_ent(tqe); + tq_arg->tqe = tqe; } else { - tq_arg.tqe = NULL; + tq_arg->tqe = NULL; } - splat_taskq_test7_func(&tq_arg); + splat_taskq_test7_func(tq_arg); - if (tq_arg.flag == 0) { + if (tq_arg->flag == 0) { splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' waiting\n", tq_arg.name); + "Taskq '%s' waiting\n", tq_arg->name); taskq_wait_all(tq, SPLAT_TASKQ_DEPTH_MAX); } + error = (tq_arg->depth == SPLAT_TASKQ_DEPTH_MAX ? 0 : -EINVAL); + + kmem_free(tqe, sizeof (taskq_ent_t)); + kmem_free(tq_arg, sizeof (splat_taskq_arg_t)); + splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' destroying\n", tq_arg.name); + "Taskq '%s' destroying\n", tq_arg->name); taskq_destroy(tq); - return tq_arg.depth == SPLAT_TASKQ_DEPTH_MAX ? 0 : -EINVAL; + return (error); } static int From 47af4b76ffe72457166e4abfcfe23848ac51811a Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Sun, 11 Jan 2015 10:37:43 -0600 Subject: [PATCH 0853/1062] Use current_kernel_time() in the time compatibility wrappers Since the Linux kernel's utimens family of functions uses current_kernel_time(), we need to do the same in the context of ZFS or else there can be discrepencies in timestamps (they go backward) if userland code does: fd = creat(FNAME, 0600); (void) futimens(fd, NULL); The getnstimeofday() function generally returns a slightly lower time value. Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#3006 --- include/sys/time.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/sys/time.h b/include/sys/time.h index b9826d2b7..76ce5f03c 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -54,17 +54,14 @@ static inline void gethrestime(timestruc_t *now) { - struct timespec ts; - getnstimeofday(&ts); - now->tv_sec = ts.tv_sec; - now->tv_nsec = ts.tv_nsec; + *now = current_kernel_time(); } static inline time_t gethrestime_sec(void) { struct timespec ts; - getnstimeofday(&ts); + ts = current_kernel_time(); return (ts.tv_sec); } From 6ecf6d7228fbb29cfe6a335f5afc20f75493a791 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 17 Apr 2014 10:59:00 -0400 Subject: [PATCH 0854/1062] Revert "Add PF_NOFS debugging flag" This reverts commit eb0f407a2b9089113ef6f2402ebd887511315b43 in preperation for updating the kmem/vmem infrastructure to use the PF_FSTRANS flag. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 49 ---------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 936e49d6d..2bfb4d076 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -56,47 +56,6 @@ # define __GFP_ZERO 0x8000 #endif -/* - * PF_NOFS is a per-process debug flag which is set in current->flags to - * detect when a process is performing an unsafe allocation. All tasks - * with PF_NOFS set must strictly use KM_PUSHPAGE for allocations because - * if they enter direct reclaim and initiate I/O the may deadlock. - * - * When debugging is disabled, any incorrect usage will be detected and - * a call stack with warning will be printed to the console. The flags - * will then be automatically corrected to allow for safe execution. If - * debugging is enabled this will be treated as a fatal condition. - * - * To avoid any risk of conflicting with the existing PF_ flags. The - * PF_NOFS bit shadows the rarely used PF_MUTEX_TESTER bit. Only when - * CONFIG_RT_MUTEX_TESTER is not set, and we know this bit is unused, - * will the PF_NOFS bit be valid. Happily, most existing distributions - * ship a kernel with CONFIG_RT_MUTEX_TESTER disabled. - */ -#if !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER) -#define PF_NOFS PF_MUTEX_TESTER - -static inline void -sanitize_flags(struct task_struct *p, gfp_t *flags) -{ - if (unlikely((p->flags & PF_NOFS) && (*flags & (__GFP_IO|__GFP_FS)))) { -#ifdef NDEBUG - printk(KERN_WARNING "Fixing allocation for task %s (%d) " - "which used GFP flags 0x%x with PF_NOFS set\n", - p->comm, p->pid, *flags); - spl_dumpstack(); - *flags &= ~(__GFP_IO|__GFP_FS); -#else - PANIC("FATAL allocation for task %s (%d) which used GFP " - "flags 0x%x with PF_NOFS set\n", p->comm, p->pid, *flags); -#endif /* NDEBUG */ - } -} -#else -#define PF_NOFS 0x00000000 -#define sanitize_flags(p, fl) ((void)0) -#endif /* !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER) */ - /* * __GFP_NOFAIL looks like it will be removed from the kernel perhaps as * early as 2.6.32. To avoid this issue when it occurs in upstream kernels @@ -109,8 +68,6 @@ kmalloc_nofail(size_t size, gfp_t flags) { void *ptr; - sanitize_flags(current, &flags); - do { ptr = kmalloc(size, flags); } while (ptr == NULL && (flags & __GFP_WAIT)); @@ -123,8 +80,6 @@ kzalloc_nofail(size_t size, gfp_t flags) { void *ptr; - sanitize_flags(current, &flags); - do { ptr = kzalloc(size, flags); } while (ptr == NULL && (flags & __GFP_WAIT)); @@ -137,8 +92,6 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) { void *ptr; - sanitize_flags(current, &flags); - do { ptr = kmalloc_node(size, flags, node); } while (ptr == NULL && (flags & __GFP_WAIT)); @@ -151,8 +104,6 @@ vmalloc_nofail(size_t size, gfp_t flags) { void *ptr; - sanitize_flags(current, &flags); - /* * Retry failed __vmalloc() allocations once every second. The * rational for the delay is that the likely failure modes are: From e5b9b344c728bb0d9304f1a143db9255901dc5fe Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 8 Dec 2014 13:04:42 -0500 Subject: [PATCH 0855/1062] Refactor existing code This change introduces no functional changes to the memory management interfaces. It only restructures the existing codes by separating the kmem, vmem, and kmem cache implementations in the separate source and header files. Splitting this functionality in to separate files required the addition of spl_vmem_{init,fini}() and spl_kmem_cache_{initi,fini}() functions. Additionally, several minor changes to the #include's were required to accommodate the removal of extraneous header from kmem.h. But again, while large this patch introduces no functional changes. Signed-off-by: Brian Behlendorf --- include/linux/proc_compat.h | 6 +- include/sys/Makefile.am | 2 + include/sys/kmem.h | 310 +----- include/sys/kmem_cache.h | 246 +++++ include/sys/types.h | 1 - include/sys/vmem.h | 183 ++++ include/sys/vmsystm.h | 13 - module/spl/Makefile.in | 2 + module/spl/spl-condvar.c | 1 + module/spl/spl-generic.c | 43 +- module/spl/spl-kmem-cache.c | 1648 ++++++++++++++++++++++++++++++ module/spl/spl-kmem.c | 1792 +-------------------------------- module/spl/spl-kstat.c | 1 + module/spl/spl-proc.c | 5 + module/spl/spl-tsd.c | 1 + module/spl/spl-vmem.c | 355 +++++++ module/spl/spl-vnode.c | 1 + module/spl/spl-zlib.c | 1 + module/splat/splat-condvar.c | 3 +- module/splat/splat-internal.h | 1 + module/splat/splat-kmem.c | 3 + module/splat/splat-taskq.c | 2 + module/splat/splat-zlib.c | 1 + 23 files changed, 2506 insertions(+), 2115 deletions(-) create mode 100644 include/sys/kmem_cache.h create mode 100644 include/sys/vmem.h create mode 100644 module/spl/spl-kmem-cache.c create mode 100644 module/spl/spl-vmem.c diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index 5bbe85081..2c57f39d2 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -22,8 +22,8 @@ * with the SPL. If not, see . \*****************************************************************************/ -#ifndef _SPL_PROC_H -#define _SPL_PROC_H +#ifndef _SPL_PROC_COMPAT_H +#define _SPL_PROC_COMPAT_H #include @@ -32,4 +32,4 @@ extern struct proc_dir_entry *proc_spl_kstat; int spl_proc_init(void); void spl_proc_fini(void); -#endif /* SPL_PROC_H */ +#endif /* SPL_PROC_COMPAT_H */ diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 2d21c5728..f9e883fd4 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -44,6 +44,7 @@ KERNEL_H = \ $(top_srcdir)/include/sys/isa_defs.h \ $(top_srcdir)/include/sys/kidmap.h \ $(top_srcdir)/include/sys/kmem.h \ + $(top_srcdir)/include/sys/kmem_cache.h \ $(top_srcdir)/include/sys/kobj.h \ $(top_srcdir)/include/sys/kstat.h \ $(top_srcdir)/include/sys/list.h \ @@ -94,6 +95,7 @@ KERNEL_H = \ $(top_srcdir)/include/sys/varargs.h \ $(top_srcdir)/include/sys/vfs.h \ $(top_srcdir)/include/sys/vfs_opreg.h \ + $(top_srcdir)/include/sys/vmem.h \ $(top_srcdir)/include/sys/vmsystm.h \ $(top_srcdir)/include/sys/vnode.h \ $(top_srcdir)/include/sys/zmod.h \ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 2bfb4d076..ee25e4c8c 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -25,19 +25,13 @@ #ifndef _SPL_KMEM_H #define _SPL_KMEM_H -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +extern int kmem_debugging(void); +extern char *kmem_vasprintf(const char *fmt, va_list ap); +extern char *kmem_asprintf(const char *fmt, ...); +extern char *strdup(const char *str); +extern void strfree(char *str); /* * Memory allocation interfaces @@ -99,52 +93,6 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) return ptr; } -static inline void * -vmalloc_nofail(size_t size, gfp_t flags) -{ - void *ptr; - - /* - * Retry failed __vmalloc() allocations once every second. The - * rational for the delay is that the likely failure modes are: - * - * 1) The system has completely exhausted memory, in which case - * delaying 1 second for the memory reclaim to run is reasonable - * to avoid thrashing the system. - * 2) The system has memory but has exhausted the small virtual - * address space available on 32-bit systems. Retrying the - * allocation immediately will only result in spinning on the - * virtual address space lock. It is better delay a second and - * hope that another process will free some of the address space. - * But the bottom line is there is not much we can actually do - * since we can never safely return a failure and honor the - * Solaris semantics. - */ - while (1) { - ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); - if (unlikely((ptr == NULL) && (flags & __GFP_WAIT))) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - } else { - break; - } - } - - return ptr; -} - -static inline void * -vzalloc_nofail(size_t size, gfp_t flags) -{ - void *ptr; - - ptr = vmalloc_nofail(size, flags); - if (ptr) - memset(ptr, 0, (size)); - - return ptr; -} - #ifdef DEBUG_KMEM /* @@ -156,15 +104,9 @@ vzalloc_nofail(size_t size, gfp_t flags) # define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used) # define kmem_alloc_used_read() atomic64_read(&kmem_alloc_used) # define kmem_alloc_used_set(size) atomic64_set(&kmem_alloc_used, size) -# define vmem_alloc_used_add(size) atomic64_add(size, &vmem_alloc_used) -# define vmem_alloc_used_sub(size) atomic64_sub(size, &vmem_alloc_used) -# define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used) -# define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size) extern atomic64_t kmem_alloc_used; extern unsigned long long kmem_alloc_max; -extern atomic64_t vmem_alloc_used; -extern unsigned long long vmem_alloc_max; # else /* HAVE_ATOMIC64_T */ @@ -172,15 +114,9 @@ extern unsigned long long vmem_alloc_max; # define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used) # define kmem_alloc_used_read() atomic_read(&kmem_alloc_used) # define kmem_alloc_used_set(size) atomic_set(&kmem_alloc_used, size) -# define vmem_alloc_used_add(size) atomic_add(size, &vmem_alloc_used) -# define vmem_alloc_used_sub(size) atomic_sub(size, &vmem_alloc_used) -# define vmem_alloc_used_read() atomic_read(&vmem_alloc_used) -# define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size) extern atomic_t kmem_alloc_used; extern unsigned long long kmem_alloc_max; -extern atomic_t vmem_alloc_used; -extern unsigned long long vmem_alloc_max; # endif /* HAVE_ATOMIC64_T */ @@ -204,16 +140,8 @@ extern unsigned long long vmem_alloc_max; __FUNCTION__, __LINE__, 1, nd) # define kmem_free(ptr, sz) kmem_free_track((ptr), (sz)) -# define vmem_alloc(sz, fl) vmem_alloc_track((sz), (fl), \ - __FUNCTION__, __LINE__) -# define vmem_zalloc(sz, fl) vmem_alloc_track((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__) -# define vmem_free(ptr, sz) vmem_free_track((ptr), (sz)) - extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); extern void kmem_free_track(const void *, size_t); -extern void *vmem_alloc_track(size_t, int, const char *, int); -extern void vmem_free_track(const void *, size_t); # else /* DEBUG_KMEM_TRACKING */ /* @@ -233,16 +161,8 @@ extern void vmem_free_track(const void *, size_t); __FUNCTION__, __LINE__, 1, nd) # define kmem_free(ptr, sz) kmem_free_debug((ptr), (sz)) -# define vmem_alloc(sz, fl) vmem_alloc_debug((sz), (fl), \ - __FUNCTION__, __LINE__) -# define vmem_zalloc(sz, fl) vmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__) -# define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz)) - extern void *kmem_alloc_debug(size_t, int, const char *, int, int, int); extern void kmem_free_debug(const void *, size_t); -extern void *vmem_alloc_debug(size_t, int, const char *, int); -extern void vmem_free_debug(const void *, size_t); # endif /* DEBUG_KMEM_TRACKING */ #else /* DEBUG_KMEM */ @@ -258,230 +178,12 @@ extern void vmem_free_debug(const void *, size_t); # define kmem_alloc_node(sz, fl, nd) kmalloc_node_nofail((sz), (fl), (nd)) # define kmem_free(ptr, sz) ((void)(sz), kfree(ptr)) -# define vmem_alloc(sz, fl) vmalloc_nofail((sz), (fl)) -# define vmem_zalloc(sz, fl) vzalloc_nofail((sz), (fl)) -# define vmem_free(ptr, sz) ((void)(sz), vfree(ptr)) - #endif /* DEBUG_KMEM */ -extern int kmem_debugging(void); -extern char *kmem_vasprintf(const char *fmt, va_list ap); -extern char *kmem_asprintf(const char *fmt, ...); -extern char *strdup(const char *str); -extern void strfree(char *str); - - -/* - * Slab allocation interfaces. The SPL slab differs from the standard - * Linux SLAB or SLUB primarily in that each cache may be backed by slabs - * allocated from the physical or virtal memory address space. The virtual - * slabs allow for good behavior when allocation large objects of identical - * size. This slab implementation also supports both constructors and - * destructions which the Linux slab does not. - */ -enum { - KMC_BIT_NOTOUCH = 0, /* Don't update ages */ - KMC_BIT_NODEBUG = 1, /* Default behavior */ - KMC_BIT_NOMAGAZINE = 2, /* XXX: Unsupported */ - KMC_BIT_NOHASH = 3, /* XXX: Unsupported */ - KMC_BIT_QCACHE = 4, /* XXX: Unsupported */ - KMC_BIT_KMEM = 5, /* Use kmem cache */ - KMC_BIT_VMEM = 6, /* Use vmem cache */ - KMC_BIT_SLAB = 7, /* Use Linux slab cache */ - KMC_BIT_OFFSLAB = 8, /* Objects not on slab */ - KMC_BIT_NOEMERGENCY = 9, /* Disable emergency objects */ - KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */ - KMC_BIT_GROWING = 15, /* Growing in progress */ - KMC_BIT_REAPING = 16, /* Reaping in progress */ - KMC_BIT_DESTROY = 17, /* Destroy in progress */ - KMC_BIT_TOTAL = 18, /* Proc handler helper bit */ - KMC_BIT_ALLOC = 19, /* Proc handler helper bit */ - KMC_BIT_MAX = 20, /* Proc handler helper bit */ -}; - -/* kmem move callback return values */ -typedef enum kmem_cbrc { - KMEM_CBRC_YES = 0, /* Object moved */ - KMEM_CBRC_NO = 1, /* Object not moved */ - KMEM_CBRC_LATER = 2, /* Object not moved, try again later */ - KMEM_CBRC_DONT_NEED = 3, /* Neither object is needed */ - KMEM_CBRC_DONT_KNOW = 4, /* Object unknown */ -} kmem_cbrc_t; - -#define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH) -#define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) -#define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE) -#define KMC_NOHASH (1 << KMC_BIT_NOHASH) -#define KMC_QCACHE (1 << KMC_BIT_QCACHE) -#define KMC_KMEM (1 << KMC_BIT_KMEM) -#define KMC_VMEM (1 << KMC_BIT_VMEM) -#define KMC_SLAB (1 << KMC_BIT_SLAB) -#define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) -#define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY) -#define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED) -#define KMC_GROWING (1 << KMC_BIT_GROWING) -#define KMC_REAPING (1 << KMC_BIT_REAPING) -#define KMC_DESTROY (1 << KMC_BIT_DESTROY) -#define KMC_TOTAL (1 << KMC_BIT_TOTAL) -#define KMC_ALLOC (1 << KMC_BIT_ALLOC) -#define KMC_MAX (1 << KMC_BIT_MAX) - -#define KMC_REAP_CHUNK INT_MAX -#define KMC_DEFAULT_SEEKS 1 - -#define KMC_EXPIRE_AGE 0x1 /* Due to age */ -#define KMC_EXPIRE_MEM 0x2 /* Due to low memory */ - -#define KMC_RECLAIM_ONCE 0x1 /* Force a single shrinker pass */ - -extern unsigned int spl_kmem_cache_expire; -extern struct list_head spl_kmem_cache_list; -extern struct rw_semaphore spl_kmem_cache_sem; - -#define SKM_MAGIC 0x2e2e2e2e -#define SKO_MAGIC 0x20202020 -#define SKS_MAGIC 0x22222222 -#define SKC_MAGIC 0x2c2c2c2c - -#define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ -#define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 1 /* Minimum objects per slab */ -#define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ - -#define POINTER_IS_VALID(p) 0 /* Unimplemented */ -#define POINTER_INVALIDATE(pp) /* Unimplemented */ - -typedef int (*spl_kmem_ctor_t)(void *, void *, int); -typedef void (*spl_kmem_dtor_t)(void *, void *); -typedef void (*spl_kmem_reclaim_t)(void *); - -typedef struct spl_kmem_magazine { - uint32_t skm_magic; /* Sanity magic */ - uint32_t skm_avail; /* Available objects */ - uint32_t skm_size; /* Magazine size */ - uint32_t skm_refill; /* Batch refill size */ - struct spl_kmem_cache *skm_cache; /* Owned by cache */ - unsigned long skm_age; /* Last cache access */ - unsigned int skm_cpu; /* Owned by cpu */ - void *skm_objs[0]; /* Object pointers */ -} spl_kmem_magazine_t; - -typedef struct spl_kmem_obj { - uint32_t sko_magic; /* Sanity magic */ - void *sko_addr; /* Buffer address */ - struct spl_kmem_slab *sko_slab; /* Owned by slab */ - struct list_head sko_list; /* Free object list linkage */ -} spl_kmem_obj_t; - -typedef struct spl_kmem_slab { - uint32_t sks_magic; /* Sanity magic */ - uint32_t sks_objs; /* Objects per slab */ - struct spl_kmem_cache *sks_cache; /* Owned by cache */ - struct list_head sks_list; /* Slab list linkage */ - struct list_head sks_free_list; /* Free object list */ - unsigned long sks_age; /* Last modify jiffie */ - uint32_t sks_ref; /* Ref count used objects */ -} spl_kmem_slab_t; - -typedef struct spl_kmem_alloc { - struct spl_kmem_cache *ska_cache; /* Owned by cache */ - int ska_flags; /* Allocation flags */ - taskq_ent_t ska_tqe; /* Task queue entry */ -} spl_kmem_alloc_t; - -typedef struct spl_kmem_emergency { - struct rb_node ske_node; /* Emergency tree linkage */ - void *ske_obj; /* Buffer address */ -} spl_kmem_emergency_t; - -typedef struct spl_kmem_cache { - uint32_t skc_magic; /* Sanity magic */ - uint32_t skc_name_size; /* Name length */ - char *skc_name; /* Name string */ - spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */ - uint32_t skc_mag_size; /* Magazine size */ - uint32_t skc_mag_refill; /* Magazine refill count */ - spl_kmem_ctor_t skc_ctor; /* Constructor */ - spl_kmem_dtor_t skc_dtor; /* Destructor */ - spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ - void *skc_private; /* Private data */ - void *skc_vmp; /* Unused */ - struct kmem_cache *skc_linux_cache; /* Linux slab cache if used */ - unsigned long skc_flags; /* Flags */ - uint32_t skc_obj_size; /* Object size */ - uint32_t skc_obj_align; /* Object alignment */ - uint32_t skc_slab_objs; /* Objects per slab */ - uint32_t skc_slab_size; /* Slab size */ - uint32_t skc_delay; /* Slab reclaim interval */ - uint32_t skc_reap; /* Slab reclaim count */ - atomic_t skc_ref; /* Ref count callers */ - taskqid_t skc_taskqid; /* Slab reclaim task */ - struct list_head skc_list; /* List of caches linkage */ - struct list_head skc_complete_list;/* Completely alloc'ed */ - struct list_head skc_partial_list; /* Partially alloc'ed */ - struct rb_root skc_emergency_tree; /* Min sized objects */ - spinlock_t skc_lock; /* Cache lock */ - wait_queue_head_t skc_waitq; /* Allocation waiters */ - uint64_t skc_slab_fail; /* Slab alloc failures */ - uint64_t skc_slab_create;/* Slab creates */ - uint64_t skc_slab_destroy;/* Slab destroys */ - uint64_t skc_slab_total; /* Slab total current */ - uint64_t skc_slab_alloc; /* Slab alloc current */ - uint64_t skc_slab_max; /* Slab max historic */ - uint64_t skc_obj_total; /* Obj total current */ - uint64_t skc_obj_alloc; /* Obj alloc current */ - uint64_t skc_obj_max; /* Obj max historic */ - uint64_t skc_obj_deadlock; /* Obj emergency deadlocks */ - uint64_t skc_obj_emergency; /* Obj emergency current */ - uint64_t skc_obj_emergency_max; /* Obj emergency max */ -} spl_kmem_cache_t; -#define kmem_cache_t spl_kmem_cache_t - -extern spl_kmem_cache_t *spl_kmem_cache_create(char *name, size_t size, - size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, - spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); -extern void spl_kmem_cache_set_move(spl_kmem_cache_t *, - kmem_cbrc_t (*)(void *, void *, size_t, void *)); -extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); -extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); -extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); -extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count); -extern void spl_kmem_reap(void); - int spl_kmem_init(void); void spl_kmem_fini(void); -#define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ - spl_kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) -#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move) -#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) -#define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) -#define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) -#define kmem_cache_reap_now(skc) \ - spl_kmem_cache_reap_now(skc, skc->skc_reap) -#define kmem_reap() spl_kmem_reap() #define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ ((ptr) < (void *)VMALLOC_END)) -/* - * Allow custom slab allocation flags to be set for KMC_SLAB based caches. - * One use for this function is to ensure the __GFP_COMP flag is part of - * the default allocation mask which ensures higher order allocations are - * properly refcounted. This flag was added to the default ->allocflags - * as of Linux 3.11. - */ -static inline void -kmem_cache_set_allocflags(spl_kmem_cache_t *skc, gfp_t flags) -{ - if (skc->skc_linux_cache == NULL) - return; - -#if defined(HAVE_KMEM_CACHE_ALLOCFLAGS) - skc->skc_linux_cache->allocflags |= flags; -#elif defined(HAVE_KMEM_CACHE_GFPFLAGS) - skc->skc_linux_cache->gfpflags |= flags; -#endif -} - #endif /* _SPL_KMEM_H */ diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h new file mode 100644 index 000000000..654a2ea43 --- /dev/null +++ b/include/sys/kmem_cache.h @@ -0,0 +1,246 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_KMEM_CACHE_H +#define _SPL_KMEM_CACHE_H + +#include + +/* + * Slab allocation interfaces. The SPL slab differs from the standard + * Linux SLAB or SLUB primarily in that each cache may be backed by slabs + * allocated from the physical or virtal memory address space. The virtual + * slabs allow for good behavior when allocation large objects of identical + * size. This slab implementation also supports both constructors and + * destructions which the Linux slab does not. + */ +enum { + KMC_BIT_NOTOUCH = 0, /* Don't update ages */ + KMC_BIT_NODEBUG = 1, /* Default behavior */ + KMC_BIT_NOMAGAZINE = 2, /* XXX: Unsupported */ + KMC_BIT_NOHASH = 3, /* XXX: Unsupported */ + KMC_BIT_QCACHE = 4, /* XXX: Unsupported */ + KMC_BIT_KMEM = 5, /* Use kmem cache */ + KMC_BIT_VMEM = 6, /* Use vmem cache */ + KMC_BIT_SLAB = 7, /* Use Linux slab cache */ + KMC_BIT_OFFSLAB = 8, /* Objects not on slab */ + KMC_BIT_NOEMERGENCY = 9, /* Disable emergency objects */ + KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */ + KMC_BIT_GROWING = 15, /* Growing in progress */ + KMC_BIT_REAPING = 16, /* Reaping in progress */ + KMC_BIT_DESTROY = 17, /* Destroy in progress */ + KMC_BIT_TOTAL = 18, /* Proc handler helper bit */ + KMC_BIT_ALLOC = 19, /* Proc handler helper bit */ + KMC_BIT_MAX = 20, /* Proc handler helper bit */ +}; + +/* kmem move callback return values */ +typedef enum kmem_cbrc { + KMEM_CBRC_YES = 0, /* Object moved */ + KMEM_CBRC_NO = 1, /* Object not moved */ + KMEM_CBRC_LATER = 2, /* Object not moved, try again later */ + KMEM_CBRC_DONT_NEED = 3, /* Neither object is needed */ + KMEM_CBRC_DONT_KNOW = 4, /* Object unknown */ +} kmem_cbrc_t; + +#define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH) +#define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) +#define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE) +#define KMC_NOHASH (1 << KMC_BIT_NOHASH) +#define KMC_QCACHE (1 << KMC_BIT_QCACHE) +#define KMC_KMEM (1 << KMC_BIT_KMEM) +#define KMC_VMEM (1 << KMC_BIT_VMEM) +#define KMC_SLAB (1 << KMC_BIT_SLAB) +#define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) +#define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY) +#define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED) +#define KMC_GROWING (1 << KMC_BIT_GROWING) +#define KMC_REAPING (1 << KMC_BIT_REAPING) +#define KMC_DESTROY (1 << KMC_BIT_DESTROY) +#define KMC_TOTAL (1 << KMC_BIT_TOTAL) +#define KMC_ALLOC (1 << KMC_BIT_ALLOC) +#define KMC_MAX (1 << KMC_BIT_MAX) + +#define KMC_REAP_CHUNK INT_MAX +#define KMC_DEFAULT_SEEKS 1 + +#define KMC_EXPIRE_AGE 0x1 /* Due to age */ +#define KMC_EXPIRE_MEM 0x2 /* Due to low memory */ + +#define KMC_RECLAIM_ONCE 0x1 /* Force a single shrinker pass */ + +extern unsigned int spl_kmem_cache_expire; +extern struct list_head spl_kmem_cache_list; +extern struct rw_semaphore spl_kmem_cache_sem; + +#define SKM_MAGIC 0x2e2e2e2e +#define SKO_MAGIC 0x20202020 +#define SKS_MAGIC 0x22222222 +#define SKC_MAGIC 0x2c2c2c2c + +#define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ +#define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 1 /* Minimum objects per slab */ +#define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ + +#define POINTER_IS_VALID(p) 0 /* Unimplemented */ +#define POINTER_INVALIDATE(pp) /* Unimplemented */ + +typedef int (*spl_kmem_ctor_t)(void *, void *, int); +typedef void (*spl_kmem_dtor_t)(void *, void *); +typedef void (*spl_kmem_reclaim_t)(void *); + +typedef struct spl_kmem_magazine { + uint32_t skm_magic; /* Sanity magic */ + uint32_t skm_avail; /* Available objects */ + uint32_t skm_size; /* Magazine size */ + uint32_t skm_refill; /* Batch refill size */ + struct spl_kmem_cache *skm_cache; /* Owned by cache */ + unsigned long skm_age; /* Last cache access */ + unsigned int skm_cpu; /* Owned by cpu */ + void *skm_objs[0]; /* Object pointers */ +} spl_kmem_magazine_t; + +typedef struct spl_kmem_obj { + uint32_t sko_magic; /* Sanity magic */ + void *sko_addr; /* Buffer address */ + struct spl_kmem_slab *sko_slab; /* Owned by slab */ + struct list_head sko_list; /* Free object list linkage */ +} spl_kmem_obj_t; + +typedef struct spl_kmem_slab { + uint32_t sks_magic; /* Sanity magic */ + uint32_t sks_objs; /* Objects per slab */ + struct spl_kmem_cache *sks_cache; /* Owned by cache */ + struct list_head sks_list; /* Slab list linkage */ + struct list_head sks_free_list; /* Free object list */ + unsigned long sks_age; /* Last modify jiffie */ + uint32_t sks_ref; /* Ref count used objects */ +} spl_kmem_slab_t; + +typedef struct spl_kmem_alloc { + struct spl_kmem_cache *ska_cache; /* Owned by cache */ + int ska_flags; /* Allocation flags */ + taskq_ent_t ska_tqe; /* Task queue entry */ +} spl_kmem_alloc_t; + +typedef struct spl_kmem_emergency { + struct rb_node ske_node; /* Emergency tree linkage */ + void *ske_obj; /* Buffer address */ +} spl_kmem_emergency_t; + +typedef struct spl_kmem_cache { + uint32_t skc_magic; /* Sanity magic */ + uint32_t skc_name_size; /* Name length */ + char *skc_name; /* Name string */ + spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */ + uint32_t skc_mag_size; /* Magazine size */ + uint32_t skc_mag_refill; /* Magazine refill count */ + spl_kmem_ctor_t skc_ctor; /* Constructor */ + spl_kmem_dtor_t skc_dtor; /* Destructor */ + spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */ + void *skc_private; /* Private data */ + void *skc_vmp; /* Unused */ + struct kmem_cache *skc_linux_cache; /* Linux slab cache if used */ + unsigned long skc_flags; /* Flags */ + uint32_t skc_obj_size; /* Object size */ + uint32_t skc_obj_align; /* Object alignment */ + uint32_t skc_slab_objs; /* Objects per slab */ + uint32_t skc_slab_size; /* Slab size */ + uint32_t skc_delay; /* Slab reclaim interval */ + uint32_t skc_reap; /* Slab reclaim count */ + atomic_t skc_ref; /* Ref count callers */ + taskqid_t skc_taskqid; /* Slab reclaim task */ + struct list_head skc_list; /* List of caches linkage */ + struct list_head skc_complete_list;/* Completely alloc'ed */ + struct list_head skc_partial_list; /* Partially alloc'ed */ + struct rb_root skc_emergency_tree; /* Min sized objects */ + spinlock_t skc_lock; /* Cache lock */ + wait_queue_head_t skc_waitq; /* Allocation waiters */ + uint64_t skc_slab_fail; /* Slab alloc failures */ + uint64_t skc_slab_create;/* Slab creates */ + uint64_t skc_slab_destroy;/* Slab destroys */ + uint64_t skc_slab_total; /* Slab total current */ + uint64_t skc_slab_alloc; /* Slab alloc current */ + uint64_t skc_slab_max; /* Slab max historic */ + uint64_t skc_obj_total; /* Obj total current */ + uint64_t skc_obj_alloc; /* Obj alloc current */ + uint64_t skc_obj_max; /* Obj max historic */ + uint64_t skc_obj_deadlock; /* Obj emergency deadlocks */ + uint64_t skc_obj_emergency; /* Obj emergency current */ + uint64_t skc_obj_emergency_max; /* Obj emergency max */ +} spl_kmem_cache_t; +#define kmem_cache_t spl_kmem_cache_t + +extern spl_kmem_cache_t *spl_kmem_cache_create(char *name, size_t size, + size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, + spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); +extern void spl_kmem_cache_set_move(spl_kmem_cache_t *, + kmem_cbrc_t (*)(void *, void *, size_t, void *)); +extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); +extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); +extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); +extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count); +extern void spl_kmem_reap(void); + +#define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ + spl_kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) +#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move) +#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) +#define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) +#define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) +#define kmem_cache_reap_now(skc) \ + spl_kmem_cache_reap_now(skc, skc->skc_reap) +#define kmem_reap() spl_kmem_reap() +#define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ + ((ptr) < (void *)VMALLOC_END)) + +/* + * Allow custom slab allocation flags to be set for KMC_SLAB based caches. + * One use for this function is to ensure the __GFP_COMP flag is part of + * the default allocation mask which ensures higher order allocations are + * properly refcounted. This flag was added to the default ->allocflags + * as of Linux 3.11. + */ +static inline void +kmem_cache_set_allocflags(spl_kmem_cache_t *skc, gfp_t flags) +{ + if (skc->skc_linux_cache == NULL) + return; + +#if defined(HAVE_KMEM_CACHE_ALLOCFLAGS) + skc->skc_linux_cache->allocflags |= flags; +#elif defined(HAVE_KMEM_CACHE_GFPFLAGS) + skc->skc_linux_cache->gfpflags |= flags; +#endif +} + +/* + * The following functions are only available for internal use. + */ +extern int spl_kmem_cache_init(void); +extern void spl_kmem_cache_fini(void); + +#endif /* _SPL_KMEM_CACHE_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 3b3a42ede..ec0455cdc 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -48,7 +48,6 @@ typedef long long longlong_t; typedef long long offset_t; typedef struct task_struct kthread_t; typedef struct task_struct proc_t; -typedef struct vmem { } vmem_t; typedef short pri_t; typedef struct timespec timestruc_t; /* definition per SVr4 */ typedef struct timespec timespec_t; diff --git a/include/sys/vmem.h b/include/sys/vmem.h new file mode 100644 index 000000000..e86e89bb4 --- /dev/null +++ b/include/sys/vmem.h @@ -0,0 +1,183 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_VMEM_H +#define _SPL_VMEM_H + +#include +#include +#include + +typedef struct vmem { } vmem_t; + +extern vmem_t *heap_arena; +extern vmem_t *zio_alloc_arena; +extern vmem_t *zio_arena; + +extern size_t vmem_size(vmem_t *vmp, int typemask); + +/* + * Memory allocation interfaces + */ +#define VMEM_ALLOC 0x01 +#define VMEM_FREE 0x02 + +#ifndef VMALLOC_TOTAL +#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) +#endif + +static inline void * +vmalloc_nofail(size_t size, gfp_t flags) +{ + void *ptr; + + /* + * Retry failed __vmalloc() allocations once every second. The + * rational for the delay is that the likely failure modes are: + * + * 1) The system has completely exhausted memory, in which case + * delaying 1 second for the memory reclaim to run is reasonable + * to avoid thrashing the system. + * 2) The system has memory but has exhausted the small virtual + * address space available on 32-bit systems. Retrying the + * allocation immediately will only result in spinning on the + * virtual address space lock. It is better delay a second and + * hope that another process will free some of the address space. + * But the bottom line is there is not much we can actually do + * since we can never safely return a failure and honor the + * Solaris semantics. + */ + while (1) { + ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); + if (unlikely((ptr == NULL) && (flags & __GFP_WAIT))) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + } else { + break; + } + } + + return ptr; +} + +static inline void * +vzalloc_nofail(size_t size, gfp_t flags) +{ + void *ptr; + + ptr = vmalloc_nofail(size, flags); + if (ptr) + memset(ptr, 0, (size)); + + return ptr; +} + +#ifdef DEBUG_KMEM + +/* + * Memory accounting functions to be used only when DEBUG_KMEM is set. + */ +# ifdef HAVE_ATOMIC64_T + +# define vmem_alloc_used_add(size) atomic64_add(size, &vmem_alloc_used) +# define vmem_alloc_used_sub(size) atomic64_sub(size, &vmem_alloc_used) +# define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used) +# define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size) + +extern atomic64_t vmem_alloc_used; +extern unsigned long long vmem_alloc_max; + +# else /* HAVE_ATOMIC64_T */ + +# define vmem_alloc_used_add(size) atomic_add(size, &vmem_alloc_used) +# define vmem_alloc_used_sub(size) atomic_sub(size, &vmem_alloc_used) +# define vmem_alloc_used_read() atomic_read(&vmem_alloc_used) +# define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size) + +extern atomic_t vmem_alloc_used; +extern unsigned long long vmem_alloc_max; + +# endif /* HAVE_ATOMIC64_T */ + +# ifdef DEBUG_KMEM_TRACKING +/* + * DEBUG_KMEM && DEBUG_KMEM_TRACKING + * + * The maximum level of memory debugging. All memory will be accounted + * for and each allocation will be explicitly tracked. Any allocation + * which is leaked will be reported on module unload and the exact location + * where that memory was allocation will be reported. This level of memory + * tracking will have a significant impact on performance and should only + * be enabled for debugging. This feature may be enabled by passing + * --enable-debug-kmem-tracking to configure. + */ +# define vmem_alloc(sz, fl) vmem_alloc_track((sz), (fl), \ + __FUNCTION__, __LINE__) +# define vmem_zalloc(sz, fl) vmem_alloc_track((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__) +# define vmem_free(ptr, sz) vmem_free_track((ptr), (sz)) + +extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); +extern void kmem_free_track(const void *, size_t); +extern void *vmem_alloc_track(size_t, int, const char *, int); +extern void vmem_free_track(const void *, size_t); + +# else /* DEBUG_KMEM_TRACKING */ +/* + * DEBUG_KMEM && !DEBUG_KMEM_TRACKING + * + * The default build will set DEBUG_KEM. This provides basic memory + * accounting with little to no impact on performance. When the module + * is unloaded in any memory was leaked the total number of leaked bytes + * will be reported on the console. To disable this basic accounting + * pass the --disable-debug-kmem option to configure. + */ +# define vmem_alloc(sz, fl) vmem_alloc_debug((sz), (fl), \ + __FUNCTION__, __LINE__) +# define vmem_zalloc(sz, fl) vmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__) +# define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz)) + +extern void *vmem_alloc_debug(size_t, int, const char *, int); +extern void vmem_free_debug(const void *, size_t); + +# endif /* DEBUG_KMEM_TRACKING */ +#else /* DEBUG_KMEM */ +/* + * !DEBUG_KMEM && !DEBUG_KMEM_TRACKING + * + * All debugging is disabled. There will be no overhead even for + * minimal memory accounting. To enable basic accounting pass the + * --enable-debug-kmem option to configure. + */ +# define vmem_alloc(sz, fl) vmalloc_nofail((sz), (fl)) +# define vmem_zalloc(sz, fl) vzalloc_nofail((sz), (fl)) +# define vmem_free(ptr, sz) ((void)(sz), vfree(ptr)) + +#endif /* DEBUG_KMEM */ + +int spl_vmem_init(void); +void spl_vmem_fini(void); + +#endif /* _SPL_VMEM_H */ diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index c6b86866b..2fa169523 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -37,19 +37,6 @@ #define physmem totalram_pages #define freemem nr_free_pages() -extern vmem_t *heap_arena; /* primary kernel heap arena */ -extern vmem_t *zio_alloc_arena; /* arena for zio caches */ -extern vmem_t *zio_arena; /* arena for allocating zio memory */ - -extern size_t vmem_size(vmem_t *vmp, int typemask); - -#define VMEM_ALLOC 0x01 -#define VMEM_FREE 0x02 - -#ifndef VMALLOC_TOTAL -#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) -#endif - #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 9f67ed646..d1742448d 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -8,6 +8,8 @@ obj-$(CONFIG_SPL) := $(MODULE).o $(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem-cache.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-vmem.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-thread.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-taskq.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-rwlock.o diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 2a0052f56..cebb8f2b1 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -25,6 +25,7 @@ \*****************************************************************************/ #include +#include void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 803f03a85..b706ccecd 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include #include @@ -38,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -479,12 +482,46 @@ zone_get_hostid(void *zone) } EXPORT_SYMBOL(zone_get_hostid); +static int +spl_kvmem_init(void) +{ + int rc = 0; + + rc = spl_kmem_init(); + if (rc) + goto out1; + + rc = spl_vmem_init(); + if (rc) + goto out2; + + rc = spl_kmem_cache_init(); + if (rc) + goto out3; + + return (rc); +out3: + spl_vmem_fini(); +out2: + spl_kmem_fini(); +out1: + return (rc); +} + +static void +spl_kvmem_fini(void) +{ + spl_kmem_cache_fini(); + spl_vmem_fini(); + spl_kmem_fini(); +} + static int __init spl_init(void) { int rc = 0; - if ((rc = spl_kmem_init())) + if ((rc = spl_kvmem_init())) goto out1; if ((rc = spl_mutex_init())) @@ -530,7 +567,7 @@ out4: out3: spl_mutex_fini(); out2: - spl_kmem_fini(); + spl_kvmem_fini(); out1: printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer " "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, @@ -552,7 +589,7 @@ spl_fini(void) spl_taskq_fini(); spl_rw_fini(); spl_mutex_fini(); - spl_kmem_fini(); + spl_kvmem_fini(); } /* Called when a dependent module is loaded */ diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c new file mode 100644 index 000000000..d24c4c205 --- /dev/null +++ b/module/spl/spl-kmem-cache.c @@ -0,0 +1,1648 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Kmem Implementation. +\*****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Within the scope of spl-kmem.c file the kmem_cache_* definitions + * are removed to allow access to the real Linux slab allocator. + */ +#undef kmem_cache_destroy +#undef kmem_cache_create +#undef kmem_cache_alloc +#undef kmem_cache_free + + +/* + * Cache expiration was implemented because it was part of the default Solaris + * kmem_cache behavior. The idea is that per-cpu objects which haven't been + * accessed in several seconds should be returned to the cache. On the other + * hand Linux slabs never move objects back to the slabs unless there is + * memory pressure on the system. By default the Linux method is enabled + * because it has been shown to improve responsiveness on low memory systems. + * This policy may be changed by setting KMC_EXPIRE_AGE or KMC_EXPIRE_MEM. + */ +unsigned int spl_kmem_cache_expire = KMC_EXPIRE_MEM; +EXPORT_SYMBOL(spl_kmem_cache_expire); +module_param(spl_kmem_cache_expire, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); + +/* + * The default behavior is to report the number of objects remaining in the + * cache. This allows the Linux VM to repeatedly reclaim objects from the + * cache when memory is low satisfy other memory allocations. Alternately, + * setting this value to KMC_RECLAIM_ONCE limits how aggressively the cache + * is reclaimed. This may increase the likelihood of out of memory events. + */ +unsigned int spl_kmem_cache_reclaim = 0 /* KMC_RECLAIM_ONCE */; +module_param(spl_kmem_cache_reclaim, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_reclaim, "Single reclaim pass (0x1)"); + +unsigned int spl_kmem_cache_obj_per_slab = SPL_KMEM_CACHE_OBJ_PER_SLAB; +module_param(spl_kmem_cache_obj_per_slab, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab, "Number of objects per slab"); + +unsigned int spl_kmem_cache_obj_per_slab_min = SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN; +module_param(spl_kmem_cache_obj_per_slab_min, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab_min, + "Minimal number of objects per slab"); + +unsigned int spl_kmem_cache_max_size = 32; +module_param(spl_kmem_cache_max_size, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB"); + +/* + * For small objects the Linux slab allocator should be used to make the most + * efficient use of the memory. However, large objects are not supported by + * the Linux slab and therefore the SPL implementation is preferred. A cutoff + * of 16K was determined to be optimal for architectures using 4K pages. + */ +#if PAGE_SIZE == 4096 +unsigned int spl_kmem_cache_slab_limit = 16384; +#else +unsigned int spl_kmem_cache_slab_limit = 0; +#endif +module_param(spl_kmem_cache_slab_limit, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_slab_limit, + "Objects less than N bytes use the Linux slab"); + +unsigned int spl_kmem_cache_kmem_limit = (PAGE_SIZE / 4); +module_param(spl_kmem_cache_kmem_limit, uint, 0644); +MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, + "Objects less than N bytes use the kmalloc"); + +/* + * Slab allocation interfaces + * + * While the Linux slab implementation was inspired by the Solaris + * implementation I cannot use it to emulate the Solaris APIs. I + * require two features which are not provided by the Linux slab. + * + * 1) Constructors AND destructors. Recent versions of the Linux + * kernel have removed support for destructors. This is a deal + * breaker for the SPL which contains particularly expensive + * initializers for mutex's, condition variables, etc. We also + * require a minimal level of cleanup for these data types unlike + * many Linux data type which do need to be explicitly destroyed. + * + * 2) Virtual address space backed slab. Callers of the Solaris slab + * expect it to work well for both small are very large allocations. + * Because of memory fragmentation the Linux slab which is backed + * by kmalloc'ed memory performs very badly when confronted with + * large numbers of large allocations. Basing the slab on the + * virtual address space removes the need for contiguous pages + * and greatly improve performance for large allocations. + * + * For these reasons, the SPL has its own slab implementation with + * the needed features. It is not as highly optimized as either the + * Solaris or Linux slabs, but it should get me most of what is + * needed until it can be optimized or obsoleted by another approach. + * + * One serious concern I do have about this method is the relatively + * small virtual address space on 32bit arches. This will seriously + * constrain the size of the slab caches and their performance. + * + * XXX: Improve the partial slab list by carefully maintaining a + * strict ordering of fullest to emptiest slabs based on + * the slab reference count. This guarantees the when freeing + * slabs back to the system we need only linearly traverse the + * last N slabs in the list to discover all the freeable slabs. + * + * XXX: NUMA awareness for optionally allocating memory close to a + * particular core. This can be advantageous if you know the slab + * object will be short lived and primarily accessed from one core. + * + * XXX: Slab coloring may also yield performance improvements and would + * be desirable to implement. + */ + +struct list_head spl_kmem_cache_list; /* List of caches */ +struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ +taskq_t *spl_kmem_cache_taskq; /* Task queue for ageing / reclaim */ + +static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj); + +SPL_SHRINKER_CALLBACK_FWD_DECLARE(spl_kmem_cache_generic_shrinker); +SPL_SHRINKER_DECLARE(spl_kmem_cache_shrinker, + spl_kmem_cache_generic_shrinker, KMC_DEFAULT_SEEKS); + +static void * +kv_alloc(spl_kmem_cache_t *skc, int size, int flags) +{ + void *ptr; + + ASSERT(ISP2(size)); + + if (skc->skc_flags & KMC_KMEM) + ptr = (void *)__get_free_pages(flags | __GFP_COMP, + get_order(size)); + else + ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); + + /* Resulting allocated memory will be page aligned */ + ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); + + return ptr; +} + +static void +kv_free(spl_kmem_cache_t *skc, void *ptr, int size) +{ + ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); + ASSERT(ISP2(size)); + + /* + * The Linux direct reclaim path uses this out of band value to + * determine if forward progress is being made. Normally this is + * incremented by kmem_freepages() which is part of the various + * Linux slab implementations. However, since we are using none + * of that infrastructure we are responsible for incrementing it. + */ + if (current->reclaim_state) + current->reclaim_state->reclaimed_slab += size >> PAGE_SHIFT; + + if (skc->skc_flags & KMC_KMEM) + free_pages((unsigned long)ptr, get_order(size)); + else + vfree(ptr); +} + +/* + * Required space for each aligned sks. + */ +static inline uint32_t +spl_sks_size(spl_kmem_cache_t *skc) +{ + return P2ROUNDUP_TYPED(sizeof(spl_kmem_slab_t), + skc->skc_obj_align, uint32_t); +} + +/* + * Required space for each aligned object. + */ +static inline uint32_t +spl_obj_size(spl_kmem_cache_t *skc) +{ + uint32_t align = skc->skc_obj_align; + + return P2ROUNDUP_TYPED(skc->skc_obj_size, align, uint32_t) + + P2ROUNDUP_TYPED(sizeof(spl_kmem_obj_t), align, uint32_t); +} + +/* + * Lookup the spl_kmem_object_t for an object given that object. + */ +static inline spl_kmem_obj_t * +spl_sko_from_obj(spl_kmem_cache_t *skc, void *obj) +{ + return obj + P2ROUNDUP_TYPED(skc->skc_obj_size, + skc->skc_obj_align, uint32_t); +} + +/* + * Required space for each offslab object taking in to account alignment + * restrictions and the power-of-two requirement of kv_alloc(). + */ +static inline uint32_t +spl_offslab_size(spl_kmem_cache_t *skc) +{ + return 1UL << (fls64(spl_obj_size(skc)) + 1); +} + +/* + * It's important that we pack the spl_kmem_obj_t structure and the + * actual objects in to one large address space to minimize the number + * of calls to the allocator. It is far better to do a few large + * allocations and then subdivide it ourselves. Now which allocator + * we use requires balancing a few trade offs. + * + * For small objects we use kmem_alloc() because as long as you are + * only requesting a small number of pages (ideally just one) its cheap. + * However, when you start requesting multiple pages with kmem_alloc() + * it gets increasingly expensive since it requires contiguous pages. + * For this reason we shift to vmem_alloc() for slabs of large objects + * which removes the need for contiguous pages. We do not use + * vmem_alloc() in all cases because there is significant locking + * overhead in __get_vm_area_node(). This function takes a single + * global lock when acquiring an available virtual address range which + * serializes all vmem_alloc()'s for all slab caches. Using slightly + * different allocation functions for small and large objects should + * give us the best of both worlds. + * + * KMC_ONSLAB KMC_OFFSLAB + * + * +------------------------+ +-----------------+ + * | spl_kmem_slab_t --+-+ | | spl_kmem_slab_t |---+-+ + * | skc_obj_size <-+ | | +-----------------+ | | + * | spl_kmem_obj_t | | | | + * | skc_obj_size <---+ | +-----------------+ | | + * | spl_kmem_obj_t | | | skc_obj_size | <-+ | + * | ... v | | spl_kmem_obj_t | | + * +------------------------+ +-----------------+ v + */ +static spl_kmem_slab_t * +spl_slab_alloc(spl_kmem_cache_t *skc, int flags) +{ + spl_kmem_slab_t *sks; + spl_kmem_obj_t *sko, *n; + void *base, *obj; + uint32_t obj_size, offslab_size = 0; + int i, rc = 0; + + base = kv_alloc(skc, skc->skc_slab_size, flags); + if (base == NULL) + return (NULL); + + sks = (spl_kmem_slab_t *)base; + sks->sks_magic = SKS_MAGIC; + sks->sks_objs = skc->skc_slab_objs; + sks->sks_age = jiffies; + sks->sks_cache = skc; + INIT_LIST_HEAD(&sks->sks_list); + INIT_LIST_HEAD(&sks->sks_free_list); + sks->sks_ref = 0; + obj_size = spl_obj_size(skc); + + if (skc->skc_flags & KMC_OFFSLAB) + offslab_size = spl_offslab_size(skc); + + for (i = 0; i < sks->sks_objs; i++) { + if (skc->skc_flags & KMC_OFFSLAB) { + obj = kv_alloc(skc, offslab_size, flags); + if (!obj) { + rc = -ENOMEM; + goto out; + } + } else { + obj = base + spl_sks_size(skc) + (i * obj_size); + } + + ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); + sko = spl_sko_from_obj(skc, obj); + sko->sko_addr = obj; + sko->sko_magic = SKO_MAGIC; + sko->sko_slab = sks; + INIT_LIST_HEAD(&sko->sko_list); + list_add_tail(&sko->sko_list, &sks->sks_free_list); + } + +out: + if (rc) { + if (skc->skc_flags & KMC_OFFSLAB) + list_for_each_entry_safe(sko, n, &sks->sks_free_list, + sko_list) + kv_free(skc, sko->sko_addr, offslab_size); + + kv_free(skc, base, skc->skc_slab_size); + sks = NULL; + } + + return (sks); +} + +/* + * Remove a slab from complete or partial list, it must be called with + * the 'skc->skc_lock' held but the actual free must be performed + * outside the lock to prevent deadlocking on vmem addresses. + */ +static void +spl_slab_free(spl_kmem_slab_t *sks, + struct list_head *sks_list, struct list_head *sko_list) +{ + spl_kmem_cache_t *skc; + + ASSERT(sks->sks_magic == SKS_MAGIC); + ASSERT(sks->sks_ref == 0); + + skc = sks->sks_cache; + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(spin_is_locked(&skc->skc_lock)); + + /* + * Update slab/objects counters in the cache, then remove the + * slab from the skc->skc_partial_list. Finally add the slab + * and all its objects in to the private work lists where the + * destructors will be called and the memory freed to the system. + */ + skc->skc_obj_total -= sks->sks_objs; + skc->skc_slab_total--; + list_del(&sks->sks_list); + list_add(&sks->sks_list, sks_list); + list_splice_init(&sks->sks_free_list, sko_list); +} + +/* + * Traverses all the partial slabs attached to a cache and free those + * which which are currently empty, and have not been touched for + * skc_delay seconds to avoid thrashing. The count argument is + * passed to optionally cap the number of slabs reclaimed, a count + * of zero means try and reclaim everything. When flag is set we + * always free an available slab regardless of age. + */ +static void +spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) +{ + spl_kmem_slab_t *sks, *m; + spl_kmem_obj_t *sko, *n; + LIST_HEAD(sks_list); + LIST_HEAD(sko_list); + uint32_t size = 0; + int i = 0; + + /* + * Move empty slabs and objects which have not been touched in + * skc_delay seconds on to private lists to be freed outside + * the spin lock. This delay time is important to avoid thrashing + * however when flag is set the delay will not be used. + */ + spin_lock(&skc->skc_lock); + list_for_each_entry_safe_reverse(sks,m,&skc->skc_partial_list,sks_list){ + /* + * All empty slabs are at the end of skc->skc_partial_list, + * therefore once a non-empty slab is found we can stop + * scanning. Additionally, stop when reaching the target + * reclaim 'count' if a non-zero threshold is given. + */ + if ((sks->sks_ref > 0) || (count && i >= count)) + break; + + if (time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)||flag) { + spl_slab_free(sks, &sks_list, &sko_list); + i++; + } + } + spin_unlock(&skc->skc_lock); + + /* + * The following two loops ensure all the object destructors are + * run, any offslab objects are freed, and the slabs themselves + * are freed. This is all done outside the skc->skc_lock since + * this allows the destructor to sleep, and allows us to perform + * a conditional reschedule when a freeing a large number of + * objects and slabs back to the system. + */ + if (skc->skc_flags & KMC_OFFSLAB) + size = spl_offslab_size(skc); + + list_for_each_entry_safe(sko, n, &sko_list, sko_list) { + ASSERT(sko->sko_magic == SKO_MAGIC); + + if (skc->skc_flags & KMC_OFFSLAB) + kv_free(skc, sko->sko_addr, size); + } + + list_for_each_entry_safe(sks, m, &sks_list, sks_list) { + ASSERT(sks->sks_magic == SKS_MAGIC); + kv_free(skc, sks, skc->skc_slab_size); + } +} + +static spl_kmem_emergency_t * +spl_emergency_search(struct rb_root *root, void *obj) +{ + struct rb_node *node = root->rb_node; + spl_kmem_emergency_t *ske; + unsigned long address = (unsigned long)obj; + + while (node) { + ske = container_of(node, spl_kmem_emergency_t, ske_node); + + if (address < (unsigned long)ske->ske_obj) + node = node->rb_left; + else if (address > (unsigned long)ske->ske_obj) + node = node->rb_right; + else + return ske; + } + + return NULL; +} + +static int +spl_emergency_insert(struct rb_root *root, spl_kmem_emergency_t *ske) +{ + struct rb_node **new = &(root->rb_node), *parent = NULL; + spl_kmem_emergency_t *ske_tmp; + unsigned long address = (unsigned long)ske->ske_obj; + + while (*new) { + ske_tmp = container_of(*new, spl_kmem_emergency_t, ske_node); + + parent = *new; + if (address < (unsigned long)ske_tmp->ske_obj) + new = &((*new)->rb_left); + else if (address > (unsigned long)ske_tmp->ske_obj) + new = &((*new)->rb_right); + else + return 0; + } + + rb_link_node(&ske->ske_node, parent, new); + rb_insert_color(&ske->ske_node, root); + + return 1; +} + +/* + * Allocate a single emergency object and track it in a red black tree. + */ +static int +spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) +{ + spl_kmem_emergency_t *ske; + int empty; + + /* Last chance use a partial slab if one now exists */ + spin_lock(&skc->skc_lock); + empty = list_empty(&skc->skc_partial_list); + spin_unlock(&skc->skc_lock); + if (!empty) + return (-EEXIST); + + ske = kmalloc(sizeof(*ske), flags); + if (ske == NULL) + return (-ENOMEM); + + ske->ske_obj = kmalloc(skc->skc_obj_size, flags); + if (ske->ske_obj == NULL) { + kfree(ske); + return (-ENOMEM); + } + + spin_lock(&skc->skc_lock); + empty = spl_emergency_insert(&skc->skc_emergency_tree, ske); + if (likely(empty)) { + skc->skc_obj_total++; + skc->skc_obj_emergency++; + if (skc->skc_obj_emergency > skc->skc_obj_emergency_max) + skc->skc_obj_emergency_max = skc->skc_obj_emergency; + } + spin_unlock(&skc->skc_lock); + + if (unlikely(!empty)) { + kfree(ske->ske_obj); + kfree(ske); + return (-EINVAL); + } + + *obj = ske->ske_obj; + + return (0); +} + +/* + * Locate the passed object in the red black tree and free it. + */ +static int +spl_emergency_free(spl_kmem_cache_t *skc, void *obj) +{ + spl_kmem_emergency_t *ske; + + spin_lock(&skc->skc_lock); + ske = spl_emergency_search(&skc->skc_emergency_tree, obj); + if (likely(ske)) { + rb_erase(&ske->ske_node, &skc->skc_emergency_tree); + skc->skc_obj_emergency--; + skc->skc_obj_total--; + } + spin_unlock(&skc->skc_lock); + + if (unlikely(ske == NULL)) + return (-ENOENT); + + kfree(ske->ske_obj); + kfree(ske); + + return (0); +} + +/* + * Release objects from the per-cpu magazine back to their slab. The flush + * argument contains the max number of entries to remove from the magazine. + */ +static void +__spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) +{ + int i, count = MIN(flush, skm->skm_avail); + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skm->skm_magic == SKM_MAGIC); + ASSERT(spin_is_locked(&skc->skc_lock)); + + for (i = 0; i < count; i++) + spl_cache_shrink(skc, skm->skm_objs[i]); + + skm->skm_avail -= count; + memmove(skm->skm_objs, &(skm->skm_objs[count]), + sizeof(void *) * skm->skm_avail); +} + +static void +spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) +{ + spin_lock(&skc->skc_lock); + __spl_cache_flush(skc, skm, flush); + spin_unlock(&skc->skc_lock); +} + +static void +spl_magazine_age(void *data) +{ + spl_kmem_cache_t *skc = (spl_kmem_cache_t *)data; + spl_kmem_magazine_t *skm = skc->skc_mag[smp_processor_id()]; + + ASSERT(skm->skm_magic == SKM_MAGIC); + ASSERT(skm->skm_cpu == smp_processor_id()); + ASSERT(irqs_disabled()); + + /* There are no available objects or they are too young to age out */ + if ((skm->skm_avail == 0) || + time_before(jiffies, skm->skm_age + skc->skc_delay * HZ)) + return; + + /* + * Because we're executing in interrupt context we may have + * interrupted the holder of this lock. To avoid a potential + * deadlock return if the lock is contended. + */ + if (!spin_trylock(&skc->skc_lock)) + return; + + __spl_cache_flush(skc, skm, skm->skm_refill); + spin_unlock(&skc->skc_lock); +} + +/* + * Called regularly to keep a downward pressure on the cache. + * + * Objects older than skc->skc_delay seconds in the per-cpu magazines will + * be returned to the caches. This is done to prevent idle magazines from + * holding memory which could be better used elsewhere. The delay is + * present to prevent thrashing the magazine. + * + * The newly released objects may result in empty partial slabs. Those + * slabs should be released to the system. Otherwise moving the objects + * out of the magazines is just wasted work. + */ +static void +spl_cache_age(void *data) +{ + spl_kmem_cache_t *skc = (spl_kmem_cache_t *)data; + taskqid_t id = 0; + + ASSERT(skc->skc_magic == SKC_MAGIC); + + /* Dynamically disabled at run time */ + if (!(spl_kmem_cache_expire & KMC_EXPIRE_AGE)) + return; + + atomic_inc(&skc->skc_ref); + + if (!(skc->skc_flags & KMC_NOMAGAZINE)) + on_each_cpu(spl_magazine_age, skc, 1); + + spl_slab_reclaim(skc, skc->skc_reap, 0); + + while (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && !id) { + id = taskq_dispatch_delay( + spl_kmem_cache_taskq, spl_cache_age, skc, TQ_SLEEP, + ddi_get_lbolt() + skc->skc_delay / 3 * HZ); + + /* Destroy issued after dispatch immediately cancel it */ + if (test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && id) + taskq_cancel_id(spl_kmem_cache_taskq, id); + } + + spin_lock(&skc->skc_lock); + skc->skc_taskqid = id; + spin_unlock(&skc->skc_lock); + + atomic_dec(&skc->skc_ref); +} + +/* + * Size a slab based on the size of each aligned object plus spl_kmem_obj_t. + * When on-slab we want to target spl_kmem_cache_obj_per_slab. However, + * for very small objects we may end up with more than this so as not + * to waste space in the minimal allocation of a single page. Also for + * very large objects we may use as few as spl_kmem_cache_obj_per_slab_min, + * lower than this and we will fail. + */ +static int +spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) +{ + uint32_t sks_size, obj_size, max_size; + + if (skc->skc_flags & KMC_OFFSLAB) { + *objs = spl_kmem_cache_obj_per_slab; + *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), PAGE_SIZE); + return (0); + } else { + sks_size = spl_sks_size(skc); + obj_size = spl_obj_size(skc); + + if (skc->skc_flags & KMC_KMEM) + max_size = ((uint32_t)1 << (MAX_ORDER-3)) * PAGE_SIZE; + else + max_size = (spl_kmem_cache_max_size * 1024 * 1024); + + /* Power of two sized slab */ + for (*size = PAGE_SIZE; *size <= max_size; *size *= 2) { + *objs = (*size - sks_size) / obj_size; + if (*objs >= spl_kmem_cache_obj_per_slab) + return (0); + } + + /* + * Unable to satisfy target objects per slab, fall back to + * allocating a maximally sized slab and assuming it can + * contain the minimum objects count use it. If not fail. + */ + *size = max_size; + *objs = (*size - sks_size) / obj_size; + if (*objs >= (spl_kmem_cache_obj_per_slab_min)) + return (0); + } + + return (-ENOSPC); +} + +/* + * Make a guess at reasonable per-cpu magazine size based on the size of + * each object and the cost of caching N of them in each magazine. Long + * term this should really adapt based on an observed usage heuristic. + */ +static int +spl_magazine_size(spl_kmem_cache_t *skc) +{ + uint32_t obj_size = spl_obj_size(skc); + int size; + + /* Per-magazine sizes below assume a 4Kib page size */ + if (obj_size > (PAGE_SIZE * 256)) + size = 4; /* Minimum 4Mib per-magazine */ + else if (obj_size > (PAGE_SIZE * 32)) + size = 16; /* Minimum 2Mib per-magazine */ + else if (obj_size > (PAGE_SIZE)) + size = 64; /* Minimum 256Kib per-magazine */ + else if (obj_size > (PAGE_SIZE / 4)) + size = 128; /* Minimum 128Kib per-magazine */ + else + size = 256; + + return (size); +} + +/* + * Allocate a per-cpu magazine to associate with a specific core. + */ +static spl_kmem_magazine_t * +spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) +{ + spl_kmem_magazine_t *skm; + int size = sizeof(spl_kmem_magazine_t) + + sizeof(void *) * skc->skc_mag_size; + + skm = kmem_alloc_node(size, KM_SLEEP, cpu_to_node(cpu)); + if (skm) { + skm->skm_magic = SKM_MAGIC; + skm->skm_avail = 0; + skm->skm_size = skc->skc_mag_size; + skm->skm_refill = skc->skc_mag_refill; + skm->skm_cache = skc; + skm->skm_age = jiffies; + skm->skm_cpu = cpu; + } + + return (skm); +} + +/* + * Free a per-cpu magazine associated with a specific core. + */ +static void +spl_magazine_free(spl_kmem_magazine_t *skm) +{ + int size = sizeof(spl_kmem_magazine_t) + + sizeof(void *) * skm->skm_size; + + ASSERT(skm->skm_magic == SKM_MAGIC); + ASSERT(skm->skm_avail == 0); + + kmem_free(skm, size); +} + +/* + * Create all pre-cpu magazines of reasonable sizes. + */ +static int +spl_magazine_create(spl_kmem_cache_t *skc) +{ + int i; + + if (skc->skc_flags & KMC_NOMAGAZINE) + return (0); + + skc->skc_mag_size = spl_magazine_size(skc); + skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; + + for_each_online_cpu(i) { + skc->skc_mag[i] = spl_magazine_alloc(skc, i); + if (!skc->skc_mag[i]) { + for (i--; i >= 0; i--) + spl_magazine_free(skc->skc_mag[i]); + + return (-ENOMEM); + } + } + + return (0); +} + +/* + * Destroy all pre-cpu magazines. + */ +static void +spl_magazine_destroy(spl_kmem_cache_t *skc) +{ + spl_kmem_magazine_t *skm; + int i; + + if (skc->skc_flags & KMC_NOMAGAZINE) + return; + + for_each_online_cpu(i) { + skm = skc->skc_mag[i]; + spl_cache_flush(skc, skm, skm->skm_avail); + spl_magazine_free(skm); + } +} + +/* + * Create a object cache based on the following arguments: + * name cache name + * size cache object size + * align cache object alignment + * ctor cache object constructor + * dtor cache object destructor + * reclaim cache object reclaim + * priv cache private data for ctor/dtor/reclaim + * vmp unused must be NULL + * flags + * KMC_NOTOUCH Disable cache object aging (unsupported) + * KMC_NODEBUG Disable debugging (unsupported) + * KMC_NOHASH Disable hashing (unsupported) + * KMC_QCACHE Disable qcache (unsupported) + * KMC_NOMAGAZINE Enabled for kmem/vmem, Disabled for Linux slab + * KMC_KMEM Force kmem backed cache + * KMC_VMEM Force vmem backed cache + * KMC_SLAB Force Linux slab backed cache + * KMC_OFFSLAB Locate objects off the slab + */ +spl_kmem_cache_t * +spl_kmem_cache_create(char *name, size_t size, size_t align, + spl_kmem_ctor_t ctor, + spl_kmem_dtor_t dtor, + spl_kmem_reclaim_t reclaim, + void *priv, void *vmp, int flags) +{ + spl_kmem_cache_t *skc; + int rc; + + /* + * Unsupported flags + */ + ASSERT0(flags & KMC_NOMAGAZINE); + ASSERT0(flags & KMC_NOHASH); + ASSERT0(flags & KMC_QCACHE); + ASSERT(vmp == NULL); + + might_sleep(); + + /* + * Allocate memory for a new cache an initialize it. Unfortunately, + * this usually ends up being a large allocation of ~32k because + * we need to allocate enough memory for the worst case number of + * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we + * explicitly pass KM_NODEBUG to suppress the kmem warning + */ + skc = kmem_zalloc(sizeof(*skc), KM_SLEEP| KM_NODEBUG); + if (skc == NULL) + return (NULL); + + skc->skc_magic = SKC_MAGIC; + skc->skc_name_size = strlen(name) + 1; + skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, KM_SLEEP); + if (skc->skc_name == NULL) { + kmem_free(skc, sizeof(*skc)); + return (NULL); + } + strncpy(skc->skc_name, name, skc->skc_name_size); + + skc->skc_ctor = ctor; + skc->skc_dtor = dtor; + skc->skc_reclaim = reclaim; + skc->skc_private = priv; + skc->skc_vmp = vmp; + skc->skc_linux_cache = NULL; + skc->skc_flags = flags; + skc->skc_obj_size = size; + skc->skc_obj_align = SPL_KMEM_CACHE_ALIGN; + skc->skc_delay = SPL_KMEM_CACHE_DELAY; + skc->skc_reap = SPL_KMEM_CACHE_REAP; + atomic_set(&skc->skc_ref, 0); + + INIT_LIST_HEAD(&skc->skc_list); + INIT_LIST_HEAD(&skc->skc_complete_list); + INIT_LIST_HEAD(&skc->skc_partial_list); + skc->skc_emergency_tree = RB_ROOT; + spin_lock_init(&skc->skc_lock); + init_waitqueue_head(&skc->skc_waitq); + skc->skc_slab_fail = 0; + skc->skc_slab_create = 0; + skc->skc_slab_destroy = 0; + skc->skc_slab_total = 0; + skc->skc_slab_alloc = 0; + skc->skc_slab_max = 0; + skc->skc_obj_total = 0; + skc->skc_obj_alloc = 0; + skc->skc_obj_max = 0; + skc->skc_obj_deadlock = 0; + skc->skc_obj_emergency = 0; + skc->skc_obj_emergency_max = 0; + + /* + * Verify the requested alignment restriction is sane. + */ + if (align) { + VERIFY(ISP2(align)); + VERIFY3U(align, >=, SPL_KMEM_CACHE_ALIGN); + VERIFY3U(align, <=, PAGE_SIZE); + skc->skc_obj_align = align; + } + + /* + * When no specific type of slab is requested (kmem, vmem, or + * linuxslab) then select a cache type based on the object size + * and default tunables. + */ + if (!(skc->skc_flags & (KMC_KMEM | KMC_VMEM | KMC_SLAB))) { + + /* + * Objects smaller than spl_kmem_cache_slab_limit can + * use the Linux slab for better space-efficiency. By + * default this functionality is disabled until its + * performance characters are fully understood. + */ + if (spl_kmem_cache_slab_limit && + size <= (size_t)spl_kmem_cache_slab_limit) + skc->skc_flags |= KMC_SLAB; + + /* + * Small objects, less than spl_kmem_cache_kmem_limit per + * object should use kmem because their slabs are small. + */ + else if (spl_obj_size(skc) <= spl_kmem_cache_kmem_limit) + skc->skc_flags |= KMC_KMEM; + + /* + * All other objects are considered large and are placed + * on vmem backed slabs. + */ + else + skc->skc_flags |= KMC_VMEM; + } + + /* + * Given the type of slab allocate the required resources. + */ + if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { + rc = spl_slab_size(skc, + &skc->skc_slab_objs, &skc->skc_slab_size); + if (rc) + goto out; + + rc = spl_magazine_create(skc); + if (rc) + goto out; + } else { + skc->skc_linux_cache = kmem_cache_create( + skc->skc_name, size, align, 0, NULL); + if (skc->skc_linux_cache == NULL) { + rc = ENOMEM; + goto out; + } + + kmem_cache_set_allocflags(skc, __GFP_COMP); + skc->skc_flags |= KMC_NOMAGAZINE; + } + + if (spl_kmem_cache_expire & KMC_EXPIRE_AGE) + skc->skc_taskqid = taskq_dispatch_delay(spl_kmem_cache_taskq, + spl_cache_age, skc, TQ_SLEEP, + ddi_get_lbolt() + skc->skc_delay / 3 * HZ); + + down_write(&spl_kmem_cache_sem); + list_add_tail(&skc->skc_list, &spl_kmem_cache_list); + up_write(&spl_kmem_cache_sem); + + return (skc); +out: + kmem_free(skc->skc_name, skc->skc_name_size); + kmem_free(skc, sizeof(*skc)); + return (NULL); +} +EXPORT_SYMBOL(spl_kmem_cache_create); + +/* + * Register a move callback to for cache defragmentation. + * XXX: Unimplemented but harmless to stub out for now. + */ +void +spl_kmem_cache_set_move(spl_kmem_cache_t *skc, + kmem_cbrc_t (move)(void *, void *, size_t, void *)) +{ + ASSERT(move != NULL); +} +EXPORT_SYMBOL(spl_kmem_cache_set_move); + +/* + * Destroy a cache and all objects associated with the cache. + */ +void +spl_kmem_cache_destroy(spl_kmem_cache_t *skc) +{ + DECLARE_WAIT_QUEUE_HEAD(wq); + taskqid_t id; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skc->skc_flags & (KMC_KMEM | KMC_VMEM | KMC_SLAB)); + + down_write(&spl_kmem_cache_sem); + list_del_init(&skc->skc_list); + up_write(&spl_kmem_cache_sem); + + /* Cancel any and wait for any pending delayed tasks */ + VERIFY(!test_and_set_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + + spin_lock(&skc->skc_lock); + id = skc->skc_taskqid; + spin_unlock(&skc->skc_lock); + + taskq_cancel_id(spl_kmem_cache_taskq, id); + + /* Wait until all current callers complete, this is mainly + * to catch the case where a low memory situation triggers a + * cache reaping action which races with this destroy. */ + wait_event(wq, atomic_read(&skc->skc_ref) == 0); + + if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { + spl_magazine_destroy(skc); + spl_slab_reclaim(skc, 0, 1); + } else { + ASSERT(skc->skc_flags & KMC_SLAB); + kmem_cache_destroy(skc->skc_linux_cache); + } + + spin_lock(&skc->skc_lock); + + /* Validate there are no objects in use and free all the + * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ + ASSERT3U(skc->skc_slab_alloc, ==, 0); + ASSERT3U(skc->skc_obj_alloc, ==, 0); + ASSERT3U(skc->skc_slab_total, ==, 0); + ASSERT3U(skc->skc_obj_total, ==, 0); + ASSERT3U(skc->skc_obj_emergency, ==, 0); + ASSERT(list_empty(&skc->skc_complete_list)); + + kmem_free(skc->skc_name, skc->skc_name_size); + spin_unlock(&skc->skc_lock); + + kmem_free(skc, sizeof(*skc)); +} +EXPORT_SYMBOL(spl_kmem_cache_destroy); + +/* + * Allocate an object from a slab attached to the cache. This is used to + * repopulate the per-cpu magazine caches in batches when they run low. + */ +static void * +spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) +{ + spl_kmem_obj_t *sko; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(sks->sks_magic == SKS_MAGIC); + ASSERT(spin_is_locked(&skc->skc_lock)); + + sko = list_entry(sks->sks_free_list.next, spl_kmem_obj_t, sko_list); + ASSERT(sko->sko_magic == SKO_MAGIC); + ASSERT(sko->sko_addr != NULL); + + /* Remove from sks_free_list */ + list_del_init(&sko->sko_list); + + sks->sks_age = jiffies; + sks->sks_ref++; + skc->skc_obj_alloc++; + + /* Track max obj usage statistics */ + if (skc->skc_obj_alloc > skc->skc_obj_max) + skc->skc_obj_max = skc->skc_obj_alloc; + + /* Track max slab usage statistics */ + if (sks->sks_ref == 1) { + skc->skc_slab_alloc++; + + if (skc->skc_slab_alloc > skc->skc_slab_max) + skc->skc_slab_max = skc->skc_slab_alloc; + } + + return sko->sko_addr; +} + +/* + * Generic slab allocation function to run by the global work queues. + * It is responsible for allocating a new slab, linking it in to the list + * of partial slabs, and then waking any waiters. + */ +static void +spl_cache_grow_work(void *data) +{ + spl_kmem_alloc_t *ska = (spl_kmem_alloc_t *)data; + spl_kmem_cache_t *skc = ska->ska_cache; + spl_kmem_slab_t *sks; + + sks = spl_slab_alloc(skc, ska->ska_flags | __GFP_NORETRY | KM_NODEBUG); + spin_lock(&skc->skc_lock); + if (sks) { + skc->skc_slab_total++; + skc->skc_obj_total += sks->sks_objs; + list_add_tail(&sks->sks_list, &skc->skc_partial_list); + } + + atomic_dec(&skc->skc_ref); + clear_bit(KMC_BIT_GROWING, &skc->skc_flags); + clear_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); + wake_up_all(&skc->skc_waitq); + spin_unlock(&skc->skc_lock); + + kfree(ska); +} + +/* + * Returns non-zero when a new slab should be available. + */ +static int +spl_cache_grow_wait(spl_kmem_cache_t *skc) +{ + return !test_bit(KMC_BIT_GROWING, &skc->skc_flags); +} + +/* + * No available objects on any slabs, create a new slab. Note that this + * functionality is disabled for KMC_SLAB caches which are backed by the + * Linux slab. + */ +static int +spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) +{ + int remaining, rc; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT((skc->skc_flags & KMC_SLAB) == 0); + might_sleep(); + *obj = NULL; + + /* + * Before allocating a new slab wait for any reaping to complete and + * then return so the local magazine can be rechecked for new objects. + */ + if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { + rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, + TASK_UNINTERRUPTIBLE); + return (rc ? rc : -EAGAIN); + } + + /* + * This is handled by dispatching a work request to the global work + * queue. This allows us to asynchronously allocate a new slab while + * retaining the ability to safely fall back to a smaller synchronous + * allocations to ensure forward progress is always maintained. + */ + if (test_and_set_bit(KMC_BIT_GROWING, &skc->skc_flags) == 0) { + spl_kmem_alloc_t *ska; + + ska = kmalloc(sizeof(*ska), flags); + if (ska == NULL) { + clear_bit(KMC_BIT_GROWING, &skc->skc_flags); + wake_up_all(&skc->skc_waitq); + return (-ENOMEM); + } + + atomic_inc(&skc->skc_ref); + ska->ska_cache = skc; + ska->ska_flags = flags & ~__GFP_FS; + taskq_init_ent(&ska->ska_tqe); + taskq_dispatch_ent(spl_kmem_cache_taskq, + spl_cache_grow_work, ska, 0, &ska->ska_tqe); + } + + /* + * The goal here is to only detect the rare case where a virtual slab + * allocation has deadlocked. We must be careful to minimize the use + * of emergency objects which are more expensive to track. Therefore, + * we set a very long timeout for the asynchronous allocation and if + * the timeout is reached the cache is flagged as deadlocked. From + * this point only new emergency objects will be allocated until the + * asynchronous allocation completes and clears the deadlocked flag. + */ + if (test_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags)) { + rc = spl_emergency_alloc(skc, flags, obj); + } else { + remaining = wait_event_timeout(skc->skc_waitq, + spl_cache_grow_wait(skc), HZ); + + if (!remaining && test_bit(KMC_BIT_VMEM, &skc->skc_flags)) { + spin_lock(&skc->skc_lock); + if (test_bit(KMC_BIT_GROWING, &skc->skc_flags)) { + set_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); + skc->skc_obj_deadlock++; + } + spin_unlock(&skc->skc_lock); + } + + rc = -ENOMEM; + } + + return (rc); +} + +/* + * Refill a per-cpu magazine with objects from the slabs for this cache. + * Ideally the magazine can be repopulated using existing objects which have + * been released, however if we are unable to locate enough free objects new + * slabs of objects will be created. On success NULL is returned, otherwise + * the address of a single emergency object is returned for use by the caller. + */ +static void * +spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) +{ + spl_kmem_slab_t *sks; + int count = 0, rc, refill; + void *obj = NULL; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skm->skm_magic == SKM_MAGIC); + + refill = MIN(skm->skm_refill, skm->skm_size - skm->skm_avail); + spin_lock(&skc->skc_lock); + + while (refill > 0) { + /* No slabs available we may need to grow the cache */ + if (list_empty(&skc->skc_partial_list)) { + spin_unlock(&skc->skc_lock); + + local_irq_enable(); + rc = spl_cache_grow(skc, flags, &obj); + local_irq_disable(); + + /* Emergency object for immediate use by caller */ + if (rc == 0 && obj != NULL) + return (obj); + + if (rc) + goto out; + + /* Rescheduled to different CPU skm is not local */ + if (skm != skc->skc_mag[smp_processor_id()]) + goto out; + + /* Potentially rescheduled to the same CPU but + * allocations may have occurred from this CPU while + * we were sleeping so recalculate max refill. */ + refill = MIN(refill, skm->skm_size - skm->skm_avail); + + spin_lock(&skc->skc_lock); + continue; + } + + /* Grab the next available slab */ + sks = list_entry((&skc->skc_partial_list)->next, + spl_kmem_slab_t, sks_list); + ASSERT(sks->sks_magic == SKS_MAGIC); + ASSERT(sks->sks_ref < sks->sks_objs); + ASSERT(!list_empty(&sks->sks_free_list)); + + /* Consume as many objects as needed to refill the requested + * cache. We must also be careful not to overfill it. */ + while (sks->sks_ref < sks->sks_objs && refill-- > 0 && ++count) { + ASSERT(skm->skm_avail < skm->skm_size); + ASSERT(count < skm->skm_size); + skm->skm_objs[skm->skm_avail++]=spl_cache_obj(skc,sks); + } + + /* Move slab to skc_complete_list when full */ + if (sks->sks_ref == sks->sks_objs) { + list_del(&sks->sks_list); + list_add(&sks->sks_list, &skc->skc_complete_list); + } + } + + spin_unlock(&skc->skc_lock); +out: + return (NULL); +} + +/* + * Release an object back to the slab from which it came. + */ +static void +spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) +{ + spl_kmem_slab_t *sks = NULL; + spl_kmem_obj_t *sko = NULL; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(spin_is_locked(&skc->skc_lock)); + + sko = spl_sko_from_obj(skc, obj); + ASSERT(sko->sko_magic == SKO_MAGIC); + sks = sko->sko_slab; + ASSERT(sks->sks_magic == SKS_MAGIC); + ASSERT(sks->sks_cache == skc); + list_add(&sko->sko_list, &sks->sks_free_list); + + sks->sks_age = jiffies; + sks->sks_ref--; + skc->skc_obj_alloc--; + + /* Move slab to skc_partial_list when no longer full. Slabs + * are added to the head to keep the partial list is quasi-full + * sorted order. Fuller at the head, emptier at the tail. */ + if (sks->sks_ref == (sks->sks_objs - 1)) { + list_del(&sks->sks_list); + list_add(&sks->sks_list, &skc->skc_partial_list); + } + + /* Move empty slabs to the end of the partial list so + * they can be easily found and freed during reclamation. */ + if (sks->sks_ref == 0) { + list_del(&sks->sks_list); + list_add_tail(&sks->sks_list, &skc->skc_partial_list); + skc->skc_slab_alloc--; + } +} + +/* + * Allocate an object from the per-cpu magazine, or if the magazine + * is empty directly allocate from a slab and repopulate the magazine. + */ +void * +spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) +{ + spl_kmem_magazine_t *skm; + void *obj = NULL; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + ASSERT(flags & KM_SLEEP); + + atomic_inc(&skc->skc_ref); + + /* + * Allocate directly from a Linux slab. All optimizations are left + * to the underlying cache we only need to guarantee that KM_SLEEP + * callers will never fail. + */ + if (skc->skc_flags & KMC_SLAB) { + struct kmem_cache *slc = skc->skc_linux_cache; + + do { + obj = kmem_cache_alloc(slc, flags | __GFP_COMP); + } while ((obj == NULL) && !(flags & KM_NOSLEEP)); + + goto ret; + } + + local_irq_disable(); + +restart: + /* Safe to update per-cpu structure without lock, but + * in the restart case we must be careful to reacquire + * the local magazine since this may have changed + * when we need to grow the cache. */ + skm = skc->skc_mag[smp_processor_id()]; + ASSERT(skm->skm_magic == SKM_MAGIC); + + if (likely(skm->skm_avail)) { + /* Object available in CPU cache, use it */ + obj = skm->skm_objs[--skm->skm_avail]; + skm->skm_age = jiffies; + } else { + obj = spl_cache_refill(skc, skm, flags); + if (obj == NULL) + goto restart; + } + + local_irq_enable(); + ASSERT(obj); + ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); + +ret: + /* Pre-emptively migrate object to CPU L1 cache */ + if (obj) { + if (obj && skc->skc_ctor) + skc->skc_ctor(obj, skc->skc_private, flags); + else + prefetchw(obj); + } + + atomic_dec(&skc->skc_ref); + + return (obj); +} + +EXPORT_SYMBOL(spl_kmem_cache_alloc); + +/* + * Free an object back to the local per-cpu magazine, there is no + * guarantee that this is the same magazine the object was originally + * allocated from. We may need to flush entire from the magazine + * back to the slabs to make space. + */ +void +spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) +{ + spl_kmem_magazine_t *skm; + unsigned long flags; + + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + atomic_inc(&skc->skc_ref); + + /* + * Run the destructor + */ + if (skc->skc_dtor) + skc->skc_dtor(obj, skc->skc_private); + + /* + * Free the object from the Linux underlying Linux slab. + */ + if (skc->skc_flags & KMC_SLAB) { + kmem_cache_free(skc->skc_linux_cache, obj); + goto out; + } + + /* + * Only virtual slabs may have emergency objects and these objects + * are guaranteed to have physical addresses. They must be removed + * from the tree of emergency objects and the freed. + */ + if ((skc->skc_flags & KMC_VMEM) && !kmem_virt(obj)) { + spl_emergency_free(skc, obj); + goto out; + } + + local_irq_save(flags); + + /* Safe to update per-cpu structure without lock, but + * no remote memory allocation tracking is being performed + * it is entirely possible to allocate an object from one + * CPU cache and return it to another. */ + skm = skc->skc_mag[smp_processor_id()]; + ASSERT(skm->skm_magic == SKM_MAGIC); + + /* Per-CPU cache full, flush it to make space */ + if (unlikely(skm->skm_avail >= skm->skm_size)) + spl_cache_flush(skc, skm, skm->skm_refill); + + /* Available space in cache, use it */ + skm->skm_objs[skm->skm_avail++] = obj; + + local_irq_restore(flags); +out: + atomic_dec(&skc->skc_ref); +} +EXPORT_SYMBOL(spl_kmem_cache_free); + +/* + * The generic shrinker function for all caches. Under Linux a shrinker + * may not be tightly coupled with a slab cache. In fact Linux always + * systematically tries calling all registered shrinker callbacks which + * report that they contain unused objects. Because of this we only + * register one shrinker function in the shim layer for all slab caches. + * We always attempt to shrink all caches when this generic shrinker + * is called. + * + * If sc->nr_to_scan is zero, the caller is requesting a query of the + * number of objects which can potentially be freed. If it is nonzero, + * the request is to free that many objects. + * + * Linux kernels >= 3.12 have the count_objects and scan_objects callbacks + * in struct shrinker and also require the shrinker to return the number + * of objects freed. + * + * Older kernels require the shrinker to return the number of freeable + * objects following the freeing of nr_to_free. + * + * Linux semantics differ from those under Solaris, which are to + * free all available objects which may (and probably will) be more + * objects than the requested nr_to_scan. + */ +static spl_shrinker_t +__spl_kmem_cache_generic_shrinker(struct shrinker *shrink, + struct shrink_control *sc) +{ + spl_kmem_cache_t *skc; + int alloc = 0; + + down_read(&spl_kmem_cache_sem); + list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { + if (sc->nr_to_scan) { +#ifdef HAVE_SPLIT_SHRINKER_CALLBACK + uint64_t oldalloc = skc->skc_obj_alloc; + spl_kmem_cache_reap_now(skc, + MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); + if (oldalloc > skc->skc_obj_alloc) + alloc += oldalloc - skc->skc_obj_alloc; +#else + spl_kmem_cache_reap_now(skc, + MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); + alloc += skc->skc_obj_alloc; +#endif /* HAVE_SPLIT_SHRINKER_CALLBACK */ + } else { + /* Request to query number of freeable objects */ + alloc += skc->skc_obj_alloc; + } + } + up_read(&spl_kmem_cache_sem); + + /* + * When KMC_RECLAIM_ONCE is set allow only a single reclaim pass. + * This functionality only exists to work around a rare issue where + * shrink_slabs() is repeatedly invoked by many cores causing the + * system to thrash. + */ + if ((spl_kmem_cache_reclaim & KMC_RECLAIM_ONCE) && sc->nr_to_scan) + return (SHRINK_STOP); + + return (MAX(alloc, 0)); +} + +SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); + +/* + * Call the registered reclaim function for a cache. Depending on how + * many and which objects are released it may simply repopulate the + * local magazine which will then need to age-out. Objects which cannot + * fit in the magazine we will be released back to their slabs which will + * also need to age out before being release. This is all just best + * effort and we do not want to thrash creating and destroying slabs. + */ +void +spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) +{ + ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); + + atomic_inc(&skc->skc_ref); + + /* + * Execute the registered reclaim callback if it exists. The + * per-cpu caches will be drained when is set KMC_EXPIRE_MEM. + */ + if (skc->skc_flags & KMC_SLAB) { + if (skc->skc_reclaim) + skc->skc_reclaim(skc->skc_private); + + if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) + kmem_cache_shrink(skc->skc_linux_cache); + + goto out; + } + + /* + * Prevent concurrent cache reaping when contended. + */ + if (test_and_set_bit(KMC_BIT_REAPING, &skc->skc_flags)) + goto out; + + /* + * When a reclaim function is available it may be invoked repeatedly + * until at least a single slab can be freed. This ensures that we + * do free memory back to the system. This helps minimize the chance + * of an OOM event when the bulk of memory is used by the slab. + * + * When free slabs are already available the reclaim callback will be + * skipped. Additionally, if no forward progress is detected despite + * a reclaim function the cache will be skipped to avoid deadlock. + * + * Longer term this would be the correct place to add the code which + * repacks the slabs in order minimize fragmentation. + */ + if (skc->skc_reclaim) { + uint64_t objects = UINT64_MAX; + int do_reclaim; + + do { + spin_lock(&skc->skc_lock); + do_reclaim = + (skc->skc_slab_total > 0) && + ((skc->skc_slab_total - skc->skc_slab_alloc) == 0) && + (skc->skc_obj_alloc < objects); + + objects = skc->skc_obj_alloc; + spin_unlock(&skc->skc_lock); + + if (do_reclaim) + skc->skc_reclaim(skc->skc_private); + + } while (do_reclaim); + } + + /* Reclaim from the magazine then the slabs ignoring age and delay. */ + if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) { + spl_kmem_magazine_t *skm; + unsigned long irq_flags; + + local_irq_save(irq_flags); + skm = skc->skc_mag[smp_processor_id()]; + spl_cache_flush(skc, skm, skm->skm_avail); + local_irq_restore(irq_flags); + } + + spl_slab_reclaim(skc, count, 1); + clear_bit(KMC_BIT_REAPING, &skc->skc_flags); + smp_wmb(); + wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); +out: + atomic_dec(&skc->skc_ref); +} +EXPORT_SYMBOL(spl_kmem_cache_reap_now); + +/* + * Reap all free slabs from all registered caches. + */ +void +spl_kmem_reap(void) +{ + struct shrink_control sc; + + sc.nr_to_scan = KMC_REAP_CHUNK; + sc.gfp_mask = GFP_KERNEL; + + (void) __spl_kmem_cache_generic_shrinker(NULL, &sc); +} +EXPORT_SYMBOL(spl_kmem_reap); + +int +spl_kmem_cache_init(void) +{ + init_rwsem(&spl_kmem_cache_sem); + INIT_LIST_HEAD(&spl_kmem_cache_list); + spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", + 1, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); + spl_register_shrinker(&spl_kmem_cache_shrinker); + + return (0); +} + +void +spl_kmem_cache_fini(void) +{ + spl_unregister_shrinker(&spl_kmem_cache_shrinker); + taskq_destroy(spl_kmem_cache_taskq); +} diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 502f5365b..075bf2580 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -24,97 +24,9 @@ * Solaris Porting Layer (SPL) Kmem Implementation. \*****************************************************************************/ +#include #include -#include -#include - -/* - * Within the scope of spl-kmem.c file the kmem_cache_* definitions - * are removed to allow access to the real Linux slab allocator. - */ -#undef kmem_cache_destroy -#undef kmem_cache_create -#undef kmem_cache_alloc -#undef kmem_cache_free - - -/* - * Cache expiration was implemented because it was part of the default Solaris - * kmem_cache behavior. The idea is that per-cpu objects which haven't been - * accessed in several seconds should be returned to the cache. On the other - * hand Linux slabs never move objects back to the slabs unless there is - * memory pressure on the system. By default the Linux method is enabled - * because it has been shown to improve responsiveness on low memory systems. - * This policy may be changed by setting KMC_EXPIRE_AGE or KMC_EXPIRE_MEM. - */ -unsigned int spl_kmem_cache_expire = KMC_EXPIRE_MEM; -EXPORT_SYMBOL(spl_kmem_cache_expire); -module_param(spl_kmem_cache_expire, uint, 0644); -MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); - -/* - * The default behavior is to report the number of objects remaining in the - * cache. This allows the Linux VM to repeatedly reclaim objects from the - * cache when memory is low satisfy other memory allocations. Alternately, - * setting this value to KMC_RECLAIM_ONCE limits how aggressively the cache - * is reclaimed. This may increase the likelihood of out of memory events. - */ -unsigned int spl_kmem_cache_reclaim = 0 /* KMC_RECLAIM_ONCE */; -module_param(spl_kmem_cache_reclaim, uint, 0644); -MODULE_PARM_DESC(spl_kmem_cache_reclaim, "Single reclaim pass (0x1)"); - -unsigned int spl_kmem_cache_obj_per_slab = SPL_KMEM_CACHE_OBJ_PER_SLAB; -module_param(spl_kmem_cache_obj_per_slab, uint, 0644); -MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab, "Number of objects per slab"); - -unsigned int spl_kmem_cache_obj_per_slab_min = SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN; -module_param(spl_kmem_cache_obj_per_slab_min, uint, 0644); -MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab_min, - "Minimal number of objects per slab"); - -unsigned int spl_kmem_cache_max_size = 32; -module_param(spl_kmem_cache_max_size, uint, 0644); -MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB"); - -/* - * For small objects the Linux slab allocator should be used to make the most - * efficient use of the memory. However, large objects are not supported by - * the Linux slab and therefore the SPL implementation is preferred. A cutoff - * of 16K was determined to be optimal for architectures using 4K pages. - */ -#if PAGE_SIZE == 4096 -unsigned int spl_kmem_cache_slab_limit = 16384; -#else -unsigned int spl_kmem_cache_slab_limit = 0; -#endif -module_param(spl_kmem_cache_slab_limit, uint, 0644); -MODULE_PARM_DESC(spl_kmem_cache_slab_limit, - "Objects less than N bytes use the Linux slab"); - -unsigned int spl_kmem_cache_kmem_limit = (PAGE_SIZE / 4); -module_param(spl_kmem_cache_kmem_limit, uint, 0644); -MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, - "Objects less than N bytes use the kmalloc"); - -vmem_t *heap_arena = NULL; -EXPORT_SYMBOL(heap_arena); - -vmem_t *zio_alloc_arena = NULL; -EXPORT_SYMBOL(zio_alloc_arena); - -vmem_t *zio_arena = NULL; -EXPORT_SYMBOL(zio_arena); - -size_t -vmem_size(vmem_t *vmp, int typemask) -{ - ASSERT3P(vmp, ==, NULL); - ASSERT3S(typemask & VMEM_ALLOC, ==, VMEM_ALLOC); - ASSERT3S(typemask & VMEM_FREE, ==, VMEM_FREE); - - return (VMALLOC_TOTAL); -} -EXPORT_SYMBOL(vmem_size); +#include int kmem_debugging(void) @@ -195,19 +107,13 @@ EXPORT_SYMBOL(strfree); # ifdef HAVE_ATOMIC64_T atomic64_t kmem_alloc_used = ATOMIC64_INIT(0); unsigned long long kmem_alloc_max = 0; -atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); -unsigned long long vmem_alloc_max = 0; # else /* HAVE_ATOMIC64_T */ atomic_t kmem_alloc_used = ATOMIC_INIT(0); unsigned long long kmem_alloc_max = 0; -atomic_t vmem_alloc_used = ATOMIC_INIT(0); -unsigned long long vmem_alloc_max = 0; # endif /* HAVE_ATOMIC64_T */ EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); -EXPORT_SYMBOL(vmem_alloc_used); -EXPORT_SYMBOL(vmem_alloc_max); /* When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked * but also the location of every alloc and free. When the SPL module is @@ -225,9 +131,6 @@ EXPORT_SYMBOL(vmem_alloc_max); # define KMEM_HASH_BITS 10 # define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) -# define VMEM_HASH_BITS 10 -# define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) - typedef struct kmem_debug { struct hlist_node kd_hlist; /* Hash node linkage */ struct list_head kd_list; /* List of all allocations */ @@ -241,18 +144,10 @@ spinlock_t kmem_lock; struct hlist_head kmem_table[KMEM_TABLE_SIZE]; struct list_head kmem_list; -spinlock_t vmem_lock; -struct hlist_head vmem_table[VMEM_TABLE_SIZE]; -struct list_head vmem_list; - EXPORT_SYMBOL(kmem_lock); EXPORT_SYMBOL(kmem_table); EXPORT_SYMBOL(kmem_list); -EXPORT_SYMBOL(vmem_lock); -EXPORT_SYMBOL(vmem_table); -EXPORT_SYMBOL(vmem_list); - static kmem_debug_t * kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void *addr) { @@ -393,107 +288,6 @@ kmem_free_track(const void *ptr, size_t size) } EXPORT_SYMBOL(kmem_free_track); -void * -vmem_alloc_track(size_t size, int flags, const char *func, int line) -{ - void *ptr = NULL; - kmem_debug_t *dptr; - unsigned long irq_flags; - - ASSERT(flags & KM_SLEEP); - - /* Function may be called with KM_NOSLEEP so failure is possible */ - dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), - flags & ~__GFP_ZERO); - if (unlikely(dptr == NULL)) { - printk(KERN_WARNING "debug vmem_alloc(%ld, 0x%x) " - "at %s:%d failed (%lld/%llu)\n", - sizeof(kmem_debug_t), flags, func, line, - vmem_alloc_used_read(), vmem_alloc_max); - } else { - /* - * We use __strdup() below because the string pointed to by - * __FUNCTION__ might not be available by the time we want - * to print it, since the module might have been unloaded. - * This can never fail because we have already asserted - * that flags is KM_SLEEP. - */ - dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); - if (unlikely(dptr->kd_func == NULL)) { - kfree(dptr); - printk(KERN_WARNING "debug __strdup() at %s:%d " - "failed (%lld/%llu)\n", func, line, - vmem_alloc_used_read(), vmem_alloc_max); - goto out; - } - - /* Use the correct allocator */ - if (flags & __GFP_ZERO) { - ptr = vzalloc_nofail(size, flags & ~__GFP_ZERO); - } else { - ptr = vmalloc_nofail(size, flags); - } - - if (unlikely(ptr == NULL)) { - kfree(dptr->kd_func); - kfree(dptr); - printk(KERN_WARNING "vmem_alloc (%llu, 0x%x) " - "at %s:%d failed (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, - vmem_alloc_used_read(), vmem_alloc_max); - goto out; - } - - vmem_alloc_used_add(size); - if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) - vmem_alloc_max = vmem_alloc_used_read(); - - INIT_HLIST_NODE(&dptr->kd_hlist); - INIT_LIST_HEAD(&dptr->kd_list); - - dptr->kd_addr = ptr; - dptr->kd_size = size; - dptr->kd_line = line; - - spin_lock_irqsave(&vmem_lock, irq_flags); - hlist_add_head(&dptr->kd_hlist, - &vmem_table[hash_ptr(ptr, VMEM_HASH_BITS)]); - list_add_tail(&dptr->kd_list, &vmem_list); - spin_unlock_irqrestore(&vmem_lock, irq_flags); - } -out: - return (ptr); -} -EXPORT_SYMBOL(vmem_alloc_track); - -void -vmem_free_track(const void *ptr, size_t size) -{ - kmem_debug_t *dptr; - - ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, - (unsigned long long) size); - - /* Must exist in hash due to vmem_alloc() */ - dptr = kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr); - ASSERT(dptr); - - /* Size must match */ - ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " - "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, - (unsigned long long) size, dptr->kd_func, dptr->kd_line); - - vmem_alloc_used_sub(size); - kfree(dptr->kd_func); - - memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); - kfree(dptr); - - memset((void *)ptr, 0x5a, size); - vfree(ptr); -} -EXPORT_SYMBOL(vmem_free_track); - # else /* DEBUG_KMEM_TRACKING */ void * @@ -548,1573 +342,9 @@ kmem_free_debug(const void *ptr, size_t size) } EXPORT_SYMBOL(kmem_free_debug); -void * -vmem_alloc_debug(size_t size, int flags, const char *func, int line) -{ - void *ptr; - - ASSERT(flags & KM_SLEEP); - - /* Use the correct allocator */ - if (flags & __GFP_ZERO) { - ptr = vzalloc_nofail(size, flags & (~__GFP_ZERO)); - } else { - ptr = vmalloc_nofail(size, flags); - } - - if (unlikely(ptr == NULL)) { - printk(KERN_WARNING - "vmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", - (unsigned long long)size, flags, func, line, - (unsigned long long)vmem_alloc_used_read(), vmem_alloc_max); - } else { - vmem_alloc_used_add(size); - if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) - vmem_alloc_max = vmem_alloc_used_read(); - } - - return (ptr); -} -EXPORT_SYMBOL(vmem_alloc_debug); - -void -vmem_free_debug(const void *ptr, size_t size) -{ - ASSERT(ptr || size > 0); - vmem_alloc_used_sub(size); - vfree(ptr); -} -EXPORT_SYMBOL(vmem_free_debug); - # endif /* DEBUG_KMEM_TRACKING */ #endif /* DEBUG_KMEM */ -/* - * Slab allocation interfaces - * - * While the Linux slab implementation was inspired by the Solaris - * implementation I cannot use it to emulate the Solaris APIs. I - * require two features which are not provided by the Linux slab. - * - * 1) Constructors AND destructors. Recent versions of the Linux - * kernel have removed support for destructors. This is a deal - * breaker for the SPL which contains particularly expensive - * initializers for mutex's, condition variables, etc. We also - * require a minimal level of cleanup for these data types unlike - * many Linux data type which do need to be explicitly destroyed. - * - * 2) Virtual address space backed slab. Callers of the Solaris slab - * expect it to work well for both small are very large allocations. - * Because of memory fragmentation the Linux slab which is backed - * by kmalloc'ed memory performs very badly when confronted with - * large numbers of large allocations. Basing the slab on the - * virtual address space removes the need for contiguous pages - * and greatly improve performance for large allocations. - * - * For these reasons, the SPL has its own slab implementation with - * the needed features. It is not as highly optimized as either the - * Solaris or Linux slabs, but it should get me most of what is - * needed until it can be optimized or obsoleted by another approach. - * - * One serious concern I do have about this method is the relatively - * small virtual address space on 32bit arches. This will seriously - * constrain the size of the slab caches and their performance. - * - * XXX: Improve the partial slab list by carefully maintaining a - * strict ordering of fullest to emptiest slabs based on - * the slab reference count. This guarantees the when freeing - * slabs back to the system we need only linearly traverse the - * last N slabs in the list to discover all the freeable slabs. - * - * XXX: NUMA awareness for optionally allocating memory close to a - * particular core. This can be advantageous if you know the slab - * object will be short lived and primarily accessed from one core. - * - * XXX: Slab coloring may also yield performance improvements and would - * be desirable to implement. - */ - -struct list_head spl_kmem_cache_list; /* List of caches */ -struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ -taskq_t *spl_kmem_cache_taskq; /* Task queue for ageing / reclaim */ - -static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj); - -SPL_SHRINKER_CALLBACK_FWD_DECLARE(spl_kmem_cache_generic_shrinker); -SPL_SHRINKER_DECLARE(spl_kmem_cache_shrinker, - spl_kmem_cache_generic_shrinker, KMC_DEFAULT_SEEKS); - -static void * -kv_alloc(spl_kmem_cache_t *skc, int size, int flags) -{ - void *ptr; - - ASSERT(ISP2(size)); - - if (skc->skc_flags & KMC_KMEM) - ptr = (void *)__get_free_pages(flags | __GFP_COMP, - get_order(size)); - else - ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); - - /* Resulting allocated memory will be page aligned */ - ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); - - return ptr; -} - -static void -kv_free(spl_kmem_cache_t *skc, void *ptr, int size) -{ - ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); - ASSERT(ISP2(size)); - - /* - * The Linux direct reclaim path uses this out of band value to - * determine if forward progress is being made. Normally this is - * incremented by kmem_freepages() which is part of the various - * Linux slab implementations. However, since we are using none - * of that infrastructure we are responsible for incrementing it. - */ - if (current->reclaim_state) - current->reclaim_state->reclaimed_slab += size >> PAGE_SHIFT; - - if (skc->skc_flags & KMC_KMEM) - free_pages((unsigned long)ptr, get_order(size)); - else - vfree(ptr); -} - -/* - * Required space for each aligned sks. - */ -static inline uint32_t -spl_sks_size(spl_kmem_cache_t *skc) -{ - return P2ROUNDUP_TYPED(sizeof(spl_kmem_slab_t), - skc->skc_obj_align, uint32_t); -} - -/* - * Required space for each aligned object. - */ -static inline uint32_t -spl_obj_size(spl_kmem_cache_t *skc) -{ - uint32_t align = skc->skc_obj_align; - - return P2ROUNDUP_TYPED(skc->skc_obj_size, align, uint32_t) + - P2ROUNDUP_TYPED(sizeof(spl_kmem_obj_t), align, uint32_t); -} - -/* - * Lookup the spl_kmem_object_t for an object given that object. - */ -static inline spl_kmem_obj_t * -spl_sko_from_obj(spl_kmem_cache_t *skc, void *obj) -{ - return obj + P2ROUNDUP_TYPED(skc->skc_obj_size, - skc->skc_obj_align, uint32_t); -} - -/* - * Required space for each offslab object taking in to account alignment - * restrictions and the power-of-two requirement of kv_alloc(). - */ -static inline uint32_t -spl_offslab_size(spl_kmem_cache_t *skc) -{ - return 1UL << (fls64(spl_obj_size(skc)) + 1); -} - -/* - * It's important that we pack the spl_kmem_obj_t structure and the - * actual objects in to one large address space to minimize the number - * of calls to the allocator. It is far better to do a few large - * allocations and then subdivide it ourselves. Now which allocator - * we use requires balancing a few trade offs. - * - * For small objects we use kmem_alloc() because as long as you are - * only requesting a small number of pages (ideally just one) its cheap. - * However, when you start requesting multiple pages with kmem_alloc() - * it gets increasingly expensive since it requires contiguous pages. - * For this reason we shift to vmem_alloc() for slabs of large objects - * which removes the need for contiguous pages. We do not use - * vmem_alloc() in all cases because there is significant locking - * overhead in __get_vm_area_node(). This function takes a single - * global lock when acquiring an available virtual address range which - * serializes all vmem_alloc()'s for all slab caches. Using slightly - * different allocation functions for small and large objects should - * give us the best of both worlds. - * - * KMC_ONSLAB KMC_OFFSLAB - * - * +------------------------+ +-----------------+ - * | spl_kmem_slab_t --+-+ | | spl_kmem_slab_t |---+-+ - * | skc_obj_size <-+ | | +-----------------+ | | - * | spl_kmem_obj_t | | | | - * | skc_obj_size <---+ | +-----------------+ | | - * | spl_kmem_obj_t | | | skc_obj_size | <-+ | - * | ... v | | spl_kmem_obj_t | | - * +------------------------+ +-----------------+ v - */ -static spl_kmem_slab_t * -spl_slab_alloc(spl_kmem_cache_t *skc, int flags) -{ - spl_kmem_slab_t *sks; - spl_kmem_obj_t *sko, *n; - void *base, *obj; - uint32_t obj_size, offslab_size = 0; - int i, rc = 0; - - base = kv_alloc(skc, skc->skc_slab_size, flags); - if (base == NULL) - return (NULL); - - sks = (spl_kmem_slab_t *)base; - sks->sks_magic = SKS_MAGIC; - sks->sks_objs = skc->skc_slab_objs; - sks->sks_age = jiffies; - sks->sks_cache = skc; - INIT_LIST_HEAD(&sks->sks_list); - INIT_LIST_HEAD(&sks->sks_free_list); - sks->sks_ref = 0; - obj_size = spl_obj_size(skc); - - if (skc->skc_flags & KMC_OFFSLAB) - offslab_size = spl_offslab_size(skc); - - for (i = 0; i < sks->sks_objs; i++) { - if (skc->skc_flags & KMC_OFFSLAB) { - obj = kv_alloc(skc, offslab_size, flags); - if (!obj) { - rc = -ENOMEM; - goto out; - } - } else { - obj = base + spl_sks_size(skc) + (i * obj_size); - } - - ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); - sko = spl_sko_from_obj(skc, obj); - sko->sko_addr = obj; - sko->sko_magic = SKO_MAGIC; - sko->sko_slab = sks; - INIT_LIST_HEAD(&sko->sko_list); - list_add_tail(&sko->sko_list, &sks->sks_free_list); - } - -out: - if (rc) { - if (skc->skc_flags & KMC_OFFSLAB) - list_for_each_entry_safe(sko, n, &sks->sks_free_list, - sko_list) - kv_free(skc, sko->sko_addr, offslab_size); - - kv_free(skc, base, skc->skc_slab_size); - sks = NULL; - } - - return (sks); -} - -/* - * Remove a slab from complete or partial list, it must be called with - * the 'skc->skc_lock' held but the actual free must be performed - * outside the lock to prevent deadlocking on vmem addresses. - */ -static void -spl_slab_free(spl_kmem_slab_t *sks, - struct list_head *sks_list, struct list_head *sko_list) -{ - spl_kmem_cache_t *skc; - - ASSERT(sks->sks_magic == SKS_MAGIC); - ASSERT(sks->sks_ref == 0); - - skc = sks->sks_cache; - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); - - /* - * Update slab/objects counters in the cache, then remove the - * slab from the skc->skc_partial_list. Finally add the slab - * and all its objects in to the private work lists where the - * destructors will be called and the memory freed to the system. - */ - skc->skc_obj_total -= sks->sks_objs; - skc->skc_slab_total--; - list_del(&sks->sks_list); - list_add(&sks->sks_list, sks_list); - list_splice_init(&sks->sks_free_list, sko_list); -} - -/* - * Traverses all the partial slabs attached to a cache and free those - * which which are currently empty, and have not been touched for - * skc_delay seconds to avoid thrashing. The count argument is - * passed to optionally cap the number of slabs reclaimed, a count - * of zero means try and reclaim everything. When flag is set we - * always free an available slab regardless of age. - */ -static void -spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) -{ - spl_kmem_slab_t *sks, *m; - spl_kmem_obj_t *sko, *n; - LIST_HEAD(sks_list); - LIST_HEAD(sko_list); - uint32_t size = 0; - int i = 0; - - /* - * Move empty slabs and objects which have not been touched in - * skc_delay seconds on to private lists to be freed outside - * the spin lock. This delay time is important to avoid thrashing - * however when flag is set the delay will not be used. - */ - spin_lock(&skc->skc_lock); - list_for_each_entry_safe_reverse(sks,m,&skc->skc_partial_list,sks_list){ - /* - * All empty slabs are at the end of skc->skc_partial_list, - * therefore once a non-empty slab is found we can stop - * scanning. Additionally, stop when reaching the target - * reclaim 'count' if a non-zero threshold is given. - */ - if ((sks->sks_ref > 0) || (count && i >= count)) - break; - - if (time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)||flag) { - spl_slab_free(sks, &sks_list, &sko_list); - i++; - } - } - spin_unlock(&skc->skc_lock); - - /* - * The following two loops ensure all the object destructors are - * run, any offslab objects are freed, and the slabs themselves - * are freed. This is all done outside the skc->skc_lock since - * this allows the destructor to sleep, and allows us to perform - * a conditional reschedule when a freeing a large number of - * objects and slabs back to the system. - */ - if (skc->skc_flags & KMC_OFFSLAB) - size = spl_offslab_size(skc); - - list_for_each_entry_safe(sko, n, &sko_list, sko_list) { - ASSERT(sko->sko_magic == SKO_MAGIC); - - if (skc->skc_flags & KMC_OFFSLAB) - kv_free(skc, sko->sko_addr, size); - } - - list_for_each_entry_safe(sks, m, &sks_list, sks_list) { - ASSERT(sks->sks_magic == SKS_MAGIC); - kv_free(skc, sks, skc->skc_slab_size); - } -} - -static spl_kmem_emergency_t * -spl_emergency_search(struct rb_root *root, void *obj) -{ - struct rb_node *node = root->rb_node; - spl_kmem_emergency_t *ske; - unsigned long address = (unsigned long)obj; - - while (node) { - ske = container_of(node, spl_kmem_emergency_t, ske_node); - - if (address < (unsigned long)ske->ske_obj) - node = node->rb_left; - else if (address > (unsigned long)ske->ske_obj) - node = node->rb_right; - else - return ske; - } - - return NULL; -} - -static int -spl_emergency_insert(struct rb_root *root, spl_kmem_emergency_t *ske) -{ - struct rb_node **new = &(root->rb_node), *parent = NULL; - spl_kmem_emergency_t *ske_tmp; - unsigned long address = (unsigned long)ske->ske_obj; - - while (*new) { - ske_tmp = container_of(*new, spl_kmem_emergency_t, ske_node); - - parent = *new; - if (address < (unsigned long)ske_tmp->ske_obj) - new = &((*new)->rb_left); - else if (address > (unsigned long)ske_tmp->ske_obj) - new = &((*new)->rb_right); - else - return 0; - } - - rb_link_node(&ske->ske_node, parent, new); - rb_insert_color(&ske->ske_node, root); - - return 1; -} - -/* - * Allocate a single emergency object and track it in a red black tree. - */ -static int -spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) -{ - spl_kmem_emergency_t *ske; - int empty; - - /* Last chance use a partial slab if one now exists */ - spin_lock(&skc->skc_lock); - empty = list_empty(&skc->skc_partial_list); - spin_unlock(&skc->skc_lock); - if (!empty) - return (-EEXIST); - - ske = kmalloc(sizeof(*ske), flags); - if (ske == NULL) - return (-ENOMEM); - - ske->ske_obj = kmalloc(skc->skc_obj_size, flags); - if (ske->ske_obj == NULL) { - kfree(ske); - return (-ENOMEM); - } - - spin_lock(&skc->skc_lock); - empty = spl_emergency_insert(&skc->skc_emergency_tree, ske); - if (likely(empty)) { - skc->skc_obj_total++; - skc->skc_obj_emergency++; - if (skc->skc_obj_emergency > skc->skc_obj_emergency_max) - skc->skc_obj_emergency_max = skc->skc_obj_emergency; - } - spin_unlock(&skc->skc_lock); - - if (unlikely(!empty)) { - kfree(ske->ske_obj); - kfree(ske); - return (-EINVAL); - } - - *obj = ske->ske_obj; - - return (0); -} - -/* - * Locate the passed object in the red black tree and free it. - */ -static int -spl_emergency_free(spl_kmem_cache_t *skc, void *obj) -{ - spl_kmem_emergency_t *ske; - - spin_lock(&skc->skc_lock); - ske = spl_emergency_search(&skc->skc_emergency_tree, obj); - if (likely(ske)) { - rb_erase(&ske->ske_node, &skc->skc_emergency_tree); - skc->skc_obj_emergency--; - skc->skc_obj_total--; - } - spin_unlock(&skc->skc_lock); - - if (unlikely(ske == NULL)) - return (-ENOENT); - - kfree(ske->ske_obj); - kfree(ske); - - return (0); -} - -/* - * Release objects from the per-cpu magazine back to their slab. The flush - * argument contains the max number of entries to remove from the magazine. - */ -static void -__spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) -{ - int i, count = MIN(flush, skm->skm_avail); - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(skm->skm_magic == SKM_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); - - for (i = 0; i < count; i++) - spl_cache_shrink(skc, skm->skm_objs[i]); - - skm->skm_avail -= count; - memmove(skm->skm_objs, &(skm->skm_objs[count]), - sizeof(void *) * skm->skm_avail); -} - -static void -spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) -{ - spin_lock(&skc->skc_lock); - __spl_cache_flush(skc, skm, flush); - spin_unlock(&skc->skc_lock); -} - -static void -spl_magazine_age(void *data) -{ - spl_kmem_cache_t *skc = (spl_kmem_cache_t *)data; - spl_kmem_magazine_t *skm = skc->skc_mag[smp_processor_id()]; - - ASSERT(skm->skm_magic == SKM_MAGIC); - ASSERT(skm->skm_cpu == smp_processor_id()); - ASSERT(irqs_disabled()); - - /* There are no available objects or they are too young to age out */ - if ((skm->skm_avail == 0) || - time_before(jiffies, skm->skm_age + skc->skc_delay * HZ)) - return; - - /* - * Because we're executing in interrupt context we may have - * interrupted the holder of this lock. To avoid a potential - * deadlock return if the lock is contended. - */ - if (!spin_trylock(&skc->skc_lock)) - return; - - __spl_cache_flush(skc, skm, skm->skm_refill); - spin_unlock(&skc->skc_lock); -} - -/* - * Called regularly to keep a downward pressure on the cache. - * - * Objects older than skc->skc_delay seconds in the per-cpu magazines will - * be returned to the caches. This is done to prevent idle magazines from - * holding memory which could be better used elsewhere. The delay is - * present to prevent thrashing the magazine. - * - * The newly released objects may result in empty partial slabs. Those - * slabs should be released to the system. Otherwise moving the objects - * out of the magazines is just wasted work. - */ -static void -spl_cache_age(void *data) -{ - spl_kmem_cache_t *skc = (spl_kmem_cache_t *)data; - taskqid_t id = 0; - - ASSERT(skc->skc_magic == SKC_MAGIC); - - /* Dynamically disabled at run time */ - if (!(spl_kmem_cache_expire & KMC_EXPIRE_AGE)) - return; - - atomic_inc(&skc->skc_ref); - - if (!(skc->skc_flags & KMC_NOMAGAZINE)) - on_each_cpu(spl_magazine_age, skc, 1); - - spl_slab_reclaim(skc, skc->skc_reap, 0); - - while (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && !id) { - id = taskq_dispatch_delay( - spl_kmem_cache_taskq, spl_cache_age, skc, TQ_SLEEP, - ddi_get_lbolt() + skc->skc_delay / 3 * HZ); - - /* Destroy issued after dispatch immediately cancel it */ - if (test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && id) - taskq_cancel_id(spl_kmem_cache_taskq, id); - } - - spin_lock(&skc->skc_lock); - skc->skc_taskqid = id; - spin_unlock(&skc->skc_lock); - - atomic_dec(&skc->skc_ref); -} - -/* - * Size a slab based on the size of each aligned object plus spl_kmem_obj_t. - * When on-slab we want to target spl_kmem_cache_obj_per_slab. However, - * for very small objects we may end up with more than this so as not - * to waste space in the minimal allocation of a single page. Also for - * very large objects we may use as few as spl_kmem_cache_obj_per_slab_min, - * lower than this and we will fail. - */ -static int -spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) -{ - uint32_t sks_size, obj_size, max_size; - - if (skc->skc_flags & KMC_OFFSLAB) { - *objs = spl_kmem_cache_obj_per_slab; - *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), PAGE_SIZE); - return (0); - } else { - sks_size = spl_sks_size(skc); - obj_size = spl_obj_size(skc); - - if (skc->skc_flags & KMC_KMEM) - max_size = ((uint32_t)1 << (MAX_ORDER-3)) * PAGE_SIZE; - else - max_size = (spl_kmem_cache_max_size * 1024 * 1024); - - /* Power of two sized slab */ - for (*size = PAGE_SIZE; *size <= max_size; *size *= 2) { - *objs = (*size - sks_size) / obj_size; - if (*objs >= spl_kmem_cache_obj_per_slab) - return (0); - } - - /* - * Unable to satisfy target objects per slab, fall back to - * allocating a maximally sized slab and assuming it can - * contain the minimum objects count use it. If not fail. - */ - *size = max_size; - *objs = (*size - sks_size) / obj_size; - if (*objs >= (spl_kmem_cache_obj_per_slab_min)) - return (0); - } - - return (-ENOSPC); -} - -/* - * Make a guess at reasonable per-cpu magazine size based on the size of - * each object and the cost of caching N of them in each magazine. Long - * term this should really adapt based on an observed usage heuristic. - */ -static int -spl_magazine_size(spl_kmem_cache_t *skc) -{ - uint32_t obj_size = spl_obj_size(skc); - int size; - - /* Per-magazine sizes below assume a 4Kib page size */ - if (obj_size > (PAGE_SIZE * 256)) - size = 4; /* Minimum 4Mib per-magazine */ - else if (obj_size > (PAGE_SIZE * 32)) - size = 16; /* Minimum 2Mib per-magazine */ - else if (obj_size > (PAGE_SIZE)) - size = 64; /* Minimum 256Kib per-magazine */ - else if (obj_size > (PAGE_SIZE / 4)) - size = 128; /* Minimum 128Kib per-magazine */ - else - size = 256; - - return (size); -} - -/* - * Allocate a per-cpu magazine to associate with a specific core. - */ -static spl_kmem_magazine_t * -spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) -{ - spl_kmem_magazine_t *skm; - int size = sizeof(spl_kmem_magazine_t) + - sizeof(void *) * skc->skc_mag_size; - - skm = kmem_alloc_node(size, KM_SLEEP, cpu_to_node(cpu)); - if (skm) { - skm->skm_magic = SKM_MAGIC; - skm->skm_avail = 0; - skm->skm_size = skc->skc_mag_size; - skm->skm_refill = skc->skc_mag_refill; - skm->skm_cache = skc; - skm->skm_age = jiffies; - skm->skm_cpu = cpu; - } - - return (skm); -} - -/* - * Free a per-cpu magazine associated with a specific core. - */ -static void -spl_magazine_free(spl_kmem_magazine_t *skm) -{ - int size = sizeof(spl_kmem_magazine_t) + - sizeof(void *) * skm->skm_size; - - ASSERT(skm->skm_magic == SKM_MAGIC); - ASSERT(skm->skm_avail == 0); - - kmem_free(skm, size); -} - -/* - * Create all pre-cpu magazines of reasonable sizes. - */ -static int -spl_magazine_create(spl_kmem_cache_t *skc) -{ - int i; - - if (skc->skc_flags & KMC_NOMAGAZINE) - return (0); - - skc->skc_mag_size = spl_magazine_size(skc); - skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; - - for_each_online_cpu(i) { - skc->skc_mag[i] = spl_magazine_alloc(skc, i); - if (!skc->skc_mag[i]) { - for (i--; i >= 0; i--) - spl_magazine_free(skc->skc_mag[i]); - - return (-ENOMEM); - } - } - - return (0); -} - -/* - * Destroy all pre-cpu magazines. - */ -static void -spl_magazine_destroy(spl_kmem_cache_t *skc) -{ - spl_kmem_magazine_t *skm; - int i; - - if (skc->skc_flags & KMC_NOMAGAZINE) - return; - - for_each_online_cpu(i) { - skm = skc->skc_mag[i]; - spl_cache_flush(skc, skm, skm->skm_avail); - spl_magazine_free(skm); - } -} - -/* - * Create a object cache based on the following arguments: - * name cache name - * size cache object size - * align cache object alignment - * ctor cache object constructor - * dtor cache object destructor - * reclaim cache object reclaim - * priv cache private data for ctor/dtor/reclaim - * vmp unused must be NULL - * flags - * KMC_NOTOUCH Disable cache object aging (unsupported) - * KMC_NODEBUG Disable debugging (unsupported) - * KMC_NOHASH Disable hashing (unsupported) - * KMC_QCACHE Disable qcache (unsupported) - * KMC_NOMAGAZINE Enabled for kmem/vmem, Disabled for Linux slab - * KMC_KMEM Force kmem backed cache - * KMC_VMEM Force vmem backed cache - * KMC_SLAB Force Linux slab backed cache - * KMC_OFFSLAB Locate objects off the slab - */ -spl_kmem_cache_t * -spl_kmem_cache_create(char *name, size_t size, size_t align, - spl_kmem_ctor_t ctor, - spl_kmem_dtor_t dtor, - spl_kmem_reclaim_t reclaim, - void *priv, void *vmp, int flags) -{ - spl_kmem_cache_t *skc; - int rc; - - /* - * Unsupported flags - */ - ASSERT0(flags & KMC_NOMAGAZINE); - ASSERT0(flags & KMC_NOHASH); - ASSERT0(flags & KMC_QCACHE); - ASSERT(vmp == NULL); - - might_sleep(); - - /* - * Allocate memory for a new cache an initialize it. Unfortunately, - * this usually ends up being a large allocation of ~32k because - * we need to allocate enough memory for the worst case number of - * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we - * explicitly pass KM_NODEBUG to suppress the kmem warning - */ - skc = kmem_zalloc(sizeof(*skc), KM_SLEEP| KM_NODEBUG); - if (skc == NULL) - return (NULL); - - skc->skc_magic = SKC_MAGIC; - skc->skc_name_size = strlen(name) + 1; - skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, KM_SLEEP); - if (skc->skc_name == NULL) { - kmem_free(skc, sizeof(*skc)); - return (NULL); - } - strncpy(skc->skc_name, name, skc->skc_name_size); - - skc->skc_ctor = ctor; - skc->skc_dtor = dtor; - skc->skc_reclaim = reclaim; - skc->skc_private = priv; - skc->skc_vmp = vmp; - skc->skc_linux_cache = NULL; - skc->skc_flags = flags; - skc->skc_obj_size = size; - skc->skc_obj_align = SPL_KMEM_CACHE_ALIGN; - skc->skc_delay = SPL_KMEM_CACHE_DELAY; - skc->skc_reap = SPL_KMEM_CACHE_REAP; - atomic_set(&skc->skc_ref, 0); - - INIT_LIST_HEAD(&skc->skc_list); - INIT_LIST_HEAD(&skc->skc_complete_list); - INIT_LIST_HEAD(&skc->skc_partial_list); - skc->skc_emergency_tree = RB_ROOT; - spin_lock_init(&skc->skc_lock); - init_waitqueue_head(&skc->skc_waitq); - skc->skc_slab_fail = 0; - skc->skc_slab_create = 0; - skc->skc_slab_destroy = 0; - skc->skc_slab_total = 0; - skc->skc_slab_alloc = 0; - skc->skc_slab_max = 0; - skc->skc_obj_total = 0; - skc->skc_obj_alloc = 0; - skc->skc_obj_max = 0; - skc->skc_obj_deadlock = 0; - skc->skc_obj_emergency = 0; - skc->skc_obj_emergency_max = 0; - - /* - * Verify the requested alignment restriction is sane. - */ - if (align) { - VERIFY(ISP2(align)); - VERIFY3U(align, >=, SPL_KMEM_CACHE_ALIGN); - VERIFY3U(align, <=, PAGE_SIZE); - skc->skc_obj_align = align; - } - - /* - * When no specific type of slab is requested (kmem, vmem, or - * linuxslab) then select a cache type based on the object size - * and default tunables. - */ - if (!(skc->skc_flags & (KMC_KMEM | KMC_VMEM | KMC_SLAB))) { - - /* - * Objects smaller than spl_kmem_cache_slab_limit can - * use the Linux slab for better space-efficiency. By - * default this functionality is disabled until its - * performance characters are fully understood. - */ - if (spl_kmem_cache_slab_limit && - size <= (size_t)spl_kmem_cache_slab_limit) - skc->skc_flags |= KMC_SLAB; - - /* - * Small objects, less than spl_kmem_cache_kmem_limit per - * object should use kmem because their slabs are small. - */ - else if (spl_obj_size(skc) <= spl_kmem_cache_kmem_limit) - skc->skc_flags |= KMC_KMEM; - - /* - * All other objects are considered large and are placed - * on vmem backed slabs. - */ - else - skc->skc_flags |= KMC_VMEM; - } - - /* - * Given the type of slab allocate the required resources. - */ - if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { - rc = spl_slab_size(skc, - &skc->skc_slab_objs, &skc->skc_slab_size); - if (rc) - goto out; - - rc = spl_magazine_create(skc); - if (rc) - goto out; - } else { - skc->skc_linux_cache = kmem_cache_create( - skc->skc_name, size, align, 0, NULL); - if (skc->skc_linux_cache == NULL) { - rc = ENOMEM; - goto out; - } - - kmem_cache_set_allocflags(skc, __GFP_COMP); - skc->skc_flags |= KMC_NOMAGAZINE; - } - - if (spl_kmem_cache_expire & KMC_EXPIRE_AGE) - skc->skc_taskqid = taskq_dispatch_delay(spl_kmem_cache_taskq, - spl_cache_age, skc, TQ_SLEEP, - ddi_get_lbolt() + skc->skc_delay / 3 * HZ); - - down_write(&spl_kmem_cache_sem); - list_add_tail(&skc->skc_list, &spl_kmem_cache_list); - up_write(&spl_kmem_cache_sem); - - return (skc); -out: - kmem_free(skc->skc_name, skc->skc_name_size); - kmem_free(skc, sizeof(*skc)); - return (NULL); -} -EXPORT_SYMBOL(spl_kmem_cache_create); - -/* - * Register a move callback to for cache defragmentation. - * XXX: Unimplemented but harmless to stub out for now. - */ -void -spl_kmem_cache_set_move(spl_kmem_cache_t *skc, - kmem_cbrc_t (move)(void *, void *, size_t, void *)) -{ - ASSERT(move != NULL); -} -EXPORT_SYMBOL(spl_kmem_cache_set_move); - -/* - * Destroy a cache and all objects associated with the cache. - */ -void -spl_kmem_cache_destroy(spl_kmem_cache_t *skc) -{ - DECLARE_WAIT_QUEUE_HEAD(wq); - taskqid_t id; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(skc->skc_flags & (KMC_KMEM | KMC_VMEM | KMC_SLAB)); - - down_write(&spl_kmem_cache_sem); - list_del_init(&skc->skc_list); - up_write(&spl_kmem_cache_sem); - - /* Cancel any and wait for any pending delayed tasks */ - VERIFY(!test_and_set_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - - spin_lock(&skc->skc_lock); - id = skc->skc_taskqid; - spin_unlock(&skc->skc_lock); - - taskq_cancel_id(spl_kmem_cache_taskq, id); - - /* Wait until all current callers complete, this is mainly - * to catch the case where a low memory situation triggers a - * cache reaping action which races with this destroy. */ - wait_event(wq, atomic_read(&skc->skc_ref) == 0); - - if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { - spl_magazine_destroy(skc); - spl_slab_reclaim(skc, 0, 1); - } else { - ASSERT(skc->skc_flags & KMC_SLAB); - kmem_cache_destroy(skc->skc_linux_cache); - } - - spin_lock(&skc->skc_lock); - - /* Validate there are no objects in use and free all the - * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ - ASSERT3U(skc->skc_slab_alloc, ==, 0); - ASSERT3U(skc->skc_obj_alloc, ==, 0); - ASSERT3U(skc->skc_slab_total, ==, 0); - ASSERT3U(skc->skc_obj_total, ==, 0); - ASSERT3U(skc->skc_obj_emergency, ==, 0); - ASSERT(list_empty(&skc->skc_complete_list)); - - kmem_free(skc->skc_name, skc->skc_name_size); - spin_unlock(&skc->skc_lock); - - kmem_free(skc, sizeof(*skc)); -} -EXPORT_SYMBOL(spl_kmem_cache_destroy); - -/* - * Allocate an object from a slab attached to the cache. This is used to - * repopulate the per-cpu magazine caches in batches when they run low. - */ -static void * -spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) -{ - spl_kmem_obj_t *sko; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(sks->sks_magic == SKS_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); - - sko = list_entry(sks->sks_free_list.next, spl_kmem_obj_t, sko_list); - ASSERT(sko->sko_magic == SKO_MAGIC); - ASSERT(sko->sko_addr != NULL); - - /* Remove from sks_free_list */ - list_del_init(&sko->sko_list); - - sks->sks_age = jiffies; - sks->sks_ref++; - skc->skc_obj_alloc++; - - /* Track max obj usage statistics */ - if (skc->skc_obj_alloc > skc->skc_obj_max) - skc->skc_obj_max = skc->skc_obj_alloc; - - /* Track max slab usage statistics */ - if (sks->sks_ref == 1) { - skc->skc_slab_alloc++; - - if (skc->skc_slab_alloc > skc->skc_slab_max) - skc->skc_slab_max = skc->skc_slab_alloc; - } - - return sko->sko_addr; -} - -/* - * Generic slab allocation function to run by the global work queues. - * It is responsible for allocating a new slab, linking it in to the list - * of partial slabs, and then waking any waiters. - */ -static void -spl_cache_grow_work(void *data) -{ - spl_kmem_alloc_t *ska = (spl_kmem_alloc_t *)data; - spl_kmem_cache_t *skc = ska->ska_cache; - spl_kmem_slab_t *sks; - - sks = spl_slab_alloc(skc, ska->ska_flags | __GFP_NORETRY | KM_NODEBUG); - spin_lock(&skc->skc_lock); - if (sks) { - skc->skc_slab_total++; - skc->skc_obj_total += sks->sks_objs; - list_add_tail(&sks->sks_list, &skc->skc_partial_list); - } - - atomic_dec(&skc->skc_ref); - clear_bit(KMC_BIT_GROWING, &skc->skc_flags); - clear_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); - wake_up_all(&skc->skc_waitq); - spin_unlock(&skc->skc_lock); - - kfree(ska); -} - -/* - * Returns non-zero when a new slab should be available. - */ -static int -spl_cache_grow_wait(spl_kmem_cache_t *skc) -{ - return !test_bit(KMC_BIT_GROWING, &skc->skc_flags); -} - -/* - * No available objects on any slabs, create a new slab. Note that this - * functionality is disabled for KMC_SLAB caches which are backed by the - * Linux slab. - */ -static int -spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) -{ - int remaining, rc; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT((skc->skc_flags & KMC_SLAB) == 0); - might_sleep(); - *obj = NULL; - - /* - * Before allocating a new slab wait for any reaping to complete and - * then return so the local magazine can be rechecked for new objects. - */ - if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) { - rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING, - TASK_UNINTERRUPTIBLE); - return (rc ? rc : -EAGAIN); - } - - /* - * This is handled by dispatching a work request to the global work - * queue. This allows us to asynchronously allocate a new slab while - * retaining the ability to safely fall back to a smaller synchronous - * allocations to ensure forward progress is always maintained. - */ - if (test_and_set_bit(KMC_BIT_GROWING, &skc->skc_flags) == 0) { - spl_kmem_alloc_t *ska; - - ska = kmalloc(sizeof(*ska), flags); - if (ska == NULL) { - clear_bit(KMC_BIT_GROWING, &skc->skc_flags); - wake_up_all(&skc->skc_waitq); - return (-ENOMEM); - } - - atomic_inc(&skc->skc_ref); - ska->ska_cache = skc; - ska->ska_flags = flags & ~__GFP_FS; - taskq_init_ent(&ska->ska_tqe); - taskq_dispatch_ent(spl_kmem_cache_taskq, - spl_cache_grow_work, ska, 0, &ska->ska_tqe); - } - - /* - * The goal here is to only detect the rare case where a virtual slab - * allocation has deadlocked. We must be careful to minimize the use - * of emergency objects which are more expensive to track. Therefore, - * we set a very long timeout for the asynchronous allocation and if - * the timeout is reached the cache is flagged as deadlocked. From - * this point only new emergency objects will be allocated until the - * asynchronous allocation completes and clears the deadlocked flag. - */ - if (test_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags)) { - rc = spl_emergency_alloc(skc, flags, obj); - } else { - remaining = wait_event_timeout(skc->skc_waitq, - spl_cache_grow_wait(skc), HZ); - - if (!remaining && test_bit(KMC_BIT_VMEM, &skc->skc_flags)) { - spin_lock(&skc->skc_lock); - if (test_bit(KMC_BIT_GROWING, &skc->skc_flags)) { - set_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); - skc->skc_obj_deadlock++; - } - spin_unlock(&skc->skc_lock); - } - - rc = -ENOMEM; - } - - return (rc); -} - -/* - * Refill a per-cpu magazine with objects from the slabs for this cache. - * Ideally the magazine can be repopulated using existing objects which have - * been released, however if we are unable to locate enough free objects new - * slabs of objects will be created. On success NULL is returned, otherwise - * the address of a single emergency object is returned for use by the caller. - */ -static void * -spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) -{ - spl_kmem_slab_t *sks; - int count = 0, rc, refill; - void *obj = NULL; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(skm->skm_magic == SKM_MAGIC); - - refill = MIN(skm->skm_refill, skm->skm_size - skm->skm_avail); - spin_lock(&skc->skc_lock); - - while (refill > 0) { - /* No slabs available we may need to grow the cache */ - if (list_empty(&skc->skc_partial_list)) { - spin_unlock(&skc->skc_lock); - - local_irq_enable(); - rc = spl_cache_grow(skc, flags, &obj); - local_irq_disable(); - - /* Emergency object for immediate use by caller */ - if (rc == 0 && obj != NULL) - return (obj); - - if (rc) - goto out; - - /* Rescheduled to different CPU skm is not local */ - if (skm != skc->skc_mag[smp_processor_id()]) - goto out; - - /* Potentially rescheduled to the same CPU but - * allocations may have occurred from this CPU while - * we were sleeping so recalculate max refill. */ - refill = MIN(refill, skm->skm_size - skm->skm_avail); - - spin_lock(&skc->skc_lock); - continue; - } - - /* Grab the next available slab */ - sks = list_entry((&skc->skc_partial_list)->next, - spl_kmem_slab_t, sks_list); - ASSERT(sks->sks_magic == SKS_MAGIC); - ASSERT(sks->sks_ref < sks->sks_objs); - ASSERT(!list_empty(&sks->sks_free_list)); - - /* Consume as many objects as needed to refill the requested - * cache. We must also be careful not to overfill it. */ - while (sks->sks_ref < sks->sks_objs && refill-- > 0 && ++count) { - ASSERT(skm->skm_avail < skm->skm_size); - ASSERT(count < skm->skm_size); - skm->skm_objs[skm->skm_avail++]=spl_cache_obj(skc,sks); - } - - /* Move slab to skc_complete_list when full */ - if (sks->sks_ref == sks->sks_objs) { - list_del(&sks->sks_list); - list_add(&sks->sks_list, &skc->skc_complete_list); - } - } - - spin_unlock(&skc->skc_lock); -out: - return (NULL); -} - -/* - * Release an object back to the slab from which it came. - */ -static void -spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) -{ - spl_kmem_slab_t *sks = NULL; - spl_kmem_obj_t *sko = NULL; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); - - sko = spl_sko_from_obj(skc, obj); - ASSERT(sko->sko_magic == SKO_MAGIC); - sks = sko->sko_slab; - ASSERT(sks->sks_magic == SKS_MAGIC); - ASSERT(sks->sks_cache == skc); - list_add(&sko->sko_list, &sks->sks_free_list); - - sks->sks_age = jiffies; - sks->sks_ref--; - skc->skc_obj_alloc--; - - /* Move slab to skc_partial_list when no longer full. Slabs - * are added to the head to keep the partial list is quasi-full - * sorted order. Fuller at the head, emptier at the tail. */ - if (sks->sks_ref == (sks->sks_objs - 1)) { - list_del(&sks->sks_list); - list_add(&sks->sks_list, &skc->skc_partial_list); - } - - /* Move empty slabs to the end of the partial list so - * they can be easily found and freed during reclamation. */ - if (sks->sks_ref == 0) { - list_del(&sks->sks_list); - list_add_tail(&sks->sks_list, &skc->skc_partial_list); - skc->skc_slab_alloc--; - } -} - -/* - * Allocate an object from the per-cpu magazine, or if the magazine - * is empty directly allocate from a slab and repopulate the magazine. - */ -void * -spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) -{ - spl_kmem_magazine_t *skm; - void *obj = NULL; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - ASSERT(flags & KM_SLEEP); - - atomic_inc(&skc->skc_ref); - - /* - * Allocate directly from a Linux slab. All optimizations are left - * to the underlying cache we only need to guarantee that KM_SLEEP - * callers will never fail. - */ - if (skc->skc_flags & KMC_SLAB) { - struct kmem_cache *slc = skc->skc_linux_cache; - - do { - obj = kmem_cache_alloc(slc, flags | __GFP_COMP); - } while ((obj == NULL) && !(flags & KM_NOSLEEP)); - - goto ret; - } - - local_irq_disable(); - -restart: - /* Safe to update per-cpu structure without lock, but - * in the restart case we must be careful to reacquire - * the local magazine since this may have changed - * when we need to grow the cache. */ - skm = skc->skc_mag[smp_processor_id()]; - ASSERT(skm->skm_magic == SKM_MAGIC); - - if (likely(skm->skm_avail)) { - /* Object available in CPU cache, use it */ - obj = skm->skm_objs[--skm->skm_avail]; - skm->skm_age = jiffies; - } else { - obj = spl_cache_refill(skc, skm, flags); - if (obj == NULL) - goto restart; - } - - local_irq_enable(); - ASSERT(obj); - ASSERT(IS_P2ALIGNED(obj, skc->skc_obj_align)); - -ret: - /* Pre-emptively migrate object to CPU L1 cache */ - if (obj) { - if (obj && skc->skc_ctor) - skc->skc_ctor(obj, skc->skc_private, flags); - else - prefetchw(obj); - } - - atomic_dec(&skc->skc_ref); - - return (obj); -} - -EXPORT_SYMBOL(spl_kmem_cache_alloc); - -/* - * Free an object back to the local per-cpu magazine, there is no - * guarantee that this is the same magazine the object was originally - * allocated from. We may need to flush entire from the magazine - * back to the slabs to make space. - */ -void -spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) -{ - spl_kmem_magazine_t *skm; - unsigned long flags; - - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - atomic_inc(&skc->skc_ref); - - /* - * Run the destructor - */ - if (skc->skc_dtor) - skc->skc_dtor(obj, skc->skc_private); - - /* - * Free the object from the Linux underlying Linux slab. - */ - if (skc->skc_flags & KMC_SLAB) { - kmem_cache_free(skc->skc_linux_cache, obj); - goto out; - } - - /* - * Only virtual slabs may have emergency objects and these objects - * are guaranteed to have physical addresses. They must be removed - * from the tree of emergency objects and the freed. - */ - if ((skc->skc_flags & KMC_VMEM) && !kmem_virt(obj)) { - spl_emergency_free(skc, obj); - goto out; - } - - local_irq_save(flags); - - /* Safe to update per-cpu structure without lock, but - * no remote memory allocation tracking is being performed - * it is entirely possible to allocate an object from one - * CPU cache and return it to another. */ - skm = skc->skc_mag[smp_processor_id()]; - ASSERT(skm->skm_magic == SKM_MAGIC); - - /* Per-CPU cache full, flush it to make space */ - if (unlikely(skm->skm_avail >= skm->skm_size)) - spl_cache_flush(skc, skm, skm->skm_refill); - - /* Available space in cache, use it */ - skm->skm_objs[skm->skm_avail++] = obj; - - local_irq_restore(flags); -out: - atomic_dec(&skc->skc_ref); -} -EXPORT_SYMBOL(spl_kmem_cache_free); - -/* - * The generic shrinker function for all caches. Under Linux a shrinker - * may not be tightly coupled with a slab cache. In fact Linux always - * systematically tries calling all registered shrinker callbacks which - * report that they contain unused objects. Because of this we only - * register one shrinker function in the shim layer for all slab caches. - * We always attempt to shrink all caches when this generic shrinker - * is called. - * - * If sc->nr_to_scan is zero, the caller is requesting a query of the - * number of objects which can potentially be freed. If it is nonzero, - * the request is to free that many objects. - * - * Linux kernels >= 3.12 have the count_objects and scan_objects callbacks - * in struct shrinker and also require the shrinker to return the number - * of objects freed. - * - * Older kernels require the shrinker to return the number of freeable - * objects following the freeing of nr_to_free. - * - * Linux semantics differ from those under Solaris, which are to - * free all available objects which may (and probably will) be more - * objects than the requested nr_to_scan. - */ -static spl_shrinker_t -__spl_kmem_cache_generic_shrinker(struct shrinker *shrink, - struct shrink_control *sc) -{ - spl_kmem_cache_t *skc; - int alloc = 0; - - down_read(&spl_kmem_cache_sem); - list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { - if (sc->nr_to_scan) { -#ifdef HAVE_SPLIT_SHRINKER_CALLBACK - uint64_t oldalloc = skc->skc_obj_alloc; - spl_kmem_cache_reap_now(skc, - MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); - if (oldalloc > skc->skc_obj_alloc) - alloc += oldalloc - skc->skc_obj_alloc; -#else - spl_kmem_cache_reap_now(skc, - MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); - alloc += skc->skc_obj_alloc; -#endif /* HAVE_SPLIT_SHRINKER_CALLBACK */ - } else { - /* Request to query number of freeable objects */ - alloc += skc->skc_obj_alloc; - } - } - up_read(&spl_kmem_cache_sem); - - /* - * When KMC_RECLAIM_ONCE is set allow only a single reclaim pass. - * This functionality only exists to work around a rare issue where - * shrink_slabs() is repeatedly invoked by many cores causing the - * system to thrash. - */ - if ((spl_kmem_cache_reclaim & KMC_RECLAIM_ONCE) && sc->nr_to_scan) - return (SHRINK_STOP); - - return (MAX(alloc, 0)); -} - -SPL_SHRINKER_CALLBACK_WRAPPER(spl_kmem_cache_generic_shrinker); - -/* - * Call the registered reclaim function for a cache. Depending on how - * many and which objects are released it may simply repopulate the - * local magazine which will then need to age-out. Objects which cannot - * fit in the magazine we will be released back to their slabs which will - * also need to age out before being release. This is all just best - * effort and we do not want to thrash creating and destroying slabs. - */ -void -spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) -{ - ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - - atomic_inc(&skc->skc_ref); - - /* - * Execute the registered reclaim callback if it exists. The - * per-cpu caches will be drained when is set KMC_EXPIRE_MEM. - */ - if (skc->skc_flags & KMC_SLAB) { - if (skc->skc_reclaim) - skc->skc_reclaim(skc->skc_private); - - if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) - kmem_cache_shrink(skc->skc_linux_cache); - - goto out; - } - - /* - * Prevent concurrent cache reaping when contended. - */ - if (test_and_set_bit(KMC_BIT_REAPING, &skc->skc_flags)) - goto out; - - /* - * When a reclaim function is available it may be invoked repeatedly - * until at least a single slab can be freed. This ensures that we - * do free memory back to the system. This helps minimize the chance - * of an OOM event when the bulk of memory is used by the slab. - * - * When free slabs are already available the reclaim callback will be - * skipped. Additionally, if no forward progress is detected despite - * a reclaim function the cache will be skipped to avoid deadlock. - * - * Longer term this would be the correct place to add the code which - * repacks the slabs in order minimize fragmentation. - */ - if (skc->skc_reclaim) { - uint64_t objects = UINT64_MAX; - int do_reclaim; - - do { - spin_lock(&skc->skc_lock); - do_reclaim = - (skc->skc_slab_total > 0) && - ((skc->skc_slab_total - skc->skc_slab_alloc) == 0) && - (skc->skc_obj_alloc < objects); - - objects = skc->skc_obj_alloc; - spin_unlock(&skc->skc_lock); - - if (do_reclaim) - skc->skc_reclaim(skc->skc_private); - - } while (do_reclaim); - } - - /* Reclaim from the magazine then the slabs ignoring age and delay. */ - if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) { - spl_kmem_magazine_t *skm; - unsigned long irq_flags; - - local_irq_save(irq_flags); - skm = skc->skc_mag[smp_processor_id()]; - spl_cache_flush(skc, skm, skm->skm_avail); - local_irq_restore(irq_flags); - } - - spl_slab_reclaim(skc, count, 1); - clear_bit(KMC_BIT_REAPING, &skc->skc_flags); - smp_wmb(); - wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); -out: - atomic_dec(&skc->skc_ref); -} -EXPORT_SYMBOL(spl_kmem_cache_reap_now); - -/* - * Reap all free slabs from all registered caches. - */ -void -spl_kmem_reap(void) -{ - struct shrink_control sc; - - sc.nr_to_scan = KMC_REAP_CHUNK; - sc.gfp_mask = GFP_KERNEL; - - (void) __spl_kmem_cache_generic_shrinker(NULL, &sc); -} -EXPORT_SYMBOL(spl_kmem_reap); - #if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) static char * spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) @@ -2202,28 +432,15 @@ spl_kmem_init(void) #ifdef DEBUG_KMEM kmem_alloc_used_set(0); - vmem_alloc_used_set(0); - spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); - spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); #endif - init_rwsem(&spl_kmem_cache_sem); - INIT_LIST_HEAD(&spl_kmem_cache_list); - spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", - 1, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); - - spl_register_shrinker(&spl_kmem_cache_shrinker); - return (rc); } void spl_kmem_fini(void) { - spl_unregister_shrinker(&spl_kmem_cache_shrinker); - taskq_destroy(spl_kmem_cache_taskq); - #ifdef DEBUG_KMEM /* Display all unreclaimed memory addresses, including the * allocation size and the first few bytes of what's located @@ -2233,11 +450,6 @@ spl_kmem_fini(void) printk(KERN_WARNING "kmem leaked %ld/%llu bytes\n", kmem_alloc_used_read(), kmem_alloc_max); - if (vmem_alloc_used_read() != 0) - printk(KERN_WARNING "vmem leaked %ld/%llu bytes\n", - vmem_alloc_used_read(), vmem_alloc_max); - spl_kmem_fini_tracking(&kmem_list, &kmem_lock); - spl_kmem_fini_tracking(&vmem_list, &vmem_lock); #endif /* DEBUG_KMEM */ } diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index cb27ed3d3..e8917a3ea 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -26,6 +26,7 @@ #include #include +#include #ifndef HAVE_PDE_DATA #define PDE_DATA(x) (PDE(x)->data) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 137af7188..e5712aee0 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -26,9 +26,14 @@ #include #include +#include +#include +#include +#include #include #include #include +#include #include #if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index c9d532f4e..f4f81048c 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -61,6 +61,7 @@ #include #include #include +#include typedef struct tsd_hash_bin { spinlock_t hb_lock; diff --git a/module/spl/spl-vmem.c b/module/spl/spl-vmem.c new file mode 100644 index 000000000..4c140eb8e --- /dev/null +++ b/module/spl/spl-vmem.c @@ -0,0 +1,355 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . + ***************************************************************************** + * Solaris Porting Layer (SPL) Kmem Implementation. +\*****************************************************************************/ + +#include +#include +#include + +vmem_t *heap_arena = NULL; +EXPORT_SYMBOL(heap_arena); + +vmem_t *zio_alloc_arena = NULL; +EXPORT_SYMBOL(zio_alloc_arena); + +vmem_t *zio_arena = NULL; +EXPORT_SYMBOL(zio_arena); + +size_t +vmem_size(vmem_t *vmp, int typemask) +{ + ASSERT3P(vmp, ==, NULL); + ASSERT3S(typemask & VMEM_ALLOC, ==, VMEM_ALLOC); + ASSERT3S(typemask & VMEM_FREE, ==, VMEM_FREE); + + return (VMALLOC_TOTAL); +} +EXPORT_SYMBOL(vmem_size); + +/* + * Memory allocation interfaces and debugging for basic kmem_* + * and vmem_* style memory allocation. When DEBUG_KMEM is enabled + * the SPL will keep track of the total memory allocated, and + * report any memory leaked when the module is unloaded. + */ +#ifdef DEBUG_KMEM + +/* Shim layer memory accounting */ +# ifdef HAVE_ATOMIC64_T +atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); +unsigned long long vmem_alloc_max = 0; +# else /* HAVE_ATOMIC64_T */ +atomic_t vmem_alloc_used = ATOMIC_INIT(0); +unsigned long long vmem_alloc_max = 0; +# endif /* HAVE_ATOMIC64_T */ + +EXPORT_SYMBOL(vmem_alloc_used); +EXPORT_SYMBOL(vmem_alloc_max); + +/* When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked + * but also the location of every alloc and free. When the SPL module is + * unloaded a list of all leaked addresses and where they were allocated + * will be dumped to the console. Enabling this feature has a significant + * impact on performance but it makes finding memory leaks straight forward. + * + * Not surprisingly with debugging enabled the xmem_locks are very highly + * contended particularly on xfree(). If we want to run with this detailed + * debugging enabled for anything other than debugging we need to minimize + * the contention by moving to a lock per xmem_table entry model. + */ +# ifdef DEBUG_KMEM_TRACKING + +# define VMEM_HASH_BITS 10 +# define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) + +typedef struct kmem_debug { + struct hlist_node kd_hlist; /* Hash node linkage */ + struct list_head kd_list; /* List of all allocations */ + void *kd_addr; /* Allocation pointer */ + size_t kd_size; /* Allocation size */ + const char *kd_func; /* Allocation function */ + int kd_line; /* Allocation line */ +} kmem_debug_t; + +spinlock_t vmem_lock; +struct hlist_head vmem_table[VMEM_TABLE_SIZE]; +struct list_head vmem_list; + +EXPORT_SYMBOL(vmem_lock); +EXPORT_SYMBOL(vmem_table); +EXPORT_SYMBOL(vmem_list); + +void * +vmem_alloc_track(size_t size, int flags, const char *func, int line) +{ + void *ptr = NULL; + kmem_debug_t *dptr; + unsigned long irq_flags; + + ASSERT(flags & KM_SLEEP); + + /* Function may be called with KM_NOSLEEP so failure is possible */ + dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), + flags & ~__GFP_ZERO); + if (unlikely(dptr == NULL)) { + printk(KERN_WARNING "debug vmem_alloc(%ld, 0x%x) " + "at %s:%d failed (%lld/%llu)\n", + sizeof(kmem_debug_t), flags, func, line, + vmem_alloc_used_read(), vmem_alloc_max); + } else { + /* + * We use __strdup() below because the string pointed to by + * __FUNCTION__ might not be available by the time we want + * to print it, since the module might have been unloaded. + * This can never fail because we have already asserted + * that flags is KM_SLEEP. + */ + dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); + if (unlikely(dptr->kd_func == NULL)) { + kfree(dptr); + printk(KERN_WARNING "debug __strdup() at %s:%d " + "failed (%lld/%llu)\n", func, line, + vmem_alloc_used_read(), vmem_alloc_max); + goto out; + } + + /* Use the correct allocator */ + if (flags & __GFP_ZERO) { + ptr = vzalloc_nofail(size, flags & ~__GFP_ZERO); + } else { + ptr = vmalloc_nofail(size, flags); + } + + if (unlikely(ptr == NULL)) { + kfree(dptr->kd_func); + kfree(dptr); + printk(KERN_WARNING "vmem_alloc (%llu, 0x%x) " + "at %s:%d failed (%lld/%llu)\n", + (unsigned long long) size, flags, func, line, + vmem_alloc_used_read(), vmem_alloc_max); + goto out; + } + + vmem_alloc_used_add(size); + if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) + vmem_alloc_max = vmem_alloc_used_read(); + + INIT_HLIST_NODE(&dptr->kd_hlist); + INIT_LIST_HEAD(&dptr->kd_list); + + dptr->kd_addr = ptr; + dptr->kd_size = size; + dptr->kd_line = line; + + spin_lock_irqsave(&vmem_lock, irq_flags); + hlist_add_head(&dptr->kd_hlist, + &vmem_table[hash_ptr(ptr, VMEM_HASH_BITS)]); + list_add_tail(&dptr->kd_list, &vmem_list); + spin_unlock_irqrestore(&vmem_lock, irq_flags); + } +out: + return (ptr); +} +EXPORT_SYMBOL(vmem_alloc_track); + +void +vmem_free_track(const void *ptr, size_t size) +{ + kmem_debug_t *dptr; + + ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, + (unsigned long long) size); + + /* Must exist in hash due to vmem_alloc() */ + dptr = kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr); + ASSERT(dptr); + + /* Size must match */ + ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " + "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, + (unsigned long long) size, dptr->kd_func, dptr->kd_line); + + vmem_alloc_used_sub(size); + kfree(dptr->kd_func); + + memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); + kfree(dptr); + + memset((void *)ptr, 0x5a, size); + vfree(ptr); +} +EXPORT_SYMBOL(vmem_free_track); + +# else /* DEBUG_KMEM_TRACKING */ + +void * +vmem_alloc_debug(size_t size, int flags, const char *func, int line) +{ + void *ptr; + + ASSERT(flags & KM_SLEEP); + + /* Use the correct allocator */ + if (flags & __GFP_ZERO) { + ptr = vzalloc_nofail(size, flags & (~__GFP_ZERO)); + } else { + ptr = vmalloc_nofail(size, flags); + } + + if (unlikely(ptr == NULL)) { + printk(KERN_WARNING + "vmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", + (unsigned long long)size, flags, func, line, + (unsigned long long)vmem_alloc_used_read(), vmem_alloc_max); + } else { + vmem_alloc_used_add(size); + if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) + vmem_alloc_max = vmem_alloc_used_read(); + } + + return (ptr); +} +EXPORT_SYMBOL(vmem_alloc_debug); + +void +vmem_free_debug(const void *ptr, size_t size) +{ + ASSERT(ptr || size > 0); + vmem_alloc_used_sub(size); + vfree(ptr); +} +EXPORT_SYMBOL(vmem_free_debug); + +# endif /* DEBUG_KMEM_TRACKING */ +#endif /* DEBUG_KMEM */ + +#if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) +static char * +spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) +{ + int size = ((len - 1) < kd->kd_size) ? (len - 1) : kd->kd_size; + int i, flag = 1; + + ASSERT(str != NULL && len >= 17); + memset(str, 0, len); + + /* Check for a fully printable string, and while we are at + * it place the printable characters in the passed buffer. */ + for (i = 0; i < size; i++) { + str[i] = ((char *)(kd->kd_addr))[i]; + if (isprint(str[i])) { + continue; + } else { + /* Minimum number of printable characters found + * to make it worthwhile to print this as ascii. */ + if (i > min) + break; + + flag = 0; + break; + } + } + + if (!flag) { + sprintf(str, "%02x%02x%02x%02x%02x%02x%02x%02x", + *((uint8_t *)kd->kd_addr), + *((uint8_t *)kd->kd_addr + 2), + *((uint8_t *)kd->kd_addr + 4), + *((uint8_t *)kd->kd_addr + 6), + *((uint8_t *)kd->kd_addr + 8), + *((uint8_t *)kd->kd_addr + 10), + *((uint8_t *)kd->kd_addr + 12), + *((uint8_t *)kd->kd_addr + 14)); + } + + return str; +} + +static int +spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) +{ + int i; + + spin_lock_init(lock); + INIT_LIST_HEAD(list); + + for (i = 0; i < size; i++) + INIT_HLIST_HEAD(&kmem_table[i]); + + return (0); +} + +static void +spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) +{ + unsigned long flags; + kmem_debug_t *kd; + char str[17]; + + spin_lock_irqsave(lock, flags); + if (!list_empty(list)) + printk(KERN_WARNING "%-16s %-5s %-16s %s:%s\n", "address", + "size", "data", "func", "line"); + + list_for_each_entry(kd, list, kd_list) + printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr, + (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); + + spin_unlock_irqrestore(lock, flags); +} +#else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ +#define spl_kmem_init_tracking(list, lock, size) +#define spl_kmem_fini_tracking(list, lock) +#endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ + +int +spl_vmem_init(void) +{ + int rc = 0; + +#ifdef DEBUG_KMEM + vmem_alloc_used_set(0); + spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); +#endif + + return (rc); +} + +void +spl_vmem_fini(void) +{ +#ifdef DEBUG_KMEM + /* Display all unreclaimed memory addresses, including the + * allocation size and the first few bytes of what's located + * at that address to aid in debugging. Performance is not + * a serious concern here since it is module unload time. */ + if (vmem_alloc_used_read() != 0) + printk(KERN_WARNING "vmem leaked %ld/%llu bytes\n", + vmem_alloc_used_read(), vmem_alloc_max); + + spl_kmem_fini_tracking(&vmem_list, &vmem_lock); +#endif /* DEBUG_KMEM */ +} diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index e5db0ec2c..97eb4ef73 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 2967b03ce..77c2a1dde 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -54,6 +54,7 @@ #include +#include #include #include diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index 3ee2ffc9e..ed633acda 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -24,8 +24,9 @@ * Solaris Porting LAyer Tests (SPLAT) Condition Variable Tests. \*****************************************************************************/ -#include #include +#include +#include #include "splat-internal.h" #define SPLAT_CONDVAR_NAME "condvar" diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index eff8a9e74..832132696 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -27,6 +27,7 @@ #include "splat-ctl.h" #include +#include #define SPLAT_SUBSYSTEM_INIT(type) \ ({ splat_subsystem_t *_sub_; \ diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index cf47ce65a..7edc85990 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -25,7 +25,10 @@ \*****************************************************************************/ #include +#include +#include #include +#include #include "splat-internal.h" #define SPLAT_KMEM_NAME "kmem" diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index d8406f159..8229fed39 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -25,8 +25,10 @@ \*****************************************************************************/ #include +#include #include #include +#include #include #include "splat-internal.h" diff --git a/module/splat/splat-zlib.c b/module/splat/splat-zlib.c index c614c5e6c..eaa48369d 100644 --- a/module/splat/splat-zlib.c +++ b/module/splat/splat-zlib.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "splat-internal.h" #define SPLAT_ZLIB_NAME "zlib" From b34b95635a99223b6bff5437fb389e9340dc7dcd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 8 Dec 2014 13:35:51 -0500 Subject: [PATCH 0856/1062] Fix kmem cstyle issues Address all cstyle issues in the kmem, vmem, and kmem_cache source and headers. This will done to make it easier to review subsequent changes which will rework the kmem/vmem implementation. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 98 ++++++++++----------- include/sys/kmem_cache.h | 117 ++++++++++++------------- include/sys/vmem.h | 68 +++++++-------- module/spl/spl-kmem-cache.c | 168 ++++++++++++++++++++---------------- module/spl/spl-kmem.c | 104 +++++++++++----------- module/spl/spl-vmem.c | 89 ++++++++++--------- 6 files changed, 333 insertions(+), 311 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index ee25e4c8c..a9d94c909 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_KMEM_H #define _SPL_KMEM_H @@ -36,18 +36,18 @@ extern void strfree(char *str); /* * Memory allocation interfaces */ -#define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */ -#define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */ -#define KM_PUSHPAGE (GFP_NOIO | __GFP_HIGH) /* Use reserved memory */ -#define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */ -#define KM_FLAGS __GFP_BITS_MASK -#define KM_VMFLAGS GFP_LEVEL_MASK +#define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */ +#define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */ +#define KM_PUSHPAGE (GFP_NOIO | __GFP_HIGH) /* Use reserved memory */ +#define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */ +#define KM_FLAGS __GFP_BITS_MASK +#define KM_VMFLAGS GFP_LEVEL_MASK /* * Used internally, the kernel does not need to support this flag */ #ifndef __GFP_ZERO -# define __GFP_ZERO 0x8000 +#define __GFP_ZERO 0x8000 #endif /* @@ -66,7 +66,7 @@ kmalloc_nofail(size_t size, gfp_t flags) ptr = kmalloc(size, flags); } while (ptr == NULL && (flags & __GFP_WAIT)); - return ptr; + return (ptr); } static inline void * @@ -78,7 +78,7 @@ kzalloc_nofail(size_t size, gfp_t flags) ptr = kzalloc(size, flags); } while (ptr == NULL && (flags & __GFP_WAIT)); - return ptr; + return (ptr); } static inline void * @@ -90,7 +90,7 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) ptr = kmalloc_node(size, flags, node); } while (ptr == NULL && (flags & __GFP_WAIT)); - return ptr; + return (ptr); } #ifdef DEBUG_KMEM @@ -98,29 +98,23 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node) /* * Memory accounting functions to be used only when DEBUG_KMEM is set. */ -# ifdef HAVE_ATOMIC64_T - -# define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used) -# define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used) -# define kmem_alloc_used_read() atomic64_read(&kmem_alloc_used) -# define kmem_alloc_used_set(size) atomic64_set(&kmem_alloc_used, size) - +#ifdef HAVE_ATOMIC64_T +#define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used) +#define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used) +#define kmem_alloc_used_read() atomic64_read(&kmem_alloc_used) +#define kmem_alloc_used_set(size) atomic64_set(&kmem_alloc_used, size) extern atomic64_t kmem_alloc_used; extern unsigned long long kmem_alloc_max; - -# else /* HAVE_ATOMIC64_T */ - -# define kmem_alloc_used_add(size) atomic_add(size, &kmem_alloc_used) -# define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used) -# define kmem_alloc_used_read() atomic_read(&kmem_alloc_used) -# define kmem_alloc_used_set(size) atomic_set(&kmem_alloc_used, size) - +#else /* HAVE_ATOMIC64_T */ +#define kmem_alloc_used_add(size) atomic_add(size, &kmem_alloc_used) +#define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used) +#define kmem_alloc_used_read() atomic_read(&kmem_alloc_used) +#define kmem_alloc_used_set(size) atomic_set(&kmem_alloc_used, size) extern atomic_t kmem_alloc_used; extern unsigned long long kmem_alloc_max; +#endif /* HAVE_ATOMIC64_T */ -# endif /* HAVE_ATOMIC64_T */ - -# ifdef DEBUG_KMEM_TRACKING +#ifdef DEBUG_KMEM_TRACKING /* * DEBUG_KMEM && DEBUG_KMEM_TRACKING * @@ -132,18 +126,18 @@ extern unsigned long long kmem_alloc_max; * be enabled for debugging. This feature may be enabled by passing * --enable-debug-kmem-tracking to configure. */ -# define kmem_alloc(sz, fl) kmem_alloc_track((sz), (fl), \ - __FUNCTION__, __LINE__, 0, 0) -# define kmem_zalloc(sz, fl) kmem_alloc_track((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__, 0, 0) -# define kmem_alloc_node(sz, fl, nd) kmem_alloc_track((sz), (fl), \ - __FUNCTION__, __LINE__, 1, nd) -# define kmem_free(ptr, sz) kmem_free_track((ptr), (sz)) +#define kmem_alloc(sz, fl) kmem_alloc_track((sz), (fl), \ + __FUNCTION__, __LINE__, 0, 0) +#define kmem_zalloc(sz, fl) kmem_alloc_track((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__, 0, 0) +#define kmem_alloc_node(sz, fl, nd) kmem_alloc_track((sz), (fl), \ + __FUNCTION__, __LINE__, 1, nd) +#define kmem_free(ptr, sz) kmem_free_track((ptr), (sz)) extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); extern void kmem_free_track(const void *, size_t); -# else /* DEBUG_KMEM_TRACKING */ +#else /* DEBUG_KMEM_TRACKING */ /* * DEBUG_KMEM && !DEBUG_KMEM_TRACKING * @@ -153,18 +147,18 @@ extern void kmem_free_track(const void *, size_t); * will be reported on the console. To disable this basic accounting * pass the --disable-debug-kmem option to configure. */ -# define kmem_alloc(sz, fl) kmem_alloc_debug((sz), (fl), \ - __FUNCTION__, __LINE__, 0, 0) -# define kmem_zalloc(sz, fl) kmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__, 0, 0) -# define kmem_alloc_node(sz, fl, nd) kmem_alloc_debug((sz), (fl), \ - __FUNCTION__, __LINE__, 1, nd) -# define kmem_free(ptr, sz) kmem_free_debug((ptr), (sz)) +#define kmem_alloc(sz, fl) kmem_alloc_debug((sz), (fl), \ + __FUNCTION__, __LINE__, 0, 0) +#define kmem_zalloc(sz, fl) kmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__, 0, 0) +#define kmem_alloc_node(sz, fl, nd) kmem_alloc_debug((sz), (fl), \ + __FUNCTION__, __LINE__, 1, nd) +#define kmem_free(ptr, sz) kmem_free_debug((ptr), (sz)) extern void *kmem_alloc_debug(size_t, int, const char *, int, int, int); extern void kmem_free_debug(const void *, size_t); -# endif /* DEBUG_KMEM_TRACKING */ +#endif /* DEBUG_KMEM_TRACKING */ #else /* DEBUG_KMEM */ /* * !DEBUG_KMEM && !DEBUG_KMEM_TRACKING @@ -173,17 +167,17 @@ extern void kmem_free_debug(const void *, size_t); * minimal memory accounting. To enable basic accounting pass the * --enable-debug-kmem option to configure. */ -# define kmem_alloc(sz, fl) kmalloc_nofail((sz), (fl)) -# define kmem_zalloc(sz, fl) kzalloc_nofail((sz), (fl)) -# define kmem_alloc_node(sz, fl, nd) kmalloc_node_nofail((sz), (fl), (nd)) -# define kmem_free(ptr, sz) ((void)(sz), kfree(ptr)) +#define kmem_alloc(sz, fl) kmalloc_nofail((sz), (fl)) +#define kmem_zalloc(sz, fl) kzalloc_nofail((sz), (fl)) +#define kmem_alloc_node(sz, fl, nd) kmalloc_node_nofail((sz), (fl), (nd)) +#define kmem_free(ptr, sz) ((void)(sz), kfree(ptr)) #endif /* DEBUG_KMEM */ int spl_kmem_init(void); void spl_kmem_fini(void); -#define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ - ((ptr) < (void *)VMALLOC_END)) +#define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ + ((ptr) < (void *)VMALLOC_END)) #endif /* _SPL_KMEM_H */ diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h index 654a2ea43..a5bc0322b 100644 --- a/include/sys/kmem_cache.h +++ b/include/sys/kmem_cache.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_KMEM_CACHE_H #define _SPL_KMEM_CACHE_H @@ -33,7 +33,7 @@ * allocated from the physical or virtal memory address space. The virtual * slabs allow for good behavior when allocation large objects of identical * size. This slab implementation also supports both constructors and - * destructions which the Linux slab does not. + * destructors which the Linux slab does not. */ enum { KMC_BIT_NOTOUCH = 0, /* Don't update ages */ @@ -46,8 +46,8 @@ enum { KMC_BIT_SLAB = 7, /* Use Linux slab cache */ KMC_BIT_OFFSLAB = 8, /* Objects not on slab */ KMC_BIT_NOEMERGENCY = 9, /* Disable emergency objects */ - KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */ - KMC_BIT_GROWING = 15, /* Growing in progress */ + KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */ + KMC_BIT_GROWING = 15, /* Growing in progress */ KMC_BIT_REAPING = 16, /* Reaping in progress */ KMC_BIT_DESTROY = 17, /* Destroy in progress */ KMC_BIT_TOTAL = 18, /* Proc handler helper bit */ @@ -64,29 +64,29 @@ typedef enum kmem_cbrc { KMEM_CBRC_DONT_KNOW = 4, /* Object unknown */ } kmem_cbrc_t; -#define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH) -#define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) -#define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE) -#define KMC_NOHASH (1 << KMC_BIT_NOHASH) -#define KMC_QCACHE (1 << KMC_BIT_QCACHE) -#define KMC_KMEM (1 << KMC_BIT_KMEM) -#define KMC_VMEM (1 << KMC_BIT_VMEM) -#define KMC_SLAB (1 << KMC_BIT_SLAB) -#define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) -#define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY) -#define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED) -#define KMC_GROWING (1 << KMC_BIT_GROWING) -#define KMC_REAPING (1 << KMC_BIT_REAPING) -#define KMC_DESTROY (1 << KMC_BIT_DESTROY) -#define KMC_TOTAL (1 << KMC_BIT_TOTAL) -#define KMC_ALLOC (1 << KMC_BIT_ALLOC) -#define KMC_MAX (1 << KMC_BIT_MAX) +#define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH) +#define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) +#define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE) +#define KMC_NOHASH (1 << KMC_BIT_NOHASH) +#define KMC_QCACHE (1 << KMC_BIT_QCACHE) +#define KMC_KMEM (1 << KMC_BIT_KMEM) +#define KMC_VMEM (1 << KMC_BIT_VMEM) +#define KMC_SLAB (1 << KMC_BIT_SLAB) +#define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB) +#define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY) +#define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED) +#define KMC_GROWING (1 << KMC_BIT_GROWING) +#define KMC_REAPING (1 << KMC_BIT_REAPING) +#define KMC_DESTROY (1 << KMC_BIT_DESTROY) +#define KMC_TOTAL (1 << KMC_BIT_TOTAL) +#define KMC_ALLOC (1 << KMC_BIT_ALLOC) +#define KMC_MAX (1 << KMC_BIT_MAX) -#define KMC_REAP_CHUNK INT_MAX -#define KMC_DEFAULT_SEEKS 1 +#define KMC_REAP_CHUNK INT_MAX +#define KMC_DEFAULT_SEEKS 1 -#define KMC_EXPIRE_AGE 0x1 /* Due to age */ -#define KMC_EXPIRE_MEM 0x2 /* Due to low memory */ +#define KMC_EXPIRE_AGE 0x1 /* Due to age */ +#define KMC_EXPIRE_MEM 0x2 /* Due to low memory */ #define KMC_RECLAIM_ONCE 0x1 /* Force a single shrinker pass */ @@ -94,19 +94,19 @@ extern unsigned int spl_kmem_cache_expire; extern struct list_head spl_kmem_cache_list; extern struct rw_semaphore spl_kmem_cache_sem; -#define SKM_MAGIC 0x2e2e2e2e -#define SKO_MAGIC 0x20202020 -#define SKS_MAGIC 0x22222222 -#define SKC_MAGIC 0x2c2c2c2c +#define SKM_MAGIC 0x2e2e2e2e +#define SKO_MAGIC 0x20202020 +#define SKS_MAGIC 0x22222222 +#define SKC_MAGIC 0x2c2c2c2c -#define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ -#define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 1 /* Minimum objects per slab */ -#define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ +#define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ +#define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 1 /* Minimum objects per slab */ +#define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ -#define POINTER_IS_VALID(p) 0 /* Unimplemented */ -#define POINTER_INVALIDATE(pp) /* Unimplemented */ +#define POINTER_IS_VALID(p) 0 /* Unimplemented */ +#define POINTER_INVALIDATE(pp) /* Unimplemented */ typedef int (*spl_kmem_ctor_t)(void *, void *, int); typedef void (*spl_kmem_dtor_t)(void *, void *); @@ -124,14 +124,14 @@ typedef struct spl_kmem_magazine { } spl_kmem_magazine_t; typedef struct spl_kmem_obj { - uint32_t sko_magic; /* Sanity magic */ + uint32_t sko_magic; /* Sanity magic */ void *sko_addr; /* Buffer address */ struct spl_kmem_slab *sko_slab; /* Owned by slab */ struct list_head sko_list; /* Free object list linkage */ } spl_kmem_obj_t; typedef struct spl_kmem_slab { - uint32_t sks_magic; /* Sanity magic */ + uint32_t sks_magic; /* Sanity magic */ uint32_t sks_objs; /* Objects per slab */ struct spl_kmem_cache *sks_cache; /* Owned by cache */ struct list_head sks_list; /* Slab list linkage */ @@ -174,14 +174,14 @@ typedef struct spl_kmem_cache { atomic_t skc_ref; /* Ref count callers */ taskqid_t skc_taskqid; /* Slab reclaim task */ struct list_head skc_list; /* List of caches linkage */ - struct list_head skc_complete_list;/* Completely alloc'ed */ - struct list_head skc_partial_list; /* Partially alloc'ed */ + struct list_head skc_complete_list; /* Completely alloc'ed */ + struct list_head skc_partial_list; /* Partially alloc'ed */ struct rb_root skc_emergency_tree; /* Min sized objects */ spinlock_t skc_lock; /* Cache lock */ wait_queue_head_t skc_waitq; /* Allocation waiters */ uint64_t skc_slab_fail; /* Slab alloc failures */ - uint64_t skc_slab_create;/* Slab creates */ - uint64_t skc_slab_destroy;/* Slab destroys */ + uint64_t skc_slab_create; /* Slab creates */ + uint64_t skc_slab_destroy; /* Slab destroys */ uint64_t skc_slab_total; /* Slab total current */ uint64_t skc_slab_alloc; /* Slab alloc current */ uint64_t skc_slab_max; /* Slab max historic */ @@ -192,30 +192,31 @@ typedef struct spl_kmem_cache { uint64_t skc_obj_emergency; /* Obj emergency current */ uint64_t skc_obj_emergency_max; /* Obj emergency max */ } spl_kmem_cache_t; -#define kmem_cache_t spl_kmem_cache_t +#define kmem_cache_t spl_kmem_cache_t extern spl_kmem_cache_t *spl_kmem_cache_create(char *name, size_t size, - size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, - spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); + size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, + spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); extern void spl_kmem_cache_set_move(spl_kmem_cache_t *, - kmem_cbrc_t (*)(void *, void *, size_t, void *)); + kmem_cbrc_t (*)(void *, void *, size_t, void *)); extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count); extern void spl_kmem_reap(void); -#define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \ - spl_kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) -#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move) -#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) -#define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) -#define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) -#define kmem_cache_reap_now(skc) \ - spl_kmem_cache_reap_now(skc, skc->skc_reap) -#define kmem_reap() spl_kmem_reap() -#define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ - ((ptr) < (void *)VMALLOC_END)) +#define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \ + spl_kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) +#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move) +#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) +#define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) +#define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) +#define kmem_cache_reap_now(skc) \ + spl_kmem_cache_reap_now(skc, skc->skc_reap) +#define kmem_reap() spl_kmem_reap() +#define kmem_virt(ptr) \ + (((ptr) >= (void *)VMALLOC_START) && \ + ((ptr) < (void *)VMALLOC_END)) /* * Allow custom slab allocation flags to be set for KMC_SLAB based caches. diff --git a/include/sys/vmem.h b/include/sys/vmem.h index e86e89bb4..f59ac5e8b 100644 --- a/include/sys/vmem.h +++ b/include/sys/vmem.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_VMEM_H #define _SPL_VMEM_H @@ -40,11 +40,11 @@ extern size_t vmem_size(vmem_t *vmp, int typemask); /* * Memory allocation interfaces */ -#define VMEM_ALLOC 0x01 -#define VMEM_FREE 0x02 +#define VMEM_ALLOC 0x01 +#define VMEM_FREE 0x02 #ifndef VMALLOC_TOTAL -#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) +#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) #endif static inline void * @@ -78,7 +78,7 @@ vmalloc_nofail(size_t size, gfp_t flags) } } - return ptr; + return (ptr); } static inline void * @@ -90,7 +90,7 @@ vzalloc_nofail(size_t size, gfp_t flags) if (ptr) memset(ptr, 0, (size)); - return ptr; + return (ptr); } #ifdef DEBUG_KMEM @@ -98,29 +98,29 @@ vzalloc_nofail(size_t size, gfp_t flags) /* * Memory accounting functions to be used only when DEBUG_KMEM is set. */ -# ifdef HAVE_ATOMIC64_T +#ifdef HAVE_ATOMIC64_T -# define vmem_alloc_used_add(size) atomic64_add(size, &vmem_alloc_used) -# define vmem_alloc_used_sub(size) atomic64_sub(size, &vmem_alloc_used) -# define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used) -# define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size) +#define vmem_alloc_used_add(size) atomic64_add(size, &vmem_alloc_used) +#define vmem_alloc_used_sub(size) atomic64_sub(size, &vmem_alloc_used) +#define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used) +#define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size) extern atomic64_t vmem_alloc_used; extern unsigned long long vmem_alloc_max; -# else /* HAVE_ATOMIC64_T */ +#else /* HAVE_ATOMIC64_T */ -# define vmem_alloc_used_add(size) atomic_add(size, &vmem_alloc_used) -# define vmem_alloc_used_sub(size) atomic_sub(size, &vmem_alloc_used) -# define vmem_alloc_used_read() atomic_read(&vmem_alloc_used) -# define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size) +#define vmem_alloc_used_add(size) atomic_add(size, &vmem_alloc_used) +#define vmem_alloc_used_sub(size) atomic_sub(size, &vmem_alloc_used) +#define vmem_alloc_used_read() atomic_read(&vmem_alloc_used) +#define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size) extern atomic_t vmem_alloc_used; extern unsigned long long vmem_alloc_max; -# endif /* HAVE_ATOMIC64_T */ +#endif /* HAVE_ATOMIC64_T */ -# ifdef DEBUG_KMEM_TRACKING +#ifdef DEBUG_KMEM_TRACKING /* * DEBUG_KMEM && DEBUG_KMEM_TRACKING * @@ -132,18 +132,18 @@ extern unsigned long long vmem_alloc_max; * be enabled for debugging. This feature may be enabled by passing * --enable-debug-kmem-tracking to configure. */ -# define vmem_alloc(sz, fl) vmem_alloc_track((sz), (fl), \ - __FUNCTION__, __LINE__) -# define vmem_zalloc(sz, fl) vmem_alloc_track((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__) -# define vmem_free(ptr, sz) vmem_free_track((ptr), (sz)) +#define vmem_alloc(sz, fl) vmem_alloc_track((sz), (fl), \ + __FUNCTION__, __LINE__) +#define vmem_zalloc(sz, fl) vmem_alloc_track((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__) +#define vmem_free(ptr, sz) vmem_free_track((ptr), (sz)) extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); extern void kmem_free_track(const void *, size_t); extern void *vmem_alloc_track(size_t, int, const char *, int); extern void vmem_free_track(const void *, size_t); -# else /* DEBUG_KMEM_TRACKING */ +#else /* DEBUG_KMEM_TRACKING */ /* * DEBUG_KMEM && !DEBUG_KMEM_TRACKING * @@ -153,16 +153,16 @@ extern void vmem_free_track(const void *, size_t); * will be reported on the console. To disable this basic accounting * pass the --disable-debug-kmem option to configure. */ -# define vmem_alloc(sz, fl) vmem_alloc_debug((sz), (fl), \ - __FUNCTION__, __LINE__) -# define vmem_zalloc(sz, fl) vmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__) -# define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz)) +#define vmem_alloc(sz, fl) vmem_alloc_debug((sz), (fl), \ + __FUNCTION__, __LINE__) +#define vmem_zalloc(sz, fl) vmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ + __FUNCTION__, __LINE__) +#define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz)) extern void *vmem_alloc_debug(size_t, int, const char *, int); extern void vmem_free_debug(const void *, size_t); -# endif /* DEBUG_KMEM_TRACKING */ +#endif /* DEBUG_KMEM_TRACKING */ #else /* DEBUG_KMEM */ /* * !DEBUG_KMEM && !DEBUG_KMEM_TRACKING @@ -171,9 +171,9 @@ extern void vmem_free_debug(const void *, size_t); * minimal memory accounting. To enable basic accounting pass the * --enable-debug-kmem option to configure. */ -# define vmem_alloc(sz, fl) vmalloc_nofail((sz), (fl)) -# define vmem_zalloc(sz, fl) vzalloc_nofail((sz), (fl)) -# define vmem_free(ptr, sz) ((void)(sz), vfree(ptr)) +#define vmem_alloc(sz, fl) vmalloc_nofail((sz), (fl)) +#define vmem_zalloc(sz, fl) vzalloc_nofail((sz), (fl)) +#define vmem_free(ptr, sz) ((void)(sz), vfree(ptr)) #endif /* DEBUG_KMEM */ diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index d24c4c205..3aa65a9bf 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,9 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting Layer (SPL) Kmem Implementation. -\*****************************************************************************/ + */ #include #include @@ -76,7 +74,7 @@ MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab, "Number of objects per slab"); unsigned int spl_kmem_cache_obj_per_slab_min = SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN; module_param(spl_kmem_cache_obj_per_slab_min, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab_min, - "Minimal number of objects per slab"); + "Minimal number of objects per slab"); unsigned int spl_kmem_cache_max_size = 32; module_param(spl_kmem_cache_max_size, uint, 0644); @@ -95,12 +93,12 @@ unsigned int spl_kmem_cache_slab_limit = 0; #endif module_param(spl_kmem_cache_slab_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_slab_limit, - "Objects less than N bytes use the Linux slab"); + "Objects less than N bytes use the Linux slab"); unsigned int spl_kmem_cache_kmem_limit = (PAGE_SIZE / 4); module_param(spl_kmem_cache_kmem_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, - "Objects less than N bytes use the kmalloc"); + "Objects less than N bytes use the kmalloc"); /* * Slab allocation interfaces @@ -114,7 +112,7 @@ MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, * breaker for the SPL which contains particularly expensive * initializers for mutex's, condition variables, etc. We also * require a minimal level of cleanup for these data types unlike - * many Linux data type which do need to be explicitly destroyed. + * many Linux data types which do need to be explicitly destroyed. * * 2) Virtual address space backed slab. Callers of the Solaris slab * expect it to work well for both small are very large allocations. @@ -135,7 +133,7 @@ MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, * * XXX: Improve the partial slab list by carefully maintaining a * strict ordering of fullest to emptiest slabs based on - * the slab reference count. This guarantees the when freeing + * the slab reference count. This guarantees that when freeing * slabs back to the system we need only linearly traverse the * last N slabs in the list to discover all the freeable slabs. * @@ -149,7 +147,7 @@ MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, struct list_head spl_kmem_cache_list; /* List of caches */ struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */ -taskq_t *spl_kmem_cache_taskq; /* Task queue for ageing / reclaim */ +taskq_t *spl_kmem_cache_taskq; /* Task queue for ageing / reclaim */ static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj); @@ -173,7 +171,7 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); - return ptr; + return (ptr); } static void @@ -204,8 +202,8 @@ kv_free(spl_kmem_cache_t *skc, void *ptr, int size) static inline uint32_t spl_sks_size(spl_kmem_cache_t *skc) { - return P2ROUNDUP_TYPED(sizeof(spl_kmem_slab_t), - skc->skc_obj_align, uint32_t); + return (P2ROUNDUP_TYPED(sizeof (spl_kmem_slab_t), + skc->skc_obj_align, uint32_t)); } /* @@ -216,8 +214,8 @@ spl_obj_size(spl_kmem_cache_t *skc) { uint32_t align = skc->skc_obj_align; - return P2ROUNDUP_TYPED(skc->skc_obj_size, align, uint32_t) + - P2ROUNDUP_TYPED(sizeof(spl_kmem_obj_t), align, uint32_t); + return (P2ROUNDUP_TYPED(skc->skc_obj_size, align, uint32_t) + + P2ROUNDUP_TYPED(sizeof (spl_kmem_obj_t), align, uint32_t)); } /* @@ -226,8 +224,8 @@ spl_obj_size(spl_kmem_cache_t *skc) static inline spl_kmem_obj_t * spl_sko_from_obj(spl_kmem_cache_t *skc, void *obj) { - return obj + P2ROUNDUP_TYPED(skc->skc_obj_size, - skc->skc_obj_align, uint32_t); + return (obj + P2ROUNDUP_TYPED(skc->skc_obj_size, + skc->skc_obj_align, uint32_t)); } /* @@ -237,7 +235,7 @@ spl_sko_from_obj(spl_kmem_cache_t *skc, void *obj) static inline uint32_t spl_offslab_size(spl_kmem_cache_t *skc) { - return 1UL << (fls64(spl_obj_size(skc)) + 1); + return (1UL << (fls64(spl_obj_size(skc)) + 1)); } /* @@ -320,8 +318,8 @@ spl_slab_alloc(spl_kmem_cache_t *skc, int flags) out: if (rc) { if (skc->skc_flags & KMC_OFFSLAB) - list_for_each_entry_safe(sko, n, &sks->sks_free_list, - sko_list) + list_for_each_entry_safe(sko, + n, &sks->sks_free_list, sko_list) kv_free(skc, sko->sko_addr, offslab_size); kv_free(skc, base, skc->skc_slab_size); @@ -338,7 +336,7 @@ out: */ static void spl_slab_free(spl_kmem_slab_t *sks, - struct list_head *sks_list, struct list_head *sko_list) + struct list_head *sks_list, struct list_head *sko_list) { spl_kmem_cache_t *skc; @@ -363,7 +361,7 @@ spl_slab_free(spl_kmem_slab_t *sks, } /* - * Traverses all the partial slabs attached to a cache and free those + * Traverse all the partial slabs attached to a cache and free those * which which are currently empty, and have not been touched for * skc_delay seconds to avoid thrashing. The count argument is * passed to optionally cap the number of slabs reclaimed, a count @@ -387,7 +385,8 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) * however when flag is set the delay will not be used. */ spin_lock(&skc->skc_lock); - list_for_each_entry_safe_reverse(sks,m,&skc->skc_partial_list,sks_list){ + list_for_each_entry_safe_reverse(sks, m, + &skc->skc_partial_list, sks_list) { /* * All empty slabs are at the end of skc->skc_partial_list, * therefore once a non-empty slab is found we can stop @@ -397,7 +396,8 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) if ((sks->sks_ref > 0) || (count && i >= count)) break; - if (time_after(jiffies,sks->sks_age+skc->skc_delay*HZ)||flag) { + if (time_after(jiffies, sks->sks_age + skc->skc_delay * HZ) || + flag) { spl_slab_free(sks, &sks_list, &sko_list); i++; } @@ -443,10 +443,10 @@ spl_emergency_search(struct rb_root *root, void *obj) else if (address > (unsigned long)ske->ske_obj) node = node->rb_right; else - return ske; + return (ske); } - return NULL; + return (NULL); } static int @@ -465,13 +465,13 @@ spl_emergency_insert(struct rb_root *root, spl_kmem_emergency_t *ske) else if (address > (unsigned long)ske_tmp->ske_obj) new = &((*new)->rb_right); else - return 0; + return (0); } rb_link_node(&ske->ske_node, parent, new); rb_insert_color(&ske->ske_node, root); - return 1; + return (1); } /* @@ -490,7 +490,7 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) if (!empty) return (-EEXIST); - ske = kmalloc(sizeof(*ske), flags); + ske = kmalloc(sizeof (*ske), flags); if (ske == NULL) return (-ENOMEM); @@ -565,7 +565,7 @@ __spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) skm->skm_avail -= count; memmove(skm->skm_objs, &(skm->skm_objs[count]), - sizeof(void *) * skm->skm_avail); + sizeof (void *) * skm->skm_avail); } static void @@ -666,7 +666,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) if (skc->skc_flags & KMC_OFFSLAB) { *objs = spl_kmem_cache_obj_per_slab; - *size = P2ROUNDUP(sizeof(spl_kmem_slab_t), PAGE_SIZE); + *size = P2ROUNDUP(sizeof (spl_kmem_slab_t), PAGE_SIZE); return (0); } else { sks_size = spl_sks_size(skc); @@ -731,8 +731,8 @@ static spl_kmem_magazine_t * spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) { spl_kmem_magazine_t *skm; - int size = sizeof(spl_kmem_magazine_t) + - sizeof(void *) * skc->skc_mag_size; + int size = sizeof (spl_kmem_magazine_t) + + sizeof (void *) * skc->skc_mag_size; skm = kmem_alloc_node(size, KM_SLEEP, cpu_to_node(cpu)); if (skm) { @@ -754,8 +754,8 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) static void spl_magazine_free(spl_kmem_magazine_t *skm) { - int size = sizeof(spl_kmem_magazine_t) + - sizeof(void *) * skm->skm_size; + int size = sizeof (spl_kmem_magazine_t) + + sizeof (void *) * skm->skm_size; ASSERT(skm->skm_magic == SKM_MAGIC); ASSERT(skm->skm_avail == 0); @@ -802,11 +802,11 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) if (skc->skc_flags & KMC_NOMAGAZINE) return; - for_each_online_cpu(i) { + for_each_online_cpu(i) { skm = skc->skc_mag[i]; spl_cache_flush(skc, skm, skm->skm_avail); spl_magazine_free(skm); - } + } } /* @@ -832,12 +832,10 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) */ spl_kmem_cache_t * spl_kmem_cache_create(char *name, size_t size, size_t align, - spl_kmem_ctor_t ctor, - spl_kmem_dtor_t dtor, - spl_kmem_reclaim_t reclaim, - void *priv, void *vmp, int flags) + spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, spl_kmem_reclaim_t reclaim, + void *priv, void *vmp, int flags) { - spl_kmem_cache_t *skc; + spl_kmem_cache_t *skc; int rc; /* @@ -851,13 +849,13 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, might_sleep(); /* - * Allocate memory for a new cache an initialize it. Unfortunately, + * Allocate memory for a new cache and initialize it. Unfortunately, * this usually ends up being a large allocation of ~32k because * we need to allocate enough memory for the worst case number of * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we * explicitly pass KM_NODEBUG to suppress the kmem warning */ - skc = kmem_zalloc(sizeof(*skc), KM_SLEEP| KM_NODEBUG); + skc = kmem_zalloc(sizeof (*skc), KM_SLEEP| KM_NODEBUG); if (skc == NULL) return (NULL); @@ -865,7 +863,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, skc->skc_name_size = strlen(name) + 1; skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, KM_SLEEP); if (skc->skc_name == NULL) { - kmem_free(skc, sizeof(*skc)); + kmem_free(skc, sizeof (*skc)); return (NULL); } strncpy(skc->skc_name, name, skc->skc_name_size); @@ -923,7 +921,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, * Objects smaller than spl_kmem_cache_slab_limit can * use the Linux slab for better space-efficiency. By * default this functionality is disabled until its - * performance characters are fully understood. + * performance characteristics are fully understood. */ if (spl_kmem_cache_slab_limit && size <= (size_t)spl_kmem_cache_slab_limit) @@ -980,20 +978,20 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, return (skc); out: kmem_free(skc->skc_name, skc->skc_name_size); - kmem_free(skc, sizeof(*skc)); + kmem_free(skc, sizeof (*skc)); return (NULL); } EXPORT_SYMBOL(spl_kmem_cache_create); /* - * Register a move callback to for cache defragmentation. + * Register a move callback for cache defragmentation. * XXX: Unimplemented but harmless to stub out for now. */ void spl_kmem_cache_set_move(spl_kmem_cache_t *skc, kmem_cbrc_t (move)(void *, void *, size_t, void *)) { - ASSERT(move != NULL); + ASSERT(move != NULL); } EXPORT_SYMBOL(spl_kmem_cache_set_move); @@ -1022,9 +1020,11 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) taskq_cancel_id(spl_kmem_cache_taskq, id); - /* Wait until all current callers complete, this is mainly + /* + * Wait until all current callers complete, this is mainly * to catch the case where a low memory situation triggers a - * cache reaping action which races with this destroy. */ + * cache reaping action which races with this destroy. + */ wait_event(wq, atomic_read(&skc->skc_ref) == 0); if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { @@ -1037,8 +1037,10 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) spin_lock(&skc->skc_lock); - /* Validate there are no objects in use and free all the - * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. */ + /* + * Validate there are no objects in use and free all the + * spl_kmem_slab_t, spl_kmem_obj_t, and object buffers. + */ ASSERT3U(skc->skc_slab_alloc, ==, 0); ASSERT3U(skc->skc_obj_alloc, ==, 0); ASSERT3U(skc->skc_slab_total, ==, 0); @@ -1049,7 +1051,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); - kmem_free(skc, sizeof(*skc)); + kmem_free(skc, sizeof (*skc)); } EXPORT_SYMBOL(spl_kmem_cache_destroy); @@ -1089,7 +1091,7 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) skc->skc_slab_max = skc->skc_slab_alloc; } - return sko->sko_addr; + return (sko->sko_addr); } /* @@ -1127,7 +1129,7 @@ spl_cache_grow_work(void *data) static int spl_cache_grow_wait(spl_kmem_cache_t *skc) { - return !test_bit(KMC_BIT_GROWING, &skc->skc_flags); + return (!test_bit(KMC_BIT_GROWING, &skc->skc_flags)); } /* @@ -1164,7 +1166,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) if (test_and_set_bit(KMC_BIT_GROWING, &skc->skc_flags) == 0) { spl_kmem_alloc_t *ska; - ska = kmalloc(sizeof(*ska), flags); + ska = kmalloc(sizeof (*ska), flags); if (ska == NULL) { clear_bit(KMC_BIT_GROWING, &skc->skc_flags); wake_up_all(&skc->skc_waitq); @@ -1192,7 +1194,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) rc = spl_emergency_alloc(skc, flags, obj); } else { remaining = wait_event_timeout(skc->skc_waitq, - spl_cache_grow_wait(skc), HZ); + spl_cache_grow_wait(skc), HZ); if (!remaining && test_bit(KMC_BIT_VMEM, &skc->skc_flags)) { spin_lock(&skc->skc_lock); @@ -1249,9 +1251,11 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) if (skm != skc->skc_mag[smp_processor_id()]) goto out; - /* Potentially rescheduled to the same CPU but + /* + * Potentially rescheduled to the same CPU but * allocations may have occurred from this CPU while - * we were sleeping so recalculate max refill. */ + * we were sleeping so recalculate max refill. + */ refill = MIN(refill, skm->skm_size - skm->skm_avail); spin_lock(&skc->skc_lock); @@ -1260,17 +1264,21 @@ spl_cache_refill(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flags) /* Grab the next available slab */ sks = list_entry((&skc->skc_partial_list)->next, - spl_kmem_slab_t, sks_list); + spl_kmem_slab_t, sks_list); ASSERT(sks->sks_magic == SKS_MAGIC); ASSERT(sks->sks_ref < sks->sks_objs); ASSERT(!list_empty(&sks->sks_free_list)); - /* Consume as many objects as needed to refill the requested - * cache. We must also be careful not to overfill it. */ - while (sks->sks_ref < sks->sks_objs && refill-- > 0 && ++count) { + /* + * Consume as many objects as needed to refill the requested + * cache. We must also be careful not to overfill it. + */ + while (sks->sks_ref < sks->sks_objs && refill-- > 0 && + ++count) { ASSERT(skm->skm_avail < skm->skm_size); ASSERT(count < skm->skm_size); - skm->skm_objs[skm->skm_avail++]=spl_cache_obj(skc,sks); + skm->skm_objs[skm->skm_avail++] = + spl_cache_obj(skc, sks); } /* Move slab to skc_complete_list when full */ @@ -1308,16 +1316,20 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) sks->sks_ref--; skc->skc_obj_alloc--; - /* Move slab to skc_partial_list when no longer full. Slabs + /* + * Move slab to skc_partial_list when no longer full. Slabs * are added to the head to keep the partial list is quasi-full - * sorted order. Fuller at the head, emptier at the tail. */ + * sorted order. Fuller at the head, emptier at the tail. + */ if (sks->sks_ref == (sks->sks_objs - 1)) { list_del(&sks->sks_list); list_add(&sks->sks_list, &skc->skc_partial_list); } - /* Move empty slabs to the end of the partial list so - * they can be easily found and freed during reclamation. */ + /* + * Move empty slabs to the end of the partial list so + * they can be easily found and freed during reclamation. + */ if (sks->sks_ref == 0) { list_del(&sks->sks_list); list_add_tail(&sks->sks_list, &skc->skc_partial_list); @@ -1359,10 +1371,12 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) local_irq_disable(); restart: - /* Safe to update per-cpu structure without lock, but + /* + * Safe to update per-cpu structure without lock, but * in the restart case we must be careful to reacquire * the local magazine since this may have changed - * when we need to grow the cache. */ + * when we need to grow the cache. + */ skm = skc->skc_mag[smp_processor_id()]; ASSERT(skm->skm_magic == SKM_MAGIC); @@ -1438,10 +1452,12 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) local_irq_save(flags); - /* Safe to update per-cpu structure without lock, but + /* + * Safe to update per-cpu structure without lock, but * no remote memory allocation tracking is being performed * it is entirely possible to allocate an object from one - * CPU cache and return it to another. */ + * CPU cache and return it to another. + */ skm = skc->skc_mag[smp_processor_id()]; ASSERT(skm->skm_magic == SKM_MAGIC); @@ -1495,12 +1511,12 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, #ifdef HAVE_SPLIT_SHRINKER_CALLBACK uint64_t oldalloc = skc->skc_obj_alloc; spl_kmem_cache_reap_now(skc, - MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); + MAX(sc->nr_to_scan>>fls64(skc->skc_slab_objs), 1)); if (oldalloc > skc->skc_obj_alloc) alloc += oldalloc - skc->skc_obj_alloc; #else spl_kmem_cache_reap_now(skc, - MAX(sc->nr_to_scan >> fls64(skc->skc_slab_objs), 1)); + MAX(sc->nr_to_scan>>fls64(skc->skc_slab_objs), 1)); alloc += skc->skc_obj_alloc; #endif /* HAVE_SPLIT_SHRINKER_CALLBACK */ } else { @@ -1581,7 +1597,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) spin_lock(&skc->skc_lock); do_reclaim = (skc->skc_slab_total > 0) && - ((skc->skc_slab_total - skc->skc_slab_alloc) == 0) && + ((skc->skc_slab_total-skc->skc_slab_alloc) == 0) && (skc->skc_obj_alloc < objects); objects = skc->skc_obj_alloc; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 075bf2580..96ad2b043 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,9 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting Layer (SPL) Kmem Implementation. -\*****************************************************************************/ + */ #include #include @@ -31,7 +29,7 @@ int kmem_debugging(void) { - return 0; + return (0); } EXPORT_SYMBOL(kmem_debugging); @@ -47,7 +45,7 @@ kmem_vasprintf(const char *fmt, va_list ap) va_end(aq); } while (ptr == NULL); - return ptr; + return (ptr); } EXPORT_SYMBOL(kmem_vasprintf); @@ -63,7 +61,7 @@ kmem_asprintf(const char *fmt, ...) va_end(ap); } while (ptr == NULL); - return ptr; + return (ptr); } EXPORT_SYMBOL(kmem_asprintf); @@ -78,13 +76,13 @@ __strdup(const char *str, int flags) if (ptr) memcpy(ptr, str, n + 1); - return ptr; + return (ptr); } char * strdup(const char *str) { - return __strdup(str, KM_SLEEP); + return (__strdup(str, KM_SLEEP)); } EXPORT_SYMBOL(strdup); @@ -104,18 +102,19 @@ EXPORT_SYMBOL(strfree); #ifdef DEBUG_KMEM /* Shim layer memory accounting */ -# ifdef HAVE_ATOMIC64_T +#ifdef HAVE_ATOMIC64_T atomic64_t kmem_alloc_used = ATOMIC64_INIT(0); unsigned long long kmem_alloc_max = 0; -# else /* HAVE_ATOMIC64_T */ +#else /* HAVE_ATOMIC64_T */ atomic_t kmem_alloc_used = ATOMIC_INIT(0); unsigned long long kmem_alloc_max = 0; -# endif /* HAVE_ATOMIC64_T */ +#endif /* HAVE_ATOMIC64_T */ EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); -/* When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked +/* + * When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked * but also the location of every alloc and free. When the SPL module is * unloaded a list of all leaked addresses and where they were allocated * will be dumped to the console. Enabling this feature has a significant @@ -126,18 +125,18 @@ EXPORT_SYMBOL(kmem_alloc_max); * debugging enabled for anything other than debugging we need to minimize * the contention by moving to a lock per xmem_table entry model. */ -# ifdef DEBUG_KMEM_TRACKING +#ifdef DEBUG_KMEM_TRACKING -# define KMEM_HASH_BITS 10 -# define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) +#define KMEM_HASH_BITS 10 +#define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) typedef struct kmem_debug { - struct hlist_node kd_hlist; /* Hash node linkage */ - struct list_head kd_list; /* List of all allocations */ - void *kd_addr; /* Allocation pointer */ - size_t kd_size; /* Allocation size */ - const char *kd_func; /* Allocation function */ - int kd_line; /* Allocation line */ + struct hlist_node kd_hlist; /* Hash node linkage */ + struct list_head kd_list; /* List of all allocations */ + void *kd_addr; /* Allocation pointer */ + size_t kd_size; /* Allocation size */ + const char *kd_func; /* Allocation function */ + int kd_line; /* Allocation line */ } kmem_debug_t; spinlock_t kmem_lock; @@ -149,7 +148,8 @@ EXPORT_SYMBOL(kmem_table); EXPORT_SYMBOL(kmem_list); static kmem_debug_t * -kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void *addr) +kmem_del_init(spinlock_t *lock, struct hlist_head *table, + int bits, const void *addr) { struct hlist_head *head; struct hlist_node *node; @@ -165,7 +165,7 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void * hlist_del_init(&p->kd_hlist); list_del_init(&p->kd_list); spin_unlock_irqrestore(lock, flags); - return p; + return (p); } } @@ -183,12 +183,12 @@ kmem_alloc_track(size_t size, int flags, const char *func, int line, unsigned long irq_flags; /* Function may be called with KM_NOSLEEP so failure is possible */ - dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), + dptr = (kmem_debug_t *) kmalloc_nofail(sizeof (kmem_debug_t), flags & ~__GFP_ZERO); if (unlikely(dptr == NULL)) { printk(KERN_WARNING "debug kmem_alloc(%ld, 0x%x) at %s:%d " - "failed (%lld/%llu)\n", sizeof(kmem_debug_t), flags, + "failed (%lld/%llu)\n", sizeof (kmem_debug_t), flags, func, line, kmem_alloc_used_read(), kmem_alloc_max); } else { /* @@ -280,7 +280,7 @@ kmem_free_track(const void *ptr, size_t size) kmem_alloc_used_sub(size); kfree(dptr->kd_func); - memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); + memset((void *)dptr, 0x5a, sizeof (kmem_debug_t)); kfree(dptr); memset((void *)ptr, 0x5a, size); @@ -288,7 +288,7 @@ kmem_free_track(const void *ptr, size_t size) } EXPORT_SYMBOL(kmem_free_track); -# else /* DEBUG_KMEM_TRACKING */ +#else /* DEBUG_KMEM_TRACKING */ void * kmem_alloc_debug(size_t size, int flags, const char *func, int line, @@ -342,7 +342,7 @@ kmem_free_debug(const void *ptr, size_t size) } EXPORT_SYMBOL(kmem_free_debug); -# endif /* DEBUG_KMEM_TRACKING */ +#endif /* DEBUG_KMEM_TRACKING */ #endif /* DEBUG_KMEM */ #if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) @@ -355,15 +355,19 @@ spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) ASSERT(str != NULL && len >= 17); memset(str, 0, len); - /* Check for a fully printable string, and while we are at - * it place the printable characters in the passed buffer. */ + /* + * Check for a fully printable string, and while we are at + * it place the printable characters in the passed buffer. + */ for (i = 0; i < size; i++) { str[i] = ((char *)(kd->kd_addr))[i]; if (isprint(str[i])) { continue; } else { - /* Minimum number of printable characters found - * to make it worthwhile to print this as ascii. */ + /* + * Minimum number of printable characters found + * to make it worthwhile to print this as ascii. + */ if (i > min) break; @@ -374,17 +378,17 @@ spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) if (!flag) { sprintf(str, "%02x%02x%02x%02x%02x%02x%02x%02x", - *((uint8_t *)kd->kd_addr), - *((uint8_t *)kd->kd_addr + 2), - *((uint8_t *)kd->kd_addr + 4), - *((uint8_t *)kd->kd_addr + 6), - *((uint8_t *)kd->kd_addr + 8), - *((uint8_t *)kd->kd_addr + 10), - *((uint8_t *)kd->kd_addr + 12), - *((uint8_t *)kd->kd_addr + 14)); + *((uint8_t *)kd->kd_addr), + *((uint8_t *)kd->kd_addr + 2), + *((uint8_t *)kd->kd_addr + 4), + *((uint8_t *)kd->kd_addr + 6), + *((uint8_t *)kd->kd_addr + 8), + *((uint8_t *)kd->kd_addr + 10), + *((uint8_t *)kd->kd_addr + 12), + *((uint8_t *)kd->kd_addr + 14)); } - return str; + return (str); } static int @@ -411,18 +415,18 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) spin_lock_irqsave(lock, flags); if (!list_empty(list)) printk(KERN_WARNING "%-16s %-5s %-16s %s:%s\n", "address", - "size", "data", "func", "line"); + "size", "data", "func", "line"); list_for_each_entry(kd, list, kd_list) printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr, - (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), - kd->kd_func, kd->kd_line); + (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); spin_unlock_irqrestore(lock, flags); } #else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ -#define spl_kmem_init_tracking(list, lock, size) -#define spl_kmem_fini_tracking(list, lock) +#define spl_kmem_init_tracking(list, lock, size) +#define spl_kmem_fini_tracking(list, lock) #endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ int @@ -442,10 +446,12 @@ void spl_kmem_fini(void) { #ifdef DEBUG_KMEM - /* Display all unreclaimed memory addresses, including the + /* + * Display all unreclaimed memory addresses, including the * allocation size and the first few bytes of what's located * at that address to aid in debugging. Performance is not - * a serious concern here since it is module unload time. */ + * a serious concern here since it is module unload time. + */ if (kmem_alloc_used_read() != 0) printk(KERN_WARNING "kmem leaked %ld/%llu bytes\n", kmem_alloc_used_read(), kmem_alloc_max); diff --git a/module/spl/spl-vmem.c b/module/spl/spl-vmem.c index 4c140eb8e..51aef941b 100644 --- a/module/spl/spl-vmem.c +++ b/module/spl/spl-vmem.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,9 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting Layer (SPL) Kmem Implementation. -\*****************************************************************************/ + */ #include #include @@ -57,18 +55,19 @@ EXPORT_SYMBOL(vmem_size); #ifdef DEBUG_KMEM /* Shim layer memory accounting */ -# ifdef HAVE_ATOMIC64_T +#ifdef HAVE_ATOMIC64_T atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); unsigned long long vmem_alloc_max = 0; -# else /* HAVE_ATOMIC64_T */ +#else /* HAVE_ATOMIC64_T */ atomic_t vmem_alloc_used = ATOMIC_INIT(0); unsigned long long vmem_alloc_max = 0; -# endif /* HAVE_ATOMIC64_T */ +#endif /* HAVE_ATOMIC64_T */ EXPORT_SYMBOL(vmem_alloc_used); EXPORT_SYMBOL(vmem_alloc_max); -/* When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked +/* + * When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked * but also the location of every alloc and free. When the SPL module is * unloaded a list of all leaked addresses and where they were allocated * will be dumped to the console. Enabling this feature has a significant @@ -79,18 +78,18 @@ EXPORT_SYMBOL(vmem_alloc_max); * debugging enabled for anything other than debugging we need to minimize * the contention by moving to a lock per xmem_table entry model. */ -# ifdef DEBUG_KMEM_TRACKING +#ifdef DEBUG_KMEM_TRACKING -# define VMEM_HASH_BITS 10 -# define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) +#define VMEM_HASH_BITS 10 +#define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) typedef struct kmem_debug { - struct hlist_node kd_hlist; /* Hash node linkage */ - struct list_head kd_list; /* List of all allocations */ - void *kd_addr; /* Allocation pointer */ - size_t kd_size; /* Allocation size */ - const char *kd_func; /* Allocation function */ - int kd_line; /* Allocation line */ + struct hlist_node kd_hlist; /* Hash node linkage */ + struct list_head kd_list; /* List of all allocations */ + void *kd_addr; /* Allocation pointer */ + size_t kd_size; /* Allocation size */ + const char *kd_func; /* Allocation function */ + int kd_line; /* Allocation line */ } kmem_debug_t; spinlock_t vmem_lock; @@ -111,12 +110,12 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) ASSERT(flags & KM_SLEEP); /* Function may be called with KM_NOSLEEP so failure is possible */ - dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), + dptr = (kmem_debug_t *) kmalloc_nofail(sizeof (kmem_debug_t), flags & ~__GFP_ZERO); if (unlikely(dptr == NULL)) { printk(KERN_WARNING "debug vmem_alloc(%ld, 0x%x) " "at %s:%d failed (%lld/%llu)\n", - sizeof(kmem_debug_t), flags, func, line, + sizeof (kmem_debug_t), flags, func, line, vmem_alloc_used_read(), vmem_alloc_max); } else { /* @@ -194,7 +193,7 @@ vmem_free_track(const void *ptr, size_t size) vmem_alloc_used_sub(size); kfree(dptr->kd_func); - memset((void *)dptr, 0x5a, sizeof(kmem_debug_t)); + memset((void *)dptr, 0x5a, sizeof (kmem_debug_t)); kfree(dptr); memset((void *)ptr, 0x5a, size); @@ -202,7 +201,7 @@ vmem_free_track(const void *ptr, size_t size) } EXPORT_SYMBOL(vmem_free_track); -# else /* DEBUG_KMEM_TRACKING */ +#else /* DEBUG_KMEM_TRACKING */ void * vmem_alloc_debug(size_t size, int flags, const char *func, int line) @@ -242,7 +241,7 @@ vmem_free_debug(const void *ptr, size_t size) } EXPORT_SYMBOL(vmem_free_debug); -# endif /* DEBUG_KMEM_TRACKING */ +#endif /* DEBUG_KMEM_TRACKING */ #endif /* DEBUG_KMEM */ #if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) @@ -255,15 +254,19 @@ spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) ASSERT(str != NULL && len >= 17); memset(str, 0, len); - /* Check for a fully printable string, and while we are at - * it place the printable characters in the passed buffer. */ + /* + * Check for a fully printable string, and while we are at + * it place the printable characters in the passed buffer. + */ for (i = 0; i < size; i++) { str[i] = ((char *)(kd->kd_addr))[i]; if (isprint(str[i])) { continue; } else { - /* Minimum number of printable characters found - * to make it worthwhile to print this as ascii. */ + /* + * Minimum number of printable characters found + * to make it worthwhile to print this as ascii. + */ if (i > min) break; @@ -274,17 +277,17 @@ spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) if (!flag) { sprintf(str, "%02x%02x%02x%02x%02x%02x%02x%02x", - *((uint8_t *)kd->kd_addr), - *((uint8_t *)kd->kd_addr + 2), - *((uint8_t *)kd->kd_addr + 4), - *((uint8_t *)kd->kd_addr + 6), - *((uint8_t *)kd->kd_addr + 8), - *((uint8_t *)kd->kd_addr + 10), - *((uint8_t *)kd->kd_addr + 12), - *((uint8_t *)kd->kd_addr + 14)); + *((uint8_t *)kd->kd_addr), + *((uint8_t *)kd->kd_addr + 2), + *((uint8_t *)kd->kd_addr + 4), + *((uint8_t *)kd->kd_addr + 6), + *((uint8_t *)kd->kd_addr + 8), + *((uint8_t *)kd->kd_addr + 10), + *((uint8_t *)kd->kd_addr + 12), + *((uint8_t *)kd->kd_addr + 14)); } - return str; + return (str); } static int @@ -311,18 +314,18 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) spin_lock_irqsave(lock, flags); if (!list_empty(list)) printk(KERN_WARNING "%-16s %-5s %-16s %s:%s\n", "address", - "size", "data", "func", "line"); + "size", "data", "func", "line"); list_for_each_entry(kd, list, kd_list) printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr, - (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), - kd->kd_func, kd->kd_line); + (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), + kd->kd_func, kd->kd_line); spin_unlock_irqrestore(lock, flags); } #else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ -#define spl_kmem_init_tracking(list, lock, size) -#define spl_kmem_fini_tracking(list, lock) +#define spl_kmem_init_tracking(list, lock, size) +#define spl_kmem_fini_tracking(list, lock) #endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ int @@ -342,10 +345,12 @@ void spl_vmem_fini(void) { #ifdef DEBUG_KMEM - /* Display all unreclaimed memory addresses, including the + /* + * Display all unreclaimed memory addresses, including the * allocation size and the first few bytes of what's located * at that address to aid in debugging. Performance is not - * a serious concern here since it is module unload time. */ + * a serious concern here since it is module unload time. + */ if (vmem_alloc_used_read() != 0) printk(KERN_WARNING "vmem leaked %ld/%llu bytes\n", vmem_alloc_used_read(), vmem_alloc_max); From c3eabc75b1ea41a12e3fec06db74a2995bda7514 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 8 Dec 2014 15:37:14 -0500 Subject: [PATCH 0857/1062] Refactor generic memory allocation interfaces This patch achieves the following goals: 1. It replaces the preprocessor kmem flag to gfp flag mapping with proper translation logic. This eliminates the potential for surprises that were previously possible where kmem flags were mapped to gfp flags. 2. It maps vmem_alloc() allocations to kmem_alloc() for allocations sized less than or equal to the newly-added spl_kmem_alloc_max parameter. This ensures that small allocations will not contend on a single global lock, large allocations can still be handled, and potentially limited virtual address space will not be squandered. This behavior is entirely different than under Illumos due to different memory management strategies employed by the respective kernels. However, this functionally provides the semantics required. 3. The --disable-debug-kmem, --enable-debug-kmem (default), and --enable-debug-kmem-tracking allocators have been unified in to a single spl_kmem_alloc_impl() allocation function. This was done to simplify the code and make it more maintainable. 4. Improve portability by exposing an implementation of the memory allocations functions that can be safely used in the same way they are used on Illumos. Specifically, callers may safely use KM_SLEEP in contexts which perform filesystem IO. This allows us to eliminate an entire class of Linux specific changes which were previously required to avoid deadlocking the system. This change will be largely transparent to existing callers but there are a few caveats: 1. Because the headers were refactored and extraneous includes removed callers may find they need to explicitly add additional #includes. In particular, kmem_cache.h must now be explicitly includes to access the SPL's kmem cache implementation. This behavior is different from Illumos but it was done to avoid always masking the Linux slab functions when kmem.h is included. 2. Callers, like Lustre, which made assumptions about the definitions of KM_SLEEP, KM_NOSLEEP, and KM_PUSHPAGE will need to be updated. Other callers such as ZFS which did not will not require changes. 3. KM_PUSHPAGE is no longer overloaded to imply GFP_NOIO. It retains its original meaning of allowing allocations to access reserved memory. KM_PUSHPAGE callers can be converted back to KM_SLEEP. 4. The KM_NODEBUG flags has been retired and the default warning threshold increased to 32k. 5. The kmem_virt() functions has been removed. For callers which need to distinguish between a physical and virtual address use is_vmalloc_addr(). Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 165 ++++-------- include/sys/kmem_cache.h | 24 +- include/sys/vmem.h | 171 ++++--------- man/man5/spl-module-parameters.5 | 40 +++ module/spl/spl-kmem-cache.c | 89 +++---- module/spl/spl-kmem.c | 427 +++++++++++++++++++------------ module/spl/spl-proc.c | 20 -- module/spl/spl-tsd.c | 3 +- module/spl/spl-vmem.c | 325 +++-------------------- module/splat/splat-kmem.c | 20 +- 10 files changed, 489 insertions(+), 795 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index a9d94c909..045d07c2c 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -26,6 +26,7 @@ #define _SPL_KMEM_H #include +#include extern int kmem_debugging(void); extern char *kmem_vasprintf(const char *fmt, va_list ap); @@ -36,68 +37,41 @@ extern void strfree(char *str); /* * Memory allocation interfaces */ -#define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */ -#define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */ -#define KM_PUSHPAGE (GFP_NOIO | __GFP_HIGH) /* Use reserved memory */ -#define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */ -#define KM_FLAGS __GFP_BITS_MASK -#define KM_VMFLAGS GFP_LEVEL_MASK +#define KM_SLEEP 0x0000 /* can block for memory; success guaranteed */ +#define KM_NOSLEEP 0x0001 /* cannot block for memory; may fail */ +#define KM_PUSHPAGE 0x0004 /* can block for memory; may use reserve */ +#define KM_ZERO 0x1000 /* zero the allocation */ +#define KM_VMEM 0x2000 /* caller is vmem_* wrapper */ + +#define KM_PUBLIC_MASK (KM_SLEEP | KM_NOSLEEP | KM_PUSHPAGE) /* - * Used internally, the kernel does not need to support this flag + * Convert a KM_* flags mask to its Linux GFP_* counterpart. The conversion + * function is context aware which means that KM_SLEEP allocations can be + * safely used in syncing contexts which have set PF_FSTRANS. */ -#ifndef __GFP_ZERO -#define __GFP_ZERO 0x8000 -#endif - -/* - * __GFP_NOFAIL looks like it will be removed from the kernel perhaps as - * early as 2.6.32. To avoid this issue when it occurs in upstream kernels - * we retry the allocation here as long as it is not __GFP_WAIT (GFP_ATOMIC). - * I would prefer the caller handle the failure case cleanly but we are - * trying to emulate Solaris and those are not the Solaris semantics. - */ -static inline void * -kmalloc_nofail(size_t size, gfp_t flags) +static inline gfp_t +kmem_flags_convert(int flags) { - void *ptr; + gfp_t lflags = __GFP_NOWARN | __GFP_COMP; - do { - ptr = kmalloc(size, flags); - } while (ptr == NULL && (flags & __GFP_WAIT)); + if (flags & KM_NOSLEEP) { + lflags |= GFP_ATOMIC | __GFP_NORETRY; + } else { + lflags |= GFP_KERNEL; + if ((current->flags & PF_FSTRANS)) + lflags &= ~(__GFP_IO|__GFP_FS); + } - return (ptr); + if (flags & KM_PUSHPAGE) + lflags |= __GFP_HIGH; + + if (flags & KM_ZERO) + lflags |= __GFP_ZERO; + + return (lflags); } -static inline void * -kzalloc_nofail(size_t size, gfp_t flags) -{ - void *ptr; - - do { - ptr = kzalloc(size, flags); - } while (ptr == NULL && (flags & __GFP_WAIT)); - - return (ptr); -} - -static inline void * -kmalloc_node_nofail(size_t size, gfp_t flags, int node) -{ - void *ptr; - - do { - ptr = kmalloc_node(size, flags, node); - } while (ptr == NULL && (flags & __GFP_WAIT)); - - return (ptr); -} - -#ifdef DEBUG_KMEM - -/* - * Memory accounting functions to be used only when DEBUG_KMEM is set. - */ #ifdef HAVE_ATOMIC64_T #define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used) #define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used) @@ -114,70 +88,29 @@ extern atomic_t kmem_alloc_used; extern unsigned long long kmem_alloc_max; #endif /* HAVE_ATOMIC64_T */ -#ifdef DEBUG_KMEM_TRACKING +extern unsigned int spl_kmem_alloc_warn; +extern unsigned int spl_kmem_alloc_max; + +#define kmem_alloc(sz, fl) spl_kmem_alloc((sz), (fl), __func__, __LINE__) +#define kmem_zalloc(sz, fl) spl_kmem_zalloc((sz), (fl), __func__, __LINE__) +#define kmem_free(ptr, sz) spl_kmem_free((ptr), (sz)) + +extern void *spl_kmem_alloc(size_t sz, int fl, const char *func, int line); +extern void *spl_kmem_zalloc(size_t sz, int fl, const char *func, int line); +extern void spl_kmem_free(const void *ptr, size_t sz); + /* - * DEBUG_KMEM && DEBUG_KMEM_TRACKING - * - * The maximum level of memory debugging. All memory will be accounted - * for and each allocation will be explicitly tracked. Any allocation - * which is leaked will be reported on module unload and the exact location - * where that memory was allocation will be reported. This level of memory - * tracking will have a significant impact on performance and should only - * be enabled for debugging. This feature may be enabled by passing - * --enable-debug-kmem-tracking to configure. + * The following functions are only available for internal use. */ -#define kmem_alloc(sz, fl) kmem_alloc_track((sz), (fl), \ - __FUNCTION__, __LINE__, 0, 0) -#define kmem_zalloc(sz, fl) kmem_alloc_track((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__, 0, 0) -#define kmem_alloc_node(sz, fl, nd) kmem_alloc_track((sz), (fl), \ - __FUNCTION__, __LINE__, 1, nd) -#define kmem_free(ptr, sz) kmem_free_track((ptr), (sz)) +extern void *spl_kmem_alloc_impl(size_t size, int flags, int node); +extern void *spl_kmem_alloc_debug(size_t size, int flags, int node); +extern void *spl_kmem_alloc_track(size_t size, int flags, + const char *func, int line, int node); +extern void spl_kmem_free_impl(const void *buf, size_t size); +extern void spl_kmem_free_debug(const void *buf, size_t size); +extern void spl_kmem_free_track(const void *buf, size_t size); -extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); -extern void kmem_free_track(const void *, size_t); - -#else /* DEBUG_KMEM_TRACKING */ -/* - * DEBUG_KMEM && !DEBUG_KMEM_TRACKING - * - * The default build will set DEBUG_KEM. This provides basic memory - * accounting with little to no impact on performance. When the module - * is unloaded in any memory was leaked the total number of leaked bytes - * will be reported on the console. To disable this basic accounting - * pass the --disable-debug-kmem option to configure. - */ -#define kmem_alloc(sz, fl) kmem_alloc_debug((sz), (fl), \ - __FUNCTION__, __LINE__, 0, 0) -#define kmem_zalloc(sz, fl) kmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__, 0, 0) -#define kmem_alloc_node(sz, fl, nd) kmem_alloc_debug((sz), (fl), \ - __FUNCTION__, __LINE__, 1, nd) -#define kmem_free(ptr, sz) kmem_free_debug((ptr), (sz)) - -extern void *kmem_alloc_debug(size_t, int, const char *, int, int, int); -extern void kmem_free_debug(const void *, size_t); - -#endif /* DEBUG_KMEM_TRACKING */ -#else /* DEBUG_KMEM */ -/* - * !DEBUG_KMEM && !DEBUG_KMEM_TRACKING - * - * All debugging is disabled. There will be no overhead even for - * minimal memory accounting. To enable basic accounting pass the - * --enable-debug-kmem option to configure. - */ -#define kmem_alloc(sz, fl) kmalloc_nofail((sz), (fl)) -#define kmem_zalloc(sz, fl) kzalloc_nofail((sz), (fl)) -#define kmem_alloc_node(sz, fl, nd) kmalloc_node_nofail((sz), (fl), (nd)) -#define kmem_free(ptr, sz) ((void)(sz), kfree(ptr)) - -#endif /* DEBUG_KMEM */ - -int spl_kmem_init(void); -void spl_kmem_fini(void); - -#define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \ - ((ptr) < (void *)VMALLOC_END)) +extern int spl_kmem_init(void); +extern void spl_kmem_fini(void); #endif /* _SPL_KMEM_H */ diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h index a5bc0322b..a9b5bdd2f 100644 --- a/include/sys/kmem_cache.h +++ b/include/sys/kmem_cache.h @@ -202,6 +202,7 @@ extern void spl_kmem_cache_set_move(spl_kmem_cache_t *, extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); +extern void spl_kmem_cache_set_allocflags(spl_kmem_cache_t *skc, gfp_t flags); extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count); extern void spl_kmem_reap(void); @@ -214,29 +215,6 @@ extern void spl_kmem_reap(void); #define kmem_cache_reap_now(skc) \ spl_kmem_cache_reap_now(skc, skc->skc_reap) #define kmem_reap() spl_kmem_reap() -#define kmem_virt(ptr) \ - (((ptr) >= (void *)VMALLOC_START) && \ - ((ptr) < (void *)VMALLOC_END)) - -/* - * Allow custom slab allocation flags to be set for KMC_SLAB based caches. - * One use for this function is to ensure the __GFP_COMP flag is part of - * the default allocation mask which ensures higher order allocations are - * properly refcounted. This flag was added to the default ->allocflags - * as of Linux 3.11. - */ -static inline void -kmem_cache_set_allocflags(spl_kmem_cache_t *skc, gfp_t flags) -{ - if (skc->skc_linux_cache == NULL) - return; - -#if defined(HAVE_KMEM_CACHE_ALLOCFLAGS) - skc->skc_linux_cache->allocflags |= flags; -#elif defined(HAVE_KMEM_CACHE_GFPFLAGS) - skc->skc_linux_cache->gfpflags |= flags; -#endif -} /* * The following functions are only available for internal use. diff --git a/include/sys/vmem.h b/include/sys/vmem.h index f59ac5e8b..6eb2c6769 100644 --- a/include/sys/vmem.h +++ b/include/sys/vmem.h @@ -47,135 +47,60 @@ extern size_t vmem_size(vmem_t *vmp, int typemask); #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) #endif -static inline void * -vmalloc_nofail(size_t size, gfp_t flags) -{ - void *ptr; - - /* - * Retry failed __vmalloc() allocations once every second. The - * rational for the delay is that the likely failure modes are: - * - * 1) The system has completely exhausted memory, in which case - * delaying 1 second for the memory reclaim to run is reasonable - * to avoid thrashing the system. - * 2) The system has memory but has exhausted the small virtual - * address space available on 32-bit systems. Retrying the - * allocation immediately will only result in spinning on the - * virtual address space lock. It is better delay a second and - * hope that another process will free some of the address space. - * But the bottom line is there is not much we can actually do - * since we can never safely return a failure and honor the - * Solaris semantics. - */ - while (1) { - ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); - if (unlikely((ptr == NULL) && (flags & __GFP_WAIT))) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - } else { - break; - } - } - - return (ptr); -} - -static inline void * -vzalloc_nofail(size_t size, gfp_t flags) -{ - void *ptr; - - ptr = vmalloc_nofail(size, flags); - if (ptr) - memset(ptr, 0, (size)); - - return (ptr); -} - -#ifdef DEBUG_KMEM - /* - * Memory accounting functions to be used only when DEBUG_KMEM is set. - */ -#ifdef HAVE_ATOMIC64_T - -#define vmem_alloc_used_add(size) atomic64_add(size, &vmem_alloc_used) -#define vmem_alloc_used_sub(size) atomic64_sub(size, &vmem_alloc_used) -#define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used) -#define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size) - -extern atomic64_t vmem_alloc_used; -extern unsigned long long vmem_alloc_max; - -#else /* HAVE_ATOMIC64_T */ - -#define vmem_alloc_used_add(size) atomic_add(size, &vmem_alloc_used) -#define vmem_alloc_used_sub(size) atomic_sub(size, &vmem_alloc_used) -#define vmem_alloc_used_read() atomic_read(&vmem_alloc_used) -#define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size) - -extern atomic_t vmem_alloc_used; -extern unsigned long long vmem_alloc_max; - -#endif /* HAVE_ATOMIC64_T */ - -#ifdef DEBUG_KMEM_TRACKING -/* - * DEBUG_KMEM && DEBUG_KMEM_TRACKING + * vmem_* is an interface to a low level arena-based memory allocator on + * Illumos that is used to allocate virtual address space. The kmem SLAB + * allocator allocates slabs from it. Then the generic allocation functions + * kmem_{alloc,zalloc,free}() are layered on top of SLAB allocators. * - * The maximum level of memory debugging. All memory will be accounted - * for and each allocation will be explicitly tracked. Any allocation - * which is leaked will be reported on module unload and the exact location - * where that memory was allocation will be reported. This level of memory - * tracking will have a significant impact on performance and should only - * be enabled for debugging. This feature may be enabled by passing - * --enable-debug-kmem-tracking to configure. - */ -#define vmem_alloc(sz, fl) vmem_alloc_track((sz), (fl), \ - __FUNCTION__, __LINE__) -#define vmem_zalloc(sz, fl) vmem_alloc_track((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__) -#define vmem_free(ptr, sz) vmem_free_track((ptr), (sz)) - -extern void *kmem_alloc_track(size_t, int, const char *, int, int, int); -extern void kmem_free_track(const void *, size_t); -extern void *vmem_alloc_track(size_t, int, const char *, int); -extern void vmem_free_track(const void *, size_t); - -#else /* DEBUG_KMEM_TRACKING */ -/* - * DEBUG_KMEM && !DEBUG_KMEM_TRACKING + * On Linux, the primary means of doing allocations is via kmalloc(), which + * is similarly layered on top of something called the buddy allocator. The + * buddy allocator is not available to kernel modules, it uses physical + * memory addresses rather than virtual memory addresses and is prone to + * fragmentation. * - * The default build will set DEBUG_KEM. This provides basic memory - * accounting with little to no impact on performance. When the module - * is unloaded in any memory was leaked the total number of leaked bytes - * will be reported on the console. To disable this basic accounting - * pass the --disable-debug-kmem option to configure. - */ -#define vmem_alloc(sz, fl) vmem_alloc_debug((sz), (fl), \ - __FUNCTION__, __LINE__) -#define vmem_zalloc(sz, fl) vmem_alloc_debug((sz), (fl)|__GFP_ZERO,\ - __FUNCTION__, __LINE__) -#define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz)) - -extern void *vmem_alloc_debug(size_t, int, const char *, int); -extern void vmem_free_debug(const void *, size_t); - -#endif /* DEBUG_KMEM_TRACKING */ -#else /* DEBUG_KMEM */ -/* - * !DEBUG_KMEM && !DEBUG_KMEM_TRACKING + * Linux sets aside a relatively small address space for in-kernel virtual + * memory from which allocations can be done using vmalloc(). It might seem + * like a good idea to use vmalloc() to implement something similar to + * Illumos' allocator. However, this has the following problems: * - * All debugging is disabled. There will be no overhead even for - * minimal memory accounting. To enable basic accounting pass the - * --enable-debug-kmem option to configure. + * 1. Page directory table allocations are hard coded to use GFP_KERNEL. + * Consequently, any KM_PUSHPAGE or KM_NOSLEEP allocations done using + * vmalloc() will not have proper semantics. + * + * 2. Address space exhaustion is a real issue on 32-bit platforms where + * only a few 100MB are available. The kernel will handle it by spinning + * when it runs out of address space. + * + * 3. All vmalloc() allocations and frees are protected by a single global + * lock which serializes all allocations. + * + * 4. Accessing /proc/meminfo and /proc/vmallocinfo will iterate the entire + * list. The former will sum the allocations while the latter will print + * them to user space in a way that user space can keep the lock held + * indefinitely. When the total number of mapped allocations is large + * (several 100,000) a large amount of time will be spent waiting on locks. + * + * 5. Linux has a wait_on_bit() locking primitive that assumes physical + * memory is used, it simply does not work on virtual memory. Certain + * Linux structures (e.g. the superblock) use them and might be embedded + * into a structure from Illumos. This makes using Linux virtual memory + * unsafe in certain situations. + * + * It follows that we cannot obtain identical semantics to those on Illumos. + * Consequently, we implement the kmem_{alloc,zalloc,free}() functions in + * such a way that they can be used as drop-in replacements for small vmem_* + * allocations (8MB in size or smaller) and map vmem_{alloc,zalloc,free}() + * to them. */ -#define vmem_alloc(sz, fl) vmalloc_nofail((sz), (fl)) -#define vmem_zalloc(sz, fl) vzalloc_nofail((sz), (fl)) -#define vmem_free(ptr, sz) ((void)(sz), vfree(ptr)) -#endif /* DEBUG_KMEM */ +#define vmem_alloc(sz, fl) spl_vmem_alloc((sz), (fl), __func__, __LINE__) +#define vmem_zalloc(sz, fl) spl_vmem_zalloc((sz), (fl), __func__, __LINE__) +#define vmem_free(ptr, sz) spl_vmem_free((ptr), (sz)) + +extern void *spl_vmem_alloc(size_t sz, int fl, const char *func, int line); +extern void *spl_vmem_zalloc(size_t sz, int fl, const char *func, int line); +extern void spl_vmem_free(const void *ptr, size_t sz); int spl_vmem_init(void); void spl_vmem_fini(void); diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 33e10b53c..2ec5b668e 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -80,6 +80,46 @@ By age (0x1) or low memory (0x2) Default value: \fB0\fR. .RE +.sp +.ne 2 +.na +\fBspl_kmem_alloc_warn\fR (uint) +.ad +.RS 12n +As a general rule kmem_alloc() allocations should be small, preferably +just a few pages since they must by physically contiguous. Therefore, a +rate limited warning will be printed to the console for any kmem_alloc() +which exceeds a reasonable threshold. + +The default warning threshold is set to eight pages but capped at 32K to +accommodate systems using large pages. This value was selected to be small +enough to ensure the largest allocations are quickly noticed and fixed. +But large enough to avoid logging any warnings when a allocation size is +larger than optimal but not a serious concern. Since this value is tunable, +developers are encouraged to set it lower when testing so any new largish +allocations are quickly caught. These warnings may be disabled by setting +the threshold to zero. +.sp +Default value: \fB32K\fR. +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_alloc_max\fR (uint) +.ad +.RS 12n +Large kmem_alloc() allocations will fail if they exceed KMALLOC_MAX_SIZE. +Allocations which are marginally smaller than this limit may succeed but +should still be avoided due to the expense of locating a contiguous range +of free pages. Therefore, a maximum kmem size with reasonable safely +margin of 4x is set. Kmem_alloc() allocations larger than this maximum +will quickly fail. Vmem_alloc() allocations less than or equal to this +value will use kmalloc(), but shift to vmalloc() when exceeding this value. +.sp +Default value: \fBKMALLOC_MAX_SIZE/4\fR. +.RE + .sp .ne 2 .na diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 3aa65a9bf..9a8ccfe42 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -130,19 +130,6 @@ MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, * One serious concern I do have about this method is the relatively * small virtual address space on 32bit arches. This will seriously * constrain the size of the slab caches and their performance. - * - * XXX: Improve the partial slab list by carefully maintaining a - * strict ordering of fullest to emptiest slabs based on - * the slab reference count. This guarantees that when freeing - * slabs back to the system we need only linearly traverse the - * last N slabs in the list to discover all the freeable slabs. - * - * XXX: NUMA awareness for optionally allocating memory close to a - * particular core. This can be advantageous if you know the slab - * object will be short lived and primarily accessed from one core. - * - * XXX: Slab coloring may also yield performance improvements and would - * be desirable to implement. */ struct list_head spl_kmem_cache_list; /* List of caches */ @@ -158,15 +145,15 @@ SPL_SHRINKER_DECLARE(spl_kmem_cache_shrinker, static void * kv_alloc(spl_kmem_cache_t *skc, int size, int flags) { + gfp_t lflags = kmem_flags_convert(flags); void *ptr; ASSERT(ISP2(size)); if (skc->skc_flags & KMC_KMEM) - ptr = (void *)__get_free_pages(flags | __GFP_COMP, - get_order(size)); + ptr = (void *)__get_free_pages(lflags, get_order(size)); else - ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); + ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL); /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); @@ -361,12 +348,11 @@ spl_slab_free(spl_kmem_slab_t *sks, } /* - * Traverse all the partial slabs attached to a cache and free those - * which which are currently empty, and have not been touched for - * skc_delay seconds to avoid thrashing. The count argument is - * passed to optionally cap the number of slabs reclaimed, a count - * of zero means try and reclaim everything. When flag is set we - * always free an available slab regardless of age. + * Traverse all the partial slabs attached to a cache and free those which + * are currently empty, and have not been touched for skc_delay seconds to + * avoid thrashing. The count argument is passed to optionally cap the + * number of slabs reclaimed, a count of zero means try and reclaim + * everything. When flag the is set available slabs freed regardless of age. */ static void spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) @@ -480,6 +466,7 @@ spl_emergency_insert(struct rb_root *root, spl_kmem_emergency_t *ske) static int spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) { + gfp_t lflags = kmem_flags_convert(flags); spl_kmem_emergency_t *ske; int empty; @@ -490,11 +477,11 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) if (!empty) return (-EEXIST); - ske = kmalloc(sizeof (*ske), flags); + ske = kmalloc(sizeof (*ske), lflags); if (ske == NULL) return (-ENOMEM); - ske->ske_obj = kmalloc(skc->skc_obj_size, flags); + ske->ske_obj = kmalloc(skc->skc_obj_size, lflags); if (ske->ske_obj == NULL) { kfree(ske); return (-ENOMEM); @@ -734,7 +721,7 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) int size = sizeof (spl_kmem_magazine_t) + sizeof (void *) * skc->skc_mag_size; - skm = kmem_alloc_node(size, KM_SLEEP, cpu_to_node(cpu)); + skm = kmalloc_node(size, GFP_KERNEL, cpu_to_node(cpu)); if (skm) { skm->skm_magic = SKM_MAGIC; skm->skm_avail = 0; @@ -754,13 +741,9 @@ spl_magazine_alloc(spl_kmem_cache_t *skc, int cpu) static void spl_magazine_free(spl_kmem_magazine_t *skm) { - int size = sizeof (spl_kmem_magazine_t) + - sizeof (void *) * skm->skm_size; - ASSERT(skm->skm_magic == SKM_MAGIC); ASSERT(skm->skm_avail == 0); - - kmem_free(skm, size); + kfree(skm); } /* @@ -835,6 +818,7 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags) { + gfp_t lflags = kmem_flags_convert(KM_SLEEP); spl_kmem_cache_t *skc; int rc; @@ -852,18 +836,17 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, * Allocate memory for a new cache and initialize it. Unfortunately, * this usually ends up being a large allocation of ~32k because * we need to allocate enough memory for the worst case number of - * cpus in the magazine, skc_mag[NR_CPUS]. Because of this we - * explicitly pass KM_NODEBUG to suppress the kmem warning + * cpus in the magazine, skc_mag[NR_CPUS]. */ - skc = kmem_zalloc(sizeof (*skc), KM_SLEEP| KM_NODEBUG); + skc = kzalloc(sizeof (*skc), lflags); if (skc == NULL) return (NULL); skc->skc_magic = SKC_MAGIC; skc->skc_name_size = strlen(name) + 1; - skc->skc_name = (char *)kmem_alloc(skc->skc_name_size, KM_SLEEP); + skc->skc_name = (char *)kmalloc(skc->skc_name_size, lflags); if (skc->skc_name == NULL) { - kmem_free(skc, sizeof (*skc)); + kfree(skc); return (NULL); } strncpy(skc->skc_name, name, skc->skc_name_size); @@ -962,7 +945,11 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, goto out; } - kmem_cache_set_allocflags(skc, __GFP_COMP); +#if defined(HAVE_KMEM_CACHE_ALLOCFLAGS) + skc->skc_linux_cache->allocflags |= __GFP_COMP; +#elif defined(HAVE_KMEM_CACHE_GFPFLAGS) + skc->skc_linux_cache->gfpflags |= __GFP_COMP; +#endif skc->skc_flags |= KMC_NOMAGAZINE; } @@ -977,8 +964,8 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, return (skc); out: - kmem_free(skc->skc_name, skc->skc_name_size); - kmem_free(skc, sizeof (*skc)); + kfree(skc->skc_name); + kfree(skc); return (NULL); } EXPORT_SYMBOL(spl_kmem_cache_create); @@ -1048,10 +1035,10 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) ASSERT3U(skc->skc_obj_emergency, ==, 0); ASSERT(list_empty(&skc->skc_complete_list)); - kmem_free(skc->skc_name, skc->skc_name_size); spin_unlock(&skc->skc_lock); - kmem_free(skc, sizeof (*skc)); + kfree(skc->skc_name); + kfree(skc); } EXPORT_SYMBOL(spl_kmem_cache_destroy); @@ -1106,7 +1093,13 @@ spl_cache_grow_work(void *data) spl_kmem_cache_t *skc = ska->ska_cache; spl_kmem_slab_t *sks; - sks = spl_slab_alloc(skc, ska->ska_flags | __GFP_NORETRY | KM_NODEBUG); +#if defined(PF_MEMALLOC_NOIO) + unsigned noio_flag = memalloc_noio_save(); + sks = spl_slab_alloc(skc, ska->ska_flags); + memalloc_noio_restore(noio_flag); +#else + sks = spl_slab_alloc(skc, ska->ska_flags); +#endif spin_lock(&skc->skc_lock); if (sks) { skc->skc_slab_total++; @@ -1140,8 +1133,9 @@ spl_cache_grow_wait(spl_kmem_cache_t *skc) static int spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) { - int remaining, rc; + int remaining, rc = 0; + ASSERT0(flags & ~KM_PUBLIC_MASK); ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT((skc->skc_flags & KMC_SLAB) == 0); might_sleep(); @@ -1166,7 +1160,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) if (test_and_set_bit(KMC_BIT_GROWING, &skc->skc_flags) == 0) { spl_kmem_alloc_t *ska; - ska = kmalloc(sizeof (*ska), flags); + ska = kmalloc(sizeof (*ska), kmem_flags_convert(flags)); if (ska == NULL) { clear_bit(KMC_BIT_GROWING, &skc->skc_flags); wake_up_all(&skc->skc_waitq); @@ -1175,7 +1169,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) atomic_inc(&skc->skc_ref); ska->ska_cache = skc; - ska->ska_flags = flags & ~__GFP_FS; + ska->ska_flags = flags; taskq_init_ent(&ska->ska_tqe); taskq_dispatch_ent(spl_kmem_cache_taskq, spl_cache_grow_work, ska, 0, &ska->ska_tqe); @@ -1347,9 +1341,9 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) spl_kmem_magazine_t *skm; void *obj = NULL; + ASSERT0(flags & ~KM_PUBLIC_MASK); ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - ASSERT(flags & KM_SLEEP); atomic_inc(&skc->skc_ref); @@ -1360,9 +1354,8 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) */ if (skc->skc_flags & KMC_SLAB) { struct kmem_cache *slc = skc->skc_linux_cache; - do { - obj = kmem_cache_alloc(slc, flags | __GFP_COMP); + obj = kmem_cache_alloc(slc, kmem_flags_convert(flags)); } while ((obj == NULL) && !(flags & KM_NOSLEEP)); goto ret; @@ -1445,7 +1438,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) * are guaranteed to have physical addresses. They must be removed * from the tree of emergency objects and the freed. */ - if ((skc->skc_flags & KMC_VMEM) && !kmem_virt(obj)) { + if ((skc->skc_flags & KMC_VMEM) && !is_vmalloc_addr(obj)) { spl_emergency_free(skc, obj); goto out; } diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 96ad2b043..4cd7cdbee 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -23,8 +23,47 @@ */ #include +#include #include #include +#include +#include + +/* + * As a general rule kmem_alloc() allocations should be small, preferably + * just a few pages since they must by physically contiguous. Therefore, a + * rate limited warning will be printed to the console for any kmem_alloc() + * which exceeds a reasonable threshold. + * + * The default warning threshold is set to eight pages but capped at 32K to + * accommodate systems using large pages. This value was selected to be small + * enough to ensure the largest allocations are quickly noticed and fixed. + * But large enough to avoid logging any warnings when a allocation size is + * larger than optimal but not a serious concern. Since this value is tunable, + * developers are encouraged to set it lower when testing so any new largish + * allocations are quickly caught. These warnings may be disabled by setting + * the threshold to zero. + */ +unsigned int spl_kmem_alloc_warn = MAX(8 * PAGE_SIZE, 32 * 1024); +module_param(spl_kmem_alloc_warn, uint, 0644); +MODULE_PARM_DESC(spl_kmem_alloc_warn, + "Warning threshold in bytes for a kmem_alloc()"); +EXPORT_SYMBOL(spl_kmem_alloc_warn); + +/* + * Large kmem_alloc() allocations will fail if they exceed KMALLOC_MAX_SIZE. + * Allocations which are marginally smaller than this limit may succeed but + * should still be avoided due to the expense of locating a contiguous range + * of free pages. Therefore, a maximum kmem size with reasonable safely + * margin of 4x is set. Kmem_alloc() allocations larger than this maximum + * will quickly fail. Vmem_alloc() allocations less than or equal to this + * value will use kmalloc(), but shift to vmalloc() when exceeding this value. + */ +unsigned int spl_kmem_alloc_max = (KMALLOC_MAX_SIZE >> 2); +module_param(spl_kmem_alloc_max, uint, 0644); +MODULE_PARM_DESC(spl_kmem_alloc_max, + "Maximum size in bytes for a kmem_alloc()"); +EXPORT_SYMBOL(spl_kmem_alloc_max); int kmem_debugging(void) @@ -72,7 +111,7 @@ __strdup(const char *str, int flags) int n; n = strlen(str); - ptr = kmalloc_nofail(n + 1, flags); + ptr = kmalloc(n + 1, kmem_flags_convert(flags)); if (ptr) memcpy(ptr, str, n + 1); @@ -94,10 +133,101 @@ strfree(char *str) EXPORT_SYMBOL(strfree); /* - * Memory allocation interfaces and debugging for basic kmem_* - * and vmem_* style memory allocation. When DEBUG_KMEM is enabled - * the SPL will keep track of the total memory allocated, and - * report any memory leaked when the module is unloaded. + * Limit the number of large allocation stack traces dumped to not more than + * 5 every 60 seconds to prevent denial-of-service attacks from debug code. + */ +DEFINE_RATELIMIT_STATE(kmem_alloc_ratelimit_state, 60 * HZ, 5); + +/* + * General purpose unified implementation of kmem_alloc(). It is an + * amalgamation of Linux and Illumos allocator design. It should never be + * exported to ensure that code using kmem_alloc()/kmem_zalloc() remains + * relatively portable. Consumers may only access this function through + * wrappers that enforce the common flags to ensure portability. + */ +inline void * +spl_kmem_alloc_impl(size_t size, int flags, int node) +{ + gfp_t lflags = kmem_flags_convert(flags); + void *ptr; + + /* + * Log abnormally large allocations and rate limit the console output. + * Allocations larger than spl_kmem_alloc_warn should be performed + * through the vmem_alloc()/vmem_zalloc() interfaces. + */ + if ((spl_kmem_alloc_warn > 0) && (size > spl_kmem_alloc_warn) && + !(flags & KM_VMEM) && __ratelimit(&kmem_alloc_ratelimit_state)) { + printk(KERN_WARNING + "Large kmem_alloc(%lu, 0x%x), please file an issue at:\n" + "https://github.com/zfsonlinux/zfs/issues/new\n", + (unsigned long)size, flags); + dump_stack(); + } + + /* + * Use a loop because kmalloc_node() can fail when GFP_KERNEL is used + * unlike kmem_alloc() with KM_SLEEP on Illumos. + */ + do { + /* + * Calling kmalloc_node() when the size >= spl_kmem_alloc_max + * is unsafe. This must fail for all for kmem_alloc() and + * kmem_zalloc() callers. + * + * For vmem_alloc() and vmem_zalloc() callers it is permissible + * to use __vmalloc(). However, in general use of __vmalloc() + * is strongly discouraged because a global lock must be + * acquired. Contention on this lock can significantly + * impact performance so frequently manipulating the virtual + * address space is strongly discouraged. + */ + if (unlikely(size > spl_kmem_alloc_max)) { + if (flags & KM_VMEM) { + ptr = __vmalloc(size, lflags, PAGE_KERNEL); + } else { + return (NULL); + } + } else { + ptr = kmalloc_node(size, lflags, node); + } + + if (likely(ptr) || (flags & KM_NOSLEEP)) + return (ptr); + + if (unlikely(__ratelimit(&kmem_alloc_ratelimit_state))) { + printk(KERN_WARNING + "Possible memory allocation deadlock: " + "size=%lu lflags=0x%x", + (unsigned long)size, lflags); + dump_stack(); + } + + /* + * Use cond_resched() instead of congestion_wait() to avoid + * deadlocking systems where there are no block devices. + */ + cond_resched(); + } while (1); + + return (NULL); +} + +inline void +spl_kmem_free_impl(const void *buf, size_t size) +{ + if (is_vmalloc_addr(buf)) + vfree(buf); + else + kfree(buf); +} + +/* + * Memory allocation and accounting for kmem_* * style allocations. When + * DEBUG_KMEM is enabled the total memory allocated will be tracked and + * any memory leaked will be reported during module unload. + * + * ./configure --enable-debug-kmem */ #ifdef DEBUG_KMEM @@ -113,6 +243,28 @@ unsigned long long kmem_alloc_max = 0; EXPORT_SYMBOL(kmem_alloc_used); EXPORT_SYMBOL(kmem_alloc_max); +inline void * +spl_kmem_alloc_debug(size_t size, int flags, int node) +{ + void *ptr; + + ptr = spl_kmem_alloc_impl(size, flags, node); + if (ptr) { + kmem_alloc_used_add(size); + if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) + kmem_alloc_max = kmem_alloc_used_read(); + } + + return (ptr); +} + +inline void +spl_kmem_free_debug(const void *ptr, size_t size) +{ + kmem_alloc_used_sub(size); + spl_kmem_free_impl(ptr, size); +} + /* * When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked * but also the location of every alloc and free. When the SPL module is @@ -124,9 +276,14 @@ EXPORT_SYMBOL(kmem_alloc_max); * contended particularly on xfree(). If we want to run with this detailed * debugging enabled for anything other than debugging we need to minimize * the contention by moving to a lock per xmem_table entry model. + * + * ./configure --enable-debug-kmem-tracking */ #ifdef DEBUG_KMEM_TRACKING +#include +#include + #define KMEM_HASH_BITS 10 #define KMEM_TABLE_SIZE (1 << KMEM_HASH_BITS) @@ -139,13 +296,9 @@ typedef struct kmem_debug { int kd_line; /* Allocation line */ } kmem_debug_t; -spinlock_t kmem_lock; -struct hlist_head kmem_table[KMEM_TABLE_SIZE]; -struct list_head kmem_list; - -EXPORT_SYMBOL(kmem_lock); -EXPORT_SYMBOL(kmem_table); -EXPORT_SYMBOL(kmem_list); +static spinlock_t kmem_lock; +static struct hlist_head kmem_table[KMEM_TABLE_SIZE]; +static struct list_head kmem_list; static kmem_debug_t * kmem_del_init(spinlock_t *lock, struct hlist_head *table, @@ -174,177 +327,113 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, return (NULL); } -void * -kmem_alloc_track(size_t size, int flags, const char *func, int line, - int node_alloc, int node) +inline void * +spl_kmem_alloc_track(size_t size, int flags, + const char *func, int line, int node) { void *ptr = NULL; kmem_debug_t *dptr; unsigned long irq_flags; - /* Function may be called with KM_NOSLEEP so failure is possible */ - dptr = (kmem_debug_t *) kmalloc_nofail(sizeof (kmem_debug_t), - flags & ~__GFP_ZERO); + dptr = kmalloc(sizeof (kmem_debug_t), kmem_flags_convert(flags)); + if (dptr == NULL) + return (NULL); - if (unlikely(dptr == NULL)) { - printk(KERN_WARNING "debug kmem_alloc(%ld, 0x%x) at %s:%d " - "failed (%lld/%llu)\n", sizeof (kmem_debug_t), flags, - func, line, kmem_alloc_used_read(), kmem_alloc_max); - } else { - /* - * Marked unlikely because we should never be doing this, - * we tolerate to up 2 pages but a single page is best. - */ - if (unlikely((size > PAGE_SIZE*2) && !(flags & KM_NODEBUG))) { - printk(KERN_WARNING "large kmem_alloc(%llu, 0x%x) " - "at %s:%d failed (%lld/%llu)\n", - (unsigned long long)size, flags, func, line, - kmem_alloc_used_read(), kmem_alloc_max); - spl_dumpstack(); - } - - /* - * We use __strdup() below because the string pointed to by - * __FUNCTION__ might not be available by the time we want - * to print it since the module might have been unloaded. - * This can only fail in the KM_NOSLEEP case. - */ - dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); - if (unlikely(dptr->kd_func == NULL)) { - kfree(dptr); - printk(KERN_WARNING "debug __strdup() at %s:%d " - "failed (%lld/%llu)\n", func, line, - kmem_alloc_used_read(), kmem_alloc_max); - goto out; - } - - /* Use the correct allocator */ - if (node_alloc) { - ASSERT(!(flags & __GFP_ZERO)); - ptr = kmalloc_node_nofail(size, flags, node); - } else if (flags & __GFP_ZERO) { - ptr = kzalloc_nofail(size, flags & ~__GFP_ZERO); - } else { - ptr = kmalloc_nofail(size, flags); - } - - if (unlikely(ptr == NULL)) { - kfree(dptr->kd_func); - kfree(dptr); - printk(KERN_WARNING "kmem_alloc(%llu, 0x%x) " - "at %s:%d failed (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, - kmem_alloc_used_read(), kmem_alloc_max); - goto out; - } - - kmem_alloc_used_add(size); - if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) - kmem_alloc_max = kmem_alloc_used_read(); - - INIT_HLIST_NODE(&dptr->kd_hlist); - INIT_LIST_HEAD(&dptr->kd_list); - - dptr->kd_addr = ptr; - dptr->kd_size = size; - dptr->kd_line = line; - - spin_lock_irqsave(&kmem_lock, irq_flags); - hlist_add_head(&dptr->kd_hlist, - &kmem_table[hash_ptr(ptr, KMEM_HASH_BITS)]); - list_add_tail(&dptr->kd_list, &kmem_list); - spin_unlock_irqrestore(&kmem_lock, irq_flags); + dptr->kd_func = __strdup(func, flags); + if (dptr->kd_func == NULL) { + kfree(dptr); + return (NULL); } -out: + + ptr = spl_kmem_alloc_debug(size, flags, node); + if (ptr == NULL) { + kfree(dptr->kd_func); + kfree(dptr); + return (NULL); + } + + INIT_HLIST_NODE(&dptr->kd_hlist); + INIT_LIST_HEAD(&dptr->kd_list); + + dptr->kd_addr = ptr; + dptr->kd_size = size; + dptr->kd_line = line; + + spin_lock_irqsave(&kmem_lock, irq_flags); + hlist_add_head(&dptr->kd_hlist, + &kmem_table[hash_ptr(ptr, KMEM_HASH_BITS)]); + list_add_tail(&dptr->kd_list, &kmem_list); + spin_unlock_irqrestore(&kmem_lock, irq_flags); + return (ptr); } -EXPORT_SYMBOL(kmem_alloc_track); -void -kmem_free_track(const void *ptr, size_t size) +inline void +spl_kmem_free_track(const void *ptr, size_t size) { kmem_debug_t *dptr; - ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, - (unsigned long long) size); - /* Must exist in hash due to kmem_alloc() */ dptr = kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr); - ASSERT(dptr); + ASSERT3P(dptr, !=, NULL); + ASSERT3S(dptr->kd_size, ==, size); - /* Size must match */ - ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " - "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, - (unsigned long long) size, dptr->kd_func, dptr->kd_line); - - kmem_alloc_used_sub(size); kfree(dptr->kd_func); - - memset((void *)dptr, 0x5a, sizeof (kmem_debug_t)); kfree(dptr); - memset((void *)ptr, 0x5a, size); - kfree(ptr); + spl_kmem_free_debug(ptr, size); } -EXPORT_SYMBOL(kmem_free_track); - -#else /* DEBUG_KMEM_TRACKING */ - -void * -kmem_alloc_debug(size_t size, int flags, const char *func, int line, - int node_alloc, int node) -{ - void *ptr; - - /* - * Marked unlikely because we should never be doing this, - * we tolerate to up 2 pages but a single page is best. - */ - if (unlikely((size > PAGE_SIZE * 2) && !(flags & KM_NODEBUG))) { - printk(KERN_WARNING - "large kmem_alloc(%llu, 0x%x) at %s:%d (%lld/%llu)\n", - (unsigned long long)size, flags, func, line, - (unsigned long long)kmem_alloc_used_read(), kmem_alloc_max); - spl_dumpstack(); - } - - /* Use the correct allocator */ - if (node_alloc) { - ASSERT(!(flags & __GFP_ZERO)); - ptr = kmalloc_node_nofail(size, flags, node); - } else if (flags & __GFP_ZERO) { - ptr = kzalloc_nofail(size, flags & (~__GFP_ZERO)); - } else { - ptr = kmalloc_nofail(size, flags); - } - - if (unlikely(ptr == NULL)) { - printk(KERN_WARNING - "kmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", - (unsigned long long)size, flags, func, line, - (unsigned long long)kmem_alloc_used_read(), kmem_alloc_max); - } else { - kmem_alloc_used_add(size); - if (unlikely(kmem_alloc_used_read() > kmem_alloc_max)) - kmem_alloc_max = kmem_alloc_used_read(); - } - - return (ptr); -} -EXPORT_SYMBOL(kmem_alloc_debug); - -void -kmem_free_debug(const void *ptr, size_t size) -{ - ASSERT(ptr || size > 0); - kmem_alloc_used_sub(size); - kfree(ptr); -} -EXPORT_SYMBOL(kmem_free_debug); - #endif /* DEBUG_KMEM_TRACKING */ #endif /* DEBUG_KMEM */ +/* + * Public kmem_alloc(), kmem_zalloc() and kmem_free() interfaces. + */ +void * +spl_kmem_alloc(size_t size, int flags, const char *func, int line) +{ + ASSERT0(flags & ~KM_PUBLIC_MASK); + +#if !defined(DEBUG_KMEM) + return (spl_kmem_alloc_impl(size, flags, NUMA_NO_NODE)); +#elif !defined(DEBUG_KMEM_TRACKING) + return (spl_kmem_alloc_debug(size, flags, NUMA_NO_NODE)); +#else + return (spl_kmem_alloc_track(size, flags, func, line, NUMA_NO_NODE)); +#endif +} +EXPORT_SYMBOL(spl_kmem_alloc); + +void * +spl_kmem_zalloc(size_t size, int flags, const char *func, int line) +{ + ASSERT0(flags & ~KM_PUBLIC_MASK); + + flags |= KM_ZERO; + +#if !defined(DEBUG_KMEM) + return (spl_kmem_alloc_impl(size, flags, NUMA_NO_NODE)); +#elif !defined(DEBUG_KMEM_TRACKING) + return (spl_kmem_alloc_debug(size, flags, NUMA_NO_NODE)); +#else + return (spl_kmem_alloc_track(size, flags, func, line, NUMA_NO_NODE)); +#endif +} +EXPORT_SYMBOL(spl_kmem_zalloc); + +void +spl_kmem_free(const void *buf, size_t size) +{ +#if !defined(DEBUG_KMEM) + return (spl_kmem_free_impl(buf, size)); +#elif !defined(DEBUG_KMEM_TRACKING) + return (spl_kmem_free_debug(buf, size)); +#else + return (spl_kmem_free_track(buf, size)); +#endif +} +EXPORT_SYMBOL(spl_kmem_free); + #if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) static char * spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) @@ -424,22 +513,20 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) spin_unlock_irqrestore(lock, flags); } -#else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ -#define spl_kmem_init_tracking(list, lock, size) -#define spl_kmem_fini_tracking(list, lock) #endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ int spl_kmem_init(void) { - int rc = 0; - #ifdef DEBUG_KMEM kmem_alloc_used_set(0); - spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); -#endif - return (rc); +#ifdef DEBUG_KMEM_TRACKING + spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE); +#endif /* DEBUG_KMEM_TRACKING */ +#endif /* DEBUG_KMEM */ + + return (0); } void @@ -454,8 +541,10 @@ spl_kmem_fini(void) */ if (kmem_alloc_used_read() != 0) printk(KERN_WARNING "kmem leaked %ld/%llu bytes\n", - kmem_alloc_used_read(), kmem_alloc_max); + (unsigned long)kmem_alloc_used_read(), kmem_alloc_max); +#ifdef DEBUG_KMEM_TRACKING spl_kmem_fini_tracking(&kmem_list, &kmem_lock); +#endif /* DEBUG_KMEM_TRACKING */ #endif /* DEBUG_KMEM */ } diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index e5712aee0..a434ef54f 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -353,26 +353,6 @@ static struct ctl_table spl_kmem_table[] = { .mode = 0444, .proc_handler = &proc_doulongvec_minmax, }, - { - .procname = "vmem_used", - .data = &vmem_alloc_used, -# ifdef HAVE_ATOMIC64_T - .maxlen = sizeof(atomic64_t), -# else - .maxlen = sizeof(atomic_t), -# endif /* HAVE_ATOMIC64_T */ - .mode = 0444, - .proc_handler = &proc_domemused, - }, - { - .procname = "vmem_max", - .data = &vmem_alloc_max, - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doulongvec_minmax, - }, { .procname = "slab_kmem_total", .data = (void *)(KMC_KMEM | KMC_TOTAL), diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index f4f81048c..9a0987527 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -337,8 +337,7 @@ tsd_hash_table_init(uint_t bits) if (table == NULL) return (NULL); - table->ht_bins = kmem_zalloc(sizeof(tsd_hash_bin_t) * size, - KM_SLEEP | KM_NODEBUG); + table->ht_bins = kmem_zalloc(sizeof(tsd_hash_bin_t) * size, KM_SLEEP); if (table->ht_bins == NULL) { kmem_free(table, sizeof(tsd_hash_table_t)); return (NULL); diff --git a/module/spl/spl-vmem.c b/module/spl/spl-vmem.c index 51aef941b..e177988a7 100644 --- a/module/spl/spl-vmem.c +++ b/module/spl/spl-vmem.c @@ -24,6 +24,7 @@ #include #include +#include #include vmem_t *heap_arena = NULL; @@ -47,314 +48,62 @@ vmem_size(vmem_t *vmp, int typemask) EXPORT_SYMBOL(vmem_size); /* - * Memory allocation interfaces and debugging for basic kmem_* - * and vmem_* style memory allocation. When DEBUG_KMEM is enabled - * the SPL will keep track of the total memory allocated, and - * report any memory leaked when the module is unloaded. + * Public vmem_alloc(), vmem_zalloc() and vmem_free() interfaces. */ -#ifdef DEBUG_KMEM +void * +spl_vmem_alloc(size_t size, int flags, const char *func, int line) +{ + ASSERT0(flags & ~KM_PUBLIC_MASK); -/* Shim layer memory accounting */ -#ifdef HAVE_ATOMIC64_T -atomic64_t vmem_alloc_used = ATOMIC64_INIT(0); -unsigned long long vmem_alloc_max = 0; -#else /* HAVE_ATOMIC64_T */ -atomic_t vmem_alloc_used = ATOMIC_INIT(0); -unsigned long long vmem_alloc_max = 0; -#endif /* HAVE_ATOMIC64_T */ + flags |= KM_VMEM; -EXPORT_SYMBOL(vmem_alloc_used); -EXPORT_SYMBOL(vmem_alloc_max); - -/* - * When DEBUG_KMEM_TRACKING is enabled not only will total bytes be tracked - * but also the location of every alloc and free. When the SPL module is - * unloaded a list of all leaked addresses and where they were allocated - * will be dumped to the console. Enabling this feature has a significant - * impact on performance but it makes finding memory leaks straight forward. - * - * Not surprisingly with debugging enabled the xmem_locks are very highly - * contended particularly on xfree(). If we want to run with this detailed - * debugging enabled for anything other than debugging we need to minimize - * the contention by moving to a lock per xmem_table entry model. - */ -#ifdef DEBUG_KMEM_TRACKING - -#define VMEM_HASH_BITS 10 -#define VMEM_TABLE_SIZE (1 << VMEM_HASH_BITS) - -typedef struct kmem_debug { - struct hlist_node kd_hlist; /* Hash node linkage */ - struct list_head kd_list; /* List of all allocations */ - void *kd_addr; /* Allocation pointer */ - size_t kd_size; /* Allocation size */ - const char *kd_func; /* Allocation function */ - int kd_line; /* Allocation line */ -} kmem_debug_t; - -spinlock_t vmem_lock; -struct hlist_head vmem_table[VMEM_TABLE_SIZE]; -struct list_head vmem_list; - -EXPORT_SYMBOL(vmem_lock); -EXPORT_SYMBOL(vmem_table); -EXPORT_SYMBOL(vmem_list); +#if !defined(DEBUG_KMEM) + return (spl_kmem_alloc_impl(size, flags, NUMA_NO_NODE)); +#elif !defined(DEBUG_KMEM_TRACKING) + return (spl_kmem_alloc_debug(size, flags, NUMA_NO_NODE)); +#else + return (spl_kmem_alloc_track(size, flags, func, line, NUMA_NO_NODE)); +#endif +} +EXPORT_SYMBOL(spl_vmem_alloc); void * -vmem_alloc_track(size_t size, int flags, const char *func, int line) +spl_vmem_zalloc(size_t size, int flags, const char *func, int line) { - void *ptr = NULL; - kmem_debug_t *dptr; - unsigned long irq_flags; + ASSERT0(flags & ~KM_PUBLIC_MASK); - ASSERT(flags & KM_SLEEP); + flags |= (KM_VMEM | KM_ZERO); - /* Function may be called with KM_NOSLEEP so failure is possible */ - dptr = (kmem_debug_t *) kmalloc_nofail(sizeof (kmem_debug_t), - flags & ~__GFP_ZERO); - if (unlikely(dptr == NULL)) { - printk(KERN_WARNING "debug vmem_alloc(%ld, 0x%x) " - "at %s:%d failed (%lld/%llu)\n", - sizeof (kmem_debug_t), flags, func, line, - vmem_alloc_used_read(), vmem_alloc_max); - } else { - /* - * We use __strdup() below because the string pointed to by - * __FUNCTION__ might not be available by the time we want - * to print it, since the module might have been unloaded. - * This can never fail because we have already asserted - * that flags is KM_SLEEP. - */ - dptr->kd_func = __strdup(func, flags & ~__GFP_ZERO); - if (unlikely(dptr->kd_func == NULL)) { - kfree(dptr); - printk(KERN_WARNING "debug __strdup() at %s:%d " - "failed (%lld/%llu)\n", func, line, - vmem_alloc_used_read(), vmem_alloc_max); - goto out; - } - - /* Use the correct allocator */ - if (flags & __GFP_ZERO) { - ptr = vzalloc_nofail(size, flags & ~__GFP_ZERO); - } else { - ptr = vmalloc_nofail(size, flags); - } - - if (unlikely(ptr == NULL)) { - kfree(dptr->kd_func); - kfree(dptr); - printk(KERN_WARNING "vmem_alloc (%llu, 0x%x) " - "at %s:%d failed (%lld/%llu)\n", - (unsigned long long) size, flags, func, line, - vmem_alloc_used_read(), vmem_alloc_max); - goto out; - } - - vmem_alloc_used_add(size); - if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) - vmem_alloc_max = vmem_alloc_used_read(); - - INIT_HLIST_NODE(&dptr->kd_hlist); - INIT_LIST_HEAD(&dptr->kd_list); - - dptr->kd_addr = ptr; - dptr->kd_size = size; - dptr->kd_line = line; - - spin_lock_irqsave(&vmem_lock, irq_flags); - hlist_add_head(&dptr->kd_hlist, - &vmem_table[hash_ptr(ptr, VMEM_HASH_BITS)]); - list_add_tail(&dptr->kd_list, &vmem_list); - spin_unlock_irqrestore(&vmem_lock, irq_flags); - } -out: - return (ptr); +#if !defined(DEBUG_KMEM) + return (spl_kmem_alloc_impl(size, flags, NUMA_NO_NODE)); +#elif !defined(DEBUG_KMEM_TRACKING) + return (spl_kmem_alloc_debug(size, flags, NUMA_NO_NODE)); +#else + return (spl_kmem_alloc_track(size, flags, func, line, NUMA_NO_NODE)); +#endif } -EXPORT_SYMBOL(vmem_alloc_track); +EXPORT_SYMBOL(spl_vmem_zalloc); void -vmem_free_track(const void *ptr, size_t size) +spl_vmem_free(const void *buf, size_t size) { - kmem_debug_t *dptr; - - ASSERTF(ptr || size > 0, "ptr: %p, size: %llu", ptr, - (unsigned long long) size); - - /* Must exist in hash due to vmem_alloc() */ - dptr = kmem_del_init(&vmem_lock, vmem_table, VMEM_HASH_BITS, ptr); - ASSERT(dptr); - - /* Size must match */ - ASSERTF(dptr->kd_size == size, "kd_size (%llu) != size (%llu), " - "kd_func = %s, kd_line = %d\n", (unsigned long long) dptr->kd_size, - (unsigned long long) size, dptr->kd_func, dptr->kd_line); - - vmem_alloc_used_sub(size); - kfree(dptr->kd_func); - - memset((void *)dptr, 0x5a, sizeof (kmem_debug_t)); - kfree(dptr); - - memset((void *)ptr, 0x5a, size); - vfree(ptr); +#if !defined(DEBUG_KMEM) + return (spl_kmem_free_impl(buf, size)); +#elif !defined(DEBUG_KMEM_TRACKING) + return (spl_kmem_free_debug(buf, size)); +#else + return (spl_kmem_free_track(buf, size)); +#endif } -EXPORT_SYMBOL(vmem_free_track); - -#else /* DEBUG_KMEM_TRACKING */ - -void * -vmem_alloc_debug(size_t size, int flags, const char *func, int line) -{ - void *ptr; - - ASSERT(flags & KM_SLEEP); - - /* Use the correct allocator */ - if (flags & __GFP_ZERO) { - ptr = vzalloc_nofail(size, flags & (~__GFP_ZERO)); - } else { - ptr = vmalloc_nofail(size, flags); - } - - if (unlikely(ptr == NULL)) { - printk(KERN_WARNING - "vmem_alloc(%llu, 0x%x) at %s:%d failed (%lld/%llu)\n", - (unsigned long long)size, flags, func, line, - (unsigned long long)vmem_alloc_used_read(), vmem_alloc_max); - } else { - vmem_alloc_used_add(size); - if (unlikely(vmem_alloc_used_read() > vmem_alloc_max)) - vmem_alloc_max = vmem_alloc_used_read(); - } - - return (ptr); -} -EXPORT_SYMBOL(vmem_alloc_debug); - -void -vmem_free_debug(const void *ptr, size_t size) -{ - ASSERT(ptr || size > 0); - vmem_alloc_used_sub(size); - vfree(ptr); -} -EXPORT_SYMBOL(vmem_free_debug); - -#endif /* DEBUG_KMEM_TRACKING */ -#endif /* DEBUG_KMEM */ - -#if defined(DEBUG_KMEM) && defined(DEBUG_KMEM_TRACKING) -static char * -spl_sprintf_addr(kmem_debug_t *kd, char *str, int len, int min) -{ - int size = ((len - 1) < kd->kd_size) ? (len - 1) : kd->kd_size; - int i, flag = 1; - - ASSERT(str != NULL && len >= 17); - memset(str, 0, len); - - /* - * Check for a fully printable string, and while we are at - * it place the printable characters in the passed buffer. - */ - for (i = 0; i < size; i++) { - str[i] = ((char *)(kd->kd_addr))[i]; - if (isprint(str[i])) { - continue; - } else { - /* - * Minimum number of printable characters found - * to make it worthwhile to print this as ascii. - */ - if (i > min) - break; - - flag = 0; - break; - } - } - - if (!flag) { - sprintf(str, "%02x%02x%02x%02x%02x%02x%02x%02x", - *((uint8_t *)kd->kd_addr), - *((uint8_t *)kd->kd_addr + 2), - *((uint8_t *)kd->kd_addr + 4), - *((uint8_t *)kd->kd_addr + 6), - *((uint8_t *)kd->kd_addr + 8), - *((uint8_t *)kd->kd_addr + 10), - *((uint8_t *)kd->kd_addr + 12), - *((uint8_t *)kd->kd_addr + 14)); - } - - return (str); -} - -static int -spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) -{ - int i; - - spin_lock_init(lock); - INIT_LIST_HEAD(list); - - for (i = 0; i < size; i++) - INIT_HLIST_HEAD(&kmem_table[i]); - - return (0); -} - -static void -spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) -{ - unsigned long flags; - kmem_debug_t *kd; - char str[17]; - - spin_lock_irqsave(lock, flags); - if (!list_empty(list)) - printk(KERN_WARNING "%-16s %-5s %-16s %s:%s\n", "address", - "size", "data", "func", "line"); - - list_for_each_entry(kd, list, kd_list) - printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr, - (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), - kd->kd_func, kd->kd_line); - - spin_unlock_irqrestore(lock, flags); -} -#else /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ -#define spl_kmem_init_tracking(list, lock, size) -#define spl_kmem_fini_tracking(list, lock) -#endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */ +EXPORT_SYMBOL(spl_vmem_free); int spl_vmem_init(void) { - int rc = 0; - -#ifdef DEBUG_KMEM - vmem_alloc_used_set(0); - spl_kmem_init_tracking(&vmem_list, &vmem_lock, VMEM_TABLE_SIZE); -#endif - - return (rc); + return (0); } void spl_vmem_fini(void) { -#ifdef DEBUG_KMEM - /* - * Display all unreclaimed memory addresses, including the - * allocation size and the first few bytes of what's located - * at that address to aid in debugging. Performance is not - * a serious concern here since it is module unload time. - */ - if (vmem_alloc_used_read() != 0) - printk(KERN_WARNING "vmem leaked %ld/%llu bytes\n", - vmem_alloc_used_read(), vmem_alloc_max); - - spl_kmem_fini_tracking(&vmem_list, &vmem_lock); -#endif /* DEBUG_KMEM */ } diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 7edc85990..81f748bb6 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -95,11 +95,11 @@ splat_kmem_test1(struct file *file, void *arg) int size = PAGE_SIZE; int i, count, rc = 0; - while ((!rc) && (size <= (PAGE_SIZE * 32))) { + while ((!rc) && (size <= spl_kmem_alloc_warn)) { count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_alloc(size, KM_SLEEP | KM_NODEBUG); + ptr[i] = kmem_alloc(size, KM_SLEEP); if (ptr[i]) count++; } @@ -127,11 +127,11 @@ splat_kmem_test2(struct file *file, void *arg) int size = PAGE_SIZE; int i, j, count, rc = 0; - while ((!rc) && (size <= (PAGE_SIZE * 32))) { + while ((!rc) && (size <= spl_kmem_alloc_warn)) { count = 0; for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_zalloc(size, KM_SLEEP | KM_NODEBUG); + ptr[i] = kmem_zalloc(size, KM_SLEEP); if (ptr[i]) count++; } @@ -171,7 +171,11 @@ splat_kmem_test3(struct file *file, void *arg) int size = PAGE_SIZE; int i, count, rc = 0; - while ((!rc) && (size <= (PAGE_SIZE * 1024))) { + /* + * Test up to 4x the maximum kmem_alloc() size to ensure both + * the kmem_alloc() and vmem_alloc() call paths are used. + */ + while ((!rc) && (size <= (4 * spl_kmem_alloc_max))) { count = 0; for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { @@ -203,7 +207,11 @@ splat_kmem_test4(struct file *file, void *arg) int size = PAGE_SIZE; int i, j, count, rc = 0; - while ((!rc) && (size <= (PAGE_SIZE * 1024))) { + /* + * Test up to 4x the maximum kmem_zalloc() size to ensure both + * the kmem_zalloc() and vmem_zalloc() call paths are used. + */ + while ((!rc) && (size <= (4 * spl_kmem_alloc_max))) { count = 0; for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { From c2fa09454ef322a34df58655978e79c1c7fab641 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 13 Jul 2014 14:45:20 -0400 Subject: [PATCH 0858/1062] Add hooks for disabling direct reclaim The port of XFS to Linux introduced a thread-specific PF_FSTRANS bit that is used to mark contexts which are processing transactions. When set, allocations in this context can dip into kernel memory reserves to avoid deadlocks during writeback. Linux 3.9 provided the additional PF_MEMALLOC_NOIO for disabling __GFP_IO in page allocations, which XFS began using in 3.15. This patch implements hooks for marking transactions via PF_FSTRANS. When an allocation is performed in the context of PF_FSTRANS, any KM_SLEEP allocation is transparently converted to a GFP_NOIO allocation. Additionally, when using a Linux 3.9 or newer kernel, it will set PF_MEMALLOC_NOIO to prevent direct reclaim from entering pageout() on on any KM_PUSHPAGE or KM_NOSLEEP allocation. This effectively allows the spl_vmalloc() helper function to be used safely in a thread which is responsible for IO. Signed-off-by: Brian Behlendorf --- include/sys/kmem.h | 34 ++++++++++++++++++++++++++++++++++ include/sys/vmem.h | 1 + module/spl/spl-kmem-cache.c | 4 +++- module/spl/spl-kmem.c | 2 +- module/spl/spl-vmem.c | 25 +++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 2 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 045d07c2c..8d5e72937 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -25,6 +25,7 @@ #ifndef _SPL_KMEM_H #define _SPL_KMEM_H +#include #include #include @@ -72,6 +73,39 @@ kmem_flags_convert(int flags) return (lflags); } +typedef struct { + struct task_struct *fstrans_thread; + unsigned int saved_flags; +} fstrans_cookie_t; + +static inline fstrans_cookie_t +spl_fstrans_mark(void) +{ + fstrans_cookie_t cookie; + + cookie.fstrans_thread = current; + cookie.saved_flags = current->flags & PF_FSTRANS; + current->flags |= PF_FSTRANS; + + return (cookie); +} + +static inline void +spl_fstrans_unmark(fstrans_cookie_t cookie) +{ + ASSERT3P(cookie.fstrans_thread, ==, current); + ASSERT(current->flags & PF_FSTRANS); + + current->flags &= ~(PF_FSTRANS); + current->flags |= cookie.saved_flags; +} + +static inline int +spl_fstrans_check(void) +{ + return (current->flags & PF_FSTRANS); +} + #ifdef HAVE_ATOMIC64_T #define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used) #define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used) diff --git a/include/sys/vmem.h b/include/sys/vmem.h index 6eb2c6769..8aadc9d03 100644 --- a/include/sys/vmem.h +++ b/include/sys/vmem.h @@ -36,6 +36,7 @@ extern vmem_t *zio_alloc_arena; extern vmem_t *zio_arena; extern size_t vmem_size(vmem_t *vmp, int typemask); +extern void *spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot); /* * Memory allocation interfaces diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 9a8ccfe42..f8edb44a9 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -153,7 +153,7 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) if (skc->skc_flags & KMC_KMEM) ptr = (void *)__get_free_pages(lflags, get_order(size)); else - ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL); + ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL); /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); @@ -1098,7 +1098,9 @@ spl_cache_grow_work(void *data) sks = spl_slab_alloc(skc, ska->ska_flags); memalloc_noio_restore(noio_flag); #else + fstrans_cookie_t cookie = spl_fstrans_mark(); sks = spl_slab_alloc(skc, ska->ska_flags); + spl_fstrans_unmark(cookie); #endif spin_lock(&skc->skc_lock); if (sks) { diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 4cd7cdbee..914f0fbf7 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -184,7 +184,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node) */ if (unlikely(size > spl_kmem_alloc_max)) { if (flags & KM_VMEM) { - ptr = __vmalloc(size, lflags, PAGE_KERNEL); + ptr = spl_vmalloc(size, lflags, PAGE_KERNEL); } else { return (NULL); } diff --git a/module/spl/spl-vmem.c b/module/spl/spl-vmem.c index e177988a7..bca27f263 100644 --- a/module/spl/spl-vmem.c +++ b/module/spl/spl-vmem.c @@ -97,6 +97,31 @@ spl_vmem_free(const void *buf, size_t size) } EXPORT_SYMBOL(spl_vmem_free); +/* + * Public vmalloc() interface designed to be safe to be called during I/O. + */ +void * +spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot) +{ +#if defined(PF_MEMALLOC_NOIO) + void *ptr; + unsigned noio_flag = 0; + + if (spl_fstrans_check()) + noio_flag = memalloc_noio_save(); + + ptr = __vmalloc(size, lflags, prot); + + if (spl_fstrans_check()) + memalloc_noio_restore(noio_flag); + + return (ptr); +#else + return (__vmalloc(size, lflags, prot)); +#endif +} +EXPORT_SYMBOL(spl_vmalloc); + int spl_vmem_init(void) { From a988a35a93671c086c38ce5b71b6badb59a9c2de Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 4 Dec 2014 18:47:51 -0500 Subject: [PATCH 0859/1062] Enforce architecture-specific barriers around clear_bit() The comment above the Linux 3.16 kernel's clear_bit() states: /** * clear_bit - Clears a bit in memory * @nr: Bit to clear * @addr: Address to start counting from * * clear_bit() is atomic and may not be reordered. However, it does * not contain a memory barrier, so if it is used for locking purposes, * you should call smp_mb__before_atomic() and/or smp_mb__after_atomic() * in order to ensure changes are visible on other processors. */ This comment does not make sense in the context of x86 because x86 maps the operations to barrier(), which is a compiler barrier. However, it does make sense to me when I consider architectures that reorder around atomic instructions. In such situations, a processor is allowed to execute the wake_up_bit() before clear_bit() and we have a race. There are a few architectures that suffer from this issue. In such situations, the other processor would wake-up, see the bit is still taken and go to sleep, while the one responsible for waking it up will assume that it did its job and continue. This patch implements a wrapper that maps smp_mb__{before,after}_atomic() to smp_mb__{before,after}_clear_bit() on older kernels and changes our code to leverage it in a manner consistent with the mainline kernel. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem-cache.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index f8edb44a9..22e4548ca 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -42,6 +42,20 @@ #undef kmem_cache_free +/* + * Linux 3.16 replaced smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() + * with smp_mb__{before,after}_atomic() because they were redundant. This is + * only used inside our SLAB allocator, so we implement an internal wrapper + * here to give us smp_mb__{before,after}_atomic() on older kernels. + */ +#ifndef smp_mb__before_atomic +#define smp_mb__before_atomic(x) smp_mb__before_clear_bit(x) +#endif + +#ifndef smp_mb__after_atomic +#define smp_mb__after_atomic(x) smp_mb__after_clear_bit(x) +#endif + /* * Cache expiration was implemented because it was part of the default Solaris * kmem_cache behavior. The idea is that per-cpu objects which haven't been @@ -1110,8 +1124,10 @@ spl_cache_grow_work(void *data) } atomic_dec(&skc->skc_ref); + smp_mb__before_atomic(); clear_bit(KMC_BIT_GROWING, &skc->skc_flags); clear_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); + smp_mb__after_atomic(); wake_up_all(&skc->skc_waitq); spin_unlock(&skc->skc_lock); @@ -1164,7 +1180,8 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) ska = kmalloc(sizeof (*ska), kmem_flags_convert(flags)); if (ska == NULL) { - clear_bit(KMC_BIT_GROWING, &skc->skc_flags); + clear_bit_unlock(KMC_BIT_GROWING, &skc->skc_flags); + smp_mb__after_atomic(); wake_up_all(&skc->skc_waitq); return (-ENOMEM); } @@ -1616,8 +1633,8 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) } spl_slab_reclaim(skc, count, 1); - clear_bit(KMC_BIT_REAPING, &skc->skc_flags); - smp_wmb(); + clear_bit_unlock(KMC_BIT_REAPING, &skc->skc_flags); + smp_mb__after_atomic(); wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); out: atomic_dec(&skc->skc_ref); From 1a20496834f4f270a45c68fd67ade7643442652f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 5 Dec 2014 17:11:18 -0500 Subject: [PATCH 0860/1062] Make slab reclaim more aggressive Many people have noticed that the kmem cache implementation is slow to release its memory. This patch makes the reclaim behavior more aggressive by immediately freeing a slab once it is empty. Unused objects which are cached in the magazines will still prevent a slab from being freed. Signed-off-by: Brian Behlendorf --- man/man5/spl-module-parameters.5 | 22 +++++++++ module/spl/spl-kmem-cache.c | 76 ++++++++++++++++++++------------ 2 files changed, 69 insertions(+), 29 deletions(-) diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 2ec5b668e..5b7ee8325 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -120,6 +120,28 @@ value will use kmalloc(), but shift to vmalloc() when exceeding this value. Default value: \fBKMALLOC_MAX_SIZE/4\fR. .RE +.sp +.ne 2 +.na +\fBspl_kmem_cache_magazine_size\fR (uint) +.ad +.RS 12n +Cache magazines are an optimization designed to minimize the cost of +allocating memory. They do this by keeping a per-cpu cache of recently +freed objects, which can then be reallocated without taking a lock. This +can improve performance on highly contended caches. However, because +objects in magazines will prevent otherwise empty slabs from being +immediately released this may not be ideal for low memory machines. +.sp +For this reason \fBspl_kmem_cache_magazine_size\fR can be used to set a +maximum magazine size. When this value is set to 0 the magazine size will +be automatically determined based on the object size. Otherwise magazines +will be limited to 2-256 objects per magazine (i.e per cpu). Magazines +may never be entirely disabled in this implementation. +.sp +Default value: \fB0\fR. +.RE + .sp .ne 2 .na diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 22e4548ca..a68852ed7 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -70,6 +70,25 @@ EXPORT_SYMBOL(spl_kmem_cache_expire); module_param(spl_kmem_cache_expire, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); +/* + * Cache magazines are an optimization designed to minimize the cost of + * allocating memory. They do this by keeping a per-cpu cache of recently + * freed objects, which can then be reallocated without taking a lock. This + * can improve performance on highly contended caches. However, because + * objects in magazines will prevent otherwise empty slabs from being + * immediately released this may not be ideal for low memory machines. + * + * For this reason spl_kmem_cache_magazine_size can be used to set a maximum + * magazine size. When this value is set to 0 the magazine size will be + * automatically determined based on the object size. Otherwise magazines + * will be limited to 2-256 objects per magazine (i.e per cpu). Magazines + * may never be entirely disabled in this implementation. + */ +unsigned int spl_kmem_cache_magazine_size = 0; +module_param(spl_kmem_cache_magazine_size, uint, 0444); +MODULE_PARM_DESC(spl_kmem_cache_magazine_size, + "Default magazine size (2-256), set automatically (0)\n"); + /* * The default behavior is to report the number of objects remaining in the * cache. This allows the Linux VM to repeatedly reclaim objects from the @@ -362,45 +381,31 @@ spl_slab_free(spl_kmem_slab_t *sks, } /* - * Traverse all the partial slabs attached to a cache and free those which - * are currently empty, and have not been touched for skc_delay seconds to - * avoid thrashing. The count argument is passed to optionally cap the - * number of slabs reclaimed, a count of zero means try and reclaim - * everything. When flag the is set available slabs freed regardless of age. + * Reclaim empty slabs at the end of the partial list. */ static void -spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag) +spl_slab_reclaim(spl_kmem_cache_t *skc) { spl_kmem_slab_t *sks, *m; spl_kmem_obj_t *sko, *n; LIST_HEAD(sks_list); LIST_HEAD(sko_list); uint32_t size = 0; - int i = 0; /* - * Move empty slabs and objects which have not been touched in - * skc_delay seconds on to private lists to be freed outside - * the spin lock. This delay time is important to avoid thrashing - * however when flag is set the delay will not be used. + * Empty slabs and objects must be moved to a private list so they + * can be safely freed outside the spin lock. All empty slabs are + * at the end of skc->skc_partial_list, therefore once a non-empty + * slab is found we can stop scanning. */ spin_lock(&skc->skc_lock); list_for_each_entry_safe_reverse(sks, m, &skc->skc_partial_list, sks_list) { - /* - * All empty slabs are at the end of skc->skc_partial_list, - * therefore once a non-empty slab is found we can stop - * scanning. Additionally, stop when reaching the target - * reclaim 'count' if a non-zero threshold is given. - */ - if ((sks->sks_ref > 0) || (count && i >= count)) + + if (sks->sks_ref > 0) break; - if (time_after(jiffies, sks->sks_age + skc->skc_delay * HZ) || - flag) { - spl_slab_free(sks, &sks_list, &sko_list); - i++; - } + spl_slab_free(sks, &sks_list, &sko_list); } spin_unlock(&skc->skc_lock); @@ -633,7 +638,7 @@ spl_cache_age(void *data) if (!(skc->skc_flags & KMC_NOMAGAZINE)) on_each_cpu(spl_magazine_age, skc, 1); - spl_slab_reclaim(skc, skc->skc_reap, 0); + spl_slab_reclaim(skc); while (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags) && !id) { id = taskq_dispatch_delay( @@ -710,6 +715,9 @@ spl_magazine_size(spl_kmem_cache_t *skc) uint32_t obj_size = spl_obj_size(skc); int size; + if (spl_kmem_cache_magazine_size > 0) + return (MAX(MIN(spl_kmem_cache_magazine_size, 256), 2)); + /* Per-magazine sizes below assume a 4Kib page size */ if (obj_size > (PAGE_SIZE * 256)) size = 4; /* Minimum 4Mib per-magazine */ @@ -1030,7 +1038,7 @@ spl_kmem_cache_destroy(spl_kmem_cache_t *skc) if (skc->skc_flags & (KMC_KMEM | KMC_VMEM)) { spl_magazine_destroy(skc); - spl_slab_reclaim(skc, 0, 1); + spl_slab_reclaim(skc); } else { ASSERT(skc->skc_flags & KMC_SLAB); kmem_cache_destroy(skc->skc_linux_cache); @@ -1433,6 +1441,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) { spl_kmem_magazine_t *skm; unsigned long flags; + int do_reclaim = 0; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); @@ -1473,14 +1482,23 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) skm = skc->skc_mag[smp_processor_id()]; ASSERT(skm->skm_magic == SKM_MAGIC); - /* Per-CPU cache full, flush it to make space */ - if (unlikely(skm->skm_avail >= skm->skm_size)) + /* + * Per-CPU cache full, flush it to make space for this object, + * this may result in an empty slab which can be reclaimed once + * interrupts are re-enabled. + */ + if (unlikely(skm->skm_avail >= skm->skm_size)) { spl_cache_flush(skc, skm, skm->skm_refill); + do_reclaim = 1; + } /* Available space in cache, use it */ skm->skm_objs[skm->skm_avail++] = obj; local_irq_restore(flags); + + if (do_reclaim) + spl_slab_reclaim(skc); out: atomic_dec(&skc->skc_ref); } @@ -1621,7 +1639,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) } while (do_reclaim); } - /* Reclaim from the magazine then the slabs ignoring age and delay. */ + /* Reclaim from the magazine and free all now empty slabs. */ if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) { spl_kmem_magazine_t *skm; unsigned long irq_flags; @@ -1632,7 +1650,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) local_irq_restore(irq_flags); } - spl_slab_reclaim(skc, count, 1); + spl_slab_reclaim(skc); clear_bit_unlock(KMC_BIT_REAPING, &skc->skc_flags); smp_mb__after_atomic(); wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING); From b1c3ae48a7d1ec40d86218e60c928f093a898238 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 5 Dec 2014 18:31:24 -0500 Subject: [PATCH 0861/1062] Update spl-module-parameters(5) man page The spl-module-parameters(5) was not kept up to date. Refresh the man page so that it lists all the possible module options, describes what the do, and justify why the default values are set they way the are. Signed-off-by: Brian Behlendorf --- man/man5/spl-module-parameters.5 | 209 +++++++++++++++++++++---------- 1 file changed, 142 insertions(+), 67 deletions(-) diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 5b7ee8325..27c7bfd48 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -14,70 +14,138 @@ Description of the different parameters to the SPL module. .sp .LP -.sp -.ne 2 -.na -\fBspl_debug_subsys\fR (ulong) -.ad -.RS 12n -Subsystem debugging level mask. -.sp -Default value: \fB~0\fR. -.RE - -.sp -.ne 2 -.na -\fBspl_debug_mask\fR (ulong) -.ad -.RS 12n -Debugging level mask. -.sp -Default value: \fB8 | 10 | 4 | 20\fR (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE). -.RE - -.sp -.ne 2 -.na -\fBspl_debug_printk\fR (ulong) -.ad -.RS 12n -Console printk level mask. -.sp -Default value: \fB8 | 10 | 4 | 20\fR (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE). -.RE - -.sp -.ne 2 -.na -\fBspl_debug_mb\fR (int) -.ad -.RS 12n -Total debug buffer size. -.sp -Default value: \fB-1\fR. -.RE - -.sp -.ne 2 -.na -\fBspl_debug_panic_on_bug\fR (int) -.ad -.RS 12n -Panic on BUG -.sp -Use \fB1\fR for yes and \fB0\fR for no (default). -.RE - .sp .ne 2 .na \fBspl_kmem_cache_expire\fR (uint) .ad .RS 12n -By age (0x1) or low memory (0x2) +Cache expiration is part of default Illumos cache behavior. The idea is +that objects in magazines which have not been recently accessed should be +returned to the slabs periodically. This is known as cache aging and +when enabled objects will be typically returned after 15 seconds. .sp -Default value: \fB0\fR. +On the other hand Linux slabs are designed to never move objects back to +the slabs unless there is memory pressure. This is possible because under +Linux the cache will be notified when memory is low and objects can be +released. +.sp +By default only the Linux method is enabled. It has been shown to improve +responsiveness on low memory systems and not negatively impact the performance +of systems with more memory. This policy may be changed by setting the +\fBspl_kmem_cache_expire\fR bit mask as follows, both policies may be enabled +concurrently. +.sp +0x01 - Aging (Illumos), 0x02 - Low memory (Linux) +.sp +Default value: \fB0x02\fR +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_cache_reclaim\fR (uint) +.ad +.RS 12n +When this is set it prevents Linux from being able to rapidly reclaim all the +memory held by the kmem caches. This may be useful in circumstances where +it's preferable that Linux reclaim memory from some other subsystem first. +Setting this will increase the likelihood out of memory events on a memory +constrained system. +.sp +Default value: \fB0\fR +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_cache_obj_per_slab\fR (uint) +.ad +.RS 12n +The preferred number of objects per slab in the cache. In general, a larger +value will increase the caches memory footprint while decreasing the time +required to perform an allocation. Conversely, a smaller value will minimize +the footprint and improve cache reclaim time but individual allocations may +take longer. +.sp +Default value: \fB16\fR +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_cache_obj_per_slab_min\fR (uint) +.ad +.RS 12n +The minimum number of objects allowed per slab. Normally slabs will contain +\fBspl_kmem_cache_obj_per_slab\fR objects but for caches that contain very +large objects it's desirable to only have a few, or even just one, object per +slab. +.sp +Default value: \fB1\fR +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_cache_max_size\fR (uint) +.ad +.RS 12n +The maximum size of a kmem cache slab in MiB. This effectively limits +the maximum cache object size to \fBspl_kmem_cache_max_size\fR / +\fBspl_kmem_cache_obj_per_slab\fR. Caches may not be created with +object sized larger than this limit. +.sp +Default value: \fB32\fR +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_cache_slab_limit\fR (uint) +.ad +.RS 12n +For small objects the Linux slab allocator should be used to make the most +efficient use of the memory. However, large objects are not supported by +the Linux slab and therefore the SPL implementation is preferred. This +value is used to determine the cutoff between a small and large object. +.sp +Objects of \fBspl_kmem_cache_slab_limit\fR or smaller will be allocated +using the Linux slab allocator, large objects use the SPL allocator. A +cutoff of 16K was determined to be optimal for architectures using 4K pages. +.sp +Default value: \fB16,384\fR +.RE + +.sp +.ne 2 +.na +\fBspl_kmem_cache_kmem_limit\fR (uint) +.ad +.RS 12n +Depending on the size of a cache object it may be backed by kmalloc()'d +or vmalloc()'d memory. This is because the size of the required allocation +greatly impacts the best way to allocate the memory. +.sp +When objects are small and only a small number of memory pages need to be +allocated, ideally just one, then kmalloc() is very efficient. However, +when allocating multiple pages with kmalloc() it gets increasingly expensive +because the pages must be physically contiguous. +.sp +For this reason we shift to vmalloc() for slabs of large objects which +which removes the need for contiguous pages. We cannot use vmalloc() in +all cases because there is significant locking overhead involved. This +function takes a single global lock over the entire virtual address range +which serializes all allocations. Using slightly different allocation +functions for small and large objects allows us to handle a wide range of +object sizes. +.sh +The \fBspl_kmem_cache_kmem_limit\fR value is used to determine this cutoff +size. One quarter the PAGE_SIZE is used as the default value because +\fBspl_kmem_cache_obj_per_slab\fR defaults to 16. This means that at +most we will need to allocate four contiguous pages. +.sp +Default value: \fBPAGE_SIZE/4\fR .RE .sp @@ -90,7 +158,7 @@ As a general rule kmem_alloc() allocations should be small, preferably just a few pages since they must by physically contiguous. Therefore, a rate limited warning will be printed to the console for any kmem_alloc() which exceeds a reasonable threshold. - +.sp The default warning threshold is set to eight pages but capped at 32K to accommodate systems using large pages. This value was selected to be small enough to ensure the largest allocations are quickly noticed and fixed. @@ -100,7 +168,7 @@ developers are encouraged to set it lower when testing so any new largish allocations are quickly caught. These warnings may be disabled by setting the threshold to zero. .sp -Default value: \fB32K\fR. +Default value: \fB32,768\fR .RE .sp @@ -117,7 +185,7 @@ margin of 4x is set. Kmem_alloc() allocations larger than this maximum will quickly fail. Vmem_alloc() allocations less than or equal to this value will use kmalloc(), but shift to vmalloc() when exceeding this value. .sp -Default value: \fBKMALLOC_MAX_SIZE/4\fR. +Default value: \fBKMALLOC_MAX_SIZE/4\fR .RE .sp @@ -139,7 +207,7 @@ be automatically determined based on the object size. Otherwise magazines will be limited to 2-256 objects per magazine (i.e per cpu). Magazines may never be entirely disabled in this implementation. .sp -Default value: \fB0\fR. +Default value: \fB0\fR .RE .sp @@ -148,9 +216,12 @@ Default value: \fB0\fR. \fBspl_hostid\fR (ulong) .ad .RS 12n -The system hostid. +The system hostid, when set this can be used to uniquely identify a system. +By default this value is set to zero which indicates the hostid is disabled. +It can be explicitly enabled by placing a unique non-zero value in +\fB/etc/hostid/\fR. .sp -Default value: \fB0xFFFFFFFF\fR (an invalid hostid!) +Default value: \fB0\fR .RE .sp @@ -159,9 +230,10 @@ Default value: \fB0xFFFFFFFF\fR (an invalid hostid!) \fBspl_hostid_path\fR (charp) .ad .RS 12n -The system hostid file +The expected path to locate the system hostid when specified. This value +may be overridden for non-standard configurations. .sp -Default value: \fB/etc/hostid\fR. +Default value: \fB/etc/hostid\fR .RE .sp @@ -170,7 +242,10 @@ Default value: \fB/etc/hostid\fR. \fBspl_taskq_thread_bind\fR (int) .ad .RS 12n -Bind taskq thread to CPU +Bind taskq threads to specific CPUs. When enabled all taskq threads will +be distributed evenly over the available CPUs. By default, this behavior +is disabled to allow the Linux scheduler the maximum flexibility to determine +where a thread should run. .sp -Default value: \fB0\fR. +Default value: \fB0\fR .RE From e50e6cc958a85e010d996ca80cf20d48c51103d3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 15 Dec 2014 16:02:48 -0800 Subject: [PATCH 0862/1062] Reduce kmem cache deadlock threshold Reduce the threshold for detecting a kmem cache deadlock by 10x from HZ to HZ/10. The reduced value is still several orders of magnitude large enough to avoid being triggered incorrectly. By reducing it we allow the system to resolve the issue more quickly. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index a68852ed7..809ac5cc5 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1215,7 +1215,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) rc = spl_emergency_alloc(skc, flags, obj); } else { remaining = wait_event_timeout(skc->skc_waitq, - spl_cache_grow_wait(skc), HZ); + spl_cache_grow_wait(skc), HZ / 10); if (!remaining && test_bit(KMC_BIT_VMEM, &skc->skc_flags)) { spin_lock(&skc->skc_lock); From 3018bffa9b8bfd8d24010407c8a07c25b44c010e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 15 Dec 2014 14:06:18 -0800 Subject: [PATCH 0863/1062] Refine slab cache sizing This change is designed to improve the memory utilization of slabs by more carefully setting their size. The way the code currently works is problematic for slabs which contain large objects (>1MB). This is due to slabs being unconditionally rounded up to a power of two which may result in unused space at the end of the slab. The reason the existing code rounds up every slab is because it assumes it will backed by the buddy allocator. Since the buddy allocator can only performs power of two allocations this is desirable because it avoids wasting any space. However, this logic breaks down if slab is backed by vmalloc() which operates at a page level granularity. In this case, the optimal thing to do is calculate the minimum required slab size given certain constraints (object size, alignment, objects/slab, etc). Therefore, this patch reworks the spl_slab_size() function so that it sizes KMC_KMEM slabs differently than KMC_VMEM slabs. KMC_KMEM slabs are rounded up to the nearest power of two, and KMC_VMEM slabs are allowed to be the minimum required size. This change also reduces the default number of objects per slab. This reduces how much memory a single cache object can pin, which can result in significant memory saving for highly fragmented caches. But depending on the workload it may result in slabs being allocated and freed more frequently. In practice, this has been shown to be a better default for most workloads. Also the maximum slab size has been reduced to 4MB on 32-bit systems. Due to the limited virtual address space it's critical the we be as frugal as possible. A limit of 4M still lets us reasonably comfortably allocate a limited number of 1MB objects. Finally, the kmem:slab_small and kmem:slab_large SPLAT tests were extended to provide better test coverage of various object sizes and alignments. Caches are created with random parameters and their basic functionality is verified by allocating several slabs worth of objects. Signed-off-by: Brian Behlendorf --- include/sys/kmem_cache.h | 17 +- man/man5/spl-module-parameters.5 | 4 +- module/spl/spl-kmem-cache.c | 92 +++++++---- module/splat/splat-kmem.c | 271 +++++++++++++++++++------------ 4 files changed, 244 insertions(+), 140 deletions(-) diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h index a9b5bdd2f..9ac41e6ec 100644 --- a/include/sys/kmem_cache.h +++ b/include/sys/kmem_cache.h @@ -101,9 +101,24 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ #define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB 8 /* Target objects per slab */ #define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 1 /* Minimum objects per slab */ #define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */ +#ifdef _LP64 +#define SPL_KMEM_CACHE_MAX_SIZE 32 /* Max slab size in MB */ +#else +#define SPL_KMEM_CACHE_MAX_SIZE 4 /* Max slab size in MB */ +#endif + +#define SPL_MAX_ORDER (MAX_ORDER - 3) +#define SPL_MAX_ORDER_NR_PAGES (1 << (SPL_MAX_ORDER - 1)) + +#ifdef CONFIG_SLUB +#define SPL_MAX_KMEM_CACHE_ORDER PAGE_ALLOC_COSTLY_ORDER +#define SPL_MAX_KMEM_ORDER_NR_PAGES (1 << (SPL_MAX_KMEM_CACHE_ORDER - 1)) +#else +#define SPL_MAX_KMEM_ORDER_NR_PAGES (KMALLOC_MAX_SIZE >> PAGE_SHIFT) +#endif #define POINTER_IS_VALID(p) 0 /* Unimplemented */ #define POINTER_INVALIDATE(pp) /* Unimplemented */ diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 27c7bfd48..3e7e877fb 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -68,7 +68,7 @@ required to perform an allocation. Conversely, a smaller value will minimize the footprint and improve cache reclaim time but individual allocations may take longer. .sp -Default value: \fB16\fR +Default value: \fB8\fR .RE .sp @@ -96,7 +96,7 @@ the maximum cache object size to \fBspl_kmem_cache_max_size\fR / \fBspl_kmem_cache_obj_per_slab\fR. Caches may not be created with object sized larger than this limit. .sp -Default value: \fB32\fR +Default value: \fB32 (64-bit) or 4 (32-bit)\fR .RE .sp diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 809ac5cc5..5160aa1cf 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -109,7 +109,7 @@ module_param(spl_kmem_cache_obj_per_slab_min, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab_min, "Minimal number of objects per slab"); -unsigned int spl_kmem_cache_max_size = 32; +unsigned int spl_kmem_cache_max_size = SPL_KMEM_CACHE_MAX_SIZE; module_param(spl_kmem_cache_max_size, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB"); @@ -128,7 +128,13 @@ module_param(spl_kmem_cache_slab_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_slab_limit, "Objects less than N bytes use the Linux slab"); -unsigned int spl_kmem_cache_kmem_limit = (PAGE_SIZE / 4); +/* + * This value defaults to a threshold designed to avoid allocations which + * have been deemed costly by the kernel. + */ +unsigned int spl_kmem_cache_kmem_limit = + ((1 << (PAGE_ALLOC_COSTLY_ORDER - 1)) * PAGE_SIZE) / + SPL_KMEM_CACHE_OBJ_PER_SLAB; module_param(spl_kmem_cache_kmem_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, "Objects less than N bytes use the kmalloc"); @@ -181,12 +187,12 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) gfp_t lflags = kmem_flags_convert(flags); void *ptr; - ASSERT(ISP2(size)); - - if (skc->skc_flags & KMC_KMEM) + if (skc->skc_flags & KMC_KMEM) { + ASSERT(ISP2(size)); ptr = (void *)__get_free_pages(lflags, get_order(size)); - else + } else { ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL); + } /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); @@ -198,7 +204,6 @@ static void kv_free(spl_kmem_cache_t *skc, void *ptr, int size) { ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); - ASSERT(ISP2(size)); /* * The Linux direct reclaim path uses this out of band value to @@ -210,10 +215,12 @@ kv_free(spl_kmem_cache_t *skc, void *ptr, int size) if (current->reclaim_state) current->reclaim_state->reclaimed_slab += size >> PAGE_SHIFT; - if (skc->skc_flags & KMC_KMEM) + if (skc->skc_flags & KMC_KMEM) { + ASSERT(ISP2(size)); free_pages((unsigned long)ptr, get_order(size)); - else + } else { vfree(ptr); + } } /* @@ -668,40 +675,48 @@ spl_cache_age(void *data) static int spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) { - uint32_t sks_size, obj_size, max_size; + uint32_t sks_size, obj_size, max_size, tgt_size, tgt_objs; if (skc->skc_flags & KMC_OFFSLAB) { - *objs = spl_kmem_cache_obj_per_slab; - *size = P2ROUNDUP(sizeof (spl_kmem_slab_t), PAGE_SIZE); - return (0); + tgt_objs = spl_kmem_cache_obj_per_slab; + tgt_size = P2ROUNDUP(sizeof (spl_kmem_slab_t), PAGE_SIZE); + + if ((skc->skc_flags & KMC_KMEM) && + (spl_obj_size(skc) > (SPL_MAX_ORDER_NR_PAGES * PAGE_SIZE))) + return (-ENOSPC); } else { sks_size = spl_sks_size(skc); obj_size = spl_obj_size(skc); - - if (skc->skc_flags & KMC_KMEM) - max_size = ((uint32_t)1 << (MAX_ORDER-3)) * PAGE_SIZE; - else - max_size = (spl_kmem_cache_max_size * 1024 * 1024); - - /* Power of two sized slab */ - for (*size = PAGE_SIZE; *size <= max_size; *size *= 2) { - *objs = (*size - sks_size) / obj_size; - if (*objs >= spl_kmem_cache_obj_per_slab) - return (0); - } + max_size = (spl_kmem_cache_max_size * 1024 * 1024); + tgt_size = (spl_kmem_cache_obj_per_slab * obj_size + sks_size); /* - * Unable to satisfy target objects per slab, fall back to - * allocating a maximally sized slab and assuming it can - * contain the minimum objects count use it. If not fail. + * KMC_KMEM slabs are allocated by __get_free_pages() which + * rounds up to the nearest order. Knowing this the size + * should be rounded up to the next power of two with a hard + * maximum defined by the maximum allowed allocation order. */ - *size = max_size; - *objs = (*size - sks_size) / obj_size; - if (*objs >= (spl_kmem_cache_obj_per_slab_min)) - return (0); + if (skc->skc_flags & KMC_KMEM) { + max_size = SPL_MAX_ORDER_NR_PAGES * PAGE_SIZE; + tgt_size = MIN(max_size, + PAGE_SIZE * (1 << MAX(get_order(tgt_size) - 1, 1))); + } + + if (tgt_size <= max_size) { + tgt_objs = (tgt_size - sks_size) / obj_size; + } else { + tgt_objs = (max_size - sks_size) / obj_size; + tgt_size = (tgt_objs * obj_size) + sks_size; + } } - return (-ENOSPC); + if (tgt_objs == 0) + return (-ENOSPC); + + *objs = tgt_objs; + *size = tgt_size; + + return (0); } /* @@ -960,6 +975,11 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (rc) goto out; } else { + if (size > (SPL_MAX_KMEM_ORDER_NR_PAGES * PAGE_SIZE)) { + rc = EINVAL; + goto out; + } + skc->skc_linux_cache = kmem_cache_create( skc->skc_name, size, align, 0, NULL); if (skc->skc_linux_cache == NULL) { @@ -1406,8 +1426,11 @@ restart: skm->skm_age = jiffies; } else { obj = spl_cache_refill(skc, skm, flags); - if (obj == NULL) + if ((obj == NULL) && !(flags & KM_NOSLEEP)) goto restart; + + local_irq_enable(); + goto ret; } local_irq_enable(); @@ -1427,7 +1450,6 @@ ret: return (obj); } - EXPORT_SYMBOL(spl_kmem_cache_alloc); /* diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 81f748bb6..cd0000bae 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include "splat-internal.h" @@ -583,87 +584,124 @@ out: static int splat_kmem_cache_test(struct file *file, void *arg, char *name, - int size, int align, int flags) + int size, int align, int flags) { - kmem_cache_priv_t *kcp; - kmem_cache_data_t *kcd = NULL; - int rc = 0, max; + kmem_cache_priv_t *kcp = NULL; + kmem_cache_data_t **kcd = NULL; + int i, rc = 0, objs = 0; + + splat_vprint(file, name, + "Testing size=%d, align=%d, flags=0x%04x\n", + size, align, flags); kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, align, 0); if (!kcp) { splat_vprint(file, name, "Unable to create '%s'\n", "kcp"); - return -ENOMEM; + return (-ENOMEM); } - kcp->kcp_cache = - kmem_cache_create(SPLAT_KMEM_CACHE_NAME, - kcp->kcp_size, kcp->kcp_align, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - NULL, kcp, NULL, flags); - if (!kcp->kcp_cache) { - splat_vprint(file, name, - "Unable to create '%s'\n", - SPLAT_KMEM_CACHE_NAME); + kcp->kcp_cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, + kcp->kcp_size, kcp->kcp_align, + splat_kmem_cache_test_constructor, + splat_kmem_cache_test_destructor, + NULL, kcp, NULL, flags); + if (kcp->kcp_cache == NULL) { + splat_vprint(file, name, "Unable to create " + "name='%s', size=%d, align=%d, flags=0x%x\n", + SPLAT_KMEM_CACHE_NAME, size, align, flags); rc = -ENOMEM; goto out_free; } - kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - if (!kcd) { - splat_vprint(file, name, - "Unable to allocate from '%s'\n", - SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; + /* + * Allocate several slabs worth of objects to verify functionality. + * However, on 32-bit systems with limited address space constrain + * it to a single slab for the purposes of this test. + */ +#ifdef _LP64 + objs = SPL_KMEM_CACHE_OBJ_PER_SLAB * 4; +#else + objs = 1; +#endif + kcd = kmem_zalloc(sizeof (kmem_cache_data_t *) * objs, KM_SLEEP); + if (kcd == NULL) { + splat_vprint(file, name, "Unable to allocate pointers " + "for %d objects\n", objs); + rc = -ENOMEM; goto out_free; } - if (!kcd->kcd_flag) { - splat_vprint(file, name, - "Failed to run contructor for '%s'\n", - SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; + for (i = 0; i < objs; i++) { + kcd[i] = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); + if (kcd[i] == NULL) { + splat_vprint(file, name, "Unable to allocate " + "from '%s'\n", SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + if (!kcd[i]->kcd_flag) { + splat_vprint(file, name, "Failed to run constructor " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } + + if (kcd[i]->kcd_magic != kcp->kcp_magic) { + splat_vprint(file, name, + "Failed to pass private data to constructor " + "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } } - if (kcd->kcd_magic != kcp->kcp_magic) { - splat_vprint(file, name, - "Failed to pass private data to constructor " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; + for (i = 0; i < objs; i++) { + kmem_cache_free(kcp->kcp_cache, kcd[i]); + + /* Destructors are run for every kmem_cache_free() */ + if (kcd[i]->kcd_flag) { + splat_vprint(file, name, + "Failed to run destructor for '%s'\n", + SPLAT_KMEM_CACHE_NAME); + rc = -EINVAL; + goto out_free; + } } - max = kcp->kcp_count; - kmem_cache_free(kcp->kcp_cache, kcd); - - /* Destroy the entire cache which will force destructors to - * run and we can verify one was called for every object */ - kmem_cache_destroy(kcp->kcp_cache); if (kcp->kcp_count) { splat_vprint(file, name, - "Failed to run destructor on all slab objects " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); + "Failed to run destructor on all slab objects for '%s'\n", + SPLAT_KMEM_CACHE_NAME); rc = -EINVAL; } + kmem_free(kcd, sizeof (kmem_cache_data_t *) * objs); + kmem_cache_destroy(kcp->kcp_cache); + splat_kmem_cache_test_kcp_free(kcp); splat_vprint(file, name, - "Successfully ran ctors/dtors for %d elements in '%s'\n", - max, SPLAT_KMEM_CACHE_NAME); + "Success ran alloc'd/free'd %d objects of size %d\n", + objs, size); - return rc; + return (rc); out_free: - if (kcd) - kmem_cache_free(kcp->kcp_cache, kcd); + if (kcd) { + for (i = 0; i < objs; i++) { + if (kcd[i] != NULL) + kmem_cache_free(kcp->kcp_cache, kcd[i]); + } + + kmem_free(kcd, sizeof (kmem_cache_data_t *) * objs); + } if (kcp->kcp_cache) kmem_cache_destroy(kcp->kcp_cache); splat_kmem_cache_test_kcp_free(kcp); - return rc; + return (rc); } static int @@ -757,35 +795,49 @@ static int splat_kmem_test5(struct file *file, void *arg) { char *name = SPLAT_KMEM_TEST5_NAME; - int rc; + int i, rc = 0; - /* On slab (default + kmem + vmem) */ - rc = splat_kmem_cache_test(file, arg, name, 128, 0, 0); - if (rc) - return rc; + /* Randomly pick small object sizes and alignments. */ + for (i = 0; i < 100; i++) { + int size, align, flags = 0; + uint32_t rnd; - rc = splat_kmem_cache_test(file, arg, name, 128, 0, KMC_KMEM); - if (rc) - return rc; + /* Evenly distribute tests over all value cache types */ + get_random_bytes((void *)&rnd, sizeof (uint32_t)); + switch (rnd & 0x03) { + default: + case 0x00: + flags = 0; + break; + case 0x01: + flags = KMC_KMEM; + break; + case 0x02: + flags = KMC_VMEM; + break; + case 0x03: + flags = KMC_SLAB; + break; + } - rc = splat_kmem_cache_test(file, arg, name, 128, 0, KMC_VMEM); - if (rc) - return rc; + /* The following flags are set with a 1/10 chance */ + flags |= ((((rnd >> 8) % 10) == 0) ? KMC_OFFSLAB : 0); + flags |= ((((rnd >> 16) % 10) == 0) ? KMC_NOEMERGENCY : 0); - /* Off slab (default + kmem + vmem) */ - rc = splat_kmem_cache_test(file, arg, name, 128, 0, KMC_OFFSLAB); - if (rc) - return rc; + /* 32b - PAGE_SIZE */ + get_random_bytes((void *)&rnd, sizeof (uint32_t)); + size = MAX(rnd % (PAGE_SIZE + 1), 32); - rc = splat_kmem_cache_test(file, arg, name, 128, 0, - KMC_KMEM | KMC_OFFSLAB); - if (rc) - return rc; + /* 2^N where (3 <= N <= PAGE_SHIFT) */ + get_random_bytes((void *)&rnd, sizeof (uint32_t)); + align = (1 << MAX(3, rnd % (PAGE_SHIFT + 1))); - rc = splat_kmem_cache_test(file, arg, name, 128, 0, - KMC_VMEM | KMC_OFFSLAB); + rc = splat_kmem_cache_test(file, arg, name, size, align, flags); + if (rc) + return (rc); + } - return rc; + return (rc); } /* @@ -795,44 +847,53 @@ static int splat_kmem_test6(struct file *file, void *arg) { char *name = SPLAT_KMEM_TEST6_NAME; - int rc; + int i, max_size, rc = 0; - /* On slab (default + kmem + vmem) */ - rc = splat_kmem_cache_test(file, arg, name, 256*1024, 0, 0); - if (rc) - return rc; + /* Randomly pick large object sizes and alignments. */ + for (i = 0; i < 100; i++) { + int size, align, flags = 0; + uint32_t rnd; - rc = splat_kmem_cache_test(file, arg, name, 64*1024, 0, KMC_KMEM); - if (rc) - return rc; + /* Evenly distribute tests over all value cache types */ + get_random_bytes((void *)&rnd, sizeof (uint32_t)); + switch (rnd & 0x03) { + default: + case 0x00: + flags = 0; + max_size = (SPL_KMEM_CACHE_MAX_SIZE * 1024 * 1024) / 2; + break; + case 0x01: + flags = KMC_KMEM; + max_size = (SPL_MAX_ORDER_NR_PAGES - 2) * PAGE_SIZE; + break; + case 0x02: + flags = KMC_VMEM; + max_size = (SPL_KMEM_CACHE_MAX_SIZE * 1024 * 1024) / 2; + break; + case 0x03: + flags = KMC_SLAB; + max_size = SPL_MAX_KMEM_ORDER_NR_PAGES * PAGE_SIZE; + break; + } - rc = splat_kmem_cache_test(file, arg, name, 1024*1024, 0, KMC_VMEM); - if (rc) - return rc; + /* The following flags are set with a 1/10 chance */ + flags |= ((((rnd >> 8) % 10) == 0) ? KMC_OFFSLAB : 0); + flags |= ((((rnd >> 16) % 10) == 0) ? KMC_NOEMERGENCY : 0); - rc = splat_kmem_cache_test(file, arg, name, 16*1024*1024, 0, KMC_VMEM); - if (rc) - return rc; + /* PAGE_SIZE - max_size */ + get_random_bytes((void *)&rnd, sizeof (uint32_t)); + size = MAX(rnd % (max_size + 1), PAGE_SIZE), - /* Off slab (default + kmem + vmem) */ - rc = splat_kmem_cache_test(file, arg, name, 256*1024, 0, KMC_OFFSLAB); - if (rc) - return rc; + /* 2^N where (3 <= N <= PAGE_SHIFT) */ + get_random_bytes((void *)&rnd, sizeof (uint32_t)); + align = (1 << MAX(3, rnd % (PAGE_SHIFT + 1))); - rc = splat_kmem_cache_test(file, arg, name, 64*1024, 0, - KMC_KMEM | KMC_OFFSLAB); - if (rc) - return rc; + rc = splat_kmem_cache_test(file, arg, name, size, align, flags); + if (rc) + return (rc); + } - rc = splat_kmem_cache_test(file, arg, name, 1024*1024, 0, - KMC_VMEM | KMC_OFFSLAB); - if (rc) - return rc; - - rc = splat_kmem_cache_test(file, arg, name, 16*1024*1024, 0, - KMC_VMEM | KMC_OFFSLAB); - - return rc; + return (rc); } /* @@ -842,14 +903,20 @@ static int splat_kmem_test7(struct file *file, void *arg) { char *name = SPLAT_KMEM_TEST7_NAME; + int max_size = (SPL_KMEM_CACHE_MAX_SIZE * 1024 * 1024) / 2; int i, rc; for (i = SPL_KMEM_CACHE_ALIGN; i <= PAGE_SIZE; i *= 2) { - rc = splat_kmem_cache_test(file, arg, name, 157, i, 0); + uint32_t size; + + get_random_bytes((void *)&size, sizeof (uint32_t)); + size = MAX(size % (max_size + 1), 32); + + rc = splat_kmem_cache_test(file, arg, name, size, i, 0); if (rc) return rc; - rc = splat_kmem_cache_test(file, arg, name, 157, i, + rc = splat_kmem_cache_test(file, arg, name, size, i, KMC_OFFSLAB); if (rc) return rc; From 436ad60faa971dc62f30ebd5c79fa55722234147 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2015 14:00:34 -0800 Subject: [PATCH 0864/1062] Fix kmem cache deadlock logic The kmem cache implementation always adds new slabs by dispatching a task to the spl_kmem_cache taskq to perform the allocation. This is done because large slabs must be allocated using vmalloc(). It is possible these allocations will block on IO because the GFP_NOIO flag is not honored. This can result in a deadlock. Therefore, a deadlock detection strategy was implemented to deal with this case. When it is determined, by timeout, that the spl_kmem_cache thread has deadlocked attempting to add a new slab. Then all callers attempting to allocate from the cache fall back to using kmalloc() which does honor all passed flags. This logic was correct but an optimization in the code allowed for a deadlock. Because only slabs backed by vmalloc() can deadlock in the way described above. An optimization was made to only invoke this deadlock detection code for vmalloc() backed caches. This had the advantage of making it easy to distinguish these objects when they were freed. But this isn't strictly safe. If all the spl_kmem_cache threads end up deadlocked than we can't grow any of the other caches either. This can once again result in a deadlock if memory needs to be allocated from one of these other caches to ensure forward progress. The fix here is to remove the optimization which limits this fall back allocation stratagy to vmalloc() backed caches. Doing this means we may need to take the cache lock in spl_kmem_cache_free() call path. But this small cost can be mitigated by ignoring objects with virtual addresses. For good measure the default number of spl_kmem_cache threads has been increased from 1 to 4, and made tunable. This alone wouldn't resolve the original issue since it's still possible for all the threads to be deadlocked. However, it does help responsiveness by ensuring that a single deadlocked spl_kmem_cache thread doesn't block allocations from other caches until the timeout is reached. Signed-off-by: Brian Behlendorf --- module/spl/spl-kmem-cache.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 5160aa1cf..38fee703d 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -139,6 +139,15 @@ module_param(spl_kmem_cache_kmem_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, "Objects less than N bytes use the kmalloc"); +/* + * The number of threads available to allocate new slabs for caches. This + * should not need to be tuned but it is available for performance analysis. + */ +unsigned int spl_kmem_cache_kmem_threads = 4; +module_param(spl_kmem_cache_kmem_threads, uint, 0444); +MODULE_PARM_DESC(spl_kmem_cache_kmem_threads, + "Number of spl_kmem_cache threads"); + /* * Slab allocation interfaces * @@ -544,14 +553,14 @@ spl_emergency_free(spl_kmem_cache_t *skc, void *obj) spin_lock(&skc->skc_lock); ske = spl_emergency_search(&skc->skc_emergency_tree, obj); - if (likely(ske)) { + if (ske) { rb_erase(&ske->ske_node, &skc->skc_emergency_tree); skc->skc_obj_emergency--; skc->skc_obj_total--; } spin_unlock(&skc->skc_lock); - if (unlikely(ske == NULL)) + if (ske == NULL) return (-ENOENT); kfree(ske->ske_obj); @@ -1237,7 +1246,7 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) remaining = wait_event_timeout(skc->skc_waitq, spl_cache_grow_wait(skc), HZ / 10); - if (!remaining && test_bit(KMC_BIT_VMEM, &skc->skc_flags)) { + if (!remaining) { spin_lock(&skc->skc_lock); if (test_bit(KMC_BIT_GROWING, &skc->skc_flags)) { set_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); @@ -1464,6 +1473,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) spl_kmem_magazine_t *skm; unsigned long flags; int do_reclaim = 0; + int do_emergency = 0; ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); @@ -1484,13 +1494,18 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) } /* - * Only virtual slabs may have emergency objects and these objects - * are guaranteed to have physical addresses. They must be removed - * from the tree of emergency objects and the freed. + * While a cache has outstanding emergency objects all freed objects + * must be checked. However, since emergency objects will never use + * a virtual address these objects can be safely excluded as an + * optimization. */ - if ((skc->skc_flags & KMC_VMEM) && !is_vmalloc_addr(obj)) { - spl_emergency_free(skc, obj); - goto out; + if (!is_vmalloc_addr(obj)) { + spin_lock(&skc->skc_lock); + do_emergency = (skc->skc_obj_emergency > 0); + spin_unlock(&skc->skc_lock); + + if (do_emergency && (spl_emergency_free(skc, obj) == 0)) + goto out; } local_irq_save(flags); @@ -1702,7 +1717,7 @@ spl_kmem_cache_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", - 1, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); + spl_kmem_cache_kmem_threads, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); spl_register_shrinker(&spl_kmem_cache_shrinker); return (0); From ee33517452020c3cd630c432038c735ea41bd1c9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 15 Jan 2015 15:11:45 -0800 Subject: [PATCH 0865/1062] Use __get_free_pages() for emergency objects The __get_free_pages() function must be used in place of kmalloc() to ensure the __GFP_COMP is strictly honored. This is due to kmalloc() being layered on the generic Linux slab caches. It wasn't until recently that all caches were created using __GFP_COMP. This means that it is possible for a kmalloc() which passed the __GFP_COMP flag to be returned a non-compound allocation. Signed-off-by: Brian Behlendorf --- include/sys/kmem_cache.h | 2 +- module/spl/spl-kmem-cache.c | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h index 9ac41e6ec..75a0a55b7 100644 --- a/include/sys/kmem_cache.h +++ b/include/sys/kmem_cache.h @@ -163,7 +163,7 @@ typedef struct spl_kmem_alloc { typedef struct spl_kmem_emergency { struct rb_node ske_node; /* Emergency tree linkage */ - void *ske_obj; /* Buffer address */ + unsigned long ske_obj; /* Buffer address */ } spl_kmem_emergency_t; typedef struct spl_kmem_cache { diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 38fee703d..6fcc7c4e1 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -459,9 +459,9 @@ spl_emergency_search(struct rb_root *root, void *obj) while (node) { ske = container_of(node, spl_kmem_emergency_t, ske_node); - if (address < (unsigned long)ske->ske_obj) + if (address < ske->ske_obj) node = node->rb_left; - else if (address > (unsigned long)ske->ske_obj) + else if (address > ske->ske_obj) node = node->rb_right; else return (ske); @@ -475,15 +475,15 @@ spl_emergency_insert(struct rb_root *root, spl_kmem_emergency_t *ske) { struct rb_node **new = &(root->rb_node), *parent = NULL; spl_kmem_emergency_t *ske_tmp; - unsigned long address = (unsigned long)ske->ske_obj; + unsigned long address = ske->ske_obj; while (*new) { ske_tmp = container_of(*new, spl_kmem_emergency_t, ske_node); parent = *new; - if (address < (unsigned long)ske_tmp->ske_obj) + if (address < ske_tmp->ske_obj) new = &((*new)->rb_left); - else if (address > (unsigned long)ske_tmp->ske_obj) + else if (address > ske_tmp->ske_obj) new = &((*new)->rb_right); else return (0); @@ -503,6 +503,7 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) { gfp_t lflags = kmem_flags_convert(flags); spl_kmem_emergency_t *ske; + int order = get_order(skc->skc_obj_size); int empty; /* Last chance use a partial slab if one now exists */ @@ -516,8 +517,8 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) if (ske == NULL) return (-ENOMEM); - ske->ske_obj = kmalloc(skc->skc_obj_size, lflags); - if (ske->ske_obj == NULL) { + ske->ske_obj = __get_free_pages(lflags, order); + if (ske->ske_obj == 0) { kfree(ske); return (-ENOMEM); } @@ -533,12 +534,12 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj) spin_unlock(&skc->skc_lock); if (unlikely(!empty)) { - kfree(ske->ske_obj); + free_pages(ske->ske_obj, order); kfree(ske); return (-EINVAL); } - *obj = ske->ske_obj; + *obj = (void *)ske->ske_obj; return (0); } @@ -550,6 +551,7 @@ static int spl_emergency_free(spl_kmem_cache_t *skc, void *obj) { spl_kmem_emergency_t *ske; + int order = get_order(skc->skc_obj_size); spin_lock(&skc->skc_lock); ske = spl_emergency_search(&skc->skc_emergency_tree, obj); @@ -563,7 +565,7 @@ spl_emergency_free(spl_kmem_cache_t *skc, void *obj) if (ske == NULL) return (-ENOENT); - kfree(ske->ske_obj); + free_pages(ske->ske_obj, order); kfree(ske); return (0); From 54cccfc2e30fa84463c056e8ad04b2be9448999e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Jan 2015 09:21:51 -0800 Subject: [PATCH 0866/1062] Fix GFP_KERNEL allocations flags The kmem_vasprintf(), kmem_vsprintf(), kobj_open_file(), and vn_openat() functions should all use the kmem_flags_convert() function to generate the GFP_* flags. This ensures that they can be safely called in any context and the correct flags will be used. Signed-off-by: Brian Behlendorf Closes #426 --- module/spl/spl-kmem.c | 4 ++-- module/spl/spl-kobj.c | 2 +- module/spl/spl-vnode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 914f0fbf7..e97d5f255 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -80,7 +80,7 @@ kmem_vasprintf(const char *fmt, va_list ap) do { va_copy(aq, ap); - ptr = kvasprintf(GFP_KERNEL, fmt, aq); + ptr = kvasprintf(kmem_flags_convert(KM_SLEEP), fmt, aq); va_end(aq); } while (ptr == NULL); @@ -96,7 +96,7 @@ kmem_asprintf(const char *fmt, ...) do { va_start(ap, fmt); - ptr = kvasprintf(GFP_KERNEL, fmt, ap); + ptr = kvasprintf(kmem_flags_convert(KM_SLEEP), fmt, ap); va_end(ap); } while (ptr == NULL); diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index 5b29fdb58..4dd14ba41 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -33,7 +33,7 @@ kobj_open_file(const char *name) vnode_t *vp; int rc; - file = kmalloc(sizeof(_buf_t), GFP_KERNEL); + file = kmalloc(sizeof(_buf_t), kmem_flags_convert(KM_SLEEP)); if (file == NULL) return ((_buf_t *)-1UL); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 97eb4ef73..bce28a580 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -196,7 +196,7 @@ vn_openat(const char *path, uio_seg_t seg, int flags, int mode, ASSERT(vp == rootdir); len = strlen(path) + 2; - realpath = kmalloc(len, GFP_KERNEL); + realpath = kmalloc(len, kmem_flags_convert(KM_SLEEP)); if (!realpath) return (ENOMEM); From c7db36a3c4ac768a74bd86778cc3535bdcb8d526 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 29 Jan 2015 16:08:25 -0800 Subject: [PATCH 0867/1062] Optimize vmem_alloc() retry path For performance reasons the reworked kmem code maps vmem_alloc() to kmalloc_node() for allocations less than spa_kmem_alloc_max. This allows for more concurrency in the system and less contention of the virtual address space. Generally, this is a good thing. However, in the case when the kmalloc_node() fails it makes little sense to retry it using kmalloc_node() again. It will likely fail in exactly the same way. A smarter strategy is to abandon this optimization and retry using spl_vmalloc() which is very likely to succeed. Signed-off-by: Brian Behlendorf Signed-off-by: Ned Bass Closes #428 --- module/spl/spl-kmem.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index e97d5f255..92263f8f4 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -149,6 +149,7 @@ inline void * spl_kmem_alloc_impl(size_t size, int flags, int node) { gfp_t lflags = kmem_flags_convert(flags); + int use_vmem = 0; void *ptr; /* @@ -182,7 +183,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node) * impact performance so frequently manipulating the virtual * address space is strongly discouraged. */ - if (unlikely(size > spl_kmem_alloc_max)) { + if ((size > spl_kmem_alloc_max) || use_vmem) { if (flags & KM_VMEM) { ptr = spl_vmalloc(size, lflags, PAGE_KERNEL); } else { @@ -195,6 +196,15 @@ spl_kmem_alloc_impl(size_t size, int flags, int node) if (likely(ptr) || (flags & KM_NOSLEEP)) return (ptr); + /* + * For vmem_alloc() and vmem_zalloc() callers retry immediately + * using spl_vmalloc() which is unlikely to fail. + */ + if ((flags & KM_VMEM) && (use_vmem == 0)) { + use_vmem = 1; + continue; + } + if (unlikely(__ratelimit(&kmem_alloc_ratelimit_state))) { printk(KERN_WARNING "Possible memory allocation deadlock: " From 086476f92005506cb07e75f889e8ddb69026e842 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 23 Jan 2015 15:01:03 +0800 Subject: [PATCH 0868/1062] Fix spl_hostid module parameter Currently, spl_hostid module parameter doesn't do anything, because it will always be overwritten when calling into hostid_read(). Instead, we should only call into hostid_read() when spl_hostid is not zero, just as the comment describes. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #427 --- module/spl/spl-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index b706ccecd..4056c4e42 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -467,13 +467,15 @@ zone_get_hostid(void *zone) if (first) { first = 0; + spl_hostid &= HW_HOSTID_MASK; /* * Get the hostid if it was not passed as a module parameter. * Try reading the /etc/hostid file directly. */ - if (hostid_read()) + if (spl_hostid == 0 && hostid_read()) spl_hostid = 0; + printk(KERN_NOTICE "SPL: using hostid 0x%08x\n", (unsigned int) spl_hostid); } From c1bc8e610be8bf1cc8170f788a89a9ee257eb51f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 18 Feb 2015 15:24:15 -0800 Subject: [PATCH 0869/1062] Retire spl_module_init()/spl_module_fini() In the original implementation of the SPL wrappers were provided for module initialization and cleanup. This was done to abstract away any compatibility code which might be needed for the SPL. As it turned out the only significant compatibility issue was that the default pwd during module load differed under Illumos and Linux. Since this is such as minor thing and the wrappers complicate the code they are being retired. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#2985 --- include/linux/Makefile.am | 1 - include/linux/module_compat.h | 59 ----------------------------------- module/spl/spl-generic.c | 32 +++---------------- module/splat/splat-ctl.c | 11 +++---- 4 files changed, 8 insertions(+), 95 deletions(-) delete mode 100644 include/linux/module_compat.h diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 1cca44a2b..712e94ebe 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -8,7 +8,6 @@ KERNEL_H = \ $(top_srcdir)/include/linux/list_compat.h \ $(top_srcdir)/include/linux/math64_compat.h \ $(top_srcdir)/include/linux/mm_compat.h \ - $(top_srcdir)/include/linux/module_compat.h \ $(top_srcdir)/include/linux/proc_compat.h \ $(top_srcdir)/include/linux/rwsem_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \ diff --git a/include/linux/module_compat.h b/include/linux/module_compat.h deleted file mode 100644 index 02f42a924..000000000 --- a/include/linux/module_compat.h +++ /dev/null @@ -1,59 +0,0 @@ -/*****************************************************************************\ - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . -\*****************************************************************************/ - -#ifndef _SPL_MODULE_COMPAT_H -#define _SPL_MODULE_COMPAT_H - -#include - -#define spl_module_init(init_fn) \ -static int \ -spl_##init_fn(void) \ -{ \ - int rc; \ - \ - spl_setup(); \ - rc = init_fn(); \ - \ - return rc; \ -} \ - \ -module_init(spl_##init_fn) - -#define spl_module_exit(exit_fn) \ -static void \ -spl_##exit_fn(void) \ -{ \ - int rc; \ - \ - rc = exit_fn(); \ - spl_cleanup(); \ - if (rc) \ - printk(KERN_ERR "SPL: Failure %d unloading " \ - "dependent module\n", rc); \ -} \ - \ -module_exit(spl_##exit_fn) - -#endif /* _SPL_MODULE_COMPAT_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 4056c4e42..4d9846cf5 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -518,8 +518,8 @@ spl_kvmem_fini(void) spl_kmem_fini(); } -static int -__init spl_init(void) +static int __init +spl_init(void) { int rc = 0; @@ -575,10 +575,10 @@ out1: "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR, rc); - return rc; + return (rc); } -static void +static void __exit spl_fini(void) { printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n", @@ -594,30 +594,6 @@ spl_fini(void) spl_kvmem_fini(); } -/* Called when a dependent module is loaded */ -void -spl_setup(void) -{ - int rc; - - /* - * At module load time the pwd is set to '/' on a Solaris system. - * On a Linux system will be set to whatever directory the caller - * was in when executing insmod/modprobe. - */ - rc = vn_set_pwd("/"); - if (rc) - printk("SPL: Warning unable to set pwd to '/': %d\n", rc); -} -EXPORT_SYMBOL(spl_setup); - -/* Called when a dependent module is unloaded */ -void -spl_cleanup(void) -{ -} -EXPORT_SYMBOL(spl_cleanup); - module_init(spl_init); module_exit(spl_fini); diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index bedf5d2d8..4b9bcb3f0 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -600,7 +599,7 @@ static struct miscdevice splat_misc = { .fops = &splat_fops, }; -static int +static int __init splat_init(void) { int error; @@ -636,7 +635,7 @@ splat_init(void) return (error); } -static int +static void __exit splat_fini(void) { int error; @@ -665,12 +664,10 @@ splat_fini(void) ASSERT(list_empty(&splat_module_list)); printk(KERN_INFO "SPLAT: Unloaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); - - return (0); } -spl_module_init(splat_init); -spl_module_exit(splat_fini); +module_init(splat_init); +module_exit(splat_fini); MODULE_DESCRIPTION("Solaris Porting LAyer Tests"); MODULE_AUTHOR(SPL_META_AUTHOR); From a900e28e71d51687e64761e981b953bd1d80f85c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 25 Feb 2015 09:20:38 -0800 Subject: [PATCH 0870/1062] Fix cstyle issue in mutex.h This patch only addresses the issues identified by the style checker in mutex.h. It contains no functional changes. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #435 --- include/sys/mutex.h | 172 ++++++++++++++++++++++---------------------- 1 file changed, 84 insertions(+), 88 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 31497f6a1..43467223c 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,72 +20,68 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MUTEX_H -#define _SPL_MUTEX_H +#define _SPL_MUTEX_H #include #include #include typedef enum { - MUTEX_DEFAULT = 0, - MUTEX_SPIN = 1, - MUTEX_ADAPTIVE = 2 + MUTEX_DEFAULT = 0, + MUTEX_SPIN = 1, + MUTEX_ADAPTIVE = 2 } kmutex_type_t; #if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) && \ - !defined(CONFIG_DEBUG_MUTEXES) + !defined(CONFIG_DEBUG_MUTEXES) -/* - * We define a 1-field struct rather than a straight typedef to enforce type - * safety. - */ typedef struct { - struct mutex m; - spinlock_t m_lock; /* used for serializing mutex_exit */ + struct mutex m; + spinlock_t m_lock; /* used for serializing mutex_exit */ } kmutex_t; static inline kthread_t * mutex_owner(kmutex_t *mp) { #if defined(HAVE_MUTEX_OWNER_TASK_STRUCT) - return ACCESS_ONCE(mp->m.owner); + return (ACCESS_ONCE(mp->m.owner)); #else struct thread_info *owner = ACCESS_ONCE(mp->m.owner); if (owner) - return owner->task; + return (owner->task); - return NULL; + return (NULL); #endif } -#define mutex_owned(mp) (mutex_owner(mp) == current) -#define MUTEX_HELD(mp) mutex_owned(mp) -#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) +#define mutex_owned(mp) (mutex_owner(mp) == current) +#define MUTEX_HELD(mp) mutex_owned(mp) +#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) #undef mutex_init -#define mutex_init(mp, name, type, ibc) \ -({ \ - static struct lock_class_key __key; \ - ASSERT(type == MUTEX_DEFAULT); \ - \ - __mutex_init(&(mp)->m, #mp, &__key); \ - spin_lock_init(&(mp)->m_lock); \ -}) +#define mutex_init(mp, name, type, ibc) \ +{ \ + static struct lock_class_key __key; \ + ASSERT(type == MUTEX_DEFAULT); \ + \ + __mutex_init(&(mp)->m, #mp, &__key); \ + spin_lock_init(&(mp)->m_lock); \ +} #undef mutex_destroy -#define mutex_destroy(mp) \ -({ \ - VERIFY3P(mutex_owner(mp), ==, NULL); \ -}) +#define mutex_destroy(mp) \ +{ \ + VERIFY3P(mutex_owner(mp), ==, NULL); \ +} -#define mutex_tryenter(mp) mutex_trylock(&(mp)->m) -#define mutex_enter(mp) \ -({ \ - ASSERT3P(mutex_owner(mp), !=, current); \ - mutex_lock(&(mp)->m); \ -}) +#define mutex_tryenter(mp) mutex_trylock(&(mp)->m) +#define mutex_enter(mp) \ +{ \ + ASSERT3P(mutex_owner(mp), !=, current); \ + mutex_lock(&(mp)->m); \ +} /* * The reason for the spinlock: * @@ -105,39 +101,39 @@ mutex_owner(kmutex_t *mp) * * See http://lwn.net/Articles/575477/ for the information about the race. */ -#define mutex_exit(mp) \ -({ \ - spin_lock(&(mp)->m_lock); \ - mutex_unlock(&(mp)->m); \ - spin_unlock(&(mp)->m_lock); \ -}) +#define mutex_exit(mp) \ +{ \ + spin_lock(&(mp)->m_lock); \ + mutex_unlock(&(mp)->m); \ + spin_unlock(&(mp)->m_lock); \ +} #else /* HAVE_MUTEX_OWNER */ typedef struct { - struct mutex m_mutex; - spinlock_t m_lock; - kthread_t *m_owner; + struct mutex m_mutex; + spinlock_t m_lock; /* used for serializing mutex_exit */ + kthread_t *m_owner; } kmutex_t; -#define MUTEX(mp) (&((mp)->m_mutex)) +#define MUTEX(mp) (&((mp)->m_mutex)) static inline void spl_mutex_set_owner(kmutex_t *mp) { - mp->m_owner = current; + mp->m_owner = current; } static inline void spl_mutex_clear_owner(kmutex_t *mp) { - mp->m_owner = NULL; + mp->m_owner = NULL; } -#define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) -#define mutex_owned(mp) (mutex_owner(mp) == current) -#define MUTEX_HELD(mp) mutex_owned(mp) -#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) +#define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) +#define mutex_owned(mp) (mutex_owner(mp) == current) +#define MUTEX_HELD(mp) mutex_owned(mp) +#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) /* * The following functions must be a #define and not static inline. @@ -146,46 +142,46 @@ spl_mutex_clear_owner(kmutex_t *mp) * for the built in kernel lock analysis tools */ #undef mutex_init -#define mutex_init(mp, name, type, ibc) \ -({ \ - static struct lock_class_key __key; \ - ASSERT(type == MUTEX_DEFAULT); \ - \ - __mutex_init(MUTEX(mp), #mp, &__key); \ - spin_lock_init(&(mp)->m_lock); \ - spl_mutex_clear_owner(mp); \ -}) +#define mutex_init(mp, name, type, ibc) \ +{ \ + static struct lock_class_key __key; \ + ASSERT(type == MUTEX_DEFAULT); \ + \ + __mutex_init(MUTEX(mp), #mp, &__key); \ + spin_lock_init(&(mp)->m_lock); \ + spl_mutex_clear_owner(mp); \ +} #undef mutex_destroy -#define mutex_destroy(mp) \ -({ \ - VERIFY3P(mutex_owner(mp), ==, NULL); \ +#define mutex_destroy(mp) \ +{ \ + VERIFY3P(mutex_owner(mp), ==, NULL); \ +} + +#define mutex_tryenter(mp) \ +({ \ + int _rc_; \ + \ + if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \ + spl_mutex_set_owner(mp); \ + \ + _rc_; \ }) -#define mutex_tryenter(mp) \ -({ \ - int _rc_; \ - \ - if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \ - spl_mutex_set_owner(mp); \ - \ - _rc_; \ -}) +#define mutex_enter(mp) \ +{ \ + ASSERT3P(mutex_owner(mp), !=, current); \ + mutex_lock(MUTEX(mp)); \ + spl_mutex_set_owner(mp); \ +} -#define mutex_enter(mp) \ -({ \ - ASSERT3P(mutex_owner(mp), !=, current); \ - mutex_lock(MUTEX(mp)); \ - spl_mutex_set_owner(mp); \ -}) - -#define mutex_exit(mp) \ -({ \ - spin_lock(&(mp)->m_lock); \ - spl_mutex_clear_owner(mp); \ - mutex_unlock(MUTEX(mp)); \ - spin_unlock(&(mp)->m_lock); \ -}) +#define mutex_exit(mp) \ +{ \ + spin_lock(&(mp)->m_lock); \ + spl_mutex_clear_owner(mp); \ + mutex_unlock(MUTEX(mp)); \ + spin_unlock(&(mp)->m_lock); \ +} #endif /* HAVE_MUTEX_OWNER */ From 5f920fbee1fd1838bad2d5a262041a3a171b6834 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 25 Feb 2015 10:23:49 -0800 Subject: [PATCH 0871/1062] Retire MUTEX_OWNER checks To minimize the size of a kmutex_t a MUTEX_OWNER check was added. It allowed the kmutex_t wrapper to leverage the mutex owner which was already stored in the mutex for certain kernel configurations. The upside to this was that it reduced the size of the kmutex_t wrapper structure by the size of a task_struct pointer (4/8 bytes). The downside was that two mutex implementations needed to be maintained. Depending on your exact kernel configuration the correct one would be selected. Over the years this solution worked but it could be fragile since it depending heavily on assumed kernel mutex implementation details. For example the SPL_AC_MUTEX_OWNER_TASK_STRUCT configure check needed to be added when the kernel changed how the owner was stored. It also made the code more complicated than it needed to be. Therefore, in the name of simplicity and portability this optimization is being retired. It will slightly increase the memory requirements for a kmutex_t but only very slightly. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #435 --- config/spl-build.m4 | 50 ----------------------- include/sys/mutex.h | 96 +++++++++------------------------------------ 2 files changed, 19 insertions(+), 127 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d2cb68b6b..4b55809ce 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -25,8 +25,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SHRINKER_CALLBACK SPL_AC_CTL_NAME SPL_AC_PDE_DATA - SPL_AC_MUTEX_OWNER - SPL_AC_MUTEX_OWNER_TASK_STRUCT SPL_AC_SET_FS_PWD_WITH_CONST SPL_AC_2ARGS_VFS_UNLINK SPL_AC_4ARGS_VFS_RENAME @@ -865,54 +863,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [ ]) ]) -dnl # -dnl # 2.6.29 API change, -dnl # Adaptive mutexs were introduced which track the mutex owner. The -dnl # mutex wrappers leverage this functionality to avoid tracking the -dnl # owner multipe times. -dnl # -AC_DEFUN([SPL_AC_MUTEX_OWNER], [ - AC_MSG_CHECKING([whether struct mutex has owner]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct mutex mtx __attribute__ ((unused)); - mtx.owner = NULL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MUTEX_OWNER, 1, [struct mutex has owner]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.39 API change, -dnl # Owner type change. A Linux mutex prior to 2.6.39 would store -dnl # the owner as a thread_info pointer when CONFIG_DEBUG_MUTEXES -dnl # was defined. As of 2.6.39 this was changed to a task_struct -dnl # pointer which frankly makes a lot more sense. -dnl # -AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [ - AC_MSG_CHECKING([whether struct mutex owner is a task_struct]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - struct mutex mtx __attribute__ ((unused)); - mtx.owner = current; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MUTEX_OWNER_TASK_STRUCT, 1, - [struct mutex owner is a task_struct]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - dnl # dnl # 3.10 API change, dnl # PDE is replaced by PDE_DATA diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 43467223c..2e4509345 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -35,81 +35,6 @@ typedef enum { MUTEX_ADAPTIVE = 2 } kmutex_type_t; -#if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) && \ - !defined(CONFIG_DEBUG_MUTEXES) - -typedef struct { - struct mutex m; - spinlock_t m_lock; /* used for serializing mutex_exit */ -} kmutex_t; - -static inline kthread_t * -mutex_owner(kmutex_t *mp) -{ -#if defined(HAVE_MUTEX_OWNER_TASK_STRUCT) - return (ACCESS_ONCE(mp->m.owner)); -#else - struct thread_info *owner = ACCESS_ONCE(mp->m.owner); - if (owner) - return (owner->task); - - return (NULL); -#endif -} - -#define mutex_owned(mp) (mutex_owner(mp) == current) -#define MUTEX_HELD(mp) mutex_owned(mp) -#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) -#undef mutex_init -#define mutex_init(mp, name, type, ibc) \ -{ \ - static struct lock_class_key __key; \ - ASSERT(type == MUTEX_DEFAULT); \ - \ - __mutex_init(&(mp)->m, #mp, &__key); \ - spin_lock_init(&(mp)->m_lock); \ -} - -#undef mutex_destroy -#define mutex_destroy(mp) \ -{ \ - VERIFY3P(mutex_owner(mp), ==, NULL); \ -} - -#define mutex_tryenter(mp) mutex_trylock(&(mp)->m) -#define mutex_enter(mp) \ -{ \ - ASSERT3P(mutex_owner(mp), !=, current); \ - mutex_lock(&(mp)->m); \ -} -/* - * The reason for the spinlock: - * - * The Linux mutex is designed with a fast-path/slow-path design such that it - * does not guarantee serialization upon itself, allowing a race where latter - * acquirers finish mutex_unlock before former ones. - * - * The race renders it unsafe to be used for serializing the freeing of an - * object in which the mutex is embedded, where the latter acquirer could go - * on to free the object while the former one is still doing mutex_unlock and - * causing memory corruption. - * - * However, there are many places in ZFS where the mutex is used for - * serializing object freeing, and the code is shared among other OSes without - * this issue. Thus, we need the spinlock to force the serialization on - * mutex_exit(). - * - * See http://lwn.net/Articles/575477/ for the information about the race. - */ -#define mutex_exit(mp) \ -{ \ - spin_lock(&(mp)->m_lock); \ - mutex_unlock(&(mp)->m); \ - spin_unlock(&(mp)->m_lock); \ -} - -#else /* HAVE_MUTEX_OWNER */ - typedef struct { struct mutex m_mutex; spinlock_t m_lock; /* used for serializing mutex_exit */ @@ -175,6 +100,25 @@ spl_mutex_clear_owner(kmutex_t *mp) spl_mutex_set_owner(mp); \ } +/* + * The reason for the spinlock: + * + * The Linux mutex is designed with a fast-path/slow-path design such that it + * does not guarantee serialization upon itself, allowing a race where latter + * acquirers finish mutex_unlock before former ones. + * + * The race renders it unsafe to be used for serializing the freeing of an + * object in which the mutex is embedded, where the latter acquirer could go + * on to free the object while the former one is still doing mutex_unlock and + * causing memory corruption. + * + * However, there are many places in ZFS where the mutex is used for + * serializing object freeing, and the code is shared among other OSes without + * this issue. Thus, we need the spinlock to force the serialization on + * mutex_exit(). + * + * See http://lwn.net/Articles/575477/ for the information about the race. + */ #define mutex_exit(mp) \ { \ spin_lock(&(mp)->m_lock); \ @@ -183,8 +127,6 @@ spl_mutex_clear_owner(kmutex_t *mp) spin_unlock(&(mp)->m_lock); \ } -#endif /* HAVE_MUTEX_OWNER */ - int spl_mutex_init(void); void spl_mutex_fini(void); From d0d5dd714424365a4da0d887cb641cb2f0ae8844 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 25 Feb 2015 10:29:02 -0800 Subject: [PATCH 0872/1062] Add MUTEX_FSTRANS mutex type There are regions in the ZFS code where it is desirable to be able to be set PF_FSTRANS while a specific mutex is held. The ZFS code could be updated to set/clear this flag in all the correct places, but this is undesirable for a few reasons. 1) It would require changes to a significant amount of the ZFS code. This would complicate applying patches from upstream. 2) It would be easy to accidentally miss a critical region in the initial patch or to have an future change introduce a new one. Both of these concerns can be addressed by adding a new mutex type which is responsible for managing PF_FSTRANS, support for which was added to the SPL in commit 9099312 - Merge branch 'kmem-rework'. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #435 --- include/sys/mutex.h | 50 ++++++++++++++++++++++--------------- module/splat/splat-atomic.c | 2 +- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 2e4509345..5e2b2508a 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -32,29 +32,19 @@ typedef enum { MUTEX_DEFAULT = 0, MUTEX_SPIN = 1, - MUTEX_ADAPTIVE = 2 + MUTEX_ADAPTIVE = 2, + MUTEX_FSTRANS = 3, } kmutex_type_t; typedef struct { struct mutex m_mutex; + kmutex_type_t m_type; spinlock_t m_lock; /* used for serializing mutex_exit */ kthread_t *m_owner; + unsigned int m_saved_flags; } kmutex_t; #define MUTEX(mp) (&((mp)->m_mutex)) - -static inline void -spl_mutex_set_owner(kmutex_t *mp) -{ - mp->m_owner = current; -} - -static inline void -spl_mutex_clear_owner(kmutex_t *mp) -{ - mp->m_owner = NULL; -} - #define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) @@ -70,11 +60,18 @@ spl_mutex_clear_owner(kmutex_t *mp) #define mutex_init(mp, name, type, ibc) \ { \ static struct lock_class_key __key; \ - ASSERT(type == MUTEX_DEFAULT); \ + \ + ASSERT3P(mp, !=, NULL); \ + ASSERT3P(ibc, ==, NULL); \ + ASSERT((type == MUTEX_DEFAULT) || \ + (type == MUTEX_ADAPTIVE) || \ + (type == MUTEX_FSTRANS)); \ \ __mutex_init(MUTEX(mp), #mp, &__key); \ spin_lock_init(&(mp)->m_lock); \ - spl_mutex_clear_owner(mp); \ + (mp)->m_type = type; \ + (mp)->m_owner = NULL; \ + (mp)->m_saved_flags = 0; \ } #undef mutex_destroy @@ -87,8 +84,13 @@ spl_mutex_clear_owner(kmutex_t *mp) ({ \ int _rc_; \ \ - if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \ - spl_mutex_set_owner(mp); \ + if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) { \ + (mp)->m_owner = current; \ + if ((mp)->m_type == MUTEX_FSTRANS) { \ + (mp)->m_saved_flags = current->flags; \ + current->flags |= PF_FSTRANS; \ + } \ + } \ \ _rc_; \ }) @@ -97,7 +99,11 @@ spl_mutex_clear_owner(kmutex_t *mp) { \ ASSERT3P(mutex_owner(mp), !=, current); \ mutex_lock(MUTEX(mp)); \ - spl_mutex_set_owner(mp); \ + (mp)->m_owner = current; \ + if ((mp)->m_type == MUTEX_FSTRANS) { \ + (mp)->m_saved_flags = current->flags; \ + current->flags |= PF_FSTRANS; \ + } \ } /* @@ -122,7 +128,11 @@ spl_mutex_clear_owner(kmutex_t *mp) #define mutex_exit(mp) \ { \ spin_lock(&(mp)->m_lock); \ - spl_mutex_clear_owner(mp); \ + if ((mp)->m_type == MUTEX_FSTRANS) { \ + current->flags &= ~(PF_FSTRANS); \ + current->flags |= (mp)->m_saved_flags; \ + } \ + (mp)->m_owner = NULL; \ mutex_unlock(MUTEX(mp)); \ spin_unlock(&(mp)->m_lock); \ } diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index a270dc42f..e94f42f00 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -145,7 +145,7 @@ splat_atomic_test1(struct file *file, void *arg) ap.ap_magic = SPLAT_ATOMIC_TEST_MAGIC; ap.ap_file = file; - mutex_init(&ap.ap_lock, SPLAT_ATOMIC_TEST1_NAME, NULL, NULL); + mutex_init(&ap.ap_lock, SPLAT_ATOMIC_TEST1_NAME, MUTEX_DEFAULT, NULL); init_waitqueue_head(&ap.ap_waitq); ap.ap_atomic = SPLAT_ATOMIC_INIT_VALUE; ap.ap_atomic_exited = 0; From 6ab08667a44458f775da9f0ecceddbcea1275746 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 26 Feb 2015 16:12:55 -0800 Subject: [PATCH 0873/1062] Reduce splat_taskq_test2_impl() stack frame size Slightly increasing the size of a kmutex_t has caused us to exceed the stack frame warning size in splat_taskq_test2_impl(). To address this the tq_args have been moved to the heap. cc1: warnings being treated as errors spl-0.6.3/module/splat/splat-taskq.c:358: error: the frame size of 1040 bytes is larger than 1024 bytes Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #435 --- module/splat/splat-taskq.c | 51 +++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 8229fed39..2787bf401 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -231,7 +231,7 @@ static int splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_t *tq[TEST2_TASKQS] = { NULL }; taskqid_t id; - splat_taskq_arg_t tq_args[TEST2_TASKQS]; + splat_taskq_arg_t *tq_args[TEST2_TASKQS] = { NULL }; taskq_ent_t *func1_tqes = NULL; taskq_ent_t *func2_tqes = NULL; int i, rc = 0; @@ -252,6 +252,12 @@ splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { taskq_init_ent(&func1_tqes[i]); taskq_init_ent(&func2_tqes[i]); + tq_args[i] = kmalloc(sizeof (splat_taskq_arg_t), GFP_KERNEL); + if (tq_args[i] == NULL) { + rc = -ENOMEM; + break; + } + splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' creating (%s dispatch)\n", SPLAT_TASKQ_TEST2_NAME, i, @@ -267,28 +273,28 @@ splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { break; } - tq_args[i].flag = i; - tq_args[i].id = i; - tq_args[i].file = file; - tq_args[i].name = SPLAT_TASKQ_TEST2_NAME; + tq_args[i]->flag = i; + tq_args[i]->id = i; + tq_args[i]->file = file; + tq_args[i]->name = SPLAT_TASKQ_TEST2_NAME; splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatching\n", - tq_args[i].name, tq_args[i].id, + tq_args[i]->name, tq_args[i]->id, sym2str(splat_taskq_test2_func1)); if (prealloc) { taskq_dispatch_ent(tq[i], splat_taskq_test2_func1, - &tq_args[i], TQ_SLEEP, &func1_tqes[i]); + tq_args[i], TQ_SLEEP, &func1_tqes[i]); id = func1_tqes[i].tqent_id; } else { id = taskq_dispatch(tq[i], splat_taskq_test2_func1, - &tq_args[i], TQ_SLEEP); + tq_args[i], TQ_SLEEP); } if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch " - "failed\n", tq_args[i].name, tq_args[i].id, + "failed\n", tq_args[i]->name, tq_args[i]->id, sym2str(splat_taskq_test2_func1)); rc = -EINVAL; break; @@ -296,21 +302,21 @@ splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatching\n", - tq_args[i].name, tq_args[i].id, + tq_args[i]->name, tq_args[i]->id, sym2str(splat_taskq_test2_func2)); if (prealloc) { taskq_dispatch_ent(tq[i], splat_taskq_test2_func2, - &tq_args[i], TQ_SLEEP, &func2_tqes[i]); + tq_args[i], TQ_SLEEP, &func2_tqes[i]); id = func2_tqes[i].tqent_id; } else { id = taskq_dispatch(tq[i], splat_taskq_test2_func2, - &tq_args[i], TQ_SLEEP); + tq_args[i], TQ_SLEEP); } if (id == 0) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq " "'%s/%d' function '%s' dispatch failed\n", - tq_args[i].name, tq_args[i].id, + tq_args[i]->name, tq_args[i]->id, sym2str(splat_taskq_test2_func2)); rc = -EINVAL; break; @@ -320,31 +326,36 @@ splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { /* When rc is set we're effectively just doing cleanup here, so * ignore new errors in that case. They just cause noise. */ for (i = 0; i < TEST2_TASKQS; i++) { + if (tq_args[i] == NULL) + continue; + if (tq[i] != NULL) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' waiting\n", - tq_args[i].name, tq_args[i].id); + tq_args[i]->name, tq_args[i]->id); taskq_wait(tq[i]); splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d; destroying\n", - tq_args[i].name, tq_args[i].id); + tq_args[i]->name, tq_args[i]->id); taskq_destroy(tq[i]); - if (!rc && tq_args[i].flag != ((i * 2) + 1)) { + if (!rc && tq_args[i]->flag != ((i * 2) + 1)) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' processed tasks " "out of order; %d != %d\n", - tq_args[i].name, tq_args[i].id, - tq_args[i].flag, i * 2 + 1); + tq_args[i]->name, tq_args[i]->id, + tq_args[i]->flag, i * 2 + 1); rc = -EINVAL; } else { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' processed tasks " "in the correct order; %d == %d\n", - tq_args[i].name, tq_args[i].id, - tq_args[i].flag, i * 2 + 1); + tq_args[i]->name, tq_args[i]->id, + tq_args[i]->flag, i * 2 + 1); } + + kfree(tq_args[i]); } } out: From 79a0056e137c9cc540eb9ff7327c85ac8d094e6c Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Fri, 20 Mar 2015 14:03:26 -0500 Subject: [PATCH 0874/1062] Add mutex_enter_nested() which maps to mutex_lock_nested() Also add support for the "name" parameter in mutex_init(). The name allows for better diagnostics, namely in /proc/lock_stats when lock debugging is enabled. Nested mutexes are necessary to support CONFIG_PROVE_LOCKING. ZoL can use mutex_enter_nested()'s "class" argument to to convey the locking hierarchy. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #439 --- include/sys/mutex.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 5e2b2508a..6355782c0 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -67,7 +67,7 @@ typedef struct { (type == MUTEX_ADAPTIVE) || \ (type == MUTEX_FSTRANS)); \ \ - __mutex_init(MUTEX(mp), #mp, &__key); \ + __mutex_init(MUTEX(mp), (name) ? (#name) : (#mp), &__key); \ spin_lock_init(&(mp)->m_lock); \ (mp)->m_type = type; \ (mp)->m_owner = NULL; \ @@ -95,7 +95,19 @@ typedef struct { _rc_; \ }) -#define mutex_enter(mp) \ +#ifdef CONFIG_DEBUG_LOCK_ALLOC +#define mutex_enter_nested(mp, subclass) \ +{ \ + ASSERT3P(mutex_owner(mp), !=, current); \ + mutex_lock_nested(MUTEX(mp), (subclass)); \ + (mp)->m_owner = current; \ + if ((mp)->m_type == MUTEX_FSTRANS) { \ + (mp)->m_saved_flags = current->flags; \ + current->flags |= PF_FSTRANS; \ + } \ +} +#else /* CONFIG_DEBUG_LOCK_ALLOC */ +#define mutex_enter_nested(mp, subclass) \ { \ ASSERT3P(mutex_owner(mp), !=, current); \ mutex_lock(MUTEX(mp)); \ @@ -105,6 +117,9 @@ typedef struct { current->flags |= PF_FSTRANS; \ } \ } +#endif /* CONFIG_DEBUG_LOCK_ALLOC */ + +#define mutex_enter(mp) mutex_enter_nested((mp), 0) /* * The reason for the spinlock: From abb642b9a971e6c1a15816f9332da89eaebac9c1 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Sun, 22 Mar 2015 21:43:21 -0500 Subject: [PATCH 0875/1062] Set HAVE_FS_STRUCT_SPINLOCK correctly when CONFIG_FRAME_WARN==1024 If kernel lock debugging is enabled, the fs_struct structure exceeds the typical 1024 byte limit of CONFIG_FRAME_WARN and isn't enabled when it otherwise should be. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #440 --- config/spl-build.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 4b55809ce..82fbea0c3 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1033,7 +1033,7 @@ AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [ #include #include ],[ - struct fs_struct fs; + static struct fs_struct fs; spin_lock_init(&fs.lock); ],[ AC_MSG_RESULT(yes) From a4f54cf036d9a966ff87abe9a0063f2b457c2389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hajo=20M=C3=B6ller?= Date: Thu, 12 Mar 2015 23:41:24 +0100 Subject: [PATCH 0876/1062] Fix warning about AM_INIT_AUTOMAKE arguments As of automake 1.14.2, currently shipped with Ubuntu 14.04, automake warns about AM_INIT_AUTOMAKE having more than one argument: configure.ac:41: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see: configure.ac:41: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation This commit fixes the warnings by following above link's advice, so AM_INIT gets called with the package's name and version. As both are defined in the META file we're parsing it with `grep`, `cut` and `tr`. NOTE: autoconf < 1.14 not supporting m4_esyscmd_s so m4_esyscmd was used and modified `tr` to truncate newlines, too. Signed-off-by: Hajo Mller Signed-off-by: Brian Behlendorf Closes #438 --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e81ddfbc8..9746659e4 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,8 @@ # with the SPL. If not, see . ############################################################################### -AC_INIT +AC_INIT(m4_esyscmd(grep Name META | cut -d ':' -f 2 | tr -d ' \n'), + m4_esyscmd(grep Version META | cut -d ':' -f 2 | tr -d ' \n')) AC_LANG(C) SPL_AC_META AC_CONFIG_AUX_DIR([config]) @@ -32,7 +33,7 @@ AC_CONFIG_MACRO_DIR([config]) AC_CANONICAL_SYSTEM AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) +AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([spl_config.h], [ (mv spl_config.h spl_config.h.tmp && awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h && From 72998c2c9db99a7589cfd4696bd11042e262297d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 27 Mar 2015 14:22:38 -0700 Subject: [PATCH 0877/1062] Remove rpm/fedora directory Originally it was thought that custom spec files might be required for Fedora. Happily that has turns out not to be the case. Since this directory just contains symlinks to the generic spec files it can be removed. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 2 +- configure.ac | 4 ---- rpm/Makefile.am | 2 +- rpm/fedora/.gitignore | 3 --- rpm/fedora/Makefile.am | 1 - rpm/fedora/spl-dkms.spec.in | 1 - rpm/fedora/spl-kmod.spec.in | 1 - rpm/fedora/spl.spec.in | 1 - 8 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 rpm/fedora/.gitignore delete mode 100644 rpm/fedora/Makefile.am delete mode 120000 rpm/fedora/spl-dkms.spec.in delete mode 120000 rpm/fedora/spl-kmod.spec.in delete mode 120000 rpm/fedora/spl.spec.in diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 82fbea0c3..058866dd6 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -229,7 +229,7 @@ AC_DEFUN([SPL_AC_RPM], [ RPM_SPEC_DIR="rpm/generic" AC_ARG_WITH([spec], AS_HELP_STRING([--with-spec=SPEC], - [Spec files 'generic|fedora']), + [Spec files 'generic']), [RPM_SPEC_DIR="rpm/$withval"]) AC_MSG_CHECKING([whether spec files are available]) diff --git a/configure.ac b/configure.ac index 9746659e4..2aee70b71 100644 --- a/configure.ac +++ b/configure.ac @@ -70,10 +70,6 @@ AC_CONFIG_FILES([ include/vm/Makefile scripts/Makefile rpm/Makefile - rpm/fedora/Makefile - rpm/fedora/spl.spec - rpm/fedora/spl-kmod.spec - rpm/fedora/spl-dkms.spec rpm/generic/Makefile rpm/generic/spl.spec rpm/generic/spl-kmod.spec diff --git a/rpm/Makefile.am b/rpm/Makefile.am index e41cdda2e..b564eeefd 100644 --- a/rpm/Makefile.am +++ b/rpm/Makefile.am @@ -1 +1 @@ -SUBDIRS = fedora generic +SUBDIRS = generic diff --git a/rpm/fedora/.gitignore b/rpm/fedora/.gitignore deleted file mode 100644 index 67129ff14..000000000 --- a/rpm/fedora/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/spl-dkms.spec -/spl-kmod.spec -/spl.spec diff --git a/rpm/fedora/Makefile.am b/rpm/fedora/Makefile.am deleted file mode 100644 index da6c4abe2..000000000 --- a/rpm/fedora/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = spl.spec.in spl-kmod.spec.in spl-dkms.spec.in diff --git a/rpm/fedora/spl-dkms.spec.in b/rpm/fedora/spl-dkms.spec.in deleted file mode 120000 index 900f524aa..000000000 --- a/rpm/fedora/spl-dkms.spec.in +++ /dev/null @@ -1 +0,0 @@ -../generic/spl-dkms.spec.in \ No newline at end of file diff --git a/rpm/fedora/spl-kmod.spec.in b/rpm/fedora/spl-kmod.spec.in deleted file mode 120000 index 311c24d84..000000000 --- a/rpm/fedora/spl-kmod.spec.in +++ /dev/null @@ -1 +0,0 @@ -../generic/spl-kmod.spec.in \ No newline at end of file diff --git a/rpm/fedora/spl.spec.in b/rpm/fedora/spl.spec.in deleted file mode 120000 index d3276f013..000000000 --- a/rpm/fedora/spl.spec.in +++ /dev/null @@ -1 +0,0 @@ -../generic/spl.spec.in \ No newline at end of file From fade6b00b61e71f4332d274b9a5e0528764df5fb Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 27 Mar 2015 14:23:27 -0700 Subject: [PATCH 0878/1062] Add RHEL style kmod packages Provide a Redhat specific spl-kmod.spec file which uses the old style kmods (not kmods2) packaging. By using the provided kmodtool script packages can be built which support weak modules. This allows for the kernel to be updated without having to rebuild the SPL kernel modules. Packages for RHEL/Centos/SL/TOSS which use this spec file can by built as follows: $ ./configure --with-spec=redhat $ make rpms Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 2 +- configure.ac | 4 ++ rpm/Makefile.am | 2 +- rpm/redhat/.gitignore | 3 ++ rpm/redhat/Makefile.am | 1 + rpm/redhat/spl-dkms.spec.in | 1 + rpm/redhat/spl-kmod.spec.in | 104 ++++++++++++++++++++++++++++++++++++ rpm/redhat/spl.spec.in | 1 + 8 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 rpm/redhat/.gitignore create mode 100644 rpm/redhat/Makefile.am create mode 120000 rpm/redhat/spl-dkms.spec.in create mode 100644 rpm/redhat/spl-kmod.spec.in create mode 120000 rpm/redhat/spl.spec.in diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 058866dd6..3bfc1e232 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -229,7 +229,7 @@ AC_DEFUN([SPL_AC_RPM], [ RPM_SPEC_DIR="rpm/generic" AC_ARG_WITH([spec], AS_HELP_STRING([--with-spec=SPEC], - [Spec files 'generic']), + [Spec files 'generic|redhat']), [RPM_SPEC_DIR="rpm/$withval"]) AC_MSG_CHECKING([whether spec files are available]) diff --git a/configure.ac b/configure.ac index 2aee70b71..efeb243cb 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,10 @@ AC_CONFIG_FILES([ include/vm/Makefile scripts/Makefile rpm/Makefile + rpm/redhat/Makefile + rpm/redhat/spl.spec + rpm/redhat/spl-kmod.spec + rpm/redhat/spl-dkms.spec rpm/generic/Makefile rpm/generic/spl.spec rpm/generic/spl-kmod.spec diff --git a/rpm/Makefile.am b/rpm/Makefile.am index b564eeefd..f2cf72cef 100644 --- a/rpm/Makefile.am +++ b/rpm/Makefile.am @@ -1 +1 @@ -SUBDIRS = generic +SUBDIRS = generic redhat diff --git a/rpm/redhat/.gitignore b/rpm/redhat/.gitignore new file mode 100644 index 000000000..67129ff14 --- /dev/null +++ b/rpm/redhat/.gitignore @@ -0,0 +1,3 @@ +/spl-dkms.spec +/spl-kmod.spec +/spl.spec diff --git a/rpm/redhat/Makefile.am b/rpm/redhat/Makefile.am new file mode 100644 index 000000000..da6c4abe2 --- /dev/null +++ b/rpm/redhat/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = spl.spec.in spl-kmod.spec.in spl-dkms.spec.in diff --git a/rpm/redhat/spl-dkms.spec.in b/rpm/redhat/spl-dkms.spec.in new file mode 120000 index 000000000..900f524aa --- /dev/null +++ b/rpm/redhat/spl-dkms.spec.in @@ -0,0 +1 @@ +../generic/spl-dkms.spec.in \ No newline at end of file diff --git a/rpm/redhat/spl-kmod.spec.in b/rpm/redhat/spl-kmod.spec.in new file mode 100644 index 000000000..393528597 --- /dev/null +++ b/rpm/redhat/spl-kmod.spec.in @@ -0,0 +1,104 @@ +%bcond_with debug +%bcond_with debug_log +%bcond_with debug_kmem +%bcond_with debug_kmem_tracking +%bcond_with atomic_spinlocks + +Name: @PACKAGE@-kmod +Version: @VERSION@ +Release: @RELEASE@%{?dist} + +Summary: Kernel module(s) +Group: System Environment/Kernel +License: GPLv2+ +URL: http://zfsonlinux.org/ +BuildRequires: %kernel_module_package_buildreqs +Source0: @PACKAGE@-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# Additional dependency information for the kmod sub-package must be specified +# by generating a preamble text file which kmodtool can append to the spec file. +%(/bin/echo -e "\ +Requires: @PACKAGE@ = %{version}\n\ +Conflicts: @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble) + +%description +This package contains the kernel modules required to emulate +several interfaces provided by the Solaris kernel. + +%define kmod_name spl +%define debug_package %{nil} + +%kernel_module_package -n %{kmod_name} -p %{_sourcedir}/kmod-preamble + +%define ksrc %{_usrsrc}/kernels/%{kverrel} +%define kobj %{ksrc} + +%package -n kmod-%{kmod_name}-devel +Summary: SPL kernel module(s) devel common +Group: System Environment/Kernel + +%description -n kmod-%{kmod_name}-devel +This package provides the header files and objects to build kernel modules +which depend on the SPL kernel module. + +%prep +if ! [ -d "%{ksrc}" ]; then + echo "Kernel build directory isn't set properly, cannot continue" + exit 1 +fi + +%if %{with debug} +%define debug --enable-debug +%else +%define debug --disable-debug +%endif + +%if %{with debug_log} +%define debug_log --enable-debug-log +%else +%define debug_log --disable-debug-log +%endif + +%if %{with debug_kmem} +%define debug_kmem --enable-debug-kmem +%else +%define debug_kmem --disable-debug-kmem +%endif + +%if %{with debug_kmem_tracking} +%define debug_kmem_tracking --enable-debug-kmem-tracking +%else +%define debug_kmem_tracking --disable-debug-kmem-tracking +%endif + +%if %{with atomic_spinlocks} +%define atomic_spinlocks --enable-atomic-spinlocks +%else +%define atomic_spinlocks --disable-atomic-spinlocks +%endif + +%setup -n %{kmod_name}-%{version} +%build +%configure \ + --with-config=kernel \ + --with-linux=%{ksrc} \ + --with-linux-obj=%{kobj} \ + %{debug} \ + %{debug_log} \ + %{debug_kmem} \ + %{debug_kmem_tracking} \ + %{atomic_spinlocks} +make %{?_smp_mflags} + +%install +make install \ + DESTDIR=${RPM_BUILD_ROOT} \ + INSTALL_MOD_DIR=extra/%{kmod_name} +%{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.* + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -n kmod-%{kmod_name}-devel +%{_usrsrc}/%{kmod_name}-%{version} diff --git a/rpm/redhat/spl.spec.in b/rpm/redhat/spl.spec.in new file mode 120000 index 000000000..d3276f013 --- /dev/null +++ b/rpm/redhat/spl.spec.in @@ -0,0 +1 @@ +../generic/spl.spec.in \ No newline at end of file From c0899611103c76bb975c7bab5063d937f76e61e6 Mon Sep 17 00:00:00 2001 From: Chris Dunlop Date: Thu, 2 Apr 2015 23:17:26 +1100 Subject: [PATCH 0879/1062] Add crgetzoneid() stub Illumos 3897 introduces a dependency on crgetzoneid(). Stub it out until such time as zones are implemented. References: https://www.illumos.org/issues/3897 https://github.com/illumos/illumos-gate/commit/fb7001f Signed-off-by: Chris Dunlop Signed-off-by: Brian Behlendorf Closes #444 --- include/sys/zone.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/sys/zone.h b/include/sys/zone.h index 6b7a1c65f..5a3c0869f 100644 --- a/include/sys/zone.h +++ b/include/sys/zone.h @@ -27,7 +27,10 @@ #include -#define zone_dataset_visible(x, y) (1) -#define INGLOBALZONE(z) (1) +#define GLOBAL_ZONEID 0 + +#define zone_dataset_visible(x, y) (1) +#define crgetzoneid(x) (GLOBAL_ZONEID) +#define INGLOBALZONE(z) (1) #endif /* SPL_ZONE_H */ From ae26dd003911277e0c7134b3e4e3a41c300a2fd5 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Tue, 31 Mar 2015 07:49:15 -0500 Subject: [PATCH 0880/1062] Don't allow shrinking a PF_FSTRANS context Avoid deadlocks when entering the shrinker from a PF_FSTRANS context. This patch also reverts commit d0d5dd7 which added MUTEX_FSTRANS. Its use has been deprecated within ZFS as it was an ineffective mechanism to eliminate deadlocks. Among other things, it introduced the need for strict ordering of mutex locking and unlocking in order that the PF_FSTRANS flag wouldn't set incorrectly. Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #446 --- include/sys/mutex.h | 56 ++++++++++++++----------------------- module/spl/spl-kmem-cache.c | 6 ++++ 2 files changed, 27 insertions(+), 35 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 6355782c0..9b297e9fa 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -32,19 +32,29 @@ typedef enum { MUTEX_DEFAULT = 0, MUTEX_SPIN = 1, - MUTEX_ADAPTIVE = 2, - MUTEX_FSTRANS = 3, + MUTEX_ADAPTIVE = 2 } kmutex_type_t; typedef struct { struct mutex m_mutex; - kmutex_type_t m_type; spinlock_t m_lock; /* used for serializing mutex_exit */ kthread_t *m_owner; - unsigned int m_saved_flags; } kmutex_t; #define MUTEX(mp) (&((mp)->m_mutex)) + +static inline void +spl_mutex_set_owner(kmutex_t *mp) +{ + mp->m_owner = current; +} + +static inline void +spl_mutex_clear_owner(kmutex_t *mp) +{ + mp->m_owner = NULL; +} + #define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) @@ -60,18 +70,11 @@ typedef struct { #define mutex_init(mp, name, type, ibc) \ { \ static struct lock_class_key __key; \ - \ - ASSERT3P(mp, !=, NULL); \ - ASSERT3P(ibc, ==, NULL); \ - ASSERT((type == MUTEX_DEFAULT) || \ - (type == MUTEX_ADAPTIVE) || \ - (type == MUTEX_FSTRANS)); \ + ASSERT(type == MUTEX_DEFAULT); \ \ __mutex_init(MUTEX(mp), (name) ? (#name) : (#mp), &__key); \ spin_lock_init(&(mp)->m_lock); \ - (mp)->m_type = type; \ - (mp)->m_owner = NULL; \ - (mp)->m_saved_flags = 0; \ + spl_mutex_clear_owner(mp); \ } #undef mutex_destroy @@ -84,13 +87,8 @@ typedef struct { ({ \ int _rc_; \ \ - if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) { \ - (mp)->m_owner = current; \ - if ((mp)->m_type == MUTEX_FSTRANS) { \ - (mp)->m_saved_flags = current->flags; \ - current->flags |= PF_FSTRANS; \ - } \ - } \ + if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \ + spl_mutex_set_owner(mp); \ \ _rc_; \ }) @@ -100,22 +98,14 @@ typedef struct { { \ ASSERT3P(mutex_owner(mp), !=, current); \ mutex_lock_nested(MUTEX(mp), (subclass)); \ - (mp)->m_owner = current; \ - if ((mp)->m_type == MUTEX_FSTRANS) { \ - (mp)->m_saved_flags = current->flags; \ - current->flags |= PF_FSTRANS; \ - } \ + spl_mutex_set_owner(mp); \ } #else /* CONFIG_DEBUG_LOCK_ALLOC */ #define mutex_enter_nested(mp, subclass) \ { \ ASSERT3P(mutex_owner(mp), !=, current); \ mutex_lock(MUTEX(mp)); \ - (mp)->m_owner = current; \ - if ((mp)->m_type == MUTEX_FSTRANS) { \ - (mp)->m_saved_flags = current->flags; \ - current->flags |= PF_FSTRANS; \ - } \ + spl_mutex_set_owner(mp); \ } #endif /* CONFIG_DEBUG_LOCK_ALLOC */ @@ -143,11 +133,7 @@ typedef struct { #define mutex_exit(mp) \ { \ spin_lock(&(mp)->m_lock); \ - if ((mp)->m_type == MUTEX_FSTRANS) { \ - current->flags &= ~(PF_FSTRANS); \ - current->flags |= (mp)->m_saved_flags; \ - } \ - (mp)->m_owner = NULL; \ + spl_mutex_clear_owner(mp); \ mutex_unlock(MUTEX(mp)); \ spin_unlock(&(mp)->m_lock); \ } diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 6fcc7c4e1..cd3e543ba 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1574,6 +1574,12 @@ __spl_kmem_cache_generic_shrinker(struct shrinker *shrink, spl_kmem_cache_t *skc; int alloc = 0; + /* + * No shrinking in a transaction context. Can cause deadlocks. + */ + if (sc->nr_to_scan && spl_fstrans_check()) + return (SHRINK_STOP); + down_read(&spl_kmem_cache_sem); list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { if (sc->nr_to_scan) { From 2a5d574ecae612a3e3ec488841b40d262184a7a3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 7 Apr 2015 10:05:17 -0700 Subject: [PATCH 0881/1062] Clear PF_FSTRANS over vfs_sync() When layered on XFS the following warning will be emitted under CentOS7 when entering vfs_fsync() with PF_FSTRANS already set. This is not an issue for other stock Linux file systems and the warning was removed for newer kernels. However, to avoid triggering this error PF_FSTRANS is cleared and then reset in vn_fsync(). WARNING: at fs/xfs/xfs_aops.c:968 xfs_vm_writepage+0x5ab/0x5c0 Call Trace: [] warn_slowpath_common+0x61/0x80 [] xfs_vm_writepage+0x5ab/0x5c0 [xfs] [] __writepage+0x13/0x50 [] write_cache_pages+0x251/0x4d0 [] generic_writepages+0x4d/0x80 [] xfs_vm_writepages+0x43/0x50 [xfs] [] do_writepages+0x1e/0x40 [] __filemap_fdatawrite_range+0x65/0x80 [] filemap_write_and_wait_range+0x2a/0x70 [] xfs_file_fsync+0x66/0x1f0 [xfs] [] vfs_fsync+0x2b/0x40 [] vn_fsync+0x2d/0x90 [spl] [] spa_config_sync+0x503/0x680 [zfs] [] spa_config_update+0x134/0x170 [zfs] [] spa_config_update+0x10a/0x170 [zfs] [] spa_import+0x5bf/0x7b0 [zfs] [] zfs_ioc_pool_import+0x104/0x150 [zfs] [] zfsdev_ioctl+0x4cf/0x5c0 [zfs] [] ? pool_status_check+0xf0/0xf0 [zfs] [] do_vfs_ioctl+0x2e5/0x4c0 [] SyS_ioctl+0xa1/0xc0 [] system_call_fastpath+0x16/0x1b Signed-off-by: Brian Behlendorf --- module/spl/spl-vnode.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index bce28a580..1e26b8e29 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -543,6 +543,8 @@ EXPORT_SYMBOL(vn_getattr); int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) { int datasync = 0; + int error; + int fstrans; ASSERT(vp); ASSERT(vp->v_file); @@ -550,7 +552,19 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) if (flags & FDSYNC) datasync = 1; - return (-spl_filp_fsync(vp->v_file, datasync)); + /* + * May enter XFS which generates a warning when PF_FSTRANS is set. + * To avoid this the flag is cleared over vfs_sync() and then reset. + */ + fstrans = spl_fstrans_check(); + if (fstrans) + current->flags &= ~(PF_FSTRANS); + + error = -spl_filp_fsync(vp->v_file, datasync); + if (fstrans) + current->flags |= PF_FSTRANS; + + return (error); } /* vn_fsync() */ EXPORT_SYMBOL(vn_fsync); From cd69f020e4b0f9c416dd07a264e48c9488a7633f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 8 Apr 2015 14:02:36 -0700 Subject: [PATCH 0882/1062] Tag spl-0.6.4 META file and release log updated. Signed-off-by: Brian Behlendorf --- META | 2 +- rpm/generic/spl-kmod.spec.in | 2 ++ rpm/generic/spl.spec.in | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/META b/META index 13d0d028a..96d11b6e8 100644 --- a/META +++ b/META @@ -1,7 +1,7 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.6.3 +Version: 0.6.4 Release: 1 Release-Tags: relext License: GPL diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 490734667..8f1f2321c 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -160,6 +160,8 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 8 2015 Brian Behlendorf - 0.6.4-1 +- Released 0.6.4-1 * Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 - Released 0.6.3-1 * Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 7934787c5..81f30e025 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -38,6 +38,8 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog +* Wed Apr 8 2015 Brian Behlendorf - 0.6.4-1 +- Released 0.6.4-1 * Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 - Released 0.6.3-1 * Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 From 313b1ea622275e24c3046c3b04a98a933b18f8de Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 16 Apr 2015 10:29:41 -0400 Subject: [PATCH 0883/1062] vn_getf/vn_releasef should not accept negative file descriptors C type coercion rules require that negative numbers be converted into positive numbers via wraparound such that a negative -1 becomes a positive 1. This causes vn_getf to return a file handle when it should return NULL whenever a positive file descriptor existed with the same value. We should check for a negative file descriptor and return NULL instead. This was caught by ClusterHQ's unit testing. Reference: http://stackoverflow.com/questions/50605/signed-to-unsigned-conversion-in-c-is-it-always-safe Signed-off-by: Richard Yao Signed-off-by: Andriy Gapon Signed-off-by: Brian Behlendorf Closes #450 --- module/spl/spl-vnode.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 1e26b8e29..4c62097dc 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -648,6 +648,9 @@ vn_getf(int fd) vnode_t *vp; int rc = 0; + if (fd < 0) + return (NULL); + /* Already open just take an extra reference */ spin_lock(&vn_file_lock); @@ -733,6 +736,9 @@ vn_releasef(int fd) { file_t *fp; + if (fd < 0) + return; + spin_lock(&vn_file_lock); fp = file_find(fd); if (fp) { From d3c677bcd330423c72cd4d4100727e5c1e8c1f38 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 17 Feb 2015 10:12:56 -0500 Subject: [PATCH 0884/1062] Implement areleasef() Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #449 --- include/sys/Makefile.am | 1 + include/sys/user.h | 42 +++++++++++++++++++++++++++++++++++++++++ include/sys/vnode.h | 3 +++ module/spl/spl-vnode.c | 19 ++++++++++++++----- 4 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 include/sys/user.h diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index f9e883fd4..73c4a8421 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -91,6 +91,7 @@ KERNEL_H = \ $(top_srcdir)/include/sys/u8_textprep.h \ $(top_srcdir)/include/sys/uio.h \ $(top_srcdir)/include/sys/unistd.h \ + $(top_srcdir)/include/sys/user.h \ $(top_srcdir)/include/sys/va_list.h \ $(top_srcdir)/include/sys/varargs.h \ $(top_srcdir)/include/sys/vfs.h \ diff --git a/include/sys/user.h b/include/sys/user.h new file mode 100644 index 000000000..ebbe8f68e --- /dev/null +++ b/include/sys/user.h @@ -0,0 +1,42 @@ +/*****************************************************************************\ + * Copyright (C) 2015 Cluster Inc. + * Produced at ClusterHQ Inc (cf, DISCLAIMER). + * Written by Richard Yao . + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_USER_H +#define _SPL_USER_H + +/* + * We have uf_info_t for areleasef(). We implement areleasef() using a global + * linked list of all open file descriptors with the task structs referenced, + * so accessing the correct descriptor from areleasef() only requires knowing + * about the Linux task_struct. Since this is internal to our compatibility + * layer, we make it an opaque type. + * + * XXX: If the descriptor changes under us, we would get an incorrect + * reference. + */ + +struct uf_info; +typedef struct uf_info uf_info_t; + +#define P_FINFO(x) ((uf_info_t *)x) + +#endif /* SPL_USER_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 07a344938..0b857d384 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -40,6 +40,7 @@ #include #include #include +#include #include /* @@ -184,6 +185,7 @@ extern int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, offset_t offset, void *x6, void *x7); extern file_t *vn_getf(int fd); extern void vn_releasef(int fd); +extern void vn_areleasef(int fd, uf_info_t *fip); extern int vn_set_pwd(const char *filename); int spl_vn_init(void); @@ -198,6 +200,7 @@ void spl_vn_fini(void); #define vn_is_readonly(vp) 0 #define getf vn_getf #define releasef vn_releasef +#define areleasef vn_areleasef extern vnode_t *rootdir; diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 4c62097dc..ab9830d18 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -623,14 +623,14 @@ EXPORT_SYMBOL(vn_space); /* Function must be called while holding the vn_file_lock */ static file_t * -file_find(int fd) +file_find(int fd, struct task_struct *task) { file_t *fp; ASSERT(spin_is_locked(&vn_file_lock)); list_for_each_entry(fp, &vn_file_list, f_list) { - if (fd == fp->f_fd && fp->f_task == current) { + if (fd == fp->f_fd && fp->f_task == task) { ASSERT(atomic_read(&fp->f_ref) != 0); return fp; } @@ -654,7 +654,7 @@ vn_getf(int fd) /* Already open just take an extra reference */ spin_lock(&vn_file_lock); - fp = file_find(fd); + fp = file_find(fd, current); if (fp) { atomic_inc(&fp->f_ref); spin_unlock(&vn_file_lock); @@ -733,14 +733,22 @@ static void releasef_locked(file_t *fp) void vn_releasef(int fd) +{ + areleasef(fd, P_FINFO(current)); +} +EXPORT_SYMBOL(releasef); + +void +vn_areleasef(int fd, uf_info_t *fip) { file_t *fp; + struct task_struct *task = (struct task_struct *)fip; if (fd < 0) return; spin_lock(&vn_file_lock); - fp = file_find(fd); + fp = file_find(fd, task); if (fp) { atomic_dec(&fp->f_ref); if (atomic_read(&fp->f_ref) > 0) { @@ -755,7 +763,8 @@ vn_releasef(int fd) return; } /* releasef() */ -EXPORT_SYMBOL(releasef); +EXPORT_SYMBOL(areleasef); + static void #ifdef HAVE_SET_FS_PWD_WITH_CONST From 3d39d0afab44b217d51f7fbd97c3561d39e80f0c Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 2 Apr 2015 01:50:48 +0800 Subject: [PATCH 0885/1062] Make tsd_set(key, NULL) remove the tsd entry for current thread To prevent leaking tsd entries, we make tsd_set(key, NULL) remove the tsd entry for the current thread. This is alright since tsd_get() returns NULL when the entry doesn't exist. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #443 --- module/spl/spl-tsd.c | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index 9a0987527..156a8a633 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -391,6 +391,60 @@ tsd_hash_table_fini(tsd_hash_table_t *table) kmem_free(table, sizeof(tsd_hash_table_t)); } +/* + * tsd_remove_entry - remove a tsd entry for this thread + * @entry: entry to remove + * + * Remove the thread specific data @entry for this thread. + * If this is the last entry for this thread, also remove the PID entry. + */ +static void +tsd_remove_entry(tsd_hash_entry_t *entry) +{ + HLIST_HEAD(work); + tsd_hash_table_t *table; + tsd_hash_entry_t *pid_entry; + tsd_hash_bin_t *pid_entry_bin, *entry_bin; + ulong_t hash; + + table = tsd_hash_table; + ASSERT3P(table, !=, NULL); + ASSERT3P(entry, !=, NULL); + + spin_lock(&table->ht_lock); + + hash = hash_long((ulong_t)entry->he_key * + (ulong_t)entry->he_pid, table->ht_bits); + entry_bin = &table->ht_bins[hash]; + + /* save the possible pid_entry */ + pid_entry = list_entry(entry->he_pid_list.next, tsd_hash_entry_t, + he_pid_list); + + /* remove entry */ + spin_lock(&entry_bin->hb_lock); + tsd_hash_del(table, entry); + hlist_add_head(&entry->he_list, &work); + spin_unlock(&entry_bin->hb_lock); + + /* if pid_entry is indeed pid_entry, then remove it if it's empty */ + if (pid_entry->he_key == PID_KEY && + list_empty(&pid_entry->he_pid_list)) { + hash = hash_long((ulong_t)pid_entry->he_key * + (ulong_t)pid_entry->he_pid, table->ht_bits); + pid_entry_bin = &table->ht_bins[hash]; + + spin_lock(&pid_entry_bin->hb_lock); + tsd_hash_del(table, pid_entry); + hlist_add_head(&pid_entry->he_list, &work); + spin_unlock(&pid_entry_bin->hb_lock); + } + + spin_unlock(&table->ht_lock); + + tsd_hash_dtor(&work); +} + /* * tsd_set - set thread specific data * @key: lookup key @@ -409,6 +463,8 @@ tsd_set(uint_t key, void *value) tsd_hash_entry_t *entry; pid_t pid; int rc; + /* mark remove if value is NULL */ + boolean_t remove = (value == NULL); table = tsd_hash_table; pid = curthread->pid; @@ -421,9 +477,16 @@ tsd_set(uint_t key, void *value) entry = tsd_hash_search(table, key, pid); if (entry) { entry->he_value = value; + /* remove the entry */ + if (remove) + tsd_remove_entry(entry); return (0); } + /* don't create entry if value is NULL */ + if (remove) + return (0); + /* Add a process entry to the hash if not yet exists */ entry = tsd_hash_search(table, PID_KEY, pid); if (entry == NULL) { From 62e2eb2329d99f7c39bcda47bc9ecb2887608fa5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 24 Apr 2015 14:22:27 -0700 Subject: [PATCH 0886/1062] Fix cstyle issues in spl-tsd.c This patch only addresses the issues identified by the style checker in spl-tsd.c. It contains no functional changes. Signed-off-by: Brian Behlendorf --- module/spl/spl-tsd.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index 156a8a633..4d0800e5a 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2010 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -19,7 +19,8 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * + * * Solaris Porting Layer (SPL) Thread Specific Data Implementation. * * Thread specific data has implemented using a hash table, this avoids @@ -56,7 +57,7 @@ * so if your using the Solaris thread API you should not need to call * tsd_exit() directly. * -\*****************************************************************************/ + */ #include #include @@ -136,7 +137,7 @@ tsd_hash_dtor(struct hlist_head *work) if (entry->he_dtor && entry->he_pid != DTOR_PID) entry->he_dtor(entry->he_value); - kmem_free(entry, sizeof(tsd_hash_entry_t)); + kmem_free(entry, sizeof (tsd_hash_entry_t)); } } @@ -163,7 +164,7 @@ tsd_hash_add(tsd_hash_table_t *table, uint_t key, pid_t pid, void *value) ASSERT3P(tsd_hash_search(table, key, pid), ==, NULL); /* New entry allocate structure, set value, and add to hash */ - entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); + entry = kmem_alloc(sizeof (tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) return (ENOMEM); @@ -222,7 +223,7 @@ tsd_hash_add_key(tsd_hash_table_t *table, uint_t *keyp, dtor_func_t dtor) ASSERT3P(table, !=, NULL); /* Allocate entry to be used as a destructor for this key */ - entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); + entry = kmem_alloc(sizeof (tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) return (ENOMEM); @@ -280,7 +281,7 @@ tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid) ulong_t hash; /* Allocate entry to be used as the process reference */ - entry = kmem_alloc(sizeof(tsd_hash_entry_t), KM_PUSHPAGE); + entry = kmem_alloc(sizeof (tsd_hash_entry_t), KM_PUSHPAGE); if (entry == NULL) return (ENOMEM); @@ -333,13 +334,13 @@ tsd_hash_table_init(uint_t bits) tsd_hash_table_t *table; int hash, size = (1 << bits); - table = kmem_zalloc(sizeof(tsd_hash_table_t), KM_SLEEP); + table = kmem_zalloc(sizeof (tsd_hash_table_t), KM_SLEEP); if (table == NULL) return (NULL); - table->ht_bins = kmem_zalloc(sizeof(tsd_hash_bin_t) * size, KM_SLEEP); + table->ht_bins = kmem_zalloc(sizeof (tsd_hash_bin_t) * size, KM_SLEEP); if (table->ht_bins == NULL) { - kmem_free(table, sizeof(tsd_hash_table_t)); + kmem_free(table, sizeof (tsd_hash_table_t)); return (NULL); } @@ -376,9 +377,9 @@ tsd_hash_table_fini(tsd_hash_table_t *table) for (i = 0, size = (1 << table->ht_bits); i < size; i++) { bin = &table->ht_bins[i]; spin_lock(&bin->hb_lock); - while (!hlist_empty(&bin->hb_head)) { + while (!hlist_empty(&bin->hb_head)) { entry = hlist_entry(bin->hb_head.first, - tsd_hash_entry_t, he_list); + tsd_hash_entry_t, he_list); tsd_hash_del(table, entry); hlist_add_head(&entry->he_list, &work); } @@ -387,8 +388,8 @@ tsd_hash_table_fini(tsd_hash_table_t *table) spin_unlock(&table->ht_lock); tsd_hash_dtor(&work); - kmem_free(table->ht_bins, sizeof(tsd_hash_bin_t)*(1<ht_bits)); - kmem_free(table, sizeof(tsd_hash_table_t)); + kmem_free(table->ht_bins, sizeof (tsd_hash_bin_t)*(1<ht_bits)); + kmem_free(table, sizeof (tsd_hash_table_t)); } /* @@ -545,7 +546,7 @@ tsd_create(uint_t *keyp, dtor_func_t dtor) if (*keyp) return; - (void)tsd_hash_add_key(tsd_hash_table, keyp, dtor); + (void) tsd_hash_add_key(tsd_hash_table, keyp, dtor); } EXPORT_SYMBOL(tsd_create); @@ -582,14 +583,14 @@ tsd_destroy(uint_t *keyp) * DTOR_PID entry. They are removed from the hash table and * linked in to a private working list to be destroyed. */ - while (!list_empty(&dtor_entry->he_key_list)) { + while (!list_empty(&dtor_entry->he_key_list)) { entry = list_entry(dtor_entry->he_key_list.next, - tsd_hash_entry_t, he_key_list); + tsd_hash_entry_t, he_key_list); ASSERT3U(dtor_entry->he_key, ==, entry->he_key); ASSERT3P(dtor_entry->he_dtor, ==, entry->he_dtor); hash = hash_long((ulong_t)entry->he_key * - (ulong_t)entry->he_pid, table->ht_bits); + (ulong_t)entry->he_pid, table->ht_bits); entry_bin = &table->ht_bins[hash]; spin_lock(&entry_bin->hb_lock); @@ -646,9 +647,9 @@ tsd_exit(void) * linked in to a private working list to be destroyed. */ - while (!list_empty(&pid_entry->he_pid_list)) { + while (!list_empty(&pid_entry->he_pid_list)) { entry = list_entry(pid_entry->he_pid_list.next, - tsd_hash_entry_t, he_pid_list); + tsd_hash_entry_t, he_pid_list); ASSERT3U(pid_entry->he_pid, ==, entry->he_pid); hash = hash_long((ulong_t)entry->he_key * From dc5e8b70416e5d511bc361309bd426c767177723 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 21 May 2015 09:57:35 -0700 Subject: [PATCH 0887/1062] Add boot_ncpus macro For compatibility define boot_ncpus as num_online_cpus(). Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index c56d7e12a..4838ab3be 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -78,6 +78,7 @@ #define proc_pageout NULL #define curproc current #define max_ncpus num_possible_cpus() +#define boot_ncpus num_online_cpus() #define CPU_SEQID smp_processor_id() #define _NOTE(x) #define is_system_labeled() 0 From a876b0305e94eea9505e7ecbae93cf7a1d24f743 Mon Sep 17 00:00:00 2001 From: Chris Dunlop Date: Thu, 14 May 2015 12:26:51 -0700 Subject: [PATCH 0888/1062] Make taskq_wait() block until the queue is empty Under Illumos taskq_wait() returns when there are no more tasks in the queue. This behavior differs from ZoL and FreeBSD where taskq_wait() returns when all the tasks in the queue at the beginning of the taskq_wait() call are complete. New tasks added whilst taskq_wait() is running will be ignored. This difference in semantics makes it possible that new subtle issues could be introduced when porting changes from Illumos. To avoid that possibility the taskq_wait() function is being updated such that it blocks until the queue in empty. The previous behavior remains available through the taskq_wait_outstanding() interface. Note that this function was previously called taskq_wait_all() but has been renamed to avoid confusion. Signed-off-by: Chris Dunlop Signed-off-by: Brian Behlendorf Closes #455 --- include/sys/taskq.h | 2 +- module/spl/spl-taskq.c | 97 ++++++++++++++++++++++---------------- module/splat/splat-taskq.c | 20 ++++---- 3 files changed, 68 insertions(+), 51 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 7b44e8b8a..2c437f0e7 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -119,7 +119,7 @@ extern void taskq_init_ent(taskq_ent_t *); extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); extern void taskq_destroy(taskq_t *); extern void taskq_wait_id(taskq_t *, taskqid_t); -extern void taskq_wait_all(taskq_t *, taskqid_t); +extern void taskq_wait_outstanding(taskq_t *, taskqid_t); extern void taskq_wait(taskq_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); extern int taskq_member(taskq_t *, void *); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 951298d9f..49bb40a25 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -327,6 +327,33 @@ taskq_find(taskq_t *tq, taskqid_t id, int *active) return (NULL); } +/* + * Theory for the taskq_wait_id(), taskq_wait_outstanding(), and + * taskq_wait() functions below. + * + * Taskq waiting is accomplished by tracking the lowest outstanding task + * id and the next available task id. As tasks are dispatched they are + * added to the tail of the pending, priority, or delay lists. As worker + * threads become available the tasks are removed from the heads of these + * lists and linked to the worker threads. This ensures the lists are + * kept sorted by lowest to highest task id. + * + * Therefore the lowest outstanding task id can be quickly determined by + * checking the head item from all of these lists. This value is stored + * with the taskq as the lowest id. It only needs to be recalculated when + * either the task with the current lowest id completes or is canceled. + * + * By blocking until the lowest task id exceeds the passed task id the + * taskq_wait_outstanding() function can be easily implemented. Similarly, + * by blocking until the lowest task id matches the next task id taskq_wait() + * can be implemented. + * + * Callers should be aware that when there are multiple worked threads it + * is possible for larger task ids to complete before smaller ones. Also + * when the taskq contains delay tasks with small task ids callers may + * block for a considerable length of time waiting for them to expire and + * execute. + */ static int taskq_wait_id_check(taskq_t *tq, taskqid_t id) { @@ -351,34 +378,8 @@ taskq_wait_id(taskq_t *tq, taskqid_t id) } EXPORT_SYMBOL(taskq_wait_id); -/* - * The taskq_wait() function will block until all previously submitted - * tasks have been completed. A previously submitted task is defined as - * a task with a lower task id than the current task queue id. Note that - * all task id's are assigned monotonically at dispatch time. - * - * Waiting for all previous tasks to complete is accomplished by tracking - * the lowest outstanding task id. As tasks are dispatched they are added - * added to the tail of the pending, priority, or delay lists. And as - * worker threads become available the tasks are removed from the heads - * of these lists and linked to the worker threads. This ensures the - * lists are kept in lowest to highest task id order. - * - * Therefore the lowest outstanding task id can be quickly determined by - * checking the head item from all of these lists. This value is stored - * with the task queue as the lowest id. It only needs to be recalculated - * when either the task with the current lowest id completes or is canceled. - * - * By blocking until the lowest task id exceeds the current task id when - * the function was called we ensure all previous tasks have completed. - * - * NOTE: When there are multiple worked threads it is possible for larger - * task ids to complete before smaller ones. Conversely when the task - * queue contains delay tasks with small task ids, you may block for a - * considerable length of time waiting for them to expire and execute. - */ static int -taskq_wait_check(taskq_t *tq, taskqid_t id) +taskq_wait_outstanding_check(taskq_t *tq, taskqid_t id) { int rc; @@ -389,26 +390,42 @@ taskq_wait_check(taskq_t *tq, taskqid_t id) return (rc); } +/* + * The taskq_wait_outstanding() function will block until all tasks with a + * lower taskqid than the passed 'id' have been completed. Note that all + * task id's are assigned monotonically at dispatch time. Zero may be + * passed for the id to indicate all tasks dispatch up to this point, + * but not after, should be waited for. + */ void -taskq_wait_all(taskq_t *tq, taskqid_t id) +taskq_wait_outstanding(taskq_t *tq, taskqid_t id) { - wait_event(tq->tq_wait_waitq, taskq_wait_check(tq, id)); + wait_event(tq->tq_wait_waitq, + taskq_wait_outstanding_check(tq, id ? id : tq->tq_next_id - 1)); } -EXPORT_SYMBOL(taskq_wait_all); +EXPORT_SYMBOL(taskq_wait_outstanding); +static int +taskq_wait_check(taskq_t *tq) +{ + int rc; + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + rc = (tq->tq_lowest_id == tq->tq_next_id); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + return (rc); +} + +/* + * The taskq_wait() function will block until the taskq is empty. + * This means that if a taskq re-dispatches work to itself taskq_wait() + * callers will block indefinitely. + */ void taskq_wait(taskq_t *tq) { - taskqid_t id; - - ASSERT(tq); - - /* Wait for the largest outstanding taskqid */ - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - id = tq->tq_next_id - 1; - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - taskq_wait_all(tq, id); + wait_event(tq->tq_wait_waitq, taskq_wait_check(tq)); } EXPORT_SYMBOL(taskq_wait); diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 2787bf401..7d4ad5b69 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -588,10 +588,10 @@ splat_taskq_test4(struct file *file, void *arg) * next pending task as soon as it completes its current task. This * means that tasks do not strictly complete in order in which they * were dispatched (increasing task id). This is fine but we need to - * verify that taskq_wait_all() blocks until the passed task id and all - * lower task ids complete. We do this by dispatching the following + * verify taskq_wait_outstanding() blocks until the passed task id and + * all lower task ids complete. We do this by dispatching the following * specific sequence of tasks each of which block for N time units. - * We then use taskq_wait_all() to unblock at specific task id and + * We then use taskq_wait_outstanding() to unblock at specific task id and * verify the only the expected task ids have completed and in the * correct order. The two cases of interest are: * @@ -602,17 +602,17 @@ splat_taskq_test4(struct file *file, void *arg) * * The following table shows each task id and how they will be * scheduled. Each rows represent one time unit and each column - * one of the three worker threads. The places taskq_wait_all() + * one of the three worker threads. The places taskq_wait_outstanding() * must unblock for a specific id are identified as well as the * task ids which must have completed and their order. * - * +-----+ <--- taskq_wait_all(tq, 8) unblocks + * +-----+ <--- taskq_wait_outstanding(tq, 8) unblocks * | | Required Completion Order: 1,2,4,5,3,8,6,7 * +-----+ | * | | | * | | +-----+ * | | | 8 | - * | | +-----+ <--- taskq_wait_all(tq, 3) unblocks + * | | +-----+ <--- taskq_wait_outstanding(tq, 3) unblocks * | | 7 | | Required Completion Order: 1,2,4,5,3 * | +-----+ | * | 6 | | | @@ -755,13 +755,13 @@ splat_taskq_test5_impl(struct file *file, void *arg, boolean_t prealloc) splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, 3); - taskq_wait_all(tq, 3); + taskq_wait_outstanding(tq, 3); if ((rc = splat_taskq_test_order(&tq_arg, order1))) goto out; splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, 8); - taskq_wait_all(tq, 8); + taskq_wait_outstanding(tq, 8); rc = splat_taskq_test_order(&tq_arg, order2); out: @@ -923,7 +923,7 @@ splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' " "waiting for taskqid %d completion\n", tq_arg.name, SPLAT_TASKQ_ORDER_MAX); - taskq_wait_all(tq, SPLAT_TASKQ_ORDER_MAX); + taskq_wait_outstanding(tq, SPLAT_TASKQ_ORDER_MAX); rc = splat_taskq_test_order(&tq_arg, order); out: @@ -1030,7 +1030,7 @@ splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) if (tq_arg->flag == 0) { splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, "Taskq '%s' waiting\n", tq_arg->name); - taskq_wait_all(tq, SPLAT_TASKQ_DEPTH_MAX); + taskq_wait_outstanding(tq, SPLAT_TASKQ_DEPTH_MAX); } error = (tq_arg->depth == SPLAT_TASKQ_DEPTH_MAX ? 0 : -EINVAL); From 86c16c59fe0d78d44e9f3ebb10ee740bb1028045 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 3 Jun 2015 10:42:36 -0700 Subject: [PATCH 0889/1062] Retire rwsem_is_locked() compat Stock Linux 2.6.32 and earlier kernels contained a broken version of rwsem_is_locked() which could return an incorrect value. Because of this compatibility code was added to detect the broken implementation and replace it with our own if needed. The fix for this issue was merged in to the mainline Linux kernel as of 2.6.33 and the major enterprise distributions based on 2.6.32 have all backported the fix. Therefore there is no longer a need to carry this code and it can be removed. Signed-off-by: Brian Behlendorf Closes #454 --- config/spl-build.m4 | 22 ---------------------- include/linux/rwsem_compat.h | 24 ------------------------ include/sys/rwlock.h | 6 ++---- 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 3bfc1e232..9999d480d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -33,7 +33,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_KUIDGID_T SPL_AC_PUT_TASK_STRUCT - SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_KERNEL_FALLOCATE SPL_AC_CONFIG_ZLIB_INFLATE SPL_AC_CONFIG_ZLIB_DEFLATE @@ -1201,27 +1200,6 @@ AC_DEFUN([SPL_AC_KERNEL_FALLOCATE], [ SPL_AC_PAX_KERNEL_FILE_FALLOCATE ]) -dnl # -dnl # 2.6.33 API change. Also backported in RHEL5 as of 2.6.18-190.el5. -dnl # Earlier versions of rwsem_is_locked() were inline and had a race -dnl # condition. The fixed version is exported as a symbol. The race -dnl # condition is fixed by acquiring sem->wait_lock, so we must not -dnl # call that version while holding sem->wait_lock. -dnl # -AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED], - [AC_MSG_CHECKING([whether rwsem_is_locked() acquires sem->wait_lock]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - int rwsem_is_locked(struct rw_semaphore *sem) { return 0; } - ], [], [rwsem_is_locked], [lib/rwsem-spinlock.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(RWSEM_IS_LOCKED_TAKES_WAIT_LOCK, 1, - [rwsem_is_locked() acquires sem->wait_lock]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # zlib inflate compat, dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled. diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index 80f348e4c..5841d7c28 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -37,30 +37,6 @@ #define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl) #endif /* RWSEM_SPINLOCK_IS_RAW */ -/* - * Prior to Linux 2.6.33 there existed a race condition in rwsem_is_locked(). - * The semaphore's activity was checked outside of the wait_lock which - * could result in some readers getting the incorrect activity value. - * - * When a kernel without this fix is detected the SPL takes responsibility - * for acquiring the wait_lock to avoid this race. - */ -#if defined(RWSEM_IS_LOCKED_TAKES_WAIT_LOCK) #define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem) -#else -static inline int -spl_rwsem_is_locked(struct rw_semaphore *rwsem) -{ - unsigned long flags; - int rc = 1; - - if (spl_rwsem_trylock_irqsave(&rwsem->wait_lock, flags)) { - rc = rwsem_is_locked(rwsem); - spl_rwsem_unlock_irqrestore(&rwsem->wait_lock, flags); - } - - return (rc); -} -#endif /* RWSEM_IS_LOCKED_TAKES_WAIT_LOCK */ #endif /* _SPL_RWSEM_COMPAT_H */ diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 9dfbfe545..7064e8f1f 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -83,15 +83,13 @@ rw_owner(krwlock_t *rwp) static inline int RW_READ_HELD(krwlock_t *rwp) { - return (spl_rwsem_is_locked(SEM(rwp)) && - rw_owner(rwp) == NULL); + return (spl_rwsem_is_locked(SEM(rwp)) && rw_owner(rwp) == NULL); } static inline int RW_WRITE_HELD(krwlock_t *rwp) { - return (spl_rwsem_is_locked(SEM(rwp)) && - rw_owner(rwp) == current); + return (spl_rwsem_is_locked(SEM(rwp)) && rw_owner(rwp) == current); } static inline int From 2345368646151718fa59986d9e2d9d38bcdecb2c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 10 Jun 2015 09:35:20 -0700 Subject: [PATCH 0890/1062] Rename cv_wait_interruptible() to cv_wait_sig() Commit f752b46e added the cv_wait_interruptible() function to allow condition variables to be woken by signals. This function and its timed wait counterpart should have been named cv_wait_sig() to match the illumos interface which provides the same functionality. This patch renames the symbol but leaves a #define compatibility wrapper in place until the ZFS code can be moved to the correct name. This patch also makes a small number of cosmetic changes to make the condvar source and header cstyle clean. Signed-off-by: Brian Behlendorf Closes #456 --- include/sys/condvar.h | 56 +++++++++++++-------------- module/spl/spl-condvar.c | 81 +++++++++++++++++++++++----------------- 2 files changed, 75 insertions(+), 62 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index c9f2bea12..efcf0dda2 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,10 +20,10 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CONDVAR_H -#define _SPL_CONDVAR_H +#define _SPL_CONDVAR_H #include #include @@ -36,8 +36,8 @@ * The kcondvar_t struct is protected by mutex taken externally before * calling any of the wait/signal funs, and passed into the wait funs. */ -#define CV_MAGIC 0x346545f4 -#define CV_DESTROY 0x346545f5 +#define CV_MAGIC 0x346545f4 +#define CV_DESTROY 0x346545f5 typedef struct { int cv_magic; @@ -48,30 +48,30 @@ typedef struct { kmutex_t *cv_mutex; } kcondvar_t; -typedef enum { CV_DEFAULT=0, CV_DRIVER } kcv_type_t; +typedef enum { CV_DEFAULT = 0, CV_DRIVER } kcv_type_t; -extern void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg); -extern void __cv_destroy(kcondvar_t *cvp); -extern void __cv_wait(kcondvar_t *cvp, kmutex_t *mp); -extern void __cv_wait_io(kcondvar_t *cvp, kmutex_t *mp); -extern void __cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp); -extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time); -extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, - clock_t exp_time); -extern clock_t cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, - hrtime_t tim, hrtime_t res, int flag); -extern void __cv_signal(kcondvar_t *cvp); -extern void __cv_broadcast(kcondvar_t *cvp); +extern void __cv_init(kcondvar_t *, char *, kcv_type_t, void *); +extern void __cv_destroy(kcondvar_t *); +extern void __cv_wait(kcondvar_t *, kmutex_t *); +extern void __cv_wait_io(kcondvar_t *, kmutex_t *); +extern void __cv_wait_sig(kcondvar_t *, kmutex_t *); +extern clock_t __cv_timedwait(kcondvar_t *, kmutex_t *, clock_t); +extern clock_t __cv_timedwait_sig(kcondvar_t *, kmutex_t *, clock_t); +extern clock_t cv_timedwait_hires(kcondvar_t *, kmutex_t *, hrtime_t, + hrtime_t res, int flag); +extern void __cv_signal(kcondvar_t *); +extern void __cv_broadcast(kcondvar_t *c); -#define cv_init(cvp, name, type, arg) __cv_init(cvp, name, type, arg) -#define cv_destroy(cvp) __cv_destroy(cvp) -#define cv_wait(cvp, mp) __cv_wait(cvp, mp) -#define cv_wait_io(cvp, mp) __cv_wait_io(cvp, mp) -#define cv_wait_interruptible(cvp, mp) __cv_wait_interruptible(cvp,mp) -#define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) -#define cv_timedwait_interruptible(cvp, mp, t) \ - __cv_timedwait_interruptible(cvp, mp, t) -#define cv_signal(cvp) __cv_signal(cvp) -#define cv_broadcast(cvp) __cv_broadcast(cvp) +#define cv_init(cvp, name, type, arg) __cv_init(cvp, name, type, arg) +#define cv_destroy(cvp) __cv_destroy(cvp) +#define cv_wait(cvp, mp) __cv_wait(cvp, mp) +#define cv_wait_io(cvp, mp) __cv_wait_io(cvp, mp) +#define cv_wait_sig(cvp, mp) __cv_wait_sig(cvp, mp) +#define cv_wait_interruptible(cvp, mp) cv_wait_sig(cvp, mp) +#define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) +#define cv_timedwait_sig(cvp, mp, t) __cv_timedwait_sig(cvp, mp, t) +#define cv_timedwait_interruptible(cvp, mp, t) cv_timedwait_sig(cvp, mp, t) +#define cv_signal(cvp) __cv_signal(cvp) +#define cv_broadcast(cvp) __cv_broadcast(cvp) #endif /* _SPL_CONDVAR_H */ diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index cebb8f2b1..c3467a56e 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,9 +20,9 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Credential Implementation. -\*****************************************************************************/ + */ #include #include @@ -50,10 +50,10 @@ cv_destroy_wakeup(kcondvar_t *cvp) if (!atomic_read(&cvp->cv_waiters) && !atomic_read(&cvp->cv_refs)) { ASSERT(cvp->cv_mutex == NULL); ASSERT(!waitqueue_active(&cvp->cv_event)); - return 1; + return (1); } - return 0; + return (0); } void @@ -82,7 +82,7 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) DEFINE_WAIT(wait); ASSERT(cvp); - ASSERT(mp); + ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(mutex_owned(mp)); atomic_inc(&cvp->cv_refs); @@ -96,9 +96,11 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); - /* Mutex should be dropped after prepare_to_wait() this + /* + * Mutex should be dropped after prepare_to_wait() this * ensures we're linked in to the waiters list and avoids the - * race where 'cvp->cv_waiters > 0' but the list is empty. */ + * race where 'cvp->cv_waiters > 0' but the list is empty. + */ mutex_exit(mp); if (io) io_schedule(); @@ -124,11 +126,11 @@ __cv_wait(kcondvar_t *cvp, kmutex_t *mp) EXPORT_SYMBOL(__cv_wait); void -__cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp) +__cv_wait_sig(kcondvar_t *cvp, kmutex_t *mp) { cv_wait_common(cvp, mp, TASK_INTERRUPTIBLE, 0); } -EXPORT_SYMBOL(__cv_wait_interruptible); +EXPORT_SYMBOL(__cv_wait_sig); void __cv_wait_io(kcondvar_t *cvp, kmutex_t *mp) @@ -137,18 +139,19 @@ __cv_wait_io(kcondvar_t *cvp, kmutex_t *mp) } EXPORT_SYMBOL(__cv_wait_io); -/* 'expire_time' argument is an absolute wall clock time in jiffies. +/* + * 'expire_time' argument is an absolute wall clock time in jiffies. * Return value is time left (expire_time - now) or -1 if timeout occurred. */ static clock_t -__cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, - clock_t expire_time, int state) +__cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, + int state) { DEFINE_WAIT(wait); clock_t time_left; ASSERT(cvp); - ASSERT(mp); + ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(mutex_owned(mp)); atomic_inc(&cvp->cv_refs); @@ -169,9 +172,11 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); - /* Mutex should be dropped after prepare_to_wait() this + /* + * Mutex should be dropped after prepare_to_wait() this * ensures we're linked in to the waiters list and avoids the - * race where 'cvp->cv_waiters > 0' but the list is empty. */ + * race where 'cvp->cv_waiters > 0' but the list is empty. + */ mutex_exit(mp); time_left = schedule_timeout(time_left); mutex_enter(mp); @@ -191,24 +196,24 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) { - return __cv_timedwait_common(cvp, mp, exp_time, TASK_UNINTERRUPTIBLE); + return (__cv_timedwait_common(cvp, mp, exp_time, TASK_UNINTERRUPTIBLE)); } EXPORT_SYMBOL(__cv_timedwait); clock_t -__cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) +__cv_timedwait_sig(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) { - return __cv_timedwait_common(cvp, mp, exp_time, TASK_INTERRUPTIBLE); + return (__cv_timedwait_common(cvp, mp, exp_time, TASK_INTERRUPTIBLE)); } -EXPORT_SYMBOL(__cv_timedwait_interruptible); +EXPORT_SYMBOL(__cv_timedwait_sig); /* - *'expire_time' argument is an absolute clock time in nanoseconds. + * 'expire_time' argument is an absolute clock time in nanoseconds. * Return value is time left (expire_time - now) or -1 if timeout occurred. */ static clock_t -__cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, - hrtime_t expire_time, int state) +__cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, + int state) { DEFINE_WAIT(wait); hrtime_t time_left, now; @@ -237,12 +242,16 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); - /* Mutex should be dropped after prepare_to_wait() this + /* + * Mutex should be dropped after prepare_to_wait() this * ensures we're linked in to the waiters list and avoids the - * race where 'cvp->cv_waiters > 0' but the list is empty. */ + * race where 'cvp->cv_waiters > 0' but the list is empty. + */ mutex_exit(mp); - /* Allow a 100 us range to give kernel an opportunity to coalesce - * interrupts */ + /* + * Allow a 100 us range to give kernel an opportunity to coalesce + * interrupts + */ usleep_range(time_left_us, time_left_us + 100); mutex_enter(mp); @@ -263,8 +272,8 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, * Compatibility wrapper for the cv_timedwait_hires() Illumos interface. */ clock_t -cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, - hrtime_t res, int flag) +cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, + int flag) { if (res > 1) { /* @@ -278,7 +287,7 @@ cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, if (!(flag & CALLOUT_FLAG_ABSOLUTE)) tim += gethrtime(); - return __cv_timedwait_hires(cvp, mp, tim, TASK_UNINTERRUPTIBLE); + return (__cv_timedwait_hires(cvp, mp, tim, TASK_UNINTERRUPTIBLE)); } EXPORT_SYMBOL(cv_timedwait_hires); @@ -289,10 +298,12 @@ __cv_signal(kcondvar_t *cvp) ASSERT(cvp->cv_magic == CV_MAGIC); atomic_inc(&cvp->cv_refs); - /* All waiters are added with WQ_FLAG_EXCLUSIVE so only one + /* + * All waiters are added with WQ_FLAG_EXCLUSIVE so only one * waiter will be set runable with each call to wake_up(). * Additionally wake_up() holds a spin_lock assoicated with - * the wait queue to ensure we don't race waking up processes. */ + * the wait queue to ensure we don't race waking up processes. + */ if (atomic_read(&cvp->cv_waiters) > 0) wake_up(&cvp->cv_event); @@ -307,8 +318,10 @@ __cv_broadcast(kcondvar_t *cvp) ASSERT(cvp->cv_magic == CV_MAGIC); atomic_inc(&cvp->cv_refs); - /* Wake_up_all() will wake up all waiters even those which - * have the WQ_FLAG_EXCLUSIVE flag set. */ + /* + * Wake_up_all() will wake up all waiters even those which + * have the WQ_FLAG_EXCLUSIVE flag set. + */ if (atomic_read(&cvp->cv_waiters) > 0) wake_up_all(&cvp->cv_event); From 5acb2307b2edc55335996bf0ff78f6bdca24a98d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 24 Jun 2015 14:44:47 -0700 Subject: [PATCH 0891/1062] Add IMPLY() and EQUIV() macros Added for upstream compatibility, they are of the form: * IMPLY(a, b) - if (a) then (b) * EQUIV(a, b) - if (a) then (b) *AND* if (b) then (a) Signed-off-by: Brian Behlendorf --- include/sys/debug.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/sys/debug.h b/include/sys/debug.h index cae2d49e4..a37740036 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -92,6 +92,8 @@ void spl_dumpstack(void); #define ASSERT3U(x,y,z) ((void)0) #define ASSERT3P(x,y,z) ((void)0) #define ASSERT0(x) ((void)0) +#define IMPLY(A, B) ((void)0) +#define EQUIV(A, B) ((void)0) /* * Debugging enabled (--enable-debug) @@ -105,6 +107,14 @@ void spl_dumpstack(void); #define ASSERT3U(x,y,z) VERIFY3U(x, y, z) #define ASSERT3P(x,y,z) VERIFY3P(x, y, z) #define ASSERT0(x) VERIFY0(x) +#define IMPLY(A, B) \ + ((void)(((!(A)) || (B)) || \ + spl_panic(__FILE__, __FUNCTION__, __LINE__, \ + "(" #A ") implies (" #B ")"))) +#define EQUIV(A, B) \ + ((void)((!!(A) == !!(B)) || \ + spl_panic(__FILE__, __FUNCTION__, __LINE__, \ + "(" #A ") is equivalent to (" #B ")"))) #endif /* NDEBUG */ From f7a973d99b5e272f4a6223b8fb7db4fc6d363b41 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 8 Jun 2015 14:36:27 -0700 Subject: [PATCH 0892/1062] Add TASKQ_DYNAMIC feature Setting the TASKQ_DYNAMIC flag will create a taskq with dynamic semantics. Initially only a single worker thread will be created to service tasks dispatched to the queue. As additional threads are needed they will be dynamically spawned up to the max number specified by 'nthreads'. When the threads are no longer needed, because the taskq is empty, they will automatically terminate. Due to the low cost of creating and destroying threads under Linux by default new threads and spawned and terminated aggressively. There are two modules options which can be tuned to adjust this behavior if needed. * spl_taskq_thread_sequential - The number of sequential tasks, without interruption, which needed to be handled by a worker thread before a new worker thread is spawned. Default 4. * spl_taskq_thread_dynamic - Provides the ability to completely disable the use of dynamic taskqs on the system. This is provided for the purposes of debugging and troubleshooting. Default 1 (enabled). This behavior is fundamentally consistent with the dynamic taskq implementation found in both illumos and FreeBSD. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #458 --- include/sys/taskq.h | 8 +- man/man5/spl-module-parameters.5 | 34 ++++ module/spl/spl-taskq.c | 292 ++++++++++++++++++++++++------- module/splat/splat-taskq.c | 247 +++++++++++++++----------- 4 files changed, 413 insertions(+), 168 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 2c437f0e7..a43a86da6 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -40,6 +40,7 @@ #define TASKQ_DYNAMIC 0x00000004 #define TASKQ_THREADS_CPU_PCT 0x00000008 #define TASKQ_DC_BATCH 0x00000010 +#define TASKQ_ACTIVE 0x80000000 /* * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as @@ -53,7 +54,6 @@ #define TQ_NOALLOC 0x02000000 #define TQ_NEW 0x04000000 #define TQ_FRONT 0x08000000 -#define TQ_ACTIVE 0x80000000 typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); @@ -61,11 +61,13 @@ typedef void (task_func_t)(void *); typedef struct taskq { spinlock_t tq_lock; /* protects taskq_t */ unsigned long tq_lock_flags; /* interrupt state */ - const char *tq_name; /* taskq name */ + char *tq_name; /* taskq name */ struct list_head tq_thread_list;/* list of all threads */ struct list_head tq_active_list;/* list of active threads */ int tq_nactive; /* # of active threads */ - int tq_nthreads; /* # of total threads */ + int tq_nthreads; /* # of existing threads */ + int tq_nspawn; /* # of threads being spawned */ + int tq_maxthreads; /* # of threads maximum */ int tq_pri; /* priority */ int tq_minalloc; /* min task_t pool size */ int tq_maxalloc; /* max task_t pool size */ diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 3e7e877fb..fc38605b2 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -249,3 +249,37 @@ where a thread should run. .sp Default value: \fB0\fR .RE + +.sp +.ne 2 +.na +\fBspl_taskq_thread_dynamic\fR (int) +.ad +.RS 12n +Allow dynamic taskqs. When enabled taskqs which set the TASKQ_DYNAMIC flag +will by default create only a single thread. New threads will be created on +demand up to a maximum allowed number to facilitate the completion of +outstanding tasks. Threads which are no longer needed will be promptly +destroyed. By default this behavior is enabled but it can be disabled to +aid performance analysis or troubleshooting. +.sp +Default value: \fB1\fR +.RE + +.sp +.ne 2 +.na +\fBspl_taskq_thread_sequential\fR (int) +.ad +.RS 12n +The number of items a taskq worker thread must handle without interruption +before requesting a new worker thread be spawned. This is used to control +how quickly taskqs ramp up the number of threads processing the queue. +Because Linux thread creation and destruction are relatively inexpensive a +small default value has been selected. This means that normally threads will +be created aggressively which is desirable. Increasing this value will +result in a slower thread creation rate which may be preferable for some +configurations. +.sp +Default value: \fB4\fR +.RE diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 49bb40a25..9cd193369 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -31,10 +31,24 @@ int spl_taskq_thread_bind = 0; module_param(spl_taskq_thread_bind, int, 0644); MODULE_PARM_DESC(spl_taskq_thread_bind, "Bind taskq thread to CPU by default"); + +int spl_taskq_thread_dynamic = 1; +module_param(spl_taskq_thread_dynamic, int, 0644); +MODULE_PARM_DESC(spl_taskq_thread_dynamic, "Allow dynamic taskq threads"); + +int spl_taskq_thread_sequential = 4; +module_param(spl_taskq_thread_sequential, int, 0644); +MODULE_PARM_DESC(spl_taskq_thread_sequential, + "Create new taskq threads after N sequential tasks"); + /* Global system-wide dynamic task queue available for all consumers */ taskq_t *system_taskq; EXPORT_SYMBOL(system_taskq); +/* Private dedicated taskq for creating new taskq threads on demand. */ +static taskq_t *dynamic_taskq; +static taskq_thread_t *taskq_thread_create(taskq_t *); + static int task_km_flags(uint_t flags) { @@ -434,17 +448,22 @@ taskq_member(taskq_t *tq, void *t) { struct list_head *l; taskq_thread_t *tqt; + int found = 0; ASSERT(tq); ASSERT(t); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); list_for_each(l, &tq->tq_thread_list) { tqt = list_entry(l, taskq_thread_t, tqt_thread_list); - if (tqt->tqt_thread == (struct task_struct *)t) - return (1); + if (tqt->tqt_thread == (struct task_struct *)t) { + found = 1; + break; + } } + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - return (0); + return (found); } EXPORT_SYMBOL(taskq_member); @@ -516,7 +535,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); /* Taskq being destroyed and all tasks drained */ - if (!(tq->tq_flags & TQ_ACTIVE)) + if (!(tq->tq_flags & TASKQ_ACTIVE)) goto out; /* Do not queue the task unless there is idle thread for it */ @@ -568,7 +587,7 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); /* Taskq being destroyed and all tasks drained */ - if (!(tq->tq_flags & TQ_ACTIVE)) + if (!(tq->tq_flags & TASKQ_ACTIVE)) goto out; if ((t = task_alloc(tq, flags)) == NULL) @@ -604,12 +623,11 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, { ASSERT(tq); ASSERT(func); - ASSERT(!(tq->tq_flags & TASKQ_DYNAMIC)); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); /* Taskq being destroyed and all tasks drained */ - if (!(tq->tq_flags & TQ_ACTIVE)) { + if (!(tq->tq_flags & TASKQ_ACTIVE)) { t->tqent_id = 0; goto out; } @@ -664,6 +682,97 @@ taskq_init_ent(taskq_ent_t *t) } EXPORT_SYMBOL(taskq_init_ent); +/* + * Return the next pending task, preference is given to tasks on the + * priority list which were dispatched with TQ_FRONT. + */ +static taskq_ent_t * +taskq_next_ent(taskq_t *tq) +{ + struct list_head *list; + + ASSERT(spin_is_locked(&tq->tq_lock)); + + if (!list_empty(&tq->tq_prio_list)) + list = &tq->tq_prio_list; + else if (!list_empty(&tq->tq_pend_list)) + list = &tq->tq_pend_list; + else + return (NULL); + + return (list_entry(list->next, taskq_ent_t, tqent_list)); +} + +/* + * Spawns a new thread for the specified taskq. + */ +static void +taskq_thread_spawn_task(void *arg) +{ + taskq_t *tq = (taskq_t *)arg; + + (void) taskq_thread_create(tq); + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + tq->tq_nspawn--; + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); +} + +/* + * Spawn addition threads for dynamic taskqs (TASKQ_DYNMAIC) the current + * number of threads is insufficient to handle the pending tasks. These + * new threads must be created by the dedicated dynamic_taskq to avoid + * deadlocks between thread creation and memory reclaim. The system_taskq + * which is also a dynamic taskq cannot be safely used for this. + */ +static int +taskq_thread_spawn(taskq_t *tq, int seq_tasks) +{ + int spawning = 0; + + if (!(tq->tq_flags & TASKQ_DYNAMIC)) + return (0); + + if ((seq_tasks > spl_taskq_thread_sequential) && + (tq->tq_nthreads + tq->tq_nspawn < tq->tq_maxthreads) && + (tq->tq_flags & TASKQ_ACTIVE)) { + spawning = (++tq->tq_nspawn); + taskq_dispatch(dynamic_taskq, taskq_thread_spawn_task, + tq, TQ_NOSLEEP); + } + + return (spawning); +} + +/* + * Threads in a dynamic taskq should only exit once it has been completely + * drained and no other threads are actively servicing tasks. This prevents + * threads from being created and destroyed more than is required. + * + * The first thread is the thread list is treated as the primary thread. + * There is nothing special about the primary thread but in order to avoid + * all the taskq pids from changing we opt to make it long running. + */ +static int +taskq_thread_should_stop(taskq_t *tq, taskq_thread_t *tqt) +{ + ASSERT(spin_is_locked(&tq->tq_lock)); + + if (!(tq->tq_flags & TASKQ_DYNAMIC)) + return (0); + + if (list_first_entry(&(tq->tq_thread_list), taskq_thread_t, + tqt_thread_list) == tqt) + return (0); + + return + ((tq->tq_nspawn == 0) && /* No threads are being spawned */ + (tq->tq_nactive == 0) && /* No threads are handling tasks */ + (tq->tq_nthreads > 1) && /* More than 1 thread is running */ + (!taskq_next_ent(tq)) && /* There are no pending tasks */ + (spl_taskq_thread_dynamic));/* Dynamic taskqs are allowed */ +} + static int taskq_thread(void *args) { @@ -672,7 +781,7 @@ taskq_thread(void *args) taskq_thread_t *tqt = args; taskq_t *tq; taskq_ent_t *t; - struct list_head *pend_list; + int seq_tasks = 0; ASSERT(tqt); tq = tqt->tqt_tq; @@ -683,7 +792,13 @@ taskq_thread(void *args) flush_signals(current); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + + /* Immediately exit if more threads than allowed were created. */ + if (tq->tq_nthreads >= tq->tq_maxthreads) + goto error; + tq->tq_nthreads++; + list_add_tail(&tqt->tqt_thread_list, &tq->tq_thread_list); wake_up(&tq->tq_wait_waitq); set_current_state(TASK_INTERRUPTIBLE); @@ -691,25 +806,25 @@ taskq_thread(void *args) if (list_empty(&tq->tq_pend_list) && list_empty(&tq->tq_prio_list)) { + + if (taskq_thread_should_stop(tq, tqt)) { + wake_up_all(&tq->tq_wait_waitq); + break; + } + add_wait_queue_exclusive(&tq->tq_work_waitq, &wait); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + schedule(); + seq_tasks = 0; + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); remove_wait_queue(&tq->tq_work_waitq, &wait); } else { __set_current_state(TASK_RUNNING); } - - if (!list_empty(&tq->tq_prio_list)) - pend_list = &tq->tq_prio_list; - else if (!list_empty(&tq->tq_pend_list)) - pend_list = &tq->tq_pend_list; - else - pend_list = NULL; - - if (pend_list) { - t = list_entry(pend_list->next,taskq_ent_t,tqent_list); + if ((t = taskq_next_ent(tq)) != NULL) { list_del_init(&t->tqent_list); /* In order to support recursively dispatching a @@ -738,8 +853,7 @@ taskq_thread(void *args) tqt->tqt_task = NULL; /* For prealloc'd tasks, we don't free anything. */ - if ((tq->tq_flags & TASKQ_DYNAMIC) || - !(tqt->tqt_flags & TQENT_FLAG_PREALLOC)) + if (!(tqt->tqt_flags & TQENT_FLAG_PREALLOC)) task_done(tq, t); /* When the current lowest outstanding taskqid is @@ -749,9 +863,16 @@ taskq_thread(void *args) ASSERT3S(tq->tq_lowest_id, >, tqt->tqt_id); } + /* Spawn additional taskq threads if required. */ + if (taskq_thread_spawn(tq, ++seq_tasks)) + seq_tasks = 0; + tqt->tqt_id = 0; tqt->tqt_flags = 0; wake_up_all(&tq->tq_wait_waitq); + } else { + if (taskq_thread_should_stop(tq, tqt)) + break; } set_current_state(TASK_INTERRUPTIBLE); @@ -761,27 +882,56 @@ taskq_thread(void *args) __set_current_state(TASK_RUNNING); tq->tq_nthreads--; list_del_init(&tqt->tqt_thread_list); - kmem_free(tqt, sizeof(taskq_thread_t)); - +error: + kmem_free(tqt, sizeof (taskq_thread_t)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); return (0); } +static taskq_thread_t * +taskq_thread_create(taskq_t *tq) +{ + static int last_used_cpu = 0; + taskq_thread_t *tqt; + + tqt = kmem_alloc(sizeof (*tqt), KM_PUSHPAGE); + INIT_LIST_HEAD(&tqt->tqt_thread_list); + INIT_LIST_HEAD(&tqt->tqt_active_list); + tqt->tqt_tq = tq; + tqt->tqt_id = 0; + + tqt->tqt_thread = spl_kthread_create(taskq_thread, tqt, + "%s", tq->tq_name); + if (tqt->tqt_thread == NULL) { + kmem_free(tqt, sizeof (taskq_thread_t)); + return (NULL); + } + + if (spl_taskq_thread_bind) { + last_used_cpu = (last_used_cpu + 1) % num_online_cpus(); + kthread_bind(tqt->tqt_thread, last_used_cpu); + } + + set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(tq->tq_pri)); + wake_up_process(tqt->tqt_thread); + + return (tqt); +} + taskq_t * taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, int maxalloc, uint_t flags) { - static int last_used_cpu = 0; taskq_t *tq; taskq_thread_t *tqt; - int rc = 0, i, j = 0; + int count = 0, rc = 0, i; ASSERT(name != NULL); ASSERT(pri <= maxclsyspri); ASSERT(minalloc >= 0); ASSERT(maxalloc <= INT_MAX); - ASSERT(!(flags & (TASKQ_CPR_SAFE | TASKQ_DYNAMIC))); /* Unsupported */ + ASSERT(!(flags & (TASKQ_CPR_SAFE))); /* Unsupported */ /* Scale the number of threads using nthreads as a percentage */ if (flags & TASKQ_THREADS_CPU_PCT) { @@ -792,24 +942,25 @@ taskq_create(const char *name, int nthreads, pri_t pri, nthreads = MAX((num_online_cpus() * nthreads) / 100, 1); } - tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); + tq = kmem_alloc(sizeof (*tq), KM_PUSHPAGE); if (tq == NULL) return (NULL); spin_lock_init(&tq->tq_lock); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); INIT_LIST_HEAD(&tq->tq_thread_list); INIT_LIST_HEAD(&tq->tq_active_list); - tq->tq_name = name; - tq->tq_nactive = 0; - tq->tq_nthreads = 0; - tq->tq_pri = pri; - tq->tq_minalloc = minalloc; - tq->tq_maxalloc = maxalloc; - tq->tq_nalloc = 0; - tq->tq_flags = (flags | TQ_ACTIVE); - tq->tq_next_id = 1; - tq->tq_lowest_id = 1; + tq->tq_name = strdup(name); + tq->tq_nactive = 0; + tq->tq_nthreads = 0; + tq->tq_nspawn = 0; + tq->tq_maxthreads = nthreads; + tq->tq_pri = pri; + tq->tq_minalloc = minalloc; + tq->tq_maxalloc = maxalloc; + tq->tq_nalloc = 0; + tq->tq_flags = (flags | TASKQ_ACTIVE); + tq->tq_next_id = 1; + tq->tq_lowest_id = 1; INIT_LIST_HEAD(&tq->tq_free_list); INIT_LIST_HEAD(&tq->tq_pend_list); INIT_LIST_HEAD(&tq->tq_prio_list); @@ -817,38 +968,28 @@ taskq_create(const char *name, int nthreads, pri_t pri, init_waitqueue_head(&tq->tq_work_waitq); init_waitqueue_head(&tq->tq_wait_waitq); - if (flags & TASKQ_PREPOPULATE) + if (flags & TASKQ_PREPOPULATE) { + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + for (i = 0; i < minalloc; i++) task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + } + + if ((flags & TASKQ_DYNAMIC) && spl_taskq_thread_dynamic) + nthreads = 1; for (i = 0; i < nthreads; i++) { - tqt = kmem_alloc(sizeof(*tqt), KM_PUSHPAGE); - INIT_LIST_HEAD(&tqt->tqt_thread_list); - INIT_LIST_HEAD(&tqt->tqt_active_list); - tqt->tqt_tq = tq; - tqt->tqt_id = 0; - - tqt->tqt_thread = spl_kthread_create(taskq_thread, tqt, - "%s/%d", name, i); - if (tqt->tqt_thread) { - list_add(&tqt->tqt_thread_list, &tq->tq_thread_list); - if (spl_taskq_thread_bind) { - last_used_cpu = (last_used_cpu + 1) % num_online_cpus(); - kthread_bind(tqt->tqt_thread, last_used_cpu); - } - set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(pri)); - wake_up_process(tqt->tqt_thread); - j++; - } else { - kmem_free(tqt, sizeof(taskq_thread_t)); + tqt = taskq_thread_create(tq); + if (tqt == NULL) rc = 1; - } + else + count++; } /* Wait for all threads to be started before potential destroy */ - wait_event(tq->tq_wait_waitq, tq->tq_nthreads == j); + wait_event(tq->tq_wait_waitq, tq->tq_nthreads == count); if (rc) { taskq_destroy(tq); @@ -868,10 +1009,16 @@ taskq_destroy(taskq_t *tq) ASSERT(tq); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - tq->tq_flags &= ~TQ_ACTIVE; + tq->tq_flags &= ~TASKQ_ACTIVE; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - /* TQ_ACTIVE cleared prevents new tasks being added to pending */ + /* + * When TASKQ_ACTIVE is clear new tasks may not be added nor may + * new worker threads be spawned for dynamic taskq. + */ + if (dynamic_taskq != NULL) + taskq_wait_outstanding(dynamic_taskq, 0); + taskq_wait(tq); spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); @@ -884,7 +1031,7 @@ taskq_destroy(taskq_t *tq) */ while (!list_empty(&tq->tq_thread_list)) { tqt = list_entry(tq->tq_thread_list.next, - taskq_thread_t, tqt_thread_list); + taskq_thread_t, tqt_thread_list); thread = tqt->tqt_thread; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -902,8 +1049,9 @@ taskq_destroy(taskq_t *tq) task_free(tq, t); } - ASSERT(tq->tq_nthreads == 0); - ASSERT(tq->tq_nalloc == 0); + ASSERT0(tq->tq_nthreads); + ASSERT0(tq->tq_nalloc); + ASSERT0(tq->tq_nspawn); ASSERT(list_empty(&tq->tq_thread_list)); ASSERT(list_empty(&tq->tq_active_list)); ASSERT(list_empty(&tq->tq_free_list)); @@ -913,7 +1061,8 @@ taskq_destroy(taskq_t *tq) spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - kmem_free(tq, sizeof(taskq_t)); + strfree(tq->tq_name); + kmem_free(tq, sizeof (taskq_t)); } EXPORT_SYMBOL(taskq_destroy); @@ -927,11 +1076,22 @@ spl_taskq_init(void) if (system_taskq == NULL) return (1); + dynamic_taskq = taskq_create("spl_dynamic_taskq", 1, + minclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE); + if (dynamic_taskq == NULL) { + taskq_destroy(system_taskq); + return (1); + } + return (0); } void spl_taskq_fini(void) { + taskq_destroy(dynamic_taskq); + dynamic_taskq = NULL; + taskq_destroy(system_taskq); + system_taskq = NULL; } diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 7d4ad5b69..645bc9145 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include "splat-internal.h" @@ -75,6 +76,10 @@ #define SPLAT_TASKQ_TEST10_NAME "cancel" #define SPLAT_TASKQ_TEST10_DESC "Cancel task execution" +#define SPLAT_TASKQ_TEST11_ID 0x020b +#define SPLAT_TASKQ_TEST11_NAME "dynamic" +#define SPLAT_TASKQ_TEST11_DESC "Dynamic task queue thread creation" + #define SPLAT_TASKQ_ORDER_MAX 8 #define SPLAT_TASKQ_DEPTH_MAX 16 @@ -1052,11 +1057,104 @@ splat_taskq_test7(struct file *file, void *arg) rc = splat_taskq_test7_impl(file, arg, B_FALSE); if (rc) - return rc; + return (rc); rc = splat_taskq_test7_impl(file, arg, B_TRUE); - return rc; + return (rc); +} + +static void +splat_taskq_throughput_func(void *arg) +{ + splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; + ASSERT(tq_arg); + + atomic_inc(tq_arg->count); +} + +static int +splat_taskq_throughput(struct file *file, void *arg, const char *name, + int nthreads, int minalloc, int maxalloc, int flags, int tasks, + struct timespec *delta) +{ + taskq_t *tq; + taskqid_t id; + splat_taskq_arg_t tq_arg; + taskq_ent_t **tqes; + atomic_t count; + struct timespec start, stop; + int i, j, rc = 0; + + tqes = vmalloc(sizeof (*tqes) * tasks); + if (tqes == NULL) + return (-ENOMEM); + + memset(tqes, 0, sizeof (*tqes) * tasks); + + splat_vprint(file, name, "Taskq '%s' creating (%d/%d/%d/%d)\n", + name, nthreads, minalloc, maxalloc, tasks); + if ((tq = taskq_create(name, nthreads, maxclsyspri, + minalloc, maxalloc, flags)) == NULL) { + splat_vprint(file, name, "Taskq '%s' create failed\n", name); + rc = -EINVAL; + goto out_free; + } + + tq_arg.file = file; + tq_arg.name = name; + tq_arg.count = &count; + atomic_set(tq_arg.count, 0); + + getnstimeofday(&start); + + for (i = 0; i < tasks; i++) { + tqes[i] = kmalloc(sizeof (taskq_ent_t), GFP_KERNEL); + if (tqes[i] == NULL) { + rc = -ENOMEM; + goto out; + } + + taskq_init_ent(tqes[i]); + taskq_dispatch_ent(tq, splat_taskq_throughput_func, + &tq_arg, TQ_SLEEP, tqes[i]); + id = tqes[i]->tqent_id; + + if (id == 0) { + splat_vprint(file, name, "Taskq '%s' function '%s' " + "dispatch %d failed\n", tq_arg.name, + sym2str(splat_taskq_throughput_func), i); + rc = -EINVAL; + goto out; + } + } + + splat_vprint(file, name, "Taskq '%s' waiting for %d dispatches\n", + tq_arg.name, tasks); + + taskq_wait(tq); + + if (delta != NULL) { + getnstimeofday(&stop); + *delta = timespec_sub(stop, start); + } + + splat_vprint(file, name, "Taskq '%s' %d/%d dispatches finished\n", + tq_arg.name, atomic_read(tq_arg.count), tasks); + + if (atomic_read(tq_arg.count) != tasks) + rc = -ERANGE; + +out: + splat_vprint(file, name, "Taskq '%s' destroying\n", tq_arg.name); + taskq_destroy(tq); +out_free: + for (j = 0; j < tasks && tqes[j] != NULL; j++) + kfree(tqes[j]); + + vfree(tqes); + + return (rc); } /* @@ -1065,107 +1163,15 @@ splat_taskq_test7(struct file *file, void *arg) * pass. The purpose is to provide a benchmark for measuring the * effectiveness of taskq optimizations. */ -static void -splat_taskq_test8_func(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - ASSERT(tq_arg); - - atomic_inc(tq_arg->count); -} - -#define TEST8_NUM_TASKS 0x20000 -#define TEST8_THREADS_PER_TASKQ 100 - -static int -splat_taskq_test8_common(struct file *file, void *arg, int minalloc, - int maxalloc) -{ - taskq_t *tq; - taskqid_t id; - splat_taskq_arg_t tq_arg; - taskq_ent_t **tqes; - atomic_t count; - int i, j, rc = 0; - - tqes = vmalloc(sizeof(*tqes) * TEST8_NUM_TASKS); - if (tqes == NULL) - return -ENOMEM; - memset(tqes, 0, sizeof(*tqes) * TEST8_NUM_TASKS); - - splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, - "Taskq '%s' creating (%d/%d/%d)\n", - SPLAT_TASKQ_TEST8_NAME, - minalloc, maxalloc, TEST8_NUM_TASKS); - if ((tq = taskq_create(SPLAT_TASKQ_TEST8_NAME, TEST8_THREADS_PER_TASKQ, - maxclsyspri, minalloc, maxalloc, - TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, - "Taskq '%s' create failed\n", - SPLAT_TASKQ_TEST8_NAME); - rc = -EINVAL; - goto out_free; - } - - tq_arg.file = file; - tq_arg.name = SPLAT_TASKQ_TEST8_NAME; - tq_arg.count = &count; - atomic_set(tq_arg.count, 0); - - for (i = 0; i < TEST8_NUM_TASKS; i++) { - tqes[i] = kmalloc(sizeof(taskq_ent_t), GFP_KERNEL); - if (tqes[i] == NULL) { - rc = -ENOMEM; - goto out; - } - taskq_init_ent(tqes[i]); - - taskq_dispatch_ent(tq, splat_taskq_test8_func, - &tq_arg, TQ_SLEEP, tqes[i]); - - id = tqes[i]->tqent_id; - - if (id == 0) { - splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, - "Taskq '%s' function '%s' dispatch " - "%d failed\n", tq_arg.name, - sym2str(splat_taskq_test8_func), i); - rc = -EINVAL; - goto out; - } - } - - splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, "Taskq '%s' " - "waiting for %d dispatches\n", tq_arg.name, - TEST8_NUM_TASKS); - taskq_wait(tq); - splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, "Taskq '%s' " - "%d/%d dispatches finished\n", tq_arg.name, - atomic_read(tq_arg.count), TEST8_NUM_TASKS); - - if (atomic_read(tq_arg.count) != TEST8_NUM_TASKS) - rc = -ERANGE; - -out: - splat_vprint(file, SPLAT_TASKQ_TEST8_NAME, "Taskq '%s' destroying\n", - tq_arg.name); - taskq_destroy(tq); -out_free: - for (j = 0; j < TEST8_NUM_TASKS && tqes[j] != NULL; j++) - kfree(tqes[j]); - vfree(tqes); - - return rc; -} +#define TEST8_NUM_TASKS 0x20000 +#define TEST8_THREADS_PER_TASKQ 100 static int splat_taskq_test8(struct file *file, void *arg) { - int rc; - - rc = splat_taskq_test8_common(file, arg, 1, 100); - - return rc; + return (splat_taskq_throughput(file, arg, + SPLAT_TASKQ_TEST8_NAME, TEST8_THREADS_PER_TASKQ, + 1, INT_MAX, TASKQ_PREPOPULATE, TEST8_NUM_TASKS, NULL)); } /* @@ -1433,6 +1439,46 @@ out_free: return rc; } +/* + * Create a dynamic taskq with 100 threads and dispatch a huge number of + * trivial tasks. This will cause the taskq to grow quickly to its max + * thread count. This test should always pass. The purpose is to provide + * a benchmark for measuring the performance of dynamic taskqs. + */ +#define TEST11_NUM_TASKS 100000 +#define TEST11_THREADS_PER_TASKQ 100 + +static int +splat_taskq_test11(struct file *file, void *arg) +{ + struct timespec normal, dynamic; + int error; + + error = splat_taskq_throughput(file, arg, SPLAT_TASKQ_TEST11_NAME, + TEST11_THREADS_PER_TASKQ, 1, INT_MAX, + TASKQ_PREPOPULATE, TEST11_NUM_TASKS, &normal); + if (error) + return (error); + + error = splat_taskq_throughput(file, arg, SPLAT_TASKQ_TEST11_NAME, + TEST11_THREADS_PER_TASKQ, 1, INT_MAX, + TASKQ_PREPOPULATE | TASKQ_DYNAMIC, TEST11_NUM_TASKS, &dynamic); + if (error) + return (error); + + splat_vprint(file, SPLAT_TASKQ_TEST11_NAME, + "Timing taskq_wait(): normal=%ld.%09lds, dynamic=%ld.%09lds\n", + normal.tv_sec, normal.tv_nsec, + dynamic.tv_sec, dynamic.tv_nsec); + + /* A 10x increase in runtime is used to indicate a core problem. */ + if ((dynamic.tv_sec * NANOSEC + dynamic.tv_nsec) > + ((normal.tv_sec * NANOSEC + normal.tv_nsec) * 10)) + error = -ETIME; + + return (error); +} + splat_subsystem_t * splat_taskq_init(void) { @@ -1470,6 +1516,8 @@ splat_taskq_init(void) SPLAT_TASKQ_TEST9_ID, splat_taskq_test9); SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST10_NAME, SPLAT_TASKQ_TEST10_DESC, SPLAT_TASKQ_TEST10_ID, splat_taskq_test10); + SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST11_NAME, SPLAT_TASKQ_TEST11_DESC, + SPLAT_TASKQ_TEST11_ID, splat_taskq_test11); return sub; } @@ -1478,6 +1526,7 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST11_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST10_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST9_ID); SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST8_ID); From 3c82160ff2feb86fb7275fd941d203167340a187 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 24 Jun 2015 09:53:47 -0700 Subject: [PATCH 0893/1062] Set TASKQ_DYNAMIC for kmem and system taskqs Add the TASKQ_DYNAMIC flag to the kmem_cache and system taskqs to reduce the number of idle threads on the system. Additional threads will be created on demand up to the previous maximum thread counts. This should have minimal, if any, impact on performance. This makes the system taskq consistent with illumos which is always created as a dynamic taskq with up to 64 threads. The task limits for the kmem_cache have been increased to avoid any unnessisary throttling and to keep a larger reserve of task_t structures on the free list. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #458 --- module/spl/spl-kmem-cache.c | 4 +++- module/spl/spl-taskq.c | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index cd3e543ba..86c26ff05 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1725,7 +1725,9 @@ spl_kmem_cache_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", - spl_kmem_cache_kmem_threads, maxclsyspri, 1, 32, TASKQ_PREPOPULATE); + spl_kmem_cache_kmem_threads, maxclsyspri, + spl_kmem_cache_kmem_threads * 8, INT_MAX, + TASKQ_PREPOPULATE | TASKQ_DYNAMIC); spl_register_shrinker(&spl_kmem_cache_shrinker); return (0); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 9cd193369..44799de1d 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -1069,10 +1069,8 @@ EXPORT_SYMBOL(taskq_destroy); int spl_taskq_init(void) { - /* Solaris creates a dynamic taskq of up to 64 threads, however in - * a Linux environment 1 thread per-core is usually about right */ - system_taskq = taskq_create("spl_system_taskq", num_online_cpus(), - minclsyspri, 4, 512, TASKQ_PREPOPULATE); + system_taskq = taskq_create("spl_system_taskq", MAX(boot_ncpus, 64), + minclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC); if (system_taskq == NULL) return (1); From 77ab5dd33a99bdf7fb062f0ea327582236a225b3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 29 Jun 2015 09:25:29 -0700 Subject: [PATCH 0894/1062] Add memory compatibility wrappers The function vmem_qcache_reap() and global variables 'needfree', 'desfree', and 'lotsfree' are all used in the upstream. While these variables have no meaning under Linux they're being defined as 0's to avoid needing to make additional changes to the ARC code. Signed-off-by: Brian Behlendorf --- include/sys/vmem.h | 1 + include/sys/vmsystm.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/sys/vmem.h b/include/sys/vmem.h index 8aadc9d03..eb4828052 100644 --- a/include/sys/vmem.h +++ b/include/sys/vmem.h @@ -98,6 +98,7 @@ extern void *spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot); #define vmem_alloc(sz, fl) spl_vmem_alloc((sz), (fl), __func__, __LINE__) #define vmem_zalloc(sz, fl) spl_vmem_zalloc((sz), (fl), __func__, __LINE__) #define vmem_free(ptr, sz) spl_vmem_free((ptr), (sz)) +#define vmem_qcache_reap(ptr) ((void)0) extern void *spl_vmem_alloc(size_t sz, int fl, const char *func, int line); extern void *spl_vmem_zalloc(size_t sz, int fl, const char *func, int line); diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 2fa169523..3720d209a 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -36,6 +36,9 @@ #define membar_producer() smp_wmb() #define physmem totalram_pages #define freemem nr_free_pages() +#define needfree 0 +#define desfree 0 +#define lotsfree 0 #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) From 37d7cd94f326896ffbd3f7609a20562c000cd4c8 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Wed, 11 Jun 2014 03:57:48 +0200 Subject: [PATCH 0895/1062] Support parallel build trees (VPATH builds) Build products from an out of tree build should be written relative to the build directory. Sources should be referred to by their locations in the source directory. This is accomplished by adding the 'src' and 'obj' variables for the module Makefile.am, using relative paths to reference source files, and by setting VPATH when source files are not co-located with the Makefile. This enables the following: $ mkdir build $ cd build $ ../configure $ make -s This change also has the advantage of resolving the following warning which is generated by modern versions of automake. Makefile.am:00: warning: source file 'xxx' is in a subdirectory, Makefile.am:00: but option 'subdir-objects' is disabled Signed-off-by: Turbo Fredriksson Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#1082 --- Makefile.am | 10 +++++----- config/rpm.am | 2 +- include/util/Makefile.am | 2 +- module/spl/Makefile.in | 41 +++++++++++++++++++++------------------- module/splat/Makefile.in | 37 +++++++++++++++++++----------------- scripts/Makefile.am | 2 +- 6 files changed, 50 insertions(+), 44 deletions(-) diff --git a/Makefile.am b/Makefile.am index 89af931ae..4977448fd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,9 @@ ACLOCAL_AMFLAGS = -I config -include $(top_srcdir)/config/rpm.am -include $(top_srcdir)/config/deb.am -include $(top_srcdir)/config/tgz.am +include config/rpm.am +include config/deb.am +include config/tgz.am SUBDIRS = include rpm if CONFIG_USER @@ -40,11 +40,11 @@ dist-hook: $(distdir)/META ctags: - $(RM) $(top_srcdir)/tags + $(RM) tags find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags etags: - $(RM) $(top_srcdir)/TAGS + $(RM) TAGS find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a tags: ctags etags diff --git a/config/rpm.am b/config/rpm.am index 311c754d4..51a20b3e6 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -51,7 +51,7 @@ rpm-local: mkdir -p $(rpmbuild)/SPECS && \ cp ${RPM_SPEC_DIR}/$(rpmspec) $(rpmbuild)/SPECS && \ mkdir -p $(rpmbuild)/SOURCES && \ - cp scripts/kmodtool $(rpmbuild)/SOURCES && \ + cp $(top_srcdir)/scripts/kmodtool $(rpmbuild)/SOURCES && \ cp $(distdir).tar.gz $(rpmbuild)/SOURCES) srpm-common: dist diff --git a/include/util/Makefile.am b/include/util/Makefile.am index b721b5099..e2bf09fb1 100644 --- a/include/util/Makefile.am +++ b/include/util/Makefile.am @@ -2,7 +2,7 @@ COMMON_H = KERNEL_H = \ $(top_srcdir)/include/util/qsort.h \ - $(top_srcdir)/include/util/sscanf.h + $(top_srcdir)/include/util/sscanf.h USER_H = diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index d1742448d..a1f1ab823 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -1,27 +1,30 @@ # Makefile.in for spl kernel module +src = @abs_top_srcdir@/module/spl +obj = @abs_builddir@ + MODULE := spl EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@ # Solaris porting layer module obj-$(CONFIG_SPL) := $(MODULE).o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem-cache.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-vmem.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-thread.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-taskq.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-rwlock.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-vnode.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-err.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-kobj.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-generic.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-atomic.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-mutex.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-kstat.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-condvar.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-xdr.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-cred.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-tsd.o -$(MODULE)-objs += @top_srcdir@/module/spl/spl-zlib.o +$(MODULE)-objs += spl-proc.o +$(MODULE)-objs += spl-kmem.o +$(MODULE)-objs += spl-kmem-cache.o +$(MODULE)-objs += spl-vmem.o +$(MODULE)-objs += spl-thread.o +$(MODULE)-objs += spl-taskq.o +$(MODULE)-objs += spl-rwlock.o +$(MODULE)-objs += spl-vnode.o +$(MODULE)-objs += spl-err.o +$(MODULE)-objs += spl-kobj.o +$(MODULE)-objs += spl-generic.o +$(MODULE)-objs += spl-atomic.o +$(MODULE)-objs += spl-mutex.o +$(MODULE)-objs += spl-kstat.o +$(MODULE)-objs += spl-condvar.o +$(MODULE)-objs += spl-xdr.o +$(MODULE)-objs += spl-cred.o +$(MODULE)-objs += spl-tsd.o +$(MODULE)-objs += spl-zlib.o diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index f4065196b..680f28492 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -1,25 +1,28 @@ # Makefile.in for splat kernel module +src = @abs_top_srcdir@/module/splat +obj = @abs_builddir@ + MODULE := splat EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@ # Solaris Porting LAyer Tests obj-$(CONFIG_SPL) := $(MODULE).o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-ctl.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-kmem.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-taskq.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-random.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-mutex.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-condvar.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-thread.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-rwlock.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-time.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-vnode.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-kobj.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-atomic.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-list.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-generic.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-cred.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-zlib.o -$(MODULE)-objs += @top_srcdir@/module/splat/splat-linux.o +$(MODULE)-objs += splat-ctl.o +$(MODULE)-objs += splat-kmem.o +$(MODULE)-objs += splat-taskq.o +$(MODULE)-objs += splat-random.o +$(MODULE)-objs += splat-mutex.o +$(MODULE)-objs += splat-condvar.o +$(MODULE)-objs += splat-thread.o +$(MODULE)-objs += splat-rwlock.o +$(MODULE)-objs += splat-time.o +$(MODULE)-objs += splat-vnode.o +$(MODULE)-objs += splat-kobj.o +$(MODULE)-objs += splat-atomic.o +$(MODULE)-objs += splat-list.o +$(MODULE)-objs += splat-generic.o +$(MODULE)-objs += splat-cred.o +$(MODULE)-objs += splat-zlib.o +$(MODULE)-objs += splat-linux.o diff --git a/scripts/Makefile.am b/scripts/Makefile.am index f146ec6e6..a718c4b1a 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,4 @@ EXTRA_DIST = check.sh dkms.mkconf dkms.postbuild kmodtool check: - $(top_srcdir)/scripts/check.sh + scripts/check.sh From 9eb361aaa537724c9a90ab6a9f33521bfd80bad9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 20 Jul 2015 12:18:56 -0700 Subject: [PATCH 0896/1062] Default to --disable-debug-kmem The default kmem debugging (--enable-debug-kmem) can severely impact performance on large-scale NUMA systems due to the atomic operations used in the memory accounting. A 32-thread fio test running on a 40-core 80-thread system and performing 100% cached reads with kmem debugging is: Enabled: READ: io=177071MB, aggrb=2951.2MB/s, minb=2951.2MB/s, maxb=2951.2MB/s, Disabled: READ: io=271454MB, aggrb=4524.4MB/s, minb=4524.4MB/s, maxb=4524.4MB/s, Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issues #463 --- config/spl-build.m4 | 7 +++---- module/spl/spl-proc.c | 21 +++------------------ 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 9999d480d..daa9eb714 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -452,15 +452,14 @@ dnl # dnl # Enabled by default it provides a minimal level of memory tracking. dnl # A total count of bytes allocated is kept for each alloc and free. dnl # Then at module unload time a report to the console will be printed -dnl # if memory was leaked. Additionally, /proc/spl/kmem/slab will exist -dnl # and provide an easy way to inspect the kmem based slab. +dnl # if memory was leaked. dnl # AC_DEFUN([SPL_AC_DEBUG_KMEM], [ AC_ARG_ENABLE([debug-kmem], [AS_HELP_STRING([--enable-debug-kmem], - [Enable basic kmem accounting @<:@default=yes@:>@])], + [Enable basic kmem accounting @<:@default=no@:>@])], [], - [enable_debug_kmem=yes]) + [enable_debug_kmem=no]) AS_IF([test "x$enable_debug_kmem" = xyes], [ diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index a434ef54f..eb00505d6 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -42,17 +42,13 @@ typedef struct ctl_table __no_const spl_ctl_table; typedef struct ctl_table spl_ctl_table; #endif -#ifdef DEBUG_KMEM static unsigned long table_min = 0; static unsigned long table_max = ~0; -#endif static struct ctl_table_header *spl_header = NULL; static struct proc_dir_entry *proc_spl = NULL; -#ifdef DEBUG_KMEM static struct proc_dir_entry *proc_spl_kmem = NULL; static struct proc_dir_entry *proc_spl_kmem_slab = NULL; -#endif /* DEBUG_KMEM */ struct proc_dir_entry *proc_spl_kstat = NULL; static int @@ -135,6 +131,7 @@ proc_domemused(struct ctl_table *table, int write, return (rc); } +#endif /* DEBUG_KMEM */ static int proc_doslab(struct ctl_table *table, int write, @@ -182,7 +179,6 @@ proc_doslab(struct ctl_table *table, int write, return (rc); } -#endif /* DEBUG_KMEM */ static int proc_dohostid(struct ctl_table *table, int write, @@ -219,7 +215,6 @@ proc_dohostid(struct ctl_table *table, int write, return (rc); } -#ifdef DEBUG_KMEM static void slab_seq_show_headers(struct seq_file *f) { @@ -329,10 +324,9 @@ static struct file_operations proc_slab_operations = { .llseek = seq_lseek, .release = seq_release, }; -#endif /* DEBUG_KMEM */ -#ifdef DEBUG_KMEM static struct ctl_table spl_kmem_table[] = { +#ifdef DEBUG_KMEM { .procname = "kmem_used", .data = &kmem_alloc_used, @@ -353,6 +347,7 @@ static struct ctl_table spl_kmem_table[] = { .mode = 0444, .proc_handler = &proc_doulongvec_minmax, }, +#endif /* DEBUG_KMEM */ { .procname = "slab_kmem_total", .data = (void *)(KMC_KMEM | KMC_TOTAL), @@ -409,7 +404,6 @@ static struct ctl_table spl_kmem_table[] = { }, {0}, }; -#endif /* DEBUG_KMEM */ static struct ctl_table spl_kstat_table[] = { {0}, @@ -433,13 +427,11 @@ static struct ctl_table spl_table[] = { .mode = 0644, .proc_handler = &proc_dohostid, }, -#ifdef DEBUG_KMEM { .procname = "kmem", .mode = 0555, .child = spl_kmem_table, }, -#endif { .procname = "kstat", .mode = 0555, @@ -484,7 +476,6 @@ spl_proc_init(void) goto out; } -#ifdef DEBUG_KMEM proc_spl_kmem = proc_mkdir("kmem", proc_spl); if (proc_spl_kmem == NULL) { rc = -EUNATCH; @@ -498,8 +489,6 @@ spl_proc_init(void) goto out; } -#endif /* DEBUG_KMEM */ - proc_spl_kstat = proc_mkdir("kstat", proc_spl); if (proc_spl_kstat == NULL) { rc = -EUNATCH; @@ -508,10 +497,8 @@ spl_proc_init(void) out: if (rc) { remove_proc_entry("kstat", proc_spl); -#ifdef DEBUG_KMEM remove_proc_entry("slab", proc_spl_kmem); remove_proc_entry("kmem", proc_spl); -#endif remove_proc_entry("spl", NULL); unregister_sysctl_table(spl_header); } @@ -523,10 +510,8 @@ void spl_proc_fini(void) { remove_proc_entry("kstat", proc_spl); -#ifdef DEBUG_KMEM remove_proc_entry("slab", proc_spl_kmem); remove_proc_entry("kmem", proc_spl); -#endif remove_proc_entry("spl", NULL); ASSERT(spl_header != NULL); From 62aa81a5776c0bc35f05f8923ea3e293527b5264 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 23 Jul 2015 11:21:08 -0700 Subject: [PATCH 0897/1062] Add defclsyspri macro Add a new defclsyspri macro which can be used to request the default Linux scheduler priority. Neither the minclsyspri or maxclsyspri map to the default Linux kernel thread priority. This makes it awkward to create taskqs which run with the same priority as the rest of the kernel threads on the system which can lead to performance issues. All SPL callers which previously used minclsyspri or maxclsyspri have been changed to use defclsyspri. The vast majority of callers were part of the test suite which won't have an external impact. The few places where it could impact performance the change was from maxclsyspri to defclsyspri. This makes it more likely the process will be scheduled which may help performance. To facilitate further performance analysis the spl_taskq_thread_priority module option has been added. When disabled (0) all newly created kernel threads will use the default kernel thread priority. When enabled (1) the specified taskq priority will be used. By default this value is enabled (1). Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 1 + include/sys/taskq.h | 2 +- man/man5/spl-module-parameters.5 | 15 +++++++++++++++ module/spl/spl-kmem-cache.c | 2 +- module/spl/spl-taskq.c | 13 ++++++++++--- module/splat/splat-atomic.c | 2 +- module/splat/splat-kmem.c | 2 +- module/splat/splat-mutex.c | 6 +++--- module/splat/splat-rwlock.c | 4 ++-- module/splat/splat-taskq.c | 18 +++++++++--------- module/splat/splat-thread.c | 8 ++++---- 11 files changed, 48 insertions(+), 25 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 4838ab3be..9f16ac70f 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -95,6 +95,7 @@ */ #define minclsyspri (MAX_RT_PRIO) #define maxclsyspri (MAX_PRIO-1) +#define defclsyspri (DEFAULT_PRIO) #ifndef NICE_TO_PRIO #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index a43a86da6..5c29e8f0e 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -129,7 +129,7 @@ extern int taskq_member(taskq_t *, void *); #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ taskq_create(name, nthreads, pri, min, max, flags) #define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ - taskq_create(name, nthreads, maxclsyspri, min, max, flags) + taskq_create(name, nthreads, defclsyspri, min, max, flags) int spl_taskq_init(void); void spl_taskq_fini(void); diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index fc38605b2..acdd5b658 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -266,6 +266,21 @@ aid performance analysis or troubleshooting. Default value: \fB1\fR .RE +.sp +.ne 2 +.na +\fBspl_taskq_thread_priority\fR (int) +.ad +.RS 12n +Allow newly created taskq threads to set a non-default scheduler priority. +When enabled the priority specified when a taskq is created will be applied +to all threads created by that taskq. When disabled all threads will use +the default Linux kernel thread priority. By default, this behavior is +enabled. +.sp +Default value: \fB1\fR +.RE + .sp .ne 2 .na diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 86c26ff05..112d0f876 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1725,7 +1725,7 @@ spl_kmem_cache_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", - spl_kmem_cache_kmem_threads, maxclsyspri, + spl_kmem_cache_kmem_threads, defclsyspri, spl_kmem_cache_kmem_threads * 8, INT_MAX, TASKQ_PREPOPULATE | TASKQ_DYNAMIC); spl_register_shrinker(&spl_kmem_cache_shrinker); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 44799de1d..b4282333e 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -36,6 +36,11 @@ int spl_taskq_thread_dynamic = 1; module_param(spl_taskq_thread_dynamic, int, 0644); MODULE_PARM_DESC(spl_taskq_thread_dynamic, "Allow dynamic taskq threads"); +int spl_taskq_thread_priority = 1; +module_param(spl_taskq_thread_priority, int, 0644); +MODULE_PARM_DESC(spl_taskq_thread_priority, + "Allow non-default priority for taskq threads"); + int spl_taskq_thread_sequential = 4; module_param(spl_taskq_thread_sequential, int, 0644); MODULE_PARM_DESC(spl_taskq_thread_sequential, @@ -913,7 +918,9 @@ taskq_thread_create(taskq_t *tq) kthread_bind(tqt->tqt_thread, last_used_cpu); } - set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(tq->tq_pri)); + if (spl_taskq_thread_priority) + set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(tq->tq_pri)); + wake_up_process(tqt->tqt_thread); return (tqt); @@ -1070,12 +1077,12 @@ int spl_taskq_init(void) { system_taskq = taskq_create("spl_system_taskq", MAX(boot_ncpus, 64), - minclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC); + defclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC); if (system_taskq == NULL) return (1); dynamic_taskq = taskq_create("spl_dynamic_taskq", 1, - minclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE); + defclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE); if (dynamic_taskq == NULL) { taskq_destroy(system_taskq); return (1); diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index e94f42f00..999f4f058 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -156,7 +156,7 @@ splat_atomic_test1(struct file *file, void *arg) thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work, &ap, 0, &p0, TS_RUN, - minclsyspri); + defclsyspri); if (thr == NULL) { rc = -ESRCH; mutex_exit(&ap.ap_lock); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index cd0000bae..b3fd1a84d 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -739,7 +739,7 @@ splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, for (i = 0; i < SPLAT_KMEM_THREADS; i++) { thr = thread_create(NULL, 0, splat_kmem_cache_test_thread, - kcp, 0, &p0, TS_RUN, minclsyspri); + kcp, 0, &p0, TS_RUN, defclsyspri); if (thr == NULL) { rc = -ESRCH; goto out_cache; diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 909d730cb..86bef8ee3 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -87,7 +87,7 @@ splat_mutex_test1(struct file *file, void *arg) if (mp == NULL) return -ENOMEM; - tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, maxclsyspri, + tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); if (tq == NULL) { rc = -ENOMEM; @@ -196,7 +196,7 @@ splat_mutex_test2(struct file *file, void *arg) /* Create several threads allowing tasks to race with each other */ tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, num_online_cpus(), - maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); + defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); if (tq == NULL) { rc = -ENOMEM; goto out; @@ -266,7 +266,7 @@ splat_mutex_test3(struct file *file, void *arg) mp.mp_file = file; mutex_init(&mp.mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - if ((tq = taskq_create(SPLAT_MUTEX_TEST_NAME, 1, maxclsyspri, + if ((tq = taskq_create(SPLAT_MUTEX_TEST_NAME, 1, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Taskq '%s' " "create failed\n", SPLAT_MUTEX_TEST3_NAME); diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 6c623792e..284f77370 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -327,7 +327,7 @@ splat_rwlock_test2(struct file *file, void *arg) /* Create several threads allowing tasks to race with each other */ tq = taskq_create(SPLAT_RWLOCK_TEST_TASKQ, num_online_cpus(), - maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); + defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); if (tq == NULL) { rc = -ENOMEM; goto out; @@ -500,7 +500,7 @@ splat_rwlock_test4(struct file *file, void *arg) if (rwp == NULL) return -ENOMEM; - tq = taskq_create(SPLAT_RWLOCK_TEST_TASKQ, 1, maxclsyspri, + tq = taskq_create(SPLAT_RWLOCK_TEST_TASKQ, 1, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); if (tq == NULL) { rc = -ENOMEM; diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 645bc9145..8f06f413d 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -134,7 +134,7 @@ splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) "Taskq '%s' creating (%s dispatch)\n", SPLAT_TASKQ_TEST1_NAME, prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, maxclsyspri, + if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' create failed\n", @@ -269,7 +269,7 @@ splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { prealloc ? "prealloc" : "dynamic"); if ((tq[i] = taskq_create(SPLAT_TASKQ_TEST2_NAME, TEST2_THREADS_PER_TASKQ, - maxclsyspri, 50, INT_MAX, + defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' create failed\n", @@ -494,7 +494,7 @@ splat_taskq_test4_common(struct file *file, void *arg, int minalloc, SPLAT_TASKQ_TEST4_NAME, prealloc ? "prealloc" : "dynamic", minalloc, maxalloc, nr_tasks); - if ((tq = taskq_create(SPLAT_TASKQ_TEST4_NAME, 1, maxclsyspri, + if ((tq = taskq_create(SPLAT_TASKQ_TEST4_NAME, 1, defclsyspri, minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' create failed\n", @@ -712,7 +712,7 @@ splat_taskq_test5_impl(struct file *file, void *arg, boolean_t prealloc) "Taskq '%s' creating (%s dispatch)\n", SPLAT_TASKQ_TEST5_NAME, prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST5_NAME, 3, maxclsyspri, + if ((tq = taskq_create(SPLAT_TASKQ_TEST5_NAME, 3, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' create failed\n", @@ -873,7 +873,7 @@ splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) "Taskq '%s' creating (%s dispatch)\n", SPLAT_TASKQ_TEST6_NAME, prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST6_NAME, 3, maxclsyspri, + if ((tq = taskq_create(SPLAT_TASKQ_TEST6_NAME, 3, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' create failed\n", @@ -1005,7 +1005,7 @@ splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) "Taskq '%s' creating (%s dispatch)\n", SPLAT_TASKQ_TEST7_NAME, prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST7_NAME, 1, maxclsyspri, + if ((tq = taskq_create(SPLAT_TASKQ_TEST7_NAME, 1, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, "Taskq '%s' create failed\n", @@ -1094,7 +1094,7 @@ splat_taskq_throughput(struct file *file, void *arg, const char *name, splat_vprint(file, name, "Taskq '%s' creating (%d/%d/%d/%d)\n", name, nthreads, minalloc, maxalloc, tasks); - if ((tq = taskq_create(name, nthreads, maxclsyspri, + if ((tq = taskq_create(name, nthreads, defclsyspri, minalloc, maxalloc, flags)) == NULL) { splat_vprint(file, name, "Taskq '%s' create failed\n", name); rc = -EINVAL; @@ -1203,7 +1203,7 @@ splat_taskq_test9(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", SPLAT_TASKQ_TEST9_NAME, "delay", minalloc, maxalloc, nr_tasks); - if ((tq = taskq_create(SPLAT_TASKQ_TEST9_NAME, 3, maxclsyspri, + if ((tq = taskq_create(SPLAT_TASKQ_TEST9_NAME, 3, defclsyspri, minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST9_NAME); @@ -1303,7 +1303,7 @@ splat_taskq_test10(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", SPLAT_TASKQ_TEST10_NAME, "delay", minalloc, maxalloc, nr_tasks); - if ((tq = taskq_create(SPLAT_TASKQ_TEST10_NAME, 3, maxclsyspri, + if ((tq = taskq_create(SPLAT_TASKQ_TEST10_NAME, 3, defclsyspri, minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST10_NAME); diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index 3255e37e5..8a4471407 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -112,7 +112,7 @@ splat_thread_test1(struct file *file, void *arg) tp.tp_rc = 0; thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work1, &tp, 0, - &p0, TS_RUN, minclsyspri); + &p0, TS_RUN, defclsyspri); /* Must never fail under Solaris, but we check anyway since this * can happen in the linux SPL, we may want to change this behavior */ if (thr == NULL) @@ -161,7 +161,7 @@ splat_thread_test2(struct file *file, void *arg) tp.tp_rc = 0; thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work2, &tp, 0, - &p0, TS_RUN, minclsyspri); + &p0, TS_RUN, defclsyspri); /* Must never fail under Solaris, but we check anyway since this * can happen in the linux SPL, we may want to change this behavior */ if (thr == NULL) @@ -278,7 +278,7 @@ splat_thread_test3(struct file *file, void *arg) /* Start tsd wait threads */ for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) { if (thread_create(NULL, 0, splat_thread_work3_wait, - &tp, 0, &p0, TS_RUN, minclsyspri)) + &tp, 0, &p0, TS_RUN, defclsyspri)) wait_count++; } @@ -295,7 +295,7 @@ splat_thread_test3(struct file *file, void *arg) /* Start tsd exit threads */ for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) { if (thread_create(NULL, 0, splat_thread_work3_exit, - &tp, 0, &p0, TS_RUN, minclsyspri)) + &tp, 0, &p0, TS_RUN, defclsyspri)) exit_count++; } From 4699d76d19f1ff4a59c16c10b2aedab6f5054a73 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 23 Jul 2015 13:45:31 -0700 Subject: [PATCH 0898/1062] Remove skc_ref from alloc/free paths As described in spl_kmem_cache_destroy() the ->skc_ref count was added to address the case of a cache reap or grow racing with a destroy. They are not strictly needed in the alloc/free paths because consumers of the cache are responsible for not using it while it's being destroyed. Removing this code is desirable because there is some evidence that contention on this atomic negative impacts performance on large-scale NUMA systems. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #463 --- module/spl/spl-kmem-cache.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 112d0f876..0417f9d0b 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1403,8 +1403,6 @@ spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - atomic_inc(&skc->skc_ref); - /* * Allocate directly from a Linux slab. All optimizations are left * to the underlying cache we only need to guarantee that KM_SLEEP @@ -1457,8 +1455,6 @@ ret: prefetchw(obj); } - atomic_dec(&skc->skc_ref); - return (obj); } EXPORT_SYMBOL(spl_kmem_cache_alloc); @@ -1479,7 +1475,6 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(!test_bit(KMC_BIT_DESTROY, &skc->skc_flags)); - atomic_inc(&skc->skc_ref); /* * Run the destructor @@ -1492,7 +1487,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) */ if (skc->skc_flags & KMC_SLAB) { kmem_cache_free(skc->skc_linux_cache, obj); - goto out; + return; } /* @@ -1507,7 +1502,7 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) spin_unlock(&skc->skc_lock); if (do_emergency && (spl_emergency_free(skc, obj) == 0)) - goto out; + return; } local_irq_save(flags); @@ -1538,8 +1533,6 @@ spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj) if (do_reclaim) spl_slab_reclaim(skc); -out: - atomic_dec(&skc->skc_ref); } EXPORT_SYMBOL(spl_kmem_cache_free); From 9dc5ffbec845ec9c4d9b109c85569345c0c11766 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 24 Jul 2015 10:32:55 -0700 Subject: [PATCH 0899/1062] Invert minclsyspri and maxclsyspri On Linux the meaning of a processes priority is inverted with respect to illumos. High values on Linux indicate a _low_ priority while high value on illumos indicate a _high_ priority. In order to preserve the logical meaning of the minclsyspri and maxclsyspri macros when they are used by the illumos wrapper functions their values have been inverted. This way when changes are merged from upstream illumos we won't need to remember to invert the macro. It could also lead to confusion. Note this change also reverts some of the priorities changes in prior commit 62aa81a. The rational is as follows: spl_kmem_cache - High priority may result in blocked memory allocs spl_system_taskq - May perform I/O for file backed VDEVs spl_dynamic_taskq - New taskq threads should be spawned promptly Signed-off-by: Brian Behlendorf Signed-off-by: Ned Bass Issue zfsonlinux/zfs#3607 --- include/sys/sysmacros.h | 4 ++-- include/sys/taskq.h | 2 +- module/spl/spl-kmem-cache.c | 2 +- module/spl/spl-taskq.c | 5 ++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 9f16ac70f..4dc7cd858 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -93,8 +93,8 @@ * * Treat shim tasks as SCHED_NORMAL tasks */ -#define minclsyspri (MAX_RT_PRIO) -#define maxclsyspri (MAX_PRIO-1) +#define minclsyspri (MAX_PRIO-1) +#define maxclsyspri (MAX_RT_PRIO) #define defclsyspri (DEFAULT_PRIO) #ifndef NICE_TO_PRIO diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 5c29e8f0e..a43a86da6 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -129,7 +129,7 @@ extern int taskq_member(taskq_t *, void *); #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ taskq_create(name, nthreads, pri, min, max, flags) #define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ - taskq_create(name, nthreads, defclsyspri, min, max, flags) + taskq_create(name, nthreads, maxclsyspri, min, max, flags) int spl_taskq_init(void); void spl_taskq_fini(void); diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 0417f9d0b..a83c9f3ae 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1718,7 +1718,7 @@ spl_kmem_cache_init(void) init_rwsem(&spl_kmem_cache_sem); INIT_LIST_HEAD(&spl_kmem_cache_list); spl_kmem_cache_taskq = taskq_create("spl_kmem_cache", - spl_kmem_cache_kmem_threads, defclsyspri, + spl_kmem_cache_kmem_threads, maxclsyspri, spl_kmem_cache_kmem_threads * 8, INT_MAX, TASKQ_PREPOPULATE | TASKQ_DYNAMIC); spl_register_shrinker(&spl_kmem_cache_shrinker); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index b4282333e..7a756af37 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -935,7 +935,6 @@ taskq_create(const char *name, int nthreads, pri_t pri, int count = 0, rc = 0, i; ASSERT(name != NULL); - ASSERT(pri <= maxclsyspri); ASSERT(minalloc >= 0); ASSERT(maxalloc <= INT_MAX); ASSERT(!(flags & (TASKQ_CPR_SAFE))); /* Unsupported */ @@ -1077,12 +1076,12 @@ int spl_taskq_init(void) { system_taskq = taskq_create("spl_system_taskq", MAX(boot_ncpus, 64), - defclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC); + maxclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC); if (system_taskq == NULL) return (1); dynamic_taskq = taskq_create("spl_dynamic_taskq", 1, - defclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE); + maxclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE); if (dynamic_taskq == NULL) { taskq_destroy(system_taskq); return (1); From 8ac6ffecaf6dacfec6c5cb24d0bc8b3d40db63ef Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 27 Jul 2015 15:05:47 -0700 Subject: [PATCH 0900/1062] Remove needfree, desfree, lotsfree #defines This patch reverts 77ab5dd. This is now possible because upstream has refactored the ARC in such a way that these values are only used in a few key places. Those places have subsequently been updated to use the Linux equivalent Linux functionality. Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#3637 --- include/sys/vmsystm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 3720d209a..2fa169523 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -36,9 +36,6 @@ #define membar_producer() smp_wmb() #define physmem totalram_pages #define freemem nr_free_pages() -#define needfree 0 -#define desfree 0 -#define lotsfree 0 #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) From 851a549305ad9001e7a6dfbf735f501b286e9d08 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Wed, 12 Aug 2015 09:57:35 -0500 Subject: [PATCH 0901/1062] Include other sources of freeable memory in the freemem calculation Prevents ARC collapse when non-ZFS filesystems, the block layer or other memory consumers use a lot of reclaimable memory in the page cache. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes zfsonlinux/zfs#3680 Closes #471 --- include/sys/vmsystm.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 2fa169523..9d334fe0a 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -35,7 +35,10 @@ #define membar_producer() smp_wmb() #define physmem totalram_pages -#define freemem nr_free_pages() +#define freemem (nr_free_pages() + \ + global_page_state(NR_INACTIVE_FILE) + \ + global_page_state(NR_INACTIVE_ANON) + \ + global_page_state(NR_SLAB_RECLAIMABLE)) #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) From ebc2c9374bde0c53837e7c909809697088615a88 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 19 Aug 2015 14:48:21 -0700 Subject: [PATCH 0902/1062] Linux 4.2 compat: vfs_rename() Attempting to perform a vfs_rename() on Linux 4.2 and newer kernels results in an EACCES error. Rather than attempting to add and maintain more ugly compatibility code it's best to just retire this interface. As a first step the SPLAT test is disabled for Linux 4.2 and newer kernels. vn_rename: Failed vn_rename /tmp/vn.tmp.1 -> /tmp/vn.tmp.2 (13) Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#3653 --- module/splat/splat-internal.h | 1 + module/splat/splat-vnode.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 832132696..d00af90fa 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -28,6 +28,7 @@ #include "splat-ctl.h" #include #include +#include #define SPLAT_SUBSYSTEM_INIT(type) \ ({ splat_subsystem_t *_sub_; \ diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index f3f17ec92..bffcf492f 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -223,6 +223,7 @@ out: return -rc; } /* splat_vnode_test3() */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) static int splat_vnode_test4(struct file *file, void *arg) { @@ -303,6 +304,7 @@ out: return -rc; } /* splat_vnode_test4() */ +#endif static int splat_vnode_test5(struct file *file, void *arg) @@ -413,8 +415,10 @@ splat_vnode_init(void) SPLAT_VNODE_TEST2_ID, splat_vnode_test2); SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST3_NAME, SPLAT_VNODE_TEST3_DESC, SPLAT_VNODE_TEST3_ID, splat_vnode_test3); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST4_NAME, SPLAT_VNODE_TEST4_DESC, SPLAT_VNODE_TEST4_ID, splat_vnode_test4); +#endif SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST5_NAME, SPLAT_VNODE_TEST5_DESC, SPLAT_VNODE_TEST5_ID, splat_vnode_test5); SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, @@ -430,7 +434,9 @@ splat_vnode_fini(splat_subsystem_t *sub) SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST5_ID); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST4_ID); +#endif SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST3_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST2_ID); SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST1_ID); From ae89cf0f34de323c4a7c39bfd9b906acc2635a87 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 30 Jul 2015 22:19:01 +0800 Subject: [PATCH 0903/1062] Restructure uio to accommodate bio_vec Starting from Linux 4.1, bio_vec will be allowed to pass into filesystem via iter_read/iter_write, so we add a bio_vec field in uio_t to hold it, and use UIO_BVEC in segflg to determine which "vec". Also, to be consistent to newer kernel, we make iovec and bio_vec immutable, and make uio act as an iterator with the new uio_skip field indicating number of bytes to skip in the first segment. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#3511 Issue zfsonlinux/zfs#3640 Closes #468 --- include/sys/uio.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/sys/uio.h b/include/sys/uio.h index 25c5f4a01..404c03774 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -1,6 +1,7 @@ /*****************************************************************************\ * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. + * Copyright (c) 2015 by Chunwei Chen. All rights reserved. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . * UCRL-CODE-235197 @@ -26,6 +27,7 @@ #define _SPL_UIO_H #include +#include #include #include @@ -40,10 +42,14 @@ typedef enum uio_seg { UIO_USERSPACE = 0, UIO_SYSSPACE = 1, UIO_USERISPACE= 2, + UIO_BVEC = 3, } uio_seg_t; typedef struct uio { - struct iovec *uio_iov; + union { + const struct iovec *uio_iov; + const struct bio_vec *uio_bvec; + }; int uio_iovcnt; offset_t uio_loffset; uio_seg_t uio_segflg; @@ -51,6 +57,7 @@ typedef struct uio { uint16_t uio_extflg; offset_t uio_limit; ssize_t uio_resid; + size_t uio_skip; } uio_t; typedef struct aio_req { From 076821eaff146a56aa6a66916d70eda7db3347ed Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Thu, 27 Aug 2015 11:13:20 -0500 Subject: [PATCH 0904/1062] Create a new thread during recursive taskq dispatch if necessary When dynamic taskq is enabled and all threads for a taskq are occupied, a recursive dispatch can cause a deadlock if calling thread depends on the recursively-dispatched thread for its return condition. This patch attempts to create a new thread for recursive dispatch when none are available. Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #472 --- module/spl/spl-taskq.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 7a756af37..2202aced7 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -53,6 +53,7 @@ EXPORT_SYMBOL(system_taskq); /* Private dedicated taskq for creating new taskq threads on demand. */ static taskq_t *dynamic_taskq; static taskq_thread_t *taskq_thread_create(taskq_t *); +static int taskq_thread_spawn(taskq_t *tq, int seq_tasks); static int task_km_flags(uint_t flags) @@ -533,6 +534,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { taskq_ent_t *t; taskqid_t rc = 0; + boolean_t threadlimit = B_FALSE; ASSERT(tq); ASSERT(func); @@ -574,7 +576,13 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: + threadlimit = (tq->tq_nactive == tq->tq_nthreads); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + /* Spawn additional taskq threads if required. */ + if (threadlimit && taskq_member(tq, current)) + (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); + return (rc); } EXPORT_SYMBOL(taskq_dispatch); @@ -585,6 +593,7 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, { taskqid_t rc = 0; taskq_ent_t *t; + boolean_t threadlimit = B_FALSE; ASSERT(tq); ASSERT(func); @@ -617,7 +626,13 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, spin_unlock(&t->tqent_lock); out: + threadlimit = (tq->tq_nactive == tq->tq_nthreads); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + /* Spawn additional taskq threads if required. */ + if (threadlimit && taskq_member(tq, current)) + (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); + return (rc); } EXPORT_SYMBOL(taskq_dispatch_delay); @@ -626,6 +641,8 @@ void taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, taskq_ent_t *t) { + boolean_t threadlimit = B_FALSE; + ASSERT(tq); ASSERT(func); @@ -661,7 +678,12 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, wake_up(&tq->tq_work_waitq); out: + threadlimit = (tq->tq_nactive == tq->tq_nthreads); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + /* Spawn additional taskq threads if required. */ + if (threadlimit && taskq_member(tq, current)) + (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); } EXPORT_SYMBOL(taskq_dispatch_ent); From 801b56090b42763d1d3b2593bb8d731d0d8fef22 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 31 Aug 2015 17:00:17 -0700 Subject: [PATCH 0905/1062] Revert "Create a new thread during recursive taskq dispatch if necessary" This reverts commit 076821e due to a locking issue uncovered in subsequent testing. An ASSERT is hit due to tq->tq_nspawn being updated outside the lock. The patch will need to be reworked. VERIFY3(0 == tq->tq_nspawn) failed (0 == -1) Signed-off-by: Brian Behlendorf Issue #472 --- module/spl/spl-taskq.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 2202aced7..7a756af37 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -53,7 +53,6 @@ EXPORT_SYMBOL(system_taskq); /* Private dedicated taskq for creating new taskq threads on demand. */ static taskq_t *dynamic_taskq; static taskq_thread_t *taskq_thread_create(taskq_t *); -static int taskq_thread_spawn(taskq_t *tq, int seq_tasks); static int task_km_flags(uint_t flags) @@ -534,7 +533,6 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { taskq_ent_t *t; taskqid_t rc = 0; - boolean_t threadlimit = B_FALSE; ASSERT(tq); ASSERT(func); @@ -576,13 +574,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: - threadlimit = (tq->tq_nactive == tq->tq_nthreads); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - /* Spawn additional taskq threads if required. */ - if (threadlimit && taskq_member(tq, current)) - (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); - return (rc); } EXPORT_SYMBOL(taskq_dispatch); @@ -593,7 +585,6 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, { taskqid_t rc = 0; taskq_ent_t *t; - boolean_t threadlimit = B_FALSE; ASSERT(tq); ASSERT(func); @@ -626,13 +617,7 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, spin_unlock(&t->tqent_lock); out: - threadlimit = (tq->tq_nactive == tq->tq_nthreads); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - /* Spawn additional taskq threads if required. */ - if (threadlimit && taskq_member(tq, current)) - (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); - return (rc); } EXPORT_SYMBOL(taskq_dispatch_delay); @@ -641,8 +626,6 @@ void taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, taskq_ent_t *t) { - boolean_t threadlimit = B_FALSE; - ASSERT(tq); ASSERT(func); @@ -678,12 +661,7 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, wake_up(&tq->tq_work_waitq); out: - threadlimit = (tq->tq_nactive == tq->tq_nthreads); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - /* Spawn additional taskq threads if required. */ - if (threadlimit && taskq_member(tq, current)) - (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); } EXPORT_SYMBOL(taskq_dispatch_ent); From a64e55752f4e88dcb544f2480100dcd6f6be3277 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Thu, 27 Aug 2015 11:13:20 -0500 Subject: [PATCH 0906/1062] Create a new thread during recursive taskq dispatch if necessary When dynamic taskq is enabled and all threads for a taskq are occupied, a recursive dispatch can cause a deadlock if calling thread depends on the recursively-dispatched thread for its return condition. This patch attempts to create a new thread for recursive dispatch when none are available. Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #472 --- module/spl/spl-taskq.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 7a756af37..82e71a388 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -448,8 +448,8 @@ taskq_wait(taskq_t *tq) } EXPORT_SYMBOL(taskq_wait); -int -taskq_member(taskq_t *tq, void *t) +static int +taskq_member_impl(taskq_t *tq, void *t) { struct list_head *l; taskq_thread_t *tqt; @@ -457,8 +457,8 @@ taskq_member(taskq_t *tq, void *t) ASSERT(tq); ASSERT(t); + ASSERT(spin_is_locked(&tq->tq_lock)); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); list_for_each(l, &tq->tq_thread_list) { tqt = list_entry(l, taskq_thread_t, tqt_thread_list); if (tqt->tqt_thread == (struct task_struct *)t) { @@ -466,6 +466,16 @@ taskq_member(taskq_t *tq, void *t) break; } } + return (found); +} + +int +taskq_member(taskq_t *tq, void *t) +{ + int found; + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + found = taskq_member_impl(tq, t); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); return (found); @@ -528,6 +538,8 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) } EXPORT_SYMBOL(taskq_cancel_id); +static int taskq_thread_spawn(taskq_t *tq, int seq_tasks); + taskqid_t taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { @@ -574,6 +586,11 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: + /* Spawn additional taskq threads if required. */ + if (tq->tq_nactive == tq->tq_nthreads && + taskq_member_impl(tq, current)) + (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); return (rc); } @@ -617,6 +634,10 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, spin_unlock(&t->tqent_lock); out: + /* Spawn additional taskq threads if required. */ + if (tq->tq_nactive == tq->tq_nthreads && + taskq_member_impl(tq, current)) + (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); return (rc); } @@ -661,6 +682,10 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, wake_up(&tq->tq_work_waitq); out: + /* Spawn additional taskq threads if required. */ + if (tq->tq_nactive == tq->tq_nthreads && + taskq_member_impl(tq, current)) + (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); } EXPORT_SYMBOL(taskq_dispatch_ent); From 4fa4cab972899ecf6266c23986159a109dbcac5b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Sep 2015 09:17:24 -0700 Subject: [PATCH 0907/1062] Linux 4.2 compat: misc_deregister() The misc_deregister() function was changed to a void return type. Rather than add compatibility code to detect this change simply ignore the return code on all kernels. It was only used to log an informational error message of no real value. Signed-off-by: Brian Behlendorf --- module/splat/splat-ctl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 4b9bcb3f0..4d4148d42 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -638,11 +638,7 @@ splat_init(void) static void __exit splat_fini(void) { - int error; - - error = misc_deregister(&splat_misc); - if (error) - printk(KERN_INFO "SPLAT: misc_deregister() failed %d\n", error); + misc_deregister(&splat_misc); SPLAT_SUBSYSTEM_FINI(linux); SPLAT_SUBSYSTEM_FINI(zlib); From d4bf6d8429371634b0c6bcc14b5868d849b7c07d Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 7 Sep 2015 12:35:21 -0400 Subject: [PATCH 0908/1062] Disable direct reclaim in taskq worker threads on Linux 3.9+ Illumos does not have direct reclaim and code run inside taskq worker threads is not designed to deal with it. Allowing direct reclaim inside a worker thread can therefore deadlock. We set PF_MEMALLOC_NOIO through memalloc_noio_save() to indicate to the kernel's reclaim code that we are inside a context where memory allocations cannot be allowed to block on filesystem activity. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#1274 Issue zfsonlinux/zfs#2390 Closes #474 --- module/spl/spl-taskq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 82e71a388..f6ef56251 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -817,6 +817,10 @@ taskq_thread(void *args) tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; + #if defined(PF_MEMALLOC_NOIO) + (void) memalloc_noio_save(); + #endif + sigfillset(&blocked); sigprocmask(SIG_BLOCK, &blocked, NULL); flush_signals(current); From f17d005bcc9b7edeb15b10bf947379a504b2d9f7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Sep 2015 15:22:31 -0700 Subject: [PATCH 0909/1062] Tag spl-0.6.5 META file and release log updated. Signed-off-by: Brian Behlendorf --- META | 2 +- rpm/generic/spl-kmod.spec.in | 3 +++ rpm/generic/spl.spec.in | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/META b/META index 96d11b6e8..dd8c409a8 100644 --- a/META +++ b/META @@ -1,7 +1,7 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.6.4 +Version: 0.6.5 Release: 1 Release-Tags: relext License: GPL diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 8f1f2321c..6cac9c5a4 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -160,6 +160,9 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog +* Thu Sep 10 2015 Brian Behlendorf - 0.6.5-1 +- Released 0.6.5-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5 * Wed Apr 8 2015 Brian Behlendorf - 0.6.4-1 - Released 0.6.4-1 * Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 81f30e025..48eafe670 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -38,6 +38,9 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog +* Thu Sep 10 2015 Brian Behlendorf - 0.6.5-1 +- Released 0.6.5-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5 * Wed Apr 8 2015 Brian Behlendorf - 0.6.4-1 - Released 0.6.4-1 * Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 From 2ebe396046c99ea191a51f24658273fd860b88c4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 28 Sep 2015 09:08:11 -0700 Subject: [PATCH 0910/1062] Fix PAX Patch/Grsec SLAB_USERCOPY panic Support grsecurity/PaX kernel configurations where CONFIG_PAX_USERCOPY_SLABS are enabled. When this kernel option is enabled slabs which are used to copy between user and kernel space must be created with SLAB_USERCOPY. Stock Linux kernels do not have a SLAB_USERCOPY definition so this causes no change in behavior for non-PAX-enabled kernels. Verified-by: Wuffleton Signed-off-by: Brian Behlendorf Issue #2977 Issue #3796 --- module/spl/spl-kmem-cache.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index a83c9f3ae..a7f9ca3a5 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -986,13 +986,23 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, if (rc) goto out; } else { + unsigned long slabflags = 0; + if (size > (SPL_MAX_KMEM_ORDER_NR_PAGES * PAGE_SIZE)) { rc = EINVAL; goto out; } +#if defined(SLAB_USERCOPY) + /* + * Required for PAX-enabled kernels if the slab is to be + * used for coping between user and kernel space. + */ + slabflags |= SLAB_USERCOPY; +#endif + skc->skc_linux_cache = kmem_cache_create( - skc->skc_name, size, align, 0, NULL); + skc->skc_name, size, align, slabflags, NULL); if (skc->skc_linux_cache == NULL) { rc = ENOMEM; goto out; From 3e1e4c735c4452c137443d7e7dfbe75447dc8e00 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 30 Sep 2015 09:26:21 -0700 Subject: [PATCH 0911/1062] Fix spl-dkms uninstall/update Modern versions of dkms cleanup the build directory after installing. This resulted in 'dkms uninstall' never running because the check added by commit 4cdcdbf which verifies the existence of the spl.release build product would never be true. This patch resolves the issue by updating the conditional to check in the explicitly installed spl_config.h file for the version. Signed-off-by: Brian Behlendorf Closes #478 --- rpm/generic/spl-dkms.spec.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index 6d8e058cb..ac0ddd369 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -62,12 +62,13 @@ echo -e "support or upgrade DKMS to a more current version." exit 1 %preun -# Only remove the modules if they are for this %{version}-%{release}. A -# package upgrade can replace them if only the %{release} is changed. -RELEASE="/var/lib/dkms/%{module}/%{version}/build/%{module}.release" -if [ -f $RELEASE ] && [ `cat $RELEASE`%{?dist} = "%{version}-%{release}" ]; then +CONFIG_H="/var/lib/dkms/%{module}/%{version}/*/*/%{module}_config.h" +SPEC_META_ALIAS="@PACKAGE@-@VERSION@-@RELEASE@" +DKMS_META_ALIAS=`cat $CONFIG_H 2>/dev/null | + awk -F'"' '/META_ALIAS/ { print $2; exit 0 }'` +if [ "$SPEC_META_ALIAS" = "$DKMS_META_ALIAS" ]; then echo -e - echo -e "Uninstall of %{module} module (version %{version}) beginning:" + echo -e "Uninstall of %{module} module ($SPEC_META_ALIAS) beginning:" dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade fi exit 0 From 4f8e643afe9d8cc558566e1dda05ef597cb2526e Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 1 Sep 2015 21:55:06 +0800 Subject: [PATCH 0912/1062] Don't take spin lock on rwlock owner The spin lock around rw_owner is completely unnecessary. The reason is that it is only modified in the down_write context. If you race against another thread modifying it, that means that you aren't holding the rwlock, so taking the spin lock don't eliminate the race. Also, we only check rw_owner in RW_WRITE_HELD because spl_rwsem_is_locked is unnecessary and might need to take spin lock. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue #473 --- include/sys/rwlock.h | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 7064e8f1f..62544f3a8 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -50,34 +50,19 @@ typedef struct { static inline void spl_rw_set_owner(krwlock_t *rwp) { - unsigned long flags; - - spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rwp->rw_owner = current; - spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + rwp->rw_owner = current; } static inline void spl_rw_clear_owner(krwlock_t *rwp) { - unsigned long flags; - - spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, flags); - rwp->rw_owner = NULL; - spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); + rwp->rw_owner = NULL; } static inline kthread_t * rw_owner(krwlock_t *rwp) { - unsigned long flags; - kthread_t *owner; - - spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, flags); - owner = rwp->rw_owner; - spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, flags); - - return owner; + return rwp->rw_owner; } static inline int @@ -89,7 +74,7 @@ RW_READ_HELD(krwlock_t *rwp) static inline int RW_WRITE_HELD(krwlock_t *rwp) { - return (spl_rwsem_is_locked(SEM(rwp)) && rw_owner(rwp) == current); + return (rw_owner(rwp) == current); } static inline int From a00b3eb58fbcedf29c7426cc1300549d6b72b52c Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 1 Sep 2015 23:28:02 +0800 Subject: [PATCH 0913/1062] rwsem use kernel provided owner when possible If CONFIG_RWSEM_SPIN_ON_OWNER is defined, rw_semaphore will have an owner field, so we don't need our own. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue #473 --- include/sys/rwlock.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 62544f3a8..a3350b138 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -40,29 +40,47 @@ typedef enum { RW_READER = 2 } krw_t; +/* + * If CONFIG_RWSEM_SPIN_ON_OWNER is defined, rw_semaphore will have an owner + * field, so we don't need our own. + */ typedef struct { struct rw_semaphore rw_rwlock; +#ifndef CONFIG_RWSEM_SPIN_ON_OWNER kthread_t *rw_owner; +#endif } krwlock_t; -#define SEM(rwp) ((struct rw_semaphore *)(rwp)) +#define SEM(rwp) (&(rwp)->rw_rwlock) static inline void spl_rw_set_owner(krwlock_t *rwp) { +/* + * If CONFIG_RWSEM_SPIN_ON_OWNER is defined, down_write, up_write, + * downgrade_write and __init_rwsem will set/clear owner for us. + */ +#ifndef CONFIG_RWSEM_SPIN_ON_OWNER rwp->rw_owner = current; +#endif } static inline void spl_rw_clear_owner(krwlock_t *rwp) { +#ifndef CONFIG_RWSEM_SPIN_ON_OWNER rwp->rw_owner = NULL; +#endif } static inline kthread_t * rw_owner(krwlock_t *rwp) { +#ifdef CONFIG_RWSEM_SPIN_ON_OWNER + return SEM(rwp)->owner; +#else return rwp->rw_owner; +#endif } static inline int @@ -153,6 +171,9 @@ RW_LOCK_HELD(krwlock_t *rwp) }) #if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) +#ifdef CONFIG_RWSEM_SPIN_ON_OWNER +#error spinlock rwsem should not have spin on owner +#endif /* * For the generic implementations of rw-semaphores the following is * true. If your semaphore implementation internally represents the From 374303a3c9f7783e2b8122f5dcf2c1d053cf13f7 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 2 Sep 2015 00:02:55 +0800 Subject: [PATCH 0914/1062] Use tab indent in rwlock.h Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue #473 --- include/sys/rwlock.h | 146 +++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index a3350b138..6f7d611b6 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -30,14 +30,14 @@ #include typedef enum { - RW_DRIVER = 2, - RW_DEFAULT = 4 + RW_DRIVER = 2, + RW_DEFAULT = 4 } krw_type_t; typedef enum { - RW_NONE = 0, - RW_WRITER = 1, - RW_READER = 2 + RW_NONE = 0, + RW_WRITER = 1, + RW_READER = 2 } krw_t; /* @@ -45,9 +45,9 @@ typedef enum { * field, so we don't need our own. */ typedef struct { - struct rw_semaphore rw_rwlock; + struct rw_semaphore rw_rwlock; #ifndef CONFIG_RWSEM_SPIN_ON_OWNER - kthread_t *rw_owner; + kthread_t *rw_owner; #endif } krwlock_t; @@ -107,67 +107,67 @@ RW_LOCK_HELD(krwlock_t *rwp) * will be correctly located in the users code which is important * for the built in kernel lock analysis tools */ -#define rw_init(rwp, name, type, arg) \ -({ \ - static struct lock_class_key __key; \ - \ - __init_rwsem(SEM(rwp), #rwp, &__key); \ - spl_rw_clear_owner(rwp); \ +#define rw_init(rwp, name, type, arg) \ +({ \ + static struct lock_class_key __key; \ + \ + __init_rwsem(SEM(rwp), #rwp, &__key); \ + spl_rw_clear_owner(rwp); \ }) -#define rw_destroy(rwp) \ -({ \ - VERIFY(!RW_LOCK_HELD(rwp)); \ +#define rw_destroy(rwp) \ +({ \ + VERIFY(!RW_LOCK_HELD(rwp)); \ }) -#define rw_tryenter(rwp, rw) \ -({ \ - int _rc_ = 0; \ - \ - switch (rw) { \ - case RW_READER: \ - _rc_ = down_read_trylock(SEM(rwp)); \ - break; \ - case RW_WRITER: \ - if ((_rc_ = down_write_trylock(SEM(rwp)))) \ - spl_rw_set_owner(rwp); \ - break; \ - default: \ - VERIFY(0); \ - } \ - _rc_; \ +#define rw_tryenter(rwp, rw) \ +({ \ + int _rc_ = 0; \ + \ + switch (rw) { \ + case RW_READER: \ + _rc_ = down_read_trylock(SEM(rwp)); \ + break; \ + case RW_WRITER: \ + if ((_rc_ = down_write_trylock(SEM(rwp)))) \ + spl_rw_set_owner(rwp); \ + break; \ + default: \ + VERIFY(0); \ + } \ + _rc_; \ }) -#define rw_enter(rwp, rw) \ -({ \ - switch (rw) { \ - case RW_READER: \ - down_read(SEM(rwp)); \ - break; \ - case RW_WRITER: \ - down_write(SEM(rwp)); \ - spl_rw_set_owner(rwp); \ - break; \ - default: \ - VERIFY(0); \ - } \ +#define rw_enter(rwp, rw) \ +({ \ + switch (rw) { \ + case RW_READER: \ + down_read(SEM(rwp)); \ + break; \ + case RW_WRITER: \ + down_write(SEM(rwp)); \ + spl_rw_set_owner(rwp); \ + break; \ + default: \ + VERIFY(0); \ + } \ }) -#define rw_exit(rwp) \ -({ \ - if (RW_WRITE_HELD(rwp)) { \ - spl_rw_clear_owner(rwp); \ - up_write(SEM(rwp)); \ - } else { \ - ASSERT(RW_READ_HELD(rwp)); \ - up_read(SEM(rwp)); \ - } \ +#define rw_exit(rwp) \ +({ \ + if (RW_WRITE_HELD(rwp)) { \ + spl_rw_clear_owner(rwp); \ + up_write(SEM(rwp)); \ + } else { \ + ASSERT(RW_READ_HELD(rwp)); \ + up_read(SEM(rwp)); \ + } \ }) -#define rw_downgrade(rwp) \ -({ \ - spl_rw_clear_owner(rwp); \ - downgrade_write(SEM(rwp)); \ +#define rw_downgrade(rwp) \ +({ \ + spl_rw_clear_owner(rwp); \ + downgrade_write(SEM(rwp)); \ }) #if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) @@ -186,20 +186,20 @@ RW_LOCK_HELD(krwlock_t *rwp) extern void __up_read_locked(struct rw_semaphore *); extern int __down_write_trylock_locked(struct rw_semaphore *); -#define rw_tryupgrade(rwp) \ -({ \ - unsigned long _flags_; \ - int _rc_ = 0; \ - \ - spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ - if ((list_empty(&SEM(rwp)->wait_list)) && \ - (SEM(rwp)->activity == 1)) { \ - __up_read_locked(SEM(rwp)); \ - VERIFY(_rc_ = __down_write_trylock_locked(SEM(rwp))); \ - (rwp)->rw_owner = current; \ - } \ - spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ - _rc_; \ +#define rw_tryupgrade(rwp) \ +({ \ + unsigned long _flags_; \ + int _rc_ = 0; \ + \ + spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ + if ((list_empty(&SEM(rwp)->wait_list)) && \ + (SEM(rwp)->activity == 1)) { \ + __up_read_locked(SEM(rwp)); \ + VERIFY(_rc_ = __down_write_trylock_locked(SEM(rwp))); \ + (rwp)->rw_owner = current; \ + } \ + spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ + _rc_; \ }) #else /* @@ -209,7 +209,7 @@ extern int __down_write_trylock_locked(struct rw_semaphore *); * rwsem would be safe. For now that's not worth the trouble so in this * case rw_tryupgrade() has just been disabled. */ -#define rw_tryupgrade(rwp) ({ 0; }) +#define rw_tryupgrade(rwp) ({ 0; }) #endif int spl_rw_init(void); From 9b13f65d284d3a6b455df3199ffc83fd18bbdded Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 12 Oct 2015 12:31:05 -0700 Subject: [PATCH 0915/1062] Fix CPU hotplug Allocate a kmem cache magazine for every possible CPU which might be added to the system. This ensures that when one of these CPUs is enabled it can be safely used immediately. For many systems the number of online CPUs is identical to the number of present CPUs so this does imply an increased memory footprint. In fact, dynamically allocating the array of magazine pointers instead of using the worst case NR_CPUS can end up decreasing our memory footprint. Signed-off-by: Brian Behlendorf Signed-off-by: Ned Bass Closes #482 --- include/sys/kmem_cache.h | 2 +- module/spl/spl-kmem-cache.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h index 75a0a55b7..e971c2b0d 100644 --- a/include/sys/kmem_cache.h +++ b/include/sys/kmem_cache.h @@ -170,7 +170,7 @@ typedef struct spl_kmem_cache { uint32_t skc_magic; /* Sanity magic */ uint32_t skc_name_size; /* Name length */ char *skc_name; /* Name string */ - spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */ + spl_kmem_magazine_t **skc_mag; /* Per-CPU warm cache */ uint32_t skc_mag_size; /* Magazine size */ uint32_t skc_mag_refill; /* Magazine refill count */ spl_kmem_ctor_t skc_ctor; /* Constructor */ diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index a7f9ca3a5..5a8493fe4 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -805,15 +805,18 @@ spl_magazine_create(spl_kmem_cache_t *skc) if (skc->skc_flags & KMC_NOMAGAZINE) return (0); + skc->skc_mag = kzalloc(sizeof (spl_kmem_magazine_t *) * + num_possible_cpus(), kmem_flags_convert(KM_SLEEP)); skc->skc_mag_size = spl_magazine_size(skc); skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2; - for_each_online_cpu(i) { + for_each_possible_cpu(i) { skc->skc_mag[i] = spl_magazine_alloc(skc, i); if (!skc->skc_mag[i]) { for (i--; i >= 0; i--) spl_magazine_free(skc->skc_mag[i]); + kfree(skc->skc_mag); return (-ENOMEM); } } @@ -833,11 +836,13 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) if (skc->skc_flags & KMC_NOMAGAZINE) return; - for_each_online_cpu(i) { + for_each_possible_cpu(i) { skm = skc->skc_mag[i]; spl_cache_flush(skc, skm, skm->skm_avail); spl_magazine_free(skm); } + + kfree(skc->skc_mag); } /* @@ -880,12 +885,6 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, might_sleep(); - /* - * Allocate memory for a new cache and initialize it. Unfortunately, - * this usually ends up being a large allocation of ~32k because - * we need to allocate enough memory for the worst case number of - * cpus in the magazine, skc_mag[NR_CPUS]. - */ skc = kzalloc(sizeof (*skc), lflags); if (skc == NULL) return (NULL); From 3e7e6f34d0b39b210de68fd69a0c08c6d21227a5 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 23 Oct 2015 17:17:57 -0700 Subject: [PATCH 0916/1062] Don't call kmem_cache_shrink from shrinker Linux slab will automatically free empty slab when number of partial slab is over min_partial, so we don't need to explicitly shrink it. In fact, calling kmem_cache_shrink from shrinker will cause heavy contention on kmem_cache_node->list_lock, to the point that it might cause __slab_free to livelock (see zfsonlinux/zfs#3936) Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#3936 Closes #487 --- module/spl/spl-kmem-cache.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 5a8493fe4..2b4ac4afc 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1634,16 +1634,11 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count) atomic_inc(&skc->skc_ref); /* - * Execute the registered reclaim callback if it exists. The - * per-cpu caches will be drained when is set KMC_EXPIRE_MEM. + * Execute the registered reclaim callback if it exists. */ if (skc->skc_flags & KMC_SLAB) { if (skc->skc_reclaim) skc->skc_reclaim(skc->skc_private); - - if (spl_kmem_cache_expire & KMC_EXPIRE_MEM) - kmem_cache_shrink(skc->skc_linux_cache); - goto out; } From f5f2b87df0362242b13b8183a2a8d88be63b0e73 Mon Sep 17 00:00:00 2001 From: tuxoko Date: Fri, 6 Nov 2015 15:00:55 -0800 Subject: [PATCH 0917/1062] Fix taskq dynamic spawning Currently taskq_dispatch() will spawn new task with a condition that the caller is also a member of the taskq. However, under this condition, it will still cause deadlock where a task on tq1 is waiting another thread, who is trying to dispatch a task on tq1. So this patch removes the check. For example when you do: zfs send pp/fs0@001 | zfs recv pp/fs0_copy This will easily deadlock before this patch. Also, move the seq_task check from taskq_thread_spawn() to taskq_thread() because it's not used by the caller from taskq_dispatch(). Signed-off-by: Chunwei Chen Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #496 --- module/spl/spl-taskq.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index f6ef56251..2c2e3ad46 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -538,7 +538,7 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) } EXPORT_SYMBOL(taskq_cancel_id); -static int taskq_thread_spawn(taskq_t *tq, int seq_tasks); +static int taskq_thread_spawn(taskq_t *tq); taskqid_t taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) @@ -587,9 +587,8 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: /* Spawn additional taskq threads if required. */ - if (tq->tq_nactive == tq->tq_nthreads && - taskq_member_impl(tq, current)) - (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); + if (tq->tq_nactive == tq->tq_nthreads) + (void) taskq_thread_spawn(tq); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); return (rc); @@ -635,9 +634,8 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, spin_unlock(&t->tqent_lock); out: /* Spawn additional taskq threads if required. */ - if (tq->tq_nactive == tq->tq_nthreads && - taskq_member_impl(tq, current)) - (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); + if (tq->tq_nactive == tq->tq_nthreads) + (void) taskq_thread_spawn(tq); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); return (rc); } @@ -683,9 +681,8 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, wake_up(&tq->tq_work_waitq); out: /* Spawn additional taskq threads if required. */ - if (tq->tq_nactive == tq->tq_nthreads && - taskq_member_impl(tq, current)) - (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1); + if (tq->tq_nactive == tq->tq_nthreads) + (void) taskq_thread_spawn(tq); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); } EXPORT_SYMBOL(taskq_dispatch_ent); @@ -756,15 +753,14 @@ taskq_thread_spawn_task(void *arg) * which is also a dynamic taskq cannot be safely used for this. */ static int -taskq_thread_spawn(taskq_t *tq, int seq_tasks) +taskq_thread_spawn(taskq_t *tq) { int spawning = 0; if (!(tq->tq_flags & TASKQ_DYNAMIC)) return (0); - if ((seq_tasks > spl_taskq_thread_sequential) && - (tq->tq_nthreads + tq->tq_nspawn < tq->tq_maxthreads) && + if ((tq->tq_nthreads + tq->tq_nspawn < tq->tq_maxthreads) && (tq->tq_flags & TASKQ_ACTIVE)) { spawning = (++tq->tq_nspawn); taskq_dispatch(dynamic_taskq, taskq_thread_spawn_task, @@ -898,7 +894,8 @@ taskq_thread(void *args) } /* Spawn additional taskq threads if required. */ - if (taskq_thread_spawn(tq, ++seq_tasks)) + if ((++seq_tasks) > spl_taskq_thread_sequential && + taskq_thread_spawn(tq)) seq_tasks = 0; tqt->tqt_id = 0; From 8fc851b7b5315c9cae92557be6c32e1ee236201f Mon Sep 17 00:00:00 2001 From: Jason Zaman Date: Sat, 24 Oct 2015 14:15:58 +0800 Subject: [PATCH 0918/1062] sysmacros: Make P2ROUNDUP not trigger int overflow The original P2ROUNDUP and P2ROUNDUP_TYPED macros contain -x which triggers PaX's integer overflow detection for unsigned integers. Replace the macros with an equivalent version that does not trigger the overflow. Axioms: A. (-(x)) === (~((x) - 1)) === (~(x) + 1) under two's complement. B. ~(x & y) === ((~(x)) | (~(y))) under De Morgan's law. C. ~(~x) === x under the law of excluded middle. Proof: 0. (-(-(x) & -(align))) original 1. (~(-(x) & -(align)) + 1) by A 2. (((~(-(x))) | (~(-(align)))) + 1) by B 3. (((~(~((x) - 1))) | (~(~((align) - 1)))) + 1) by A 4. (((((x) - 1)) | (((align) - 1))) + 1) by C Q.E.D. Signed-off-by: Jason Zaman Reviewed-by: Chris Dunlop Reviewed-by: Richard Yao Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#2505 Closes #488 --- include/sys/sysmacros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 4dc7cd858..4a96e075f 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -186,7 +186,7 @@ extern void spl_cleanup(void); */ #define P2ALIGN(x, align) ((x) & -(align)) #define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) -#define P2ROUNDUP(x, align) (-(-(x) & -(align))) +#define P2ROUNDUP(x, align) ((((x) - 1) | ((align) - 1)) + 1) #define P2PHASE(x, align) ((x) & ((align) - 1)) #define P2NPHASE(x, align) (-(x) & ((align) - 1)) #define ISP2(x) (((x) & ((x) - 1)) == 0) @@ -213,7 +213,7 @@ extern void spl_cleanup(void); #define P2NPHASE_TYPED(x, align, type) \ (-(type)(x) & ((type)(align) - 1)) #define P2ROUNDUP_TYPED(x, align, type) \ - (-(-(type)(x) & -(type)(align))) + ((((type)(x) - 1) | ((type)(align) - 1)) + 1) #define P2END_TYPED(x, align, type) \ (-(~(type)(x) & -(type)(align))) #define P2PHASEUP_TYPED(x, align, phase, type) \ From 31f24932a4052c1802f56e44b8e5194f4e7910ab Mon Sep 17 00:00:00 2001 From: loli10K Date: Fri, 13 Nov 2015 20:00:05 +0100 Subject: [PATCH 0919/1062] Remove superfluous `newline` character Remove superfluous `newline` character from spl_kmem_cache_magazine_size module parameter description. Signed-off-by: loli10K Signed-off-by: Brian Behlendorf Closes #499 --- module/spl/spl-kmem-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 2b4ac4afc..dea4053b2 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -87,7 +87,7 @@ MODULE_PARM_DESC(spl_kmem_cache_expire, "By age (0x1) or low memory (0x2)"); unsigned int spl_kmem_cache_magazine_size = 0; module_param(spl_kmem_cache_magazine_size, uint, 0444); MODULE_PARM_DESC(spl_kmem_cache_magazine_size, - "Default magazine size (2-256), set automatically (0)\n"); + "Default magazine size (2-256), set automatically (0)"); /* * The default behavior is to report the number of objects remaining in the From e7b75d9b46fcfea149bf7fd1f53d40379e3c7b5d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 16 Nov 2015 14:45:42 -0800 Subject: [PATCH 0920/1062] Limit maximum object size in kmem tests Limit the maximum object size to 1/128 of total system memory for the kmem cache tests. Large values can result in out of memory errors for systems with less the 512M of memory. Additionally, use the known number of objects per-slab for calculating the number of objects to use for a test. Signed-off-by: Brian Behlendorf --- module/splat/splat-kmem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index b3fd1a84d..288112278 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -590,6 +590,9 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, kmem_cache_data_t **kcd = NULL; int i, rc = 0, objs = 0; + /* Limit size for low memory machines (1/128 of memory) */ + size = MIN(size, (physmem * PAGE_SIZE) >> 7); + splat_vprint(file, name, "Testing size=%d, align=%d, flags=0x%04x\n", size, align, flags); @@ -619,7 +622,7 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, * it to a single slab for the purposes of this test. */ #ifdef _LP64 - objs = SPL_KMEM_CACHE_OBJ_PER_SLAB * 4; + objs = kcp->kcp_cache->skc_slab_objs * 4; #else objs = 1; #endif From 4e6f996cdd6e2cf6f1935ccdc35609c7d850ab98 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 1 Dec 2015 18:18:14 -0800 Subject: [PATCH 0921/1062] Fix --enable-linux-builtin Adding VPATH support, commit 37d7cd9, required that a `src` and `obj` line be added to the top of the Makefiles. They must be removed from the Makefiles when builtin. The code which adds the `spl/` directory to the top level Makefile was failing due to the addition of the `certs/` path. The search pattern has been adjusted to be more tolerant. Signed-off-by: Brian Behlendorf Issue #481 Issue #498 --- copy-builtin | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/copy-builtin b/copy-builtin index cd98b7a86..aa4307386 100755 --- a/copy-builtin +++ b/copy-builtin @@ -56,6 +56,8 @@ adjust_obj_paths() for MODULE in "${MODULES[@]}" do adjust_obj_paths "$KERNEL_DIR/spl/$MODULE/Makefile" + sed -i.bak '/obj =/d' "$KERNEL_DIR/spl/$MODULE/Makefile" + sed -i.bak '/src =/d' "$KERNEL_DIR/spl/$MODULE/Makefile" done cat > "$KERNEL_DIR/spl/Kconfig" <<"EOF" @@ -112,8 +114,9 @@ add_after() } add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"' -# We must take care to build SPL before ZFS, else module initialization order will be wrong -sed -i 's#kernel/ mm/ fs/#kernel/ mm/ spl/ fs/#' "$KERNEL_DIR/Makefile" +# We must take care to build SPL before ZFS, otherwise the symbols required +# to link ZFS will not be available. +sed -i 's#+= kernel/#+= kernel/ spl/#' "$KERNEL_DIR/Makefile" echo >&2 echo " $0: done." >&2 From 9f456111ab761a25191db16eabca6ed4cb6bb615 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 25 Nov 2015 13:35:22 +0000 Subject: [PATCH 0922/1062] spl-kmem-cache: include linux/prefetch.h for prefetchw() This is needed for architectures that do not have a builtin prefetchw() Signed-off-by: Dimitri John Ledkov Signed-off-by: Brian Behlendorf Closes #502 --- module/spl/spl-kmem-cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index dea4053b2..846d24300 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -31,6 +31,7 @@ #include #include #include +#include /* * Within the scope of spl-kmem.c file the kmem_cache_* definitions From e5f9a9afd27ce78ee9c08c24f63ad48dfc9ea8de Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Fri, 24 Jul 2015 15:36:59 -0500 Subject: [PATCH 0923/1062] Additional dkio support for TRIM/Discard Replace DKIOCTRIM with DKIOCFREE and add additional support required for Nextenta's TRIM support. Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #469 --- include/sys/Makefile.am | 1 + include/sys/dkio.h | 18 ++++++------ include/sys/dkioc_free_util.h | 54 +++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 include/sys/dkioc_free_util.h diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 73c4a8421..a16bd6ce6 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -29,6 +29,7 @@ KERNEL_H = \ $(top_srcdir)/include/sys/dirent.h \ $(top_srcdir)/include/sys/disp.h \ $(top_srcdir)/include/sys/dkio.h \ + $(top_srcdir)/include/sys/dkioc_free_util.h \ $(top_srcdir)/include/sys/dklabel.h \ $(top_srcdir)/include/sys/dnlc.h \ $(top_srcdir)/include/sys/dumphdr.h \ diff --git a/include/sys/dkio.h b/include/sys/dkio.h index d8c700718..dd7a95f13 100644 --- a/include/sys/dkio.h +++ b/include/sys/dkio.h @@ -25,14 +25,16 @@ #ifndef _SPL_DKIO_H #define _SPL_DKIO_H -struct dk_callback { - void (*dkc_callback)(void *dkc_cookie, int error); - void *dkc_cookie; - int dkc_flag; -}; +#define DFL_SZ(num_exts) \ + (sizeof (dkioc_free_list_t) + (num_exts - 1) * 16) -#define DKIOC (0x04 << 8) -#define DKIOCFLUSHWRITECACHE (DKIOC | 34) -#define DKIOCTRIM (DKIOC | 35) +#define DKIOC (0x04 << 8) +#define DKIOCFLUSHWRITECACHE (DKIOC|34) /* flush cache to phys medium */ + +/* + * ioctl to free space (e.g. SCSI UNMAP) off a disk. + * Pass a dkioc_free_list_t containing a list of extents to be freed. + */ +#define DKIOCFREE (DKIOC|50) #endif /* _SPL_DKIO_H */ diff --git a/include/sys/dkioc_free_util.h b/include/sys/dkioc_free_util.h new file mode 100644 index 000000000..a424d4232 --- /dev/null +++ b/include/sys/dkioc_free_util.h @@ -0,0 +1,54 @@ +/*****************************************************************************\ + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . +\*****************************************************************************/ + +#ifndef _SPL_DKIOC_UTIL_H +#define _SPL_DKIOC_UTIL_H + +#include + +typedef struct dkioc_free_list_ext_s { + uint64_t dfle_start; + uint64_t dfle_length; +} dkioc_free_list_ext_t; + +typedef struct dkioc_free_list_s { + uint64_t dfl_flags; + uint64_t dfl_num_exts; + int64_t dfl_offset; + + /* + * N.B. this is only an internal debugging API! This is only called + * from debug builds of sd for pre-release checking. Remove before GA! + */ + void (*dfl_ck_func)(uint64_t, uint64_t, void *); + void *dfl_ck_arg; + + dkioc_free_list_ext_t dfl_exts[1]; +} dkioc_free_list_t; + +static inline void dfl_free(dkioc_free_list_t *dfl) { + kmem_free(dfl, DFL_SZ(dfl->dfl_num_exts)); +} + +#endif /* _SPL_DKIOC_UTIL_H */ From 5578f58bdc65d8a2d49b34be21f979bd1fcb0093 Mon Sep 17 00:00:00 2001 From: Boris Protopopov Date: Tue, 30 Jun 2015 17:47:15 -0400 Subject: [PATCH 0924/1062] Add a script to display SPL slab cache statistics Useful when looking for the info on ZFS/SPL related memory consumption. Signed-off-by: Boris Protopopov Signed-off-by: Brian Behlendorf Closes #460 --- cmd/Makefile.am | 12 +-- cmd/splat/Makefile.am | 11 +++ cmd/{ => splat}/splat.c | 0 cmd/{ => splat}/splat.h | 0 cmd/splslab/Makefile.am | 2 + cmd/splslab/splslab.py | 202 ++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 + rpm/generic/spl.spec.in | 1 + 8 files changed, 219 insertions(+), 11 deletions(-) create mode 100644 cmd/splat/Makefile.am rename cmd/{ => splat}/splat.c (100%) rename cmd/{ => splat}/splat.h (100%) create mode 100644 cmd/splslab/Makefile.am create mode 100755 cmd/splslab/splslab.py diff --git a/cmd/Makefile.am b/cmd/Makefile.am index 01afdcf25..63a3c76f9 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -1,11 +1 @@ -include $(top_srcdir)/config/Rules.am - -DEFAULT_INCLUDES += \ - -I$(top_srcdir)/lib - -sbin_PROGRAMS = splat - -splat_SOURCES = splat.c -splat_LDFLAGS = $(top_builddir)/lib/libcommon.la - -EXTRA_DIST = splat.h +SUBDIRS = splat splslab diff --git a/cmd/splat/Makefile.am b/cmd/splat/Makefile.am new file mode 100644 index 000000000..01afdcf25 --- /dev/null +++ b/cmd/splat/Makefile.am @@ -0,0 +1,11 @@ +include $(top_srcdir)/config/Rules.am + +DEFAULT_INCLUDES += \ + -I$(top_srcdir)/lib + +sbin_PROGRAMS = splat + +splat_SOURCES = splat.c +splat_LDFLAGS = $(top_builddir)/lib/libcommon.la + +EXTRA_DIST = splat.h diff --git a/cmd/splat.c b/cmd/splat/splat.c similarity index 100% rename from cmd/splat.c rename to cmd/splat/splat.c diff --git a/cmd/splat.h b/cmd/splat/splat.h similarity index 100% rename from cmd/splat.h rename to cmd/splat/splat.h diff --git a/cmd/splslab/Makefile.am b/cmd/splslab/Makefile.am new file mode 100644 index 000000000..b18d52d7e --- /dev/null +++ b/cmd/splslab/Makefile.am @@ -0,0 +1,2 @@ +bin_SCRIPTS = splslab.py +EXTRA_DIST = $(bin_SCRIPTS) diff --git a/cmd/splslab/splslab.py b/cmd/splslab/splslab.py new file mode 100755 index 000000000..160fb2776 --- /dev/null +++ b/cmd/splslab/splslab.py @@ -0,0 +1,202 @@ +#!/usr/bin/python + +import sys +import time +import getopt +import re +import signal +from collections import defaultdict + +class Stat: + # flag definitions based on the kmem.h + NOTOUCH = 1 + NODEBUG = 2 + KMEM = 32 + VMEM = 64 + SLAB = 128 + OFFSLAB = 256 + NOEMERGENCY = 512 + DEADLOCKED = 16384 + GROWING = 32768 + REAPING = 65536 + DESTROY = 131072 + + fdefs = { + NOTOUCH : "NTCH", + NODEBUG : "NDBG", + KMEM : "KMEM", + VMEM : "VMEM", + SLAB : "SLAB", + OFFSLAB : "OFSL", + NOEMERGENCY : "NEMG", + DEADLOCKED : "DDLK", + GROWING : "GROW", + REAPING : "REAP", + DESTROY : "DSTR" + } + + def __init__(self, name, flags, size, alloc, slabsize, objsize): + self._name = name + self._flags = self.f2str(flags) + self._size = size + self._alloc = alloc + self._slabsize = slabsize + self._objsize = objsize + + def f2str(self, flags): + fstring = '' + for k in Stat.fdefs.keys(): + if flags & k: + fstring = fstring + Stat.fdefs[k] + '|' + + fstring = fstring[:-1] + return fstring + +class CumulativeStat: + def __init__(self, skey="a"): + self._size = 0 + self._alloc = 0 + self._pct = 0 + self._skey = skey + self._regexp = \ + re.compile('(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+'); + self._stats = defaultdict(list) + + # Add another stat to the dictionary and re-calculate the totals + def add(self, s): + key = 0 + if self._skey == "a": + key = s._alloc + else: + key = s._size + self._stats[key].append(s) + self._size = self._size + s._size + self._alloc = self._alloc + s._alloc + if self._size: + self._pct = self._alloc * 100 / self._size + else: + self._pct = 0 + + # Parse the slab info in the procfs + # Calculate cumulative stats + def slab_update(self): + k = [line.strip() for line in open('/proc/spl/kmem/slab')] + + if not k: + sys.stderr.write("No SPL slab stats found\n") + sys.exit(1) + + del k[0:2] + + for s in k: + if not s: + continue + m = self._regexp.match(s) + if m: + self.add(Stat(m.group(1), int(m.group(2),16), int(m.group(3)), + int(m.group(4)), int(m.group(5)), int(m.group(6)))) + else: + sys.stderr.write("Error: unexpected input format\n" % s) + exit(-1) + + def show_header(self): + sys.stdout.write("\n%25s %20s %15s %15s %15s %15s\n\n" % \ + ("cache name", "flags", "size", "alloc", "slabsize", "objsize")) + + # Show up to the number of 'rows' of output sorted in descending order + # by the key specified earlier; if rows == 0, all rows are shown + def show(self, rows): + self.show_header() + i = 1 + done = False + for k in reversed(sorted(self._stats.keys())): + for s in self._stats[k]: + sys.stdout.write("%25s %20s %15d %15d %15d %15d\n" % \ + (s._name, s._flags, s._size, s._alloc, \ + s._slabsize, s._objsize)) + i = i + 1 + if rows != 0 and i > rows: + done = True + break + if done: + break + sys.stdout.write("%25s %36d %15d (%d%%)\n\n" % \ + ("Totals:", self._size, self._alloc, self._pct)) + +def usage(): + cmd = "Usage: splslab.py [-n|--num-rows] number [-s|--sort-by] " + \ + "[interval] [count]"; + sys.stderr.write("%s\n" % cmd) + sys.stderr.write("\t-h : print help\n") + sys.stderr.write("\t-n : --num-rows N : limit output to N top " + + "largest slabs (default: all)\n") + sys.stderr.write("\t-s : --sort-by key : sort output in descending " + + "order by total size (s)\n\t\tor allocated size (a) " + + "(default: a)\n") + sys.stderr.write("\tinterval : repeat every interval seconds\n") + sys.stderr.write("\tcount : output statistics count times and exit\n") + + +def main(): + + rows = 0 + count = 0 + skey = "a" + interval = 1 + + signal.signal(signal.SIGINT, signal.SIG_DFL) + + try: + opts, args = getopt.getopt( + sys.argv[1:], + "n:s:h", + [ + "num-rows", + "sort-by", + "help" + ] + ) + except getopt.error as e: + sys.stderr.write("Error: %s\n" % e.msg) + usage() + exit(-1) + + i = 1 + for opt, arg in opts: + if opt in ('-n', '--num-rows'): + rows = int(arg) + i = i + 2 + elif opt in ('-s', '--sort-by'): + if arg != "s" and arg != "a": + sys.stderr.write("Error: invalid sorting key \"%s\"\n" % arg) + usage() + exit(-1) + skey = arg + i = i + 2 + elif opt in ('-h', '--help'): + usage() + exit(0) + else: + break + + args = sys.argv[i:] + + interval = int(args[0]) if len(args) else interval + count = int(args[1]) if len(args) > 1 else count + + i = 0 + while True: + cs = CumulativeStat(skey) + cs.slab_update() + cs.show(rows) + + i = i + 1 + if count and i >= count: + break + + time.sleep(interval) + + return 0 + +if __name__ == '__main__': + main() diff --git a/configure.ac b/configure.ac index efeb243cb..70735ce2c 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,8 @@ AC_CONFIG_FILES([ man/man5/Makefile lib/Makefile cmd/Makefile + cmd/splat/Makefile + cmd/splslab/Makefile module/Makefile module/spl/Makefile module/splat/Makefile diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 48eafe670..43bbd98f4 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -33,6 +33,7 @@ make install DESTDIR=%{?buildroot} %files %doc AUTHORS COPYING DISCLAIMER +%{_bindir}/* %{_sbindir}/* %{_mandir}/man1/* %{_mandir}/man5/* From d28c5c4f0472e9674d34f8237ba14187669dad7c Mon Sep 17 00:00:00 2001 From: tuxoko Date: Thu, 19 Nov 2015 17:39:56 -0800 Subject: [PATCH 0925/1062] Prevent rm modules.* when make install This was originally in e80cd06b8e0428f3ca2c62e4cb0e4ec54fda1d5c, but somehow was changed and not working anymore. And it will cause the following error: modprobe: ERROR: ../libkmod/libkmod.c:506 lookup_builtin_file() could not open builtin file '/lib/modules/4.2.0-18-generic/modules.builtin.bin' Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #501 --- module/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Makefile.in b/module/Makefile.in index 41c10101e..d4e62e152 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -26,7 +26,7 @@ modules_install: KERNELRELEASE=@LINUX_VERSION@ @# Remove extraneous build products when packaging kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ - if [ -n $$kmoddir ]; then \ + if [ -n "$(DESTDIR)" ]; then \ find $$kmoddir -name 'modules.*' | xargs $(RM); \ fi sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \ From 1683e75edc1fdca1eba53f16ca08ce32c5e736d1 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 4 Nov 2015 16:41:13 -0500 Subject: [PATCH 0926/1062] Fix race between getf() and areleasef() If a vnode is released asynchronously through areleasef(), it is possible for the user process to reuse the file descriptor before areleasef is called. When this happens, getf() will return a stale reference, any operations in the kernel on that file descriptor will fail (as it is closed) and the operations meant for that fd will never occur from userspace's perspective. We correct this by detecting this condition in getf(), doing a putf on the old file handle, updating the file descriptor and proceeding as if everything was fine. When the areleasef() is done, it will harmlessly decrement the reference counter on the Illumos file handle. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #492 --- include/sys/user.h | 4 ++-- module/spl/spl-vnode.c | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/sys/user.h b/include/sys/user.h index ebbe8f68e..2b25dd33c 100644 --- a/include/sys/user.h +++ b/include/sys/user.h @@ -30,8 +30,8 @@ * about the Linux task_struct. Since this is internal to our compatibility * layer, we make it an opaque type. * - * XXX: If the descriptor changes under us, we would get an incorrect - * reference. + * XXX: If the descriptor changes under us and we do not do a getf() between + * the change and using it, we would get an incorrect reference. */ struct uf_info; diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index ab9830d18..86349c54a 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -656,6 +656,19 @@ vn_getf(int fd) fp = file_find(fd, current); if (fp) { + lfp = fget(fd); + fput(fp->f_file); + /* + * areleasef() can cause us to see a stale reference when + * userspace has reused a file descriptor before areleasef() + * has run. fput() the stale reference and replace it. We + * retain the original reference count such that the concurrent + * areleasef() will decrement its reference and terminate. + */ + if (lfp != fp->f_file) { + fp->f_file = lfp; + fp->f_vnode->v_file = lfp; + } atomic_inc(&fp->f_ref); spin_unlock(&vn_file_lock); return (fp); From a430c11f0b1ef16ca5edf3059e4082709277376c Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 3 Dec 2015 14:15:16 -0500 Subject: [PATCH 0927/1062] Make taskq_member() use ->journal_info The ->journal_info pointer in the task_struct is reserved for use by filesystems and because the kernel can have multiple file systems on the same stack due to direct reclaim, each filesystem that touches ->journal_info in a callback function will save the value at the start of its frame and restore it at the end of its frame. This allows us to safely use ->journal_info to store a pointer to the taskq's struct in taskq threads so that ZFS code paths can detect the presence of a taskq. This could break if the ZFS code were to use taskq_member from the context of direct reclaim. However, there are no such uses of it in that manner, so this is safe. This eliminates an O(N) list traversal under a spinlock with an O(1) unlocked pointer comparison. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Signed-off-by: tuxoko Signed-off-by: Tim Chase Closes #500 --- include/sys/taskq.h | 2 +- module/spl/spl-taskq.c | 37 +++---------------------------------- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index a43a86da6..65f911245 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -124,7 +124,7 @@ extern void taskq_wait_id(taskq_t *, taskqid_t); extern void taskq_wait_outstanding(taskq_t *, taskqid_t); extern void taskq_wait(taskq_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); -extern int taskq_member(taskq_t *, void *); +#define taskq_member(taskq, thread) ((taskq) == ((thread)->journal_info)) #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ taskq_create(name, nthreads, pri, min, max, flags) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 2c2e3ad46..0c5b230aa 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -448,40 +448,6 @@ taskq_wait(taskq_t *tq) } EXPORT_SYMBOL(taskq_wait); -static int -taskq_member_impl(taskq_t *tq, void *t) -{ - struct list_head *l; - taskq_thread_t *tqt; - int found = 0; - - ASSERT(tq); - ASSERT(t); - ASSERT(spin_is_locked(&tq->tq_lock)); - - list_for_each(l, &tq->tq_thread_list) { - tqt = list_entry(l, taskq_thread_t, tqt_thread_list); - if (tqt->tqt_thread == (struct task_struct *)t) { - found = 1; - break; - } - } - return (found); -} - -int -taskq_member(taskq_t *tq, void *t) -{ - int found; - - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); - found = taskq_member_impl(tq, t); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); - - return (found); -} -EXPORT_SYMBOL(taskq_member); - /* * Cancel an already dispatched task given the task id. Still pending tasks * will be immediately canceled, and if the task is active the function will @@ -812,6 +778,7 @@ taskq_thread(void *args) ASSERT(tqt); tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; + current->journal_info = tq; #if defined(PF_MEMALLOC_NOIO) (void) memalloc_noio_save(); @@ -877,6 +844,8 @@ taskq_thread(void *args) /* Perform the requested task */ t->tqent_func(t->tqent_arg); + ASSERT3P(tq, ==, current->journal_info); + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); From c5a8b1e163179cadcf2c5f81b000bf7f86f41369 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 8 Dec 2015 17:04:31 -0800 Subject: [PATCH 0928/1062] Revert "Make taskq_member() use ->journal_info" This reverts commit a430c11f0b1ef16ca5edf3059e4082709277376c. Using journal_info like this can cause a BUG at kernel fs/jbd2/transaction.c:425! Signed-off-by: Brian Behlendorf Issue #500 --- include/sys/taskq.h | 2 +- module/spl/spl-taskq.c | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 65f911245..a43a86da6 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -124,7 +124,7 @@ extern void taskq_wait_id(taskq_t *, taskqid_t); extern void taskq_wait_outstanding(taskq_t *, taskqid_t); extern void taskq_wait(taskq_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); -#define taskq_member(taskq, thread) ((taskq) == ((thread)->journal_info)) +extern int taskq_member(taskq_t *, void *); #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ taskq_create(name, nthreads, pri, min, max, flags) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 0c5b230aa..2c2e3ad46 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -448,6 +448,40 @@ taskq_wait(taskq_t *tq) } EXPORT_SYMBOL(taskq_wait); +static int +taskq_member_impl(taskq_t *tq, void *t) +{ + struct list_head *l; + taskq_thread_t *tqt; + int found = 0; + + ASSERT(tq); + ASSERT(t); + ASSERT(spin_is_locked(&tq->tq_lock)); + + list_for_each(l, &tq->tq_thread_list) { + tqt = list_entry(l, taskq_thread_t, tqt_thread_list); + if (tqt->tqt_thread == (struct task_struct *)t) { + found = 1; + break; + } + } + return (found); +} + +int +taskq_member(taskq_t *tq, void *t) +{ + int found; + + spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + found = taskq_member_impl(tq, t); + spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + + return (found); +} +EXPORT_SYMBOL(taskq_member); + /* * Cancel an already dispatched task given the task id. Still pending tasks * will be immediately canceled, and if the task is active the function will @@ -778,7 +812,6 @@ taskq_thread(void *args) ASSERT(tqt); tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; - current->journal_info = tq; #if defined(PF_MEMALLOC_NOIO) (void) memalloc_noio_save(); @@ -844,8 +877,6 @@ taskq_thread(void *args) /* Perform the requested task */ t->tqent_func(t->tqent_arg); - ASSERT3P(tq, ==, current->journal_info); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); From 225c110675631ddb0673323ee33818586c25cd67 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Dec 2015 14:46:59 -0800 Subject: [PATCH 0929/1062] Either _ILP32 or _LP64 must be defined For some arm, powerpc, and sparc platforms it was possible that neither _ILP32 of _LP64 would be defined. Update the isa_defs.h header to explicitly set these macros and generate a compile error in the case neither are defined. Signed-off-by: Brian Behlendorf Signed-off-by: tuxoko Issue zfsonlinux/zfs#4048 --- include/sys/isa_defs.h | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index aa5ae43c2..49fe773d4 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -60,7 +60,7 @@ #endif /* powerpc (ppc64) arch specific defines */ -#elif defined(__powerpc) || defined(__powerpc__) +#elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__) #if !defined(__powerpc) #define __powerpc @@ -70,9 +70,15 @@ #define __powerpc__ #endif +#if defined(__powerpc64__) #if !defined(_LP64) #define _LP64 #endif +#else +#if !defined(_ILP32) +#define _ILP32 +#endif +#endif /* arm arch specific defines */ #elif defined(__arm) || defined(__arm__) || defined(__aarch64__) @@ -85,6 +91,16 @@ #define __arm__ #endif +#if defined(__aarch64__) +#if !defined(_LP64) +#define _LP64 +#endif +#else +#if !defined(_ILP32) +#define _ILP32 +#endif +#endif + #if defined(__ARMEL__) || defined(__AARCH64EL__) #define _LITTLE_ENDIAN #else @@ -102,18 +118,18 @@ #define __sparc__ #endif -#define _BIG_ENDIAN -#define _SUNOS_VTOC_16 - -/* sparc64 arch specific defines */ -#elif defined(__sparc64) || defined(__sparc64__) - -#if !defined(__sparc64) -#define __sparc64 +#if !defined(_ILP32) +#define _ILP32 #endif -#if !defined(__sparc64__) -#define __sparc64__ +#if defined(__arch64__) +#if !defined(_LP64) +#define _LP64 +#endif +#else +#if !defined(_ILP32) +#define _ILP32 +#endif #endif #define _BIG_ENDIAN @@ -127,6 +143,10 @@ #error "Both _ILP32 and _LP64 are defined" #endif +#if !defined(_ILP32) && !defined(_LP64) +#error "Neither _ILP32 or _LP64 are defined" +#endif + #include #if defined(__LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN) From 0da84d1574a9900b8a0a9b73cdc2588407262dfd Mon Sep 17 00:00:00 2001 From: zgock Date: Thu, 10 Dec 2015 19:20:33 +0900 Subject: [PATCH 0930/1062] Fix build issue on some configured kernels The SPL fails to build with some "Configured" kernels (ex. openSUSE xen Kernel) this change should make same binaries with C compiler optimization. Signed-off-by: zgock Signed-off-by: Brian Behlendorf Closes #510 --- include/sys/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/time.h b/include/sys/time.h index 76ce5f03c..650166145 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -46,7 +46,7 @@ #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC)) #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC)) -#define hz HZ +static const int hz = HZ; #define TIMESPEC_OVERFLOW(ts) \ ((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX) From 61bbbd9a775a5517af513e5014edbdd73a32f7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Doma=C5=84ski?= Date: Thu, 10 Dec 2015 11:14:08 +0100 Subject: [PATCH 0931/1062] Skip GPL-only symbols test when cross-compiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test depends on being able to execute the resulting binary which will be impossible when cross-compiling. Instead make a worst case assumption which allows the build to continue as recommended by the autoconf manual. https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Runtime.html Signed-off-by: Kamil Domański Signed-off-by: Brian Behlendorf Signed-off-by: tuxoko Closes zfsonlinux/spl#507 Closes zfsonlinux/zfs#4075 --- config/spl-build.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index daa9eb714..748e9e16d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -683,6 +683,7 @@ AC_DEFUN([SPL_AC_TEST_MODULE], AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1], [Define to 1 if GPL-only symbols can be used]) ], [ + ], [ ]) ]) From 692ae8d3981e4ef20c0cd0cc229ec31753d220a6 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Tue, 6 Oct 2015 14:01:46 -0700 Subject: [PATCH 0932/1062] Add new lock types MUTEX_NOLOCKDEP, and RW_NOLOCKDEP When running a kernel with CONFIG_LOCKDEP=y, lockdep reports possible recursive locking in some cases and possible circular locking dependency in others, within the SPL and ZFS modules. When lockdep detects these conditions, it disables further lock analysis for all locks. This causes /proc/lock_stats not to reflect full information about lock contention, even in locks without dependency issues. This commit creates a new type of mutex, MUTEX_NOLOCKDEP. This mutex type causes subsequent attempts to take or release those locks to be wrapped in lockdep_off() and lockdep_on(). This commit also creates an RW_NOLOCKDEP type analagous to MUTEX_NOLOCKDEP. MUTEX_NOLOCKDEP and RW_NOLOCKDEP are also defined in zfs, in a commit to that repo, for userspace builds. Signed-off-by: Olaf Faaland Signed-off-by: Brian Behlendorf Issue #480 --- include/sys/mutex.h | 42 ++++++++++++++++++++++++++++++++++++++++-- include/sys/rwlock.h | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 81 insertions(+), 3 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 9b297e9fa..fba35f3f9 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -28,17 +28,22 @@ #include #include #include +#include typedef enum { MUTEX_DEFAULT = 0, MUTEX_SPIN = 1, - MUTEX_ADAPTIVE = 2 + MUTEX_ADAPTIVE = 2, + MUTEX_NOLOCKDEP = 3 } kmutex_type_t; typedef struct { struct mutex m_mutex; spinlock_t m_lock; /* used for serializing mutex_exit */ kthread_t *m_owner; +#ifdef CONFIG_LOCKDEP + kmutex_type_t m_type; +#endif /* CONFIG_LOCKDEP */ } kmutex_t; #define MUTEX(mp) (&((mp)->m_mutex)) @@ -60,6 +65,30 @@ spl_mutex_clear_owner(kmutex_t *mp) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) +#ifdef CONFIG_LOCKDEP +static inline void +spl_mutex_set_type(kmutex_t *mp, kmutex_type_t type) +{ + mp->m_type = type; +} +static inline void +spl_mutex_lockdep_off_maybe(kmutex_t *mp) \ +{ \ + if (mp && mp->m_type == MUTEX_NOLOCKDEP) \ + lockdep_off(); \ +} +static inline void +spl_mutex_lockdep_on_maybe(kmutex_t *mp) \ +{ \ + if (mp && mp->m_type == MUTEX_NOLOCKDEP) \ + lockdep_on(); \ +} +#else /* CONFIG_LOCKDEP */ +#define spl_mutex_set_type(mp, type) +#define spl_mutex_lockdep_off_maybe(mp) +#define spl_mutex_lockdep_on_maybe(mp) +#endif /* CONFIG_LOCKDEP */ + /* * The following functions must be a #define and not static inline. * This ensures that the native linux mutex functions (lock/unlock) @@ -70,11 +99,12 @@ spl_mutex_clear_owner(kmutex_t *mp) #define mutex_init(mp, name, type, ibc) \ { \ static struct lock_class_key __key; \ - ASSERT(type == MUTEX_DEFAULT); \ + ASSERT(type == MUTEX_DEFAULT || type == MUTEX_NOLOCKDEP); \ \ __mutex_init(MUTEX(mp), (name) ? (#name) : (#mp), &__key); \ spin_lock_init(&(mp)->m_lock); \ spl_mutex_clear_owner(mp); \ + spl_mutex_set_type(mp, type); \ } #undef mutex_destroy @@ -87,8 +117,10 @@ spl_mutex_clear_owner(kmutex_t *mp) ({ \ int _rc_; \ \ + spl_mutex_lockdep_off_maybe(mp); \ if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \ spl_mutex_set_owner(mp); \ + spl_mutex_lockdep_on_maybe(mp); \ \ _rc_; \ }) @@ -97,14 +129,18 @@ spl_mutex_clear_owner(kmutex_t *mp) #define mutex_enter_nested(mp, subclass) \ { \ ASSERT3P(mutex_owner(mp), !=, current); \ + spl_mutex_lockdep_off_maybe(mp); \ mutex_lock_nested(MUTEX(mp), (subclass)); \ + spl_mutex_lockdep_on_maybe(mp); \ spl_mutex_set_owner(mp); \ } #else /* CONFIG_DEBUG_LOCK_ALLOC */ #define mutex_enter_nested(mp, subclass) \ { \ ASSERT3P(mutex_owner(mp), !=, current); \ + spl_mutex_lockdep_off_maybe(mp); \ mutex_lock(MUTEX(mp)); \ + spl_mutex_lockdep_on_maybe(mp); \ spl_mutex_set_owner(mp); \ } #endif /* CONFIG_DEBUG_LOCK_ALLOC */ @@ -132,10 +168,12 @@ spl_mutex_clear_owner(kmutex_t *mp) */ #define mutex_exit(mp) \ { \ + spl_mutex_lockdep_off_maybe(mp); \ spin_lock(&(mp)->m_lock); \ spl_mutex_clear_owner(mp); \ mutex_unlock(MUTEX(mp)); \ spin_unlock(&(mp)->m_lock); \ + spl_mutex_lockdep_on_maybe(mp); \ } int spl_mutex_init(void); diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 6f7d611b6..c82764ce9 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -31,7 +31,8 @@ typedef enum { RW_DRIVER = 2, - RW_DEFAULT = 4 + RW_DEFAULT = 4, + RW_NOLOCKDEP = 5 } krw_type_t; typedef enum { @@ -49,6 +50,9 @@ typedef struct { #ifndef CONFIG_RWSEM_SPIN_ON_OWNER kthread_t *rw_owner; #endif +#ifdef CONFIG_LOCKDEP + krw_type_t rw_type; +#endif /* CONFIG_LOCKDEP */ } krwlock_t; #define SEM(rwp) (&(rwp)->rw_rwlock) @@ -83,6 +87,30 @@ rw_owner(krwlock_t *rwp) #endif } +#ifdef CONFIG_LOCKDEP +static inline void +spl_rw_set_type(krwlock_t *rwp, krw_type_t type) +{ + rwp->rw_type = type; +} +static inline void +spl_rw_lockdep_off_maybe(krwlock_t *rwp) \ +{ \ + if (rwp && rwp->rw_type == RW_NOLOCKDEP) \ + lockdep_off(); \ +} +static inline void +spl_rw_lockdep_on_maybe(krwlock_t *rwp) \ +{ \ + if (rwp && rwp->rw_type == RW_NOLOCKDEP) \ + lockdep_on(); \ +} +#else /* CONFIG_LOCKDEP */ +#define spl_rw_set_type(rwp, type) +#define spl_rw_lockdep_off_maybe(rwp) +#define spl_rw_lockdep_on_maybe(rwp) +#endif /* CONFIG_LOCKDEP */ + static inline int RW_READ_HELD(krwlock_t *rwp) { @@ -110,9 +138,11 @@ RW_LOCK_HELD(krwlock_t *rwp) #define rw_init(rwp, name, type, arg) \ ({ \ static struct lock_class_key __key; \ + ASSERT(type == RW_DEFAULT || type == RW_NOLOCKDEP); \ \ __init_rwsem(SEM(rwp), #rwp, &__key); \ spl_rw_clear_owner(rwp); \ + spl_rw_set_type(rwp, type); \ }) #define rw_destroy(rwp) \ @@ -124,6 +154,7 @@ RW_LOCK_HELD(krwlock_t *rwp) ({ \ int _rc_ = 0; \ \ + spl_rw_lockdep_off_maybe(rwp); \ switch (rw) { \ case RW_READER: \ _rc_ = down_read_trylock(SEM(rwp)); \ @@ -135,11 +166,13 @@ RW_LOCK_HELD(krwlock_t *rwp) default: \ VERIFY(0); \ } \ + spl_rw_lockdep_on_maybe(rwp); \ _rc_; \ }) #define rw_enter(rwp, rw) \ ({ \ + spl_rw_lockdep_off_maybe(rwp); \ switch (rw) { \ case RW_READER: \ down_read(SEM(rwp)); \ @@ -151,10 +184,12 @@ RW_LOCK_HELD(krwlock_t *rwp) default: \ VERIFY(0); \ } \ + spl_rw_lockdep_on_maybe(rwp); \ }) #define rw_exit(rwp) \ ({ \ + spl_rw_lockdep_off_maybe(rwp); \ if (RW_WRITE_HELD(rwp)) { \ spl_rw_clear_owner(rwp); \ up_write(SEM(rwp)); \ @@ -162,12 +197,15 @@ RW_LOCK_HELD(krwlock_t *rwp) ASSERT(RW_READ_HELD(rwp)); \ up_read(SEM(rwp)); \ } \ + spl_rw_lockdep_on_maybe(rwp); \ }) #define rw_downgrade(rwp) \ ({ \ + spl_rw_lockdep_off_maybe(rwp); \ spl_rw_clear_owner(rwp); \ downgrade_write(SEM(rwp)); \ + spl_rw_lockdep_on_maybe(rwp); \ }) #if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) @@ -191,6 +229,7 @@ extern int __down_write_trylock_locked(struct rw_semaphore *); unsigned long _flags_; \ int _rc_ = 0; \ \ + spl_rw_lockdep_off_maybe(rwp); \ spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ if ((list_empty(&SEM(rwp)->wait_list)) && \ (SEM(rwp)->activity == 1)) { \ @@ -199,6 +238,7 @@ extern int __down_write_trylock_locked(struct rw_semaphore *); (rwp)->rw_owner = current; \ } \ spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ + spl_rw_lockdep_on_maybe(rwp); \ _rc_; \ }) #else From 628fc52137fc14377eba46c66b57d8d094e88507 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Tue, 13 Oct 2015 23:08:44 -0700 Subject: [PATCH 0933/1062] Fix lockdep warning in spl_inode_{lock,unlock} spl_inode_{lock,unlock} are triggering possible recursive locking warnings from lockdep. The warning is a false positive. The lock is used to protect a parent directory during delete/add operations, used in zfs when writing/removing the cache file. The inode lock is taken on both the parent inode and the file inode. VFS provides an enum to subclass the lock. This patch changes the spin_lock call to _nested version and uses the provided enum. Signed-off-by: Olaf Faaland Signed-off-by: Brian Behlendorf Issue #480 --- include/linux/file_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index a2db2590a..c58bb8156 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -76,7 +76,7 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) #define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync) #endif /* HAVE_2ARGS_VFS_FSYNC */ -#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex) +#define spl_inode_lock(ip) mutex_lock_nested(&(ip)->i_mutex, I_MUTEX_PARENT) #define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex) #endif /* SPL_FILE_COMPAT_H */ From 326172d8549e0a34a8e4ef4665d8bdfcf7aeda6e Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Tue, 13 Oct 2015 16:56:51 -0700 Subject: [PATCH 0934/1062] Subclass tq_lock to eliminate a lockdep warning When taskq_dispatch() calls taskq_thread_spawn() to create a new thread for a taskq, linux lockdep warns of possible recursive locking. This is a false positive. One such call chain is as follows, when a taskq needs more threads: taskq_dispatch->taskq_thread_spawn->taskq_dispatch The initial taskq_dispatch() holds tq_lock on the taskq that needed more worker threads. The later call into taskq_dispatch() takes dynamic_taskq->tq_lock. Without subclassing, lockdep believes these could potentially be the same lock and complains. A similar case occurs when taskq_dispatch() then calls task_alloc(). This patch uses spin_lock_irqsave_nested() when taking tq_lock, with one of two new lock subclasses: subclass taskq TQ_LOCK_DYNAMIC dynamic_taskq TQ_LOCK_GENERAL any other Signed-off-by: Olaf Faaland Signed-off-by: Brian Behlendorf Issue #480 --- include/sys/taskq.h | 9 ++++++ module/spl/spl-taskq.c | 70 +++++++++++++++++++++++++++++------------- 2 files changed, 58 insertions(+), 21 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index a43a86da6..5830fe2dd 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -55,6 +55,14 @@ #define TQ_NEW 0x04000000 #define TQ_FRONT 0x08000000 +/* spin_lock(lock) and spin_lock_nested(lock,0) are equivalent, + * so TQ_LOCK_DYNAMIC must not evaluate to 0 + */ +typedef enum tq_lock_role { + TQ_LOCK_GENERAL = 0, + TQ_LOCK_DYNAMIC = 1, +} tq_lock_role_t; + typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); @@ -81,6 +89,7 @@ typedef struct taskq { struct list_head tq_delay_list; /* delayed task_t's */ wait_queue_head_t tq_work_waitq; /* new work waitq */ wait_queue_head_t tq_wait_waitq; /* wait waitq */ + tq_lock_role_t tq_lock_class; /* class used when taking tq_lock */ } taskq_t; typedef struct taskq_ent { diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 2c2e3ad46..588dbc8a4 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -113,7 +113,8 @@ retry: */ spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); schedule_timeout(HZ / 100); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); if (count < 100) { count++; goto retry; @@ -122,7 +123,8 @@ retry: spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); t = kmem_alloc(sizeof(taskq_ent_t), task_km_flags(flags)); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); if (t) { taskq_init_ent(t); @@ -188,7 +190,8 @@ task_expire(unsigned long data) taskq_t *tq = t->tqent_taskq; struct list_head *l; - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); if (t->tqent_flags & TQENT_FLAG_CANCEL) { ASSERT(list_empty(&t->tqent_list)); @@ -379,7 +382,8 @@ taskq_wait_id_check(taskq_t *tq, taskqid_t id) int active = 0; int rc; - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); rc = (taskq_find(tq, id, &active) == NULL); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -402,7 +406,8 @@ taskq_wait_outstanding_check(taskq_t *tq, taskqid_t id) { int rc; - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); rc = (id < tq->tq_lowest_id); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -429,7 +434,8 @@ taskq_wait_check(taskq_t *tq) { int rc; - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); rc = (tq->tq_lowest_id == tq->tq_next_id); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -474,7 +480,8 @@ taskq_member(taskq_t *tq, void *t) { int found; - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); found = taskq_member_impl(tq, t); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -497,7 +504,8 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) ASSERT(tq); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); t = taskq_find(tq, id, &active); if (t && !active) { list_del_init(&t->tqent_list); @@ -519,7 +527,8 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) if (timer_pending(&t->tqent_timer)) { spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); del_timer_sync(&t->tqent_timer); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, + tq->tq_lock_flags, tq->tq_lock_class); } if (!(t->tqent_flags & TQENT_FLAG_PREALLOC)) @@ -549,7 +558,8 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(tq); ASSERT(func); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TASKQ_ACTIVE)) @@ -605,7 +615,8 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, ASSERT(tq); ASSERT(func); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TASKQ_ACTIVE)) @@ -648,7 +659,8 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, ASSERT(tq); ASSERT(func); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TASKQ_ACTIVE)) { @@ -740,13 +752,14 @@ taskq_thread_spawn_task(void *arg) (void) taskq_thread_create(tq); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); tq->tq_nspawn--; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); } /* - * Spawn addition threads for dynamic taskqs (TASKQ_DYNMAIC) the current + * Spawn addition threads for dynamic taskqs (TASKQ_DYNAMIC) the current * number of threads is insufficient to handle the pending tasks. These * new threads must be created by the dedicated dynamic_taskq to avoid * deadlocks between thread creation and memory reclaim. The system_taskq @@ -810,6 +823,7 @@ taskq_thread(void *args) int seq_tasks = 0; ASSERT(tqt); + ASSERT(tqt->tqt_tq); tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; @@ -821,7 +835,8 @@ taskq_thread(void *args) sigprocmask(SIG_BLOCK, &blocked, NULL); flush_signals(current); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); /* Immediately exit if more threads than allowed were created. */ if (tq->tq_nthreads >= tq->tq_maxthreads) @@ -848,7 +863,8 @@ taskq_thread(void *args) schedule(); seq_tasks = 0; - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, + tq->tq_lock_flags, tq->tq_lock_class); remove_wait_queue(&tq->tq_work_waitq, &wait); } else { __set_current_state(TASK_RUNNING); @@ -877,7 +893,8 @@ taskq_thread(void *args) /* Perform the requested task */ t->tqent_func(t->tqent_arg); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, + tq->tq_lock_flags, tq->tq_lock_class); tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); tqt->tqt_task = NULL; @@ -999,9 +1016,11 @@ taskq_create(const char *name, int nthreads, pri_t pri, INIT_LIST_HEAD(&tq->tq_delay_list); init_waitqueue_head(&tq->tq_work_waitq); init_waitqueue_head(&tq->tq_wait_waitq); + tq->tq_lock_class = TQ_LOCK_GENERAL; if (flags & TASKQ_PREPOPULATE) { - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); for (i = 0; i < minalloc; i++) task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); @@ -1040,7 +1059,8 @@ taskq_destroy(taskq_t *tq) taskq_ent_t *t; ASSERT(tq); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); tq->tq_flags &= ~TASKQ_ACTIVE; spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); @@ -1053,7 +1073,8 @@ taskq_destroy(taskq_t *tq) taskq_wait(tq); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); /* * Signal each thread to exit and block until it does. Each thread @@ -1069,7 +1090,8 @@ taskq_destroy(taskq_t *tq) kthread_stop(thread); - spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags); + spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + tq->tq_lock_class); } while (!list_empty(&tq->tq_free_list)) { @@ -1113,6 +1135,12 @@ spl_taskq_init(void) return (1); } + /* This is used to annotate tq_lock, so + * taskq_dispatch -> taskq_thread_spawn -> taskq_dispatch + * does not trigger a lockdep warning re: possible recursive locking + */ + dynamic_taskq->tq_lock_class = TQ_LOCK_DYNAMIC; + return (0); } From 066b89e68545e1f774124969d0dd7b36ccb04112 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 3 Dec 2015 15:06:03 -0800 Subject: [PATCH 0935/1062] Don't use tq->tq_lock_flags The flags argument in spin_lock_irqsave is modified out side of spin_lock context. We cannot use a shared variable like tq->tq_lock_flags for them. This patch removes it and uses local variable for the flags. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #506 --- include/sys/taskq.h | 1 - module/spl/spl-taskq.c | 123 +++++++++++++++++++++-------------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 5830fe2dd..07b4209e6 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -68,7 +68,6 @@ typedef void (task_func_t)(void *); typedef struct taskq { spinlock_t tq_lock; /* protects taskq_t */ - unsigned long tq_lock_flags; /* interrupt state */ char *tq_name; /* taskq name */ struct list_head tq_thread_list;/* list of all threads */ struct list_head tq_active_list;/* list of active threads */ diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 588dbc8a4..ded6d3b80 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -71,7 +71,7 @@ task_km_flags(uint_t flags) * is not attached to the free, work, or pending taskq lists. */ static taskq_ent_t * -task_alloc(taskq_t *tq, uint_t flags) +task_alloc(taskq_t *tq, uint_t flags, unsigned long *irqflags) { taskq_ent_t *t; int count = 0; @@ -111,9 +111,9 @@ retry: * end up delaying the task allocation by one second, thereby * throttling the task dispatch rate. */ - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, *irqflags); schedule_timeout(HZ / 100); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + spin_lock_irqsave_nested(&tq->tq_lock, *irqflags, tq->tq_lock_class); if (count < 100) { count++; @@ -121,10 +121,9 @@ retry: } } - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, *irqflags); t = kmem_alloc(sizeof(taskq_ent_t), task_km_flags(flags)); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, *irqflags, tq->tq_lock_class); if (t) { taskq_init_ent(t); @@ -189,13 +188,13 @@ task_expire(unsigned long data) taskq_ent_t *w, *t = (taskq_ent_t *)data; taskq_t *tq = t->tqent_taskq; struct list_head *l; + unsigned long flags; - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); if (t->tqent_flags & TQENT_FLAG_CANCEL) { ASSERT(list_empty(&t->tqent_list)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); return; } @@ -214,7 +213,7 @@ task_expire(unsigned long data) if (l == &tq->tq_prio_list) list_add(&t->tqent_list, &tq->tq_prio_list); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); wake_up(&tq->tq_work_waitq); } @@ -381,11 +380,11 @@ taskq_wait_id_check(taskq_t *tq, taskqid_t id) { int active = 0; int rc; + unsigned long flags; - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); rc = (taskq_find(tq, id, &active) == NULL); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); return (rc); } @@ -405,11 +404,11 @@ static int taskq_wait_outstanding_check(taskq_t *tq, taskqid_t id) { int rc; + unsigned long flags; - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); rc = (id < tq->tq_lowest_id); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); return (rc); } @@ -433,11 +432,11 @@ static int taskq_wait_check(taskq_t *tq) { int rc; + unsigned long flags; - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); rc = (tq->tq_lowest_id == tq->tq_next_id); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); return (rc); } @@ -479,11 +478,11 @@ int taskq_member(taskq_t *tq, void *t) { int found; + unsigned long flags; - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); found = taskq_member_impl(tq, t); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); return (found); } @@ -501,11 +500,11 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) taskq_ent_t *t; int active = 0; int rc = ENOENT; + unsigned long flags; ASSERT(tq); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); t = taskq_find(tq, id, &active); if (t && !active) { list_del_init(&t->tqent_list); @@ -525,10 +524,10 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) * drop the lock before synchronously cancelling the timer. */ if (timer_pending(&t->tqent_timer)) { - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); del_timer_sync(&t->tqent_timer); - spin_lock_irqsave_nested(&tq->tq_lock, - tq->tq_lock_flags, tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); } if (!(t->tqent_flags & TQENT_FLAG_PREALLOC)) @@ -536,7 +535,7 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) rc = 0; } - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); if (active) { taskq_wait_id(tq, id); @@ -554,12 +553,12 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { taskq_ent_t *t; taskqid_t rc = 0; + unsigned long irqflags; ASSERT(tq); ASSERT(func); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, irqflags, tq->tq_lock_class); /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TASKQ_ACTIVE)) @@ -570,7 +569,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) goto out; - if ((t = task_alloc(tq, flags)) == NULL) + if ((t = task_alloc(tq, flags, &irqflags)) == NULL) goto out; spin_lock(&t->tqent_lock); @@ -600,7 +599,7 @@ out: if (tq->tq_nactive == tq->tq_nthreads) (void) taskq_thread_spawn(tq); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, irqflags); return (rc); } EXPORT_SYMBOL(taskq_dispatch); @@ -611,18 +610,18 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, { taskqid_t rc = 0; taskq_ent_t *t; + unsigned long irqflags; ASSERT(tq); ASSERT(func); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, irqflags, tq->tq_lock_class); /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TASKQ_ACTIVE)) goto out; - if ((t = task_alloc(tq, flags)) == NULL) + if ((t = task_alloc(tq, flags, &irqflags)) == NULL) goto out; spin_lock(&t->tqent_lock); @@ -647,7 +646,7 @@ out: /* Spawn additional taskq threads if required. */ if (tq->tq_nactive == tq->tq_nthreads) (void) taskq_thread_spawn(tq); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, irqflags); return (rc); } EXPORT_SYMBOL(taskq_dispatch_delay); @@ -656,10 +655,11 @@ void taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, taskq_ent_t *t) { + unsigned long irqflags; ASSERT(tq); ASSERT(func); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + spin_lock_irqsave_nested(&tq->tq_lock, irqflags, tq->tq_lock_class); /* Taskq being destroyed and all tasks drained */ @@ -695,7 +695,7 @@ out: /* Spawn additional taskq threads if required. */ if (tq->tq_nactive == tq->tq_nthreads) (void) taskq_thread_spawn(tq); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, irqflags); } EXPORT_SYMBOL(taskq_dispatch_ent); @@ -749,13 +749,13 @@ static void taskq_thread_spawn_task(void *arg) { taskq_t *tq = (taskq_t *)arg; + unsigned long flags; (void) taskq_thread_create(tq); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); tq->tq_nspawn--; - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); } /* @@ -821,6 +821,7 @@ taskq_thread(void *args) taskq_t *tq; taskq_ent_t *t; int seq_tasks = 0; + unsigned long flags; ASSERT(tqt); ASSERT(tqt->tqt_tq); @@ -835,8 +836,7 @@ taskq_thread(void *args) sigprocmask(SIG_BLOCK, &blocked, NULL); flush_signals(current); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); /* Immediately exit if more threads than allowed were created. */ if (tq->tq_nthreads >= tq->tq_maxthreads) @@ -858,13 +858,13 @@ taskq_thread(void *args) } add_wait_queue_exclusive(&tq->tq_work_waitq, &wait); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); schedule(); seq_tasks = 0; - spin_lock_irqsave_nested(&tq->tq_lock, - tq->tq_lock_flags, tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); remove_wait_queue(&tq->tq_work_waitq, &wait); } else { __set_current_state(TASK_RUNNING); @@ -888,13 +888,13 @@ taskq_thread(void *args) taskq_insert_in_order(tq, tqt); tq->tq_nactive++; - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); /* Perform the requested task */ t->tqent_func(t->tqent_arg); - spin_lock_irqsave_nested(&tq->tq_lock, - tq->tq_lock_flags, tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); tq->tq_nactive--; list_del_init(&tqt->tqt_active_list); tqt->tqt_task = NULL; @@ -932,7 +932,7 @@ taskq_thread(void *args) list_del_init(&tqt->tqt_thread_list); error: kmem_free(tqt, sizeof (taskq_thread_t)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); return (0); } @@ -976,6 +976,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, taskq_t *tq; taskq_thread_t *tqt; int count = 0, rc = 0, i; + unsigned long irqflags; ASSERT(name != NULL); ASSERT(minalloc >= 0); @@ -1019,13 +1020,14 @@ taskq_create(const char *name, int nthreads, pri_t pri, tq->tq_lock_class = TQ_LOCK_GENERAL; if (flags & TASKQ_PREPOPULATE) { - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + spin_lock_irqsave_nested(&tq->tq_lock, irqflags, tq->tq_lock_class); for (i = 0; i < minalloc; i++) - task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); + task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW, + &irqflags)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, irqflags); } if ((flags & TASKQ_DYNAMIC) && spl_taskq_thread_dynamic) @@ -1057,12 +1059,12 @@ taskq_destroy(taskq_t *tq) struct task_struct *thread; taskq_thread_t *tqt; taskq_ent_t *t; + unsigned long flags; ASSERT(tq); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); tq->tq_flags &= ~TASKQ_ACTIVE; - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); /* * When TASKQ_ACTIVE is clear new tasks may not be added nor may @@ -1073,8 +1075,7 @@ taskq_destroy(taskq_t *tq) taskq_wait(tq); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, - tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); /* * Signal each thread to exit and block until it does. Each thread @@ -1086,11 +1087,11 @@ taskq_destroy(taskq_t *tq) tqt = list_entry(tq->tq_thread_list.next, taskq_thread_t, tqt_thread_list); thread = tqt->tqt_thread; - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); kthread_stop(thread); - spin_lock_irqsave_nested(&tq->tq_lock, tq->tq_lock_flags, + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); } @@ -1113,7 +1114,7 @@ taskq_destroy(taskq_t *tq) ASSERT(list_empty(&tq->tq_prio_list)); ASSERT(list_empty(&tq->tq_delay_list)); - spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); + spin_unlock_irqrestore(&tq->tq_lock, flags); strfree(tq->tq_name); kmem_free(tq, sizeof (taskq_t)); From 2c4332cf793e7c9ca5b2b9b0e6f31c3e41bbc1b1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Dec 2015 16:15:50 -0800 Subject: [PATCH 0936/1062] Fix cstyle issues in spl-taskq.c and taskq.h This patch only addresses the issues identified by the style checker. It contains no functional changes. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 89 +++++++++++++++++++++--------------------- module/spl/spl-taskq.c | 75 +++++++++++++++++++---------------- 2 files changed, 86 insertions(+), 78 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 07b4209e6..ed6aff8f8 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,10 +20,10 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_TASKQ_H -#define _SPL_TASKQ_H +#define _SPL_TASKQ_H #include #include @@ -33,29 +33,30 @@ #include #include -#define TASKQ_NAMELEN 31 +#define TASKQ_NAMELEN 31 -#define TASKQ_PREPOPULATE 0x00000001 -#define TASKQ_CPR_SAFE 0x00000002 -#define TASKQ_DYNAMIC 0x00000004 -#define TASKQ_THREADS_CPU_PCT 0x00000008 -#define TASKQ_DC_BATCH 0x00000010 -#define TASKQ_ACTIVE 0x80000000 +#define TASKQ_PREPOPULATE 0x00000001 +#define TASKQ_CPR_SAFE 0x00000002 +#define TASKQ_DYNAMIC 0x00000004 +#define TASKQ_THREADS_CPU_PCT 0x00000008 +#define TASKQ_DC_BATCH 0x00000010 +#define TASKQ_ACTIVE 0x80000000 /* * Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as * KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly * large so as not to conflict with already used GFP_* defines. */ -#define TQ_SLEEP 0x00000000 -#define TQ_NOSLEEP 0x00000001 -#define TQ_PUSHPAGE 0x00000002 -#define TQ_NOQUEUE 0x01000000 -#define TQ_NOALLOC 0x02000000 -#define TQ_NEW 0x04000000 -#define TQ_FRONT 0x08000000 +#define TQ_SLEEP 0x00000000 +#define TQ_NOSLEEP 0x00000001 +#define TQ_PUSHPAGE 0x00000002 +#define TQ_NOQUEUE 0x01000000 +#define TQ_NOALLOC 0x02000000 +#define TQ_NEW 0x04000000 +#define TQ_FRONT 0x08000000 -/* spin_lock(lock) and spin_lock_nested(lock,0) are equivalent, +/* + * spin_lock(lock) and spin_lock_nested(lock,0) are equivalent, * so TQ_LOCK_DYNAMIC must not evaluate to 0 */ typedef enum tq_lock_role { @@ -67,28 +68,28 @@ typedef unsigned long taskqid_t; typedef void (task_func_t)(void *); typedef struct taskq { - spinlock_t tq_lock; /* protects taskq_t */ - char *tq_name; /* taskq name */ - struct list_head tq_thread_list;/* list of all threads */ - struct list_head tq_active_list;/* list of active threads */ - int tq_nactive; /* # of active threads */ - int tq_nthreads; /* # of existing threads */ - int tq_nspawn; /* # of threads being spawned */ - int tq_maxthreads; /* # of threads maximum */ - int tq_pri; /* priority */ - int tq_minalloc; /* min task_t pool size */ - int tq_maxalloc; /* max task_t pool size */ - int tq_nalloc; /* cur task_t pool size */ - uint_t tq_flags; /* flags */ - taskqid_t tq_next_id; /* next pend/work id */ - taskqid_t tq_lowest_id; /* lowest pend/work id */ - struct list_head tq_free_list; /* free task_t's */ - struct list_head tq_pend_list; /* pending task_t's */ - struct list_head tq_prio_list; /* priority pending task_t's */ - struct list_head tq_delay_list; /* delayed task_t's */ - wait_queue_head_t tq_work_waitq; /* new work waitq */ - wait_queue_head_t tq_wait_waitq; /* wait waitq */ - tq_lock_role_t tq_lock_class; /* class used when taking tq_lock */ + spinlock_t tq_lock; /* protects taskq_t */ + char *tq_name; /* taskq name */ + struct list_head tq_thread_list; /* list of all threads */ + struct list_head tq_active_list; /* list of active threads */ + int tq_nactive; /* # of active threads */ + int tq_nthreads; /* # of existing threads */ + int tq_nspawn; /* # of threads being spawned */ + int tq_maxthreads; /* # of threads maximum */ + int tq_pri; /* priority */ + int tq_minalloc; /* min task_t pool size */ + int tq_maxalloc; /* max task_t pool size */ + int tq_nalloc; /* cur task_t pool size */ + uint_t tq_flags; /* flags */ + taskqid_t tq_next_id; /* next pend/work id */ + taskqid_t tq_lowest_id; /* lowest pend/work id */ + struct list_head tq_free_list; /* free task_t's */ + struct list_head tq_pend_list; /* pending task_t's */ + struct list_head tq_prio_list; /* priority pending task_t's */ + struct list_head tq_delay_list; /* delayed task_t's */ + wait_queue_head_t tq_work_waitq; /* new work waitq */ + wait_queue_head_t tq_wait_waitq; /* wait waitq */ + tq_lock_role_t tq_lock_class; /* class when taking tq_lock */ } taskq_t; typedef struct taskq_ent { @@ -103,8 +104,8 @@ typedef struct taskq_ent { uintptr_t tqent_flags; } taskq_ent_t; -#define TQENT_FLAG_PREALLOC 0x1 -#define TQENT_FLAG_CANCEL 0x2 +#define TQENT_FLAG_PREALLOC 0x1 +#define TQENT_FLAG_CANCEL 0x2 typedef struct taskq_thread { struct list_head tqt_thread_list; @@ -134,9 +135,9 @@ extern void taskq_wait(taskq_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); extern int taskq_member(taskq_t *, void *); -#define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ +#define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ taskq_create(name, nthreads, pri, min, max, flags) -#define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ +#define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ taskq_create(name, nthreads, maxclsyspri, min, max, flags) int spl_taskq_init(void); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index ded6d3b80..89d68f33c 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,9 +20,9 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Task Queue Implementation. -\*****************************************************************************/ + */ #include #include @@ -39,12 +39,12 @@ MODULE_PARM_DESC(spl_taskq_thread_dynamic, "Allow dynamic taskq threads"); int spl_taskq_thread_priority = 1; module_param(spl_taskq_thread_priority, int, 0644); MODULE_PARM_DESC(spl_taskq_thread_priority, - "Allow non-default priority for taskq threads"); + "Allow non-default priority for taskq threads"); int spl_taskq_thread_sequential = 4; module_param(spl_taskq_thread_sequential, int, 0644); MODULE_PARM_DESC(spl_taskq_thread_sequential, - "Create new taskq threads after N sequential tasks"); + "Create new taskq threads after N sequential tasks"); /* Global system-wide dynamic task queue available for all consumers */ taskq_t *system_taskq; @@ -58,12 +58,12 @@ static int task_km_flags(uint_t flags) { if (flags & TQ_NOSLEEP) - return KM_NOSLEEP; + return (KM_NOSLEEP); if (flags & TQ_PUSHPAGE) - return KM_PUSHPAGE; + return (KM_PUSHPAGE); - return KM_SLEEP; + return (KM_SLEEP); } /* @@ -122,7 +122,7 @@ retry: } spin_unlock_irqrestore(&tq->tq_lock, *irqflags); - t = kmem_alloc(sizeof(taskq_ent_t), task_km_flags(flags)); + t = kmem_alloc(sizeof (taskq_ent_t), task_km_flags(flags)); spin_lock_irqsave_nested(&tq->tq_lock, *irqflags, tq->tq_lock_class); if (t) { @@ -146,7 +146,7 @@ task_free(taskq_t *tq, taskq_ent_t *t) ASSERT(list_empty(&t->tqent_list)); ASSERT(!timer_pending(&t->tqent_timer)); - kmem_free(t, sizeof(taskq_ent_t)); + kmem_free(t, sizeof (taskq_ent_t)); tq->tq_nalloc--; } @@ -653,7 +653,7 @@ EXPORT_SYMBOL(taskq_dispatch_delay); void taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, - taskq_ent_t *t) + taskq_ent_t *t) { unsigned long irqflags; ASSERT(tq); @@ -702,7 +702,7 @@ EXPORT_SYMBOL(taskq_dispatch_ent); int taskq_empty_ent(taskq_ent_t *t) { - return list_empty(&t->tqent_list); + return (list_empty(&t->tqent_list)); } EXPORT_SYMBOL(taskq_empty_ent); @@ -809,7 +809,7 @@ taskq_thread_should_stop(taskq_t *tq, taskq_thread_t *tqt) (tq->tq_nactive == 0) && /* No threads are handling tasks */ (tq->tq_nthreads > 1) && /* More than 1 thread is running */ (!taskq_next_ent(tq)) && /* There are no pending tasks */ - (spl_taskq_thread_dynamic));/* Dynamic taskqs are allowed */ + (spl_taskq_thread_dynamic)); /* Dynamic taskqs are allowed */ } static int @@ -828,9 +828,9 @@ taskq_thread(void *args) tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; - #if defined(PF_MEMALLOC_NOIO) +#if defined(PF_MEMALLOC_NOIO) (void) memalloc_noio_save(); - #endif +#endif sigfillset(&blocked); sigprocmask(SIG_BLOCK, &blocked, NULL); @@ -873,17 +873,21 @@ taskq_thread(void *args) if ((t = taskq_next_ent(tq)) != NULL) { list_del_init(&t->tqent_list); - /* In order to support recursively dispatching a + /* + * In order to support recursively dispatching a * preallocated taskq_ent_t, tqent_id must be - * stored prior to executing tqent_func. */ + * stored prior to executing tqent_func. + */ tqt->tqt_id = t->tqent_id; tqt->tqt_task = t; - /* We must store a copy of the flags prior to + /* + * We must store a copy of the flags prior to * servicing the task (servicing a prealloc'd task * returns the ownership of the tqent back to * the caller of taskq_dispatch). Thus, - * tqent_flags _may_ change within the call. */ + * tqent_flags _may_ change within the call. + */ tqt->tqt_flags = t->tqent_flags; taskq_insert_in_order(tq, tqt); @@ -903,8 +907,10 @@ taskq_thread(void *args) if (!(tqt->tqt_flags & TQENT_FLAG_PREALLOC)) task_done(tq, t); - /* When the current lowest outstanding taskqid is - * done calculate the new lowest outstanding id */ + /* + * When the current lowest outstanding taskqid is + * done calculate the new lowest outstanding id + */ if (tq->tq_lowest_id == tqt->tqt_id) { tq->tq_lowest_id = taskq_lowest_id(tq); ASSERT3S(tq->tq_lowest_id, >, tqt->tqt_id); @@ -999,18 +1005,18 @@ taskq_create(const char *name, int nthreads, pri_t pri, spin_lock_init(&tq->tq_lock); INIT_LIST_HEAD(&tq->tq_thread_list); INIT_LIST_HEAD(&tq->tq_active_list); - tq->tq_name = strdup(name); - tq->tq_nactive = 0; - tq->tq_nthreads = 0; - tq->tq_nspawn = 0; + tq->tq_name = strdup(name); + tq->tq_nactive = 0; + tq->tq_nthreads = 0; + tq->tq_nspawn = 0; tq->tq_maxthreads = nthreads; - tq->tq_pri = pri; - tq->tq_minalloc = minalloc; - tq->tq_maxalloc = maxalloc; - tq->tq_nalloc = 0; - tq->tq_flags = (flags | TASKQ_ACTIVE); - tq->tq_next_id = 1; - tq->tq_lowest_id = 1; + tq->tq_pri = pri; + tq->tq_minalloc = minalloc; + tq->tq_maxalloc = maxalloc; + tq->tq_nalloc = 0; + tq->tq_flags = (flags | TASKQ_ACTIVE); + tq->tq_next_id = 1; + tq->tq_lowest_id = 1; INIT_LIST_HEAD(&tq->tq_free_list); INIT_LIST_HEAD(&tq->tq_pend_list); INIT_LIST_HEAD(&tq->tq_prio_list); @@ -1136,8 +1142,9 @@ spl_taskq_init(void) return (1); } - /* This is used to annotate tq_lock, so - * taskq_dispatch -> taskq_thread_spawn -> taskq_dispatch + /* + * This is used to annotate tq_lock, so + * taskq_dispatch -> taskq_thread_spawn -> taskq_dispatch * does not trigger a lockdep warning re: possible recursive locking */ dynamic_taskq->tq_lock_class = TQ_LOCK_DYNAMIC; From cb877e0ff2648085c56ab78f15740f2b64bab849 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Dec 2015 16:57:05 -0800 Subject: [PATCH 0937/1062] Revert "Skip GPL-only symbols test when cross-compiling" This reverts commit 61bbbd9a775a5517af513e5014edbdd73a32f7e4 because older versions of autoconf (2.63) do not support the cross-compile argument to AC_RUN_IFELSE. Signed-off-by: Brian Behlendorf Issue #507 --- config/spl-build.m4 | 1 - 1 file changed, 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 748e9e16d..daa9eb714 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -683,7 +683,6 @@ AC_DEFUN([SPL_AC_TEST_MODULE], AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1], [Define to 1 if GPL-only symbols can be used]) ], [ - ], [ ]) ]) From e0ed96fa43e1d34751ef8a750a7816852b1d09b3 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sat, 12 Dec 2015 13:35:49 +0100 Subject: [PATCH 0938/1062] Skip GPL-only symbols test when cross-compiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kamil Domański Signed-off-by: Brian Behlendorf Closes zfsonlinux/spl#507 Closes zfsonlinux/zfs#4075 --- config/spl-build.m4 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index daa9eb714..b9c04a95e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -673,16 +673,19 @@ AC_DEFUN([SPL_AC_TEST_MODULE], fi ]) - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([ - #include "$LINUX/include/linux/license.h" + AS_IF([test "x$cross_compiling" != xyes], [ + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([ + #include "$LINUX/include/linux/license.h" + ], [ + return !license_is_gpl_compatible( + "$SPL_META_LICENSE"); + ]) + ], [ + AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1], + [Define to 1 if GPL-only symbols can be used]) ], [ - return !license_is_gpl_compatible("$SPL_META_LICENSE"); ]) - ], [ - AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1], - [Define to 1 if GPL-only symbols can be used]) - ], [ ]) ]) From 200366f23f1a16874d78a07936c5a33f2d488022 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Mon, 19 Oct 2015 07:47:52 -0500 Subject: [PATCH 0939/1062] Provide kstat for taskqs This patch provides 2 new kstats to display task queues: /proc/spl/taskqs-all - Display all task queues /proc/spl/taskqs - Display only "active" task queues A task queue is considered to be "active" if it currently has active (running) threads or if any of its pending, priority, delay or waitq lists are not empty. If the task queue has running threads, displays each thread function's address (symbolically, if possibly) and its argument. If the task queue has a non-empty list of pending, priority or delayed task queue entries (taskq_ent_t), displays each entry's thread function address and arguemnt. If the task queue has any waiters, displays each waiting task's pid. Note: This patch also updates some comments in taskq.h which referred to "taskq_t" when they should have referred to "taskq_ent_t". Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #491 --- include/sys/taskq.h | 21 ++-- module/spl/spl-proc.c | 237 +++++++++++++++++++++++++++++++++++++++++ module/spl/spl-taskq.c | 32 ++++++ 3 files changed, 283 insertions(+), 7 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index ed6aff8f8..544dbb2bb 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -32,6 +32,7 @@ #include #include #include +#include #define TASKQ_NAMELEN 31 @@ -70,6 +71,7 @@ typedef void (task_func_t)(void *); typedef struct taskq { spinlock_t tq_lock; /* protects taskq_t */ char *tq_name; /* taskq name */ + int tq_instance; /* instance of tq_name */ struct list_head tq_thread_list; /* list of all threads */ struct list_head tq_active_list; /* list of active threads */ int tq_nactive; /* # of active threads */ @@ -77,16 +79,17 @@ typedef struct taskq { int tq_nspawn; /* # of threads being spawned */ int tq_maxthreads; /* # of threads maximum */ int tq_pri; /* priority */ - int tq_minalloc; /* min task_t pool size */ - int tq_maxalloc; /* max task_t pool size */ - int tq_nalloc; /* cur task_t pool size */ + int tq_minalloc; /* min taskq_ent_t pool size */ + int tq_maxalloc; /* max taskq_ent_t pool size */ + int tq_nalloc; /* cur taskq_ent_t pool size */ uint_t tq_flags; /* flags */ taskqid_t tq_next_id; /* next pend/work id */ taskqid_t tq_lowest_id; /* lowest pend/work id */ - struct list_head tq_free_list; /* free task_t's */ - struct list_head tq_pend_list; /* pending task_t's */ - struct list_head tq_prio_list; /* priority pending task_t's */ - struct list_head tq_delay_list; /* delayed task_t's */ + struct list_head tq_free_list; /* free taskq_ent_t's */ + struct list_head tq_pend_list; /* pending taskq_ent_t's */ + struct list_head tq_prio_list; /* priority pending taskq_ent_t's */ + struct list_head tq_delay_list; /* delayed taskq_ent_t's */ + struct list_head tq_taskqs; /* all taskq_t's */ wait_queue_head_t tq_work_waitq; /* new work waitq */ wait_queue_head_t tq_wait_waitq; /* wait waitq */ tq_lock_role_t tq_lock_class; /* class when taking tq_lock */ @@ -120,6 +123,10 @@ typedef struct taskq_thread { /* Global system-wide dynamic task queue available for all consumers */ extern taskq_t *system_taskq; +/* List of all taskqs */ +extern struct list_head tq_list; +extern struct rw_semaphore tq_list_sem; + extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); extern taskqid_t taskq_dispatch_delay(taskq_t *, task_func_t, void *, uint_t, clock_t); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index eb00505d6..db546ea61 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,8 @@ static struct ctl_table_header *spl_header = NULL; static struct proc_dir_entry *proc_spl = NULL; static struct proc_dir_entry *proc_spl_kmem = NULL; static struct proc_dir_entry *proc_spl_kmem_slab = NULL; +static struct proc_dir_entry *proc_spl_taskq_all = NULL; +static struct proc_dir_entry *proc_spl_taskq = NULL; struct proc_dir_entry *proc_spl_kstat = NULL; static int @@ -215,6 +218,176 @@ proc_dohostid(struct ctl_table *table, int write, return (rc); } +static void +taskq_seq_show_headers(struct seq_file *f) +{ + seq_printf(f, "%-25s %5s %5s %5s %5s %5s %5s %12s %5s %10s\n", + "taskq", "act", "nthr", "spwn", "maxt", "pri", + "mina", "maxa", "cura", "flags"); +} + +/* indices into the lheads array below */ +#define LHEAD_PEND 0 +#define LHEAD_PRIO 1 +#define LHEAD_DELAY 2 +#define LHEAD_WAIT 3 +#define LHEAD_ACTIVE 4 +#define LHEAD_SIZE 5 + +static int +taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) +{ + taskq_t *tq = p; + taskq_thread_t *tqt; + wait_queue_t *wq; + struct task_struct *tsk; + taskq_ent_t *tqe; + char name[100]; + struct list_head *lheads[LHEAD_SIZE], *lh; + static char *list_names[LHEAD_SIZE] = + {"pend", "prio", "delay", "wait", "active" }; + int i, j, have_lheads = 0; + unsigned long wflags, flags; + + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + spin_lock_irqsave(&tq->tq_wait_waitq.lock, wflags); + + /* get the various lists and check whether they're empty */ + lheads[LHEAD_PEND] = &tq->tq_pend_list; + lheads[LHEAD_PRIO] = &tq->tq_prio_list; + lheads[LHEAD_DELAY] = &tq->tq_delay_list; + lheads[LHEAD_WAIT] = &tq->tq_wait_waitq.task_list; + lheads[LHEAD_ACTIVE] = &tq->tq_active_list; + + for (i = 0; i < LHEAD_SIZE; ++i) { + if (list_empty(lheads[i])) + lheads[i] = NULL; + else + ++have_lheads; + } + + /* early return in non-"all" mode if lists are all empty */ + if (!allflag && !have_lheads) { + spin_unlock_irqrestore(&tq->tq_wait_waitq.lock, wflags); + spin_unlock_irqrestore(&tq->tq_lock, flags); + return (0); + } + + /* unlock the waitq quickly */ + if (!lheads[LHEAD_WAIT]) + spin_unlock_irqrestore(&tq->tq_wait_waitq.lock, wflags); + + /* show the base taskq contents */ + snprintf(name, sizeof(name), "%s/%d", tq->tq_name, tq->tq_instance); + seq_printf(f, "%-25s ", name); + seq_printf(f, "%5d %5d %5d %5d %5d %5d %12d %5d %10x\n", + tq->tq_nactive, tq->tq_nthreads, tq->tq_nspawn, + tq->tq_maxthreads, tq->tq_pri, tq->tq_minalloc, tq->tq_maxalloc, + tq->tq_nalloc, tq->tq_flags); + + /* show the active list */ + if (lheads[LHEAD_ACTIVE]) { + j = 0; + list_for_each_entry(tqt, &tq->tq_active_list, tqt_active_list) { + if (j == 0) + seq_printf(f, "\t%s:", list_names[LHEAD_ACTIVE]); + else if (j == 2) { + seq_printf(f, "\n\t "); + j = 0; + } + seq_printf(f, " [%d]%pf(%ps)", + tqt->tqt_thread->pid, + tqt->tqt_task->tqent_func, + tqt->tqt_task->tqent_arg); + ++j; + } + seq_printf(f, "\n"); + } + + for (i = LHEAD_PEND; i <= LHEAD_WAIT; ++i) + if (lheads[i]) { + j = 0; + list_for_each(lh, lheads[i]) { + /* show the wait waitq list */ + if (i == LHEAD_WAIT) { + wq = list_entry(lh, wait_queue_t, task_list); + if (j == 0) + seq_printf(f, "\t%s:", + list_names[i]); + else if (j == 12) { + seq_printf(f, "\n\t "); + j = 0; + } + tsk = wq->private; + seq_printf(f, " %d", tsk->pid); + /* pend, prio and delay lists */ + } else { + tqe = list_entry(lh, taskq_ent_t, + tqent_list); + if (j == 0) + seq_printf(f, "\t%s:", + list_names[i]); + else if (j == 2) { + seq_printf(f, "\n\t "); + j = 0; + } + seq_printf(f, " %pf(%ps)", + tqe->tqent_func, + tqe->tqent_arg); + } + ++j; + } + seq_printf(f, "\n"); + } + if (lheads[LHEAD_WAIT]) + spin_unlock_irqrestore(&tq->tq_wait_waitq.lock, wflags); + spin_unlock_irqrestore(&tq->tq_lock, flags); + + return (0); +} + +static int +taskq_all_seq_show(struct seq_file *f, void *p) +{ + return (taskq_seq_show_impl(f, p, B_TRUE)); +} + +static int +taskq_seq_show(struct seq_file *f, void *p) +{ + return (taskq_seq_show_impl(f, p, B_FALSE)); +} + +static void * +taskq_seq_start(struct seq_file *f, loff_t *pos) +{ + struct list_head *p; + loff_t n = *pos; + + down_read(&tq_list_sem); + if (!n) + taskq_seq_show_headers(f); + + p = tq_list.next; + while (n--) { + p = p->next; + if (p == &tq_list) + return (NULL); + } + + return (list_entry(p, taskq_t, tq_taskqs)); +} + +static void * +taskq_seq_next(struct seq_file *f, void *p, loff_t *pos) +{ + taskq_t *tq = p; + + ++*pos; + return ((tq->tq_taskqs.next == &tq_list) ? + NULL : list_entry(tq->tq_taskqs.next, taskq_t, tq_taskqs)); +} + static void slab_seq_show_headers(struct seq_file *f) { @@ -325,6 +498,52 @@ static struct file_operations proc_slab_operations = { .release = seq_release, }; +static void +taskq_seq_stop(struct seq_file *f, void *v) +{ + up_read(&tq_list_sem); +} + +static struct seq_operations taskq_all_seq_ops = { + .show = taskq_all_seq_show, + .start = taskq_seq_start, + .next = taskq_seq_next, + .stop = taskq_seq_stop, +}; + +static struct seq_operations taskq_seq_ops = { + .show = taskq_seq_show, + .start = taskq_seq_start, + .next = taskq_seq_next, + .stop = taskq_seq_stop, +}; + +static int +proc_taskq_all_open(struct inode *inode, struct file *filp) +{ + return seq_open(filp, &taskq_all_seq_ops); +} + +static int +proc_taskq_open(struct inode *inode, struct file *filp) +{ + return seq_open(filp, &taskq_seq_ops); +} + +static struct file_operations proc_taskq_all_operations = { + .open = proc_taskq_all_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + +static struct file_operations proc_taskq_operations = { + .open = proc_taskq_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + static struct ctl_table spl_kmem_table[] = { #ifdef DEBUG_KMEM { @@ -476,6 +695,20 @@ spl_proc_init(void) goto out; } + proc_spl_taskq_all = proc_create_data("taskq-all", 0444, + proc_spl, &proc_taskq_all_operations, NULL); + if (proc_spl_taskq_all == NULL) { + rc = -EUNATCH; + goto out; + } + + proc_spl_taskq = proc_create_data("taskq", 0444, + proc_spl, &proc_taskq_operations, NULL); + if (proc_spl_taskq == NULL) { + rc = -EUNATCH; + goto out; + } + proc_spl_kmem = proc_mkdir("kmem", proc_spl); if (proc_spl_kmem == NULL) { rc = -EUNATCH; @@ -499,6 +732,8 @@ out: remove_proc_entry("kstat", proc_spl); remove_proc_entry("slab", proc_spl_kmem); remove_proc_entry("kmem", proc_spl); + remove_proc_entry("taskq-all", proc_spl); + remove_proc_entry("taskq", proc_spl); remove_proc_entry("spl", NULL); unregister_sysctl_table(spl_header); } @@ -512,6 +747,8 @@ spl_proc_fini(void) remove_proc_entry("kstat", proc_spl); remove_proc_entry("slab", proc_spl_kmem); remove_proc_entry("kmem", proc_spl); + remove_proc_entry("taskq-all", proc_spl); + remove_proc_entry("taskq", proc_spl); remove_proc_entry("spl", NULL); ASSERT(spl_header != NULL); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 89d68f33c..db5d8fba1 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -54,6 +54,10 @@ EXPORT_SYMBOL(system_taskq); static taskq_t *dynamic_taskq; static taskq_thread_t *taskq_thread_create(taskq_t *); +/* List of all taskqs */ +LIST_HEAD(tq_list); +DECLARE_RWSEM(tq_list_sem); + static int task_km_flags(uint_t flags) { @@ -66,6 +70,23 @@ task_km_flags(uint_t flags) return (KM_SLEEP); } +/* + * taskq_find_by_name - Find the largest instance number of a named taskq. + */ +static int +taskq_find_by_name(const char *name) +{ + struct list_head *tql; + taskq_t *tq; + + list_for_each_prev(tql, &tq_list) { + tq = list_entry(tql, taskq_t, tq_taskqs); + if (strcmp(name, tq->tq_name) == 0) + return tq->tq_instance; + } + return (-1); +} + /* * NOTE: Must be called with tq->tq_lock held, returns a list_t which * is not attached to the free, work, or pending taskq lists. @@ -1024,6 +1045,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, init_waitqueue_head(&tq->tq_work_waitq); init_waitqueue_head(&tq->tq_wait_waitq); tq->tq_lock_class = TQ_LOCK_GENERAL; + INIT_LIST_HEAD(&tq->tq_taskqs); if (flags & TASKQ_PREPOPULATE) { spin_lock_irqsave_nested(&tq->tq_lock, irqflags, @@ -1053,6 +1075,11 @@ taskq_create(const char *name, int nthreads, pri_t pri, if (rc) { taskq_destroy(tq); tq = NULL; + } else { + down_write(&tq_list_sem); + tq->tq_instance = taskq_find_by_name(name) + 1; + list_add_tail(&tq->tq_taskqs, &tq_list); + up_write(&tq_list_sem); } return (tq); @@ -1081,6 +1108,11 @@ taskq_destroy(taskq_t *tq) taskq_wait(tq); + /* remove taskq from global list used by the kstats */ + down_write(&tq_list_sem); + list_del(&tq->tq_taskqs); + up_write(&tq_list_sem); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); /* From b4ad50ac5f16de9220452f0da493e67c060d701b Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 17 Dec 2015 18:31:58 -0800 Subject: [PATCH 0940/1062] Use spl_fstrans_mark instead of memalloc_noio_save For earlier versions of the kernel with memalloc_noio_save, it only turns off __GFP_IO but leaves __GFP_FS untouched during direct reclaim. This would cause threads to direct reclaim into ZFS and cause deadlock. Instead, we should stick to using spl_fstrans_mark. Since we would explicitly turn off both __GFP_IO and __GFP_FS before allocation, it will work on every version of the kernel. This impacts kernel versions 3.9-3.17, see upstream kernel commit torvalds/linux@934f307 for reference. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #515 Issue zfsonlinux/zfs#4111 --- include/sys/vmem.h | 1 - module/spl/spl-kmem-cache.c | 9 ++------- module/spl/spl-kmem.c | 4 ++-- module/spl/spl-taskq.c | 4 +--- module/spl/spl-vmem.c | 25 ------------------------- 5 files changed, 5 insertions(+), 38 deletions(-) diff --git a/include/sys/vmem.h b/include/sys/vmem.h index eb4828052..a9b12eeb9 100644 --- a/include/sys/vmem.h +++ b/include/sys/vmem.h @@ -36,7 +36,6 @@ extern vmem_t *zio_alloc_arena; extern vmem_t *zio_arena; extern size_t vmem_size(vmem_t *vmp, int typemask); -extern void *spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot); /* * Memory allocation interfaces diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 846d24300..e3edca5a0 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -201,7 +201,7 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) ASSERT(ISP2(size)); ptr = (void *)__get_free_pages(lflags, get_order(size)); } else { - ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL); + ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL); } /* Resulting allocated memory will be page aligned */ @@ -1156,15 +1156,10 @@ spl_cache_grow_work(void *data) spl_kmem_cache_t *skc = ska->ska_cache; spl_kmem_slab_t *sks; -#if defined(PF_MEMALLOC_NOIO) - unsigned noio_flag = memalloc_noio_save(); - sks = spl_slab_alloc(skc, ska->ska_flags); - memalloc_noio_restore(noio_flag); -#else fstrans_cookie_t cookie = spl_fstrans_mark(); sks = spl_slab_alloc(skc, ska->ska_flags); spl_fstrans_unmark(cookie); -#endif + spin_lock(&skc->skc_lock); if (sks) { skc->skc_slab_total++; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 92263f8f4..0931fdfcf 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -185,7 +185,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node) */ if ((size > spl_kmem_alloc_max) || use_vmem) { if (flags & KM_VMEM) { - ptr = spl_vmalloc(size, lflags, PAGE_KERNEL); + ptr = __vmalloc(size, lflags, PAGE_KERNEL); } else { return (NULL); } @@ -198,7 +198,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node) /* * For vmem_alloc() and vmem_zalloc() callers retry immediately - * using spl_vmalloc() which is unlikely to fail. + * using __vmalloc() which is unlikely to fail. */ if ((flags & KM_VMEM) && (use_vmem == 0)) { use_vmem = 1; diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index db5d8fba1..5f2b725c9 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -849,9 +849,7 @@ taskq_thread(void *args) tq = tqt->tqt_tq; current->flags |= PF_NOFREEZE; -#if defined(PF_MEMALLOC_NOIO) - (void) memalloc_noio_save(); -#endif + (void) spl_fstrans_mark(); sigfillset(&blocked); sigprocmask(SIG_BLOCK, &blocked, NULL); diff --git a/module/spl/spl-vmem.c b/module/spl/spl-vmem.c index bca27f263..e177988a7 100644 --- a/module/spl/spl-vmem.c +++ b/module/spl/spl-vmem.c @@ -97,31 +97,6 @@ spl_vmem_free(const void *buf, size_t size) } EXPORT_SYMBOL(spl_vmem_free); -/* - * Public vmalloc() interface designed to be safe to be called during I/O. - */ -void * -spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot) -{ -#if defined(PF_MEMALLOC_NOIO) - void *ptr; - unsigned noio_flag = 0; - - if (spl_fstrans_check()) - noio_flag = memalloc_noio_save(); - - ptr = __vmalloc(size, lflags, prot); - - if (spl_fstrans_check()) - memalloc_noio_restore(noio_flag); - - return (ptr); -#else - return (__vmalloc(size, lflags, prot)); -#endif -} -EXPORT_SYMBOL(spl_vmalloc); - int spl_vmem_init(void) { From 2a552736b7fc2bcb810cc520abd2ff9e229a9904 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 22 Dec 2015 09:26:10 -0800 Subject: [PATCH 0941/1062] Fix do_div() types in condvar:timeout The do_div() macro expects unsigned types and this is detected in powerpc implementation of do_div(). Signed-off-by: Brian Behlendorf Closes #516 --- module/splat/splat-condvar.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index ed633acda..af40a7258 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -383,8 +383,8 @@ splat_condvar_test5(struct file *file, void *arg) kcondvar_t condvar; kmutex_t mtx; clock_t time_left, time_before, time_after, time_delta; - int64_t whole_delta; - int32_t remain_delta; + uint64_t whole_delta; + uint32_t remain_delta; int rc = 0; mutex_init(&mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); @@ -408,19 +408,20 @@ splat_condvar_test5(struct file *file, void *arg) splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread correctly timed out and was asleep " "for %d.%d seconds (%d second min)\n", - (int)whole_delta, remain_delta, 1); + (int)whole_delta, (int)remain_delta, 1); } else { splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread correctly timed out but was only " "asleep for %d.%d seconds (%d second " - "min)\n", (int)whole_delta, remain_delta, 1); + "min)\n", (int)whole_delta, + (int)remain_delta, 1); rc = -ETIMEDOUT; } } else { splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread exited after only %d.%d seconds, it " "did not hit the %d second timeout\n", - (int)whole_delta, remain_delta, 1); + (int)whole_delta, (int)remain_delta, 1); rc = -ETIMEDOUT; } From 466bcf3be5040e161219a7aab14b618a672d4402 Mon Sep 17 00:00:00 2001 From: Alex McWhirter Date: Fri, 8 Jan 2016 03:55:57 -0500 Subject: [PATCH 0942/1062] _ILP32 is always defined on SPARC Signed-off-by: Alex McWhirter Signed-off-by: Brian Behlendorf Closes #520 --- include/sys/isa_defs.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 49fe773d4..7e15b9321 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -118,10 +118,6 @@ #define __sparc__ #endif -#if !defined(_ILP32) -#define _ILP32 -#endif - #if defined(__arch64__) #if !defined(_LP64) #define _LP64 From d297a5a3a1cfa6341ef301780b4fd0545c851bdc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 14 Dec 2015 09:59:28 -0800 Subject: [PATCH 0943/1062] Add spl_kmem_cache_kmem_threads man page entry The spl_kmem_cache_kmem_threads module option was accidentally omitted from the documentation. Add it. Signed-off-by: Brian Behlendorf Closes #512 --- man/man5/spl-module-parameters.5 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index acdd5b658..1d4d73e60 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -41,6 +41,20 @@ concurrently. Default value: \fB0x02\fR .RE +.sp +.ne 2 +.na +\fBspl_kmem_cache_kmem_threads\fR (uint) +.ad +.RS 12n +The number of threads created for the spl_kmem_cache task queue. This task +queue is responsible for allocating new slabs for use by the kmem caches. +For the majority of systems and workloads only a small number of threads are +required. +.sp +Default value: \fB4\fR +.RE + .sp .ne 2 .na From e843553d0341c4edd880f5ad40da8211669348bd Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 6 Jan 2016 19:05:24 -0800 Subject: [PATCH 0944/1062] Don't hold mutex until release cv in cv_wait If a thread is holding mutex when doing cv_destroy, it might end up waiting a thread in cv_wait. The waiter would wake up trying to aquire the same mutex and cause deadlock. We solve this by move the mutex_enter to the bottom of cv_wait, so that the waiter will release the cv first, allowing cv_destroy to succeed and have a chance to free the mutex. This would create race condition on the cv_mutex. We use xchg to set and check it to ensure we won't be harmed by the race. This would result in the cv_mutex debugging becomes best-effort. Also, the change reveals a race, which was unlikely before, where we call mutex_destroy while test threads are still holding the mutex. We use kthread_stop to make sure the threads are exit before mutex_destroy. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue zfsonlinux/zfs#4166 Issue zfsonlinux/zfs#4106 --- module/spl/spl-condvar.c | 55 ++++++++++++++++++++++++++---------- module/splat/splat-condvar.c | 30 ++++++++++++++++++++ 2 files changed, 70 insertions(+), 15 deletions(-) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index c3467a56e..c420d18ca 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -80,6 +80,7 @@ static void cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) { DEFINE_WAIT(wait); + kmutex_t *m; ASSERT(cvp); ASSERT(mp); @@ -87,11 +88,11 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) ASSERT(mutex_owned(mp)); atomic_inc(&cvp->cv_refs); - if (cvp->cv_mutex == NULL) - cvp->cv_mutex = mp; - + m = ACCESS_ONCE(cvp->cv_mutex); + if (!m) + m = xchg(&cvp->cv_mutex, mp); /* Ensure the same mutex is used by all callers */ - ASSERT(cvp->cv_mutex == mp); + ASSERT(m == NULL || m == mp); prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); @@ -106,16 +107,25 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) io_schedule(); else schedule(); - mutex_enter(mp); /* No more waiters a different mutex could be used */ if (atomic_dec_and_test(&cvp->cv_waiters)) { + /* + * This is set without any lock, so it's racy. But this is + * just for debug anyway, so make it best-effort + */ cvp->cv_mutex = NULL; wake_up(&cvp->cv_destroy); } finish_wait(&cvp->cv_event, &wait); atomic_dec(&cvp->cv_refs); + + /* + * Hold mutex after we release the cvp, otherwise we could dead lock + * with a thread holding the mutex and call cv_destroy. + */ + mutex_enter(mp); } void @@ -148,6 +158,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, int state) { DEFINE_WAIT(wait); + kmutex_t *m; clock_t time_left; ASSERT(cvp); @@ -156,15 +167,16 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, ASSERT(mutex_owned(mp)); atomic_inc(&cvp->cv_refs); - if (cvp->cv_mutex == NULL) - cvp->cv_mutex = mp; - + m = ACCESS_ONCE(cvp->cv_mutex); + if (!m) + m = xchg(&cvp->cv_mutex, mp); /* Ensure the same mutex is used by all callers */ - ASSERT(cvp->cv_mutex == mp); + ASSERT(m == NULL || m == mp); /* XXX - Does not handle jiffie wrap properly */ time_left = expire_time - jiffies; if (time_left <= 0) { + /* XXX - doesn't reset cv_mutex */ atomic_dec(&cvp->cv_refs); return (-1); } @@ -179,10 +191,13 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, */ mutex_exit(mp); time_left = schedule_timeout(time_left); - mutex_enter(mp); /* No more waiters a different mutex could be used */ if (atomic_dec_and_test(&cvp->cv_waiters)) { + /* + * This is set without any lock, so it's racy. But this is + * just for debug anyway, so make it best-effort + */ cvp->cv_mutex = NULL; wake_up(&cvp->cv_destroy); } @@ -190,6 +205,11 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, finish_wait(&cvp->cv_event, &wait); atomic_dec(&cvp->cv_refs); + /* + * Hold mutex after we release the cvp, otherwise we could dead lock + * with a thread holding the mutex and call cv_destroy. + */ + mutex_enter(mp); return (time_left > 0 ? time_left : -1); } @@ -216,6 +236,7 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, int state) { DEFINE_WAIT(wait); + kmutex_t *m; hrtime_t time_left, now; unsigned long time_left_us; @@ -225,11 +246,11 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, ASSERT(mutex_owned(mp)); atomic_inc(&cvp->cv_refs); - if (cvp->cv_mutex == NULL) - cvp->cv_mutex = mp; - + m = ACCESS_ONCE(cvp->cv_mutex); + if (!m) + m = xchg(&cvp->cv_mutex, mp); /* Ensure the same mutex is used by all callers */ - ASSERT(cvp->cv_mutex == mp); + ASSERT(m == NULL || m == mp); now = gethrtime(); time_left = expire_time - now; @@ -253,10 +274,13 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, * interrupts */ usleep_range(time_left_us, time_left_us + 100); - mutex_enter(mp); /* No more waiters a different mutex could be used */ if (atomic_dec_and_test(&cvp->cv_waiters)) { + /* + * This is set without any lock, so it's racy. But this is + * just for debug anyway, so make it best-effort + */ cvp->cv_mutex = NULL; wake_up(&cvp->cv_destroy); } @@ -264,6 +288,7 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, finish_wait(&cvp->cv_event, &wait); atomic_dec(&cvp->cv_refs); + mutex_enter(mp); time_left = expire_time - gethrtime(); return (time_left > 0 ? time_left : -1); } diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index af40a7258..bdbaf79c8 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -88,6 +88,9 @@ splat_condvar_test12_thread(void *arg) ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters)); mutex_exit(&cv->cv_mtx); + /* wait for main thread reap us */ + while (!kthread_should_stop()) + schedule(); return 0; } @@ -151,6 +154,12 @@ splat_condvar_test1(struct file *file, void *arg) /* Wake everything for the failure case */ cv_broadcast(&cv.cv_condvar); cv_destroy(&cv.cv_condvar); + + /* wait for threads to exit */ + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { + if (!IS_ERR(ct[i].ct_thread)) + kthread_stop(ct[i].ct_thread); + } mutex_destroy(&cv.cv_mtx); return rc; @@ -199,6 +208,12 @@ splat_condvar_test2(struct file *file, void *arg) /* Wake everything for the failure case */ cv_destroy(&cv.cv_condvar); + + /* wait for threads to exit */ + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { + if (!IS_ERR(ct[i].ct_thread)) + kthread_stop(ct[i].ct_thread); + } mutex_destroy(&cv.cv_mtx); return rc; @@ -234,6 +249,9 @@ splat_condvar_test34_thread(void *arg) mutex_exit(&cv->cv_mtx); + /* wait for main thread reap us */ + while (!kthread_should_stop()) + schedule(); return 0; } @@ -302,6 +320,12 @@ splat_condvar_test3(struct file *file, void *arg) /* Wake everything for the failure case */ cv_broadcast(&cv.cv_condvar); cv_destroy(&cv.cv_condvar); + + /* wait for threads to exit */ + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { + if (!IS_ERR(ct[i].ct_thread)) + kthread_stop(ct[i].ct_thread); + } mutex_destroy(&cv.cv_mtx); return rc; @@ -372,6 +396,12 @@ splat_condvar_test4(struct file *file, void *arg) /* Wake everything for the failure case */ cv_broadcast(&cv.cv_condvar); cv_destroy(&cv.cv_condvar); + + /* wait for threads to exit */ + for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { + if (!IS_ERR(ct[i].ct_thread)) + kthread_stop(ct[i].ct_thread); + } mutex_destroy(&cv.cv_mtx); return rc; From d348f23a6a9b3017524b66c9f7c9d32ec283e178 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Mon, 18 Jan 2016 14:41:45 -0800 Subject: [PATCH 0945/1062] Turn on both PF_FSTRANS and PF_MEMALLOC_NOIO in spl_fstrans_mark In b4ad50a, we abandoned memalloc_noio_save in favor of spl_fstrans_mark because earlier kernel with it doesn't turn off __GFP_FS. However, for newer kernel, we would prefer PF_MEMALLOC_NOIO because it would work for allocation in kernel which we cannot control otherwise. So in this patch, we turn on both PF_FSTRANS and PF_MEMALLOC_NOIO in spl_fstrans_mark. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #523 --- include/sys/kmem.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 8d5e72937..d4b3bf680 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -78,14 +78,20 @@ typedef struct { unsigned int saved_flags; } fstrans_cookie_t; +#ifdef PF_MEMALLOC_NOIO +#define SPL_FSTRANS (PF_FSTRANS|PF_MEMALLOC_NOIO) +#else +#define SPL_FSTRANS (PF_FSTRANS) +#endif + static inline fstrans_cookie_t spl_fstrans_mark(void) { fstrans_cookie_t cookie; cookie.fstrans_thread = current; - cookie.saved_flags = current->flags & PF_FSTRANS; - current->flags |= PF_FSTRANS; + cookie.saved_flags = current->flags & SPL_FSTRANS; + current->flags |= SPL_FSTRANS; return (cookie); } @@ -94,9 +100,9 @@ static inline void spl_fstrans_unmark(fstrans_cookie_t cookie) { ASSERT3P(cookie.fstrans_thread, ==, current); - ASSERT(current->flags & PF_FSTRANS); + ASSERT((current->flags & SPL_FSTRANS) == SPL_FSTRANS); - current->flags &= ~(PF_FSTRANS); + current->flags &= ~SPL_FSTRANS; current->flags |= cookie.saved_flags; } From de77e245902cc5bb6c22591d54e31c7647ff912f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 19 Jan 2016 08:59:47 -0800 Subject: [PATCH 0946/1062] Linux 4.5 compat: pfn_t typedef The pfn_t typedef was inherited from Illumos but never directly used by any SPL consumers. This didn't cause any issues until the Linux 4.5 kernel introduced a typedef of the same name. See torvalds/linux/commit/34c0fd54, this patch removes the unused Illumos version to prevent a conflict. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Signed-off-by: Chunwei Chen Closes #524 --- include/sys/types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/sys/types.h b/include/sys/types.h index ec0455cdc..d718ca0fa 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -58,7 +58,6 @@ typedef longlong_t diskaddr_t; typedef ushort_t o_mode_t; typedef uint_t major_t; typedef uint_t minor_t; -typedef ulong_t pfn_t; typedef ulong_t pgcnt_t; typedef long spgcnt_t; typedef short index_t; From 16522ac29023d94bc29e97761b01b252117cbbfe Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 2 Dec 2015 14:52:46 -0800 Subject: [PATCH 0947/1062] Use tsd to store tq for taskq_member To prevent taskq_member holding tq_lock and doing linear search, thus causing contention. We store the taskq pointer to which the thread belongs in tsd. This way taskq_member will not need to touch tq_lock, and tsd has per slot spinlock. So the contention should be reduced greatly. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #500 Closes #504 Closes #505 --- include/sys/taskq.h | 2 +- include/sys/tsd.h | 1 + module/spl/spl-generic.c | 51 +++++++++++++++++++--------------------- module/spl/spl-taskq.c | 41 +++++++++----------------------- module/spl/spl-tsd.c | 27 +++++++++++++++++++++ 5 files changed, 64 insertions(+), 58 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 544dbb2bb..e7661f7ce 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -140,7 +140,7 @@ extern void taskq_wait_id(taskq_t *, taskqid_t); extern void taskq_wait_outstanding(taskq_t *, taskqid_t); extern void taskq_wait(taskq_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); -extern int taskq_member(taskq_t *, void *); +extern int taskq_member(taskq_t *, kthread_t *); #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ taskq_create(name, nthreads, pri, min, max, flags) diff --git a/include/sys/tsd.h b/include/sys/tsd.h index ebc55b09b..1894a8232 100644 --- a/include/sys/tsd.h +++ b/include/sys/tsd.h @@ -35,6 +35,7 @@ typedef void (*dtor_func_t)(void *); extern int tsd_set(uint_t, void *); extern void *tsd_get(uint_t); +extern void *tsd_get_by_thread(uint_t, kthread_t *); extern void tsd_create(uint_t *, dtor_func_t); extern void tsd_destroy(uint_t *); extern void tsd_exit(void); diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 4d9846cf5..dc3e74aa5 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -491,29 +491,20 @@ spl_kvmem_init(void) rc = spl_kmem_init(); if (rc) - goto out1; + return (rc); rc = spl_vmem_init(); - if (rc) - goto out2; + if (rc) { + spl_kmem_fini(); + return (rc); + } - rc = spl_kmem_cache_init(); - if (rc) - goto out3; - - return (rc); -out3: - spl_vmem_fini(); -out2: - spl_kmem_fini(); -out1: return (rc); } static void spl_kvmem_fini(void) { - spl_kmem_cache_fini(); spl_vmem_fini(); spl_kmem_fini(); } @@ -532,38 +523,43 @@ spl_init(void) if ((rc = spl_rw_init())) goto out3; - if ((rc = spl_taskq_init())) + if ((rc = spl_tsd_init())) goto out4; - if ((rc = spl_vn_init())) + if ((rc = spl_taskq_init())) goto out5; - if ((rc = spl_proc_init())) + if ((rc = spl_kmem_cache_init())) goto out6; - if ((rc = spl_kstat_init())) + if ((rc = spl_vn_init())) goto out7; - if ((rc = spl_tsd_init())) + if ((rc = spl_proc_init())) goto out8; - if ((rc = spl_zlib_init())) + if ((rc = spl_kstat_init())) goto out9; + if ((rc = spl_zlib_init())) + goto out10; + printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); return (rc); -out9: - spl_tsd_fini(); -out8: +out10: spl_kstat_fini(); -out7: +out9: spl_proc_fini(); -out6: +out8: spl_vn_fini(); -out5: +out7: + spl_kmem_cache_fini(); +out6: spl_taskq_fini(); +out5: + spl_tsd_fini(); out4: spl_rw_fini(); out3: @@ -584,11 +580,12 @@ spl_fini(void) printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); spl_zlib_fini(); - spl_tsd_fini(); spl_kstat_fini(); spl_proc_fini(); spl_vn_fini(); + spl_kmem_cache_fini(); spl_taskq_fini(); + spl_tsd_fini(); spl_rw_fini(); spl_mutex_fini(); spl_kvmem_fini(); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 5f2b725c9..2b3f3f4bc 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -26,6 +26,7 @@ #include #include +#include int spl_taskq_thread_bind = 0; module_param(spl_taskq_thread_bind, int, 0644); @@ -57,6 +58,7 @@ static taskq_thread_t *taskq_thread_create(taskq_t *); /* List of all taskqs */ LIST_HEAD(tq_list); DECLARE_RWSEM(tq_list_sem); +static uint_t taskq_tsd; static int task_km_flags(uint_t flags) @@ -474,38 +476,10 @@ taskq_wait(taskq_t *tq) } EXPORT_SYMBOL(taskq_wait); -static int -taskq_member_impl(taskq_t *tq, void *t) -{ - struct list_head *l; - taskq_thread_t *tqt; - int found = 0; - - ASSERT(tq); - ASSERT(t); - ASSERT(spin_is_locked(&tq->tq_lock)); - - list_for_each(l, &tq->tq_thread_list) { - tqt = list_entry(l, taskq_thread_t, tqt_thread_list); - if (tqt->tqt_thread == (struct task_struct *)t) { - found = 1; - break; - } - } - return (found); -} - int -taskq_member(taskq_t *tq, void *t) +taskq_member(taskq_t *tq, kthread_t *t) { - int found; - unsigned long flags; - - spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); - found = taskq_member_impl(tq, t); - spin_unlock_irqrestore(&tq->tq_lock, flags); - - return (found); + return (tq == (taskq_t *)tsd_get_by_thread(taskq_tsd, t)); } EXPORT_SYMBOL(taskq_member); @@ -855,6 +829,7 @@ taskq_thread(void *args) sigprocmask(SIG_BLOCK, &blocked, NULL); flush_signals(current); + tsd_set(taskq_tsd, tq); spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); /* Immediately exit if more threads than allowed were created. */ @@ -959,6 +934,8 @@ error: kmem_free(tqt, sizeof (taskq_thread_t)); spin_unlock_irqrestore(&tq->tq_lock, flags); + tsd_set(taskq_tsd, NULL); + return (0); } @@ -1160,6 +1137,8 @@ EXPORT_SYMBOL(taskq_destroy); int spl_taskq_init(void) { + tsd_create(&taskq_tsd, NULL); + system_taskq = taskq_create("spl_system_taskq", MAX(boot_ncpus, 64), maxclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC); if (system_taskq == NULL) @@ -1190,4 +1169,6 @@ spl_taskq_fini(void) taskq_destroy(system_taskq); system_taskq = NULL; + + tsd_destroy(&taskq_tsd); } diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index 4d0800e5a..bf8235063 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -527,6 +527,33 @@ tsd_get(uint_t key) } EXPORT_SYMBOL(tsd_get); +/* + * tsd_get_by_thread - get thread specific data for specified thread + * @key: lookup key + * @thread: thread to lookup + * + * Caller must prevent racing tsd_create() or tsd_destroy(). This + * implementation is designed to be fast and scalable, it does not + * lock the entire table only a single hash bin. + */ +void * +tsd_get_by_thread(uint_t key, kthread_t *thread) +{ + tsd_hash_entry_t *entry; + + ASSERT3P(tsd_hash_table, !=, NULL); + + if ((key == 0) || (key > TSD_KEYS_MAX)) + return (NULL); + + entry = tsd_hash_search(tsd_hash_table, key, thread->pid); + if (entry == NULL) + return (NULL); + + return (entry->he_value); +} +EXPORT_SYMBOL(tsd_get_by_thread); + /* * tsd_create - create thread specific data key * @keyp: lookup key address From 7323da1b2f337f5dab52452e7b765f4a0bc99b78 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Tue, 19 Jan 2016 10:15:24 -0800 Subject: [PATCH 0948/1062] Create spl-kmod-debuginfo rpm with redhat spec file Correct the redhat specfile so that working debuginfo rpms are created for the kernel modules. The generic specfile already does the right thing. Signed-off-by: Olaf Faaland Signed-off-by: Brian Behlendorf Closes zfsonlinux/zfs#4224 --- rpm/generic/spl-kmod.spec.in | 2 ++ rpm/redhat/spl-kmod.spec.in | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 6cac9c5a4..11d23fbe8 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -152,6 +152,8 @@ for kernel_version in %{?kernel_versions}; do INSTALL_MOD_DIR=%{kmodinstdir_postfix} cd .. done + +# find-debuginfo.sh only considers executables chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* %{?akmod_install} diff --git a/rpm/redhat/spl-kmod.spec.in b/rpm/redhat/spl-kmod.spec.in index 393528597..6fcc4a898 100644 --- a/rpm/redhat/spl-kmod.spec.in +++ b/rpm/redhat/spl-kmod.spec.in @@ -27,7 +27,6 @@ This package contains the kernel modules required to emulate several interfaces provided by the Solaris kernel. %define kmod_name spl -%define debug_package %{nil} %kernel_module_package -n %{kmod_name} -p %{_sourcedir}/kmod-preamble @@ -96,6 +95,8 @@ make install \ DESTDIR=${RPM_BUILD_ROOT} \ INSTALL_MOD_DIR=extra/%{kmod_name} %{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.* +# find-debuginfo.sh only considers executables +%{__chmod} u+x %{buildroot}/lib/modules/%{kverrel}/extra/*/*/* %clean rm -rf $RPM_BUILD_ROOT From be29e6a6e682123a009d20b2c5ab0b5393f43a8b Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 15 Dec 2015 11:48:19 -0500 Subject: [PATCH 0949/1062] kobj_read_file: Return -1 on vn_rdwr() error I noticed that the SPL implementation of kobj_read_file is not correct after comparing it with the userland implementation of kobj_read_file() in zfsonlinux/zfs#4104. Note that we no longer pass RLIM64_INFINITY with this, but our vn_rdwr implementation did not support it anyway, so there is no difference. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #513 --- include/sys/kobj.h | 4 ++-- module/spl/spl-kobj.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/sys/kobj.h b/include/sys/kobj.h index f95fa8039..334449a8e 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -35,8 +35,8 @@ typedef struct _buf buf_t; extern struct _buf *kobj_open_file(const char *name); extern void kobj_close_file(struct _buf *file); -extern int kobj_read_file(struct _buf *file, char *buf, - ssize_t size, offset_t off); +extern int kobj_read_file(struct _buf *file, char *buf, unsigned size, + unsigned off); extern int kobj_get_filesize(struct _buf *file, uint64_t *size); #endif /* SPL_KOBJ_H */ diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index 4dd14ba41..b79fcb828 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -57,10 +57,15 @@ kobj_close_file(struct _buf *file) EXPORT_SYMBOL(kobj_close_file); int -kobj_read_file(struct _buf *file, char *buf, ssize_t size, offset_t off) +kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off) { - return (vn_rdwr(UIO_READ, file->vp, buf, size, off, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL)); + ssize_t resid; + + if (vn_rdwr(UIO_READ, file->vp, buf, size, (offset_t)off, + UIO_SYSSPACE, 0, 0, 0, &resid) != 0) + return (-1); + + return (size - resid); } /* kobj_read_file() */ EXPORT_SYMBOL(kobj_read_file); From 6b38e7510fbeb64785c7e042d8384f2141e9c557 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 23 Jan 2016 11:13:08 -0800 Subject: [PATCH 0950/1062] Remove RLIM64_INFINITY assert in vn_rdwr() Previous commit be29e6a updated kobj_read_file() so it no longer unconditionally passes RLIM64_INFINITY. The vn_rdwr() function needs to be updated accordingly. Signed-off-by: Brian Behlendorf Issue #513 --- module/spl/spl-vnode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 86349c54a..80e4a0ffd 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -222,7 +222,6 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, ASSERT(vp->v_file); ASSERT(seg == UIO_SYSSPACE); ASSERT((ioflag & ~FAPPEND) == 0); - ASSERT(x2 == RLIM64_INFINITY); fp = vp->v_file; From d112232f5ec4b25e8446f9a2430d1a63908e6e5a Mon Sep 17 00:00:00 2001 From: Chip Parker Date: Mon, 25 Jan 2016 19:13:50 -0600 Subject: [PATCH 0951/1062] Ensure spl/ only occurs once in core-y Update copy-builtin so it may be run multiple times against the kernel source tree. This change makes sed more discriminating to ensure spl/ only occurs once in core-y. Signed-off-by: Chip Parker Signed-off-by: Brian Behlendorf Closes #526 --- copy-builtin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copy-builtin b/copy-builtin index aa4307386..34c482bab 100755 --- a/copy-builtin +++ b/copy-builtin @@ -116,7 +116,7 @@ add_after() add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"' # We must take care to build SPL before ZFS, otherwise the symbols required # to link ZFS will not be available. -sed -i 's#+= kernel/#+= kernel/ spl/#' "$KERNEL_DIR/Makefile" +sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile" echo >&2 echo " $0: done." >&2 From 8f3b403a73fa9b1db06050edf737e1f051b05070 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 27 Jan 2016 16:55:14 -0800 Subject: [PATCH 0952/1062] Allow kicking a taskq to spawn more threads This patch add a module parameter spl_taskq_kick. When writing non-zero value to it, it will scan all the taskq, if a taskq contains a task pending for more than 5 seconds, it will be forced to spawn a new thread. This is use as an emergency recovery from deadlock, not a general solution. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #529 --- include/sys/taskq.h | 1 + man/man5/spl-module-parameters.5 | 14 ++++++++ module/spl/spl-taskq.c | 60 ++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index e7661f7ce..19bc6c1dd 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -105,6 +105,7 @@ typedef struct taskq_ent { void *tqent_arg; taskq_t *tqent_taskq; uintptr_t tqent_flags; + unsigned long tqent_birth; } taskq_ent_t; #define TQENT_FLAG_PREALLOC 0x1 diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 1d4d73e60..1b760243e 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -250,6 +250,20 @@ may be overridden for non-standard configurations. Default value: \fB/etc/hostid\fR .RE +.sp +.ne 2 +.na +\fBspl_taskq_kick\fR (uint) +.ad +.RS 12n +Kick stuck taskq to spawn threads. When writing a non-zero value to it, it will +scan all the taskqs. If any of them have a pending task more than 5 seconds old, +it will kick it to spawn more threads. This can be used if you find a rare +deadlock occurs because one or more taskqs didn't spawn a thread when it should. +.sp +Default value: \fB0\fR +.RE + .sp .ne 2 .na diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 2b3f3f4bc..56034c899 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -221,6 +221,7 @@ task_expire(unsigned long data) return; } + t->tqent_birth = jiffies; /* * The priority list must be maintained in strict task id order * from lowest to highest for lowest_id to be easily calculable. @@ -583,6 +584,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) t->tqent_timer.data = 0; t->tqent_timer.function = NULL; t->tqent_timer.expires = 0; + t->tqent_birth = jiffies; ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC)); @@ -682,6 +684,7 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, t->tqent_func = func; t->tqent_arg = arg; t->tqent_taskq = tq; + t->tqent_birth = jiffies; spin_unlock(&t->tqent_lock); @@ -1134,6 +1137,63 @@ taskq_destroy(taskq_t *tq) } EXPORT_SYMBOL(taskq_destroy); + +static unsigned int spl_taskq_kick = 0; + +/* + * 2.6.36 API Change + * module_param_cb is introduced to take kernel_param_ops and + * module_param_call is marked as obsolete. Also set and get operations + * were changed to take a 'const struct kernel_param *'. + */ +static int +#ifdef module_param_cb +param_set_taskq_kick(const char *val, const struct kernel_param *kp) +#else +param_set_taskq_kick(const char *val, struct kernel_param *kp) +#endif +{ + int ret; + taskq_t *tq; + taskq_ent_t *t; + unsigned long flags; + + ret = param_set_uint(val, kp); + if (ret < 0 || !spl_taskq_kick) + return (ret); + /* reset value */ + spl_taskq_kick = 0; + + down_read(&tq_list_sem); + list_for_each_entry(tq, &tq_list, tq_taskqs) { + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); + /* Check if the first pending is older than 5 seconds */ + t = taskq_next_ent(tq); + if (t && time_after(jiffies, t->tqent_birth + 5*HZ)) { + (void) taskq_thread_spawn(tq); + printk(KERN_INFO "spl: Kicked taskq %s/%d\n", + tq->tq_name, tq->tq_instance); + } + spin_unlock_irqrestore(&tq->tq_lock, flags); + } + up_read(&tq_list_sem); + return (ret); +} + +#ifdef module_param_cb +static const struct kernel_param_ops param_ops_taskq_kick = { + .set = param_set_taskq_kick, + .get = param_get_uint, +}; +module_param_cb(spl_taskq_kick, ¶m_ops_taskq_kick, &spl_taskq_kick, 0644); +#else +module_param_call(spl_taskq_kick, param_set_taskq_kick, param_get_uint, + &spl_taskq_kick, 0644); +#endif +MODULE_PARM_DESC(spl_taskq_kick, + "Write nonzero to kick stuck taskqs to spawn more threads"); + int spl_taskq_init(void) { From 0b43696e6676391e5bee8ba49e76e599bac1d89d Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Fri, 11 Jul 2014 18:36:28 -0400 Subject: [PATCH 0953/1062] random_get_pseudo_bytes() need not provide cryptographic strength entropy Perf profiling of dd on a zvol revealed that my system spent 3.16% of its time in random_get_pseudo_bytes(). No SPL consumers need cryptographic strength entropy, so we can reduce our overhead by changing the implementation to utilize a fast PRNG. The Linux kernel did not export a suitable PRNG function until it exported get_random_int() in Linux 3.10. While we could implement an autotools check so that we use it when it is available or even try to access the symbol on older kernels where it is not exported using the fact that it is exported on newer ones as justification, we can instead implement our own pseudo-random data generator. For this purpose, I have written one based on a 128-bit pseudo-random number generator proposed in a paper by Sebastiano Vigna that itself was based on work by the late George Marsaglia. http://vigna.di.unimi.it/ftp/papers/xorshiftplus.pdf Profiling the same benchmark with an earlier variant of this patch that used a slightly different generator (roughly same number of instructions) by the same author showed that time spent in random_get_pseudo_bytes() dropped to 0.06%. That is a factor of 50 improvement. This particular generator algorithm is also well known to be fast: http://xorshift.di.unimi.it/#speed The benchmark numbers there state that it runs at 1.12ns/64-bits or 7.14 GBps of throughput on an Intel Core i7-4770 in what is presumably a single-threaded context. Using it in `random_get_pseudo_bytes()` in the manner I have will probably not reach that level of performance, but it should be fairly high and many times higher than the Linux `get_random_bytes()` function that we use now, which runs at 16.3 MB/s on my Intel Xeon E3-1276v3 processor when measured by using dd on /dev/urandom. Also, putting this generator's seed into per-CPU variables allows us to eliminate overhead from both spin locks and CPU memory barriers, which is NUMA friendly. We could have alternatively modified consumers to use something like `gethrtime() % 3` as suggested by both Matthew Ahrens and Tim Chase, but that has a few potential problems that this approach avoids: 1. Switching to `gethrtime() % 3` in hot code paths today requires diverging from illumos-gate and does nothing about potential future patches from illumos-gate that call our slow `random_get_pseudo_bytes()` in different hot code paths. Reimplementing `random_get_pseudo_bytes()` with a per-CPU PRNG avoids both of those things entirely, which means less work for us in the future. 2. Looking at the code that implements `gethrtime()`, I think it is unlikely to be faster than this per-CPU PRNG implementation of `random_get_pseudo_bytes()`. It would be best to go with something fast now so that there is no point in revisiting this from a performance perspective. 3. `gethrtime() % 3` can vary in behavior from system to system based on kernel version, architecture and clock source. In comparison, this per-CPU PRNG is about ~40 lines of code in `random_get_pseudo_bytes()` that should behave consistently across all systems regardless of kernel version, system architecture or machine clock source. It is unlikely that we would ever need to revisit this per-CPU PRNG while the same cannot be said for `gethrtime() % 3`. 4. `gethrtime()` uses CPU memory barriers and maybe atomic instructions depending on the clock source, so replacing `random_get_pseudo_bytes()` with `gethrtime()` in hot code paths could still require a future person working on NUMA scalability to reimplement it anyway while this per-CPU PRNG would not by virtue of using neither CPU memory barriers nor atomic instructions. Note that I did not check various clock sources for the presence of atomic instructions. There is simply too much code to read and given the drawbacks versus this per-cpu PRNG, there is no point in being certain. 5. I have heard of instances where poor quality pseudo-random numbers caused problems for HPC code in ways that took more than a year to identify and were remedied by switching to a higher quality source of pseudo-random numbers. While filesystems are different than HPC code, I do not think it is impossible for us to have instances where poor quality pseudo-random numbers can cause problems. Opting for a well studied PRNG algorithm that passes tests for statistical randomness over changing callers to use `gethrtime() % 3` bypasses the need to think about both whether poor quality pseudo-random numbers can cause problems and the statistical quality of numbers from `gethrtime() % 3`. 6. `gethrtime()` calls `getrawmonotonic()`, which uses seqlocks. This is probably not a huge issue, but anyone using kgdb would never be able to step through a seqlock critical section, which is not a problem either now or with the per-CPU PRNG: https://en.wikipedia.org/wiki/Seqlock The only downside that I can see is that this code's memory requirement is O(N) where N is NR_CPUS, versus the current code and `gethrtime() % 3`, which are O(1), but that should not be a problem. The seeds will use 64KB of memory at the high end (i.e `NR_CPU == 4096`) and 16 bytes of memory at the low end (i.e. `NR_CPU == 1`). In either case, we should only use a few hundred bytes of code for text, especially since `spl_rand_jump()` should be inlined into `spl_random_init()`, which should be removed during early boot as part of "Freeing unused kernel memory". In either case, the memory requirements are minuscule. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #372 --- include/sys/random.h | 7 +- module/spl/spl-generic.c | 148 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+), 6 deletions(-) diff --git a/include/sys/random.h b/include/sys/random.h index 2bf581f26..64f70ee52 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -35,11 +35,6 @@ random_get_bytes(uint8_t *ptr, size_t len) return 0; } -static __inline__ int -random_get_pseudo_bytes(uint8_t *ptr, size_t len) -{ - get_random_bytes((void *)ptr,(int)len); - return 0; -} +extern int random_get_pseudo_bytes(uint8_t *ptr, size_t len); #endif /* _SPL_RANDOM_H */ diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index dc3e74aa5..88a0fcc51 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include #include @@ -56,6 +58,112 @@ MODULE_PARM_DESC(spl_hostid, "The system hostid."); proc_t p0 = { 0 }; EXPORT_SYMBOL(p0); +/* + * Xorshift Pseudo Random Number Generator based on work by Sebastiano Vigna + * + * "Further scramblings of Marsaglia's xorshift generators" + * http://vigna.di.unimi.it/ftp/papers/xorshiftplus.pdf + * + * random_get_pseudo_bytes() is an API function on Illumos whose sole purpose + * is to provide bytes containing random numbers. It is mapped to /dev/urandom + * on Illumos, which uses a "FIPS 186-2 algorithm". No user of the SPL's + * random_get_pseudo_bytes() needs bytes that are of cryptographic quality, so + * we can implement it using a fast PRNG that we seed using Linux' actual + * equivalent to random_get_pseudo_bytes(). We do this by providing each CPU + * with an independent seed so that all calls to random_get_pseudo_bytes() are + * free of atomic instructions. + * + * A consequence of using a fast PRNG is that using random_get_pseudo_bytes() + * to generate words larger than 128 bits will paradoxically be limited to + * `2^128 - 1` possibilities. This is because we have a sequence of `2^128 - 1` + * 128-bit words and selecting the first will implicitly select the second. If + * a caller finds this behavior undesireable, random_get_bytes() should be used + * instead. + * + * XXX: Linux interrupt handlers that trigger within the critical section + * formed by `s[1] = xp[1];` and `xp[0] = s[0];` and call this function will + * see the same numbers. Nothing in the code currently calls this in an + * interrupt handler, so this is considered to be okay. If that becomes a + * problem, we could create a set of per-cpu variables for interrupt handlers + * and use them when in_interrupt() from linux/preempt_mask.h evaluates to + * true. + */ +static DEFINE_PER_CPU(uint64_t[2], spl_pseudo_entropy); + +/* + * spl_rand_next()/spl_rand_jump() are copied from the following CC-0 licensed + * file: + * + * http://xorshift.di.unimi.it/xorshift128plus.c + */ + +static inline uint64_t +spl_rand_next(uint64_t *s) { + uint64_t s1 = s[0]; + const uint64_t s0 = s[1]; + s[0] = s0; + s1 ^= s1 << 23; // a + s[1] = s1 ^ s0 ^ (s1 >> 18) ^ (s0 >> 5); // b, c + return (s[1] + s0); +} + +static inline void +spl_rand_jump(uint64_t *s) { + static const uint64_t JUMP[] = { 0x8a5cd789635d2dff, 0x121fd2155c472f96 }; + + uint64_t s0 = 0; + uint64_t s1 = 0; + int i, b; + for(i = 0; i < sizeof JUMP / sizeof *JUMP; i++) + for(b = 0; b < 64; b++) { + if (JUMP[i] & 1ULL << b) { + s0 ^= s[0]; + s1 ^= s[1]; + } + (void) spl_rand_next(s); + } + + s[0] = s0; + s[1] = s1; +} + +int +random_get_pseudo_bytes(uint8_t *ptr, size_t len) +{ + uint64_t *xp, s[2]; + + ASSERT(ptr); + + xp = get_cpu_var(spl_pseudo_entropy); + + s[0] = xp[0]; + s[1] = xp[1]; + + while (len) { + union { + uint64_t ui64; + uint8_t byte[sizeof (uint64_t)]; + }entropy; + int i = MIN(len, sizeof (uint64_t)); + + len -= i; + entropy.ui64 = spl_rand_next(s); + + while (i--) + *ptr++ = entropy.byte[i]; + } + + xp[0] = s[0]; + xp[1] = s[1]; + + put_cpu_var(spl_pseudo_entropy); + + return (0); +} + + +EXPORT_SYMBOL(random_get_pseudo_bytes); + #if BITS_PER_LONG == 32 /* * Support 64/64 => 64 division on a 32-bit platform. While the kernel @@ -502,6 +610,44 @@ spl_kvmem_init(void) return (rc); } +/* + * We initialize the random number generator with 128 bits of entropy from the + * system random number generator. In the improbable case that we have a zero + * seed, we fallback to the system jiffies, unless it is also zero, in which + * situation we use a preprogrammed seed. We step forward by 2^64 iterations to + * initialize each of the per-cpu seeds so that the sequences generated on each + * CPU are guaranteed to never overlap in practice. + */ +static void __init +spl_random_init(void) +{ + uint64_t s[2]; + int i; + + get_random_bytes(s, sizeof (s)); + + if (s[0] == 0 && s[1] == 0) { + if (jiffies != 0) { + s[0] = jiffies; + s[1] = ~0 - jiffies; + } else { + (void) memcpy(s, "improbable seed", sizeof (s)); + } + printk("SPL: get_random_bytes() returned 0 " + "when generating random seed. Setting initial seed to " + "0x%016llx%016llx.", cpu_to_be64(s[0]), cpu_to_be64(s[1])); + } + + for (i = 0; i < NR_CPUS; i++) { + uint64_t *wordp = per_cpu(spl_pseudo_entropy, i); + + spl_rand_jump(s); + + wordp[0] = s[0]; + wordp[1] = s[1]; + } +} + static void spl_kvmem_fini(void) { @@ -514,6 +660,8 @@ spl_init(void) { int rc = 0; + spl_random_init(); + if ((rc = spl_kvmem_init())) goto out1; From 18d2f56176494a14437f18cd8482d151d634cc18 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Thu, 18 Feb 2016 18:24:29 -0500 Subject: [PATCH 0954/1062] Changes to support zfs encryption Unused modlinkage struct removed and ntohll functions added. Signed-off-by: Tom Caputi Signed-off-by: Brian Behlendorf Closes #533 --- include/sys/byteorder.h | 23 +++++++++++++++++++++++ include/sys/sunldi.h | 19 ------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h index 5350a0b33..184b52d51 100644 --- a/include/sys/byteorder.h +++ b/include/sys/byteorder.h @@ -26,6 +26,7 @@ #define _SPL_BYTEORDER_H #include +#include #define LE_16(x) cpu_to_le16(x) #define LE_32(x) cpu_to_le32(x) @@ -43,4 +44,26 @@ #define BE_IN32(xa) \ (((uint32_t)BE_IN16(xa) << 16) | BE_IN16((uint8_t *)(xa)+2)) +#ifdef _BIG_ENDIAN +static __inline__ uint64_t +htonll(uint64_t n) { + return (n); +} + +static __inline__ uint64_t +ntohll(uint64_t n) { + return (n); +} +#else +static __inline__ uint64_t +htonll(uint64_t n) { + return ((((uint64_t)htonl(n)) << 32) + htonl(n >> 32)); +} + +static __inline__ uint64_t +ntohll(uint64_t n) { + return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32)); +} +#endif + #endif /* SPL_BYTEORDER_H */ diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index b4ff7391a..ec8420231 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -34,23 +34,4 @@ #define SECTOR_SIZE 512 -typedef struct modlinkage { - int ml_rev; - struct modlfs *ml_modlfs; - struct modldrv *ml_modldrv; - major_t ml_major; - unsigned ml_minors; - void *pad1; -} modlinkage_t; - -typedef struct ldi_ident { - char li_modname[MAXNAMELEN]; - dev_t li_dev; -} *ldi_ident_t; - -typedef struct block_device *ldi_handle_t; - -extern int ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip); -extern void ldi_ident_release(ldi_ident_t li); - #endif /* SPL_SUNLDI_H */ From 47f98247814fff50d02ddc0772197842c57cdc3a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 Mar 2016 09:10:29 -0800 Subject: [PATCH 0955/1062] Remove RPM package restriction ZFS on Linux is regularly tested on arm, ppc, ppc64, i686 and x86_64 architectures. Given this the artificial architecture restriction in the packaging has been removed. Signed-off-by: Brian Behlendorf --- rpm/generic/spl.spec.in | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 43bbd98f4..ee6aa99b1 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -8,11 +8,6 @@ License: GPLv2+ URL: http://zfsonlinux.org/ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExclusiveArch: i386 i686 x86_64 - -# May build but untested on ppc/ppc64 -ExcludeArch: ppc ppc64 - Requires: %{name}-kmod = %{version} Provides: %{name}-kmod-common = %{version} From a6ae97caed620b0e9e0575346062c751f6f15483 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Mar 2016 14:20:48 -0800 Subject: [PATCH 0956/1062] Add rw_tryupgrade() This implementation of rw_tryupgrade() behaves slightly differently from its counterparts on other platforms. It drops the RW_READER lock and then acquires the RW_WRITER lock leaving a small window where no lock is held. On other platforms the lock is never released during the upgrade process. This is necessary under Linux because the kernel does not provide an upgrade function. There are currently no callers in the ZFS code where this change in behavior is a problem. In fact, in most cases the code is already written such that if the upgrade fails the RW_READER lock is dropped and the caller blocks waiting to acquire the lock as RW_WRITER. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Signed-off-by: Matthew Thode Closes zfsonlinux/zfs#4388 Closes #534 --- include/sys/rwlock.h | 50 ++++++++++--------------------- module/spl/spl-rwlock.c | 60 ------------------------------------- module/splat/splat-rwlock.c | 6 ---- 3 files changed, 16 insertions(+), 100 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index c82764ce9..14d097b01 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -208,49 +208,31 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_lockdep_on_maybe(rwp); \ }) -#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) -#ifdef CONFIG_RWSEM_SPIN_ON_OWNER -#error spinlock rwsem should not have spin on owner -#endif /* - * For the generic implementations of rw-semaphores the following is - * true. If your semaphore implementation internally represents the - * semaphore state differently then special case handling is required. - * - if activity/count is 0 then there are no active readers or writers - * - if activity/count is +ve then that is the number of active readers - * - if activity/count is -1 then there is one active writer + * This implementation of rw_tryupgrade() behaves slightly differently + * from its counterparts on other platforms. It drops the RW_READER lock + * and then acquires the RW_WRITER lock leaving a small window where no + * lock is held. On other platforms the lock is never released during + * the upgrade process. This is necessary under Linux because the kernel + * does not provide an upgrade function. */ - -extern void __up_read_locked(struct rw_semaphore *); -extern int __down_write_trylock_locked(struct rw_semaphore *); - #define rw_tryupgrade(rwp) \ ({ \ - unsigned long _flags_; \ int _rc_ = 0; \ \ - spl_rw_lockdep_off_maybe(rwp); \ - spl_rwsem_lock_irqsave(&SEM(rwp)->wait_lock, _flags_); \ - if ((list_empty(&SEM(rwp)->wait_list)) && \ - (SEM(rwp)->activity == 1)) { \ - __up_read_locked(SEM(rwp)); \ - VERIFY(_rc_ = __down_write_trylock_locked(SEM(rwp))); \ - (rwp)->rw_owner = current; \ + if (RW_WRITE_HELD(rwp)) { \ + _rc_ = 1; \ + } else { \ + rw_exit(rwp); \ + if (rw_tryenter(rwp, RW_WRITER)) { \ + _rc_ = 1; \ + } else { \ + rw_enter(rwp, RW_READER); \ + _rc_ = 0; \ + } \ } \ - spl_rwsem_unlock_irqrestore(&SEM(rwp)->wait_lock, _flags_); \ - spl_rw_lockdep_on_maybe(rwp); \ _rc_; \ }) -#else -/* - * rw_tryupgrade() can be implemented correctly but for each supported - * arch we will need a custom implementation. For the x86 implementation - * it looks like a custom cmpxchg() to atomically check and promote the - * rwsem would be safe. For now that's not worth the trouble so in this - * case rw_tryupgrade() has just been disabled. - */ -#define rw_tryupgrade(rwp) ({ 0; }) -#endif int spl_rw_init(void); void spl_rw_fini(void); diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 462a6f0de..98251c011 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -32,65 +32,5 @@ #define DEBUG_SUBSYSTEM S_RWLOCK -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK - -/* - * From lib/rwsem-spinlock.c but modified such that the caller is - * responsible for acquiring and dropping the sem->wait_lock. - */ -struct rwsem_waiter { - struct list_head list; - struct task_struct *task; - unsigned int flags; -#define RWSEM_WAITING_FOR_READ 0x00000001 -#define RWSEM_WAITING_FOR_WRITE 0x00000002 -}; - -/* wake a single writer */ -static struct rw_semaphore * -__rwsem_wake_one_writer_locked(struct rw_semaphore *sem) -{ - struct rwsem_waiter *waiter; - struct task_struct *tsk; - - sem->activity = -1; - - waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); - list_del(&waiter->list); - - tsk = waiter->task; - smp_mb(); - waiter->task = NULL; - wake_up_process(tsk); - put_task_struct(tsk); - return sem; -} - -/* release a read lock on the semaphore */ -void -__up_read_locked(struct rw_semaphore *sem) -{ - if (--sem->activity == 0 && !list_empty(&sem->wait_list)) - (void)__rwsem_wake_one_writer_locked(sem); -} -EXPORT_SYMBOL(__up_read_locked); - -/* trylock for writing -- returns 1 if successful, 0 if contention */ -int -__down_write_trylock_locked(struct rw_semaphore *sem) -{ - int ret = 0; - - if (sem->activity == 0 && list_empty(&sem->wait_list)) { - sem->activity = -1; - ret = 1; - } - - return ret; -} -EXPORT_SYMBOL(__down_write_trylock_locked); - -#endif - int spl_rw_init(void) { return 0; } void spl_rw_fini(void) { } diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 284f77370..abd6a0e60 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -588,7 +588,6 @@ splat_rwlock_test6(struct file *file, void *arg) goto out; } -#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) /* With one reader upgrade should never fail. */ rc = rw_tryupgrade(&rwp->rw_rwlock); if (!rc) { @@ -610,11 +609,6 @@ splat_rwlock_test6(struct file *file, void *arg) rc = 0; splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", "rwlock properly upgraded\n"); -#else - rc = 0; - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", - "rw_tryupgrade() is disabled for this arch\n"); -#endif out: rw_exit(&rwp->rw_rwlock); rw_destroy(&rwp->rw_rwlock); From 7bb5d92de8c4d795e9b393aa5ea9c9ad3e43b199 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Mon, 8 Feb 2016 13:20:05 -0600 Subject: [PATCH 0957/1062] Allow spawning a new thread for TQ_NOQUEUE dispatch with dynamic taskq When a TQ_NOQUEUE dispatch is done on a dynamic taskq, allow another thread to be spawned. This will cause TQ_NOQUEUE to behave similarly as it does with non-dynamic taskqs. Add support for TQ_NOQUEUE to taskq_dispatch_ent(). Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #530 --- module/spl/spl-taskq.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 56034c899..bfcf651af 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -562,16 +562,22 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) /* Do not queue the task unless there is idle thread for it */ ASSERT(tq->tq_nactive <= tq->tq_nthreads); - if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) - goto out; + if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) { + /* Dynamic taskq may be able to spawn another thread */ + if (!(tq->tq_flags & TASKQ_DYNAMIC) || taskq_thread_spawn(tq) == 0) + goto out; + } if ((t = task_alloc(tq, flags, &irqflags)) == NULL) goto out; spin_lock(&t->tqent_lock); + /* Queue to the front of the list to enforce TQ_NOQUEUE semantics */ + if (flags & TQ_NOQUEUE) + list_add(&t->tqent_list, &tq->tq_prio_list); /* Queue to the priority list instead of the pending list */ - if (flags & TQ_FRONT) + else if (flags & TQ_FRONT) list_add_tail(&t->tqent_list, &tq->tq_prio_list); else list_add_tail(&t->tqent_list, &tq->tq_pend_list); @@ -593,7 +599,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) wake_up(&tq->tq_work_waitq); out: /* Spawn additional taskq threads if required. */ - if (tq->tq_nactive == tq->tq_nthreads) + if (!(flags & TQ_NOQUEUE) && tq->tq_nactive == tq->tq_nthreads) (void) taskq_thread_spawn(tq); spin_unlock_irqrestore(&tq->tq_lock, irqflags); @@ -665,6 +671,13 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, goto out; } + if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) { + /* Dynamic taskq may be able to spawn another thread */ + if (!(tq->tq_flags & TASKQ_DYNAMIC) || taskq_thread_spawn(tq) == 0) + goto out2; + flags |= TQ_FRONT; + } + spin_lock(&t->tqent_lock); /* @@ -693,6 +706,7 @@ out: /* Spawn additional taskq threads if required. */ if (tq->tq_nactive == tq->tq_nthreads) (void) taskq_thread_spawn(tq); +out2: spin_unlock_irqrestore(&tq->tq_lock, irqflags); } EXPORT_SYMBOL(taskq_dispatch_ent); From 224817e2a81912b46453a96b9eec4804856c801b Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 16 Mar 2016 21:32:08 +0000 Subject: [PATCH 0958/1062] Add support for s390[x]. Signed-off-by: Dimitri John Ledkov Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #537 --- include/sys/isa_defs.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 7e15b9321..3d474872c 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -131,7 +131,21 @@ #define _BIG_ENDIAN #define _SUNOS_VTOC_16 -#else /* Currently x86_64, i386, arm, powerpc, and sparc are supported */ +/* s390 arch specific defines */ +#elif defined(__s390__) +#if defined(__s390x__) +#if !defined(_LP64) +#define _LP64 +#endif +#else +#if !defined(_ILP32) +#define _ILP32 +#endif +#endif + +#define _BIG_ENDIAN + +#else /* Currently x86_64, i386, arm, powerpc, s390, and sparc are supported */ #error "Unsupported ISA type" #endif From cdd39dd2457ac57622339669db0536a580374bd3 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 12 Apr 2016 12:05:14 -0700 Subject: [PATCH 0959/1062] Use kernel provided mutex owner To reduce mutex footprint, we detect the existence of owner in kernel mutex, and rely on it if it exists. Note that before Linux 3.0, mutex owner is of type thread_info. Also note that, in Linux 3.18, the condition for owner is changed from CONFIG_DEBUG_MUTEXES || CONFIG_SMP to CONFIG_DEBUG_MUTEXES || CONFIG_MUTEX_SPIN_ON_OWNER Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #540 --- config/spl-build.m4 | 29 +++++++++++++++++++++++++++++ include/sys/mutex.h | 15 +++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b9c04a95e..55453c822 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -44,6 +44,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_USLEEP_RANGE SPL_AC_KMEM_CACHE_ALLOCFLAGS SPL_AC_WAIT_ON_BIT + SPL_AC_MUTEX_OWNER ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1447,3 +1448,31 @@ AC_DEFUN([SPL_AC_WAIT_ON_BIT], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # Check whether mutex has owner with task_struct type. +dnl # +dnl # Note that before Linux 3.0, mutex owner is of type thread_info. +dnl # +dnl # Note that in Linux 3.18, the condition for owner is changed from +dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) to +dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER) +dnl # +AC_DEFUN([SPL_AC_MUTEX_OWNER], [ + AC_MSG_CHECKING([whether mutex has owner]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + DEFINE_MUTEX(m); + struct task_struct *t __attribute__ ((unused)); + t = m.owner; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MUTEX_OWNER, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index fba35f3f9..319235223 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -40,7 +40,10 @@ typedef enum { typedef struct { struct mutex m_mutex; spinlock_t m_lock; /* used for serializing mutex_exit */ +#ifndef HAVE_MUTEX_OWNER + /* only when kernel doesn't have owner */ kthread_t *m_owner; +#endif #ifdef CONFIG_LOCKDEP kmutex_type_t m_type; #endif /* CONFIG_LOCKDEP */ @@ -51,16 +54,28 @@ typedef struct { static inline void spl_mutex_set_owner(kmutex_t *mp) { + /* + * kernel will handle its owner, so we don't need to do anything if it + * is defined. + */ +#ifndef HAVE_MUTEX_OWNER mp->m_owner = current; +#endif } static inline void spl_mutex_clear_owner(kmutex_t *mp) { +#ifndef HAVE_MUTEX_OWNER mp->m_owner = NULL; +#endif } +#ifdef HAVE_MUTEX_OWNER +#define mutex_owner(mp) (ACCESS_ONCE(MUTEX(mp)->owner)) +#else #define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) +#endif #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) From 3bf657b90c792ff4539a75d3b66593de556580c0 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Sun, 24 Apr 2016 18:29:03 -0500 Subject: [PATCH 0960/1062] Use vmem_free() in dfl_free() and add dfl_alloc() This change was lost, somehow, in e5f9a9a. Since the arrays can be rather large, they need to be allocated with vmem_zalloc() via dfl_alloc() and freed with vmem_free() via dfl_free(). The new dfl_alloc() function should be used to allocate object of type dkioc_free_list_t in order that they're allocated from vmem. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Signed-off-by: Nikolay Borisov Closes #543 --- include/sys/dkioc_free_util.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sys/dkioc_free_util.h b/include/sys/dkioc_free_util.h index a424d4232..bea5a5bbc 100644 --- a/include/sys/dkioc_free_util.h +++ b/include/sys/dkioc_free_util.h @@ -48,7 +48,11 @@ typedef struct dkioc_free_list_s { } dkioc_free_list_t; static inline void dfl_free(dkioc_free_list_t *dfl) { - kmem_free(dfl, DFL_SZ(dfl->dfl_num_exts)); + vmem_free(dfl, DFL_SZ(dfl->dfl_num_exts)); +} + +static inline dkioc_free_list_t *dfl_alloc(uint64_t dfl_num_exts, int flags) { + return vmem_zalloc(DFL_SZ(dfl_num_exts), flags); } #endif /* _SPL_DKIOC_UTIL_H */ From ea2633ad264912788428213607f8298c0aeafec4 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Tue, 26 Apr 2016 06:33:52 -0500 Subject: [PATCH 0961/1062] Clear PF_FSTRANS over spl_filp_fallocate() The problem described in 2a5d574 also applies to XFS's file or inode fallocate method. Both paths may trigger writeback and expose this issue, see the full stack below. When layered on XFS a warning will be emitted under CentOS7 when entering either the file or inode fallocate method with PF_FSTRANS already set. To avoid triggering this error PF_FSTRANS is cleared and then reset in vn_space(). WARNING: at fs/xfs/xfs_aops.c:982 xfs_vm_writepage+0x58b/0x5d0 Call Trace: [] warn_slowpath_common+0x95/0xe0 [] warn_slowpath_null+0x1a/0x20 [] xfs_vm_writepage+0x58b/0x5d0 [xfs] [] __writepage+0x17/0x40 [] write_cache_pages+0x251/0x530 [] generic_writepages+0x51/0x80 [] xfs_vm_writepages+0x60/0x80 [xfs] [] do_writepages+0x20/0x30 [] __filemap_fdatawrite_range+0xb5/0x100 [] filemap_write_and_wait_range+0x8b/0xd0 [] xfs_free_file_space+0xf4/0x520 [xfs] [] xfs_file_fallocate+0x19e/0x2c0 [xfs] [] vn_space+0x3c/0x40 [spl] [] vdev_file_io_start+0x207/0x260 [zfs] [] zio_vdev_io_start+0xad/0x2d0 [zfs] [] zio_execute+0x82/0xe0 [zfs] [] taskq_thread+0x28d/0x5a0 [spl] [] kthread+0xd7/0xf0 [] ret_from_fork+0x3f/0x70 Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Signed-off-by: Nikolay Borisov Closes zfsonlinux/zfs#4529 --- module/spl/spl-vnode.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 80e4a0ffd..a914e046c 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -571,6 +571,9 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, offset_t offset, void *x6, void *x7) { int error = EOPNOTSUPP; +#ifdef FALLOC_FL_PUNCH_HOLE + int fstrans; +#endif if (cmd != F_FREESP || bfp->l_whence != 0) return (EOPNOTSUPP); @@ -580,6 +583,14 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, ASSERT(bfp->l_start >= 0 && bfp->l_len > 0); #ifdef FALLOC_FL_PUNCH_HOLE + /* + * May enter XFS which generates a warning when PF_FSTRANS is set. + * To avoid this the flag is cleared over vfs_sync() and then reset. + */ + fstrans = spl_fstrans_check(); + if (fstrans) + current->flags &= ~(PF_FSTRANS); + /* * When supported by the underlying file system preferentially * use the fallocate() callback to preallocate the space. @@ -587,6 +598,10 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, error = -spl_filp_fallocate(vp->v_file, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, bfp->l_start, bfp->l_len); + + if (fstrans) + current->flags |= PF_FSTRANS; + if (error == 0) return (0); #endif From 5e39e4f0b26551769e0cfc50987cbb8cdef5fbcf Mon Sep 17 00:00:00 2001 From: David Quigley Date: Thu, 5 May 2016 19:10:46 -0400 Subject: [PATCH 0962/1062] Add a macro to convert seconds to nanoseconds and vice-versa Required infrastructure for zfsonlinux/zfs#4600. Signed-off-by: Brian Behlendorf Closes #546 --- include/sys/time.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/sys/time.h b/include/sys/time.h index 650166145..611f5dd2d 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -46,6 +46,9 @@ #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC)) #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC)) +#define NSEC2SEC(n) ((n) / (NANOSEC / SEC)) +#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC)) + static const int hz = HZ; #define TIMESPEC_OVERFLOW(ts) \ From 39cd90ef08bb6817dd57ac08e9de5c87af2681ed Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 11 May 2016 16:51:29 -0700 Subject: [PATCH 0963/1062] Add cv_timedwait_sig_hires to allow interruptible sleep Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #548 --- include/sys/condvar.h | 2 ++ module/spl/spl-condvar.c | 40 ++++++++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/include/sys/condvar.h b/include/sys/condvar.h index efcf0dda2..9b55449ae 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -59,6 +59,8 @@ extern clock_t __cv_timedwait(kcondvar_t *, kmutex_t *, clock_t); extern clock_t __cv_timedwait_sig(kcondvar_t *, kmutex_t *, clock_t); extern clock_t cv_timedwait_hires(kcondvar_t *, kmutex_t *, hrtime_t, hrtime_t res, int flag); +extern clock_t cv_timedwait_sig_hires(kcondvar_t *, kmutex_t *, hrtime_t, + hrtime_t res, int flag); extern void __cv_signal(kcondvar_t *); extern void __cv_broadcast(kcondvar_t *c); diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index c420d18ca..1e2d0fc10 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -26,6 +26,7 @@ #include #include +#include void __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) @@ -238,7 +239,7 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, DEFINE_WAIT(wait); kmutex_t *m; hrtime_t time_left, now; - unsigned long time_left_us; + ktime_t ktime_left; ASSERT(cvp); ASSERT(mp); @@ -258,7 +259,6 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, atomic_dec(&cvp->cv_refs); return (-1); } - time_left_us = time_left / NSEC_PER_USEC; prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); @@ -273,7 +273,9 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, * Allow a 100 us range to give kernel an opportunity to coalesce * interrupts */ - usleep_range(time_left_us, time_left_us + 100); + ktime_left = ktime_set(0, time_left); + schedule_hrtimeout_range(&ktime_left, 100 * NSEC_PER_USEC, + HRTIMER_MODE_REL); /* No more waiters a different mutex could be used */ if (atomic_dec_and_test(&cvp->cv_waiters)) { @@ -290,15 +292,15 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, mutex_enter(mp); time_left = expire_time - gethrtime(); - return (time_left > 0 ? time_left : -1); + return (time_left > 0 ? NSEC_TO_TICK(time_left) : -1); } /* * Compatibility wrapper for the cv_timedwait_hires() Illumos interface. */ -clock_t -cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, - int flag) +static clock_t +cv_timedwait_hires_common(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, + int flag, int state) { if (res > 1) { /* @@ -309,13 +311,31 @@ cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, tim = (tim / res) * res; } - if (!(flag & CALLOUT_FLAG_ABSOLUTE)) - tim += gethrtime(); + ASSERT(!(flag & CALLOUT_FLAG_ABSOLUTE)); + /* get abs expire time */ + tim += gethrtime(); - return (__cv_timedwait_hires(cvp, mp, tim, TASK_UNINTERRUPTIBLE)); + return (__cv_timedwait_hires(cvp, mp, tim, state)); +} + +clock_t +cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, + int flag) +{ + return (cv_timedwait_hires_common(cvp, mp, tim, res, flag, + TASK_UNINTERRUPTIBLE)); } EXPORT_SYMBOL(cv_timedwait_hires); +clock_t +cv_timedwait_sig_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, + int flag) +{ + return (cv_timedwait_hires_common(cvp, mp, tim, res, flag, + TASK_INTERRUPTIBLE)); +} +EXPORT_SYMBOL(cv_timedwait_sig_hires); + void __cv_signal(kcondvar_t *cvp) { From fdbc1ba99d1f4d3958189079eee9b6c957e0264b Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 18 May 2016 11:28:46 -0700 Subject: [PATCH 0964/1062] Linux 4.7 compat: inode_lock() and friends Linux 4.7 changes i_mutex to i_rwsem, and we should used inode_lock and inode_lock_shared to do exclusive and shared lock respectively. We use spl_inode_lock{,_shared}() to hide the difference. Note that on older kernel you'll always take an exclusive lock. We also add all other inode_lock friends. And nested users now should explicitly call spl_inode_lock_nested with correct subclass. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#4665 Closes #549 --- config/spl-build.m4 | 25 +++++++++++++++++++++++++ include/linux/file_compat.h | 19 ++++++++++++++++++- module/spl/spl-vnode.c | 3 ++- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 55453c822..720506959 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -45,6 +45,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KMEM_CACHE_ALLOCFLAGS SPL_AC_WAIT_ON_BIT SPL_AC_MUTEX_OWNER + SPL_AC_INODE_LOCK ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1476,3 +1477,27 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # 4.7 API change +dnl # i_mutex is changed to i_rwsem. Instead of directly using +dnl # i_mutex/i_rwsem, we should use inode_lock() and inode_lock_shared() +dnl # We test inode_lock_shared because inode_lock is introduced earlier. +dnl # +AC_DEFUN([SPL_AC_INODE_LOCK], [ + AC_MSG_CHECKING([whether inode_lock_shared() exists]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct inode *inode = NULL; + inode_lock_shared(inode); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_LOCK_SHARED, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index c58bb8156..916514566 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -76,8 +76,25 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) #define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync) #endif /* HAVE_2ARGS_VFS_FSYNC */ -#define spl_inode_lock(ip) mutex_lock_nested(&(ip)->i_mutex, I_MUTEX_PARENT) +#ifdef HAVE_INODE_LOCK_SHARED +#define spl_inode_lock(ip) inode_lock(ip) +#define spl_inode_unlock(ip) inode_unlock(ip) +#define spl_inode_lock_shared(ip) inode_lock_shared(ip) +#define spl_inode_unlock_shared(ip) inode_unlock_shared(ip) +#define spl_inode_trylock(ip) inode_trylock(ip) +#define spl_inode_trylock_shared(ip) inode_trylock_shared(ip) +#define spl_inode_is_locked(ip) inode_is_locked(ip) +#define spl_inode_lock_nested(ip, s) inode_lock_nested(ip, s) +#else +#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex) #define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex) +#define spl_inode_lock_shared(ip) mutex_lock(&(ip)->i_mutex) +#define spl_inode_unlock_shared(ip) mutex_unlock(&(ip)->i_mutex) +#define spl_inode_trylock(ip) mutex_trylock(&(ip)->i_mutex) +#define spl_inode_trylock_shared(ip) mutex_trylock(&(ip)->i_mutex) +#define spl_inode_is_locked(ip) mutex_is_locked(&(ip)->i_mutex) +#define spl_inode_lock_nested(ip, s) mutex_lock_nested(&(ip)->i_mutex, s) +#endif #endif /* SPL_FILE_COMPAT_H */ diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a914e046c..addc61155 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -352,7 +352,8 @@ spl_kern_path_locked(const char *name, struct path *path) if (rc) return (ERR_PTR(rc)); - spl_inode_lock(parent.dentry->d_inode); + /* use I_MUTEX_PARENT because vfs_unlink needs it */ + spl_inode_lock_nested(parent.dentry->d_inode, I_MUTEX_PARENT); dentry = lookup_one_len(basename, parent.dentry, len); if (IS_ERR(dentry)) { From 872e0cc9c7334f7aedca05f41eca5ddecf6ff72b Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 20 May 2016 16:35:52 -0700 Subject: [PATCH 0965/1062] Restore CALLOUT_FLAG_ABSOLUTE in cv_timedwait_hires In 39cd90e, I mistakenly disabled the ability of using absolute expire time in cv_timedwait_hires. I don't quite sure why I did that, so let's restore it. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #553 --- module/spl/spl-condvar.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 1e2d0fc10..479bbfd12 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -311,9 +311,8 @@ cv_timedwait_hires_common(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t tim = (tim / res) * res; } - ASSERT(!(flag & CALLOUT_FLAG_ABSOLUTE)); - /* get abs expire time */ - tim += gethrtime(); + if (!(flag & CALLOUT_FLAG_ABSOLUTE)) + tim += gethrtime(); return (__cv_timedwait_hires(cvp, mp, tim, state)); } From 5ce028b0d4b650b42cb81b3fdf71b517adce4552 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 20 May 2016 18:04:03 -0700 Subject: [PATCH 0966/1062] Fix race between taskq_destroy and dynamic spawning thread While taskq_destroy would wait for dynamic_taskq to finish its tasks, but it does not implies the thread being spawned is up and running. This will cause taskq to be freed before the thread can exit. We fix this by using tq_nspawn to indicate how many threads are being spawned before they are inserted to the thread list. And have taskq_destroy to wait for it to drop to zero. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #553 Closes #550 --- module/spl/spl-taskq.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index bfcf651af..9784473bd 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -763,11 +763,12 @@ taskq_thread_spawn_task(void *arg) taskq_t *tq = (taskq_t *)arg; unsigned long flags; - (void) taskq_thread_create(tq); - - spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); - tq->tq_nspawn--; - spin_unlock_irqrestore(&tq->tq_lock, flags); + if (taskq_thread_create(tq) == NULL) { + /* restore spawning count if failed */ + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + tq->tq_nspawn--; + spin_unlock_irqrestore(&tq->tq_lock, flags); + } } /* @@ -848,6 +849,14 @@ taskq_thread(void *args) tsd_set(taskq_tsd, tq); spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + /* + * If we are dynamically spawned, decrease spawning count. Note that + * we could be created during taskq_create, in which case we shouldn't + * do the decrement. But it's fine because taskq_create will reset + * tq_nspawn later. + */ + if (tq->tq_flags & TASKQ_DYNAMIC) + tq->tq_nspawn--; /* Immediately exit if more threads than allowed were created. */ if (tq->tq_nthreads >= tq->tq_maxthreads) @@ -1063,6 +1072,11 @@ taskq_create(const char *name, int nthreads, pri_t pri, /* Wait for all threads to be started before potential destroy */ wait_event(tq->tq_wait_waitq, tq->tq_nthreads == count); + /* + * taskq_thread might have touched nspawn, but we don't want them to + * because they're not dynamically spawned. So we reset it to 0 + */ + tq->tq_nspawn = 0; if (rc) { taskq_destroy(tq); @@ -1106,6 +1120,12 @@ taskq_destroy(taskq_t *tq) up_write(&tq_list_sem); spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + /* wait for spawning threads to insert themselves to the list */ + while (tq->tq_nspawn) { + spin_unlock_irqrestore(&tq->tq_lock, flags); + schedule_timeout_interruptible(1); + spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + } /* * Signal each thread to exit and block until it does. Each thread From b3a22a0a005eef22d696cc77baa26ef80d1bdc0c Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Mon, 23 May 2016 14:12:22 -0700 Subject: [PATCH 0967/1062] Fix taskq_wait_outstanding re-evaluate tq_next_id wait_event is a macro, so the current implementation will cause re- evaluation of tq_next_id every time it wakes up. This would cause taskq_wait_outstanding(tq, 0) to be equivalent to taskq_wait(tq) Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Issue #553 --- module/spl/spl-taskq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 9784473bd..320ad3914 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -447,8 +447,8 @@ taskq_wait_outstanding_check(taskq_t *tq, taskqid_t id) void taskq_wait_outstanding(taskq_t *tq, taskqid_t id) { - wait_event(tq->tq_wait_waitq, - taskq_wait_outstanding_check(tq, id ? id : tq->tq_next_id - 1)); + id = id ? id : tq->tq_next_id - 1; + wait_event(tq->tq_wait_waitq, taskq_wait_outstanding_check(tq, id)); } EXPORT_SYMBOL(taskq_wait_outstanding); From c60a51b640bab61c54f370752750841675730899 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Sat, 28 May 2016 19:30:36 +0800 Subject: [PATCH 0968/1062] Add isa_defs for MIPS GCC for MIPS only defines _LP64 when 64bit, while no _ILP32 defined when 32bit. Signed-off-by: YunQiang Su Signed-off-by: Brian Behlendorf Closes #558 --- include/sys/isa_defs.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 3d474872c..53dead38c 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -145,7 +145,28 @@ #define _BIG_ENDIAN -#else /* Currently x86_64, i386, arm, powerpc, s390, and sparc are supported */ +/* MIPS arch specific defines */ +#elif defined(__mips__) + +#if defined(__MIPSEB__) +#define _BIG_ENDIAN +#elif defined(__MIPSEL__) +#define _LITTLE_ENDIAN +#else +#error MIPS no endian specified +#endif + +#ifndef _LP64 +#define _ILP32 +#endif + +#define _SUNOS_VTOC_16 + +#else +/* + * Currently supported: + * x86_64, i386, arm, powerpc, s390, sparc, and mips + */ #error "Unsupported ISA type" #endif From f58040c0fc8bc6490fcc75db7fc3e709dfc3c656 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 25 May 2016 16:35:42 -0700 Subject: [PATCH 0969/1062] Implement a proper rw_tryupgrade Current rw_tryupgrade does rw_exit and then rw_tryenter(RW_RWITER), and then does rw_enter(RW_READER) if it fails. This violate the assumption that rw_tryupgrade should be atomic and could cause extra contention or even lock inversion. This patch we implement a proper rw_tryupgrade. For rwsem-spinlock, we take the spinlock to check rwsem->count and rwsem->wait_list. For normal rwsem, we use cmpxchg on rwsem->count to change the value from single reader to single writer. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes zfsonlinux/zfs#4692 Closes #554 --- config/spl-build.m4 | 25 ++++++++++++++ include/linux/rwsem_compat.h | 17 ++++++++++ include/sys/rwlock.h | 11 +++--- module/spl/spl-rwlock.c | 41 ++++++++++++++++++++++ module/splat/splat-rwlock.c | 66 ++++++++++++++++++++++++++++++++---- 5 files changed, 147 insertions(+), 13 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 720506959..d705c6531 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -39,6 +39,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW + SPL_AC_RWSEM_ACTIVITY SPL_AC_SCHED_RT_HEADER SPL_AC_2ARGS_VFS_GETATTR SPL_AC_USLEEP_RANGE @@ -1316,6 +1317,30 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ EXTRA_KCFLAGS="$tmp_flags" ]) +dnl # +dnl # 3.16 API Change +dnl # +dnl # rwsem-spinlock "->activity" changed to "->count" +dnl # +AC_DEFUN([SPL_AC_RWSEM_ACTIVITY], [ + AC_MSG_CHECKING([whether struct rw_semaphore has member activity]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + dummy_semaphore.activity = 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_RWSEM_ACTIVITY, 1, + [struct rw_semaphore has member activity]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + dnl # dnl # 3.9 API change, dnl # Moved things from linux/sched.h to linux/sched/rt.h diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index 5841d7c28..9a4df2673 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -27,6 +27,23 @@ #include +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK +#define SPL_RWSEM_SINGLE_READER_VALUE (1) +#define SPL_RWSEM_SINGLE_WRITER_VALUE (-1) +#else +#define SPL_RWSEM_SINGLE_READER_VALUE (RWSEM_ACTIVE_READ_BIAS) +#define SPL_RWSEM_SINGLE_WRITER_VALUE (RWSEM_ACTIVE_WRITE_BIAS) +#endif + +/* Linux 3.16 change activity to count for rwsem-spinlock */ +#ifdef HAVE_RWSEM_ACTIVITY +#define RWSEM_COUNT(sem) sem->activity +#else +#define RWSEM_COUNT(sem) sem->count +#endif + +int rwsem_tryupgrade(struct rw_semaphore *rwsem); + #if defined(RWSEM_SPINLOCK_IS_RAW) #define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl) #define spl_rwsem_unlock_irqrestore(lk, fl) raw_spin_unlock_irqrestore(lk, fl) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 14d097b01..facebe3ba 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -223,13 +223,10 @@ RW_LOCK_HELD(krwlock_t *rwp) if (RW_WRITE_HELD(rwp)) { \ _rc_ = 1; \ } else { \ - rw_exit(rwp); \ - if (rw_tryenter(rwp, RW_WRITER)) { \ - _rc_ = 1; \ - } else { \ - rw_enter(rwp, RW_READER); \ - _rc_ = 0; \ - } \ + spl_rw_lockdep_off_maybe(rwp); \ + if ((_rc_ = rwsem_tryupgrade(SEM(rwp)))) \ + spl_rw_set_owner(rwp); \ + spl_rw_lockdep_on_maybe(rwp); \ } \ _rc_; \ }) diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 98251c011..9b356a843 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -32,5 +32,46 @@ #define DEBUG_SUBSYSTEM S_RWLOCK +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK +static int +__rwsem_tryupgrade(struct rw_semaphore *rwsem) +{ + int ret = 0; + unsigned long flags; + spl_rwsem_lock_irqsave(&rwsem->wait_lock, flags); + if (RWSEM_COUNT(rwsem) == SPL_RWSEM_SINGLE_READER_VALUE && + list_empty(&rwsem->wait_list)) { + ret = 1; + RWSEM_COUNT(rwsem) = SPL_RWSEM_SINGLE_WRITER_VALUE; + } + spl_rwsem_unlock_irqrestore(&rwsem->wait_lock, flags); + return (ret); +} +#else +static int +__rwsem_tryupgrade(struct rw_semaphore *rwsem) +{ + typeof (rwsem->count) val; + val = cmpxchg(&rwsem->count, SPL_RWSEM_SINGLE_READER_VALUE, + SPL_RWSEM_SINGLE_WRITER_VALUE); + return (val == SPL_RWSEM_SINGLE_READER_VALUE); +} +#endif + +int +rwsem_tryupgrade(struct rw_semaphore *rwsem) +{ + if (__rwsem_tryupgrade(rwsem)) { + rwsem_release(&rwsem->dep_map, 1, _RET_IP_); + rwsem_acquire(&rwsem->dep_map, 0, 1, _RET_IP_); +#ifdef CONFIG_RWSEM_SPIN_ON_OWNER + rwsem->owner = current; +#endif + return (1); + } + return (0); +} +EXPORT_SYMBOL(rwsem_tryupgrade); + int spl_rw_init(void) { return 0; } void spl_rw_fini(void) { } diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index abd6a0e60..c17eb07ba 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -55,8 +55,12 @@ #define SPLAT_RWLOCK_TEST5_DESC "Write downgrade" #define SPLAT_RWLOCK_TEST6_ID 0x0706 -#define SPLAT_RWLOCK_TEST6_NAME "rw_tryupgrade" -#define SPLAT_RWLOCK_TEST6_DESC "Read upgrade" +#define SPLAT_RWLOCK_TEST6_NAME "rw_tryupgrade-1" +#define SPLAT_RWLOCK_TEST6_DESC "rwsem->count value" + +#define SPLAT_RWLOCK_TEST7_ID 0x0707 +#define SPLAT_RWLOCK_TEST7_NAME "rw_tryupgrade-2" +#define SPLAT_RWLOCK_TEST7_DESC "Read upgrade" #define SPLAT_RWLOCK_TEST_MAGIC 0x115599DDUL #define SPLAT_RWLOCK_TEST_NAME "rwlock_test" @@ -580,8 +584,55 @@ splat_rwlock_test6(struct file *file, void *arg) splat_init_rw_priv(rwp, file); rw_enter(&rwp->rw_rwlock, RW_READER); - if (!RW_READ_HELD(&rwp->rw_rwlock)) { + if (RWSEM_COUNT(SEM(&rwp->rw_rwlock)) != + SPL_RWSEM_SINGLE_READER_VALUE) { splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, + "We assumed single reader rwsem->count " + "should be %ld, but is %ld\n", + SPL_RWSEM_SINGLE_READER_VALUE, + RWSEM_COUNT(SEM(&rwp->rw_rwlock))); + rc = -ENOLCK; + goto out; + } + rw_exit(&rwp->rw_rwlock); + + rw_enter(&rwp->rw_rwlock, RW_WRITER); + if (RWSEM_COUNT(SEM(&rwp->rw_rwlock)) != + SPL_RWSEM_SINGLE_WRITER_VALUE) { + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, + "We assumed single writer rwsem->count " + "should be %ld, but is %ld\n", + SPL_RWSEM_SINGLE_WRITER_VALUE, + RWSEM_COUNT(SEM(&rwp->rw_rwlock))); + rc = -ENOLCK; + goto out; + } + rc = 0; + splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", + "rwsem->count same as we assumed\n"); +out: + rw_exit(&rwp->rw_rwlock); + rw_destroy(&rwp->rw_rwlock); + kfree(rwp); + + return rc; +} + +static int +splat_rwlock_test7(struct file *file, void *arg) +{ + rw_priv_t *rwp; + int rc; + + rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); + if (rwp == NULL) + return -ENOMEM; + + splat_init_rw_priv(rwp, file); + + rw_enter(&rwp->rw_rwlock, RW_READER); + if (!RW_READ_HELD(&rwp->rw_rwlock)) { + splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, "rwlock should be read lock: %d\n", RW_READ_HELD(&rwp->rw_rwlock)); rc = -ENOLCK; @@ -591,7 +642,7 @@ splat_rwlock_test6(struct file *file, void *arg) /* With one reader upgrade should never fail. */ rc = rw_tryupgrade(&rwp->rw_rwlock); if (!rc) { - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, + splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, "rwlock failed upgrade from reader: %d\n", RW_READ_HELD(&rwp->rw_rwlock)); rc = -ENOLCK; @@ -599,7 +650,7 @@ splat_rwlock_test6(struct file *file, void *arg) } if (RW_READ_HELD(&rwp->rw_rwlock) || !RW_WRITE_HELD(&rwp->rw_rwlock)) { - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "rwlock should " + splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, "rwlock should " "have 0 (not %d) reader and 1 (not %d) writer\n", RW_READ_HELD(&rwp->rw_rwlock), RW_WRITE_HELD(&rwp->rw_rwlock)); @@ -607,7 +658,7 @@ splat_rwlock_test6(struct file *file, void *arg) } rc = 0; - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", + splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, "%s", "rwlock properly upgraded\n"); out: rw_exit(&rwp->rw_rwlock); @@ -646,6 +697,8 @@ splat_rwlock_init(void) SPLAT_RWLOCK_TEST5_ID, splat_rwlock_test5); SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, SPLAT_RWLOCK_TEST6_ID, splat_rwlock_test6); + SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST7_NAME, SPLAT_RWLOCK_TEST7_DESC, + SPLAT_RWLOCK_TEST7_ID, splat_rwlock_test7); return sub; } @@ -654,6 +707,7 @@ void splat_rwlock_fini(splat_subsystem_t *sub) { ASSERT(sub); + SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST7_ID); SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST6_ID); SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST5_ID); SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST4_ID); From ea5f1a200b974c8fdd51993c282d8ae0dc2aa871 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 27 May 2016 17:28:12 -0700 Subject: [PATCH 0970/1062] Fix use-after-free in splat_taskq_test7 This splat_vprint is using tq_arg->name after tq_arg is freed. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #557 --- module/splat/splat-taskq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 8f06f413d..f26f828d9 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -1040,11 +1040,12 @@ splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) error = (tq_arg->depth == SPLAT_TASKQ_DEPTH_MAX ? 0 : -EINVAL); + splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, + "Taskq '%s' destroying\n", tq_arg->name); + kmem_free(tqe, sizeof (taskq_ent_t)); kmem_free(tq_arg, sizeof (splat_taskq_arg_t)); - splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' destroying\n", tq_arg->name); taskq_destroy(tq); return (error); From 16fc1ec3ba0438b1d657b421923b3969031f2678 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Thu, 19 May 2016 10:59:40 -0700 Subject: [PATCH 0971/1062] Improve spl slab cache alloc The policy is to try to allocate with KM_NOSLEEP, which will lead to memory allocation with GFP_ATOMIC, and if it fails, it will launch an taskq to expand slab space. This way it should be able to get better NUMA memory locality and reduce the overhead of context switch. Signed-off-by: Jinshan Xiong Signed-off-by: Brian Behlendorf Closes #551 --- module/spl/spl-kmem-cache.c | 43 ++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index e3edca5a0..99967b14f 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1149,15 +1149,13 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) * It is responsible for allocating a new slab, linking it in to the list * of partial slabs, and then waking any waiters. */ -static void -spl_cache_grow_work(void *data) +static int +__spl_cache_grow(spl_kmem_cache_t *skc, int flags) { - spl_kmem_alloc_t *ska = (spl_kmem_alloc_t *)data; - spl_kmem_cache_t *skc = ska->ska_cache; spl_kmem_slab_t *sks; fstrans_cookie_t cookie = spl_fstrans_mark(); - sks = spl_slab_alloc(skc, ska->ska_flags); + sks = spl_slab_alloc(skc, flags); spl_fstrans_unmark(cookie); spin_lock(&skc->skc_lock); @@ -1165,15 +1163,29 @@ spl_cache_grow_work(void *data) skc->skc_slab_total++; skc->skc_obj_total += sks->sks_objs; list_add_tail(&sks->sks_list, &skc->skc_partial_list); + + smp_mb__before_atomic(); + clear_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); + smp_mb__after_atomic(); + wake_up_all(&skc->skc_waitq); } + spin_unlock(&skc->skc_lock); + + return (sks == NULL ? -ENOMEM : 0); +} + +static void +spl_cache_grow_work(void *data) +{ + spl_kmem_alloc_t *ska = (spl_kmem_alloc_t *)data; + spl_kmem_cache_t *skc = ska->ska_cache; + + (void)__spl_cache_grow(skc, ska->ska_flags); atomic_dec(&skc->skc_ref); smp_mb__before_atomic(); clear_bit(KMC_BIT_GROWING, &skc->skc_flags); - clear_bit(KMC_BIT_DEADLOCKED, &skc->skc_flags); smp_mb__after_atomic(); - wake_up_all(&skc->skc_waitq); - spin_unlock(&skc->skc_lock); kfree(ska); } @@ -1213,6 +1225,21 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj) return (rc ? rc : -EAGAIN); } + /* + * To reduce the overhead of context switch and improve NUMA locality, + * it tries to allocate a new slab in the current process context with + * KM_NOSLEEP flag. If it fails, it will launch a new taskq to do the + * allocation. + * + * However, this can't be applied to KVM_VMEM due to a bug that + * __vmalloc() doesn't honor gfp flags in page table allocation. + */ + if (!(skc->skc_flags & KMC_VMEM)) { + rc = __spl_cache_grow(skc, flags | KM_NOSLEEP); + if (rc == 0) + return (0); + } + /* * This is handled by dispatching a work request to the global work * queue. This allows us to asynchronously allocate a new slab while From 5ad98ad0978d43b41180018536ce5efdaa4ea546 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Tue, 14 Jun 2016 17:36:39 -0700 Subject: [PATCH 0972/1062] Add _ALIGNMENT_REQUIRED to isa_defs.h for checksums _ALIGNMENT_REQUIRED needs to be #defined in isa_defs.h in order to port the Illumos checksum code to ZoL: 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R OpenZFS-issue: https://www.illumos.org/issues/4185 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/45818ee Signed-off-by: Tony Hutter Signed-off-by: Brian Behlendorf Closes #561 --- include/sys/isa_defs.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 53dead38c..738795c70 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -44,6 +44,9 @@ #define _LP64 #endif +#define _ALIGNMENT_REQUIRED 1 + + /* i386 arch specific defines */ #elif defined(__i386) || defined(__i386__) @@ -59,6 +62,8 @@ #define _ILP32 #endif +#define _ALIGNMENT_REQUIRED 0 + /* powerpc (ppc64) arch specific defines */ #elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__) @@ -80,6 +85,12 @@ #endif #endif +/* + * Illumos doesn't define _ALIGNMENT_REQUIRED for PPC, so default to 1 + * out of paranoia. + */ +#define _ALIGNMENT_REQUIRED 1 + /* arm arch specific defines */ #elif defined(__arm) || defined(__arm__) || defined(__aarch64__) @@ -107,6 +118,12 @@ #define _BIG_ENDIAN #endif +/* + * Illumos doesn't define _ALIGNMENT_REQUIRED for ARM, so default to 1 + * out of paranoia. + */ +#define _ALIGNMENT_REQUIRED 1 + /* sparc arch specific defines */ #elif defined(__sparc) || defined(__sparc__) @@ -130,6 +147,7 @@ #define _BIG_ENDIAN #define _SUNOS_VTOC_16 +#define _ALIGNMENT_REQUIRED 1 /* s390 arch specific defines */ #elif defined(__s390__) @@ -145,6 +163,12 @@ #define _BIG_ENDIAN +/* + * Illumos doesn't define _ALIGNMENT_REQUIRED for s390, so default to 1 + * out of paranoia. + */ +#define _ALIGNMENT_REQUIRED 1 + /* MIPS arch specific defines */ #elif defined(__mips__) @@ -162,6 +186,12 @@ #define _SUNOS_VTOC_16 +/* + * Illumos doesn't define _ALIGNMENT_REQUIRED for MIPS, so default to 1 + * out of paranoia. + */ +#define _ALIGNMENT_REQUIRED 1 + #else /* * Currently supported: From d2f97b2a2651d8e1a6e9e1dcb07cfe8570efcfff Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Thu, 14 Jul 2016 15:51:24 -0400 Subject: [PATCH 0973/1062] Added highbit() and lowbit() macros Signed-off-by: Tom Caputi Signed-off-by: Tony Hutter Signed-off-by: Brian Behlendorf Closes #562 --- include/sys/sysmacros.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 4a96e075f..f6b1e28e8 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -158,6 +158,9 @@ extern uint32_t zone_get_hostid(void *zone); extern void spl_setup(void); extern void spl_cleanup(void); +#define highbit(x) __fls(x) +#define lowbit(x) __ffs(x) + #define highbit64(x) fls64(x) #define makedevice(maj,min) makedev(maj,min) From b7c7008ba28ca926fbda929aec52f3761d72cffe Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 26 Jul 2016 23:37:46 +0000 Subject: [PATCH 0974/1062] Linux 4.8 compat: rw_semaphore atomic_long_t count For non-rwsem-spinlocks the "count" member was changed from a "long" to "atomic_long_t" type. A configure check has been added to detect this change along with new versions of the _rwsem_tryupgrade() function and RWSEM_COUNT() macro. See https://github.com/torvalds/linux/commit/8ee62b18 for complete details. Signed-off-by: Tim Chase Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #563 --- config/spl-build.m4 | 26 ++++++++++++++++++++++++++ include/linux/rwsem_compat.h | 7 +++++-- module/spl/spl-rwlock.c | 11 ++++++++++- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index d705c6531..e9eb77861 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -40,6 +40,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW SPL_AC_RWSEM_ACTIVITY + SPL_AC_RWSEM_ATOMIC_LONG_COUNT SPL_AC_SCHED_RT_HEADER SPL_AC_2ARGS_VFS_GETATTR SPL_AC_USLEEP_RANGE @@ -1341,6 +1342,31 @@ AC_DEFUN([SPL_AC_RWSEM_ACTIVITY], [ EXTRA_KCFLAGS="$tmp_flags" ]) +dnl # +dnl # 4.8 API Change +dnl # +dnl # rwsem "->count" changed to atomic_long_t type +dnl # +AC_DEFUN([SPL_AC_RWSEM_ATOMIC_LONG_COUNT], [ + AC_MSG_CHECKING( + [whether struct rw_semaphore has atomic_long_t member count]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + DECLARE_RWSEM(dummy_semaphore); + (void) atomic_long_read(&dummy_semaphore.count); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_RWSEM_ATOMIC_LONG_COUNT, 1, + [struct rw_semaphore has atomic_long_t member count]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + dnl # dnl # 3.9 API change, dnl # Moved things from linux/sched.h to linux/sched/rt.h diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index 9a4df2673..c874885b0 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -35,9 +35,12 @@ #define SPL_RWSEM_SINGLE_WRITER_VALUE (RWSEM_ACTIVE_WRITE_BIAS) #endif -/* Linux 3.16 change activity to count for rwsem-spinlock */ -#ifdef HAVE_RWSEM_ACTIVITY +/* Linux 3.16 changed activity to count for rwsem-spinlock */ +#if defined(HAVE_RWSEM_ACTIVITY) #define RWSEM_COUNT(sem) sem->activity +/* Linux 4.8 changed count to an atomic_long_t for !rwsem-spinlock */ +#elif defined(HAVE_RWSEM_ATOMIC_LONG_COUNT) +#define RWSEM_COUNT(sem) atomic_long_read(&(sem)->count) #else #define RWSEM_COUNT(sem) sem->count #endif diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 9b356a843..77f46f2d6 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -32,7 +32,7 @@ #define DEBUG_SUBSYSTEM S_RWLOCK -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK +#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) static int __rwsem_tryupgrade(struct rw_semaphore *rwsem) { @@ -47,6 +47,15 @@ __rwsem_tryupgrade(struct rw_semaphore *rwsem) spl_rwsem_unlock_irqrestore(&rwsem->wait_lock, flags); return (ret); } +#elif defined(HAVE_RWSEM_ATOMIC_LONG_COUNT) +static int +__rwsem_tryupgrade(struct rw_semaphore *rwsem) +{ + long val; + val = atomic_long_cmpxchg(&rwsem->count, SPL_RWSEM_SINGLE_READER_VALUE, + SPL_RWSEM_SINGLE_WRITER_VALUE); + return (val == SPL_RWSEM_SINGLE_READER_VALUE); +} #else static int __rwsem_tryupgrade(struct rw_semaphore *rwsem) From fb833883872ba17f1f04f99741b6f47cf404c340 Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Fri, 29 Jul 2016 18:48:04 +0300 Subject: [PATCH 0975/1062] Add gitignore entry for spl-*.o.d files Signed-off-by: Nikolay Borisov Signed-off-by: Brian Behlendorf Issue #565 --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a44e4323c..4de02fba6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ # # Normal rules # -*.[oa] +*.[oad] *.lo *.la *~ From 4b9dddf43084306de34394d666b874b912ca42ca Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Fri, 29 Jul 2016 18:48:33 +0300 Subject: [PATCH 0976/1062] Add handling for kernel 4.7's CONFIG_TRIM_UNUSED_KSYMS Kernel 4.7 added the option to trim the unused exported symbols. In my testing this showed to be problematic since the PDE_DATA function was considered unused and as such was trimmed. This in turn caused the respective test during spl's configure stage to falsely detect that PDE_DATA is not defined, which in turn caused build failures later. Handle this situation by adding detection whether CONFIG_TRIM_UNUSED_KSYMS is enabled and refuse to build against a kernel which has it enabled Signed-off-by: Nikolay Borisov Signed-off-by: Brian Behlendorf Closes #565 --- config/spl-build.m4 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index e9eb77861..3ed0e8fd0 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -24,6 +24,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_ATOMIC_SPINLOCK SPL_AC_SHRINKER_CALLBACK SPL_AC_CTL_NAME + SPL_AC_CONFIG_TRIM_UNUSED_KSYMS SPL_AC_PDE_DATA SPL_AC_SET_FS_PWD_WITH_CONST SPL_AC_2ARGS_VFS_UNLINK @@ -1248,6 +1249,26 @@ AC_DEFUN([SPL_AC_CONFIG_ZLIB_DEFLATE], [ ]) ]) +dnl # +dnl # config trim unused symbols, +dnl # Verify the kernel has CONFIG_TRIM_UNUSED_KSYMS DISABLED. +dnl # +AC_DEFUN([SPL_AC_CONFIG_TRIM_UNUSED_KSYMS], [ + AC_MSG_CHECKING([whether CONFIG_TRIM_UNUSED_KSYM is disabled]) + SPL_LINUX_TRY_COMPILE([ + #if defined(CONFIG_TRIM_UNUSED_KSYMS) + #error CONFIG_TRIM_UNUSED_KSYMS not defined + #endif + ],[ ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ + *** This kernel has unused symbols trimming enabled, please disable. + *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set.]) + ]) +]) + dnl # dnl # 2.6.39 API compat, dnl # The function zlib_deflate_workspacesize() now take 2 arguments. From 576865be20ce4a0d4365cd62a589edec070fe08c Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Mon, 1 Aug 2016 08:19:19 -0500 Subject: [PATCH 0977/1062] Fix HAVE_MUTEX_OWNER test for kernels prior to 4.6 Recent 4.X kernels prior to 4.6 require #include of spinlock.h in order to get the definition of __ARCH_SPIN_LOCK_UNLOCKED which is used by DEFINE_MUTEX(). Signed-off-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #566 --- config/spl-build.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 3ed0e8fd0..94e692a8b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1537,6 +1537,7 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER], [ EXTRA_KCFLAGS="-Werror" SPL_LINUX_TRY_COMPILE([ #include + #include ],[ DEFINE_MUTEX(m); struct task_struct *t __attribute__ ((unused)); From aeb9baa618beea1458ab3ab22cbc0f39213da6cf Mon Sep 17 00:00:00 2001 From: GeLiXin Date: Fri, 19 Aug 2016 14:50:21 +0800 Subject: [PATCH 0978/1062] Fix: handle NULL case in spl_kmem_free_track() When DEBUG_KMEM_TRACKING is enabled in SPL, we keep tracking all the buffers alloced by kmem_alloc() and kmem_zalloc(). If a NULL pointer which indicates no track info in SPL is passed to spl_kmem_free_track, we just ignore it. Signed-off-by: GeLiXin Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#4967 Closes #567 --- module/spl/spl-kmem.c | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 module/spl/spl-kmem.c diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c old mode 100644 new mode 100755 index 0931fdfcf..2b68c297a --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -383,6 +383,10 @@ spl_kmem_free_track(const void *ptr, size_t size) { kmem_debug_t *dptr; + /* Ignore NULL pointer since we haven't tracked it at all*/ + if (ptr == NULL) + return; + /* Must exist in hash due to kmem_alloc() */ dptr = kmem_del_init(&kmem_lock, kmem_table, KMEM_HASH_BITS, ptr); ASSERT3P(dptr, !=, NULL); From 4fd75d35af1f101ad2ab3e98220f4e52a24532f6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 7 Sep 2016 10:33:21 -0700 Subject: [PATCH 0979/1062] Tag 0.7.0-rc1 First release candidate. Signed-off-by: Brian Behlendorf --- META | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/META b/META index dd8c409a8..8f412eae1 100644 --- a/META +++ b/META @@ -1,8 +1,8 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.6.5 -Release: 1 +Version: 0.7.0 +Release: rc1 Release-Tags: relext License: GPL Author: OpenZFS on Linux From 4329bd5b73e37073f01e848ccc9eb78a8fc1bcbc Mon Sep 17 00:00:00 2001 From: tuxoko Date: Wed, 14 Sep 2016 16:59:31 -0700 Subject: [PATCH 0980/1062] Cleanup in cred.h Remove the code that doesn't make any sense. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #569 --- include/sys/cred.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/sys/cred.h b/include/sys/cred.h index 4f62b00fd..58f7aafda 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -36,18 +36,6 @@ typedef struct cred cred_t; #ifdef HAVE_KUIDGID_T -/* - * Linux 3.8+ uses typedefs to redefine uid_t and gid_t. We have to rename the - * typedefs to recover the original types. We then can use them provided that - * we are careful about translating from k{g,u}id_t to the original versions - * and vice versa. - */ -#define uid_t xuid_t -#define gid_t xgid_t -#include -#undef uid_t -#undef gid_t - #define KUID_TO_SUID(x) (__kuid_val(x)) #define KGID_TO_SGID(x) (__kgid_val(x)) #define SUID_TO_KUID(x) (KUIDT_INIT(x)) From 49fbac3acecf384454aa8a6e9604a311848d864e Mon Sep 17 00:00:00 2001 From: legend-hua Date: Thu, 15 Sep 2016 08:17:00 +0800 Subject: [PATCH 0981/1062] Fix spl check.sh script Update splat_cmd to reference the correct location of the splat utility. Reviewed-by: Brian Behlendorf Signed-off-by: Liu Hua Closes #570 --- scripts/check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check.sh b/scripts/check.sh index fc97cec23..5f5cb18e2 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -28,7 +28,7 @@ prog=check.sh spl_module=../module/spl/spl.ko splat_module=../module/splat/splat.ko -splat_cmd=../cmd/splat +splat_cmd=../cmd/splat/splat verbose= die() { From cb81c0c5887ffd6d862b13bca594d522e3f8673c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 16 Sep 2016 17:10:36 -0700 Subject: [PATCH 0982/1062] Increase spl_kmem_alloc_warn limit In order to support ABD with large blocks the spl_kmem_alloc_warn limit needs to be increased to 64K. A 16M block requires that pointers be stored for 4096 4K-pages on an x86_64 system. Each of these pointers is 8 bytes requiring an allocation of 8*4096=32,768 bytes. The addition of a small header to this structure pushes the allocation over the default 32K warning threshold. In addition, fix a small bug where MAX was used instead of MIN when setting the default. This ensures a reasonable limit is still set on systems with page sizes larger then 4K. Reviewed-by: David Quigley Signed-off-by: Brian Behlendorf Closes #571 --- module/spl/spl-kmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 2b68c297a..41bec75d2 100755 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -35,7 +35,7 @@ * rate limited warning will be printed to the console for any kmem_alloc() * which exceeds a reasonable threshold. * - * The default warning threshold is set to eight pages but capped at 32K to + * The default warning threshold is set to sixteen pages but capped at 64K to * accommodate systems using large pages. This value was selected to be small * enough to ensure the largest allocations are quickly noticed and fixed. * But large enough to avoid logging any warnings when a allocation size is @@ -44,7 +44,7 @@ * allocations are quickly caught. These warnings may be disabled by setting * the threshold to zero. */ -unsigned int spl_kmem_alloc_warn = MAX(8 * PAGE_SIZE, 32 * 1024); +unsigned int spl_kmem_alloc_warn = MIN(16 * PAGE_SIZE, 64 * 1024); module_param(spl_kmem_alloc_warn, uint, 0644); MODULE_PARM_DESC(spl_kmem_alloc_warn, "Warning threshold in bytes for a kmem_alloc()"); From 8acfb2bcc118555fed2c0902c33d300a57630368 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Sep 2016 13:44:32 -0700 Subject: [PATCH 0983/1062] Fix automatically generated release number When building from the head of a branch a release number is automatically generated with `git describe` using the last tag on that branch as the base. For this to work the last tag on the branch needs to be predictable given the current META file. This logic was accidentally broken when an -rcX tag was added to the branch. Update it to search for a VERSION or VERSION-RELEASE tag. Reviewed-by: Chris Siebenmann Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#5105 Closes #572 --- config/spl-meta.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 index 0561fbbc5..fbfaec4ab 100644 --- a/config/spl-meta.m4 +++ b/config/spl-meta.m4 @@ -63,6 +63,14 @@ AC_DEFUN([SPL_AC_META], [ if test -n "${_release}"; then SPL_META_RELEASE=${_release} _spl_ac_meta_type="git describe" + else + _match="${SPL_META_NAME}-${SPL_META_VERSION}-${SPL_META_RELEASE}" + _alias=$(git describe --match=${_match} 2>/dev/null) + _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') + if test -n "${_release}"; then + SPL_META_RELEASE=${_release} + _spl_ac_meta_type="git describe" + fi fi fi From 6c2a66bfa816793fbdcede8854816d526c925574 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 1 Oct 2016 18:33:01 -0700 Subject: [PATCH 0984/1062] Fix aarch64 type warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly cast type in splat-rwlock.c test case to silence the following warning. warning: format ‘%ld’ expects argument of type ‘long int’, but argument N has type ‘int’ Signed-off-by: Brian Behlendorf Closes #574 --- module/splat/splat-rwlock.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index c17eb07ba..4576f20c7 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -587,10 +587,10 @@ splat_rwlock_test6(struct file *file, void *arg) if (RWSEM_COUNT(SEM(&rwp->rw_rwlock)) != SPL_RWSEM_SINGLE_READER_VALUE) { splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, - "We assumed single reader rwsem->count " - "should be %ld, but is %ld\n", - SPL_RWSEM_SINGLE_READER_VALUE, - RWSEM_COUNT(SEM(&rwp->rw_rwlock))); + "We assumed single reader rwsem->count " + "should be %ld, but is %ld\n", + (long int)SPL_RWSEM_SINGLE_READER_VALUE, + (long int)RWSEM_COUNT(SEM(&rwp->rw_rwlock))); rc = -ENOLCK; goto out; } @@ -600,10 +600,10 @@ splat_rwlock_test6(struct file *file, void *arg) if (RWSEM_COUNT(SEM(&rwp->rw_rwlock)) != SPL_RWSEM_SINGLE_WRITER_VALUE) { splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, - "We assumed single writer rwsem->count " - "should be %ld, but is %ld\n", - SPL_RWSEM_SINGLE_WRITER_VALUE, - RWSEM_COUNT(SEM(&rwp->rw_rwlock))); + "We assumed single writer rwsem->count " + "should be %ld, but is %ld\n", + (long int)SPL_RWSEM_SINGLE_WRITER_VALUE, + (long int)RWSEM_COUNT(SEM(&rwp->rw_rwlock))); rc = -ENOLCK; goto out; } From 341dfdb3fd44048a3149e8376b2a0f94da56f01a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 4 Oct 2016 17:26:36 -0700 Subject: [PATCH 0985/1062] Fix p0 initializer Due to changes in the task_struct the following warning is occurs when initializing the global p0. Since this structure only exists for it's address to be taken initialize it in a manor which isn't sensitive to internal changes to the structure. module/spl/spl-generic.c:58:1: error: missing braces around initializer [-Werror=missing-braces] Signed-off-by: Brian Behlendorf Closes #576 --- module/spl/spl-generic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 88a0fcc51..c04cb538c 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -55,7 +55,7 @@ EXPORT_SYMBOL(spl_hostid); module_param(spl_hostid, ulong, 0644); MODULE_PARM_DESC(spl_hostid, "The system hostid."); -proc_t p0 = { 0 }; +proc_t p0; EXPORT_SYMBOL(p0); /* @@ -660,6 +660,7 @@ spl_init(void) { int rc = 0; + bzero(&p0, sizeof (proc_t)); spl_random_init(); if ((rc = spl_kvmem_init())) From 2529b3a80e1bf1713c0ecbedb246654a0968b4d2 Mon Sep 17 00:00:00 2001 From: tuxoko Date: Fri, 7 Oct 2016 20:53:58 -0700 Subject: [PATCH 0986/1062] Linux 4.8 compat: Fix RW_READ_HELD Linux 4.8, starting from torvalds/linux@19c5d690e, will set owner to 1 when read held instead of leave it NULL. So we change the condition to `rw_owner(rwp) <= 1` in RW_READ_HELD. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes zfsonlinux/zfs#5233 Closes #577 --- include/sys/rwlock.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index facebe3ba..4197785db 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -114,7 +114,12 @@ spl_rw_lockdep_on_maybe(krwlock_t *rwp) \ static inline int RW_READ_HELD(krwlock_t *rwp) { - return (spl_rwsem_is_locked(SEM(rwp)) && rw_owner(rwp) == NULL); + /* + * Linux 4.8 will set owner to 1 when read held instead of leave it + * NULL. So we check whether owner <= 1. + */ + return (spl_rwsem_is_locked(SEM(rwp)) && + (unsigned long)rw_owner(rwp) <= 1); } static inline int From 0d267566650d89bde8bd5ec4665749810d5bafc7 Mon Sep 17 00:00:00 2001 From: tuxoko Date: Fri, 7 Oct 2016 20:59:46 -0700 Subject: [PATCH 0987/1062] Fix out-of-bound in per_cpu in spl_random_init When iterating per_cpu values, we need to use for_each_possible_cpu. While NR_CPUS indicates the number of CPU supported by the kernel, it might not initialize all of them if the kernel decides it's not possible to use them. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #578 --- module/spl/spl-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index c04cb538c..ce60963bd 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -638,7 +638,7 @@ spl_random_init(void) "0x%016llx%016llx.", cpu_to_be64(s[0]), cpu_to_be64(s[1])); } - for (i = 0; i < NR_CPUS; i++) { + for_each_possible_cpu(i) { uint64_t *wordp = per_cpu(spl_pseudo_entropy, i); spl_rand_jump(s); From 9ba3c01923d45a19003641ceab311150752ed491 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 18 Oct 2016 15:52:30 -0700 Subject: [PATCH 0988/1062] Fix crgetgroups out-of-bound and misc cred fix init_groups has 0 nblocks, therefore calling the current crgetgroups with init_groups would result in out-of-bound access. We fix this by returning NULL when nblocks is 0. Cap crgetngroups to NGROUPS_PER_BLOCK, since crgetgroups will only return blocks[0]. Also, remove all get_group_info. The cred already holds reference on the group_info, and cred is not mutable. So there's no reason to hold extra reference, if we hold cred. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #556 --- module/spl/spl-cred.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index a03f459e0..d046f9513 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -62,19 +62,17 @@ cr_groups_search(const struct group_info *group_info, gid_t grp) return 0; } -/* Hold a reference on the credential and group info */ +/* Hold a reference on the credential */ void crhold(cred_t *cr) { (void)get_cred((const cred_t *)cr); - (void)get_group_info(cr->group_info); } -/* Free a reference on the credential and group info */ +/* Free a reference on the credential */ void crfree(cred_t *cr) { - put_group_info(cr->group_info); put_cred((const cred_t *)cr); } @@ -85,28 +83,32 @@ crgetngroups(const cred_t *cr) struct group_info *gi; int rc; - gi = get_group_info(cr->group_info); + gi = cr->group_info; rc = gi->ngroups; - put_group_info(gi); - + /* + * crgetgroups will only returns gi->blocks[0], which contains only + * the first NGROUPS_PER_BLOCK groups. + */ + if (rc > NGROUPS_PER_BLOCK) { + WARN_ON_ONCE(1); + rc = NGROUPS_PER_BLOCK; + } return rc; } /* * Return an array of supplemental gids. The returned address is safe * to use as long as the caller has taken a reference with crhold(). - * The caller is responsible for releasing the reference with crfree(). */ gid_t * crgetgroups(const cred_t *cr) { struct group_info *gi; - gid_t *gids; - - gi = get_group_info(cr->group_info); - gids = KGIDP_TO_SGIDP(gi->blocks[0]); - put_group_info(gi); + gid_t *gids = NULL; + gi = cr->group_info; + if (gi->nblocks > 0) + gids = KGIDP_TO_SGIDP(gi->blocks[0]); return gids; } @@ -117,9 +119,8 @@ groupmember(gid_t gid, const cred_t *cr) struct group_info *gi; int rc; - gi = get_group_info(cr->group_info); + gi = cr->group_info; rc = cr_groups_search(gi, SGID_TO_KGID(gid)); - put_group_info(gi); return rc; } From 87063d7dc392cb710c70dba49021d6e4ec8961a9 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 18 Oct 2016 17:29:26 -0700 Subject: [PATCH 0989/1062] Fix splat-cred.c cred usage No need to crhold current_cred(), fix possible leak in splat_cred_test2 Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #556 --- module/splat/splat-cred.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index fadf9bca0..e3d1c4eee 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -53,18 +53,18 @@ splat_cred_test1(struct file *file, void *arg) uid_t uid, ruid, suid; gid_t gid, rgid, sgid, *groups; int ngroups, i, count = 0; + cred_t *cr = CRED(); - uid = crgetuid(CRED()); - ruid = crgetruid(CRED()); - suid = crgetsuid(CRED()); + uid = crgetuid(cr); + ruid = crgetruid(cr); + suid = crgetsuid(cr); - gid = crgetgid(CRED()); - rgid = crgetrgid(CRED()); - sgid = crgetsgid(CRED()); + gid = crgetgid(cr); + rgid = crgetrgid(cr); + sgid = crgetsgid(cr); - crhold(CRED()); - ngroups = crgetngroups(CRED()); - groups = crgetgroups(CRED()); + ngroups = crgetngroups(cr); + groups = crgetgroups(cr); memset(str, 0, GROUP_STR_SIZE); for (i = 0; i < ngroups; i++) { @@ -78,8 +78,6 @@ splat_cred_test1(struct file *file, void *arg) } } - crfree(CRED()); - splat_vprint(file, SPLAT_CRED_TEST1_NAME, "uid: %d ruid: %d suid: %d " "gid: %d rgid: %d sgid: %d\n", @@ -114,6 +112,8 @@ splat_cred_test2(struct file *file, void *arg) gid_t gid, rgid, sgid, *groups; int ngroups, i, count = 0; + crhold(kcred); + uid = crgetuid(kcred); ruid = crgetruid(kcred); suid = crgetsuid(kcred); @@ -122,7 +122,6 @@ splat_cred_test2(struct file *file, void *arg) rgid = crgetrgid(kcred); sgid = crgetsgid(kcred); - crhold(kcred); ngroups = crgetngroups(kcred); groups = crgetgroups(kcred); @@ -134,6 +133,7 @@ splat_cred_test2(struct file *file, void *arg) splat_vprint(file, SPLAT_CRED_TEST2_NAME, "Failed too many group entries for temp " "buffer: %d, %s\n", ngroups, str); + crfree(kcred); return -ENOSPC; } } From ae7eda1dde8aebc298a013254dcd90f7fa42171a Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 18 Oct 2016 17:30:41 -0700 Subject: [PATCH 0990/1062] Linux 4.9 compat: group_info changes In Linux 4.9, torvalds/linux@81243ea, group_info changed from 2d array via ->blocks to 1d array via ->gid. We change the spl cred functions accordingly. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #581 --- config/spl-build.m4 | 23 +++++++++++++++++++++++ include/sys/cred.h | 5 +++++ module/spl/spl-cred.c | 10 ++++++++++ module/splat/splat-cred.c | 5 +++-- 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 94e692a8b..7e2e7a0a9 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -49,6 +49,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_WAIT_ON_BIT SPL_AC_MUTEX_OWNER SPL_AC_INODE_LOCK + SPL_AC_GROUP_INFO_GID ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1574,3 +1575,25 @@ AC_DEFUN([SPL_AC_INODE_LOCK], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # 4.9 API change +dnl # group_info changed from 2d array via >blocks to 1d array via ->gid +dnl # +AC_DEFUN([SPL_AC_GROUP_INFO_GID], [ + AC_MSG_CHECKING([whether group_info->gid exists]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct group_info *gi = groups_alloc(1); + gi->gid[0] = KGIDT_INIT(0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GROUP_INFO_GID, 1, [group_info->gid exists]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/include/sys/cred.h b/include/sys/cred.h index 58f7aafda..2ad7115e0 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -34,6 +34,11 @@ typedef struct cred cred_t; #define kcred ((cred_t *)(init_task.cred)) #define CRED() ((cred_t *)current_cred()) +/* Linux 4.9 API change, GROUP_AT was removed */ +#ifndef GROUP_AT +#define GROUP_AT(gi, i) ((gi)->gid[i]) +#endif + #ifdef HAVE_KUIDGID_T #define KUID_TO_SUID(x) (__kuid_val(x)) diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index d046f9513..1d486c1f0 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -85,7 +85,9 @@ crgetngroups(const cred_t *cr) gi = cr->group_info; rc = gi->ngroups; +#ifndef HAVE_GROUP_INFO_GID /* + * For Linux <= 4.8, * crgetgroups will only returns gi->blocks[0], which contains only * the first NGROUPS_PER_BLOCK groups. */ @@ -93,12 +95,16 @@ crgetngroups(const cred_t *cr) WARN_ON_ONCE(1); rc = NGROUPS_PER_BLOCK; } +#endif return rc; } /* * Return an array of supplemental gids. The returned address is safe * to use as long as the caller has taken a reference with crhold(). + * + * Linux 4.9 API change, group_info changed from 2d array via ->blocks to 1d + * array via ->gid. */ gid_t * crgetgroups(const cred_t *cr) @@ -107,8 +113,12 @@ crgetgroups(const cred_t *cr) gid_t *gids = NULL; gi = cr->group_info; +#ifdef HAVE_GROUP_INFO_GID + gids = KGIDP_TO_SGIDP(gi->gid); +#else if (gi->nblocks > 0) gids = KGIDP_TO_SGIDP(gi->blocks[0]); +#endif return gids; } diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index e3d1c4eee..f6b70ce34 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -166,6 +166,7 @@ splat_cred_test2(struct file *file, void *arg) return 0; } /* splat_cred_test2() */ +#define SPLAT_NGROUPS 32 /* * Verify the groupmember() works correctly by constructing an interesting * CRED() and checking that the expected gids are part of it. @@ -188,7 +189,7 @@ splat_cred_test3(struct file *file, void *arg) * 1:(NGROUPS_MAX-1). Gid 0 is explicitly avoided so we can reliably * test for its absence in the test cases. */ - gi = groups_alloc(NGROUPS_SMALL); + gi = groups_alloc(SPLAT_NGROUPS); if (gi == NULL) { splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed create " "group_info for known gids: %d\n", -ENOMEM); @@ -196,7 +197,7 @@ splat_cred_test3(struct file *file, void *arg) goto show_groups; } - for (i = 0, tmp_gid = known_gid; i < NGROUPS_SMALL; i++) { + for (i = 0, tmp_gid = known_gid; i < SPLAT_NGROUPS; i++) { splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Adding gid %d " "to current CRED() (%d/%d)\n", tmp_gid, i, gi->ngroups); #ifdef HAVE_KUIDGID_T From 7b25c48e6ec6aa55bd5fead2d57ade01bfb0777b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 25 Oct 2016 13:13:49 -0700 Subject: [PATCH 0991/1062] Tag 0.7.0-rc2 Second release candidate. Signed-off-by: Brian Behlendorf --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 8f412eae1..89d0dd0ac 100644 --- a/META +++ b/META @@ -2,7 +2,7 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.7.0 -Release: rc1 +Release: rc2 Release-Tags: relext License: GPL Author: OpenZFS on Linux From 1b457bcbe502eb29333a34b0518c1dca0e2ee974 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 28 Oct 2016 20:56:38 +0000 Subject: [PATCH 0992/1062] Fix vmem_size() Add a minimal implementation of vmem_size() which accounts for the virtual memory usage of the SPL's kmem cache. This functionality is only useful on 32-bit systems with a small virtual address space. The following assumptions are made: 1) The major SPL consumer of virtual memory is the kmem cache. 2) Memory allocated with vmem_alloc() is short lived and can be ignored. 3) Allow a 4MB floor as a generous pad given normal consumption. 4) The spl_kmem_cache_sem only contends with cache create/destroy. Signed-off-by: Brian Behlendorf --- module/spl/spl-vmem.c | 34 ++++++++++++++++++++++++++++++---- module/splat/splat-kmem.c | 19 ++++++++++++++----- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/module/spl/spl-vmem.c b/module/spl/spl-vmem.c index e177988a7..dd10607dc 100644 --- a/module/spl/spl-vmem.c +++ b/module/spl/spl-vmem.c @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -36,14 +37,39 @@ EXPORT_SYMBOL(zio_alloc_arena); vmem_t *zio_arena = NULL; EXPORT_SYMBOL(zio_arena); +#define VMEM_FLOOR_SIZE (4 * 1024 * 1024) /* 4MB floor */ + +/* + * Return approximate virtual memory usage based on these assumptions: + * + * 1) The major SPL consumer of virtual memory is the kmem cache. + * 2) Memory allocated with vmem_alloc() is short lived and can be ignored. + * 3) Allow a 4MB floor as a generous pad given normal consumption. + * 4) The spl_kmem_cache_sem only contends with cache create/destroy. + */ size_t vmem_size(vmem_t *vmp, int typemask) { - ASSERT3P(vmp, ==, NULL); - ASSERT3S(typemask & VMEM_ALLOC, ==, VMEM_ALLOC); - ASSERT3S(typemask & VMEM_FREE, ==, VMEM_FREE); + spl_kmem_cache_t *skc; + size_t alloc = VMEM_FLOOR_SIZE; - return (VMALLOC_TOTAL); + if ((typemask & VMEM_ALLOC) && (typemask & VMEM_FREE)) + return (VMALLOC_TOTAL); + + + down_read(&spl_kmem_cache_sem); + list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { + if (skc->skc_flags & KMC_VMEM) + alloc += skc->skc_slab_size * skc->skc_slab_total; + } + up_read(&spl_kmem_cache_sem); + + if (typemask & VMEM_ALLOC) + return (MIN(alloc, VMALLOC_TOTAL)); + else if (typemask & VMEM_FREE) + return (MAX(VMALLOC_TOTAL - alloc, 0)); + else + return (0); } EXPORT_SYMBOL(vmem_size); diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 288112278..102a76ea8 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1131,9 +1131,15 @@ out: static int splat_kmem_test10(struct file *file, void *arg) { - uint64_t size, alloc, rc = 0; + uint64_t size, alloc, maxsize, limit, rc = 0; - for (size = 32; size <= 1024*1024; size *= 2) { +#if defined(CONFIG_64BIT) + maxsize = (1024 * 1024); +#else + maxsize = (128 * 1024); +#endif + + for (size = 32; size <= maxsize; size *= 2) { splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "name", "time (sec)\tslabs \tobjs \thash\n"); @@ -1142,8 +1148,10 @@ splat_kmem_test10(struct file *file, void *arg) for (alloc = 1; alloc <= 1024; alloc *= 2) { - /* Skip tests which exceed 1/2 of physical memory. */ - if (size * alloc * SPLAT_KMEM_THREADS > physmem / 2) + /* Skip tests which exceed 1/2 of memory. */ + limit = MIN(physmem * PAGE_SIZE, + vmem_size(NULL, VMEM_ALLOC | VMEM_FREE)) / 2; + if (size * alloc * SPLAT_KMEM_THREADS > limit) continue; rc = splat_kmem_cache_thread_test(file, arg, @@ -1223,7 +1231,8 @@ splat_kmem_test13(struct file *file, void *arg) int i, rc = 0, max_time = 10; size = 128 * 1024; - count = ((physmem * PAGE_SIZE) / 4 / size); + count = MIN(physmem * PAGE_SIZE, vmem_size(NULL, + VMEM_ALLOC | VMEM_FREE)) / 4 / size; kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST13_NAME, size, 0, 0); From cbba7146676dd145f373bcbe4f4f435d9100ddbb Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 28 Oct 2016 21:23:30 +0000 Subject: [PATCH 0993/1062] Add TASKQID_INVALID and TASKQID_INITIAL macros Add the TASKQID_INVALID and TASKQID_INITIAL macros and update the taskq implementation and test cases to use them. This is solely for the purposes of readability and introduces no functional change. Signed-off-by: Brian Behlendorf --- include/sys/taskq.h | 6 ++++++ module/spl/spl-taskq.c | 18 +++++++++--------- module/splat/splat-mutex.c | 30 ++++++++++++++++++------------ module/splat/splat-rwlock.c | 5 +++-- module/splat/splat-taskq.c | 26 +++++++++++++------------- 5 files changed, 49 insertions(+), 36 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 19bc6c1dd..1eecda4d2 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -56,6 +56,12 @@ #define TQ_NEW 0x04000000 #define TQ_FRONT 0x08000000 +/* + * Reserved taskqid values. + */ +#define TASKQID_INVALID ((taskqid_t)0) +#define TASKQID_INITIAL ((taskqid_t)1) + /* * spin_lock(lock) and spin_lock_nested(lock,0) are equivalent, * so TQ_LOCK_DYNAMIC must not evaluate to 0 diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 320ad3914..b362bef54 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -190,7 +190,7 @@ task_done(taskq_t *tq, taskq_ent_t *t) list_del_init(&t->tqent_list); if (tq->tq_nalloc <= tq->tq_minalloc) { - t->tqent_id = 0; + t->tqent_id = TASKQID_INVALID; t->tqent_func = NULL; t->tqent_arg = NULL; t->tqent_flags = 0; @@ -276,7 +276,7 @@ taskq_lowest_id(taskq_t *tq) if (!list_empty(&tq->tq_active_list)) { tqt = list_entry(tq->tq_active_list.next, taskq_thread_t, tqt_active_list); - ASSERT(tqt->tqt_id != 0); + ASSERT(tqt->tqt_id != TASKQID_INVALID); lowest_id = MIN(lowest_id, tqt->tqt_id); } @@ -548,7 +548,7 @@ taskqid_t taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { taskq_ent_t *t; - taskqid_t rc = 0; + taskqid_t rc = TASKQID_INVALID; unsigned long irqflags; ASSERT(tq); @@ -611,7 +611,7 @@ taskqid_t taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, uint_t flags, clock_t expire_time) { - taskqid_t rc = 0; + taskqid_t rc = TASKQID_INVALID; taskq_ent_t *t; unsigned long irqflags; @@ -667,7 +667,7 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, /* Taskq being destroyed and all tasks drained */ if (!(tq->tq_flags & TASKQ_ACTIVE)) { - t->tqent_id = 0; + t->tqent_id = TASKQID_INVALID; goto out; } @@ -941,7 +941,7 @@ taskq_thread(void *args) taskq_thread_spawn(tq)) seq_tasks = 0; - tqt->tqt_id = 0; + tqt->tqt_id = TASKQID_INVALID; tqt->tqt_flags = 0; wake_up_all(&tq->tq_wait_waitq); } else { @@ -975,7 +975,7 @@ taskq_thread_create(taskq_t *tq) INIT_LIST_HEAD(&tqt->tqt_thread_list); INIT_LIST_HEAD(&tqt->tqt_active_list); tqt->tqt_tq = tq; - tqt->tqt_id = 0; + tqt->tqt_id = TASKQID_INVALID; tqt->tqt_thread = spl_kthread_create(taskq_thread, tqt, "%s", tq->tq_name); @@ -1037,8 +1037,8 @@ taskq_create(const char *name, int nthreads, pri_t pri, tq->tq_maxalloc = maxalloc; tq->tq_nalloc = 0; tq->tq_flags = (flags | TASKQ_ACTIVE); - tq->tq_next_id = 1; - tq->tq_lowest_id = 1; + tq->tq_next_id = TASKQID_INITIAL; + tq->tq_lowest_id = TASKQID_INITIAL; INIT_LIST_HEAD(&tq->tq_free_list); INIT_LIST_HEAD(&tq->tq_pend_list); INIT_LIST_HEAD(&tq->tq_prio_list); diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 86bef8ee3..d39551354 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -81,7 +81,8 @@ splat_mutex_test1(struct file *file, void *arg) { mutex_priv_t *mp; taskq_t *tq; - int id, rc = 0; + taskqid_t id; + int rc = 0; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); if (mp == NULL) @@ -105,8 +106,8 @@ splat_mutex_test1(struct file *file, void *arg) * function will indicate this status in the passed private data. */ mp->mp_rc = -EINVAL; - id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); - if (id == 0) { + id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); + if (id == TASKQID_INVALID) { mutex_exit(&mp->mp_mtx); splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", "taskq_dispatch() failed\n"); @@ -120,8 +121,8 @@ splat_mutex_test1(struct file *file, void *arg) /* Task function successfully acquired mutex, very bad! */ if (mp->mp_rc != -EBUSY) { splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, - "mutex_trylock() incorrectly succeeded when " - "the mutex was held, %d/%d\n", id, mp->mp_rc); + "mutex_trylock() incorrectly succeeded when " + "the mutex was held, %d/%d\n", (int)id, mp->mp_rc); rc = -EINVAL; goto out; } else { @@ -136,8 +137,8 @@ splat_mutex_test1(struct file *file, void *arg) * can be verified by checking the private data. */ mp->mp_rc = -EINVAL; - id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); - if (id == 0) { + id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", "taskq_dispatch() failed\n"); rc = -EINVAL; @@ -149,8 +150,8 @@ splat_mutex_test1(struct file *file, void *arg) /* Task function failed to acquire mutex, very bad! */ if (mp->mp_rc != 0) { splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, - "mutex_trylock() incorrectly failed when " - "the mutex was not held, %d/%d\n", id, mp->mp_rc); + "mutex_trylock() incorrectly failed when the mutex " + "was not held, %d/%d\n", (int)id, mp->mp_rc); rc = -EINVAL; } else { splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", @@ -188,6 +189,7 @@ splat_mutex_test2(struct file *file, void *arg) { mutex_priv_t *mp; taskq_t *tq; + taskqid_t id; int i, rc = 0; mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); @@ -218,7 +220,8 @@ splat_mutex_test2(struct file *file, void *arg) * mutex is implemented right this will never happy, that's a pass. */ for (i = 0; i < SPLAT_MUTEX_TEST_COUNT; i++) { - if (!taskq_dispatch(tq, splat_mutex_test2_func, mp, TQ_SLEEP)) { + id = taskq_dispatch(tq, splat_mutex_test2_func, mp, TQ_SLEEP); + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "Failed to queue task %d\n", i); rc = -EINVAL; @@ -260,6 +263,7 @@ splat_mutex_test3(struct file *file, void *arg) { mutex_priv_t mp; taskq_t *tq; + taskqid_t id; int rc = 0; mp.mp_magic = SPLAT_MUTEX_TEST_MAGIC; @@ -283,7 +287,8 @@ splat_mutex_test3(struct file *file, void *arg) goto out_exit; } - if (taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP) == 0) { + id = taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP); + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Failed to " "dispatch function '%s' to taskq\n", sym2str(splat_mutex_owned)); @@ -310,7 +315,8 @@ splat_mutex_test3(struct file *file, void *arg) goto out; } - if (taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP) == 0) { + id = taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP); + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Failed to " "dispatch function '%s' to taskq\n", sym2str(splat_mutex_owned)); diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 4576f20c7..87bc0c1c0 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -348,7 +348,8 @@ splat_rwlock_test2(struct file *file, void *arg) * rwlock is implemented right this will never happy, that's a pass. */ for (i = 0; i < tq_count; i++) { - if (!taskq_dispatch(tq,splat_rwlock_test2_func,rwp,TQ_SLEEP)) { + if (taskq_dispatch(tq, splat_rwlock_test2_func, rwp, + TQ_SLEEP) == TASKQID_INVALID) { splat_vprint(file, SPLAT_RWLOCK_TEST2_NAME, "Failed to queue task %d\n", i); rc = -EINVAL; @@ -469,7 +470,7 @@ splat_rwlock_test4_type(taskq_t *tq, rw_priv_t *rwp, int expected_rc, rw_enter(&rwp->rw_rwlock, holder_type); id = taskq_dispatch(tq, splat_rwlock_test4_func, rwp, TQ_SLEEP); - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(rwp->rw_file, SPLAT_RWLOCK_TEST4_NAME, "%s", "taskq_dispatch() failed\n"); rc = -EINVAL; diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index f26f828d9..665126bdd 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -160,7 +160,7 @@ splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) &tq_arg, TQ_SLEEP); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test13_func)); @@ -296,7 +296,7 @@ splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { tq_args[i], TQ_SLEEP); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch " "failed\n", tq_args[i]->name, tq_args[i]->id, @@ -318,7 +318,7 @@ splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { tq_args[i], TQ_SLEEP); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq " "'%s/%d' function '%s' dispatch failed\n", tq_args[i]->name, tq_args[i]->id, @@ -420,7 +420,7 @@ splat_taskq_test3_impl(struct file *file, void *arg, boolean_t prealloc) tq_arg, TQ_SLEEP); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg->name, sym2str(splat_taskq_test13_func)); @@ -525,7 +525,7 @@ splat_taskq_test4_common(struct file *file, void *arg, int minalloc, &tq_arg, TQ_SLEEP); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' function '%s' dispatch " "%d failed\n", tq_arg.name, @@ -741,7 +741,7 @@ splat_taskq_test5_impl(struct file *file, void *arg, boolean_t prealloc) &tq_id[i], TQ_SLEEP); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test5_func)); @@ -905,7 +905,7 @@ splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) &tq_id[i], tflags); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test6_func)); @@ -983,7 +983,7 @@ splat_taskq_test7_func(void *arg) tq_arg, TQ_SLEEP); } - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST7_NAME, "Taskq '%s' function '%s' dispatch failed " "(depth = %u)\n", tq_arg->name, @@ -1121,7 +1121,7 @@ splat_taskq_throughput(struct file *file, void *arg, const char *name, &tq_arg, TQ_SLEEP, tqes[i]); id = tqes[i]->tqent_id; - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, name, "Taskq '%s' function '%s' " "dispatch %d failed\n", tq_arg.name, sym2str(splat_taskq_throughput_func), i); @@ -1235,7 +1235,7 @@ splat_taskq_test9(struct file *file, void *arg) id = taskq_dispatch_delay(tq, splat_taskq_test9_func, tq_arg, TQ_SLEEP, ddi_get_lbolt() + rnd); - if (id == 0) { + if (id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' delay dispatch failed\n", SPLAT_TASKQ_TEST9_NAME); @@ -1344,7 +1344,7 @@ splat_taskq_test10(struct file *file, void *arg) tq_arg, TQ_SLEEP, ddi_get_lbolt() + rnd); } - if (tq_arg->id == 0) { + if (tq_arg->id == TASKQID_INVALID) { splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' dispatch failed\n", SPLAT_TASKQ_TEST10_NAME); @@ -1473,8 +1473,8 @@ splat_taskq_test11(struct file *file, void *arg) dynamic.tv_sec, dynamic.tv_nsec); /* A 10x increase in runtime is used to indicate a core problem. */ - if ((dynamic.tv_sec * NANOSEC + dynamic.tv_nsec) > - ((normal.tv_sec * NANOSEC + normal.tv_nsec) * 10)) + if (((int64_t)dynamic.tv_sec * NANOSEC + (int64_t)dynamic.tv_nsec) > + (((int64_t)normal.tv_sec * NANOSEC + (int64_t)normal.tv_nsec) * 10)) error = -ETIME; return (error); From 493492559e32aa77ff8a5b32572afab5b848a53b Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 1 Dec 2016 10:06:27 -0800 Subject: [PATCH 0994/1062] Limit number of tasks shown in taskq proc To prevent holding tq_lock for too long. Before zfsonlinux/zfs@8e71ab9, hogging delay tasks and cat /proc/spl/taskq would easily cause a lockup. While that bug has been fixed. It's probably still a good idea to do this just in case task lists grow too large. Reviewed-by: Tim Chase Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #586 --- man/man5/spl-module-parameters.5 | 15 +++++++++++++++ module/spl/spl-proc.c | 19 +++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 1b760243e..97241fd53 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -326,3 +326,18 @@ configurations. .sp Default value: \fB4\fR .RE + +.sp +.ne 2 +.na +\fBspl_max_show_tasks\fR (uint) +.ad +.RS 12n +The maximum number of tasks per pending list in each taskq shown in +/proc/spl/{taskq,taskq-all}. Write 0 to turn off the limit. The proc file will +walk the lists with lock held, reading it could cause a lock up if the list +grow too large without limiting the output. "(truncated)" will be shown if the +list is larger than the limit. +.sp +Default value: \fB512\fR +.RE diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index db546ea61..345d0d5c7 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -234,6 +234,10 @@ taskq_seq_show_headers(struct seq_file *f) #define LHEAD_ACTIVE 4 #define LHEAD_SIZE 5 +static unsigned int spl_max_show_tasks = 512; +module_param(spl_max_show_tasks, uint, 0644); +MODULE_PARM_DESC(spl_max_show_tasks, "Max number of tasks shown in taskq proc"); + static int taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) { @@ -308,16 +312,20 @@ taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) if (lheads[i]) { j = 0; list_for_each(lh, lheads[i]) { + if (spl_max_show_tasks != 0 && + j >= spl_max_show_tasks) { + seq_printf(f, "\n\t(truncated)"); + break; + } /* show the wait waitq list */ if (i == LHEAD_WAIT) { wq = list_entry(lh, wait_queue_t, task_list); if (j == 0) seq_printf(f, "\t%s:", list_names[i]); - else if (j == 12) { + else if (j % 8 == 0) seq_printf(f, "\n\t "); - j = 0; - } + tsk = wq->private; seq_printf(f, " %d", tsk->pid); /* pend, prio and delay lists */ @@ -327,10 +335,9 @@ taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) if (j == 0) seq_printf(f, "\t%s:", list_names[i]); - else if (j == 2) { + else if (j % 2 == 0) seq_printf(f, "\n\t "); - j = 0; - } + seq_printf(f, " %pf(%ps)", tqe->tqent_func, tqe->tqent_arg); From f200b836734550ba258a0d7e05381dc8cebf80f4 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 8 Dec 2016 13:00:20 -0800 Subject: [PATCH 0995/1062] Add system_delay_taskq for long delay Add a dedicated system_delay_taskq for long delay like spa_deadman and zpl_posix_acl_free. This will allow us to use system_taskq in the manner of dispatch multiple tasks and call taskq_wait_outstanding. Reviewed by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #588 --- include/sys/taskq.h | 2 ++ module/spl/spl-taskq.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 1eecda4d2..5adda8827 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -129,6 +129,8 @@ typedef struct taskq_thread { /* Global system-wide dynamic task queue available for all consumers */ extern taskq_t *system_taskq; +/* Global dynamic task queue for long delay */ +extern taskq_t *system_delay_taskq; /* List of all taskqs */ extern struct list_head tq_list; diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index b362bef54..83f483ea9 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -50,6 +50,9 @@ MODULE_PARM_DESC(spl_taskq_thread_sequential, /* Global system-wide dynamic task queue available for all consumers */ taskq_t *system_taskq; EXPORT_SYMBOL(system_taskq); +/* Global dynamic task queue for long delay */ +taskq_t *system_delay_taskq; +EXPORT_SYMBOL(system_delay_taskq); /* Private dedicated taskq for creating new taskq threads on demand. */ static taskq_t *dynamic_taskq; @@ -1238,10 +1241,18 @@ spl_taskq_init(void) if (system_taskq == NULL) return (1); + system_delay_taskq = taskq_create("spl_delay_taskq", MAX(boot_ncpus, 4), + maxclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC); + if (system_delay_taskq == NULL) { + taskq_destroy(system_taskq); + return (1); + } + dynamic_taskq = taskq_create("spl_dynamic_taskq", 1, maxclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE); if (dynamic_taskq == NULL) { taskq_destroy(system_taskq); + taskq_destroy(system_delay_taskq); return (1); } @@ -1261,6 +1272,9 @@ spl_taskq_fini(void) taskq_destroy(dynamic_taskq); dynamic_taskq = NULL; + taskq_destroy(system_delay_taskq); + system_delay_taskq = NULL; + taskq_destroy(system_taskq); system_taskq = NULL; From 71a3c9c45d7829994d3d66f014410f7c223f88f7 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 15 Dec 2016 11:12:50 -0800 Subject: [PATCH 0996/1062] Fix splat memleak SPLAT_TEST_FINI didn't call kfree causing memleak. Signed-off-by: Chunwei Chen --- module/splat/splat-internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index d00af90fa..36cf04da1 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -94,6 +94,7 @@ &((sub)->test_list), test_list) { \ if (_test_->desc.id == tid) { \ list_del_init(&(_test_->test_list)); \ + kfree(_test_); \ _flag_ = 1; \ } \ } \ From 9c9ad845ef372a4c47a01c20e939fd2c40bc7ac6 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 14 Dec 2016 18:24:47 -0800 Subject: [PATCH 0997/1062] Refactor some splat macro to function Refactor the code by making splat_test_{init,fini}, splat_subsystem_{init,fini} into functions. They don't have reason to be macro and it would be too bloated to inline every call. Signed-off-by: Chunwei Chen --- module/splat/splat-atomic.c | 4 +- module/splat/splat-condvar.c | 20 ++++---- module/splat/splat-cred.c | 12 ++--- module/splat/splat-ctl.c | 88 +++++++++++++++++++++++++++++++++-- module/splat/splat-generic.c | 24 +++++----- module/splat/splat-internal.h | 78 ++----------------------------- module/splat/splat-kmem.c | 48 +++++++++---------- module/splat/splat-kobj.c | 8 ++-- module/splat/splat-linux.c | 4 +- module/splat/splat-list.c | 28 +++++------ module/splat/splat-mutex.c | 16 +++---- module/splat/splat-random.c | 4 +- module/splat/splat-rwlock.c | 28 +++++------ module/splat/splat-taskq.c | 44 +++++++++--------- module/splat/splat-thread.c | 12 ++--- module/splat/splat-time.c | 8 ++-- module/splat/splat-vnode.c | 24 +++++----- module/splat/splat-zlib.c | 4 +- 18 files changed, 233 insertions(+), 221 deletions(-) diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index 999f4f058..f6ed80fb8 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -211,7 +211,7 @@ splat_atomic_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_ATOMIC; - SPLAT_TEST_INIT(sub, SPLAT_ATOMIC_TEST1_NAME, SPLAT_ATOMIC_TEST1_DESC, + splat_test_init(sub, SPLAT_ATOMIC_TEST1_NAME, SPLAT_ATOMIC_TEST1_DESC, SPLAT_ATOMIC_TEST1_ID, splat_atomic_test1); return sub; @@ -221,7 +221,7 @@ void splat_atomic_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_ATOMIC_TEST1_ID); + splat_test_fini(sub, SPLAT_ATOMIC_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index bdbaf79c8..5a9b40f92 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -478,15 +478,15 @@ splat_condvar_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_CONDVAR; - SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST1_NAME, SPLAT_CONDVAR_TEST1_DESC, + splat_test_init(sub, SPLAT_CONDVAR_TEST1_NAME, SPLAT_CONDVAR_TEST1_DESC, SPLAT_CONDVAR_TEST1_ID, splat_condvar_test1); - SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST2_NAME, SPLAT_CONDVAR_TEST2_DESC, + splat_test_init(sub, SPLAT_CONDVAR_TEST2_NAME, SPLAT_CONDVAR_TEST2_DESC, SPLAT_CONDVAR_TEST2_ID, splat_condvar_test2); - SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST3_NAME, SPLAT_CONDVAR_TEST3_DESC, + splat_test_init(sub, SPLAT_CONDVAR_TEST3_NAME, SPLAT_CONDVAR_TEST3_DESC, SPLAT_CONDVAR_TEST3_ID, splat_condvar_test3); - SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST4_NAME, SPLAT_CONDVAR_TEST4_DESC, + splat_test_init(sub, SPLAT_CONDVAR_TEST4_NAME, SPLAT_CONDVAR_TEST4_DESC, SPLAT_CONDVAR_TEST4_ID, splat_condvar_test4); - SPLAT_TEST_INIT(sub, SPLAT_CONDVAR_TEST5_NAME, SPLAT_CONDVAR_TEST5_DESC, + splat_test_init(sub, SPLAT_CONDVAR_TEST5_NAME, SPLAT_CONDVAR_TEST5_DESC, SPLAT_CONDVAR_TEST5_ID, splat_condvar_test5); return sub; @@ -496,11 +496,11 @@ void splat_condvar_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_CONDVAR_TEST1_ID); + splat_test_fini(sub, SPLAT_CONDVAR_TEST5_ID); + splat_test_fini(sub, SPLAT_CONDVAR_TEST4_ID); + splat_test_fini(sub, SPLAT_CONDVAR_TEST3_ID); + splat_test_fini(sub, SPLAT_CONDVAR_TEST2_ID); + splat_test_fini(sub, SPLAT_CONDVAR_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index f6b70ce34..5b07a1fe7 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -270,11 +270,11 @@ splat_cred_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_CRED; - SPLAT_TEST_INIT(sub, SPLAT_CRED_TEST1_NAME, SPLAT_CRED_TEST1_DESC, + splat_test_init(sub, SPLAT_CRED_TEST1_NAME, SPLAT_CRED_TEST1_DESC, SPLAT_CRED_TEST1_ID, splat_cred_test1); - SPLAT_TEST_INIT(sub, SPLAT_CRED_TEST2_NAME, SPLAT_CRED_TEST2_DESC, + splat_test_init(sub, SPLAT_CRED_TEST2_NAME, SPLAT_CRED_TEST2_DESC, SPLAT_CRED_TEST2_ID, splat_cred_test2); - SPLAT_TEST_INIT(sub, SPLAT_CRED_TEST3_NAME, SPLAT_CRED_TEST3_DESC, + splat_test_init(sub, SPLAT_CRED_TEST3_NAME, SPLAT_CRED_TEST3_DESC, SPLAT_CRED_TEST3_ID, splat_cred_test3); return sub; @@ -285,9 +285,9 @@ splat_cred_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_CRED_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_CRED_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_CRED_TEST1_ID); + splat_test_fini(sub, SPLAT_CRED_TEST3_ID); + splat_test_fini(sub, SPLAT_CRED_TEST2_ID); + splat_test_fini(sub, SPLAT_CRED_TEST1_ID); kfree(sub); } /* splat_cred_fini() */ diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 4d4148d42..8452f1363 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -33,10 +33,10 @@ * the kmem interfaces have been implemented correctly. When the splat * module is loaded splat_*_init() will be called for each subsystems * tests. It is the responsibility of splat_*_init() to register all - * the tests for this subsystem using the SPLAT_TEST_INIT() macro. + * the tests for this subsystem using the splat_test_init(). * Similarly splat_*_fini() is called when the splat module is removed - * and is responsible for unregistering its tests via the SPLAT_TEST_FINI - * macro. Once a test is registered it can then be run with an ioctl() + * and is responsible for unregistering its tests via the splat_test_fini. + * Once a test is registered it can then be run with an ioctl() * call which specifies the subsystem and test to be run. The provided * splat command line tool can be used to display all available * subsystems and tests. It can also be used to run the full suite @@ -599,6 +599,88 @@ static struct miscdevice splat_misc = { .fops = &splat_fops, }; +static void splat_subsystem_init(const char *name, + splat_subsystem_t *(*init)(void)) +{ + splat_subsystem_t *sub; + sub = init(); + if (sub == NULL) { + printk(KERN_ERR "splat: Error initializing: %s\n", name); + return; + } + spin_lock(&splat_module_lock); + list_add_tail(&sub->subsystem_list, &splat_module_list); + spin_unlock(&splat_module_lock); +} + +static void splat_subsystem_fini(const char *name, + int (*id_func)(void), void (*fini)(splat_subsystem_t *)) +{ + splat_subsystem_t *sub, *tmp; + int id, flag = 0; + + id = id_func(); + spin_lock(&splat_module_lock); + list_for_each_entry_safe(sub, tmp, &splat_module_list, subsystem_list) { + if (sub->desc.id == id) { + list_del_init(&sub->subsystem_list); + flag = 1; + break; + } + } + spin_unlock(&splat_module_lock); + if (flag == 0) + printk(KERN_ERR "splat: Error finalizing: %s\n", name); + else + fini(sub); +} + +#define SPLAT_SUBSYSTEM_INIT(type) \ + splat_subsystem_init(#type, splat_##type##_init) +#define SPLAT_SUBSYSTEM_FINI(type) \ + splat_subsystem_fini(#type, splat_##type##_id, splat_##type##_fini) + +void splat_test_init(splat_subsystem_t *sub, const char *name, + const char *desc, unsigned int tid, splat_test_func_t func) +{ + splat_test_t *test; + test = kmalloc(sizeof (splat_test_t), GFP_KERNEL); + if (test == NULL) { + printk(KERN_ERR "splat: Error initializing: %s/%u\n", + name, tid); + return; + } + memset(test, 0, sizeof (splat_test_t)); + strncpy(test->desc.name, name, SPLAT_NAME_SIZE-1); + strncpy(test->desc.desc, desc, SPLAT_DESC_SIZE-1); + test->desc.id = tid; + test->test = func; + INIT_LIST_HEAD(&test->test_list); + spin_lock(&sub->test_lock); + list_add_tail(&test->test_list, &sub->test_list); + spin_unlock(&sub->test_lock); +} + +void splat_test_fini(splat_subsystem_t *sub, unsigned int tid) +{ + splat_test_t *test, *tmp; + int flag = 0; + + spin_lock(&sub->test_lock); + list_for_each_entry_safe(test, tmp, &sub->test_list, test_list) { + if (test->desc.id == tid) { + list_del_init(&test->test_list); + kfree(test); + flag = 1; + break; + } + } + spin_unlock(&sub->test_lock); + + if (flag == 0) + printk(KERN_ERR "splat: Error finalizing: %u\n", tid); +} + static int __init splat_init(void) { diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index 3f8119b1e..b8f6edc65 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -329,17 +329,17 @@ splat_generic_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_GENERIC; - SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST1_NAME, SPLAT_GENERIC_TEST1_DESC, + splat_test_init(sub, SPLAT_GENERIC_TEST1_NAME, SPLAT_GENERIC_TEST1_DESC, SPLAT_GENERIC_TEST1_ID, splat_generic_test_strtoul); - SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST2_NAME, SPLAT_GENERIC_TEST2_DESC, + splat_test_init(sub, SPLAT_GENERIC_TEST2_NAME, SPLAT_GENERIC_TEST2_DESC, SPLAT_GENERIC_TEST2_ID, splat_generic_test_strtol); - SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST3_NAME, SPLAT_GENERIC_TEST3_DESC, + splat_test_init(sub, SPLAT_GENERIC_TEST3_NAME, SPLAT_GENERIC_TEST3_DESC, SPLAT_GENERIC_TEST3_ID, splat_generic_test_strtoull); - SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST4_NAME, SPLAT_GENERIC_TEST4_DESC, + splat_test_init(sub, SPLAT_GENERIC_TEST4_NAME, SPLAT_GENERIC_TEST4_DESC, SPLAT_GENERIC_TEST4_ID, splat_generic_test_strtoll); - SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST5_NAME, SPLAT_GENERIC_TEST5_DESC, + splat_test_init(sub, SPLAT_GENERIC_TEST5_NAME, SPLAT_GENERIC_TEST5_DESC, SPLAT_GENERIC_TEST5_ID, splat_generic_test_udivdi3); - SPLAT_TEST_INIT(sub, SPLAT_GENERIC_TEST6_NAME, SPLAT_GENERIC_TEST6_DESC, + splat_test_init(sub, SPLAT_GENERIC_TEST6_NAME, SPLAT_GENERIC_TEST6_DESC, SPLAT_GENERIC_TEST6_ID, splat_generic_test_divdi3); return sub; @@ -350,12 +350,12 @@ splat_generic_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_GENERIC_TEST1_ID); + splat_test_fini(sub, SPLAT_GENERIC_TEST6_ID); + splat_test_fini(sub, SPLAT_GENERIC_TEST5_ID); + splat_test_fini(sub, SPLAT_GENERIC_TEST4_ID); + splat_test_fini(sub, SPLAT_GENERIC_TEST3_ID); + splat_test_fini(sub, SPLAT_GENERIC_TEST2_ID); + splat_test_fini(sub, SPLAT_GENERIC_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 36cf04da1..9ae6c1d0c 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -30,80 +30,6 @@ #include #include -#define SPLAT_SUBSYSTEM_INIT(type) \ -({ splat_subsystem_t *_sub_; \ - \ - _sub_ = (splat_subsystem_t *)splat_##type##_init(); \ - if (_sub_ == NULL) { \ - printk(KERN_ERR "splat: Error initializing: " #type "\n"); \ - } else { \ - spin_lock(&splat_module_lock); \ - list_add_tail(&(_sub_->subsystem_list), \ - &splat_module_list); \ - spin_unlock(&splat_module_lock); \ - } \ -}) - -#define SPLAT_SUBSYSTEM_FINI(type) \ -({ splat_subsystem_t *_sub_, *_tmp_; \ - int _id_, _flag_ = 0; \ - \ - _id_ = splat_##type##_id(); \ - spin_lock(&splat_module_lock); \ - list_for_each_entry_safe(_sub_, _tmp_, &splat_module_list, \ - subsystem_list) { \ - if (_sub_->desc.id == _id_) { \ - list_del_init(&(_sub_->subsystem_list)); \ - spin_unlock(&splat_module_lock); \ - splat_##type##_fini(_sub_); \ - spin_lock(&splat_module_lock); \ - _flag_ = 1; \ - } \ - } \ - spin_unlock(&splat_module_lock); \ - \ - if (!_flag_) \ - printk(KERN_ERR "splat: Error finalizing: " #type "\n"); \ -}) - -#define SPLAT_TEST_INIT(sub, n, d, tid, func) \ -({ splat_test_t *_test_; \ - \ - _test_ = (splat_test_t *)kmalloc(sizeof(*_test_), GFP_KERNEL); \ - if (_test_ == NULL) { \ - printk(KERN_ERR "splat: Error initializing: " n "/" #tid" \n");\ - } else { \ - memset(_test_, 0, sizeof(*_test_)); \ - strncpy(_test_->desc.name, n, SPLAT_NAME_SIZE-1); \ - strncpy(_test_->desc.desc, d, SPLAT_DESC_SIZE-1); \ - _test_->desc.id = tid; \ - _test_->test = func; \ - INIT_LIST_HEAD(&(_test_->test_list)); \ - spin_lock(&((sub)->test_lock)); \ - list_add_tail(&(_test_->test_list),&((sub)->test_list));\ - spin_unlock(&((sub)->test_lock)); \ - } \ -}) - -#define SPLAT_TEST_FINI(sub, tid) \ -({ splat_test_t *_test_, *_tmp_; \ - int _flag_ = 0; \ - \ - spin_lock(&((sub)->test_lock)); \ - list_for_each_entry_safe(_test_, _tmp_, \ - &((sub)->test_list), test_list) { \ - if (_test_->desc.id == tid) { \ - list_del_init(&(_test_->test_list)); \ - kfree(_test_); \ - _flag_ = 1; \ - } \ - } \ - spin_unlock(&((sub)->test_lock)); \ - \ - if (!_flag_) \ - printk(KERN_ERR "splat: Error finalizing: " #tid "\n"); \ -}) - typedef int (*splat_test_func_t)(struct file *, void *); typedef struct splat_test { @@ -119,6 +45,10 @@ typedef struct splat_subsystem { struct list_head test_list; } splat_subsystem_t; +void splat_test_init(splat_subsystem_t *sub, const char *name, + const char *desc, unsigned int tid, splat_test_func_t func); +void splat_test_fini(splat_subsystem_t *sub, unsigned int tid); + #define SPLAT_INFO_BUFFER_SIZE 65536 #define SPLAT_INFO_BUFFER_REDZONE 256 diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 102a76ea8..8946b0671 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1352,31 +1352,31 @@ splat_kmem_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_KMEM; - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST1_NAME, SPLAT_KMEM_TEST1_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST1_NAME, SPLAT_KMEM_TEST1_DESC, SPLAT_KMEM_TEST1_ID, splat_kmem_test1); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST2_NAME, SPLAT_KMEM_TEST2_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST2_NAME, SPLAT_KMEM_TEST2_DESC, SPLAT_KMEM_TEST2_ID, splat_kmem_test2); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST3_NAME, SPLAT_KMEM_TEST3_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST3_NAME, SPLAT_KMEM_TEST3_DESC, SPLAT_KMEM_TEST3_ID, splat_kmem_test3); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST4_NAME, SPLAT_KMEM_TEST4_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST4_NAME, SPLAT_KMEM_TEST4_DESC, SPLAT_KMEM_TEST4_ID, splat_kmem_test4); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST5_NAME, SPLAT_KMEM_TEST5_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST5_NAME, SPLAT_KMEM_TEST5_DESC, SPLAT_KMEM_TEST5_ID, splat_kmem_test5); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST6_NAME, SPLAT_KMEM_TEST6_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST6_NAME, SPLAT_KMEM_TEST6_DESC, SPLAT_KMEM_TEST6_ID, splat_kmem_test6); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST7_NAME, SPLAT_KMEM_TEST7_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST7_NAME, SPLAT_KMEM_TEST7_DESC, SPLAT_KMEM_TEST7_ID, splat_kmem_test7); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST8_NAME, SPLAT_KMEM_TEST8_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST8_NAME, SPLAT_KMEM_TEST8_DESC, SPLAT_KMEM_TEST8_ID, splat_kmem_test8); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST9_NAME, SPLAT_KMEM_TEST9_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST9_NAME, SPLAT_KMEM_TEST9_DESC, SPLAT_KMEM_TEST9_ID, splat_kmem_test9); - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST10_NAME, SPLAT_KMEM_TEST10_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST10_NAME, SPLAT_KMEM_TEST10_DESC, SPLAT_KMEM_TEST10_ID, splat_kmem_test10); #if 0 - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, SPLAT_KMEM_TEST11_ID, splat_kmem_test11); #endif - SPLAT_TEST_INIT(sub, SPLAT_KMEM_TEST13_NAME, SPLAT_KMEM_TEST13_DESC, + splat_test_init(sub, SPLAT_KMEM_TEST13_NAME, SPLAT_KMEM_TEST13_DESC, SPLAT_KMEM_TEST13_ID, splat_kmem_test13); return sub; @@ -1386,20 +1386,20 @@ void splat_kmem_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST13_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST13_ID); #if 0 - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST11_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST11_ID); #endif - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST10_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST9_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST8_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST7_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_KMEM_TEST1_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST10_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST9_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST8_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST7_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST6_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST5_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST4_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST3_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST2_ID); + splat_test_fini(sub, SPLAT_KMEM_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c index a0d4097d5..6d78cb3e0 100644 --- a/module/splat/splat-kobj.c +++ b/module/splat/splat-kobj.c @@ -140,9 +140,9 @@ splat_kobj_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_KOBJ; - SPLAT_TEST_INIT(sub, SPLAT_KOBJ_TEST1_NAME, SPLAT_KOBJ_TEST1_DESC, + splat_test_init(sub, SPLAT_KOBJ_TEST1_NAME, SPLAT_KOBJ_TEST1_DESC, SPLAT_KOBJ_TEST1_ID, splat_kobj_test1); - SPLAT_TEST_INIT(sub, SPLAT_KOBJ_TEST2_NAME, SPLAT_KOBJ_TEST2_DESC, + splat_test_init(sub, SPLAT_KOBJ_TEST2_NAME, SPLAT_KOBJ_TEST2_DESC, SPLAT_KOBJ_TEST2_ID, splat_kobj_test2); return sub; @@ -153,8 +153,8 @@ splat_kobj_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_KOBJ_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_KOBJ_TEST1_ID); + splat_test_fini(sub, SPLAT_KOBJ_TEST2_ID); + splat_test_fini(sub, SPLAT_KOBJ_TEST1_ID); kfree(sub); } /* splat_kobj_fini() */ diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index 3652267f9..b5a1f142e 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -216,7 +216,7 @@ splat_linux_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_LINUX; - SPLAT_TEST_INIT(sub, SPLAT_LINUX_TEST1_NAME, SPLAT_LINUX_TEST1_DESC, + splat_test_init(sub, SPLAT_LINUX_TEST1_NAME, SPLAT_LINUX_TEST1_DESC, SPLAT_LINUX_TEST1_ID, splat_linux_test1); return sub; @@ -226,7 +226,7 @@ void splat_linux_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_LINUX_TEST1_ID); + splat_test_fini(sub, SPLAT_LINUX_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index f59394c14..bfbaf23c7 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -434,19 +434,19 @@ splat_list_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_LIST; - SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST1_NAME, SPLAT_LIST_TEST1_DESC, + splat_test_init(sub, SPLAT_LIST_TEST1_NAME, SPLAT_LIST_TEST1_DESC, SPLAT_LIST_TEST1_ID, splat_list_test1); - SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST2_NAME, SPLAT_LIST_TEST2_DESC, + splat_test_init(sub, SPLAT_LIST_TEST2_NAME, SPLAT_LIST_TEST2_DESC, SPLAT_LIST_TEST2_ID, splat_list_test2); - SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST3_NAME, SPLAT_LIST_TEST3_DESC, + splat_test_init(sub, SPLAT_LIST_TEST3_NAME, SPLAT_LIST_TEST3_DESC, SPLAT_LIST_TEST3_ID, splat_list_test3); - SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST4_NAME, SPLAT_LIST_TEST4_DESC, + splat_test_init(sub, SPLAT_LIST_TEST4_NAME, SPLAT_LIST_TEST4_DESC, SPLAT_LIST_TEST4_ID, splat_list_test4); - SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST5_NAME, SPLAT_LIST_TEST5_DESC, + splat_test_init(sub, SPLAT_LIST_TEST5_NAME, SPLAT_LIST_TEST5_DESC, SPLAT_LIST_TEST5_ID, splat_list_test5); - SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST6_NAME, SPLAT_LIST_TEST6_DESC, + splat_test_init(sub, SPLAT_LIST_TEST6_NAME, SPLAT_LIST_TEST6_DESC, SPLAT_LIST_TEST6_ID, splat_list_test6); - SPLAT_TEST_INIT(sub, SPLAT_LIST_TEST7_NAME, SPLAT_LIST_TEST7_DESC, + splat_test_init(sub, SPLAT_LIST_TEST7_NAME, SPLAT_LIST_TEST7_DESC, SPLAT_LIST_TEST7_ID, splat_list_test7); return sub; @@ -457,13 +457,13 @@ splat_list_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST7_ID); - SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_LIST_TEST1_ID); + splat_test_fini(sub, SPLAT_LIST_TEST7_ID); + splat_test_fini(sub, SPLAT_LIST_TEST6_ID); + splat_test_fini(sub, SPLAT_LIST_TEST5_ID); + splat_test_fini(sub, SPLAT_LIST_TEST4_ID); + splat_test_fini(sub, SPLAT_LIST_TEST3_ID); + splat_test_fini(sub, SPLAT_LIST_TEST2_ID); + splat_test_fini(sub, SPLAT_LIST_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index d39551354..71291bbd4 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -417,13 +417,13 @@ splat_mutex_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_MUTEX; - SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST1_NAME, SPLAT_MUTEX_TEST1_DESC, + splat_test_init(sub, SPLAT_MUTEX_TEST1_NAME, SPLAT_MUTEX_TEST1_DESC, SPLAT_MUTEX_TEST1_ID, splat_mutex_test1); - SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST2_NAME, SPLAT_MUTEX_TEST2_DESC, + splat_test_init(sub, SPLAT_MUTEX_TEST2_NAME, SPLAT_MUTEX_TEST2_DESC, SPLAT_MUTEX_TEST2_ID, splat_mutex_test2); - SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST3_NAME, SPLAT_MUTEX_TEST3_DESC, + splat_test_init(sub, SPLAT_MUTEX_TEST3_NAME, SPLAT_MUTEX_TEST3_DESC, SPLAT_MUTEX_TEST3_ID, splat_mutex_test3); - SPLAT_TEST_INIT(sub, SPLAT_MUTEX_TEST4_NAME, SPLAT_MUTEX_TEST4_DESC, + splat_test_init(sub, SPLAT_MUTEX_TEST4_NAME, SPLAT_MUTEX_TEST4_DESC, SPLAT_MUTEX_TEST4_ID, splat_mutex_test4); return sub; @@ -433,10 +433,10 @@ void splat_mutex_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_MUTEX_TEST1_ID); + splat_test_fini(sub, SPLAT_MUTEX_TEST4_ID); + splat_test_fini(sub, SPLAT_MUTEX_TEST3_ID); + splat_test_fini(sub, SPLAT_MUTEX_TEST2_ID); + splat_test_fini(sub, SPLAT_MUTEX_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-random.c b/module/splat/splat-random.c index 33b799bad..670931a8c 100644 --- a/module/splat/splat-random.c +++ b/module/splat/splat-random.c @@ -108,7 +108,7 @@ splat_krng_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_KRNG; - SPLAT_TEST_INIT(sub, SPLAT_KRNG_TEST1_NAME, SPLAT_KRNG_TEST1_DESC, + splat_test_init(sub, SPLAT_KRNG_TEST1_NAME, SPLAT_KRNG_TEST1_DESC, SPLAT_KRNG_TEST1_ID, splat_krng_test1); return sub; @@ -119,7 +119,7 @@ splat_krng_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_KRNG_TEST1_ID); + splat_test_fini(sub, SPLAT_KRNG_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 87bc0c1c0..c11ab94f2 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -686,19 +686,19 @@ splat_rwlock_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_RWLOCK; - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, SPLAT_RWLOCK_TEST1_ID, splat_rwlock_test1); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, SPLAT_RWLOCK_TEST2_ID, splat_rwlock_test2); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, SPLAT_RWLOCK_TEST3_ID, splat_rwlock_test3); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, SPLAT_RWLOCK_TEST4_ID, splat_rwlock_test4); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, SPLAT_RWLOCK_TEST5_ID, splat_rwlock_test5); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, SPLAT_RWLOCK_TEST6_ID, splat_rwlock_test6); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST7_NAME, SPLAT_RWLOCK_TEST7_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST7_NAME, SPLAT_RWLOCK_TEST7_DESC, SPLAT_RWLOCK_TEST7_ID, splat_rwlock_test7); return sub; @@ -708,13 +708,13 @@ void splat_rwlock_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST7_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST1_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST7_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST6_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST5_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST4_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST3_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST2_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 665126bdd..6d22018fc 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -1497,27 +1497,27 @@ splat_taskq_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_TASKQ; - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST1_NAME, SPLAT_TASKQ_TEST1_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST1_NAME, SPLAT_TASKQ_TEST1_DESC, SPLAT_TASKQ_TEST1_ID, splat_taskq_test1); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST2_NAME, SPLAT_TASKQ_TEST2_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST2_NAME, SPLAT_TASKQ_TEST2_DESC, SPLAT_TASKQ_TEST2_ID, splat_taskq_test2); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST3_NAME, SPLAT_TASKQ_TEST3_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST3_NAME, SPLAT_TASKQ_TEST3_DESC, SPLAT_TASKQ_TEST3_ID, splat_taskq_test3); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST4_NAME, SPLAT_TASKQ_TEST4_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST4_NAME, SPLAT_TASKQ_TEST4_DESC, SPLAT_TASKQ_TEST4_ID, splat_taskq_test4); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST5_NAME, SPLAT_TASKQ_TEST5_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST5_NAME, SPLAT_TASKQ_TEST5_DESC, SPLAT_TASKQ_TEST5_ID, splat_taskq_test5); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST6_NAME, SPLAT_TASKQ_TEST6_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST6_NAME, SPLAT_TASKQ_TEST6_DESC, SPLAT_TASKQ_TEST6_ID, splat_taskq_test6); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST7_NAME, SPLAT_TASKQ_TEST7_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST7_NAME, SPLAT_TASKQ_TEST7_DESC, SPLAT_TASKQ_TEST7_ID, splat_taskq_test7); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST8_NAME, SPLAT_TASKQ_TEST8_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST8_NAME, SPLAT_TASKQ_TEST8_DESC, SPLAT_TASKQ_TEST8_ID, splat_taskq_test8); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST9_NAME, SPLAT_TASKQ_TEST9_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST9_NAME, SPLAT_TASKQ_TEST9_DESC, SPLAT_TASKQ_TEST9_ID, splat_taskq_test9); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST10_NAME, SPLAT_TASKQ_TEST10_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST10_NAME, SPLAT_TASKQ_TEST10_DESC, SPLAT_TASKQ_TEST10_ID, splat_taskq_test10); - SPLAT_TEST_INIT(sub, SPLAT_TASKQ_TEST11_NAME, SPLAT_TASKQ_TEST11_DESC, + splat_test_init(sub, SPLAT_TASKQ_TEST11_NAME, SPLAT_TASKQ_TEST11_DESC, SPLAT_TASKQ_TEST11_ID, splat_taskq_test11); return sub; @@ -1527,17 +1527,17 @@ void splat_taskq_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST11_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST10_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST9_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST8_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST7_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_TASKQ_TEST1_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST11_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST10_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST9_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST8_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST7_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST6_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST5_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST4_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST3_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST2_ID); + splat_test_fini(sub, SPLAT_TASKQ_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index 8a4471407..a043fc74f 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -362,11 +362,11 @@ splat_thread_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_THREAD; - SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC, + splat_test_init(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC, SPLAT_THREAD_TEST1_ID, splat_thread_test1); - SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC, + splat_test_init(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC, SPLAT_THREAD_TEST2_ID, splat_thread_test2); - SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC, + splat_test_init(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC, SPLAT_THREAD_TEST3_ID, splat_thread_test3); return sub; @@ -376,9 +376,9 @@ void splat_thread_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST1_ID); + splat_test_fini(sub, SPLAT_THREAD_TEST3_ID); + splat_test_fini(sub, SPLAT_THREAD_TEST2_ID); + splat_test_fini(sub, SPLAT_THREAD_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index b4e94c866..5b5ad62f6 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -93,9 +93,9 @@ splat_time_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_TIME; - SPLAT_TEST_INIT(sub, SPLAT_TIME_TEST1_NAME, SPLAT_TIME_TEST1_DESC, + splat_test_init(sub, SPLAT_TIME_TEST1_NAME, SPLAT_TIME_TEST1_DESC, SPLAT_TIME_TEST1_ID, splat_time_test1); - SPLAT_TEST_INIT(sub, SPLAT_TIME_TEST2_NAME, SPLAT_TIME_TEST2_DESC, + splat_test_init(sub, SPLAT_TIME_TEST2_NAME, SPLAT_TIME_TEST2_DESC, SPLAT_TIME_TEST2_ID, splat_time_test2); return sub; @@ -106,8 +106,8 @@ splat_time_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_TIME_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_TIME_TEST1_ID); + splat_test_fini(sub, SPLAT_TIME_TEST2_ID); + splat_test_fini(sub, SPLAT_TIME_TEST1_ID); kfree(sub); } diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index bffcf492f..ad69cf642 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -409,19 +409,19 @@ splat_vnode_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_VNODE; - SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST1_NAME, SPLAT_VNODE_TEST1_DESC, + splat_test_init(sub, SPLAT_VNODE_TEST1_NAME, SPLAT_VNODE_TEST1_DESC, SPLAT_VNODE_TEST1_ID, splat_vnode_test1); - SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST2_NAME, SPLAT_VNODE_TEST2_DESC, + splat_test_init(sub, SPLAT_VNODE_TEST2_NAME, SPLAT_VNODE_TEST2_DESC, SPLAT_VNODE_TEST2_ID, splat_vnode_test2); - SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST3_NAME, SPLAT_VNODE_TEST3_DESC, + splat_test_init(sub, SPLAT_VNODE_TEST3_NAME, SPLAT_VNODE_TEST3_DESC, SPLAT_VNODE_TEST3_ID, splat_vnode_test3); #if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) - SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST4_NAME, SPLAT_VNODE_TEST4_DESC, + splat_test_init(sub, SPLAT_VNODE_TEST4_NAME, SPLAT_VNODE_TEST4_DESC, SPLAT_VNODE_TEST4_ID, splat_vnode_test4); #endif - SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST5_NAME, SPLAT_VNODE_TEST5_DESC, + splat_test_init(sub, SPLAT_VNODE_TEST5_NAME, SPLAT_VNODE_TEST5_DESC, SPLAT_VNODE_TEST5_ID, splat_vnode_test5); - SPLAT_TEST_INIT(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, + splat_test_init(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, SPLAT_VNODE_TEST6_ID, splat_vnode_test6); return sub; @@ -432,14 +432,14 @@ splat_vnode_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST5_ID); + splat_test_fini(sub, SPLAT_VNODE_TEST6_ID); + splat_test_fini(sub, SPLAT_VNODE_TEST5_ID); #if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) - SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST4_ID); + splat_test_fini(sub, SPLAT_VNODE_TEST4_ID); #endif - SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_VNODE_TEST1_ID); + splat_test_fini(sub, SPLAT_VNODE_TEST3_ID); + splat_test_fini(sub, SPLAT_VNODE_TEST2_ID); + splat_test_fini(sub, SPLAT_VNODE_TEST1_ID); kfree(sub); } /* splat_vnode_fini() */ diff --git a/module/splat/splat-zlib.c b/module/splat/splat-zlib.c index eaa48369d..dc9211838 100644 --- a/module/splat/splat-zlib.c +++ b/module/splat/splat-zlib.c @@ -144,7 +144,7 @@ splat_zlib_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_ZLIB; - SPLAT_TEST_INIT(sub, SPLAT_ZLIB_TEST1_NAME, SPLAT_ZLIB_TEST1_DESC, + splat_test_init(sub, SPLAT_ZLIB_TEST1_NAME, SPLAT_ZLIB_TEST1_DESC, SPLAT_ZLIB_TEST1_ID, splat_zlib_test1); return sub; @@ -155,7 +155,7 @@ splat_zlib_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_ZLIB_TEST1_ID); + splat_test_fini(sub, SPLAT_ZLIB_TEST1_ID); kfree(sub); } From 6d064f7a07fe8366e113f45931e5f2921dcabda2 Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Sat, 17 Dec 2016 17:10:25 +0100 Subject: [PATCH 0998/1062] Remove stale comment from rw_tryupgrade() Commit f58040c0fc8bc6490fcc75db7fc3e709dfc3c656 should have removed this comment which is no longer relevant. Reviewed-by: Brian Behlendorf Signed-off-by: Clemens Fruhwirth Issue #589 --- include/sys/rwlock.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 4197785db..ffb7b90b6 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -213,14 +213,6 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_lockdep_on_maybe(rwp); \ }) -/* - * This implementation of rw_tryupgrade() behaves slightly differently - * from its counterparts on other platforms. It drops the RW_READER lock - * and then acquires the RW_WRITER lock leaving a small window where no - * lock is held. On other platforms the lock is never released during - * the upgrade process. This is necessary under Linux because the kernel - * does not provide an upgrade function. - */ #define rw_tryupgrade(rwp) \ ({ \ int _rc_ = 0; \ From 8e99d66b0555fe3d6f5b028e8f03883dbf1399bc Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Sat, 17 Dec 2016 17:09:57 +0100 Subject: [PATCH 0999/1062] Add support for rw semaphore under PREEMPT_RT_FULL The main complication from the RT patch set is that the RW semaphore locks change such that read locks on an rwsem can be taken only by a single thread. All other threads are locked out. This single thread can take a read lock multiple times though. The underlying implementation changes to a mutex with an additional read_depth count. The implementation can be best understood by inspecting the RT patch. rwsem_rt.h and rt.c give the best insight into how RT rwsem works. My implementation for rwsem_tryupgrade is basically an inversion of rt_downgrade_write found in rt.c. Please see the comments in the code. Unfortunately, I have to drop SPLAT rwlock test4 completely as this test tries to take multiple locks from different threads, which RT rwsems do not support. Otherwise SPLAT, zconfig.sh, zpios-sanity.sh and zfs-tests.sh pass on my Debian-testing VM with the kernel linux-image-4.8.0-1-rt-amd64. Tested-by: kernelOfTruth Reviewed-by: Brian Behlendorf Signed-off-by: Clemens Fruhwirth Closes zfsonlinux/zfs#5491 Closes #589 Closes #308 --- include/linux/rwsem_compat.h | 9 +++++++-- module/spl/spl-rwlock.c | 32 +++++++++++++++++++++++++++++++- module/splat/splat-rwlock.c | 25 ++++++++++++++++++++++++- 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index c874885b0..de513debe 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -27,7 +27,10 @@ #include -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK +#if defined(CONFIG_PREEMPT_RT_FULL) +#define SPL_RWSEM_SINGLE_READER_VALUE (1) +#define SPL_RWSEM_SINGLE_WRITER_VALUE (0) +#elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK) #define SPL_RWSEM_SINGLE_READER_VALUE (1) #define SPL_RWSEM_SINGLE_WRITER_VALUE (-1) #else @@ -36,7 +39,9 @@ #endif /* Linux 3.16 changed activity to count for rwsem-spinlock */ -#if defined(HAVE_RWSEM_ACTIVITY) +#if defined(CONFIG_PREEMPT_RT_FULL) +#define RWSEM_COUNT(sem) sem->read_depth +#elif defined(HAVE_RWSEM_ACTIVITY) #define RWSEM_COUNT(sem) sem->activity /* Linux 4.8 changed count to an atomic_long_t for !rwsem-spinlock */ #elif defined(HAVE_RWSEM_ATOMIC_LONG_COUNT) diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 77f46f2d6..9e96c4f27 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -32,7 +32,37 @@ #define DEBUG_SUBSYSTEM S_RWLOCK -#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) +#if defined(CONFIG_PREEMPT_RT_FULL) + +#include + +static int +__rwsem_tryupgrade(struct rw_semaphore *rwsem) +{ + ASSERT(rt_mutex_owner(&rwsem->lock) == current); + + /* + * Under the realtime patch series, rwsem is implemented as a + * single mutex held by readers and writers alike. However, + * this implementation would prevent a thread from taking a + * read lock twice, as the mutex would already be locked on + * the second attempt. Therefore the implementation allows a + * single thread to take a rwsem as read lock multiple times + * tracking that nesting as read_depth counter. + */ + if (rwsem->read_depth <= 1) { + /* + * In case, the current thread has not taken the lock + * more than once as read lock, we can allow an + * upgrade to a write lock. rwsem_rt.h implements + * write locks as read_depth == 0. + */ + rwsem->read_depth = 0; + return (1); + } + return (0); +} +#elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK) static int __rwsem_tryupgrade(struct rw_semaphore *rwsem) { diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index c11ab94f2..d7626b236 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -106,6 +106,17 @@ void splat_init_rw_priv(rw_priv_t *rwp, struct file *file) rwp->rw_type = 0; } +#if defined(CONFIG_PREEMPT_RT_FULL) +static int +splat_rwlock_test1(struct file *file, void *arg) +{ + /* + * This test will never succeed on PREEMPT_RT_FULL because these + * kernels only allow a single thread to hold the lock. + */ + return 0; +} +#else static int splat_rwlock_wr_thr(void *arg) { @@ -297,6 +308,7 @@ splat_rwlock_test1(struct file *file, void *arg) return rc; } +#endif static void splat_rwlock_test2_func(void *arg) @@ -514,11 +526,22 @@ splat_rwlock_test4(struct file *file, void *arg) splat_init_rw_priv(rwp, file); - /* Validate all combinations of rw_tryenter() contention */ + /* + * Validate all combinations of rw_tryenter() contention. + * + * The concurrent reader test is modified for PREEMPT_RT_FULL + * kernels which do not permit concurrent read locks to be taken + * from different threads. The same thread is allowed to take + * the read lock multiple times. + */ rc1 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_WRITER, RW_WRITER); rc2 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_WRITER, RW_READER); rc3 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_READER, RW_WRITER); +#if defined(CONFIG_PREEMPT_RT_FULL) + rc4 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_READER, RW_READER); +#else rc4 = splat_rwlock_test4_type(tq, rwp, 0, RW_READER, RW_READER); +#endif rc5 = splat_rwlock_test4_type(tq, rwp, 0, RW_NONE, RW_WRITER); rc6 = splat_rwlock_test4_type(tq, rwp, 0, RW_NONE, RW_READER); From 120faefed90aa4c276a3db45525dc5c804cb1a00 Mon Sep 17 00:00:00 2001 From: RageLtMan Date: Fri, 13 Jan 2017 17:12:42 -0500 Subject: [PATCH 1000/1062] Update struct member intializers to C89 When building SPL within the kernel tree, C99 initializers cause build failures and need to be converted to C89 as kernel CFLAGS specify -std=gnu89. This fix was provided by @behlendorf in #595 discussion notes and manually implemented in the current master revision. Reviewed-by: Brian Behlendorf Signed-off-by: RageLtMan Closes #597 --- module/spl/spl-proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 345d0d5c7..d6159b4b6 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -628,11 +628,11 @@ static struct ctl_table spl_kmem_table[] = { .mode = 0444, .proc_handler = &proc_doslab, }, - {0}, + {}, }; static struct ctl_table spl_kstat_table[] = { - {0}, + {}, }; static struct ctl_table spl_table[] = { @@ -663,7 +663,7 @@ static struct ctl_table spl_table[] = { .mode = 0555, .child = spl_kstat_table, }, - { 0 }, + {}, }; static struct ctl_table spl_dir[] = { @@ -672,7 +672,7 @@ static struct ctl_table spl_dir[] = { .mode = 0555, .child = spl_table, }, - { 0 } + {} }; static struct ctl_table spl_root[] = { @@ -684,7 +684,7 @@ static struct ctl_table spl_root[] = { .mode = 0555, .child = spl_dir, }, - { 0 } + {} }; int From 0194e4a03c394f0bb85cba78ac12f10c480c5670 Mon Sep 17 00:00:00 2001 From: Kevin Tanguy Date: Tue, 17 Jan 2017 21:05:14 +0100 Subject: [PATCH 1001/1062] Add support for recent kmem_cache_create_usercopy SLAB_USERCOPY flag was used to indicate PAX not to kill copies from kernel to userland. With recent grsecurity patchset and CONFIG_GRKERNSEC_HIDESYM that enables CONFIG_PAX_USERCOPY zfs would panic. Handle newer API while keeping old one functional. Tested-by: RageLtMan Reviewed-by: spendergrsec Reviewed-by: Brian Behlendorf Signed-off-by: Kevin Tanguy Closes #595 --- config/spl-build.m4 | 37 +++++++++++++++++++++++++++++++++++++ module/spl/spl-kmem-cache.c | 13 +++++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7e2e7a0a9..8d0e8aba3 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -50,6 +50,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_MUTEX_OWNER SPL_AC_INODE_LOCK SPL_AC_GROUP_INFO_GID + SPL_AC_KMEM_CACHE_CREATE_USERCOPY ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1597,3 +1598,39 @@ AC_DEFUN([SPL_AC_GROUP_INFO_GID], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # grsecurity API change, +dnl # kmem_cache_create() with SLAB_USERCOPY flag replaced by +dnl # kmem_cache_create_usercopy(). +dnl # +AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_USERCOPY], [ + AC_MSG_CHECKING([whether kmem_cache_create_usercopy() exists]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + static void ctor(void *foo) + { + // fake ctor + } + ],[ + struct kmem_cache *skc_linux_cache; + const char *name = "test"; + size_t size = 4096; + size_t align = 8; + unsigned long flags = 0; + size_t useroffset = 0; + size_t usersize = size - useroffset; + + skc_linux_cache = kmem_cache_create_usercopy( + name, size, align, flags, useroffset, usersize, ctor); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_CREATE_USERCOPY, 1, + [kmem_cache_create_usercopy() exists]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 99967b14f..45576b976 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -1001,8 +1001,17 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, slabflags |= SLAB_USERCOPY; #endif - skc->skc_linux_cache = kmem_cache_create( - skc->skc_name, size, align, slabflags, NULL); +#if defined(HAVE_KMEM_CACHE_CREATE_USERCOPY) + /* + * Newer grsec patchset uses kmem_cache_create_usercopy() + * instead of SLAB_USERCOPY flag + */ + skc->skc_linux_cache = kmem_cache_create_usercopy( + skc->skc_name, size, align, slabflags, 0, size, NULL); +#else + skc->skc_linux_cache = kmem_cache_create( + skc->skc_name, size, align, slabflags, NULL); +#endif if (skc->skc_linux_cache == NULL) { rc = ENOMEM; goto out; From 5cb44271b4c0b01afe5b84366e247f6d087df399 Mon Sep 17 00:00:00 2001 From: George Melikov Date: Fri, 20 Jan 2017 01:32:45 +0300 Subject: [PATCH 1002/1062] Remove identical if statements in module/spl/spl-vnode.c Reviewed-by: Brian Behlendorf Signed-off-by: George Melikov Closes #594 --- module/spl/spl-vnode.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index addc61155..d02e81643 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -63,9 +63,6 @@ vn_mode_to_vtype(mode_t mode) if (S_ISSOCK(mode)) return VSOCK; - if (S_ISCHR(mode)) - return VCHR; - return VNON; } /* vn_mode_to_vtype() */ EXPORT_SYMBOL(vn_mode_to_vtype); From 2d4d81c485bd5ed3ccaf1580c4efdc0ecdbc52ee Mon Sep 17 00:00:00 2001 From: clefru Date: Thu, 19 Jan 2017 23:41:38 +0100 Subject: [PATCH 1003/1062] Reimplement rt_mutex_owner to fix build with DEBUG & PREEMPT_RT_FULL rt_mutex_owner is internal to kernel/locking/rtmutex_common.h and inaccessible for SPL via the public kernel headers. The way of accessing the owner has been stable since at least 3.13 ([1], [2]), which is masking the lowest bit in the owner pointer in rt_mutex. We do the same. [1] http://lxr.free-electrons.com/source/kernel/locking/rtmutex_common.h?v=3.13#L99 [2] http://lxr.free-electrons.com/source/kernel/locking/rtmutex_common.h?v=4.9#L78 Reviewed-by: Brian Behlendorf Signed-off-by: Clemens Fruhwirth Closes #593 --- module/spl/spl-rwlock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index 9e96c4f27..d99ef4f92 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -35,11 +35,15 @@ #if defined(CONFIG_PREEMPT_RT_FULL) #include +#define RT_MUTEX_OWNER_MASKALL 1UL static int __rwsem_tryupgrade(struct rw_semaphore *rwsem) { - ASSERT(rt_mutex_owner(&rwsem->lock) == current); + + ASSERT((struct task_struct *) + ((unsigned long)rwsem->lock.owner & ~RT_MUTEX_OWNER_MASKALL) == + current); /* * Under the realtime patch series, rwsem is implemented as a From f5c5286daa5f76532d7a8a7988d6a42cfd58038c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 20 Jan 2017 10:16:32 -0800 Subject: [PATCH 1004/1062] Tag 0.7.0-rc3 Third release candidate. Signed-off-by: Brian Behlendorf --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 89d0dd0ac..96c756e17 100644 --- a/META +++ b/META @@ -2,7 +2,7 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.7.0 -Release: rc2 +Release: rc3 Release-Tags: relext License: GPL Author: OpenZFS on Linux From 43b857fddb0aa0a2fef1e00c696a80056c6367a8 Mon Sep 17 00:00:00 2001 From: David Quigley Date: Tue, 31 Jan 2017 11:36:18 -0700 Subject: [PATCH 1005/1062] Add a PAGESHIFT definition Reviewed-by: Brian Behlendorf Signed-off-by: David Quigley Closes #598 --- include/sys/sysmacros.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index f6b1e28e8..a4a9f3e98 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -32,6 +32,7 @@ #include #include #include +#include #ifdef HAVE_SCHED_RT_HEADER #include @@ -111,6 +112,10 @@ #define PAGESIZE PAGE_SIZE #endif +#ifndef PAGESHIFT +#define PAGESHIFT PAGE_SHIFT +#endif + /* from Solaris sys/byteorder.h */ #define BSWAP_8(x) ((x) & 0xff) #define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) From 97048200f888afc0b1387bff75049cf37e9715bd Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 31 Jan 2017 13:44:01 -0800 Subject: [PATCH 1006/1062] Use kernel slab for vn_cache and vn_file_cache Resolve a false positive in the kmemleak checker by shifting to the kernel slab. It shows up because vn_file_cache is using KMC_KMEM which is directly allocated using __get_free_pages, which is not automatically tracked by kmemleak. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #599 --- module/spl/spl-vnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index d02e81643..cd276b5c8 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -897,13 +897,13 @@ spl_vn_init(void) sizeof(struct vnode), 64, vn_cache_constructor, vn_cache_destructor, - NULL, NULL, NULL, KMC_KMEM); + NULL, NULL, NULL, 0); vn_file_cache = kmem_cache_create("spl_vn_file_cache", sizeof(file_t), 64, vn_file_cache_constructor, vn_file_cache_destructor, - NULL, NULL, NULL, KMC_KMEM); + NULL, NULL, NULL, 0); return (0); } /* vn_init() */ From 8d5feecacfdcca29336209bdccd6493a5fa53576 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Thu, 23 Feb 2017 09:52:08 -0800 Subject: [PATCH 1007/1062] Linux 4.11 compat: set_task_state() removed Replace uses of set_task_state(current, STATE) with set_current_state(STATE). In Linux 4.11, torvalds/linux@642fa44, set_task_state() is removed. All spl uses are of the form set_task_state(current, STATE). set_current_state(STATE) is equivalent and has been available since Linux 2.2.26. Furthermore, set_current_state(STATE) is already used in about 15 locations within spl. This change should have no impact other than removing an unnecessary dependency. Reviewed-by: Brian Behlendorf Signed-off-by: Olaf Faaland Closes #603 --- module/spl/spl-err.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 14ff8a337..cf9f096b1 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -65,7 +65,7 @@ spl_panic(const char *file, const char *func, int line, const char *fmt, ...) { spl_dumpstack(); /* Halt the thread to facilitate further debugging */ - set_task_state(current, TASK_UNINTERRUPTIBLE); + set_current_state(TASK_UNINTERRUPTIBLE); while (1) schedule(); @@ -98,7 +98,7 @@ vcmn_err(int ce, const char *fmt, va_list ap) spl_dumpstack(); /* Halt the thread to facilitate further debugging */ - set_task_state(current, TASK_UNINTERRUPTIBLE); + set_current_state(TASK_UNINTERRUPTIBLE); while (1) schedule(); } From e0aacd9b9767a877ad61b74cf87c0da856bb1e8a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 6 Mar 2017 09:16:22 -0800 Subject: [PATCH 1008/1062] Fix powerpc build Unlike other architectures which sanitize the LDFLAGS from the environment in arch//Makefile. The powerpc Makefile allows LDFLAGS to be passed through resulting in the following build failure. /usr/bin/ld: unrecognized option '-Wl,-z,relro' LDFLAGS is set in /usr/lib/rpm/redhat/macros by default. Clear the environment variable when building kmods for powerpc. Reviewed-by: Giuseppe Di Natale Signed-off-by: Brian Behlendorf Closes #607 --- rpm/generic/spl-kmod.spec.in | 5 +++++ rpm/redhat/spl-kmod.spec.in | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 11d23fbe8..6a4be7a22 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -53,6 +53,11 @@ BuildRequires: %{_bindir}/kmodtool %endif %endif +# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches) +%ifarch ppc ppc64 ppc64le +%global __global_ldflags %{nil} +%endif + %if 0%{?fedora} >= 17 %define prefix /usr %endif diff --git a/rpm/redhat/spl-kmod.spec.in b/rpm/redhat/spl-kmod.spec.in index 6fcc4a898..cab72a7c7 100644 --- a/rpm/redhat/spl-kmod.spec.in +++ b/rpm/redhat/spl-kmod.spec.in @@ -22,6 +22,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: @PACKAGE@ = %{version}\n\ Conflicts: @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble) +# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches) +%ifarch ppc ppc64 ppc64le +%global __global_ldflags %{nil} +%endif + %description This package contains the kernel modules required to emulate several interfaces provided by the Solaris kernel. From 94b1ab2ae01e9ee642aee87dd1a73e8d63629372 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Tue, 7 Mar 2017 13:18:53 -0800 Subject: [PATCH 1009/1062] Linux 4.11 compat: vfs_getattr() takes 4 args There are changes to vfs_getattr() in torvalds/linux@a528d35. The new interface is: int vfs_getattr(const struct path *path, struct kstat *stat, u32 request_mask, unsigned int query_flags) The request_mask argument indicates which field(s) the caller intends to use. Fields the caller does not specify via request_mask may be set in the returned struct anyway, but their values may be approximate. The query_flags argument indicates whether the filesystem must update the attributes from the backing store. This patch uses the query_flags which result in vfs_getattr behaving the same as it did with the 2-argument version which the kernel provided before Linux 4.11. Members blksize and blocks are now always the same size regardless of arch. They match the size of the equivalent members in vnode_t. The configure checks are modified to ensure that the appropriate vfs_getattr() interface is used. A more complete fix, removing the ZFS dependency on vfs_getattr() entirely, is deferred as it is a much larger project. Reviewed-by: Chunwei Chen Reviewed-by: Brian Behlendorf Signed-off-by: Olaf Faaland Closes #608 --- config/spl-build.m4 | 69 +++++++++++++++++++++++++++++++----------- module/spl/spl-vnode.c | 13 ++++++-- 2 files changed, 62 insertions(+), 20 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 8d0e8aba3..fc0efcf39 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -43,6 +43,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_RWSEM_ACTIVITY SPL_AC_RWSEM_ATOMIC_LONG_COUNT SPL_AC_SCHED_RT_HEADER + SPL_AC_4ARGS_VFS_GETATTR + SPL_AC_3ARGS_VFS_GETATTR SPL_AC_2ARGS_VFS_GETATTR SPL_AC_USLEEP_RANGE SPL_AC_KMEM_CACHE_ALLOCFLAGS @@ -1409,34 +1411,67 @@ AC_DEFUN([SPL_AC_SCHED_RT_HEADER], ]) ]) + dnl # -dnl # 3.9 API change, -dnl # vfs_getattr() uses 2 args -dnl # It takes struct path * instead of struct vfsmount * and struct dentry * +dnl # 4.11 API, a528d35e@torvalds/linux +dnl # vfs_getattr(const struct path *p, struct kstat *s, u32 m, unsigned int f) +dnl # +AC_DEFUN([SPL_AC_4ARGS_VFS_GETATTR], [ + AC_MSG_CHECKING([whether vfs_getattr() wants 4 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_getattr((const struct path *)NULL, + (struct kstat *)NULL, + (u32)0, + (unsigned int)0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_4ARGS_VFS_GETATTR, 1, + [vfs_getattr wants 4 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 3.9 API +dnl # vfs_getattr(struct path *p, struct kstat *s) dnl # AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [ - AC_MSG_CHECKING([whether vfs_getattr() wants]) + AC_MSG_CHECKING([whether vfs_getattr() wants 2 args]) SPL_LINUX_TRY_COMPILE([ #include ],[ vfs_getattr((struct path *) NULL, (struct kstat *)NULL); ],[ - AC_MSG_RESULT(2 args) + AC_MSG_RESULT(yes) AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1, - [vfs_getattr wants 2 args]) + [vfs_getattr wants 2 args]) ],[ - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_getattr((struct vfsmount *)NULL, - (struct dentry *)NULL, - (struct kstat *)NULL); - ],[ - AC_MSG_RESULT(3 args) - ],[ - AC_MSG_ERROR(unknown) - ]) + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # <3.9 API +dnl # vfs_getattr(struct vfsmount *v, struct dentry *d, struct kstat *k) +dnl # +AC_DEFUN([SPL_AC_3ARGS_VFS_GETATTR], [ + AC_MSG_CHECKING([whether vfs_getattr() wants 3 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_getattr((struct vfsmount *)NULL, + (struct dentry *)NULL, + (struct kstat *)NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_VFS_GETATTR, 1, + [vfs_getattr wants 3 args]) + ],[ + AC_MSG_RESULT(no) ]) ]) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index cd276b5c8..0902e1161 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -153,7 +153,9 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, if (IS_ERR(fp)) return (-PTR_ERR(fp)); -#ifdef HAVE_2ARGS_VFS_GETATTR +#if defined(HAVE_4ARGS_VFS_GETATTR) + rc = vfs_getattr(&fp->f_path, &stat, STATX_TYPE, AT_STATX_SYNC_AS_STAT); +#elif defined(HAVE_2ARGS_VFS_GETATTR) rc = vfs_getattr(&fp->f_path, &stat); #else rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); @@ -510,7 +512,10 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) fp = vp->v_file; -#ifdef HAVE_2ARGS_VFS_GETATTR +#if defined(HAVE_4ARGS_VFS_GETATTR) + rc = vfs_getattr(&fp->f_path, &stat, STATX_BASIC_STATS, + AT_STATX_SYNC_AS_STAT); +#elif defined(HAVE_2ARGS_VFS_GETATTR) rc = vfs_getattr(&fp->f_path, &stat); #else rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); @@ -708,7 +713,9 @@ vn_getf(int fd) if (vp == NULL) goto out_fget; -#ifdef HAVE_2ARGS_VFS_GETATTR +#if defined(HAVE_4ARGS_VFS_GETATTR) + rc = vfs_getattr(&lfp->f_path, &stat, STATX_TYPE, AT_STATX_SYNC_AS_STAT); +#elif defined(HAVE_2ARGS_VFS_GETATTR) rc = vfs_getattr(&lfp->f_path, &stat); #else rc = vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat); From 9a054d54fb6772305fdbe0bb5b312cf051331726 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Tue, 7 Mar 2017 15:33:50 -0800 Subject: [PATCH 1010/1062] Linux 4.11 compat: add linux/sched/signal.h In Linux 4.11, torvalds/linux@2a1f062, signal handling related functions were moved from sched.h into sched/signal.h. Add configure checks to detect this and include the new file where needed. Reviewed-by: Chunwei Chen Reviewed-by: Brian Behlendorf Signed-off-by: Olaf Faaland Closes #608 --- config/spl-build.m4 | 19 +++++++++++++++++++ include/sys/signal.h | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index fc0efcf39..1dbc87e61 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -43,6 +43,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_RWSEM_ACTIVITY SPL_AC_RWSEM_ATOMIC_LONG_COUNT SPL_AC_SCHED_RT_HEADER + SPL_AC_SCHED_SIGNAL_HEADER SPL_AC_4ARGS_VFS_GETATTR SPL_AC_3ARGS_VFS_GETATTR SPL_AC_2ARGS_VFS_GETATTR @@ -1411,6 +1412,24 @@ AC_DEFUN([SPL_AC_SCHED_RT_HEADER], ]) ]) +dnl # +dnl # 4.11 API change, +dnl # Moved things from linux/sched.h to linux/sched/signal.h +dnl # +AC_DEFUN([SPL_AC_SCHED_SIGNAL_HEADER], + [AC_MSG_CHECKING([whether header linux/sched/signal.h exists]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + return 0; + ],[ + AC_DEFINE(HAVE_SCHED_SIGNAL_HEADER, 1, [linux/sched/signal.h exists]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ]) +]) dnl # dnl # 4.11 API, a528d35e@torvalds/linux diff --git a/include/sys/signal.h b/include/sys/signal.h index 823fea329..77cc2d3c2 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -27,6 +27,10 @@ #include +#ifdef HAVE_SCHED_SIGNAL_HEADER +#include +#endif + #define FORREAL 0 /* Usual side-effects */ #define JUSTLOOKING 1 /* Don't stop the process */ From bf8abea4dade111bdf3aeae30bd4bd75d49aca70 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Mon, 13 Mar 2017 10:37:10 -0700 Subject: [PATCH 1011/1062] Linux 4.11 compat: remove stub for __put_task_struct Before kernel 2.6.29 credentials were embedded in task_structs, and zfs had cases where one thread would need to refer to the credential of another thread, forcing it to take a hold on the foreign thread's task_struct to ensure it was not freed. Since 2.6.29, the credential has been moved out of the task_struct into a cred_t. In addition, the mainline kernel originally did not export __put_task_struct() but the RHEL5 kernel did, according to zfsonlinux/spl@e811949a570. As of 2.6.39 the mainline kernel exports it. There is no longer zfs code that takes or releases holds on a task_struct, and so there is no longer any reference to __put_task_struct(). This affects the linux 4.11 kernel because the prototype for __put_task_struct() is in a new include file (linux/sched/task.h) and so the config check failed to detect the exported symbol. Removing the unnecessary stub and corresponding config check. This works on kernels since the oldest one currently supported, 2.6.32 as shipped with Centos/RHEL. Reviewed-by: Chunwei Chen Reviewed-by: Brian Behlendorf Signed-off-by: Olaf Faaland Closes #608 --- config/spl-build.m4 | 20 -------------------- module/spl/spl-generic.c | 16 ---------------- 2 files changed, 36 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 1dbc87e61..b5aa7adac 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -33,7 +33,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_INODE_TRUNCATE_RANGE SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_KUIDGID_T - SPL_AC_PUT_TASK_STRUCT SPL_AC_KERNEL_FALLOCATE SPL_AC_CONFIG_ZLIB_INFLATE SPL_AC_CONFIG_ZLIB_DEFLATE @@ -1085,25 +1084,6 @@ AC_DEFUN([SPL_AC_KUIDGID_T], [ ]) ]) -dnl # -dnl # 2.6.39 API change, -dnl # __put_task_struct() was exported by the mainline kernel. -dnl # -AC_DEFUN([SPL_AC_PUT_TASK_STRUCT], - [AC_MSG_CHECKING([whether __put_task_struct() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - __put_task_struct(NULL); - ], [__put_task_struct], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PUT_TASK_STRUCT, 1, - [__put_task_struct() is available]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 2.6.35 API change, dnl # Unused 'struct dentry *' removed from vfs_fsync() prototype. diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index ce60963bd..a9445eb37 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -459,22 +459,6 @@ ddi_copyout(const void *from, void *to, size_t len, int flags) } EXPORT_SYMBOL(ddi_copyout); -#ifndef HAVE_PUT_TASK_STRUCT -/* - * This is only a stub function which should never be used. The SPL should - * never be putting away the last reference on a task structure so this will - * not be called. However, we still need to define it so the module does not - * have undefined symbol at load time. That all said if this impossible - * thing does somehow happen PANIC immediately so we know about it. - */ -void -__put_task_struct(struct task_struct *t) -{ - PANIC("Unexpectly put last reference on task %d\n", (int)t->pid); -} -EXPORT_SYMBOL(__put_task_struct); -#endif /* HAVE_PUT_TASK_STRUCT */ - /* * Read the unique system identifier from the /etc/hostid file. * From 481762f6a903dd87fb2f166cce6ab8058b00f734 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Mon, 3 Apr 2017 13:33:49 -0700 Subject: [PATCH 1012/1062] glibc 2.25 compat: remove assert(X=Y) The assert() related definitions in glibc 2.25 were altered to warn about assert(X=Y) when -Wparentheses is used. See https://abi-laboratory.pro/tracker/changelog/glibc/2.25/log.html lib/list.c used this construct to set the value of a magic field which is defined only when debugging. Replaced the assert()s with #ifndef/#endifs. Reviewed-by: Brian Behlendorf Signed-off-by: Olaf Faaland Closes #610 --- lib/list.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/list.c b/lib/list.c index 55367e449..140a1bbdd 100644 --- a/lib/list.c +++ b/lib/list.c @@ -220,7 +220,9 @@ list_create (ListDelF f) l->fDel = f; l->count = 0; list_mutex_init(&l->mutex); - assert(l->magic = LIST_MAGIC); /* set magic via assert abuse */ +#ifndef NDEBUG + l->magic = LIST_MAGIC; +#endif return(l); } @@ -238,7 +240,9 @@ list_destroy (List l) while (i) { assert(i->magic == LIST_MAGIC); iTmp = i->iNext; - assert(i->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ +#ifndef NDEBUG + i->magic = ~LIST_MAGIC; +#endif /* !NDEBUG */ list_iterator_free(i); i = iTmp; } @@ -250,7 +254,9 @@ list_destroy (List l) list_node_free(p); p = pTmp; } - assert(l->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ +#ifndef NDEBUG + l->magic = ~LIST_MAGIC; +#endif /* !NDEBUG */ list_mutex_unlock(&l->mutex); list_mutex_destroy(&l->mutex); list_free(l); @@ -520,7 +526,9 @@ list_iterator_create (List l) i->prev = &l->head; i->iNext = l->iNext; l->iNext = i; - assert(i->magic = LIST_MAGIC); /* set magic via assert abuse */ +#ifndef NDEBUG + i->magic = LIST_MAGIC; +#endif /* !NDEBUG */ list_mutex_unlock(&l->mutex); return(i); } @@ -557,7 +565,9 @@ list_iterator_destroy (ListIterator i) } } list_mutex_unlock(&i->list->mutex); - assert(i->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ +#ifndef NDEBUG + i->magic = ~LIST_MAGIC; +#endif /* !NDEBUG */ list_iterator_free(i); return; } From 3665037f301b83144d198676f06a782f3273676f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 5 May 2017 09:23:03 -0700 Subject: [PATCH 1013/1062] Tag 0.7.0-rc4 Fourth release candidate. Signed-off-by: Brian Behlendorf --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 96c756e17..56a912b62 100644 --- a/META +++ b/META @@ -2,7 +2,7 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.7.0 -Release: rc3 +Release: rc4 Release-Tags: relext License: GPL Author: OpenZFS on Linux From 8f87971e1fd11e3bca034dff2cbc0e884381c350 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 9 May 2017 10:36:54 -0700 Subject: [PATCH 1014/1062] Linux 4.12 compat: PF_FSTRANS was removed Change SPL_FSTRANS to optionally contains PF_FSTRANS. Also, add __spl_pf_fstrans_check for the checks specifically for PF_FSTRANS. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #614 --- include/sys/kmem.h | 37 +++++++++++++++++++++++++++++++++---- module/spl/spl-vnode.c | 12 ++++++------ 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/include/sys/kmem.h b/include/sys/kmem.h index d4b3bf680..d6b428551 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -46,6 +46,8 @@ extern void strfree(char *str); #define KM_PUBLIC_MASK (KM_SLEEP | KM_NOSLEEP | KM_PUSHPAGE) +static int spl_fstrans_check(void); + /* * Convert a KM_* flags mask to its Linux GFP_* counterpart. The conversion * function is context aware which means that KM_SLEEP allocations can be @@ -60,7 +62,7 @@ kmem_flags_convert(int flags) lflags |= GFP_ATOMIC | __GFP_NORETRY; } else { lflags |= GFP_KERNEL; - if ((current->flags & PF_FSTRANS)) + if (spl_fstrans_check()) lflags &= ~(__GFP_IO|__GFP_FS); } @@ -78,17 +80,34 @@ typedef struct { unsigned int saved_flags; } fstrans_cookie_t; +/* + * Introduced in Linux 3.9, however this cannot be solely relied on before + * Linux 3.18 as it doesn't turn off __GFP_FS as it should. + */ #ifdef PF_MEMALLOC_NOIO -#define SPL_FSTRANS (PF_FSTRANS|PF_MEMALLOC_NOIO) +#define __SPL_PF_MEMALLOC_NOIO (PF_MEMALLOC_NOIO) #else -#define SPL_FSTRANS (PF_FSTRANS) +#define __SPL_PF_MEMALLOC_NOIO (0) #endif +/* + * PF_FSTRANS is removed from Linux 4.12 + */ +#ifdef PF_FSTRANS +#define __SPL_PF_FSTRANS (PF_FSTRANS) +#else +#define __SPL_PF_FSTRANS (0) +#endif + +#define SPL_FSTRANS (__SPL_PF_FSTRANS|__SPL_PF_MEMALLOC_NOIO) + static inline fstrans_cookie_t spl_fstrans_mark(void) { fstrans_cookie_t cookie; + BUILD_BUG_ON(SPL_FSTRANS == 0); + cookie.fstrans_thread = current; cookie.saved_flags = current->flags & SPL_FSTRANS; current->flags |= SPL_FSTRANS; @@ -109,7 +128,17 @@ spl_fstrans_unmark(fstrans_cookie_t cookie) static inline int spl_fstrans_check(void) { - return (current->flags & PF_FSTRANS); + return (current->flags & SPL_FSTRANS); +} + +/* + * specifically used to check PF_FSTRANS flag, cannot be relied on for + * checking spl_fstrans_mark(). + */ +static inline int +__spl_pf_fstrans_check(void) +{ + return (current->flags & __SPL_PF_FSTRANS); } #ifdef HAVE_ATOMIC64_T diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 0902e1161..346e63c0f 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -558,13 +558,13 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) * May enter XFS which generates a warning when PF_FSTRANS is set. * To avoid this the flag is cleared over vfs_sync() and then reset. */ - fstrans = spl_fstrans_check(); + fstrans = __spl_pf_fstrans_check(); if (fstrans) - current->flags &= ~(PF_FSTRANS); + current->flags &= ~(__SPL_PF_FSTRANS); error = -spl_filp_fsync(vp->v_file, datasync); if (fstrans) - current->flags |= PF_FSTRANS; + current->flags |= __SPL_PF_FSTRANS; return (error); } /* vn_fsync() */ @@ -590,9 +590,9 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, * May enter XFS which generates a warning when PF_FSTRANS is set. * To avoid this the flag is cleared over vfs_sync() and then reset. */ - fstrans = spl_fstrans_check(); + fstrans = __spl_pf_fstrans_check(); if (fstrans) - current->flags &= ~(PF_FSTRANS); + current->flags &= ~(__SPL_PF_FSTRANS); /* * When supported by the underlying file system preferentially @@ -603,7 +603,7 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, bfp->l_start, bfp->l_len); if (fstrans) - current->flags |= PF_FSTRANS; + current->flags |= __SPL_PF_FSTRANS; if (error == 0) return (0); From 2ded1c7eff76f9f53b179659f25f3868b6a354ec Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 25 May 2017 10:01:44 -0700 Subject: [PATCH 1015/1062] Fix cv_timedwait timeout Perform the already past expiration time check before updating cvp->cv_mutex with the provided mutex. This check only depends on local state. Doing it first ensures that cvp->cv_mutex will not be updated in the timeout case or if it's ever called with an expire_time <= now. Reviewed-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #616 --- module/spl/spl-condvar.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 479bbfd12..80c2ef090 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -166,22 +166,19 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(mutex_owned(mp)); - atomic_inc(&cvp->cv_refs); + /* XXX - Does not handle jiffie wrap properly */ + time_left = expire_time - jiffies; + if (time_left <= 0) + return (-1); + + atomic_inc(&cvp->cv_refs); m = ACCESS_ONCE(cvp->cv_mutex); if (!m) m = xchg(&cvp->cv_mutex, mp); /* Ensure the same mutex is used by all callers */ ASSERT(m == NULL || m == mp); - /* XXX - Does not handle jiffie wrap properly */ - time_left = expire_time - jiffies; - if (time_left <= 0) { - /* XXX - doesn't reset cv_mutex */ - atomic_dec(&cvp->cv_refs); - return (-1); - } - prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); @@ -238,28 +235,25 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, { DEFINE_WAIT(wait); kmutex_t *m; - hrtime_t time_left, now; + hrtime_t time_left; ktime_t ktime_left; ASSERT(cvp); ASSERT(mp); ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(mutex_owned(mp)); - atomic_inc(&cvp->cv_refs); + time_left = expire_time - gethrtime(); + if (time_left <= 0) + return (-1); + + atomic_inc(&cvp->cv_refs); m = ACCESS_ONCE(cvp->cv_mutex); if (!m) m = xchg(&cvp->cv_mutex, mp); /* Ensure the same mutex is used by all callers */ ASSERT(m == NULL || m == mp); - now = gethrtime(); - time_left = expire_time - now; - if (time_left <= 0) { - atomic_dec(&cvp->cv_refs); - return (-1); - } - prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); atomic_inc(&cvp->cv_waiters); From 3bda331ba8a609cd72be8f67946e12ffe1fcf4f2 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 24 May 2017 15:23:37 -0700 Subject: [PATCH 1016/1062] Improve gitignore Exclude Makefile.in in module/ and fix the gitignore in cmd/ Also, ignore *.patch and *.orig files Signed-off-by: Chunwei Chen --- .gitignore | 2 ++ cmd/{ => splat}/.gitignore | 1 - module/.gitignore | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) rename cmd/{ => splat}/.gitignore (58%) diff --git a/.gitignore b/.gitignore index 4de02fba6..de9d87808 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ cscope.* *.rpm *.deb *.tar.gz +*.patch +*.orig diff --git a/cmd/.gitignore b/cmd/splat/.gitignore similarity index 58% rename from cmd/.gitignore rename to cmd/splat/.gitignore index 754846b75..97325b30d 100644 --- a/cmd/.gitignore +++ b/cmd/splat/.gitignore @@ -1,2 +1 @@ -/spl /splat diff --git a/module/.gitignore b/module/.gitignore index 95e2d8cbd..907099287 100644 --- a/module/.gitignore +++ b/module/.gitignore @@ -9,3 +9,5 @@ modules.order /.tmp_versions /Module.markers /Module.symvers + +!Makefile.in From ac48361c0c16f36407643f931f92162145618865 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 24 May 2017 15:42:34 -0700 Subject: [PATCH 1017/1062] config: allow --with-linux without --with-linux-obj Don't use `uname -r` to determine kernel build directory when the user specified kernel source with --with-linux. Otherwise, the user is forced to use --with-linux-obj even if they are the same directory, which is very counterintuitive. Signed-off-by: Chunwei Chen --- config/spl-build.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b5aa7adac..7569988da 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -113,6 +113,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ if test "$kernelsrc" = "NONE"; then kernsrcver=NONE fi + withlinux=yes fi AC_MSG_RESULT([$kernelsrc]) @@ -125,7 +126,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ AC_MSG_CHECKING([kernel build directory]) if test -z "$kernelbuild"; then - if test -e "/lib/modules/$(uname -r)/build"; then + if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} From 7a35f2b49581894cde93c356fd9372ff3246d344 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Mon, 19 Jun 2017 11:02:20 -0700 Subject: [PATCH 1018/1062] Fix RWSEM_SPINLOCK_IS_RAW check failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initialize dummy_lock to fix the build error in gcc 7.1.1 with: error: ‘dummy_lock’ is used uninitialized in this function Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #622 --- config/spl-build.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7569988da..698d51a87 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1313,7 +1313,8 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ #include ],[ struct rw_semaphore dummy_semaphore __attribute__ ((unused)); - raw_spinlock_t dummy_lock __attribute__ ((unused)); + raw_spinlock_t dummy_lock __attribute__ ((unused)) = + __RAW_SPIN_LOCK_INITIALIZER(dummy_lock); dummy_semaphore.wait_lock = dummy_lock; ],[ AC_MSG_RESULT(yes) From dfbd813ec7b452884f91f134b82f30c6bdcd670c Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Mon, 10 Jul 2017 12:44:23 -0700 Subject: [PATCH 1019/1062] Add ASSERT3B/VERIFY3B/USEC2NSEC/NSEC2USEC macros Reviewed-by: Brian Behlendorf Signed-off-by: Prakash Surya Closes #627 --- include/sys/debug.h | 5 +++++ include/sys/time.h | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index a37740036..98ccbaf05 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -31,11 +31,13 @@ * PANIC() - Panic the node and print message. * ASSERT() - Assert X is true, if not panic. * ASSERTV() - Wraps a variable declaration which is only used by ASSERT(). + * ASSERT3B() - Assert boolean X OP Y is true, if not panic. * ASSERT3S() - Assert signed X OP Y is true, if not panic. * ASSERT3U() - Assert unsigned X OP Y is true, if not panic. * ASSERT3P() - Assert pointer X OP Y is true, if not panic. * ASSERT0() - Assert value is zero, if not panic. * VERIFY() - Verify X is true, if not panic. + * VERIFY3B() - Verify boolean X OP Y is true, if not panic. * VERIFY3S() - Verify signed X OP Y is true, if not panic. * VERIFY3U() - Verify unsigned X OP Y is true, if not panic. * VERIFY3P() - Verify pointer X OP Y is true, if not panic. @@ -67,6 +69,7 @@ void spl_dumpstack(void); "failed (" FMT " " #OP " " FMT ")\n", \ CAST (LEFT), CAST (RIGHT))) +#define VERIFY3B(x,y,z) VERIFY3_IMPL(x, y, z, boolean_t, "%d", (boolean_t)) #define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) @@ -88,6 +91,7 @@ void spl_dumpstack(void); #define SPL_DEBUG_STR "" #define ASSERT(x) ((void)0) #define ASSERTV(x) +#define ASSERT3B(x,y,z) ((void)0) #define ASSERT3S(x,y,z) ((void)0) #define ASSERT3U(x,y,z) ((void)0) #define ASSERT3P(x,y,z) ((void)0) @@ -103,6 +107,7 @@ void spl_dumpstack(void); #define SPL_DEBUG_STR " (DEBUG mode)" #define ASSERT(cond) VERIFY(cond) #define ASSERTV(x) x +#define ASSERT3B(x,y,z) VERIFY3B(x, y, z) #define ASSERT3S(x,y,z) VERIFY3S(x, y, z) #define ASSERT3U(x,y,z) VERIFY3U(x, y, z) #define ASSERT3P(x,y,z) VERIFY3P(x, y, z) diff --git a/include/sys/time.h b/include/sys/time.h index 611f5dd2d..ddda6dead 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -46,8 +46,11 @@ #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC)) #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC)) -#define NSEC2SEC(n) ((n) / (NANOSEC / SEC)) -#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC)) +#define USEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MICROSEC)) +#define NSEC2USEC(n) ((n) / (NANOSEC / MICROSEC)) + +#define NSEC2SEC(n) ((n) / (NANOSEC / SEC)) +#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC)) static const int hz = HZ; From c93d9dff36470434a3677225b820c14986075706 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 10 Jul 2017 15:24:52 -0400 Subject: [PATCH 1020/1062] Don't cache the system hostid Historically the SPL cached the system hostid the first time it was accessed. This was done to speed up subsequent accesses. But in practice the system host id is rarely accessed and its inconvenient that it doesn't promptly detect /etc/hostid configuration changes. Therefore, zone_get_hostid() has been updated to always refresh the system hostid reported. Reviewed-by: Olaf Faaland Signed-off-by: Brian Behlendorf Closes #626 --- module/spl/spl-generic.c | 73 +++++++++++++++------------------------- module/spl/spl-proc.c | 3 +- 2 files changed, 30 insertions(+), 46 deletions(-) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index a9445eb37..10061620e 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -499,80 +499,63 @@ module_param(spl_hostid_path, charp, 0444); MODULE_PARM_DESC(spl_hostid_path, "The system hostid file (/etc/hostid)"); static int -hostid_read(void) +hostid_read(uint32_t *hostid) { - int result; uint64_t size; struct _buf *file; - uint32_t hostid = 0; + uint32_t value = 0; + int error; file = kobj_open_file(spl_hostid_path); - if (file == (struct _buf *)-1) - return -1; + return (ENOENT); - result = kobj_get_filesize(file, &size); - - if (result != 0) { - printk(KERN_WARNING - "SPL: kobj_get_filesize returned %i on %s\n", - result, spl_hostid_path); + error = kobj_get_filesize(file, &size); + if (error) { kobj_close_file(file); - return -2; + return (error); } if (size < sizeof(HW_HOSTID_MASK)) { - printk(KERN_WARNING - "SPL: Ignoring the %s file because it is %llu bytes; " - "expecting %lu bytes instead.\n", spl_hostid_path, - size, (unsigned long)sizeof(HW_HOSTID_MASK)); kobj_close_file(file); - return -3; + return (EINVAL); } - /* Read directly into the variable like eglibc does. */ - /* Short reads are okay; native behavior is preserved. */ - result = kobj_read_file(file, (char *)&hostid, sizeof(hostid), 0); - - if (result < 0) { - printk(KERN_WARNING - "SPL: kobj_read_file returned %i on %s\n", - result, spl_hostid_path); + /* + * Read directly into the variable like eglibc does. + * Short reads are okay; native behavior is preserved. + */ + error = kobj_read_file(file, (char *)&value, sizeof(value), 0); + if (error < 0) { kobj_close_file(file); - return -4; + return (EIO); } /* Mask down to 32 bits like coreutils does. */ - spl_hostid = hostid & HW_HOSTID_MASK; + *hostid = (value & HW_HOSTID_MASK); kobj_close_file(file); + return 0; } +/* + * Return the system hostid. Preferentially use the spl_hostid module option + * when set, otherwise use the value in the /etc/hostid file. + */ uint32_t zone_get_hostid(void *zone) { - static int first = 1; + uint32_t hostid; - /* Only the global zone is supported */ - ASSERT(zone == NULL); + ASSERT3P(zone, ==, NULL); - if (first) { - first = 0; + if (spl_hostid != 0) + return ((uint32_t)(spl_hostid & HW_HOSTID_MASK)); - spl_hostid &= HW_HOSTID_MASK; - /* - * Get the hostid if it was not passed as a module parameter. - * Try reading the /etc/hostid file directly. - */ - if (spl_hostid == 0 && hostid_read()) - spl_hostid = 0; + if (hostid_read(&hostid) == 0) + return (hostid); - - printk(KERN_NOTICE "SPL: using hostid 0x%08x\n", - (unsigned int) spl_hostid); - } - - return spl_hostid; + return (0); } EXPORT_SYMBOL(zone_get_hostid); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index d6159b4b6..bffbcc607 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -203,7 +203,8 @@ proc_dohostid(struct ctl_table *table, int write, return (-EINVAL); } else { - len = snprintf(str, sizeof(str), "%lx", spl_hostid); + len = snprintf(str, sizeof(str), "%lx", + (unsigned long) zone_get_hostid(NULL)); if (*ppos >= len) rc = 0; else From ae42190b7917d5aaa8ec0c0951ff65e8df6fa601 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 13 Jul 2017 12:07:59 -0700 Subject: [PATCH 1021/1062] Tag 0.7.0-rc5 Fifth release candidate. Signed-off-by: Brian Behlendorf --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 56a912b62..e157289fa 100644 --- a/META +++ b/META @@ -2,7 +2,7 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.7.0 -Release: rc4 +Release: rc5 Release-Tags: relext License: GPL Author: OpenZFS on Linux From 944117514d2aba081b15faad741e7d0c6b1465c8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sun, 23 Jul 2017 19:32:14 -0700 Subject: [PATCH 1022/1062] Linux 4.13 compat: wait queues Commit torvalds/linux@ac6424b9 - Renamed struct wait_queue -> struct wait_queue_entry. Commit torvalds/linux@2055da97 - Renamed wait_queue_head::task_list -> wait_queue_head::head - Renamed wait_queue_entry::task_list -> wait_queue_entry::entry Reviewed-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #629 --- config/spl-build.m4 | 55 +++++++++++++++++++++++++++++++++++++ include/linux/wait_compat.h | 9 ++++++ include/sys/condvar.h | 6 ++-- include/sys/kmem_cache.h | 2 +- include/sys/taskq.h | 7 +++-- module/spl/spl-proc.c | 14 ++++++++-- module/splat/splat-atomic.c | 3 +- module/splat/splat-kmem.c | 4 +-- module/splat/splat-rwlock.c | 2 +- module/splat/splat-thread.c | 3 +- 10 files changed, 91 insertions(+), 14 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 698d51a87..630d67c2d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -53,6 +53,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_INODE_LOCK SPL_AC_GROUP_INFO_GID SPL_AC_KMEM_CACHE_CREATE_USERCOPY + SPL_AC_WAIT_QUEUE_ENTRY_T + SPL_AC_WAIT_QUEUE_HEAD_ENTRY ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1670,3 +1672,56 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_USERCOPY], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # 4.13 API change +dnl # Renamed struct wait_queue -> struct wait_queue_entry. +dnl # +AC_DEFUN([SPL_AC_WAIT_QUEUE_ENTRY_T], [ + AC_MSG_CHECKING([whether wait_queue_entry_t exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + wait_queue_entry_t *entry __attribute__ ((unused)); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1, + [wait_queue_entry_t exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 4.13 API change +dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head +dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry +dnl # +AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [ + AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist]) + SPL_LINUX_TRY_COMPILE([ + #include + + #ifdef HAVE_WAIT_QUEUE_ENTRY_T + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_entry_t spl_wait_queue_entry_t; + #else + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_t spl_wait_queue_entry_t; + #endif + ],[ + spl_wait_queue_head_t wq_head; + spl_wait_queue_entry_t wq_entry; + struct list_head *head __attribute__ ((unused)); + struct list_head *entry __attribute__ ((unused)); + + head = &wq_head.head; + entry = &wq_entry.entry; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1, + [wq_head->head and wq_entry->entry exist]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h index d8cd09b9e..445a73c68 100644 --- a/include/linux/wait_compat.h +++ b/include/linux/wait_compat.h @@ -26,6 +26,7 @@ #define _SPL_WAIT_COMPAT_H #include +#include #ifndef HAVE_WAIT_ON_BIT_ACTION # define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode) @@ -43,4 +44,12 @@ spl_bit_wait(void *word) #endif /* HAVE_WAIT_ON_BIT_ACTION */ +#ifdef HAVE_WAIT_QUEUE_ENTRY_T +typedef wait_queue_head_t spl_wait_queue_head_t; +typedef wait_queue_entry_t spl_wait_queue_entry_t; +#else +typedef wait_queue_head_t spl_wait_queue_head_t; +typedef wait_queue_t spl_wait_queue_entry_t; +#endif + #endif /* SPL_WAIT_COMPAT_H */ diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 9b55449ae..5479e75ad 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -26,7 +26,7 @@ #define _SPL_CONDVAR_H #include -#include +#include #include #include #include @@ -41,8 +41,8 @@ typedef struct { int cv_magic; - wait_queue_head_t cv_event; - wait_queue_head_t cv_destroy; + spl_wait_queue_head_t cv_event; + spl_wait_queue_head_t cv_destroy; atomic_t cv_refs; atomic_t cv_waiters; kmutex_t *cv_mutex; diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h index e971c2b0d..8fa14f67e 100644 --- a/include/sys/kmem_cache.h +++ b/include/sys/kmem_cache.h @@ -193,7 +193,7 @@ typedef struct spl_kmem_cache { struct list_head skc_partial_list; /* Partially alloc'ed */ struct rb_root skc_emergency_tree; /* Min sized objects */ spinlock_t skc_lock; /* Cache lock */ - wait_queue_head_t skc_waitq; /* Allocation waiters */ + spl_wait_queue_head_t skc_waitq; /* Allocation waiters */ uint64_t skc_slab_fail; /* Slab alloc failures */ uint64_t skc_slab_create; /* Slab creates */ uint64_t skc_slab_destroy; /* Slab destroys */ diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 5adda8827..c5ccec715 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -96,14 +97,14 @@ typedef struct taskq { struct list_head tq_prio_list; /* priority pending taskq_ent_t's */ struct list_head tq_delay_list; /* delayed taskq_ent_t's */ struct list_head tq_taskqs; /* all taskq_t's */ - wait_queue_head_t tq_work_waitq; /* new work waitq */ - wait_queue_head_t tq_wait_waitq; /* wait waitq */ + spl_wait_queue_head_t tq_work_waitq; /* new work waitq */ + spl_wait_queue_head_t tq_wait_waitq; /* wait waitq */ tq_lock_role_t tq_lock_class; /* class when taking tq_lock */ } taskq_t; typedef struct taskq_ent { spinlock_t tqent_lock; - wait_queue_head_t tqent_waitq; + spl_wait_queue_head_t tqent_waitq; struct timer_list tqent_timer; struct list_head tqent_list; taskqid_t tqent_id; diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index bffbcc607..05c1a5dbc 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -244,7 +244,7 @@ taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) { taskq_t *tq = p; taskq_thread_t *tqt; - wait_queue_t *wq; + spl_wait_queue_entry_t *wq; struct task_struct *tsk; taskq_ent_t *tqe; char name[100]; @@ -261,7 +261,11 @@ taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) lheads[LHEAD_PEND] = &tq->tq_pend_list; lheads[LHEAD_PRIO] = &tq->tq_prio_list; lheads[LHEAD_DELAY] = &tq->tq_delay_list; +#ifdef HAVE_WAIT_QUEUE_HEAD_ENTRY + lheads[LHEAD_WAIT] = &tq->tq_wait_waitq.head; +#else lheads[LHEAD_WAIT] = &tq->tq_wait_waitq.task_list; +#endif lheads[LHEAD_ACTIVE] = &tq->tq_active_list; for (i = 0; i < LHEAD_SIZE; ++i) { @@ -320,7 +324,13 @@ taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) } /* show the wait waitq list */ if (i == LHEAD_WAIT) { - wq = list_entry(lh, wait_queue_t, task_list); +#ifdef HAVE_WAIT_QUEUE_HEAD_ENTRY + wq = list_entry(lh, + spl_wait_queue_entry_t, entry); +#else + wq = list_entry(lh, + spl_wait_queue_entry_t, task_list); +#endif if (j == 0) seq_printf(f, "\t%s:", list_names[i]); diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index f6ed80fb8..b8759e01f 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "splat-internal.h" @@ -55,7 +56,7 @@ typedef struct atomic_priv { unsigned long ap_magic; struct file *ap_file; kmutex_t ap_lock; - wait_queue_head_t ap_waitq; + spl_wait_queue_head_t ap_waitq; volatile uint64_t ap_atomic; volatile uint64_t ap_atomic_exited; atomic_op_t ap_op; diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 8946b0671..d0649ad9a 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -275,8 +275,8 @@ typedef struct kmem_cache_priv { struct file *kcp_file; kmem_cache_t *kcp_cache; spinlock_t kcp_lock; - wait_queue_head_t kcp_ctl_waitq; - wait_queue_head_t kcp_thr_waitq; + spl_wait_queue_head_t kcp_ctl_waitq; + spl_wait_queue_head_t kcp_thr_waitq; int kcp_flags; int kcp_kct_count; kmem_cache_thread_t *kcp_kct[SPLAT_KMEM_THREADS]; diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index d7626b236..5d3ffb195 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -76,7 +76,7 @@ typedef struct rw_priv { struct file *rw_file; krwlock_t rw_rwlock; spinlock_t rw_lock; - wait_queue_head_t rw_waitq; + spl_wait_queue_head_t rw_waitq; int rw_completed; int rw_holders; int rw_waiters; diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index a043fc74f..e99d69101 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "splat-internal.h" @@ -54,7 +55,7 @@ typedef struct thread_priv { unsigned long tp_magic; struct file *tp_file; spinlock_t tp_lock; - wait_queue_head_t tp_waitq; + spl_wait_queue_head_t tp_waitq; uint_t tp_keys[SPLAT_THREAD_TEST_KEYS]; int tp_rc; int tp_count; From cd47801828c760efebbbb1fad7f7899369d8bce7 Mon Sep 17 00:00:00 2001 From: LOLi Date: Mon, 24 Jul 2017 19:52:53 +0200 Subject: [PATCH 1023/1062] Avoid WARN() from procfs on kstat collision When we load a ZFS pool having spa_name equals to some existing kstat we would have to create a duplicate entry, which procfs doesn't like. For instance a ZFS pool named "zil" would have its kstat "txgs" (module "zfs/zil") intalled under "/proc/spl/kstat/zfs/zil": unfortunately we already have a kstat named "zil" (module "zfs") installed in the same procfs location. Avoid this issue by skipping the duplicate entry creation in procfs. Reviewed-by: Brian Behlendorf Signed-off-by: loli10K Closes #628 --- module/spl/spl-kstat.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index e8917a3ea..1b6a7df9b 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifndef HAVE_PDE_DATA #define PDE_DATA(x) (PDE(x)->data) @@ -608,6 +609,29 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, } EXPORT_SYMBOL(__kstat_create); +static int +kstat_detect_collision(kstat_t *ksp) +{ + kstat_module_t *module; + kstat_t *tmp; + char parent[KSTAT_STRLEN+1]; + char *cp; + + (void) strlcpy(parent, ksp->ks_module, sizeof(parent)); + + if ((cp = strrchr(parent, '/')) == NULL) + return (0); + + cp[0] = '\0'; + if ((module = kstat_find_module(parent)) != NULL) { + list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) + if (strncmp(tmp->ks_name, cp+1, KSTAT_STRLEN) == 0) + return (EEXIST); + } + + return (0); +} + void __kstat_install(kstat_t *ksp) { @@ -620,6 +644,11 @@ __kstat_install(kstat_t *ksp) module = kstat_find_module(ksp->ks_module); if (module == NULL) { + if (kstat_detect_collision(ksp) != 0) { + cmn_err(CE_WARN, "kstat_create('%s', '%s'): namespace" \ + " collision", ksp->ks_module, ksp->ks_name); + goto out; + } module = kstat_create_module(ksp->ks_module); if (module == NULL) goto out; From 410f7ab5943684ef74be0e58ae17d3a0278ad0be Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 26 Jul 2017 02:03:12 -0400 Subject: [PATCH 1024/1062] Module parameter to enable spl_panic() to panic the kernel In unattended operations it's often more useful to have node panic and reboot when it encounters problems as opposed to sit there indefinitely waiting for somebody to discover it. This implements an spl_panic_crash module parameter, set it to nonzero to cause spl_panic() to call panic(). Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Signed-off-by: Oleg Drokin Closes #634 --- module/spl/spl-err.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index cf9f096b1..2f66b6e23 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -28,6 +28,17 @@ #include #include +/* + * It is often useful to actually have the panic crash the node so you + * can then get notified of the event, get the crashdump for later + * analysis and other such goodies. + * But we would still default to the current default of not to do that. + */ +unsigned int spl_panic_halt; +module_param(spl_panic_halt, uint, 0644); +MODULE_PARM_DESC(spl_panic_halt, + "Cause kernel panic on assertion failures"); + /* * Limit the number of stack traces dumped to not more than 5 every * 60 seconds to prevent denial-of-service attacks from debug code. @@ -62,6 +73,9 @@ spl_panic(const char *file, const char *func, int line, const char *fmt, ...) { printk(KERN_EMERG "%s", msg); printk(KERN_EMERG "PANIC at %s:%d:%s()\n", newfile, line, func); + if (spl_panic_halt) + panic("%s", msg); + spl_dumpstack(); /* Halt the thread to facilitate further debugging */ From 1f2671b9c9108add67bae998e7a4e41352c2a12f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 26 Jul 2017 10:08:57 -0700 Subject: [PATCH 1025/1062] Tag spl-0.7.0 META file and changelog updated. Signed-off-by: Brian Behlendorf --- META | 2 +- rpm/generic/spl-kmod.spec.in | 14 +++----------- rpm/generic/spl.spec.in | 14 +++----------- 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/META b/META index e157289fa..740b294a5 100644 --- a/META +++ b/META @@ -2,7 +2,7 @@ Meta: 1 Name: spl Branch: 1.0 Version: 0.7.0 -Release: rc5 +Release: 1 Release-Tags: relext License: GPL Author: OpenZFS on Linux diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 6a4be7a22..a5a0d9d64 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -167,14 +167,6 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog -* Thu Sep 10 2015 Brian Behlendorf - 0.6.5-1 -- Released 0.6.5-1, detailed release notes are available at: -- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5 -* Wed Apr 8 2015 Brian Behlendorf - 0.6.4-1 -- Released 0.6.4-1 -* Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 -- Released 0.6.3-1 -* Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 -- Released 0.6.2-1 -* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 -- First official stable release. +* Wed Jul 26 2017 Brian Behlendorf - 0.7.0-1 +- Released 0.7.0-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.0 diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index ee6aa99b1..8fee0b87e 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -34,14 +34,6 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog -* Thu Sep 10 2015 Brian Behlendorf - 0.6.5-1 -- Released 0.6.5-1, detailed release notes are available at: -- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5 -* Wed Apr 8 2015 Brian Behlendorf - 0.6.4-1 -- Released 0.6.4-1 -* Thu Jun 12 2014 Brian Behlendorf - 0.6.3-1 -- Released 0.6.3-1 -* Wed Aug 21 2013 Brian Behlendorf - 0.6.2-1 -- Released 0.6.2-1 -* Fri Mar 22 2013 Brian Behlendorf - 0.6.1-1 -- First official stable release. +* Wed Jul 26 2017 Brian Behlendorf - 0.7.0-1 +- Released 0.7.0-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.0 From eed143dfa6af0e004d0239bd3297b30e45b8c4d3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 29 Jul 2017 13:24:39 -0700 Subject: [PATCH 1026/1062] Fix aarch64 build Add aarch64 to the list of architecture which do not sanitize the LDFLAGS from the environment. See e0aacd9b for details. Signed-off-by: Brian Behlendorf Closes #635 --- rpm/generic/spl-kmod.spec.in | 4 ++-- rpm/redhat/spl-kmod.spec.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index a5a0d9d64..c33c25069 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -53,8 +53,8 @@ BuildRequires: %{_bindir}/kmodtool %endif %endif -# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches) -%ifarch ppc ppc64 ppc64le +# LDFLAGS are not sanitized by arch/*/Makefile for these architectures. +%ifarch ppc ppc64 ppc64le aarch64 %global __global_ldflags %{nil} %endif diff --git a/rpm/redhat/spl-kmod.spec.in b/rpm/redhat/spl-kmod.spec.in index cab72a7c7..4e2a9f955 100644 --- a/rpm/redhat/spl-kmod.spec.in +++ b/rpm/redhat/spl-kmod.spec.in @@ -22,8 +22,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: @PACKAGE@ = %{version}\n\ Conflicts: @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble) -# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches) -%ifarch ppc ppc64 ppc64le +# LDFLAGS are not sanitized by arch/*/Makefile for these architectures. +%ifarch ppc ppc64 ppc64le aarch64 %global __global_ldflags %{nil} %endif From d89616fda88bc030aaff758d37ede7d35e58841a Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 2 Aug 2017 14:45:16 -0400 Subject: [PATCH 1027/1062] Remove misguided HAVE_MUTEX_OWNER check It is just plain unsafe to peek inside in-kernel mutex structure and make assumptions about what kernel does with those internal fields like owner. Kernel is all too happy to stop doing the expected things like tracing lock owner once you load a tainted module like spl/zfs that is not GPL. As such you will get instant assertion failures like this: VERIFY3(((*(volatile typeof((&((&zo->zo_lock)->m_mutex))->owner) *)& ((&((&zo->zo_lock)->m_mutex))->owner))) == ((void *)0)) failed (ffff88030be28500 == (null)) PANIC at zfs_onexit.c:104:zfs_onexit_destroy() Showing stack for process 3626 CPU: 0 PID: 3626 Comm: mkfs.lustre Tainted: P OE ------------ 3.10.0-debug #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: dump_stack+0x19/0x1b spl_dumpstack+0x44/0x50 [spl] spl_panic+0xbf/0xf0 [spl] zfs_onexit_destroy+0x17c/0x280 [zfs] zfsdev_release+0x48/0xd0 [zfs] Reviewed-by: Brian Behlendorf Reviewed-by: Chunwei Chen Signed-off-by: Oleg Drokin Closes #632 Closes #633 --- config/spl-build.m4 | 30 ------------------------------ include/sys/mutex.h | 10 ---------- 2 files changed, 40 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 630d67c2d..b2a50bf16 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -49,7 +49,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_USLEEP_RANGE SPL_AC_KMEM_CACHE_ALLOCFLAGS SPL_AC_WAIT_ON_BIT - SPL_AC_MUTEX_OWNER SPL_AC_INODE_LOCK SPL_AC_GROUP_INFO_GID SPL_AC_KMEM_CACHE_CREATE_USERCOPY @@ -1562,35 +1561,6 @@ AC_DEFUN([SPL_AC_WAIT_ON_BIT], [ ]) ]) -dnl # -dnl # Check whether mutex has owner with task_struct type. -dnl # -dnl # Note that before Linux 3.0, mutex owner is of type thread_info. -dnl # -dnl # Note that in Linux 3.18, the condition for owner is changed from -dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) to -dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER) -dnl # -AC_DEFUN([SPL_AC_MUTEX_OWNER], [ - AC_MSG_CHECKING([whether mutex has owner]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - DEFINE_MUTEX(m); - struct task_struct *t __attribute__ ((unused)); - t = m.owner; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MUTEX_OWNER, 1, [yes]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - dnl # dnl # 4.7 API change dnl # i_mutex is changed to i_rwsem. Instead of directly using diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 319235223..d6bd99b4c 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -40,10 +40,8 @@ typedef enum { typedef struct { struct mutex m_mutex; spinlock_t m_lock; /* used for serializing mutex_exit */ -#ifndef HAVE_MUTEX_OWNER /* only when kernel doesn't have owner */ kthread_t *m_owner; -#endif #ifdef CONFIG_LOCKDEP kmutex_type_t m_type; #endif /* CONFIG_LOCKDEP */ @@ -58,24 +56,16 @@ spl_mutex_set_owner(kmutex_t *mp) * kernel will handle its owner, so we don't need to do anything if it * is defined. */ -#ifndef HAVE_MUTEX_OWNER mp->m_owner = current; -#endif } static inline void spl_mutex_clear_owner(kmutex_t *mp) { -#ifndef HAVE_MUTEX_OWNER mp->m_owner = NULL; -#endif } -#ifdef HAVE_MUTEX_OWNER #define mutex_owner(mp) (ACCESS_ONCE(MUTEX(mp)->owner)) -#else -#define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) -#endif #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) From 549423c0d4b8176110283a5cf90c6393b2a537d4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 2 Aug 2017 15:07:11 -0400 Subject: [PATCH 1028/1062] Revert "Remove misguided HAVE_MUTEX_OWNER check" This reverts commit d89616fda88bc030aaff758d37ede7d35e58841a which introduced some build failures which need to be resolved before this can be merged. Signed-off-by: Brian Behlendorf Issue #633 --- config/spl-build.m4 | 30 ++++++++++++++++++++++++++++++ include/sys/mutex.h | 10 ++++++++++ 2 files changed, 40 insertions(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b2a50bf16..630d67c2d 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -49,6 +49,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_USLEEP_RANGE SPL_AC_KMEM_CACHE_ALLOCFLAGS SPL_AC_WAIT_ON_BIT + SPL_AC_MUTEX_OWNER SPL_AC_INODE_LOCK SPL_AC_GROUP_INFO_GID SPL_AC_KMEM_CACHE_CREATE_USERCOPY @@ -1561,6 +1562,35 @@ AC_DEFUN([SPL_AC_WAIT_ON_BIT], [ ]) ]) +dnl # +dnl # Check whether mutex has owner with task_struct type. +dnl # +dnl # Note that before Linux 3.0, mutex owner is of type thread_info. +dnl # +dnl # Note that in Linux 3.18, the condition for owner is changed from +dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) to +dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER) +dnl # +AC_DEFUN([SPL_AC_MUTEX_OWNER], [ + AC_MSG_CHECKING([whether mutex has owner]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + DEFINE_MUTEX(m); + struct task_struct *t __attribute__ ((unused)); + t = m.owner; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MUTEX_OWNER, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + dnl # dnl # 4.7 API change dnl # i_mutex is changed to i_rwsem. Instead of directly using diff --git a/include/sys/mutex.h b/include/sys/mutex.h index d6bd99b4c..319235223 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -40,8 +40,10 @@ typedef enum { typedef struct { struct mutex m_mutex; spinlock_t m_lock; /* used for serializing mutex_exit */ +#ifndef HAVE_MUTEX_OWNER /* only when kernel doesn't have owner */ kthread_t *m_owner; +#endif #ifdef CONFIG_LOCKDEP kmutex_type_t m_type; #endif /* CONFIG_LOCKDEP */ @@ -56,16 +58,24 @@ spl_mutex_set_owner(kmutex_t *mp) * kernel will handle its owner, so we don't need to do anything if it * is defined. */ +#ifndef HAVE_MUTEX_OWNER mp->m_owner = current; +#endif } static inline void spl_mutex_clear_owner(kmutex_t *mp) { +#ifndef HAVE_MUTEX_OWNER mp->m_owner = NULL; +#endif } +#ifdef HAVE_MUTEX_OWNER #define mutex_owner(mp) (ACCESS_ONCE(MUTEX(mp)->owner)) +#else +#define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) +#endif #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) From 261a3151e16851304eb3e36af2681d1d1579b08f Mon Sep 17 00:00:00 2001 From: Gvozden Neskovic Date: Thu, 3 Aug 2017 05:42:58 +0200 Subject: [PATCH 1029/1062] spl-mutex: fix race in mutex_exit Prevent race on accessing kmutex_t when the mutex is embedded in a ref counted structure. Reviewed-by: Brian Behlendorf Reviewed-by: Chunwei Chen Signed-off-by: Gvozden Neskovic Closes zfsonlinux/zfs#6401 Closes #637 --- include/sys/mutex.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 319235223..8a98a9213 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -183,12 +183,13 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \ */ #define mutex_exit(mp) \ { \ - spl_mutex_lockdep_off_maybe(mp); \ - spin_lock(&(mp)->m_lock); \ spl_mutex_clear_owner(mp); \ + spin_lock(&(mp)->m_lock); \ + spl_mutex_lockdep_off_maybe(mp); \ mutex_unlock(MUTEX(mp)); \ - spin_unlock(&(mp)->m_lock); \ spl_mutex_lockdep_on_maybe(mp); \ + spin_unlock(&(mp)->m_lock); \ + /* NOTE: do not dereference mp after this point */ \ } int spl_mutex_init(void); From 98cdcb8286db2dadf369a22d33a53e49b11e3288 Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 2 Aug 2017 14:45:16 -0400 Subject: [PATCH 1030/1062] Remove misguided HAVE_MUTEX_OWNER check, take 2 It is just plain unsafe to peek inside in-kernel mutex structure and make assumptions about what kernel does with those internal fields like owner. Kernel is all too happy to stop doing the expected things like tracing lock owner once you load a tainted module like spl/zfs that is not GPL. As such you will get instant assertion failures like this: VERIFY3(((*(volatile typeof((&((&zo->zo_lock)->m_mutex))->owner) *)& ((&((&zo->zo_lock)->m_mutex))->owner))) == ((void *)0)) failed (ffff88030be28500 == (null)) PANIC at zfs_onexit.c:104:zfs_onexit_destroy() Showing stack for process 3626 CPU: 0 PID: 3626 Comm: mkfs.lustre Tainted: P OE ------------ 3.10.0-debug #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: dump_stack+0x19/0x1b spl_dumpstack+0x44/0x50 [spl] spl_panic+0xbf/0xf0 [spl] zfs_onexit_destroy+0x17c/0x280 [zfs] zfsdev_release+0x48/0xd0 [zfs] Reviewed-by: Brian Behlendorf Reviewed-by: Chunwei Chen Reviewed-by: Gvozden Neskovic Signed-off-by: Oleg Drokin Closes #639 Closes #632 --- config/spl-build.m4 | 30 ------------------------------ include/sys/mutex.h | 15 --------------- 2 files changed, 45 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 630d67c2d..b2a50bf16 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -49,7 +49,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_USLEEP_RANGE SPL_AC_KMEM_CACHE_ALLOCFLAGS SPL_AC_WAIT_ON_BIT - SPL_AC_MUTEX_OWNER SPL_AC_INODE_LOCK SPL_AC_GROUP_INFO_GID SPL_AC_KMEM_CACHE_CREATE_USERCOPY @@ -1562,35 +1561,6 @@ AC_DEFUN([SPL_AC_WAIT_ON_BIT], [ ]) ]) -dnl # -dnl # Check whether mutex has owner with task_struct type. -dnl # -dnl # Note that before Linux 3.0, mutex owner is of type thread_info. -dnl # -dnl # Note that in Linux 3.18, the condition for owner is changed from -dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) to -dnl # defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER) -dnl # -AC_DEFUN([SPL_AC_MUTEX_OWNER], [ - AC_MSG_CHECKING([whether mutex has owner]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - DEFINE_MUTEX(m); - struct task_struct *t __attribute__ ((unused)); - t = m.owner; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MUTEX_OWNER, 1, [yes]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - dnl # dnl # 4.7 API change dnl # i_mutex is changed to i_rwsem. Instead of directly using diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 8a98a9213..8cbab7c47 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -40,10 +40,7 @@ typedef enum { typedef struct { struct mutex m_mutex; spinlock_t m_lock; /* used for serializing mutex_exit */ -#ifndef HAVE_MUTEX_OWNER - /* only when kernel doesn't have owner */ kthread_t *m_owner; -#endif #ifdef CONFIG_LOCKDEP kmutex_type_t m_type; #endif /* CONFIG_LOCKDEP */ @@ -54,28 +51,16 @@ typedef struct { static inline void spl_mutex_set_owner(kmutex_t *mp) { - /* - * kernel will handle its owner, so we don't need to do anything if it - * is defined. - */ -#ifndef HAVE_MUTEX_OWNER mp->m_owner = current; -#endif } static inline void spl_mutex_clear_owner(kmutex_t *mp) { -#ifndef HAVE_MUTEX_OWNER mp->m_owner = NULL; -#endif } -#ifdef HAVE_MUTEX_OWNER -#define mutex_owner(mp) (ACCESS_ONCE(MUTEX(mp)->owner)) -#else #define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) -#endif #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) From 6ecfd2b55333dbaf8755bcab53ae9d37b6bca7c1 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Thu, 3 Aug 2017 10:41:42 -0700 Subject: [PATCH 1031/1062] Add __divmoddi4 and __udivmoddi4 for 32-bit arch gcc-7 seems to use __udivmoddi4 for 64-bit division on 32-bit arch. This patch implement them so we don't get undefined reference error. Reviewed-by: Brian Behlendorf Reviewed-by: loli10K Signed-off-by: Chunwei Chen Closes zfsonlinux/zfs#6417 Closes #636 --- module/spl/spl-generic.c | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 10061620e..f6782dae7 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -277,6 +277,49 @@ __umoddi3(uint64_t dividend, uint64_t divisor) } EXPORT_SYMBOL(__umoddi3); +/* + * Implementation of 64-bit unsigned division/modulo for 32-bit machines. + */ +uint64_t +__udivmoddi4(uint64_t n, uint64_t d, uint64_t *r) +{ + uint64_t q = __udivdi3(n, d); + if (r) + *r = n - d * q; + return (q); +} +EXPORT_SYMBOL(__udivmoddi4); + +/* + * Implementation of 64-bit signed division/modulo for 32-bit machines. + */ +int64_t +__divmoddi4(int64_t n, int64_t d, int64_t *r) +{ + int64_t q, rr; + boolean_t nn = B_FALSE; + boolean_t nd = B_FALSE; + if (n < 0) { + nn = B_TRUE; + n = -n; + } + if (d < 0) { + nd = B_TRUE; + d = -d; + } + + q = __udivmoddi4(n, d, (uint64_t *)&rr); + + if (nn != nd) + q = -q; + if (nn) + rr = -rr; + if (r) + *r = rr; + return (q); +} +EXPORT_SYMBOL(__divmoddi4); + #if defined(__arm) || defined(__arm__) /* * Implementation of 64-bit (un)signed division for 32-bit arm machines. From cce83ba0ecacc45c79709e8b3def8dc8a046fffe Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 4 Aug 2017 09:57:58 -0700 Subject: [PATCH 1032/1062] Fix use-after-free in taskq_seq_show_impl taskq_seq_show_impl walks the tq_active_list to show the tqent_func and tqent_arg. However for taskq_dispatch_ent, it's very likely that the task entry will be freed during the function call, and causes a use-after-free bug. To fix this, we duplicate the task entry to an on-stack struct, and assign it instead to tqt_task. This way, the tq_lock alone will guarantee its safety. Reviewed-by: Tim Chase Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #638 Closes #640 --- module/spl/spl-taskq.c | 55 ++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 83f483ea9..4298b3c86 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -337,19 +337,18 @@ taskq_find_list(taskq_t *tq, struct list_head *lh, taskqid_t id) /* * Find an already dispatched task given the task id regardless of what - * state it is in. If a task is still pending or executing it will be - * returned and 'active' set appropriately. If the task has already - * been run then NULL is returned. + * state it is in. If a task is still pending it will be returned. + * If a task is executing, then -EBUSY will be returned instead. + * If the task has already been run then NULL is returned. */ static taskq_ent_t * -taskq_find(taskq_t *tq, taskqid_t id, int *active) +taskq_find(taskq_t *tq, taskqid_t id) { taskq_thread_t *tqt; struct list_head *l; taskq_ent_t *t; ASSERT(spin_is_locked(&tq->tq_lock)); - *active = 0; t = taskq_find_list(tq, &tq->tq_delay_list, id); if (t) @@ -366,9 +365,12 @@ taskq_find(taskq_t *tq, taskqid_t id, int *active) list_for_each(l, &tq->tq_active_list) { tqt = list_entry(l, taskq_thread_t, tqt_active_list); if (tqt->tqt_id == id) { - t = tqt->tqt_task; - *active = 1; - return (t); + /* + * Instead of returning tqt_task, we just return a non + * NULL value to prevent misuse, since tqt_task only + * has two valid fields. + */ + return (ERR_PTR(-EBUSY)); } } @@ -405,12 +407,11 @@ taskq_find(taskq_t *tq, taskqid_t id, int *active) static int taskq_wait_id_check(taskq_t *tq, taskqid_t id) { - int active = 0; int rc; unsigned long flags; spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); - rc = (taskq_find(tq, id, &active) == NULL); + rc = (taskq_find(tq, id) == NULL); spin_unlock_irqrestore(&tq->tq_lock, flags); return (rc); @@ -497,15 +498,14 @@ int taskq_cancel_id(taskq_t *tq, taskqid_t id) { taskq_ent_t *t; - int active = 0; int rc = ENOENT; unsigned long flags; ASSERT(tq); spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); - t = taskq_find(tq, id, &active); - if (t && !active) { + t = taskq_find(tq, id); + if (t && t != ERR_PTR(-EBUSY)) { list_del_init(&t->tqent_list); t->tqent_flags |= TQENT_FLAG_CANCEL; @@ -536,7 +536,7 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id) } spin_unlock_irqrestore(&tq->tq_lock, flags); - if (active) { + if (t == ERR_PTR(-EBUSY)) { taskq_wait_id(tq, id); rc = EBUSY; } @@ -838,6 +838,7 @@ taskq_thread(void *args) taskq_ent_t *t; int seq_tasks = 0; unsigned long flags; + taskq_ent_t dup_task = {}; ASSERT(tqt); ASSERT(tqt->tqt_tq); @@ -897,22 +898,24 @@ taskq_thread(void *args) list_del_init(&t->tqent_list); /* - * In order to support recursively dispatching a - * preallocated taskq_ent_t, tqent_id must be - * stored prior to executing tqent_func. + * A TQENT_FLAG_PREALLOC task may be reused or freed + * during the task function call. Store tqent_id and + * tqent_flags here. + * + * Also use an on stack taskq_ent_t for tqt_task + * assignment in this case. We only populate the two + * fields used by the only user in taskq proc file. */ tqt->tqt_id = t->tqent_id; - tqt->tqt_task = t; - - /* - * We must store a copy of the flags prior to - * servicing the task (servicing a prealloc'd task - * returns the ownership of the tqent back to - * the caller of taskq_dispatch). Thus, - * tqent_flags _may_ change within the call. - */ tqt->tqt_flags = t->tqent_flags; + if (t->tqent_flags & TQENT_FLAG_PREALLOC) { + dup_task.tqent_func = t->tqent_func; + dup_task.tqent_arg = t->tqent_arg; + t = &dup_task; + } + tqt->tqt_task = t; + taskq_insert_in_order(tq, tqt); tq->tq_nactive++; spin_unlock_irqrestore(&tq->tq_lock, flags); From 9243b0fb4784803720a0a5336cc3ded969a779e6 Mon Sep 17 00:00:00 2001 From: Boris Protopopov Date: Tue, 8 Aug 2017 11:31:52 -0400 Subject: [PATCH 1033/1062] Add assert under lock to detect cases of dispach of a preallocated taskq work item to more than one queue concurrently. Also, please see discussion in zfsonlinux/zfs#3840. Reviewed-by: Brian Behlendorf Signed-off-by: Boris Protopopov Closes #609 --- module/spl/spl-taskq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 4298b3c86..7cad9f76b 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -683,6 +683,12 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, spin_lock(&t->tqent_lock); + /* + * Make sure the entry is not on some other taskq; it is important to + * ASSERT() under lock + */ + ASSERT(taskq_empty_ent(t)); + /* * Mark it as a prealloc'd task. This is important * to ensure that we don't free it later. From a02fa347b75266f40c8f571d7d63a21ec7f6f13d Mon Sep 17 00:00:00 2001 From: Fabian-Gruenbichler Date: Fri, 11 Aug 2017 00:21:54 +0200 Subject: [PATCH 1034/1062] splat.1 manpage: fix spelling of 'hexadecimal' Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Closes #642 --- man/man1/splat.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/man/man1/splat.1 b/man/man1/splat.1 index 37f8435b0..407680b28 100644 --- a/man/man1/splat.1 +++ b/man/man1/splat.1 @@ -32,7 +32,7 @@ Print the usage message. .BI "\-l" "" ", \-\-list" "" .IP For each spl.ko subsystem, print all available test names and -hexidecimal identifiers with a short description. +hexadecimal identifiers with a short description. .HP .BI "\-t" " subsystem" ":" "test" ", \-\-test" " subsystem" ":" "test" .HP @@ -42,9 +42,9 @@ Run the \fItest\fR diagnostic routine for the spl.ko \fIsubsystem\fR. Specify this option more than once to run multiple tests. The \fItest\fR and \fIsubsystem\fR parameters are the names or -hexidecimal identifiers returned by the \fBsplat --list\fR command. +hexadecimal identifiers returned by the \fBsplat --list\fR command. -If \fIsubsystem\fR is a name and not a hexidecimal identifier, then the +If \fIsubsystem\fR is a name and not a hexadecimal identifier, then the \fBall\fR keyword can be used to run all available \fIsubsystem\fR tests. @@ -73,7 +73,7 @@ Test the kernel compression and queue waiting facilities: # splat --test zlib:compress/uncompress --test taskq:wait .LP This is the same as the previous command, except that the subsystems -and tests are referenced by hexidecimal identifier instead of by name: +and tests are referenced by hexadecimal identifier instead of by name: .IP # splat -t 0x0f00:0x0f01 -t 0x0200:0x0204 From 945b7f1c63e3a12d08349afb986b7dfaca370222 Mon Sep 17 00:00:00 2001 From: Fabian-Gruenbichler Date: Fri, 11 Aug 2017 00:22:31 +0200 Subject: [PATCH 1035/1062] spl-module-parameters.5 manpage: fix macro There is no '.sh' macro in troff/groff/man, only '.SH' for section headers. I assume .sp for a line break was intended here like in the rest of the man page. Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Closes #643 --- man/man5/spl-module-parameters.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 97241fd53..e15114445 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -153,7 +153,7 @@ function takes a single global lock over the entire virtual address range which serializes all allocations. Using slightly different allocation functions for small and large objects allows us to handle a wide range of object sizes. -.sh +.sp The \fBspl_kmem_cache_kmem_limit\fR value is used to determine this cutoff size. One quarter the PAGE_SIZE is used as the default value because \fBspl_kmem_cache_obj_per_slab\fR defaults to 16. This means that at From bbefaeba2966512080541dac3c10589327686c1a Mon Sep 17 00:00:00 2001 From: Fabian-Gruenbichler Date: Fri, 11 Aug 2017 00:23:43 +0200 Subject: [PATCH 1036/1062] make module/spl/spl-kmem.c non-executable (again) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was probably accidentally committed in aeb9baa618beea1458ab3ab22cbc0f39213da6cf Fix: handle NULL case in spl_kmem_free_track() Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Reviewed-by: Gvozden Neskovic Signed-off-by: Fabian Grünbichler Closes #644 --- module/spl/spl-kmem.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 module/spl/spl-kmem.c diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c old mode 100755 new mode 100644 From 9df9692637aeee416f509c7f39655beb2d35b549 Mon Sep 17 00:00:00 2001 From: gaurkuma Date: Fri, 11 Aug 2017 08:53:35 -0700 Subject: [PATCH 1037/1062] Allow longer SPA names in stats Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Signed-off-by: gaurkuma Closes #641 --- include/sys/kstat.h | 2 +- module/spl/spl-kstat.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/sys/kstat.h b/include/sys/kstat.h index faf6b81da..7862ab0a3 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -32,7 +32,7 @@ #include #include -#define KSTAT_STRLEN 31 +#define KSTAT_STRLEN 255 #define KSTAT_RAW_MAX (128*1024) /* For reference valid classes are: diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 1b6a7df9b..3765f63cb 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -614,21 +614,26 @@ kstat_detect_collision(kstat_t *ksp) { kstat_module_t *module; kstat_t *tmp; - char parent[KSTAT_STRLEN+1]; + char *parent; char *cp; - (void) strlcpy(parent, ksp->ks_module, sizeof(parent)); + parent = kmem_asprintf("%s", ksp->ks_module); - if ((cp = strrchr(parent, '/')) == NULL) + if ((cp = strrchr(parent, '/')) == NULL) { + strfree(parent); return (0); + } cp[0] = '\0'; if ((module = kstat_find_module(parent)) != NULL) { list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) - if (strncmp(tmp->ks_name, cp+1, KSTAT_STRLEN) == 0) + if (strncmp(tmp->ks_name, cp+1, KSTAT_STRLEN) == 0) { + strfree(parent); return (EEXIST); + } } + strfree(parent); return (0); } From e8474f9ad3b3d23c3277535c4f53f8fd1e6cbd74 Mon Sep 17 00:00:00 2001 From: Richard Elling Date: Mon, 25 Sep 2017 10:02:24 -0700 Subject: [PATCH 1038/1062] Pool io stat shows wlentime instead of rlentime Reviewed-by: Tim Chase Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: Richard Elling Closes #652 Closes #651 --- module/spl/spl-kstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 3765f63cb..ed5265311 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -264,7 +264,7 @@ kstat_seq_show_io(struct seq_file *f, kstat_io_t *kip) kip->nread, kip->nwritten, kip->reads, kip->writes, kip->wtime, kip->wlentime, kip->wlastupdate, - kip->rtime, kip->wlentime, kip->rlastupdate, + kip->rtime, kip->rlentime, kip->rlastupdate, kip->wcnt, kip->rcnt); return 0; From 4b393c50ae0e74b351534030d8b87f1967832d09 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Wed, 4 Oct 2017 12:33:43 -0400 Subject: [PATCH 1039/1062] Make file headers conform to ZFS style standard No semantic changes. Change /************\ and \************/ to /* and */ Signed-off-by: Olaf Faaland --- cmd/splat/splat.c | 4 ++-- cmd/splat/splat.h | 4 ++-- include/fs/fs_subr.h | 4 ++-- include/linux/bitops_compat.h | 4 ++-- include/linux/compiler_compat.h | 4 ++-- include/linux/delay_compat.h | 4 ++-- include/linux/file_compat.h | 4 ++-- include/linux/list_compat.h | 4 ++-- include/linux/math64_compat.h | 4 ++-- include/linux/mm_compat.h | 4 ++-- include/linux/proc_compat.h | 4 ++-- include/linux/rwsem_compat.h | 4 ++-- include/linux/wait_compat.h | 4 ++-- include/linux/zlib_compat.h | 4 ++-- include/rpc/types.h | 4 ++-- include/rpc/xdr.h | 4 ++-- include/sharefs/share.h | 4 ++-- include/spl-ctl.h | 4 ++-- include/splat-ctl.h | 4 ++-- include/strings.h | 4 ++-- include/sys/acl.h | 4 ++-- include/sys/acl_impl.h | 4 ++-- include/sys/atomic.h | 4 ++-- include/sys/attr.h | 4 ++-- include/sys/bitmap.h | 4 ++-- include/sys/bootconf.h | 4 ++-- include/sys/bootprops.h | 4 ++-- include/sys/buf.h | 4 ++-- include/sys/byteorder.h | 4 ++-- include/sys/callb.h | 4 ++-- include/sys/callo.h | 4 ++-- include/sys/cmn_err.h | 4 ++-- include/sys/compress.h | 4 ++-- include/sys/conf.h | 4 ++-- include/sys/console.h | 4 ++-- include/sys/cpupart.h | 4 ++-- include/sys/cpuvar.h | 4 ++-- include/sys/crc32.h | 4 ++-- include/sys/cred.h | 4 ++-- include/sys/ctype.h | 4 ++-- include/sys/ddi.h | 4 ++-- include/sys/debug.h | 4 ++-- include/sys/dirent.h | 4 ++-- include/sys/disp.h | 4 ++-- include/sys/dkio.h | 4 ++-- include/sys/dkioc_free_util.h | 4 ++-- include/sys/dklabel.h | 4 ++-- include/sys/dnlc.h | 4 ++-- include/sys/dumphdr.h | 4 ++-- include/sys/efi_partition.h | 4 ++-- include/sys/errno.h | 4 ++-- include/sys/extdirent.h | 4 ++-- include/sys/fcntl.h | 4 ++-- include/sys/file.h | 4 ++-- include/sys/fm/protocol.h | 4 ++-- include/sys/fm/util.h | 4 ++-- include/sys/fs/swapnode.h | 4 ++-- include/sys/idmap.h | 4 ++-- include/sys/int_limits.h | 4 ++-- include/sys/int_types.h | 4 ++-- include/sys/inttypes.h | 4 ++-- include/sys/isa_defs.h | 4 ++-- include/sys/kidmap.h | 4 ++-- include/sys/kobj.h | 4 ++-- include/sys/kstat.h | 4 ++-- include/sys/list.h | 4 ++-- include/sys/mkdev.h | 4 ++-- include/sys/mntent.h | 4 ++-- include/sys/modctl.h | 4 ++-- include/sys/mode.h | 4 ++-- include/sys/mount.h | 4 ++-- include/sys/note.h | 4 ++-- include/sys/open.h | 4 ++-- include/sys/param.h | 4 ++-- include/sys/pathname.h | 4 ++-- include/sys/policy.h | 4 ++-- include/sys/pool.h | 4 ++-- include/sys/priv_impl.h | 4 ++-- include/sys/proc.h | 4 ++-- include/sys/processor.h | 4 ++-- include/sys/pset.h | 4 ++-- include/sys/random.h | 4 ++-- include/sys/refstr.h | 4 ++-- include/sys/resource.h | 4 ++-- include/sys/rwlock.h | 4 ++-- include/sys/sdt.h | 4 ++-- include/sys/sid.h | 4 ++-- include/sys/signal.h | 4 ++-- include/sys/stat.h | 4 ++-- include/sys/stropts.h | 4 ++-- include/sys/sunddi.h | 4 ++-- include/sys/sunldi.h | 4 ++-- include/sys/sysdc.h | 4 ++-- include/sys/sysevent.h | 4 ++-- include/sys/sysevent/eventdefs.h | 4 ++-- include/sys/sysmacros.h | 4 ++-- include/sys/systeminfo.h | 4 ++-- include/sys/systm.h | 4 ++-- include/sys/t_lock.h | 4 ++-- include/sys/thread.h | 4 ++-- include/sys/time.h | 4 ++-- include/sys/timer.h | 4 ++-- include/sys/tsd.h | 4 ++-- include/sys/types.h | 4 ++-- include/sys/types32.h | 4 ++-- include/sys/u8_textprep.h | 4 ++-- include/sys/uio.h | 4 ++-- include/sys/unistd.h | 4 ++-- include/sys/user.h | 4 ++-- include/sys/va_list.h | 4 ++-- include/sys/varargs.h | 4 ++-- include/sys/vfs.h | 4 ++-- include/sys/vfs_opreg.h | 4 ++-- include/sys/vmsystm.h | 4 ++-- include/sys/vnode.h | 4 ++-- include/sys/zmod.h | 4 ++-- include/sys/zone.h | 4 ++-- include/unistd.h | 4 ++-- include/util/qsort.h | 4 ++-- include/util/sscanf.h | 4 ++-- include/vm/anon.h | 4 ++-- include/vm/pvn.h | 4 ++-- include/vm/seg_kmem.h | 4 ++-- module/spl/spl-atomic.c | 4 ++-- module/spl/spl-cred.c | 4 ++-- module/spl/spl-err.c | 4 ++-- module/spl/spl-generic.c | 4 ++-- module/spl/spl-kobj.c | 4 ++-- module/spl/spl-kstat.c | 4 ++-- module/spl/spl-mutex.c | 4 ++-- module/spl/spl-proc.c | 4 ++-- module/spl/spl-rwlock.c | 4 ++-- module/spl/spl-thread.c | 4 ++-- module/spl/spl-vnode.c | 4 ++-- module/spl/spl-xdr.c | 4 ++-- module/spl/spl-zlib.c | 4 ++-- module/splat/splat-atomic.c | 4 ++-- module/splat/splat-condvar.c | 4 ++-- module/splat/splat-cred.c | 4 ++-- module/splat/splat-ctl.c | 4 ++-- module/splat/splat-generic.c | 4 ++-- module/splat/splat-internal.h | 4 ++-- module/splat/splat-kmem.c | 4 ++-- module/splat/splat-kobj.c | 4 ++-- module/splat/splat-linux.c | 4 ++-- module/splat/splat-list.c | 4 ++-- module/splat/splat-mutex.c | 4 ++-- module/splat/splat-random.c | 4 ++-- module/splat/splat-rwlock.c | 4 ++-- module/splat/splat-taskq.c | 4 ++-- module/splat/splat-thread.c | 4 ++-- module/splat/splat-time.c | 4 ++-- module/splat/splat-vnode.c | 4 ++-- module/splat/splat-zlib.c | 4 ++-- 154 files changed, 308 insertions(+), 308 deletions(-) diff --git a/cmd/splat/splat.c b/cmd/splat/splat.c index 92962393d..d11a64ce8 100644 --- a/cmd/splat/splat.c +++ b/cmd/splat/splat.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) User Space Interface. -\*****************************************************************************/ + */ #include #include diff --git a/cmd/splat/splat.h b/cmd/splat/splat.h index 5b838af3a..8fbc97cb6 100644 --- a/cmd/splat/splat.h +++ b/cmd/splat/splat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPLAT_H #define _SPLAT_H diff --git a/include/fs/fs_subr.h b/include/fs/fs_subr.h index 33ccc684e..802aa7336 100644 --- a/include/fs/fs_subr.h +++ b/include/fs/fs_subr.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_FS_FS_SUBR_H #define _SPL_FS_FS_SUBR_H diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h index 0a3ac16f4..dc7ed8600 100644 --- a/include/linux/bitops_compat.h +++ b/include/linux/bitops_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_BITOPS_COMPAT_H #define _SPL_BITOPS_COMPAT_H diff --git a/include/linux/compiler_compat.h b/include/linux/compiler_compat.h index 8dbbeee72..06268bf4c 100644 --- a/include/linux/compiler_compat.h +++ b/include/linux/compiler_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_COMPILER_COMPAT_H #define _SPL_COMPILER_COMPAT_H diff --git a/include/linux/delay_compat.h b/include/linux/delay_compat.h index fc9ff66f5..0c91a24d6 100644 --- a/include/linux/delay_compat.h +++ b/include/linux/delay_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DELAY_COMPAT_H #define _SPL_DELAY_COMPAT_H diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 916514566..26299965b 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_FILE_COMPAT_H #define _SPL_FILE_COMPAT_H diff --git a/include/linux/list_compat.h b/include/linux/list_compat.h index d1e0d9d96..63e455318 100644 --- a/include/linux/list_compat.h +++ b/include/linux/list_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_LIST_COMPAT_H #define _SPL_LIST_COMPAT_H diff --git a/include/linux/math64_compat.h b/include/linux/math64_compat.h index 2c911a64b..83046a05f 100644 --- a/include/linux/math64_compat.h +++ b/include/linux/math64_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MATH64_COMPAT_H #define _SPL_MATH64_COMPAT_H diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 7ae940a75..6c285bbbb 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MM_COMPAT_H #define _SPL_MM_COMPAT_H diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index 2c57f39d2..3ec66afbc 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_PROC_COMPAT_H #define _SPL_PROC_COMPAT_H diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index de513debe..c2f22b060 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_RWSEM_COMPAT_H #define _SPL_RWSEM_COMPAT_H diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h index 445a73c68..dd0c9323b 100644 --- a/include/linux/wait_compat.h +++ b/include/linux/wait_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_WAIT_COMPAT_H #define _SPL_WAIT_COMPAT_H diff --git a/include/linux/zlib_compat.h b/include/linux/zlib_compat.h index ba853c395..d2fefd15a 100644 --- a/include/linux/zlib_compat.h +++ b/include/linux/zlib_compat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2011 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ZLIB_COMPAT_H #define _SPL_ZLIB_COMPAT_H diff --git a/include/rpc/types.h b/include/rpc/types.h index b57b4bd73..57afbc52a 100644 --- a/include/rpc/types.h +++ b/include/rpc/types.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_RPC_TYPES_H #define _SPL_RPC_TYPES_H diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index d0f06b55f..4f19f655b 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (c) 2008 Sun Microsystems, Inc. * Written by Ricardo Correia * @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_RPC_XDR_H #define _SPL_RPC_XDR_H diff --git a/include/sharefs/share.h b/include/sharefs/share.h index fc248a233..6c140d0b8 100644 --- a/include/sharefs/share.h +++ b/include/sharefs/share.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SHARE_H #define _SPL_SHARE_H diff --git a/include/spl-ctl.h b/include/spl-ctl.h index bb24490d9..21b1c1c05 100644 --- a/include/spl-ctl.h +++ b/include/spl-ctl.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _DEBUG_CTL_H #define _DEBUG_CTL_H diff --git a/include/splat-ctl.h b/include/splat-ctl.h index 15fd01b54..dab3b299f 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPLAT_CTL_H #define _SPLAT_CTL_H diff --git a/include/strings.h b/include/strings.h index dc0f31466..c3b5741de 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_STRINGS_H #define _SPL_STRINGS_H diff --git a/include/sys/acl.h b/include/sys/acl.h index f4a3de599..4c301b2a8 100644 --- a/include/sys/acl.h +++ b/include/sys/acl.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ACL_H #define _SPL_ACL_H diff --git a/include/sys/acl_impl.h b/include/sys/acl_impl.h index 67af71371..45a4561dc 100644 --- a/include/sys/acl_impl.h +++ b/include/sys/acl_impl.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ACL_IMPL_H #define _SPL_ACL_IMPL_H diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 07b460ef7..d0229fb88 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ATOMIC_H #define _SPL_ATOMIC_H diff --git a/include/sys/attr.h b/include/sys/attr.h index 5fb609c93..549807f25 100644 --- a/include/sys/attr.h +++ b/include/sys/attr.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ATTR_H #define _SPL_ATTR_H diff --git a/include/sys/bitmap.h b/include/sys/bitmap.h index e4acb0b7d..5bbf15f4b 100644 --- a/include/sys/bitmap.h +++ b/include/sys/bitmap.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_BITMAP_H #define _SPL_BITMAP_H diff --git a/include/sys/bootconf.h b/include/sys/bootconf.h index 4e032ad2f..883b9ec76 100644 --- a/include/sys/bootconf.h +++ b/include/sys/bootconf.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_BOOTCONF_H #define _SPL_BOOTCONF_H diff --git a/include/sys/bootprops.h b/include/sys/bootprops.h index a562ec9f9..bd1c3182b 100644 --- a/include/sys/bootprops.h +++ b/include/sys/bootprops.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_BOOTPROPS_H #define _SPL_BOOTPROPS_H diff --git a/include/sys/buf.h b/include/sys/buf.h index 8596c835c..60b1c621d 100644 --- a/include/sys/buf.h +++ b/include/sys/buf.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_BUF_H #define _SPL_BUF_H diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h index 184b52d51..ffd7ec4c4 100644 --- a/include/sys/byteorder.h +++ b/include/sys/byteorder.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_BYTEORDER_H #define _SPL_BYTEORDER_H diff --git a/include/sys/callb.h b/include/sys/callb.h index fbe4128f8..0b33bc0f3 100644 --- a/include/sys/callb.h +++ b/include/sys/callb.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CALLB_H #define _SPL_CALLB_H diff --git a/include/sys/callo.h b/include/sys/callo.h index 0d9fbcbc4..1e1516392 100644 --- a/include/sys/callo.h +++ b/include/sys/callo.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CALLO_H #define _SPL_CALLO_H diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h index 1291510ec..0e8e41841 100644 --- a/include/sys/cmn_err.h +++ b/include/sys/cmn_err.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CMN_ERR_H #define _SPL_CMN_ERR_H diff --git a/include/sys/compress.h b/include/sys/compress.h index 55822f0e5..719d87c4e 100644 --- a/include/sys/compress.h +++ b/include/sys/compress.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_COMPRESS_H #define _SPL_COMPRESS_H diff --git a/include/sys/conf.h b/include/sys/conf.h index eece0c798..eeaecb6f0 100644 --- a/include/sys/conf.h +++ b/include/sys/conf.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CONF_H #define _SPL_CONF_H diff --git a/include/sys/console.h b/include/sys/console.h index 76ef61838..2c327fb8f 100644 --- a/include/sys/console.h +++ b/include/sys/console.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CONSOLE_H #define _SPL_CONSOLE_H diff --git a/include/sys/cpupart.h b/include/sys/cpupart.h index fddeed6d0..1c3eb00f1 100644 --- a/include/sys/cpupart.h +++ b/include/sys/cpupart.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CPUPART_H #define _SPL_CPUPART_H diff --git a/include/sys/cpuvar.h b/include/sys/cpuvar.h index 1284f940f..d2e48063e 100644 --- a/include/sys/cpuvar.h +++ b/include/sys/cpuvar.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CPUVAR_H #define _SPL_CPUVAR_H diff --git a/include/sys/crc32.h b/include/sys/crc32.h index 1981f3579..d974418c8 100644 --- a/include/sys/crc32.h +++ b/include/sys/crc32.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CRC32_H #define _SPL_CRC32_H diff --git a/include/sys/cred.h b/include/sys/cred.h index 2ad7115e0..f966ac453 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CRED_H #define _SPL_CRED_H diff --git a/include/sys/ctype.h b/include/sys/ctype.h index 52037f9a1..0a7ee4a8f 100644 --- a/include/sys/ctype.h +++ b/include/sys/ctype.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_CTYPE_H #define _SPL_CTYPE_H diff --git a/include/sys/ddi.h b/include/sys/ddi.h index 2fa1388fd..458c13ec8 100644 --- a/include/sys/ddi.h +++ b/include/sys/ddi.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DDI_H #define _SPL_DDI_H diff --git a/include/sys/debug.h b/include/sys/debug.h index 98ccbaf05..5fecaa869 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ /* * Available Solaris debug functions. All of the ASSERT() macros will be diff --git a/include/sys/dirent.h b/include/sys/dirent.h index 68f75da57..3069628da 100644 --- a/include/sys/dirent.h +++ b/include/sys/dirent.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DIRENT_H #define _SPL_DIRENT_H diff --git a/include/sys/disp.h b/include/sys/disp.h index c3077a73f..1994d53ed 100644 --- a/include/sys/disp.h +++ b/include/sys/disp.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DISP_H #define _SPL_DISP_H diff --git a/include/sys/dkio.h b/include/sys/dkio.h index dd7a95f13..49f166a9c 100644 --- a/include/sys/dkio.h +++ b/include/sys/dkio.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DKIO_H #define _SPL_DKIO_H diff --git a/include/sys/dkioc_free_util.h b/include/sys/dkioc_free_util.h index bea5a5bbc..579bf503f 100644 --- a/include/sys/dkioc_free_util.h +++ b/include/sys/dkioc_free_util.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DKIOC_UTIL_H #define _SPL_DKIOC_UTIL_H diff --git a/include/sys/dklabel.h b/include/sys/dklabel.h index 74c0d506f..ff58059c6 100644 --- a/include/sys/dklabel.h +++ b/include/sys/dklabel.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DKLABEL_H #define _SPL_DKLABEL_H diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h index 99d16c885..20850c82e 100644 --- a/include/sys/dnlc.h +++ b/include/sys/dnlc.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DNLC_H #define _SPL_DNLC_H diff --git a/include/sys/dumphdr.h b/include/sys/dumphdr.h index 1b45058ad..dfb0585d1 100644 --- a/include/sys/dumphdr.h +++ b/include/sys/dumphdr.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_DUMPHDR_H #define _SPL_DUMPHDR_H diff --git a/include/sys/efi_partition.h b/include/sys/efi_partition.h index c39236423..6c4bb201e 100644 --- a/include/sys/efi_partition.h +++ b/include/sys/efi_partition.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_EFI_PARTITION_H #define _SPL_EFI_PARTITION_H diff --git a/include/sys/errno.h b/include/sys/errno.h index 64d8482dc..92b2cde6c 100644 --- a/include/sys/errno.h +++ b/include/sys/errno.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ERRNO_H #define _SPL_ERRNO_H diff --git a/include/sys/extdirent.h b/include/sys/extdirent.h index 1a5c03145..e0567fa6e 100644 --- a/include/sys/extdirent.h +++ b/include/sys/extdirent.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2010 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_EXTDIRENT_H #define _SPL_EXTDIRENT_H diff --git a/include/sys/fcntl.h b/include/sys/fcntl.h index 88b7a6928..bf5bf0323 100644 --- a/include/sys/fcntl.h +++ b/include/sys/fcntl.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2010 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_FCNTL_H #define _SPL_FCNTL_H diff --git a/include/sys/file.h b/include/sys/file.h index 67b301c6e..4990e0505 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_FILE_H #define _SPL_FILE_H diff --git a/include/sys/fm/protocol.h b/include/sys/fm/protocol.h index e9ce6ff6c..39f6cb1e5 100644 --- a/include/sys/fm/protocol.h +++ b/include/sys/fm/protocol.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_FM_PROTOCOL_H #define _SPL_FM_PROTOCOL_H diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h index 7f2dbde9c..d8f68433d 100644 --- a/include/sys/fm/util.h +++ b/include/sys/fm/util.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_FM_UTIL_H #define _SPL_FM_UTIL_H diff --git a/include/sys/fs/swapnode.h b/include/sys/fs/swapnode.h index a5df1298d..dd18f3343 100644 --- a/include/sys/fs/swapnode.h +++ b/include/sys/fs/swapnode.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SWAPNODE_H #define _SPL_SWAPNODE_H diff --git a/include/sys/idmap.h b/include/sys/idmap.h index 3618c655c..aad96439f 100644 --- a/include/sys/idmap.h +++ b/include/sys/idmap.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2010 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_IDMAP_H #define _SPL_IDMAP_H diff --git a/include/sys/int_limits.h b/include/sys/int_limits.h index 64f0a1102..d9e775973 100644 --- a/include/sys/int_limits.h +++ b/include/sys/int_limits.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_INT_LIMITS_H #define _SPL_INT_LIMITS_H diff --git a/include/sys/int_types.h b/include/sys/int_types.h index 582fded20..2345205ea 100644 --- a/include/sys/int_types.h +++ b/include/sys/int_types.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_INT_TYPES_H #define _SPL_INT_TYPES_H diff --git a/include/sys/inttypes.h b/include/sys/inttypes.h index 82e555cdd..98e25110e 100644 --- a/include/sys/inttypes.h +++ b/include/sys/inttypes.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_INTTYPES_H #define _SPL_INTTYPES_H diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 738795c70..6aa78e84c 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ISA_DEFS_H #define _SPL_ISA_DEFS_H diff --git a/include/sys/kidmap.h b/include/sys/kidmap.h index 3d67b51a8..21e5e8f99 100644 --- a/include/sys/kidmap.h +++ b/include/sys/kidmap.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_KIDMAP_H #define _SPL_KIDMAP_H diff --git a/include/sys/kobj.h b/include/sys/kobj.h index 334449a8e..d133091e1 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_KOBJ_H #define _SPL_KOBJ_H diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 7862ab0a3..85909fc1f 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_KSTAT_H #define _SPL_KSTAT_H diff --git a/include/sys/list.h b/include/sys/list.h index 563784ae4..319e1f890 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_LIST_H #define _SPL_LIST_H diff --git a/include/sys/mkdev.h b/include/sys/mkdev.h index d765b7374..e63d09f7c 100644 --- a/include/sys/mkdev.h +++ b/include/sys/mkdev.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MKDEV_H #define _SPL_MKDEV_H diff --git a/include/sys/mntent.h b/include/sys/mntent.h index 66fae87d4..4ca1b346a 100644 --- a/include/sys/mntent.h +++ b/include/sys/mntent.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MNTENT_H #define _SPL_MNTENT_H diff --git a/include/sys/modctl.h b/include/sys/modctl.h index 8d79e5312..f234c45ed 100644 --- a/include/sys/modctl.h +++ b/include/sys/modctl.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MODCTL_H #define _SPL_MODCTL_H diff --git a/include/sys/mode.h b/include/sys/mode.h index d09965e4a..a9cf0da59 100644 --- a/include/sys/mode.h +++ b/include/sys/mode.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MODE_H #define _SPL_MODE_H diff --git a/include/sys/mount.h b/include/sys/mount.h index ca1796d7d..17eb1af57 100644 --- a/include/sys/mount.h +++ b/include/sys/mount.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_MOUNT_H #define _SPL_MOUNT_H diff --git a/include/sys/note.h b/include/sys/note.h index 511756272..0c3386912 100644 --- a/include/sys/note.h +++ b/include/sys/note.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_NOTE_H #define _SPL_NOTE_H diff --git a/include/sys/open.h b/include/sys/open.h index e3ebd8c84..201bbeb56 100644 --- a/include/sys/open.h +++ b/include/sys/open.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_OPEN_H #define _SPL_OPEN_H diff --git a/include/sys/param.h b/include/sys/param.h index 5b5b5f550..2c9fcd8e9 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_PARAM_H #define _SPL_PARAM_H diff --git a/include/sys/pathname.h b/include/sys/pathname.h index 71ea441cb..2806ce38b 100644 --- a/include/sys/pathname.h +++ b/include/sys/pathname.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_PATHNAME_H #define _SPL_PATHNAME_H diff --git a/include/sys/policy.h b/include/sys/policy.h index 45e724bc5..6f40a0175 100644 --- a/include/sys/policy.h +++ b/include/sys/policy.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_POLICY_H #define _SPL_POLICY_H diff --git a/include/sys/pool.h b/include/sys/pool.h index bf6a0bb7d..9addd2c53 100644 --- a/include/sys/pool.h +++ b/include/sys/pool.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_POOL_H #define _SPL_POOL_H diff --git a/include/sys/priv_impl.h b/include/sys/priv_impl.h index f1507a89e..4d6640c8d 100644 --- a/include/sys/priv_impl.h +++ b/include/sys/priv_impl.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_PRIV_IMPL_H #define _SPL_PRIV_IMPL_H diff --git a/include/sys/proc.h b/include/sys/proc.h index dbaf4162f..5e2989610 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_PROC_H #define _SPL_PROC_H diff --git a/include/sys/processor.h b/include/sys/processor.h index 60b1a211b..de0395e5a 100644 --- a/include/sys/processor.h +++ b/include/sys/processor.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_PROCESSOR_H #define _SPL_PROCESSOR_H diff --git a/include/sys/pset.h b/include/sys/pset.h index 2723d310b..58841e77d 100644 --- a/include/sys/pset.h +++ b/include/sys/pset.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_PSET_H #define _SPL_PSET_H diff --git a/include/sys/random.h b/include/sys/random.h index 64f70ee52..a3f2933e1 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_RANDOM_H #define _SPL_RANDOM_H diff --git a/include/sys/refstr.h b/include/sys/refstr.h index 49a3417d1..7fe8a0360 100644 --- a/include/sys/refstr.h +++ b/include/sys/refstr.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_REFSTR_H #define _SPL_REFSTR_H diff --git a/include/sys/resource.h b/include/sys/resource.h index fe336555f..dfc6e28f4 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_RESOURCE_H #define _SPL_RESOURCE_H diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index ffb7b90b6..e806bdc9d 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_RWLOCK_H #define _SPL_RWLOCK_H diff --git a/include/sys/sdt.h b/include/sys/sdt.h index 287bfaa71..80fb4c32a 100644 --- a/include/sys/sdt.h +++ b/include/sys/sdt.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SDT_H #define _SPL_SDT_H diff --git a/include/sys/sid.h b/include/sys/sid.h index 8ee5d0727..c5988a6f9 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SID_H #define _SPL_SID_H diff --git a/include/sys/signal.h b/include/sys/signal.h index 77cc2d3c2..0c7236390 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SIGNAL_H #define _SPL_SIGNAL_H diff --git a/include/sys/stat.h b/include/sys/stat.h index cde7556a6..c6ee57ed7 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_STAT_H #define _SPL_STAT_H diff --git a/include/sys/stropts.h b/include/sys/stropts.h index 25c7ee18f..68c4a0d14 100644 --- a/include/sys/stropts.h +++ b/include/sys/stropts.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_STROPTS_H #define _SPL_STROPTS_H diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index c49b0c26c..74ca4228f 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SUNDDI_H #define _SPL_SUNDDI_H diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index ec8420231..0831904d6 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SUNLDI_H #define _SPL_SUNLDI_H diff --git a/include/sys/sysdc.h b/include/sys/sysdc.h index 14ab48aa6..a563c87af 100644 --- a/include/sys/sysdc.h +++ b/include/sys/sysdc.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SYSDC_H #define _SPL_SYSDC_H diff --git a/include/sys/sysevent.h b/include/sys/sysevent.h index 5a7ca41ce..78e582f3c 100644 --- a/include/sys/sysevent.h +++ b/include/sys/sysevent.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SYSEVENT_H #define _SPL_SYSEVENT_H diff --git a/include/sys/sysevent/eventdefs.h b/include/sys/sysevent/eventdefs.h index 592c78a64..f92cc4f82 100644 --- a/include/sys/sysevent/eventdefs.h +++ b/include/sys/sysevent/eventdefs.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SYSEVENT_EVENTDEFS_H #define _SPL_SYSEVENT_EVENTDEFS_H diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index a4a9f3e98..03468d7d0 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SYSMACROS_H #define _SPL_SYSMACROS_H diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index 5c0cc4663..bc5337fa5 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SYSTEMINFO_H #define _SPL_SYSTEMINFO_H diff --git a/include/sys/systm.h b/include/sys/systm.h index 3336fb357..cd49e14be 100644 --- a/include/sys/systm.h +++ b/include/sys/systm.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SYSTM_H #define _SPL_SYSTM_H diff --git a/include/sys/t_lock.h b/include/sys/t_lock.h index 6c159f933..f1de9616b 100644 --- a/include/sys/t_lock.h +++ b/include/sys/t_lock.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_T_LOCK_H #define _SPL_T_LOCK_H diff --git a/include/sys/thread.h b/include/sys/thread.h index 433a0761d..ae2188d84 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_THREAD_H #define _SPL_THREAD_H diff --git a/include/sys/time.h b/include/sys/time.h index ddda6dead..d6aaca913 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_TIME_H #define _SPL_TIME_H diff --git a/include/sys/timer.h b/include/sys/timer.h index 33d577e71..71190d287 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_TIMER_H #define _SPL_TIMER_H diff --git a/include/sys/tsd.h b/include/sys/tsd.h index 1894a8232..4ddaea444 100644 --- a/include/sys/tsd.h +++ b/include/sys/tsd.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2010 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_TSD_H #define _SPL_TSD_H diff --git a/include/sys/types.h b/include/sys/types.h index d718ca0fa..b5359c7e8 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_TYPES_H #define _SPL_TYPES_H diff --git a/include/sys/types32.h b/include/sys/types32.h index 6ee580f4e..1b05b2a47 100644 --- a/include/sys/types32.h +++ b/include/sys/types32.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_TYPES32_H #define _SPL_TYPES32_H diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h index 0a21c708c..f25cf1b2b 100644 --- a/include/sys/u8_textprep.h +++ b/include/sys/u8_textprep.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_U8_TEXTPREP_H #define _SPL_U8_TEXTPREP_H diff --git a/include/sys/uio.h b/include/sys/uio.h index 404c03774..b34741523 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Copyright (c) 2015 by Chunwei Chen. All rights reserved. @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_UIO_H #define _SPL_UIO_H diff --git a/include/sys/unistd.h b/include/sys/unistd.h index e1d93c61e..24eab763c 100644 --- a/include/sys/unistd.h +++ b/include/sys/unistd.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_UNISTD_H #define _SPL_UNISTD_H diff --git a/include/sys/user.h b/include/sys/user.h index 2b25dd33c..2dc3ed0c5 100644 --- a/include/sys/user.h +++ b/include/sys/user.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2015 Cluster Inc. * Produced at ClusterHQ Inc (cf, DISCLAIMER). * Written by Richard Yao . @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_USER_H #define _SPL_USER_H diff --git a/include/sys/va_list.h b/include/sys/va_list.h index 9fa173b58..4468d9e89 100644 --- a/include/sys/va_list.h +++ b/include/sys/va_list.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_VA_LIST_H #define _SPL_VA_LIST_H diff --git a/include/sys/varargs.h b/include/sys/varargs.h index bf360ff4d..b992e8430 100644 --- a/include/sys/varargs.h +++ b/include/sys/varargs.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_VARARGS_H #define _SPL_VARARGS_H diff --git a/include/sys/vfs.h b/include/sys/vfs.h index f01dc11cb..30fcfb476 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ZFS_H #define _SPL_ZFS_H diff --git a/include/sys/vfs_opreg.h b/include/sys/vfs_opreg.h index d3540c593..1d20997ed 100644 --- a/include/sys/vfs_opreg.h +++ b/include/sys/vfs_opreg.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_OPREG_H #define _SPL_OPREG_H diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 9d334fe0a..f048c318c 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_VMSYSTM_H #define _SPL_VMSYSTM_H diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 0b857d384..9fa769e03 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_VNODE_H #define _SPL_VNODE_H diff --git a/include/sys/zmod.h b/include/sys/zmod.h index 15b0bc8e7..d708c6612 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -50,7 +50,7 @@ * * Jean-loup Gailly * Mark Adler -\*****************************************************************************/ + */ #ifndef _SPL_ZMOD_H #define _SPL_ZMOD_H diff --git a/include/sys/zone.h b/include/sys/zone.h index 5a3c0869f..4ed2a836f 100644 --- a/include/sys/zone.h +++ b/include/sys/zone.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_ZONE_H #define _SPL_ZONE_H diff --git a/include/unistd.h b/include/unistd.h index e1d93c61e..24eab763c 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_UNISTD_H #define _SPL_UNISTD_H diff --git a/include/util/qsort.h b/include/util/qsort.h index e55c4f8cc..5dc0b446b 100644 --- a/include/util/qsort.h +++ b/include/util/qsort.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_QSORT_H #define _SPL_QSORT_H diff --git a/include/util/sscanf.h b/include/util/sscanf.h index 23f0b5db0..561918d65 100644 --- a/include/util/sscanf.h +++ b/include/util/sscanf.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_UTIL_SSCANF_H #define _SPL_UTIL_SSCANF_H diff --git a/include/vm/anon.h b/include/vm/anon.h index 9c9c23959..a09f47c9f 100644 --- a/include/vm/anon.h +++ b/include/vm/anon.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_VM_ANON_H #define _SPL_VM_ANON_H diff --git a/include/vm/pvn.h b/include/vm/pvn.h index f3b308137..df916e68f 100644 --- a/include/vm/pvn.h +++ b/include/vm/pvn.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_VM_PVN_H #define _SPL_VM_PVN_H diff --git a/include/vm/seg_kmem.h b/include/vm/seg_kmem.h index 17df7b961..64b9688bd 100644 --- a/include/vm/seg_kmem.h +++ b/include/vm/seg_kmem.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPL_SEG_KMEM_H #define _SPL_SEG_KMEM_H diff --git a/module/spl/spl-atomic.c b/module/spl/spl-atomic.c index c46252c10..4c48684ba 100644 --- a/module/spl/spl-atomic.c +++ b/module/spl/spl-atomic.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Atomic Implementation. -\*****************************************************************************/ + */ #include diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index 1d486c1f0..f4431db7f 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Credential Implementation. -\*****************************************************************************/ + */ #include diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 2f66b6e23..28c5258ef 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Error Implementation. -\*****************************************************************************/ + */ #include #include diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index f6782dae7..b5c9a9aef 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Generic Implementation. -\*****************************************************************************/ + */ #include #include diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index b79fcb828..6191163a8 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Kobj Implementation. -\*****************************************************************************/ + */ #include diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index ed5265311..4517824e7 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Kstat Implementation. -\*****************************************************************************/ + */ #include #include diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index a29d488d1..9e1e103db 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Mutex Implementation. -\*****************************************************************************/ + */ #include diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 05c1a5dbc..848eebffe 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Proc Implementation. -\*****************************************************************************/ + */ #include #include diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index d99ef4f92..e497775e6 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Reader/Writer Lock Implementation. -\*****************************************************************************/ + */ #include diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index b0f4d5715..92eba42ba 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Thread Implementation. -\*****************************************************************************/ + */ #include #include diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 346e63c0f..a54807db1 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) Vnode Implementation. -\*****************************************************************************/ + */ #include #include diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index 9405dc88d..04a337c2b 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (c) 2008-2010 Sun Microsystems, Inc. * Written by Ricardo Correia * @@ -19,7 +19,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting Layer (SPL) XDR Implementation. -\*****************************************************************************/ + */ #include #include diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 77c2a1dde..609bf5048 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -50,7 +50,7 @@ * * Jean-loup Gailly * Mark Adler -\*****************************************************************************/ + */ #include diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c index b8759e01f..8aaa0835d 100644 --- a/module/splat/splat-atomic.c +++ b/module/splat/splat-atomic.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Atomic Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c index 5a9b40f92..0804baf50 100644 --- a/module/splat/splat-condvar.c +++ b/module/splat/splat-condvar.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Condition Variable Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c index 5b07a1fe7..f13c0f752 100644 --- a/module/splat/splat-cred.c +++ b/module/splat/splat-cred.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Credential Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c index 8452f1363..cf6850100 100644 --- a/module/splat/splat-ctl.c +++ b/module/splat/splat-ctl.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -41,7 +41,7 @@ * splat command line tool can be used to display all available * subsystems and tests. It can also be used to run the full suite * of regression tests or particular tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c index b8f6edc65..e256c83f0 100644 --- a/module/splat/splat-generic.c +++ b/module/splat/splat-generic.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Generic Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h index 9ae6c1d0c..97c10acfd 100644 --- a/module/splat/splat-internal.h +++ b/module/splat/splat-internal.h @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . -\*****************************************************************************/ + */ #ifndef _SPLAT_INTERNAL_H #define _SPLAT_INTERNAL_H diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index d0649ad9a..282f42d77 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Kmem Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c index 6d78cb3e0..bd44de395 100644 --- a/module/splat/splat-kobj.c +++ b/module/splat/splat-kobj.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Kobj Tests. -\*****************************************************************************/ + */ #include #include "splat-internal.h" diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c index b5a1f142e..1565d74a3 100644 --- a/module/splat/splat-linux.c +++ b/module/splat/splat-linux.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2011 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Brian Behlendorf . @@ -21,7 +21,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Kernel Compatibility Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c index bfbaf23c7..8a5f3c937 100644 --- a/module/splat/splat-list.c +++ b/module/splat/splat-list.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) List Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 71291bbd4..202e6c0f6 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Mutex Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-random.c b/module/splat/splat-random.c index 670931a8c..2ddb823fc 100644 --- a/module/splat/splat-random.c +++ b/module/splat/splat-random.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Random Number Generator Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 5d3ffb195..562a5f047 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Read/Writer Lock Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index 6d22018fc..ff73e103a 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Task Queue Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index e99d69101..f2e6bf15e 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Thread Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c index 5b5ad62f6..a0e261956 100644 --- a/module/splat/splat-time.c +++ b/module/splat/splat-time.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Time Tests. -\*****************************************************************************/ + */ #include #include diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index ad69cf642..9b308975c 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Vnode Tests. -\*****************************************************************************/ + */ #include #include "splat-internal.h" diff --git a/module/splat/splat-zlib.c b/module/splat/splat-zlib.c index dc9211838..28e521c82 100644 --- a/module/splat/splat-zlib.c +++ b/module/splat/splat-zlib.c @@ -1,4 +1,4 @@ -/*****************************************************************************\ +/* * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -22,7 +22,7 @@ * with the SPL. If not, see . ***************************************************************************** * Solaris Porting LAyer Tests (SPLAT) Zlib Compression Tests. -\*****************************************************************************/ + */ #include #include From ce319db57b1662a21d60550e546592c96c3da7a1 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Thu, 5 Oct 2017 12:42:20 -0400 Subject: [PATCH 1040/1062] Make include/linux/ conform to ZFS style standard No semantic changes. Fix the following types of style issues: blank after preprocessor # #define followed by space instead of tab improper first line of block comment indent by spaces instead of tabs last line in file is blank missing blank after open comment missing space before left brace non-continuation indented 4 spaces spaces instead of tabs unparenthesized return expression Signed-off-by: Olaf Faaland --- include/linux/bitops_compat.h | 3 +-- include/linux/compiler_compat.h | 4 ++-- include/linux/delay_compat.h | 2 +- include/linux/file_compat.h | 31 +++++++++++++++---------------- include/linux/list_compat.h | 23 +++++++++++------------ include/linux/math64_compat.h | 4 ++-- include/linux/mm_compat.h | 2 +- include/linux/proc_compat.h | 2 +- include/linux/rwsem_compat.h | 17 +++++++++-------- include/linux/wait_compat.h | 10 +++++----- include/linux/zlib_compat.h | 6 +++--- 11 files changed, 51 insertions(+), 53 deletions(-) diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h index dc7ed8600..a62b628e8 100644 --- a/include/linux/bitops_compat.h +++ b/include/linux/bitops_compat.h @@ -23,9 +23,8 @@ */ #ifndef _SPL_BITOPS_COMPAT_H -#define _SPL_BITOPS_COMPAT_H +#define _SPL_BITOPS_COMPAT_H #include #endif /* _SPL_BITOPS_COMPAT_H */ - diff --git a/include/linux/compiler_compat.h b/include/linux/compiler_compat.h index 06268bf4c..696d79572 100644 --- a/include/linux/compiler_compat.h +++ b/include/linux/compiler_compat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_COMPILER_COMPAT_H -#define _SPL_COMPILER_COMPAT_H +#define _SPL_COMPILER_COMPAT_H #include @@ -41,7 +41,7 @@ * handlers, all running on the same CPU. */ /* Taken from 2.6.33.2 */ -# define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) +#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) #endif #endif /* _SPL_COMPILER_COMPAT_H */ diff --git a/include/linux/delay_compat.h b/include/linux/delay_compat.h index 0c91a24d6..c7a381100 100644 --- a/include/linux/delay_compat.h +++ b/include/linux/delay_compat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_DELAY_COMPAT_H -#define _SPL_DELAY_COMPAT_H +#define _SPL_DELAY_COMPAT_H #include #include diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 26299965b..7d61ba5f9 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_FILE_COMPAT_H -#define _SPL_FILE_COMPAT_H +#define _SPL_FILE_COMPAT_H #include #ifdef HAVE_FDTABLE_HEADER @@ -33,22 +33,22 @@ static inline struct file * spl_filp_open(const char *name, int flags, int mode, int *err) { - struct file *filp = NULL; - int rc; + struct file *filp = NULL; + int rc; - filp = filp_open(name, flags, mode); - if (IS_ERR(filp)) { - rc = PTR_ERR(filp); - if (err) - *err = rc; - filp = NULL; - } - return filp; + filp = filp_open(name, flags, mode); + if (IS_ERR(filp)) { + rc = PTR_ERR(filp); + if (err) + *err = rc; + filp = NULL; + } + return (filp); } -#define spl_filp_close(f) filp_close(f, NULL) -#define spl_filp_poff(f) (&(f)->f_pos) -#define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) +#define spl_filp_close(f) filp_close(f, NULL) +#define spl_filp_poff(f) (&(f)->f_pos) +#define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) static inline int spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) @@ -65,7 +65,7 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) error = fp->f_dentry->d_inode->i_op->fallocate( fp->f_dentry->d_inode, mode, offset, len); #endif /* HAVE_INODE_FALLOCATE */ -#endif /*HAVE_FILE_FALLOCATE */ +#endif /* HAVE_FILE_FALLOCATE */ return (error); } @@ -97,4 +97,3 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) #endif #endif /* SPL_FILE_COMPAT_H */ - diff --git a/include/linux/list_compat.h b/include/linux/list_compat.h index 63e455318..fece8ad34 100644 --- a/include/linux/list_compat.h +++ b/include/linux/list_compat.h @@ -23,29 +23,28 @@ */ #ifndef _SPL_LIST_COMPAT_H -#define _SPL_LIST_COMPAT_H +#define _SPL_LIST_COMPAT_H #include #ifndef list_for_each_entry_safe_reverse -/** +/* * list_for_each_entry_safe_reverse - * @pos: the type * to use as a loop cursor. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @member: the name of the list_struct within the struct. + * @pos: the type * to use as a loop cursor. + * @n: another type * to use as temporary storage + * @head: the head for your list. + * @member: the name of the list_struct within the struct. * * Iterate backwards over list of given type, safe against removal * of list entry. */ -#define list_for_each_entry_safe_reverse(pos, n, head, member) \ - for (pos = list_entry((head)->prev, typeof(*pos), member), \ - n = list_entry(pos->member.prev, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.prev, typeof(*n), member)) +#define list_for_each_entry_safe_reverse(pos, n, head, member) \ + for (pos = list_entry((head)->prev, typeof(*pos), member), \ + n = list_entry(pos->member.prev, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.prev, typeof(*n), member)) #endif /* list_for_each_entry_safe_reverse */ #endif /* SPL_LIST_COMPAT_H */ - diff --git a/include/linux/math64_compat.h b/include/linux/math64_compat.h index 83046a05f..e45015bea 100644 --- a/include/linux/math64_compat.h +++ b/include/linux/math64_compat.h @@ -23,10 +23,10 @@ */ #ifndef _SPL_MATH64_COMPAT_H -#define _SPL_MATH64_COMPAT_H +#define _SPL_MATH64_COMPAT_H #ifndef abs64 -#define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; }) +#define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; }) #endif #endif /* _SPL_MATH64_COMPAT_H */ diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h index 6c285bbbb..c10652efd 100644 --- a/include/linux/mm_compat.h +++ b/include/linux/mm_compat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_MM_COMPAT_H -#define _SPL_MM_COMPAT_H +#define _SPL_MM_COMPAT_H #include #include diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h index 3ec66afbc..91d914e10 100644 --- a/include/linux/proc_compat.h +++ b/include/linux/proc_compat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_PROC_COMPAT_H -#define _SPL_PROC_COMPAT_H +#define _SPL_PROC_COMPAT_H #include diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h index c2f22b060..7a0dcf8dc 100644 --- a/include/linux/rwsem_compat.h +++ b/include/linux/rwsem_compat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_RWSEM_COMPAT_H -#define _SPL_RWSEM_COMPAT_H +#define _SPL_RWSEM_COMPAT_H #include @@ -53,15 +53,16 @@ int rwsem_tryupgrade(struct rw_semaphore *rwsem); #if defined(RWSEM_SPINLOCK_IS_RAW) -#define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl) -#define spl_rwsem_unlock_irqrestore(lk, fl) raw_spin_unlock_irqrestore(lk, fl) -#define spl_rwsem_trylock_irqsave(lk, fl) raw_spin_trylock_irqsave(lk, fl) +#define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl) +#define spl_rwsem_unlock_irqrestore(lk, fl) \ + raw_spin_unlock_irqrestore(lk, fl) +#define spl_rwsem_trylock_irqsave(lk, fl) raw_spin_trylock_irqsave(lk, fl) #else -#define spl_rwsem_lock_irqsave(lk, fl) spin_lock_irqsave(lk, fl) -#define spl_rwsem_unlock_irqrestore(lk, fl) spin_unlock_irqrestore(lk, fl) -#define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl) +#define spl_rwsem_lock_irqsave(lk, fl) spin_lock_irqsave(lk, fl) +#define spl_rwsem_unlock_irqrestore(lk, fl) spin_unlock_irqrestore(lk, fl) +#define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl) #endif /* RWSEM_SPINLOCK_IS_RAW */ -#define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem) +#define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem) #endif /* _SPL_RWSEM_COMPAT_H */ diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h index dd0c9323b..10fe2d896 100644 --- a/include/linux/wait_compat.h +++ b/include/linux/wait_compat.h @@ -23,23 +23,23 @@ */ #ifndef _SPL_WAIT_COMPAT_H -#define _SPL_WAIT_COMPAT_H +#define _SPL_WAIT_COMPAT_H #include #include #ifndef HAVE_WAIT_ON_BIT_ACTION -# define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode) +#define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode) #else static inline int spl_bit_wait(void *word) { - schedule(); - return 0; + schedule(); + return (0); } -#define spl_wait_on_bit(word, bit, mode) \ +#define spl_wait_on_bit(word, bit, mode) \ wait_on_bit(word, bit, spl_bit_wait, mode) #endif /* HAVE_WAIT_ON_BIT_ACTION */ diff --git a/include/linux/zlib_compat.h b/include/linux/zlib_compat.h index d2fefd15a..3c14285d2 100644 --- a/include/linux/zlib_compat.h +++ b/include/linux/zlib_compat.h @@ -22,15 +22,15 @@ */ #ifndef _SPL_ZLIB_COMPAT_H -#define _SPL_ZLIB_COMPAT_H +#define _SPL_ZLIB_COMPAT_H #include #ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE -#define spl_zlib_deflate_workspacesize(wb, ml) \ +#define spl_zlib_deflate_workspacesize(wb, ml) \ zlib_deflate_workspacesize(wb, ml) #else -#define spl_zlib_deflate_workspacesize(wb, ml) \ +#define spl_zlib_deflate_workspacesize(wb, ml) \ zlib_deflate_workspacesize() #endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ From 0cefc9dbcd9de8a35c51e172edabf2f2ecf15f92 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 10 Oct 2017 08:59:17 -0700 Subject: [PATCH 1041/1062] Add parenthesis to btop and ptob macros Add missing parenthesis around btop and ptob macros to ensure operation ordering is preserved after expansion. Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Signed-off-by: Brian Behlendorf Closes #660 --- include/sys/param.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/param.h b/include/sys/param.h index 2c9fcd8e9..10bf96588 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -28,8 +28,8 @@ #include /* Pages to bytes and back */ -#define ptob(pages) (pages << PAGE_SHIFT) -#define btop(bytes) (bytes >> PAGE_SHIFT) +#define ptob(pages) ((pages) << PAGE_SHIFT) +#define btop(bytes) ((bytes) >> PAGE_SHIFT) #define MAXUID UINT32_MAX From 28920ea3346c1c905c5f727ea3e54297e6257568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?= =?UTF-8?q?=E3=82=B4=E3=83=B3=E3=83=91=29?= Date: Sun, 15 Oct 2017 15:58:12 -0400 Subject: [PATCH 1042/1062] Add DKMS package on Debian-based distributions * config/deb.am: Enable building DKMS packages for Debian * rpm/generic/spl-dkms.spec.in: Adjust spec to be Debian-compatible * Condition kernel-devel Requires to RPM distros * Ensure that --rpm_safe_upgrade isn't used on non-RPM distros * config/deb.am: Drop CONFIG_KERNEL and CONFIG_USER guards * Makefile.am: Add pkg-dkms target Reviewed-by: Brian Behlendorf Signed-off-by: Neal Gompa Closes #657 --- Makefile.am | 1 + config/deb.am | 14 +++++++++----- rpm/generic/spl-dkms.spec.in | 8 +++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4977448fd..05107cb19 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,5 +50,6 @@ etags: tags: ctags etags pkg: @DEFAULT_PACKAGE@ +pkg-dkms: @DEFAULT_PACKAGE@-dkms pkg-kmod: @DEFAULT_PACKAGE@-kmod pkg-utils: @DEFAULT_PACKAGE@-utils diff --git a/config/deb.am b/config/deb.am index a2bad0260..e05a175a4 100644 --- a/config/deb.am +++ b/config/deb.am @@ -29,23 +29,27 @@ deb-local: fi) deb-kmod: deb-local rpm-kmod -if CONFIG_KERNEL name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 -endif + +deb-dkms: deb-local rpm-dkms + name=${PACKAGE}; \ + version=${VERSION}-${RELEASE}; \ + arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \ + pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + $(RM) $$pkg1 deb-utils: deb-local rpm-utils -if CONFIG_USER name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 -endif -deb: deb-kmod deb-utils +deb: deb-kmod deb-dkms deb-utils diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index ac0ddd369..419624058 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -1,5 +1,9 @@ %{?!packager: %define packager Brian Behlendorf } +%if ! 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version} +%define not_rpm 1 +%endif + %define module @PACKAGE@ %define mkconf scripts/dkms.mkconf @@ -18,7 +22,9 @@ BuildArch: noarch Requires: dkms >= 2.2.0.2 Requires: gcc, make, perl +%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version} Requires: kernel-devel +%endif Provides: %{module}-kmod = %{version} %description @@ -69,7 +75,7 @@ DKMS_META_ALIAS=`cat $CONFIG_H 2>/dev/null | if [ "$SPEC_META_ALIAS" = "$DKMS_META_ALIAS" ]; then echo -e echo -e "Uninstall of %{module} module ($SPEC_META_ALIAS) beginning:" - dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade + dkms remove -m %{module} -v %{version} --all %{!?not_rpm:--rpm_safe_upgrade} fi exit 0 From 8fc533725f378d992b683a19cbed1ce513962fcf Mon Sep 17 00:00:00 2001 From: abraunegg Date: Sat, 28 Oct 2017 09:46:34 +1100 Subject: [PATCH 1043/1062] Update spl module parameters man5 with missing parameter details Update spl module parameters man5 with the following missing parameter details for spl_panic_halt. Reviewed-by: Brian Behlendorf Signed-off-by: Alex Braunegg Closes #664 --- man/man5/spl-module-parameters.5 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index e15114445..30d9fc754 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -2,7 +2,7 @@ .\" .\" Copyright 2013 Turbo Fredriksson . All rights reserved. .\" -.TH SPL-MODULE-PARAMETERS 5 "Nov 18, 2013" +.TH SPL-MODULE-PARAMETERS 5 "Oct 28, 2017" .SH NAME spl\-module\-parameters \- SPL module parameters .SH DESCRIPTION @@ -250,6 +250,20 @@ may be overridden for non-standard configurations. Default value: \fB/etc/hostid\fR .RE +.sp +.ne 2 +.na +\fBspl_panic_halt\fR (uint) +.ad +.RS 12n +Cause a kernel panic on assertion failures. When not enabled, the thread is +halted to facilitate further debugging. +.sp +Set to a non-zero value to enable. +.sp +Default value: \fB0\fR +.RE + .sp .ne 2 .na From 8be368899918e2786f2fed84dc746de1894b06c1 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 27 Oct 2017 15:49:14 -0700 Subject: [PATCH 1044/1062] Remove vn_rename and vn_remove Both vn_rename and vn_remove have been historically problematic to implement reliably. Rather than fixing them yet again they are being removed. Reviewed-by: Arkadiusz Bubala Signed-off-by: Brian Behlendorf Closes #648 Closes #661 --- config/spl-build.m4 | 101 ----------------- include/sys/vnode.h | 2 - module/spl/spl-vnode.c | 217 ------------------------------------- module/splat/splat-vnode.c | 96 ---------------- 4 files changed, 416 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index b2a50bf16..8e9dc99ff 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -27,8 +27,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_CONFIG_TRIM_UNUSED_KSYMS SPL_AC_PDE_DATA SPL_AC_SET_FS_PWD_WITH_CONST - SPL_AC_2ARGS_VFS_UNLINK - SPL_AC_4ARGS_VFS_RENAME SPL_AC_2ARGS_VFS_FSYNC SPL_AC_INODE_TRUNCATE_RANGE SPL_AC_FS_STRUCT_SPINLOCK @@ -933,105 +931,6 @@ AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], EXTRA_KCFLAGS="$tmp_flags" ]) -dnl # -dnl # 3.13 API change -dnl # vfs_unlink() updated to take a third delegated_inode argument. -dnl # -AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK], - [AC_MSG_CHECKING([whether vfs_unlink() wants 2 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_unlink((struct inode *) NULL, (struct dentry *) NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_VFS_UNLINK, 1, - [vfs_unlink() wants 2 args]) - ],[ - AC_MSG_RESULT(no) - dnl # - dnl # Linux 3.13 API change - dnl # Added delegated inode - dnl # - AC_MSG_CHECKING([whether vfs_unlink() wants 3 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_unlink((struct inode *) NULL, - (struct dentry *) NULL, - (struct inode **) NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_VFS_UNLINK, 1, - [vfs_unlink() wants 3 args]) - ],[ - AC_MSG_ERROR(no) - ]) - - ]) -]) - -dnl # -dnl # 3.13 and 3.15 API changes -dnl # Added delegated inode and flags argument. -dnl # -AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME], - [AC_MSG_CHECKING([whether vfs_rename() wants 4 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_rename((struct inode *) NULL, (struct dentry *) NULL, - (struct inode *) NULL, (struct dentry *) NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_4ARGS_VFS_RENAME, 1, - [vfs_rename() wants 4 args]) - ],[ - AC_MSG_RESULT(no) - dnl # - dnl # Linux 3.13 API change - dnl # Added delegated inode - dnl # - AC_MSG_CHECKING([whether vfs_rename() wants 5 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_rename((struct inode *) NULL, - (struct dentry *) NULL, - (struct inode *) NULL, - (struct dentry *) NULL, - (struct inode **) NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_5ARGS_VFS_RENAME, 1, - [vfs_rename() wants 5 args]) - ],[ - AC_MSG_RESULT(no) - dnl # - dnl # Linux 3.15 API change - dnl # Added flags - dnl # - AC_MSG_CHECKING([whether vfs_rename() wants 6 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_rename((struct inode *) NULL, - (struct dentry *) NULL, - (struct inode *) NULL, - (struct dentry *) NULL, - (struct inode **) NULL, - (unsigned int) 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_6ARGS_VFS_RENAME, 1, - [vfs_rename() wants 6 args]) - ],[ - AC_MSG_ERROR(no) - ]) - ]) - ]) -]) - dnl # dnl # 2.6.36 API change, dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 9fa769e03..9ae48c7f0 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -177,8 +177,6 @@ extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4); extern int vn_seek(vnode_t *vp, offset_t o, offset_t *op, void *ct); -extern int vn_remove(const char *path, uio_seg_t seg, int flags); -extern int vn_rename(const char *path1, const char *path2, int x1); extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4); extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4); extern int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a54807db1..38f64a478 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -282,223 +282,6 @@ vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct) } EXPORT_SYMBOL(vn_seek); -/* - * spl_basename() takes a NULL-terminated string s as input containing a path. - * It returns a char pointer to a string and a length that describe the - * basename of the path. If the basename is not "." or "/", it will be an index - * into the string. While the string should be NULL terminated, the section - * referring to the basename is not. spl_basename is dual-licensed GPLv2+ and - * CC0. Anyone wishing to reuse it in another codebase may pick either license. - */ -static void -spl_basename(const char *s, const char **str, int *len) -{ - size_t i, end; - - ASSERT(str); - ASSERT(len); - - if (!s || !*s) { - *str = "."; - *len = 1; - return; - } - - i = strlen(s) - 1; - - while (i && s[i--] == '/'); - - if (i == 0) { - *str = "/"; - *len = 1; - return; - } - - end = i; - - for (end = i; i; i--) { - if (s[i] == '/') { - *str = &s[i+1]; - *len = end - i + 1; - return; - } - } - - *str = s; - *len = end + 1; -} - -static struct dentry * -spl_kern_path_locked(const char *name, struct path *path) -{ - struct path parent; - struct dentry *dentry; - const char *basename; - int len; - int rc; - - ASSERT(name); - ASSERT(path); - - spl_basename(name, &basename, &len); - - /* We do not accept "." or ".." */ - if (len <= 2 && basename[0] == '.') - if (len == 1 || basename[1] == '.') - return (ERR_PTR(-EACCES)); - - rc = kern_path(name, LOOKUP_PARENT, &parent); - if (rc) - return (ERR_PTR(rc)); - - /* use I_MUTEX_PARENT because vfs_unlink needs it */ - spl_inode_lock_nested(parent.dentry->d_inode, I_MUTEX_PARENT); - - dentry = lookup_one_len(basename, parent.dentry, len); - if (IS_ERR(dentry)) { - spl_inode_unlock(parent.dentry->d_inode); - path_put(&parent); - } else { - *path = parent; - } - - return (dentry); -} - -/* Based on do_unlinkat() from linux/fs/namei.c */ -int -vn_remove(const char *path, uio_seg_t seg, int flags) -{ - struct dentry *dentry; - struct path parent; - struct inode *inode = NULL; - int rc = 0; - - ASSERT(seg == UIO_SYSSPACE); - ASSERT(flags == RMFILE); - - dentry = spl_kern_path_locked(path, &parent); - rc = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { - if (parent.dentry->d_name.name[parent.dentry->d_name.len]) { - rc = 0; - goto slashes; - } - - inode = dentry->d_inode; - if (inode) { - atomic_inc(&inode->i_count); - } else { - rc = 0; - goto slashes; - } - -#ifdef HAVE_2ARGS_VFS_UNLINK - rc = vfs_unlink(parent.dentry->d_inode, dentry); -#else - rc = vfs_unlink(parent.dentry->d_inode, dentry, NULL); -#endif /* HAVE_2ARGS_VFS_UNLINK */ -exit1: - dput(dentry); - } else { - return (-rc); - } - - spl_inode_unlock(parent.dentry->d_inode); - if (inode) - iput(inode); /* truncate the inode here */ - - path_put(&parent); - return (-rc); - -slashes: - rc = !dentry->d_inode ? -ENOENT : - S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR; - goto exit1; -} /* vn_remove() */ -EXPORT_SYMBOL(vn_remove); - -/* Based on do_rename() from linux/fs/namei.c */ -int -vn_rename(const char *oldname, const char *newname, int x1) -{ - struct dentry *old_dir, *new_dir; - struct dentry *old_dentry, *new_dentry; - struct dentry *trap; - struct path old_parent, new_parent; - int rc = 0; - - old_dentry = spl_kern_path_locked(oldname, &old_parent); - if (IS_ERR(old_dentry)) { - rc = PTR_ERR(old_dentry); - goto exit; - } - - spl_inode_unlock(old_parent.dentry->d_inode); - - new_dentry = spl_kern_path_locked(newname, &new_parent); - if (IS_ERR(new_dentry)) { - rc = PTR_ERR(new_dentry); - goto exit2; - } - - spl_inode_unlock(new_parent.dentry->d_inode); - - rc = -EXDEV; - if (old_parent.mnt != new_parent.mnt) - goto exit3; - - old_dir = old_parent.dentry; - new_dir = new_parent.dentry; - trap = lock_rename(new_dir, old_dir); - - /* source should not be ancestor of target */ - rc = -EINVAL; - if (old_dentry == trap) - goto exit4; - - /* target should not be an ancestor of source */ - rc = -ENOTEMPTY; - if (new_dentry == trap) - goto exit4; - - /* source must exist */ - rc = -ENOENT; - if (!old_dentry->d_inode) - goto exit4; - - /* unless the source is a directory trailing slashes give -ENOTDIR */ - if (!S_ISDIR(old_dentry->d_inode->i_mode)) { - rc = -ENOTDIR; - if (old_dentry->d_name.name[old_dentry->d_name.len]) - goto exit4; - if (new_dentry->d_name.name[new_dentry->d_name.len]) - goto exit4; - } - -#if defined(HAVE_4ARGS_VFS_RENAME) - rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry); -#elif defined(HAVE_5ARGS_VFS_RENAME) - rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry, NULL); -#else - rc = vfs_rename(old_dir->d_inode, old_dentry, - new_dir->d_inode, new_dentry, NULL, 0); -#endif -exit4: - unlock_rename(new_dir, old_dir); -exit3: - dput(new_dentry); - path_put(&new_parent); -exit2: - dput(old_dentry); - path_put(&old_parent); -exit: - return (-rc); -} -EXPORT_SYMBOL(vn_rename); - int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) { diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c index 9b308975c..4ccf24f1e 100644 --- a/module/splat/splat-vnode.c +++ b/module/splat/splat-vnode.c @@ -42,10 +42,6 @@ #define SPLAT_VNODE_TEST3_NAME "vn_rdwr" #define SPLAT_VNODE_TEST3_DESC "Vn_rdwrt Test" -#define SPLAT_VNODE_TEST4_ID 0x0904 -#define SPLAT_VNODE_TEST4_NAME "vn_rename" -#define SPLAT_VNODE_TEST4_DESC "Vn_rename Test" - #define SPLAT_VNODE_TEST5_ID 0x0905 #define SPLAT_VNODE_TEST5_NAME "vn_getattr" #define SPLAT_VNODE_TEST5_DESC "Vn_getattr Test" @@ -218,94 +214,10 @@ splat_vnode_test3(struct file *file, void *arg) out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); - vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); return -rc; } /* splat_vnode_test3() */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) -static int -splat_vnode_test4(struct file *file, void *arg) -{ - vnode_t *vp; - char buf1[32] = "SPL VNode Interface Test File\n"; - char buf2[32] = ""; - int rc; - - if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST4_NAME))) - return rc; - - if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, - FWRITE | FREAD | FCREAT | FEXCL, 0644, &vp, 0, 0))) { - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, - "Failed to vn_open test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW1, rc); - goto out; - } - - rc = vn_rdwr(UIO_WRITE, vp, buf1, strlen(buf1), 0, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, - "Failed vn_rdwr write of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW1, rc); - goto out2; - } - - VOP_CLOSE(vp, 0, 0, 0, 0, 0); - - rc = vn_rename(SPLAT_VNODE_TEST_FILE_RW1,SPLAT_VNODE_TEST_FILE_RW2,0); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Failed vn_rename " - "%s -> %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW1, - SPLAT_VNODE_TEST_FILE_RW2, rc); - goto out; - } - - if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE, - FREAD | FEXCL, 0644, &vp, 0, 0))) { - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, - "Failed to vn_open test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW2, rc); - goto out; - } - - rc = vn_rdwr(UIO_READ, vp, buf2, strlen(buf1), 0, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, - "Failed vn_rdwr read of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW2, rc); - goto out2; - } - - if (strncmp(buf1, buf2, strlen(buf1))) { - rc = EINVAL; - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, - "Failed strncmp data written does not match " - "data read\nWrote: %sRead: %s\n", buf1, buf2); - goto out2; - } - - rc = 0; - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Wrote to %s: %s", - SPLAT_VNODE_TEST_FILE_RW1, buf1); - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Read from %s: %s", - SPLAT_VNODE_TEST_FILE_RW2, buf2); - splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Successfully renamed " - "test file %s -> %s and verified data pattern\n", - SPLAT_VNODE_TEST_FILE_RW1, SPLAT_VNODE_TEST_FILE_RW2); -out2: - VOP_CLOSE(vp, 0, 0, 0, 0, 0); -out: - vn_remove(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, RMFILE); - vn_remove(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE, RMFILE); - - return -rc; -} /* splat_vnode_test4() */ -#endif - static int splat_vnode_test5(struct file *file, void *arg) { @@ -387,7 +299,6 @@ splat_vnode_test6(struct file *file, void *arg) "fsync'ed test file %s\n", SPLAT_VNODE_TEST_FILE_RW); out: VOP_CLOSE(vp, 0, 0, 0, 0, 0); - vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE); return -rc; } /* splat_vnode_test6() */ @@ -415,10 +326,6 @@ splat_vnode_init(void) SPLAT_VNODE_TEST2_ID, splat_vnode_test2); splat_test_init(sub, SPLAT_VNODE_TEST3_NAME, SPLAT_VNODE_TEST3_DESC, SPLAT_VNODE_TEST3_ID, splat_vnode_test3); -#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) - splat_test_init(sub, SPLAT_VNODE_TEST4_NAME, SPLAT_VNODE_TEST4_DESC, - SPLAT_VNODE_TEST4_ID, splat_vnode_test4); -#endif splat_test_init(sub, SPLAT_VNODE_TEST5_NAME, SPLAT_VNODE_TEST5_DESC, SPLAT_VNODE_TEST5_ID, splat_vnode_test5); splat_test_init(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, @@ -434,9 +341,6 @@ splat_vnode_fini(splat_subsystem_t *sub) splat_test_fini(sub, SPLAT_VNODE_TEST6_ID); splat_test_fini(sub, SPLAT_VNODE_TEST5_ID); -#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0) - splat_test_fini(sub, SPLAT_VNODE_TEST4_ID); -#endif splat_test_fini(sub, SPLAT_VNODE_TEST3_ID); splat_test_fini(sub, SPLAT_VNODE_TEST2_ID); splat_test_fini(sub, SPLAT_VNODE_TEST1_ID); From 35a44fcb8d6e346f51be82dfe57562c2ea0c6a9c Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Mon, 30 Oct 2017 18:16:56 +0000 Subject: [PATCH 1045/1062] Remove all spin_is_locked calls On systems with CONFIG_SMP turned off, spin_is_locked always returns false causing these assertions to fail. Remove them as suggested in zfsonlinux/zfs#6558. Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: James Cowgill Closes #665 --- module/spl/spl-kmem-cache.c | 4 ---- module/spl/spl-taskq.c | 13 ------------- module/spl/spl-tsd.c | 1 - module/spl/spl-vnode.c | 2 -- 4 files changed, 20 deletions(-) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 45576b976..36686692b 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -382,7 +382,6 @@ spl_slab_free(spl_kmem_slab_t *sks, skc = sks->sks_cache; ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); /* * Update slab/objects counters in the cache, then remove the @@ -583,7 +582,6 @@ __spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(skm->skm_magic == SKM_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); for (i = 0; i < count; i++) spl_cache_shrink(skc, skm->skm_objs[i]); @@ -1125,7 +1123,6 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks) ASSERT(skc->skc_magic == SKC_MAGIC); ASSERT(sks->sks_magic == SKS_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); sko = list_entry(sks->sks_free_list.next, spl_kmem_obj_t, sko_list); ASSERT(sko->sko_magic == SKO_MAGIC); @@ -1396,7 +1393,6 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj) spl_kmem_obj_t *sko = NULL; ASSERT(skc->skc_magic == SKC_MAGIC); - ASSERT(spin_is_locked(&skc->skc_lock)); sko = spl_sko_from_obj(skc, obj); ASSERT(sko->sko_magic == SKO_MAGIC); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 7cad9f76b..50f6f520f 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -103,7 +103,6 @@ task_alloc(taskq_t *tq, uint_t flags, unsigned long *irqflags) int count = 0; ASSERT(tq); - ASSERT(spin_is_locked(&tq->tq_lock)); retry: /* Acquire taskq_ent_t's from free list if available */ if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) { @@ -168,7 +167,6 @@ task_free(taskq_t *tq, taskq_ent_t *t) { ASSERT(tq); ASSERT(t); - ASSERT(spin_is_locked(&tq->tq_lock)); ASSERT(list_empty(&t->tqent_list)); ASSERT(!timer_pending(&t->tqent_timer)); @@ -185,7 +183,6 @@ task_done(taskq_t *tq, taskq_ent_t *t) { ASSERT(tq); ASSERT(t); - ASSERT(spin_is_locked(&tq->tq_lock)); /* Wake tasks blocked in taskq_wait_id() */ wake_up_all(&t->tqent_waitq); @@ -259,7 +256,6 @@ taskq_lowest_id(taskq_t *tq) taskq_thread_t *tqt; ASSERT(tq); - ASSERT(spin_is_locked(&tq->tq_lock)); if (!list_empty(&tq->tq_pend_list)) { t = list_entry(tq->tq_pend_list.next, taskq_ent_t, tqent_list); @@ -297,7 +293,6 @@ taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt) ASSERT(tq); ASSERT(tqt); - ASSERT(spin_is_locked(&tq->tq_lock)); list_for_each_prev(l, &tq->tq_active_list) { w = list_entry(l, taskq_thread_t, tqt_active_list); @@ -320,8 +315,6 @@ taskq_find_list(taskq_t *tq, struct list_head *lh, taskqid_t id) struct list_head *l; taskq_ent_t *t; - ASSERT(spin_is_locked(&tq->tq_lock)); - list_for_each(l, lh) { t = list_entry(l, taskq_ent_t, tqent_list); @@ -348,8 +341,6 @@ taskq_find(taskq_t *tq, taskqid_t id) struct list_head *l; taskq_ent_t *t; - ASSERT(spin_is_locked(&tq->tq_lock)); - t = taskq_find_list(tq, &tq->tq_delay_list, id); if (t) return (t); @@ -751,8 +742,6 @@ taskq_next_ent(taskq_t *tq) { struct list_head *list; - ASSERT(spin_is_locked(&tq->tq_lock)); - if (!list_empty(&tq->tq_prio_list)) list = &tq->tq_prio_list; else if (!list_empty(&tq->tq_pend_list)) @@ -817,8 +806,6 @@ taskq_thread_spawn(taskq_t *tq) static int taskq_thread_should_stop(taskq_t *tq, taskq_thread_t *tqt) { - ASSERT(spin_is_locked(&tq->tq_lock)); - if (!(tq->tq_flags & TASKQ_DYNAMIC)) return (0); diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c index bf8235063..4c800292a 100644 --- a/module/spl/spl-tsd.c +++ b/module/spl/spl-tsd.c @@ -315,7 +315,6 @@ tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid) static void tsd_hash_del(tsd_hash_table_t *table, tsd_hash_entry_t *entry) { - ASSERT(spin_is_locked(&table->ht_lock)); hlist_del(&entry->he_list); list_del_init(&entry->he_key_list); list_del_init(&entry->he_pid_list); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 38f64a478..0e4c386a3 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -427,8 +427,6 @@ file_find(int fd, struct task_struct *task) { file_t *fp; - ASSERT(spin_is_locked(&vn_file_lock)); - list_for_each_entry(fp, &vn_file_list, f_list) { if (fd == fp->f_fd && fp->f_task == task) { ASSERT(atomic_read(&fp->f_ref) != 0); From ed19bccfb651843fa208232b3a2d3d22a4152bc8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 15 Nov 2017 17:19:23 -0800 Subject: [PATCH 1046/1062] Linux 4.14 compat: vfs_read & vfs_write The kernel_read & kernel_write functions have always wrapped the vfs_read & vfs_write functions respectively. However, they could not be used by vn_rdwr() since the offset wasn't passed as a pointer. This prevented us from being able to properly update the file offset. Linux 4.14 unexported vfs_read & vfs_write but also changed the signature of kernel_read & kernel_write to provide the needed functionality. Use these updated functions when available. Reviewed-by: Pritam Baral Signed-off-by: Brian Behlendorf Closes #656 Closes #667 --- config/spl-build.m4 | 60 +++++++++++++++++++++++++++++++++++++ include/linux/file_compat.h | 41 +++++++++++++++++++++++++ module/spl/spl-vnode.c | 21 +++---------- 3 files changed, 105 insertions(+), 17 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 8e9dc99ff..7b66f2c86 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -52,6 +52,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KMEM_CACHE_CREATE_USERCOPY SPL_AC_WAIT_QUEUE_ENTRY_T SPL_AC_WAIT_QUEUE_HEAD_ENTRY + SPL_AC_KERNEL_WRITE + SPL_AC_KERNEL_READ ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1594,3 +1596,61 @@ AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 4.14 API change +dnl # kernel_write() which was introduced in 3.9 was updated to take +dnl # the offset as a pointer which is needed by vn_rdwr(). +dnl # +AC_DEFUN([SPL_AC_KERNEL_WRITE], [ + AC_MSG_CHECKING([whether kernel_write() takes loff_t pointer]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct file *file = NULL; + const void *buf = NULL; + size_t count = 0; + loff_t *pos = NULL; + ssize_t ret; + + ret = kernel_write(file, buf, count, pos); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_WRITE_PPOS, 1, + [kernel_write() take loff_t pointer]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + +dnl # +dnl # 4.14 API change +dnl # kernel_read() which has existed for forever was updated to take +dnl # the offset as a pointer which is needed by vn_rdwr(). +dnl # +AC_DEFUN([SPL_AC_KERNEL_READ], [ + AC_MSG_CHECKING([whether kernel_read() takes loff_t pointer]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct file *file = NULL; + void *buf = NULL; + size_t count = 0; + loff_t *pos = NULL; + ssize_t ret; + + ret = kernel_read(file, buf, count, pos); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_READ_PPOS, 1, + [kernel_read() take loff_t pointer]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 7d61ba5f9..55ba2cc76 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -26,6 +26,7 @@ #define _SPL_FILE_COMPAT_H #include +#include #ifdef HAVE_FDTABLE_HEADER #include #endif @@ -70,6 +71,46 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) return (error); } +static inline ssize_t +spl_kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos) +{ +#if defined(HAVE_KERNEL_WRITE_PPOS) + return (kernel_write(file, buf, count, pos)); +#else + mm_segment_t saved_fs; + ssize_t ret; + + saved_fs = get_fs(); + set_fs(get_ds()); + + ret = vfs_write(file, (__force const char __user *)buf, count, pos); + + set_fs(saved_fs); + + return (ret); +#endif +} + +static inline ssize_t +spl_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) +{ +#if defined(HAVE_KERNEL_READ_PPOS) + return (kernel_read(file, buf, count, pos)); +#else + mm_segment_t saved_fs; + ssize_t ret; + + saved_fs = get_fs(); + set_fs(get_ds()); + + ret = vfs_read(file, (void __user *)buf, count, pos); + + set_fs(saved_fs); + + return (ret); +#endif +} + #ifdef HAVE_2ARGS_VFS_FSYNC #define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync) #else diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 0e4c386a3..19b3b76cd 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -211,35 +211,22 @@ int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, uio_seg_t seg, int ioflag, rlim64_t x2, void *x3, ssize_t *residp) { - loff_t offset; - mm_segment_t saved_fs; - struct file *fp; + struct file *fp = vp->v_file; + loff_t offset = off; int rc; ASSERT(uio == UIO_WRITE || uio == UIO_READ); - ASSERT(vp); - ASSERT(vp->v_file); ASSERT(seg == UIO_SYSSPACE); ASSERT((ioflag & ~FAPPEND) == 0); - fp = vp->v_file; - - offset = off; if (ioflag & FAPPEND) offset = fp->f_pos; - /* Writable user data segment must be briefly increased for this - * process so we can use the user space read call paths to write - * in to memory allocated by the kernel. */ - saved_fs = get_fs(); - set_fs(get_ds()); - if (uio & UIO_WRITE) - rc = vfs_write(fp, addr, len, &offset); + rc = spl_kernel_write(fp, addr, len, &offset); else - rc = vfs_read(fp, addr, len, &offset); + rc = spl_kernel_read(fp, addr, len, &offset); - set_fs(saved_fs); fp->f_pos = offset; if (rc < 0) From c9821f1ccc647dfbd506f381b736c664d862d126 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Thu, 21 Dec 2017 10:56:32 -0800 Subject: [PATCH 1047/1062] Linux 4.15 compat: timer updates Use timer_setup() macro and new timeout function definition. Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes #670 Closes #671 --- config/spl-build.m4 | 34 ++++++++++++++++++++++++++++++++++ module/spl/spl-taskq.c | 27 +++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7b66f2c86..926abd5c8 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -54,6 +54,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_WAIT_QUEUE_HEAD_ENTRY SPL_AC_KERNEL_WRITE SPL_AC_KERNEL_READ + SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1654,3 +1655,36 @@ AC_DEFUN([SPL_AC_KERNEL_READ], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # 4.15 API change +dnl # https://lkml.org/lkml/2017/11/25/90 +dnl # Check if timer_list.func get passed a timer_list or an unsigned long +dnl # (older kernels). Also sanity check the from_timer() and timer_setup() +dnl # macros are available as well, since they will be used in the same newer +dnl # kernels that support the new timer_list.func signature. +dnl # +AC_DEFUN([SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST], [ + AC_MSG_CHECKING([whether timer_list.function gets a timer_list]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + void task_expire(struct timer_list *tl) {} + ],[ + #ifndef from_timer + #error "No from_timer() macro" + #endif + + struct timer_list timer; + timer.function = task_expire; + timer_setup(&timer, NULL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST, 1, + [timer_list.function gets a timer_list]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 50f6f520f..ae26bdb2e 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -206,9 +206,9 @@ task_done(taskq_t *tq, taskq_ent_t *t) * add it to the priority list in order for immediate processing. */ static void -task_expire(unsigned long data) +task_expire_impl(taskq_ent_t *t) { - taskq_ent_t *w, *t = (taskq_ent_t *)data; + taskq_ent_t *w; taskq_t *tq = t->tqent_taskq; struct list_head *l; unsigned long flags; @@ -242,6 +242,21 @@ task_expire(unsigned long data) wake_up(&tq->tq_work_waitq); } +#ifdef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST +static void +task_expire(struct timer_list *tl) +{ + taskq_ent_t *t = from_timer(t, tl, tqent_timer); + task_expire_impl(t); +} +#else +static void +task_expire(unsigned long data) +{ + task_expire_impl((taskq_ent_t *)data); +} +#endif + /* * Returns the lowest incomplete taskqid_t. The taskqid_t may * be queued on the pending list, on the priority list, on the @@ -581,7 +596,9 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) t->tqent_func = func; t->tqent_arg = arg; t->tqent_taskq = tq; +#ifndef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST t->tqent_timer.data = 0; +#endif t->tqent_timer.function = NULL; t->tqent_timer.expires = 0; t->tqent_birth = jiffies; @@ -631,7 +648,9 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, t->tqent_func = func; t->tqent_arg = arg; t->tqent_taskq = tq; +#ifndef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST t->tqent_timer.data = (unsigned long)t; +#endif t->tqent_timer.function = task_expire; t->tqent_timer.expires = (unsigned long)expire_time; add_timer(&t->tqent_timer); @@ -723,7 +742,11 @@ taskq_init_ent(taskq_ent_t *t) { spin_lock_init(&t->tqent_lock); init_waitqueue_head(&t->tqent_waitq); +#ifdef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST + timer_setup(&t->tqent_timer, NULL, 0); +#else init_timer(&t->tqent_timer); +#endif INIT_LIST_HEAD(&t->tqent_list); t->tqent_id = 0; t->tqent_func = NULL; From fb79036f288ea60b59d21fe250bc17445cf69f37 Mon Sep 17 00:00:00 2001 From: LOLi Date: Thu, 18 Jan 2018 19:14:18 +0100 Subject: [PATCH 1048/1062] Fix Debian packaging on ARMv7/ARM64 When building packages on Debian-based systems specify the target architecture used by 'alien' to convert .rpm packages into .deb: this avoids detecting an incorrect value which results in the following errors: .aarch64.rpm is for architecture aarch64 ; the package cannot be built on this system .armv7l.rpm is for architecture armel ; the package cannot be built on this system Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: loli10K Closes zfsonlinux/zfs#7046 Closes #678 --- config/deb.am | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/deb.am b/config/deb.am index e05a175a4..f745c9181 100644 --- a/config/deb.am +++ b/config/deb.am @@ -32,24 +32,27 @@ deb-kmod: deb-local rpm-kmod name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb-dkms: deb-local rpm-dkms name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb-utils: deb-local rpm-utils name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb: deb-kmod deb-dkms deb-utils From 23602fdb39e1254c669707ec9d2d0e6bcdbf1771 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 24 Jan 2018 11:33:47 -0800 Subject: [PATCH 1049/1062] Add cv_timedwait_io() Add missing helper function cv_timedwait_io(), it should be used when waiting on IO with a specified timeout. Reviewed-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #674 --- config/spl-build.m4 | 21 +++++++++++++++ include/sys/condvar.h | 2 ++ module/spl/spl-condvar.c | 58 ++++++++++++++++++++++++++++++++++------ 3 files changed, 73 insertions(+), 8 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 926abd5c8..afc8de65f 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -52,6 +52,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_KMEM_CACHE_CREATE_USERCOPY SPL_AC_WAIT_QUEUE_ENTRY_T SPL_AC_WAIT_QUEUE_HEAD_ENTRY + SPL_AC_IO_SCHEDULE_TIMEOUT SPL_AC_KERNEL_WRITE SPL_AC_KERNEL_READ SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST @@ -1598,6 +1599,26 @@ AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [ ]) ]) +dnl # +dnl # 3.19 API change +dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels +dnl # but it was not exported until Linux 3.19. The RHEL 7.x kernels which +dnl # are based on a 3.10 kernel do export this symbol. +dnl # +AC_DEFUN([SPL_AC_IO_SCHEDULE_TIMEOUT], [ + AC_MSG_CHECKING([whether io_schedule_timeout() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + (void) io_schedule_timeout(1); + ], [io_schedule_timeout], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 4.14 API change dnl # kernel_write() which was introduced in 3.9 was updated to take diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 5479e75ad..5fcc9068a 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -56,6 +56,7 @@ extern void __cv_wait(kcondvar_t *, kmutex_t *); extern void __cv_wait_io(kcondvar_t *, kmutex_t *); extern void __cv_wait_sig(kcondvar_t *, kmutex_t *); extern clock_t __cv_timedwait(kcondvar_t *, kmutex_t *, clock_t); +extern clock_t __cv_timedwait_io(kcondvar_t *, kmutex_t *, clock_t); extern clock_t __cv_timedwait_sig(kcondvar_t *, kmutex_t *, clock_t); extern clock_t cv_timedwait_hires(kcondvar_t *, kmutex_t *, hrtime_t, hrtime_t res, int flag); @@ -71,6 +72,7 @@ extern void __cv_broadcast(kcondvar_t *c); #define cv_wait_sig(cvp, mp) __cv_wait_sig(cvp, mp) #define cv_wait_interruptible(cvp, mp) cv_wait_sig(cvp, mp) #define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t) +#define cv_timedwait_io(cvp, mp, t) __cv_timedwait_io(cvp, mp, t) #define cv_timedwait_sig(cvp, mp, t) __cv_timedwait_sig(cvp, mp, t) #define cv_timedwait_interruptible(cvp, mp, t) cv_timedwait_sig(cvp, mp, t) #define cv_signal(cvp) __cv_signal(cvp) diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 80c2ef090..4778fb256 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -136,6 +136,13 @@ __cv_wait(kcondvar_t *cvp, kmutex_t *mp) } EXPORT_SYMBOL(__cv_wait); +void +__cv_wait_io(kcondvar_t *cvp, kmutex_t *mp) +{ + cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE, 1); +} +EXPORT_SYMBOL(__cv_wait_io); + void __cv_wait_sig(kcondvar_t *cvp, kmutex_t *mp) { @@ -143,12 +150,34 @@ __cv_wait_sig(kcondvar_t *cvp, kmutex_t *mp) } EXPORT_SYMBOL(__cv_wait_sig); -void -__cv_wait_io(kcondvar_t *cvp, kmutex_t *mp) +#if defined(HAVE_IO_SCHEDULE_TIMEOUT) +#define spl_io_schedule_timeout(t) io_schedule_timeout(t) +#else +static void +__cv_wakeup(unsigned long data) { - cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE, 1); + wake_up_process((struct task_struct *)data); } -EXPORT_SYMBOL(__cv_wait_io); + +static long +spl_io_schedule_timeout(long time_left) +{ + long expire_time = jiffies + time_left; + struct timer_list timer; + + init_timer(&timer); + setup_timer(&timer, __cv_wakeup, (unsigned long)current); + timer.expires = expire_time; + add_timer(&timer); + + io_schedule(); + + del_timer_sync(&timer); + time_left = expire_time - jiffies; + + return (time_left < 0 ? 0 : time_left); +} +#endif /* * 'expire_time' argument is an absolute wall clock time in jiffies. @@ -156,7 +185,7 @@ EXPORT_SYMBOL(__cv_wait_io); */ static clock_t __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, - int state) + int state, int io) { DEFINE_WAIT(wait); kmutex_t *m; @@ -188,7 +217,10 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, * race where 'cvp->cv_waiters > 0' but the list is empty. */ mutex_exit(mp); - time_left = schedule_timeout(time_left); + if (io) + time_left = spl_io_schedule_timeout(time_left); + else + time_left = schedule_timeout(time_left); /* No more waiters a different mutex could be used */ if (atomic_dec_and_test(&cvp->cv_waiters)) { @@ -214,14 +246,24 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time, clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) { - return (__cv_timedwait_common(cvp, mp, exp_time, TASK_UNINTERRUPTIBLE)); + return (__cv_timedwait_common(cvp, mp, exp_time, + TASK_UNINTERRUPTIBLE, 0)); } EXPORT_SYMBOL(__cv_timedwait); +clock_t +__cv_timedwait_io(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) +{ + return (__cv_timedwait_common(cvp, mp, exp_time, + TASK_UNINTERRUPTIBLE, 1)); +} +EXPORT_SYMBOL(__cv_timedwait_io); + clock_t __cv_timedwait_sig(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time) { - return (__cv_timedwait_common(cvp, mp, exp_time, TASK_INTERRUPTIBLE)); + return (__cv_timedwait_common(cvp, mp, exp_time, + TASK_INTERRUPTIBLE, 0)); } EXPORT_SYMBOL(__cv_timedwait_sig); From 5461eefe50427a8f8caf0b92f0195c754bed8ec6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 7 Feb 2018 11:49:38 -0800 Subject: [PATCH 1050/1062] Fix cstyle warnings This patch contains no functional changes. It is solely intended to resolve cstyle warnings in order to facilitate moving the spl source code in to the zfs repository. Signed-off-by: Brian Behlendorf Closes #681 --- include/fs/fs_subr.h | 2 +- include/linux/math64_compat.h | 1 + include/rpc/types.h | 2 +- include/rpc/xdr.h | 48 +-- include/sharefs/share.h | 2 +- include/spl-ctl.h | 22 +- include/splat-ctl.h | 60 ++-- include/strings.h | 2 +- include/sys/acl.h | 138 ++++---- include/sys/acl_impl.h | 2 +- include/sys/atomic.h | 80 +++-- include/sys/attr.h | 2 +- include/sys/bitmap.h | 2 +- include/sys/bootconf.h | 2 +- include/sys/bootprops.h | 2 +- include/sys/buf.h | 2 +- include/sys/byteorder.h | 32 +- include/sys/callb.h | 21 +- include/sys/callo.h | 10 +- include/sys/cmn_err.h | 14 +- include/sys/compress.h | 2 +- include/sys/conf.h | 2 +- include/sys/console.h | 10 +- include/sys/cpupart.h | 2 +- include/sys/cpuvar.h | 2 +- include/sys/crc32.h | 2 +- include/sys/cred.h | 4 +- include/sys/ctype.h | 2 +- include/sys/ddi.h | 2 +- include/sys/debug.h | 6 +- include/sys/dirent.h | 2 +- include/sys/disp.h | 2 +- include/sys/dkioc_free_util.h | 2 +- include/sys/dnlc.h | 2 +- include/sys/dumphdr.h | 2 +- include/sys/efi_partition.h | 2 +- include/sys/errno.h | 2 +- include/sys/fcntl.h | 4 +- include/sys/file.h | 2 +- include/sys/fs/swapnode.h | 2 +- include/sys/idmap.h | 4 +- include/sys/int_limits.h | 2 +- include/sys/int_types.h | 2 +- include/sys/inttypes.h | 2 +- include/sys/isa_defs.h | 64 ++-- include/sys/kidmap.h | 2 +- include/sys/kobj.h | 2 +- include/sys/kstat.h | 234 ++++++------- include/sys/list.h | 36 +- include/sys/mkdev.h | 2 +- include/sys/mntent.h | 2 +- include/sys/modctl.h | 2 +- include/sys/mode.h | 8 +- include/sys/mount.h | 2 +- include/sys/mutex.h | 10 +- include/sys/note.h | 2 +- include/sys/open.h | 2 +- include/sys/param.h | 8 +- include/sys/pathname.h | 2 +- include/sys/policy.h | 20 +- include/sys/pool.h | 2 +- include/sys/priv_impl.h | 2 +- include/sys/proc.h | 2 +- include/sys/processor.h | 2 +- include/sys/pset.h | 14 +- include/sys/random.h | 4 +- include/sys/refstr.h | 2 +- include/sys/resource.h | 2 +- include/sys/rwlock.h | 34 +- include/sys/sdt.h | 4 +- include/sys/sid.h | 12 +- include/sys/signal.h | 7 +- include/sys/stat.h | 2 +- include/sys/stropts.h | 2 +- include/sys/sunddi.h | 8 +- include/sys/sunldi.h | 4 +- include/sys/sysdc.h | 2 +- include/sys/sysmacros.h | 182 +++++----- include/sys/systeminfo.h | 8 +- include/sys/systm.h | 2 +- include/sys/t_lock.h | 2 +- include/sys/taskq.h | 2 +- include/sys/thread.h | 36 +- include/sys/timer.h | 37 +-- include/sys/tsd.h | 10 +- include/sys/types.h | 6 +- include/sys/u8_textprep.h | 2 +- include/sys/uio.h | 20 +- include/sys/unistd.h | 2 +- include/sys/user.h | 4 +- include/sys/va_list.h | 2 +- include/sys/varargs.h | 4 +- include/sys/vfs.h | 4 +- include/sys/vfs_opreg.h | 2 +- include/sys/vmsystm.h | 14 +- include/sys/vnode.h | 100 +++--- include/sys/zmod.h | 5 +- include/sys/zone.h | 2 +- include/unistd.h | 2 +- include/util/qsort.h | 4 +- include/util/sscanf.h | 2 +- include/vm/anon.h | 2 +- include/vm/pvn.h | 2 +- include/vm/seg_kmem.h | 2 +- module/spl/spl-atomic.c | 8 +- module/spl/spl-condvar.c | 8 +- module/spl/spl-cred.c | 38 +-- module/spl/spl-err.c | 5 +- module/spl/spl-generic.c | 84 ++--- module/spl/spl-kmem-cache.c | 22 +- module/spl/spl-kmem.c | 2 +- module/spl/spl-kobj.c | 12 +- module/spl/spl-kstat.c | 503 ++++++++++++++-------------- module/spl/spl-mutex.c | 8 +- module/spl/spl-proc.c | 608 +++++++++++++++++----------------- module/spl/spl-rwlock.c | 10 +- module/spl/spl-taskq.c | 22 +- module/spl/spl-thread.c | 29 +- module/spl/spl-vnode.c | 160 +++++---- module/spl/spl-xdr.c | 157 +++++---- module/spl/spl-zlib.c | 37 ++- 121 files changed, 1600 insertions(+), 1588 deletions(-) diff --git a/include/fs/fs_subr.h b/include/fs/fs_subr.h index 802aa7336..71f074205 100644 --- a/include/fs/fs_subr.h +++ b/include/fs/fs_subr.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_FS_FS_SUBR_H -#define _SPL_FS_FS_SUBR_H +#define _SPL_FS_FS_SUBR_H #endif /* SPL_FS_FS_SUBR_H */ diff --git a/include/linux/math64_compat.h b/include/linux/math64_compat.h index e45015bea..c02f58479 100644 --- a/include/linux/math64_compat.h +++ b/include/linux/math64_compat.h @@ -26,6 +26,7 @@ #define _SPL_MATH64_COMPAT_H #ifndef abs64 +/* CSTYLED */ #define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; }) #endif diff --git a/include/rpc/types.h b/include/rpc/types.h index 57afbc52a..4fb5415ab 100644 --- a/include/rpc/types.h +++ b/include/rpc/types.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_RPC_TYPES_H -#define _SPL_RPC_TYPES_H +#define _SPL_RPC_TYPES_H typedef int bool_t; diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index 4f19f655b..e349757d5 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -20,7 +20,7 @@ */ #ifndef _SPL_RPC_XDR_H -#define _SPL_RPC_XDR_H +#define _SPL_RPC_XDR_H #include #include @@ -36,11 +36,10 @@ enum xdr_op { struct xdr_ops; typedef struct { - struct xdr_ops *x_ops; /* Also used to let caller know if - xdrmem_create() succeeds (sigh..) */ - caddr_t x_addr; /* Current buffer addr */ - caddr_t x_addr_end; /* End of the buffer */ - enum xdr_op x_op; /* Stream direction */ + struct xdr_ops *x_ops; /* Let caller know xdrmem_create() succeeds */ + caddr_t x_addr; /* Current buffer addr */ + caddr_t x_addr_end; /* End of the buffer */ + enum xdr_op x_op; /* Stream direction */ } XDR; typedef bool_t (*xdrproc_t)(XDR *xdrs, void *ptr); @@ -56,13 +55,13 @@ struct xdr_ops { bool_t (*xdr_opaque)(XDR *, caddr_t, const uint_t); bool_t (*xdr_string)(XDR *, char **, const uint_t); bool_t (*xdr_array)(XDR *, caddr_t *, uint_t *, const uint_t, - const uint_t, const xdrproc_t); + const uint_t, const xdrproc_t); }; /* * XDR control operator. */ -#define XDR_GET_BYTES_AVAIL 1 +#define XDR_GET_BYTES_AVAIL 1 struct xdr_bytesrec { bool_t xc_is_last_record; @@ -74,11 +73,12 @@ struct xdr_bytesrec { */ void xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, const enum xdr_op op); -#define xdr_destroy(xdrs) ((void) 0) /* Currently not needed. If needed later, - we'll add it to struct xdr_ops */ -#define xdr_control(xdrs, req, info) (xdrs)->x_ops->xdr_control((xdrs), \ - (req), (info)) +/* Currently not needed. If needed later, we'll add it to struct xdr_ops */ +#define xdr_destroy(xdrs) ((void) 0) + +#define xdr_control(xdrs, req, info) \ + (xdrs)->x_ops->xdr_control((xdrs), (req), (info)) /* * For precaution, the following are defined as static inlines instead of macros @@ -89,40 +89,40 @@ void xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, */ static inline bool_t xdr_char(XDR *xdrs, char *cp) { - return xdrs->x_ops->xdr_char(xdrs, cp); + return (xdrs->x_ops->xdr_char(xdrs, cp)); } static inline bool_t xdr_u_short(XDR *xdrs, unsigned short *usp) { - return xdrs->x_ops->xdr_u_short(xdrs, usp); + return (xdrs->x_ops->xdr_u_short(xdrs, usp)); } static inline bool_t xdr_short(XDR *xdrs, short *sp) { - BUILD_BUG_ON(sizeof(short) != 2); - return xdrs->x_ops->xdr_u_short(xdrs, (unsigned short *) sp); + BUILD_BUG_ON(sizeof (short) != 2); + return (xdrs->x_ops->xdr_u_short(xdrs, (unsigned short *) sp)); } static inline bool_t xdr_u_int(XDR *xdrs, unsigned *up) { - return xdrs->x_ops->xdr_u_int(xdrs, up); + return (xdrs->x_ops->xdr_u_int(xdrs, up)); } static inline bool_t xdr_int(XDR *xdrs, int *ip) { - BUILD_BUG_ON(sizeof(int) != 4); - return xdrs->x_ops->xdr_u_int(xdrs, (unsigned *) ip); + BUILD_BUG_ON(sizeof (int) != 4); + return (xdrs->x_ops->xdr_u_int(xdrs, (unsigned *)ip)); } static inline bool_t xdr_u_longlong_t(XDR *xdrs, u_longlong_t *ullp) { - return xdrs->x_ops->xdr_u_longlong_t(xdrs, ullp); + return (xdrs->x_ops->xdr_u_longlong_t(xdrs, ullp)); } static inline bool_t xdr_longlong_t(XDR *xdrs, longlong_t *llp) { - BUILD_BUG_ON(sizeof(longlong_t) != 8); - return xdrs->x_ops->xdr_u_longlong_t(xdrs, (u_longlong_t *) llp); + BUILD_BUG_ON(sizeof (longlong_t) != 8); + return (xdrs->x_ops->xdr_u_longlong_t(xdrs, (u_longlong_t *)llp)); } /* @@ -130,7 +130,7 @@ static inline bool_t xdr_longlong_t(XDR *xdrs, longlong_t *llp) */ static inline bool_t xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt) { - return xdrs->x_ops->xdr_opaque(xdrs, cp, cnt); + return (xdrs->x_ops->xdr_opaque(xdrs, cp, cnt)); } /* @@ -139,7 +139,7 @@ static inline bool_t xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt) */ static inline bool_t xdr_string(XDR *xdrs, char **sp, const uint_t maxsize) { - return xdrs->x_ops->xdr_string(xdrs, sp, maxsize); + return (xdrs->x_ops->xdr_string(xdrs, sp, maxsize)); } /* diff --git a/include/sharefs/share.h b/include/sharefs/share.h index 6c140d0b8..a5bf0e2e1 100644 --- a/include/sharefs/share.h +++ b/include/sharefs/share.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_SHARE_H -#define _SPL_SHARE_H +#define _SPL_SHARE_H #endif /* SPL_SHARE_H */ diff --git a/include/spl-ctl.h b/include/spl-ctl.h index 21b1c1c05..571887d1d 100644 --- a/include/spl-ctl.h +++ b/include/spl-ctl.h @@ -23,23 +23,23 @@ */ #ifndef _DEBUG_CTL_H -#define _DEBUG_CTL_H +#define _DEBUG_CTL_H /* * Contains shared definitions which both the user space * and kernel space portions of splat must agree on. */ typedef struct spl_debug_header { - int ph_len; - int ph_flags; - int ph_subsys; - int ph_mask; - int ph_cpu_id; - int ph_sec; - long ph_usec; - int ph_stack; - int ph_pid; - int ph_line_num; + int ph_len; + int ph_flags; + int ph_subsys; + int ph_mask; + int ph_cpu_id; + int ph_sec; + long ph_usec; + int ph_stack; + int ph_pid; + int ph_line_num; } spl_debug_header_t; #endif /* _DEBUG_CTL_H */ diff --git a/include/splat-ctl.h b/include/splat-ctl.h index dab3b299f..0f020dc24 100644 --- a/include/splat-ctl.h +++ b/include/splat-ctl.h @@ -23,7 +23,7 @@ */ #ifndef _SPLAT_CTL_H -#define _SPLAT_CTL_H +#define _SPLAT_CTL_H #include @@ -32,11 +32,11 @@ * ensure 32-bit/64-bit interoperability over ioctl()'s only types with * fixed sizes can be used. */ -#define SPLAT_NAME "splatctl" -#define SPLAT_DEV "/dev/splatctl" +#define SPLAT_NAME "splatctl" +#define SPLAT_DEV "/dev/splatctl" -#define SPLAT_NAME_SIZE 20 -#define SPLAT_DESC_SIZE 60 +#define SPLAT_NAME_SIZE 20 +#define SPLAT_DESC_SIZE 60 typedef struct splat_user { char name[SPLAT_NAME_SIZE]; /* Short name */ @@ -72,38 +72,38 @@ typedef struct splat_cmd { } splat_cmd_t; /* Valid ioctls */ -#define SPLAT_CFG _IOWR('f', 101, splat_cfg_t) -#define SPLAT_CMD _IOWR('f', 102, splat_cmd_t) +#define SPLAT_CFG _IOWR('f', 101, splat_cfg_t) +#define SPLAT_CMD _IOWR('f', 102, splat_cmd_t) /* Valid configuration commands */ -#define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ -#define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ -#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ -#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ -#define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ -#define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ +#define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ +#define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ +#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ +#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ +#define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ +#define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ /* * Valid subsystem and test commands are defined in each subsystem as * SPLAT_SUBSYSTEM_*. We do need to be careful to avoid collisions, the * currently defined subsystems are as follows: */ -#define SPLAT_SUBSYSTEM_KMEM 0x0100 -#define SPLAT_SUBSYSTEM_TASKQ 0x0200 -#define SPLAT_SUBSYSTEM_KRNG 0x0300 -#define SPLAT_SUBSYSTEM_MUTEX 0x0400 -#define SPLAT_SUBSYSTEM_CONDVAR 0x0500 -#define SPLAT_SUBSYSTEM_THREAD 0x0600 -#define SPLAT_SUBSYSTEM_RWLOCK 0x0700 -#define SPLAT_SUBSYSTEM_TIME 0x0800 -#define SPLAT_SUBSYSTEM_VNODE 0x0900 -#define SPLAT_SUBSYSTEM_KOBJ 0x0a00 -#define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 -#define SPLAT_SUBSYSTEM_LIST 0x0c00 -#define SPLAT_SUBSYSTEM_GENERIC 0x0d00 -#define SPLAT_SUBSYSTEM_CRED 0x0e00 -#define SPLAT_SUBSYSTEM_ZLIB 0x0f00 -#define SPLAT_SUBSYSTEM_LINUX 0x1000 -#define SPLAT_SUBSYSTEM_UNKNOWN 0xff00 +#define SPLAT_SUBSYSTEM_KMEM 0x0100 +#define SPLAT_SUBSYSTEM_TASKQ 0x0200 +#define SPLAT_SUBSYSTEM_KRNG 0x0300 +#define SPLAT_SUBSYSTEM_MUTEX 0x0400 +#define SPLAT_SUBSYSTEM_CONDVAR 0x0500 +#define SPLAT_SUBSYSTEM_THREAD 0x0600 +#define SPLAT_SUBSYSTEM_RWLOCK 0x0700 +#define SPLAT_SUBSYSTEM_TIME 0x0800 +#define SPLAT_SUBSYSTEM_VNODE 0x0900 +#define SPLAT_SUBSYSTEM_KOBJ 0x0a00 +#define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 +#define SPLAT_SUBSYSTEM_LIST 0x0c00 +#define SPLAT_SUBSYSTEM_GENERIC 0x0d00 +#define SPLAT_SUBSYSTEM_CRED 0x0e00 +#define SPLAT_SUBSYSTEM_ZLIB 0x0f00 +#define SPLAT_SUBSYSTEM_LINUX 0x1000 +#define SPLAT_SUBSYSTEM_UNKNOWN 0xff00 #endif /* _SPLAT_CTL_H */ diff --git a/include/strings.h b/include/strings.h index c3b5741de..18179c79e 100644 --- a/include/strings.h +++ b/include/strings.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_STRINGS_H -#define _SPL_STRINGS_H +#define _SPL_STRINGS_H #endif /* SPL_STRINGS_H */ diff --git a/include/sys/acl.h b/include/sys/acl.h index 4c301b2a8..9fc79c025 100644 --- a/include/sys/acl.h +++ b/include/sys/acl.h @@ -23,95 +23,97 @@ */ #ifndef _SPL_ACL_H -#define _SPL_ACL_H +#define _SPL_ACL_H #include typedef struct ace { - uid_t a_who; - uint32_t a_access_mask; - uint16_t a_flags; - uint16_t a_type; + uid_t a_who; + uint32_t a_access_mask; + uint16_t a_flags; + uint16_t a_type; } ace_t; typedef struct ace_object { - uid_t a_who; /* uid or gid */ - uint32_t a_access_mask; /* read,write,... */ - uint16_t a_flags; /* see below */ - uint16_t a_type; /* allow or deny */ - uint8_t a_obj_type[16]; /* obj type */ - uint8_t a_inherit_obj_type[16]; /* inherit obj */ + uid_t a_who; /* uid or gid */ + uint32_t a_access_mask; /* read,write,... */ + uint16_t a_flags; /* see below */ + uint16_t a_type; /* allow or deny */ + uint8_t a_obj_type[16]; /* obj type */ + uint8_t a_inherit_obj_type[16]; /* inherit obj */ } ace_object_t; -#define MAX_ACL_ENTRIES 1024 +#define MAX_ACL_ENTRIES 1024 -#define ACE_READ_DATA 0x00000001 -#define ACE_LIST_DIRECTORY 0x00000001 -#define ACE_WRITE_DATA 0x00000002 -#define ACE_ADD_FILE 0x00000002 -#define ACE_APPEND_DATA 0x00000004 -#define ACE_ADD_SUBDIRECTORY 0x00000004 -#define ACE_READ_NAMED_ATTRS 0x00000008 -#define ACE_WRITE_NAMED_ATTRS 0x00000010 -#define ACE_EXECUTE 0x00000020 -#define ACE_DELETE_CHILD 0x00000040 -#define ACE_READ_ATTRIBUTES 0x00000080 -#define ACE_WRITE_ATTRIBUTES 0x00000100 -#define ACE_DELETE 0x00010000 -#define ACE_READ_ACL 0x00020000 -#define ACE_WRITE_ACL 0x00040000 -#define ACE_WRITE_OWNER 0x00080000 -#define ACE_SYNCHRONIZE 0x00100000 +#define ACE_READ_DATA 0x00000001 +#define ACE_LIST_DIRECTORY 0x00000001 +#define ACE_WRITE_DATA 0x00000002 +#define ACE_ADD_FILE 0x00000002 +#define ACE_APPEND_DATA 0x00000004 +#define ACE_ADD_SUBDIRECTORY 0x00000004 +#define ACE_READ_NAMED_ATTRS 0x00000008 +#define ACE_WRITE_NAMED_ATTRS 0x00000010 +#define ACE_EXECUTE 0x00000020 +#define ACE_DELETE_CHILD 0x00000040 +#define ACE_READ_ATTRIBUTES 0x00000080 +#define ACE_WRITE_ATTRIBUTES 0x00000100 +#define ACE_DELETE 0x00010000 +#define ACE_READ_ACL 0x00020000 +#define ACE_WRITE_ACL 0x00040000 +#define ACE_WRITE_OWNER 0x00080000 +#define ACE_SYNCHRONIZE 0x00100000 -#define ACE_FILE_INHERIT_ACE 0x0001 -#define ACE_DIRECTORY_INHERIT_ACE 0x0002 -#define ACE_NO_PROPAGATE_INHERIT_ACE 0x0004 -#define ACE_INHERIT_ONLY_ACE 0x0008 -#define ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x0010 -#define ACE_FAILED_ACCESS_ACE_FLAG 0x0020 -#define ACE_IDENTIFIER_GROUP 0x0040 -#define ACE_INHERITED_ACE 0x0080 -#define ACE_OWNER 0x1000 -#define ACE_GROUP 0x2000 -#define ACE_EVERYONE 0x4000 +#define ACE_FILE_INHERIT_ACE 0x0001 +#define ACE_DIRECTORY_INHERIT_ACE 0x0002 +#define ACE_NO_PROPAGATE_INHERIT_ACE 0x0004 +#define ACE_INHERIT_ONLY_ACE 0x0008 +#define ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x0010 +#define ACE_FAILED_ACCESS_ACE_FLAG 0x0020 +#define ACE_IDENTIFIER_GROUP 0x0040 +#define ACE_INHERITED_ACE 0x0080 +#define ACE_OWNER 0x1000 +#define ACE_GROUP 0x2000 +#define ACE_EVERYONE 0x4000 -#define ACE_ACCESS_ALLOWED_ACE_TYPE 0x0000 -#define ACE_ACCESS_DENIED_ACE_TYPE 0x0001 -#define ACE_SYSTEM_AUDIT_ACE_TYPE 0x0002 -#define ACE_SYSTEM_ALARM_ACE_TYPE 0x0003 +#define ACE_ACCESS_ALLOWED_ACE_TYPE 0x0000 +#define ACE_ACCESS_DENIED_ACE_TYPE 0x0001 +#define ACE_SYSTEM_AUDIT_ACE_TYPE 0x0002 +#define ACE_SYSTEM_ALARM_ACE_TYPE 0x0003 -#define ACL_AUTO_INHERIT 0x0001 -#define ACL_PROTECTED 0x0002 -#define ACL_DEFAULTED 0x0004 -#define ACL_FLAGS_ALL (ACL_AUTO_INHERIT|ACL_PROTECTED|ACL_DEFAULTED) +#define ACL_AUTO_INHERIT 0x0001 +#define ACL_PROTECTED 0x0002 +#define ACL_DEFAULTED 0x0004 +#define ACL_FLAGS_ALL (ACL_AUTO_INHERIT|ACL_PROTECTED|ACL_DEFAULTED) -#define ACE_ACCESS_ALLOWED_COMPOUND_ACE_TYPE 0x04 -#define ACE_ACCESS_ALLOWED_OBJECT_ACE_TYPE 0x05 -#define ACE_ACCESS_DENIED_OBJECT_ACE_TYPE 0x06 -#define ACE_SYSTEM_AUDIT_OBJECT_ACE_TYPE 0x07 -#define ACE_SYSTEM_ALARM_OBJECT_ACE_TYPE 0x08 -#define ACE_ACCESS_ALLOWED_CALLBACK_ACE_TYPE 0x09 -#define ACE_ACCESS_DENIED_CALLBACK_ACE_TYPE 0x0A -#define ACE_ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE 0x0B -#define ACE_ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE 0x0C -#define ACE_SYSTEM_AUDIT_CALLBACK_ACE_TYPE 0x0D -#define ACE_SYSTEM_ALARM_CALLBACK_ACE_TYPE 0x0E -#define ACE_SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE 0x0F -#define ACE_SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE 0x10 +#define ACE_ACCESS_ALLOWED_COMPOUND_ACE_TYPE 0x04 +#define ACE_ACCESS_ALLOWED_OBJECT_ACE_TYPE 0x05 +#define ACE_ACCESS_DENIED_OBJECT_ACE_TYPE 0x06 +#define ACE_SYSTEM_AUDIT_OBJECT_ACE_TYPE 0x07 +#define ACE_SYSTEM_ALARM_OBJECT_ACE_TYPE 0x08 +#define ACE_ACCESS_ALLOWED_CALLBACK_ACE_TYPE 0x09 +#define ACE_ACCESS_DENIED_CALLBACK_ACE_TYPE 0x0A +#define ACE_ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE 0x0B +#define ACE_ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE 0x0C +#define ACE_SYSTEM_AUDIT_CALLBACK_ACE_TYPE 0x0D +#define ACE_SYSTEM_ALARM_CALLBACK_ACE_TYPE 0x0E +#define ACE_SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE 0x0F +#define ACE_SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE 0x10 -#define ACE_ALL_TYPES 0x001F +#define ACE_ALL_TYPES 0x001F -#define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE|ACE_IDENTIFIER_GROUP) +#define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE|ACE_IDENTIFIER_GROUP) -#define ACE_ALL_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \ +/* BEGIN CSTYLED */ +#define ACE_ALL_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \ ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS| \ ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES| \ ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \ ACE_WRITE_OWNER|ACE_SYNCHRONIZE) +/* END CSTYLED */ -#define VSA_ACE 0x0010 -#define VSA_ACECNT 0x0020 -#define VSA_ACE_ALLTYPES 0x0040 -#define VSA_ACE_ACLFLAGS 0x0080 +#define VSA_ACE 0x0010 +#define VSA_ACECNT 0x0020 +#define VSA_ACE_ALLTYPES 0x0040 +#define VSA_ACE_ACLFLAGS 0x0080 #endif /* _SPL_ACL_H */ diff --git a/include/sys/acl_impl.h b/include/sys/acl_impl.h index 45a4561dc..9cb21124b 100644 --- a/include/sys/acl_impl.h +++ b/include/sys/acl_impl.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_ACL_IMPL_H -#define _SPL_ACL_IMPL_H +#define _SPL_ACL_IMPL_H #endif /* _SPL_ACL_IMPL_H */ diff --git a/include/sys/atomic.h b/include/sys/atomic.h index d0229fb88..e992fdce3 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_ATOMIC_H -#define _SPL_ATOMIC_H +#define _SPL_ATOMIC_H #include #include @@ -91,7 +91,7 @@ atomic_inc_32_nv(volatile uint32_t *target) nv = ++(*target); spin_unlock(&atomic32_lock); - return nv; + return (nv); } static __inline__ uint32_t @@ -103,7 +103,7 @@ atomic_dec_32_nv(volatile uint32_t *target) nv = --(*target); spin_unlock(&atomic32_lock); - return nv; + return (nv); } static __inline__ uint32_t @@ -116,7 +116,7 @@ atomic_add_32_nv(volatile uint32_t *target, uint32_t delta) nv = *target; spin_unlock(&atomic32_lock); - return nv; + return (nv); } static __inline__ uint32_t @@ -129,12 +129,11 @@ atomic_sub_32_nv(volatile uint32_t *target, uint32_t delta) nv = *target; spin_unlock(&atomic32_lock); - return nv; + return (nv); } static __inline__ uint32_t -atomic_cas_32(volatile uint32_t *target, uint32_t cmp, - uint32_t newval) +atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval) { uint32_t rc; @@ -145,7 +144,7 @@ atomic_cas_32(volatile uint32_t *target, uint32_t cmp, spin_unlock(&atomic32_lock); - return rc; + return (rc); } static __inline__ uint32_t @@ -158,7 +157,7 @@ atomic_swap_32(volatile uint32_t *target, uint32_t newval) *target = newval; spin_unlock(&atomic32_lock); - return rc; + return (rc); } static __inline__ void @@ -202,7 +201,7 @@ atomic_inc_64_nv(volatile uint64_t *target) nv = ++(*target); spin_unlock(&atomic64_lock); - return nv; + return (nv); } static __inline__ uint64_t @@ -214,7 +213,7 @@ atomic_dec_64_nv(volatile uint64_t *target) nv = --(*target); spin_unlock(&atomic64_lock); - return nv; + return (nv); } static __inline__ uint64_t @@ -227,7 +226,7 @@ atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) nv = *target; spin_unlock(&atomic64_lock); - return nv; + return (nv); } static __inline__ uint64_t @@ -240,12 +239,11 @@ atomic_sub_64_nv(volatile uint64_t *target, uint64_t delta) nv = *target; spin_unlock(&atomic64_lock); - return nv; + return (nv); } static __inline__ uint64_t -atomic_cas_64(volatile uint64_t *target, uint64_t cmp, - uint64_t newval) +atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval) { uint64_t rc; @@ -255,7 +253,7 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp, *target = newval; spin_unlock(&atomic64_lock); - return rc; + return (rc); } static __inline__ uint64_t @@ -268,31 +266,31 @@ atomic_swap_64(volatile uint64_t *target, uint64_t newval) *target = newval; spin_unlock(&atomic64_lock); - return rc; + return (rc); } #else /* ATOMIC_SPINLOCK */ -#define atomic_inc_32(v) atomic_inc((atomic_t *)(v)) -#define atomic_dec_32(v) atomic_dec((atomic_t *)(v)) -#define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v)) -#define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v)) -#define atomic_inc_32_nv(v) atomic_inc_return((atomic_t *)(v)) -#define atomic_dec_32_nv(v) atomic_dec_return((atomic_t *)(v)) -#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) -#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) -#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) -#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x) -#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v)) -#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) -#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) -#define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v)) -#define atomic_inc_64_nv(v) atomic64_inc_return((atomic64_t *)(v)) -#define atomic_dec_64_nv(v) atomic64_dec_return((atomic64_t *)(v)) -#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) -#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) -#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) -#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x) +#define atomic_inc_32(v) atomic_inc((atomic_t *)(v)) +#define atomic_dec_32(v) atomic_dec((atomic_t *)(v)) +#define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v)) +#define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v)) +#define atomic_inc_32_nv(v) atomic_inc_return((atomic_t *)(v)) +#define atomic_dec_32_nv(v) atomic_dec_return((atomic_t *)(v)) +#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) +#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) +#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) +#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x) +#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v)) +#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) +#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) +#define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v)) +#define atomic_inc_64_nv(v) atomic64_inc_return((atomic64_t *)(v)) +#define atomic_dec_64_nv(v) atomic64_dec_return((atomic64_t *)(v)) +#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) +#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) +#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) +#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x) #endif /* ATOMIC_SPINLOCK */ @@ -300,15 +298,15 @@ atomic_swap_64(volatile uint64_t *target, uint64_t newval) static __inline__ void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { - return (void *)atomic_cas_64((volatile uint64_t *)target, - (uint64_t)cmp, (uint64_t)newval); + return ((void *)atomic_cas_64((volatile uint64_t *)target, + (uint64_t)cmp, (uint64_t)newval)); } #else /* _LP64 */ static __inline__ void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) { - return (void *)atomic_cas_32((volatile uint32_t *)target, - (uint32_t)cmp, (uint32_t)newval); + return ((void *)atomic_cas_32((volatile uint32_t *)target, + (uint32_t)cmp, (uint32_t)newval)); } #endif /* _LP64 */ diff --git a/include/sys/attr.h b/include/sys/attr.h index 549807f25..7941acbec 100644 --- a/include/sys/attr.h +++ b/include/sys/attr.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_ATTR_H -#define _SPL_ATTR_H +#define _SPL_ATTR_H #endif /* SPL_ATTR_H */ diff --git a/include/sys/bitmap.h b/include/sys/bitmap.h index 5bbf15f4b..3e7d910c0 100644 --- a/include/sys/bitmap.h +++ b/include/sys/bitmap.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_BITMAP_H -#define _SPL_BITMAP_H +#define _SPL_BITMAP_H #endif /* SPL_BITMAP_H */ diff --git a/include/sys/bootconf.h b/include/sys/bootconf.h index 883b9ec76..62730ba5d 100644 --- a/include/sys/bootconf.h +++ b/include/sys/bootconf.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_BOOTCONF_H -#define _SPL_BOOTCONF_H +#define _SPL_BOOTCONF_H #endif /* SPL_BOOTCONF_H */ diff --git a/include/sys/bootprops.h b/include/sys/bootprops.h index bd1c3182b..50150eda9 100644 --- a/include/sys/bootprops.h +++ b/include/sys/bootprops.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_BOOTPROPS_H -#define _SPL_BOOTPROPS_H +#define _SPL_BOOTPROPS_H #endif /* SPL_BOOTPROPS_H */ diff --git a/include/sys/buf.h b/include/sys/buf.h index 60b1c621d..fa453e478 100644 --- a/include/sys/buf.h +++ b/include/sys/buf.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_BUF_H -#define _SPL_BUF_H +#define _SPL_BUF_H #endif /* SPL_BUF_H */ diff --git a/include/sys/byteorder.h b/include/sys/byteorder.h index ffd7ec4c4..a0ff424f8 100644 --- a/include/sys/byteorder.h +++ b/include/sys/byteorder.h @@ -23,45 +23,49 @@ */ #ifndef _SPL_BYTEORDER_H -#define _SPL_BYTEORDER_H +#define _SPL_BYTEORDER_H #include #include -#define LE_16(x) cpu_to_le16(x) -#define LE_32(x) cpu_to_le32(x) -#define LE_64(x) cpu_to_le64(x) -#define BE_16(x) cpu_to_be16(x) -#define BE_32(x) cpu_to_be32(x) -#define BE_64(x) cpu_to_be64(x) +#define LE_16(x) cpu_to_le16(x) +#define LE_32(x) cpu_to_le32(x) +#define LE_64(x) cpu_to_le64(x) +#define BE_16(x) cpu_to_be16(x) +#define BE_32(x) cpu_to_be32(x) +#define BE_64(x) cpu_to_be64(x) -#define BE_IN8(xa) \ +#define BE_IN8(xa) \ *((uint8_t *)(xa)) -#define BE_IN16(xa) \ +#define BE_IN16(xa) \ (((uint16_t)BE_IN8(xa) << 8) | BE_IN8((uint8_t *)(xa)+1)) -#define BE_IN32(xa) \ +#define BE_IN32(xa) \ (((uint32_t)BE_IN16(xa) << 16) | BE_IN16((uint8_t *)(xa)+2)) #ifdef _BIG_ENDIAN static __inline__ uint64_t -htonll(uint64_t n) { +htonll(uint64_t n) +{ return (n); } static __inline__ uint64_t -ntohll(uint64_t n) { +ntohll(uint64_t n) +{ return (n); } #else static __inline__ uint64_t -htonll(uint64_t n) { +htonll(uint64_t n) +{ return ((((uint64_t)htonl(n)) << 32) + htonl(n >> 32)); } static __inline__ uint64_t -ntohll(uint64_t n) { +ntohll(uint64_t n) +{ return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32)); } #endif diff --git a/include/sys/callb.h b/include/sys/callb.h index 0b33bc0f3..f1826bfd3 100644 --- a/include/sys/callb.h +++ b/include/sys/callb.h @@ -23,33 +23,32 @@ */ #ifndef _SPL_CALLB_H -#define _SPL_CALLB_H +#define _SPL_CALLB_H #include #include -#define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); +#define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); typedef struct callb_cpr { - kmutex_t *cc_lockp; + kmutex_t *cc_lockp; } callb_cpr_t; -#define CALLB_CPR_INIT(cp, lockp, func, name) { \ - (cp)->cc_lockp = lockp; \ +#define CALLB_CPR_INIT(cp, lockp, func, name) { \ + (cp)->cc_lockp = lockp; \ } -#define CALLB_CPR_SAFE_BEGIN(cp) { \ +#define CALLB_CPR_SAFE_BEGIN(cp) { \ CALLB_CPR_ASSERT(cp); \ } -#define CALLB_CPR_SAFE_END(cp, lockp) { \ +#define CALLB_CPR_SAFE_END(cp, lockp) { \ CALLB_CPR_ASSERT(cp); \ } -#define CALLB_CPR_EXIT(cp) { \ - ASSERT(MUTEX_HELD((cp)->cc_lockp)); \ - mutex_exit((cp)->cc_lockp); \ +#define CALLB_CPR_EXIT(cp) { \ + ASSERT(MUTEX_HELD((cp)->cc_lockp)); \ + mutex_exit((cp)->cc_lockp); \ } #endif /* _SPL_CALLB_H */ - diff --git a/include/sys/callo.h b/include/sys/callo.h index 1e1516392..c43ac92e7 100644 --- a/include/sys/callo.h +++ b/include/sys/callo.h @@ -22,7 +22,7 @@ */ #ifndef _SPL_CALLO_H -#define _SPL_CALLO_H +#define _SPL_CALLO_H /* * Callout flags: @@ -44,9 +44,9 @@ * Legacy interfaces timeout() and realtime_timeout() pass this flag * to timeout_generic() to indicate that a 32-bit ID should be allocated. */ -#define CALLOUT_FLAG_ROUNDUP 0x1 -#define CALLOUT_FLAG_ABSOLUTE 0x2 -#define CALLOUT_FLAG_HRESTIME 0x4 -#define CALLOUT_FLAG_32BIT 0x8 +#define CALLOUT_FLAG_ROUNDUP 0x1 +#define CALLOUT_FLAG_ABSOLUTE 0x2 +#define CALLOUT_FLAG_HRESTIME 0x4 +#define CALLOUT_FLAG_32BIT 0x8 #endif /* _SPL_CALLB_H */ diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h index 0e8e41841..594a76333 100644 --- a/include/sys/cmn_err.h +++ b/include/sys/cmn_err.h @@ -23,20 +23,20 @@ */ #ifndef _SPL_CMN_ERR_H -#define _SPL_CMN_ERR_H +#define _SPL_CMN_ERR_H #include -#define CE_CONT 0 /* continuation */ -#define CE_NOTE 1 /* notice */ -#define CE_WARN 2 /* warning */ -#define CE_PANIC 3 /* panic */ -#define CE_IGNORE 4 /* print nothing */ +#define CE_CONT 0 /* continuation */ +#define CE_NOTE 1 /* notice */ +#define CE_WARN 2 /* warning */ +#define CE_PANIC 3 /* panic */ +#define CE_IGNORE 4 /* print nothing */ extern void cmn_err(int, const char *, ...); extern void vcmn_err(int, const char *, __va_list); extern void vpanic(const char *, __va_list); -#define fm_panic panic +#define fm_panic panic #endif /* SPL_CMN_ERR_H */ diff --git a/include/sys/compress.h b/include/sys/compress.h index 719d87c4e..e46ab0df2 100644 --- a/include/sys/compress.h +++ b/include/sys/compress.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_COMPRESS_H -#define _SPL_COMPRESS_H +#define _SPL_COMPRESS_H #endif /* SPL_COMPRESS_H */ diff --git a/include/sys/conf.h b/include/sys/conf.h index eeaecb6f0..68f4095dd 100644 --- a/include/sys/conf.h +++ b/include/sys/conf.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_CONF_H -#define _SPL_CONF_H +#define _SPL_CONF_H #endif /* SPL_CONF_H */ diff --git a/include/sys/console.h b/include/sys/console.h index 2c327fb8f..3469cb762 100644 --- a/include/sys/console.h +++ b/include/sys/console.h @@ -28,17 +28,17 @@ void console_vprintf(const char *fmt, va_list args) { - vprintk(fmt, args); + vprintk(fmt, args); } void console_printf(const char *fmt, ...) { - va_list args; + va_list args; - va_start(args, fmt); - console_vprintf(fmt, args); - va_end(args); + va_start(args, fmt); + console_vprintf(fmt, args); + va_end(args); } #endif /* _SPL_CONSOLE_H */ diff --git a/include/sys/cpupart.h b/include/sys/cpupart.h index 1c3eb00f1..ba57c19e8 100644 --- a/include/sys/cpupart.h +++ b/include/sys/cpupart.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_CPUPART_H -#define _SPL_CPUPART_H +#define _SPL_CPUPART_H #endif /* SPL_CPUPART_H */ diff --git a/include/sys/cpuvar.h b/include/sys/cpuvar.h index d2e48063e..075c06047 100644 --- a/include/sys/cpuvar.h +++ b/include/sys/cpuvar.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_CPUVAR_H -#define _SPL_CPUVAR_H +#define _SPL_CPUVAR_H #endif /* SPL_CPUVAR_H */ diff --git a/include/sys/crc32.h b/include/sys/crc32.h index d974418c8..eb021b1ff 100644 --- a/include/sys/crc32.h +++ b/include/sys/crc32.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_CRC32_H -#define _SPL_CRC32_H +#define _SPL_CRC32_H #endif /* SPL_CRC32_H */ diff --git a/include/sys/cred.h b/include/sys/cred.h index f966ac453..e4b18b665 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_CRED_H -#define _SPL_CRED_H +#define _SPL_CRED_H #include #include @@ -68,7 +68,7 @@ extern gid_t crgetrgid(const cred_t *cr); extern gid_t crgetsgid(const cred_t *cr); extern gid_t crgetfsgid(const cred_t *cr); extern int crgetngroups(const cred_t *cr); -extern gid_t * crgetgroups(const cred_t *cr); +extern gid_t *crgetgroups(const cred_t *cr); extern int groupmember(gid_t gid, const cred_t *cr); #endif /* _SPL_CRED_H */ diff --git a/include/sys/ctype.h b/include/sys/ctype.h index 0a7ee4a8f..18beb1daa 100644 --- a/include/sys/ctype.h +++ b/include/sys/ctype.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_CTYPE_H -#define _SPL_CTYPE_H +#define _SPL_CTYPE_H #include diff --git a/include/sys/ddi.h b/include/sys/ddi.h index 458c13ec8..af2806ee7 100644 --- a/include/sys/ddi.h +++ b/include/sys/ddi.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_DDI_H -#define _SPL_DDI_H +#define _SPL_DDI_H #endif /* SPL_DDI_H */ diff --git a/include/sys/debug.h b/include/sys/debug.h index 5fecaa869..cd78171df 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -54,16 +54,17 @@ int spl_panic(const char *file, const char *func, int line, const char *fmt, ...); void spl_dumpstack(void); +/* BEGIN CSTYLED */ #define PANIC(fmt, a...) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) #define VERIFY(cond) \ - (void)(unlikely(!(cond)) && \ + (void) (unlikely(!(cond)) && \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "%s", "VERIFY(" #cond ") failed\n")) #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ - (void)((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ + (void) ((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (" FMT " " #OP " " FMT ")\n", \ @@ -120,6 +121,7 @@ void spl_dumpstack(void); ((void)((!!(A) == !!(B)) || \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "(" #A ") is equivalent to (" #B ")"))) +/* END CSTYLED */ #endif /* NDEBUG */ diff --git a/include/sys/dirent.h b/include/sys/dirent.h index 3069628da..8237d0dd9 100644 --- a/include/sys/dirent.h +++ b/include/sys/dirent.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_DIRENT_H -#define _SPL_DIRENT_H +#define _SPL_DIRENT_H #endif /* SPL_DIRENT_H */ diff --git a/include/sys/disp.h b/include/sys/disp.h index 1994d53ed..413b623c8 100644 --- a/include/sys/disp.h +++ b/include/sys/disp.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_DISP_H -#define _SPL_DISP_H +#define _SPL_DISP_H #include diff --git a/include/sys/dkioc_free_util.h b/include/sys/dkioc_free_util.h index 579bf503f..d519b2f8e 100644 --- a/include/sys/dkioc_free_util.h +++ b/include/sys/dkioc_free_util.h @@ -52,7 +52,7 @@ static inline void dfl_free(dkioc_free_list_t *dfl) { } static inline dkioc_free_list_t *dfl_alloc(uint64_t dfl_num_exts, int flags) { - return vmem_zalloc(DFL_SZ(dfl_num_exts), flags); + return (vmem_zalloc(DFL_SZ(dfl_num_exts), flags)); } #endif /* _SPL_DKIOC_UTIL_H */ diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h index 20850c82e..cda112c18 100644 --- a/include/sys/dnlc.h +++ b/include/sys/dnlc.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_DNLC_H -#define _SPL_DNLC_H +#define _SPL_DNLC_H #endif /* SPL_DNLC_H */ diff --git a/include/sys/dumphdr.h b/include/sys/dumphdr.h index dfb0585d1..a452fe35d 100644 --- a/include/sys/dumphdr.h +++ b/include/sys/dumphdr.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_DUMPHDR_H -#define _SPL_DUMPHDR_H +#define _SPL_DUMPHDR_H #endif /* SPL_DUMPHDR_H */ diff --git a/include/sys/efi_partition.h b/include/sys/efi_partition.h index 6c4bb201e..d0c9c2005 100644 --- a/include/sys/efi_partition.h +++ b/include/sys/efi_partition.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_EFI_PARTITION_H -#define _SPL_EFI_PARTITION_H +#define _SPL_EFI_PARTITION_H #endif /* SPL_EFI_PARTITION_H */ diff --git a/include/sys/errno.h b/include/sys/errno.h index 92b2cde6c..2dd378bc8 100644 --- a/include/sys/errno.h +++ b/include/sys/errno.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_ERRNO_H -#define _SPL_ERRNO_H +#define _SPL_ERRNO_H #endif /* SPL_ERRNO_H */ diff --git a/include/sys/fcntl.h b/include/sys/fcntl.h index bf5bf0323..3faa5dad7 100644 --- a/include/sys/fcntl.h +++ b/include/sys/fcntl.h @@ -22,11 +22,11 @@ */ #ifndef _SPL_FCNTL_H -#define _SPL_FCNTL_H +#define _SPL_FCNTL_H #include -#define F_FREESP 11 +#define F_FREESP 11 #ifdef CONFIG_64BIT typedef struct flock flock64_t; diff --git a/include/sys/file.h b/include/sys/file.h index 4990e0505..b6c40aff2 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_FILE_H -#define _SPL_FILE_H +#define _SPL_FILE_H #define FIGNORECASE 0x00080000 #define FKIOCTL 0x80000000 diff --git a/include/sys/fs/swapnode.h b/include/sys/fs/swapnode.h index dd18f3343..1fa5fdc83 100644 --- a/include/sys/fs/swapnode.h +++ b/include/sys/fs/swapnode.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_SWAPNODE_H -#define _SPL_SWAPNODE_H +#define _SPL_SWAPNODE_H #endif /* SPL_SWAPNODE_H */ diff --git a/include/sys/idmap.h b/include/sys/idmap.h index aad96439f..abbfcbed1 100644 --- a/include/sys/idmap.h +++ b/include/sys/idmap.h @@ -22,8 +22,8 @@ */ #ifndef _SPL_IDMAP_H -#define _SPL_IDMAP_H +#define _SPL_IDMAP_H -#define IDMAP_WK_CREATOR_OWNER_UID 2147483648U +#define IDMAP_WK_CREATOR_OWNER_UID 2147483648U #endif /* SPL_IDMAP_H */ diff --git a/include/sys/int_limits.h b/include/sys/int_limits.h index d9e775973..5d7e9be89 100644 --- a/include/sys/int_limits.h +++ b/include/sys/int_limits.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_INT_LIMITS_H -#define _SPL_INT_LIMITS_H +#define _SPL_INT_LIMITS_H #endif /* SPL_INT_LIMITS_H */ diff --git a/include/sys/int_types.h b/include/sys/int_types.h index 2345205ea..7e3b7329f 100644 --- a/include/sys/int_types.h +++ b/include/sys/int_types.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_INT_TYPES_H -#define _SPL_INT_TYPES_H +#define _SPL_INT_TYPES_H #include diff --git a/include/sys/inttypes.h b/include/sys/inttypes.h index 98e25110e..92e76206b 100644 --- a/include/sys/inttypes.h +++ b/include/sys/inttypes.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_INTTYPES_H -#define _SPL_INTTYPES_H +#define _SPL_INTTYPES_H #endif /* SPL_INTTYPES_H */ diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 6aa78e84c..089ae0f85 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -29,59 +29,59 @@ #if defined(__x86_64) || defined(__x86_64__) #if !defined(__x86_64) -#define __x86_64 +#define __x86_64 #endif #if !defined(__amd64) -#define __amd64 +#define __amd64 #endif #if !defined(__x86) -#define __x86 +#define __x86 #endif #if !defined(_LP64) -#define _LP64 +#define _LP64 #endif -#define _ALIGNMENT_REQUIRED 1 +#define _ALIGNMENT_REQUIRED 1 /* i386 arch specific defines */ #elif defined(__i386) || defined(__i386__) #if !defined(__i386) -#define __i386 +#define __i386 #endif #if !defined(__x86) -#define __x86 +#define __x86 #endif #if !defined(_ILP32) -#define _ILP32 +#define _ILP32 #endif -#define _ALIGNMENT_REQUIRED 0 +#define _ALIGNMENT_REQUIRED 0 /* powerpc (ppc64) arch specific defines */ #elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__) #if !defined(__powerpc) -#define __powerpc +#define __powerpc #endif #if !defined(__powerpc__) -#define __powerpc__ +#define __powerpc__ #endif #if defined(__powerpc64__) #if !defined(_LP64) -#define _LP64 +#define _LP64 #endif #else #if !defined(_ILP32) -#define _ILP32 +#define _ILP32 #endif #endif @@ -89,65 +89,65 @@ * Illumos doesn't define _ALIGNMENT_REQUIRED for PPC, so default to 1 * out of paranoia. */ -#define _ALIGNMENT_REQUIRED 1 +#define _ALIGNMENT_REQUIRED 1 /* arm arch specific defines */ #elif defined(__arm) || defined(__arm__) || defined(__aarch64__) #if !defined(__arm) -#define __arm +#define __arm #endif #if !defined(__arm__) -#define __arm__ +#define __arm__ #endif #if defined(__aarch64__) #if !defined(_LP64) -#define _LP64 +#define _LP64 #endif #else #if !defined(_ILP32) -#define _ILP32 +#define _ILP32 #endif #endif #if defined(__ARMEL__) || defined(__AARCH64EL__) -#define _LITTLE_ENDIAN +#define _LITTLE_ENDIAN #else -#define _BIG_ENDIAN +#define _BIG_ENDIAN #endif /* * Illumos doesn't define _ALIGNMENT_REQUIRED for ARM, so default to 1 * out of paranoia. */ -#define _ALIGNMENT_REQUIRED 1 +#define _ALIGNMENT_REQUIRED 1 /* sparc arch specific defines */ #elif defined(__sparc) || defined(__sparc__) #if !defined(__sparc) -#define __sparc +#define __sparc #endif #if !defined(__sparc__) -#define __sparc__ +#define __sparc__ #endif #if defined(__arch64__) #if !defined(_LP64) -#define _LP64 +#define _LP64 #endif #else #if !defined(_ILP32) -#define _ILP32 +#define _ILP32 #endif #endif -#define _BIG_ENDIAN -#define _SUNOS_VTOC_16 -#define _ALIGNMENT_REQUIRED 1 +#define _BIG_ENDIAN +#define _SUNOS_VTOC_16 +#define _ALIGNMENT_REQUIRED 1 /* s390 arch specific defines */ #elif defined(__s390__) @@ -167,7 +167,7 @@ * Illumos doesn't define _ALIGNMENT_REQUIRED for s390, so default to 1 * out of paranoia. */ -#define _ALIGNMENT_REQUIRED 1 +#define _ALIGNMENT_REQUIRED 1 /* MIPS arch specific defines */ #elif defined(__mips__) @@ -190,7 +190,7 @@ * Illumos doesn't define _ALIGNMENT_REQUIRED for MIPS, so default to 1 * out of paranoia. */ -#define _ALIGNMENT_REQUIRED 1 +#define _ALIGNMENT_REQUIRED 1 #else /* @@ -211,11 +211,11 @@ #include #if defined(__LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN) -#define _LITTLE_ENDIAN __LITTLE_ENDIAN +#define _LITTLE_ENDIAN __LITTLE_ENDIAN #endif #if defined(__BIG_ENDIAN) && !defined(_BIG_ENDIAN) -#define _BIG_ENDIAN __BIG_ENDIAN +#define _BIG_ENDIAN __BIG_ENDIAN #endif #if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) diff --git a/include/sys/kidmap.h b/include/sys/kidmap.h index 21e5e8f99..a5e6375c3 100644 --- a/include/sys/kidmap.h +++ b/include/sys/kidmap.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_KIDMAP_H -#define _SPL_KIDMAP_H +#define _SPL_KIDMAP_H #include diff --git a/include/sys/kobj.h b/include/sys/kobj.h index d133091e1..558ec39a8 100644 --- a/include/sys/kobj.h +++ b/include/sys/kobj.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_KOBJ_H -#define _SPL_KOBJ_H +#define _SPL_KOBJ_H #include diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 85909fc1f..e9aff7386 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_KSTAT_H -#define _SPL_KSTAT_H +#define _SPL_KSTAT_H #include #include @@ -32,63 +32,65 @@ #include #include -#define KSTAT_STRLEN 255 -#define KSTAT_RAW_MAX (128*1024) +#define KSTAT_STRLEN 255 +#define KSTAT_RAW_MAX (128*1024) -/* For reference valid classes are: +/* + * For reference valid classes are: * disk, tape, net, controller, vm, kvm, hat, streams, kstat, misc */ -#define KSTAT_TYPE_RAW 0 /* can be anything; ks_ndata >= 1 */ -#define KSTAT_TYPE_NAMED 1 /* name/value pair; ks_ndata >= 1 */ -#define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */ -#define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */ -#define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */ -#define KSTAT_NUM_TYPES 5 +#define KSTAT_TYPE_RAW 0 /* can be anything; ks_ndata >= 1 */ +#define KSTAT_TYPE_NAMED 1 /* name/value pair; ks_ndata >= 1 */ +#define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */ +#define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */ +#define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */ +#define KSTAT_NUM_TYPES 5 -#define KSTAT_DATA_CHAR 0 -#define KSTAT_DATA_INT32 1 -#define KSTAT_DATA_UINT32 2 -#define KSTAT_DATA_INT64 3 -#define KSTAT_DATA_UINT64 4 -#define KSTAT_DATA_LONG 5 -#define KSTAT_DATA_ULONG 6 -#define KSTAT_DATA_STRING 7 -#define KSTAT_NUM_DATAS 8 +#define KSTAT_DATA_CHAR 0 +#define KSTAT_DATA_INT32 1 +#define KSTAT_DATA_UINT32 2 +#define KSTAT_DATA_INT64 3 +#define KSTAT_DATA_UINT64 4 +#define KSTAT_DATA_LONG 5 +#define KSTAT_DATA_ULONG 6 +#define KSTAT_DATA_STRING 7 +#define KSTAT_NUM_DATAS 8 -#define KSTAT_INTR_HARD 0 -#define KSTAT_INTR_SOFT 1 -#define KSTAT_INTR_WATCHDOG 2 -#define KSTAT_INTR_SPURIOUS 3 -#define KSTAT_INTR_MULTSVC 4 -#define KSTAT_NUM_INTRS 5 +#define KSTAT_INTR_HARD 0 +#define KSTAT_INTR_SOFT 1 +#define KSTAT_INTR_WATCHDOG 2 +#define KSTAT_INTR_SPURIOUS 3 +#define KSTAT_INTR_MULTSVC 4 +#define KSTAT_NUM_INTRS 5 -#define KSTAT_FLAG_VIRTUAL 0x01 -#define KSTAT_FLAG_VAR_SIZE 0x02 -#define KSTAT_FLAG_WRITABLE 0x04 -#define KSTAT_FLAG_PERSISTENT 0x08 -#define KSTAT_FLAG_DORMANT 0x10 -#define KSTAT_FLAG_UNSUPPORTED (KSTAT_FLAG_VAR_SIZE | KSTAT_FLAG_WRITABLE | \ - KSTAT_FLAG_PERSISTENT | KSTAT_FLAG_DORMANT) +#define KSTAT_FLAG_VIRTUAL 0x01 +#define KSTAT_FLAG_VAR_SIZE 0x02 +#define KSTAT_FLAG_WRITABLE 0x04 +#define KSTAT_FLAG_PERSISTENT 0x08 +#define KSTAT_FLAG_DORMANT 0x10 +#define KSTAT_FLAG_UNSUPPORTED \ + (KSTAT_FLAG_VAR_SIZE | KSTAT_FLAG_WRITABLE | \ + KSTAT_FLAG_PERSISTENT | KSTAT_FLAG_DORMANT) -#define KS_MAGIC 0x9d9d9d9d +#define KS_MAGIC 0x9d9d9d9d /* Dynamic updates */ -#define KSTAT_READ 0 -#define KSTAT_WRITE 1 +#define KSTAT_READ 0 +#define KSTAT_WRITE 1 struct kstat_s; typedef struct kstat_s kstat_t; -typedef int kid_t; /* unique kstat id */ -typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */ +typedef int kid_t; /* unique kstat id */ +typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */ typedef struct kstat_module { - char ksm_name[KSTAT_STRLEN+1]; /* module name */ - struct list_head ksm_module_list; /* module linkage */ - struct list_head ksm_kstat_list; /* list of kstat entries */ - struct proc_dir_entry *ksm_proc; /* proc entry */ + char ksm_name[KSTAT_STRLEN+1]; /* module name */ + struct list_head ksm_module_list; /* module linkage */ + struct list_head ksm_kstat_list; /* list of kstat entries */ + struct proc_dir_entry *ksm_proc; /* proc entry */ } kstat_module_t; typedef struct kstat_raw_ops { @@ -98,95 +100,96 @@ typedef struct kstat_raw_ops { } kstat_raw_ops_t; struct kstat_s { - int ks_magic; /* magic value */ - kid_t ks_kid; /* unique kstat ID */ - hrtime_t ks_crtime; /* creation time */ - hrtime_t ks_snaptime; /* last access time */ - char ks_module[KSTAT_STRLEN+1]; /* provider module name */ - int ks_instance; /* provider module instance */ - char ks_name[KSTAT_STRLEN+1]; /* kstat name */ - char ks_class[KSTAT_STRLEN+1]; /* kstat class */ - uchar_t ks_type; /* kstat data type */ - uchar_t ks_flags; /* kstat flags */ - void *ks_data; /* kstat type-specific data */ - uint_t ks_ndata; /* # of type-specific data records */ - size_t ks_data_size; /* size of kstat data section */ - struct proc_dir_entry *ks_proc; /* proc linkage */ - kstat_update_t *ks_update; /* dynamic updates */ - void *ks_private; /* private data */ - kmutex_t ks_private_lock; /* kstat private data lock */ - kmutex_t *ks_lock; /* kstat data lock */ - struct list_head ks_list; /* kstat linkage */ - kstat_module_t *ks_owner; /* kstat module linkage */ - kstat_raw_ops_t ks_raw_ops; /* ops table for raw type */ - char *ks_raw_buf; /* buf used for raw ops */ - size_t ks_raw_bufsize; /* size of raw ops buffer */ + int ks_magic; /* magic value */ + kid_t ks_kid; /* unique kstat ID */ + hrtime_t ks_crtime; /* creation time */ + hrtime_t ks_snaptime; /* last access time */ + char ks_module[KSTAT_STRLEN+1]; /* provider module name */ + int ks_instance; /* provider module instance */ + char ks_name[KSTAT_STRLEN+1]; /* kstat name */ + char ks_class[KSTAT_STRLEN+1]; /* kstat class */ + uchar_t ks_type; /* kstat data type */ + uchar_t ks_flags; /* kstat flags */ + void *ks_data; /* kstat type-specific data */ + uint_t ks_ndata; /* # of data records */ + size_t ks_data_size; /* size of kstat data section */ + struct proc_dir_entry *ks_proc; /* proc linkage */ + kstat_update_t *ks_update; /* dynamic updates */ + void *ks_private; /* private data */ + kmutex_t ks_private_lock; /* kstat private data lock */ + kmutex_t *ks_lock; /* kstat data lock */ + struct list_head ks_list; /* kstat linkage */ + kstat_module_t *ks_owner; /* kstat module linkage */ + kstat_raw_ops_t ks_raw_ops; /* ops table for raw type */ + char *ks_raw_buf; /* buf used for raw ops */ + size_t ks_raw_bufsize; /* size of raw ops buffer */ }; typedef struct kstat_named_s { - char name[KSTAT_STRLEN]; /* name of counter */ - uchar_t data_type; /* data type */ - union { - char c[16]; /* 128-bit int */ - int32_t i32; /* 32-bit signed int */ - uint32_t ui32; /* 32-bit unsigned int */ - int64_t i64; /* 64-bit signed int */ - uint64_t ui64; /* 64-bit unsigned int */ - long l; /* native signed long */ - ulong_t ul; /* native unsigned long */ - struct { - union { - char *ptr; /* NULL-term string */ - char __pad[8]; /* 64-bit padding */ - } addr; - uint32_t len; /* # bytes for strlen + '\0' */ - } string; - } value; + char name[KSTAT_STRLEN]; /* name of counter */ + uchar_t data_type; /* data type */ + union { + char c[16]; /* 128-bit int */ + int32_t i32; /* 32-bit signed int */ + uint32_t ui32; /* 32-bit unsigned int */ + int64_t i64; /* 64-bit signed int */ + uint64_t ui64; /* 64-bit unsigned int */ + long l; /* native signed long */ + ulong_t ul; /* native unsigned long */ + struct { + union { + char *ptr; /* NULL-term string */ + char __pad[8]; /* 64-bit padding */ + } addr; + uint32_t len; /* # bytes for strlen + '\0' */ + } string; + } value; } kstat_named_t; -#define KSTAT_NAMED_STR_PTR(knptr) ((knptr)->value.string.addr.ptr) -#define KSTAT_NAMED_STR_BUFLEN(knptr) ((knptr)->value.string.len) +#define KSTAT_NAMED_STR_PTR(knptr) ((knptr)->value.string.addr.ptr) +#define KSTAT_NAMED_STR_BUFLEN(knptr) ((knptr)->value.string.len) typedef struct kstat_intr { - uint_t intrs[KSTAT_NUM_INTRS]; + uint_t intrs[KSTAT_NUM_INTRS]; } kstat_intr_t; typedef struct kstat_io { - u_longlong_t nread; /* number of bytes read */ - u_longlong_t nwritten; /* number of bytes written */ - uint_t reads; /* number of read operations */ - uint_t writes; /* number of write operations */ - hrtime_t wtime; /* cumulative wait (pre-service) time */ - hrtime_t wlentime; /* cumulative wait length*time product*/ - hrtime_t wlastupdate; /* last time wait queue changed */ - hrtime_t rtime; /* cumulative run (service) time */ - hrtime_t rlentime; /* cumulative run length*time product */ - hrtime_t rlastupdate; /* last time run queue changed */ - uint_t wcnt; /* count of elements in wait state */ - uint_t rcnt; /* count of elements in run state */ + u_longlong_t nread; /* number of bytes read */ + u_longlong_t nwritten; /* number of bytes written */ + uint_t reads; /* number of read operations */ + uint_t writes; /* number of write operations */ + hrtime_t wtime; /* cumulative wait (pre-service) time */ + hrtime_t wlentime; /* cumulative wait len*time product */ + hrtime_t wlastupdate; /* last time wait queue changed */ + hrtime_t rtime; /* cumulative run (service) time */ + hrtime_t rlentime; /* cumulative run length*time product */ + hrtime_t rlastupdate; /* last time run queue changed */ + uint_t wcnt; /* count of elements in wait state */ + uint_t rcnt; /* count of elements in run state */ } kstat_io_t; typedef struct kstat_timer { - char name[KSTAT_STRLEN+1]; /* event name */ - u_longlong_t num_events; /* number of events */ - hrtime_t elapsed_time; /* cumulative elapsed time */ - hrtime_t min_time; /* shortest event duration */ - hrtime_t max_time; /* longest event duration */ - hrtime_t start_time; /* previous event start time */ - hrtime_t stop_time; /* previous event stop time */ + char name[KSTAT_STRLEN+1]; /* event name */ + u_longlong_t num_events; /* number of events */ + hrtime_t elapsed_time; /* cumulative elapsed time */ + hrtime_t min_time; /* shortest event duration */ + hrtime_t max_time; /* longest event duration */ + hrtime_t start_time; /* previous event start time */ + hrtime_t stop_time; /* previous event stop time */ } kstat_timer_t; int spl_kstat_init(void); void spl_kstat_fini(void); extern void __kstat_set_raw_ops(kstat_t *ksp, - int (*headers)(char *buf, size_t size), - int (*data)(char *buf, size_t size, void *data), - void* (*addr)(kstat_t *ksp, loff_t index)); + int (*headers)(char *buf, size_t size), + int (*data)(char *buf, size_t size, void *data), + void* (*addr)(kstat_t *ksp, loff_t index)); + extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, - const char *ks_name, const char *ks_class, - uchar_t ks_type, uint_t ks_ndata, - uchar_t ks_flags); + const char *ks_name, const char *ks_class, uchar_t ks_type, + uint_t ks_ndata, uchar_t ks_flags); + extern void __kstat_install(kstat_t *ksp); extern void __kstat_delete(kstat_t *ksp); extern void kstat_waitq_enter(kstat_io_t *); @@ -194,9 +197,12 @@ extern void kstat_waitq_exit(kstat_io_t *); extern void kstat_runq_enter(kstat_io_t *); extern void kstat_runq_exit(kstat_io_t *); -#define kstat_set_raw_ops(k,h,d,a) __kstat_set_raw_ops(k,h,d,a) -#define kstat_create(m,i,n,c,t,s,f) __kstat_create(m,i,n,c,t,s,f) -#define kstat_install(k) __kstat_install(k) -#define kstat_delete(k) __kstat_delete(k) +#define kstat_set_raw_ops(k, h, d, a) \ + __kstat_set_raw_ops(k, h, d, a) +#define kstat_create(m, i, n, c, t, s, f) \ + __kstat_create(m, i, n, c, t, s, f) + +#define kstat_install(k) __kstat_install(k) +#define kstat_delete(k) __kstat_delete(k) #endif /* _SPL_KSTAT_H */ diff --git a/include/sys/list.h b/include/sys/list.h index 319e1f890..d80c8474e 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_LIST_H -#define _SPL_LIST_H +#define _SPL_LIST_H #include #include @@ -53,13 +53,13 @@ typedef struct list { list_node_t list_head; } list_t; -#define list_d2l(a, obj) ((list_node_t *)(((char *)obj) + (a)->list_offset)) -#define list_object(a, node) ((void *)(((char *)node) - (a)->list_offset)) +#define list_d2l(a, obj) ((list_node_t *)(((char *)obj) + (a)->list_offset)) +#define list_object(a, node) ((void *)(((char *)node) - (a)->list_offset)) static inline int list_is_empty(list_t *list) { - return list_empty(&list->list_head); + return (list_empty(&list->list_head)); } static inline void @@ -74,7 +74,7 @@ list_create(list_t *list, size_t size, size_t offset) { ASSERT(list); ASSERT(size > 0); - ASSERT(size >= offset + sizeof(list_node_t)); + ASSERT(size >= offset + sizeof (list_node_t)); list->list_size = size; list->list_offset = offset; @@ -132,10 +132,10 @@ list_remove_head(list_t *list) { list_node_t *head = list->list_head.next; if (head == &list->list_head) - return NULL; + return (NULL); list_del(head); - return list_object(list, head); + return (list_object(list, head)); } static inline void * @@ -143,28 +143,28 @@ list_remove_tail(list_t *list) { list_node_t *tail = list->list_head.prev; if (tail == &list->list_head) - return NULL; + return (NULL); list_del(tail); - return list_object(list, tail); + return (list_object(list, tail)); } static inline void * list_head(list_t *list) { if (list_is_empty(list)) - return NULL; + return (NULL); - return list_object(list, list->list_head.next); + return (list_object(list, list->list_head.next)); } static inline void * list_tail(list_t *list) { if (list_is_empty(list)) - return NULL; + return (NULL); - return list_object(list, list->list_head.prev); + return (list_object(list, list->list_head.prev)); } static inline void * @@ -173,9 +173,9 @@ list_next(list_t *list, void *object) list_node_t *node = list_d2l(list, object); if (node->next != &list->list_head) - return list_object(list, node->next); + return (list_object(list, node->next)); - return NULL; + return (NULL); } static inline void * @@ -184,9 +184,9 @@ list_prev(list_t *list, void *object) list_node_t *node = list_d2l(list, object); if (node->prev != &list->list_head) - return list_object(list, node->prev); + return (list_object(list, node->prev)); - return NULL; + return (NULL); } static inline int @@ -201,7 +201,7 @@ spl_list_move_tail(list_t *dst, list_t *src) list_splice_init(&src->list_head, dst->list_head.prev); } -#define list_move_tail(dst, src) spl_list_move_tail(dst, src) +#define list_move_tail(dst, src) spl_list_move_tail(dst, src) static inline void list_link_replace(list_node_t *old_node, list_node_t *new_node) diff --git a/include/sys/mkdev.h b/include/sys/mkdev.h index e63d09f7c..7dff2d22d 100644 --- a/include/sys/mkdev.h +++ b/include/sys/mkdev.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_MKDEV_H -#define _SPL_MKDEV_H +#define _SPL_MKDEV_H #endif /* SPL_MKDEV_H */ diff --git a/include/sys/mntent.h b/include/sys/mntent.h index 4ca1b346a..cac28c530 100644 --- a/include/sys/mntent.h +++ b/include/sys/mntent.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_MNTENT_H -#define _SPL_MNTENT_H +#define _SPL_MNTENT_H #endif /* SPL_MNTENT_H */ diff --git a/include/sys/modctl.h b/include/sys/modctl.h index f234c45ed..8f9ae496d 100644 --- a/include/sys/modctl.h +++ b/include/sys/modctl.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_MODCTL_H -#define _SPL_MODCTL_H +#define _SPL_MODCTL_H #endif /* SPL_MODCTL_H */ diff --git a/include/sys/mode.h b/include/sys/mode.h index a9cf0da59..02802d0d4 100644 --- a/include/sys/mode.h +++ b/include/sys/mode.h @@ -23,10 +23,10 @@ */ #ifndef _SPL_MODE_H -#define _SPL_MODE_H +#define _SPL_MODE_H -#define IFTOVT(mode) vn_mode_to_vtype(mode) -#define VTTOIF(vtype) vn_vtype_to_mode(vtype) -#define MAKEIMODE(T, M) (VTTOIF(T) | ((M) & ~S_IFMT)) +#define IFTOVT(mode) vn_mode_to_vtype(mode) +#define VTTOIF(vtype) vn_vtype_to_mode(vtype) +#define MAKEIMODE(T, M) (VTTOIF(T) | ((M) & ~S_IFMT)) #endif /* SPL_MODE_H */ diff --git a/include/sys/mount.h b/include/sys/mount.h index 17eb1af57..fdd1c6678 100644 --- a/include/sys/mount.h +++ b/include/sys/mount.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_MOUNT_H -#define _SPL_MOUNT_H +#define _SPL_MOUNT_H #endif /* SPL_MOUNT_H */ diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 8cbab7c47..c7084b3c3 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -84,13 +84,13 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \ lockdep_on(); \ } #else /* CONFIG_LOCKDEP */ -#define spl_mutex_set_type(mp, type) -#define spl_mutex_lockdep_off_maybe(mp) -#define spl_mutex_lockdep_on_maybe(mp) +#define spl_mutex_set_type(mp, type) +#define spl_mutex_lockdep_off_maybe(mp) +#define spl_mutex_lockdep_on_maybe(mp) #endif /* CONFIG_LOCKDEP */ /* - * The following functions must be a #define and not static inline. + * The following functions must be a #define and not static inline. * This ensures that the native linux mutex functions (lock/unlock) * will be correctly located in the users code which is important * for the built in kernel lock analysis tools @@ -113,6 +113,7 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \ VERIFY3P(mutex_owner(mp), ==, NULL); \ } +/* BEGIN CSTYLED */ #define mutex_tryenter(mp) \ ({ \ int _rc_; \ @@ -124,6 +125,7 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \ \ _rc_; \ }) +/* END CSTYLED */ #ifdef CONFIG_DEBUG_LOCK_ALLOC #define mutex_enter_nested(mp, subclass) \ diff --git a/include/sys/note.h b/include/sys/note.h index 0c3386912..f7f9b70ef 100644 --- a/include/sys/note.h +++ b/include/sys/note.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_NOTE_H -#define _SPL_NOTE_H +#define _SPL_NOTE_H #endif /* SPL_NOTE_H */ diff --git a/include/sys/open.h b/include/sys/open.h index 201bbeb56..7c9e0cb7a 100644 --- a/include/sys/open.h +++ b/include/sys/open.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_OPEN_H -#define _SPL_OPEN_H +#define _SPL_OPEN_H #endif /* SPL_OPEN_H */ diff --git a/include/sys/param.h b/include/sys/param.h index 10bf96588..4ef929151 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -23,14 +23,14 @@ */ #ifndef _SPL_PARAM_H -#define _SPL_PARAM_H +#define _SPL_PARAM_H #include /* Pages to bytes and back */ -#define ptob(pages) ((pages) << PAGE_SHIFT) -#define btop(bytes) ((bytes) >> PAGE_SHIFT) +#define ptob(pages) ((pages) << PAGE_SHIFT) +#define btop(bytes) ((bytes) >> PAGE_SHIFT) -#define MAXUID UINT32_MAX +#define MAXUID UINT32_MAX #endif /* SPL_PARAM_H */ diff --git a/include/sys/pathname.h b/include/sys/pathname.h index 2806ce38b..fde1b3c1e 100644 --- a/include/sys/pathname.h +++ b/include/sys/pathname.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_PATHNAME_H -#define _SPL_PATHNAME_H +#define _SPL_PATHNAME_H typedef struct pathname { char *pn_buf; /* underlying storage */ diff --git a/include/sys/policy.h b/include/sys/policy.h index 6f40a0175..e4333cfcf 100644 --- a/include/sys/policy.h +++ b/include/sys/policy.h @@ -23,25 +23,25 @@ */ #ifndef _SPL_POLICY_H -#define _SPL_POLICY_H +#define _SPL_POLICY_H -#define secpolicy_fs_unmount(c,vfs) (0) +#define secpolicy_fs_unmount(c, vfs) (0) #define secpolicy_nfs(c) (0) -#define secpolicy_sys_config(c,co) (0) +#define secpolicy_sys_config(c, co) (0) #define secpolicy_zfs(c) (0) #define secpolicy_zinject(c) (0) -#define secpolicy_vnode_setids_setgids(c,id) (0) +#define secpolicy_vnode_setids_setgids(c, id) (0) #define secpolicy_vnode_setid_retain(c, sr) (0) #define secpolicy_setid_clear(v, c) (0) -#define secpolicy_vnode_any_access(c,vp,o) (0) -#define secpolicy_vnode_access2(c,cp,o,m1,m2) (0) -#define secpolicy_vnode_chown(c,o) (0) -#define secpolicy_vnode_setdac(c,o) (0) +#define secpolicy_vnode_any_access(c, vp, o) (0) +#define secpolicy_vnode_access2(c, cp, o, m1, m2) (0) +#define secpolicy_vnode_chown(c, o) (0) +#define secpolicy_vnode_setdac(c, o) (0) #define secpolicy_vnode_remove(c) (0) -#define secpolicy_vnode_setattr(c,v,a,o,f,func,n) (0) +#define secpolicy_vnode_setattr(c, v, a, o, f, func, n) (0) #define secpolicy_xvattr(x, o, c, t) (0) #define secpolicy_vnode_stky_modify(c) (0) -#define secpolicy_setid_setsticky_clear(v,a,o,c) (0) +#define secpolicy_setid_setsticky_clear(v, a, o, c) (0) #define secpolicy_basic_link(c) (0) #endif /* SPL_POLICY_H */ diff --git a/include/sys/pool.h b/include/sys/pool.h index 9addd2c53..392c14b5e 100644 --- a/include/sys/pool.h +++ b/include/sys/pool.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_POOL_H -#define _SPL_POOL_H +#define _SPL_POOL_H #include diff --git a/include/sys/priv_impl.h b/include/sys/priv_impl.h index 4d6640c8d..822c2dec1 100644 --- a/include/sys/priv_impl.h +++ b/include/sys/priv_impl.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_PRIV_IMPL_H -#define _SPL_PRIV_IMPL_H +#define _SPL_PRIV_IMPL_H #endif /* _SPL_PRIV_IMPL_H */ diff --git a/include/sys/proc.h b/include/sys/proc.h index 5e2989610..95fc8cc5f 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_PROC_H -#define _SPL_PROC_H +#define _SPL_PROC_H #endif /* SPL_PROC_H */ diff --git a/include/sys/processor.h b/include/sys/processor.h index de0395e5a..a70101fa2 100644 --- a/include/sys/processor.h +++ b/include/sys/processor.h @@ -25,7 +25,7 @@ #ifndef _SPL_PROCESSOR_H #define _SPL_PROCESSOR_H -#define getcpuid() smp_processor_id() +#define getcpuid() smp_processor_id() typedef int processorid_t; diff --git a/include/sys/pset.h b/include/sys/pset.h index 58841e77d..a6a9d343b 100644 --- a/include/sys/pset.h +++ b/include/sys/pset.h @@ -23,16 +23,16 @@ */ #ifndef _SPL_PSET_H -#define _SPL_PSET_H +#define _SPL_PSET_H typedef int psetid_t; /* special processor set id's */ -#define PS_NONE -1 -#define PS_QUERY -2 -#define PS_MYID -3 -#define PS_SOFT -4 -#define PS_HARD -5 -#define PS_QUERY_TYPE -6 +#define PS_NONE -1 +#define PS_QUERY -2 +#define PS_MYID -3 +#define PS_SOFT -4 +#define PS_HARD -5 +#define PS_QUERY_TYPE -6 #endif /* SPL_PSET_H */ diff --git a/include/sys/random.h b/include/sys/random.h index a3f2933e1..93e244f56 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -31,8 +31,8 @@ static __inline__ int random_get_bytes(uint8_t *ptr, size_t len) { - get_random_bytes((void *)ptr,(int)len); - return 0; + get_random_bytes((void *)ptr, (int)len); + return (0); } extern int random_get_pseudo_bytes(uint8_t *ptr, size_t len); diff --git a/include/sys/refstr.h b/include/sys/refstr.h index 7fe8a0360..1b54dab45 100644 --- a/include/sys/refstr.h +++ b/include/sys/refstr.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_REFSTR_H -#define _SPL_REFSTR_H +#define _SPL_REFSTR_H #endif /* SPL_REFSTR_H */ diff --git a/include/sys/resource.h b/include/sys/resource.h index dfc6e28f4..d1ffb6c2d 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_RESOURCE_H -#define _SPL_RESOURCE_H +#define _SPL_RESOURCE_H #include diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index e806bdc9d..bb8b785e8 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_RWLOCK_H -#define _SPL_RWLOCK_H +#define _SPL_RWLOCK_H #include #include @@ -55,7 +55,7 @@ typedef struct { #endif /* CONFIG_LOCKDEP */ } krwlock_t; -#define SEM(rwp) (&(rwp)->rw_rwlock) +#define SEM(rwp) (&(rwp)->rw_rwlock) static inline void spl_rw_set_owner(krwlock_t *rwp) @@ -81,9 +81,9 @@ static inline kthread_t * rw_owner(krwlock_t *rwp) { #ifdef CONFIG_RWSEM_SPIN_ON_OWNER - return SEM(rwp)->owner; + return (SEM(rwp)->owner); #else - return rwp->rw_owner; + return (rwp->rw_owner); #endif } @@ -106,9 +106,9 @@ spl_rw_lockdep_on_maybe(krwlock_t *rwp) \ lockdep_on(); \ } #else /* CONFIG_LOCKDEP */ -#define spl_rw_set_type(rwp, type) -#define spl_rw_lockdep_off_maybe(rwp) -#define spl_rw_lockdep_on_maybe(rwp) +#define spl_rw_set_type(rwp, type) +#define spl_rw_lockdep_off_maybe(rwp) +#define spl_rw_lockdep_on_maybe(rwp) #endif /* CONFIG_LOCKDEP */ static inline int @@ -131,16 +131,17 @@ RW_WRITE_HELD(krwlock_t *rwp) static inline int RW_LOCK_HELD(krwlock_t *rwp) { - return spl_rwsem_is_locked(SEM(rwp)); + return (spl_rwsem_is_locked(SEM(rwp))); } /* - * The following functions must be a #define and not static inline. + * The following functions must be a #define and not static inline. * This ensures that the native linux semaphore functions (down/up) * will be correctly located in the users code which is important * for the built in kernel lock analysis tools */ -#define rw_init(rwp, name, type, arg) \ +/* BEGIN CSTYLED */ +#define rw_init(rwp, name, type, arg) \ ({ \ static struct lock_class_key __key; \ ASSERT(type == RW_DEFAULT || type == RW_NOLOCKDEP); \ @@ -150,12 +151,12 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_set_type(rwp, type); \ }) -#define rw_destroy(rwp) \ +#define rw_destroy(rwp) \ ({ \ VERIFY(!RW_LOCK_HELD(rwp)); \ }) -#define rw_tryenter(rwp, rw) \ +#define rw_tryenter(rwp, rw) \ ({ \ int _rc_ = 0; \ \ @@ -175,7 +176,7 @@ RW_LOCK_HELD(krwlock_t *rwp) _rc_; \ }) -#define rw_enter(rwp, rw) \ +#define rw_enter(rwp, rw) \ ({ \ spl_rw_lockdep_off_maybe(rwp); \ switch (rw) { \ @@ -192,7 +193,7 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_lockdep_on_maybe(rwp); \ }) -#define rw_exit(rwp) \ +#define rw_exit(rwp) \ ({ \ spl_rw_lockdep_off_maybe(rwp); \ if (RW_WRITE_HELD(rwp)) { \ @@ -205,7 +206,7 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_lockdep_on_maybe(rwp); \ }) -#define rw_downgrade(rwp) \ +#define rw_downgrade(rwp) \ ({ \ spl_rw_lockdep_off_maybe(rwp); \ spl_rw_clear_owner(rwp); \ @@ -213,7 +214,7 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_lockdep_on_maybe(rwp); \ }) -#define rw_tryupgrade(rwp) \ +#define rw_tryupgrade(rwp) \ ({ \ int _rc_ = 0; \ \ @@ -227,6 +228,7 @@ RW_LOCK_HELD(krwlock_t *rwp) } \ _rc_; \ }) +/* END CSTYLED */ int spl_rw_init(void); void spl_rw_fini(void); diff --git a/include/sys/sdt.h b/include/sys/sdt.h index 80fb4c32a..2d4679d65 100644 --- a/include/sys/sdt.h +++ b/include/sys/sdt.h @@ -23,8 +23,8 @@ */ #ifndef _SPL_SDT_H -#define _SPL_SDT_H +#define _SPL_SDT_H -#define SET_ERROR(x) (x) +#define SET_ERROR(x) (x) #endif /* SPL_SDT_H */ diff --git a/include/sys/sid.h b/include/sys/sid.h index c5988a6f9..731b62c47 100644 --- a/include/sys/sid.h +++ b/include/sys/sid.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_SID_H -#define _SPL_SID_H +#define _SPL_SID_H typedef struct ksiddomain { char *kd_name; @@ -41,21 +41,21 @@ typedef int ksid_t; static inline ksiddomain_t * ksid_lookupdomain(const char *dom) { - ksiddomain_t *kd; + ksiddomain_t *kd; int len = strlen(dom); - kd = kmem_zalloc(sizeof(ksiddomain_t), KM_SLEEP); - kd->kd_name = kmem_zalloc(len + 1, KM_SLEEP); + kd = kmem_zalloc(sizeof (ksiddomain_t), KM_SLEEP); + kd->kd_name = kmem_zalloc(len + 1, KM_SLEEP); memcpy(kd->kd_name, dom, len); - return (kd); + return (kd); } static inline void ksiddomain_rele(ksiddomain_t *ksid) { kmem_free(ksid->kd_name, strlen(ksid->kd_name) + 1); - kmem_free(ksid, sizeof(ksiddomain_t)); + kmem_free(ksid, sizeof (ksiddomain_t)); } #endif /* _SPL_SID_H */ diff --git a/include/sys/signal.h b/include/sys/signal.h index 0c7236390..36b8b5d98 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_SIGNAL_H -#define _SPL_SIGNAL_H +#define _SPL_SIGNAL_H #include @@ -34,7 +34,8 @@ #define FORREAL 0 /* Usual side-effects */ #define JUSTLOOKING 1 /* Don't stop the process */ -/* The "why" argument indicates the allowable side-effects of the call: +/* + * The "why" argument indicates the allowable side-effects of the call: * * FORREAL: Extract the next pending signal from p_sig into p_cursig; * stop the process if a stop has been requested or if a traced signal @@ -48,7 +49,7 @@ issig(int why) { ASSERT(why == FORREAL || why == JUSTLOOKING); - return signal_pending(current); + return (signal_pending(current)); } #endif /* SPL_SIGNAL_H */ diff --git a/include/sys/stat.h b/include/sys/stat.h index c6ee57ed7..83018e894 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_STAT_H -#define _SPL_STAT_H +#define _SPL_STAT_H #include diff --git a/include/sys/stropts.h b/include/sys/stropts.h index 68c4a0d14..746141fe8 100644 --- a/include/sys/stropts.h +++ b/include/sys/stropts.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_STROPTS_H -#define _SPL_STROPTS_H +#define _SPL_STROPTS_H #endif /* SPL_STROPTS_H */ diff --git a/include/sys/sunddi.h b/include/sys/sunddi.h index 74ca4228f..1bae594c8 100644 --- a/include/sys/sunddi.h +++ b/include/sys/sunddi.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_SUNDDI_H -#define _SPL_SUNDDI_H +#define _SPL_SUNDDI_H #include #include @@ -44,9 +44,9 @@ typedef int ddi_devid_t; #define DDI_SUCCESS 0 #define DDI_FAILURE -1 -#define ddi_prop_lookup_string(x1,x2,x3,x4,x5) (*x5 = NULL) -#define ddi_prop_free(x) (void)0 -#define ddi_root_node() (void)0 +#define ddi_prop_lookup_string(x1, x2, x3, x4, x5) (*x5 = NULL) +#define ddi_prop_free(x) (void)0 +#define ddi_root_node() (void)0 extern int ddi_strtoul(const char *, char **, int, unsigned long *); extern int ddi_strtol(const char *, char **, int, long *); diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index 0831904d6..43462efad 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_SUNLDI_H -#define _SPL_SUNLDI_H +#define _SPL_SUNLDI_H #include #include @@ -32,6 +32,6 @@ #include #include -#define SECTOR_SIZE 512 +#define SECTOR_SIZE 512 #endif /* SPL_SUNLDI_H */ diff --git a/include/sys/sysdc.h b/include/sys/sysdc.h index a563c87af..d963774ac 100644 --- a/include/sys/sysdc.h +++ b/include/sys/sysdc.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_SYSDC_H -#define _SPL_SYSDC_H +#define _SPL_SYSDC_H #endif /* SPL_SYSDC_H */ diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 03468d7d0..d083cebda 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_SYSMACROS_H -#define _SPL_SYSMACROS_H +#define _SPL_SYSMACROS_H #include #include @@ -39,120 +39,122 @@ #endif #ifndef _KERNEL -#define _KERNEL __KERNEL__ +#define _KERNEL __KERNEL__ #endif -#define FALSE 0 -#define TRUE 1 +#define FALSE 0 +#define TRUE 1 -#define INT8_MAX (127) -#define INT8_MIN (-128) -#define UINT8_MAX (255) -#define UINT8_MIN (0) +#define INT8_MAX (127) +#define INT8_MIN (-128) +#define UINT8_MAX (255) +#define UINT8_MIN (0) -#define INT16_MAX (32767) -#define INT16_MIN (-32768) -#define UINT16_MAX (65535) -#define UINT16_MIN (0) +#define INT16_MAX (32767) +#define INT16_MIN (-32768) +#define UINT16_MAX (65535) +#define UINT16_MIN (0) -#define INT32_MAX INT_MAX -#define INT32_MIN INT_MIN -#define UINT32_MAX UINT_MAX -#define UINT32_MIN UINT_MIN +#define INT32_MAX INT_MAX +#define INT32_MIN INT_MIN +#define UINT32_MAX UINT_MAX +#define UINT32_MIN UINT_MIN -#define INT64_MAX LLONG_MAX -#define INT64_MIN LLONG_MIN -#define UINT64_MAX ULLONG_MAX -#define UINT64_MIN ULLONG_MIN +#define INT64_MAX LLONG_MAX +#define INT64_MIN LLONG_MIN +#define UINT64_MAX ULLONG_MAX +#define UINT64_MIN ULLONG_MIN -#define NBBY 8 -#define ENOTSUP EOPNOTSUPP +#define NBBY 8 +#define ENOTSUP EOPNOTSUPP -#define MAXMSGLEN 256 -#define MAXNAMELEN 256 -#define MAXPATHLEN PATH_MAX -#define MAXOFFSET_T LLONG_MAX -#define MAXBSIZE 8192 -#define DEV_BSIZE 512 -#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ +#define MAXMSGLEN 256 +#define MAXNAMELEN 256 +#define MAXPATHLEN PATH_MAX +#define MAXOFFSET_T LLONG_MAX +#define MAXBSIZE 8192 +#define DEV_BSIZE 512 +#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define proc_pageout NULL -#define curproc current -#define max_ncpus num_possible_cpus() -#define boot_ncpus num_online_cpus() -#define CPU_SEQID smp_processor_id() -#define _NOTE(x) -#define is_system_labeled() 0 +#define proc_pageout NULL +#define curproc current +#define max_ncpus num_possible_cpus() +#define boot_ncpus num_online_cpus() +#define CPU_SEQID smp_processor_id() +#define _NOTE(x) +#define is_system_labeled() 0 #ifndef RLIM64_INFINITY -#define RLIM64_INFINITY (~0ULL) +#define RLIM64_INFINITY (~0ULL) #endif -/* 0..MAX_PRIO-1: Process priority +/* + * 0..MAX_PRIO-1: Process priority * 0..MAX_RT_PRIO-1: RT priority tasks * MAX_RT_PRIO..MAX_PRIO-1: SCHED_NORMAL tasks * * Treat shim tasks as SCHED_NORMAL tasks */ -#define minclsyspri (MAX_PRIO-1) -#define maxclsyspri (MAX_RT_PRIO) -#define defclsyspri (DEFAULT_PRIO) +#define minclsyspri (MAX_PRIO-1) +#define maxclsyspri (MAX_RT_PRIO) +#define defclsyspri (DEFAULT_PRIO) #ifndef NICE_TO_PRIO -#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) +#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) #endif #ifndef PRIO_TO_NICE -#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) +#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) #endif /* * Missing macros */ #ifndef PAGESIZE -#define PAGESIZE PAGE_SIZE +#define PAGESIZE PAGE_SIZE #endif #ifndef PAGESHIFT -#define PAGESHIFT PAGE_SHIFT +#define PAGESHIFT PAGE_SHIFT #endif /* from Solaris sys/byteorder.h */ -#define BSWAP_8(x) ((x) & 0xff) -#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) -#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) -#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) +#define BSWAP_8(x) ((x) & 0xff) +#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) +#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) +#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) -/* Map some simple functions. +/* + * Map some simple functions. */ -#define bzero(ptr,size) memset(ptr,0,size) -#define bcopy(src,dest,size) memmove(dest,src,size) -#define bcmp(src,dest,size) memcmp((src), (dest), (size_t)(size)) +#define bzero(ptr, size) memset(ptr, 0, size) +#define bcopy(src, dest, size) memmove(dest, src, size) +#define bcmp(src, dest, size) memcmp((src), (dest), (size_t)(size)) /* Dtrace probes do not exist in the linux kernel */ #ifdef DTRACE_PROBE #undef DTRACE_PROBE #endif /* DTRACE_PROBE */ -#define DTRACE_PROBE(a) ((void)0) +#define DTRACE_PROBE(a) ((void)0) #ifdef DTRACE_PROBE1 #undef DTRACE_PROBE1 #endif /* DTRACE_PROBE1 */ -#define DTRACE_PROBE1(a, b, c) ((void)0) +#define DTRACE_PROBE1(a, b, c) ((void)0) #ifdef DTRACE_PROBE2 #undef DTRACE_PROBE2 #endif /* DTRACE_PROBE2 */ -#define DTRACE_PROBE2(a, b, c, d, e) ((void)0) +#define DTRACE_PROBE2(a, b, c, d, e) ((void)0) #ifdef DTRACE_PROBE3 #undef DTRACE_PROBE3 #endif /* DTRACE_PROBE3 */ -#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0) +#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0) #ifdef DTRACE_PROBE4 #undef DTRACE_PROBE4 #endif /* DTRACE_PROBE4 */ -#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) +#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) /* Missing globals */ extern char spl_version[32]; @@ -167,39 +169,39 @@ extern void spl_cleanup(void); #define lowbit(x) __ffs(x) #define highbit64(x) fls64(x) -#define makedevice(maj,min) makedev(maj,min) +#define makedevice(maj, min) makedev(maj, min) /* common macros */ #ifndef MIN -#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef MAX -#define MAX(a, b) ((a) < (b) ? (b) : (a)) +#define MAX(a, b) ((a) < (b) ? (b) : (a)) #endif #ifndef ABS -#define ABS(a) ((a) < 0 ? -(a) : (a)) +#define ABS(a) ((a) < 0 ? -(a) : (a)) #endif #ifndef DIV_ROUND_UP -#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) #endif #ifndef roundup -#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #endif #ifndef howmany -#define howmany(x, y) (((x) + ((y) - 1)) / (y)) +#define howmany(x, y) (((x) + ((y) - 1)) / (y)) #endif /* * Compatibility macros/typedefs needed for Solaris -> Linux port */ -#define P2ALIGN(x, align) ((x) & -(align)) -#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) -#define P2ROUNDUP(x, align) ((((x) - 1) | ((align) - 1)) + 1) -#define P2PHASE(x, align) ((x) & ((align) - 1)) -#define P2NPHASE(x, align) (-(x) & ((align) - 1)) -#define ISP2(x) (((x) & ((x) - 1)) == 0) -#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1))==0) -#define P2BOUNDARY(off, len, align) \ +#define P2ALIGN(x, align) ((x) & -(align)) +#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) +#define P2ROUNDUP(x, align) ((((x) - 1) | ((align) - 1)) + 1) +#define P2PHASE(x, align) ((x) & ((align) - 1)) +#define P2NPHASE(x, align) (-(x) & ((align) - 1)) +#define ISP2(x) (((x) & ((x) - 1)) == 0) +#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) +#define P2BOUNDARY(off, len, align) \ (((off) ^ ((off) + (len) - 1)) > (align) - 1) /* @@ -214,28 +216,28 @@ extern void spl_cleanup(void); * or * P2ROUNDUP_TYPED(x, PAGESIZE, uint64_t) */ -#define P2ALIGN_TYPED(x, align, type) \ - ((type)(x) & -(type)(align)) -#define P2PHASE_TYPED(x, align, type) \ - ((type)(x) & ((type)(align) - 1)) -#define P2NPHASE_TYPED(x, align, type) \ - (-(type)(x) & ((type)(align) - 1)) -#define P2ROUNDUP_TYPED(x, align, type) \ - ((((type)(x) - 1) | ((type)(align) - 1)) + 1) -#define P2END_TYPED(x, align, type) \ - (-(~(type)(x) & -(type)(align))) -#define P2PHASEUP_TYPED(x, align, phase, type) \ - ((type)(phase) - (((type)(phase) - (type)(x)) & -(type)(align))) -#define P2CROSS_TYPED(x, y, align, type) \ - (((type)(x) ^ (type)(y)) > (type)(align) - 1) -#define P2SAMEHIGHBIT_TYPED(x, y, type) \ - (((type)(x) ^ (type)(y)) < ((type)(x) & (type)(y))) +#define P2ALIGN_TYPED(x, align, type) \ + ((type)(x) & -(type)(align)) +#define P2PHASE_TYPED(x, align, type) \ + ((type)(x) & ((type)(align) - 1)) +#define P2NPHASE_TYPED(x, align, type) \ + (-(type)(x) & ((type)(align) - 1)) +#define P2ROUNDUP_TYPED(x, align, type) \ + ((((type)(x) - 1) | ((type)(align) - 1)) + 1) +#define P2END_TYPED(x, align, type) \ + (-(~(type)(x) & -(type)(align))) +#define P2PHASEUP_TYPED(x, align, phase, type) \ + ((type)(phase) - (((type)(phase) - (type)(x)) & -(type)(align))) +#define P2CROSS_TYPED(x, y, align, type) \ + (((type)(x) ^ (type)(y)) > (type)(align) - 1) +#define P2SAMEHIGHBIT_TYPED(x, y, type) \ + (((type)(x) ^ (type)(y)) < ((type)(x) & (type)(y))) #if defined(_KERNEL) && !defined(_KMEMUSER) && !defined(offsetof) /* avoid any possibility of clashing with version */ -#define offsetof(s, m) ((size_t)(&(((s *)0)->m))) +#define offsetof(s, m) ((size_t)(&(((s *)0)->m))) #endif #endif /* _SPL_SYSMACROS_H */ diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index bc5337fa5..225569158 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -23,14 +23,14 @@ */ #ifndef _SPL_SYSTEMINFO_H -#define _SPL_SYSTEMINFO_H +#define _SPL_SYSTEMINFO_H -#define HW_HOSTID_LEN 11 /* minimum buffer size needed */ +#define HW_HOSTID_LEN 11 /* minimum buffer size needed */ /* to hold a decimal or hex */ /* hostid string */ /* Supplemental definitions for Linux. */ -#define HW_HOSTID_PATH "/etc/hostid" /* binary configuration file */ -#define HW_HOSTID_MASK 0xFFFFFFFF /* significant hostid bits */ +#define HW_HOSTID_PATH "/etc/hostid" /* binary configuration file */ +#define HW_HOSTID_MASK 0xFFFFFFFF /* significant hostid bits */ #endif /* SPL_SYSTEMINFO_H */ diff --git a/include/sys/systm.h b/include/sys/systm.h index cd49e14be..2420e7e9d 100644 --- a/include/sys/systm.h +++ b/include/sys/systm.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_SYSTM_H -#define _SPL_SYSTM_H +#define _SPL_SYSTM_H #include diff --git a/include/sys/t_lock.h b/include/sys/t_lock.h index f1de9616b..dcdfaeec5 100644 --- a/include/sys/t_lock.h +++ b/include/sys/t_lock.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_T_LOCK_H -#define _SPL_T_LOCK_H +#define _SPL_T_LOCK_H #include #include diff --git a/include/sys/taskq.h b/include/sys/taskq.h index c5ccec715..4d90a3563 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -94,7 +94,7 @@ typedef struct taskq { taskqid_t tq_lowest_id; /* lowest pend/work id */ struct list_head tq_free_list; /* free taskq_ent_t's */ struct list_head tq_pend_list; /* pending taskq_ent_t's */ - struct list_head tq_prio_list; /* priority pending taskq_ent_t's */ + struct list_head tq_prio_list; /* priority taskq_ent_t's */ struct list_head tq_delay_list; /* delayed taskq_ent_t's */ struct list_head tq_taskqs; /* all taskq_t's */ spl_wait_queue_head_t tq_work_waitq; /* new work waitq */ diff --git a/include/sys/thread.h b/include/sys/thread.h index ae2188d84..80cf49914 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_THREAD_H -#define _SPL_THREAD_H +#define _SPL_THREAD_H #include #include @@ -36,28 +36,30 @@ /* * Thread interfaces */ -#define TP_MAGIC 0x53535353 +#define TP_MAGIC 0x53535353 -#define TS_SLEEP TASK_INTERRUPTIBLE -#define TS_RUN TASK_RUNNING -#define TS_ZOMB EXIT_ZOMBIE -#define TS_STOPPED TASK_STOPPED +#define TS_SLEEP TASK_INTERRUPTIBLE +#define TS_RUN TASK_RUNNING +#define TS_ZOMB EXIT_ZOMBIE +#define TS_STOPPED TASK_STOPPED typedef void (*thread_func_t)(void *); -#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ - __thread_create(stk, stksize, (thread_func_t)func, \ - #func, arg, len, pp, state, pri) -#define thread_exit() __thread_exit() -#define thread_join(t) VERIFY(0) -#define curthread current -#define getcomm() current->comm -#define getpid() current->pid +/* BEGIN CSTYLED */ +#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ + __thread_create(stk, stksize, (thread_func_t)func, \ + #func, arg, len, pp, state, pri) +/* END CSTYLED */ + +#define thread_exit() __thread_exit() +#define thread_join(t) VERIFY(0) +#define curthread current +#define getcomm() current->comm +#define getpid() current->pid extern kthread_t *__thread_create(caddr_t stk, size_t stksize, - thread_func_t func, const char *name, - void *args, size_t len, proc_t *pp, - int state, pri_t pri); + thread_func_t func, const char *name, void *args, size_t len, proc_t *pp, + int state, pri_t pri); extern void __thread_exit(void); extern struct task_struct *spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...); diff --git a/include/sys/timer.h b/include/sys/timer.h index 71190d287..821590e3a 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -23,38 +23,37 @@ */ #ifndef _SPL_TIMER_H -#define _SPL_TIMER_H +#define _SPL_TIMER_H #include #include #include -#define lbolt ((clock_t)jiffies) -#define lbolt64 ((int64_t)get_jiffies_64()) +#define lbolt ((clock_t)jiffies) +#define lbolt64 ((int64_t)get_jiffies_64()) -#define ddi_get_lbolt() ((clock_t)jiffies) -#define ddi_get_lbolt64() ((int64_t)get_jiffies_64()) +#define ddi_get_lbolt() ((clock_t)jiffies) +#define ddi_get_lbolt64() ((int64_t)get_jiffies_64()) -#define ddi_time_before(a, b) (typecheck(clock_t, a) && \ +#define ddi_time_before(a, b) (typecheck(clock_t, a) && \ typecheck(clock_t, b) && \ ((a) - (b) < 0)) -#define ddi_time_after(a, b) ddi_time_before(b, a) -#define ddi_time_before_eq(a, b) (!ddi_time_after(a, b)) -#define ddi_time_after_eq(a, b) ddi_time_before_eq(b, a) +#define ddi_time_after(a, b) ddi_time_before(b, a) +#define ddi_time_before_eq(a, b) (!ddi_time_after(a, b)) +#define ddi_time_after_eq(a, b) ddi_time_before_eq(b, a) -#define ddi_time_before64(a, b) (typecheck(int64_t, a) && \ +#define ddi_time_before64(a, b) (typecheck(int64_t, a) && \ typecheck(int64_t, b) && \ ((a) - (b) < 0)) -#define ddi_time_after64(a, b) ddi_time_before64(b, a) -#define ddi_time_before_eq64(a, b) (!ddi_time_after64(a, b)) -#define ddi_time_after_eq64(a, b) ddi_time_before_eq64(b, a) +#define ddi_time_after64(a, b) ddi_time_before64(b, a) +#define ddi_time_before_eq64(a, b) (!ddi_time_after64(a, b)) +#define ddi_time_after_eq64(a, b) ddi_time_before_eq64(b, a) -#define delay(ticks) schedule_timeout_uninterruptible(ticks) +#define delay(ticks) schedule_timeout_uninterruptible(ticks) -#define SEC_TO_TICK(sec) ((sec) * HZ) -#define MSEC_TO_TICK(ms) msecs_to_jiffies(ms) -#define USEC_TO_TICK(us) usecs_to_jiffies(us) -#define NSEC_TO_TICK(ns) usecs_to_jiffies(ns / NSEC_PER_USEC) +#define SEC_TO_TICK(sec) ((sec) * HZ) +#define MSEC_TO_TICK(ms) msecs_to_jiffies(ms) +#define USEC_TO_TICK(us) usecs_to_jiffies(us) +#define NSEC_TO_TICK(ns) usecs_to_jiffies(ns / NSEC_PER_USEC) #endif /* _SPL_TIMER_H */ - diff --git a/include/sys/tsd.h b/include/sys/tsd.h index 4ddaea444..39a291bf3 100644 --- a/include/sys/tsd.h +++ b/include/sys/tsd.h @@ -22,14 +22,14 @@ */ #ifndef _SPL_TSD_H -#define _SPL_TSD_H +#define _SPL_TSD_H #include -#define TSD_HASH_TABLE_BITS_DEFAULT 9 -#define TSD_KEYS_MAX 32768 -#define DTOR_PID (PID_MAX_LIMIT+1) -#define PID_KEY (TSD_KEYS_MAX+1) +#define TSD_HASH_TABLE_BITS_DEFAULT 9 +#define TSD_KEYS_MAX 32768 +#define DTOR_PID (PID_MAX_LIMIT+1) +#define PID_KEY (TSD_KEYS_MAX+1) typedef void (*dtor_func_t)(void *); diff --git a/include/sys/types.h b/include/sys/types.h index b5359c7e8..e159dda21 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -29,14 +29,14 @@ #include #ifndef ULLONG_MAX -#define ULLONG_MAX (~0ULL) +#define ULLONG_MAX (~0ULL) #endif #ifndef LLONG_MAX -#define LLONG_MAX ((long long)(~0ULL>>1)) +#define LLONG_MAX ((long long)(~0ULL>>1)) #endif -typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t; +typedef enum { B_FALSE = 0, B_TRUE = 1 } boolean_t; typedef unsigned long intptr_t; typedef unsigned long ulong_t; typedef unsigned int uint_t; diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h index f25cf1b2b..6e76651d5 100644 --- a/include/sys/u8_textprep.h +++ b/include/sys/u8_textprep.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_U8_TEXTPREP_H -#define _SPL_U8_TEXTPREP_H +#define _SPL_U8_TEXTPREP_H #endif /* SPL_U8_TEXTPREP_H */ diff --git a/include/sys/uio.h b/include/sys/uio.h index b34741523..64c452b8d 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -24,7 +24,7 @@ */ #ifndef _SPL_UIO_H -#define _SPL_UIO_H +#define _SPL_UIO_H #include #include @@ -34,15 +34,15 @@ typedef struct iovec iovec_t; typedef enum uio_rw { - UIO_READ = 0, - UIO_WRITE = 1, + UIO_READ = 0, + UIO_WRITE = 1, } uio_rw_t; typedef enum uio_seg { - UIO_USERSPACE = 0, - UIO_SYSSPACE = 1, - UIO_USERISPACE= 2, - UIO_BVEC = 3, + UIO_USERSPACE = 0, + UIO_SYSSPACE = 1, + UIO_USERISPACE = 2, + UIO_BVEC = 3, } uio_seg_t; typedef struct uio { @@ -71,7 +71,7 @@ typedef enum xuio_type { } xuio_type_t; -#define UIOA_IOV_MAX 16 +#define UIOA_IOV_MAX 16 typedef struct uioa_page_s { int uioa_pfncnt; @@ -100,7 +100,7 @@ typedef struct xuio { } xu_ext; } xuio_t; -#define XUIO_XUZC_PRIV(xuio) xuio->xu_ext.xu_zc.xu_zc_priv -#define XUIO_XUZC_RW(xuio) xuio->xu_ext.xu_zc.xu_zc_rw +#define XUIO_XUZC_PRIV(xuio) xuio->xu_ext.xu_zc.xu_zc_priv +#define XUIO_XUZC_RW(xuio) xuio->xu_ext.xu_zc.xu_zc_rw #endif /* SPL_UIO_H */ diff --git a/include/sys/unistd.h b/include/sys/unistd.h index 24eab763c..d86de891c 100644 --- a/include/sys/unistd.h +++ b/include/sys/unistd.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_UNISTD_H -#define _SPL_UNISTD_H +#define _SPL_UNISTD_H #endif /* SPL_UNISTD_H */ diff --git a/include/sys/user.h b/include/sys/user.h index 2dc3ed0c5..b12cb240e 100644 --- a/include/sys/user.h +++ b/include/sys/user.h @@ -21,7 +21,7 @@ */ #ifndef _SPL_USER_H -#define _SPL_USER_H +#define _SPL_USER_H /* * We have uf_info_t for areleasef(). We implement areleasef() using a global @@ -37,6 +37,6 @@ struct uf_info; typedef struct uf_info uf_info_t; -#define P_FINFO(x) ((uf_info_t *)x) +#define P_FINFO(x) ((uf_info_t *)x) #endif /* SPL_USER_H */ diff --git a/include/sys/va_list.h b/include/sys/va_list.h index 4468d9e89..62d18b9ae 100644 --- a/include/sys/va_list.h +++ b/include/sys/va_list.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_VA_LIST_H -#define _SPL_VA_LIST_H +#define _SPL_VA_LIST_H #endif /* SPL_VA_LIST_H */ diff --git a/include/sys/varargs.h b/include/sys/varargs.h index b992e8430..cdb73fbbd 100644 --- a/include/sys/varargs.h +++ b/include/sys/varargs.h @@ -23,8 +23,8 @@ */ #ifndef _SPL_VARARGS_H -#define _SPL_VARARGS_H +#define _SPL_VARARGS_H -#define __va_list va_list +#define __va_list va_list #endif /* SPL_VARARGS_H */ diff --git a/include/sys/vfs.h b/include/sys/vfs.h index 30fcfb476..0d5e1d51d 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_ZFS_H -#define _SPL_ZFS_H +#define _SPL_ZFS_H #include #include @@ -40,7 +40,7 @@ typedef struct spl_fid { long fid_pad; struct { ushort_t len; /* length of data in bytes */ - char data[MAXFIDSZ];/* data (variable len) */ + char data[MAXFIDSZ]; /* data (variable len) */ } _fid; } un; } fid_t; diff --git a/include/sys/vfs_opreg.h b/include/sys/vfs_opreg.h index 1d20997ed..1d48f2d5a 100644 --- a/include/sys/vfs_opreg.h +++ b/include/sys/vfs_opreg.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_OPREG_H -#define _SPL_OPREG_H +#define _SPL_OPREG_H #endif /* SPL_OPREG_H */ diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index f048c318c..2b48fe0e3 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_VMSYSTM_H -#define _SPL_VMSYSTM_H +#define _SPL_VMSYSTM_H #include #include @@ -48,9 +48,9 @@ copyin(const void *from, void *to, size_t len) { /* On error copyin routine returns -1 */ if (xcopyin(from, to, len)) - return -1; + return (-1); - return 0; + return (0); } static __inline__ int @@ -58,9 +58,9 @@ copyout(const void *from, void *to, size_t len) { /* On error copyout routine returns -1 */ if (xcopyout(from, to, len)) - return -1; + return (-1); - return 0; + return (0); } static __inline__ int @@ -69,7 +69,7 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) size_t rc; if (len == 0) - return -ENAMETOOLONG; + return (-ENAMETOOLONG); /* XXX: Should return ENAMETOOLONG if 'strlen(from) > len' */ @@ -78,7 +78,7 @@ copyinstr(const void *from, void *to, size_t len, size_t *done) if (done != NULL) *done = rc; - return 0; + return (0); } #endif /* SPL_VMSYSTM_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 9ae48c7f0..946654b7b 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_VNODE_H -#define _SPL_VNODE_H +#define _SPL_VNODE_H #include #include @@ -49,25 +49,25 @@ * was properly split in to O_SYNC and O_DSYNC respectively. */ #ifndef O_DSYNC -#define O_DSYNC O_SYNC +#define O_DSYNC O_SYNC #endif -#define FREAD 1 -#define FWRITE 2 -#define FCREAT O_CREAT -#define FTRUNC O_TRUNC -#define FOFFMAX O_LARGEFILE -#define FSYNC O_SYNC -#define FDSYNC O_DSYNC -#define FRSYNC O_SYNC -#define FEXCL O_EXCL -#define FDIRECT O_DIRECT -#define FAPPEND O_APPEND +#define FREAD 1 +#define FWRITE 2 +#define FCREAT O_CREAT +#define FTRUNC O_TRUNC +#define FOFFMAX O_LARGEFILE +#define FSYNC O_SYNC +#define FDSYNC O_DSYNC +#define FRSYNC O_SYNC +#define FEXCL O_EXCL +#define FDIRECT O_DIRECT +#define FAPPEND O_APPEND -#define FNODSYNC 0x10000 /* fsync pseudo flag */ -#define FNOFOLLOW 0x20000 /* don't follow symlinks */ +#define FNODSYNC 0x10000 /* fsync pseudo flag */ +#define FNOFOLLOW 0x20000 /* don't follow symlinks */ -#define F_FREESP 11 /* Free file space */ +#define F_FREESP 11 /* Free file space */ /* @@ -79,30 +79,30 @@ #undef AT_UID #undef AT_GID -#define AT_MODE ATTR_MODE -#define AT_UID ATTR_UID -#define AT_GID ATTR_GID -#define AT_SIZE ATTR_SIZE -#define AT_ATIME ATTR_ATIME -#define AT_MTIME ATTR_MTIME -#define AT_CTIME ATTR_CTIME +#define AT_MODE ATTR_MODE +#define AT_UID ATTR_UID +#define AT_GID ATTR_GID +#define AT_SIZE ATTR_SIZE +#define AT_ATIME ATTR_ATIME +#define AT_MTIME ATTR_MTIME +#define AT_CTIME ATTR_CTIME -#define ATTR_XVATTR (1 << 31) -#define AT_XVATTR ATTR_XVATTR +#define ATTR_XVATTR (1 << 31) +#define AT_XVATTR ATTR_XVATTR -#define ATTR_IATTR_MASK (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_SIZE | \ +#define ATTR_IATTR_MASK (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_SIZE | \ ATTR_ATIME | ATTR_MTIME | ATTR_CTIME | ATTR_FILE) -#define CRCREAT 0x01 -#define RMFILE 0x02 +#define CRCREAT 0x01 +#define RMFILE 0x02 -#define B_INVAL 0x01 -#define B_TRUNC 0x02 +#define B_INVAL 0x01 +#define B_TRUNC 0x02 -#define LOOKUP_DIR 0x01 -#define LOOKUP_XATTR 0x02 -#define CREATE_XATTR_DIR 0x04 -#define ATTR_NOACLCHECK 0x20 +#define LOOKUP_DIR 0x01 +#define LOOKUP_XATTR 0x02 +#define CREATE_XATTR_DIR 0x04 +#define ATTR_NOACLCHECK 0x20 typedef enum vtype { VNON = 0, @@ -121,8 +121,8 @@ typedef enum vtype { typedef struct vattr { enum vtype va_type; /* vnode type */ - u_int va_mask; /* attribute bit-mask */ - u_short va_mode; /* acc mode */ + uint_t va_mask; /* attribute bit-mask */ + ushort_t va_mode; /* acc mode */ uid_t va_uid; /* owner uid */ gid_t va_gid; /* owner gid */ long va_fsid; /* fs id */ @@ -168,12 +168,12 @@ void vn_free(vnode_t *vp); extern vtype_t vn_mode_to_vtype(mode_t); extern mode_t vn_vtype_to_mode(vtype_t); extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode, - vnode_t **vpp, int x1, void *x2); + vnode_t **vpp, int x1, void *x2); extern int vn_openat(const char *path, uio_seg_t seg, int flags, int mode, - vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd); + vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd); extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, - offset_t off, uio_seg_t seg, int x1, rlim64_t x2, - void *x3, ssize_t *residp); + offset_t off, uio_seg_t seg, int x1, rlim64_t x2, + void *x3, ssize_t *residp); extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4); extern int vn_seek(vnode_t *vp, offset_t o, offset_t *op, void *ct); @@ -189,16 +189,16 @@ extern int vn_set_pwd(const char *filename); int spl_vn_init(void); void spl_vn_fini(void); -#define VOP_CLOSE vn_close -#define VOP_SEEK vn_seek -#define VOP_GETATTR vn_getattr -#define VOP_FSYNC vn_fsync -#define VOP_SPACE vn_space -#define VOP_PUTPAGE(vp, o, s, f, x1, x2) ((void)0) -#define vn_is_readonly(vp) 0 -#define getf vn_getf -#define releasef vn_releasef -#define areleasef vn_areleasef +#define VOP_CLOSE vn_close +#define VOP_SEEK vn_seek +#define VOP_GETATTR vn_getattr +#define VOP_FSYNC vn_fsync +#define VOP_SPACE vn_space +#define VOP_PUTPAGE(vp, o, s, f, x1, x2) ((void)0) +#define vn_is_readonly(vp) 0 +#define getf vn_getf +#define releasef vn_releasef +#define areleasef vn_areleasef extern vnode_t *rootdir; diff --git a/include/sys/zmod.h b/include/sys/zmod.h index d708c6612..5380bd6fd 100644 --- a/include/sys/zmod.h +++ b/include/sys/zmod.h @@ -20,7 +20,8 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * + * * z_compress_level/z_uncompress are nearly identical copies of the * compress2/uncompress functions provided by the official zlib package * available at http://zlib.net/. The only changes made we to slightly @@ -53,7 +54,7 @@ */ #ifndef _SPL_ZMOD_H -#define _SPL_ZMOD_H +#define _SPL_ZMOD_H #include #include diff --git a/include/sys/zone.h b/include/sys/zone.h index 4ed2a836f..b2efd13b8 100644 --- a/include/sys/zone.h +++ b/include/sys/zone.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_ZONE_H -#define _SPL_ZONE_H +#define _SPL_ZONE_H #include diff --git a/include/unistd.h b/include/unistd.h index 24eab763c..d86de891c 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_UNISTD_H -#define _SPL_UNISTD_H +#define _SPL_UNISTD_H #endif /* SPL_UNISTD_H */ diff --git a/include/util/qsort.h b/include/util/qsort.h index 5dc0b446b..90ae6e4c2 100644 --- a/include/util/qsort.h +++ b/include/util/qsort.h @@ -23,10 +23,10 @@ */ #ifndef _SPL_QSORT_H -#define _SPL_QSORT_H +#define _SPL_QSORT_H #include -#define qsort(base, num, size, cmp) sort(base, num, size, cmp, NULL) +#define qsort(base, num, size, cmp) sort(base, num, size, cmp, NULL) #endif /* SPL_QSORT_H */ diff --git a/include/util/sscanf.h b/include/util/sscanf.h index 561918d65..9788234bb 100644 --- a/include/util/sscanf.h +++ b/include/util/sscanf.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_UTIL_SSCANF_H -#define _SPL_UTIL_SSCANF_H +#define _SPL_UTIL_SSCANF_H #endif /* SPL_UTIL_SSCAN_H */ diff --git a/include/vm/anon.h b/include/vm/anon.h index a09f47c9f..706734ff3 100644 --- a/include/vm/anon.h +++ b/include/vm/anon.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_VM_ANON_H -#define _SPL_VM_ANON_H +#define _SPL_VM_ANON_H #endif /* SPL_VM_ANON_H */ diff --git a/include/vm/pvn.h b/include/vm/pvn.h index df916e68f..1011e6cd8 100644 --- a/include/vm/pvn.h +++ b/include/vm/pvn.h @@ -23,6 +23,6 @@ */ #ifndef _SPL_VM_PVN_H -#define _SPL_VM_PVN_H +#define _SPL_VM_PVN_H #endif /* SPL_VM_PVN_H */ diff --git a/include/vm/seg_kmem.h b/include/vm/seg_kmem.h index 64b9688bd..a0ab7fce6 100644 --- a/include/vm/seg_kmem.h +++ b/include/vm/seg_kmem.h @@ -23,7 +23,7 @@ */ #ifndef _SPL_SEG_KMEM_H -#define _SPL_SEG_KMEM_H +#define _SPL_SEG_KMEM_H #include diff --git a/module/spl/spl-atomic.c b/module/spl/spl-atomic.c index 4c48684ba..47ed1886e 100644 --- a/module/spl/spl-atomic.c +++ b/module/spl/spl-atomic.c @@ -20,18 +20,12 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Atomic Implementation. */ #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM -#endif - -#define DEBUG_SUBSYSTEM S_ATOMIC - #ifdef ATOMIC_SPINLOCK /* Global atomic lock declarations */ DEFINE_SPINLOCK(atomic32_lock); diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c index 4778fb256..f0060bbdc 100644 --- a/module/spl/spl-condvar.c +++ b/module/spl/spl-condvar.c @@ -335,8 +335,8 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time, * Compatibility wrapper for the cv_timedwait_hires() Illumos interface. */ static clock_t -cv_timedwait_hires_common(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, - int flag, int state) +cv_timedwait_hires_common(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, + hrtime_t res, int flag, int state) { if (res > 1) { /* @@ -363,8 +363,8 @@ cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, EXPORT_SYMBOL(cv_timedwait_hires); clock_t -cv_timedwait_sig_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res, - int flag) +cv_timedwait_sig_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, + hrtime_t res, int flag) { return (cv_timedwait_hires_common(cvp, mp, tim, res, flag, TASK_INTERRUPTIBLE)); diff --git a/module/spl/spl-cred.c b/module/spl/spl-cred.c index f4431db7f..ea3e903f9 100644 --- a/module/spl/spl-cred.c +++ b/module/spl/spl-cred.c @@ -20,18 +20,12 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Credential Implementation. */ #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM -#endif - -#define DEBUG_SUBSYSTEM S_CRED - static int #ifdef HAVE_KUIDGID_T cr_groups_search(const struct group_info *group_info, kgid_t grp) @@ -43,7 +37,7 @@ cr_groups_search(const struct group_info *group_info, gid_t grp) int cmp; if (!group_info) - return 0; + return (0); left = 0; right = group_info->ngroups; @@ -57,16 +51,16 @@ cr_groups_search(const struct group_info *group_info, gid_t grp) else if (cmp < 0) right = mid; else - return 1; + return (1); } - return 0; + return (0); } /* Hold a reference on the credential */ void crhold(cred_t *cr) { - (void)get_cred((const cred_t *)cr); + (void) get_cred((const cred_t *)cr); } /* Free a reference on the credential */ @@ -96,7 +90,7 @@ crgetngroups(const cred_t *cr) rc = NGROUPS_PER_BLOCK; } #endif - return rc; + return (rc); } /* @@ -119,7 +113,7 @@ crgetgroups(const cred_t *cr) if (gi->nblocks > 0) gids = KGIDP_TO_SGIDP(gi->blocks[0]); #endif - return gids; + return (gids); } /* Check if the passed gid is available in supplied credential. */ @@ -132,63 +126,63 @@ groupmember(gid_t gid, const cred_t *cr) gi = cr->group_info; rc = cr_groups_search(gi, SGID_TO_KGID(gid)); - return rc; + return (rc); } /* Return the effective user id */ uid_t crgetuid(const cred_t *cr) { - return KUID_TO_SUID(cr->euid); + return (KUID_TO_SUID(cr->euid)); } /* Return the real user id */ uid_t crgetruid(const cred_t *cr) { - return KUID_TO_SUID(cr->uid); + return (KUID_TO_SUID(cr->uid)); } /* Return the saved user id */ uid_t crgetsuid(const cred_t *cr) { - return KUID_TO_SUID(cr->suid); + return (KUID_TO_SUID(cr->suid)); } /* Return the filesystem user id */ uid_t crgetfsuid(const cred_t *cr) { - return KUID_TO_SUID(cr->fsuid); + return (KUID_TO_SUID(cr->fsuid)); } /* Return the effective group id */ gid_t crgetgid(const cred_t *cr) { - return KGID_TO_SGID(cr->egid); + return (KGID_TO_SGID(cr->egid)); } /* Return the real group id */ gid_t crgetrgid(const cred_t *cr) { - return KGID_TO_SGID(cr->gid); + return (KGID_TO_SGID(cr->gid)); } /* Return the saved group id */ gid_t crgetsgid(const cred_t *cr) { - return KGID_TO_SGID(cr->sgid); + return (KGID_TO_SGID(cr->sgid)); } /* Return the filesystem group id */ gid_t crgetfsgid(const cred_t *cr) { - return KGID_TO_SGID(cr->fsgid); + return (KGID_TO_SGID(cr->fsgid)); } EXPORT_SYMBOL(crhold); diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 28c5258ef..33a8df898 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Error Implementation. */ @@ -36,8 +36,7 @@ */ unsigned int spl_panic_halt; module_param(spl_panic_halt, uint, 0644); -MODULE_PARM_DESC(spl_panic_halt, - "Cause kernel panic on assertion failures"); +MODULE_PARM_DESC(spl_panic_halt, "Cause kernel panic on assertion failures"); /* * Limit the number of stack traces dumped to not more than 5 every diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index b5c9a9aef..efd901094 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Generic Implementation. */ @@ -109,13 +109,14 @@ spl_rand_next(uint64_t *s) { static inline void spl_rand_jump(uint64_t *s) { - static const uint64_t JUMP[] = { 0x8a5cd789635d2dff, 0x121fd2155c472f96 }; + static const uint64_t JUMP[] = + { 0x8a5cd789635d2dff, 0x121fd2155c472f96 }; uint64_t s0 = 0; uint64_t s1 = 0; int i, b; - for(i = 0; i < sizeof JUMP / sizeof *JUMP; i++) - for(b = 0; b < 64; b++) { + for (i = 0; i < sizeof (JUMP) / sizeof (*JUMP); i++) + for (b = 0; b < 64; b++) { if (JUMP[i] & 1ULL << b) { s0 ^= s[0]; s1 ^= s[1]; @@ -187,16 +188,16 @@ nlz64(uint64_t x) { register int n = 0; if (x == 0) - return 64; + return (64); - if (x <= 0x00000000FFFFFFFFULL) {n = n + 32; x = x << 32;} - if (x <= 0x0000FFFFFFFFFFFFULL) {n = n + 16; x = x << 16;} - if (x <= 0x00FFFFFFFFFFFFFFULL) {n = n + 8; x = x << 8;} - if (x <= 0x0FFFFFFFFFFFFFFFULL) {n = n + 4; x = x << 4;} - if (x <= 0x3FFFFFFFFFFFFFFFULL) {n = n + 2; x = x << 2;} - if (x <= 0x7FFFFFFFFFFFFFFFULL) {n = n + 1;} + if (x <= 0x00000000FFFFFFFFULL) { n = n + 32; x = x << 32; } + if (x <= 0x0000FFFFFFFFFFFFULL) { n = n + 16; x = x << 16; } + if (x <= 0x00FFFFFFFFFFFFFFULL) { n = n + 8; x = x << 8; } + if (x <= 0x0FFFFFFFFFFFFFFFULL) { n = n + 4; x = x << 4; } + if (x <= 0x3FFFFFFFFFFFFFFFULL) { n = n + 2; x = x << 2; } + if (x <= 0x7FFFFFFFFFFFFFFFULL) { n = n + 1; } - return n; + return (n); } /* @@ -207,7 +208,7 @@ static inline uint64_t __div_u64(uint64_t u, uint32_t v) { (void) do_div(u, v); - return u; + return (u); } /* @@ -227,7 +228,7 @@ __udivdi3(uint64_t u, uint64_t v) if (v >> 32 == 0) { // If v < 2**32: if (u >> 32 < v) { // If u/v cannot overflow, - return __div_u64(u, v); // just do one division. + return (__div_u64(u, v)); // just do one division. } else { // If u/v would overflow: u1 = u >> 32; // Break u into two halves. u0 = u & 0xFFFFFFFF; @@ -235,7 +236,7 @@ __udivdi3(uint64_t u, uint64_t v) k = u1 - q1 * v; // First remainder, < v. u0 += (k << 32); q0 = __div_u64(u0, v); // Seconds quotient digit. - return (q1 << 32) + q0; + return ((q1 << 32) + q0); } } else { // If v >= 2**32: n = nlz64(v); // 0 <= n <= 31. @@ -249,7 +250,7 @@ __udivdi3(uint64_t u, uint64_t v) if ((u - q0 * v) >= v) q0 = q0 + 1; // Now q0 is correct. - return q0; + return (q0); } } EXPORT_SYMBOL(__udivdi3); @@ -263,7 +264,7 @@ __divdi3(int64_t u, int64_t v) int64_t q, t; q = __udivdi3(abs64(u), abs64(v)); t = (u ^ v) >> 63; // If u, v have different - return (q ^ t) - t; // signs, negate q. + return ((q ^ t) - t); // signs, negate q. } EXPORT_SYMBOL(__divdi3); @@ -344,9 +345,11 @@ __aeabi_uldivmod(uint64_t u, uint64_t v) register uint32_t r2 asm("r2") = (mod & 0xFFFFFFFF); register uint32_t r3 asm("r3") = (mod >> 32); + /* BEGIN CSTYLED */ asm volatile("" : "+r"(r0), "+r"(r1), "+r"(r2),"+r"(r3) /* output */ : "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */ + /* END CSTYLED */ return; /* r0; */ } @@ -367,9 +370,11 @@ __aeabi_ldivmod(int64_t u, int64_t v) register uint32_t r2 asm("r2") = (mod & 0xFFFFFFFF); register uint32_t r3 asm("r3") = (mod >> 32); + /* BEGIN CSTYLED */ asm volatile("" : "+r"(r0), "+r"(r1), "+r"(r2),"+r"(r3) /* output */ : "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */ + /* END CSTYLED */ return; /* r0; */ } @@ -378,7 +383,8 @@ EXPORT_SYMBOL(__aeabi_ldivmod); #endif /* __arm || __arm__ */ #endif /* BITS_PER_LONG */ -/* NOTE: The strtoxx behavior is solely based on my reading of the Solaris +/* + * NOTE: The strtoxx behavior is solely based on my reading of the Solaris * ddi_strtol(9F) man page. I have not verified the behavior of these * functions against their Solaris counterparts. It is possible that I * may have misinterpreted the man page or the man page is incorrect. @@ -388,28 +394,28 @@ int ddi_strtol(const char *, char **, int, long *); int ddi_strtoull(const char *, char **, int, unsigned long long *); int ddi_strtoll(const char *, char **, int, long long *); -#define define_ddi_strtoux(type, valtype) \ +#define define_ddi_strtoux(type, valtype) \ int ddi_strtou##type(const char *str, char **endptr, \ - int base, valtype *result) \ + int base, valtype *result) \ { \ valtype last_value, value = 0; \ char *ptr = (char *)str; \ int flag = 1, digit; \ \ if (strlen(ptr) == 0) \ - return EINVAL; \ + return (EINVAL); \ \ /* Auto-detect base based on prefix */ \ if (!base) { \ if (str[0] == '0') { \ - if (tolower(str[1])=='x' && isxdigit(str[2])) { \ + if (tolower(str[1]) == 'x' && isxdigit(str[2])) { \ base = 16; /* hex */ \ ptr += 2; \ } else if (str[1] >= '0' && str[1] < 8) { \ base = 8; /* octal */ \ ptr += 1; \ } else { \ - return EINVAL; \ + return (EINVAL); \ } \ } else { \ base = 10; /* decimal */ \ @@ -430,7 +436,7 @@ int ddi_strtou##type(const char *str, char **endptr, \ last_value = value; \ value = value * base + digit; \ if (last_value > value) /* Overflow */ \ - return ERANGE; \ + return (ERANGE); \ \ flag = 1; \ ptr++; \ @@ -442,12 +448,12 @@ int ddi_strtou##type(const char *str, char **endptr, \ if (endptr) \ *endptr = (char *)(flag ? ptr : str); \ \ - return 0; \ + return (0); \ } \ -#define define_ddi_strtox(type, valtype) \ +#define define_ddi_strtox(type, valtype) \ int ddi_strto##type(const char *str, char **endptr, \ - int base, valtype *result) \ + int base, valtype *result) \ { \ int rc; \ \ @@ -463,7 +469,7 @@ int ddi_strto##type(const char *str, char **endptr, \ rc = ddi_strtou##type(str, endptr, base, result); \ } \ \ - return rc; \ + return (rc); \ } define_ddi_strtoux(l, unsigned long) @@ -482,10 +488,10 @@ ddi_copyin(const void *from, void *to, size_t len, int flags) /* Fake ioctl() issued by kernel, 'from' is a kernel address */ if (flags & FKIOCTL) { memcpy(to, from, len); - return 0; + return (0); } - return copyin(from, to, len); + return (copyin(from, to, len)); } EXPORT_SYMBOL(ddi_copyin); @@ -495,10 +501,10 @@ ddi_copyout(const void *from, void *to, size_t len, int flags) /* Fake ioctl() issued by kernel, 'from' is a kernel address */ if (flags & FKIOCTL) { memcpy(to, from, len); - return 0; + return (0); } - return copyout(from, to, len); + return (copyout(from, to, len)); } EXPORT_SYMBOL(ddi_copyout); @@ -559,7 +565,7 @@ hostid_read(uint32_t *hostid) return (error); } - if (size < sizeof(HW_HOSTID_MASK)) { + if (size < sizeof (HW_HOSTID_MASK)) { kobj_close_file(file); return (EINVAL); } @@ -568,7 +574,7 @@ hostid_read(uint32_t *hostid) * Read directly into the variable like eglibc does. * Short reads are okay; native behavior is preserved. */ - error = kobj_read_file(file, (char *)&value, sizeof(value), 0); + error = kobj_read_file(file, (char *)&value, sizeof (value), 0); if (error < 0) { kobj_close_file(file); return (EIO); @@ -578,7 +584,7 @@ hostid_read(uint32_t *hostid) *hostid = (value & HW_HOSTID_MASK); kobj_close_file(file); - return 0; + return (0); } /* @@ -704,7 +710,7 @@ spl_init(void) goto out10; printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, - SPL_META_RELEASE, SPL_DEBUG_STR); + SPL_META_RELEASE, SPL_DEBUG_STR); return (rc); out10: @@ -727,8 +733,8 @@ out2: spl_kvmem_fini(); out1: printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer " - "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, - SPL_DEBUG_STR, rc); + "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, + SPL_DEBUG_STR, rc); return (rc); } @@ -737,7 +743,7 @@ static void __exit spl_fini(void) { printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n", - SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); + SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); spl_zlib_fini(); spl_kstat_fini(); spl_proc_fini(); diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index 36686692b..e4bcdd825 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -134,8 +134,8 @@ MODULE_PARM_DESC(spl_kmem_cache_slab_limit, * have been deemed costly by the kernel. */ unsigned int spl_kmem_cache_kmem_limit = - ((1 << (PAGE_ALLOC_COSTLY_ORDER - 1)) * PAGE_SIZE) / - SPL_KMEM_CACHE_OBJ_PER_SLAB; + ((1 << (PAGE_ALLOC_COSTLY_ORDER - 1)) * PAGE_SIZE) / + SPL_KMEM_CACHE_OBJ_PER_SLAB; module_param(spl_kmem_cache_kmem_limit, uint, 0644); MODULE_PARM_DESC(spl_kmem_cache_kmem_limit, "Objects less than N bytes use the kmalloc"); @@ -1000,15 +1000,15 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, #endif #if defined(HAVE_KMEM_CACHE_CREATE_USERCOPY) - /* - * Newer grsec patchset uses kmem_cache_create_usercopy() - * instead of SLAB_USERCOPY flag - */ - skc->skc_linux_cache = kmem_cache_create_usercopy( - skc->skc_name, size, align, slabflags, 0, size, NULL); + /* + * Newer grsec patchset uses kmem_cache_create_usercopy() + * instead of SLAB_USERCOPY flag + */ + skc->skc_linux_cache = kmem_cache_create_usercopy( + skc->skc_name, size, align, slabflags, 0, size, NULL); #else - skc->skc_linux_cache = kmem_cache_create( - skc->skc_name, size, align, slabflags, NULL); + skc->skc_linux_cache = kmem_cache_create( + skc->skc_name, size, align, slabflags, NULL); #endif if (skc->skc_linux_cache == NULL) { rc = ENOMEM; @@ -1186,7 +1186,7 @@ spl_cache_grow_work(void *data) spl_kmem_alloc_t *ska = (spl_kmem_alloc_t *)data; spl_kmem_cache_t *skc = ska->ska_cache; - (void)__spl_cache_grow(skc, ska->ska_flags); + (void) __spl_cache_grow(skc, ska->ska_flags); atomic_dec(&skc->skc_ref); smp_mb__before_atomic(); diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 41bec75d2..bf9c6b179 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -383,7 +383,7 @@ spl_kmem_free_track(const void *ptr, size_t size) { kmem_debug_t *dptr; - /* Ignore NULL pointer since we haven't tracked it at all*/ + /* Ignore NULL pointer since we haven't tracked it at all */ if (ptr == NULL) return; diff --git a/module/spl/spl-kobj.c b/module/spl/spl-kobj.c index 6191163a8..7019369bd 100644 --- a/module/spl/spl-kobj.c +++ b/module/spl/spl-kobj.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Kobj Implementation. */ @@ -33,7 +33,7 @@ kobj_open_file(const char *name) vnode_t *vp; int rc; - file = kmalloc(sizeof(_buf_t), kmem_flags_convert(KM_SLEEP)); + file = kmalloc(sizeof (_buf_t), kmem_flags_convert(KM_SLEEP)); if (file == NULL) return ((_buf_t *)-1UL); @@ -52,7 +52,7 @@ void kobj_close_file(struct _buf *file) { VOP_CLOSE(file->vp, 0, 0, 0, 0, 0); - kfree(file); + kfree(file); } /* kobj_close_file() */ EXPORT_SYMBOL(kobj_close_file); @@ -72,15 +72,15 @@ EXPORT_SYMBOL(kobj_read_file); int kobj_get_filesize(struct _buf *file, uint64_t *size) { - vattr_t vap; + vattr_t vap; int rc; rc = VOP_GETATTR(file->vp, &vap, 0, 0, NULL); if (rc) return (rc); - *size = vap.va_size; + *size = vap.va_size; - return (rc); + return (rc); } /* kobj_get_filesize() */ EXPORT_SYMBOL(kobj_get_filesize); diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 4517824e7..70c0c98f8 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Kstat Implementation. */ @@ -30,7 +30,7 @@ #include #ifndef HAVE_PDE_DATA -#define PDE_DATA(x) (PDE(x)->data) +#define PDE_DATA(x) (PDE(x)->data) #endif static kmutex_t kstat_module_lock; @@ -41,13 +41,13 @@ static int kstat_resize_raw(kstat_t *ksp) { if (ksp->ks_raw_bufsize == KSTAT_RAW_MAX) - return ENOMEM; + return (ENOMEM); vmem_free(ksp->ks_raw_buf, ksp->ks_raw_bufsize); ksp->ks_raw_bufsize = MIN(ksp->ks_raw_bufsize * 2, KSTAT_RAW_MAX); ksp->ks_raw_buf = vmem_alloc(ksp->ks_raw_bufsize, KM_SLEEP); - return 0; + return (0); } void @@ -119,210 +119,212 @@ EXPORT_SYMBOL(kstat_runq_exit); static int kstat_seq_show_headers(struct seq_file *f) { - kstat_t *ksp = (kstat_t *)f->private; + kstat_t *ksp = (kstat_t *)f->private; int rc = 0; - ASSERT(ksp->ks_magic == KS_MAGIC); + ASSERT(ksp->ks_magic == KS_MAGIC); - seq_printf(f, "%d %d 0x%02x %d %d %lld %lld\n", - ksp->ks_kid, ksp->ks_type, ksp->ks_flags, - ksp->ks_ndata, (int)ksp->ks_data_size, - ksp->ks_crtime, ksp->ks_snaptime); + seq_printf(f, "%d %d 0x%02x %d %d %lld %lld\n", + ksp->ks_kid, ksp->ks_type, ksp->ks_flags, + ksp->ks_ndata, (int)ksp->ks_data_size, + ksp->ks_crtime, ksp->ks_snaptime); switch (ksp->ks_type) { - case KSTAT_TYPE_RAW: + case KSTAT_TYPE_RAW: restart: - if (ksp->ks_raw_ops.headers) { - rc = ksp->ks_raw_ops.headers( - ksp->ks_raw_buf, ksp->ks_raw_bufsize); + if (ksp->ks_raw_ops.headers) { + rc = ksp->ks_raw_ops.headers( + ksp->ks_raw_buf, ksp->ks_raw_bufsize); if (rc == ENOMEM && !kstat_resize_raw(ksp)) goto restart; if (!rc) - seq_puts(f, ksp->ks_raw_buf); - } else { - seq_printf(f, "raw data\n"); - } - break; - case KSTAT_TYPE_NAMED: - seq_printf(f, "%-31s %-4s %s\n", - "name", "type", "data"); - break; - case KSTAT_TYPE_INTR: - seq_printf(f, "%-8s %-8s %-8s %-8s %-8s\n", - "hard", "soft", "watchdog", - "spurious", "multsvc"); - break; - case KSTAT_TYPE_IO: - seq_printf(f, - "%-8s %-8s %-8s %-8s %-8s %-8s " - "%-8s %-8s %-8s %-8s %-8s %-8s\n", - "nread", "nwritten", "reads", "writes", - "wtime", "wlentime", "wupdate", - "rtime", "rlentime", "rupdate", - "wcnt", "rcnt"); - break; - case KSTAT_TYPE_TIMER: - seq_printf(f, - "%-31s %-8s " - "%-8s %-8s %-8s %-8s %-8s\n", - "name", "events", "elapsed", - "min", "max", "start", "stop"); - break; - default: - PANIC("Undefined kstat type %d\n", ksp->ks_type); - } + seq_puts(f, ksp->ks_raw_buf); + } else { + seq_printf(f, "raw data\n"); + } + break; + case KSTAT_TYPE_NAMED: + seq_printf(f, "%-31s %-4s %s\n", + "name", "type", "data"); + break; + case KSTAT_TYPE_INTR: + seq_printf(f, "%-8s %-8s %-8s %-8s %-8s\n", + "hard", "soft", "watchdog", + "spurious", "multsvc"); + break; + case KSTAT_TYPE_IO: + seq_printf(f, + "%-8s %-8s %-8s %-8s %-8s %-8s " + "%-8s %-8s %-8s %-8s %-8s %-8s\n", + "nread", "nwritten", "reads", "writes", + "wtime", "wlentime", "wupdate", + "rtime", "rlentime", "rupdate", + "wcnt", "rcnt"); + break; + case KSTAT_TYPE_TIMER: + seq_printf(f, + "%-31s %-8s " + "%-8s %-8s %-8s %-8s %-8s\n", + "name", "events", "elapsed", + "min", "max", "start", "stop"); + break; + default: + PANIC("Undefined kstat type %d\n", ksp->ks_type); + } - return -rc; + return (-rc); } static int kstat_seq_show_raw(struct seq_file *f, unsigned char *p, int l) { - int i, j; + int i, j; - for (i = 0; ; i++) { - seq_printf(f, "%03x:", i); + for (i = 0; ; i++) { + seq_printf(f, "%03x:", i); - for (j = 0; j < 16; j++) { - if (i * 16 + j >= l) { - seq_printf(f, "\n"); - goto out; - } + for (j = 0; j < 16; j++) { + if (i * 16 + j >= l) { + seq_printf(f, "\n"); + goto out; + } - seq_printf(f, " %02x", (unsigned char)p[i * 16 + j]); - } - seq_printf(f, "\n"); - } + seq_printf(f, " %02x", (unsigned char)p[i * 16 + j]); + } + seq_printf(f, "\n"); + } out: - return 0; + return (0); } static int kstat_seq_show_named(struct seq_file *f, kstat_named_t *knp) { - seq_printf(f, "%-31s %-4d ", knp->name, knp->data_type); + seq_printf(f, "%-31s %-4d ", knp->name, knp->data_type); - switch (knp->data_type) { - case KSTAT_DATA_CHAR: - knp->value.c[15] = '\0'; /* NULL terminate */ - seq_printf(f, "%-16s", knp->value.c); - break; - /* XXX - We need to be more careful able what tokens are - * used for each arch, for now this is correct for x86_64. - */ - case KSTAT_DATA_INT32: - seq_printf(f, "%d", knp->value.i32); - break; - case KSTAT_DATA_UINT32: - seq_printf(f, "%u", knp->value.ui32); - break; - case KSTAT_DATA_INT64: - seq_printf(f, "%lld", (signed long long)knp->value.i64); - break; - case KSTAT_DATA_UINT64: - seq_printf(f, "%llu", (unsigned long long)knp->value.ui64); - break; - case KSTAT_DATA_LONG: - seq_printf(f, "%ld", knp->value.l); - break; - case KSTAT_DATA_ULONG: - seq_printf(f, "%lu", knp->value.ul); - break; - case KSTAT_DATA_STRING: - KSTAT_NAMED_STR_PTR(knp) - [KSTAT_NAMED_STR_BUFLEN(knp)-1] = '\0'; - seq_printf(f, "%s", KSTAT_NAMED_STR_PTR(knp)); - break; - default: - PANIC("Undefined kstat data type %d\n", knp->data_type); - } + switch (knp->data_type) { + case KSTAT_DATA_CHAR: + knp->value.c[15] = '\0'; /* NULL terminate */ + seq_printf(f, "%-16s", knp->value.c); + break; + /* + * NOTE - We need to be more careful able what tokens are + * used for each arch, for now this is correct for x86_64. + */ + case KSTAT_DATA_INT32: + seq_printf(f, "%d", knp->value.i32); + break; + case KSTAT_DATA_UINT32: + seq_printf(f, "%u", knp->value.ui32); + break; + case KSTAT_DATA_INT64: + seq_printf(f, "%lld", (signed long long)knp->value.i64); + break; + case KSTAT_DATA_UINT64: + seq_printf(f, "%llu", + (unsigned long long)knp->value.ui64); + break; + case KSTAT_DATA_LONG: + seq_printf(f, "%ld", knp->value.l); + break; + case KSTAT_DATA_ULONG: + seq_printf(f, "%lu", knp->value.ul); + break; + case KSTAT_DATA_STRING: + KSTAT_NAMED_STR_PTR(knp) + [KSTAT_NAMED_STR_BUFLEN(knp)-1] = '\0'; + seq_printf(f, "%s", KSTAT_NAMED_STR_PTR(knp)); + break; + default: + PANIC("Undefined kstat data type %d\n", knp->data_type); + } - seq_printf(f, "\n"); + seq_printf(f, "\n"); - return 0; + return (0); } static int kstat_seq_show_intr(struct seq_file *f, kstat_intr_t *kip) { - seq_printf(f, "%-8u %-8u %-8u %-8u %-8u\n", - kip->intrs[KSTAT_INTR_HARD], - kip->intrs[KSTAT_INTR_SOFT], - kip->intrs[KSTAT_INTR_WATCHDOG], - kip->intrs[KSTAT_INTR_SPURIOUS], - kip->intrs[KSTAT_INTR_MULTSVC]); + seq_printf(f, "%-8u %-8u %-8u %-8u %-8u\n", + kip->intrs[KSTAT_INTR_HARD], + kip->intrs[KSTAT_INTR_SOFT], + kip->intrs[KSTAT_INTR_WATCHDOG], + kip->intrs[KSTAT_INTR_SPURIOUS], + kip->intrs[KSTAT_INTR_MULTSVC]); - return 0; + return (0); } static int kstat_seq_show_io(struct seq_file *f, kstat_io_t *kip) { - seq_printf(f, - "%-8llu %-8llu %-8u %-8u %-8lld %-8lld " - "%-8lld %-8lld %-8lld %-8lld %-8u %-8u\n", - kip->nread, kip->nwritten, - kip->reads, kip->writes, - kip->wtime, kip->wlentime, kip->wlastupdate, - kip->rtime, kip->rlentime, kip->rlastupdate, - kip->wcnt, kip->rcnt); + seq_printf(f, + "%-8llu %-8llu %-8u %-8u %-8lld %-8lld " + "%-8lld %-8lld %-8lld %-8lld %-8u %-8u\n", + kip->nread, kip->nwritten, + kip->reads, kip->writes, + kip->wtime, kip->wlentime, kip->wlastupdate, + kip->rtime, kip->rlentime, kip->rlastupdate, + kip->wcnt, kip->rcnt); - return 0; + return (0); } static int kstat_seq_show_timer(struct seq_file *f, kstat_timer_t *ktp) { - seq_printf(f, - "%-31s %-8llu %-8lld %-8lld %-8lld %-8lld %-8lld\n", - ktp->name, ktp->num_events, ktp->elapsed_time, - ktp->min_time, ktp->max_time, - ktp->start_time, ktp->stop_time); + seq_printf(f, + "%-31s %-8llu %-8lld %-8lld %-8lld %-8lld %-8lld\n", + ktp->name, ktp->num_events, ktp->elapsed_time, + ktp->min_time, ktp->max_time, + ktp->start_time, ktp->stop_time); - return 0; + return (0); } static int kstat_seq_show(struct seq_file *f, void *p) { - kstat_t *ksp = (kstat_t *)f->private; - int rc = 0; + kstat_t *ksp = (kstat_t *)f->private; + int rc = 0; - ASSERT(ksp->ks_magic == KS_MAGIC); + ASSERT(ksp->ks_magic == KS_MAGIC); switch (ksp->ks_type) { - case KSTAT_TYPE_RAW: + case KSTAT_TYPE_RAW: restart: - if (ksp->ks_raw_ops.data) { - rc = ksp->ks_raw_ops.data( + if (ksp->ks_raw_ops.data) { + rc = ksp->ks_raw_ops.data( ksp->ks_raw_buf, ksp->ks_raw_bufsize, p); if (rc == ENOMEM && !kstat_resize_raw(ksp)) goto restart; if (!rc) - seq_puts(f, ksp->ks_raw_buf); - } else { - ASSERT(ksp->ks_ndata == 1); - rc = kstat_seq_show_raw(f, ksp->ks_data, - ksp->ks_data_size); - } - break; - case KSTAT_TYPE_NAMED: - rc = kstat_seq_show_named(f, (kstat_named_t *)p); - break; - case KSTAT_TYPE_INTR: - rc = kstat_seq_show_intr(f, (kstat_intr_t *)p); - break; - case KSTAT_TYPE_IO: - rc = kstat_seq_show_io(f, (kstat_io_t *)p); - break; - case KSTAT_TYPE_TIMER: - rc = kstat_seq_show_timer(f, (kstat_timer_t *)p); - break; - default: - PANIC("Undefined kstat type %d\n", ksp->ks_type); - } + seq_puts(f, ksp->ks_raw_buf); + } else { + ASSERT(ksp->ks_ndata == 1); + rc = kstat_seq_show_raw(f, ksp->ks_data, + ksp->ks_data_size); + } + break; + case KSTAT_TYPE_NAMED: + rc = kstat_seq_show_named(f, (kstat_named_t *)p); + break; + case KSTAT_TYPE_INTR: + rc = kstat_seq_show_intr(f, (kstat_intr_t *)p); + break; + case KSTAT_TYPE_IO: + rc = kstat_seq_show_io(f, (kstat_io_t *)p); + break; + case KSTAT_TYPE_TIMER: + rc = kstat_seq_show_timer(f, (kstat_timer_t *)p); + break; + default: + PANIC("Undefined kstat type %d\n", ksp->ks_type); + } - return -rc; + return (-rc); } int @@ -333,79 +335,79 @@ kstat_default_update(kstat_t *ksp, int rw) if (rw == KSTAT_WRITE) return (EACCES); - return 0; + return (0); } static void * kstat_seq_data_addr(kstat_t *ksp, loff_t n) { - void *rc = NULL; + void *rc = NULL; switch (ksp->ks_type) { - case KSTAT_TYPE_RAW: - if (ksp->ks_raw_ops.addr) - rc = ksp->ks_raw_ops.addr(ksp, n); - else - rc = ksp->ks_data; - break; - case KSTAT_TYPE_NAMED: - rc = ksp->ks_data + n * sizeof(kstat_named_t); - break; - case KSTAT_TYPE_INTR: - rc = ksp->ks_data + n * sizeof(kstat_intr_t); - break; - case KSTAT_TYPE_IO: - rc = ksp->ks_data + n * sizeof(kstat_io_t); - break; - case KSTAT_TYPE_TIMER: - rc = ksp->ks_data + n * sizeof(kstat_timer_t); - break; - default: - PANIC("Undefined kstat type %d\n", ksp->ks_type); - } + case KSTAT_TYPE_RAW: + if (ksp->ks_raw_ops.addr) + rc = ksp->ks_raw_ops.addr(ksp, n); + else + rc = ksp->ks_data; + break; + case KSTAT_TYPE_NAMED: + rc = ksp->ks_data + n * sizeof (kstat_named_t); + break; + case KSTAT_TYPE_INTR: + rc = ksp->ks_data + n * sizeof (kstat_intr_t); + break; + case KSTAT_TYPE_IO: + rc = ksp->ks_data + n * sizeof (kstat_io_t); + break; + case KSTAT_TYPE_TIMER: + rc = ksp->ks_data + n * sizeof (kstat_timer_t); + break; + default: + PANIC("Undefined kstat type %d\n", ksp->ks_type); + } - return (rc); + return (rc); } static void * kstat_seq_start(struct seq_file *f, loff_t *pos) { - loff_t n = *pos; - kstat_t *ksp = (kstat_t *)f->private; - ASSERT(ksp->ks_magic == KS_MAGIC); + loff_t n = *pos; + kstat_t *ksp = (kstat_t *)f->private; + ASSERT(ksp->ks_magic == KS_MAGIC); mutex_enter(ksp->ks_lock); - if (ksp->ks_type == KSTAT_TYPE_RAW) { - ksp->ks_raw_bufsize = PAGE_SIZE; - ksp->ks_raw_buf = vmem_alloc(ksp->ks_raw_bufsize, KM_SLEEP); - } + if (ksp->ks_type == KSTAT_TYPE_RAW) { + ksp->ks_raw_bufsize = PAGE_SIZE; + ksp->ks_raw_buf = vmem_alloc(ksp->ks_raw_bufsize, KM_SLEEP); + } - /* Dynamically update kstat, on error existing kstats are used */ - (void) ksp->ks_update(ksp, KSTAT_READ); + /* Dynamically update kstat, on error existing kstats are used */ + (void) ksp->ks_update(ksp, KSTAT_READ); ksp->ks_snaptime = gethrtime(); - if (!n && kstat_seq_show_headers(f)) + if (!n && kstat_seq_show_headers(f)) return (NULL); - if (n >= ksp->ks_ndata) - return (NULL); + if (n >= ksp->ks_ndata) + return (NULL); - return (kstat_seq_data_addr(ksp, n)); + return (kstat_seq_data_addr(ksp, n)); } static void * kstat_seq_next(struct seq_file *f, void *p, loff_t *pos) { - kstat_t *ksp = (kstat_t *)f->private; - ASSERT(ksp->ks_magic == KS_MAGIC); + kstat_t *ksp = (kstat_t *)f->private; + ASSERT(ksp->ks_magic == KS_MAGIC); - ++*pos; - if (*pos >= ksp->ks_ndata) - return (NULL); + ++*pos; + if (*pos >= ksp->ks_ndata) + return (NULL); - return (kstat_seq_data_addr(ksp, *pos)); + return (kstat_seq_data_addr(ksp, *pos)); } static void @@ -421,10 +423,10 @@ kstat_seq_stop(struct seq_file *f, void *v) } static struct seq_operations kstat_seq_ops = { - .show = kstat_seq_show, - .start = kstat_seq_start, - .next = kstat_seq_next, - .stop = kstat_seq_stop, + .show = kstat_seq_show, + .start = kstat_seq_start, + .next = kstat_seq_next, + .stop = kstat_seq_stop, }; static kstat_module_t * @@ -465,28 +467,28 @@ kstat_delete_module(kstat_module_t *module) ASSERT(list_empty(&module->ksm_kstat_list)); remove_proc_entry(module->ksm_name, proc_spl_kstat); list_del(&module->ksm_module_list); - kmem_free(module, sizeof(kstat_module_t)); + kmem_free(module, sizeof (kstat_module_t)); } static int proc_kstat_open(struct inode *inode, struct file *filp) { - struct seq_file *f; - int rc; + struct seq_file *f; + int rc; - rc = seq_open(filp, &kstat_seq_ops); - if (rc) - return rc; + rc = seq_open(filp, &kstat_seq_ops); + if (rc) + return (rc); - f = filp->private_data; - f->private = PDE_DATA(inode); + f = filp->private_data; + f->private = PDE_DATA(inode); - return rc; + return (rc); } static ssize_t -proc_kstat_write(struct file *filp, const char __user *buf, - size_t len, loff_t *ppos) +proc_kstat_write(struct file *filp, const char __user *buf, size_t len, + loff_t *ppos) { struct seq_file *f = filp->private_data; kstat_t *ksp = f->private; @@ -527,8 +529,8 @@ EXPORT_SYMBOL(__kstat_set_raw_ops); kstat_t * __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, - const char *ks_class, uchar_t ks_type, uint_t ks_ndata, - uchar_t ks_flags) + const char *ks_class, uchar_t ks_type, uint_t ks_ndata, + uchar_t ks_flags) { kstat_t *ksp; @@ -538,24 +540,24 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, ASSERT(!(ks_flags & KSTAT_FLAG_UNSUPPORTED)); if ((ks_type == KSTAT_TYPE_INTR) || (ks_type == KSTAT_TYPE_IO)) - ASSERT(ks_ndata == 1); + ASSERT(ks_ndata == 1); - ksp = kmem_zalloc(sizeof(*ksp), KM_SLEEP); + ksp = kmem_zalloc(sizeof (*ksp), KM_SLEEP); if (ksp == NULL) - return ksp; + return (ksp); mutex_enter(&kstat_module_lock); ksp->ks_kid = kstat_id; - kstat_id++; + kstat_id++; mutex_exit(&kstat_module_lock); - ksp->ks_magic = KS_MAGIC; + ksp->ks_magic = KS_MAGIC; mutex_init(&ksp->ks_private_lock, NULL, MUTEX_DEFAULT, NULL); ksp->ks_lock = &ksp->ks_private_lock; INIT_LIST_HEAD(&ksp->ks_list); ksp->ks_crtime = gethrtime(); - ksp->ks_snaptime = ksp->ks_crtime; + ksp->ks_snaptime = ksp->ks_crtime; strncpy(ksp->ks_module, ks_module, KSTAT_STRLEN); ksp->ks_instance = ks_instance; strncpy(ksp->ks_name, ks_name, KSTAT_STRLEN); @@ -571,41 +573,41 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, ksp->ks_raw_bufsize = 0; switch (ksp->ks_type) { - case KSTAT_TYPE_RAW: - ksp->ks_ndata = 1; - ksp->ks_data_size = ks_ndata; - break; - case KSTAT_TYPE_NAMED: - ksp->ks_ndata = ks_ndata; - ksp->ks_data_size = ks_ndata * sizeof(kstat_named_t); - break; - case KSTAT_TYPE_INTR: - ksp->ks_ndata = ks_ndata; - ksp->ks_data_size = ks_ndata * sizeof(kstat_intr_t); - break; - case KSTAT_TYPE_IO: - ksp->ks_ndata = ks_ndata; - ksp->ks_data_size = ks_ndata * sizeof(kstat_io_t); - break; - case KSTAT_TYPE_TIMER: - ksp->ks_ndata = ks_ndata; - ksp->ks_data_size = ks_ndata * sizeof(kstat_timer_t); - break; - default: - PANIC("Undefined kstat type %d\n", ksp->ks_type); - } + case KSTAT_TYPE_RAW: + ksp->ks_ndata = 1; + ksp->ks_data_size = ks_ndata; + break; + case KSTAT_TYPE_NAMED: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof (kstat_named_t); + break; + case KSTAT_TYPE_INTR: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof (kstat_intr_t); + break; + case KSTAT_TYPE_IO: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof (kstat_io_t); + break; + case KSTAT_TYPE_TIMER: + ksp->ks_ndata = ks_ndata; + ksp->ks_data_size = ks_ndata * sizeof (kstat_timer_t); + break; + default: + PANIC("Undefined kstat type %d\n", ksp->ks_type); + } if (ksp->ks_flags & KSTAT_FLAG_VIRTUAL) { - ksp->ks_data = NULL; - } else { - ksp->ks_data = kmem_zalloc(ksp->ks_data_size, KM_SLEEP); - if (ksp->ks_data == NULL) { - kmem_free(ksp, sizeof(*ksp)); - ksp = NULL; - } - } + ksp->ks_data = NULL; + } else { + ksp->ks_data = kmem_zalloc(ksp->ks_data_size, KM_SLEEP); + if (ksp->ks_data == NULL) { + kmem_free(ksp, sizeof (*ksp)); + ksp = NULL; + } + } - return ksp; + return (ksp); } EXPORT_SYMBOL(__kstat_create); @@ -706,9 +708,7 @@ __kstat_delete(kstat_t *ksp) ksp->ks_lock = NULL; mutex_destroy(&ksp->ks_private_lock); - kmem_free(ksp, sizeof(*ksp)); - - return; + kmem_free(ksp, sizeof (*ksp)); } EXPORT_SYMBOL(__kstat_delete); @@ -717,7 +717,7 @@ spl_kstat_init(void) { mutex_init(&kstat_module_lock, NULL, MUTEX_DEFAULT, NULL); INIT_LIST_HEAD(&kstat_module_list); - kstat_id = 0; + kstat_id = 0; return (0); } @@ -727,4 +727,3 @@ spl_kstat_fini(void) ASSERT(list_empty(&kstat_module_list)); mutex_destroy(&kstat_module_lock); } - diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index 9e1e103db..ba818862b 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -20,17 +20,11 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Mutex Implementation. */ #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM -#endif - -#define DEBUG_SUBSYSTEM S_MUTEX - int spl_mutex_init(void) { return 0; } void spl_mutex_fini(void) { } diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 848eebffe..f5998a06e 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Proc Implementation. */ @@ -37,7 +37,7 @@ #include #include -#if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) +#if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) typedef struct ctl_table __no_const spl_ctl_table; #else typedef struct ctl_table spl_ctl_table; @@ -55,56 +55,57 @@ static struct proc_dir_entry *proc_spl_taskq = NULL; struct proc_dir_entry *proc_spl_kstat = NULL; static int -proc_copyin_string(char *kbuffer, int kbuffer_size, - const char *ubuffer, int ubuffer_size) +proc_copyin_string(char *kbuffer, int kbuffer_size, const char *ubuffer, + int ubuffer_size) { - int size; + int size; - if (ubuffer_size > kbuffer_size) - return -EOVERFLOW; + if (ubuffer_size > kbuffer_size) + return (-EOVERFLOW); - if (copy_from_user((void *)kbuffer, (void *)ubuffer, ubuffer_size)) - return -EFAULT; + if (copy_from_user((void *)kbuffer, (void *)ubuffer, ubuffer_size)) + return (-EFAULT); - /* strip trailing whitespace */ - size = strnlen(kbuffer, ubuffer_size); - while (size-- >= 0) - if (!isspace(kbuffer[size])) - break; + /* strip trailing whitespace */ + size = strnlen(kbuffer, ubuffer_size); + while (size-- >= 0) + if (!isspace(kbuffer[size])) + break; - /* empty string */ - if (size < 0) - return -EINVAL; + /* empty string */ + if (size < 0) + return (-EINVAL); - /* no space to terminate */ - if (size == kbuffer_size) - return -EOVERFLOW; + /* no space to terminate */ + if (size == kbuffer_size) + return (-EOVERFLOW); - kbuffer[size + 1] = 0; - return 0; + kbuffer[size + 1] = 0; + return (0); } static int proc_copyout_string(char *ubuffer, int ubuffer_size, - const char *kbuffer, char *append) + const char *kbuffer, char *append) { - /* NB if 'append' != NULL, it's a single character to append to the - * copied out string - usually "\n", for /proc entries and - * (i.e. a terminating zero byte) for sysctl entries - */ - int size = MIN(strlen(kbuffer), ubuffer_size); + /* + * NB if 'append' != NULL, it's a single character to append to the + * copied out string - usually "\n", for /proc entries and + * (i.e. a terminating zero byte) for sysctl entries + */ + int size = MIN(strlen(kbuffer), ubuffer_size); - if (copy_to_user(ubuffer, kbuffer, size)) - return -EFAULT; + if (copy_to_user(ubuffer, kbuffer, size)) + return (-EFAULT); - if (append != NULL && size < ubuffer_size) { - if (copy_to_user(ubuffer + size, append, 1)) - return -EFAULT; + if (append != NULL && size < ubuffer_size) { + if (copy_to_user(ubuffer + size, append, 1)) + return (-EFAULT); - size++; - } + size++; + } - return size; + return (size); } #ifdef DEBUG_KMEM @@ -112,27 +113,27 @@ static int proc_domemused(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - int rc = 0; - unsigned long min = 0, max = ~0, val; - spl_ctl_table dummy = *table; + int rc = 0; + unsigned long min = 0, max = ~0, val; + spl_ctl_table dummy = *table; - dummy.data = &val; - dummy.proc_handler = &proc_dointvec; - dummy.extra1 = &min; - dummy.extra2 = &max; + dummy.data = &val; + dummy.proc_handler = &proc_dointvec; + dummy.extra1 = &min; + dummy.extra2 = &max; - if (write) { - *ppos += *lenp; - } else { -# ifdef HAVE_ATOMIC64_T - val = atomic64_read((atomic64_t *)table->data); -# else - val = atomic_read((atomic_t *)table->data); -# endif /* HAVE_ATOMIC64_T */ - rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); - } + if (write) { + *ppos += *lenp; + } else { +#ifdef HAVE_ATOMIC64_T + val = atomic64_read((atomic64_t *)table->data); +#else + val = atomic_read((atomic_t *)table->data); +#endif /* HAVE_ATOMIC64_T */ + rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); + } - return (rc); + return (rc); } #endif /* DEBUG_KMEM */ @@ -140,23 +141,23 @@ static int proc_doslab(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - int rc = 0; - unsigned long min = 0, max = ~0, val = 0, mask; - spl_ctl_table dummy = *table; - spl_kmem_cache_t *skc; + int rc = 0; + unsigned long min = 0, max = ~0, val = 0, mask; + spl_ctl_table dummy = *table; + spl_kmem_cache_t *skc; - dummy.data = &val; - dummy.proc_handler = &proc_dointvec; - dummy.extra1 = &min; - dummy.extra2 = &max; + dummy.data = &val; + dummy.proc_handler = &proc_dointvec; + dummy.extra1 = &min; + dummy.extra2 = &max; - if (write) { - *ppos += *lenp; - } else { - down_read(&spl_kmem_cache_sem); - mask = (unsigned long)table->data; + if (write) { + *ppos += *lenp; + } else { + down_read(&spl_kmem_cache_sem); + mask = (unsigned long)table->data; - list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { + list_for_each_entry(skc, &spl_kmem_cache_list, skc_list) { /* Only use slabs of the correct kmem/vmem type */ if (!(skc->skc_flags & mask)) @@ -165,58 +166,61 @@ proc_doslab(struct ctl_table *table, int write, /* Sum the specified field for selected slabs */ switch (mask & (KMC_TOTAL | KMC_ALLOC | KMC_MAX)) { case KMC_TOTAL: - val += skc->skc_slab_size * skc->skc_slab_total; + val += skc->skc_slab_size * skc->skc_slab_total; break; case KMC_ALLOC: - val += skc->skc_obj_size * skc->skc_obj_alloc; + val += skc->skc_obj_size * skc->skc_obj_alloc; break; case KMC_MAX: - val += skc->skc_obj_size * skc->skc_obj_max; + val += skc->skc_obj_size * skc->skc_obj_max; break; } - } + } - up_read(&spl_kmem_cache_sem); - rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); - } + up_read(&spl_kmem_cache_sem); + rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos); + } - return (rc); + return (rc); } static int proc_dohostid(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - int len, rc = 0; - char *end, str[32]; + int len, rc = 0; + char *end, str[32]; - if (write) { - /* We can't use proc_doulongvec_minmax() in the write - * case here because hostid while a hex value has no - * leading 0x which confuses the helper function. */ - rc = proc_copyin_string(str, sizeof(str), buffer, *lenp); - if (rc < 0) - return (rc); + if (write) { + /* + * We can't use proc_doulongvec_minmax() in the write + * case here because hostid while a hex value has no + * leading 0x which confuses the helper function. + */ + rc = proc_copyin_string(str, sizeof (str), buffer, *lenp); + if (rc < 0) + return (rc); - spl_hostid = simple_strtoul(str, &end, 16); - if (str == end) - return (-EINVAL); + spl_hostid = simple_strtoul(str, &end, 16); + if (str == end) + return (-EINVAL); - } else { - len = snprintf(str, sizeof(str), "%lx", + } else { + len = snprintf(str, sizeof (str), "%lx", (unsigned long) zone_get_hostid(NULL)); - if (*ppos >= len) - rc = 0; - else - rc = proc_copyout_string(buffer,*lenp,str+*ppos,"\n"); + if (*ppos >= len) + rc = 0; + else + rc = proc_copyout_string(buffer, + *lenp, str + *ppos, "\n"); - if (rc >= 0) { - *lenp = rc; - *ppos += rc; - } - } + if (rc >= 0) { + *lenp = rc; + *ppos += rc; + } + } - return (rc); + return (rc); } static void @@ -229,11 +233,11 @@ taskq_seq_show_headers(struct seq_file *f) /* indices into the lheads array below */ #define LHEAD_PEND 0 -#define LHEAD_PRIO 1 -#define LHEAD_DELAY 2 -#define LHEAD_WAIT 3 -#define LHEAD_ACTIVE 4 -#define LHEAD_SIZE 5 +#define LHEAD_PRIO 1 +#define LHEAD_DELAY 2 +#define LHEAD_WAIT 3 +#define LHEAD_ACTIVE 4 +#define LHEAD_SIZE 5 static unsigned int spl_max_show_tasks = 512; module_param(spl_max_show_tasks, uint, 0644); @@ -287,7 +291,7 @@ taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) spin_unlock_irqrestore(&tq->tq_wait_waitq.lock, wflags); /* show the base taskq contents */ - snprintf(name, sizeof(name), "%s/%d", tq->tq_name, tq->tq_instance); + snprintf(name, sizeof (name), "%s/%d", tq->tq_name, tq->tq_instance); seq_printf(f, "%-25s ", name); seq_printf(f, "%5d %5d %5d %5d %5d %5d %12d %5d %10x\n", tq->tq_nactive, tq->tq_nthreads, tq->tq_nspawn, @@ -299,7 +303,8 @@ taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) j = 0; list_for_each_entry(tqt, &tq->tq_active_list, tqt_active_list) { if (j == 0) - seq_printf(f, "\t%s:", list_names[LHEAD_ACTIVE]); + seq_printf(f, "\t%s:", + list_names[LHEAD_ACTIVE]); else if (j == 2) { seq_printf(f, "\n\t "); j = 0; @@ -403,32 +408,32 @@ taskq_seq_next(struct seq_file *f, void *p, loff_t *pos) ++*pos; return ((tq->tq_taskqs.next == &tq_list) ? - NULL : list_entry(tq->tq_taskqs.next, taskq_t, tq_taskqs)); + NULL : list_entry(tq->tq_taskqs.next, taskq_t, tq_taskqs)); } static void slab_seq_show_headers(struct seq_file *f) { - seq_printf(f, - "--------------------- cache ----------" - "--------------------------------------------- " - "----- slab ------ " - "---- object ----- " - "--- emergency ---\n"); - seq_printf(f, - "name " - " flags size alloc slabsize objsize " - "total alloc max " - "total alloc max " - "dlock alloc max\n"); + seq_printf(f, + "--------------------- cache ----------" + "--------------------------------------------- " + "----- slab ------ " + "---- object ----- " + "--- emergency ---\n"); + seq_printf(f, + "name " + " flags size alloc slabsize objsize " + "total alloc max " + "total alloc max " + "dlock alloc max\n"); } static int slab_seq_show(struct seq_file *f, void *p) { - spl_kmem_cache_t *skc = p; + spl_kmem_cache_t *skc = p; - ASSERT(skc->skc_magic == SKC_MAGIC); + ASSERT(skc->skc_magic == SKC_MAGIC); /* * Backed by Linux slab see /proc/slabinfo. @@ -436,48 +441,48 @@ slab_seq_show(struct seq_file *f, void *p) if (skc->skc_flags & KMC_SLAB) return (0); - spin_lock(&skc->skc_lock); - seq_printf(f, "%-36s ", skc->skc_name); - seq_printf(f, "0x%05lx %9lu %9lu %8u %8u " - "%5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu\n", - (long unsigned)skc->skc_flags, - (long unsigned)(skc->skc_slab_size * skc->skc_slab_total), - (long unsigned)(skc->skc_obj_size * skc->skc_obj_alloc), - (unsigned)skc->skc_slab_size, - (unsigned)skc->skc_obj_size, - (long unsigned)skc->skc_slab_total, - (long unsigned)skc->skc_slab_alloc, - (long unsigned)skc->skc_slab_max, - (long unsigned)skc->skc_obj_total, - (long unsigned)skc->skc_obj_alloc, - (long unsigned)skc->skc_obj_max, - (long unsigned)skc->skc_obj_deadlock, - (long unsigned)skc->skc_obj_emergency, - (long unsigned)skc->skc_obj_emergency_max); + spin_lock(&skc->skc_lock); + seq_printf(f, "%-36s ", skc->skc_name); + seq_printf(f, "0x%05lx %9lu %9lu %8u %8u " + "%5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu %5lu\n", + (long unsigned)skc->skc_flags, + (long unsigned)(skc->skc_slab_size * skc->skc_slab_total), + (long unsigned)(skc->skc_obj_size * skc->skc_obj_alloc), + (unsigned)skc->skc_slab_size, + (unsigned)skc->skc_obj_size, + (long unsigned)skc->skc_slab_total, + (long unsigned)skc->skc_slab_alloc, + (long unsigned)skc->skc_slab_max, + (long unsigned)skc->skc_obj_total, + (long unsigned)skc->skc_obj_alloc, + (long unsigned)skc->skc_obj_max, + (long unsigned)skc->skc_obj_deadlock, + (long unsigned)skc->skc_obj_emergency, + (long unsigned)skc->skc_obj_emergency_max); - spin_unlock(&skc->skc_lock); + spin_unlock(&skc->skc_lock); - return 0; + return (0); } static void * slab_seq_start(struct seq_file *f, loff_t *pos) { - struct list_head *p; - loff_t n = *pos; + struct list_head *p; + loff_t n = *pos; down_read(&spl_kmem_cache_sem); - if (!n) - slab_seq_show_headers(f); + if (!n) + slab_seq_show_headers(f); - p = spl_kmem_cache_list.next; - while (n--) { - p = p->next; - if (p == &spl_kmem_cache_list) - return (NULL); - } + p = spl_kmem_cache_list.next; + while (n--) { + p = p->next; + if (p == &spl_kmem_cache_list) + return (NULL); + } - return (list_entry(p, spl_kmem_cache_t, skc_list)); + return (list_entry(p, spl_kmem_cache_t, skc_list)); } static void * @@ -485,9 +490,9 @@ slab_seq_next(struct seq_file *f, void *p, loff_t *pos) { spl_kmem_cache_t *skc = p; - ++*pos; - return ((skc->skc_list.next == &spl_kmem_cache_list) ? - NULL : list_entry(skc->skc_list.next,spl_kmem_cache_t,skc_list)); + ++*pos; + return ((skc->skc_list.next == &spl_kmem_cache_list) ? + NULL : list_entry(skc->skc_list.next, spl_kmem_cache_t, skc_list)); } static void @@ -497,23 +502,23 @@ slab_seq_stop(struct seq_file *f, void *v) } static struct seq_operations slab_seq_ops = { - .show = slab_seq_show, - .start = slab_seq_start, - .next = slab_seq_next, - .stop = slab_seq_stop, + .show = slab_seq_show, + .start = slab_seq_start, + .next = slab_seq_next, + .stop = slab_seq_stop, }; static int proc_slab_open(struct inode *inode, struct file *filp) { - return seq_open(filp, &slab_seq_ops); + return (seq_open(filp, &slab_seq_ops)); } static struct file_operations proc_slab_operations = { - .open = proc_slab_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, + .open = proc_slab_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, }; static void @@ -523,122 +528,122 @@ taskq_seq_stop(struct seq_file *f, void *v) } static struct seq_operations taskq_all_seq_ops = { - .show = taskq_all_seq_show, - .start = taskq_seq_start, - .next = taskq_seq_next, - .stop = taskq_seq_stop, + .show = taskq_all_seq_show, + .start = taskq_seq_start, + .next = taskq_seq_next, + .stop = taskq_seq_stop, }; static struct seq_operations taskq_seq_ops = { - .show = taskq_seq_show, - .start = taskq_seq_start, - .next = taskq_seq_next, - .stop = taskq_seq_stop, + .show = taskq_seq_show, + .start = taskq_seq_start, + .next = taskq_seq_next, + .stop = taskq_seq_stop, }; static int proc_taskq_all_open(struct inode *inode, struct file *filp) { - return seq_open(filp, &taskq_all_seq_ops); + return (seq_open(filp, &taskq_all_seq_ops)); } static int proc_taskq_open(struct inode *inode, struct file *filp) { - return seq_open(filp, &taskq_seq_ops); + return (seq_open(filp, &taskq_seq_ops)); } static struct file_operations proc_taskq_all_operations = { - .open = proc_taskq_all_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, + .open = proc_taskq_all_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, }; static struct file_operations proc_taskq_operations = { - .open = proc_taskq_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, + .open = proc_taskq_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, }; static struct ctl_table spl_kmem_table[] = { #ifdef DEBUG_KMEM - { - .procname = "kmem_used", - .data = &kmem_alloc_used, -# ifdef HAVE_ATOMIC64_T - .maxlen = sizeof(atomic64_t), -# else - .maxlen = sizeof(atomic_t), -# endif /* HAVE_ATOMIC64_T */ - .mode = 0444, - .proc_handler = &proc_domemused, - }, - { - .procname = "kmem_max", - .data = &kmem_alloc_max, - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doulongvec_minmax, - }, + { + .procname = "kmem_used", + .data = &kmem_alloc_used, +#ifdef HAVE_ATOMIC64_T + .maxlen = sizeof (atomic64_t), +#else + .maxlen = sizeof (atomic_t), +#endif /* HAVE_ATOMIC64_T */ + .mode = 0444, + .proc_handler = &proc_domemused, + }, + { + .procname = "kmem_max", + .data = &kmem_alloc_max, + .maxlen = sizeof (unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doulongvec_minmax, + }, #endif /* DEBUG_KMEM */ - { - .procname = "slab_kmem_total", - .data = (void *)(KMC_KMEM | KMC_TOTAL), - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doslab, - }, - { - .procname = "slab_kmem_alloc", - .data = (void *)(KMC_KMEM | KMC_ALLOC), - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doslab, - }, - { - .procname = "slab_kmem_max", - .data = (void *)(KMC_KMEM | KMC_MAX), - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doslab, - }, - { - .procname = "slab_vmem_total", - .data = (void *)(KMC_VMEM | KMC_TOTAL), - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doslab, - }, - { - .procname = "slab_vmem_alloc", - .data = (void *)(KMC_VMEM | KMC_ALLOC), - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doslab, - }, - { - .procname = "slab_vmem_max", - .data = (void *)(KMC_VMEM | KMC_MAX), - .maxlen = sizeof(unsigned long), - .extra1 = &table_min, - .extra2 = &table_max, - .mode = 0444, - .proc_handler = &proc_doslab, - }, + { + .procname = "slab_kmem_total", + .data = (void *)(KMC_KMEM | KMC_TOTAL), + .maxlen = sizeof (unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + .procname = "slab_kmem_alloc", + .data = (void *)(KMC_KMEM | KMC_ALLOC), + .maxlen = sizeof (unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + .procname = "slab_kmem_max", + .data = (void *)(KMC_KMEM | KMC_MAX), + .maxlen = sizeof (unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + .procname = "slab_vmem_total", + .data = (void *)(KMC_VMEM | KMC_TOTAL), + .maxlen = sizeof (unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + .procname = "slab_vmem_alloc", + .data = (void *)(KMC_VMEM | KMC_ALLOC), + .maxlen = sizeof (unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, + { + .procname = "slab_vmem_max", + .data = (void *)(KMC_VMEM | KMC_MAX), + .maxlen = sizeof (unsigned long), + .extra1 = &table_min, + .extra2 = &table_max, + .mode = 0444, + .proc_handler = &proc_doslab, + }, {}, }; @@ -647,43 +652,44 @@ static struct ctl_table spl_kstat_table[] = { }; static struct ctl_table spl_table[] = { - /* NB No .strategy entries have been provided since - * sysctl(8) prefers to go via /proc for portability. - */ - { - .procname = "version", - .data = spl_version, - .maxlen = sizeof(spl_version), - .mode = 0444, - .proc_handler = &proc_dostring, - }, - { - .procname = "hostid", - .data = &spl_hostid, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = &proc_dohostid, - }, + /* + * NB No .strategy entries have been provided since + * sysctl(8) prefers to go via /proc for portability. + */ { - .procname = "kmem", - .mode = 0555, - .child = spl_kmem_table, + .procname = "version", + .data = spl_version, + .maxlen = sizeof (spl_version), + .mode = 0444, + .proc_handler = &proc_dostring, }, { - .procname = "kstat", - .mode = 0555, - .child = spl_kstat_table, + .procname = "hostid", + .data = &spl_hostid, + .maxlen = sizeof (unsigned long), + .mode = 0644, + .proc_handler = &proc_dohostid, }, - {}, + { + .procname = "kmem", + .mode = 0555, + .child = spl_kmem_table, + }, + { + .procname = "kstat", + .mode = 0555, + .child = spl_kstat_table, + }, + {}, }; static struct ctl_table spl_dir[] = { - { - .procname = "spl", - .mode = 0555, - .child = spl_table, - }, - {} + { + .procname = "spl", + .mode = 0555, + .child = spl_table, + }, + {} }; static struct ctl_table spl_root[] = { @@ -703,7 +709,7 @@ spl_proc_init(void) { int rc = 0; - spl_header = register_sysctl_table(spl_root); + spl_header = register_sysctl_table(spl_root); if (spl_header == NULL) return (-EUNATCH); @@ -727,48 +733,48 @@ spl_proc_init(void) goto out; } - proc_spl_kmem = proc_mkdir("kmem", proc_spl); - if (proc_spl_kmem == NULL) { - rc = -EUNATCH; + proc_spl_kmem = proc_mkdir("kmem", proc_spl); + if (proc_spl_kmem == NULL) { + rc = -EUNATCH; goto out; } proc_spl_kmem_slab = proc_create_data("slab", 0444, proc_spl_kmem, &proc_slab_operations, NULL); - if (proc_spl_kmem_slab == NULL) { + if (proc_spl_kmem_slab == NULL) { rc = -EUNATCH; goto out; } - proc_spl_kstat = proc_mkdir("kstat", proc_spl); - if (proc_spl_kstat == NULL) { - rc = -EUNATCH; + proc_spl_kstat = proc_mkdir("kstat", proc_spl); + if (proc_spl_kstat == NULL) { + rc = -EUNATCH; goto out; } out: if (rc) { remove_proc_entry("kstat", proc_spl); - remove_proc_entry("slab", proc_spl_kmem); + remove_proc_entry("slab", proc_spl_kmem); remove_proc_entry("kmem", proc_spl); remove_proc_entry("taskq-all", proc_spl); remove_proc_entry("taskq", proc_spl); remove_proc_entry("spl", NULL); - unregister_sysctl_table(spl_header); + unregister_sysctl_table(spl_header); } - return (rc); + return (rc); } void spl_proc_fini(void) { remove_proc_entry("kstat", proc_spl); - remove_proc_entry("slab", proc_spl_kmem); + remove_proc_entry("slab", proc_spl_kmem); remove_proc_entry("kmem", proc_spl); remove_proc_entry("taskq-all", proc_spl); remove_proc_entry("taskq", proc_spl); remove_proc_entry("spl", NULL); - ASSERT(spl_header != NULL); - unregister_sysctl_table(spl_header); + ASSERT(spl_header != NULL); + unregister_sysctl_table(spl_header); } diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index e497775e6..9a992cc3a 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -20,18 +20,12 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Reader/Writer Lock Implementation. */ #include -#ifdef DEBUG_SUBSYSTEM -#undef DEBUG_SUBSYSTEM -#endif - -#define DEBUG_SUBSYSTEM S_RWLOCK - #if defined(CONFIG_PREEMPT_RT_FULL) #include @@ -94,7 +88,7 @@ __rwsem_tryupgrade(struct rw_semaphore *rwsem) static int __rwsem_tryupgrade(struct rw_semaphore *rwsem) { - typeof (rwsem->count) val; + typeof(rwsem->count) val; val = cmpxchg(&rwsem->count, SPL_RWSEM_SINGLE_READER_VALUE, SPL_RWSEM_SINGLE_WRITER_VALUE); return (val == SPL_RWSEM_SINGLE_READER_VALUE); diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index ae26bdb2e..2919a942a 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -87,7 +87,7 @@ taskq_find_by_name(const char *name) list_for_each_prev(tql, &tq_list) { tq = list_entry(tql, taskq_t, tq_taskqs); if (strcmp(name, tq->tq_name) == 0) - return tq->tq_instance; + return (tq->tq_instance); } return (-1); } @@ -573,7 +573,8 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(tq->tq_nactive <= tq->tq_nthreads); if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) { /* Dynamic taskq may be able to spawn another thread */ - if (!(tq->tq_flags & TASKQ_DYNAMIC) || taskq_thread_spawn(tq) == 0) + if (!(tq->tq_flags & TASKQ_DYNAMIC) || + taskq_thread_spawn(tq) == 0) goto out; } @@ -686,7 +687,8 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) { /* Dynamic taskq may be able to spawn another thread */ - if (!(tq->tq_flags & TASKQ_DYNAMIC) || taskq_thread_spawn(tq) == 0) + if (!(tq->tq_flags & TASKQ_DYNAMIC) || + taskq_thread_spawn(tq) == 0) goto out2; flags |= TQ_FRONT; } @@ -786,7 +788,8 @@ taskq_thread_spawn_task(void *arg) if (taskq_thread_create(tq) == NULL) { /* restore spawning count if failed */ - spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); tq->tq_nspawn--; spin_unlock_irqrestore(&tq->tq_lock, flags); } @@ -1146,7 +1149,8 @@ taskq_destroy(taskq_t *tq) while (tq->tq_nspawn) { spin_unlock_irqrestore(&tq->tq_lock, flags); schedule_timeout_interruptible(1); - spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); } /* @@ -1239,16 +1243,16 @@ param_set_taskq_kick(const char *val, struct kernel_param *kp) #ifdef module_param_cb static const struct kernel_param_ops param_ops_taskq_kick = { - .set = param_set_taskq_kick, - .get = param_get_uint, + .set = param_set_taskq_kick, + .get = param_get_uint, }; module_param_cb(spl_taskq_kick, ¶m_ops_taskq_kick, &spl_taskq_kick, 0644); #else module_param_call(spl_taskq_kick, param_set_taskq_kick, param_get_uint, - &spl_taskq_kick, 0644); + &spl_taskq_kick, 0644); #endif MODULE_PARM_DESC(spl_taskq_kick, - "Write nonzero to kick stuck taskqs to spawn more threads"); + "Write nonzero to kick stuck taskqs to spawn more threads"); int spl_taskq_init(void) diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 92eba42ba..9ad044161 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Thread Implementation. */ @@ -33,8 +33,8 @@ */ typedef struct thread_priv_s { unsigned long tp_magic; /* Magic */ - int tp_name_size; /* Name size */ - char *tp_name; /* Name (without _thread suffix) */ + int tp_name_size; /* Name size */ + char *tp_name; /* Name (without _thread suffix) */ void (*tp_func)(void *); /* Registered function */ void *tp_args; /* Args to be passed to function */ size_t tp_len; /* Len to be passed to function */ @@ -55,12 +55,12 @@ thread_generic_wrapper(void *arg) set_current_state(tp->tp_state); set_user_nice((kthread_t *)current, PRIO_TO_NICE(tp->tp_pri)); kmem_free(tp->tp_name, tp->tp_name_size); - kmem_free(tp, sizeof(thread_priv_t)); + kmem_free(tp, sizeof (thread_priv_t)); if (func) func(args); - return 0; + return (0); } void @@ -72,9 +72,11 @@ __thread_exit(void) } EXPORT_SYMBOL(__thread_exit); -/* thread_create() may block forever if it cannot create a thread or +/* + * thread_create() may block forever if it cannot create a thread or * allocate memory. This is preferable to returning a NULL which Solaris - * style callers likely never check for... since it can't fail. */ + * style callers likely never check for... since it can't fail. + */ kthread_t * __thread_create(caddr_t stk, size_t stksize, thread_func_t func, const char *name, void *args, size_t len, proc_t *pp, @@ -88,7 +90,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, /* Variable stack size unsupported */ ASSERT(stk == NULL); - tp = kmem_alloc(sizeof(thread_priv_t), KM_PUSHPAGE); + tp = kmem_alloc(sizeof (thread_priv_t), KM_PUSHPAGE); if (tp == NULL) return (NULL); @@ -96,14 +98,15 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp->tp_name_size = strlen(name) + 1; tp->tp_name = kmem_alloc(tp->tp_name_size, KM_PUSHPAGE); - if (tp->tp_name == NULL) { - kmem_free(tp, sizeof(thread_priv_t)); + if (tp->tp_name == NULL) { + kmem_free(tp, sizeof (thread_priv_t)); return (NULL); } strncpy(tp->tp_name, name, tp->tp_name_size); - /* Strip trailing "_thread" from passed name which will be the func + /* + * Strip trailing "_thread" from passed name which will be the func * name since the exposed API has no parameter for passing a name. */ p = strstr(tp->tp_name, "_thread"); @@ -117,7 +120,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func, tp->tp_pri = pri; tsk = spl_kthread_create(thread_generic_wrapper, (void *)tp, - "%s", tp->tp_name); + "%s", tp->tp_name); if (IS_ERR(tsk)) return (NULL); @@ -139,7 +142,7 @@ spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...) char name[TASK_COMM_LEN]; va_start(args, namefmt); - vsnprintf(name, sizeof(name), namefmt, args); + vsnprintf(name, sizeof (name), namefmt, args); va_end(args); do { tsk = kthread_create(func, data, "%s", name); diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 19b3b76cd..f019a0877 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) Vnode Implementation. */ @@ -43,27 +43,27 @@ vtype_t vn_mode_to_vtype(mode_t mode) { if (S_ISREG(mode)) - return VREG; + return (VREG); if (S_ISDIR(mode)) - return VDIR; + return (VDIR); if (S_ISCHR(mode)) - return VCHR; + return (VCHR); if (S_ISBLK(mode)) - return VBLK; + return (VBLK); if (S_ISFIFO(mode)) - return VFIFO; + return (VFIFO); if (S_ISLNK(mode)) - return VLNK; + return (VLNK); if (S_ISSOCK(mode)) - return VSOCK; + return (VSOCK); - return VNON; + return (VNON); } /* vn_mode_to_vtype() */ EXPORT_SYMBOL(vn_mode_to_vtype); @@ -71,27 +71,27 @@ mode_t vn_vtype_to_mode(vtype_t vtype) { if (vtype == VREG) - return S_IFREG; + return (S_IFREG); if (vtype == VDIR) - return S_IFDIR; + return (S_IFDIR); if (vtype == VCHR) - return S_IFCHR; + return (S_IFCHR); if (vtype == VBLK) - return S_IFBLK; + return (S_IFBLK); if (vtype == VFIFO) - return S_IFIFO; + return (S_IFIFO); if (vtype == VLNK) - return S_IFLNK; + return (S_IFLNK); if (vtype == VSOCK) - return S_IFSOCK; + return (S_IFSOCK); - return VNON; + return (VNON); } /* vn_vtype_to_mode() */ EXPORT_SYMBOL(vn_vtype_to_mode); @@ -135,7 +135,8 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, if (!(flags & FCREAT) && (flags & FWRITE)) flags |= FEXCL; - /* Note for filp_open() the two low bits must be remapped to mean: + /* + * Note for filp_open() the two low bits must be remapped to mean: * 01 - read-only -> 00 read-only * 10 - write-only -> 01 write-only * 11 - read-write -> 10 read-write @@ -148,7 +149,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, fp = filp_open(path, flags, mode); if (flags & FCREAT) - (void)xchg(¤t->fs->umask, saved_umask); + (void) xchg(¤t->fs->umask, saved_umask); if (IS_ERR(fp)) return (-PTR_ERR(fp)); @@ -187,7 +188,7 @@ EXPORT_SYMBOL(vn_open); int vn_openat(const char *path, uio_seg_t seg, int flags, int mode, - vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd) + vnode_t **vpp, int x1, void *x2, vnode_t *vp, int fd) { char *realpath; int len, rc; @@ -199,7 +200,7 @@ vn_openat(const char *path, uio_seg_t seg, int flags, int mode, if (!realpath) return (ENOMEM); - (void)snprintf(realpath, len, "/%s", path); + (void) snprintf(realpath, len, "/%s", path); rc = vn_open(realpath, seg, flags, mode, vpp, x1, x2); kfree(realpath); @@ -259,9 +260,11 @@ vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4) } /* vn_close() */ EXPORT_SYMBOL(vn_close); -/* vn_seek() does not actually seek it only performs bounds checking on the +/* + * vn_seek() does not actually seek it only performs bounds checking on the * proposed seek. We perform minimal checking and allow vn_rdwr() to catch - * anything more serious. */ + * anything more serious. + */ int vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct) { @@ -293,26 +296,27 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) if (rc) return (-rc); - vap->va_type = vn_mode_to_vtype(stat.mode); - vap->va_mode = stat.mode; - vap->va_uid = KUID_TO_SUID(stat.uid); - vap->va_gid = KGID_TO_SGID(stat.gid); - vap->va_fsid = 0; - vap->va_nodeid = stat.ino; - vap->va_nlink = stat.nlink; - vap->va_size = stat.size; - vap->va_blksize = stat.blksize; - vap->va_atime = stat.atime; - vap->va_mtime = stat.mtime; - vap->va_ctime = stat.ctime; - vap->va_rdev = stat.rdev; - vap->va_nblocks = stat.blocks; + vap->va_type = vn_mode_to_vtype(stat.mode); + vap->va_mode = stat.mode; + vap->va_uid = KUID_TO_SUID(stat.uid); + vap->va_gid = KGID_TO_SGID(stat.gid); + vap->va_fsid = 0; + vap->va_nodeid = stat.ino; + vap->va_nlink = stat.nlink; + vap->va_size = stat.size; + vap->va_blksize = stat.blksize; + vap->va_atime = stat.atime; + vap->va_mtime = stat.mtime; + vap->va_ctime = stat.ctime; + vap->va_rdev = stat.rdev; + vap->va_nblocks = stat.blocks; return (0); } EXPORT_SYMBOL(vn_getattr); -int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) +int +vn_fsync(vnode_t *vp, int flags, void *x3, void *x4) { int datasync = 0; int error; @@ -412,22 +416,22 @@ EXPORT_SYMBOL(vn_space); static file_t * file_find(int fd, struct task_struct *task) { - file_t *fp; + file_t *fp; - list_for_each_entry(fp, &vn_file_list, f_list) { + list_for_each_entry(fp, &vn_file_list, f_list) { if (fd == fp->f_fd && fp->f_task == task) { ASSERT(atomic_read(&fp->f_ref) != 0); - return fp; + return (fp); } } - return NULL; + return (NULL); } /* file_find() */ file_t * vn_getf(int fd) { - struct kstat stat; + struct kstat stat; struct file *lfp; file_t *fp; vnode_t *vp; @@ -482,13 +486,14 @@ vn_getf(int fd) goto out_fget; #if defined(HAVE_4ARGS_VFS_GETATTR) - rc = vfs_getattr(&lfp->f_path, &stat, STATX_TYPE, AT_STATX_SYNC_AS_STAT); + rc = vfs_getattr(&lfp->f_path, &stat, STATX_TYPE, + AT_STATX_SYNC_AS_STAT); #elif defined(HAVE_2ARGS_VFS_GETATTR) rc = vfs_getattr(&lfp->f_path, &stat); #else rc = vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat); #endif - if (rc) + if (rc) goto out_vnode; mutex_enter(&vp->v_lock); @@ -515,7 +520,7 @@ out_mutex: mutex_exit(&fp->f_lock); kmem_cache_free(vn_file_cache, fp); out: - return (NULL); + return (NULL); } /* getf() */ EXPORT_SYMBOL(getf); @@ -556,12 +561,10 @@ vn_areleasef(int fd, uf_info_t *fip) return; } - list_del(&fp->f_list); + list_del(&fp->f_list); releasef_locked(fp); } spin_unlock(&vn_file_lock); - - return; } /* releasef() */ EXPORT_SYMBOL(areleasef); @@ -596,34 +599,34 @@ vn_set_fs_pwd(struct fs_struct *fs, struct path *path) int vn_set_pwd(const char *filename) { - struct path path; - mm_segment_t saved_fs; - int rc; + struct path path; + mm_segment_t saved_fs; + int rc; - /* - * user_path_dir() and __user_walk() both expect 'filename' to be - * a user space address so we must briefly increase the data segment - * size to ensure strncpy_from_user() does not fail with -EFAULT. - */ - saved_fs = get_fs(); - set_fs(get_ds()); + /* + * user_path_dir() and __user_walk() both expect 'filename' to be + * a user space address so we must briefly increase the data segment + * size to ensure strncpy_from_user() does not fail with -EFAULT. + */ + saved_fs = get_fs(); + set_fs(get_ds()); - rc = user_path_dir(filename, &path); - if (rc) + rc = user_path_dir(filename, &path); + if (rc) goto out; - rc = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_ACCESS); - if (rc) + rc = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_ACCESS); + if (rc) goto dput_and_out; - vn_set_fs_pwd(current->fs, &path); + vn_set_fs_pwd(current->fs, &path); dput_and_out: - path_put(&path); + path_put(&path); out: set_fs(saved_fs); - return (-rc); + return (-rc); } /* vn_set_pwd() */ EXPORT_SYMBOL(vn_set_pwd); @@ -651,10 +654,10 @@ vn_file_cache_constructor(void *buf, void *cdrarg, int kmflags) file_t *fp = buf; atomic_set(&fp->f_ref, 0); - mutex_init(&fp->f_lock, NULL, MUTEX_DEFAULT, NULL); + mutex_init(&fp->f_lock, NULL, MUTEX_DEFAULT, NULL); INIT_LIST_HEAD(&fp->f_list); - return (0); + return (0); } /* file_cache_constructor() */ static void @@ -669,29 +672,26 @@ int spl_vn_init(void) { vn_cache = kmem_cache_create("spl_vn_cache", - sizeof(struct vnode), 64, - vn_cache_constructor, - vn_cache_destructor, - NULL, NULL, NULL, 0); + sizeof (struct vnode), 64, vn_cache_constructor, + vn_cache_destructor, NULL, NULL, NULL, 0); vn_file_cache = kmem_cache_create("spl_vn_file_cache", - sizeof(file_t), 64, - vn_file_cache_constructor, - vn_file_cache_destructor, - NULL, NULL, NULL, 0); + sizeof (file_t), 64, vn_file_cache_constructor, + vn_file_cache_destructor, NULL, NULL, NULL, 0); + return (0); } /* vn_init() */ void spl_vn_fini(void) { - file_t *fp, *next_fp; + file_t *fp, *next_fp; int leaked = 0; spin_lock(&vn_file_lock); - list_for_each_entry_safe(fp, next_fp, &vn_file_list, f_list) { - list_del(&fp->f_list); + list_for_each_entry_safe(fp, next_fp, &vn_file_list, f_list) { + list_del(&fp->f_list); releasef_locked(fp); leaked++; } @@ -703,6 +703,4 @@ spl_vn_fini(void) kmem_cache_destroy(vn_file_cache); kmem_cache_destroy(vn_cache); - - return; } /* vn_fini() */ diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index 04a337c2b..c582913f1 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * * Solaris Porting Layer (SPL) XDR Implementation. */ @@ -163,12 +163,12 @@ xdrmem_control(XDR *xdrs, int req, void *info) struct xdr_bytesrec *rec = (struct xdr_bytesrec *) info; if (req != XDR_GET_BYTES_AVAIL) - return FALSE; + return (FALSE); rec->xc_is_last_record = TRUE; /* always TRUE in xdrmem streams */ rec->xc_num_avail = xdrs->x_addr_end - xdrs->x_addr; - return TRUE; + return (TRUE); } static bool_t @@ -178,13 +178,13 @@ xdrmem_enc_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) uint_t pad; if (size < cnt) - return FALSE; /* Integer overflow */ + return (FALSE); /* Integer overflow */ if (xdrs->x_addr > xdrs->x_addr_end) - return FALSE; + return (FALSE); if (xdrs->x_addr_end - xdrs->x_addr < size) - return FALSE; + return (FALSE); memcpy(xdrs->x_addr, cp, cnt); @@ -196,7 +196,7 @@ xdrmem_enc_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) xdrs->x_addr += pad; } - return TRUE; + return (TRUE); } static bool_t @@ -207,13 +207,13 @@ xdrmem_dec_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) uint_t pad; if (size < cnt) - return FALSE; /* Integer overflow */ + return (FALSE); /* Integer overflow */ if (xdrs->x_addr > xdrs->x_addr_end) - return FALSE; + return (FALSE); if (xdrs->x_addr_end - xdrs->x_addr < size) - return FALSE; + return (FALSE); memcpy(cp, xdrs->x_addr, cnt); xdrs->x_addr += cnt; @@ -222,38 +222,38 @@ xdrmem_dec_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt) if (pad > 0) { /* An inverted memchr() would be useful here... */ if (memcmp(&zero, xdrs->x_addr, pad) != 0) - return FALSE; + return (FALSE); xdrs->x_addr += pad; } - return TRUE; + return (TRUE); } static bool_t xdrmem_enc_uint32(XDR *xdrs, uint32_t val) { - if (xdrs->x_addr + sizeof(uint32_t) > xdrs->x_addr_end) - return FALSE; + if (xdrs->x_addr + sizeof (uint32_t) > xdrs->x_addr_end) + return (FALSE); *((uint32_t *) xdrs->x_addr) = cpu_to_be32(val); - xdrs->x_addr += sizeof(uint32_t); + xdrs->x_addr += sizeof (uint32_t); - return TRUE; + return (TRUE); } static bool_t xdrmem_dec_uint32(XDR *xdrs, uint32_t *val) { - if (xdrs->x_addr + sizeof(uint32_t) > xdrs->x_addr_end) - return FALSE; + if (xdrs->x_addr + sizeof (uint32_t) > xdrs->x_addr_end) + return (FALSE); *val = be32_to_cpu(*((uint32_t *) xdrs->x_addr)); - xdrs->x_addr += sizeof(uint32_t); + xdrs->x_addr += sizeof (uint32_t); - return TRUE; + return (TRUE); } static bool_t @@ -261,10 +261,10 @@ xdrmem_enc_char(XDR *xdrs, char *cp) { uint32_t val; - BUILD_BUG_ON(sizeof(char) != 1); + BUILD_BUG_ON(sizeof (char) != 1); val = *((unsigned char *) cp); - return xdrmem_enc_uint32(xdrs, val); + return (xdrmem_enc_uint32(xdrs, val)); } static bool_t @@ -272,10 +272,10 @@ xdrmem_dec_char(XDR *xdrs, char *cp) { uint32_t val; - BUILD_BUG_ON(sizeof(char) != 1); + BUILD_BUG_ON(sizeof (char) != 1); if (!xdrmem_dec_uint32(xdrs, &val)) - return FALSE; + return (FALSE); /* * If any of the 3 other bytes are non-zero then val will be greater @@ -283,19 +283,19 @@ xdrmem_dec_char(XDR *xdrs, char *cp) * not have a char encoded in it. */ if (val > 0xff) - return FALSE; + return (FALSE); *((unsigned char *) cp) = val; - return TRUE; + return (TRUE); } static bool_t xdrmem_enc_ushort(XDR *xdrs, unsigned short *usp) { - BUILD_BUG_ON(sizeof(unsigned short) != 2); + BUILD_BUG_ON(sizeof (unsigned short) != 2); - return xdrmem_enc_uint32(xdrs, *usp); + return (xdrmem_enc_uint32(xdrs, *usp)); } static bool_t @@ -303,48 +303,48 @@ xdrmem_dec_ushort(XDR *xdrs, unsigned short *usp) { uint32_t val; - BUILD_BUG_ON(sizeof(unsigned short) != 2); + BUILD_BUG_ON(sizeof (unsigned short) != 2); if (!xdrmem_dec_uint32(xdrs, &val)) - return FALSE; + return (FALSE); /* * Short ints are not in the RFC, but we assume similar logic as in * xdrmem_dec_char(). */ if (val > 0xffff) - return FALSE; + return (FALSE); *usp = val; - return TRUE; + return (TRUE); } static bool_t xdrmem_enc_uint(XDR *xdrs, unsigned *up) { - BUILD_BUG_ON(sizeof(unsigned) != 4); + BUILD_BUG_ON(sizeof (unsigned) != 4); - return xdrmem_enc_uint32(xdrs, *up); + return (xdrmem_enc_uint32(xdrs, *up)); } static bool_t xdrmem_dec_uint(XDR *xdrs, unsigned *up) { - BUILD_BUG_ON(sizeof(unsigned) != 4); + BUILD_BUG_ON(sizeof (unsigned) != 4); - return xdrmem_dec_uint32(xdrs, (uint32_t *) up); + return (xdrmem_dec_uint32(xdrs, (uint32_t *) up)); } static bool_t xdrmem_enc_ulonglong(XDR *xdrs, u_longlong_t *ullp) { - BUILD_BUG_ON(sizeof(u_longlong_t) != 8); + BUILD_BUG_ON(sizeof (u_longlong_t) != 8); if (!xdrmem_enc_uint32(xdrs, *ullp >> 32)) - return FALSE; + return (FALSE); - return xdrmem_enc_uint32(xdrs, *ullp & 0xffffffff); + return (xdrmem_enc_uint32(xdrs, *ullp & 0xffffffff)); } static bool_t @@ -352,16 +352,16 @@ xdrmem_dec_ulonglong(XDR *xdrs, u_longlong_t *ullp) { uint32_t low, high; - BUILD_BUG_ON(sizeof(u_longlong_t) != 8); + BUILD_BUG_ON(sizeof (u_longlong_t) != 8); if (!xdrmem_dec_uint32(xdrs, &high)) - return FALSE; + return (FALSE); if (!xdrmem_dec_uint32(xdrs, &low)) - return FALSE; + return (FALSE); *ullp = ((u_longlong_t) high << 32) | low; - return TRUE; + return (TRUE); } static bool_t @@ -372,18 +372,18 @@ xdr_enc_array(XDR *xdrs, caddr_t *arrp, uint_t *sizep, const uint_t maxsize, caddr_t addr = *arrp; if (*sizep > maxsize || *sizep > UINT_MAX / elsize) - return FALSE; + return (FALSE); if (!xdrmem_enc_uint(xdrs, sizep)) - return FALSE; + return (FALSE); for (i = 0; i < *sizep; i++) { if (!elproc(xdrs, addr)) - return FALSE; + return (FALSE); addr += elsize; } - return TRUE; + return (TRUE); } static bool_t @@ -395,23 +395,23 @@ xdr_dec_array(XDR *xdrs, caddr_t *arrp, uint_t *sizep, const uint_t maxsize, caddr_t addr; if (!xdrmem_dec_uint(xdrs, sizep)) - return FALSE; + return (FALSE); size = *sizep; if (size > maxsize || size > UINT_MAX / elsize) - return FALSE; + return (FALSE); /* * The Solaris man page says: "If *arrp is NULL when decoding, * xdr_array() allocates memory and *arrp points to it". */ if (*arrp == NULL) { - BUILD_BUG_ON(sizeof(uint_t) > sizeof(size_t)); + BUILD_BUG_ON(sizeof (uint_t) > sizeof (size_t)); *arrp = kmem_alloc(size * elsize, KM_NOSLEEP); if (*arrp == NULL) - return FALSE; + return (FALSE); alloc = TRUE; } @@ -422,12 +422,12 @@ xdr_dec_array(XDR *xdrs, caddr_t *arrp, uint_t *sizep, const uint_t maxsize, if (!elproc(xdrs, addr)) { if (alloc) kmem_free(*arrp, size * elsize); - return FALSE; + return (FALSE); } addr += elsize; } - return TRUE; + return (TRUE); } static bool_t @@ -437,14 +437,14 @@ xdr_enc_string(XDR *xdrs, char **sp, const uint_t maxsize) uint_t len; if (slen > maxsize) - return FALSE; + return (FALSE); len = slen; if (!xdrmem_enc_uint(xdrs, &len)) - return FALSE; + return (FALSE); - return xdrmem_enc_bytes(xdrs, *sp, len); + return (xdrmem_enc_bytes(xdrs, *sp, len)); } static bool_t @@ -454,21 +454,21 @@ xdr_dec_string(XDR *xdrs, char **sp, const uint_t maxsize) bool_t alloc = FALSE; if (!xdrmem_dec_uint(xdrs, &size)) - return FALSE; + return (FALSE); if (size > maxsize || size > UINT_MAX - 1) - return FALSE; + return (FALSE); /* * Solaris man page: "If *sp is NULL when decoding, xdr_string() * allocates memory and *sp points to it". */ if (*sp == NULL) { - BUILD_BUG_ON(sizeof(uint_t) > sizeof(size_t)); + BUILD_BUG_ON(sizeof (uint_t) > sizeof (size_t)); *sp = kmem_alloc(size + 1, KM_NOSLEEP); if (*sp == NULL) - return FALSE; + return (FALSE); alloc = TRUE; } @@ -481,34 +481,33 @@ xdr_dec_string(XDR *xdrs, char **sp, const uint_t maxsize) (*sp)[size] = '\0'; - return TRUE; + return (TRUE); fail: if (alloc) kmem_free(*sp, size + 1); - return FALSE; + return (FALSE); } static struct xdr_ops xdrmem_encode_ops = { - .xdr_control = xdrmem_control, - .xdr_char = xdrmem_enc_char, - .xdr_u_short = xdrmem_enc_ushort, - .xdr_u_int = xdrmem_enc_uint, - .xdr_u_longlong_t = xdrmem_enc_ulonglong, - .xdr_opaque = xdrmem_enc_bytes, - .xdr_string = xdr_enc_string, - .xdr_array = xdr_enc_array + .xdr_control = xdrmem_control, + .xdr_char = xdrmem_enc_char, + .xdr_u_short = xdrmem_enc_ushort, + .xdr_u_int = xdrmem_enc_uint, + .xdr_u_longlong_t = xdrmem_enc_ulonglong, + .xdr_opaque = xdrmem_enc_bytes, + .xdr_string = xdr_enc_string, + .xdr_array = xdr_enc_array }; static struct xdr_ops xdrmem_decode_ops = { - .xdr_control = xdrmem_control, - .xdr_char = xdrmem_dec_char, - .xdr_u_short = xdrmem_dec_ushort, - .xdr_u_int = xdrmem_dec_uint, - .xdr_u_longlong_t = xdrmem_dec_ulonglong, - .xdr_opaque = xdrmem_dec_bytes, - .xdr_string = xdr_dec_string, - .xdr_array = xdr_dec_array + .xdr_control = xdrmem_control, + .xdr_char = xdrmem_dec_char, + .xdr_u_short = xdrmem_dec_ushort, + .xdr_u_int = xdrmem_dec_uint, + .xdr_u_longlong_t = xdrmem_dec_ulonglong, + .xdr_opaque = xdrmem_dec_bytes, + .xdr_string = xdr_dec_string, + .xdr_array = xdr_dec_array }; - diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 609bf5048..177a626df 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -20,7 +20,8 @@ * * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . - ***************************************************************************** + * + * * z_compress_level/z_uncompress are nearly identical copies of the * compress2/uncompress functions provided by the official zlib package * available at http://zlib.net/. The only changes made we to slightly @@ -72,7 +73,7 @@ static spl_kmem_cache_t *zlib_workspace_cache; static void * zlib_workspace_alloc(int flags) { - return kmem_cache_alloc(zlib_workspace_cache, flags & ~(__GFP_FS)); + return (kmem_cache_alloc(zlib_workspace_cache, flags & ~(__GFP_FS))); } static void @@ -94,7 +95,7 @@ zlib_workspace_free(void *workspace) */ int z_compress_level(void *dest, size_t *destLen, const void *source, - size_t sourceLen, int level) + size_t sourceLen, int level) { z_stream stream; int err; @@ -105,30 +106,30 @@ z_compress_level(void *dest, size_t *destLen, const void *source, stream.avail_out = (uInt)*destLen; if ((size_t)stream.avail_out != *destLen) - return Z_BUF_ERROR; + return (Z_BUF_ERROR); stream.workspace = zlib_workspace_alloc(KM_SLEEP); if (!stream.workspace) - return Z_MEM_ERROR; + return (Z_MEM_ERROR); err = zlib_deflateInit(&stream, level); if (err != Z_OK) { zlib_workspace_free(stream.workspace); - return err; + return (err); } err = zlib_deflate(&stream, Z_FINISH); if (err != Z_STREAM_END) { zlib_deflateEnd(&stream); zlib_workspace_free(stream.workspace); - return err == Z_OK ? Z_BUF_ERROR : err; + return (err == Z_OK ? Z_BUF_ERROR : err); } *destLen = stream.total_out; err = zlib_deflateEnd(&stream); zlib_workspace_free(stream.workspace); - return err; + return (err); } EXPORT_SYMBOL(z_compress_level); @@ -159,16 +160,16 @@ z_uncompress(void *dest, size_t *destLen, const void *source, size_t sourceLen) stream.avail_out = (uInt)*destLen; if ((size_t)stream.avail_out != *destLen) - return Z_BUF_ERROR; + return (Z_BUF_ERROR); stream.workspace = zlib_workspace_alloc(KM_SLEEP); if (!stream.workspace) - return Z_MEM_ERROR; + return (Z_MEM_ERROR); err = zlib_inflateInit(&stream); if (err != Z_OK) { zlib_workspace_free(stream.workspace); - return err; + return (err); } err = zlib_inflate(&stream, Z_FINISH); @@ -177,17 +178,17 @@ z_uncompress(void *dest, size_t *destLen, const void *source, size_t sourceLen) zlib_workspace_free(stream.workspace); if (err == Z_NEED_DICT || - (err == Z_BUF_ERROR && stream.avail_in == 0)) - return Z_DATA_ERROR; + (err == Z_BUF_ERROR && stream.avail_in == 0)) + return (Z_DATA_ERROR); - return err; + return (err); } *destLen = stream.total_out; err = zlib_inflateEnd(&stream); zlib_workspace_free(stream.workspace); - return err; + return (err); } EXPORT_SYMBOL(z_uncompress); @@ -203,15 +204,15 @@ spl_zlib_init(void) "spl_zlib_workspace_cache", size, 0, NULL, NULL, NULL, NULL, NULL, KMC_VMEM | KMC_NOEMERGENCY); - if (!zlib_workspace_cache) + if (!zlib_workspace_cache) return (1); - return (0); + return (0); } void spl_zlib_fini(void) { kmem_cache_destroy(zlib_workspace_cache); - zlib_workspace_cache = NULL; + zlib_workspace_cache = NULL; } From 48ef8ba07094afcd67355940ca8db92d76f7c096 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 7 Feb 2018 11:50:24 -0800 Subject: [PATCH 1051/1062] Split spl-build.m4 Split the kernel interface configure checks in to seperate m4 macro files. This is intended to facilitate moving the spl source code in to the zfs repository. Reviewed-by: Tony Hutter Signed-off-by: Brian Behlendorf Closes #682 --- config/kernel-ctl-table-name.m4 | 18 + config/kernel-fallocate.m4 | 68 ++ config/kernel-group-info.m4 | 21 + config/kernel-inode-lock.m4 | 23 + config/kernel-kmem-cache.m4 | 72 ++ config/kernel-kuidgid.m4 | 28 + config/kernel-pde-data.m4 | 17 + config/kernel-rw.m4 | 57 ++ config/kernel-rwsem.m4 | 75 +++ config/kernel-sched.m4 | 56 ++ config/kernel-set-fs-pwd.m4 | 39 ++ config/kernel-shrinker.m4 | 125 ++++ config/kernel-spinlock.m4 | 24 + config/kernel-timer.m4 | 32 + config/kernel-trim-unused-symbols.m4 | 19 + config/kernel-truncate-range.m4 | 19 + config/kernel-urange-sleep.m4 | 21 + config/kernel-vfs-fsync.m4 | 17 + config/kernel-vfs-getattr.m4 | 62 ++ config/kernel-wait.m4 | 76 +++ config/kernel-zlib.m4 | 63 ++ config/spl-build.m4 | 956 --------------------------- 22 files changed, 932 insertions(+), 956 deletions(-) create mode 100644 config/kernel-ctl-table-name.m4 create mode 100644 config/kernel-fallocate.m4 create mode 100644 config/kernel-group-info.m4 create mode 100644 config/kernel-inode-lock.m4 create mode 100644 config/kernel-kmem-cache.m4 create mode 100644 config/kernel-kuidgid.m4 create mode 100644 config/kernel-pde-data.m4 create mode 100644 config/kernel-rw.m4 create mode 100644 config/kernel-rwsem.m4 create mode 100644 config/kernel-sched.m4 create mode 100644 config/kernel-set-fs-pwd.m4 create mode 100644 config/kernel-shrinker.m4 create mode 100644 config/kernel-spinlock.m4 create mode 100644 config/kernel-timer.m4 create mode 100644 config/kernel-trim-unused-symbols.m4 create mode 100644 config/kernel-truncate-range.m4 create mode 100644 config/kernel-urange-sleep.m4 create mode 100644 config/kernel-vfs-fsync.m4 create mode 100644 config/kernel-vfs-getattr.m4 create mode 100644 config/kernel-wait.m4 create mode 100644 config/kernel-zlib.m4 diff --git a/config/kernel-ctl-table-name.m4 b/config/kernel-ctl-table-name.m4 new file mode 100644 index 000000000..8dd2e77cb --- /dev/null +++ b/config/kernel-ctl-table-name.m4 @@ -0,0 +1,18 @@ +dnl # +dnl # 2.6.33 API change, +dnl # Removed .ctl_name from struct ctl_table. +dnl # +AC_DEFUN([SPL_AC_CTL_NAME], [ + AC_MSG_CHECKING([whether struct ctl_table has ctl_name]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct ctl_table ctl __attribute__ ((unused)); + ctl.ctl_name = 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CTL_NAME, 1, [struct ctl_table has ctl_name]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-fallocate.m4 b/config/kernel-fallocate.m4 new file mode 100644 index 000000000..b8c82f464 --- /dev/null +++ b/config/kernel-fallocate.m4 @@ -0,0 +1,68 @@ +dnl # +dnl # Linux 2.6.38 - 3.x API +dnl # +AC_DEFUN([SPL_AC_KERNEL_FILE_FALLOCATE], [ + AC_MSG_CHECKING([whether fops->fallocate() exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) +dnl # +dnl # Linux 2.6.x - 2.6.37 API +dnl # +AC_DEFUN([SPL_AC_KERNEL_INODE_FALLOCATE], [ + AC_MSG_CHECKING([whether iops->fallocate() exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # PaX Linux 2.6.38 - 3.x API +dnl # +AC_DEFUN([SPL_AC_PAX_KERNEL_FILE_FALLOCATE], [ + AC_MSG_CHECKING([whether fops->fallocate() exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # The fallocate callback was moved from the inode_operations +dnl # structure to the file_operations structure. +dnl # +AC_DEFUN([SPL_AC_KERNEL_FALLOCATE], [ + SPL_AC_KERNEL_FILE_FALLOCATE + SPL_AC_KERNEL_INODE_FALLOCATE + SPL_AC_PAX_KERNEL_FILE_FALLOCATE +]) diff --git a/config/kernel-group-info.m4 b/config/kernel-group-info.m4 new file mode 100644 index 000000000..4db2bba5c --- /dev/null +++ b/config/kernel-group-info.m4 @@ -0,0 +1,21 @@ +dnl # +dnl # 4.9 API change +dnl # group_info changed from 2d array via >blocks to 1d array via ->gid +dnl # +AC_DEFUN([SPL_AC_GROUP_INFO_GID], [ + AC_MSG_CHECKING([whether group_info->gid exists]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct group_info *gi = groups_alloc(1); + gi->gid[0] = KGIDT_INIT(0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GROUP_INFO_GID, 1, [group_info->gid exists]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-inode-lock.m4 b/config/kernel-inode-lock.m4 new file mode 100644 index 000000000..2cc06a5ec --- /dev/null +++ b/config/kernel-inode-lock.m4 @@ -0,0 +1,23 @@ +dnl # +dnl # 4.7 API change +dnl # i_mutex is changed to i_rwsem. Instead of directly using +dnl # i_mutex/i_rwsem, we should use inode_lock() and inode_lock_shared() +dnl # We test inode_lock_shared because inode_lock is introduced earlier. +dnl # +AC_DEFUN([SPL_AC_INODE_LOCK], [ + AC_MSG_CHECKING([whether inode_lock_shared() exists]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct inode *inode = NULL; + inode_lock_shared(inode); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_LOCK_SHARED, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-kmem-cache.m4 b/config/kernel-kmem-cache.m4 new file mode 100644 index 000000000..50a7fdb4b --- /dev/null +++ b/config/kernel-kmem-cache.m4 @@ -0,0 +1,72 @@ +dnl # +dnl # 2.6.35 API change, +dnl # The cachep->gfpflags member was renamed cachep->allocflags. These are +dnl # private allocation flags which are applied when allocating a new slab +dnl # in kmem_getpages(). Unfortunately there is no public API for setting +dnl # non-default flags. +dnl # +AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [ + AC_MSG_CHECKING([whether struct kmem_cache has allocflags]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct kmem_cache cachep __attribute__ ((unused)); + cachep.allocflags = GFP_KERNEL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_ALLOCFLAGS, 1, + [struct kmem_cache has allocflags]) + ],[ + AC_MSG_RESULT(no) + + AC_MSG_CHECKING([whether struct kmem_cache has gfpflags]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct kmem_cache cachep __attribute__ ((unused)); + cachep.gfpflags = GFP_KERNEL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_GFPFLAGS, 1, + [struct kmem_cache has gfpflags]) + ],[ + AC_MSG_RESULT(no) + ]) + ]) +]) + +dnl # +dnl # grsecurity API change, +dnl # kmem_cache_create() with SLAB_USERCOPY flag replaced by +dnl # kmem_cache_create_usercopy(). +dnl # +AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_USERCOPY], [ + AC_MSG_CHECKING([whether kmem_cache_create_usercopy() exists]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + static void ctor(void *foo) + { + // fake ctor + } + ],[ + struct kmem_cache *skc_linux_cache; + const char *name = "test"; + size_t size = 4096; + size_t align = 8; + unsigned long flags = 0; + size_t useroffset = 0; + size_t usersize = size - useroffset; + + skc_linux_cache = kmem_cache_create_usercopy( + name, size, align, flags, useroffset, usersize, ctor); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMEM_CACHE_CREATE_USERCOPY, 1, + [kmem_cache_create_usercopy() exists]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-kuidgid.m4 b/config/kernel-kuidgid.m4 new file mode 100644 index 000000000..47d193783 --- /dev/null +++ b/config/kernel-kuidgid.m4 @@ -0,0 +1,28 @@ +dnl # +dnl # User namespaces, use kuid_t in place of uid_t +dnl # where available. Not strictly a user namespaces thing +dnl # but it should prevent surprises +dnl # +AC_DEFUN([SPL_AC_KUIDGID_T], [ + AC_MSG_CHECKING([whether kuid_t/kgid_t is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ], [ + kuid_t userid = KUIDT_INIT(0); + kgid_t groupid = KGIDT_INIT(0); + ],[ + SPL_LINUX_TRY_COMPILE([ + #include + ], [ + kuid_t userid = 0; + kgid_t groupid = 0; + ],[ + AC_MSG_RESULT(yes; optional) + ],[ + AC_MSG_RESULT(yes; mandatory) + AC_DEFINE(HAVE_KUIDGID_T, 1, [kuid_t/kgid_t in use]) + ]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-pde-data.m4 b/config/kernel-pde-data.m4 new file mode 100644 index 000000000..6aa5765c3 --- /dev/null +++ b/config/kernel-pde-data.m4 @@ -0,0 +1,17 @@ +dnl # +dnl # 3.10 API change, +dnl # PDE is replaced by PDE_DATA +dnl # +AC_DEFUN([SPL_AC_PDE_DATA], [ + AC_MSG_CHECKING([whether PDE_DATA() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + PDE_DATA(NULL); + ], [PDE_DATA], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PDE_DATA, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-rw.m4 b/config/kernel-rw.m4 new file mode 100644 index 000000000..23c14b70f --- /dev/null +++ b/config/kernel-rw.m4 @@ -0,0 +1,57 @@ +dnl # +dnl # 4.14 API change +dnl # kernel_write() which was introduced in 3.9 was updated to take +dnl # the offset as a pointer which is needed by vn_rdwr(). +dnl # +AC_DEFUN([SPL_AC_KERNEL_WRITE], [ + AC_MSG_CHECKING([whether kernel_write() takes loff_t pointer]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct file *file = NULL; + const void *buf = NULL; + size_t count = 0; + loff_t *pos = NULL; + ssize_t ret; + + ret = kernel_write(file, buf, count, pos); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_WRITE_PPOS, 1, + [kernel_write() take loff_t pointer]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + +dnl # +dnl # 4.14 API change +dnl # kernel_read() which has existed for forever was updated to take +dnl # the offset as a pointer which is needed by vn_rdwr(). +dnl # +AC_DEFUN([SPL_AC_KERNEL_READ], [ + AC_MSG_CHECKING([whether kernel_read() takes loff_t pointer]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct file *file = NULL; + void *buf = NULL; + size_t count = 0; + loff_t *pos = NULL; + ssize_t ret; + + ret = kernel_read(file, buf, count, pos); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_READ_PPOS, 1, + [kernel_read() take loff_t pointer]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-rwsem.m4 b/config/kernel-rwsem.m4 new file mode 100644 index 000000000..aee20ae90 --- /dev/null +++ b/config/kernel-rwsem.m4 @@ -0,0 +1,75 @@ +dnl # +dnl # 3.1 API Change +dnl # +dnl # The rw_semaphore.wait_lock member was changed from spinlock_t to +dnl # raw_spinlock_t at commit ddb6c9b58a19edcfac93ac670b066c836ff729f1. +dnl # +AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ + AC_MSG_CHECKING([whether struct rw_semaphore member wait_lock is raw]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + raw_spinlock_t dummy_lock __attribute__ ((unused)) = + __RAW_SPIN_LOCK_INITIALIZER(dummy_lock); + dummy_semaphore.wait_lock = dummy_lock; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(RWSEM_SPINLOCK_IS_RAW, 1, + [struct rw_semaphore member wait_lock is raw_spinlock_t]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + +dnl # +dnl # 3.16 API Change +dnl # +dnl # rwsem-spinlock "->activity" changed to "->count" +dnl # +AC_DEFUN([SPL_AC_RWSEM_ACTIVITY], [ + AC_MSG_CHECKING([whether struct rw_semaphore has member activity]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + dummy_semaphore.activity = 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_RWSEM_ACTIVITY, 1, + [struct rw_semaphore has member activity]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + +dnl # +dnl # 4.8 API Change +dnl # +dnl # rwsem "->count" changed to atomic_long_t type +dnl # +AC_DEFUN([SPL_AC_RWSEM_ATOMIC_LONG_COUNT], [ + AC_MSG_CHECKING( + [whether struct rw_semaphore has atomic_long_t member count]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + DECLARE_RWSEM(dummy_semaphore); + (void) atomic_long_read(&dummy_semaphore.count); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_RWSEM_ATOMIC_LONG_COUNT, 1, + [struct rw_semaphore has atomic_long_t member count]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-sched.m4 b/config/kernel-sched.m4 new file mode 100644 index 000000000..5ae21676e --- /dev/null +++ b/config/kernel-sched.m4 @@ -0,0 +1,56 @@ +dnl # +dnl # 3.9 API change, +dnl # Moved things from linux/sched.h to linux/sched/rt.h +dnl # +AC_DEFUN([SPL_AC_SCHED_RT_HEADER], + [AC_MSG_CHECKING([whether header linux/sched/rt.h exists]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + return 0; + ],[ + AC_DEFINE(HAVE_SCHED_RT_HEADER, 1, [linux/sched/rt.h exists]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 4.11 API change, +dnl # Moved things from linux/sched.h to linux/sched/signal.h +dnl # +AC_DEFUN([SPL_AC_SCHED_SIGNAL_HEADER], + [AC_MSG_CHECKING([whether header linux/sched/signal.h exists]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + return 0; + ],[ + AC_DEFINE(HAVE_SCHED_SIGNAL_HEADER, 1, [linux/sched/signal.h exists]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ]) +]) +dnl # +dnl # 3.19 API change +dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels +dnl # but it was not exported until Linux 3.19. The RHEL 7.x kernels which +dnl # are based on a 3.10 kernel do export this symbol. +dnl # +AC_DEFUN([SPL_AC_IO_SCHEDULE_TIMEOUT], [ + AC_MSG_CHECKING([whether io_schedule_timeout() is available]) + SPL_LINUX_TRY_COMPILE_SYMBOL([ + #include + ], [ + (void) io_schedule_timeout(1); + ], [io_schedule_timeout], [], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-set-fs-pwd.m4 b/config/kernel-set-fs-pwd.m4 new file mode 100644 index 000000000..849e7e6cb --- /dev/null +++ b/config/kernel-set-fs-pwd.m4 @@ -0,0 +1,39 @@ +dnl # +dnl # 3.9 API change +dnl # set_fs_pwd takes const struct path * +dnl # +AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, const struct path *) + = set_fs_pwd; + ],[ + return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SET_FS_PWD_WITH_CONST, 1, + [set_fs_pwd() needs const path *]) + ],[ + SPL_LINUX_TRY_COMPILE([ + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, struct path *) + = set_fs_pwd; + ],[ + return 0; + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_ERROR(unknown) + ]) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-shrinker.m4 b/config/kernel-shrinker.m4 new file mode 100644 index 000000000..6fc9b5422 --- /dev/null +++ b/config/kernel-shrinker.m4 @@ -0,0 +1,125 @@ +AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + dnl # + dnl # 2.6.23 to 2.6.34 API change + dnl # ->shrink(int nr_to_scan, gfp_t gfp_mask) + dnl # + AC_MSG_CHECKING([whether old 2-argument shrinker exists]) + SPL_LINUX_TRY_COMPILE([ + #include + + int shrinker_cb(int nr_to_scan, gfp_t gfp_mask); + ],[ + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_OLD_SHRINKER_CALLBACK, 1, + [old shrinker callback wants 2 args]) + ],[ + AC_MSG_RESULT(no) + dnl # + dnl # 2.6.35 - 2.6.39 API change + dnl # ->shrink(struct shrinker *, + dnl # int nr_to_scan, gfp_t gfp_mask) + dnl # + AC_MSG_CHECKING([whether old 3-argument shrinker exists]) + SPL_LINUX_TRY_COMPILE([ + #include + + int shrinker_cb(struct shrinker *, int nr_to_scan, + gfp_t gfp_mask); + ],[ + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1, + [old shrinker callback wants 3 args]) + ],[ + AC_MSG_RESULT(no) + dnl # + dnl # 3.0 - 3.11 API change + dnl # ->shrink(struct shrinker *, + dnl # struct shrink_control *sc) + dnl # + AC_MSG_CHECKING( + [whether new 2-argument shrinker exists]) + SPL_LINUX_TRY_COMPILE([ + #include + + int shrinker_cb(struct shrinker *, + struct shrink_control *sc); + ],[ + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_NEW_SHRINKER_CALLBACK, 1, + [new shrinker callback wants 2 args]) + ],[ + AC_MSG_RESULT(no) + dnl # + dnl # 3.12 API change, + dnl # ->shrink() is logically split in to + dnl # ->count_objects() and ->scan_objects() + dnl # + AC_MSG_CHECKING( + [whether ->count_objects callback exists]) + SPL_LINUX_TRY_COMPILE([ + #include + + unsigned long shrinker_cb( + struct shrinker *, + struct shrink_control *sc); + ],[ + struct shrinker cache_shrinker = { + .count_objects = shrinker_cb, + .scan_objects = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK, + 1, [->count_objects exists]) + ],[ + AC_MSG_ERROR(error) + ]) + ]) + ]) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) + +dnl # +dnl # 2.6.39 API change, +dnl # Shrinker adjust to use common shrink_control structure. +dnl # +AC_DEFUN([SPL_AC_SHRINK_CONTROL_STRUCT], [ + AC_MSG_CHECKING([whether struct shrink_control exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct shrink_control sc __attribute__ ((unused)); + + sc.nr_to_scan = 0; + sc.gfp_mask = GFP_KERNEL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SHRINK_CONTROL_STRUCT, 1, + [struct shrink_control exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-spinlock.m4 b/config/kernel-spinlock.m4 new file mode 100644 index 000000000..136262d0e --- /dev/null +++ b/config/kernel-spinlock.m4 @@ -0,0 +1,24 @@ +dnl # +dnl # 2.6.36 API change, +dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to +dnl # a spinlock_t to improve the fastpath performance. +dnl # +AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [ + AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + static struct fs_struct fs; + spin_lock_init(&fs.lock); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FS_STRUCT_SPINLOCK, 1, + [struct fs_struct uses spinlock_t]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-timer.m4 b/config/kernel-timer.m4 new file mode 100644 index 000000000..93b5158b9 --- /dev/null +++ b/config/kernel-timer.m4 @@ -0,0 +1,32 @@ +dnl # +dnl # 4.15 API change +dnl # https://lkml.org/lkml/2017/11/25/90 +dnl # Check if timer_list.func get passed a timer_list or an unsigned long +dnl # (older kernels). Also sanity check the from_timer() and timer_setup() +dnl # macros are available as well, since they will be used in the same newer +dnl # kernels that support the new timer_list.func signature. +dnl # +AC_DEFUN([SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST], [ + AC_MSG_CHECKING([whether timer_list.function gets a timer_list]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + void task_expire(struct timer_list *tl) {} + ],[ + #ifndef from_timer + #error "No from_timer() macro" + #endif + + struct timer_list timer; + timer.function = task_expire; + timer_setup(&timer, NULL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST, 1, + [timer_list.function gets a timer_list]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/kernel-trim-unused-symbols.m4 b/config/kernel-trim-unused-symbols.m4 new file mode 100644 index 000000000..d1ac2f3c8 --- /dev/null +++ b/config/kernel-trim-unused-symbols.m4 @@ -0,0 +1,19 @@ +dnl # +dnl # config trim unused symbols, +dnl # Verify the kernel has CONFIG_TRIM_UNUSED_KSYMS DISABLED. +dnl # +AC_DEFUN([SPL_AC_CONFIG_TRIM_UNUSED_KSYMS], [ + AC_MSG_CHECKING([whether CONFIG_TRIM_UNUSED_KSYM is disabled]) + SPL_LINUX_TRY_COMPILE([ + #if defined(CONFIG_TRIM_UNUSED_KSYMS) + #error CONFIG_TRIM_UNUSED_KSYMS not defined + #endif + ],[ ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ + *** This kernel has unused symbols trimming enabled, please disable. + *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set.]) + ]) +]) diff --git a/config/kernel-truncate-range.m4 b/config/kernel-truncate-range.m4 new file mode 100644 index 000000000..4b1600b61 --- /dev/null +++ b/config/kernel-truncate-range.m4 @@ -0,0 +1,19 @@ +dnl # +dnl # 3.5 API change, +dnl # inode_operations.truncate_range removed +dnl # +AC_DEFUN([SPL_AC_INODE_TRUNCATE_RANGE], [ + AC_MSG_CHECKING([whether truncate_range() inode operation is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct inode_operations ops; + ops.truncate_range = NULL; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1, + [truncate_range() inode operation is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-urange-sleep.m4 b/config/kernel-urange-sleep.m4 new file mode 100644 index 000000000..85beca6dd --- /dev/null +++ b/config/kernel-urange-sleep.m4 @@ -0,0 +1,21 @@ +dnl # +dnl # 2.6.36 API compatibility. +dnl # Added usleep_range timer. +dnl # usleep_range is a finer precision implementation of msleep +dnl # designed to be a drop-in replacement for udelay where a precise +dnl # sleep / busy-wait is unnecessary. +dnl # +AC_DEFUN([SPL_AC_USLEEP_RANGE], [ + AC_MSG_CHECKING([whether usleep_range() is available]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + usleep_range(0, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_USLEEP_RANGE, 1, + [usleep_range is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-vfs-fsync.m4 b/config/kernel-vfs-fsync.m4 new file mode 100644 index 000000000..3c42bf1a0 --- /dev/null +++ b/config/kernel-vfs-fsync.m4 @@ -0,0 +1,17 @@ +dnl # +dnl # 2.6.35 API change, +dnl # Unused 'struct dentry *' removed from vfs_fsync() prototype. +dnl # +AC_DEFUN([SPL_AC_2ARGS_VFS_FSYNC], [ + AC_MSG_CHECKING([whether vfs_fsync() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_fsync(NULL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_VFS_FSYNC, 1, [vfs_fsync() wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-vfs-getattr.m4 b/config/kernel-vfs-getattr.m4 new file mode 100644 index 000000000..7772cb514 --- /dev/null +++ b/config/kernel-vfs-getattr.m4 @@ -0,0 +1,62 @@ +dnl # +dnl # 4.11 API, a528d35e@torvalds/linux +dnl # vfs_getattr(const struct path *p, struct kstat *s, u32 m, unsigned int f) +dnl # +AC_DEFUN([SPL_AC_4ARGS_VFS_GETATTR], [ + AC_MSG_CHECKING([whether vfs_getattr() wants 4 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_getattr((const struct path *)NULL, + (struct kstat *)NULL, + (u32)0, + (unsigned int)0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_4ARGS_VFS_GETATTR, 1, + [vfs_getattr wants 4 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 3.9 API +dnl # vfs_getattr(struct path *p, struct kstat *s) +dnl # +AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [ + AC_MSG_CHECKING([whether vfs_getattr() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_getattr((struct path *) NULL, + (struct kstat *)NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1, + [vfs_getattr wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # <3.9 API +dnl # vfs_getattr(struct vfsmount *v, struct dentry *d, struct kstat *k) +dnl # +AC_DEFUN([SPL_AC_3ARGS_VFS_GETATTR], [ + AC_MSG_CHECKING([whether vfs_getattr() wants 3 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + vfs_getattr((struct vfsmount *)NULL, + (struct dentry *)NULL, + (struct kstat *)NULL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_3ARGS_VFS_GETATTR, 1, + [vfs_getattr wants 3 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-wait.m4 b/config/kernel-wait.m4 new file mode 100644 index 000000000..5f718a160 --- /dev/null +++ b/config/kernel-wait.m4 @@ -0,0 +1,76 @@ +dnl # +dnl # 3.17 API change, +dnl # wait_on_bit() no longer requires an action argument. The former +dnl # "wait_on_bit" interface required an 'action' function to be provided +dnl # which does the actual waiting. There were over 20 such functions in the +dnl # kernel, many of them identical, though most cases can be satisfied by one +dnl # of just two functions: one which uses io_schedule() and one which just +dnl # uses schedule(). This API change was made to consolidate all of those +dnl # redundant wait functions. +dnl # +AC_DEFUN([SPL_AC_WAIT_ON_BIT], [ + AC_MSG_CHECKING([whether wait_on_bit() takes an action]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + int (*action)(void *) = NULL; + wait_on_bit(NULL, 0, action, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes]) + ],[ + AC_MSG_RESULT(no) + ]) +]) +dnl # +dnl # 4.13 API change +dnl # Renamed struct wait_queue -> struct wait_queue_entry. +dnl # +AC_DEFUN([SPL_AC_WAIT_QUEUE_ENTRY_T], [ + AC_MSG_CHECKING([whether wait_queue_entry_t exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + wait_queue_entry_t *entry __attribute__ ((unused)); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1, + [wait_queue_entry_t exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 4.13 API change +dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head +dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry +dnl # +AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [ + AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist]) + SPL_LINUX_TRY_COMPILE([ + #include + + #ifdef HAVE_WAIT_QUEUE_ENTRY_T + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_entry_t spl_wait_queue_entry_t; + #else + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_t spl_wait_queue_entry_t; + #endif + ],[ + spl_wait_queue_head_t wq_head; + spl_wait_queue_entry_t wq_entry; + struct list_head *head __attribute__ ((unused)); + struct list_head *entry __attribute__ ((unused)); + + head = &wq_head.head; + entry = &wq_entry.entry; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1, + [wq_head->head and wq_entry->entry exist]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-zlib.m4 b/config/kernel-zlib.m4 new file mode 100644 index 000000000..bb236466a --- /dev/null +++ b/config/kernel-zlib.m4 @@ -0,0 +1,63 @@ +dnl # +dnl # zlib inflate compat, +dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled. +dnl # +AC_DEFUN([SPL_AC_CONFIG_ZLIB_INFLATE], [ + AC_MSG_CHECKING([whether CONFIG_ZLIB_INFLATE is defined]) + SPL_LINUX_TRY_COMPILE([ + #if !defined(CONFIG_ZLIB_INFLATE) && \ + !defined(CONFIG_ZLIB_INFLATE_MODULE) + #error CONFIG_ZLIB_INFLATE not defined + #endif + ],[ ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ + *** This kernel does not include the required zlib inflate support. + *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set.]) + ]) +]) + +dnl # +dnl # zlib deflate compat, +dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled. +dnl # +AC_DEFUN([SPL_AC_CONFIG_ZLIB_DEFLATE], [ + AC_MSG_CHECKING([whether CONFIG_ZLIB_DEFLATE is defined]) + SPL_LINUX_TRY_COMPILE([ + #if !defined(CONFIG_ZLIB_DEFLATE) && \ + !defined(CONFIG_ZLIB_DEFLATE_MODULE) + #error CONFIG_ZLIB_DEFLATE not defined + #endif + ],[ ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ + *** This kernel does not include the required zlib deflate support. + *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set.]) + ]) +]) + +dnl # +dnl # 2.6.39 API compat, +dnl # The function zlib_deflate_workspacesize() now take 2 arguments. +dnl # This was done to avoid always having to allocate the maximum size +dnl # workspace (268K). The caller can now specific the windowBits and +dnl # memLevel compression parameters to get a smaller workspace. +dnl # +AC_DEFUN([SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], + [AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1, + [zlib_deflate_workspacesize() wants 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index afc8de65f..553b5d51b 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -753,959 +753,3 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ AC_MSG_CHECKING([whether kernel defines atomic64_t]) AC_MSG_RESULT([$have_atomic64_t]) ]) - -AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[ - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - dnl # - dnl # 2.6.23 to 2.6.34 API change - dnl # ->shrink(int nr_to_scan, gfp_t gfp_mask) - dnl # - AC_MSG_CHECKING([whether old 2-argument shrinker exists]) - SPL_LINUX_TRY_COMPILE([ - #include - - int shrinker_cb(int nr_to_scan, gfp_t gfp_mask); - ],[ - struct shrinker cache_shrinker = { - .shrink = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_OLD_SHRINKER_CALLBACK, 1, - [old shrinker callback wants 2 args]) - ],[ - AC_MSG_RESULT(no) - dnl # - dnl # 2.6.35 - 2.6.39 API change - dnl # ->shrink(struct shrinker *, - dnl # int nr_to_scan, gfp_t gfp_mask) - dnl # - AC_MSG_CHECKING([whether old 3-argument shrinker exists]) - SPL_LINUX_TRY_COMPILE([ - #include - - int shrinker_cb(struct shrinker *, int nr_to_scan, - gfp_t gfp_mask); - ],[ - struct shrinker cache_shrinker = { - .shrink = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1, - [old shrinker callback wants 3 args]) - ],[ - AC_MSG_RESULT(no) - dnl # - dnl # 3.0 - 3.11 API change - dnl # ->shrink(struct shrinker *, - dnl # struct shrink_control *sc) - dnl # - AC_MSG_CHECKING( - [whether new 2-argument shrinker exists]) - SPL_LINUX_TRY_COMPILE([ - #include - - int shrinker_cb(struct shrinker *, - struct shrink_control *sc); - ],[ - struct shrinker cache_shrinker = { - .shrink = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_NEW_SHRINKER_CALLBACK, 1, - [new shrinker callback wants 2 args]) - ],[ - AC_MSG_RESULT(no) - dnl # - dnl # 3.12 API change, - dnl # ->shrink() is logically split in to - dnl # ->count_objects() and ->scan_objects() - dnl # - AC_MSG_CHECKING( - [whether ->count_objects callback exists]) - SPL_LINUX_TRY_COMPILE([ - #include - - unsigned long shrinker_cb( - struct shrinker *, - struct shrink_control *sc); - ],[ - struct shrinker cache_shrinker = { - .count_objects = shrinker_cb, - .scan_objects = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK, - 1, [->count_objects exists]) - ],[ - AC_MSG_ERROR(error) - ]) - ]) - ]) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 2.6.33 API change, -dnl # Removed .ctl_name from struct ctl_table. -dnl # -AC_DEFUN([SPL_AC_CTL_NAME], [ - AC_MSG_CHECKING([whether struct ctl_table has ctl_name]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct ctl_table ctl __attribute__ ((unused)); - ctl.ctl_name = 0; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CTL_NAME, 1, [struct ctl_table has ctl_name]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.10 API change, -dnl # PDE is replaced by PDE_DATA -dnl # -AC_DEFUN([SPL_AC_PDE_DATA], [ - AC_MSG_CHECKING([whether PDE_DATA() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - PDE_DATA(NULL); - ], [PDE_DATA], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PDE_DATA, 1, [yes]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.9 API change -dnl # set_fs_pwd takes const struct path * -dnl # -AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - #include - void (*const set_fs_pwd_func) - (struct fs_struct *, const struct path *) - = set_fs_pwd; - ],[ - return 0; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SET_FS_PWD_WITH_CONST, 1, - [set_fs_pwd() needs const path *]) - ],[ - SPL_LINUX_TRY_COMPILE([ - #include - #include - #include - void (*const set_fs_pwd_func) - (struct fs_struct *, struct path *) - = set_fs_pwd; - ],[ - return 0; - ],[ - AC_MSG_RESULT(no) - ],[ - AC_MSG_ERROR(unknown) - ]) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 2.6.36 API change, -dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to -dnl # a spinlock_t to improve the fastpath performance. -dnl # -AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [ - AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - static struct fs_struct fs; - spin_lock_init(&fs.lock); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FS_STRUCT_SPINLOCK, 1, - [struct fs_struct uses spinlock_t]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # User namespaces, use kuid_t in place of uid_t -dnl # where available. Not strictly a user namespaces thing -dnl # but it should prevent surprises -dnl # -AC_DEFUN([SPL_AC_KUIDGID_T], [ - AC_MSG_CHECKING([whether kuid_t/kgid_t is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ], [ - kuid_t userid = KUIDT_INIT(0); - kgid_t groupid = KGIDT_INIT(0); - ],[ - SPL_LINUX_TRY_COMPILE([ - #include - ], [ - kuid_t userid = 0; - kgid_t groupid = 0; - ],[ - AC_MSG_RESULT(yes; optional) - ],[ - AC_MSG_RESULT(yes; mandatory) - AC_DEFINE(HAVE_KUIDGID_T, 1, [kuid_t/kgid_t in use]) - ]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.35 API change, -dnl # Unused 'struct dentry *' removed from vfs_fsync() prototype. -dnl # -AC_DEFUN([SPL_AC_2ARGS_VFS_FSYNC], [ - AC_MSG_CHECKING([whether vfs_fsync() wants 2 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_fsync(NULL, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_VFS_FSYNC, 1, [vfs_fsync() wants 2 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.5 API change, -dnl # inode_operations.truncate_range removed -dnl # -AC_DEFUN([SPL_AC_INODE_TRUNCATE_RANGE], [ - AC_MSG_CHECKING([whether truncate_range() inode operation is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct inode_operations ops; - ops.truncate_range = NULL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1, - [truncate_range() inode operation is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # Linux 2.6.38 - 3.x API -dnl # -AC_DEFUN([SPL_AC_KERNEL_FILE_FALLOCATE], [ - AC_MSG_CHECKING([whether fops->fallocate() exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; - struct file_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # Linux 2.6.x - 2.6.37 API -dnl # -AC_DEFUN([SPL_AC_KERNEL_INODE_FALLOCATE], [ - AC_MSG_CHECKING([whether iops->fallocate() exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; - struct inode_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # PaX Linux 2.6.38 - 3.x API -dnl # -AC_DEFUN([SPL_AC_PAX_KERNEL_FILE_FALLOCATE], [ - AC_MSG_CHECKING([whether fops->fallocate() exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; - struct file_operations_no_const fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # The fallocate callback was moved from the inode_operations -dnl # structure to the file_operations structure. -dnl # -AC_DEFUN([SPL_AC_KERNEL_FALLOCATE], [ - SPL_AC_KERNEL_FILE_FALLOCATE - SPL_AC_KERNEL_INODE_FALLOCATE - SPL_AC_PAX_KERNEL_FILE_FALLOCATE -]) - -dnl # -dnl # zlib inflate compat, -dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled. -dnl # -AC_DEFUN([SPL_AC_CONFIG_ZLIB_INFLATE], [ - AC_MSG_CHECKING([whether CONFIG_ZLIB_INFLATE is defined]) - SPL_LINUX_TRY_COMPILE([ - #if !defined(CONFIG_ZLIB_INFLATE) && \ - !defined(CONFIG_ZLIB_INFLATE_MODULE) - #error CONFIG_ZLIB_INFLATE not defined - #endif - ],[ ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_ERROR([ - *** This kernel does not include the required zlib inflate support. - *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set.]) - ]) -]) - -dnl # -dnl # zlib deflate compat, -dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled. -dnl # -AC_DEFUN([SPL_AC_CONFIG_ZLIB_DEFLATE], [ - AC_MSG_CHECKING([whether CONFIG_ZLIB_DEFLATE is defined]) - SPL_LINUX_TRY_COMPILE([ - #if !defined(CONFIG_ZLIB_DEFLATE) && \ - !defined(CONFIG_ZLIB_DEFLATE_MODULE) - #error CONFIG_ZLIB_DEFLATE not defined - #endif - ],[ ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_ERROR([ - *** This kernel does not include the required zlib deflate support. - *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set.]) - ]) -]) - -dnl # -dnl # config trim unused symbols, -dnl # Verify the kernel has CONFIG_TRIM_UNUSED_KSYMS DISABLED. -dnl # -AC_DEFUN([SPL_AC_CONFIG_TRIM_UNUSED_KSYMS], [ - AC_MSG_CHECKING([whether CONFIG_TRIM_UNUSED_KSYM is disabled]) - SPL_LINUX_TRY_COMPILE([ - #if defined(CONFIG_TRIM_UNUSED_KSYMS) - #error CONFIG_TRIM_UNUSED_KSYMS not defined - #endif - ],[ ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_ERROR([ - *** This kernel has unused symbols trimming enabled, please disable. - *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set.]) - ]) -]) - -dnl # -dnl # 2.6.39 API compat, -dnl # The function zlib_deflate_workspacesize() now take 2 arguments. -dnl # This was done to avoid always having to allocate the maximum size -dnl # workspace (268K). The caller can now specific the windowBits and -dnl # memLevel compression parameters to get a smaller workspace. -dnl # -AC_DEFUN([SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], - [AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1, - [zlib_deflate_workspacesize() wants 2 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.39 API change, -dnl # Shrinker adjust to use common shrink_control structure. -dnl # -AC_DEFUN([SPL_AC_SHRINK_CONTROL_STRUCT], [ - AC_MSG_CHECKING([whether struct shrink_control exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct shrink_control sc __attribute__ ((unused)); - - sc.nr_to_scan = 0; - sc.gfp_mask = GFP_KERNEL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SHRINK_CONTROL_STRUCT, 1, - [struct shrink_control exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.1 API Change -dnl # -dnl # The rw_semaphore.wait_lock member was changed from spinlock_t to -dnl # raw_spinlock_t at commit ddb6c9b58a19edcfac93ac670b066c836ff729f1. -dnl # -AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ - AC_MSG_CHECKING([whether struct rw_semaphore member wait_lock is raw]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct rw_semaphore dummy_semaphore __attribute__ ((unused)); - raw_spinlock_t dummy_lock __attribute__ ((unused)) = - __RAW_SPIN_LOCK_INITIALIZER(dummy_lock); - dummy_semaphore.wait_lock = dummy_lock; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(RWSEM_SPINLOCK_IS_RAW, 1, - [struct rw_semaphore member wait_lock is raw_spinlock_t]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 3.16 API Change -dnl # -dnl # rwsem-spinlock "->activity" changed to "->count" -dnl # -AC_DEFUN([SPL_AC_RWSEM_ACTIVITY], [ - AC_MSG_CHECKING([whether struct rw_semaphore has member activity]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct rw_semaphore dummy_semaphore __attribute__ ((unused)); - dummy_semaphore.activity = 0; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RWSEM_ACTIVITY, 1, - [struct rw_semaphore has member activity]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 4.8 API Change -dnl # -dnl # rwsem "->count" changed to atomic_long_t type -dnl # -AC_DEFUN([SPL_AC_RWSEM_ATOMIC_LONG_COUNT], [ - AC_MSG_CHECKING( - [whether struct rw_semaphore has atomic_long_t member count]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - DECLARE_RWSEM(dummy_semaphore); - (void) atomic_long_read(&dummy_semaphore.count); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RWSEM_ATOMIC_LONG_COUNT, 1, - [struct rw_semaphore has atomic_long_t member count]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 3.9 API change, -dnl # Moved things from linux/sched.h to linux/sched/rt.h -dnl # -AC_DEFUN([SPL_AC_SCHED_RT_HEADER], - [AC_MSG_CHECKING([whether header linux/sched/rt.h exists]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - return 0; - ],[ - AC_DEFINE(HAVE_SCHED_RT_HEADER, 1, [linux/sched/rt.h exists]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 4.11 API change, -dnl # Moved things from linux/sched.h to linux/sched/signal.h -dnl # -AC_DEFUN([SPL_AC_SCHED_SIGNAL_HEADER], - [AC_MSG_CHECKING([whether header linux/sched/signal.h exists]) - SPL_LINUX_TRY_COMPILE([ - #include - #include - ],[ - return 0; - ],[ - AC_DEFINE(HAVE_SCHED_SIGNAL_HEADER, 1, [linux/sched/signal.h exists]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 4.11 API, a528d35e@torvalds/linux -dnl # vfs_getattr(const struct path *p, struct kstat *s, u32 m, unsigned int f) -dnl # -AC_DEFUN([SPL_AC_4ARGS_VFS_GETATTR], [ - AC_MSG_CHECKING([whether vfs_getattr() wants 4 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_getattr((const struct path *)NULL, - (struct kstat *)NULL, - (u32)0, - (unsigned int)0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_4ARGS_VFS_GETATTR, 1, - [vfs_getattr wants 4 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.9 API -dnl # vfs_getattr(struct path *p, struct kstat *s) -dnl # -AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [ - AC_MSG_CHECKING([whether vfs_getattr() wants 2 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_getattr((struct path *) NULL, - (struct kstat *)NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1, - [vfs_getattr wants 2 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # <3.9 API -dnl # vfs_getattr(struct vfsmount *v, struct dentry *d, struct kstat *k) -dnl # -AC_DEFUN([SPL_AC_3ARGS_VFS_GETATTR], [ - AC_MSG_CHECKING([whether vfs_getattr() wants 3 args]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - vfs_getattr((struct vfsmount *)NULL, - (struct dentry *)NULL, - (struct kstat *)NULL); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_3ARGS_VFS_GETATTR, 1, - [vfs_getattr wants 3 args]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.36 API compatibility. -dnl # Added usleep_range timer. -dnl # usleep_range is a finer precision implementation of msleep -dnl # designed to be a drop-in replacement for udelay where a precise -dnl # sleep / busy-wait is unnecessary. -dnl # -AC_DEFUN([SPL_AC_USLEEP_RANGE], [ - AC_MSG_CHECKING([whether usleep_range() is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - usleep_range(0, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_USLEEP_RANGE, 1, - [usleep_range is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 2.6.35 API change, -dnl # The cachep->gfpflags member was renamed cachep->allocflags. These are -dnl # private allocation flags which are applied when allocating a new slab -dnl # in kmem_getpages(). Unfortunately there is no public API for setting -dnl # non-default flags. -dnl # -AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [ - AC_MSG_CHECKING([whether struct kmem_cache has allocflags]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct kmem_cache cachep __attribute__ ((unused)); - cachep.allocflags = GFP_KERNEL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_ALLOCFLAGS, 1, - [struct kmem_cache has allocflags]) - ],[ - AC_MSG_RESULT(no) - - AC_MSG_CHECKING([whether struct kmem_cache has gfpflags]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct kmem_cache cachep __attribute__ ((unused)); - cachep.gfpflags = GFP_KERNEL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_GFPFLAGS, 1, - [struct kmem_cache has gfpflags]) - ],[ - AC_MSG_RESULT(no) - ]) - ]) -]) - -dnl # -dnl # 3.17 API change, -dnl # wait_on_bit() no longer requires an action argument. The former -dnl # "wait_on_bit" interface required an 'action' function to be provided -dnl # which does the actual waiting. There were over 20 such functions in the -dnl # kernel, many of them identical, though most cases can be satisfied by one -dnl # of just two functions: one which uses io_schedule() and one which just -dnl # uses schedule(). This API change was made to consolidate all of those -dnl # redundant wait functions. -dnl # -AC_DEFUN([SPL_AC_WAIT_ON_BIT], [ - AC_MSG_CHECKING([whether wait_on_bit() takes an action]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - int (*action)(void *) = NULL; - wait_on_bit(NULL, 0, action, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 4.7 API change -dnl # i_mutex is changed to i_rwsem. Instead of directly using -dnl # i_mutex/i_rwsem, we should use inode_lock() and inode_lock_shared() -dnl # We test inode_lock_shared because inode_lock is introduced earlier. -dnl # -AC_DEFUN([SPL_AC_INODE_LOCK], [ - AC_MSG_CHECKING([whether inode_lock_shared() exists]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct inode *inode = NULL; - inode_lock_shared(inode); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_LOCK_SHARED, 1, [yes]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 4.9 API change -dnl # group_info changed from 2d array via >blocks to 1d array via ->gid -dnl # -AC_DEFUN([SPL_AC_GROUP_INFO_GID], [ - AC_MSG_CHECKING([whether group_info->gid exists]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct group_info *gi = groups_alloc(1); - gi->gid[0] = KGIDT_INIT(0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GROUP_INFO_GID, 1, [group_info->gid exists]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # grsecurity API change, -dnl # kmem_cache_create() with SLAB_USERCOPY flag replaced by -dnl # kmem_cache_create_usercopy(). -dnl # -AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_USERCOPY], [ - AC_MSG_CHECKING([whether kmem_cache_create_usercopy() exists]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - static void ctor(void *foo) - { - // fake ctor - } - ],[ - struct kmem_cache *skc_linux_cache; - const char *name = "test"; - size_t size = 4096; - size_t align = 8; - unsigned long flags = 0; - size_t useroffset = 0; - size_t usersize = size - useroffset; - - skc_linux_cache = kmem_cache_create_usercopy( - name, size, align, flags, useroffset, usersize, ctor); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_CREATE_USERCOPY, 1, - [kmem_cache_create_usercopy() exists]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 4.13 API change -dnl # Renamed struct wait_queue -> struct wait_queue_entry. -dnl # -AC_DEFUN([SPL_AC_WAIT_QUEUE_ENTRY_T], [ - AC_MSG_CHECKING([whether wait_queue_entry_t exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - wait_queue_entry_t *entry __attribute__ ((unused)); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1, - [wait_queue_entry_t exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 4.13 API change -dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head -dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry -dnl # -AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [ - AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist]) - SPL_LINUX_TRY_COMPILE([ - #include - - #ifdef HAVE_WAIT_QUEUE_ENTRY_T - typedef wait_queue_head_t spl_wait_queue_head_t; - typedef wait_queue_entry_t spl_wait_queue_entry_t; - #else - typedef wait_queue_head_t spl_wait_queue_head_t; - typedef wait_queue_t spl_wait_queue_entry_t; - #endif - ],[ - spl_wait_queue_head_t wq_head; - spl_wait_queue_entry_t wq_entry; - struct list_head *head __attribute__ ((unused)); - struct list_head *entry __attribute__ ((unused)); - - head = &wq_head.head; - entry = &wq_entry.entry; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1, - [wq_head->head and wq_entry->entry exist]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 3.19 API change -dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels -dnl # but it was not exported until Linux 3.19. The RHEL 7.x kernels which -dnl # are based on a 3.10 kernel do export this symbol. -dnl # -AC_DEFUN([SPL_AC_IO_SCHEDULE_TIMEOUT], [ - AC_MSG_CHECKING([whether io_schedule_timeout() is available]) - SPL_LINUX_TRY_COMPILE_SYMBOL([ - #include - ], [ - (void) io_schedule_timeout(1); - ], [io_schedule_timeout], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 4.14 API change -dnl # kernel_write() which was introduced in 3.9 was updated to take -dnl # the offset as a pointer which is needed by vn_rdwr(). -dnl # -AC_DEFUN([SPL_AC_KERNEL_WRITE], [ - AC_MSG_CHECKING([whether kernel_write() takes loff_t pointer]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct file *file = NULL; - const void *buf = NULL; - size_t count = 0; - loff_t *pos = NULL; - ssize_t ret; - - ret = kernel_write(file, buf, count, pos); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERNEL_WRITE_PPOS, 1, - [kernel_write() take loff_t pointer]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 4.14 API change -dnl # kernel_read() which has existed for forever was updated to take -dnl # the offset as a pointer which is needed by vn_rdwr(). -dnl # -AC_DEFUN([SPL_AC_KERNEL_READ], [ - AC_MSG_CHECKING([whether kernel_read() takes loff_t pointer]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct file *file = NULL; - void *buf = NULL; - size_t count = 0; - loff_t *pos = NULL; - ssize_t ret; - - ret = kernel_read(file, buf, count, pos); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERNEL_READ_PPOS, 1, - [kernel_read() take loff_t pointer]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) - -dnl # -dnl # 4.15 API change -dnl # https://lkml.org/lkml/2017/11/25/90 -dnl # Check if timer_list.func get passed a timer_list or an unsigned long -dnl # (older kernels). Also sanity check the from_timer() and timer_setup() -dnl # macros are available as well, since they will be used in the same newer -dnl # kernels that support the new timer_list.func signature. -dnl # -AC_DEFUN([SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST], [ - AC_MSG_CHECKING([whether timer_list.function gets a timer_list]) - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" - SPL_LINUX_TRY_COMPILE([ - #include - void task_expire(struct timer_list *tl) {} - ],[ - #ifndef from_timer - #error "No from_timer() macro" - #endif - - struct timer_list timer; - timer.function = task_expire; - timer_setup(&timer, NULL, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST, 1, - [timer_list.function gets a timer_list]) - ],[ - AC_MSG_RESULT(no) - ]) - EXTRA_KCFLAGS="$tmp_flags" -]) From 2b5cd5990f587dedf5cfe3f857105af70c7a21ed Mon Sep 17 00:00:00 2001 From: DeHackEd Date: Wed, 21 Feb 2018 17:54:26 -0500 Subject: [PATCH 1052/1062] Fix multiple evaluations of VERIFY() and ASSERT() on failures Reviewed-by: loli10K Reviewed-by: Brian Behlendorf Signed-off-by: DHE Closes #684 Closes #685 --- include/sys/debug.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index cd78171df..a4a458066 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -63,12 +63,15 @@ void spl_dumpstack(void); spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "%s", "VERIFY(" #cond ") failed\n")) -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ - (void) ((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \ - spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (" FMT " " #OP " " FMT ")\n", \ - CAST (LEFT), CAST (RIGHT))) +#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) do { \ + TYPE _verify3_left = (TYPE)(LEFT); \ + TYPE _verify3_right = (TYPE)(RIGHT); \ + if (!(_verify3_left OP _verify3_right)) \ + spl_panic(__FILE__, __FUNCTION__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ + CAST (_verify3_left), CAST (_verify3_right)); \ + } while (0) #define VERIFY3B(x,y,z) VERIFY3_IMPL(x, y, z, boolean_t, "%d", (boolean_t)) #define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long)) From 68386b05031a70f7f135481307318ef04c2f30e0 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Mon, 19 Feb 2018 19:23:53 +0900 Subject: [PATCH 1053/1062] Staticize kstat_default_update() This is only used via ->ks_update of `kstat_t *`. This isn't exported nor do headers have its prototype. Reviewed-by: Brian Behlendorf Signed-off-by: Tomohiro Kusumi Closes #686 --- module/spl/spl-kstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 70c0c98f8..405ece0ad 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -327,7 +327,7 @@ restart: return (-rc); } -int +static int kstat_default_update(kstat_t *ksp, int rw) { ASSERT(ksp != NULL); From 378c6ed549e7d68eebb4b0bd37a09e66f70c647b Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Mon, 19 Feb 2018 20:40:38 +0900 Subject: [PATCH 1054/1062] Fix function name typos vn_init() and vn_fini() had been renamed by 12ff95ff in 2011. Reviewed-by: Brian Behlendorf Signed-off-by: Tomohiro Kusumi Closes #686 --- module/spl/spl-vnode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index f019a0877..79ca89ee0 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -658,7 +658,7 @@ vn_file_cache_constructor(void *buf, void *cdrarg, int kmflags) INIT_LIST_HEAD(&fp->f_list); return (0); -} /* file_cache_constructor() */ +} /* vn_file_cache_constructor() */ static void vn_file_cache_destructor(void *buf, void *cdrarg) @@ -680,7 +680,7 @@ spl_vn_init(void) vn_file_cache_destructor, NULL, NULL, NULL, 0); return (0); -} /* vn_init() */ +} /* spl_vn_init() */ void spl_vn_fini(void) @@ -703,4 +703,4 @@ spl_vn_fini(void) kmem_cache_destroy(vn_file_cache); kmem_cache_destroy(vn_cache); -} /* vn_fini() */ +} /* spl_vn_fini() */ From 3673d032850c3b54b8b2cc74cf1782a75cc9b2a9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 24 Feb 2018 10:05:37 -0800 Subject: [PATCH 1055/1062] Fix more cstyle warnings This patch contains no functional changes. It is solely intended to resolve cstyle warnings in order to facilitate moving the spl source code in to the zfs repository. Reviewed-by: Giuseppe Di Natale Reviewed by: George Melikov Signed-off-by: Brian Behlendorf Closes #687 --- module/spl/spl-err.c | 5 ++++- module/spl/spl-generic.c | 11 ++++++++--- module/spl/spl-kmem-cache.c | 5 ++++- module/spl/spl-kmem.c | 5 ++++- module/spl/spl-kstat.c | 17 ++++++++++------- module/spl/spl-proc.c | 18 ++++++++++-------- module/spl/spl-thread.c | 3 +-- module/spl/spl-vnode.c | 11 +++++------ module/spl/spl-xdr.c | 10 +++++----- 9 files changed, 51 insertions(+), 34 deletions(-) diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c index 33a8df898..6b71296e8 100644 --- a/module/spl/spl-err.c +++ b/module/spl/spl-err.c @@ -34,9 +34,11 @@ * analysis and other such goodies. * But we would still default to the current default of not to do that. */ +/* BEGIN CSTYLED */ unsigned int spl_panic_halt; module_param(spl_panic_halt, uint, 0644); MODULE_PARM_DESC(spl_panic_halt, "Cause kernel panic on assertion failures"); +/* END CSTYLED */ /* * Limit the number of stack traces dumped to not more than 5 every @@ -55,7 +57,8 @@ spl_dumpstack(void) EXPORT_SYMBOL(spl_dumpstack); int -spl_panic(const char *file, const char *func, int line, const char *fmt, ...) { +spl_panic(const char *file, const char *func, int line, const char *fmt, ...) +{ const char *newfile; char msg[MAXMSGLEN]; va_list ap; diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index efd901094..2a8972691 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -50,10 +50,12 @@ char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; EXPORT_SYMBOL(spl_version); +/* BEGIN CSTYLED */ unsigned long spl_hostid = 0; EXPORT_SYMBOL(spl_hostid); module_param(spl_hostid, ulong, 0644); MODULE_PARM_DESC(spl_hostid, "The system hostid."); +/* END CSTYLED */ proc_t p0; EXPORT_SYMBOL(p0); @@ -98,7 +100,8 @@ static DEFINE_PER_CPU(uint64_t[2], spl_pseudo_entropy); */ static inline uint64_t -spl_rand_next(uint64_t *s) { +spl_rand_next(uint64_t *s) +{ uint64_t s1 = s[0]; const uint64_t s0 = s[1]; s[0] = s0; @@ -108,7 +111,8 @@ spl_rand_next(uint64_t *s) { } static inline void -spl_rand_jump(uint64_t *s) { +spl_rand_jump(uint64_t *s) +{ static const uint64_t JUMP[] = { 0x8a5cd789635d2dff, 0x121fd2155c472f96 }; @@ -184,7 +188,8 @@ EXPORT_SYMBOL(random_get_pseudo_bytes); * Calculate number of leading of zeros for a 64-bit value. */ static int -nlz64(uint64_t x) { +nlz64(uint64_t x) +{ register int n = 0; if (x == 0) diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index e4bcdd825..c73a2fdc2 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -66,6 +66,7 @@ * because it has been shown to improve responsiveness on low memory systems. * This policy may be changed by setting KMC_EXPIRE_AGE or KMC_EXPIRE_MEM. */ +/* BEGIN CSTYLED */ unsigned int spl_kmem_cache_expire = KMC_EXPIRE_MEM; EXPORT_SYMBOL(spl_kmem_cache_expire); module_param(spl_kmem_cache_expire, uint, 0644); @@ -148,6 +149,7 @@ unsigned int spl_kmem_cache_kmem_threads = 4; module_param(spl_kmem_cache_kmem_threads, uint, 0444); MODULE_PARM_DESC(spl_kmem_cache_kmem_threads, "Number of spl_kmem_cache threads"); +/* END CSTYLED */ /* * Slab allocation interfaces @@ -356,8 +358,9 @@ out: if (rc) { if (skc->skc_flags & KMC_OFFSLAB) list_for_each_entry_safe(sko, - n, &sks->sks_free_list, sko_list) + n, &sks->sks_free_list, sko_list) { kv_free(skc, sko->sko_addr, offslab_size); + } kv_free(skc, base, skc->skc_slab_size); sks = NULL; diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index bf9c6b179..e0d551041 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -44,6 +44,7 @@ * allocations are quickly caught. These warnings may be disabled by setting * the threshold to zero. */ +/* BEGIN CSTYLED */ unsigned int spl_kmem_alloc_warn = MIN(16 * PAGE_SIZE, 64 * 1024); module_param(spl_kmem_alloc_warn, uint, 0644); MODULE_PARM_DESC(spl_kmem_alloc_warn, @@ -64,6 +65,7 @@ module_param(spl_kmem_alloc_max, uint, 0644); MODULE_PARM_DESC(spl_kmem_alloc_max, "Maximum size in bytes for a kmem_alloc()"); EXPORT_SYMBOL(spl_kmem_alloc_max); +/* END CSTYLED */ int kmem_debugging(void) @@ -520,10 +522,11 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) printk(KERN_WARNING "%-16s %-5s %-16s %s:%s\n", "address", "size", "data", "func", "line"); - list_for_each_entry(kd, list, kd_list) + list_for_each_entry(kd, list, kd_list) { printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr, (int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8), kd->kd_func, kd->kd_line); + } spin_unlock_irqrestore(lock, flags); } diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 405ece0ad..10e93f318 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -305,7 +305,7 @@ restart: } else { ASSERT(ksp->ks_ndata == 1); rc = kstat_seq_show_raw(f, ksp->ks_data, - ksp->ks_data_size); + ksp->ks_data_size); } break; case KSTAT_TYPE_NAMED: @@ -434,9 +434,10 @@ kstat_find_module(char *name) { kstat_module_t *module; - list_for_each_entry(module, &kstat_module_list, ksm_module_list) + list_for_each_entry(module, &kstat_module_list, ksm_module_list) { if (strncmp(name, module->ksm_name, KSTAT_STRLEN) == 0) return (module); + } return (NULL); } @@ -517,9 +518,9 @@ static struct file_operations proc_kstat_operations = { void __kstat_set_raw_ops(kstat_t *ksp, - int (*headers)(char *buf, size_t size), - int (*data)(char *buf, size_t size, void *data), - void *(*addr)(kstat_t *ksp, loff_t index)) + int (*headers)(char *buf, size_t size), + int (*data)(char *buf, size_t size, void *data), + void *(*addr)(kstat_t *ksp, loff_t index)) { ksp->ks_raw_ops.headers = headers; ksp->ks_raw_ops.data = data; @@ -628,11 +629,12 @@ kstat_detect_collision(kstat_t *ksp) cp[0] = '\0'; if ((module = kstat_find_module(parent)) != NULL) { - list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) + list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) { if (strncmp(tmp->ks_name, cp+1, KSTAT_STRLEN) == 0) { strfree(parent); return (EEXIST); } + } } strfree(parent); @@ -665,9 +667,10 @@ __kstat_install(kstat_t *ksp) * Only one entry by this name per-module, on failure the module * shouldn't be deleted because we know it has at least one entry. */ - list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) + list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) { if (strncmp(tmp->ks_name, ksp->ks_name, KSTAT_STRLEN) == 0) goto out; + } list_add_tail(&ksp->ks_list, &module->ksm_kstat_list); diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index f5998a06e..796f69e48 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -85,8 +85,8 @@ proc_copyin_string(char *kbuffer, int kbuffer_size, const char *ubuffer, } static int -proc_copyout_string(char *ubuffer, int ubuffer_size, - const char *kbuffer, char *append) +proc_copyout_string(char *ubuffer, int ubuffer_size, const char *kbuffer, + char *append) { /* * NB if 'append' != NULL, it's a single character to append to the @@ -239,9 +239,11 @@ taskq_seq_show_headers(struct seq_file *f) #define LHEAD_ACTIVE 4 #define LHEAD_SIZE 5 +/* BEGIN CSTYLED */ static unsigned int spl_max_show_tasks = 512; module_param(spl_max_show_tasks, uint, 0644); MODULE_PARM_DESC(spl_max_show_tasks, "Max number of tasks shown in taskq proc"); +/* END CSTYLED */ static int taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag) @@ -719,15 +721,15 @@ spl_proc_init(void) goto out; } - proc_spl_taskq_all = proc_create_data("taskq-all", 0444, - proc_spl, &proc_taskq_all_operations, NULL); + proc_spl_taskq_all = proc_create_data("taskq-all", 0444, proc_spl, + &proc_taskq_all_operations, NULL); if (proc_spl_taskq_all == NULL) { rc = -EUNATCH; goto out; } - proc_spl_taskq = proc_create_data("taskq", 0444, - proc_spl, &proc_taskq_operations, NULL); + proc_spl_taskq = proc_create_data("taskq", 0444, proc_spl, + &proc_taskq_operations, NULL); if (proc_spl_taskq == NULL) { rc = -EUNATCH; goto out; @@ -739,8 +741,8 @@ spl_proc_init(void) goto out; } - proc_spl_kmem_slab = proc_create_data("slab", 0444, - proc_spl_kmem, &proc_slab_operations, NULL); + proc_spl_kmem_slab = proc_create_data("slab", 0444, proc_spl_kmem, + &proc_slab_operations, NULL); if (proc_spl_kmem_slab == NULL) { rc = -EUNATCH; goto out; diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c index 9ad044161..d441ad65f 100644 --- a/module/spl/spl-thread.c +++ b/module/spl/spl-thread.c @@ -79,8 +79,7 @@ EXPORT_SYMBOL(__thread_exit); */ kthread_t * __thread_create(caddr_t stk, size_t stksize, thread_func_t func, - const char *name, void *args, size_t len, proc_t *pp, - int state, pri_t pri) + const char *name, void *args, size_t len, proc_t *pp, int state, pri_t pri) { thread_priv_t *tp; struct task_struct *tsk; diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 79ca89ee0..a371fb966 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -118,8 +118,8 @@ vn_free(vnode_t *vp) EXPORT_SYMBOL(vn_free); int -vn_open(const char *path, uio_seg_t seg, int flags, int mode, - vnode_t **vpp, int x1, void *x2) +vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp, + int x1, void *x2) { struct file *fp; struct kstat stat; @@ -210,7 +210,7 @@ EXPORT_SYMBOL(vn_openat); int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, - uio_seg_t seg, int ioflag, rlim64_t x2, void *x3, ssize_t *residp) + uio_seg_t seg, int ioflag, rlim64_t x2, void *x3, ssize_t *residp) { struct file *fp = vp->v_file; loff_t offset = off; @@ -401,9 +401,8 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, --end; vp->v_file->f_dentry->d_inode->i_op->truncate_range( - vp->v_file->f_dentry->d_inode, - bfp->l_start, end - ); + vp->v_file->f_dentry->d_inode, bfp->l_start, end); + return (0); } #endif diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index c582913f1..4055921b4 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -160,7 +160,7 @@ EXPORT_SYMBOL(xdrmem_create); static bool_t xdrmem_control(XDR *xdrs, int req, void *info) { - struct xdr_bytesrec *rec = (struct xdr_bytesrec *) info; + struct xdr_bytesrec *rec = (struct xdr_bytesrec *)info; if (req != XDR_GET_BYTES_AVAIL) return (FALSE); @@ -236,7 +236,7 @@ xdrmem_enc_uint32(XDR *xdrs, uint32_t val) if (xdrs->x_addr + sizeof (uint32_t) > xdrs->x_addr_end) return (FALSE); - *((uint32_t *) xdrs->x_addr) = cpu_to_be32(val); + *((uint32_t *)xdrs->x_addr) = cpu_to_be32(val); xdrs->x_addr += sizeof (uint32_t); @@ -249,7 +249,7 @@ xdrmem_dec_uint32(XDR *xdrs, uint32_t *val) if (xdrs->x_addr + sizeof (uint32_t) > xdrs->x_addr_end) return (FALSE); - *val = be32_to_cpu(*((uint32_t *) xdrs->x_addr)); + *val = be32_to_cpu(*((uint32_t *)xdrs->x_addr)); xdrs->x_addr += sizeof (uint32_t); @@ -333,7 +333,7 @@ xdrmem_dec_uint(XDR *xdrs, unsigned *up) { BUILD_BUG_ON(sizeof (unsigned) != 4); - return (xdrmem_dec_uint32(xdrs, (uint32_t *) up)); + return (xdrmem_dec_uint32(xdrs, (uint32_t *)up)); } static bool_t @@ -359,7 +359,7 @@ xdrmem_dec_ulonglong(XDR *xdrs, u_longlong_t *ullp) if (!xdrmem_dec_uint32(xdrs, &low)) return (FALSE); - *ullp = ((u_longlong_t) high << 32) | low; + *ullp = ((u_longlong_t)high << 32) | low; return (TRUE); } From 43983eb2024ec6b3280e6e06a6fb621ee3bb2a41 Mon Sep 17 00:00:00 2001 From: LOLi Date: Fri, 9 Mar 2018 22:51:31 +0100 Subject: [PATCH 1056/1062] Fix spl-kmod builds when using rpm >= 4.14 With rpm-software-management/rpm@5e94633 a package version containing invalid characters (most commonly a double '-') causes the kmod package generation to terminate with an error. This change takes advantage of the newly introduced rpm macro "_wrong_version_format_terminate_build" to allow kmod packages to be built. Reviewed-by: Brian Behlendorf Signed-off-by: loli10K Closes #691 --- config/spl-build.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 553b5d51b..9c97e64f9 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -231,6 +231,7 @@ AC_DEFUN([SPL_AC_RPM], [ RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"' RPM_DEFINE_UTIL= RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"' + RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"' RPM_DEFINE_DKMS= SRPM_DEFINE_COMMON='--define "build_src_rpm 1"' From 581bc01a0765eed9ea7dc17132b3943a5efc966d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 4 Apr 2018 09:54:20 -0700 Subject: [PATCH 1057/1062] Remove sysevents These headers are provided in the ZFS repository and never used by the SPL. Remove them to ensure the right ones are included. Reviewed-by: Tim Chase Signed-off-by: Brian Behlendorf Closes #696 --- configure.ac | 1 - include/sys/Makefile.am | 3 +-- include/sys/sysevent.h | 28 ---------------------------- include/sys/sysevent/Makefile.am | 13 ------------- include/sys/sysevent/eventdefs.h | 28 ---------------------------- 5 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 include/sys/sysevent.h delete mode 100644 include/sys/sysevent/Makefile.am delete mode 100644 include/sys/sysevent/eventdefs.h diff --git a/configure.ac b/configure.ac index 70735ce2c..59ee3ca0b 100644 --- a/configure.ac +++ b/configure.ac @@ -67,7 +67,6 @@ AC_CONFIG_FILES([ include/sys/Makefile include/sys/fm/Makefile include/sys/fs/Makefile - include/sys/sysevent/Makefile include/util/Makefile include/vm/Makefile scripts/Makefile diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index a16bd6ce6..45b658976 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = fm fs sysevent +SUBDIRS = fm fs COMMON_H = @@ -77,7 +77,6 @@ KERNEL_H = \ $(top_srcdir)/include/sys/sunddi.h \ $(top_srcdir)/include/sys/sunldi.h \ $(top_srcdir)/include/sys/sysdc.h \ - $(top_srcdir)/include/sys/sysevent.h \ $(top_srcdir)/include/sys/sysmacros.h \ $(top_srcdir)/include/sys/systeminfo.h \ $(top_srcdir)/include/sys/systm.h \ diff --git a/include/sys/sysevent.h b/include/sys/sysevent.h deleted file mode 100644 index 78e582f3c..000000000 --- a/include/sys/sysevent.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SYSEVENT_H -#define _SPL_SYSEVENT_H - -#endif /* _SPL_SYSEVENT_H */ diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am deleted file mode 100644 index 63d9af310..000000000 --- a/include/sys/sysevent/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/sys/sysevent/eventdefs.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/sysevent -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/sys/sysevent/eventdefs.h b/include/sys/sysevent/eventdefs.h deleted file mode 100644 index f92cc4f82..000000000 --- a/include/sys/sysevent/eventdefs.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SYSEVENT_EVENTDEFS_H -#define _SPL_SYSEVENT_EVENTDEFS_H - -#endif /* _SPL_SYSEVENT_EVENTDEFS_H */ From 9125f8f5bdb36bfbd2d816d30b6b29b9f89ae3d8 Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Mon, 9 Apr 2018 17:20:06 -0700 Subject: [PATCH 1058/1062] Linux compat 4.16: SECTOR_SIZE As of https://github.com/torvalds/linux/commit/233bde21, SECTOR_SIZE is defined in linux/blkdev.h. Define SECTOR_SIZE in sunldi.h only if it's not already defined. Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Giuseppe Di Natale Closes #697 --- include/sys/sunldi.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index 43462efad..a5045f891 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -32,6 +32,12 @@ #include #include +/* + * SECTOR_SIZE can be defined in blkdev.h. See + * https://github.com/torvalds/linux/commit/233bde21. + */ +#ifndef SECTOR_SIZE #define SECTOR_SIZE 512 +#endif #endif /* SPL_SUNLDI_H */ From 73d08ace523fc3964852e4e82eae3f2db70354d4 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Mon, 16 Apr 2018 15:40:14 -0700 Subject: [PATCH 1059/1062] Exclude python scripts from RPM shebang check The newest Fedora packaging rules print warnings for scripts using the /usr/bin/python shebang: *** WARNING: mangling shebang in /usr/src/spl-0.7.0/cmd/splslab/splslab.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually! Fedora wants all cross compatible scripts to pick python3. Since we don't want our users to have to pick a specific version of python, we exclude our scripts from the RPM build check. Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes: #699 Closes: #700 --- rpm/generic/spl-dkms.spec.in | 10 ++++++++++ rpm/generic/spl.spec.in | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in index 419624058..a8691d229 100644 --- a/rpm/generic/spl-dkms.spec.in +++ b/rpm/generic/spl-dkms.spec.in @@ -7,6 +7,16 @@ %define module @PACKAGE@ %define mkconf scripts/dkms.mkconf +# Python permits the !/usr/bin/python shebang for scripts that are cross +# compatible between python2 and python3, but Fedora 28 does not. Fedora +# wants us to choose python3 for cross-compatible scripts. Since we want +# to support python2 and python3 users, exclude our scripts from Fedora 28's +# RPM build check, so that we don't get a bunch of build warnings. +# +# Details: https://github.com/zfsonlinux/zfs/issues/7360 +# +%global __brp_mangle_shebangs_exclude_from splslab.py + Name: %{module}-dkms Version: @VERSION@ diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 8fee0b87e..7ba71fd58 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -1,3 +1,13 @@ +# Python permits the !/usr/bin/python shebang for scripts that are cross +# compatible between python2 and python3, but Fedora 28 does not. Fedora +# wants us to choose python3 for cross-compatible scripts. Since we want +# to support python2 and python3 users, exclude our scripts from Fedora 28's +# RPM build check, so that we don't get a bunch of build warnings. +# +# Details: https://github.com/zfsonlinux/zfs/issues/7360 +# +%global __brp_mangle_shebangs_exclude_from splslab.py + Name: @PACKAGE@ Version: @VERSION@ Release: @RELEASE@%{?dist} From 84a80d5f2d14fdfd16d440eef2e3d6e756a1165c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 2 May 2018 15:34:20 -0700 Subject: [PATCH 1060/1062] Fix undefined RPM macros Always invoke the SPL_AC_DEBUG* macro's when running configure so RPM_DEFINE_COMMON is correctly expanded. A similar change was already applied to ZFS. Reviewed-by: George Melikov Reviewed-by: Tony Hutter Signed-off-by: Brian Behlendorf Closes #703 --- config/spl-build.m4 | 7 +++---- configure.ac | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 9c97e64f9..5c6c02af2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -17,9 +17,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" AC_SUBST(KERNELCPPFLAGS) - SPL_AC_DEBUG - SPL_AC_DEBUG_KMEM - SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_TEST_MODULE SPL_AC_ATOMIC_SPINLOCK SPL_AC_SHRINKER_CALLBACK @@ -228,7 +225,9 @@ AC_DEFUN([SPL_AC_RPM], [ AC_MSG_RESULT([$HAVE_RPMBUILD]) ]) - RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"' + RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1"' + RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM) 1"' + RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_TRACKING) 1"' RPM_DEFINE_UTIL= RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"' RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"' diff --git a/configure.ac b/configure.ac index 59ee3ca0b..ab53879e7 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,9 @@ AC_PROG_LIBTOOL SPL_AC_LICENSE SPL_AC_PACKAGE SPL_AC_CONFIG +SPL_AC_DEBUG +SPL_AC_DEBUG_KMEM +SPL_AC_DEBUG_KMEM_TRACKING AC_CONFIG_FILES([ Makefile From 1149b62d20b7ed9d8ae25d5da7a06213d79b7602 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Mon, 7 May 2018 10:12:25 -0700 Subject: [PATCH 1061/1062] Update README: run autogen first Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Matthew Ahrens Closes #704 --- README.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.markdown b/README.markdown index 1de82ef93..bdf63ac2e 100644 --- a/README.markdown +++ b/README.markdown @@ -8,6 +8,7 @@ primitives. To build packages for your distribution: + $ sh autogen.sh $ ./configure $ make pkg @@ -19,6 +20,7 @@ the GNU autotools for your distribution. To copy the kernel code inside your kernel source tree for builtin compilation: + $ sh autogen.sh $ ./configure --enable-linux-builtin --with-linux=/usr/src/linux-... $ ./copy-builtin /usr/src/linux-... From a91258913fb597db7f409f3534512cf2249bceb6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 14 Feb 2018 17:01:15 -0800 Subject: [PATCH 1062/1062] Prepare SPL repo to merge with ZFS repo This commit removes everything from the repository except the core SPL implementation for Linux. Those files which remain have been moved to non-conflicting locations to facilitate the merge. The README.md and associated files have been updated accordingly. Signed-off-by: Brian Behlendorf --- .gitignore | 52 - DISCLAIMER | 24 - COPYING => LICENSE | 0 META | 8 - Makefile.am | 55 - NOTICE | 16 + README.markdown | 36 - README.md | 21 + autogen.sh | 4 - cmd/Makefile.am | 1 - cmd/splat/.gitignore | 1 - cmd/splat/Makefile.am | 11 - cmd/splat/splat.c | 836 --------- cmd/splat/splat.h | 70 - cmd/splslab/Makefile.am | 2 - cmd/splslab/splslab.py | 202 --- config/.gitignore | 9 - config/Rules.am | 14 - config/config.awk | 15 - config/deb.am | 58 - config/kernel-fallocate-pax.m4 | 19 + config/kernel-fallocate.m4 | 68 - config/kernel-kmem.m4 | 58 + config/kernel-truncate-range.m4 | 19 - config/rpm.am | 87 - config/spl-build.m4 | 755 -------- config/spl-meta.m4 | 170 -- config/tgz.am | 44 - configure.ac | 88 - copy-builtin | 126 -- include/Makefile.am | 18 - include/fs/Makefile.am | 13 - include/fs/fs_subr.h | 28 - include/linux/Makefile.am | 23 - include/linux/bitops_compat.h | 30 - include/linux/compiler_compat.h | 47 - include/linux/delay_compat.h | 47 - include/linux/file_compat.h | 140 -- include/linux/list_compat.h | 50 - include/linux/math64_compat.h | 33 - include/linux/proc_compat.h | 35 - include/linux/rwsem_compat.h | 68 - include/linux/zlib_compat.h | 37 - include/rpc/Makefile.am | 14 - include/rpc/types.h | 30 - include/sharefs/Makefile.am | 13 - include/sharefs/share.h | 28 - include/spl-ctl.h | 45 - include/{ => spl}/rpc/xdr.h | 3 +- include/{ => spl}/sys/acl.h | 0 include/spl/sys/atomic.h | 79 + include/{ => spl}/sys/byteorder.h | 5 + include/{ => spl}/sys/callb.h | 0 include/{ => spl}/sys/callo.h | 0 include/{ => spl}/sys/cmn_err.h | 6 +- include/{ => spl}/sys/condvar.h | 3 +- include/{ => spl}/sys/console.h | 0 include/{ => spl}/sys/cred.h | 1 + include/{ => spl}/sys/ctype.h | 0 include/{ => spl}/sys/debug.h | 0 include/{ => spl}/sys/disp.h | 0 include/{ => spl}/sys/dkio.h | 0 include/{ => spl}/sys/dkioc_free_util.h | 0 include/{ => spl}/sys/fcntl.h | 0 include/{ => spl}/sys/file.h | 25 +- include/{ => spl}/sys/inttypes.h | 0 include/{ => spl}/sys/isa_defs.h | 0 include/{ => spl}/sys/kmem.h | 0 include/{ => spl}/sys/kmem_cache.h | 0 include/{ => spl}/sys/kobj.h | 0 include/{ => spl}/sys/kstat.h | 2 +- include/{ => spl}/sys/list.h | 11 - include/{ => spl}/sys/mode.h | 0 include/{ => spl}/sys/mutex.h | 1 - include/{ => spl}/sys/param.h | 0 include/{ => spl}/sys/proc.h | 7 + include/{ => spl}/sys/processor.h | 0 include/{ => spl}/sys/random.h | 0 include/{ => spl}/sys/rwlock.h | 39 +- .../{linux/mm_compat.h => spl/sys/shrinker.h} | 6 +- include/{ => spl}/sys/sid.h | 0 include/{ => spl}/sys/signal.h | 0 include/{ => spl}/sys/stat.h | 0 include/{sys/idmap.h => spl/sys/strings.h} | 14 +- include/{ => spl}/sys/sunddi.h | 1 - include/{ => spl}/sys/sysmacros.h | 17 +- include/{ => spl}/sys/systeminfo.h | 0 include/{ => spl}/sys/taskq.h | 2 +- include/{ => spl}/sys/thread.h | 4 +- include/{ => spl}/sys/time.h | 0 include/{ => spl}/sys/timer.h | 16 + include/{ => spl}/sys/tsd.h | 0 include/{ => spl}/sys/types.h | 58 +- include/{ => spl}/sys/types32.h | 1 - include/{ => spl}/sys/uio.h | 0 include/{ => spl}/sys/user.h | 0 include/{ => spl}/sys/vfs.h | 0 include/{ => spl}/sys/vmem.h | 0 include/{ => spl}/sys/vmsystm.h | 0 include/{ => spl}/sys/vnode.h | 1 - .../{linux/wait_compat.h => spl/sys/wait.h} | 6 +- include/{ => spl}/sys/zmod.h | 8 + include/{ => spl}/sys/zone.h | 0 include/splat-ctl.h | 109 -- include/strings.h | 28 - include/sys/Makefile.am | 113 -- include/sys/acl_impl.h | 28 - include/sys/atomic.h | 313 ---- include/sys/attr.h | 28 - include/sys/bitmap.h | 28 - include/sys/bootconf.h | 28 - include/sys/bootprops.h | 28 - include/sys/buf.h | 28 - include/sys/compress.h | 28 - include/sys/conf.h | 28 - include/sys/cpupart.h | 28 - include/sys/cpuvar.h | 28 - include/sys/crc32.h | 28 - include/sys/ddi.h | 28 - include/sys/dirent.h | 28 - include/sys/dklabel.h | 28 - include/sys/dnlc.h | 28 - include/sys/dumphdr.h | 28 - include/sys/efi_partition.h | 28 - include/sys/errno.h | 28 - include/sys/extdirent.h | 29 - include/sys/fm/Makefile.am | 14 - include/sys/fm/protocol.h | 28 - include/sys/fm/util.h | 28 - include/sys/fs/Makefile.am | 13 - include/sys/fs/swapnode.h | 28 - include/sys/int_limits.h | 28 - include/sys/int_types.h | 30 - include/sys/kidmap.h | 30 - include/sys/mkdev.h | 28 - include/sys/mntent.h | 28 - include/sys/modctl.h | 28 - include/sys/mount.h | 28 - include/sys/note.h | 28 - include/sys/open.h | 28 - include/sys/pathname.h | 35 - include/sys/policy.h | 47 - include/sys/pool.h | 30 - include/sys/priv_impl.h | 28 - include/sys/pset.h | 38 - include/sys/refstr.h | 28 - include/sys/resource.h | 30 - include/sys/sdt.h | 30 - include/sys/stropts.h | 28 - include/sys/sunldi.h | 43 - include/sys/sysdc.h | 28 - include/sys/systm.h | 32 - include/sys/t_lock.h | 33 - include/sys/u8_textprep.h | 28 - include/sys/unistd.h | 28 - include/sys/va_list.h | 28 - include/sys/varargs.h | 30 - include/sys/vfs_opreg.h | 28 - include/unistd.h | 28 - include/util/Makefile.am | 14 - include/util/qsort.h | 32 - include/util/sscanf.h | 28 - include/vm/Makefile.am | 15 - include/vm/anon.h | 28 - include/vm/pvn.h | 28 - include/vm/seg_kmem.h | 30 - lib/Makefile.am | 6 - lib/list.c | 837 --------- lib/list.h | 279 --- man/Makefile.am | 1 - man/man1/Makefile.am | 4 - man/man1/splat.1 | 94 - man/man5/Makefile.am | 4 - module/.gitignore | 13 - module/Makefile.in | 54 - module/spl/Makefile.in | 30 - module/spl/THIRDPARTYLICENSE.gplv2 | 339 ++++ module/spl/THIRDPARTYLICENSE.gplv2.descrip | 1 + module/spl/spl-generic.c | 9 +- module/spl/spl-kmem-cache.c | 4 +- module/spl/spl-kstat.c | 1 + module/spl/spl-proc.c | 2 +- module/spl/spl-vmem.c | 2 +- module/spl/spl-vnode.c | 76 +- module/spl/spl-xdr.c | 4 +- module/spl/spl-zlib.c | 1 - module/splat/Makefile.in | 28 - module/splat/splat-atomic.c | 233 --- module/splat/splat-condvar.c | 511 ------ module/splat/splat-cred.c | 299 ---- module/splat/splat-ctl.c | 753 -------- module/splat/splat-generic.c | 367 ---- module/splat/splat-internal.h | 150 -- module/splat/splat-kmem.c | 1410 --------------- module/splat/splat-kobj.c | 166 -- module/splat/splat-linux.c | 237 --- module/splat/splat-list.c | 475 ----- module/splat/splat-mutex.c | 447 ----- module/splat/splat-random.c | 130 -- module/splat/splat-rwlock.c | 747 -------- module/splat/splat-taskq.c | 1548 ----------------- module/splat/splat-thread.c | 390 ----- module/splat/splat-time.c | 119 -- module/splat/splat-vnode.c | 355 ---- module/splat/splat-zlib.c | 166 -- rpm/Makefile.am | 1 - rpm/generic/.gitignore | 3 - rpm/generic/Makefile.am | 1 - rpm/generic/spl-dkms.spec.in | 94 - rpm/generic/spl-kmod.spec.in | 172 -- rpm/generic/spl.spec.in | 49 - rpm/redhat/.gitignore | 3 - rpm/redhat/Makefile.am | 1 - rpm/redhat/spl-dkms.spec.in | 1 - rpm/redhat/spl-kmod.spec.in | 110 -- rpm/redhat/spl.spec.in | 1 - scripts/Makefile.am | 4 - scripts/check.sh | 97 -- scripts/dkms.mkconf | 79 - scripts/dkms.postbuild | 24 - scripts/kmodtool | 592 ------- spl.release.in | 1 - 222 files changed, 777 insertions(+), 16870 deletions(-) delete mode 100644 .gitignore delete mode 100644 DISCLAIMER rename COPYING => LICENSE (100%) delete mode 100644 META delete mode 100644 Makefile.am create mode 100644 NOTICE delete mode 100644 README.markdown create mode 100644 README.md delete mode 100755 autogen.sh delete mode 100644 cmd/Makefile.am delete mode 100644 cmd/splat/.gitignore delete mode 100644 cmd/splat/Makefile.am delete mode 100644 cmd/splat/splat.c delete mode 100644 cmd/splat/splat.h delete mode 100644 cmd/splslab/Makefile.am delete mode 100755 cmd/splslab/splslab.py delete mode 100644 config/.gitignore delete mode 100644 config/Rules.am delete mode 100644 config/config.awk delete mode 100644 config/deb.am create mode 100644 config/kernel-fallocate-pax.m4 delete mode 100644 config/kernel-fallocate.m4 create mode 100644 config/kernel-kmem.m4 delete mode 100644 config/kernel-truncate-range.m4 delete mode 100644 config/rpm.am delete mode 100644 config/spl-build.m4 delete mode 100644 config/spl-meta.m4 delete mode 100644 config/tgz.am delete mode 100644 configure.ac delete mode 100755 copy-builtin delete mode 100644 include/Makefile.am delete mode 100644 include/fs/Makefile.am delete mode 100644 include/fs/fs_subr.h delete mode 100644 include/linux/Makefile.am delete mode 100644 include/linux/bitops_compat.h delete mode 100644 include/linux/compiler_compat.h delete mode 100644 include/linux/delay_compat.h delete mode 100644 include/linux/file_compat.h delete mode 100644 include/linux/list_compat.h delete mode 100644 include/linux/math64_compat.h delete mode 100644 include/linux/proc_compat.h delete mode 100644 include/linux/rwsem_compat.h delete mode 100644 include/linux/zlib_compat.h delete mode 100644 include/rpc/Makefile.am delete mode 100644 include/rpc/types.h delete mode 100644 include/sharefs/Makefile.am delete mode 100644 include/sharefs/share.h delete mode 100644 include/spl-ctl.h rename include/{ => spl}/rpc/xdr.h (99%) rename include/{ => spl}/sys/acl.h (100%) create mode 100644 include/spl/sys/atomic.h rename include/{ => spl}/sys/byteorder.h (89%) rename include/{ => spl}/sys/callb.h (100%) rename include/{ => spl}/sys/callo.h (100%) rename include/{ => spl}/sys/cmn_err.h (91%) rename include/{ => spl}/sys/condvar.h (98%) rename include/{ => spl}/sys/console.h (100%) rename include/{ => spl}/sys/cred.h (99%) rename include/{ => spl}/sys/ctype.h (100%) rename include/{ => spl}/sys/debug.h (100%) rename include/{ => spl}/sys/disp.h (100%) rename include/{ => spl}/sys/dkio.h (100%) rename include/{ => spl}/sys/dkioc_free_util.h (100%) rename include/{ => spl}/sys/fcntl.h (100%) rename include/{ => spl}/sys/file.h (50%) rename include/{ => spl}/sys/inttypes.h (100%) rename include/{ => spl}/sys/isa_defs.h (100%) rename include/{ => spl}/sys/kmem.h (100%) rename include/{ => spl}/sys/kmem_cache.h (100%) rename include/{ => spl}/sys/kobj.h (100%) rename include/{ => spl}/sys/kstat.h (99%) rename include/{ => spl}/sys/list.h (95%) rename include/{ => spl}/sys/mode.h (100%) rename include/{ => spl}/sys/mutex.h (99%) rename include/{ => spl}/sys/param.h (100%) rename include/{ => spl}/sys/proc.h (89%) rename include/{ => spl}/sys/processor.h (100%) rename include/{ => spl}/sys/random.h (100%) rename include/{ => spl}/sys/rwlock.h (78%) rename include/{linux/mm_compat.h => spl/sys/shrinker.h} (98%) rename include/{ => spl}/sys/sid.h (100%) rename include/{ => spl}/sys/signal.h (100%) rename include/{ => spl}/sys/stat.h (100%) rename include/{sys/idmap.h => spl/sys/strings.h} (71%) rename include/{ => spl}/sys/sunddi.h (98%) rename include/{ => spl}/sys/sysmacros.h (91%) rename include/{ => spl}/sys/systeminfo.h (100%) rename include/{ => spl}/sys/taskq.h (99%) rename include/{ => spl}/sys/thread.h (97%) rename include/{ => spl}/sys/time.h (100%) rename include/{ => spl}/sys/timer.h (86%) rename include/{ => spl}/sys/tsd.h (100%) rename include/{ => spl}/sys/types.h (57%) rename include/{ => spl}/sys/types32.h (97%) rename include/{ => spl}/sys/uio.h (100%) rename include/{ => spl}/sys/user.h (100%) rename include/{ => spl}/sys/vfs.h (100%) rename include/{ => spl}/sys/vmem.h (100%) rename include/{ => spl}/sys/vmsystm.h (100%) rename include/{ => spl}/sys/vnode.h (99%) rename include/{linux/wait_compat.h => spl/sys/wait.h} (95%) rename include/{ => spl}/sys/zmod.h (91%) rename include/{ => spl}/sys/zone.h (100%) delete mode 100644 include/splat-ctl.h delete mode 100644 include/strings.h delete mode 100644 include/sys/Makefile.am delete mode 100644 include/sys/acl_impl.h delete mode 100644 include/sys/atomic.h delete mode 100644 include/sys/attr.h delete mode 100644 include/sys/bitmap.h delete mode 100644 include/sys/bootconf.h delete mode 100644 include/sys/bootprops.h delete mode 100644 include/sys/buf.h delete mode 100644 include/sys/compress.h delete mode 100644 include/sys/conf.h delete mode 100644 include/sys/cpupart.h delete mode 100644 include/sys/cpuvar.h delete mode 100644 include/sys/crc32.h delete mode 100644 include/sys/ddi.h delete mode 100644 include/sys/dirent.h delete mode 100644 include/sys/dklabel.h delete mode 100644 include/sys/dnlc.h delete mode 100644 include/sys/dumphdr.h delete mode 100644 include/sys/efi_partition.h delete mode 100644 include/sys/errno.h delete mode 100644 include/sys/extdirent.h delete mode 100644 include/sys/fm/Makefile.am delete mode 100644 include/sys/fm/protocol.h delete mode 100644 include/sys/fm/util.h delete mode 100644 include/sys/fs/Makefile.am delete mode 100644 include/sys/fs/swapnode.h delete mode 100644 include/sys/int_limits.h delete mode 100644 include/sys/int_types.h delete mode 100644 include/sys/kidmap.h delete mode 100644 include/sys/mkdev.h delete mode 100644 include/sys/mntent.h delete mode 100644 include/sys/modctl.h delete mode 100644 include/sys/mount.h delete mode 100644 include/sys/note.h delete mode 100644 include/sys/open.h delete mode 100644 include/sys/pathname.h delete mode 100644 include/sys/policy.h delete mode 100644 include/sys/pool.h delete mode 100644 include/sys/priv_impl.h delete mode 100644 include/sys/pset.h delete mode 100644 include/sys/refstr.h delete mode 100644 include/sys/resource.h delete mode 100644 include/sys/sdt.h delete mode 100644 include/sys/stropts.h delete mode 100644 include/sys/sunldi.h delete mode 100644 include/sys/sysdc.h delete mode 100644 include/sys/systm.h delete mode 100644 include/sys/t_lock.h delete mode 100644 include/sys/u8_textprep.h delete mode 100644 include/sys/unistd.h delete mode 100644 include/sys/va_list.h delete mode 100644 include/sys/varargs.h delete mode 100644 include/sys/vfs_opreg.h delete mode 100644 include/unistd.h delete mode 100644 include/util/Makefile.am delete mode 100644 include/util/qsort.h delete mode 100644 include/util/sscanf.h delete mode 100644 include/vm/Makefile.am delete mode 100644 include/vm/anon.h delete mode 100644 include/vm/pvn.h delete mode 100644 include/vm/seg_kmem.h delete mode 100644 lib/Makefile.am delete mode 100644 lib/list.c delete mode 100644 lib/list.h delete mode 100644 man/Makefile.am delete mode 100644 man/man1/Makefile.am delete mode 100644 man/man1/splat.1 delete mode 100644 man/man5/Makefile.am delete mode 100644 module/.gitignore delete mode 100644 module/Makefile.in delete mode 100644 module/spl/Makefile.in create mode 100644 module/spl/THIRDPARTYLICENSE.gplv2 create mode 100644 module/spl/THIRDPARTYLICENSE.gplv2.descrip delete mode 100644 module/splat/Makefile.in delete mode 100644 module/splat/splat-atomic.c delete mode 100644 module/splat/splat-condvar.c delete mode 100644 module/splat/splat-cred.c delete mode 100644 module/splat/splat-ctl.c delete mode 100644 module/splat/splat-generic.c delete mode 100644 module/splat/splat-internal.h delete mode 100644 module/splat/splat-kmem.c delete mode 100644 module/splat/splat-kobj.c delete mode 100644 module/splat/splat-linux.c delete mode 100644 module/splat/splat-list.c delete mode 100644 module/splat/splat-mutex.c delete mode 100644 module/splat/splat-random.c delete mode 100644 module/splat/splat-rwlock.c delete mode 100644 module/splat/splat-taskq.c delete mode 100644 module/splat/splat-thread.c delete mode 100644 module/splat/splat-time.c delete mode 100644 module/splat/splat-vnode.c delete mode 100644 module/splat/splat-zlib.c delete mode 100644 rpm/Makefile.am delete mode 100644 rpm/generic/.gitignore delete mode 100644 rpm/generic/Makefile.am delete mode 100644 rpm/generic/spl-dkms.spec.in delete mode 100644 rpm/generic/spl-kmod.spec.in delete mode 100644 rpm/generic/spl.spec.in delete mode 100644 rpm/redhat/.gitignore delete mode 100644 rpm/redhat/Makefile.am delete mode 120000 rpm/redhat/spl-dkms.spec.in delete mode 100644 rpm/redhat/spl-kmod.spec.in delete mode 120000 rpm/redhat/spl.spec.in delete mode 100644 scripts/Makefile.am delete mode 100755 scripts/check.sh delete mode 100755 scripts/dkms.mkconf delete mode 100755 scripts/dkms.postbuild delete mode 100644 scripts/kmodtool delete mode 100644 spl.release.in diff --git a/.gitignore b/.gitignore deleted file mode 100644 index de9d87808..000000000 --- a/.gitignore +++ /dev/null @@ -1,52 +0,0 @@ -# -# N.B. -# This is the toplevel .gitignore file. -# This is not the place for entries that are specific to -# a subdirectory. Instead add those files to the -# .gitignore file in that subdirectory. -# -# N.B. -# Please use 'git ls-files -i --exclude-standard' -# command after changing this file, to see if there are -# any tracked files which get ignored after the change. - -# -# Normal rules -# -*.[oad] -*.lo -*.la -*~ -*.swp -.deps -.libs -.DS_Store -Makefile -Makefile.in - -# -# Top level generated files specific to this top level dir -# -/configure -/config.log -/config.status -/libtool -/spl_config.h -/spl_config.h.in -/spl.release -/stamp-h1 -/aclocal.m4 -/autom4te.cache - -# -# Top level generic files -# -!.gitignore -tags -TAGS -cscope.* -*.rpm -*.deb -*.tar.gz -*.patch -*.orig diff --git a/DISCLAIMER b/DISCLAIMER deleted file mode 100644 index 1bb04be7e..000000000 --- a/DISCLAIMER +++ /dev/null @@ -1,24 +0,0 @@ -This work was produced at the Lawrence Livermore National Laboratory -(LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between -the U.S. Department of Energy (DOE) and Lawrence Livermore National -Security, LLC (LLNS) for the operation of LLNL. - -This work was prepared as an account of work sponsored by an agency of -the United States Government. Neither the United States Government nor -Lawrence Livermore National Security, LLC nor any of their employees, -makes any warranty, express or implied, or assumes any liability or -responsibility for the accuracy, completeness, or usefulness of any -information, apparatus, product, or process disclosed, or represents -that its use would not infringe privately-owned rights. - -Reference herein to any specific commercial products, process, or -services by trade name, trademark, manufacturer or otherwise does -not necessarily constitute or imply its endorsement, recommendation, -or favoring by the United States Government or Lawrence Livermore -National Security, LLC. The views and opinions of authors expressed -herein do not necessarily state or reflect those of the Untied States -Government or Lawrence Livermore National Security, LLC, and shall -not be used for advertising or product endorsement purposes. - -The precise terms and conditions for copying, distribution, and -modification are specified in the file "COPYING". diff --git a/COPYING b/LICENSE similarity index 100% rename from COPYING rename to LICENSE diff --git a/META b/META deleted file mode 100644 index 740b294a5..000000000 --- a/META +++ /dev/null @@ -1,8 +0,0 @@ -Meta: 1 -Name: spl -Branch: 1.0 -Version: 0.7.0 -Release: 1 -Release-Tags: relext -License: GPL -Author: OpenZFS on Linux diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 05107cb19..000000000 --- a/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ - -ACLOCAL_AMFLAGS = -I config - -include config/rpm.am -include config/deb.am -include config/tgz.am - -SUBDIRS = include rpm -if CONFIG_USER -SUBDIRS += lib cmd man scripts -endif -if CONFIG_KERNEL -SUBDIRS += module - -extradir = @prefix@/src/spl-$(VERSION) -extra_HEADERS = spl.release.in spl_config.h.in - -kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION) -nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS) -endif - -AUTOMAKE_OPTIONS = foreign -EXTRA_DIST = autogen.sh META DISCLAIMER copy-builtin -EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am - -distclean-local:: - -$(RM) -R autom4te*.cache - -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ - -o -name .pc -o -name .hg -o -name .git \) -prune -o \ - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ - -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ - -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ - -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \ - -o -name '*.order' -o -name '*.markers' \) \ - -type f -print | xargs $(RM) - -dist-hook: - sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ - $(distdir)/META - -ctags: - $(RM) tags - find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags - -etags: - $(RM) TAGS - find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a - -tags: ctags etags - -pkg: @DEFAULT_PACKAGE@ -pkg-dkms: @DEFAULT_PACKAGE@-dkms -pkg-kmod: @DEFAULT_PACKAGE@-kmod -pkg-utils: @DEFAULT_PACKAGE@-utils diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000..321892039 --- /dev/null +++ b/NOTICE @@ -0,0 +1,16 @@ +This work was produced under the auspices of the U.S. Department of Energy by +Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344. + +This work was prepared as an account of work sponsored by an agency of the +United States Government. Neither the United States Government nor Lawrence +Livermore National Security, LLC, nor any of their employees makes any warranty, +expressed or implied, or assumes any legal liability or responsibility for the +accuracy, completeness, or usefulness of any information, apparatus, product, or +process disclosed, or represents that its use would not infringe privately owned +rights. Reference herein to any specific commercial product, process, or service +by trade name, trademark, manufacturer, or otherwise does not necessarily +constitute or imply its endorsement, recommendation, or favoring by the United +States Government or Lawrence Livermore National Security, LLC. The views and +opinions of authors expressed herein do not necessarily state or reflect those +of the United States Government or Lawrence Livermore National Security, LLC, +and shall not be used for advertising or product endorsement purposes. diff --git a/README.markdown b/README.markdown deleted file mode 100644 index bdf63ac2e..000000000 --- a/README.markdown +++ /dev/null @@ -1,36 +0,0 @@ -The Solaris Porting Layer (SPL) is a Linux kernel module which provides -many of the Solaris kernel APIs. This shim layer makes it possible to -run Solaris kernel code in the Linux kernel with relatively minimal -modification. This can be particularly useful when you want to track -upstream Solaris development closely and do not want the overhead of -maintaining a large patch which converts Solaris primitives to Linux -primitives. - -To build packages for your distribution: - - $ sh autogen.sh - $ ./configure - $ make pkg - -If you are building directly from the git tree and not an officially -released tarball you will need to generate the configure script. -This can be done by executing the autogen.sh script after installing -the GNU autotools for your distribution. - -To copy the kernel code inside your kernel source tree for builtin -compilation: - - $ sh autogen.sh - $ ./configure --enable-linux-builtin --with-linux=/usr/src/linux-... - $ ./copy-builtin /usr/src/linux-... - -The SPL comes with an automated test suite called SPLAT. The test suite -is implemented in two parts. There is a kernel module which contains -the tests and a user space utility which controls which tests are run. -To run the full test suite: - - $ sudo insmod ./module/splat/splat.ko - $ sudo ./cmd/splat --all - -Full documentation for building, configuring, testing, and using the -SPL can be found at: diff --git a/README.md b/README.md new file mode 100644 index 000000000..64283ec54 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +![img](http://zfsonlinux.org/images/zfs-linux.png) + +The Solaris Porting Layer, SPL, is a Linux kernel module which provides a +compatibility layer used by the [ZFS on Linux](http://zfsonlinux.org) project. + +# Installation + +The latest version of the SPL is maintained as part of the ZFS on Linux +Github repository: + + * Latest Version: https://github.com/zfsonlinux/zfs + +Cloning this repository is only needed when building version 0.7.x or earlier. + + * Version 0.7.x: https://github.com/zfsonlinux/spl/tree/spl-0.7-release + * Version 0.6.5.x: https://github.com/zfsonlinux/spl/tree/spl-0.6.5-release + +# Release + +The SPL is released under a GPLv2 license. For more details see the NOTICE +and LICENSE files; `UCRL-CODE-235197` diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 427394af4..000000000 --- a/autogen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -autoreconf -fiv -rm -Rf autom4te.cache diff --git a/cmd/Makefile.am b/cmd/Makefile.am deleted file mode 100644 index 63a3c76f9..000000000 --- a/cmd/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = splat splslab diff --git a/cmd/splat/.gitignore b/cmd/splat/.gitignore deleted file mode 100644 index 97325b30d..000000000 --- a/cmd/splat/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/splat diff --git a/cmd/splat/Makefile.am b/cmd/splat/Makefile.am deleted file mode 100644 index 01afdcf25..000000000 --- a/cmd/splat/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -include $(top_srcdir)/config/Rules.am - -DEFAULT_INCLUDES += \ - -I$(top_srcdir)/lib - -sbin_PROGRAMS = splat - -splat_SOURCES = splat.c -splat_LDFLAGS = $(top_builddir)/lib/libcommon.la - -EXTRA_DIST = splat.h diff --git a/cmd/splat/splat.c b/cmd/splat/splat.c deleted file mode 100644 index d11a64ce8..000000000 --- a/cmd/splat/splat.c +++ /dev/null @@ -1,836 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) User Space Interface. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "splat.h" - -#undef ioctl - -static const char shortOpts[] = "hvlat:xc"; -static const struct option longOpts[] = { - { "help", no_argument, 0, 'h' }, - { "verbose", no_argument, 0, 'v' }, - { "list", no_argument, 0, 'l' }, - { "all", no_argument, 0, 'a' }, - { "test", required_argument, 0, 't' }, - { "exit", no_argument, 0, 'x' }, - { "nocolor", no_argument, 0, 'c' }, - { 0, 0, 0, 0 } -}; - -#define VERSION_SIZE 64 - -static List subsystems; /* Subsystem/tests */ -static int splatctl_fd; /* Control file descriptor */ -static char splat_version[VERSION_SIZE]; /* Kernel version string */ -static char *splat_buffer = NULL; /* Scratch space area */ -static int splat_buffer_size = 0; /* Scratch space size */ - - -static void test_list(List, int); -static int dev_clear(void); -static void subsystem_fini(subsystem_t *); -static void test_fini(test_t *); - - -static int usage(void) { - fprintf(stderr, "usage: splat [hvla] [-t >]\n"); - fprintf(stderr, - " --help -h This help\n" - " --verbose -v Increase verbosity\n" - " --list -l List all tests in all subsystems\n" - " --all -a Run all tests in all subsystems\n" - " --test -t Run 'test' in subsystem 'sub'\n" - " --exit -x Exit on first test error\n" - " --nocolor -c Do not colorize output\n"); - fprintf(stderr, "\n" - "Examples:\n" - " splat -t kmem:all # Runs all kmem tests\n" - " splat -t taskq:0x201 # Run taskq test 0x201\n"); - - return 0; -} - -static subsystem_t *subsystem_init(splat_user_t *desc) -{ - subsystem_t *sub; - - sub = (subsystem_t *)malloc(sizeof(*sub)); - if (sub == NULL) - return NULL; - - memcpy(&sub->sub_desc, desc, sizeof(*desc)); - - sub->sub_tests = list_create((ListDelF)test_fini); - if (sub->sub_tests == NULL) { - free(sub); - return NULL; - } - - return sub; -} - -static void subsystem_fini(subsystem_t *sub) -{ - assert(sub != NULL); - free(sub); -} - -static int subsystem_setup(void) -{ - splat_cfg_t *cfg; - int i, rc, size, cfg_size; - subsystem_t *sub; - splat_user_t *desc; - - /* Aquire the number of registered subsystems */ - cfg_size = sizeof(*cfg); - cfg = (splat_cfg_t *)malloc(cfg_size); - if (cfg == NULL) - return -ENOMEM; - - memset(cfg, 0, cfg_size); - cfg->cfg_magic = SPLAT_CFG_MAGIC; - cfg->cfg_cmd = SPLAT_CFG_SUBSYSTEM_COUNT; - - rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); - if (rc) { - fprintf(stderr, "Ioctl() error 0x%lx / %d: %d\n", - (unsigned long)SPLAT_CFG, cfg->cfg_cmd, errno); - free(cfg); - return rc; - } - - size = cfg->cfg_rc1; - free(cfg); - - /* Based on the newly acquired number of subsystems allocate - * memory to get the descriptive information for them all. */ - cfg_size = sizeof(*cfg) + size * sizeof(splat_user_t); - cfg = (splat_cfg_t *)malloc(cfg_size); - if (cfg == NULL) - return -ENOMEM; - - memset(cfg, 0, cfg_size); - cfg->cfg_magic = SPLAT_CFG_MAGIC; - cfg->cfg_cmd = SPLAT_CFG_SUBSYSTEM_LIST; - cfg->cfg_data.splat_subsystems.size = size; - - rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); - if (rc) { - fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); - free(cfg); - return rc; - } - - /* Add the new subsystems in to the global list */ - size = cfg->cfg_rc1; - for (i = 0; i < size; i++) { - desc = &(cfg->cfg_data.splat_subsystems.descs[i]); - - sub = subsystem_init(desc); - if (sub == NULL) { - fprintf(stderr, "Error initializing subsystem: %s\n", - desc->name); - free(cfg); - return -ENOMEM; - } - - list_append(subsystems, sub); - } - - free(cfg); - return 0; -} - -static void subsystem_list(List l, int indent) -{ - ListIterator i; - subsystem_t *sub; - - fprintf(stdout, - "------------------------------ " - "Available SPLAT Tests " - "------------------------------\n"); - - i = list_iterator_create(l); - - while ((sub = list_next(i))) { - fprintf(stdout, "%*s0x%0*x %-*s ---- %s ----\n", - indent, "", - 4, sub->sub_desc.id, - SPLAT_NAME_SIZE + 7, sub->sub_desc.name, - sub->sub_desc.desc); - test_list(sub->sub_tests, indent + 7); - } - - list_iterator_destroy(i); -} - -static test_t *test_init(subsystem_t *sub, splat_user_t *desc) -{ - test_t *test; - - test = (test_t *)malloc(sizeof(*test)); - if (test == NULL) - return NULL; - - test->test_sub = sub; - memcpy(&test->test_desc, desc, sizeof(*desc)); - - return test; -} - -static void test_fini(test_t *test) -{ - assert(test != NULL); - free(test); -} - -static int test_setup(subsystem_t *sub) -{ - splat_cfg_t *cfg; - int i, rc, size; - test_t *test; - splat_user_t *desc; - - /* Aquire the number of registered tests for the give subsystem */ - cfg = (splat_cfg_t *)malloc(sizeof(*cfg)); - if (cfg == NULL) - return -ENOMEM; - - memset(cfg, 0, sizeof(*cfg)); - cfg->cfg_magic = SPLAT_CFG_MAGIC; - cfg->cfg_cmd = SPLAT_CFG_TEST_COUNT; - cfg->cfg_arg1 = sub->sub_desc.id; /* Subsystem of interest */ - - rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); - if (rc) { - fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); - free(cfg); - return rc; - } - - size = cfg->cfg_rc1; - free(cfg); - - /* Based on the newly aquired number of tests allocate enough - * memory to get the descriptive information for them all. */ - cfg = (splat_cfg_t *)malloc(sizeof(*cfg) + size*sizeof(splat_user_t)); - if (cfg == NULL) - return -ENOMEM; - - memset(cfg, 0, sizeof(*cfg) + size * sizeof(splat_user_t)); - cfg->cfg_magic = SPLAT_CFG_MAGIC; - cfg->cfg_cmd = SPLAT_CFG_TEST_LIST; - cfg->cfg_arg1 = sub->sub_desc.id; /* Subsystem of interest */ - cfg->cfg_data.splat_tests.size = size; - - rc = ioctl(splatctl_fd, SPLAT_CFG, cfg); - if (rc) { - fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) SPLAT_CFG, cfg->cfg_cmd, errno); - free(cfg); - return rc; - } - - /* Add the new tests in to the relevant subsystems */ - size = cfg->cfg_rc1; - for (i = 0; i < size; i++) { - desc = &(cfg->cfg_data.splat_tests.descs[i]); - - test = test_init(sub, desc); - if (test == NULL) { - fprintf(stderr, "Error initializing test: %s\n", - desc->name); - free(cfg); - return -ENOMEM; - } - - list_append(sub->sub_tests, test); - } - - free(cfg); - return 0; -} - -static test_t *test_copy(test_t *test) -{ - return test_init(test->test_sub, &test->test_desc); -} - -static void test_list(List l, int indent) -{ - ListIterator i; - test_t *test; - - i = list_iterator_create(l); - - while ((test = list_next(i))) - fprintf(stdout, "%*s0x%0*x %-*s %s\n", - indent, "", 04, test->test_desc.id, - SPLAT_NAME_SIZE, test->test_desc.name, - test->test_desc.desc); - - list_iterator_destroy(i); -} - -static test_t *test_find(char *sub_str, char *test_str) -{ - ListIterator si, ti; - subsystem_t *sub; - test_t *test; - __u32 sub_num, test_num; - - /* - * No error checking here because it may not be a number, it's - * perfectly OK for it to be a string. Since we're just using - * it for comparison purposes this is all very safe. - */ - sub_num = strtoul(sub_str, NULL, 0); - test_num = strtoul(test_str, NULL, 0); - - si = list_iterator_create(subsystems); - - while ((sub = list_next(si))) { - - if (strncmp(sub->sub_desc.name, sub_str, SPLAT_NAME_SIZE) && - sub->sub_desc.id != sub_num) - continue; - - ti = list_iterator_create(sub->sub_tests); - - while ((test = list_next(ti))) { - - if (!strncmp(test->test_desc.name, test_str, - SPLAT_NAME_SIZE) || test->test_desc.id==test_num) { - list_iterator_destroy(ti); - list_iterator_destroy(si); - return test; - } - } - - list_iterator_destroy(ti); - } - - list_iterator_destroy(si); - - return NULL; -} - -static int test_add(cmd_args_t *args, test_t *test) -{ - test_t *tmp; - - tmp = test_copy(test); - if (tmp == NULL) - return -ENOMEM; - - list_append(args->args_tests, tmp); - return 0; -} - -static int test_add_all(cmd_args_t *args) -{ - ListIterator si, ti; - subsystem_t *sub; - test_t *test; - int rc; - - si = list_iterator_create(subsystems); - - while ((sub = list_next(si))) { - ti = list_iterator_create(sub->sub_tests); - - while ((test = list_next(ti))) { - if ((rc = test_add(args, test))) { - list_iterator_destroy(ti); - list_iterator_destroy(si); - return rc; - } - } - - list_iterator_destroy(ti); - } - - list_iterator_destroy(si); - - return 0; -} - -static int test_run(cmd_args_t *args, test_t *test) -{ - subsystem_t *sub = test->test_sub; - splat_cmd_t *cmd; - int rc, cmd_size; - - dev_clear(); - - cmd_size = sizeof(*cmd); - cmd = (splat_cmd_t *)malloc(cmd_size); - if (cmd == NULL) - return -ENOMEM; - - memset(cmd, 0, cmd_size); - cmd->cmd_magic = SPLAT_CMD_MAGIC; - cmd->cmd_subsystem = sub->sub_desc.id; - cmd->cmd_test = test->test_desc.id; - cmd->cmd_data_size = 0; /* Unused feature */ - - fprintf(stdout, "%*s:%-*s ", - SPLAT_NAME_SIZE, sub->sub_desc.name, - SPLAT_NAME_SIZE, test->test_desc.name); - fflush(stdout); - rc = ioctl(splatctl_fd, SPLAT_CMD, cmd); - if (args->args_do_color) { - fprintf(stdout, "%s %s\n", rc ? - COLOR_RED "Fail" COLOR_RESET : - COLOR_GREEN "Pass" COLOR_RESET, - rc ? strerror(errno) : ""); - } else { - fprintf(stdout, "%s %s\n", rc ? - "Fail" : "Pass", - rc ? strerror(errno) : ""); - } - fflush(stdout); - free(cmd); - - if ((args->args_verbose == 1 && rc) || - (args->args_verbose >= 2)) { - if ((rc = read(splatctl_fd, splat_buffer, - splat_buffer_size - 1)) < 0) { - fprintf(stdout, "Error reading results: %d\n", rc); - } else { - fprintf(stdout, "\n%s\n", splat_buffer); - fflush(stdout); - } - } - - return rc; -} - -static int tests_run(cmd_args_t *args) -{ - ListIterator i; - test_t *test; - int rc; - - fprintf(stdout, - "------------------------------ " - "Running SPLAT Tests " - "------------------------------\n"); - - i = list_iterator_create(args->args_tests); - - while ((test = list_next(i))) { - rc = test_run(args, test); - if (rc && args->args_exit_on_error) { - list_iterator_destroy(i); - return rc; - } - } - - list_iterator_destroy(i); - return 0; -} - -static int args_parse_test(cmd_args_t *args, char *str) -{ - ListIterator si, ti; - subsystem_t *s; - test_t *t; - char *sub_str, *test_str; - int sub_num, test_num; - int sub_all = 0, test_all = 0; - int rc, flag = 0; - - test_str = strchr(str, ':'); - if (test_str == NULL) { - fprintf(stderr, "Test must be of the " - "form \n"); - return -EINVAL; - } - - sub_str = str; - test_str[0] = '\0'; - test_str = test_str + 1; - - sub_num = strtol(sub_str, NULL, 0); - test_num = strtol(test_str, NULL, 0); - - if (!strncasecmp(sub_str, "all", strlen(sub_str)) || (sub_num == -1)) - sub_all = 1; - - if (!strncasecmp(test_str,"all",strlen(test_str)) || (test_num == -1)) - test_all = 1; - - si = list_iterator_create(subsystems); - - if (sub_all) { - if (test_all) { - /* Add all tests from all subsystems */ - while ((s = list_next(si))) { - ti = list_iterator_create(s->sub_tests); - while ((t = list_next(ti))) { - if ((rc = test_add(args, t))) { - list_iterator_destroy(ti); - goto error_run; - } - } - list_iterator_destroy(ti); - } - } else { - /* Add a specific test from all subsystems */ - while ((s = list_next(si))) { - if ((t=test_find(s->sub_desc.name,test_str))) { - if ((rc = test_add(args, t))) - goto error_run; - - flag = 1; - } - } - - if (!flag) - fprintf(stderr, "No tests '%s:%s' could be " - "found\n", sub_str, test_str); - } - } else { - if (test_all) { - /* Add all tests from a specific subsystem */ - while ((s = list_next(si))) { - if (strncasecmp(sub_str, s->sub_desc.name, - strlen(sub_str))) - continue; - - ti = list_iterator_create(s->sub_tests); - while ((t = list_next(ti))) { - if ((rc = test_add(args, t))) { - list_iterator_destroy(ti); - goto error_run; - } - } - list_iterator_destroy(ti); - } - } else { - /* Add a specific test from a specific subsystem */ - if ((t = test_find(sub_str, test_str))) { - if ((rc = test_add(args, t))) - goto error_run; - } else { - fprintf(stderr, "Test '%s:%s' could not be " - "found\n", sub_str, test_str); - return -EINVAL; - } - } - } - - list_iterator_destroy(si); - - return 0; - -error_run: - list_iterator_destroy(si); - - fprintf(stderr, "Test '%s:%s' not added to run list: %d\n", - sub_str, test_str, rc); - - return rc; -} - -static void args_fini(cmd_args_t *args) -{ - assert(args != NULL); - - if (args->args_tests != NULL) - list_destroy(args->args_tests); - - free(args); -} - -static cmd_args_t * -args_init(int argc, char **argv) -{ - cmd_args_t *args; - int c, rc; - - if (argc == 1) { - usage(); - return (cmd_args_t *) NULL; - } - - /* Configure and populate the args structures */ - args = malloc(sizeof(*args)); - if (args == NULL) - return NULL; - - memset(args, 0, sizeof(*args)); - args->args_verbose = 0; - args->args_do_list = 0; - args->args_do_all = 0; - args->args_do_color = 1; - args->args_exit_on_error = 0; - args->args_tests = list_create((ListDelF)test_fini); - if (args->args_tests == NULL) { - args_fini(args); - return NULL; - } - - while ((c = getopt_long(argc, argv, shortOpts, longOpts, NULL)) != -1){ - switch (c) { - case 'v': args->args_verbose++; break; - case 'l': args->args_do_list = 1; break; - case 'a': args->args_do_all = 1; break; - case 'c': args->args_do_color = 0; break; - case 'x': args->args_exit_on_error = 1; break; - case 't': - if (args->args_do_all) { - fprintf(stderr, "Option -t is " - "useless when used with -a\n"); - args_fini(args); - return NULL; - } - - rc = args_parse_test(args, argv[optind - 1]); - if (rc) { - args_fini(args); - return NULL; - } - break; - case 'h': - case '?': - usage(); - args_fini(args); - return NULL; - default: - fprintf(stderr, "Unknown option '%s'\n", - argv[optind - 1]); - break; - } - } - - return args; -} - -static int -dev_clear(void) -{ - splat_cfg_t cfg; - int rc; - - memset(&cfg, 0, sizeof(cfg)); - cfg.cfg_magic = SPLAT_CFG_MAGIC; - cfg.cfg_cmd = SPLAT_CFG_BUFFER_CLEAR; - cfg.cfg_arg1 = 0; - - rc = ioctl(splatctl_fd, SPLAT_CFG, &cfg); - if (rc) - fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) SPLAT_CFG, cfg.cfg_cmd, errno); - - lseek(splatctl_fd, 0, SEEK_SET); - - return rc; -} - -static int -dev_size(int size) -{ - splat_cfg_t cfg; - int rc; - - memset(&cfg, 0, sizeof(cfg)); - cfg.cfg_magic = SPLAT_CFG_MAGIC; - cfg.cfg_cmd = SPLAT_CFG_BUFFER_SIZE; - cfg.cfg_arg1 = size; - - rc = ioctl(splatctl_fd, SPLAT_CFG, &cfg); - if (rc) { - fprintf(stderr, "Ioctl() error %lu / %d: %d\n", - (unsigned long) SPLAT_CFG, cfg.cfg_cmd, errno); - return rc; - } - - return cfg.cfg_rc1; -} - -static void -dev_fini(void) -{ - if (splat_buffer) - free(splat_buffer); - - if (splatctl_fd != -1) { - if (close(splatctl_fd) == -1) { - fprintf(stderr, "Unable to close %s: %d\n", - SPLAT_DEV, errno); - } - } -} - -static int -dev_init(void) -{ - ListIterator i; - subsystem_t *sub; - int rc; - - splatctl_fd = open(SPLAT_DEV, O_RDONLY); - if (splatctl_fd == -1) { - fprintf(stderr, "Unable to open %s: %d\n" - "Is the splat module loaded?\n", SPLAT_DEV, errno); - rc = errno; - goto error; - } - - /* Determine kernel module version string */ - memset(splat_version, 0, VERSION_SIZE); - if ((rc = read(splatctl_fd, splat_version, VERSION_SIZE - 1)) == -1) - goto error; - - if ((rc = dev_clear())) - goto error; - - if ((rc = dev_size(0)) < 0) - goto error; - - splat_buffer_size = rc; - splat_buffer = (char *)malloc(splat_buffer_size); - if (splat_buffer == NULL) { - rc = -ENOMEM; - goto error; - } - - memset(splat_buffer, 0, splat_buffer_size); - - /* Determine available subsystems */ - if ((rc = subsystem_setup()) != 0) - goto error; - - /* Determine available tests for all subsystems */ - i = list_iterator_create(subsystems); - - while ((sub = list_next(i))) { - if ((rc = test_setup(sub)) != 0) { - list_iterator_destroy(i); - goto error; - } - } - - list_iterator_destroy(i); - return 0; - -error: - if (splatctl_fd != -1) { - if (close(splatctl_fd) == -1) { - fprintf(stderr, "Unable to close %s: %d\n", - SPLAT_DEV, errno); - } - } - - return rc; -} - -int -init(void) -{ - int rc = 0; - - /* Allocate the subsystem list */ - subsystems = list_create((ListDelF)subsystem_fini); - if (subsystems == NULL) - rc = ENOMEM; - - return rc; -} - -void -fini(void) -{ - list_destroy(subsystems); -} - - -int -main(int argc, char **argv) -{ - cmd_args_t *args = NULL; - int rc = 0; - - /* General init */ - if ((rc = init())) - return rc; - - /* Device specific init */ - if ((rc = dev_init())) - goto out; - - /* Argument init and parsing */ - if ((args = args_init(argc, argv)) == NULL) { - rc = -1; - goto out; - } - - /* Generic kernel version string */ - if (args->args_verbose) - fprintf(stdout, "%s", splat_version); - - /* Print the available test list and exit */ - if (args->args_do_list) { - subsystem_list(subsystems, 0); - goto out; - } - - /* Add all available test to the list of tests to run */ - if (args->args_do_all) { - if ((rc = test_add_all(args))) - goto out; - } - - /* Run all the requested tests */ - if ((rc = tests_run(args))) - goto out; - -out: - if (args != NULL) - args_fini(args); - - dev_fini(); - fini(); - return rc; -} diff --git a/cmd/splat/splat.h b/cmd/splat/splat.h deleted file mode 100644 index 8fbc97cb6..000000000 --- a/cmd/splat/splat.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPLAT_H -#define _SPLAT_H - -#include "list.h" -#include "../include/splat-ctl.h" - -#define DEV_NAME "/dev/splatctl" -#define COLOR_BLACK "\033[0;30m" -#define COLOR_DK_GRAY "\033[1;30m" -#define COLOR_BLUE "\033[0;34m" -#define COLOR_LT_BLUE "\033[1;34m" -#define COLOR_GREEN "\033[0;32m" -#define COLOR_LT_GREEN "\033[1;32m" -#define COLOR_CYAN "\033[0;36m" -#define COLOR_LT_CYAN "\033[1;36m" -#define COLOR_RED "\033[0;31m" -#define COLOR_LT_RED "\033[1;31m" -#define COLOR_PURPLE "\033[0;35m" -#define COLOR_LT_PURPLE "\033[1;35m" -#define COLOR_BROWN "\033[0;33m" -#define COLOR_YELLOW "\033[1;33m" -#define COLOR_LT_GRAY "\033[0;37m" -#define COLOR_WHITE "\033[1;37m" -#define COLOR_RESET "\033[0m" - -typedef struct subsystem { - splat_user_t sub_desc; /* Subsystem description */ - List sub_tests; /* Assocated subsystem tests list */ -} subsystem_t; - -typedef struct test { - splat_user_t test_desc; /* Test description */ - subsystem_t *test_sub; /* Parent subsystem */ -} test_t; - -typedef struct cmd_args { - int args_verbose; /* Verbose flag */ - int args_do_list; /* Display all tests flag */ - int args_do_all; /* Run all tests flag */ - int args_do_color; /* Colorize output */ - int args_exit_on_error; /* Exit on first error flag */ - List args_tests; /* Requested subsystems/tests */ -} cmd_args_t; - -#endif /* _SPLAT_H */ - diff --git a/cmd/splslab/Makefile.am b/cmd/splslab/Makefile.am deleted file mode 100644 index b18d52d7e..000000000 --- a/cmd/splslab/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -bin_SCRIPTS = splslab.py -EXTRA_DIST = $(bin_SCRIPTS) diff --git a/cmd/splslab/splslab.py b/cmd/splslab/splslab.py deleted file mode 100755 index 160fb2776..000000000 --- a/cmd/splslab/splslab.py +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/python - -import sys -import time -import getopt -import re -import signal -from collections import defaultdict - -class Stat: - # flag definitions based on the kmem.h - NOTOUCH = 1 - NODEBUG = 2 - KMEM = 32 - VMEM = 64 - SLAB = 128 - OFFSLAB = 256 - NOEMERGENCY = 512 - DEADLOCKED = 16384 - GROWING = 32768 - REAPING = 65536 - DESTROY = 131072 - - fdefs = { - NOTOUCH : "NTCH", - NODEBUG : "NDBG", - KMEM : "KMEM", - VMEM : "VMEM", - SLAB : "SLAB", - OFFSLAB : "OFSL", - NOEMERGENCY : "NEMG", - DEADLOCKED : "DDLK", - GROWING : "GROW", - REAPING : "REAP", - DESTROY : "DSTR" - } - - def __init__(self, name, flags, size, alloc, slabsize, objsize): - self._name = name - self._flags = self.f2str(flags) - self._size = size - self._alloc = alloc - self._slabsize = slabsize - self._objsize = objsize - - def f2str(self, flags): - fstring = '' - for k in Stat.fdefs.keys(): - if flags & k: - fstring = fstring + Stat.fdefs[k] + '|' - - fstring = fstring[:-1] - return fstring - -class CumulativeStat: - def __init__(self, skey="a"): - self._size = 0 - self._alloc = 0 - self._pct = 0 - self._skey = skey - self._regexp = \ - re.compile('(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+'); - self._stats = defaultdict(list) - - # Add another stat to the dictionary and re-calculate the totals - def add(self, s): - key = 0 - if self._skey == "a": - key = s._alloc - else: - key = s._size - self._stats[key].append(s) - self._size = self._size + s._size - self._alloc = self._alloc + s._alloc - if self._size: - self._pct = self._alloc * 100 / self._size - else: - self._pct = 0 - - # Parse the slab info in the procfs - # Calculate cumulative stats - def slab_update(self): - k = [line.strip() for line in open('/proc/spl/kmem/slab')] - - if not k: - sys.stderr.write("No SPL slab stats found\n") - sys.exit(1) - - del k[0:2] - - for s in k: - if not s: - continue - m = self._regexp.match(s) - if m: - self.add(Stat(m.group(1), int(m.group(2),16), int(m.group(3)), - int(m.group(4)), int(m.group(5)), int(m.group(6)))) - else: - sys.stderr.write("Error: unexpected input format\n" % s) - exit(-1) - - def show_header(self): - sys.stdout.write("\n%25s %20s %15s %15s %15s %15s\n\n" % \ - ("cache name", "flags", "size", "alloc", "slabsize", "objsize")) - - # Show up to the number of 'rows' of output sorted in descending order - # by the key specified earlier; if rows == 0, all rows are shown - def show(self, rows): - self.show_header() - i = 1 - done = False - for k in reversed(sorted(self._stats.keys())): - for s in self._stats[k]: - sys.stdout.write("%25s %20s %15d %15d %15d %15d\n" % \ - (s._name, s._flags, s._size, s._alloc, \ - s._slabsize, s._objsize)) - i = i + 1 - if rows != 0 and i > rows: - done = True - break - if done: - break - sys.stdout.write("%25s %36d %15d (%d%%)\n\n" % \ - ("Totals:", self._size, self._alloc, self._pct)) - -def usage(): - cmd = "Usage: splslab.py [-n|--num-rows] number [-s|--sort-by] " + \ - "[interval] [count]"; - sys.stderr.write("%s\n" % cmd) - sys.stderr.write("\t-h : print help\n") - sys.stderr.write("\t-n : --num-rows N : limit output to N top " + - "largest slabs (default: all)\n") - sys.stderr.write("\t-s : --sort-by key : sort output in descending " + - "order by total size (s)\n\t\tor allocated size (a) " + - "(default: a)\n") - sys.stderr.write("\tinterval : repeat every interval seconds\n") - sys.stderr.write("\tcount : output statistics count times and exit\n") - - -def main(): - - rows = 0 - count = 0 - skey = "a" - interval = 1 - - signal.signal(signal.SIGINT, signal.SIG_DFL) - - try: - opts, args = getopt.getopt( - sys.argv[1:], - "n:s:h", - [ - "num-rows", - "sort-by", - "help" - ] - ) - except getopt.error as e: - sys.stderr.write("Error: %s\n" % e.msg) - usage() - exit(-1) - - i = 1 - for opt, arg in opts: - if opt in ('-n', '--num-rows'): - rows = int(arg) - i = i + 2 - elif opt in ('-s', '--sort-by'): - if arg != "s" and arg != "a": - sys.stderr.write("Error: invalid sorting key \"%s\"\n" % arg) - usage() - exit(-1) - skey = arg - i = i + 2 - elif opt in ('-h', '--help'): - usage() - exit(0) - else: - break - - args = sys.argv[i:] - - interval = int(args[0]) if len(args) else interval - count = int(args[1]) if len(args) > 1 else count - - i = 0 - while True: - cs = CumulativeStat(skey) - cs.slab_update() - cs.show(rows) - - i = i + 1 - if count and i >= count: - break - - time.sleep(interval) - - return 0 - -if __name__ == '__main__': - main() diff --git a/config/.gitignore b/config/.gitignore deleted file mode 100644 index cd811a0a9..000000000 --- a/config/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/compile -/config.guess -/config.sub -/depcomp -/install-sh -/ltmain.sh -/missing -/libtool.m4 -/lt*.m4 diff --git a/config/Rules.am b/config/Rules.am deleted file mode 100644 index 7c5d3283f..000000000 --- a/config/Rules.am +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Written by Brian Behlendorf . -############################################################################### -# Common rules for user space components. -############################################################################### - -DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h - -AM_LIBTOOLFLAGS = --silent -AM_CPPFLAGS = -D__USE_LARGEFILE64 -AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing -AM_CFLAGS += ${DEBUG_CFLAGS} diff --git a/config/config.awk b/config/config.awk deleted file mode 100644 index cc4b7cc26..000000000 --- a/config/config.awk +++ /dev/null @@ -1,15 +0,0 @@ -# Remove default preprocessor define's from config.h -# PACKAGE -# PACKAGE_BUGREPORT -# PACKAGE_NAME -# PACKAGE_STRING -# PACKAGE_TARNAME -# PACKAGE_VERSION -# STDC_HEADERS -# VERSION - -BEGIN { RS = "" ; FS = "\n" } \ - !/.#define PACKAGE./ && \ - !/.#define VERSION./ && \ - !/.#define STDC_HEADERS./ \ - { print $0"\n" } diff --git a/config/deb.am b/config/deb.am deleted file mode 100644 index f745c9181..000000000 --- a/config/deb.am +++ /dev/null @@ -1,58 +0,0 @@ -############################################################################### -# Copyright (C) 2010 Lawrence Livermore National Security, LLC. -# Written by Brian Behlendorf . -############################################################################### -# Build targets for DEB packages. -# -# Long term native distro specific Debian style packaging should be added. -# In the short term RPM packages are built and converted to DEB packages -# using alien. If someone familiar with Debian style packaging were to -# update the build system to correctly build Debian style packages I would -# happily take it. Until then we will have to make due with alien. -# -############################################################################### - -deb-local: - @(if test "${HAVE_DPKGBUILD}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${DPKGBUILD} missing. Please install the\n" \ - "*** package for your distribution which provides ${DPKGBUILD},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi; \ - if test "${HAVE_ALIEN}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${ALIEN} missing. Please install the\n" \ - "*** package for your distribution which provides ${ALIEN},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi) - -deb-kmod: deb-local rpm-kmod - name=${PACKAGE}; \ - version=${VERSION}-${RELEASE}; \ - arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ - debarch=`$(DPKG) --print-architecture`; \ - pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ - $(RM) $$pkg1 - -deb-dkms: deb-local rpm-dkms - name=${PACKAGE}; \ - version=${VERSION}-${RELEASE}; \ - arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \ - debarch=`$(DPKG) --print-architecture`; \ - pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ - $(RM) $$pkg1 - -deb-utils: deb-local rpm-utils - name=${PACKAGE}; \ - version=${VERSION}-${RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - debarch=`$(DPKG) --print-architecture`; \ - pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ - $(RM) $$pkg1 - -deb: deb-kmod deb-dkms deb-utils diff --git a/config/kernel-fallocate-pax.m4 b/config/kernel-fallocate-pax.m4 new file mode 100644 index 000000000..ac75a4c8e --- /dev/null +++ b/config/kernel-fallocate-pax.m4 @@ -0,0 +1,19 @@ +dnl # +dnl # PaX Linux 2.6.38 - 3.x API +dnl # +AC_DEFUN([SPL_AC_PAX_KERNEL_FILE_FALLOCATE], [ + AC_MSG_CHECKING([whether fops->fallocate() exists]) + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel-fallocate.m4 b/config/kernel-fallocate.m4 deleted file mode 100644 index b8c82f464..000000000 --- a/config/kernel-fallocate.m4 +++ /dev/null @@ -1,68 +0,0 @@ -dnl # -dnl # Linux 2.6.38 - 3.x API -dnl # -AC_DEFUN([SPL_AC_KERNEL_FILE_FALLOCATE], [ - AC_MSG_CHECKING([whether fops->fallocate() exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; - struct file_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) -dnl # -dnl # Linux 2.6.x - 2.6.37 API -dnl # -AC_DEFUN([SPL_AC_KERNEL_INODE_FALLOCATE], [ - AC_MSG_CHECKING([whether iops->fallocate() exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; - struct inode_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # PaX Linux 2.6.38 - 3.x API -dnl # -AC_DEFUN([SPL_AC_PAX_KERNEL_FILE_FALLOCATE], [ - AC_MSG_CHECKING([whether fops->fallocate() exists]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; - struct file_operations_no_const fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # The fallocate callback was moved from the inode_operations -dnl # structure to the file_operations structure. -dnl # -AC_DEFUN([SPL_AC_KERNEL_FALLOCATE], [ - SPL_AC_KERNEL_FILE_FALLOCATE - SPL_AC_KERNEL_INODE_FALLOCATE - SPL_AC_PAX_KERNEL_FILE_FALLOCATE -]) diff --git a/config/kernel-kmem.m4 b/config/kernel-kmem.m4 new file mode 100644 index 000000000..cc055e530 --- /dev/null +++ b/config/kernel-kmem.m4 @@ -0,0 +1,58 @@ +dnl # +dnl # Enabled by default it provides a minimal level of memory tracking. +dnl # A total count of bytes allocated is kept for each alloc and free. +dnl # Then at module unload time a report to the console will be printed +dnl # if memory was leaked. +dnl # +AC_DEFUN([SPL_AC_DEBUG_KMEM], [ + AC_ARG_ENABLE([debug-kmem], + [AS_HELP_STRING([--enable-debug-kmem], + [Enable basic kmem accounting @<:@default=no@:>@])], + [], + [enable_debug_kmem=no]) + + AS_IF([test "x$enable_debug_kmem" = xyes], + [ + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + DEBUG_KMEM="_with_debug_kmem" + AC_DEFINE([DEBUG_KMEM], [1], + [Define to 1 to enable basic kmem accounting]) + ], [ + DEBUG_KMEM="_without_debug_kmem" + ]) + + AC_SUBST(DEBUG_KMEM) + AC_MSG_CHECKING([whether basic kmem accounting is enabled]) + AC_MSG_RESULT([$enable_debug_kmem]) +]) + +dnl # +dnl # Disabled by default it provides detailed memory tracking. This +dnl # feature also requires --enable-debug-kmem to be set. When enabled +dnl # not only will total bytes be tracked but also the location of every +dnl # alloc and free. When the SPL module is unloaded a list of all leaked +dnl # addresses and where they were allocated will be dumped to the console. +dnl # Enabling this feature has a significant impact on performance but it +dnl # makes finding memory leaks pretty straight forward. +dnl # +AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [ + AC_ARG_ENABLE([debug-kmem-tracking], + [AS_HELP_STRING([--enable-debug-kmem-tracking], + [Enable detailed kmem tracking @<:@default=no@:>@])], + [], + [enable_debug_kmem_tracking=no]) + + AS_IF([test "x$enable_debug_kmem_tracking" = xyes], + [ + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" + AC_DEFINE([DEBUG_KMEM_TRACKING], [1], + [Define to 1 to enable detailed kmem tracking]) + ], [ + DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" + ]) + + AC_SUBST(DEBUG_KMEM_TRACKING) + AC_MSG_CHECKING([whether detailed kmem tracking is enabled]) + AC_MSG_RESULT([$enable_debug_kmem_tracking]) +]) diff --git a/config/kernel-truncate-range.m4 b/config/kernel-truncate-range.m4 deleted file mode 100644 index 4b1600b61..000000000 --- a/config/kernel-truncate-range.m4 +++ /dev/null @@ -1,19 +0,0 @@ -dnl # -dnl # 3.5 API change, -dnl # inode_operations.truncate_range removed -dnl # -AC_DEFUN([SPL_AC_INODE_TRUNCATE_RANGE], [ - AC_MSG_CHECKING([whether truncate_range() inode operation is available]) - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - struct inode_operations ops; - ops.truncate_range = NULL; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1, - [truncate_range() inode operation is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) diff --git a/config/rpm.am b/config/rpm.am deleted file mode 100644 index 51a20b3e6..000000000 --- a/config/rpm.am +++ /dev/null @@ -1,87 +0,0 @@ -############################################################################### -# Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Written by Brian Behlendorf . -############################################################################### -# Build targets for RPM packages. -############################################################################### - -srpm-kmod: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \ - def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_KMOD}' srpm-common - -srpm-dkms: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \ - def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_DKMS}' srpm-common - -srpm-utils: - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \ - def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_UTIL}' srpm-common - -srpm: srpm-kmod srpm-dkms srpm-utils -srpms: srpm-kmod srpm-dkms srpm-utils - -rpm-kmod: srpm-kmod - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \ - def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_KMOD}' rpm-common - -rpm-dkms: srpm-dkms - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \ - def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_DKMS}' rpm-common - -rpm-utils: srpm-utils - $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \ - def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_UTIL}' rpm-common - -rpm: rpm-kmod rpm-dkms rpm-utils -rpms: rpm-kmod rpm-dkms rpm-utils - -rpm-local: - @(if test "${HAVE_RPMBUILD}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${RPMBUILD} missing. Please install the\n" \ - "*** package for your distribution which provides ${RPMBUILD},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi; \ - mkdir -p $(rpmbuild)/TMP && \ - mkdir -p $(rpmbuild)/BUILD && \ - mkdir -p $(rpmbuild)/RPMS && \ - mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && \ - cp ${RPM_SPEC_DIR}/$(rpmspec) $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && \ - cp $(top_srcdir)/scripts/kmodtool $(rpmbuild)/SOURCES && \ - cp $(distdir).tar.gz $(rpmbuild)/SOURCES) - -srpm-common: dist - @(dist=`$(RPM) --eval %{?dist}`; \ - rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \ - rpmspec=$(pkg).spec; \ - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) \ - rpmbuild="$$rpmbuild" \ - rpmspec="$$rpmspec" \ - rpm-local || exit 1; \ - LANG=C $(RPMBUILD) \ - --define "_tmppath $$rpmbuild/TMP" \ - --define "_topdir $$rpmbuild" \ - $(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ - cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ - rm -R $$rpmbuild) - -rpm-common: - @(dist=`$(RPM) --eval %{?dist}`; \ - rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \ - rpmspec=$(pkg).spec; \ - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) \ - rpmbuild="$$rpmbuild" \ - rpmspec="$$rpmspec" \ - rpm-local || exit 1; \ - LANG=C ${RPMBUILD} \ - --define "_tmppath $$rpmbuild/TMP" \ - --define "_topdir $$rpmbuild" \ - $(def) --rebuild $$rpmpkg || exit 1; \ - cp $$rpmbuild/RPMS/*/* . || exit 1; \ - rm -R $$rpmbuild) diff --git a/config/spl-build.m4 b/config/spl-build.m4 deleted file mode 100644 index 5c6c02af2..000000000 --- a/config/spl-build.m4 +++ /dev/null @@ -1,755 +0,0 @@ -############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Written by Brian Behlendorf . -############################################################################### -# SPL_AC_CONFIG_KERNEL: Default SPL kernel configuration. -############################################################################### - -AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ - SPL_AC_KERNEL - - if test "${LINUX_OBJ}" != "${LINUX}"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" - fi - AC_SUBST(KERNELMAKE_PARAMS) - - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes" - AC_SUBST(KERNELCPPFLAGS) - - SPL_AC_TEST_MODULE - SPL_AC_ATOMIC_SPINLOCK - SPL_AC_SHRINKER_CALLBACK - SPL_AC_CTL_NAME - SPL_AC_CONFIG_TRIM_UNUSED_KSYMS - SPL_AC_PDE_DATA - SPL_AC_SET_FS_PWD_WITH_CONST - SPL_AC_2ARGS_VFS_FSYNC - SPL_AC_INODE_TRUNCATE_RANGE - SPL_AC_FS_STRUCT_SPINLOCK - SPL_AC_KUIDGID_T - SPL_AC_KERNEL_FALLOCATE - SPL_AC_CONFIG_ZLIB_INFLATE - SPL_AC_CONFIG_ZLIB_DEFLATE - SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE - SPL_AC_SHRINK_CONTROL_STRUCT - SPL_AC_RWSEM_SPINLOCK_IS_RAW - SPL_AC_RWSEM_ACTIVITY - SPL_AC_RWSEM_ATOMIC_LONG_COUNT - SPL_AC_SCHED_RT_HEADER - SPL_AC_SCHED_SIGNAL_HEADER - SPL_AC_4ARGS_VFS_GETATTR - SPL_AC_3ARGS_VFS_GETATTR - SPL_AC_2ARGS_VFS_GETATTR - SPL_AC_USLEEP_RANGE - SPL_AC_KMEM_CACHE_ALLOCFLAGS - SPL_AC_WAIT_ON_BIT - SPL_AC_INODE_LOCK - SPL_AC_GROUP_INFO_GID - SPL_AC_KMEM_CACHE_CREATE_USERCOPY - SPL_AC_WAIT_QUEUE_ENTRY_T - SPL_AC_WAIT_QUEUE_HEAD_ENTRY - SPL_AC_IO_SCHEDULE_TIMEOUT - SPL_AC_KERNEL_WRITE - SPL_AC_KERNEL_READ - SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST -]) - -AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ - modpost=$LINUX/scripts/Makefile.modpost - AC_MSG_CHECKING([kernel file name for module symbols]) - if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then - if grep -q Modules.symvers $modpost; then - LINUX_SYMBOLS=Modules.symvers - else - LINUX_SYMBOLS=Module.symvers - fi - - if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then - AC_MSG_ERROR([ - *** Please make sure the kernel devel package for your distribution - *** is installed. If you are building with a custom kernel, make sure the - *** kernel is configured, built, and the '--with-linux=PATH' configure - *** option refers to the location of the kernel source.]) - fi - else - LINUX_SYMBOLS=NONE - fi - AC_MSG_RESULT($LINUX_SYMBOLS) - AC_SUBST(LINUX_SYMBOLS) -]) - -AC_DEFUN([SPL_AC_KERNEL], [ - AC_ARG_WITH([linux], - AS_HELP_STRING([--with-linux=PATH], - [Path to kernel source]), - [kernelsrc="$withval"]) - - AC_ARG_WITH([linux-obj], - AS_HELP_STRING([--with-linux-obj=PATH], - [Path to kernel build objects]), - [kernelbuild="$withval"]) - - AC_MSG_CHECKING([kernel source directory]) - if test -z "$kernelsrc"; then - if test -e "/lib/modules/$(uname -r)/source"; then - headersdir="/lib/modules/$(uname -r)/source" - sourcelink=$(readlink -f "$headersdir") - elif test -e "/lib/modules/$(uname -r)/build"; then - headersdir="/lib/modules/$(uname -r)/build" - sourcelink=$(readlink -f "$headersdir") - else - sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ - 2>/dev/null | grep -v obj | tail -1) - fi - - if test -n "$sourcelink" && test -e ${sourcelink}; then - kernelsrc=`readlink -f ${sourcelink}` - else - kernelsrc="[Not found]" - fi - else - if test "$kernelsrc" = "NONE"; then - kernsrcver=NONE - fi - withlinux=yes - fi - - AC_MSG_RESULT([$kernelsrc]) - if test ! -d "$kernelsrc"; then - AC_MSG_ERROR([ - *** Please make sure the kernel devel package for your distribution - *** is installed and then try again. If that fails, you can specify the - *** location of the kernel source with the '--with-linux=PATH' option.]) - fi - - AC_MSG_CHECKING([kernel build directory]) - if test -z "$kernelbuild"; then - if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then - kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` - elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} - elif test -d ${kernelsrc}-obj/${target_cpu}/default; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/default - elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then - kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} - else - kernelbuild=${kernelsrc} - fi - fi - AC_MSG_RESULT([$kernelbuild]) - - AC_MSG_CHECKING([kernel source version]) - utsrelease1=$kernelbuild/include/linux/version.h - utsrelease2=$kernelbuild/include/linux/utsrelease.h - utsrelease3=$kernelbuild/include/generated/utsrelease.h - if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then - utsrelease=linux/version.h - elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then - utsrelease=linux/utsrelease.h - elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then - utsrelease=generated/utsrelease.h - fi - - if test "$utsrelease"; then - kernsrcver=`(echo "#include <$utsrelease>"; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` - - if test -z "$kernsrcver"; then - AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([*** Cannot determine kernel version.]) - fi - else - AC_MSG_RESULT([Not found]) - if test "x$enable_linux_builtin" != xyes; then - AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) - else - AC_MSG_ERROR([ - *** Cannot find UTS_RELEASE definition. - *** Please run 'make prepare' inside the kernel source tree.]) - fi - fi - - AC_MSG_RESULT([$kernsrcver]) - - LINUX=${kernelsrc} - LINUX_OBJ=${kernelbuild} - LINUX_VERSION=${kernsrcver} - - AC_SUBST(LINUX) - AC_SUBST(LINUX_OBJ) - AC_SUBST(LINUX_VERSION) - - SPL_AC_MODULE_SYMVERS -]) - -dnl # -dnl # Default SPL user configuration -dnl # -AC_DEFUN([SPL_AC_CONFIG_USER], []) - -dnl # -dnl # Check for rpm+rpmbuild to build RPM packages. If these tools -dnl # are missing, it is non-fatal, but you will not be able to build -dnl # RPM packages and will be warned if you try too. -dnl # -dnl # By default, the generic spec file will be used because it requires -dnl # minimal dependencies. Distribution specific spec files can be -dnl # placed under the 'rpm/' directory and enabled using -dnl # the --with-spec= configure option. -dnl # -AC_DEFUN([SPL_AC_RPM], [ - RPM=rpm - RPMBUILD=rpmbuild - - AC_MSG_CHECKING([whether $RPM is available]) - AS_IF([tmp=$($RPM --version 2>/dev/null)], [ - RPM_VERSION=$(echo $tmp | $AWK '/RPM/ { print $[3] }') - HAVE_RPM=yes - AC_MSG_RESULT([$HAVE_RPM ($RPM_VERSION)]) - ],[ - HAVE_RPM=no - AC_MSG_RESULT([$HAVE_RPM]) - ]) - - AC_MSG_CHECKING([whether $RPMBUILD is available]) - AS_IF([tmp=$($RPMBUILD --version 2>/dev/null)], [ - RPMBUILD_VERSION=$(echo $tmp | $AWK '/RPM/ { print $[3] }') - HAVE_RPMBUILD=yes - AC_MSG_RESULT([$HAVE_RPMBUILD ($RPMBUILD_VERSION)]) - ],[ - HAVE_RPMBUILD=no - AC_MSG_RESULT([$HAVE_RPMBUILD]) - ]) - - RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1"' - RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM) 1"' - RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_TRACKING) 1"' - RPM_DEFINE_UTIL= - RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"' - RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"' - RPM_DEFINE_DKMS= - - SRPM_DEFINE_COMMON='--define "build_src_rpm 1"' - SRPM_DEFINE_UTIL= - SRPM_DEFINE_KMOD= - SRPM_DEFINE_DKMS= - - RPM_SPEC_DIR="rpm/generic" - AC_ARG_WITH([spec], - AS_HELP_STRING([--with-spec=SPEC], - [Spec files 'generic|redhat']), - [RPM_SPEC_DIR="rpm/$withval"]) - - AC_MSG_CHECKING([whether spec files are available]) - AC_MSG_RESULT([yes ($RPM_SPEC_DIR/*.spec.in)]) - - AC_SUBST(HAVE_RPM) - AC_SUBST(RPM) - AC_SUBST(RPM_VERSION) - - AC_SUBST(HAVE_RPMBUILD) - AC_SUBST(RPMBUILD) - AC_SUBST(RPMBUILD_VERSION) - - AC_SUBST(RPM_SPEC_DIR) - AC_SUBST(RPM_DEFINE_UTIL) - AC_SUBST(RPM_DEFINE_KMOD) - AC_SUBST(RPM_DEFINE_DKMS) - AC_SUBST(RPM_DEFINE_COMMON) - AC_SUBST(SRPM_DEFINE_UTIL) - AC_SUBST(SRPM_DEFINE_KMOD) - AC_SUBST(SRPM_DEFINE_DKMS) - AC_SUBST(SRPM_DEFINE_COMMON) -]) - -dnl # -dnl # Check for dpkg+dpkg-buildpackage to build DEB packages. If these -dnl # tools are missing it is non-fatal but you will not be able to build -dnl # DEB packages and will be warned if you try too. -dnl # -AC_DEFUN([SPL_AC_DPKG], [ - DPKG=dpkg - DPKGBUILD=dpkg-buildpackage - - AC_MSG_CHECKING([whether $DPKG is available]) - AS_IF([tmp=$($DPKG --version 2>/dev/null)], [ - DPKG_VERSION=$(echo $tmp | $AWK '/Debian/ { print $[7] }') - HAVE_DPKG=yes - AC_MSG_RESULT([$HAVE_DPKG ($DPKG_VERSION)]) - ],[ - HAVE_DPKG=no - AC_MSG_RESULT([$HAVE_DPKG]) - ]) - - AC_MSG_CHECKING([whether $DPKGBUILD is available]) - AS_IF([tmp=$($DPKGBUILD --version 2>/dev/null)], [ - DPKGBUILD_VERSION=$(echo $tmp | \ - $AWK '/Debian/ { print $[4] }' | cut -f-4 -d'.') - HAVE_DPKGBUILD=yes - AC_MSG_RESULT([$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)]) - ],[ - HAVE_DPKGBUILD=no - AC_MSG_RESULT([$HAVE_DPKGBUILD]) - ]) - - AC_SUBST(HAVE_DPKG) - AC_SUBST(DPKG) - AC_SUBST(DPKG_VERSION) - - AC_SUBST(HAVE_DPKGBUILD) - AC_SUBST(DPKGBUILD) - AC_SUBST(DPKGBUILD_VERSION) -]) - -dnl # -dnl # Until native packaging for various different packing systems -dnl # can be added the least we can do is attempt to use alien to -dnl # convert the RPM packages to the needed package type. This is -dnl # a hack but so far it has worked reasonable well. -dnl # -AC_DEFUN([SPL_AC_ALIEN], [ - ALIEN=alien - - AC_MSG_CHECKING([whether $ALIEN is available]) - AS_IF([tmp=$($ALIEN --version 2>/dev/null)], [ - ALIEN_VERSION=$(echo $tmp | $AWK '{ print $[3] }') - HAVE_ALIEN=yes - AC_MSG_RESULT([$HAVE_ALIEN ($ALIEN_VERSION)]) - ],[ - HAVE_ALIEN=no - AC_MSG_RESULT([$HAVE_ALIEN]) - ]) - - AC_SUBST(HAVE_ALIEN) - AC_SUBST(ALIEN) - AC_SUBST(ALIEN_VERSION) -]) - -dnl # -dnl # Using the VENDOR tag from config.guess set the default -dnl # package type for 'make pkg': (rpm | deb | tgz) -dnl # -AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ - AC_MSG_CHECKING([linux distribution]) - if test -f /etc/toss-release ; then - VENDOR=toss ; - elif test -f /etc/fedora-release ; then - VENDOR=fedora ; - elif test -f /etc/redhat-release ; then - VENDOR=redhat ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; - elif test -f /etc/SuSE-release ; then - VENDOR=sles ; - elif test -f /etc/slackware-version ; then - VENDOR=slackware ; - elif test -f /etc/lunar.release ; then - VENDOR=lunar ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; - else - VENDOR= ; - fi - AC_MSG_RESULT([$VENDOR]) - AC_SUBST(VENDOR) - - AC_MSG_CHECKING([default package type]) - case "$VENDOR" in - toss) DEFAULT_PACKAGE=rpm ;; - redhat) DEFAULT_PACKAGE=rpm ;; - fedora) DEFAULT_PACKAGE=rpm ;; - gentoo) DEFAULT_PACKAGE=tgz ;; - arch) DEFAULT_PACKAGE=tgz ;; - sles) DEFAULT_PACKAGE=rpm ;; - slackware) DEFAULT_PACKAGE=tgz ;; - lunar) DEFAULT_PACKAGE=tgz ;; - ubuntu) DEFAULT_PACKAGE=deb ;; - debian) DEFAULT_PACKAGE=deb ;; - *) DEFAULT_PACKAGE=rpm ;; - esac - - AC_MSG_RESULT([$DEFAULT_PACKAGE]) - AC_SUBST(DEFAULT_PACKAGE) -]) - -dnl # -dnl # Default SPL user configuration -dnl # -AC_DEFUN([SPL_AC_PACKAGE], [ - SPL_AC_DEFAULT_PACKAGE - SPL_AC_RPM - SPL_AC_DPKG - SPL_AC_ALIEN -]) - -AC_DEFUN([SPL_AC_LICENSE], [ - AC_MSG_CHECKING([spl author]) - AC_MSG_RESULT([$SPL_META_AUTHOR]) - - AC_MSG_CHECKING([spl license]) - AC_MSG_RESULT([$SPL_META_LICENSE]) -]) - -AC_DEFUN([SPL_AC_CONFIG], [ - SPL_CONFIG=all - AC_ARG_WITH([config], - AS_HELP_STRING([--with-config=CONFIG], - [Config file 'kernel|user|all|srpm']), - [SPL_CONFIG="$withval"]) - AC_ARG_ENABLE([linux-builtin], - [AC_HELP_STRING([--enable-linux-builtin], - [Configure for builtin in-tree kernel modules @<:@default=no@:>@])], - [], - [enable_linux_builtin=no]) - - AC_MSG_CHECKING([spl config]) - AC_MSG_RESULT([$SPL_CONFIG]); - AC_SUBST(SPL_CONFIG) - - case "$SPL_CONFIG" in - kernel) SPL_AC_CONFIG_KERNEL ;; - user) SPL_AC_CONFIG_USER ;; - all) SPL_AC_CONFIG_KERNEL - SPL_AC_CONFIG_USER ;; - srpm) ;; - *) - AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$SPL_CONFIG" for --with-config, - user kernel|user|all|srpm]) ;; - esac - - AM_CONDITIONAL([CONFIG_USER], - [test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all]) - AM_CONDITIONAL([CONFIG_KERNEL], - [test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all] && - [test "x$enable_linux_builtin" != xyes ]) -]) - -dnl # -dnl # Enable if the SPL should be compiled with internal debugging enabled. -dnl # By default this support is disabled. -dnl # -AC_DEFUN([SPL_AC_DEBUG], [ - AC_MSG_CHECKING([whether debugging is enabled]) - AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], - [Enable generic debug support @<:@default=no@:>@])], - [], - [enable_debug=no]) - - AS_IF([test "x$enable_debug" = xyes], - [ - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" - DEBUG_CFLAGS="-DDEBUG -Werror" - DEBUG_SPL="_with_debug" - ], [ - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" - DEBUG_CFLAGS="-DNDEBUG" - DEBUG_SPL="_without_debug" - ]) - - AC_SUBST(DEBUG_CFLAGS) - AC_SUBST(DEBUG_SPL) - AC_MSG_RESULT([$enable_debug]) -]) - -dnl # -dnl # Enabled by default it provides a minimal level of memory tracking. -dnl # A total count of bytes allocated is kept for each alloc and free. -dnl # Then at module unload time a report to the console will be printed -dnl # if memory was leaked. -dnl # -AC_DEFUN([SPL_AC_DEBUG_KMEM], [ - AC_ARG_ENABLE([debug-kmem], - [AS_HELP_STRING([--enable-debug-kmem], - [Enable basic kmem accounting @<:@default=no@:>@])], - [], - [enable_debug_kmem=no]) - - AS_IF([test "x$enable_debug_kmem" = xyes], - [ - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" - DEBUG_KMEM="_with_debug_kmem" - AC_DEFINE([DEBUG_KMEM], [1], - [Define to 1 to enable basic kmem accounting]) - ], [ - DEBUG_KMEM="_without_debug_kmem" - ]) - - AC_SUBST(DEBUG_KMEM) - AC_MSG_CHECKING([whether basic kmem accounting is enabled]) - AC_MSG_RESULT([$enable_debug_kmem]) -]) - -dnl # -dnl # Disabled by default it provides detailed memory tracking. This -dnl # feature also requires --enable-debug-kmem to be set. When enabled -dnl # not only will total bytes be tracked but also the location of every -dnl # alloc and free. When the SPL module is unloaded a list of all leaked -dnl # addresses and where they were allocated will be dumped to the console. -dnl # Enabling this feature has a significant impact on performance but it -dnl # makes finding memory leaks pretty straight forward. -dnl # -AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [ - AC_ARG_ENABLE([debug-kmem-tracking], - [AS_HELP_STRING([--enable-debug-kmem-tracking], - [Enable detailed kmem tracking @<:@default=no@:>@])], - [], - [enable_debug_kmem_tracking=no]) - - AS_IF([test "x$enable_debug_kmem_tracking" = xyes], - [ - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" - DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" - AC_DEFINE([DEBUG_KMEM_TRACKING], [1], - [Define to 1 to enable detailed kmem tracking]) - ], [ - DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" - ]) - - AC_SUBST(DEBUG_KMEM_TRACKING) - AC_MSG_CHECKING([whether detailed kmem tracking is enabled]) - AC_MSG_RESULT([$enable_debug_kmem_tracking]) -]) - -dnl # -dnl # SPL_LINUX_CONFTEST -dnl # -AC_DEFUN([SPL_LINUX_CONFTEST], [ -cat confdefs.h - <<_ACEOF >conftest.c -$1 -_ACEOF -]) - -dnl # -dnl # SPL_LANG_PROGRAM(C)([PROLOGUE], [BODY]) -dnl # -m4_define([SPL_LANG_PROGRAM], [ -$1 -int -main (void) -{ -dnl Do *not* indent the following line: there may be CPP directives. -dnl Don't move the `;' right after for the same reason. -$2 - ; - return 0; -} -]) - -dnl # -dnl # SPL_LINUX_COMPILE_IFELSE / like AC_COMPILE_IFELSE -dnl # -AC_DEFUN([SPL_LINUX_COMPILE_IFELSE], [ - m4_ifvaln([$1], [SPL_LINUX_CONFTEST([$1])]) - rm -Rf build && mkdir -p build && touch build/conftest.mod.c - echo "obj-m := conftest.o" >build/Makefile - modpost_flag='' - test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage - AS_IF( - [AC_TRY_COMMAND(cp conftest.c build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag) >/dev/null && AC_TRY_COMMAND([$3])], - [$4], - [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])] - ) - rm -Rf build -]) - -dnl # -dnl # SPL_LINUX_TRY_COMPILE like AC_TRY_COMPILE -dnl # -AC_DEFUN([SPL_LINUX_TRY_COMPILE], - [SPL_LINUX_COMPILE_IFELSE( - [AC_LANG_SOURCE([SPL_LANG_PROGRAM([[$1]], [[$2]])])], - [modules], - [test -s build/conftest.o], - [$3], [$4]) -]) - -dnl # -dnl # SPL_CHECK_SYMBOL_EXPORT -dnl # check symbol exported or not -dnl # -AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT], [ - grep -q -E '[[[:space:]]]$1[[[:space:]]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in $2; do - grep -q -E "EXPORT_SYMBOL.*($1)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : - $4 - else : - $3 - fi - else : - $3 - fi -]) - -dnl # -dnl # SPL_LINUX_TRY_COMPILE_SYMBOL -dnl # like SPL_LINUX_TRY_COMPILE, except SPL_CHECK_SYMBOL_EXPORT -dnl # is called if not compiling for builtin -dnl # -AC_DEFUN([SPL_LINUX_TRY_COMPILE_SYMBOL], [ - SPL_LINUX_TRY_COMPILE([$1], [$2], [rc=0], [rc=1]) - if test $rc -ne 0; then : - $6 - else - if test "x$enable_linux_builtin" != xyes; then - SPL_CHECK_SYMBOL_EXPORT([$3], [$4], [rc=0], [rc=1]) - fi - if test $rc -ne 0; then : - $6 - else : - $5 - fi - fi -]) - -dnl # -dnl # SPL_CHECK_SYMBOL_HEADER -dnl # check if a symbol prototype is defined in listed headers. -dnl # -AC_DEFUN([SPL_CHECK_SYMBOL_HEADER], [ - AC_MSG_CHECKING([whether symbol $1 exists in header]) - header=0 - for file in $3; do - grep -q "$2" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - header=1 - break; - fi - done - if test $header -eq 0; then - AC_MSG_RESULT([no]) - $5 - else - AC_MSG_RESULT([yes]) - $4 - fi -]) - -dnl # -dnl # SPL_CHECK_HEADER -dnl # check whether header exists and define HAVE_$2_HEADER -dnl # -AC_DEFUN([SPL_CHECK_HEADER], - [AC_MSG_CHECKING([whether header $1 exists]) - SPL_LINUX_TRY_COMPILE([ - #include <$1> - ],[ - return 0; - ],[ - AC_DEFINE(HAVE_$2_HEADER, 1, [$1 exists]) - AC_MSG_RESULT(yes) - $3 - ],[ - AC_MSG_RESULT(no) - $4 - ]) -]) - -dnl # -dnl # Basic toolchain sanity check. Verify that kernel modules can -dnl # be built and which symbols can be used. -dnl # -AC_DEFUN([SPL_AC_TEST_MODULE], - [AC_MSG_CHECKING([whether modules can be built]) - SPL_LINUX_TRY_COMPILE([],[],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - if test "x$enable_linux_builtin" != xyes; then - AC_MSG_ERROR([*** Unable to build an empty module.]) - else - AC_MSG_ERROR([ - *** Unable to build an empty module. - *** Please run 'make scripts' inside the kernel source tree.]) - fi - ]) - - AS_IF([test "x$cross_compiling" != xyes], [ - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([ - #include "$LINUX/include/linux/license.h" - ], [ - return !license_is_gpl_compatible( - "$SPL_META_LICENSE"); - ]) - ], [ - AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1], - [Define to 1 if GPL-only symbols can be used]) - ], [ - ]) - ]) -]) - -dnl # -dnl # Use the atomic implemenation based on global spinlocks. This -dnl # should only be needed by 32-bit kernels which do not provide -dnl # the atomic64_* API. It may be optionally enabled as a fallback -dnl # if problems are observed with the direct mapping to the native -dnl # Linux atomic operations. You may not disable atomic spinlocks -dnl # if you kernel does not an atomic64_* API. -dnl # -AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ - AC_ARG_ENABLE([atomic-spinlocks], - [AS_HELP_STRING([--enable-atomic-spinlocks], - [Atomic types use spinlocks @<:@default=check@:>@])], - [], - [enable_atomic_spinlocks=check]) - - SPL_LINUX_TRY_COMPILE([ - #include - ],[ - atomic64_t *ptr __attribute__ ((unused)); - ],[ - have_atomic64_t=yes - AC_DEFINE(HAVE_ATOMIC64_T, 1, - [kernel defines atomic64_t]) - ],[ - have_atomic64_t=no - ]) - - AS_IF([test "x$enable_atomic_spinlocks" = xcheck], [ - AS_IF([test "x$have_atomic64_t" = xyes], [ - enable_atomic_spinlocks=no - ],[ - enable_atomic_spinlocks=yes - ]) - ]) - - AS_IF([test "x$enable_atomic_spinlocks" = xyes], [ - AC_DEFINE([ATOMIC_SPINLOCK], [1], - [Atomic types use spinlocks]) - ],[ - AS_IF([test "x$have_atomic64_t" = xno], [ - AC_MSG_FAILURE( - [--disable-atomic-spinlocks given but required atomic64 support is unavailable]) - ]) - ]) - - AC_MSG_CHECKING([whether atomic types use spinlocks]) - AC_MSG_RESULT([$enable_atomic_spinlocks]) - - AC_MSG_CHECKING([whether kernel defines atomic64_t]) - AC_MSG_RESULT([$have_atomic64_t]) -]) diff --git a/config/spl-meta.m4 b/config/spl-meta.m4 deleted file mode 100644 index fbfaec4ab..000000000 --- a/config/spl-meta.m4 +++ /dev/null @@ -1,170 +0,0 @@ -dnl # -dnl # DESCRIPTION: -dnl # Read meta data from the META file. When building from a git repository -dnl # the SPL_META_RELEASE field will be overwritten if there is an annotated -dnl # tag matching the form SPL_META_NAME-SPL_META_VERSION-*. This allows -dnl # for working builds to be uniquely identified using the git commit hash. -dnl # -dnl # The META file format is as follows: -dnl # ^[ ]*KEY:[ \t]+VALUE$ -dnl # -dnl # In other words: -dnl # - KEY is separated from VALUE by a colon and one or more spaces/tabs. -dnl # - KEY and VALUE are case sensitive. -dnl # - Leading spaces are ignored. -dnl # - First match wins for duplicate keys. -dnl # -dnl # A line can be commented out by preceding it with a '#' (or technically -dnl # any non-space character since that will prevent the regex from -dnl # matching). -dnl # -dnl # WARNING: -dnl # Placing a colon followed by a space or tab (ie, ":[ \t]+") within the -dnl # VALUE will prematurely terminate the string since that sequence is -dnl # used as the awk field separator. -dnl # -dnl # KEYS: -dnl # The following META keys are recognized: -dnl # Name, Version, Release, Date, Author, LT_Current, LT_Revision, LT_Age -dnl # -dnl # Written by Chris Dunlap . -dnl # Modified by Brian Behlendorf . -dnl # -AC_DEFUN([SPL_AC_META], [ - AC_PROG_AWK - AC_MSG_CHECKING([metadata]) - - META="$srcdir/META" - _spl_ac_meta_type="none" - if test -f "$META"; then - _spl_ac_meta_type="META file" - - SPL_META_NAME=_SPL_AC_META_GETVAL([(Name|Project|Package)]); - if test -n "$SPL_META_NAME"; then - AC_DEFINE_UNQUOTED([SPL_META_NAME], ["$SPL_META_NAME"], - [Define the project name.] - ) - AC_SUBST([SPL_META_NAME]) - fi - - SPL_META_VERSION=_SPL_AC_META_GETVAL([Version]); - if test -n "$SPL_META_VERSION"; then - AC_DEFINE_UNQUOTED([SPL_META_VERSION], ["$SPL_META_VERSION"], - [Define the project version.] - ) - AC_SUBST([SPL_META_VERSION]) - fi - - SPL_META_RELEASE=_SPL_AC_META_GETVAL([Release]); - if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then - _match="${SPL_META_NAME}-${SPL_META_VERSION}" - _alias=$(git describe --match=${_match} 2>/dev/null) - _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') - if test -n "${_release}"; then - SPL_META_RELEASE=${_release} - _spl_ac_meta_type="git describe" - else - _match="${SPL_META_NAME}-${SPL_META_VERSION}-${SPL_META_RELEASE}" - _alias=$(git describe --match=${_match} 2>/dev/null) - _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') - if test -n "${_release}"; then - SPL_META_RELEASE=${_release} - _spl_ac_meta_type="git describe" - fi - fi - fi - - if test -n "$SPL_META_RELEASE"; then - AC_DEFINE_UNQUOTED([SPL_META_RELEASE], ["$SPL_META_RELEASE"], - [Define the project release.] - ) - AC_SUBST([SPL_META_RELEASE]) - - RELEASE="$SPL_META_RELEASE" - AC_SUBST([RELEASE]) - fi - - SPL_META_LICENSE=_SPL_AC_META_GETVAL([License]); - if test -n "$SPL_META_LICENSE"; then - AC_DEFINE_UNQUOTED([SPL_META_LICENSE], ["$SPL_META_LICENSE"], - [Define the project license.] - ) - AC_SUBST([SPL_META_LICENSE]) - fi - - if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then - SPL_META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" - test -n "$SPL_META_RELEASE" && - SPL_META_ALIAS="$SPL_META_ALIAS-$SPL_META_RELEASE" - AC_DEFINE_UNQUOTED([SPL_META_ALIAS], - ["$SPL_META_ALIAS"], - [Define the project alias string.] - ) - AC_SUBST([SPL_META_ALIAS]) - fi - - SPL_META_DATA=_SPL_AC_META_GETVAL([Date]); - if test -n "$SPL_META_DATA"; then - AC_DEFINE_UNQUOTED([SPL_META_DATA], ["$SPL_META_DATA"], - [Define the project release date.] - ) - AC_SUBST([SPL_META_DATA]) - fi - - SPL_META_AUTHOR=_SPL_AC_META_GETVAL([Author]); - if test -n "$SPL_META_AUTHOR"; then - AC_DEFINE_UNQUOTED([SPL_META_AUTHOR], ["$SPL_META_AUTHOR"], - [Define the project author.] - ) - AC_SUBST([SPL_META_AUTHOR]) - fi - - m4_pattern_allow([^LT_(CURRENT|REVISION|AGE)$]) - SPL_META_LT_CURRENT=_SPL_AC_META_GETVAL([LT_Current]); - SPL_META_LT_REVISION=_SPL_AC_META_GETVAL([LT_Revision]); - SPL_META_LT_AGE=_SPL_AC_META_GETVAL([LT_Age]); - if test -n "$SPL_META_LT_CURRENT" \ - -o -n "$SPL_META_LT_REVISION" \ - -o -n "$SPL_META_LT_AGE"; then - test -n "$SPL_META_LT_CURRENT" || SPL_META_LT_CURRENT="0" - test -n "$SPL_META_LT_REVISION" || SPL_META_LT_REVISION="0" - test -n "$SPL_META_LT_AGE" || SPL_META_LT_AGE="0" - AC_DEFINE_UNQUOTED([SPL_META_LT_CURRENT], - ["$SPL_META_LT_CURRENT"], - [Define the libtool library 'current' - version information.] - ) - AC_DEFINE_UNQUOTED([SPL_META_LT_REVISION], - ["$SPL_META_LT_REVISION"], - [Define the libtool library 'revision' - version information.] - ) - AC_DEFINE_UNQUOTED([SPL_META_LT_AGE], ["$SPL_META_LT_AGE"], - [Define the libtool library 'age' - version information.] - ) - AC_SUBST([SPL_META_LT_CURRENT]) - AC_SUBST([SPL_META_LT_REVISION]) - AC_SUBST([SPL_META_LT_AGE]) - fi - fi - - AC_MSG_RESULT([$_spl_ac_meta_type]) - ] -) - -dnl # _SPL_AC_META_GETVAL (KEY_NAME_OR_REGEX) -dnl # -dnl # Returns the META VALUE associated with the given KEY_NAME_OR_REGEX expr. -dnl # -dnl # Despite their resemblance to line noise, -dnl # the "@<:@" and "@:>@" constructs are quadrigraphs for "[" and "]". -dnl # -dnl # -dnl # The "$[]1" and "$[]2" constructs prevent M4 parameter expansion -dnl # so a literal $1 and $2 will be passed to the resulting awk script, -dnl # whereas the "$1" will undergo M4 parameter expansion for the META key. -dnl # -AC_DEFUN([_SPL_AC_META_GETVAL], - [`$AWK -F ':@<:@ \t@:>@+' '$[]1 ~ /^ *$1$/ { print $[]2; exit }' $META`]dnl -) diff --git a/config/tgz.am b/config/tgz.am deleted file mode 100644 index 765be43b9..000000000 --- a/config/tgz.am +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################### -# Copyright (C) 2010 Lawrence Livermore National Security, LLC. -# Written by Brian Behlendorf . -############################################################################### -# Build targets for TGZ packages. -# -# Long term native distro specific Slackware style packaging should be added. -# In the short term RPM packages are built and converted to TGZ packages -# using alien. If someone familiar with Slackware style packaging were to -# update the build system to correctly build Slackware style packages I would -# happily take it. Until then we will have to make due with alien. -# -############################################################################### - -tgz-local: - @(if test "${HAVE_ALIEN}" = "no"; then \ - echo -e "\n" \ - "*** Required util ${ALIEN} missing. Please install the\n" \ - "*** package for your distribution which provides ${ALIEN},\n" \ - "*** re-run configure, and try again.\n"; \ - exit 1; \ - fi) - -tgz-kmod: tgz-local rpm-kmod -if CONFIG_KERNEL - name=${PACKAGE}; \ - version=${VERSION}-${RELEASE}; \ - arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ - $(RM) $$pkg1 -endif - -tgz-utils: tgz-local rpm-utils -if CONFIG_USER - name=${PACKAGE}; \ - version=${VERSION}-${RELEASE}; \ - arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ - pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ - $(RM) $$pkg1 -endif - -tgz: tgz-kmod tgz-utils diff --git a/configure.ac b/configure.ac deleted file mode 100644 index ab53879e7..000000000 --- a/configure.ac +++ /dev/null @@ -1,88 +0,0 @@ -############################################################################### -# SPL AutoConf Configuration -############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). -# Written by Brian Behlendorf . -# UCRL-CODE-235197 -# -# This file is part of the SPL, Solaris Porting Layer. -# For details, see . -# -# The SPL is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# The SPL is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License along -# with the SPL. If not, see . -############################################################################### - -AC_INIT(m4_esyscmd(grep Name META | cut -d ':' -f 2 | tr -d ' \n'), - m4_esyscmd(grep Version META | cut -d ':' -f 2 | tr -d ' \n')) -AC_LANG(C) -SPL_AC_META -AC_CONFIG_AUX_DIR([config]) -AC_CONFIG_MACRO_DIR([config]) -AC_CANONICAL_SYSTEM -AM_MAINTAINER_MODE -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AM_INIT_AUTOMAKE -AC_CONFIG_HEADERS([spl_config.h], [ - (mv spl_config.h spl_config.h.tmp && - awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h && - rm spl_config.h.tmp) || exit 1]) - -AC_PROG_INSTALL -AC_PROG_CC -AC_PROG_LIBTOOL - -SPL_AC_LICENSE -SPL_AC_PACKAGE -SPL_AC_CONFIG -SPL_AC_DEBUG -SPL_AC_DEBUG_KMEM -SPL_AC_DEBUG_KMEM_TRACKING - -AC_CONFIG_FILES([ - Makefile - man/Makefile - man/man1/Makefile - man/man5/Makefile - lib/Makefile - cmd/Makefile - cmd/splat/Makefile - cmd/splslab/Makefile - module/Makefile - module/spl/Makefile - module/splat/Makefile - include/Makefile - include/fs/Makefile - include/linux/Makefile - include/rpc/Makefile - include/sharefs/Makefile - include/sys/Makefile - include/sys/fm/Makefile - include/sys/fs/Makefile - include/util/Makefile - include/vm/Makefile - scripts/Makefile - rpm/Makefile - rpm/redhat/Makefile - rpm/redhat/spl.spec - rpm/redhat/spl-kmod.spec - rpm/redhat/spl-dkms.spec - rpm/generic/Makefile - rpm/generic/spl.spec - rpm/generic/spl-kmod.spec - rpm/generic/spl-dkms.spec - spl.release -]) - -AC_OUTPUT diff --git a/copy-builtin b/copy-builtin deleted file mode 100755 index 34c482bab..000000000 --- a/copy-builtin +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -set -e - -usage() -{ - echo "usage: $0 " >&2 - exit 1 -} - -[ "$#" -eq 1 ] || usage -KERNEL_DIR="$(readlink --canonicalize-existing "$1")" - -MODULES=() -for MODULE_DIR in module/* -do - [ -d "$MODULE_DIR" ] || continue - MODULES+=("${MODULE_DIR##*/}") -done - -if ! [ -e 'spl_config.h' ] -then - echo >&2 - echo " $0: you did not run configure, or you're not in the SPL source directory." >&2 - echo " $0: run configure with --with-linux=$KERNEL_DIR and --enable-linux-builtin." >&2 - echo >&2 - exit 1 -fi - -make clean || true - -rm -rf "$KERNEL_DIR/include/spl" "$KERNEL_DIR/spl" -cp --recursive include "$KERNEL_DIR/include/spl" -cp --recursive module "$KERNEL_DIR/spl" -cp spl_config.h "$KERNEL_DIR/" -cp spl.release.in "$KERNEL_DIR/" - -adjust_obj_paths() -{ - local FILE="$1" - local LINE OBJPATH - - while IFS='' read -r LINE - do - OBJPATH="${LINE#\$(MODULE)-objs += }" - if [ "$OBJPATH" = "$LINE" ] - then - echo "$LINE" - else - echo "\$(MODULE)-objs += ${OBJPATH##*/}" - fi - done < "$FILE" > "$FILE.new" - mv "$FILE.new" "$FILE" -} - -for MODULE in "${MODULES[@]}" -do - adjust_obj_paths "$KERNEL_DIR/spl/$MODULE/Makefile" - sed -i.bak '/obj =/d' "$KERNEL_DIR/spl/$MODULE/Makefile" - sed -i.bak '/src =/d' "$KERNEL_DIR/spl/$MODULE/Makefile" -done - -cat > "$KERNEL_DIR/spl/Kconfig" <<"EOF" -config SPL - tristate "Solaris Porting Layer (SPL)" - help - This is the SPL library from the ZFS On Linux project. - - See http://zfsonlinux.org/ - - To compile this library as a module, choose M here. - - If unsure, say N. -EOF - -{ - cat <<-"EOF" - SPL_MODULE_CFLAGS = -I$(srctree)/include/spl - SPL_MODULE_CFLAGS += -include $(srctree)/spl_config.h - export SPL_MODULE_CFLAGS - - obj-$(CONFIG_SPL) := - EOF - - for MODULE in "${MODULES[@]}" - do - echo 'obj-$(CONFIG_SPL) += ' "$MODULE/" - done -} > "$KERNEL_DIR/spl/Kbuild" - -add_after() -{ - local FILE="$1" - local MARKER="$2" - local NEW="$3" - local LINE - - while IFS='' read -r LINE - do - echo "$LINE" - - if [ -n "$MARKER" -a "$LINE" = "$MARKER" ] - then - echo "$NEW" - MARKER='' - if IFS='' read -r LINE - then - [ "$LINE" != "$NEW" ] && echo "$LINE" - fi - fi - done < "$FILE" > "$FILE.new" - - mv "$FILE.new" "$FILE" -} - -add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"' -# We must take care to build SPL before ZFS, otherwise the symbols required -# to link ZFS will not be available. -sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile" - -echo >&2 -echo " $0: done." >&2 -echo " $0: now you can build the kernel with SPL support." >&2 -echo " $0: make sure you enable SPL support (CONFIG_SPL) before building." >&2 -echo >&2 - diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index 3200222db..000000000 --- a/include/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -SUBDIRS = fs linux rpc sharefs sys util vm - -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/splat-ctl.h \ - $(top_srcdir)/include/spl-ctl.h \ - $(top_srcdir)/include/strings.h \ - $(top_srcdir)/include/unistd.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am deleted file mode 100644 index e0da4b32a..000000000 --- a/include/fs/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/fs/fs_subr.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/fs -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/fs/fs_subr.h b/include/fs/fs_subr.h deleted file mode 100644 index 71f074205..000000000 --- a/include/fs/fs_subr.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_FS_FS_SUBR_H -#define _SPL_FS_FS_SUBR_H - -#endif /* SPL_FS_FS_SUBR_H */ diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am deleted file mode 100644 index 712e94ebe..000000000 --- a/include/linux/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/linux/bitops_compat.h \ - $(top_srcdir)/include/linux/compiler_compat.h \ - $(top_srcdir)/include/linux/delay_compat.h \ - $(top_srcdir)/include/linux/file_compat.h \ - $(top_srcdir)/include/linux/list_compat.h \ - $(top_srcdir)/include/linux/math64_compat.h \ - $(top_srcdir)/include/linux/mm_compat.h \ - $(top_srcdir)/include/linux/proc_compat.h \ - $(top_srcdir)/include/linux/rwsem_compat.h \ - $(top_srcdir)/include/linux/wait_compat.h \ - $(top_srcdir)/include/linux/zlib_compat.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/linux -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h deleted file mode 100644 index a62b628e8..000000000 --- a/include/linux/bitops_compat.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_BITOPS_COMPAT_H -#define _SPL_BITOPS_COMPAT_H - -#include - -#endif /* _SPL_BITOPS_COMPAT_H */ diff --git a/include/linux/compiler_compat.h b/include/linux/compiler_compat.h deleted file mode 100644 index 696d79572..000000000 --- a/include/linux/compiler_compat.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_COMPILER_COMPAT_H -#define _SPL_COMPILER_COMPAT_H - -#include - -#ifndef ACCESS_ONCE -/* - * Prevent the compiler from merging or refetching accesses. The compiler - * is also forbidden from reordering successive instances of ACCESS_ONCE(), - * but only when the compiler is aware of some particular ordering. One way - * to make the compiler aware of ordering is to put the two invocations of - * ACCESS_ONCE() in different C statements. - * - * This macro does absolutely -nothing- to prevent the CPU from reordering, - * merging, or refetching absolutely anything at any time. Its main intended - * use is to mediate communication between process-level code and irq/NMI - * handlers, all running on the same CPU. - */ -/* Taken from 2.6.33.2 */ -#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) -#endif - -#endif /* _SPL_COMPILER_COMPAT_H */ diff --git a/include/linux/delay_compat.h b/include/linux/delay_compat.h deleted file mode 100644 index c7a381100..000000000 --- a/include/linux/delay_compat.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_DELAY_COMPAT_H -#define _SPL_DELAY_COMPAT_H - -#include -#include - -/* usleep_range() introduced in 2.6.36 */ -#ifndef HAVE_USLEEP_RANGE - -static inline void -usleep_range(unsigned long min, unsigned long max) -{ - unsigned int min_ms = min / USEC_PER_MSEC; - - if (min >= MAX_UDELAY_MS) - msleep(min_ms); - else - udelay(min); -} - -#endif /* HAVE_USLEEP_RANGE */ - -#endif /* _SPL_DELAY_COMPAT_H */ diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h deleted file mode 100644 index 55ba2cc76..000000000 --- a/include/linux/file_compat.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_FILE_COMPAT_H -#define _SPL_FILE_COMPAT_H - -#include -#include -#ifdef HAVE_FDTABLE_HEADER -#include -#endif - -static inline struct file * -spl_filp_open(const char *name, int flags, int mode, int *err) -{ - struct file *filp = NULL; - int rc; - - filp = filp_open(name, flags, mode); - if (IS_ERR(filp)) { - rc = PTR_ERR(filp); - if (err) - *err = rc; - filp = NULL; - } - return (filp); -} - -#define spl_filp_close(f) filp_close(f, NULL) -#define spl_filp_poff(f) (&(f)->f_pos) -#define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p) - -static inline int -spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) -{ - int error = -EOPNOTSUPP; - -#ifdef HAVE_FILE_FALLOCATE - if (fp->f_op->fallocate) - error = fp->f_op->fallocate(fp, mode, offset, len); -#else -#ifdef HAVE_INODE_FALLOCATE - if (fp->f_dentry && fp->f_dentry->d_inode && - fp->f_dentry->d_inode->i_op->fallocate) - error = fp->f_dentry->d_inode->i_op->fallocate( - fp->f_dentry->d_inode, mode, offset, len); -#endif /* HAVE_INODE_FALLOCATE */ -#endif /* HAVE_FILE_FALLOCATE */ - - return (error); -} - -static inline ssize_t -spl_kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos) -{ -#if defined(HAVE_KERNEL_WRITE_PPOS) - return (kernel_write(file, buf, count, pos)); -#else - mm_segment_t saved_fs; - ssize_t ret; - - saved_fs = get_fs(); - set_fs(get_ds()); - - ret = vfs_write(file, (__force const char __user *)buf, count, pos); - - set_fs(saved_fs); - - return (ret); -#endif -} - -static inline ssize_t -spl_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) -{ -#if defined(HAVE_KERNEL_READ_PPOS) - return (kernel_read(file, buf, count, pos)); -#else - mm_segment_t saved_fs; - ssize_t ret; - - saved_fs = get_fs(); - set_fs(get_ds()); - - ret = vfs_read(file, (void __user *)buf, count, pos); - - set_fs(saved_fs); - - return (ret); -#endif -} - -#ifdef HAVE_2ARGS_VFS_FSYNC -#define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync) -#else -#define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync) -#endif /* HAVE_2ARGS_VFS_FSYNC */ - -#ifdef HAVE_INODE_LOCK_SHARED -#define spl_inode_lock(ip) inode_lock(ip) -#define spl_inode_unlock(ip) inode_unlock(ip) -#define spl_inode_lock_shared(ip) inode_lock_shared(ip) -#define spl_inode_unlock_shared(ip) inode_unlock_shared(ip) -#define spl_inode_trylock(ip) inode_trylock(ip) -#define spl_inode_trylock_shared(ip) inode_trylock_shared(ip) -#define spl_inode_is_locked(ip) inode_is_locked(ip) -#define spl_inode_lock_nested(ip, s) inode_lock_nested(ip, s) -#else -#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex) -#define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex) -#define spl_inode_lock_shared(ip) mutex_lock(&(ip)->i_mutex) -#define spl_inode_unlock_shared(ip) mutex_unlock(&(ip)->i_mutex) -#define spl_inode_trylock(ip) mutex_trylock(&(ip)->i_mutex) -#define spl_inode_trylock_shared(ip) mutex_trylock(&(ip)->i_mutex) -#define spl_inode_is_locked(ip) mutex_is_locked(&(ip)->i_mutex) -#define spl_inode_lock_nested(ip, s) mutex_lock_nested(&(ip)->i_mutex, s) -#endif - -#endif /* SPL_FILE_COMPAT_H */ diff --git a/include/linux/list_compat.h b/include/linux/list_compat.h deleted file mode 100644 index fece8ad34..000000000 --- a/include/linux/list_compat.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_LIST_COMPAT_H -#define _SPL_LIST_COMPAT_H - -#include - -#ifndef list_for_each_entry_safe_reverse - -/* - * list_for_each_entry_safe_reverse - * @pos: the type * to use as a loop cursor. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - * - * Iterate backwards over list of given type, safe against removal - * of list entry. - */ -#define list_for_each_entry_safe_reverse(pos, n, head, member) \ - for (pos = list_entry((head)->prev, typeof(*pos), member), \ - n = list_entry(pos->member.prev, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.prev, typeof(*n), member)) - -#endif /* list_for_each_entry_safe_reverse */ - -#endif /* SPL_LIST_COMPAT_H */ diff --git a/include/linux/math64_compat.h b/include/linux/math64_compat.h deleted file mode 100644 index c02f58479..000000000 --- a/include/linux/math64_compat.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_MATH64_COMPAT_H -#define _SPL_MATH64_COMPAT_H - -#ifndef abs64 -/* CSTYLED */ -#define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; }) -#endif - -#endif /* _SPL_MATH64_COMPAT_H */ diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h deleted file mode 100644 index 91d914e10..000000000 --- a/include/linux/proc_compat.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_PROC_COMPAT_H -#define _SPL_PROC_COMPAT_H - -#include - -extern struct proc_dir_entry *proc_spl_kstat; - -int spl_proc_init(void); -void spl_proc_fini(void); - -#endif /* SPL_PROC_COMPAT_H */ diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h deleted file mode 100644 index 7a0dcf8dc..000000000 --- a/include/linux/rwsem_compat.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_RWSEM_COMPAT_H -#define _SPL_RWSEM_COMPAT_H - -#include - -#if defined(CONFIG_PREEMPT_RT_FULL) -#define SPL_RWSEM_SINGLE_READER_VALUE (1) -#define SPL_RWSEM_SINGLE_WRITER_VALUE (0) -#elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK) -#define SPL_RWSEM_SINGLE_READER_VALUE (1) -#define SPL_RWSEM_SINGLE_WRITER_VALUE (-1) -#else -#define SPL_RWSEM_SINGLE_READER_VALUE (RWSEM_ACTIVE_READ_BIAS) -#define SPL_RWSEM_SINGLE_WRITER_VALUE (RWSEM_ACTIVE_WRITE_BIAS) -#endif - -/* Linux 3.16 changed activity to count for rwsem-spinlock */ -#if defined(CONFIG_PREEMPT_RT_FULL) -#define RWSEM_COUNT(sem) sem->read_depth -#elif defined(HAVE_RWSEM_ACTIVITY) -#define RWSEM_COUNT(sem) sem->activity -/* Linux 4.8 changed count to an atomic_long_t for !rwsem-spinlock */ -#elif defined(HAVE_RWSEM_ATOMIC_LONG_COUNT) -#define RWSEM_COUNT(sem) atomic_long_read(&(sem)->count) -#else -#define RWSEM_COUNT(sem) sem->count -#endif - -int rwsem_tryupgrade(struct rw_semaphore *rwsem); - -#if defined(RWSEM_SPINLOCK_IS_RAW) -#define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl) -#define spl_rwsem_unlock_irqrestore(lk, fl) \ - raw_spin_unlock_irqrestore(lk, fl) -#define spl_rwsem_trylock_irqsave(lk, fl) raw_spin_trylock_irqsave(lk, fl) -#else -#define spl_rwsem_lock_irqsave(lk, fl) spin_lock_irqsave(lk, fl) -#define spl_rwsem_unlock_irqrestore(lk, fl) spin_unlock_irqrestore(lk, fl) -#define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl) -#endif /* RWSEM_SPINLOCK_IS_RAW */ - -#define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem) - -#endif /* _SPL_RWSEM_COMPAT_H */ diff --git a/include/linux/zlib_compat.h b/include/linux/zlib_compat.h deleted file mode 100644 index 3c14285d2..000000000 --- a/include/linux/zlib_compat.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2011 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_ZLIB_COMPAT_H -#define _SPL_ZLIB_COMPAT_H - -#include - -#ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE -#define spl_zlib_deflate_workspacesize(wb, ml) \ - zlib_deflate_workspacesize(wb, ml) -#else -#define spl_zlib_deflate_workspacesize(wb, ml) \ - zlib_deflate_workspacesize() -#endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ - -#endif /* SPL_ZLIB_COMPAT_H */ diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am deleted file mode 100644 index cfc824685..000000000 --- a/include/rpc/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/rpc/types.h \ - $(top_srcdir)/include/rpc/xdr.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/rpc/types.h b/include/rpc/types.h deleted file mode 100644 index 4fb5415ab..000000000 --- a/include/rpc/types.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_RPC_TYPES_H -#define _SPL_RPC_TYPES_H - -typedef int bool_t; - -#endif /* SPL_RPC_TYPES_H */ diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am deleted file mode 100644 index 10e709325..000000000 --- a/include/sharefs/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/sharefs/share.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/sharefs/share.h b/include/sharefs/share.h deleted file mode 100644 index a5bf0e2e1..000000000 --- a/include/sharefs/share.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SHARE_H -#define _SPL_SHARE_H - -#endif /* SPL_SHARE_H */ diff --git a/include/spl-ctl.h b/include/spl-ctl.h deleted file mode 100644 index 571887d1d..000000000 --- a/include/spl-ctl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _DEBUG_CTL_H -#define _DEBUG_CTL_H - -/* - * Contains shared definitions which both the user space - * and kernel space portions of splat must agree on. - */ -typedef struct spl_debug_header { - int ph_len; - int ph_flags; - int ph_subsys; - int ph_mask; - int ph_cpu_id; - int ph_sec; - long ph_usec; - int ph_stack; - int ph_pid; - int ph_line_num; -} spl_debug_header_t; - -#endif /* _DEBUG_CTL_H */ diff --git a/include/rpc/xdr.h b/include/spl/rpc/xdr.h similarity index 99% rename from include/rpc/xdr.h rename to include/spl/rpc/xdr.h index e349757d5..0b39b46cf 100644 --- a/include/rpc/xdr.h +++ b/include/spl/rpc/xdr.h @@ -23,7 +23,8 @@ #define _SPL_RPC_XDR_H #include -#include + +typedef int bool_t; /* * XDR enums and types. diff --git a/include/sys/acl.h b/include/spl/sys/acl.h similarity index 100% rename from include/sys/acl.h rename to include/spl/sys/acl.h diff --git a/include/spl/sys/atomic.h b/include/spl/sys/atomic.h new file mode 100644 index 000000000..51b547923 --- /dev/null +++ b/include/spl/sys/atomic.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2007 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Brian Behlendorf . + * UCRL-CODE-235197 + * + * This file is part of the SPL, Solaris Porting Layer. + * For details, see . + * + * The SPL is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The SPL is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with the SPL. If not, see . + */ + +#ifndef _SPL_ATOMIC_H +#define _SPL_ATOMIC_H + +#include +#include +#include + +/* + * Map the atomic_* functions to the Linux counterparts. This relies on the + * fact that the atomic types are internally really a uint32 or uint64. If + * this were to change an alternate approach would be needed. + * + * N.B. Due to the limitations of the original API atomicity is not strictly + * preserved when using the 64-bit functions on a 32-bit system. In order + * to support this all consumers would need to be updated to use the Linux + * provided atomic_t and atomic64_t types. + */ +#define atomic_inc_32(v) atomic_inc((atomic_t *)(v)) +#define atomic_dec_32(v) atomic_dec((atomic_t *)(v)) +#define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v)) +#define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v)) +#define atomic_inc_32_nv(v) atomic_inc_return((atomic_t *)(v)) +#define atomic_dec_32_nv(v) atomic_dec_return((atomic_t *)(v)) +#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) +#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) +#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) +#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x) +#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v)) +#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) +#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) +#define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v)) +#define atomic_inc_64_nv(v) atomic64_inc_return((atomic64_t *)(v)) +#define atomic_dec_64_nv(v) atomic64_dec_return((atomic64_t *)(v)) +#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) +#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) +#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) +#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x) + +#ifdef _LP64 +static __inline__ void * +atomic_cas_ptr(volatile void *target, void *cmp, void *newval) +{ + return ((void *)atomic_cas_64((volatile uint64_t *)target, + (uint64_t)cmp, (uint64_t)newval)); +} +#else /* _LP64 */ +static __inline__ void * +atomic_cas_ptr(volatile void *target, void *cmp, void *newval) +{ + return ((void *)atomic_cas_32((volatile uint32_t *)target, + (uint32_t)cmp, (uint32_t)newval)); +} +#endif /* _LP64 */ + +#endif /* _SPL_ATOMIC_H */ diff --git a/include/sys/byteorder.h b/include/spl/sys/byteorder.h similarity index 89% rename from include/sys/byteorder.h rename to include/spl/sys/byteorder.h index a0ff424f8..477707996 100644 --- a/include/sys/byteorder.h +++ b/include/spl/sys/byteorder.h @@ -28,6 +28,11 @@ #include #include +#define BSWAP_8(x) ((x) & 0xff) +#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) +#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) +#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) + #define LE_16(x) cpu_to_le16(x) #define LE_32(x) cpu_to_le32(x) #define LE_64(x) cpu_to_le64(x) diff --git a/include/sys/callb.h b/include/spl/sys/callb.h similarity index 100% rename from include/sys/callb.h rename to include/spl/sys/callb.h diff --git a/include/sys/callo.h b/include/spl/sys/callo.h similarity index 100% rename from include/sys/callo.h rename to include/spl/sys/callo.h diff --git a/include/sys/cmn_err.h b/include/spl/sys/cmn_err.h similarity index 91% rename from include/sys/cmn_err.h rename to include/spl/sys/cmn_err.h index 594a76333..be57358b0 100644 --- a/include/sys/cmn_err.h +++ b/include/spl/sys/cmn_err.h @@ -25,7 +25,7 @@ #ifndef _SPL_CMN_ERR_H #define _SPL_CMN_ERR_H -#include +#include #define CE_CONT 0 /* continuation */ #define CE_NOTE 1 /* notice */ @@ -34,8 +34,8 @@ #define CE_IGNORE 4 /* print nothing */ extern void cmn_err(int, const char *, ...); -extern void vcmn_err(int, const char *, __va_list); -extern void vpanic(const char *, __va_list); +extern void vcmn_err(int, const char *, va_list); +extern void vpanic(const char *, va_list); #define fm_panic panic diff --git a/include/sys/condvar.h b/include/spl/sys/condvar.h similarity index 98% rename from include/sys/condvar.h rename to include/spl/sys/condvar.h index 5fcc9068a..1d47cdd96 100644 --- a/include/sys/condvar.h +++ b/include/spl/sys/condvar.h @@ -26,11 +26,10 @@ #define _SPL_CONDVAR_H #include -#include -#include #include #include #include +#include /* * The kcondvar_t struct is protected by mutex taken externally before diff --git a/include/sys/console.h b/include/spl/sys/console.h similarity index 100% rename from include/sys/console.h rename to include/spl/sys/console.h diff --git a/include/sys/cred.h b/include/spl/sys/cred.h similarity index 99% rename from include/sys/cred.h rename to include/spl/sys/cred.h index e4b18b665..fd063399b 100644 --- a/include/sys/cred.h +++ b/include/spl/sys/cred.h @@ -26,6 +26,7 @@ #define _SPL_CRED_H #include +#include #include #include diff --git a/include/sys/ctype.h b/include/spl/sys/ctype.h similarity index 100% rename from include/sys/ctype.h rename to include/spl/sys/ctype.h diff --git a/include/sys/debug.h b/include/spl/sys/debug.h similarity index 100% rename from include/sys/debug.h rename to include/spl/sys/debug.h diff --git a/include/sys/disp.h b/include/spl/sys/disp.h similarity index 100% rename from include/sys/disp.h rename to include/spl/sys/disp.h diff --git a/include/sys/dkio.h b/include/spl/sys/dkio.h similarity index 100% rename from include/sys/dkio.h rename to include/spl/sys/dkio.h diff --git a/include/sys/dkioc_free_util.h b/include/spl/sys/dkioc_free_util.h similarity index 100% rename from include/sys/dkioc_free_util.h rename to include/spl/sys/dkioc_free_util.h diff --git a/include/sys/fcntl.h b/include/spl/sys/fcntl.h similarity index 100% rename from include/sys/fcntl.h rename to include/spl/sys/fcntl.h diff --git a/include/sys/file.h b/include/spl/sys/file.h similarity index 50% rename from include/sys/file.h rename to include/spl/sys/file.h index b6c40aff2..05dbc0814 100644 --- a/include/sys/file.h +++ b/include/spl/sys/file.h @@ -25,7 +25,28 @@ #ifndef _SPL_FILE_H #define _SPL_FILE_H -#define FIGNORECASE 0x00080000 -#define FKIOCTL 0x80000000 +#define FIGNORECASE 0x00080000 +#define FKIOCTL 0x80000000 +#define ED_CASE_CONFLICT 0x10 + +#ifdef HAVE_INODE_LOCK_SHARED +#define spl_inode_lock(ip) inode_lock(ip) +#define spl_inode_unlock(ip) inode_unlock(ip) +#define spl_inode_lock_shared(ip) inode_lock_shared(ip) +#define spl_inode_unlock_shared(ip) inode_unlock_shared(ip) +#define spl_inode_trylock(ip) inode_trylock(ip) +#define spl_inode_trylock_shared(ip) inode_trylock_shared(ip) +#define spl_inode_is_locked(ip) inode_is_locked(ip) +#define spl_inode_lock_nested(ip, s) inode_lock_nested(ip, s) +#else +#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex) +#define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex) +#define spl_inode_lock_shared(ip) mutex_lock(&(ip)->i_mutex) +#define spl_inode_unlock_shared(ip) mutex_unlock(&(ip)->i_mutex) +#define spl_inode_trylock(ip) mutex_trylock(&(ip)->i_mutex) +#define spl_inode_trylock_shared(ip) mutex_trylock(&(ip)->i_mutex) +#define spl_inode_is_locked(ip) mutex_is_locked(&(ip)->i_mutex) +#define spl_inode_lock_nested(ip, s) mutex_lock_nested(&(ip)->i_mutex, s) +#endif #endif /* SPL_FILE_H */ diff --git a/include/sys/inttypes.h b/include/spl/sys/inttypes.h similarity index 100% rename from include/sys/inttypes.h rename to include/spl/sys/inttypes.h diff --git a/include/sys/isa_defs.h b/include/spl/sys/isa_defs.h similarity index 100% rename from include/sys/isa_defs.h rename to include/spl/sys/isa_defs.h diff --git a/include/sys/kmem.h b/include/spl/sys/kmem.h similarity index 100% rename from include/sys/kmem.h rename to include/spl/sys/kmem.h diff --git a/include/sys/kmem_cache.h b/include/spl/sys/kmem_cache.h similarity index 100% rename from include/sys/kmem_cache.h rename to include/spl/sys/kmem_cache.h diff --git a/include/sys/kobj.h b/include/spl/sys/kobj.h similarity index 100% rename from include/sys/kobj.h rename to include/spl/sys/kobj.h diff --git a/include/sys/kstat.h b/include/spl/sys/kstat.h similarity index 99% rename from include/sys/kstat.h rename to include/spl/sys/kstat.h index e9aff7386..9170fe24e 100644 --- a/include/sys/kstat.h +++ b/include/spl/sys/kstat.h @@ -26,11 +26,11 @@ #define _SPL_KSTAT_H #include -#include #include #include #include #include +#include #define KSTAT_STRLEN 255 #define KSTAT_RAW_MAX (128*1024) diff --git a/include/sys/list.h b/include/spl/sys/list.h similarity index 95% rename from include/sys/list.h rename to include/spl/sys/list.h index d80c8474e..74b784e93 100644 --- a/include/sys/list.h +++ b/include/spl/sys/list.h @@ -72,10 +72,6 @@ list_link_init(list_node_t *node) static inline void list_create(list_t *list, size_t size, size_t offset) { - ASSERT(list); - ASSERT(size > 0); - ASSERT(size >= offset + sizeof (list_node_t)); - list->list_size = size; list->list_offset = offset; INIT_LIST_HEAD(&list->list_head); @@ -84,9 +80,6 @@ list_create(list_t *list, size_t size, size_t offset) static inline void list_destroy(list_t *list) { - ASSERT(list); - ASSERT(list_is_empty(list)); - list_del(&list->list_head); } @@ -123,7 +116,6 @@ list_insert_before(list_t *list, void *object, void *nobject) static inline void list_remove(list_t *list, void *object) { - ASSERT(!list_is_empty(list)); list_del(list_d2l(list, object)); } @@ -206,9 +198,6 @@ spl_list_move_tail(list_t *dst, list_t *src) static inline void list_link_replace(list_node_t *old_node, list_node_t *new_node) { - ASSERT(list_link_active(old_node)); - ASSERT(!list_link_active(new_node)); - new_node->next = old_node->next; new_node->prev = old_node->prev; old_node->prev->next = new_node; diff --git a/include/sys/mode.h b/include/spl/sys/mode.h similarity index 100% rename from include/sys/mode.h rename to include/spl/sys/mode.h diff --git a/include/sys/mutex.h b/include/spl/sys/mutex.h similarity index 99% rename from include/sys/mutex.h rename to include/spl/sys/mutex.h index c7084b3c3..f906d49d4 100644 --- a/include/sys/mutex.h +++ b/include/spl/sys/mutex.h @@ -27,7 +27,6 @@ #include #include -#include #include typedef enum { diff --git a/include/sys/param.h b/include/spl/sys/param.h similarity index 100% rename from include/sys/param.h rename to include/spl/sys/param.h diff --git a/include/sys/proc.h b/include/spl/sys/proc.h similarity index 89% rename from include/sys/proc.h rename to include/spl/sys/proc.h index 95fc8cc5f..287683920 100644 --- a/include/sys/proc.h +++ b/include/spl/sys/proc.h @@ -25,4 +25,11 @@ #ifndef _SPL_PROC_H #define _SPL_PROC_H +#include + +extern struct proc_dir_entry *proc_spl_kstat; + +int spl_proc_init(void); +void spl_proc_fini(void); + #endif /* SPL_PROC_H */ diff --git a/include/sys/processor.h b/include/spl/sys/processor.h similarity index 100% rename from include/sys/processor.h rename to include/spl/sys/processor.h diff --git a/include/sys/random.h b/include/spl/sys/random.h similarity index 100% rename from include/sys/random.h rename to include/spl/sys/random.h diff --git a/include/sys/rwlock.h b/include/spl/sys/rwlock.h similarity index 78% rename from include/sys/rwlock.h rename to include/spl/sys/rwlock.h index bb8b785e8..b44ceab66 100644 --- a/include/sys/rwlock.h +++ b/include/spl/sys/rwlock.h @@ -27,7 +27,43 @@ #include #include -#include + +/* Linux kernel compatibility */ +#if defined(CONFIG_PREEMPT_RT_FULL) +#define SPL_RWSEM_SINGLE_READER_VALUE (1) +#define SPL_RWSEM_SINGLE_WRITER_VALUE (0) +#elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK) +#define SPL_RWSEM_SINGLE_READER_VALUE (1) +#define SPL_RWSEM_SINGLE_WRITER_VALUE (-1) +#else +#define SPL_RWSEM_SINGLE_READER_VALUE (RWSEM_ACTIVE_READ_BIAS) +#define SPL_RWSEM_SINGLE_WRITER_VALUE (RWSEM_ACTIVE_WRITE_BIAS) +#endif + +/* Linux 3.16 changed activity to count for rwsem-spinlock */ +#if defined(CONFIG_PREEMPT_RT_FULL) +#define RWSEM_COUNT(sem) sem->read_depth +#elif defined(HAVE_RWSEM_ACTIVITY) +#define RWSEM_COUNT(sem) sem->activity +/* Linux 4.8 changed count to an atomic_long_t for !rwsem-spinlock */ +#elif defined(HAVE_RWSEM_ATOMIC_LONG_COUNT) +#define RWSEM_COUNT(sem) atomic_long_read(&(sem)->count) +#else +#define RWSEM_COUNT(sem) sem->count +#endif + +#if defined(RWSEM_SPINLOCK_IS_RAW) +#define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl) +#define spl_rwsem_unlock_irqrestore(lk, fl) \ + raw_spin_unlock_irqrestore(lk, fl) +#define spl_rwsem_trylock_irqsave(lk, fl) raw_spin_trylock_irqsave(lk, fl) +#else +#define spl_rwsem_lock_irqsave(lk, fl) spin_lock_irqsave(lk, fl) +#define spl_rwsem_unlock_irqrestore(lk, fl) spin_unlock_irqrestore(lk, fl) +#define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl) +#endif /* RWSEM_SPINLOCK_IS_RAW */ + +#define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem) typedef enum { RW_DRIVER = 2, @@ -232,5 +268,6 @@ RW_LOCK_HELD(krwlock_t *rwp) int spl_rw_init(void); void spl_rw_fini(void); +int rwsem_tryupgrade(struct rw_semaphore *rwsem); #endif /* _SPL_RWLOCK_H */ diff --git a/include/linux/mm_compat.h b/include/spl/sys/shrinker.h similarity index 98% rename from include/linux/mm_compat.h rename to include/spl/sys/shrinker.h index c10652efd..28c1fa78c 100644 --- a/include/linux/mm_compat.h +++ b/include/spl/sys/shrinker.h @@ -22,8 +22,8 @@ * with the SPL. If not, see . */ -#ifndef _SPL_MM_COMPAT_H -#define _SPL_MM_COMPAT_H +#ifndef _SPL_SHRINKER_H +#define _SPL_SHRINKER_H #include #include @@ -206,4 +206,4 @@ typedef int spl_shrinker_t; #define SHRINK_STOP (-1) #endif -#endif /* SPL_MM_COMPAT_H */ +#endif /* SPL_SHRINKER_H */ diff --git a/include/sys/sid.h b/include/spl/sys/sid.h similarity index 100% rename from include/sys/sid.h rename to include/spl/sys/sid.h diff --git a/include/sys/signal.h b/include/spl/sys/signal.h similarity index 100% rename from include/sys/signal.h rename to include/spl/sys/signal.h diff --git a/include/sys/stat.h b/include/spl/sys/stat.h similarity index 100% rename from include/sys/stat.h rename to include/spl/sys/stat.h diff --git a/include/sys/idmap.h b/include/spl/sys/strings.h similarity index 71% rename from include/sys/idmap.h rename to include/spl/sys/strings.h index abbfcbed1..4fb803206 100644 --- a/include/sys/idmap.h +++ b/include/spl/sys/strings.h @@ -1,7 +1,6 @@ /* - * Copyright (C) 2010 Lawrence Livermore National Security, LLC. + * Copyright (C) 2018 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. @@ -20,10 +19,13 @@ * You should have received a copy of the GNU General Public License along * with the SPL. If not, see . */ +#ifndef _SPL_SYS_STRINGS_H +#define _SPL_SYS_STRINGS_H -#ifndef _SPL_IDMAP_H -#define _SPL_IDMAP_H +#include -#define IDMAP_WK_CREATOR_OWNER_UID 2147483648U +#define bzero(ptr, size) memset(ptr, 0, size) +#define bcopy(src, dest, size) memmove(dest, src, size) +#define bcmp(src, dest, size) memcmp((src), (dest), (size_t)(size)) -#endif /* SPL_IDMAP_H */ +#endif /* _SPL_SYS_STRINGS_H */ diff --git a/include/sys/sunddi.h b/include/spl/sys/sunddi.h similarity index 98% rename from include/sys/sunddi.h rename to include/spl/sys/sunddi.h index 1bae594c8..29a6fe00d 100644 --- a/include/sys/sunddi.h +++ b/include/spl/sys/sunddi.h @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/include/sys/sysmacros.h b/include/spl/sys/sysmacros.h similarity index 91% rename from include/sys/sysmacros.h rename to include/spl/sys/sysmacros.h index d083cebda..839e7fd8c 100644 --- a/include/sys/sysmacros.h +++ b/include/spl/sys/sysmacros.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -66,11 +65,10 @@ #define UINT64_MIN ULLONG_MIN #define NBBY 8 -#define ENOTSUP EOPNOTSUPP #define MAXMSGLEN 256 #define MAXNAMELEN 256 -#define MAXPATHLEN PATH_MAX +#define MAXPATHLEN 4096 #define MAXOFFSET_T LLONG_MAX #define MAXBSIZE 8192 #define DEV_BSIZE 512 @@ -117,19 +115,6 @@ #define PAGESHIFT PAGE_SHIFT #endif -/* from Solaris sys/byteorder.h */ -#define BSWAP_8(x) ((x) & 0xff) -#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8)) -#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16)) -#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) - -/* - * Map some simple functions. - */ -#define bzero(ptr, size) memset(ptr, 0, size) -#define bcopy(src, dest, size) memmove(dest, src, size) -#define bcmp(src, dest, size) memcmp((src), (dest), (size_t)(size)) - /* Dtrace probes do not exist in the linux kernel */ #ifdef DTRACE_PROBE #undef DTRACE_PROBE diff --git a/include/sys/systeminfo.h b/include/spl/sys/systeminfo.h similarity index 100% rename from include/sys/systeminfo.h rename to include/spl/sys/systeminfo.h diff --git a/include/sys/taskq.h b/include/spl/sys/taskq.h similarity index 99% rename from include/sys/taskq.h rename to include/spl/sys/taskq.h index 4d90a3563..7353367a2 100644 --- a/include/sys/taskq.h +++ b/include/spl/sys/taskq.h @@ -30,10 +30,10 @@ #include #include #include -#include #include #include #include +#include #define TASKQ_NAMELEN 31 diff --git a/include/sys/thread.h b/include/spl/sys/thread.h similarity index 97% rename from include/sys/thread.h rename to include/spl/sys/thread.h index 80cf49914..3762717da 100644 --- a/include/sys/thread.h +++ b/include/spl/sys/thread.h @@ -62,6 +62,8 @@ extern kthread_t *__thread_create(caddr_t stk, size_t stksize, int state, pri_t pri); extern void __thread_exit(void); extern struct task_struct *spl_kthread_create(int (*func)(void *), - void *data, const char namefmt[], ...); + void *data, const char namefmt[], ...); + +extern proc_t p0; #endif /* _SPL_THREAD_H */ diff --git a/include/sys/time.h b/include/spl/sys/time.h similarity index 100% rename from include/sys/time.h rename to include/spl/sys/time.h diff --git a/include/sys/timer.h b/include/spl/sys/timer.h similarity index 86% rename from include/sys/timer.h rename to include/spl/sys/timer.h index 821590e3a..a6b134570 100644 --- a/include/sys/timer.h +++ b/include/spl/sys/timer.h @@ -26,7 +26,9 @@ #define _SPL_TIMER_H #include +#include #include +#include #include #define lbolt ((clock_t)jiffies) @@ -51,6 +53,20 @@ #define delay(ticks) schedule_timeout_uninterruptible(ticks) +/* usleep_range() introduced in 2.6.36 */ +#ifndef HAVE_USLEEP_RANGE +static inline void +usleep_range(unsigned long min, unsigned long max) +{ + unsigned int min_ms = min / USEC_PER_MSEC; + + if (min >= MAX_UDELAY_MS) + msleep(min_ms); + else + udelay(min); +} +#endif /* HAVE_USLEEP_RANGE */ + #define SEC_TO_TICK(sec) ((sec) * HZ) #define MSEC_TO_TICK(ms) msecs_to_jiffies(ms) #define USEC_TO_TICK(us) usecs_to_jiffies(us) diff --git a/include/sys/tsd.h b/include/spl/sys/tsd.h similarity index 100% rename from include/sys/tsd.h rename to include/spl/sys/tsd.h diff --git a/include/sys/types.h b/include/spl/sys/types.h similarity index 57% rename from include/sys/types.h rename to include/spl/sys/types.h index e159dda21..a5b478127 100644 --- a/include/sys/types.h +++ b/include/spl/sys/types.h @@ -26,7 +26,6 @@ #define _SPL_TYPES_H #include -#include #ifndef ULLONG_MAX #define ULLONG_MAX (~0ULL) @@ -36,33 +35,36 @@ #define LLONG_MAX ((long long)(~0ULL>>1)) #endif -typedef enum { B_FALSE = 0, B_TRUE = 1 } boolean_t; -typedef unsigned long intptr_t; -typedef unsigned long ulong_t; -typedef unsigned int uint_t; -typedef unsigned char uchar_t; -typedef unsigned long long u_longlong_t; -typedef unsigned long long u_offset_t; -typedef unsigned long long rlim64_t; -typedef long long longlong_t; -typedef long long offset_t; -typedef struct task_struct kthread_t; -typedef struct task_struct proc_t; -typedef short pri_t; -typedef struct timespec timestruc_t; /* definition per SVr4 */ -typedef struct timespec timespec_t; -typedef longlong_t hrtime_t; -typedef unsigned short ushort_t; -typedef u_longlong_t len_t; -typedef longlong_t diskaddr_t; -typedef ushort_t o_mode_t; -typedef uint_t major_t; -typedef uint_t minor_t; -typedef ulong_t pgcnt_t; -typedef long spgcnt_t; -typedef short index_t; -typedef int id_t; +typedef enum { + B_FALSE = 0, + B_TRUE = 1 +} boolean_t; -extern proc_t p0; +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 unsigned long intptr_t; +typedef unsigned long long rlim64_t; + +typedef struct task_struct kthread_t; +typedef struct task_struct proc_t; + +typedef struct timespec timestruc_t; +typedef struct timespec timespec_t; +typedef longlong_t hrtime_t; + +typedef int id_t; +typedef short pri_t; +typedef short index_t; +typedef longlong_t offset_t; +typedef u_longlong_t u_offset_t; +typedef ulong_t pgcnt_t; + +typedef int major_t; +typedef int minor_t; #endif /* _SPL_TYPES_H */ diff --git a/include/sys/types32.h b/include/spl/sys/types32.h similarity index 97% rename from include/sys/types32.h rename to include/spl/sys/types32.h index 1b05b2a47..c60ba8c97 100644 --- a/include/sys/types32.h +++ b/include/spl/sys/types32.h @@ -25,7 +25,6 @@ #ifndef _SPL_TYPES32_H #define _SPL_TYPES32_H -#include #include typedef uint32_t caddr32_t; diff --git a/include/sys/uio.h b/include/spl/sys/uio.h similarity index 100% rename from include/sys/uio.h rename to include/spl/sys/uio.h diff --git a/include/sys/user.h b/include/spl/sys/user.h similarity index 100% rename from include/sys/user.h rename to include/spl/sys/user.h diff --git a/include/sys/vfs.h b/include/spl/sys/vfs.h similarity index 100% rename from include/sys/vfs.h rename to include/spl/sys/vfs.h diff --git a/include/sys/vmem.h b/include/spl/sys/vmem.h similarity index 100% rename from include/sys/vmem.h rename to include/spl/sys/vmem.h diff --git a/include/sys/vmsystm.h b/include/spl/sys/vmsystm.h similarity index 100% rename from include/sys/vmsystm.h rename to include/spl/sys/vmsystm.h diff --git a/include/sys/vnode.h b/include/spl/sys/vnode.h similarity index 99% rename from include/sys/vnode.h rename to include/spl/sys/vnode.h index 946654b7b..a3f7828e7 100644 --- a/include/sys/vnode.h +++ b/include/spl/sys/vnode.h @@ -41,7 +41,6 @@ #include #include #include -#include /* * Prior to linux-2.6.33 only O_DSYNC semantics were implemented and diff --git a/include/linux/wait_compat.h b/include/spl/sys/wait.h similarity index 95% rename from include/linux/wait_compat.h rename to include/spl/sys/wait.h index 10fe2d896..5311ff8b9 100644 --- a/include/linux/wait_compat.h +++ b/include/spl/sys/wait.h @@ -22,8 +22,8 @@ * with the SPL. If not, see . */ -#ifndef _SPL_WAIT_COMPAT_H -#define _SPL_WAIT_COMPAT_H +#ifndef _SPL_WAIT_H +#define _SPL_WAIT_H #include #include @@ -52,4 +52,4 @@ typedef wait_queue_head_t spl_wait_queue_head_t; typedef wait_queue_t spl_wait_queue_entry_t; #endif -#endif /* SPL_WAIT_COMPAT_H */ +#endif /* SPL_WAIT_H */ diff --git a/include/sys/zmod.h b/include/spl/sys/zmod.h similarity index 91% rename from include/sys/zmod.h rename to include/spl/sys/zmod.h index 5380bd6fd..95c1a3ed7 100644 --- a/include/sys/zmod.h +++ b/include/spl/sys/zmod.h @@ -59,6 +59,14 @@ #include #include +#ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE +#define spl_zlib_deflate_workspacesize(wb, ml) \ + zlib_deflate_workspacesize(wb, ml) +#else +#define spl_zlib_deflate_workspacesize(wb, ml) \ + zlib_deflate_workspacesize() +#endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + extern int z_compress_level(void *dest, size_t *destLen, const void *source, size_t sourceLen, int level); extern int z_uncompress(void *dest, size_t *destLen, const void *source, diff --git a/include/sys/zone.h b/include/spl/sys/zone.h similarity index 100% rename from include/sys/zone.h rename to include/spl/sys/zone.h diff --git a/include/splat-ctl.h b/include/splat-ctl.h deleted file mode 100644 index 0f020dc24..000000000 --- a/include/splat-ctl.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPLAT_CTL_H -#define _SPLAT_CTL_H - -#include - -/* - * Contains shared definitions for both user space and kernel space. To - * ensure 32-bit/64-bit interoperability over ioctl()'s only types with - * fixed sizes can be used. - */ -#define SPLAT_NAME "splatctl" -#define SPLAT_DEV "/dev/splatctl" - -#define SPLAT_NAME_SIZE 20 -#define SPLAT_DESC_SIZE 60 - -typedef struct splat_user { - char name[SPLAT_NAME_SIZE]; /* Short name */ - char desc[SPLAT_DESC_SIZE]; /* Short description */ - __u32 id; /* Unique numeric id */ -} splat_user_t; - -#define SPLAT_CFG_MAGIC 0x15263748U -typedef struct splat_cfg { - __u32 cfg_magic; /* Unique magic */ - __u32 cfg_cmd; /* Configure command */ - __s32 cfg_arg1; /* Configure command arg 1 */ - __s32 cfg_rc1; /* Configure response 1 */ - union { - struct { - __u32 size; - splat_user_t descs[0]; - } splat_subsystems; - struct { - __u32 size; - splat_user_t descs[0]; - } splat_tests; - } cfg_data; -} splat_cfg_t; - -#define SPLAT_CMD_MAGIC 0x9daebfc0U -typedef struct splat_cmd { - __u32 cmd_magic; /* Unique magic */ - __u32 cmd_subsystem; /* Target subsystem */ - __u32 cmd_test; /* Subsystem test */ - __u32 cmd_data_size; /* Opaque data size */ - char cmd_data_str[0]; /* Opaque data region */ -} splat_cmd_t; - -/* Valid ioctls */ -#define SPLAT_CFG _IOWR('f', 101, splat_cfg_t) -#define SPLAT_CMD _IOWR('f', 102, splat_cmd_t) - -/* Valid configuration commands */ -#define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */ -#define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */ -#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */ -#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */ -#define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */ -#define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */ - -/* - * Valid subsystem and test commands are defined in each subsystem as - * SPLAT_SUBSYSTEM_*. We do need to be careful to avoid collisions, the - * currently defined subsystems are as follows: - */ -#define SPLAT_SUBSYSTEM_KMEM 0x0100 -#define SPLAT_SUBSYSTEM_TASKQ 0x0200 -#define SPLAT_SUBSYSTEM_KRNG 0x0300 -#define SPLAT_SUBSYSTEM_MUTEX 0x0400 -#define SPLAT_SUBSYSTEM_CONDVAR 0x0500 -#define SPLAT_SUBSYSTEM_THREAD 0x0600 -#define SPLAT_SUBSYSTEM_RWLOCK 0x0700 -#define SPLAT_SUBSYSTEM_TIME 0x0800 -#define SPLAT_SUBSYSTEM_VNODE 0x0900 -#define SPLAT_SUBSYSTEM_KOBJ 0x0a00 -#define SPLAT_SUBSYSTEM_ATOMIC 0x0b00 -#define SPLAT_SUBSYSTEM_LIST 0x0c00 -#define SPLAT_SUBSYSTEM_GENERIC 0x0d00 -#define SPLAT_SUBSYSTEM_CRED 0x0e00 -#define SPLAT_SUBSYSTEM_ZLIB 0x0f00 -#define SPLAT_SUBSYSTEM_LINUX 0x1000 -#define SPLAT_SUBSYSTEM_UNKNOWN 0xff00 - -#endif /* _SPLAT_CTL_H */ diff --git a/include/strings.h b/include/strings.h deleted file mode 100644 index 18179c79e..000000000 --- a/include/strings.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_STRINGS_H -#define _SPL_STRINGS_H - -#endif /* SPL_STRINGS_H */ diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am deleted file mode 100644 index 45b658976..000000000 --- a/include/sys/Makefile.am +++ /dev/null @@ -1,113 +0,0 @@ -SUBDIRS = fm fs - -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/sys/acl.h \ - $(top_srcdir)/include/sys/acl_impl.h \ - $(top_srcdir)/include/sys/atomic.h \ - $(top_srcdir)/include/sys/attr.h \ - $(top_srcdir)/include/sys/bitmap.h \ - $(top_srcdir)/include/sys/bootconf.h \ - $(top_srcdir)/include/sys/bootprops.h \ - $(top_srcdir)/include/sys/buf.h \ - $(top_srcdir)/include/sys/byteorder.h \ - $(top_srcdir)/include/sys/callb.h \ - $(top_srcdir)/include/sys/callo.h \ - $(top_srcdir)/include/sys/cmn_err.h \ - $(top_srcdir)/include/sys/compress.h \ - $(top_srcdir)/include/sys/condvar.h \ - $(top_srcdir)/include/sys/conf.h \ - $(top_srcdir)/include/sys/console.h \ - $(top_srcdir)/include/sys/cpupart.h \ - $(top_srcdir)/include/sys/cpuvar.h \ - $(top_srcdir)/include/sys/crc32.h \ - $(top_srcdir)/include/sys/cred.h \ - $(top_srcdir)/include/sys/ctype.h \ - $(top_srcdir)/include/sys/ddi.h \ - $(top_srcdir)/include/sys/debug.h \ - $(top_srcdir)/include/sys/dirent.h \ - $(top_srcdir)/include/sys/disp.h \ - $(top_srcdir)/include/sys/dkio.h \ - $(top_srcdir)/include/sys/dkioc_free_util.h \ - $(top_srcdir)/include/sys/dklabel.h \ - $(top_srcdir)/include/sys/dnlc.h \ - $(top_srcdir)/include/sys/dumphdr.h \ - $(top_srcdir)/include/sys/efi_partition.h \ - $(top_srcdir)/include/sys/errno.h \ - $(top_srcdir)/include/sys/extdirent.h \ - $(top_srcdir)/include/sys/fcntl.h \ - $(top_srcdir)/include/sys/file.h \ - $(top_srcdir)/include/sys/idmap.h \ - $(top_srcdir)/include/sys/int_limits.h \ - $(top_srcdir)/include/sys/int_types.h \ - $(top_srcdir)/include/sys/inttypes.h \ - $(top_srcdir)/include/sys/isa_defs.h \ - $(top_srcdir)/include/sys/kidmap.h \ - $(top_srcdir)/include/sys/kmem.h \ - $(top_srcdir)/include/sys/kmem_cache.h \ - $(top_srcdir)/include/sys/kobj.h \ - $(top_srcdir)/include/sys/kstat.h \ - $(top_srcdir)/include/sys/list.h \ - $(top_srcdir)/include/sys/mkdev.h \ - $(top_srcdir)/include/sys/mntent.h \ - $(top_srcdir)/include/sys/modctl.h \ - $(top_srcdir)/include/sys/mode.h \ - $(top_srcdir)/include/sys/mount.h \ - $(top_srcdir)/include/sys/mutex.h \ - $(top_srcdir)/include/sys/note.h \ - $(top_srcdir)/include/sys/open.h \ - $(top_srcdir)/include/sys/param.h \ - $(top_srcdir)/include/sys/pathname.h \ - $(top_srcdir)/include/sys/policy.h \ - $(top_srcdir)/include/sys/pool.h \ - $(top_srcdir)/include/sys/priv_impl.h \ - $(top_srcdir)/include/sys/processor.h \ - $(top_srcdir)/include/sys/proc.h \ - $(top_srcdir)/include/sys/pset.h \ - $(top_srcdir)/include/sys/random.h \ - $(top_srcdir)/include/sys/refstr.h \ - $(top_srcdir)/include/sys/resource.h \ - $(top_srcdir)/include/sys/rwlock.h \ - $(top_srcdir)/include/sys/sdt.h \ - $(top_srcdir)/include/sys/sid.h \ - $(top_srcdir)/include/sys/signal.h \ - $(top_srcdir)/include/sys/stat.h \ - $(top_srcdir)/include/sys/stropts.h \ - $(top_srcdir)/include/sys/sunddi.h \ - $(top_srcdir)/include/sys/sunldi.h \ - $(top_srcdir)/include/sys/sysdc.h \ - $(top_srcdir)/include/sys/sysmacros.h \ - $(top_srcdir)/include/sys/systeminfo.h \ - $(top_srcdir)/include/sys/systm.h \ - $(top_srcdir)/include/sys/taskq.h \ - $(top_srcdir)/include/sys/thread.h \ - $(top_srcdir)/include/sys/time.h \ - $(top_srcdir)/include/sys/timer.h \ - $(top_srcdir)/include/sys/t_lock.h \ - $(top_srcdir)/include/sys/tsd.h \ - $(top_srcdir)/include/sys/types32.h \ - $(top_srcdir)/include/sys/types.h \ - $(top_srcdir)/include/sys/u8_textprep.h \ - $(top_srcdir)/include/sys/uio.h \ - $(top_srcdir)/include/sys/unistd.h \ - $(top_srcdir)/include/sys/user.h \ - $(top_srcdir)/include/sys/va_list.h \ - $(top_srcdir)/include/sys/varargs.h \ - $(top_srcdir)/include/sys/vfs.h \ - $(top_srcdir)/include/sys/vfs_opreg.h \ - $(top_srcdir)/include/sys/vmem.h \ - $(top_srcdir)/include/sys/vmsystm.h \ - $(top_srcdir)/include/sys/vnode.h \ - $(top_srcdir)/include/sys/zmod.h \ - $(top_srcdir)/include/sys/zone.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/sys -kernel_HEADERS = $(KERNEL_H) -endif - diff --git a/include/sys/acl_impl.h b/include/sys/acl_impl.h deleted file mode 100644 index 9cb21124b..000000000 --- a/include/sys/acl_impl.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_ACL_IMPL_H -#define _SPL_ACL_IMPL_H - -#endif /* _SPL_ACL_IMPL_H */ diff --git a/include/sys/atomic.h b/include/sys/atomic.h deleted file mode 100644 index e992fdce3..000000000 --- a/include/sys/atomic.h +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_ATOMIC_H -#define _SPL_ATOMIC_H - -#include -#include -#include - -/* - * Two approaches to atomic operations are implemented each with its - * own benefits are drawbacks imposed by the Solaris API. Neither - * approach handles the issue of word breaking when using a 64-bit - * atomic variable on a 32-bit arch. The Solaris API would need to - * add an atomic read call to correctly support this. - * - * When ATOMIC_SPINLOCK is defined all atomic operations will be - * serialized through global spin locks. This is bad for performance - * but it does allow a simple generic implementation. - * - * When ATOMIC_SPINLOCK is not defined the Linux atomic operations - * are used. This is safe as long as the core Linux implementation - * doesn't change because we are relying on the fact that an atomic - * type is really just a uint32 or uint64. If this changes at some - * point in the future we need to fall-back to the spin approach. - */ -#ifdef ATOMIC_SPINLOCK -extern spinlock_t atomic32_lock; -extern spinlock_t atomic64_lock; - -static __inline__ void -atomic_inc_32(volatile uint32_t *target) -{ - spin_lock(&atomic32_lock); - (*target)++; - spin_unlock(&atomic32_lock); -} - -static __inline__ void -atomic_dec_32(volatile uint32_t *target) -{ - spin_lock(&atomic32_lock); - (*target)--; - spin_unlock(&atomic32_lock); -} - -static __inline__ void -atomic_add_32(volatile uint32_t *target, int32_t delta) -{ - spin_lock(&atomic32_lock); - *target += delta; - spin_unlock(&atomic32_lock); -} - -static __inline__ void -atomic_sub_32(volatile uint32_t *target, int32_t delta) -{ - spin_lock(&atomic32_lock); - *target -= delta; - spin_unlock(&atomic32_lock); -} - -static __inline__ uint32_t -atomic_inc_32_nv(volatile uint32_t *target) -{ - uint32_t nv; - - spin_lock(&atomic32_lock); - nv = ++(*target); - spin_unlock(&atomic32_lock); - - return (nv); -} - -static __inline__ uint32_t -atomic_dec_32_nv(volatile uint32_t *target) -{ - uint32_t nv; - - spin_lock(&atomic32_lock); - nv = --(*target); - spin_unlock(&atomic32_lock); - - return (nv); -} - -static __inline__ uint32_t -atomic_add_32_nv(volatile uint32_t *target, uint32_t delta) -{ - uint32_t nv; - - spin_lock(&atomic32_lock); - *target += delta; - nv = *target; - spin_unlock(&atomic32_lock); - - return (nv); -} - -static __inline__ uint32_t -atomic_sub_32_nv(volatile uint32_t *target, uint32_t delta) -{ - uint32_t nv; - - spin_lock(&atomic32_lock); - *target -= delta; - nv = *target; - spin_unlock(&atomic32_lock); - - return (nv); -} - -static __inline__ uint32_t -atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval) -{ - uint32_t rc; - - spin_lock(&atomic32_lock); - rc = *target; - if (*target == cmp) - *target = newval; - - spin_unlock(&atomic32_lock); - - return (rc); -} - -static __inline__ uint32_t -atomic_swap_32(volatile uint32_t *target, uint32_t newval) -{ - uint32_t rc; - - spin_lock(&atomic32_lock); - rc = *target; - *target = newval; - spin_unlock(&atomic32_lock); - - return (rc); -} - -static __inline__ void -atomic_inc_64(volatile uint64_t *target) -{ - spin_lock(&atomic64_lock); - (*target)++; - spin_unlock(&atomic64_lock); -} - -static __inline__ void -atomic_dec_64(volatile uint64_t *target) -{ - spin_lock(&atomic64_lock); - (*target)--; - spin_unlock(&atomic64_lock); -} - -static __inline__ void -atomic_add_64(volatile uint64_t *target, uint64_t delta) -{ - spin_lock(&atomic64_lock); - *target += delta; - spin_unlock(&atomic64_lock); -} - -static __inline__ void -atomic_sub_64(volatile uint64_t *target, uint64_t delta) -{ - spin_lock(&atomic64_lock); - *target -= delta; - spin_unlock(&atomic64_lock); -} - -static __inline__ uint64_t -atomic_inc_64_nv(volatile uint64_t *target) -{ - uint64_t nv; - - spin_lock(&atomic64_lock); - nv = ++(*target); - spin_unlock(&atomic64_lock); - - return (nv); -} - -static __inline__ uint64_t -atomic_dec_64_nv(volatile uint64_t *target) -{ - uint64_t nv; - - spin_lock(&atomic64_lock); - nv = --(*target); - spin_unlock(&atomic64_lock); - - return (nv); -} - -static __inline__ uint64_t -atomic_add_64_nv(volatile uint64_t *target, uint64_t delta) -{ - uint64_t nv; - - spin_lock(&atomic64_lock); - *target += delta; - nv = *target; - spin_unlock(&atomic64_lock); - - return (nv); -} - -static __inline__ uint64_t -atomic_sub_64_nv(volatile uint64_t *target, uint64_t delta) -{ - uint64_t nv; - - spin_lock(&atomic64_lock); - *target -= delta; - nv = *target; - spin_unlock(&atomic64_lock); - - return (nv); -} - -static __inline__ uint64_t -atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval) -{ - uint64_t rc; - - spin_lock(&atomic64_lock); - rc = *target; - if (*target == cmp) - *target = newval; - spin_unlock(&atomic64_lock); - - return (rc); -} - -static __inline__ uint64_t -atomic_swap_64(volatile uint64_t *target, uint64_t newval) -{ - uint64_t rc; - - spin_lock(&atomic64_lock); - rc = *target; - *target = newval; - spin_unlock(&atomic64_lock); - - return (rc); -} - -#else /* ATOMIC_SPINLOCK */ - -#define atomic_inc_32(v) atomic_inc((atomic_t *)(v)) -#define atomic_dec_32(v) atomic_dec((atomic_t *)(v)) -#define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v)) -#define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v)) -#define atomic_inc_32_nv(v) atomic_inc_return((atomic_t *)(v)) -#define atomic_dec_32_nv(v) atomic_dec_return((atomic_t *)(v)) -#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) -#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) -#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) -#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x) -#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v)) -#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) -#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) -#define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v)) -#define atomic_inc_64_nv(v) atomic64_inc_return((atomic64_t *)(v)) -#define atomic_dec_64_nv(v) atomic64_dec_return((atomic64_t *)(v)) -#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) -#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) -#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) -#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x) - -#endif /* ATOMIC_SPINLOCK */ - -#ifdef _LP64 -static __inline__ void * -atomic_cas_ptr(volatile void *target, void *cmp, void *newval) -{ - return ((void *)atomic_cas_64((volatile uint64_t *)target, - (uint64_t)cmp, (uint64_t)newval)); -} -#else /* _LP64 */ -static __inline__ void * -atomic_cas_ptr(volatile void *target, void *cmp, void *newval) -{ - return ((void *)atomic_cas_32((volatile uint32_t *)target, - (uint32_t)cmp, (uint32_t)newval)); -} -#endif /* _LP64 */ - -#endif /* _SPL_ATOMIC_H */ diff --git a/include/sys/attr.h b/include/sys/attr.h deleted file mode 100644 index 7941acbec..000000000 --- a/include/sys/attr.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_ATTR_H -#define _SPL_ATTR_H - -#endif /* SPL_ATTR_H */ diff --git a/include/sys/bitmap.h b/include/sys/bitmap.h deleted file mode 100644 index 3e7d910c0..000000000 --- a/include/sys/bitmap.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_BITMAP_H -#define _SPL_BITMAP_H - -#endif /* SPL_BITMAP_H */ diff --git a/include/sys/bootconf.h b/include/sys/bootconf.h deleted file mode 100644 index 62730ba5d..000000000 --- a/include/sys/bootconf.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_BOOTCONF_H -#define _SPL_BOOTCONF_H - -#endif /* SPL_BOOTCONF_H */ diff --git a/include/sys/bootprops.h b/include/sys/bootprops.h deleted file mode 100644 index 50150eda9..000000000 --- a/include/sys/bootprops.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_BOOTPROPS_H -#define _SPL_BOOTPROPS_H - -#endif /* SPL_BOOTPROPS_H */ diff --git a/include/sys/buf.h b/include/sys/buf.h deleted file mode 100644 index fa453e478..000000000 --- a/include/sys/buf.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_BUF_H -#define _SPL_BUF_H - -#endif /* SPL_BUF_H */ diff --git a/include/sys/compress.h b/include/sys/compress.h deleted file mode 100644 index e46ab0df2..000000000 --- a/include/sys/compress.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_COMPRESS_H -#define _SPL_COMPRESS_H - -#endif /* SPL_COMPRESS_H */ diff --git a/include/sys/conf.h b/include/sys/conf.h deleted file mode 100644 index 68f4095dd..000000000 --- a/include/sys/conf.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_CONF_H -#define _SPL_CONF_H - -#endif /* SPL_CONF_H */ diff --git a/include/sys/cpupart.h b/include/sys/cpupart.h deleted file mode 100644 index ba57c19e8..000000000 --- a/include/sys/cpupart.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_CPUPART_H -#define _SPL_CPUPART_H - -#endif /* SPL_CPUPART_H */ diff --git a/include/sys/cpuvar.h b/include/sys/cpuvar.h deleted file mode 100644 index 075c06047..000000000 --- a/include/sys/cpuvar.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_CPUVAR_H -#define _SPL_CPUVAR_H - -#endif /* SPL_CPUVAR_H */ diff --git a/include/sys/crc32.h b/include/sys/crc32.h deleted file mode 100644 index eb021b1ff..000000000 --- a/include/sys/crc32.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_CRC32_H -#define _SPL_CRC32_H - -#endif /* SPL_CRC32_H */ diff --git a/include/sys/ddi.h b/include/sys/ddi.h deleted file mode 100644 index af2806ee7..000000000 --- a/include/sys/ddi.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_DDI_H -#define _SPL_DDI_H - -#endif /* SPL_DDI_H */ diff --git a/include/sys/dirent.h b/include/sys/dirent.h deleted file mode 100644 index 8237d0dd9..000000000 --- a/include/sys/dirent.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_DIRENT_H -#define _SPL_DIRENT_H - -#endif /* SPL_DIRENT_H */ diff --git a/include/sys/dklabel.h b/include/sys/dklabel.h deleted file mode 100644 index ff58059c6..000000000 --- a/include/sys/dklabel.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_DKLABEL_H -#define _SPL_DKLABEL_H - -#endif /* _SPL_DKLABEL_H */ diff --git a/include/sys/dnlc.h b/include/sys/dnlc.h deleted file mode 100644 index cda112c18..000000000 --- a/include/sys/dnlc.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_DNLC_H -#define _SPL_DNLC_H - -#endif /* SPL_DNLC_H */ diff --git a/include/sys/dumphdr.h b/include/sys/dumphdr.h deleted file mode 100644 index a452fe35d..000000000 --- a/include/sys/dumphdr.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_DUMPHDR_H -#define _SPL_DUMPHDR_H - -#endif /* SPL_DUMPHDR_H */ diff --git a/include/sys/efi_partition.h b/include/sys/efi_partition.h deleted file mode 100644 index d0c9c2005..000000000 --- a/include/sys/efi_partition.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_EFI_PARTITION_H -#define _SPL_EFI_PARTITION_H - -#endif /* SPL_EFI_PARTITION_H */ diff --git a/include/sys/errno.h b/include/sys/errno.h deleted file mode 100644 index 2dd378bc8..000000000 --- a/include/sys/errno.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_ERRNO_H -#define _SPL_ERRNO_H - -#endif /* SPL_ERRNO_H */ diff --git a/include/sys/extdirent.h b/include/sys/extdirent.h deleted file mode 100644 index e0567fa6e..000000000 --- a/include/sys/extdirent.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_EXTDIRENT_H -#define _SPL_EXTDIRENT_H - -#define ED_CASE_CONFLICT 0x10 - -#endif /* _SPL_EXTDIRENT_H */ diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am deleted file mode 100644 index 2821cbe33..000000000 --- a/include/sys/fm/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/sys/fm/protocol.h \ - $(top_srcdir)/include/sys/fm/util.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/sys/fm/protocol.h b/include/sys/fm/protocol.h deleted file mode 100644 index 39f6cb1e5..000000000 --- a/include/sys/fm/protocol.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_FM_PROTOCOL_H -#define _SPL_FM_PROTOCOL_H - -#endif /* _SPL_FM_PROTOCOL_H */ diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h deleted file mode 100644 index d8f68433d..000000000 --- a/include/sys/fm/util.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_FM_UTIL_H -#define _SPL_FM_UTIL_H - -#endif /* _SPL_FM_UTIL_H */ diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am deleted file mode 100644 index 581083e9c..000000000 --- a/include/sys/fs/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/sys/fs/swapnode.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/sys/fs/swapnode.h b/include/sys/fs/swapnode.h deleted file mode 100644 index 1fa5fdc83..000000000 --- a/include/sys/fs/swapnode.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SWAPNODE_H -#define _SPL_SWAPNODE_H - -#endif /* SPL_SWAPNODE_H */ diff --git a/include/sys/int_limits.h b/include/sys/int_limits.h deleted file mode 100644 index 5d7e9be89..000000000 --- a/include/sys/int_limits.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_INT_LIMITS_H -#define _SPL_INT_LIMITS_H - -#endif /* SPL_INT_LIMITS_H */ diff --git a/include/sys/int_types.h b/include/sys/int_types.h deleted file mode 100644 index 7e3b7329f..000000000 --- a/include/sys/int_types.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_INT_TYPES_H -#define _SPL_INT_TYPES_H - -#include - -#endif /* SPL_INT_TYPES_H */ diff --git a/include/sys/kidmap.h b/include/sys/kidmap.h deleted file mode 100644 index a5e6375c3..000000000 --- a/include/sys/kidmap.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_KIDMAP_H -#define _SPL_KIDMAP_H - -#include - -#endif /* SPL_KIDMAP_H */ diff --git a/include/sys/mkdev.h b/include/sys/mkdev.h deleted file mode 100644 index 7dff2d22d..000000000 --- a/include/sys/mkdev.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_MKDEV_H -#define _SPL_MKDEV_H - -#endif /* SPL_MKDEV_H */ diff --git a/include/sys/mntent.h b/include/sys/mntent.h deleted file mode 100644 index cac28c530..000000000 --- a/include/sys/mntent.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_MNTENT_H -#define _SPL_MNTENT_H - -#endif /* SPL_MNTENT_H */ diff --git a/include/sys/modctl.h b/include/sys/modctl.h deleted file mode 100644 index 8f9ae496d..000000000 --- a/include/sys/modctl.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_MODCTL_H -#define _SPL_MODCTL_H - -#endif /* SPL_MODCTL_H */ diff --git a/include/sys/mount.h b/include/sys/mount.h deleted file mode 100644 index fdd1c6678..000000000 --- a/include/sys/mount.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_MOUNT_H -#define _SPL_MOUNT_H - -#endif /* SPL_MOUNT_H */ diff --git a/include/sys/note.h b/include/sys/note.h deleted file mode 100644 index f7f9b70ef..000000000 --- a/include/sys/note.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_NOTE_H -#define _SPL_NOTE_H - -#endif /* SPL_NOTE_H */ diff --git a/include/sys/open.h b/include/sys/open.h deleted file mode 100644 index 7c9e0cb7a..000000000 --- a/include/sys/open.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_OPEN_H -#define _SPL_OPEN_H - -#endif /* SPL_OPEN_H */ diff --git a/include/sys/pathname.h b/include/sys/pathname.h deleted file mode 100644 index fde1b3c1e..000000000 --- a/include/sys/pathname.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_PATHNAME_H -#define _SPL_PATHNAME_H - -typedef struct pathname { - char *pn_buf; /* underlying storage */ - char *pn_path; /* remaining pathname */ - size_t pn_pathlen; /* remaining length */ - size_t pn_bufsize; /* total size of pn_buf */ -} pathname_t; - -#endif /* SPL_PATHNAME_H */ diff --git a/include/sys/policy.h b/include/sys/policy.h deleted file mode 100644 index e4333cfcf..000000000 --- a/include/sys/policy.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_POLICY_H -#define _SPL_POLICY_H - -#define secpolicy_fs_unmount(c, vfs) (0) -#define secpolicy_nfs(c) (0) -#define secpolicy_sys_config(c, co) (0) -#define secpolicy_zfs(c) (0) -#define secpolicy_zinject(c) (0) -#define secpolicy_vnode_setids_setgids(c, id) (0) -#define secpolicy_vnode_setid_retain(c, sr) (0) -#define secpolicy_setid_clear(v, c) (0) -#define secpolicy_vnode_any_access(c, vp, o) (0) -#define secpolicy_vnode_access2(c, cp, o, m1, m2) (0) -#define secpolicy_vnode_chown(c, o) (0) -#define secpolicy_vnode_setdac(c, o) (0) -#define secpolicy_vnode_remove(c) (0) -#define secpolicy_vnode_setattr(c, v, a, o, f, func, n) (0) -#define secpolicy_xvattr(x, o, c, t) (0) -#define secpolicy_vnode_stky_modify(c) (0) -#define secpolicy_setid_setsticky_clear(v, a, o, c) (0) -#define secpolicy_basic_link(c) (0) - -#endif /* SPL_POLICY_H */ diff --git a/include/sys/pool.h b/include/sys/pool.h deleted file mode 100644 index 392c14b5e..000000000 --- a/include/sys/pool.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_POOL_H -#define _SPL_POOL_H - -#include - -#endif /* SPL_POOL_H */ diff --git a/include/sys/priv_impl.h b/include/sys/priv_impl.h deleted file mode 100644 index 822c2dec1..000000000 --- a/include/sys/priv_impl.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_PRIV_IMPL_H -#define _SPL_PRIV_IMPL_H - -#endif /* _SPL_PRIV_IMPL_H */ diff --git a/include/sys/pset.h b/include/sys/pset.h deleted file mode 100644 index a6a9d343b..000000000 --- a/include/sys/pset.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_PSET_H -#define _SPL_PSET_H - -typedef int psetid_t; - -/* special processor set id's */ -#define PS_NONE -1 -#define PS_QUERY -2 -#define PS_MYID -3 -#define PS_SOFT -4 -#define PS_HARD -5 -#define PS_QUERY_TYPE -6 - -#endif /* SPL_PSET_H */ diff --git a/include/sys/refstr.h b/include/sys/refstr.h deleted file mode 100644 index 1b54dab45..000000000 --- a/include/sys/refstr.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_REFSTR_H -#define _SPL_REFSTR_H - -#endif /* SPL_REFSTR_H */ diff --git a/include/sys/resource.h b/include/sys/resource.h deleted file mode 100644 index d1ffb6c2d..000000000 --- a/include/sys/resource.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_RESOURCE_H -#define _SPL_RESOURCE_H - -#include - -#endif /* SPL_RESOURCE_H */ diff --git a/include/sys/sdt.h b/include/sys/sdt.h deleted file mode 100644 index 2d4679d65..000000000 --- a/include/sys/sdt.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SDT_H -#define _SPL_SDT_H - -#define SET_ERROR(x) (x) - -#endif /* SPL_SDT_H */ diff --git a/include/sys/stropts.h b/include/sys/stropts.h deleted file mode 100644 index 746141fe8..000000000 --- a/include/sys/stropts.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_STROPTS_H -#define _SPL_STROPTS_H - -#endif /* SPL_STROPTS_H */ diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h deleted file mode 100644 index a5045f891..000000000 --- a/include/sys/sunldi.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SUNLDI_H -#define _SPL_SUNLDI_H - -#include -#include -#include -#include -#include -#include - -/* - * SECTOR_SIZE can be defined in blkdev.h. See - * https://github.com/torvalds/linux/commit/233bde21. - */ -#ifndef SECTOR_SIZE -#define SECTOR_SIZE 512 -#endif - -#endif /* SPL_SUNLDI_H */ diff --git a/include/sys/sysdc.h b/include/sys/sysdc.h deleted file mode 100644 index d963774ac..000000000 --- a/include/sys/sysdc.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SYSDC_H -#define _SPL_SYSDC_H - -#endif /* SPL_SYSDC_H */ diff --git a/include/sys/systm.h b/include/sys/systm.h deleted file mode 100644 index 2420e7e9d..000000000 --- a/include/sys/systm.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SYSTM_H -#define _SPL_SYSTM_H - -#include - -typedef uintptr_t pc_t; - -#endif /* SPL_SYSTM_H */ diff --git a/include/sys/t_lock.h b/include/sys/t_lock.h deleted file mode 100644 index dcdfaeec5..000000000 --- a/include/sys/t_lock.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_T_LOCK_H -#define _SPL_T_LOCK_H - -#include -#include -#include -#include - -#endif /* SPL_T_LOCK_H */ diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h deleted file mode 100644 index 6e76651d5..000000000 --- a/include/sys/u8_textprep.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_U8_TEXTPREP_H -#define _SPL_U8_TEXTPREP_H - -#endif /* SPL_U8_TEXTPREP_H */ diff --git a/include/sys/unistd.h b/include/sys/unistd.h deleted file mode 100644 index d86de891c..000000000 --- a/include/sys/unistd.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_UNISTD_H -#define _SPL_UNISTD_H - -#endif /* SPL_UNISTD_H */ diff --git a/include/sys/va_list.h b/include/sys/va_list.h deleted file mode 100644 index 62d18b9ae..000000000 --- a/include/sys/va_list.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_VA_LIST_H -#define _SPL_VA_LIST_H - -#endif /* SPL_VA_LIST_H */ diff --git a/include/sys/varargs.h b/include/sys/varargs.h deleted file mode 100644 index cdb73fbbd..000000000 --- a/include/sys/varargs.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_VARARGS_H -#define _SPL_VARARGS_H - -#define __va_list va_list - -#endif /* SPL_VARARGS_H */ diff --git a/include/sys/vfs_opreg.h b/include/sys/vfs_opreg.h deleted file mode 100644 index 1d48f2d5a..000000000 --- a/include/sys/vfs_opreg.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_OPREG_H -#define _SPL_OPREG_H - -#endif /* SPL_OPREG_H */ diff --git a/include/unistd.h b/include/unistd.h deleted file mode 100644 index d86de891c..000000000 --- a/include/unistd.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_UNISTD_H -#define _SPL_UNISTD_H - -#endif /* SPL_UNISTD_H */ diff --git a/include/util/Makefile.am b/include/util/Makefile.am deleted file mode 100644 index e2bf09fb1..000000000 --- a/include/util/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/util/qsort.h \ - $(top_srcdir)/include/util/sscanf.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/util -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/util/qsort.h b/include/util/qsort.h deleted file mode 100644 index 90ae6e4c2..000000000 --- a/include/util/qsort.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_QSORT_H -#define _SPL_QSORT_H - -#include - -#define qsort(base, num, size, cmp) sort(base, num, size, cmp, NULL) - -#endif /* SPL_QSORT_H */ diff --git a/include/util/sscanf.h b/include/util/sscanf.h deleted file mode 100644 index 9788234bb..000000000 --- a/include/util/sscanf.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_UTIL_SSCANF_H -#define _SPL_UTIL_SSCANF_H - -#endif /* SPL_UTIL_SSCAN_H */ diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am deleted file mode 100644 index 7faab0aab..000000000 --- a/include/vm/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -COMMON_H = - -KERNEL_H = \ - $(top_srcdir)/include/vm/anon.h \ - $(top_srcdir)/include/vm/pvn.h \ - $(top_srcdir)/include/vm/seg_kmem.h - -USER_H = - -EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - -if CONFIG_KERNEL -kerneldir = @prefix@/src/spl-$(VERSION)/include/vm -kernel_HEADERS = $(KERNEL_H) -endif diff --git a/include/vm/anon.h b/include/vm/anon.h deleted file mode 100644 index 706734ff3..000000000 --- a/include/vm/anon.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_VM_ANON_H -#define _SPL_VM_ANON_H - -#endif /* SPL_VM_ANON_H */ diff --git a/include/vm/pvn.h b/include/vm/pvn.h deleted file mode 100644 index 1011e6cd8..000000000 --- a/include/vm/pvn.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_VM_PVN_H -#define _SPL_VM_PVN_H - -#endif /* SPL_VM_PVN_H */ diff --git a/include/vm/seg_kmem.h b/include/vm/seg_kmem.h deleted file mode 100644 index a0ab7fce6..000000000 --- a/include/vm/seg_kmem.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPL_SEG_KMEM_H -#define _SPL_SEG_KMEM_H - -#include - -#endif /* SPL_SEG_KMEM_H */ diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index 0f2826bb2..000000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -include $(top_srcdir)/config/Rules.am - -noinst_LTLIBRARIES = libcommon.la -libcommon_la_SOURCES = list.c - -EXTRA_DIST = list.h diff --git a/lib/list.c b/lib/list.c deleted file mode 100644 index 140a1bbdd..000000000 --- a/lib/list.c +++ /dev/null @@ -1,837 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2001-2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Chris Dunlap . - * UCRL-CODE-235197 - * - * This file is from LSD-Tools, the LLNL Software Development Toolbox. - * - * LSD-Tools is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with LSD-Tools. If not, see . - ***************************************************************************** - * Refer to "list.h" for documentation on public functions. - *****************************************************************************/ - -#ifdef WITH_PTHREADS -# include -#endif /* WITH_PTHREADS */ - -#include -#include -#include -#include -#include "list.h" - - -/********************* - * lsd_fatal_error * - *********************/ - -#ifdef WITH_LSD_FATAL_ERROR_FUNC -# undef lsd_fatal_error - extern void lsd_fatal_error(char *file, int line, char *mesg); -#else /* !WITH_LSD_FATAL_ERROR_FUNC */ -# ifndef lsd_fatal_error -# include -# include -# include -# define lsd_fatal_error(file, line, mesg) \ - do { \ - fprintf(stderr, "ERROR: [%s:%d] %s: %s\n", \ - file, line, mesg, strerror(errno)); \ - } while (0) -# endif /* !lsd_fatal_error */ -#endif /* !WITH_LSD_FATAL_ERROR_FUNC */ - - -/********************* - * lsd_nomem_error * - *********************/ - -#ifdef WITH_LSD_NOMEM_ERROR_FUNC -# undef lsd_nomem_error - extern void * lsd_nomem_error(char *file, int line, char *mesg); -#else /* !WITH_LSD_NOMEM_ERROR_FUNC */ -# ifndef lsd_nomem_error -# define lsd_nomem_error(file, line, mesg) (NULL) -# endif /* !lsd_nomem_error */ -#endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ - - -/*************** - * Constants * - ***************/ - -#define LIST_ALLOC 32 -#define LIST_MAGIC 0xDEADBEEF - - -/**************** - * Data Types * - ****************/ - -struct listNode { - void *data; /* node's data */ - struct listNode *next; /* next node in list */ -}; - -struct listIterator { - struct list *list; /* the list being iterated */ - struct listNode *pos; /* the next node to be iterated */ - struct listNode **prev; /* addr of 'next' ptr to prv It node */ - struct listIterator *iNext; /* iterator chain for list_destroy() */ -#ifndef NDEBUG - unsigned int magic; /* sentinel for asserting validity */ -#endif /* !NDEBUG */ -}; - -struct list { - struct listNode *head; /* head of the list */ - struct listNode **tail; /* addr of last node's 'next' ptr */ - struct listIterator *iNext; /* iterator chain for list_destroy() */ - ListDelF fDel; /* function to delete node data */ - int count; /* number of nodes in list */ -#ifdef WITH_PTHREADS - pthread_mutex_t mutex; /* mutex to protect access to list */ -#endif /* WITH_PTHREADS */ -#ifndef NDEBUG - unsigned int magic; /* sentinel for asserting validity */ -#endif /* !NDEBUG */ -}; - -typedef struct listNode * ListNode; - - -/**************** - * Prototypes * - ****************/ - -static void * list_node_create (List l, ListNode *pp, void *x); -static void * list_node_destroy (List l, ListNode *pp); -static List list_alloc (void); -static void list_free (List l); -static ListNode list_node_alloc (void); -static void list_node_free (ListNode p); -static ListIterator list_iterator_alloc (void); -static void list_iterator_free (ListIterator i); -static void * list_alloc_aux (int size, void *pfreelist); -static void list_free_aux (void *x, void *pfreelist); - - -/*************** - * Variables * - ***************/ - -static List list_free_lists = NULL; -static ListNode list_free_nodes = NULL; -static ListIterator list_free_iterators = NULL; - -#ifdef WITH_PTHREADS -static pthread_mutex_t list_free_lock = PTHREAD_MUTEX_INITIALIZER; -#endif /* WITH_PTHREADS */ - - -/************ - * Macros * - ************/ - -#ifdef WITH_PTHREADS - -# define list_mutex_init(mutex) \ - do { \ - int e = pthread_mutex_init(mutex, NULL); \ - if (e != 0) { \ - errno = e; \ - lsd_fatal_error(__FILE__, __LINE__, "list mutex init"); \ - abort(); \ - } \ - } while (0) - -# define list_mutex_lock(mutex) \ - do { \ - int e = pthread_mutex_lock(mutex); \ - if (e != 0) { \ - errno = e; \ - lsd_fatal_error(__FILE__, __LINE__, "list mutex lock"); \ - abort(); \ - } \ - } while (0) - -# define list_mutex_unlock(mutex) \ - do { \ - int e = pthread_mutex_unlock(mutex); \ - if (e != 0) { \ - errno = e; \ - lsd_fatal_error(__FILE__, __LINE__, "list mutex unlock"); \ - abort(); \ - } \ - } while (0) - -# define list_mutex_destroy(mutex) \ - do { \ - int e = pthread_mutex_destroy(mutex); \ - if (e != 0) { \ - errno = e; \ - lsd_fatal_error(__FILE__, __LINE__, "list mutex destroy"); \ - abort(); \ - } \ - } while (0) - -# ifndef NDEBUG - static int list_mutex_is_locked (pthread_mutex_t *mutex); -# endif /* !NDEBUG */ - -#else /* !WITH_PTHREADS */ - -# define list_mutex_init(mutex) -# define list_mutex_lock(mutex) -# define list_mutex_unlock(mutex) -# define list_mutex_destroy(mutex) -# define list_mutex_is_locked(mutex) (1) - -#endif /* !WITH_PTHREADS */ - - -/*************** - * Functions * - ***************/ - -List -list_create (ListDelF f) -{ - List l; - - if (!(l = list_alloc())) - return(lsd_nomem_error(__FILE__, __LINE__, "list create")); - l->head = NULL; - l->tail = &l->head; - l->iNext = NULL; - l->fDel = f; - l->count = 0; - list_mutex_init(&l->mutex); -#ifndef NDEBUG - l->magic = LIST_MAGIC; -#endif - return(l); -} - - -void -list_destroy (List l) -{ - ListIterator i, iTmp; - ListNode p, pTmp; - - assert(l != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - i = l->iNext; - while (i) { - assert(i->magic == LIST_MAGIC); - iTmp = i->iNext; -#ifndef NDEBUG - i->magic = ~LIST_MAGIC; -#endif /* !NDEBUG */ - list_iterator_free(i); - i = iTmp; - } - p = l->head; - while (p) { - pTmp = p->next; - if (p->data && l->fDel) - l->fDel(p->data); - list_node_free(p); - p = pTmp; - } -#ifndef NDEBUG - l->magic = ~LIST_MAGIC; -#endif /* !NDEBUG */ - list_mutex_unlock(&l->mutex); - list_mutex_destroy(&l->mutex); - list_free(l); - return; -} - - -int -list_is_empty (List l) -{ - int n; - - assert(l != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - n = l->count; - list_mutex_unlock(&l->mutex); - return(n == 0); -} - - -int -list_count (List l) -{ - int n; - - assert(l != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - n = l->count; - list_mutex_unlock(&l->mutex); - return(n); -} - - -void * -list_append (List l, void *x) -{ - void *v; - - assert(l != NULL); - assert(x != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - v = list_node_create(l, l->tail, x); - list_mutex_unlock(&l->mutex); - return(v); -} - - -void * -list_prepend (List l, void *x) -{ - void *v; - - assert(l != NULL); - assert(x != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - v = list_node_create(l, &l->head, x); - list_mutex_unlock(&l->mutex); - return(v); -} - - -void * -list_find_first (List l, ListFindF f, void *key) -{ - ListNode p; - void *v = NULL; - - assert(l != NULL); - assert(f != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - for (p=l->head; p; p=p->next) { - if (f(p->data, key)) { - v = p->data; - break; - } - } - list_mutex_unlock(&l->mutex); - return(v); -} - - -int -list_delete_all (List l, ListFindF f, void *key) -{ - ListNode *pp; - void *v; - int n = 0; - - assert(l != NULL); - assert(f != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - pp = &l->head; - while (*pp) { - if (f((*pp)->data, key)) { - if ((v = list_node_destroy(l, pp))) { - if (l->fDel) - l->fDel(v); - n++; - } - } - else { - pp = &(*pp)->next; - } - } - list_mutex_unlock(&l->mutex); - return(n); -} - - -int -list_for_each (List l, ListForF f, void *arg) -{ - ListNode p; - int n = 0; - - assert(l != NULL); - assert(f != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - for (p=l->head; p; p=p->next) { - n++; - if (f(p->data, arg) < 0) { - n = -n; - break; - } - } - list_mutex_unlock(&l->mutex); - return(n); -} - - -void -list_sort (List l, ListCmpF f) -{ -/* Note: Time complexity O(n^2). - */ - ListNode *pp, *ppPrev, *ppPos, pTmp; - ListIterator i; - - assert(l != NULL); - assert(f != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - if (l->count > 1) { - ppPrev = &l->head; - pp = &(*ppPrev)->next; - while (*pp) { - if (f((*pp)->data, (*ppPrev)->data) < 0) { - ppPos = &l->head; - while (f((*pp)->data, (*ppPos)->data) >= 0) - ppPos = &(*ppPos)->next; - pTmp = (*pp)->next; - (*pp)->next = *ppPos; - *ppPos = *pp; - *pp = pTmp; - if (ppPrev == ppPos) - ppPrev = &(*ppPrev)->next; - } - else { - ppPrev = pp; - pp = &(*pp)->next; - } - } - l->tail = pp; - - for (i=l->iNext; i; i=i->iNext) { - assert(i->magic == LIST_MAGIC); - i->pos = i->list->head; - i->prev = &i->list->head; - } - } - list_mutex_unlock(&l->mutex); - return; -} - - -void * -list_push (List l, void *x) -{ - void *v; - - assert(l != NULL); - assert(x != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - v = list_node_create(l, &l->head, x); - list_mutex_unlock(&l->mutex); - return(v); -} - - -void * -list_pop (List l) -{ - void *v; - - assert(l != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - v = list_node_destroy(l, &l->head); - list_mutex_unlock(&l->mutex); - return(v); -} - - -void * -list_peek (List l) -{ - void *v; - - assert(l != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - v = (l->head) ? l->head->data : NULL; - list_mutex_unlock(&l->mutex); - return(v); -} - - -void * -list_enqueue (List l, void *x) -{ - void *v; - - assert(l != NULL); - assert(x != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - v = list_node_create(l, l->tail, x); - list_mutex_unlock(&l->mutex); - return(v); -} - - -void * -list_dequeue (List l) -{ - void *v; - - assert(l != NULL); - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - v = list_node_destroy(l, &l->head); - list_mutex_unlock(&l->mutex); - return(v); -} - - -ListIterator -list_iterator_create (List l) -{ - ListIterator i; - - assert(l != NULL); - if (!(i = list_iterator_alloc())) - return(lsd_nomem_error(__FILE__, __LINE__, "list iterator create")); - i->list = l; - list_mutex_lock(&l->mutex); - assert(l->magic == LIST_MAGIC); - i->pos = l->head; - i->prev = &l->head; - i->iNext = l->iNext; - l->iNext = i; -#ifndef NDEBUG - i->magic = LIST_MAGIC; -#endif /* !NDEBUG */ - list_mutex_unlock(&l->mutex); - return(i); -} - - -void -list_iterator_reset (ListIterator i) -{ - assert(i != NULL); - assert(i->magic == LIST_MAGIC); - list_mutex_lock(&i->list->mutex); - assert(i->list->magic == LIST_MAGIC); - i->pos = i->list->head; - i->prev = &i->list->head; - list_mutex_unlock(&i->list->mutex); - return; -} - - -void -list_iterator_destroy (ListIterator i) -{ - ListIterator *pi; - - assert(i != NULL); - assert(i->magic == LIST_MAGIC); - list_mutex_lock(&i->list->mutex); - assert(i->list->magic == LIST_MAGIC); - for (pi=&i->list->iNext; *pi; pi=&(*pi)->iNext) { - assert((*pi)->magic == LIST_MAGIC); - if (*pi == i) { - *pi = (*pi)->iNext; - break; - } - } - list_mutex_unlock(&i->list->mutex); -#ifndef NDEBUG - i->magic = ~LIST_MAGIC; -#endif /* !NDEBUG */ - list_iterator_free(i); - return; -} - - -void * -list_next (ListIterator i) -{ - ListNode p; - - assert(i != NULL); - assert(i->magic == LIST_MAGIC); - list_mutex_lock(&i->list->mutex); - assert(i->list->magic == LIST_MAGIC); - if ((p = i->pos)) - i->pos = p->next; - if (*i->prev != p) - i->prev = &(*i->prev)->next; - list_mutex_unlock(&i->list->mutex); - return(p ? p->data : NULL); -} - - -void * -list_insert (ListIterator i, void *x) -{ - void *v; - - assert(i != NULL); - assert(x != NULL); - assert(i->magic == LIST_MAGIC); - list_mutex_lock(&i->list->mutex); - assert(i->list->magic == LIST_MAGIC); - v = list_node_create(i->list, i->prev, x); - list_mutex_unlock(&i->list->mutex); - return(v); -} - - -void * -list_find (ListIterator i, ListFindF f, void *key) -{ - void *v; - - assert(i != NULL); - assert(f != NULL); - assert(i->magic == LIST_MAGIC); - while ((v=list_next(i)) && !f(v,key)) {;} - return(v); -} - - -void * -list_remove (ListIterator i) -{ - void *v = NULL; - - assert(i != NULL); - assert(i->magic == LIST_MAGIC); - list_mutex_lock(&i->list->mutex); - assert(i->list->magic == LIST_MAGIC); - if (*i->prev != i->pos) - v = list_node_destroy(i->list, i->prev); - list_mutex_unlock(&i->list->mutex); - return(v); -} - - -int -list_delete (ListIterator i) -{ - void *v; - - assert(i != NULL); - assert(i->magic == LIST_MAGIC); - if ((v = list_remove(i))) { - if (i->list->fDel) - i->list->fDel(v); - return(1); - } - return(0); -} - - -static void * -list_node_create (List l, ListNode *pp, void *x) -{ -/* Inserts data pointed to by [x] into list [l] after [pp], - * the address of the previous node's "next" ptr. - * Returns a ptr to data [x], or NULL if insertion fails. - * This routine assumes the list is already locked upon entry. - */ - ListNode p; - ListIterator i; - - assert(l != NULL); - assert(l->magic == LIST_MAGIC); - assert(list_mutex_is_locked(&l->mutex)); - assert(pp != NULL); - assert(x != NULL); - if (!(p = list_node_alloc())) - return(lsd_nomem_error(__FILE__, __LINE__, "list node create")); - p->data = x; - if (!(p->next = *pp)) - l->tail = &p->next; - *pp = p; - l->count++; - for (i=l->iNext; i; i=i->iNext) { - assert(i->magic == LIST_MAGIC); - if (i->prev == pp) - i->prev = &p->next; - else if (i->pos == p->next) - i->pos = p; - assert((i->pos == *i->prev) || (i->pos == (*i->prev)->next)); - } - return(x); -} - - -static void * -list_node_destroy (List l, ListNode *pp) -{ -/* Removes the node pointed to by [*pp] from from list [l], - * where [pp] is the address of the previous node's "next" ptr. - * Returns the data ptr associated with list item being removed, - * or NULL if [*pp] points to the NULL element. - * This routine assumes the list is already locked upon entry. - */ - void *v; - ListNode p; - ListIterator i; - - assert(l != NULL); - assert(l->magic == LIST_MAGIC); - assert(list_mutex_is_locked(&l->mutex)); - assert(pp != NULL); - if (!(p = *pp)) - return(NULL); - v = p->data; - if (!(*pp = p->next)) - l->tail = pp; - l->count--; - for (i=l->iNext; i; i=i->iNext) { - assert(i->magic == LIST_MAGIC); - if (i->pos == p) - i->pos = p->next, i->prev = pp; - else if (i->prev == &p->next) - i->prev = pp; - assert((i->pos == *i->prev) || (i->pos == (*i->prev)->next)); - } - list_node_free(p); - return(v); -} - - -static List -list_alloc (void) -{ - return(list_alloc_aux(sizeof(struct list), &list_free_lists)); -} - - -static void -list_free (List l) -{ - list_free_aux(l, &list_free_lists); - return; -} - - -static ListNode -list_node_alloc (void) -{ - return(list_alloc_aux(sizeof(struct listNode), &list_free_nodes)); -} - - -static void -list_node_free (ListNode p) -{ - list_free_aux(p, &list_free_nodes); - return; -} - - -static ListIterator -list_iterator_alloc (void) -{ - return(list_alloc_aux(sizeof(struct listIterator), &list_free_iterators)); -} - - -static void -list_iterator_free (ListIterator i) -{ - list_free_aux(i, &list_free_iterators); - return; -} - - -static void * -list_alloc_aux (int size, void *pfreelist) -{ -/* Allocates an object of [size] bytes from the freelist [*pfreelist]. - * Memory is added to the freelist in chunks of size LIST_ALLOC. - * Returns a ptr to the object, or NULL if the memory request fails. - */ - void **px; - void **pfree = pfreelist; - void **plast; - - assert(sizeof(char) == 1); - assert(size >= (int)sizeof(void *)); - assert(pfreelist != NULL); - assert(LIST_ALLOC > 0); - list_mutex_lock(&list_free_lock); - if (!*pfree) { - if ((*pfree = malloc(LIST_ALLOC * size))) { - px = *pfree; - plast = (void **) ((char *) *pfree + ((LIST_ALLOC - 1) * size)); - while (px < plast) - *px = (char *) px + size, px = *px; - *plast = NULL; - } - } - if ((px = *pfree)) - *pfree = *px; - else - errno = ENOMEM; - list_mutex_unlock(&list_free_lock); - return(px); -} - - -static void -list_free_aux (void *x, void *pfreelist) -{ -/* Frees the object [x], returning it to the freelist [*pfreelist]. - */ - void **px = x; - void **pfree = pfreelist; - - assert(x != NULL); - assert(pfreelist != NULL); - list_mutex_lock(&list_free_lock); - *px = *pfree; - *pfree = px; - list_mutex_unlock(&list_free_lock); - return; -} - - -#ifndef NDEBUG -#ifdef WITH_PTHREADS -static int -list_mutex_is_locked (pthread_mutex_t *mutex) -{ -/* Returns true if the mutex is locked; o/w, returns false. - */ - int rc; - - assert(mutex != NULL); - rc = pthread_mutex_trylock(mutex); - return(rc == EBUSY ? 1 : 0); -} -#endif /* WITH_PTHREADS */ -#endif /* !NDEBUG */ diff --git a/lib/list.h b/lib/list.h deleted file mode 100644 index 01adedd59..000000000 --- a/lib/list.h +++ /dev/null @@ -1,279 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2001-2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Chris Dunlap . - * UCRL-CODE-235197 - * - * This file is from LSD-Tools, the LLNL Software Development Toolbox. - * - * LSD-Tools is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with LSD-Tools. If not, see . - *****************************************************************************/ - -#ifndef LSD_LIST_H -#define LSD_LIST_H - - -/*********** - * Notes * - ***********/ -/* - * If NDEBUG is not defined, internal debug code will be enabled. This is - * intended for development use only and production code should define NDEBUG. - * - * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to - * find an external lsd_fatal_error(file,line,mesg) function. By default, - * lsd_fatal_error(file,line,mesg) is a macro definition that outputs an - * error message to stderr. This macro may be redefined to invoke another - * routine instead. - * - * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to - * find an external lsd_nomem_error(file,line,mesg) function. By default, - * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. - * This macro may be redefined to invoke another routine instead. - * - * If WITH_PTHREADS is defined, these routines will be thread-safe. - */ - - -/**************** - * Data Types * - ****************/ - -typedef struct list * List; -/* - * List opaque data type. - */ - -typedef struct listIterator * ListIterator; -/* - * List Iterator opaque data type. - */ - -typedef void (*ListDelF) (void *x); -/* - * Function prototype to deallocate data stored in a list. - * This function is responsible for freeing all memory associated - * with an item, including all subordinate items (if applicable). - */ - -typedef int (*ListCmpF) (void *x, void *y); -/* - * Function prototype for comparing two items in a list. - * Returns less-than-zero if (xy). - */ - -typedef int (*ListFindF) (void *x, void *key); -/* - * Function prototype for matching items in a list. - * Returns non-zero if (x==key); o/w returns zero. - */ - -typedef int (*ListForF) (void *x, void *arg); -/* - * Function prototype for operating on each item in a list. - * Returns less-than-zero on error. - */ - - -/******************************* - * General-Purpose Functions * - *******************************/ - -List list_create (ListDelF f); -/* - * Creates and returns a new empty list, or lsd_nomem_error() on failure. - * The deletion function [f] is used to deallocate memory used by items - * in the list; if this is NULL, memory associated with these items - * will not be freed when the list is destroyed. - * Note: Abandoning a list without calling list_destroy() will result - * in a memory leak. - */ - -void list_destroy (List l); -/* - * Destroys list [l], freeing memory used for list iterators and the - * list itself; if a deletion function was specified when the list - * was created, it will be called for each item in the list. - */ - -int list_is_empty (List l); -/* - * Returns non-zero if list [l] is empty; o/w returns zero. - */ - -int list_count (List l); -/* - * Returns the number of items in list [l]. - */ - - -/*************************** - * List Access Functions * - ***************************/ - -void * list_append (List l, void *x); -/* - * Inserts data [x] at the end of list [l]. - * Returns the data's ptr, or lsd_nomem_error() if insertion failed. - */ - -void * list_prepend (List l, void *x); -/* - * Inserts data [x] at the beginning of list [l]. - * Returns the data's ptr, or lsd_nomem_error() if insertion failed. - */ - -void * list_find_first (List l, ListFindF f, void *key); -/* - * Traverses list [l] using [f] to match each item with [key]. - * Returns a ptr to the first item for which the function [f] - * returns non-zero, or NULL if no such item is found. - * Note: This function differs from list_find() in that it does not require - * a list iterator; it should only be used when all list items are known - * to be unique (according to the function [f]). - */ - -int list_delete_all (List l, ListFindF f, void *key); -/* - * Traverses list [l] using [f] to match each item with [key]. - * Removes all items from the list for which the function [f] returns - * non-zero; if a deletion function was specified when the list was - * created, it will be called to deallocate each item being removed. - * Returns a count of the number of items removed from the list. - */ - -int list_for_each (List l, ListForF f, void *arg); -/* - * For each item in list [l], invokes the function [f] with [arg]. - * Returns a count of the number of items on which [f] was invoked. - * If [f] returns <0 for a given item, the iteration is aborted and the - * function returns the negative of that item's position in the list. - */ - -void list_sort (List l, ListCmpF f); -/* - * Sorts list [l] into ascending order according to the function [f]. - * Note: Sorting a list resets all iterators associated with the list. - * Note: The sort algorithm is stable. - */ - - -/**************************** - * Stack Access Functions * - ****************************/ - -void * list_push (List l, void *x); -/* - * Pushes data [x] onto the top of stack [l]. - * Returns the data's ptr, or lsd_nomem_error() if insertion failed. - */ - -void * list_pop (List l); -/* - * Pops the data item at the top of the stack [l]. - * Returns the data's ptr, or NULL if the stack is empty. - */ - -void * list_peek (List l); -/* - * Peeks at the data item at the top of the stack (or head of the queue) [l]. - * Returns the data's ptr, or NULL if the stack (or queue) is empty. - * Note: The item is not removed from the list. - */ - - -/**************************** - * Queue Access Functions * - ****************************/ - -void * list_enqueue (List l, void *x); -/* - * Enqueues data [x] at the tail of queue [l]. - * Returns the data's ptr, or lsd_nomem_error() if insertion failed. - */ - -void * list_dequeue (List l); -/* - * Dequeues the data item at the head of the queue [l]. - * Returns the data's ptr, or NULL if the queue is empty. - */ - - -/***************************** - * List Iterator Functions * - *****************************/ - -ListIterator list_iterator_create (List l); -/* - * Creates and returns a list iterator for non-destructively traversing - * list [l], or lsd_nomem_error() on failure. - */ - -void list_iterator_reset (ListIterator i); -/* - * Resets the list iterator [i] to start traversal at the beginning - * of the list. - */ - -void list_iterator_destroy (ListIterator i); -/* - * Destroys the list iterator [i]; list iterators not explicitly destroyed - * in this manner will be destroyed when the list is deallocated via - * list_destroy(). - */ - -void * list_next (ListIterator i); -/* - * Returns a ptr to the next item's data, - * or NULL once the end of the list is reached. - * Example: i=list_iterator_create(i); while ((x=list_next(i))) {...} - */ - -void * list_insert (ListIterator i, void *x); -/* - * Inserts data [x] immediately before the last item returned via list - * iterator [i]; once the list iterator reaches the end of the list, - * insertion is made at the list's end. - * Returns the data's ptr, or lsd_nomem_error() if insertion failed. - */ - -void * list_find (ListIterator i, ListFindF f, void *key); -/* - * Traverses the list from the point of the list iterator [i] - * using [f] to match each item with [key]. - * Returns a ptr to the next item for which the function [f] - * returns non-zero, or NULL once the end of the list is reached. - * Example: i=list_iterator_reset(i); while ((x=list_find(i,f,k))) {...} - */ - -void * list_remove (ListIterator i); -/* - * Removes from the list the last item returned via list iterator [i] - * and returns the data's ptr. - * Note: The client is responsible for freeing the returned data. - */ - -int list_delete (ListIterator i); -/* - * Removes from the list the last item returned via list iterator [i]; - * if a deletion function was specified when the list was created, - * it will be called to deallocate the item being removed. - * Returns a count of the number of items removed from the list - * (ie, '1' if the item was removed, and '0' otherwise). - */ - - -#endif /* !LSD_LIST_H */ diff --git a/man/Makefile.am b/man/Makefile.am deleted file mode 100644 index 7791945cf..000000000 --- a/man/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = man1 man5 diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am deleted file mode 100644 index d6becca6e..000000000 --- a/man/man1/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -dist_man_MANS = splat.1 - -install-data-local: - $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man1" diff --git a/man/man1/splat.1 b/man/man1/splat.1 deleted file mode 100644 index 407680b28..000000000 --- a/man/man1/splat.1 +++ /dev/null @@ -1,94 +0,0 @@ -'\" t -.\" -.\" Copyright 2013 Darik Horn . All rights reserved. -.\" -.TH splat 1 "2013 MAR 16" "ZFS on Linux" "User Commands" - -.SH NAME -splat \- Solaris Porting LAyer Tests -.SH SYNOPSIS -.LP -.BI "splat [\-chvx] < \-\-all | \-\-list | \-\-test " "subsystem" ":" "test" " [...] >" - -.SH DESCRIPTION -This utility uses the splat.ko kernel module to test the spl.ko kernel -module. Run "modprobe splat" before invoking \fBsplat\fR. - -.SH OPTIONS -.HP -.BI "\-a" "" ", \-\-all" "" -.IP -Run all available tests on all subsystems. -.HP -.BI "\-c" "" ", \-\-nocolor" "" -.IP -Disable output highlighting. By default, "Fail" is printed in red text -and "Pass" is printed in green text. -.HP -.BI "\-h" "" ", \-\-help" "" -.IP -Print the usage message. -.HP -.BI "\-l" "" ", \-\-list" "" -.IP -For each spl.ko subsystem, print all available test names and -hexadecimal identifiers with a short description. -.HP -.BI "\-t" " subsystem" ":" "test" ", \-\-test" " subsystem" ":" "test" -.HP -.BI "\-t" " subsystem" ":all" "" ", \-\-test" " subsystem" ":all" "" -.IP -Run the \fItest\fR diagnostic routine for the spl.ko \fIsubsystem\fR. -Specify this option more than once to run multiple tests. - -The \fItest\fR and \fIsubsystem\fR parameters are the names or -hexadecimal identifiers returned by the \fBsplat --list\fR command. - -If \fIsubsystem\fR is a name and not a hexadecimal identifier, then the -\fBall\fR keyword can be used to run all available \fIsubsystem\fR -tests. - -.HP -.BI "\-v" "" ", \-\-verbose" "" -.HP -.IP -Increase verbosity. -.HP -.BI "\-x" "" ", \-\-exit" "" -.IP -Stop running tests after the first failure. - -.SH "EXAMPLES" -.LP -Test everything in the spl.ko kernel module: -.IP -# splat --all --verbose -.LP -Test the entire kernel memory subsystem: -.IP -# splat --test kmem:all -.LP -Test the kernel compression and queue waiting facilities: -.IP -# splat --test zlib:compress/uncompress --test taskq:wait -.LP -This is the same as the previous command, except that the subsystems -and tests are referenced by hexadecimal identifier instead of by name: -.IP -# splat -t 0x0f00:0x0f01 -t 0x0200:0x0204 - -.SH "NOTES" -All tests always return a green "Pass" result on a healthy system. Any -red "Fail" result should be investigated or reported. - -.SH "BUGS" -Some tests can deadlock the kernel if an X11 desktop is running, -especially if a proprietary blob driver is loaded for the video -hardware. - -.SH "AUTHORS" -This man page was written by Darik Horn . - -.SH "SEE ALSO" -.BR zpios (1), -.BR ztest (1) diff --git a/man/man5/Makefile.am b/man/man5/Makefile.am deleted file mode 100644 index fb22beb11..000000000 --- a/man/man5/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -dist_man_MANS = spl-module-parameters.5 - -install-data-local: - $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man5" diff --git a/module/.gitignore b/module/.gitignore deleted file mode 100644 index 907099287..000000000 --- a/module/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.ko -*.ko.unsigned -*.ko.out -*.ko.out.sig -*.mod.c -.*.cmd -modules.order - -/.tmp_versions -/Module.markers -/Module.symvers - -!Makefile.in diff --git a/module/Makefile.in b/module/Makefile.in deleted file mode 100644 index d4e62e152..000000000 --- a/module/Makefile.in +++ /dev/null @@ -1,54 +0,0 @@ -subdir-m += spl -subdir-m += splat - -INSTALL_MOD_DIR ?= extra - -SPL_MODULE_CFLAGS = -I@abs_top_srcdir@/include -SPL_MODULE_CFLAGS += -include @abs_top_builddir@/spl_config.h -export SPL_MODULE_CFLAGS - -modules: - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_SPL=m $@ - -clean: - @# Only cleanup the kernel build directories when CONFIG_KERNEL - @# is defined. This indicates that kernel modules should be built. -@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ - - if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi - if [ -f Module.markers ]; then $(RM) Module.markers; fi - -modules_install: - @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \ - INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \ - INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \ - KERNELRELEASE=@LINUX_VERSION@ - @# Remove extraneous build products when packaging - kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ - if [ -n "$(DESTDIR)" ]; then \ - find $$kmoddir -name 'modules.*' | xargs $(RM); \ - fi - sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \ - if [ -f $$sysmap ]; then \ - depmod -ae -F $$sysmap @LINUX_VERSION@; \ - fi - -modules_uninstall: - @# Uninstall the kernel modules - kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@ - list='$(subdir-m)'; for subdir in $$list; do \ - $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$subdir; \ - done - -distdir: - list='$(subdir-m)'; for subdir in $$list; do \ - (find @top_srcdir@/module/$$subdir -name '*.c' -o -name '*.h' |\ - xargs /bin/cp -t $$distdir/$$subdir); \ - done - -distclean maintainer-clean: clean -install: modules_install -uninstall: modules_uninstall -all: modules -check: diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in deleted file mode 100644 index a1f1ab823..000000000 --- a/module/spl/Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ -# Makefile.in for spl kernel module - -src = @abs_top_srcdir@/module/spl -obj = @abs_builddir@ - -MODULE := spl -EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@ - -# Solaris porting layer module -obj-$(CONFIG_SPL) := $(MODULE).o - -$(MODULE)-objs += spl-proc.o -$(MODULE)-objs += spl-kmem.o -$(MODULE)-objs += spl-kmem-cache.o -$(MODULE)-objs += spl-vmem.o -$(MODULE)-objs += spl-thread.o -$(MODULE)-objs += spl-taskq.o -$(MODULE)-objs += spl-rwlock.o -$(MODULE)-objs += spl-vnode.o -$(MODULE)-objs += spl-err.o -$(MODULE)-objs += spl-kobj.o -$(MODULE)-objs += spl-generic.o -$(MODULE)-objs += spl-atomic.o -$(MODULE)-objs += spl-mutex.o -$(MODULE)-objs += spl-kstat.o -$(MODULE)-objs += spl-condvar.o -$(MODULE)-objs += spl-xdr.o -$(MODULE)-objs += spl-cred.o -$(MODULE)-objs += spl-tsd.o -$(MODULE)-objs += spl-zlib.o diff --git a/module/spl/THIRDPARTYLICENSE.gplv2 b/module/spl/THIRDPARTYLICENSE.gplv2 new file mode 100644 index 000000000..d159169d1 --- /dev/null +++ b/module/spl/THIRDPARTYLICENSE.gplv2 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/module/spl/THIRDPARTYLICENSE.gplv2.descrip b/module/spl/THIRDPARTYLICENSE.gplv2.descrip new file mode 100644 index 000000000..78535a8ee --- /dev/null +++ b/module/spl/THIRDPARTYLICENSE.gplv2.descrip @@ -0,0 +1 @@ +COMPATIBILITY LAYER FOR OPENZFS ON LINUX diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 2a8972691..b38fe254c 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -43,9 +43,8 @@ #include #include #include +#include #include -#include -#include char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; EXPORT_SYMBOL(spl_version); @@ -260,6 +259,12 @@ __udivdi3(uint64_t u, uint64_t v) } EXPORT_SYMBOL(__udivdi3); +/* BEGIN CSTYLED */ +#ifndef abs64 +#define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; }) +#endif +/* END CSTYLED */ + /* * Implementation of 64-bit signed division for 32-bit machines. */ diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c index c73a2fdc2..5492c6a46 100644 --- a/module/spl/spl-kmem-cache.c +++ b/module/spl/spl-kmem-cache.c @@ -24,13 +24,13 @@ #include #include +#include #include #include #include +#include #include #include -#include -#include #include /* diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 10e93f318..bcbff94a6 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -28,6 +28,7 @@ #include #include #include +#include #ifndef HAVE_PDE_DATA #define PDE_DATA(x) (PDE(x)->data) diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c index 796f69e48..9c52924a4 100644 --- a/module/spl/spl-proc.c +++ b/module/spl/spl-proc.c @@ -30,10 +30,10 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/module/spl/spl-vmem.c b/module/spl/spl-vmem.c index dd10607dc..e1a84a911 100644 --- a/module/spl/spl-vmem.c +++ b/module/spl/spl-vmem.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include vmem_t *heap_arena = NULL; diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a371fb966..28ce21276 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -28,7 +28,11 @@ #include #include #include -#include +#include +#include +#ifdef HAVE_FDTABLE_HEADER +#include +#endif vnode_t *rootdir = (vnode_t *)0xabcd1234; EXPORT_SYMBOL(rootdir); @@ -39,6 +43,76 @@ static spl_kmem_cache_t *vn_file_cache; static DEFINE_SPINLOCK(vn_file_lock); static LIST_HEAD(vn_file_list); +static int +spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) +{ + int error = -EOPNOTSUPP; + +#ifdef HAVE_FILE_FALLOCATE + if (fp->f_op->fallocate) + error = fp->f_op->fallocate(fp, mode, offset, len); +#else +#ifdef HAVE_INODE_FALLOCATE + if (fp->f_dentry && fp->f_dentry->d_inode && + fp->f_dentry->d_inode->i_op->fallocate) + error = fp->f_dentry->d_inode->i_op->fallocate( + fp->f_dentry->d_inode, mode, offset, len); +#endif /* HAVE_INODE_FALLOCATE */ +#endif /* HAVE_FILE_FALLOCATE */ + + return (error); +} + +static int +spl_filp_fsync(struct file *fp, int sync) +{ +#ifdef HAVE_2ARGS_VFS_FSYNC + return (vfs_fsync(fp, sync)); +#else + return (vfs_fsync(fp, (fp)->f_dentry, sync)); +#endif /* HAVE_2ARGS_VFS_FSYNC */ +} + +static ssize_t +spl_kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos) +{ +#if defined(HAVE_KERNEL_WRITE_PPOS) + return (kernel_write(file, buf, count, pos)); +#else + mm_segment_t saved_fs; + ssize_t ret; + + saved_fs = get_fs(); + set_fs(get_ds()); + + ret = vfs_write(file, (__force const char __user *)buf, count, pos); + + set_fs(saved_fs); + + return (ret); +#endif +} + +static ssize_t +spl_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) +{ +#if defined(HAVE_KERNEL_READ_PPOS) + return (kernel_read(file, buf, count, pos)); +#else + mm_segment_t saved_fs; + ssize_t ret; + + saved_fs = get_fs(); + set_fs(get_ds()); + + ret = vfs_read(file, (void __user *)buf, count, pos); + + set_fs(saved_fs); + + return (ret); +#endif +} + vtype_t vn_mode_to_vtype(mode_t mode) { diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c index 4055921b4..2cc3e2a03 100644 --- a/module/spl/spl-xdr.c +++ b/module/spl/spl-xdr.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include /* @@ -131,6 +131,8 @@ static struct xdr_ops xdrmem_encode_ops; static struct xdr_ops xdrmem_decode_ops; +typedef int bool_t; + void xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size, const enum xdr_op op) diff --git a/module/spl/spl-zlib.c b/module/spl/spl-zlib.c index 177a626df..229e6a44b 100644 --- a/module/spl/spl-zlib.c +++ b/module/spl/spl-zlib.c @@ -57,7 +57,6 @@ #include #include #include -#include static spl_kmem_cache_t *zlib_workspace_cache; diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in deleted file mode 100644 index 680f28492..000000000 --- a/module/splat/Makefile.in +++ /dev/null @@ -1,28 +0,0 @@ -# Makefile.in for splat kernel module - -src = @abs_top_srcdir@/module/splat -obj = @abs_builddir@ - -MODULE := splat -EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@ - -# Solaris Porting LAyer Tests -obj-$(CONFIG_SPL) := $(MODULE).o - -$(MODULE)-objs += splat-ctl.o -$(MODULE)-objs += splat-kmem.o -$(MODULE)-objs += splat-taskq.o -$(MODULE)-objs += splat-random.o -$(MODULE)-objs += splat-mutex.o -$(MODULE)-objs += splat-condvar.o -$(MODULE)-objs += splat-thread.o -$(MODULE)-objs += splat-rwlock.o -$(MODULE)-objs += splat-time.o -$(MODULE)-objs += splat-vnode.o -$(MODULE)-objs += splat-kobj.o -$(MODULE)-objs += splat-atomic.o -$(MODULE)-objs += splat-list.o -$(MODULE)-objs += splat-generic.o -$(MODULE)-objs += splat-cred.o -$(MODULE)-objs += splat-zlib.o -$(MODULE)-objs += splat-linux.o diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c deleted file mode 100644 index 8aaa0835d..000000000 --- a/module/splat/splat-atomic.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Atomic Tests. - */ - -#include -#include -#include -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_ATOMIC_NAME "atomic" -#define SPLAT_ATOMIC_DESC "Kernel Atomic Tests" - -#define SPLAT_ATOMIC_TEST1_ID 0x0b01 -#define SPLAT_ATOMIC_TEST1_NAME "64-bit" -#define SPLAT_ATOMIC_TEST1_DESC "Validate 64-bit atomic ops" - -#define SPLAT_ATOMIC_TEST_MAGIC 0x43435454UL -#define SPLAT_ATOMIC_INIT_VALUE 10000000UL - -typedef enum { - SPLAT_ATOMIC_INC_64 = 0, - SPLAT_ATOMIC_DEC_64 = 1, - SPLAT_ATOMIC_ADD_64 = 2, - SPLAT_ATOMIC_SUB_64 = 3, - SPLAT_ATOMIC_ADD_64_NV = 4, - SPLAT_ATOMIC_SUB_64_NV = 5, - SPLAT_ATOMIC_COUNT_64 = 6 -} atomic_op_t; - -typedef struct atomic_priv { - unsigned long ap_magic; - struct file *ap_file; - kmutex_t ap_lock; - spl_wait_queue_head_t ap_waitq; - volatile uint64_t ap_atomic; - volatile uint64_t ap_atomic_exited; - atomic_op_t ap_op; - -} atomic_priv_t; - -static void -splat_atomic_work(void *priv) -{ - atomic_priv_t *ap; - atomic_op_t op; - int i; - - ap = (atomic_priv_t *)priv; - ASSERT(ap->ap_magic == SPLAT_ATOMIC_TEST_MAGIC); - - mutex_enter(&ap->ap_lock); - op = ap->ap_op; - wake_up(&ap->ap_waitq); - mutex_exit(&ap->ap_lock); - - splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, - "Thread %d successfully started: %lu/%lu\n", op, - (long unsigned)ap->ap_atomic, - (long unsigned)ap->ap_atomic_exited); - - for (i = 0; i < SPLAT_ATOMIC_INIT_VALUE / 10; i++) { - - /* Periodically sleep to mix up the ordering */ - if ((i % (SPLAT_ATOMIC_INIT_VALUE / 100)) == 0) { - splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, - "Thread %d sleeping: %lu/%lu\n", op, - (long unsigned)ap->ap_atomic, - (long unsigned)ap->ap_atomic_exited); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 100); - } - - switch (op) { - case SPLAT_ATOMIC_INC_64: - atomic_inc_64(&ap->ap_atomic); - break; - case SPLAT_ATOMIC_DEC_64: - atomic_dec_64(&ap->ap_atomic); - break; - case SPLAT_ATOMIC_ADD_64: - atomic_add_64(&ap->ap_atomic, 3); - break; - case SPLAT_ATOMIC_SUB_64: - atomic_sub_64(&ap->ap_atomic, 3); - break; - case SPLAT_ATOMIC_ADD_64_NV: - atomic_add_64_nv(&ap->ap_atomic, 5); - break; - case SPLAT_ATOMIC_SUB_64_NV: - atomic_sub_64_nv(&ap->ap_atomic, 5); - break; - default: - PANIC("Undefined op %d\n", op); - } - } - - atomic_inc_64(&ap->ap_atomic_exited); - - splat_vprint(ap->ap_file, SPLAT_ATOMIC_TEST1_NAME, - "Thread %d successfully exited: %lu/%lu\n", op, - (long unsigned)ap->ap_atomic, - (long unsigned)ap->ap_atomic_exited); - - wake_up(&ap->ap_waitq); - thread_exit(); -} - -static int -splat_atomic_test1_cond(atomic_priv_t *ap, int started) -{ - return (ap->ap_atomic_exited == started); -} - -static int -splat_atomic_test1(struct file *file, void *arg) -{ - atomic_priv_t ap; - DEFINE_WAIT(wait); - kthread_t *thr; - int i, rc = 0; - - ap.ap_magic = SPLAT_ATOMIC_TEST_MAGIC; - ap.ap_file = file; - mutex_init(&ap.ap_lock, SPLAT_ATOMIC_TEST1_NAME, MUTEX_DEFAULT, NULL); - init_waitqueue_head(&ap.ap_waitq); - ap.ap_atomic = SPLAT_ATOMIC_INIT_VALUE; - ap.ap_atomic_exited = 0; - - for (i = 0; i < SPLAT_ATOMIC_COUNT_64; i++) { - mutex_enter(&ap.ap_lock); - ap.ap_op = i; - - thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work, - &ap, 0, &p0, TS_RUN, - defclsyspri); - if (thr == NULL) { - rc = -ESRCH; - mutex_exit(&ap.ap_lock); - break; - } - - /* Prepare to wait, the new thread will wake us once it - * has made a copy of the unique private passed data */ - prepare_to_wait(&ap.ap_waitq, &wait, TASK_UNINTERRUPTIBLE); - mutex_exit(&ap.ap_lock); - schedule(); - } - - wait_event(ap.ap_waitq, splat_atomic_test1_cond(&ap, i)); - - if (rc) { - splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, "Only started " - "%d/%d test threads\n", i, SPLAT_ATOMIC_COUNT_64); - return rc; - } - - if (ap.ap_atomic != SPLAT_ATOMIC_INIT_VALUE) { - splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, - "Final value %lu does not match initial value %lu\n", - (long unsigned)ap.ap_atomic, SPLAT_ATOMIC_INIT_VALUE); - return -EINVAL; - } - - splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, - "Success initial and final values match, %lu == %lu\n", - (long unsigned)ap.ap_atomic, SPLAT_ATOMIC_INIT_VALUE); - - mutex_destroy(&ap.ap_lock); - - return 0; -} - -splat_subsystem_t * -splat_atomic_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_ATOMIC_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_ATOMIC_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_ATOMIC; - - splat_test_init(sub, SPLAT_ATOMIC_TEST1_NAME, SPLAT_ATOMIC_TEST1_DESC, - SPLAT_ATOMIC_TEST1_ID, splat_atomic_test1); - - return sub; -} - -void -splat_atomic_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_ATOMIC_TEST1_ID); - - kfree(sub); -} - -int -splat_atomic_id(void) { - return SPLAT_SUBSYSTEM_ATOMIC; -} diff --git a/module/splat/splat-condvar.c b/module/splat/splat-condvar.c deleted file mode 100644 index 0804baf50..000000000 --- a/module/splat/splat-condvar.c +++ /dev/null @@ -1,511 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Condition Variable Tests. - */ - -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_CONDVAR_NAME "condvar" -#define SPLAT_CONDVAR_DESC "Kernel Condition Variable Tests" - -#define SPLAT_CONDVAR_TEST1_ID 0x0501 -#define SPLAT_CONDVAR_TEST1_NAME "signal1" -#define SPLAT_CONDVAR_TEST1_DESC "Wake a single thread, cv_wait()/cv_signal()" - -#define SPLAT_CONDVAR_TEST2_ID 0x0502 -#define SPLAT_CONDVAR_TEST2_NAME "broadcast1" -#define SPLAT_CONDVAR_TEST2_DESC "Wake all threads, cv_wait()/cv_broadcast()" - -#define SPLAT_CONDVAR_TEST3_ID 0x0503 -#define SPLAT_CONDVAR_TEST3_NAME "signal2" -#define SPLAT_CONDVAR_TEST3_DESC "Wake a single thread, cv_wait_timeout()/cv_signal()" - -#define SPLAT_CONDVAR_TEST4_ID 0x0504 -#define SPLAT_CONDVAR_TEST4_NAME "broadcast2" -#define SPLAT_CONDVAR_TEST4_DESC "Wake all threads, cv_wait_timeout()/cv_broadcast()" - -#define SPLAT_CONDVAR_TEST5_ID 0x0505 -#define SPLAT_CONDVAR_TEST5_NAME "timeout" -#define SPLAT_CONDVAR_TEST5_DESC "Timeout thread, cv_wait_timeout()" - -#define SPLAT_CONDVAR_TEST_MAGIC 0x115599DDUL -#define SPLAT_CONDVAR_TEST_NAME "condvar" -#define SPLAT_CONDVAR_TEST_COUNT 8 - -typedef struct condvar_priv { - unsigned long cv_magic; - struct file *cv_file; - kcondvar_t cv_condvar; - kmutex_t cv_mtx; -} condvar_priv_t; - -typedef struct condvar_thr { - const char *ct_name; - condvar_priv_t *ct_cvp; - struct task_struct *ct_thread; - int ct_rc; -} condvar_thr_t; - -int -splat_condvar_test12_thread(void *arg) -{ - condvar_thr_t *ct = (condvar_thr_t *)arg; - condvar_priv_t *cv = ct->ct_cvp; - - ASSERT(cv->cv_magic == SPLAT_CONDVAR_TEST_MAGIC); - - mutex_enter(&cv->cv_mtx); - splat_vprint(cv->cv_file, ct->ct_name, - "%s thread sleeping with %d waiters\n", - ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters)); - cv_wait(&cv->cv_condvar, &cv->cv_mtx); - splat_vprint(cv->cv_file, ct->ct_name, - "%s thread woken %d waiters remain\n", - ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters)); - mutex_exit(&cv->cv_mtx); - - /* wait for main thread reap us */ - while (!kthread_should_stop()) - schedule(); - return 0; -} - -static int -splat_condvar_test1(struct file *file, void *arg) -{ - int i, count = 0, rc = 0; - condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; - condvar_priv_t cv; - - cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; - cv.cv_file = file; - mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); - - /* Create some threads, the exact number isn't important just as - * long as we know how many we managed to create and should expect. */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - ct[i].ct_cvp = &cv; - ct[i].ct_name = SPLAT_CONDVAR_TEST1_NAME; - ct[i].ct_rc = 0; - ct[i].ct_thread = spl_kthread_create(splat_condvar_test12_thread, - &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - - if (!IS_ERR(ct[i].ct_thread)) { - wake_up_process(ct[i].ct_thread); - count++; - } - } - - /* Wait until all threads are waiting on the condition variable */ - while (atomic_read(&cv.cv_condvar.cv_waiters) != count) - schedule(); - - /* Wake a single thread at a time, wait until it exits */ - for (i = 1; i <= count; i++) { - cv_signal(&cv.cv_condvar); - - while (atomic_read(&cv.cv_condvar.cv_waiters) > (count - i)) - schedule(); - - /* Correct behavior 1 thread woken */ - if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) - continue; - - splat_vprint(file, SPLAT_CONDVAR_TEST1_NAME, "Attempted to " - "wake %d thread but work %d threads woke\n", - 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); - rc = -EINVAL; - break; - } - - if (!rc) - splat_vprint(file, SPLAT_CONDVAR_TEST1_NAME, "Correctly woke " - "%d sleeping threads %d at a time\n", count, 1); - - /* Wait until that last nutex is dropped */ - while (mutex_owner(&cv.cv_mtx)) - schedule(); - - /* Wake everything for the failure case */ - cv_broadcast(&cv.cv_condvar); - cv_destroy(&cv.cv_condvar); - - /* wait for threads to exit */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - if (!IS_ERR(ct[i].ct_thread)) - kthread_stop(ct[i].ct_thread); - } - mutex_destroy(&cv.cv_mtx); - - return rc; -} - -static int -splat_condvar_test2(struct file *file, void *arg) -{ - int i, count = 0, rc = 0; - condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; - condvar_priv_t cv; - - cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; - cv.cv_file = file; - mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); - - /* Create some threads, the exact number isn't important just as - * long as we know how many we managed to create and should expect. */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - ct[i].ct_cvp = &cv; - ct[i].ct_name = SPLAT_CONDVAR_TEST2_NAME; - ct[i].ct_rc = 0; - ct[i].ct_thread = spl_kthread_create(splat_condvar_test12_thread, - &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - - if (!IS_ERR(ct[i].ct_thread)) { - wake_up_process(ct[i].ct_thread); - count++; - } - } - - /* Wait until all threads are waiting on the condition variable */ - while (atomic_read(&cv.cv_condvar.cv_waiters) != count) - schedule(); - - /* Wake all threads waiting on the condition variable */ - cv_broadcast(&cv.cv_condvar); - - /* Wait until all threads have exited */ - while ((atomic_read(&cv.cv_condvar.cv_waiters) > 0) || mutex_owner(&cv.cv_mtx)) - schedule(); - - splat_vprint(file, SPLAT_CONDVAR_TEST2_NAME, "Correctly woke all " - "%d sleeping threads at once\n", count); - - /* Wake everything for the failure case */ - cv_destroy(&cv.cv_condvar); - - /* wait for threads to exit */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - if (!IS_ERR(ct[i].ct_thread)) - kthread_stop(ct[i].ct_thread); - } - mutex_destroy(&cv.cv_mtx); - - return rc; -} - -int -splat_condvar_test34_thread(void *arg) -{ - condvar_thr_t *ct = (condvar_thr_t *)arg; - condvar_priv_t *cv = ct->ct_cvp; - clock_t rc; - - ASSERT(cv->cv_magic == SPLAT_CONDVAR_TEST_MAGIC); - - mutex_enter(&cv->cv_mtx); - splat_vprint(cv->cv_file, ct->ct_name, - "%s thread sleeping with %d waiters\n", - ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters)); - - /* Sleep no longer than 3 seconds, for this test we should - * actually never sleep that long without being woken up. */ - rc = cv_timedwait(&cv->cv_condvar, &cv->cv_mtx, lbolt + HZ * 3); - if (rc == -1) { - ct->ct_rc = -ETIMEDOUT; - splat_vprint(cv->cv_file, ct->ct_name, "%s thread timed out, " - "should have been woken\n", ct->ct_thread->comm); - } else { - splat_vprint(cv->cv_file, ct->ct_name, - "%s thread woken %d waiters remain\n", - ct->ct_thread->comm, - atomic_read(&cv->cv_condvar.cv_waiters)); - } - - mutex_exit(&cv->cv_mtx); - - /* wait for main thread reap us */ - while (!kthread_should_stop()) - schedule(); - return 0; -} - -static int -splat_condvar_test3(struct file *file, void *arg) -{ - int i, count = 0, rc = 0; - condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; - condvar_priv_t cv; - - cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; - cv.cv_file = file; - mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); - - /* Create some threads, the exact number isn't important just as - * long as we know how many we managed to create and should expect. */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - ct[i].ct_cvp = &cv; - ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; - ct[i].ct_rc = 0; - ct[i].ct_thread = spl_kthread_create(splat_condvar_test34_thread, - &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - - if (!IS_ERR(ct[i].ct_thread)) { - wake_up_process(ct[i].ct_thread); - count++; - } - } - - /* Wait until all threads are waiting on the condition variable */ - while (atomic_read(&cv.cv_condvar.cv_waiters) != count) - schedule(); - - /* Wake a single thread at a time, wait until it exits */ - for (i = 1; i <= count; i++) { - cv_signal(&cv.cv_condvar); - - while (atomic_read(&cv.cv_condvar.cv_waiters) > (count - i)) - schedule(); - - /* Correct behavior 1 thread woken */ - if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) - continue; - - splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Attempted to " - "wake %d thread but work %d threads woke\n", - 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); - rc = -EINVAL; - break; - } - - /* Validate no waiting thread timed out early */ - for (i = 0; i < count; i++) - if (ct[i].ct_rc) - rc = ct[i].ct_rc; - - if (!rc) - splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Correctly woke " - "%d sleeping threads %d at a time\n", count, 1); - - /* Wait until that last nutex is dropped */ - while (mutex_owner(&cv.cv_mtx)) - schedule(); - - /* Wake everything for the failure case */ - cv_broadcast(&cv.cv_condvar); - cv_destroy(&cv.cv_condvar); - - /* wait for threads to exit */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - if (!IS_ERR(ct[i].ct_thread)) - kthread_stop(ct[i].ct_thread); - } - mutex_destroy(&cv.cv_mtx); - - return rc; -} - -static int -splat_condvar_test4(struct file *file, void *arg) -{ - int i, count = 0, rc = 0; - condvar_thr_t ct[SPLAT_CONDVAR_TEST_COUNT]; - condvar_priv_t cv; - - cv.cv_magic = SPLAT_CONDVAR_TEST_MAGIC; - cv.cv_file = file; - mutex_init(&cv.cv_mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&cv.cv_condvar, NULL, CV_DEFAULT, NULL); - - /* Create some threads, the exact number isn't important just as - * long as we know how many we managed to create and should expect. */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - ct[i].ct_cvp = &cv; - ct[i].ct_name = SPLAT_CONDVAR_TEST3_NAME; - ct[i].ct_rc = 0; - ct[i].ct_thread = spl_kthread_create(splat_condvar_test34_thread, - &ct[i], "%s/%d", SPLAT_CONDVAR_TEST_NAME, i); - - if (!IS_ERR(ct[i].ct_thread)) { - wake_up_process(ct[i].ct_thread); - count++; - } - } - - /* Wait until all threads are waiting on the condition variable */ - while (atomic_read(&cv.cv_condvar.cv_waiters) != count) - schedule(); - - /* Wake a single thread at a time, wait until it exits */ - for (i = 1; i <= count; i++) { - cv_signal(&cv.cv_condvar); - - while (atomic_read(&cv.cv_condvar.cv_waiters) > (count - i)) - schedule(); - - /* Correct behavior 1 thread woken */ - if (atomic_read(&cv.cv_condvar.cv_waiters) == (count - i)) - continue; - - splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Attempted to " - "wake %d thread but work %d threads woke\n", - 1, count - atomic_read(&cv.cv_condvar.cv_waiters)); - rc = -EINVAL; - break; - } - - /* Validate no waiting thread timed out early */ - for (i = 0; i < count; i++) - if (ct[i].ct_rc) - rc = ct[i].ct_rc; - - if (!rc) - splat_vprint(file, SPLAT_CONDVAR_TEST3_NAME, "Correctly woke " - "%d sleeping threads %d at a time\n", count, 1); - - /* Wait until that last nutex is dropped */ - while (mutex_owner(&cv.cv_mtx)) - schedule(); - - /* Wake everything for the failure case */ - cv_broadcast(&cv.cv_condvar); - cv_destroy(&cv.cv_condvar); - - /* wait for threads to exit */ - for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) { - if (!IS_ERR(ct[i].ct_thread)) - kthread_stop(ct[i].ct_thread); - } - mutex_destroy(&cv.cv_mtx); - - return rc; -} - -static int -splat_condvar_test5(struct file *file, void *arg) -{ - kcondvar_t condvar; - kmutex_t mtx; - clock_t time_left, time_before, time_after, time_delta; - uint64_t whole_delta; - uint32_t remain_delta; - int rc = 0; - - mutex_init(&mtx, SPLAT_CONDVAR_TEST_NAME, MUTEX_DEFAULT, NULL); - cv_init(&condvar, NULL, CV_DEFAULT, NULL); - - splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, "Thread going to sleep for " - "%d second and expecting to be woken by timeout\n", 1); - - /* Allow a 1 second timeout, plenty long to validate correctness. */ - time_before = lbolt; - mutex_enter(&mtx); - time_left = cv_timedwait(&condvar, &mtx, lbolt + HZ); - mutex_exit(&mtx); - time_after = lbolt; - time_delta = time_after - time_before; /* XXX - Handle jiffie wrap */ - whole_delta = time_delta; - remain_delta = do_div(whole_delta, HZ); - - if (time_left == -1) { - if (time_delta >= HZ) { - splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, - "Thread correctly timed out and was asleep " - "for %d.%d seconds (%d second min)\n", - (int)whole_delta, (int)remain_delta, 1); - } else { - splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, - "Thread correctly timed out but was only " - "asleep for %d.%d seconds (%d second " - "min)\n", (int)whole_delta, - (int)remain_delta, 1); - rc = -ETIMEDOUT; - } - } else { - splat_vprint(file, SPLAT_CONDVAR_TEST5_NAME, - "Thread exited after only %d.%d seconds, it " - "did not hit the %d second timeout\n", - (int)whole_delta, (int)remain_delta, 1); - rc = -ETIMEDOUT; - } - - cv_destroy(&condvar); - mutex_destroy(&mtx); - - return rc; -} - -splat_subsystem_t * -splat_condvar_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_CONDVAR_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_CONDVAR_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_CONDVAR; - - splat_test_init(sub, SPLAT_CONDVAR_TEST1_NAME, SPLAT_CONDVAR_TEST1_DESC, - SPLAT_CONDVAR_TEST1_ID, splat_condvar_test1); - splat_test_init(sub, SPLAT_CONDVAR_TEST2_NAME, SPLAT_CONDVAR_TEST2_DESC, - SPLAT_CONDVAR_TEST2_ID, splat_condvar_test2); - splat_test_init(sub, SPLAT_CONDVAR_TEST3_NAME, SPLAT_CONDVAR_TEST3_DESC, - SPLAT_CONDVAR_TEST3_ID, splat_condvar_test3); - splat_test_init(sub, SPLAT_CONDVAR_TEST4_NAME, SPLAT_CONDVAR_TEST4_DESC, - SPLAT_CONDVAR_TEST4_ID, splat_condvar_test4); - splat_test_init(sub, SPLAT_CONDVAR_TEST5_NAME, SPLAT_CONDVAR_TEST5_DESC, - SPLAT_CONDVAR_TEST5_ID, splat_condvar_test5); - - return sub; -} - -void -splat_condvar_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_CONDVAR_TEST5_ID); - splat_test_fini(sub, SPLAT_CONDVAR_TEST4_ID); - splat_test_fini(sub, SPLAT_CONDVAR_TEST3_ID); - splat_test_fini(sub, SPLAT_CONDVAR_TEST2_ID); - splat_test_fini(sub, SPLAT_CONDVAR_TEST1_ID); - - kfree(sub); -} - -int -splat_condvar_id(void) { - return SPLAT_SUBSYSTEM_CONDVAR; -} diff --git a/module/splat/splat-cred.c b/module/splat/splat-cred.c deleted file mode 100644 index f13c0f752..000000000 --- a/module/splat/splat-cred.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Credential Tests. - */ - -#include -#include -#include "splat-internal.h" - -#define SPLAT_CRED_NAME "cred" -#define SPLAT_CRED_DESC "Kernel Cred Tests" - -#define SPLAT_CRED_TEST1_ID 0x0e01 -#define SPLAT_CRED_TEST1_NAME "cred" -#define SPLAT_CRED_TEST1_DESC "Task Credential Test" - -#define SPLAT_CRED_TEST2_ID 0x0e02 -#define SPLAT_CRED_TEST2_NAME "kcred" -#define SPLAT_CRED_TEST2_DESC "Kernel Credential Test" - -#define SPLAT_CRED_TEST3_ID 0x0e03 -#define SPLAT_CRED_TEST3_NAME "groupmember" -#define SPLAT_CRED_TEST3_DESC "Group Member Test" - -#define GROUP_STR_SIZE 128 -#define GROUP_STR_REDZONE 16 - -static int -splat_cred_test1(struct file *file, void *arg) -{ - char str[GROUP_STR_SIZE]; - uid_t uid, ruid, suid; - gid_t gid, rgid, sgid, *groups; - int ngroups, i, count = 0; - cred_t *cr = CRED(); - - uid = crgetuid(cr); - ruid = crgetruid(cr); - suid = crgetsuid(cr); - - gid = crgetgid(cr); - rgid = crgetrgid(cr); - sgid = crgetsgid(cr); - - ngroups = crgetngroups(cr); - groups = crgetgroups(cr); - - memset(str, 0, GROUP_STR_SIZE); - for (i = 0; i < ngroups; i++) { - count += sprintf(str + count, "%d ", groups[i]); - - if (count > (GROUP_STR_SIZE - GROUP_STR_REDZONE)) { - splat_vprint(file, SPLAT_CRED_TEST1_NAME, - "Failed too many group entries for temp " - "buffer: %d, %s\n", ngroups, str); - return -ENOSPC; - } - } - - splat_vprint(file, SPLAT_CRED_TEST1_NAME, - "uid: %d ruid: %d suid: %d " - "gid: %d rgid: %d sgid: %d\n", - uid, ruid, suid, gid, rgid, sgid); - splat_vprint(file, SPLAT_CRED_TEST1_NAME, - "ngroups: %d groups: %s\n", ngroups, str); - - if (uid || ruid || suid || gid || rgid || sgid) { - splat_vprint(file, SPLAT_CRED_TEST1_NAME, - "Failed expected all uids+gids to be %d\n", 0); - return -EIDRM; - } - - if (ngroups > NGROUPS_MAX) { - splat_vprint(file, SPLAT_CRED_TEST1_NAME, - "Failed ngroups must not exceed NGROUPS_MAX: " - "%d > %d\n", ngroups, NGROUPS_MAX); - return -EIDRM; - } - - splat_vprint(file, SPLAT_CRED_TEST1_NAME, - "Success sane CRED(): %d\n", 0); - - return 0; -} /* splat_cred_test1() */ - -static int -splat_cred_test2(struct file *file, void *arg) -{ - char str[GROUP_STR_SIZE]; - uid_t uid, ruid, suid; - gid_t gid, rgid, sgid, *groups; - int ngroups, i, count = 0; - - crhold(kcred); - - uid = crgetuid(kcred); - ruid = crgetruid(kcred); - suid = crgetsuid(kcred); - - gid = crgetgid(kcred); - rgid = crgetrgid(kcred); - sgid = crgetsgid(kcred); - - ngroups = crgetngroups(kcred); - groups = crgetgroups(kcred); - - memset(str, 0, GROUP_STR_SIZE); - for (i = 0; i < ngroups; i++) { - count += sprintf(str + count, "%d ", groups[i]); - - if (count > (GROUP_STR_SIZE - GROUP_STR_REDZONE)) { - splat_vprint(file, SPLAT_CRED_TEST2_NAME, - "Failed too many group entries for temp " - "buffer: %d, %s\n", ngroups, str); - crfree(kcred); - return -ENOSPC; - } - } - - crfree(kcred); - - splat_vprint(file, SPLAT_CRED_TEST2_NAME, - "uid: %d ruid: %d suid: %d " - "gid: %d rgid: %d sgid: %d\n", - uid, ruid, suid, gid, rgid, sgid); - splat_vprint(file, SPLAT_CRED_TEST2_NAME, - "ngroups: %d groups: %s\n", ngroups, str); - - if (uid || ruid || suid || gid || rgid || sgid) { - splat_vprint(file, SPLAT_CRED_TEST2_NAME, - "Failed expected all uids+gids to be %d\n", 0); - return -EIDRM; - } - - if (ngroups > NGROUPS_MAX) { - splat_vprint(file, SPLAT_CRED_TEST2_NAME, - "Failed ngroups must not exceed NGROUPS_MAX: " - "%d > %d\n", ngroups, NGROUPS_MAX); - return -EIDRM; - } - - splat_vprint(file, SPLAT_CRED_TEST2_NAME, - "Success sane kcred: %d\n", 0); - - return 0; -} /* splat_cred_test2() */ - -#define SPLAT_NGROUPS 32 -/* - * Verify the groupmember() works correctly by constructing an interesting - * CRED() and checking that the expected gids are part of it. - */ -static int -splat_cred_test3(struct file *file, void *arg) -{ - gid_t known_gid, missing_gid, tmp_gid; - unsigned char rnd; - struct group_info *gi; - int i, rc; - - get_random_bytes((void *)&rnd, 1); - known_gid = (rnd > 0) ? rnd : 1; - missing_gid = 0; - - /* - * Create an interesting known set of gids for test purposes. The - * gids are pseudo randomly selected are will be in the range of - * 1:(NGROUPS_MAX-1). Gid 0 is explicitly avoided so we can reliably - * test for its absence in the test cases. - */ - gi = groups_alloc(SPLAT_NGROUPS); - if (gi == NULL) { - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed create " - "group_info for known gids: %d\n", -ENOMEM); - rc = -ENOMEM; - goto show_groups; - } - - for (i = 0, tmp_gid = known_gid; i < SPLAT_NGROUPS; i++) { - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Adding gid %d " - "to current CRED() (%d/%d)\n", tmp_gid, i, gi->ngroups); -#ifdef HAVE_KUIDGID_T - GROUP_AT(gi, i) = make_kgid(current_user_ns(), tmp_gid); -#else - GROUP_AT(gi, i) = tmp_gid; -#endif /* HAVE_KUIDGID_T */ - tmp_gid = ((tmp_gid * 17) % (NGROUPS_MAX - 1)) + 1; - } - - /* Set the new groups in the CRED() and release our reference. */ - rc = set_current_groups(gi); - put_group_info(gi); - - if (rc) { - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed to add " - "gid %d to current group: %d\n", known_gid, rc); - goto show_groups; - } - - /* Verify groupmember() finds the known_gid in the CRED() */ - rc = groupmember(known_gid, CRED()); - if (!rc) { - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed to find " - "known gid %d in CRED()'s groups.\n", known_gid); - rc = -EIDRM; - goto show_groups; - } - - /* Verify groupmember() does NOT finds the missing gid in the CRED() */ - rc = groupmember(missing_gid, CRED()); - if (rc) { - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Failed missing " - "gid %d was found in CRED()'s groups.\n", missing_gid); - rc = -EIDRM; - goto show_groups; - } - - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "Success groupmember() " - "correctly detects expected gids in CRED(): %d\n", rc); - -show_groups: - if (rc) { - int i, grps = crgetngroups(CRED()); - - splat_vprint(file, SPLAT_CRED_TEST3_NAME, "%d groups: ", grps); - for (i = 0; i < grps; i++) - splat_print(file, "%d ", crgetgroups(CRED())[i]); - splat_print(file, "%s", "\n"); - } - - - return (rc); -} /* splat_cred_test3() */ - -splat_subsystem_t * -splat_cred_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_CRED_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_CRED_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_CRED; - - splat_test_init(sub, SPLAT_CRED_TEST1_NAME, SPLAT_CRED_TEST1_DESC, - SPLAT_CRED_TEST1_ID, splat_cred_test1); - splat_test_init(sub, SPLAT_CRED_TEST2_NAME, SPLAT_CRED_TEST2_DESC, - SPLAT_CRED_TEST2_ID, splat_cred_test2); - splat_test_init(sub, SPLAT_CRED_TEST3_NAME, SPLAT_CRED_TEST3_DESC, - SPLAT_CRED_TEST3_ID, splat_cred_test3); - - return sub; -} /* splat_cred_init() */ - -void -splat_cred_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_CRED_TEST3_ID); - splat_test_fini(sub, SPLAT_CRED_TEST2_ID); - splat_test_fini(sub, SPLAT_CRED_TEST1_ID); - - kfree(sub); -} /* splat_cred_fini() */ - -int -splat_cred_id(void) -{ - return SPLAT_SUBSYSTEM_CRED; -} /* splat_cred_id() */ diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c deleted file mode 100644 index cf6850100..000000000 --- a/module/splat/splat-ctl.c +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Test Control Interface. - * - * The 'splat' (Solaris Porting LAyer Tests) module is designed as a - * framework which runs various in kernel regression tests to validate - * the SPL primitives honor the Solaris ABI. - * - * The splat module is constructed of various splat_* source files each - * of which contain regression tests for a particular subsystem. For - * example, the splat_kmem.c file contains all the tests for validating - * the kmem interfaces have been implemented correctly. When the splat - * module is loaded splat_*_init() will be called for each subsystems - * tests. It is the responsibility of splat_*_init() to register all - * the tests for this subsystem using the splat_test_init(). - * Similarly splat_*_fini() is called when the splat module is removed - * and is responsible for unregistering its tests via the splat_test_fini. - * Once a test is registered it can then be run with an ioctl() - * call which specifies the subsystem and test to be run. The provided - * splat command line tool can be used to display all available - * subsystems and tests. It can also be used to run the full suite - * of regression tests or particular tests. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "splat-internal.h" - -static struct list_head splat_module_list; -static spinlock_t splat_module_lock; - -static int -splat_open(struct inode *inode, struct file *file) -{ - splat_info_t *info; - - info = (splat_info_t *)kmalloc(sizeof(*info), GFP_KERNEL); - if (info == NULL) - return -ENOMEM; - - mutex_init(&info->info_lock, SPLAT_NAME, MUTEX_DEFAULT, NULL); - info->info_size = SPLAT_INFO_BUFFER_SIZE; - info->info_buffer = (char *)vmalloc(SPLAT_INFO_BUFFER_SIZE); - if (info->info_buffer == NULL) { - kfree(info); - return -ENOMEM; - } - memset(info->info_buffer, 0, info->info_size); - - info->info_head = info->info_buffer; - file->private_data = (void *)info; - - splat_print(file, "%s\n", spl_version); - - return 0; -} - -static int -splat_release(struct inode *inode, struct file *file) -{ - splat_info_t *info = (splat_info_t *)file->private_data; - - ASSERT(info); - ASSERT(info->info_buffer); - - mutex_destroy(&info->info_lock); - vfree(info->info_buffer); - kfree(info); - - return 0; -} - -static int -splat_buffer_clear(struct file *file, splat_cfg_t *kcfg, unsigned long arg) -{ - splat_info_t *info = (splat_info_t *)file->private_data; - - ASSERT(info); - ASSERT(info->info_buffer); - - mutex_enter(&info->info_lock); - memset(info->info_buffer, 0, info->info_size); - info->info_head = info->info_buffer; - mutex_exit(&info->info_lock); - - return 0; -} - -static int -splat_buffer_size(struct file *file, splat_cfg_t *kcfg, unsigned long arg) -{ - splat_info_t *info = (splat_info_t *)file->private_data; - char *buf; - int min, size, rc = 0; - - ASSERT(info); - ASSERT(info->info_buffer); - - mutex_enter(&info->info_lock); - if (kcfg->cfg_arg1 > 0) { - - size = kcfg->cfg_arg1; - buf = (char *)vmalloc(size); - if (buf == NULL) { - rc = -ENOMEM; - goto out; - } - - /* Zero fill and truncate contents when coping buffer */ - min = ((size < info->info_size) ? size : info->info_size); - memset(buf, 0, size); - memcpy(buf, info->info_buffer, min); - vfree(info->info_buffer); - info->info_size = size; - info->info_buffer = buf; - info->info_head = info->info_buffer; - } - - kcfg->cfg_rc1 = info->info_size; - - if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) - rc = -EFAULT; -out: - mutex_exit(&info->info_lock); - - return rc; -} - - -static splat_subsystem_t * -splat_subsystem_find(int id) { - splat_subsystem_t *sub; - - spin_lock(&splat_module_lock); - list_for_each_entry(sub, &splat_module_list, subsystem_list) { - if (id == sub->desc.id) { - spin_unlock(&splat_module_lock); - return sub; - } - } - spin_unlock(&splat_module_lock); - - return NULL; -} - -static int -splat_subsystem_count(splat_cfg_t *kcfg, unsigned long arg) -{ - splat_subsystem_t *sub; - int i = 0; - - spin_lock(&splat_module_lock); - list_for_each_entry(sub, &splat_module_list, subsystem_list) - i++; - - spin_unlock(&splat_module_lock); - kcfg->cfg_rc1 = i; - - if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) - return -EFAULT; - - return 0; -} - -static int -splat_subsystem_list(splat_cfg_t *kcfg, unsigned long arg) -{ - splat_subsystem_t *sub; - splat_cfg_t *tmp; - int size, i = 0; - - /* Structure will be sized large enough for N subsystem entries - * which is passed in by the caller. On exit the number of - * entries filled in with valid subsystems will be stored in - * cfg_rc1. If the caller does not provide enough entries - * for all subsystems we will truncate the list to avoid overrun. - */ - size = sizeof(*tmp) + kcfg->cfg_data.splat_subsystems.size * - sizeof(splat_user_t); - tmp = kmalloc(size, GFP_KERNEL); - if (tmp == NULL) - return -ENOMEM; - - /* Local 'tmp' is used as the structure copied back to user space */ - memset(tmp, 0, size); - memcpy(tmp, kcfg, sizeof(*kcfg)); - - spin_lock(&splat_module_lock); - list_for_each_entry(sub, &splat_module_list, subsystem_list) { - strncpy(tmp->cfg_data.splat_subsystems.descs[i].name, - sub->desc.name, SPLAT_NAME_SIZE); - strncpy(tmp->cfg_data.splat_subsystems.descs[i].desc, - sub->desc.desc, SPLAT_DESC_SIZE); - tmp->cfg_data.splat_subsystems.descs[i].id = sub->desc.id; - - /* Truncate list if we are about to overrun alloc'ed memory */ - if ((i++) == kcfg->cfg_data.splat_subsystems.size) - break; - } - spin_unlock(&splat_module_lock); - tmp->cfg_rc1 = i; - - if (copy_to_user((struct splat_cfg_t __user *)arg, tmp, size)) { - kfree(tmp); - return -EFAULT; - } - - kfree(tmp); - return 0; -} - -static int -splat_test_count(splat_cfg_t *kcfg, unsigned long arg) -{ - splat_subsystem_t *sub; - splat_test_t *test; - int i = 0; - - /* Subsystem ID passed as arg1 */ - sub = splat_subsystem_find(kcfg->cfg_arg1); - if (sub == NULL) - return -EINVAL; - - spin_lock(&(sub->test_lock)); - list_for_each_entry(test, &(sub->test_list), test_list) - i++; - - spin_unlock(&(sub->test_lock)); - kcfg->cfg_rc1 = i; - - if (copy_to_user((struct splat_cfg_t __user *)arg, kcfg, sizeof(*kcfg))) - return -EFAULT; - - return 0; -} - -static int -splat_test_list(splat_cfg_t *kcfg, unsigned long arg) -{ - splat_subsystem_t *sub; - splat_test_t *test; - splat_cfg_t *tmp; - int size, i = 0; - - /* Subsystem ID passed as arg1 */ - sub = splat_subsystem_find(kcfg->cfg_arg1); - if (sub == NULL) - return -EINVAL; - - /* Structure will be sized large enough for N test entries - * which is passed in by the caller. On exit the number of - * entries filled in with valid tests will be stored in - * cfg_rc1. If the caller does not provide enough entries - * for all tests we will truncate the list to avoid overrun. - */ - size = sizeof(*tmp)+kcfg->cfg_data.splat_tests.size*sizeof(splat_user_t); - tmp = kmalloc(size, GFP_KERNEL); - if (tmp == NULL) - return -ENOMEM; - - /* Local 'tmp' is used as the structure copied back to user space */ - memset(tmp, 0, size); - memcpy(tmp, kcfg, sizeof(*kcfg)); - - spin_lock(&(sub->test_lock)); - list_for_each_entry(test, &(sub->test_list), test_list) { - strncpy(tmp->cfg_data.splat_tests.descs[i].name, - test->desc.name, SPLAT_NAME_SIZE); - strncpy(tmp->cfg_data.splat_tests.descs[i].desc, - test->desc.desc, SPLAT_DESC_SIZE); - tmp->cfg_data.splat_tests.descs[i].id = test->desc.id; - - /* Truncate list if we are about to overrun alloc'ed memory */ - if ((i++) == kcfg->cfg_data.splat_tests.size) - break; - } - spin_unlock(&(sub->test_lock)); - tmp->cfg_rc1 = i; - - if (copy_to_user((struct splat_cfg_t __user *)arg, tmp, size)) { - kfree(tmp); - return -EFAULT; - } - - kfree(tmp); - return 0; -} - -static int -splat_validate(struct file *file, splat_subsystem_t *sub, int cmd, void *arg) -{ - splat_test_t *test; - - spin_lock(&(sub->test_lock)); - list_for_each_entry(test, &(sub->test_list), test_list) { - if (test->desc.id == cmd) { - spin_unlock(&(sub->test_lock)); - return test->test(file, arg); - } - } - spin_unlock(&(sub->test_lock)); - - return -EINVAL; -} - -static int -splat_ioctl_cfg(struct file *file, unsigned int cmd, unsigned long arg) -{ - splat_cfg_t kcfg; - int rc = 0; - - /* User and kernel space agree about arg size */ - if (_IOC_SIZE(cmd) != sizeof(kcfg)) - return -EBADMSG; - - if (copy_from_user(&kcfg, (splat_cfg_t *)arg, sizeof(kcfg))) - return -EFAULT; - - if (kcfg.cfg_magic != SPLAT_CFG_MAGIC) { - splat_print(file, "Bad config magic 0x%x != 0x%x\n", - kcfg.cfg_magic, SPLAT_CFG_MAGIC); - return -EINVAL; - } - - switch (kcfg.cfg_cmd) { - case SPLAT_CFG_BUFFER_CLEAR: - /* cfg_arg1 - Unused - * cfg_rc1 - Unused - */ - rc = splat_buffer_clear(file, &kcfg, arg); - break; - case SPLAT_CFG_BUFFER_SIZE: - /* cfg_arg1 - 0 - query size; >0 resize - * cfg_rc1 - Set to current buffer size - */ - rc = splat_buffer_size(file, &kcfg, arg); - break; - case SPLAT_CFG_SUBSYSTEM_COUNT: - /* cfg_arg1 - Unused - * cfg_rc1 - Set to number of subsystems - */ - rc = splat_subsystem_count(&kcfg, arg); - break; - case SPLAT_CFG_SUBSYSTEM_LIST: - /* cfg_arg1 - Unused - * cfg_rc1 - Set to number of subsystems - * cfg_data.splat_subsystems - Set with subsystems - */ - rc = splat_subsystem_list(&kcfg, arg); - break; - case SPLAT_CFG_TEST_COUNT: - /* cfg_arg1 - Set to a target subsystem - * cfg_rc1 - Set to number of tests - */ - rc = splat_test_count(&kcfg, arg); - break; - case SPLAT_CFG_TEST_LIST: - /* cfg_arg1 - Set to a target subsystem - * cfg_rc1 - Set to number of tests - * cfg_data.splat_subsystems - Populated with tests - */ - rc = splat_test_list(&kcfg, arg); - break; - default: - splat_print(file, "Bad config command %d\n", - kcfg.cfg_cmd); - rc = -EINVAL; - break; - } - - return rc; -} - -static int -splat_ioctl_cmd(struct file *file, unsigned int cmd, unsigned long arg) -{ - splat_subsystem_t *sub; - splat_cmd_t kcmd; - int rc = -EINVAL; - void *data = NULL; - - /* User and kernel space agree about arg size */ - if (_IOC_SIZE(cmd) != sizeof(kcmd)) - return -EBADMSG; - - if (copy_from_user(&kcmd, (splat_cfg_t *)arg, sizeof(kcmd))) - return -EFAULT; - - if (kcmd.cmd_magic != SPLAT_CMD_MAGIC) { - splat_print(file, "Bad command magic 0x%x != 0x%x\n", - kcmd.cmd_magic, SPLAT_CFG_MAGIC); - return -EINVAL; - } - - /* Allocate memory for any opaque data the caller needed to pass on */ - if (kcmd.cmd_data_size > 0) { - data = (void *)kmalloc(kcmd.cmd_data_size, GFP_KERNEL); - if (data == NULL) - return -ENOMEM; - - if (copy_from_user(data, (void *)(arg + offsetof(splat_cmd_t, - cmd_data_str)), kcmd.cmd_data_size)) { - kfree(data); - return -EFAULT; - } - } - - sub = splat_subsystem_find(kcmd.cmd_subsystem); - if (sub != NULL) - rc = splat_validate(file, sub, kcmd.cmd_test, data); - else - rc = -EINVAL; - - if (data != NULL) - kfree(data); - - return rc; -} - -static long -splat_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -{ - int rc = 0; - - /* Ignore tty ioctls */ - if ((cmd & 0xffffff00) == ((int)'T') << 8) - return -ENOTTY; - - switch (cmd) { - case SPLAT_CFG: - rc = splat_ioctl_cfg(file, cmd, arg); - break; - case SPLAT_CMD: - rc = splat_ioctl_cmd(file, cmd, arg); - break; - default: - splat_print(file, "Bad ioctl command %d\n", cmd); - rc = -EINVAL; - break; - } - - return rc; -} - -#ifdef CONFIG_COMPAT -/* Compatibility handler for ioctls from 32-bit ELF binaries */ -static long -splat_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -{ - return splat_unlocked_ioctl(file, cmd, arg); -} -#endif /* CONFIG_COMPAT */ - -/* I'm not sure why you would want to write in to this buffer from - * user space since its principle use is to pass test status info - * back to the user space, but I don't see any reason to prevent it. - */ -static ssize_t splat_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) -{ - splat_info_t *info = (splat_info_t *)file->private_data; - int rc = 0; - - ASSERT(info); - ASSERT(info->info_buffer); - - mutex_enter(&info->info_lock); - - /* Write beyond EOF */ - if (*ppos >= info->info_size) { - rc = -EFBIG; - goto out; - } - - /* Resize count if beyond EOF */ - if (*ppos + count > info->info_size) - count = info->info_size - *ppos; - - if (copy_from_user(info->info_buffer, buf, count)) { - rc = -EFAULT; - goto out; - } - - *ppos += count; - rc = count; -out: - mutex_exit(&info->info_lock); - return rc; -} - -static ssize_t splat_read(struct file *file, char __user *buf, - size_t count, loff_t *ppos) -{ - splat_info_t *info = (splat_info_t *)file->private_data; - int rc = 0; - - ASSERT(info); - ASSERT(info->info_buffer); - - mutex_enter(&info->info_lock); - - /* Read beyond EOF */ - if (*ppos >= info->info_size) - goto out; - - /* Resize count if beyond EOF */ - if (*ppos + count > info->info_size) - count = info->info_size - *ppos; - - if (copy_to_user(buf, info->info_buffer + *ppos, count)) { - rc = -EFAULT; - goto out; - } - - *ppos += count; - rc = count; -out: - mutex_exit(&info->info_lock); - return rc; -} - -static loff_t splat_seek(struct file *file, loff_t offset, int origin) -{ - splat_info_t *info = (splat_info_t *)file->private_data; - int rc = -EINVAL; - - ASSERT(info); - ASSERT(info->info_buffer); - - mutex_enter(&info->info_lock); - - switch (origin) { - case 0: /* SEEK_SET - No-op just do it */ - break; - case 1: /* SEEK_CUR - Seek from current */ - offset = file->f_pos + offset; - break; - case 2: /* SEEK_END - Seek from end */ - offset = info->info_size + offset; - break; - } - - if (offset >= 0) { - file->f_pos = offset; - file->f_version = 0; - rc = offset; - } - - mutex_exit(&info->info_lock); - - return rc; -} - -static struct file_operations splat_fops = { - .owner = THIS_MODULE, - .open = splat_open, - .release = splat_release, - .unlocked_ioctl = splat_unlocked_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = splat_compat_ioctl, -#endif - .read = splat_read, - .write = splat_write, - .llseek = splat_seek, -}; - -static struct miscdevice splat_misc = { - .minor = MISC_DYNAMIC_MINOR, - .name = SPLAT_NAME, - .fops = &splat_fops, -}; - -static void splat_subsystem_init(const char *name, - splat_subsystem_t *(*init)(void)) -{ - splat_subsystem_t *sub; - sub = init(); - if (sub == NULL) { - printk(KERN_ERR "splat: Error initializing: %s\n", name); - return; - } - spin_lock(&splat_module_lock); - list_add_tail(&sub->subsystem_list, &splat_module_list); - spin_unlock(&splat_module_lock); -} - -static void splat_subsystem_fini(const char *name, - int (*id_func)(void), void (*fini)(splat_subsystem_t *)) -{ - splat_subsystem_t *sub, *tmp; - int id, flag = 0; - - id = id_func(); - spin_lock(&splat_module_lock); - list_for_each_entry_safe(sub, tmp, &splat_module_list, subsystem_list) { - if (sub->desc.id == id) { - list_del_init(&sub->subsystem_list); - flag = 1; - break; - } - } - spin_unlock(&splat_module_lock); - if (flag == 0) - printk(KERN_ERR "splat: Error finalizing: %s\n", name); - else - fini(sub); -} - -#define SPLAT_SUBSYSTEM_INIT(type) \ - splat_subsystem_init(#type, splat_##type##_init) -#define SPLAT_SUBSYSTEM_FINI(type) \ - splat_subsystem_fini(#type, splat_##type##_id, splat_##type##_fini) - -void splat_test_init(splat_subsystem_t *sub, const char *name, - const char *desc, unsigned int tid, splat_test_func_t func) -{ - splat_test_t *test; - test = kmalloc(sizeof (splat_test_t), GFP_KERNEL); - if (test == NULL) { - printk(KERN_ERR "splat: Error initializing: %s/%u\n", - name, tid); - return; - } - memset(test, 0, sizeof (splat_test_t)); - strncpy(test->desc.name, name, SPLAT_NAME_SIZE-1); - strncpy(test->desc.desc, desc, SPLAT_DESC_SIZE-1); - test->desc.id = tid; - test->test = func; - INIT_LIST_HEAD(&test->test_list); - spin_lock(&sub->test_lock); - list_add_tail(&test->test_list, &sub->test_list); - spin_unlock(&sub->test_lock); -} - -void splat_test_fini(splat_subsystem_t *sub, unsigned int tid) -{ - splat_test_t *test, *tmp; - int flag = 0; - - spin_lock(&sub->test_lock); - list_for_each_entry_safe(test, tmp, &sub->test_list, test_list) { - if (test->desc.id == tid) { - list_del_init(&test->test_list); - kfree(test); - flag = 1; - break; - } - } - spin_unlock(&sub->test_lock); - - if (flag == 0) - printk(KERN_ERR "splat: Error finalizing: %u\n", tid); -} - -static int __init -splat_init(void) -{ - int error; - - spin_lock_init(&splat_module_lock); - INIT_LIST_HEAD(&splat_module_list); - - SPLAT_SUBSYSTEM_INIT(kmem); - SPLAT_SUBSYSTEM_INIT(taskq); - SPLAT_SUBSYSTEM_INIT(krng); - SPLAT_SUBSYSTEM_INIT(mutex); - SPLAT_SUBSYSTEM_INIT(condvar); - SPLAT_SUBSYSTEM_INIT(thread); - SPLAT_SUBSYSTEM_INIT(rwlock); - SPLAT_SUBSYSTEM_INIT(time); - SPLAT_SUBSYSTEM_INIT(vnode); - SPLAT_SUBSYSTEM_INIT(kobj); - SPLAT_SUBSYSTEM_INIT(atomic); - SPLAT_SUBSYSTEM_INIT(list); - SPLAT_SUBSYSTEM_INIT(generic); - SPLAT_SUBSYSTEM_INIT(cred); - SPLAT_SUBSYSTEM_INIT(zlib); - SPLAT_SUBSYSTEM_INIT(linux); - - error = misc_register(&splat_misc); - if (error) { - printk(KERN_INFO "SPLAT: misc_register() failed %d\n", error); - } else { - printk(KERN_INFO "SPLAT: Loaded module v%s-%s%s\n", - SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); - } - - return (error); -} - -static void __exit -splat_fini(void) -{ - misc_deregister(&splat_misc); - - SPLAT_SUBSYSTEM_FINI(linux); - SPLAT_SUBSYSTEM_FINI(zlib); - SPLAT_SUBSYSTEM_FINI(cred); - SPLAT_SUBSYSTEM_FINI(generic); - SPLAT_SUBSYSTEM_FINI(list); - SPLAT_SUBSYSTEM_FINI(atomic); - SPLAT_SUBSYSTEM_FINI(kobj); - SPLAT_SUBSYSTEM_FINI(vnode); - SPLAT_SUBSYSTEM_FINI(time); - SPLAT_SUBSYSTEM_FINI(rwlock); - SPLAT_SUBSYSTEM_FINI(thread); - SPLAT_SUBSYSTEM_FINI(condvar); - SPLAT_SUBSYSTEM_FINI(mutex); - SPLAT_SUBSYSTEM_FINI(krng); - SPLAT_SUBSYSTEM_FINI(taskq); - SPLAT_SUBSYSTEM_FINI(kmem); - - ASSERT(list_empty(&splat_module_list)); - printk(KERN_INFO "SPLAT: Unloaded module v%s-%s%s\n", - SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); -} - -module_init(splat_init); -module_exit(splat_fini); - -MODULE_DESCRIPTION("Solaris Porting LAyer Tests"); -MODULE_AUTHOR(SPL_META_AUTHOR); -MODULE_LICENSE(SPL_META_LICENSE); -MODULE_VERSION(SPL_META_VERSION "-" SPL_META_RELEASE); diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c deleted file mode 100644 index e256c83f0..000000000 --- a/module/splat/splat-generic.c +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Generic Tests. - */ - -#include -#include -#include "splat-internal.h" - -#define SPLAT_GENERIC_NAME "generic" -#define SPLAT_GENERIC_DESC "Kernel Generic Tests" - -#define SPLAT_GENERIC_TEST1_ID 0x0d01 -#define SPLAT_GENERIC_TEST1_NAME "ddi_strtoul" -#define SPLAT_GENERIC_TEST1_DESC "ddi_strtoul Test" - -#define SPLAT_GENERIC_TEST2_ID 0x0d02 -#define SPLAT_GENERIC_TEST2_NAME "ddi_strtol" -#define SPLAT_GENERIC_TEST2_DESC "ddi_strtol Test" - -#define SPLAT_GENERIC_TEST3_ID 0x0d03 -#define SPLAT_GENERIC_TEST3_NAME "ddi_strtoull" -#define SPLAT_GENERIC_TEST3_DESC "ddi_strtoull Test" - -#define SPLAT_GENERIC_TEST4_ID 0x0d04 -#define SPLAT_GENERIC_TEST4_NAME "ddi_strtoll" -#define SPLAT_GENERIC_TEST4_DESC "ddi_strtoll Test" - -# define SPLAT_GENERIC_TEST5_ID 0x0d05 -# define SPLAT_GENERIC_TEST5_NAME "udivdi3" -# define SPLAT_GENERIC_TEST5_DESC "Unsigned Div-64 Test" - -# define SPLAT_GENERIC_TEST6_ID 0x0d06 -# define SPLAT_GENERIC_TEST6_NAME "divdi3" -# define SPLAT_GENERIC_TEST6_DESC "Signed Div-64 Test" - -#define STR_POS "123456789" -#define STR_NEG "-123456789" -#define STR_BASE "0xabcdef" -#define STR_RANGE_MAX "10000000000000000" -#define STR_RANGE_MIN "-10000000000000000" -#define STR_INVAL1 "12345U" -#define STR_INVAL2 "invald" - -#define VAL_POS 123456789 -#define VAL_NEG -123456789 -#define VAL_BASE 0xabcdef -#define VAL_INVAL1 12345U - -#define define_generic_msg_strtox(type, valtype) \ -static void \ -generic_msg_strto##type(struct file *file, char *msg, int rc, int *err, \ - const char *s, valtype d, char *endptr) \ -{ \ - splat_vprint(file, SPLAT_GENERIC_TEST1_NAME, \ - "%s (%d) %s: %s == %lld, 0x%p\n", \ - rc ? "Fail" : "Pass", *err, msg, s, \ - (unsigned long long)d, endptr); \ - *err = rc; \ -} - -define_generic_msg_strtox(ul, unsigned long); -define_generic_msg_strtox(l, long); -define_generic_msg_strtox(ull, unsigned long long); -define_generic_msg_strtox(ll, long long); - -#define define_splat_generic_test_strtox(type, valtype) \ -static int \ -splat_generic_test_strto##type(struct file *file, void *arg) \ -{ \ - int rc, rc1, rc2, rc3, rc4, rc5, rc6, rc7; \ - char str[20], *endptr; \ - valtype r; \ - \ - /* Positive value: expect success */ \ - r = 0; \ - rc = 1; \ - endptr = NULL; \ - rc1 = ddi_strto##type(STR_POS, &endptr, 10, &r); \ - if (rc1 == 0 && r == VAL_POS && endptr && *endptr == '\0') \ - rc = 0; \ - \ - generic_msg_strto##type(file, "positive", rc , &rc1, \ - STR_POS, r, endptr); \ - \ - /* Negative value: expect success */ \ - r = 0; \ - rc = 1; \ - endptr = NULL; \ - strcpy(str, STR_NEG); \ - rc2 = ddi_strto##type(str, &endptr, 10, &r); \ - if (#type[0] == 'u') { \ - if (rc2 == 0 && r == 0 && endptr == str) \ - rc = 0; \ - } else { \ - if (rc2 == 0 && r == VAL_NEG && \ - endptr && *endptr == '\0') \ - rc = 0; \ - } \ - \ - generic_msg_strto##type(file, "negative", rc, &rc2, \ - STR_NEG, r, endptr); \ - \ - /* Non decimal base: expect sucess */ \ - r = 0; \ - rc = 1; \ - endptr = NULL; \ - rc3 = ddi_strto##type(STR_BASE, &endptr, 0, &r); \ - if (rc3 == 0 && r == VAL_BASE && endptr && *endptr == '\0') \ - rc = 0; \ - \ - generic_msg_strto##type(file, "base", rc, &rc3, \ - STR_BASE, r, endptr); \ - \ - /* Max out of range: failure expected, r unchanged */ \ - r = 0; \ - rc = 1; \ - endptr = NULL; \ - rc4 = ddi_strto##type(STR_RANGE_MAX, &endptr, 16, &r); \ - if (rc4 == ERANGE && r == 0 && endptr == NULL) \ - rc = 0; \ - \ - generic_msg_strto##type(file, "max", rc, &rc4, \ - STR_RANGE_MAX, r, endptr); \ - \ - /* Min out of range: failure expected, r unchanged */ \ - r = 0; \ - rc = 1; \ - endptr = NULL; \ - strcpy(str, STR_RANGE_MIN); \ - rc5 = ddi_strto##type(str, &endptr, 16, &r); \ - if (#type[0] == 'u') { \ - if (rc5 == 0 && r == 0 && endptr == str) \ - rc = 0; \ - } else { \ - if (rc5 == ERANGE && r == 0 && endptr == NULL) \ - rc = 0; \ - } \ - \ - generic_msg_strto##type(file, "min", rc, &rc5, \ - STR_RANGE_MIN, r, endptr); \ - \ - /* Invalid string: success expected, endptr == 'U' */ \ - r = 0; \ - rc = 1; \ - endptr = NULL; \ - rc6 = ddi_strto##type(STR_INVAL1, &endptr, 10, &r); \ - if (rc6 == 0 && r == VAL_INVAL1 && endptr && *endptr == 'U') \ - rc = 0; \ - \ - generic_msg_strto##type(file, "invalid", rc, &rc6, \ - STR_INVAL1, r, endptr); \ - \ - /* Invalid string: failure expected, endptr == str */ \ - r = 0; \ - rc = 1; \ - endptr = NULL; \ - strcpy(str, STR_INVAL2); \ - rc7 = ddi_strto##type(str, &endptr, 10, &r); \ - if (rc7 == 0 && r == 0 && endptr == str) \ - rc = 0; \ - \ - generic_msg_strto##type(file, "invalid", rc, &rc7, \ - STR_INVAL2, r, endptr); \ - \ - return (rc1 || rc2 || rc3 || rc4 || rc5 || rc6 || rc7) ? \ - -EINVAL : 0; \ -} - -define_splat_generic_test_strtox(ul, unsigned long); -define_splat_generic_test_strtox(l, long); -define_splat_generic_test_strtox(ull, unsigned long long); -define_splat_generic_test_strtox(ll, long long); - -/* - * The entries in the table are used in all combinations and the - * return value is checked to ensure it is range. On 32-bit - * systems __udivdi3 will be invoked for the 64-bit division. - * On 64-bit system the native 64-bit divide will be used so - * __udivdi3 isn't used but we might as well stil run the test. - */ -static int -splat_generic_test_udivdi3(struct file *file, void *arg) -{ - const uint64_t tabu[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 1000, 2003, - 32765, 32766, 32767, 32768, 32769, 32760, - 65533, 65534, 65535, 65536, 65537, 65538, - 0x7ffffffeULL, 0x7fffffffULL, 0x80000000ULL, 0x80000001ULL, - 0x7000000000000000ULL, 0x7000000080000000ULL, 0x7000000080000001ULL, - 0x7fffffffffffffffULL, 0x7fffffff8fffffffULL, 0x7fffffff8ffffff1ULL, - 0x7fffffff00000000ULL, 0x7fffffff80000000ULL, 0x7fffffff00000001ULL, - 0x8000000000000000ULL, 0x8000000080000000ULL, 0x8000000080000001ULL, - 0xc000000000000000ULL, 0xc000000080000000ULL, 0xc000000080000001ULL, - 0xfffffffffffffffdULL, 0xfffffffffffffffeULL, 0xffffffffffffffffULL, - }; - uint64_t uu, vu, qu, ru; - int n, i, j, errors = 0; - - splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, "%s", - "Testing unsigned 64-bit division.\n"); - n = sizeof(tabu) / sizeof(tabu[0]); - for (i = 0; i < n; i++) { - for (j = 1; j < n; j++) { - uu = tabu[i]; - vu = tabu[j]; - qu = uu / vu; /* __udivdi3 */ - ru = uu - qu * vu; - if (qu > uu || ru >= vu) { - splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, - "%016llx/%016llx != %016llx rem %016llx\n", - uu, vu, qu, ru); - errors++; - } - } - } - - if (errors) { - splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, - "Failed %d/%d tests\n", errors, n * (n - 1)); - return -ERANGE; - } - - splat_vprint(file, SPLAT_GENERIC_TEST5_NAME, - "Passed all %d tests\n", n * (n - 1)); - - return 0; -} - -/* - * The entries the table are used in all combinations, with + and - signs - * preceding them. The return value is checked to ensure it is range. - * On 32-bit systems __divdi3 will be invoked for the 64-bit division. - * On 64-bit system the native 64-bit divide will be used so __divdi3 - * isn't used but we might as well stil run the test. - */ -static int -splat_generic_test_divdi3(struct file *file, void *arg) -{ - const int64_t tabs[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 1000, 2003, - 32765, 32766, 32767, 32768, 32769, 32760, - 65533, 65534, 65535, 65536, 65537, 65538, - 0x7ffffffeLL, 0x7fffffffLL, 0x80000000LL, 0x80000001LL, - 0x7000000000000000LL, 0x7000000080000000LL, 0x7000000080000001LL, - 0x7fffffffffffffffLL, 0x7fffffff8fffffffLL, 0x7fffffff8ffffff1LL, - 0x7fffffff00000000LL, 0x7fffffff80000000LL, 0x7fffffff00000001LL, - 0x0123456789abcdefLL, 0x00000000abcdef01LL, 0x0000000012345678LL, -#if BITS_PER_LONG == 32 - 0x8000000000000000LL, 0x8000000080000000LL, 0x8000000080000001LL, -#endif - }; - int64_t u, v, q, r; - int n, i, j, k, errors = 0; - - splat_vprint(file, SPLAT_GENERIC_TEST6_NAME, "%s", - "Testing signed 64-bit division.\n"); - n = sizeof(tabs) / sizeof(tabs[0]); - for (i = 0; i < n; i++) { - for (j = 1; j < n; j++) { - for (k = 0; k <= 3; k++) { - u = (k & 1) ? -tabs[i] : tabs[i]; - v = (k >= 2) ? -tabs[j] : tabs[j]; - - q = u / v; /* __divdi3 */ - r = u - q * v; - if (abs64(q) > abs64(u) || - abs64(r) >= abs64(v) || - (r != 0 && (r ^ u) < 0)) { - splat_vprint(file, - SPLAT_GENERIC_TEST6_NAME, - "%016llx/%016llx != %016llx " - "rem %016llx\n", u, v, q, r); - errors++; - } - } - } - } - - if (errors) { - splat_vprint(file, SPLAT_GENERIC_TEST6_NAME, - "Failed %d/%d tests\n", errors, n * (n - 1)); - return -ERANGE; - } - - splat_vprint(file, SPLAT_GENERIC_TEST6_NAME, - "Passed all %d tests\n", n * (n - 1)); - - return 0; -} - -splat_subsystem_t * -splat_generic_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_GENERIC_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_GENERIC_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_GENERIC; - - splat_test_init(sub, SPLAT_GENERIC_TEST1_NAME, SPLAT_GENERIC_TEST1_DESC, - SPLAT_GENERIC_TEST1_ID, splat_generic_test_strtoul); - splat_test_init(sub, SPLAT_GENERIC_TEST2_NAME, SPLAT_GENERIC_TEST2_DESC, - SPLAT_GENERIC_TEST2_ID, splat_generic_test_strtol); - splat_test_init(sub, SPLAT_GENERIC_TEST3_NAME, SPLAT_GENERIC_TEST3_DESC, - SPLAT_GENERIC_TEST3_ID, splat_generic_test_strtoull); - splat_test_init(sub, SPLAT_GENERIC_TEST4_NAME, SPLAT_GENERIC_TEST4_DESC, - SPLAT_GENERIC_TEST4_ID, splat_generic_test_strtoll); - splat_test_init(sub, SPLAT_GENERIC_TEST5_NAME, SPLAT_GENERIC_TEST5_DESC, - SPLAT_GENERIC_TEST5_ID, splat_generic_test_udivdi3); - splat_test_init(sub, SPLAT_GENERIC_TEST6_NAME, SPLAT_GENERIC_TEST6_DESC, - SPLAT_GENERIC_TEST6_ID, splat_generic_test_divdi3); - - return sub; -} - -void -splat_generic_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_GENERIC_TEST6_ID); - splat_test_fini(sub, SPLAT_GENERIC_TEST5_ID); - splat_test_fini(sub, SPLAT_GENERIC_TEST4_ID); - splat_test_fini(sub, SPLAT_GENERIC_TEST3_ID); - splat_test_fini(sub, SPLAT_GENERIC_TEST2_ID); - splat_test_fini(sub, SPLAT_GENERIC_TEST1_ID); - - kfree(sub); -} - -int -splat_generic_id(void) -{ - return SPLAT_SUBSYSTEM_GENERIC; -} diff --git a/module/splat/splat-internal.h b/module/splat/splat-internal.h deleted file mode 100644 index 97c10acfd..000000000 --- a/module/splat/splat-internal.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - */ - -#ifndef _SPLAT_INTERNAL_H -#define _SPLAT_INTERNAL_H - -#include "splat-ctl.h" -#include -#include -#include - -typedef int (*splat_test_func_t)(struct file *, void *); - -typedef struct splat_test { - struct list_head test_list; - splat_user_t desc; - splat_test_func_t test; -} splat_test_t; - -typedef struct splat_subsystem { - struct list_head subsystem_list;/* List had to chain entries */ - splat_user_t desc; - spinlock_t test_lock; - struct list_head test_list; -} splat_subsystem_t; - -void splat_test_init(splat_subsystem_t *sub, const char *name, - const char *desc, unsigned int tid, splat_test_func_t func); -void splat_test_fini(splat_subsystem_t *sub, unsigned int tid); - -#define SPLAT_INFO_BUFFER_SIZE 65536 -#define SPLAT_INFO_BUFFER_REDZONE 256 - -typedef struct splat_info { - kmutex_t info_lock; - int info_size; - char *info_buffer; - char *info_head; /* Internal kernel use only */ -} splat_info_t; - -#define sym2str(sym) (char *)(#sym) - -#define splat_print(file, format, args...) \ -({ splat_info_t *_info_ = (splat_info_t *)file->private_data; \ - int _rc_; \ - \ - ASSERT(_info_); \ - ASSERT(_info_->info_buffer); \ - \ - mutex_enter(&_info_->info_lock); \ - \ - /* Don't allow the kernel to start a write in the red zone */ \ - if ((int)(_info_->info_head - _info_->info_buffer) > \ - (SPLAT_INFO_BUFFER_SIZE - SPLAT_INFO_BUFFER_REDZONE)) { \ - _rc_ = -EOVERFLOW; \ - } else { \ - _rc_ = sprintf(_info_->info_head, format, args); \ - if (_rc_ >= 0) \ - _info_->info_head += _rc_; \ - } \ - \ - mutex_exit(&_info_->info_lock); \ - _rc_; \ -}) - -#define splat_vprint(file, test, format, args...) \ - splat_print(file, "%*s: " format, SPLAT_NAME_SIZE, test, args) - -#define splat_locked_test(lock, test) \ -({ \ - int _rc_; \ - spin_lock(lock); \ - _rc_ = (test) ? 1 : 0; \ - spin_unlock(lock); \ - _rc_; \ -}) - -splat_subsystem_t *splat_condvar_init(void); -splat_subsystem_t *splat_kmem_init(void); -splat_subsystem_t *splat_mutex_init(void); -splat_subsystem_t *splat_krng_init(void); -splat_subsystem_t *splat_rwlock_init(void); -splat_subsystem_t *splat_taskq_init(void); -splat_subsystem_t *splat_thread_init(void); -splat_subsystem_t *splat_time_init(void); -splat_subsystem_t *splat_vnode_init(void); -splat_subsystem_t *splat_kobj_init(void); -splat_subsystem_t *splat_atomic_init(void); -splat_subsystem_t *splat_list_init(void); -splat_subsystem_t *splat_generic_init(void); -splat_subsystem_t *splat_cred_init(void); -splat_subsystem_t *splat_zlib_init(void); -splat_subsystem_t *splat_linux_init(void); - -void splat_condvar_fini(splat_subsystem_t *); -void splat_kmem_fini(splat_subsystem_t *); -void splat_mutex_fini(splat_subsystem_t *); -void splat_krng_fini(splat_subsystem_t *); -void splat_rwlock_fini(splat_subsystem_t *); -void splat_taskq_fini(splat_subsystem_t *); -void splat_thread_fini(splat_subsystem_t *); -void splat_time_fini(splat_subsystem_t *); -void splat_vnode_fini(splat_subsystem_t *); -void splat_kobj_fini(splat_subsystem_t *); -void splat_atomic_fini(splat_subsystem_t *); -void splat_list_fini(splat_subsystem_t *); -void splat_generic_fini(splat_subsystem_t *); -void splat_cred_fini(splat_subsystem_t *); -void splat_zlib_fini(splat_subsystem_t *); -void splat_linux_fini(splat_subsystem_t *); - -int splat_condvar_id(void); -int splat_kmem_id(void); -int splat_mutex_id(void); -int splat_krng_id(void); -int splat_rwlock_id(void); -int splat_taskq_id(void); -int splat_thread_id(void); -int splat_time_id(void); -int splat_vnode_id(void); -int splat_kobj_id(void); -int splat_atomic_id(void); -int splat_list_id(void); -int splat_generic_id(void); -int splat_cred_id(void); -int splat_zlib_id(void); -int splat_linux_id(void); - -#endif /* _SPLAT_INTERNAL_H */ diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c deleted file mode 100644 index 282f42d77..000000000 --- a/module/splat/splat-kmem.c +++ /dev/null @@ -1,1410 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Kmem Tests. - */ - -#include -#include -#include -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_KMEM_NAME "kmem" -#define SPLAT_KMEM_DESC "Kernel Malloc/Slab Tests" - -#define SPLAT_KMEM_TEST1_ID 0x0101 -#define SPLAT_KMEM_TEST1_NAME "kmem_alloc" -#define SPLAT_KMEM_TEST1_DESC "Memory allocation test (kmem_alloc)" - -#define SPLAT_KMEM_TEST2_ID 0x0102 -#define SPLAT_KMEM_TEST2_NAME "kmem_zalloc" -#define SPLAT_KMEM_TEST2_DESC "Memory allocation test (kmem_zalloc)" - -#define SPLAT_KMEM_TEST3_ID 0x0103 -#define SPLAT_KMEM_TEST3_NAME "vmem_alloc" -#define SPLAT_KMEM_TEST3_DESC "Memory allocation test (vmem_alloc)" - -#define SPLAT_KMEM_TEST4_ID 0x0104 -#define SPLAT_KMEM_TEST4_NAME "vmem_zalloc" -#define SPLAT_KMEM_TEST4_DESC "Memory allocation test (vmem_zalloc)" - -#define SPLAT_KMEM_TEST5_ID 0x0105 -#define SPLAT_KMEM_TEST5_NAME "slab_small" -#define SPLAT_KMEM_TEST5_DESC "Slab ctor/dtor test (small)" - -#define SPLAT_KMEM_TEST6_ID 0x0106 -#define SPLAT_KMEM_TEST6_NAME "slab_large" -#define SPLAT_KMEM_TEST6_DESC "Slab ctor/dtor test (large)" - -#define SPLAT_KMEM_TEST7_ID 0x0107 -#define SPLAT_KMEM_TEST7_NAME "slab_align" -#define SPLAT_KMEM_TEST7_DESC "Slab alignment test" - -#define SPLAT_KMEM_TEST8_ID 0x0108 -#define SPLAT_KMEM_TEST8_NAME "slab_reap" -#define SPLAT_KMEM_TEST8_DESC "Slab reaping test" - -#define SPLAT_KMEM_TEST9_ID 0x0109 -#define SPLAT_KMEM_TEST9_NAME "slab_age" -#define SPLAT_KMEM_TEST9_DESC "Slab aging test" - -#define SPLAT_KMEM_TEST10_ID 0x010a -#define SPLAT_KMEM_TEST10_NAME "slab_lock" -#define SPLAT_KMEM_TEST10_DESC "Slab locking test" - -#if 0 -#define SPLAT_KMEM_TEST11_ID 0x010b -#define SPLAT_KMEM_TEST11_NAME "slab_overcommit" -#define SPLAT_KMEM_TEST11_DESC "Slab memory overcommit test" -#endif - -#define SPLAT_KMEM_TEST13_ID 0x010d -#define SPLAT_KMEM_TEST13_NAME "slab_reclaim" -#define SPLAT_KMEM_TEST13_DESC "Slab direct memory reclaim test" - -#define SPLAT_KMEM_ALLOC_COUNT 10 -#define SPLAT_VMEM_ALLOC_COUNT 10 - - -static int -splat_kmem_test1(struct file *file, void *arg) -{ - void *ptr[SPLAT_KMEM_ALLOC_COUNT]; - int size = PAGE_SIZE; - int i, count, rc = 0; - - while ((!rc) && (size <= spl_kmem_alloc_warn)) { - count = 0; - - for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_alloc(size, KM_SLEEP); - if (ptr[i]) - count++; - } - - for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) - if (ptr[i]) - kmem_free(ptr[i], size); - - splat_vprint(file, SPLAT_KMEM_TEST1_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_KMEM_ALLOC_COUNT); - if (count != SPLAT_KMEM_ALLOC_COUNT) - rc = -ENOMEM; - - size *= 2; - } - - return rc; -} - -static int -splat_kmem_test2(struct file *file, void *arg) -{ - void *ptr[SPLAT_KMEM_ALLOC_COUNT]; - int size = PAGE_SIZE; - int i, j, count, rc = 0; - - while ((!rc) && (size <= spl_kmem_alloc_warn)) { - count = 0; - - for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - ptr[i] = kmem_zalloc(size, KM_SLEEP); - if (ptr[i]) - count++; - } - - /* Ensure buffer has been zero filled */ - for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) { - for (j = 0; j < size; j++) { - if (((char *)ptr[i])[j] != '\0') { - splat_vprint(file,SPLAT_KMEM_TEST2_NAME, - "%d-byte allocation was " - "not zeroed\n", size); - rc = -EFAULT; - } - } - } - - for (i = 0; i < SPLAT_KMEM_ALLOC_COUNT; i++) - if (ptr[i]) - kmem_free(ptr[i], size); - - splat_vprint(file, SPLAT_KMEM_TEST2_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_KMEM_ALLOC_COUNT); - if (count != SPLAT_KMEM_ALLOC_COUNT) - rc = -ENOMEM; - - size *= 2; - } - - return rc; -} - -static int -splat_kmem_test3(struct file *file, void *arg) -{ - void *ptr[SPLAT_VMEM_ALLOC_COUNT]; - int size = PAGE_SIZE; - int i, count, rc = 0; - - /* - * Test up to 4x the maximum kmem_alloc() size to ensure both - * the kmem_alloc() and vmem_alloc() call paths are used. - */ - while ((!rc) && (size <= (4 * spl_kmem_alloc_max))) { - count = 0; - - for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { - ptr[i] = vmem_alloc(size, KM_SLEEP); - if (ptr[i]) - count++; - } - - for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) - if (ptr[i]) - vmem_free(ptr[i], size); - - splat_vprint(file, SPLAT_KMEM_TEST3_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_VMEM_ALLOC_COUNT); - if (count != SPLAT_VMEM_ALLOC_COUNT) - rc = -ENOMEM; - - size *= 2; - } - - return rc; -} - -static int -splat_kmem_test4(struct file *file, void *arg) -{ - void *ptr[SPLAT_VMEM_ALLOC_COUNT]; - int size = PAGE_SIZE; - int i, j, count, rc = 0; - - /* - * Test up to 4x the maximum kmem_zalloc() size to ensure both - * the kmem_zalloc() and vmem_zalloc() call paths are used. - */ - while ((!rc) && (size <= (4 * spl_kmem_alloc_max))) { - count = 0; - - for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { - ptr[i] = vmem_zalloc(size, KM_SLEEP); - if (ptr[i]) - count++; - } - - /* Ensure buffer has been zero filled */ - for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) { - for (j = 0; j < size; j++) { - if (((char *)ptr[i])[j] != '\0') { - splat_vprint(file, SPLAT_KMEM_TEST4_NAME, - "%d-byte allocation was " - "not zeroed\n", size); - rc = -EFAULT; - } - } - } - - for (i = 0; i < SPLAT_VMEM_ALLOC_COUNT; i++) - if (ptr[i]) - vmem_free(ptr[i], size); - - splat_vprint(file, SPLAT_KMEM_TEST4_NAME, - "%d byte allocations, %d/%d successful\n", - size, count, SPLAT_VMEM_ALLOC_COUNT); - if (count != SPLAT_VMEM_ALLOC_COUNT) - rc = -ENOMEM; - - size *= 2; - } - - return rc; -} - -#define SPLAT_KMEM_TEST_MAGIC 0x004488CCUL -#define SPLAT_KMEM_CACHE_NAME "kmem_test" -#define SPLAT_KMEM_OBJ_COUNT 1024 -#define SPLAT_KMEM_OBJ_RECLAIM 32 /* objects */ -#define SPLAT_KMEM_THREADS 32 - -#define KCP_FLAG_READY 0x01 - -typedef struct kmem_cache_data { - unsigned long kcd_magic; - struct list_head kcd_node; - int kcd_flag; - char kcd_buf[0]; -} kmem_cache_data_t; - -typedef struct kmem_cache_thread { - spinlock_t kct_lock; - int kct_id; - struct list_head kct_list; -} kmem_cache_thread_t; - -typedef struct kmem_cache_priv { - unsigned long kcp_magic; - struct file *kcp_file; - kmem_cache_t *kcp_cache; - spinlock_t kcp_lock; - spl_wait_queue_head_t kcp_ctl_waitq; - spl_wait_queue_head_t kcp_thr_waitq; - int kcp_flags; - int kcp_kct_count; - kmem_cache_thread_t *kcp_kct[SPLAT_KMEM_THREADS]; - int kcp_size; - int kcp_align; - int kcp_count; - int kcp_alloc; - int kcp_rc; -} kmem_cache_priv_t; - -static kmem_cache_priv_t * -splat_kmem_cache_test_kcp_alloc(struct file *file, char *name, - int size, int align, int alloc) -{ - kmem_cache_priv_t *kcp; - - kcp = kmem_zalloc(sizeof(kmem_cache_priv_t), KM_SLEEP); - if (!kcp) - return NULL; - - kcp->kcp_magic = SPLAT_KMEM_TEST_MAGIC; - kcp->kcp_file = file; - kcp->kcp_cache = NULL; - spin_lock_init(&kcp->kcp_lock); - init_waitqueue_head(&kcp->kcp_ctl_waitq); - init_waitqueue_head(&kcp->kcp_thr_waitq); - kcp->kcp_flags = 0; - kcp->kcp_kct_count = -1; - kcp->kcp_size = size; - kcp->kcp_align = align; - kcp->kcp_count = 0; - kcp->kcp_alloc = alloc; - kcp->kcp_rc = 0; - - return kcp; -} - -static void -splat_kmem_cache_test_kcp_free(kmem_cache_priv_t *kcp) -{ - kmem_free(kcp, sizeof(kmem_cache_priv_t)); -} - -static kmem_cache_thread_t * -splat_kmem_cache_test_kct_alloc(kmem_cache_priv_t *kcp, int id) -{ - kmem_cache_thread_t *kct; - - ASSERT3S(id, <, SPLAT_KMEM_THREADS); - ASSERT(kcp->kcp_kct[id] == NULL); - - kct = kmem_zalloc(sizeof(kmem_cache_thread_t), KM_SLEEP); - if (!kct) - return NULL; - - spin_lock_init(&kct->kct_lock); - kct->kct_id = id; - INIT_LIST_HEAD(&kct->kct_list); - - spin_lock(&kcp->kcp_lock); - kcp->kcp_kct[id] = kct; - spin_unlock(&kcp->kcp_lock); - - return kct; -} - -static void -splat_kmem_cache_test_kct_free(kmem_cache_priv_t *kcp, - kmem_cache_thread_t *kct) -{ - spin_lock(&kcp->kcp_lock); - kcp->kcp_kct[kct->kct_id] = NULL; - spin_unlock(&kcp->kcp_lock); - - kmem_free(kct, sizeof(kmem_cache_thread_t)); -} - -static void -splat_kmem_cache_test_kcd_free(kmem_cache_priv_t *kcp, - kmem_cache_thread_t *kct) -{ - kmem_cache_data_t *kcd; - - spin_lock(&kct->kct_lock); - while (!list_empty(&kct->kct_list)) { - kcd = list_entry(kct->kct_list.next, - kmem_cache_data_t, kcd_node); - list_del(&kcd->kcd_node); - spin_unlock(&kct->kct_lock); - - kmem_cache_free(kcp->kcp_cache, kcd); - - spin_lock(&kct->kct_lock); - } - spin_unlock(&kct->kct_lock); -} - -static int -splat_kmem_cache_test_kcd_alloc(kmem_cache_priv_t *kcp, - kmem_cache_thread_t *kct, int count) -{ - kmem_cache_data_t *kcd; - int i; - - for (i = 0; i < count; i++) { - kcd = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - if (kcd == NULL) { - splat_kmem_cache_test_kcd_free(kcp, kct); - return -ENOMEM; - } - - spin_lock(&kct->kct_lock); - list_add_tail(&kcd->kcd_node, &kct->kct_list); - spin_unlock(&kct->kct_lock); - } - - return 0; -} - -static void -splat_kmem_cache_test_debug(struct file *file, char *name, - kmem_cache_priv_t *kcp) -{ - int j; - - splat_vprint(file, name, "%s cache objects %d", - kcp->kcp_cache->skc_name, kcp->kcp_count); - - if (kcp->kcp_cache->skc_flags & (KMC_KMEM | KMC_VMEM)) { - splat_vprint(file, name, ", slabs %u/%u objs %u/%u", - (unsigned)kcp->kcp_cache->skc_slab_alloc, - (unsigned)kcp->kcp_cache->skc_slab_total, - (unsigned)kcp->kcp_cache->skc_obj_alloc, - (unsigned)kcp->kcp_cache->skc_obj_total); - - if (!(kcp->kcp_cache->skc_flags & KMC_NOMAGAZINE)) { - splat_vprint(file, name, "%s", "mags"); - - for_each_online_cpu(j) - splat_print(file, "%u/%u ", - kcp->kcp_cache->skc_mag[j]->skm_avail, - kcp->kcp_cache->skc_mag[j]->skm_size); - } - } - - splat_print(file, "%s\n", ""); -} - -static int -splat_kmem_cache_test_constructor(void *ptr, void *priv, int flags) -{ - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; - kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; - - if (kcd && kcp) { - kcd->kcd_magic = kcp->kcp_magic; - INIT_LIST_HEAD(&kcd->kcd_node); - kcd->kcd_flag = 1; - memset(kcd->kcd_buf, 0xaa, kcp->kcp_size - (sizeof *kcd)); - kcp->kcp_count++; - } - - return 0; -} - -static void -splat_kmem_cache_test_destructor(void *ptr, void *priv) -{ - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; - kmem_cache_data_t *kcd = (kmem_cache_data_t *)ptr; - - if (kcd && kcp) { - kcd->kcd_magic = 0; - kcd->kcd_flag = 0; - memset(kcd->kcd_buf, 0xbb, kcp->kcp_size - (sizeof *kcd)); - kcp->kcp_count--; - } - - return; -} - -/* - * Generic reclaim function which assumes that all objects may - * be reclaimed at any time. We free a small percentage of the - * objects linked off the kcp or kct[] every time we are called. - */ -static void -splat_kmem_cache_test_reclaim(void *priv) -{ - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)priv; - kmem_cache_thread_t *kct; - kmem_cache_data_t *kcd; - LIST_HEAD(reclaim); - int i, count; - - ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); - - /* For each kct thread reclaim some objects */ - spin_lock(&kcp->kcp_lock); - for (i = 0; i < SPLAT_KMEM_THREADS; i++) { - kct = kcp->kcp_kct[i]; - if (!kct) - continue; - - spin_unlock(&kcp->kcp_lock); - spin_lock(&kct->kct_lock); - - count = SPLAT_KMEM_OBJ_RECLAIM; - while (count > 0 && !list_empty(&kct->kct_list)) { - kcd = list_entry(kct->kct_list.next, - kmem_cache_data_t, kcd_node); - list_del(&kcd->kcd_node); - list_add(&kcd->kcd_node, &reclaim); - count--; - } - - spin_unlock(&kct->kct_lock); - spin_lock(&kcp->kcp_lock); - } - spin_unlock(&kcp->kcp_lock); - - /* Freed outside the spin lock */ - while (!list_empty(&reclaim)) { - kcd = list_entry(reclaim.next, kmem_cache_data_t, kcd_node); - list_del(&kcd->kcd_node); - kmem_cache_free(kcp->kcp_cache, kcd); - } - - return; -} - -static int -splat_kmem_cache_test_threads(kmem_cache_priv_t *kcp, int threads) -{ - int rc; - - spin_lock(&kcp->kcp_lock); - rc = (kcp->kcp_kct_count == threads); - spin_unlock(&kcp->kcp_lock); - - return rc; -} - -static int -splat_kmem_cache_test_flags(kmem_cache_priv_t *kcp, int flags) -{ - int rc; - - spin_lock(&kcp->kcp_lock); - rc = (kcp->kcp_flags & flags); - spin_unlock(&kcp->kcp_lock); - - return rc; -} - -static void -splat_kmem_cache_test_thread(void *arg) -{ - kmem_cache_priv_t *kcp = (kmem_cache_priv_t *)arg; - kmem_cache_thread_t *kct; - int rc = 0, id; - - ASSERT(kcp->kcp_magic == SPLAT_KMEM_TEST_MAGIC); - - /* Assign thread ids */ - spin_lock(&kcp->kcp_lock); - if (kcp->kcp_kct_count == -1) - kcp->kcp_kct_count = 0; - - id = kcp->kcp_kct_count; - kcp->kcp_kct_count++; - spin_unlock(&kcp->kcp_lock); - - kct = splat_kmem_cache_test_kct_alloc(kcp, id); - if (!kct) { - rc = -ENOMEM; - goto out; - } - - /* Wait for all threads to have started and report they are ready */ - if (kcp->kcp_kct_count == SPLAT_KMEM_THREADS) - wake_up(&kcp->kcp_ctl_waitq); - - wait_event(kcp->kcp_thr_waitq, - splat_kmem_cache_test_flags(kcp, KCP_FLAG_READY)); - - /* Create and destroy objects */ - rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, kcp->kcp_alloc); - splat_kmem_cache_test_kcd_free(kcp, kct); -out: - if (kct) - splat_kmem_cache_test_kct_free(kcp, kct); - - spin_lock(&kcp->kcp_lock); - if (!kcp->kcp_rc) - kcp->kcp_rc = rc; - - if ((--kcp->kcp_kct_count) == 0) - wake_up(&kcp->kcp_ctl_waitq); - - spin_unlock(&kcp->kcp_lock); - - thread_exit(); -} - -static int -splat_kmem_cache_test(struct file *file, void *arg, char *name, - int size, int align, int flags) -{ - kmem_cache_priv_t *kcp = NULL; - kmem_cache_data_t **kcd = NULL; - int i, rc = 0, objs = 0; - - /* Limit size for low memory machines (1/128 of memory) */ - size = MIN(size, (physmem * PAGE_SIZE) >> 7); - - splat_vprint(file, name, - "Testing size=%d, align=%d, flags=0x%04x\n", - size, align, flags); - - kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, align, 0); - if (!kcp) { - splat_vprint(file, name, "Unable to create '%s'\n", "kcp"); - return (-ENOMEM); - } - - kcp->kcp_cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, - kcp->kcp_size, kcp->kcp_align, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - NULL, kcp, NULL, flags); - if (kcp->kcp_cache == NULL) { - splat_vprint(file, name, "Unable to create " - "name='%s', size=%d, align=%d, flags=0x%x\n", - SPLAT_KMEM_CACHE_NAME, size, align, flags); - rc = -ENOMEM; - goto out_free; - } - - /* - * Allocate several slabs worth of objects to verify functionality. - * However, on 32-bit systems with limited address space constrain - * it to a single slab for the purposes of this test. - */ -#ifdef _LP64 - objs = kcp->kcp_cache->skc_slab_objs * 4; -#else - objs = 1; -#endif - kcd = kmem_zalloc(sizeof (kmem_cache_data_t *) * objs, KM_SLEEP); - if (kcd == NULL) { - splat_vprint(file, name, "Unable to allocate pointers " - "for %d objects\n", objs); - rc = -ENOMEM; - goto out_free; - } - - for (i = 0; i < objs; i++) { - kcd[i] = kmem_cache_alloc(kcp->kcp_cache, KM_SLEEP); - if (kcd[i] == NULL) { - splat_vprint(file, name, "Unable to allocate " - "from '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; - } - - if (!kcd[i]->kcd_flag) { - splat_vprint(file, name, "Failed to run constructor " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; - } - - if (kcd[i]->kcd_magic != kcp->kcp_magic) { - splat_vprint(file, name, - "Failed to pass private data to constructor " - "for '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; - } - } - - for (i = 0; i < objs; i++) { - kmem_cache_free(kcp->kcp_cache, kcd[i]); - - /* Destructors are run for every kmem_cache_free() */ - if (kcd[i]->kcd_flag) { - splat_vprint(file, name, - "Failed to run destructor for '%s'\n", - SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - goto out_free; - } - } - - if (kcp->kcp_count) { - splat_vprint(file, name, - "Failed to run destructor on all slab objects for '%s'\n", - SPLAT_KMEM_CACHE_NAME); - rc = -EINVAL; - } - - kmem_free(kcd, sizeof (kmem_cache_data_t *) * objs); - kmem_cache_destroy(kcp->kcp_cache); - - splat_kmem_cache_test_kcp_free(kcp); - splat_vprint(file, name, - "Success ran alloc'd/free'd %d objects of size %d\n", - objs, size); - - return (rc); - -out_free: - if (kcd) { - for (i = 0; i < objs; i++) { - if (kcd[i] != NULL) - kmem_cache_free(kcp->kcp_cache, kcd[i]); - } - - kmem_free(kcd, sizeof (kmem_cache_data_t *) * objs); - } - - if (kcp->kcp_cache) - kmem_cache_destroy(kcp->kcp_cache); - - splat_kmem_cache_test_kcp_free(kcp); - - return (rc); -} - -static int -splat_kmem_cache_thread_test(struct file *file, void *arg, char *name, - int size, int alloc, int max_time) -{ - kmem_cache_priv_t *kcp; - kthread_t *thr; - struct timespec start, stop, delta; - char cache_name[32]; - int i, rc = 0; - - kcp = splat_kmem_cache_test_kcp_alloc(file, name, size, 0, alloc); - if (!kcp) { - splat_vprint(file, name, "Unable to create '%s'\n", "kcp"); - return -ENOMEM; - } - - (void)snprintf(cache_name, 32, "%s-%d-%d", - SPLAT_KMEM_CACHE_NAME, size, alloc); - kcp->kcp_cache = - kmem_cache_create(cache_name, kcp->kcp_size, 0, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - splat_kmem_cache_test_reclaim, - kcp, NULL, 0); - if (!kcp->kcp_cache) { - splat_vprint(file, name, "Unable to create '%s'\n", cache_name); - rc = -ENOMEM; - goto out_kcp; - } - - getnstimeofday(&start); - - for (i = 0; i < SPLAT_KMEM_THREADS; i++) { - thr = thread_create(NULL, 0, - splat_kmem_cache_test_thread, - kcp, 0, &p0, TS_RUN, defclsyspri); - if (thr == NULL) { - rc = -ESRCH; - goto out_cache; - } - } - - /* Sleep until all threads have started, then set the ready - * flag and wake them all up for maximum concurrency. */ - wait_event(kcp->kcp_ctl_waitq, - splat_kmem_cache_test_threads(kcp, SPLAT_KMEM_THREADS)); - - spin_lock(&kcp->kcp_lock); - kcp->kcp_flags |= KCP_FLAG_READY; - spin_unlock(&kcp->kcp_lock); - wake_up_all(&kcp->kcp_thr_waitq); - - /* Sleep until all thread have finished */ - wait_event(kcp->kcp_ctl_waitq, splat_kmem_cache_test_threads(kcp, 0)); - - getnstimeofday(&stop); - delta = timespec_sub(stop, start); - - splat_vprint(file, name, - "%-22s %2ld.%09ld\t" - "%lu/%lu/%lu\t%lu/%lu/%lu\n", - kcp->kcp_cache->skc_name, - delta.tv_sec, delta.tv_nsec, - (unsigned long)kcp->kcp_cache->skc_slab_total, - (unsigned long)kcp->kcp_cache->skc_slab_max, - (unsigned long)(kcp->kcp_alloc * - SPLAT_KMEM_THREADS / - SPL_KMEM_CACHE_OBJ_PER_SLAB), - (unsigned long)kcp->kcp_cache->skc_obj_total, - (unsigned long)kcp->kcp_cache->skc_obj_max, - (unsigned long)(kcp->kcp_alloc * - SPLAT_KMEM_THREADS)); - - if (delta.tv_sec >= max_time) - rc = -ETIME; - - if (!rc && kcp->kcp_rc) - rc = kcp->kcp_rc; - -out_cache: - kmem_cache_destroy(kcp->kcp_cache); -out_kcp: - splat_kmem_cache_test_kcp_free(kcp); - return rc; -} - -/* Validate small object cache behavior for dynamic/kmem/vmem caches */ -static int -splat_kmem_test5(struct file *file, void *arg) -{ - char *name = SPLAT_KMEM_TEST5_NAME; - int i, rc = 0; - - /* Randomly pick small object sizes and alignments. */ - for (i = 0; i < 100; i++) { - int size, align, flags = 0; - uint32_t rnd; - - /* Evenly distribute tests over all value cache types */ - get_random_bytes((void *)&rnd, sizeof (uint32_t)); - switch (rnd & 0x03) { - default: - case 0x00: - flags = 0; - break; - case 0x01: - flags = KMC_KMEM; - break; - case 0x02: - flags = KMC_VMEM; - break; - case 0x03: - flags = KMC_SLAB; - break; - } - - /* The following flags are set with a 1/10 chance */ - flags |= ((((rnd >> 8) % 10) == 0) ? KMC_OFFSLAB : 0); - flags |= ((((rnd >> 16) % 10) == 0) ? KMC_NOEMERGENCY : 0); - - /* 32b - PAGE_SIZE */ - get_random_bytes((void *)&rnd, sizeof (uint32_t)); - size = MAX(rnd % (PAGE_SIZE + 1), 32); - - /* 2^N where (3 <= N <= PAGE_SHIFT) */ - get_random_bytes((void *)&rnd, sizeof (uint32_t)); - align = (1 << MAX(3, rnd % (PAGE_SHIFT + 1))); - - rc = splat_kmem_cache_test(file, arg, name, size, align, flags); - if (rc) - return (rc); - } - - return (rc); -} - -/* - * Validate large object cache behavior for dynamic/kmem/vmem caches - */ -static int -splat_kmem_test6(struct file *file, void *arg) -{ - char *name = SPLAT_KMEM_TEST6_NAME; - int i, max_size, rc = 0; - - /* Randomly pick large object sizes and alignments. */ - for (i = 0; i < 100; i++) { - int size, align, flags = 0; - uint32_t rnd; - - /* Evenly distribute tests over all value cache types */ - get_random_bytes((void *)&rnd, sizeof (uint32_t)); - switch (rnd & 0x03) { - default: - case 0x00: - flags = 0; - max_size = (SPL_KMEM_CACHE_MAX_SIZE * 1024 * 1024) / 2; - break; - case 0x01: - flags = KMC_KMEM; - max_size = (SPL_MAX_ORDER_NR_PAGES - 2) * PAGE_SIZE; - break; - case 0x02: - flags = KMC_VMEM; - max_size = (SPL_KMEM_CACHE_MAX_SIZE * 1024 * 1024) / 2; - break; - case 0x03: - flags = KMC_SLAB; - max_size = SPL_MAX_KMEM_ORDER_NR_PAGES * PAGE_SIZE; - break; - } - - /* The following flags are set with a 1/10 chance */ - flags |= ((((rnd >> 8) % 10) == 0) ? KMC_OFFSLAB : 0); - flags |= ((((rnd >> 16) % 10) == 0) ? KMC_NOEMERGENCY : 0); - - /* PAGE_SIZE - max_size */ - get_random_bytes((void *)&rnd, sizeof (uint32_t)); - size = MAX(rnd % (max_size + 1), PAGE_SIZE), - - /* 2^N where (3 <= N <= PAGE_SHIFT) */ - get_random_bytes((void *)&rnd, sizeof (uint32_t)); - align = (1 << MAX(3, rnd % (PAGE_SHIFT + 1))); - - rc = splat_kmem_cache_test(file, arg, name, size, align, flags); - if (rc) - return (rc); - } - - return (rc); -} - -/* - * Validate object alignment cache behavior for caches - */ -static int -splat_kmem_test7(struct file *file, void *arg) -{ - char *name = SPLAT_KMEM_TEST7_NAME; - int max_size = (SPL_KMEM_CACHE_MAX_SIZE * 1024 * 1024) / 2; - int i, rc; - - for (i = SPL_KMEM_CACHE_ALIGN; i <= PAGE_SIZE; i *= 2) { - uint32_t size; - - get_random_bytes((void *)&size, sizeof (uint32_t)); - size = MAX(size % (max_size + 1), 32); - - rc = splat_kmem_cache_test(file, arg, name, size, i, 0); - if (rc) - return rc; - - rc = splat_kmem_cache_test(file, arg, name, size, i, - KMC_OFFSLAB); - if (rc) - return rc; - } - - return rc; -} - -/* - * Validate kmem_cache_reap() by requesting the slab cache free any objects - * it can. For a few reasons this may not immediately result in more free - * memory even if objects are freed. First off, due to fragmentation we - * may not be able to reclaim any slabs. Secondly, even if we do we fully - * clear some slabs we will not want to immediately reclaim all of them - * because we may contend with cache allocations and thrash. What we want - * to see is the slab size decrease more gradually as it becomes clear they - * will not be needed. This should be achievable in less than a minute. - * If it takes longer than this something has gone wrong. - */ -static int -splat_kmem_test8(struct file *file, void *arg) -{ - kmem_cache_priv_t *kcp; - kmem_cache_thread_t *kct; - unsigned int spl_kmem_cache_expire_old; - int i, rc = 0; - - /* Enable cache aging just for this test if it is disabled */ - spl_kmem_cache_expire_old = spl_kmem_cache_expire; - spl_kmem_cache_expire = KMC_EXPIRE_AGE; - - kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST8_NAME, - 256, 0, 0); - if (!kcp) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Unable to create '%s'\n", "kcp"); - rc = -ENOMEM; - goto out; - } - - kcp->kcp_cache = - kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, 0, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - splat_kmem_cache_test_reclaim, - kcp, NULL, 0); - if (!kcp->kcp_cache) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -ENOMEM; - goto out_kcp; - } - - kct = splat_kmem_cache_test_kct_alloc(kcp, 0); - if (!kct) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Unable to create '%s'\n", "kct"); - rc = -ENOMEM; - goto out_cache; - } - - rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, SPLAT_KMEM_OBJ_COUNT); - if (rc) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, "Unable to " - "allocate from '%s'\n", SPLAT_KMEM_CACHE_NAME); - goto out_kct; - } - - /* Force reclaim every 1/10 a second for 60 seconds. */ - for (i = 0; i < 600; i++) { - kmem_cache_reap_now(kcp->kcp_cache); - splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST8_NAME, kcp); - - if (kcp->kcp_count == 0) - break; - - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 10); - } - - if (kcp->kcp_count == 0) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Successfully created %d objects " - "in cache %s and reclaimed them\n", - SPLAT_KMEM_OBJ_COUNT, SPLAT_KMEM_CACHE_NAME); - } else { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Failed to reclaim %u/%d objects from cache %s\n", - (unsigned)kcp->kcp_count, - SPLAT_KMEM_OBJ_COUNT, SPLAT_KMEM_CACHE_NAME); - rc = -ENOMEM; - } - - /* Cleanup our mess (for failure case of time expiring) */ - splat_kmem_cache_test_kcd_free(kcp, kct); -out_kct: - splat_kmem_cache_test_kct_free(kcp, kct); -out_cache: - kmem_cache_destroy(kcp->kcp_cache); -out_kcp: - splat_kmem_cache_test_kcp_free(kcp); -out: - spl_kmem_cache_expire = spl_kmem_cache_expire_old; - - return rc; -} - -/* Test cache aging, we have allocated a large number of objects thus - * creating a large number of slabs and then free'd them all. However, - * since there should be little memory pressure at the moment those - * slabs have not been freed. What we want to see is the slab size - * decrease gradually as it becomes clear they will not be be needed. - * This should be achievable in less than minute. If it takes longer - * than this something has gone wrong. - */ -static int -splat_kmem_test9(struct file *file, void *arg) -{ - kmem_cache_priv_t *kcp; - kmem_cache_thread_t *kct; - unsigned int spl_kmem_cache_expire_old; - int i, rc = 0, count = SPLAT_KMEM_OBJ_COUNT * 128; - - /* Enable cache aging just for this test if it is disabled */ - spl_kmem_cache_expire_old = spl_kmem_cache_expire; - spl_kmem_cache_expire = KMC_EXPIRE_AGE; - - kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST9_NAME, - 256, 0, 0); - if (!kcp) { - splat_vprint(file, SPLAT_KMEM_TEST9_NAME, - "Unable to create '%s'\n", "kcp"); - rc = -ENOMEM; - goto out; - } - - kcp->kcp_cache = - kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, 0, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - NULL, kcp, NULL, 0); - if (!kcp->kcp_cache) { - splat_vprint(file, SPLAT_KMEM_TEST9_NAME, - "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -ENOMEM; - goto out_kcp; - } - - kct = splat_kmem_cache_test_kct_alloc(kcp, 0); - if (!kct) { - splat_vprint(file, SPLAT_KMEM_TEST8_NAME, - "Unable to create '%s'\n", "kct"); - rc = -ENOMEM; - goto out_cache; - } - - rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, count); - if (rc) { - splat_vprint(file, SPLAT_KMEM_TEST9_NAME, "Unable to " - "allocate from '%s'\n", SPLAT_KMEM_CACHE_NAME); - goto out_kct; - } - - splat_kmem_cache_test_kcd_free(kcp, kct); - - for (i = 0; i < 60; i++) { - splat_kmem_cache_test_debug(file, SPLAT_KMEM_TEST9_NAME, kcp); - - if (kcp->kcp_count == 0) - break; - - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - } - - if (kcp->kcp_count == 0) { - splat_vprint(file, SPLAT_KMEM_TEST9_NAME, - "Successfully created %d objects " - "in cache %s and reclaimed them\n", - count, SPLAT_KMEM_CACHE_NAME); - } else { - splat_vprint(file, SPLAT_KMEM_TEST9_NAME, - "Failed to reclaim %u/%d objects from cache %s\n", - (unsigned)kcp->kcp_count, count, - SPLAT_KMEM_CACHE_NAME); - rc = -ENOMEM; - } - -out_kct: - splat_kmem_cache_test_kct_free(kcp, kct); -out_cache: - kmem_cache_destroy(kcp->kcp_cache); -out_kcp: - splat_kmem_cache_test_kcp_free(kcp); -out: - spl_kmem_cache_expire = spl_kmem_cache_expire_old; - - return rc; -} - -/* - * This test creates N threads with a shared kmem cache. They then all - * concurrently allocate and free from the cache to stress the locking and - * concurrent cache performance. If any one test takes longer than 5 - * seconds to complete it is treated as a failure and may indicate a - * performance regression. On my test system no one test takes more - * than 1 second to complete so a 5x slowdown likely a problem. - */ -static int -splat_kmem_test10(struct file *file, void *arg) -{ - uint64_t size, alloc, maxsize, limit, rc = 0; - -#if defined(CONFIG_64BIT) - maxsize = (1024 * 1024); -#else - maxsize = (128 * 1024); -#endif - - for (size = 32; size <= maxsize; size *= 2) { - - splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "name", - "time (sec)\tslabs \tobjs \thash\n"); - splat_vprint(file, SPLAT_KMEM_TEST10_NAME, "%-22s %s", "", - " \ttot/max/calc\ttot/max/calc\n"); - - for (alloc = 1; alloc <= 1024; alloc *= 2) { - - /* Skip tests which exceed 1/2 of memory. */ - limit = MIN(physmem * PAGE_SIZE, - vmem_size(NULL, VMEM_ALLOC | VMEM_FREE)) / 2; - if (size * alloc * SPLAT_KMEM_THREADS > limit) - continue; - - rc = splat_kmem_cache_thread_test(file, arg, - SPLAT_KMEM_TEST10_NAME, size, alloc, 5); - if (rc) - break; - } - } - - return rc; -} - -#if 0 -/* - * This test creates N threads with a shared kmem cache which overcommits - * memory by 4x. This makes it impossible for the slab to satify the - * thread requirements without having its reclaim hook run which will - * free objects back for use. This behavior is triggered by the linum VM - * detecting a low memory condition on the node and invoking the shrinkers. - * This should allow all the threads to complete while avoiding deadlock - * and for the most part out of memory events. This is very tough on the - * system so it is possible the test app may get oom'ed. This particular - * test has proven troublesome on 32-bit archs with limited virtual - * address space so it only run on 64-bit systems. - */ -static int -splat_kmem_test11(struct file *file, void *arg) -{ - uint64_t size, alloc, rc; - - size = 8 * 1024; - alloc = ((4 * physmem * PAGE_SIZE) / size) / SPLAT_KMEM_THREADS; - - splat_vprint(file, SPLAT_KMEM_TEST11_NAME, "%-22s %s", "name", - "time (sec)\tslabs \tobjs \thash\n"); - splat_vprint(file, SPLAT_KMEM_TEST11_NAME, "%-22s %s", "", - " \ttot/max/calc\ttot/max/calc\n"); - - rc = splat_kmem_cache_thread_test(file, arg, - SPLAT_KMEM_TEST11_NAME, size, alloc, 60); - - return rc; -} -#endif - -typedef struct dummy_page { - struct list_head dp_list; - char dp_pad[PAGE_SIZE - sizeof(struct list_head)]; -} dummy_page_t; - -/* - * This test is designed to verify that direct reclaim is functioning as - * expected. We allocate a large number of objects thus creating a large - * number of slabs. We then apply memory pressure and expect that the - * direct reclaim path can easily recover those slabs. The registered - * reclaim function will free the objects and the slab shrinker will call - * it repeatedly until at least a single slab can be freed. - * - * Note it may not be possible to reclaim every last slab via direct reclaim - * without a failure because the shrinker_rwsem may be contended. For this - * reason, quickly reclaiming 3/4 of the slabs is considered a success. - * - * This should all be possible within 10 seconds. For reference, on a - * system with 2G of memory this test takes roughly 0.2 seconds to run. - * It may take longer on larger memory systems but should still easily - * complete in the alloted 10 seconds. - */ -static int -splat_kmem_test13(struct file *file, void *arg) -{ - kmem_cache_priv_t *kcp; - kmem_cache_thread_t *kct; - dummy_page_t *dp; - struct list_head list; - struct timespec start, stop, delta = { 0, 0 }; - int size, count, slabs, fails = 0; - int i, rc = 0, max_time = 10; - - size = 128 * 1024; - count = MIN(physmem * PAGE_SIZE, vmem_size(NULL, - VMEM_ALLOC | VMEM_FREE)) / 4 / size; - - kcp = splat_kmem_cache_test_kcp_alloc(file, SPLAT_KMEM_TEST13_NAME, - size, 0, 0); - if (!kcp) { - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, - "Unable to create '%s'\n", "kcp"); - rc = -ENOMEM; - goto out; - } - - kcp->kcp_cache = - kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, 0, - splat_kmem_cache_test_constructor, - splat_kmem_cache_test_destructor, - splat_kmem_cache_test_reclaim, - kcp, NULL, 0); - if (!kcp->kcp_cache) { - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, - "Unable to create '%s'\n", SPLAT_KMEM_CACHE_NAME); - rc = -ENOMEM; - goto out_kcp; - } - - kct = splat_kmem_cache_test_kct_alloc(kcp, 0); - if (!kct) { - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, - "Unable to create '%s'\n", "kct"); - rc = -ENOMEM; - goto out_cache; - } - - rc = splat_kmem_cache_test_kcd_alloc(kcp, kct, count); - if (rc) { - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, "Unable to " - "allocate from '%s'\n", SPLAT_KMEM_CACHE_NAME); - goto out_kct; - } - - i = 0; - slabs = kcp->kcp_cache->skc_slab_total; - INIT_LIST_HEAD(&list); - getnstimeofday(&start); - - /* Apply memory pressure */ - while (kcp->kcp_cache->skc_slab_total > (slabs >> 2)) { - - if ((i % 10000) == 0) - splat_kmem_cache_test_debug( - file, SPLAT_KMEM_TEST13_NAME, kcp); - - getnstimeofday(&stop); - delta = timespec_sub(stop, start); - if (delta.tv_sec >= max_time) { - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, - "Failed to reclaim 3/4 of cache in %ds, " - "%u/%u slabs remain\n", max_time, - (unsigned)kcp->kcp_cache->skc_slab_total, - slabs); - rc = -ETIME; - break; - } - - dp = (dummy_page_t *)__get_free_page(GFP_KERNEL); - if (!dp) { - fails++; - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, - "Failed (%d) to allocate page with %u " - "slabs still in the cache\n", fails, - (unsigned)kcp->kcp_cache->skc_slab_total); - continue; - } - - list_add(&dp->dp_list, &list); - i++; - } - - if (rc == 0) - splat_vprint(file, SPLAT_KMEM_TEST13_NAME, - "Successfully created %u slabs and with %d alloc " - "failures reclaimed 3/4 of them in %d.%03ds\n", - slabs, fails, - (int)delta.tv_sec, (int)delta.tv_nsec / 1000000); - - /* Release memory pressure pages */ - while (!list_empty(&list)) { - dp = list_entry(list.next, dummy_page_t, dp_list); - list_del_init(&dp->dp_list); - free_page((unsigned long)dp); - } - - /* Release remaining kmem cache objects */ - splat_kmem_cache_test_kcd_free(kcp, kct); -out_kct: - splat_kmem_cache_test_kct_free(kcp, kct); -out_cache: - kmem_cache_destroy(kcp->kcp_cache); -out_kcp: - splat_kmem_cache_test_kcp_free(kcp); -out: - return rc; -} - -splat_subsystem_t * -splat_kmem_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_KMEM_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_KMEM_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_KMEM; - - splat_test_init(sub, SPLAT_KMEM_TEST1_NAME, SPLAT_KMEM_TEST1_DESC, - SPLAT_KMEM_TEST1_ID, splat_kmem_test1); - splat_test_init(sub, SPLAT_KMEM_TEST2_NAME, SPLAT_KMEM_TEST2_DESC, - SPLAT_KMEM_TEST2_ID, splat_kmem_test2); - splat_test_init(sub, SPLAT_KMEM_TEST3_NAME, SPLAT_KMEM_TEST3_DESC, - SPLAT_KMEM_TEST3_ID, splat_kmem_test3); - splat_test_init(sub, SPLAT_KMEM_TEST4_NAME, SPLAT_KMEM_TEST4_DESC, - SPLAT_KMEM_TEST4_ID, splat_kmem_test4); - splat_test_init(sub, SPLAT_KMEM_TEST5_NAME, SPLAT_KMEM_TEST5_DESC, - SPLAT_KMEM_TEST5_ID, splat_kmem_test5); - splat_test_init(sub, SPLAT_KMEM_TEST6_NAME, SPLAT_KMEM_TEST6_DESC, - SPLAT_KMEM_TEST6_ID, splat_kmem_test6); - splat_test_init(sub, SPLAT_KMEM_TEST7_NAME, SPLAT_KMEM_TEST7_DESC, - SPLAT_KMEM_TEST7_ID, splat_kmem_test7); - splat_test_init(sub, SPLAT_KMEM_TEST8_NAME, SPLAT_KMEM_TEST8_DESC, - SPLAT_KMEM_TEST8_ID, splat_kmem_test8); - splat_test_init(sub, SPLAT_KMEM_TEST9_NAME, SPLAT_KMEM_TEST9_DESC, - SPLAT_KMEM_TEST9_ID, splat_kmem_test9); - splat_test_init(sub, SPLAT_KMEM_TEST10_NAME, SPLAT_KMEM_TEST10_DESC, - SPLAT_KMEM_TEST10_ID, splat_kmem_test10); -#if 0 - splat_test_init(sub, SPLAT_KMEM_TEST11_NAME, SPLAT_KMEM_TEST11_DESC, - SPLAT_KMEM_TEST11_ID, splat_kmem_test11); -#endif - splat_test_init(sub, SPLAT_KMEM_TEST13_NAME, SPLAT_KMEM_TEST13_DESC, - SPLAT_KMEM_TEST13_ID, splat_kmem_test13); - - return sub; -} - -void -splat_kmem_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_KMEM_TEST13_ID); -#if 0 - splat_test_fini(sub, SPLAT_KMEM_TEST11_ID); -#endif - splat_test_fini(sub, SPLAT_KMEM_TEST10_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST9_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST8_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST7_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST6_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST5_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST4_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST3_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST2_ID); - splat_test_fini(sub, SPLAT_KMEM_TEST1_ID); - - kfree(sub); -} - -int -splat_kmem_id(void) { - return SPLAT_SUBSYSTEM_KMEM; -} diff --git a/module/splat/splat-kobj.c b/module/splat/splat-kobj.c deleted file mode 100644 index bd44de395..000000000 --- a/module/splat/splat-kobj.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Kobj Tests. - */ - -#include -#include "splat-internal.h" - -#define SPLAT_KOBJ_NAME "kobj" -#define SPLAT_KOBJ_DESC "Kernel Kobj Tests" - -#define SPLAT_KOBJ_TEST1_ID 0x0a01 -#define SPLAT_KOBJ_TEST1_NAME "open" -#define SPLAT_KOBJ_TEST1_DESC "Kobj Open/Close Test" - -#define SPLAT_KOBJ_TEST2_ID 0x0a02 -#define SPLAT_KOBJ_TEST2_NAME "size/read" -#define SPLAT_KOBJ_TEST2_DESC "Kobj Size/Read Test" - -#define SPLAT_KOBJ_TEST_FILE "/etc/fstab" - -static int -splat_kobj_test1(struct file *file, void *arg) -{ - struct _buf *f; - - f = kobj_open_file(SPLAT_KOBJ_TEST_FILE); - if (f == (struct _buf *)-1) { - splat_vprint(file, SPLAT_KOBJ_TEST1_NAME, "Failed to open " - "test file: %s\n", SPLAT_KOBJ_TEST_FILE); - return -ENOENT; - } - - kobj_close_file(f); - splat_vprint(file, SPLAT_KOBJ_TEST1_NAME, "Successfully opened and " - "closed test file: %s\n", SPLAT_KOBJ_TEST_FILE); - - return 0; -} /* splat_kobj_test1() */ - -static int -splat_kobj_test2(struct file *file, void *arg) -{ - struct _buf *f; - char *buf; - uint64_t size; - int rc; - - f = kobj_open_file(SPLAT_KOBJ_TEST_FILE); - if (f == (struct _buf *)-1) { - splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed to open " - "test file: %s\n", SPLAT_KOBJ_TEST_FILE); - return -ENOENT; - } - - rc = kobj_get_filesize(f, &size); - if (rc) { - splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed stat of " - "test file: %s (%d)\n", SPLAT_KOBJ_TEST_FILE, rc); - goto out; - } - - buf = kmalloc(size + 1, GFP_KERNEL); - if (!buf) { - rc = -ENOMEM; - splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed to alloc " - "%lld bytes for tmp buffer (%d)\n", - (long long)size, rc); - goto out; - } - - memset(buf, 0, size + 1); - rc = kobj_read_file(f, buf, size, 0); - if (rc < 0) { - splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Failed read of " - "test file: %s (%d)\n", SPLAT_KOBJ_TEST_FILE, rc); - goto out2; - } - - /* Validate we read as many bytes as expected based on the stat. This - * isn't a perfect test since we didn't create the file however it is - * pretty unlikely there are garbage characters in your /etc/fstab */ - if (size != (uint64_t)strlen(buf)) { - rc = -EFBIG; - splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Stat'ed size " - "(%lld) does not match number of bytes read " - "(%lld)\n", (long long)size, - (long long)strlen(buf)); - goto out2; - } - - rc = 0; - splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "\n%s\n", buf); - splat_vprint(file, SPLAT_KOBJ_TEST2_NAME, "Successfully stat'ed " - "and read expected number of bytes (%lld) from test " - "file: %s\n", (long long)size, SPLAT_KOBJ_TEST_FILE); -out2: - kfree(buf); -out: - kobj_close_file(f); - - return rc; -} /* splat_kobj_test2() */ - -splat_subsystem_t * -splat_kobj_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_KOBJ_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_KOBJ_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_KOBJ; - - splat_test_init(sub, SPLAT_KOBJ_TEST1_NAME, SPLAT_KOBJ_TEST1_DESC, - SPLAT_KOBJ_TEST1_ID, splat_kobj_test1); - splat_test_init(sub, SPLAT_KOBJ_TEST2_NAME, SPLAT_KOBJ_TEST2_DESC, - SPLAT_KOBJ_TEST2_ID, splat_kobj_test2); - - return sub; -} /* splat_kobj_init() */ - -void -splat_kobj_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_KOBJ_TEST2_ID); - splat_test_fini(sub, SPLAT_KOBJ_TEST1_ID); - - kfree(sub); -} /* splat_kobj_fini() */ - -int -splat_kobj_id(void) -{ - return SPLAT_SUBSYSTEM_KOBJ; -} /* splat_kobj_id() */ diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c deleted file mode 100644 index 1565d74a3..000000000 --- a/module/splat/splat-linux.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (C) 2011 Lawrence Livermore National Security, LLC. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Kernel Compatibility Tests. - */ - -#include -#include -#include "splat-internal.h" - -#define SPLAT_LINUX_NAME "linux" -#define SPLAT_LINUX_DESC "Kernel Compatibility Tests" - -#define SPLAT_LINUX_TEST1_ID 0x1001 -#define SPLAT_LINUX_TEST1_NAME "shrinker" -#define SPLAT_LINUX_TEST1_DESC "Shrinker test" - -/* - * Wait queue used to eliminate race between dropping of slab - * and execution of the shrinker callback - */ -DECLARE_WAIT_QUEUE_HEAD(shrinker_wait); - -SPL_SHRINKER_CALLBACK_FWD_DECLARE(splat_linux_shrinker_fn); -SPL_SHRINKER_DECLARE(splat_linux_shrinker, splat_linux_shrinker_fn, 1); -static unsigned long splat_linux_shrinker_size = 0; -static struct file *splat_linux_shrinker_file = NULL; - -static spl_shrinker_t -__splat_linux_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc) -{ - static int failsafe = 0; - static unsigned long last_splat_linux_shrinker_size = 0; - unsigned long size; - spl_shrinker_t count; - - /* - * shrinker_size can only decrease or stay the same between callbacks - * in the same run, so Reset failsafe whenever shrinker increases - * as this indicates a new run. - */ - if (last_splat_linux_shrinker_size < splat_linux_shrinker_size) - failsafe = 0; - - last_splat_linux_shrinker_size = splat_linux_shrinker_size; - - if (sc->nr_to_scan) { - size = MIN(sc->nr_to_scan, splat_linux_shrinker_size); - splat_linux_shrinker_size -= size; - - splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, - "Reclaimed %lu objects, size now %lu\n", - size, splat_linux_shrinker_size); - -#ifdef HAVE_SPLIT_SHRINKER_CALLBACK - count = size; -#else - count = splat_linux_shrinker_size; -#endif /* HAVE_SPLIT_SHRINKER_CALLBACK */ - - } else { - count = splat_linux_shrinker_size; - splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, - "Cache size is %lu\n", splat_linux_shrinker_size); - } - - /* Far more calls than expected abort drop_slab as a failsafe */ - if (failsafe > 100) { - splat_vprint(splat_linux_shrinker_file, SPLAT_LINUX_TEST1_NAME, - "Far more calls than expected (%d), size now %lu\n", - failsafe, splat_linux_shrinker_size); - return (SHRINK_STOP); - } else { - /* - * We only increment failsafe if it doesn't trigger. This - * makes any failsafe failure persistent until the next test. - */ - failsafe++; - } - - /* Shrinker has run, so signal back to test. */ - wake_up(&shrinker_wait); - - return (count); -} - -SPL_SHRINKER_CALLBACK_WRAPPER(splat_linux_shrinker_fn); - -#define DROP_SLAB_CMD \ - "exec 0/proc/sys/vm/drop_caches " \ - " 2>/dev/null; " \ - "echo 2" - -static int -splat_linux_drop_slab(struct file *file) -{ - char *argv[] = { "/bin/sh", - "-c", - DROP_SLAB_CMD, - NULL }; - char *envp[] = { "HOME=/", - "TERM=linux", - "PATH=/sbin:/usr/sbin:/bin:/usr/bin", - NULL }; - int rc; - - rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); - if (rc) - splat_vprint(file, SPLAT_LINUX_TEST1_NAME, - "Failed user helper '%s %s %s', rc = %d\n", - argv[0], argv[1], argv[2], rc); - - return rc; -} - -/* - * Verify correct shrinker functionality by registering a shrinker - * with the required compatibility macros. We then use a simulated - * cache and force the systems caches to be dropped. The shrinker - * should be repeatedly called until it reports that the cache is - * empty. It is then cleanly unregistered and correct behavior is - * verified. There are now four slightly different supported shrinker - * API and this test ensures the compatibility code is correct. - */ -static int -splat_linux_test1(struct file *file, void *arg) -{ - int rc = -EINVAL; - - /* - * Globals used by the shrinker, it is not safe to run this - * test concurrently this is a safe assumption for SPLAT tests. - * Regardless we do some minimal checking a bail if concurrent - * use is detected. - */ - if (splat_linux_shrinker_size || splat_linux_shrinker_file) { - splat_vprint(file, SPLAT_LINUX_TEST1_NAME, - "Failed due to concurrent shrinker test, rc = %d\n", rc); - return (rc); - } - - splat_linux_shrinker_size = 1024; - splat_linux_shrinker_file = file; - - spl_register_shrinker(&splat_linux_shrinker); - rc = splat_linux_drop_slab(file); - if (rc) - goto out; - - /* - * By the time we get here, it is possible that the shrinker has not - * yet run. splat_linux_drop_slab sends a signal for it to run, but - * there is no guarantee of when it will actually run. We wait for it - * to run here, terminating when either the shrinker size is now 0 or - * we timeout after 1 second, which should be an eternity (error). - */ - rc = wait_event_timeout(shrinker_wait, !splat_linux_shrinker_size, HZ); - if (!rc) { - splat_vprint(file, SPLAT_LINUX_TEST1_NAME, - "Failed cache shrinking timed out, size now %lu", - splat_linux_shrinker_size); - rc = -ETIMEDOUT; - } else { - rc = 0; - } - - if (!rc && splat_linux_shrinker_size != 0) { - splat_vprint(file, SPLAT_LINUX_TEST1_NAME, - "Failed cache was not shrunk to 0, size now %lu", - splat_linux_shrinker_size); - rc = -EDOM; - } -out: - spl_unregister_shrinker(&splat_linux_shrinker); - - splat_linux_shrinker_size = 0; - splat_linux_shrinker_file = NULL; - - return rc; -} - -splat_subsystem_t * -splat_linux_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_LINUX_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_LINUX_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_LINUX; - - splat_test_init(sub, SPLAT_LINUX_TEST1_NAME, SPLAT_LINUX_TEST1_DESC, - SPLAT_LINUX_TEST1_ID, splat_linux_test1); - - return sub; -} - -void -splat_linux_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_LINUX_TEST1_ID); - - kfree(sub); -} - -int -splat_linux_id(void) { - return SPLAT_SUBSYSTEM_LINUX; -} diff --git a/module/splat/splat-list.c b/module/splat/splat-list.c deleted file mode 100644 index 8a5f3c937..000000000 --- a/module/splat/splat-list.c +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) List Tests. - */ - -#include -#include -#include "splat-internal.h" - -#define SPLAT_LIST_NAME "list" -#define SPLAT_LIST_DESC "Kernel List Tests" - -#define SPLAT_LIST_TEST1_ID 0x0c01 -#define SPLAT_LIST_TEST1_NAME "create/destroy" -#define SPLAT_LIST_TEST1_DESC "Create/destroy Test" - -#define SPLAT_LIST_TEST2_ID 0x0c02 -#define SPLAT_LIST_TEST2_NAME "ins/rm head" -#define SPLAT_LIST_TEST2_DESC "Insert/remove head Test" - -#define SPLAT_LIST_TEST3_ID 0x0c03 -#define SPLAT_LIST_TEST3_NAME "ins/rm tail" -#define SPLAT_LIST_TEST3_DESC "Insert/remove tail Test" - -#define SPLAT_LIST_TEST4_ID 0x0c04 -#define SPLAT_LIST_TEST4_NAME "insert_after" -#define SPLAT_LIST_TEST4_DESC "Insert_after Test" - -#define SPLAT_LIST_TEST5_ID 0x0c05 -#define SPLAT_LIST_TEST5_NAME "insert_before" -#define SPLAT_LIST_TEST5_DESC "Insert_before Test" - -#define SPLAT_LIST_TEST6_ID 0x0c06 -#define SPLAT_LIST_TEST6_NAME "remove" -#define SPLAT_LIST_TEST6_DESC "Remove Test" - -#define SPLAT_LIST_TEST7_ID 0x0c7 -#define SPLAT_LIST_TEST7_NAME "active" -#define SPLAT_LIST_TEST7_DESC "Active Test" - -/* It is important that li_node is not the first element, this - * ensures the list_d2l/list_object macros are working correctly. */ -typedef struct list_item { - int li_data; - list_node_t li_node; -} list_item_t; - -#define LIST_ORDER_STACK 0 -#define LIST_ORDER_QUEUE 1 - -static int -splat_list_test1(struct file *file, void *arg) -{ - list_t list; - - splat_vprint(file, SPLAT_LIST_TEST1_NAME, "Creating list\n%s", ""); - list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); - - if (!list_is_empty(&list)) { - splat_vprint(file, SPLAT_LIST_TEST1_NAME, - "New list NOT empty%s\n", ""); - /* list_destroy() intentionally skipped to avoid assert */ - return -EEXIST; - } - - splat_vprint(file, SPLAT_LIST_TEST1_NAME, "Destroying list\n%s", ""); - list_destroy(&list); - - /* Validate the list has been destroyed */ - if (list_link_active(&list.list_head)) { - splat_vprint(file, SPLAT_LIST_TEST1_NAME, - "Destroyed list still active%s", ""); - return -EIO; - } - - return 0; -} - -static int -splat_list_validate(list_t *list, int size, int order, int mult) -{ - list_item_t *li; - int i; - - /* Walk all items in list from head to verify stack or queue - * ordering. We bound the for loop by size+1 to ensure that - * we still terminate if there is list corruption. We also - * intentionally make things a little more complex than they - * need to be by using list_head/list_next for queues, and - * list_tail/list_prev for stacks. This is simply done for - * coverage and to ensure these function are working right. - */ - for (i = 0, li = (order ? list_head(list) : list_tail(list)); - i < size + 1 && li != NULL; - i++, li = (order ? list_next(list, li) : list_prev(list, li))) - if (li->li_data != i * mult) - return -EIDRM; - - if (i != size) - return -E2BIG; - - return 0; -} - -static int -splat_list_test2(struct file *file, void *arg) -{ - list_t list; - list_item_t *li; - int i, list_size = 8, rc = 0; - - splat_vprint(file, SPLAT_LIST_TEST2_NAME, "Creating list\n%s", ""); - list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); - - /* Insert all items at the list head to form a stack */ - splat_vprint(file, SPLAT_LIST_TEST2_NAME, - "Adding %d items to list head\n", list_size); - for (i = 0; i < list_size; i++) { - li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); - if (li == NULL) { - rc = -ENOMEM; - goto out; - } - - list_link_init(&li->li_node); - li->li_data = i; - list_insert_head(&list, li); - } - - splat_vprint(file, SPLAT_LIST_TEST2_NAME, - "Validating %d item list is a stack\n", list_size); - rc = splat_list_validate(&list, list_size, LIST_ORDER_STACK, 1); - if (rc) - splat_vprint(file, SPLAT_LIST_TEST2_NAME, - "List validation failed, %d\n", rc); -out: - /* Remove all items */ - splat_vprint(file, SPLAT_LIST_TEST2_NAME, - "Removing %d items from list head\n", list_size); - while ((li = list_remove_head(&list))) - kmem_free(li, sizeof(list_item_t)); - - splat_vprint(file, SPLAT_LIST_TEST2_NAME, "Destroying list\n%s", ""); - list_destroy(&list); - - return rc; -} - -static int -splat_list_test3(struct file *file, void *arg) -{ - list_t list; - list_item_t *li; - int i, list_size = 8, rc = 0; - - splat_vprint(file, SPLAT_LIST_TEST3_NAME, "Creating list\n%s", ""); - list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); - - /* Insert all items at the list tail to form a queue */ - splat_vprint(file, SPLAT_LIST_TEST3_NAME, - "Adding %d items to list tail\n", list_size); - for (i = 0; i < list_size; i++) { - li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); - if (li == NULL) { - rc = -ENOMEM; - goto out; - } - - list_link_init(&li->li_node); - li->li_data = i; - list_insert_tail(&list, li); - } - - splat_vprint(file, SPLAT_LIST_TEST3_NAME, - "Validating %d item list is a queue\n", list_size); - rc = splat_list_validate(&list, list_size, LIST_ORDER_QUEUE, 1); - if (rc) - splat_vprint(file, SPLAT_LIST_TEST3_NAME, - "List validation failed, %d\n", rc); -out: - /* Remove all items */ - splat_vprint(file, SPLAT_LIST_TEST3_NAME, - "Removing %d items from list tail\n", list_size); - while ((li = list_remove_tail(&list))) - kmem_free(li, sizeof(list_item_t)); - - splat_vprint(file, SPLAT_LIST_TEST3_NAME, "Destroying list\n%s", ""); - list_destroy(&list); - - return rc; -} - -static int -splat_list_test4(struct file *file, void *arg) -{ - list_t list; - list_item_t *li_new, *li_last = NULL; - int i, list_size = 8, rc = 0; - - splat_vprint(file, SPLAT_LIST_TEST4_NAME, "Creating list\n%s", ""); - list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); - - /* Insert all items after the last item to form a queue */ - splat_vprint(file, SPLAT_LIST_TEST4_NAME, - "Adding %d items each after the last item\n", list_size); - for (i = 0; i < list_size; i++) { - li_new = kmem_alloc(sizeof(list_item_t), KM_SLEEP); - if (li_new == NULL) { - rc = -ENOMEM; - goto out; - } - - list_link_init(&li_new->li_node); - li_new->li_data = i; - list_insert_after(&list, li_last, li_new); - li_last = li_new; - } - - splat_vprint(file, SPLAT_LIST_TEST4_NAME, - "Validating %d item list is a queue\n", list_size); - rc = splat_list_validate(&list, list_size, LIST_ORDER_QUEUE, 1); - if (rc) - splat_vprint(file, SPLAT_LIST_TEST4_NAME, - "List validation failed, %d\n", rc); -out: - /* Remove all items */ - splat_vprint(file, SPLAT_LIST_TEST4_NAME, - "Removing %d items from list tail\n", list_size); - while ((li_new = list_remove_head(&list))) - kmem_free(li_new, sizeof(list_item_t)); - - splat_vprint(file, SPLAT_LIST_TEST4_NAME, "Destroying list\n%s", ""); - list_destroy(&list); - - return rc; -} - -static int -splat_list_test5(struct file *file, void *arg) -{ - list_t list; - list_item_t *li_new, *li_last = NULL; - int i, list_size = 8, rc = 0; - - splat_vprint(file, SPLAT_LIST_TEST5_NAME, "Creating list\n%s", ""); - list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); - - /* Insert all items before the last item to form a stack */ - splat_vprint(file, SPLAT_LIST_TEST5_NAME, - "Adding %d items each before the last item\n", list_size); - for (i = 0; i < list_size; i++) { - li_new = kmem_alloc(sizeof(list_item_t), KM_SLEEP); - if (li_new == NULL) { - rc = -ENOMEM; - goto out; - } - - list_link_init(&li_new->li_node); - li_new->li_data = i; - list_insert_before(&list, li_last, li_new); - li_last = li_new; - } - - splat_vprint(file, SPLAT_LIST_TEST5_NAME, - "Validating %d item list is a queue\n", list_size); - rc = splat_list_validate(&list, list_size, LIST_ORDER_STACK, 1); - if (rc) - splat_vprint(file, SPLAT_LIST_TEST5_NAME, - "List validation failed, %d\n", rc); -out: - /* Remove all items */ - splat_vprint(file, SPLAT_LIST_TEST5_NAME, - "Removing %d items from list tail\n", list_size); - while ((li_new = list_remove_tail(&list))) - kmem_free(li_new, sizeof(list_item_t)); - - splat_vprint(file, SPLAT_LIST_TEST5_NAME, "Destroying list\n%s", ""); - list_destroy(&list); - - return rc; -} - -static int -splat_list_test6(struct file *file, void *arg) -{ - list_t list; - list_item_t *li, *li_prev; - int i, list_size = 8, rc = 0; - - splat_vprint(file, SPLAT_LIST_TEST6_NAME, "Creating list\n%s", ""); - list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); - - /* Insert all items at the list tail to form a queue */ - splat_vprint(file, SPLAT_LIST_TEST6_NAME, - "Adding %d items to list tail\n", list_size); - for (i = 0; i < list_size; i++) { - li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); - if (li == NULL) { - rc = -ENOMEM; - goto out; - } - - list_link_init(&li->li_node); - li->li_data = i; - list_insert_tail(&list, li); - } - - /* Remove all odd items from the queue */ - splat_vprint(file, SPLAT_LIST_TEST6_NAME, - "Removing %d odd items from the list\n", list_size >> 1); - for (li = list_head(&list); li != NULL; li = list_next(&list, li)) { - if (li->li_data % 2 == 1) { - li_prev = list_prev(&list, li); - list_remove(&list, li); - kmem_free(li, sizeof(list_item_t)); - li = li_prev; - } - } - - splat_vprint(file, SPLAT_LIST_TEST6_NAME, "Validating %d item " - "list is a queue of only even elements\n", list_size / 2); - rc = splat_list_validate(&list, list_size / 2, LIST_ORDER_QUEUE, 2); - if (rc) - splat_vprint(file, SPLAT_LIST_TEST6_NAME, - "List validation failed, %d\n", rc); -out: - /* Remove all items */ - splat_vprint(file, SPLAT_LIST_TEST6_NAME, - "Removing %d items from list tail\n", list_size / 2); - while ((li = list_remove_tail(&list))) - kmem_free(li, sizeof(list_item_t)); - - splat_vprint(file, SPLAT_LIST_TEST6_NAME, "Destroying list\n%s", ""); - list_destroy(&list); - - return rc; -} - -static int -splat_list_test7(struct file *file, void *arg) -{ - list_t list; - list_item_t *li; - int rc = 0; - - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Creating list\n%s", ""); - list_create(&list, sizeof(list_item_t), offsetof(list_item_t, li_node)); - - li = kmem_alloc(sizeof(list_item_t), KM_SLEEP); - if (li == NULL) { - rc = -ENOMEM; - goto out; - } - - /* Validate newly initialized node is inactive */ - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Init list node\n%s", ""); - list_link_init(&li->li_node); - if (list_link_active(&li->li_node)) { - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Newly initialized " - "list node should inactive %p/%p\n", - li->li_node.prev, li->li_node.next); - rc = -EINVAL; - goto out_li; - } - - /* Validate node is active when linked in to a list */ - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Insert list node\n%s", ""); - list_insert_head(&list, li); - if (!list_link_active(&li->li_node)) { - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "List node " - "inserted in list should be active %p/%p\n", - li->li_node.prev, li->li_node.next); - rc = -EINVAL; - goto out; - } - - /* Validate node is inactive when removed from list */ - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Remove list node\n%s", ""); - list_remove(&list, li); - if (list_link_active(&li->li_node)) { - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "List node " - "removed from list should be inactive %p/%p\n", - li->li_node.prev, li->li_node.next); - rc = -EINVAL; - } -out_li: - kmem_free(li, sizeof(list_item_t)); -out: - /* Remove all items */ - while ((li = list_remove_head(&list))) - kmem_free(li, sizeof(list_item_t)); - - splat_vprint(file, SPLAT_LIST_TEST7_NAME, "Destroying list\n%s", ""); - list_destroy(&list); - - return rc; -} - -splat_subsystem_t * -splat_list_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_LIST_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_LIST_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_LIST; - - splat_test_init(sub, SPLAT_LIST_TEST1_NAME, SPLAT_LIST_TEST1_DESC, - SPLAT_LIST_TEST1_ID, splat_list_test1); - splat_test_init(sub, SPLAT_LIST_TEST2_NAME, SPLAT_LIST_TEST2_DESC, - SPLAT_LIST_TEST2_ID, splat_list_test2); - splat_test_init(sub, SPLAT_LIST_TEST3_NAME, SPLAT_LIST_TEST3_DESC, - SPLAT_LIST_TEST3_ID, splat_list_test3); - splat_test_init(sub, SPLAT_LIST_TEST4_NAME, SPLAT_LIST_TEST4_DESC, - SPLAT_LIST_TEST4_ID, splat_list_test4); - splat_test_init(sub, SPLAT_LIST_TEST5_NAME, SPLAT_LIST_TEST5_DESC, - SPLAT_LIST_TEST5_ID, splat_list_test5); - splat_test_init(sub, SPLAT_LIST_TEST6_NAME, SPLAT_LIST_TEST6_DESC, - SPLAT_LIST_TEST6_ID, splat_list_test6); - splat_test_init(sub, SPLAT_LIST_TEST7_NAME, SPLAT_LIST_TEST7_DESC, - SPLAT_LIST_TEST7_ID, splat_list_test7); - - return sub; -} - -void -splat_list_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_LIST_TEST7_ID); - splat_test_fini(sub, SPLAT_LIST_TEST6_ID); - splat_test_fini(sub, SPLAT_LIST_TEST5_ID); - splat_test_fini(sub, SPLAT_LIST_TEST4_ID); - splat_test_fini(sub, SPLAT_LIST_TEST3_ID); - splat_test_fini(sub, SPLAT_LIST_TEST2_ID); - splat_test_fini(sub, SPLAT_LIST_TEST1_ID); - - kfree(sub); -} - -int -splat_list_id(void) -{ - return SPLAT_SUBSYSTEM_LIST; -} diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c deleted file mode 100644 index 202e6c0f6..000000000 --- a/module/splat/splat-mutex.c +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Mutex Tests. - */ - -#include -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_MUTEX_NAME "mutex" -#define SPLAT_MUTEX_DESC "Kernel Mutex Tests" - -#define SPLAT_MUTEX_TEST1_ID 0x0401 -#define SPLAT_MUTEX_TEST1_NAME "tryenter" -#define SPLAT_MUTEX_TEST1_DESC "Validate mutex_tryenter() correctness" - -#define SPLAT_MUTEX_TEST2_ID 0x0402 -#define SPLAT_MUTEX_TEST2_NAME "race" -#define SPLAT_MUTEX_TEST2_DESC "Many threads entering/exiting the mutex" - -#define SPLAT_MUTEX_TEST3_ID 0x0403 -#define SPLAT_MUTEX_TEST3_NAME "owned" -#define SPLAT_MUTEX_TEST3_DESC "Validate mutex_owned() correctness" - -#define SPLAT_MUTEX_TEST4_ID 0x0404 -#define SPLAT_MUTEX_TEST4_NAME "owner" -#define SPLAT_MUTEX_TEST4_DESC "Validate mutex_owner() correctness" - -#define SPLAT_MUTEX_TEST_MAGIC 0x115599DDUL -#define SPLAT_MUTEX_TEST_NAME "mutex_test" -#define SPLAT_MUTEX_TEST_TASKQ "mutex_taskq" -#define SPLAT_MUTEX_TEST_COUNT 128 - -typedef struct mutex_priv { - unsigned long mp_magic; - struct file *mp_file; - kmutex_t mp_mtx; - int mp_rc; - int mp_rc2; -} mutex_priv_t; - -static void -splat_mutex_test1_func(void *arg) -{ - mutex_priv_t *mp = (mutex_priv_t *)arg; - ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); - - if (mutex_tryenter(&mp->mp_mtx)) { - mp->mp_rc = 0; - mutex_exit(&mp->mp_mtx); - } else { - mp->mp_rc = -EBUSY; - } -} - -static int -splat_mutex_test1(struct file *file, void *arg) -{ - mutex_priv_t *mp; - taskq_t *tq; - taskqid_t id; - int rc = 0; - - mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); - if (mp == NULL) - return -ENOMEM; - - tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, defclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE); - if (tq == NULL) { - rc = -ENOMEM; - goto out2; - } - - mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; - mp->mp_file = file; - mutex_init(&mp->mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mutex_enter(&mp->mp_mtx); - - /* - * Schedule a task function which will try and acquire the mutex via - * mutex_tryenter() while it's held. This should fail and the task - * function will indicate this status in the passed private data. - */ - mp->mp_rc = -EINVAL; - id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); - if (id == TASKQID_INVALID) { - mutex_exit(&mp->mp_mtx); - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "taskq_dispatch() failed\n"); - rc = -EINVAL; - goto out; - } - - taskq_wait_id(tq, id); - mutex_exit(&mp->mp_mtx); - - /* Task function successfully acquired mutex, very bad! */ - if (mp->mp_rc != -EBUSY) { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, - "mutex_trylock() incorrectly succeeded when " - "the mutex was held, %d/%d\n", (int)id, mp->mp_rc); - rc = -EINVAL; - goto out; - } else { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "mutex_trylock() correctly failed when " - "the mutex was held\n"); - } - - /* - * Schedule a task function which will try and acquire the mutex via - * mutex_tryenter() while it is not held. This should succeed and - * can be verified by checking the private data. - */ - mp->mp_rc = -EINVAL; - id = taskq_dispatch(tq, splat_mutex_test1_func, mp, TQ_SLEEP); - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "taskq_dispatch() failed\n"); - rc = -EINVAL; - goto out; - } - - taskq_wait_id(tq, id); - - /* Task function failed to acquire mutex, very bad! */ - if (mp->mp_rc != 0) { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, - "mutex_trylock() incorrectly failed when the mutex " - "was not held, %d/%d\n", (int)id, mp->mp_rc); - rc = -EINVAL; - } else { - splat_vprint(file, SPLAT_MUTEX_TEST1_NAME, "%s", - "mutex_trylock() correctly succeeded " - "when the mutex was not held\n"); - } -out: - taskq_destroy(tq); - mutex_destroy(&(mp->mp_mtx)); -out2: - kfree(mp); - return rc; -} - -static void -splat_mutex_test2_func(void *arg) -{ - mutex_priv_t *mp = (mutex_priv_t *)arg; - int rc; - ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); - - /* Read the value before sleeping and write it after we wake up to - * maximize the chance of a race if mutexs are not working properly */ - mutex_enter(&mp->mp_mtx); - rc = mp->mp_rc; - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 100); /* 1/100 of a second */ - VERIFY(mp->mp_rc == rc); - mp->mp_rc = rc + 1; - mutex_exit(&mp->mp_mtx); -} - -static int -splat_mutex_test2(struct file *file, void *arg) -{ - mutex_priv_t *mp; - taskq_t *tq; - taskqid_t id; - int i, rc = 0; - - mp = (mutex_priv_t *)kmalloc(sizeof(*mp), GFP_KERNEL); - if (mp == NULL) - return -ENOMEM; - - /* Create several threads allowing tasks to race with each other */ - tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, num_online_cpus(), - defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); - if (tq == NULL) { - rc = -ENOMEM; - goto out; - } - - mp->mp_magic = SPLAT_MUTEX_TEST_MAGIC; - mp->mp_file = file; - mutex_init(&(mp->mp_mtx), SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - mp->mp_rc = 0; - - /* - * Schedule N work items to the work queue each of which enters the - * mutex, sleeps briefly, then exits the mutex. On a multiprocessor - * box these work items will be handled by all available CPUs. The - * task function checks to ensure the tracked shared variable is - * always only incremented by one. Additionally, the mutex itself - * is instrumented such that if any two processors are in the - * critical region at the same time the system will panic. If the - * mutex is implemented right this will never happy, that's a pass. - */ - for (i = 0; i < SPLAT_MUTEX_TEST_COUNT; i++) { - id = taskq_dispatch(tq, splat_mutex_test2_func, mp, TQ_SLEEP); - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, - "Failed to queue task %d\n", i); - rc = -EINVAL; - } - } - - taskq_wait(tq); - - if (mp->mp_rc == SPLAT_MUTEX_TEST_COUNT) { - splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " - "correctly entered/exited the mutex %d times\n", - num_online_cpus(), mp->mp_rc); - } else { - splat_vprint(file, SPLAT_MUTEX_TEST2_NAME, "%d racing threads " - "only processed %d/%d mutex work items\n", - num_online_cpus(),mp->mp_rc,SPLAT_MUTEX_TEST_COUNT); - rc = -EINVAL; - } - - taskq_destroy(tq); - mutex_destroy(&(mp->mp_mtx)); -out: - kfree(mp); - return rc; -} - -static void -splat_mutex_owned(void *priv) -{ - mutex_priv_t *mp = (mutex_priv_t *)priv; - - ASSERT(mp->mp_magic == SPLAT_MUTEX_TEST_MAGIC); - mp->mp_rc = mutex_owned(&mp->mp_mtx); - mp->mp_rc2 = MUTEX_HELD(&mp->mp_mtx); -} - -static int -splat_mutex_test3(struct file *file, void *arg) -{ - mutex_priv_t mp; - taskq_t *tq; - taskqid_t id; - int rc = 0; - - mp.mp_magic = SPLAT_MUTEX_TEST_MAGIC; - mp.mp_file = file; - mutex_init(&mp.mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - - if ((tq = taskq_create(SPLAT_MUTEX_TEST_NAME, 1, defclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Taskq '%s' " - "create failed\n", SPLAT_MUTEX_TEST3_NAME); - return -EINVAL; - } - - mutex_enter(&mp.mp_mtx); - - /* Mutex should be owned by current */ - if (!mutex_owned(&mp.mp_mtx)) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Unowned mutex " - "should be owned by pid %d\n", current->pid); - rc = -EINVAL; - goto out_exit; - } - - id = taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP); - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Failed to " - "dispatch function '%s' to taskq\n", - sym2str(splat_mutex_owned)); - rc = -EINVAL; - goto out_exit; - } - taskq_wait(tq); - - /* Mutex should not be owned which checked from a different thread */ - if (mp.mp_rc || mp.mp_rc2) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex owned by " - "pid %d not by taskq\n", current->pid); - rc = -EINVAL; - goto out_exit; - } - - mutex_exit(&mp.mp_mtx); - - /* Mutex should not be owned by current */ - if (mutex_owned(&mp.mp_mtx)) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex owned by " - "pid %d it should be unowned\b", current->pid); - rc = -EINVAL; - goto out; - } - - id = taskq_dispatch(tq, splat_mutex_owned, &mp, TQ_SLEEP); - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Failed to " - "dispatch function '%s' to taskq\n", - sym2str(splat_mutex_owned)); - rc = -EINVAL; - goto out; - } - taskq_wait(tq); - - /* Mutex should be owned by no one */ - if (mp.mp_rc || mp.mp_rc2) { - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Mutex owned by " - "no one, %d/%d disagrees\n", mp.mp_rc, mp.mp_rc2); - rc = -EINVAL; - goto out; - } - - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "%s", - "Correct mutex_owned() behavior\n"); - goto out; -out_exit: - mutex_exit(&mp.mp_mtx); -out: - mutex_destroy(&mp.mp_mtx); - taskq_destroy(tq); - - return rc; -} - -static int -splat_mutex_test4(struct file *file, void *arg) -{ - kmutex_t mtx; - kthread_t *owner; - int rc = 0; - - mutex_init(&mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - - /* - * Verify mutex owner is cleared after being dropped. Depending - * on how you build your kernel this behavior changes, ensure the - * SPL mutex implementation is properly detecting this. - */ - mutex_enter(&mtx); - msleep(100); - mutex_exit(&mtx); - if (MUTEX_HELD(&mtx)) { - splat_vprint(file, SPLAT_MUTEX_TEST4_NAME, "Mutex should " - "not be held, bit is by %p\n", mutex_owner(&mtx)); - rc = -EINVAL; - goto out; - } - - mutex_enter(&mtx); - - /* Mutex should be owned by current */ - owner = mutex_owner(&mtx); - if (current != owner) { - splat_vprint(file, SPLAT_MUTEX_TEST4_NAME, "Mutex should " - "be owned by pid %d but is owned by pid %d\n", - current->pid, owner ? owner->pid : -1); - rc = -EINVAL; - goto out; - } - - mutex_exit(&mtx); - - /* Mutex should not be owned by any task */ - owner = mutex_owner(&mtx); - if (owner) { - splat_vprint(file, SPLAT_MUTEX_TEST4_NAME, "Mutex should not " - "be owned but is owned by pid %d\n", owner->pid); - rc = -EINVAL; - goto out; - } - - splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "%s", - "Correct mutex_owner() behavior\n"); -out: - mutex_destroy(&mtx); - - return rc; -} - -splat_subsystem_t * -splat_mutex_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_MUTEX_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_MUTEX_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_MUTEX; - - splat_test_init(sub, SPLAT_MUTEX_TEST1_NAME, SPLAT_MUTEX_TEST1_DESC, - SPLAT_MUTEX_TEST1_ID, splat_mutex_test1); - splat_test_init(sub, SPLAT_MUTEX_TEST2_NAME, SPLAT_MUTEX_TEST2_DESC, - SPLAT_MUTEX_TEST2_ID, splat_mutex_test2); - splat_test_init(sub, SPLAT_MUTEX_TEST3_NAME, SPLAT_MUTEX_TEST3_DESC, - SPLAT_MUTEX_TEST3_ID, splat_mutex_test3); - splat_test_init(sub, SPLAT_MUTEX_TEST4_NAME, SPLAT_MUTEX_TEST4_DESC, - SPLAT_MUTEX_TEST4_ID, splat_mutex_test4); - - return sub; -} - -void -splat_mutex_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_MUTEX_TEST4_ID); - splat_test_fini(sub, SPLAT_MUTEX_TEST3_ID); - splat_test_fini(sub, SPLAT_MUTEX_TEST2_ID); - splat_test_fini(sub, SPLAT_MUTEX_TEST1_ID); - - kfree(sub); -} - -int -splat_mutex_id(void) { - return SPLAT_SUBSYSTEM_MUTEX; -} diff --git a/module/splat/splat-random.c b/module/splat/splat-random.c deleted file mode 100644 index 2ddb823fc..000000000 --- a/module/splat/splat-random.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Random Number Generator Tests. - */ - -#include -#include -#include "splat-internal.h" - -#define SPLAT_KRNG_NAME "krng" -#define SPLAT_KRNG_DESC "Kernel Random Number Generator Tests" - -#define SPLAT_KRNG_TEST1_ID 0x0301 -#define SPLAT_KRNG_TEST1_NAME "freq" -#define SPLAT_KRNG_TEST1_DESC "Frequency Test" - -#define KRNG_NUM_BITS 1048576 -#define KRNG_NUM_BYTES (KRNG_NUM_BITS >> 3) -#define KRNG_NUM_BITS_DIV2 (KRNG_NUM_BITS >> 1) -#define KRNG_ERROR_RANGE 2097 - -/* Random Number Generator Tests - There can be meny more tests on quality of the - random number generator. For now we are only - testing the frequency of particular bits. - We could also test consecutive sequences, - randomness within a particular block, etc. - but is probably not necessary for our purposes */ - -static int -splat_krng_test1(struct file *file, void *arg) -{ - uint8_t *buf; - int i, j, diff, num = 0, rc = 0; - - buf = kmalloc(sizeof(*buf) * KRNG_NUM_BYTES, GFP_KERNEL); - if (buf == NULL) { - rc = -ENOMEM; - goto out; - } - - memset(buf, 0, sizeof(*buf) * KRNG_NUM_BYTES); - - /* Always succeeds */ - random_get_pseudo_bytes(buf, sizeof(uint8_t) * KRNG_NUM_BYTES); - - for (i = 0; i < KRNG_NUM_BYTES; i++) { - uint8_t tmp = buf[i]; - for (j = 0; j < 8; j++) { - uint8_t tmp2 = ((tmp >> j) & 0x01); - if (tmp2 == 1) { - num++; - } - } - } - - kfree(buf); - - diff = KRNG_NUM_BITS_DIV2 - num; - if (diff < 0) - diff *= -1; - - splat_print(file, "Test 1 Number of ones: %d\n", num); - splat_print(file, "Test 1 Difference from expected: %d Allowed: %d\n", - diff, KRNG_ERROR_RANGE); - - if (diff > KRNG_ERROR_RANGE) - rc = -ERANGE; -out: - return rc; -} - -splat_subsystem_t * -splat_krng_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_KRNG_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_KRNG_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_KRNG; - - splat_test_init(sub, SPLAT_KRNG_TEST1_NAME, SPLAT_KRNG_TEST1_DESC, - SPLAT_KRNG_TEST1_ID, splat_krng_test1); - - return sub; -} - -void -splat_krng_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_KRNG_TEST1_ID); - - kfree(sub); -} - -int -splat_krng_id(void) { - return SPLAT_SUBSYSTEM_KRNG; -} diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c deleted file mode 100644 index 562a5f047..000000000 --- a/module/splat/splat-rwlock.c +++ /dev/null @@ -1,747 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Read/Writer Lock Tests. - */ - -#include -#include -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_RWLOCK_NAME "rwlock" -#define SPLAT_RWLOCK_DESC "Kernel RW Lock Tests" - -#define SPLAT_RWLOCK_TEST1_ID 0x0701 -#define SPLAT_RWLOCK_TEST1_NAME "N-rd/1-wr" -#define SPLAT_RWLOCK_TEST1_DESC "Multiple readers one writer" - -#define SPLAT_RWLOCK_TEST2_ID 0x0702 -#define SPLAT_RWLOCK_TEST2_NAME "0-rd/N-wr" -#define SPLAT_RWLOCK_TEST2_DESC "Multiple writers" - -#define SPLAT_RWLOCK_TEST3_ID 0x0703 -#define SPLAT_RWLOCK_TEST3_NAME "held" -#define SPLAT_RWLOCK_TEST3_DESC "RW_{LOCK|READ|WRITE}_HELD" - -#define SPLAT_RWLOCK_TEST4_ID 0x0704 -#define SPLAT_RWLOCK_TEST4_NAME "tryenter" -#define SPLAT_RWLOCK_TEST4_DESC "Tryenter" - -#define SPLAT_RWLOCK_TEST5_ID 0x0705 -#define SPLAT_RWLOCK_TEST5_NAME "rw_downgrade" -#define SPLAT_RWLOCK_TEST5_DESC "Write downgrade" - -#define SPLAT_RWLOCK_TEST6_ID 0x0706 -#define SPLAT_RWLOCK_TEST6_NAME "rw_tryupgrade-1" -#define SPLAT_RWLOCK_TEST6_DESC "rwsem->count value" - -#define SPLAT_RWLOCK_TEST7_ID 0x0707 -#define SPLAT_RWLOCK_TEST7_NAME "rw_tryupgrade-2" -#define SPLAT_RWLOCK_TEST7_DESC "Read upgrade" - -#define SPLAT_RWLOCK_TEST_MAGIC 0x115599DDUL -#define SPLAT_RWLOCK_TEST_NAME "rwlock_test" -#define SPLAT_RWLOCK_TEST_TASKQ "rwlock_taskq" -#define SPLAT_RWLOCK_TEST_COUNT 8 - -#define SPLAT_RWLOCK_RELEASE_INIT 0 -#define SPLAT_RWLOCK_RELEASE_WR 1 -#define SPLAT_RWLOCK_RELEASE_RD 2 - -typedef struct rw_priv { - unsigned long rw_magic; - struct file *rw_file; - krwlock_t rw_rwlock; - spinlock_t rw_lock; - spl_wait_queue_head_t rw_waitq; - int rw_completed; - int rw_holders; - int rw_waiters; - int rw_release; - int rw_rc; - krw_t rw_type; -} rw_priv_t; - -typedef struct rw_thr { - const char *rwt_name; - rw_priv_t *rwt_rwp; - struct task_struct *rwt_thread; -} rw_thr_t; - -void splat_init_rw_priv(rw_priv_t *rwp, struct file *file) -{ - rwp->rw_magic = SPLAT_RWLOCK_TEST_MAGIC; - rwp->rw_file = file; - rw_init(&rwp->rw_rwlock, SPLAT_RWLOCK_TEST_NAME, RW_DEFAULT, NULL); - spin_lock_init(&rwp->rw_lock); - init_waitqueue_head(&rwp->rw_waitq); - rwp->rw_completed = 0; - rwp->rw_holders = 0; - rwp->rw_waiters = 0; - rwp->rw_release = SPLAT_RWLOCK_RELEASE_INIT; - rwp->rw_rc = 0; - rwp->rw_type = 0; -} - -#if defined(CONFIG_PREEMPT_RT_FULL) -static int -splat_rwlock_test1(struct file *file, void *arg) -{ - /* - * This test will never succeed on PREEMPT_RT_FULL because these - * kernels only allow a single thread to hold the lock. - */ - return 0; -} -#else -static int -splat_rwlock_wr_thr(void *arg) -{ - rw_thr_t *rwt = (rw_thr_t *)arg; - rw_priv_t *rwp = rwt->rwt_rwp; - uint8_t rnd; - - ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - - get_random_bytes((void *)&rnd, 1); - msleep((unsigned int)rnd); - - splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s trying to acquire rwlock (%d holding/%d waiting)\n", - rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); - spin_lock(&rwp->rw_lock); - rwp->rw_waiters++; - spin_unlock(&rwp->rw_lock); - rw_enter(&rwp->rw_rwlock, RW_WRITER); - - spin_lock(&rwp->rw_lock); - rwp->rw_waiters--; - rwp->rw_holders++; - spin_unlock(&rwp->rw_lock); - splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s acquired rwlock (%d holding/%d waiting)\n", - rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); - - /* Wait for control thread to signal we can release the write lock */ - wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, - rwp->rw_release == SPLAT_RWLOCK_RELEASE_WR)); - - spin_lock(&rwp->rw_lock); - rwp->rw_completed++; - rwp->rw_holders--; - spin_unlock(&rwp->rw_lock); - splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s dropped rwlock (%d holding/%d waiting)\n", - rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); - - rw_exit(&rwp->rw_rwlock); - - return 0; -} - -static int -splat_rwlock_rd_thr(void *arg) -{ - rw_thr_t *rwt = (rw_thr_t *)arg; - rw_priv_t *rwp = rwt->rwt_rwp; - uint8_t rnd; - - ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - - get_random_bytes((void *)&rnd, 1); - msleep((unsigned int)rnd); - - /* Don't try and take the semaphore until after someone has it */ - wait_event_interruptible(rwp->rw_waitq, - splat_locked_test(&rwp->rw_lock, rwp->rw_holders > 0)); - - splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s trying to acquire rwlock (%d holding/%d waiting)\n", - rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); - spin_lock(&rwp->rw_lock); - rwp->rw_waiters++; - spin_unlock(&rwp->rw_lock); - rw_enter(&rwp->rw_rwlock, RW_READER); - - spin_lock(&rwp->rw_lock); - rwp->rw_waiters--; - rwp->rw_holders++; - spin_unlock(&rwp->rw_lock); - splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s acquired rwlock (%d holding/%d waiting)\n", - rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); - - /* Wait for control thread to signal we can release the read lock */ - wait_event_interruptible(rwp->rw_waitq, splat_locked_test(&rwp->rw_lock, - rwp->rw_release == SPLAT_RWLOCK_RELEASE_RD)); - - spin_lock(&rwp->rw_lock); - rwp->rw_completed++; - rwp->rw_holders--; - spin_unlock(&rwp->rw_lock); - splat_vprint(rwp->rw_file, rwt->rwt_name, - "%s dropped rwlock (%d holding/%d waiting)\n", - rwt->rwt_thread->comm, rwp->rw_holders, rwp->rw_waiters); - - rw_exit(&rwp->rw_rwlock); - - return 0; -} - -static int -splat_rwlock_test1(struct file *file, void *arg) -{ - int i, count = 0, rc = 0; - rw_thr_t rwt[SPLAT_RWLOCK_TEST_COUNT]; - rw_priv_t *rwp; - - rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); - if (rwp == NULL) - return -ENOMEM; - - splat_init_rw_priv(rwp, file); - - /* Create some threads, the exact number isn't important just as - * long as we know how many we managed to create and should expect. */ - for (i = 0; i < SPLAT_RWLOCK_TEST_COUNT; i++) { - rwt[i].rwt_rwp = rwp; - rwt[i].rwt_name = SPLAT_RWLOCK_TEST1_NAME; - - /* The first thread will be the writer */ - if (i == 0) - rwt[i].rwt_thread = spl_kthread_create(splat_rwlock_wr_thr, - &rwt[i], "%s/%d", SPLAT_RWLOCK_TEST_NAME, i); - else - rwt[i].rwt_thread = spl_kthread_create(splat_rwlock_rd_thr, - &rwt[i], "%s/%d", SPLAT_RWLOCK_TEST_NAME, i); - - if (!IS_ERR(rwt[i].rwt_thread)) { - wake_up_process(rwt[i].rwt_thread); - count++; - } - } - - /* Wait for the writer */ - while (splat_locked_test(&rwp->rw_lock, rwp->rw_holders == 0)) { - wake_up_interruptible(&rwp->rw_waitq); - msleep(100); - } - - /* Wait for 'count-1' readers */ - while (splat_locked_test(&rwp->rw_lock, rwp->rw_waiters < count - 1)) { - wake_up_interruptible(&rwp->rw_waitq); - msleep(100); - } - - /* Verify there is only one lock holder */ - if (splat_locked_test(&rwp->rw_lock, rwp->rw_holders) != 1) { - splat_vprint(file, SPLAT_RWLOCK_TEST1_NAME, "Only 1 holder " - "expected for rwlock (%d holding/%d waiting)\n", - rwp->rw_holders, rwp->rw_waiters); - rc = -EINVAL; - } - - /* Verify 'count-1' readers */ - if (splat_locked_test(&rwp->rw_lock, rwp->rw_waiters != count - 1)) { - splat_vprint(file, SPLAT_RWLOCK_TEST1_NAME, "Only %d waiters " - "expected for rwlock (%d holding/%d waiting)\n", - count - 1, rwp->rw_holders, rwp->rw_waiters); - rc = -EINVAL; - } - - /* Signal the writer to release, allows readers to acquire */ - spin_lock(&rwp->rw_lock); - rwp->rw_release = SPLAT_RWLOCK_RELEASE_WR; - wake_up_interruptible(&rwp->rw_waitq); - spin_unlock(&rwp->rw_lock); - - /* Wait for 'count-1' readers to hold the lock */ - while (splat_locked_test(&rwp->rw_lock, rwp->rw_holders < count - 1)) { - wake_up_interruptible(&rwp->rw_waitq); - msleep(100); - } - - /* Verify there are 'count-1' readers */ - if (splat_locked_test(&rwp->rw_lock, rwp->rw_holders != count - 1)) { - splat_vprint(file, SPLAT_RWLOCK_TEST1_NAME, "Only %d holders " - "expected for rwlock (%d holding/%d waiting)\n", - count - 1, rwp->rw_holders, rwp->rw_waiters); - rc = -EINVAL; - } - - /* Release 'count-1' readers */ - spin_lock(&rwp->rw_lock); - rwp->rw_release = SPLAT_RWLOCK_RELEASE_RD; - wake_up_interruptible(&rwp->rw_waitq); - spin_unlock(&rwp->rw_lock); - - /* Wait for the test to complete */ - while (splat_locked_test(&rwp->rw_lock, - rwp->rw_holders>0 || rwp->rw_waiters>0)) - msleep(100); - - rw_destroy(&(rwp->rw_rwlock)); - kfree(rwp); - - return rc; -} -#endif - -static void -splat_rwlock_test2_func(void *arg) -{ - rw_priv_t *rwp = (rw_priv_t *)arg; - int rc; - ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - - /* Read the value before sleeping and write it after we wake up to - * maximize the chance of a race if rwlocks are not working properly */ - rw_enter(&rwp->rw_rwlock, RW_WRITER); - rc = rwp->rw_rc; - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 100); /* 1/100 of a second */ - VERIFY(rwp->rw_rc == rc); - rwp->rw_rc = rc + 1; - rw_exit(&rwp->rw_rwlock); -} - -static int -splat_rwlock_test2(struct file *file, void *arg) -{ - rw_priv_t *rwp; - taskq_t *tq; - int i, rc = 0, tq_count = 256; - - rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); - if (rwp == NULL) - return -ENOMEM; - - splat_init_rw_priv(rwp, file); - - /* Create several threads allowing tasks to race with each other */ - tq = taskq_create(SPLAT_RWLOCK_TEST_TASKQ, num_online_cpus(), - defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); - if (tq == NULL) { - rc = -ENOMEM; - goto out; - } - - /* - * Schedule N work items to the work queue each of which enters the - * writer rwlock, sleeps briefly, then exits the writer rwlock. On a - * multiprocessor box these work items will be handled by all available - * CPUs. The task function checks to ensure the tracked shared variable - * is always only incremented by one. Additionally, the rwlock itself - * is instrumented such that if any two processors are in the - * critical region at the same time the system will panic. If the - * rwlock is implemented right this will never happy, that's a pass. - */ - for (i = 0; i < tq_count; i++) { - if (taskq_dispatch(tq, splat_rwlock_test2_func, rwp, - TQ_SLEEP) == TASKQID_INVALID) { - splat_vprint(file, SPLAT_RWLOCK_TEST2_NAME, - "Failed to queue task %d\n", i); - rc = -EINVAL; - } - } - - taskq_wait(tq); - - if (rwp->rw_rc == tq_count) { - splat_vprint(file, SPLAT_RWLOCK_TEST2_NAME, "%d racing threads " - "correctly entered/exited the rwlock %d times\n", - num_online_cpus(), rwp->rw_rc); - } else { - splat_vprint(file, SPLAT_RWLOCK_TEST2_NAME, "%d racing threads " - "only processed %d/%d w rwlock work items\n", - num_online_cpus(), rwp->rw_rc, tq_count); - rc = -EINVAL; - } - - taskq_destroy(tq); - rw_destroy(&(rwp->rw_rwlock)); -out: - kfree(rwp); - return rc; -} - -#define splat_rwlock_test3_helper(rwp,rex1,rex2,wex1,wex2,held_func,rc) \ -do { \ - int result, _rc1_, _rc2_, _rc3_, _rc4_; \ - \ - rc = 0; \ - rw_enter(&(rwp)->rw_rwlock, RW_READER); \ - _rc1_ = ((result = held_func(&(rwp)->rw_rwlock)) != rex1); \ - splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ - " returned %d (expected %d) when RW_READER\n", \ - _rc1_ ? "Fail " : "", result, rex1); \ - rw_exit(&(rwp)->rw_rwlock); \ - _rc2_ = ((result = held_func(&(rwp)->rw_rwlock)) != rex2); \ - splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ - " returned %d (expected %d) when !RW_READER\n", \ - _rc2_ ? "Fail " : "", result, rex2); \ - \ - rw_enter(&(rwp)->rw_rwlock, RW_WRITER); \ - _rc3_ = ((result = held_func(&(rwp)->rw_rwlock)) != wex1); \ - splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ - " returned %d (expected %d) when RW_WRITER\n", \ - _rc3_ ? "Fail " : "", result, wex1); \ - rw_exit(&(rwp)->rw_rwlock); \ - _rc4_ = ((result = held_func(&(rwp)->rw_rwlock)) != wex2); \ - splat_vprint(file, SPLAT_RWLOCK_TEST3_NAME, "%s" #held_func \ - " returned %d (expected %d) when !RW_WRITER\n", \ - _rc4_ ? "Fail " : "", result, wex2); \ - \ - rc = ((_rc1_ || _rc2_ || _rc3_ || _rc4_) ? -EINVAL : 0); \ -} while(0); - -static int -splat_rwlock_test3(struct file *file, void *arg) -{ - rw_priv_t *rwp; - int rc1, rc2, rc3; - - rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); - if (rwp == NULL) - return -ENOMEM; - - splat_init_rw_priv(rwp, file); - - splat_rwlock_test3_helper(rwp, 1, 0, 1, 0, RW_LOCK_HELD, rc1); - splat_rwlock_test3_helper(rwp, 1, 0, 0, 0, RW_READ_HELD, rc2); - splat_rwlock_test3_helper(rwp, 0, 0, 1, 0, RW_WRITE_HELD, rc3); - - rw_destroy(&rwp->rw_rwlock); - kfree(rwp); - - return ((rc1 || rc2 || rc3) ? -EINVAL : 0); -} - -static void -splat_rwlock_test4_func(void *arg) -{ - rw_priv_t *rwp = (rw_priv_t *)arg; - ASSERT(rwp->rw_magic == SPLAT_RWLOCK_TEST_MAGIC); - - if (rw_tryenter(&rwp->rw_rwlock, rwp->rw_type)) { - rwp->rw_rc = 0; - rw_exit(&rwp->rw_rwlock); - } else { - rwp->rw_rc = -EBUSY; - } -} - -static char * -splat_rwlock_test4_name(krw_t type) -{ - switch (type) { - case RW_NONE: return "RW_NONE"; - case RW_WRITER: return "RW_WRITER"; - case RW_READER: return "RW_READER"; - } - - return NULL; -} - -static int -splat_rwlock_test4_type(taskq_t *tq, rw_priv_t *rwp, int expected_rc, - krw_t holder_type, krw_t try_type) -{ - int id, rc = 0; - - /* Schedule a task function which will try and acquire the rwlock - * using type try_type while the rwlock is being held as holder_type. - * The result must match expected_rc for the test to pass */ - rwp->rw_rc = -EINVAL; - rwp->rw_type = try_type; - - if (holder_type == RW_WRITER || holder_type == RW_READER) - rw_enter(&rwp->rw_rwlock, holder_type); - - id = taskq_dispatch(tq, splat_rwlock_test4_func, rwp, TQ_SLEEP); - if (id == TASKQID_INVALID) { - splat_vprint(rwp->rw_file, SPLAT_RWLOCK_TEST4_NAME, "%s", - "taskq_dispatch() failed\n"); - rc = -EINVAL; - goto out; - } - - taskq_wait_id(tq, id); - - if (rwp->rw_rc != expected_rc) - rc = -EINVAL; - - splat_vprint(rwp->rw_file, SPLAT_RWLOCK_TEST4_NAME, - "%srw_tryenter(%s) returned %d (expected %d) when %s\n", - rc ? "Fail " : "", splat_rwlock_test4_name(try_type), - rwp->rw_rc, expected_rc, - splat_rwlock_test4_name(holder_type)); -out: - if (holder_type == RW_WRITER || holder_type == RW_READER) - rw_exit(&rwp->rw_rwlock); - - return rc; -} - -static int -splat_rwlock_test4(struct file *file, void *arg) -{ - rw_priv_t *rwp; - taskq_t *tq; - int rc = 0, rc1, rc2, rc3, rc4, rc5, rc6; - - rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); - if (rwp == NULL) - return -ENOMEM; - - tq = taskq_create(SPLAT_RWLOCK_TEST_TASKQ, 1, defclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE); - if (tq == NULL) { - rc = -ENOMEM; - goto out; - } - - splat_init_rw_priv(rwp, file); - - /* - * Validate all combinations of rw_tryenter() contention. - * - * The concurrent reader test is modified for PREEMPT_RT_FULL - * kernels which do not permit concurrent read locks to be taken - * from different threads. The same thread is allowed to take - * the read lock multiple times. - */ - rc1 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_WRITER, RW_WRITER); - rc2 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_WRITER, RW_READER); - rc3 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_READER, RW_WRITER); -#if defined(CONFIG_PREEMPT_RT_FULL) - rc4 = splat_rwlock_test4_type(tq, rwp, -EBUSY, RW_READER, RW_READER); -#else - rc4 = splat_rwlock_test4_type(tq, rwp, 0, RW_READER, RW_READER); -#endif - rc5 = splat_rwlock_test4_type(tq, rwp, 0, RW_NONE, RW_WRITER); - rc6 = splat_rwlock_test4_type(tq, rwp, 0, RW_NONE, RW_READER); - - if (rc1 || rc2 || rc3 || rc4 || rc5 || rc6) - rc = -EINVAL; - - taskq_destroy(tq); -out: - rw_destroy(&(rwp->rw_rwlock)); - kfree(rwp); - - return rc; -} - -static int -splat_rwlock_test5(struct file *file, void *arg) -{ - rw_priv_t *rwp; - int rc = -EINVAL; - - rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); - if (rwp == NULL) - return -ENOMEM; - - splat_init_rw_priv(rwp, file); - - rw_enter(&rwp->rw_rwlock, RW_WRITER); - if (!RW_WRITE_HELD(&rwp->rw_rwlock)) { - splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, - "rwlock should be write lock: %d\n", - RW_WRITE_HELD(&rwp->rw_rwlock)); - goto out; - } - - rw_downgrade(&rwp->rw_rwlock); - if (!RW_READ_HELD(&rwp->rw_rwlock)) { - splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, - "rwlock should be read lock: %d\n", - RW_READ_HELD(&rwp->rw_rwlock)); - goto out; - } - - rc = 0; - splat_vprint(file, SPLAT_RWLOCK_TEST5_NAME, "%s", - "rwlock properly downgraded\n"); -out: - rw_exit(&rwp->rw_rwlock); - rw_destroy(&rwp->rw_rwlock); - kfree(rwp); - - return rc; -} - -static int -splat_rwlock_test6(struct file *file, void *arg) -{ - rw_priv_t *rwp; - int rc; - - rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); - if (rwp == NULL) - return -ENOMEM; - - splat_init_rw_priv(rwp, file); - - rw_enter(&rwp->rw_rwlock, RW_READER); - if (RWSEM_COUNT(SEM(&rwp->rw_rwlock)) != - SPL_RWSEM_SINGLE_READER_VALUE) { - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, - "We assumed single reader rwsem->count " - "should be %ld, but is %ld\n", - (long int)SPL_RWSEM_SINGLE_READER_VALUE, - (long int)RWSEM_COUNT(SEM(&rwp->rw_rwlock))); - rc = -ENOLCK; - goto out; - } - rw_exit(&rwp->rw_rwlock); - - rw_enter(&rwp->rw_rwlock, RW_WRITER); - if (RWSEM_COUNT(SEM(&rwp->rw_rwlock)) != - SPL_RWSEM_SINGLE_WRITER_VALUE) { - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, - "We assumed single writer rwsem->count " - "should be %ld, but is %ld\n", - (long int)SPL_RWSEM_SINGLE_WRITER_VALUE, - (long int)RWSEM_COUNT(SEM(&rwp->rw_rwlock))); - rc = -ENOLCK; - goto out; - } - rc = 0; - splat_vprint(file, SPLAT_RWLOCK_TEST6_NAME, "%s", - "rwsem->count same as we assumed\n"); -out: - rw_exit(&rwp->rw_rwlock); - rw_destroy(&rwp->rw_rwlock); - kfree(rwp); - - return rc; -} - -static int -splat_rwlock_test7(struct file *file, void *arg) -{ - rw_priv_t *rwp; - int rc; - - rwp = (rw_priv_t *)kmalloc(sizeof(*rwp), GFP_KERNEL); - if (rwp == NULL) - return -ENOMEM; - - splat_init_rw_priv(rwp, file); - - rw_enter(&rwp->rw_rwlock, RW_READER); - if (!RW_READ_HELD(&rwp->rw_rwlock)) { - splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, - "rwlock should be read lock: %d\n", - RW_READ_HELD(&rwp->rw_rwlock)); - rc = -ENOLCK; - goto out; - } - - /* With one reader upgrade should never fail. */ - rc = rw_tryupgrade(&rwp->rw_rwlock); - if (!rc) { - splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, - "rwlock failed upgrade from reader: %d\n", - RW_READ_HELD(&rwp->rw_rwlock)); - rc = -ENOLCK; - goto out; - } - - if (RW_READ_HELD(&rwp->rw_rwlock) || !RW_WRITE_HELD(&rwp->rw_rwlock)) { - splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, "rwlock should " - "have 0 (not %d) reader and 1 (not %d) writer\n", - RW_READ_HELD(&rwp->rw_rwlock), - RW_WRITE_HELD(&rwp->rw_rwlock)); - goto out; - } - - rc = 0; - splat_vprint(file, SPLAT_RWLOCK_TEST7_NAME, "%s", - "rwlock properly upgraded\n"); -out: - rw_exit(&rwp->rw_rwlock); - rw_destroy(&rwp->rw_rwlock); - kfree(rwp); - - return rc; -} - -splat_subsystem_t * -splat_rwlock_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_RWLOCK_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_RWLOCK_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_RWLOCK; - - splat_test_init(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, - SPLAT_RWLOCK_TEST1_ID, splat_rwlock_test1); - splat_test_init(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, - SPLAT_RWLOCK_TEST2_ID, splat_rwlock_test2); - splat_test_init(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, - SPLAT_RWLOCK_TEST3_ID, splat_rwlock_test3); - splat_test_init(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, - SPLAT_RWLOCK_TEST4_ID, splat_rwlock_test4); - splat_test_init(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, - SPLAT_RWLOCK_TEST5_ID, splat_rwlock_test5); - splat_test_init(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, - SPLAT_RWLOCK_TEST6_ID, splat_rwlock_test6); - splat_test_init(sub, SPLAT_RWLOCK_TEST7_NAME, SPLAT_RWLOCK_TEST7_DESC, - SPLAT_RWLOCK_TEST7_ID, splat_rwlock_test7); - - return sub; -} - -void -splat_rwlock_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_RWLOCK_TEST7_ID); - splat_test_fini(sub, SPLAT_RWLOCK_TEST6_ID); - splat_test_fini(sub, SPLAT_RWLOCK_TEST5_ID); - splat_test_fini(sub, SPLAT_RWLOCK_TEST4_ID); - splat_test_fini(sub, SPLAT_RWLOCK_TEST3_ID); - splat_test_fini(sub, SPLAT_RWLOCK_TEST2_ID); - splat_test_fini(sub, SPLAT_RWLOCK_TEST1_ID); - kfree(sub); -} - -int -splat_rwlock_id(void) { - return SPLAT_SUBSYSTEM_RWLOCK; -} diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c deleted file mode 100644 index ff73e103a..000000000 --- a/module/splat/splat-taskq.c +++ /dev/null @@ -1,1548 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Task Queue Tests. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_TASKQ_NAME "taskq" -#define SPLAT_TASKQ_DESC "Kernel Task Queue Tests" - -#define SPLAT_TASKQ_TEST1_ID 0x0201 -#define SPLAT_TASKQ_TEST1_NAME "single" -#define SPLAT_TASKQ_TEST1_DESC "Single task queue, single task" - -#define SPLAT_TASKQ_TEST2_ID 0x0202 -#define SPLAT_TASKQ_TEST2_NAME "multiple" -#define SPLAT_TASKQ_TEST2_DESC "Multiple task queues, multiple tasks" - -#define SPLAT_TASKQ_TEST3_ID 0x0203 -#define SPLAT_TASKQ_TEST3_NAME "system" -#define SPLAT_TASKQ_TEST3_DESC "System task queue, multiple tasks" - -#define SPLAT_TASKQ_TEST4_ID 0x0204 -#define SPLAT_TASKQ_TEST4_NAME "wait" -#define SPLAT_TASKQ_TEST4_DESC "Multiple task waiting" - -#define SPLAT_TASKQ_TEST5_ID 0x0205 -#define SPLAT_TASKQ_TEST5_NAME "order" -#define SPLAT_TASKQ_TEST5_DESC "Correct task ordering" - -#define SPLAT_TASKQ_TEST6_ID 0x0206 -#define SPLAT_TASKQ_TEST6_NAME "front" -#define SPLAT_TASKQ_TEST6_DESC "Correct ordering with TQ_FRONT flag" - -#define SPLAT_TASKQ_TEST7_ID 0x0207 -#define SPLAT_TASKQ_TEST7_NAME "recurse" -#define SPLAT_TASKQ_TEST7_DESC "Single task queue, recursive dispatch" - -#define SPLAT_TASKQ_TEST8_ID 0x0208 -#define SPLAT_TASKQ_TEST8_NAME "contention" -#define SPLAT_TASKQ_TEST8_DESC "1 queue, 100 threads, 131072 tasks" - -#define SPLAT_TASKQ_TEST9_ID 0x0209 -#define SPLAT_TASKQ_TEST9_NAME "delay" -#define SPLAT_TASKQ_TEST9_DESC "Delayed task execution" - -#define SPLAT_TASKQ_TEST10_ID 0x020a -#define SPLAT_TASKQ_TEST10_NAME "cancel" -#define SPLAT_TASKQ_TEST10_DESC "Cancel task execution" - -#define SPLAT_TASKQ_TEST11_ID 0x020b -#define SPLAT_TASKQ_TEST11_NAME "dynamic" -#define SPLAT_TASKQ_TEST11_DESC "Dynamic task queue thread creation" - -#define SPLAT_TASKQ_ORDER_MAX 8 -#define SPLAT_TASKQ_DEPTH_MAX 16 - - -typedef struct splat_taskq_arg { - int flag; - int id; - atomic_t *count; - int order[SPLAT_TASKQ_ORDER_MAX]; - unsigned int depth; - clock_t expire; - taskq_t *tq; - taskq_ent_t *tqe; - spinlock_t lock; - struct file *file; - const char *name; -} splat_taskq_arg_t; - -typedef struct splat_taskq_id { - int id; - splat_taskq_arg_t *arg; -} splat_taskq_id_t; - -/* - * Create a taskq, queue a task, wait until task completes, ensure - * task ran properly, cleanup taskq. - */ -static void -splat_taskq_test13_func(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - - ASSERT(tq_arg); - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST1_NAME, - "Taskq '%s' function '%s' setting flag\n", - tq_arg->name, sym2str(splat_taskq_test13_func)); - tq_arg->flag = 1; -} - -static int -splat_taskq_test1_impl(struct file *file, void *arg, boolean_t prealloc) -{ - taskq_t *tq; - taskqid_t id; - splat_taskq_arg_t tq_arg; - taskq_ent_t *tqe; - - tqe = kmem_alloc(sizeof (taskq_ent_t), KM_SLEEP); - taskq_init_ent(tqe); - - splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, - "Taskq '%s' creating (%s dispatch)\n", - SPLAT_TASKQ_TEST1_NAME, - prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, defclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, - "Taskq '%s' create failed\n", - SPLAT_TASKQ_TEST1_NAME); - kmem_free(tqe, sizeof (taskq_ent_t)); - return -EINVAL; - } - - tq_arg.flag = 0; - tq_arg.id = 0; - tq_arg.file = file; - tq_arg.name = SPLAT_TASKQ_TEST1_NAME; - - splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, - "Taskq '%s' function '%s' dispatching\n", - tq_arg.name, sym2str(splat_taskq_test13_func)); - if (prealloc) { - taskq_dispatch_ent(tq, splat_taskq_test13_func, - &tq_arg, TQ_SLEEP, tqe); - id = tqe->tqent_id; - } else { - id = taskq_dispatch(tq, splat_taskq_test13_func, - &tq_arg, TQ_SLEEP); - } - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, - "Taskq '%s' function '%s' dispatch failed\n", - tq_arg.name, sym2str(splat_taskq_test13_func)); - kmem_free(tqe, sizeof (taskq_ent_t)); - taskq_destroy(tq); - return -EINVAL; - } - - splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' waiting\n", - tq_arg.name); - taskq_wait(tq); - splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' destroying\n", - tq_arg.name); - - kmem_free(tqe, sizeof (taskq_ent_t)); - taskq_destroy(tq); - - return (tq_arg.flag) ? 0 : -EINVAL; -} - -static int -splat_taskq_test1(struct file *file, void *arg) -{ - int rc; - - rc = splat_taskq_test1_impl(file, arg, B_FALSE); - if (rc) - return rc; - - rc = splat_taskq_test1_impl(file, arg, B_TRUE); - - return rc; -} - -/* - * Create multiple taskq's, each with multiple tasks, wait until - * all tasks complete, ensure all tasks ran properly and in the - * correct order. Run order must be the same as the order submitted - * because we only have 1 thread per taskq. Finally cleanup the taskq. - */ -static void -splat_taskq_test2_func1(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - - ASSERT(tq_arg); - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' function '%s' flag = %d = %d * 2\n", - tq_arg->name, tq_arg->id, - sym2str(splat_taskq_test2_func1), - tq_arg->flag * 2, tq_arg->flag); - tq_arg->flag *= 2; -} - -static void -splat_taskq_test2_func2(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - - ASSERT(tq_arg); - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' function '%s' flag = %d = %d + 1\n", - tq_arg->name, tq_arg->id, - sym2str(splat_taskq_test2_func2), - tq_arg->flag + 1, tq_arg->flag); - tq_arg->flag += 1; -} - -#define TEST2_TASKQS 8 -#define TEST2_THREADS_PER_TASKQ 1 - -static int -splat_taskq_test2_impl(struct file *file, void *arg, boolean_t prealloc) { - taskq_t *tq[TEST2_TASKQS] = { NULL }; - taskqid_t id; - splat_taskq_arg_t *tq_args[TEST2_TASKQS] = { NULL }; - taskq_ent_t *func1_tqes = NULL; - taskq_ent_t *func2_tqes = NULL; - int i, rc = 0; - - func1_tqes = kmalloc(sizeof(*func1_tqes) * TEST2_TASKQS, GFP_KERNEL); - if (func1_tqes == NULL) { - rc = -ENOMEM; - goto out; - } - - func2_tqes = kmalloc(sizeof(*func2_tqes) * TEST2_TASKQS, GFP_KERNEL); - if (func2_tqes == NULL) { - rc = -ENOMEM; - goto out; - } - - for (i = 0; i < TEST2_TASKQS; i++) { - taskq_init_ent(&func1_tqes[i]); - taskq_init_ent(&func2_tqes[i]); - - tq_args[i] = kmalloc(sizeof (splat_taskq_arg_t), GFP_KERNEL); - if (tq_args[i] == NULL) { - rc = -ENOMEM; - break; - } - - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' creating (%s dispatch)\n", - SPLAT_TASKQ_TEST2_NAME, i, - prealloc ? "prealloc" : "dynamic"); - if ((tq[i] = taskq_create(SPLAT_TASKQ_TEST2_NAME, - TEST2_THREADS_PER_TASKQ, - defclsyspri, 50, INT_MAX, - TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' create failed\n", - SPLAT_TASKQ_TEST2_NAME, i); - rc = -EINVAL; - break; - } - - tq_args[i]->flag = i; - tq_args[i]->id = i; - tq_args[i]->file = file; - tq_args[i]->name = SPLAT_TASKQ_TEST2_NAME; - - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' function '%s' dispatching\n", - tq_args[i]->name, tq_args[i]->id, - sym2str(splat_taskq_test2_func1)); - if (prealloc) { - taskq_dispatch_ent(tq[i], splat_taskq_test2_func1, - tq_args[i], TQ_SLEEP, &func1_tqes[i]); - id = func1_tqes[i].tqent_id; - } else { - id = taskq_dispatch(tq[i], splat_taskq_test2_func1, - tq_args[i], TQ_SLEEP); - } - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' function '%s' dispatch " - "failed\n", tq_args[i]->name, tq_args[i]->id, - sym2str(splat_taskq_test2_func1)); - rc = -EINVAL; - break; - } - - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' function '%s' dispatching\n", - tq_args[i]->name, tq_args[i]->id, - sym2str(splat_taskq_test2_func2)); - if (prealloc) { - taskq_dispatch_ent(tq[i], splat_taskq_test2_func2, - tq_args[i], TQ_SLEEP, &func2_tqes[i]); - id = func2_tqes[i].tqent_id; - } else { - id = taskq_dispatch(tq[i], splat_taskq_test2_func2, - tq_args[i], TQ_SLEEP); - } - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq " - "'%s/%d' function '%s' dispatch failed\n", - tq_args[i]->name, tq_args[i]->id, - sym2str(splat_taskq_test2_func2)); - rc = -EINVAL; - break; - } - } - - /* When rc is set we're effectively just doing cleanup here, so - * ignore new errors in that case. They just cause noise. */ - for (i = 0; i < TEST2_TASKQS; i++) { - if (tq_args[i] == NULL) - continue; - - if (tq[i] != NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' waiting\n", - tq_args[i]->name, tq_args[i]->id); - taskq_wait(tq[i]); - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d; destroying\n", - tq_args[i]->name, tq_args[i]->id); - - taskq_destroy(tq[i]); - - if (!rc && tq_args[i]->flag != ((i * 2) + 1)) { - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' processed tasks " - "out of order; %d != %d\n", - tq_args[i]->name, tq_args[i]->id, - tq_args[i]->flag, i * 2 + 1); - rc = -EINVAL; - } else { - splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, - "Taskq '%s/%d' processed tasks " - "in the correct order; %d == %d\n", - tq_args[i]->name, tq_args[i]->id, - tq_args[i]->flag, i * 2 + 1); - } - - kfree(tq_args[i]); - } - } -out: - if (func1_tqes) - kfree(func1_tqes); - - if (func2_tqes) - kfree(func2_tqes); - - return rc; -} - -static int -splat_taskq_test2(struct file *file, void *arg) { - int rc; - - rc = splat_taskq_test2_impl(file, arg, B_FALSE); - if (rc) - return rc; - - rc = splat_taskq_test2_impl(file, arg, B_TRUE); - - return rc; -} - -/* - * Use the global system task queue with a single task, wait until task - * completes, ensure task ran properly. - */ -static int -splat_taskq_test3_impl(struct file *file, void *arg, boolean_t prealloc) -{ - taskqid_t id; - splat_taskq_arg_t *tq_arg; - taskq_ent_t *tqe; - int error; - - tq_arg = kmem_alloc(sizeof (splat_taskq_arg_t), KM_SLEEP); - tqe = kmem_alloc(sizeof (taskq_ent_t), KM_SLEEP); - taskq_init_ent(tqe); - - tq_arg->flag = 0; - tq_arg->id = 0; - tq_arg->file = file; - tq_arg->name = SPLAT_TASKQ_TEST3_NAME; - - splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, - "Taskq '%s' function '%s' %s dispatch\n", - tq_arg->name, sym2str(splat_taskq_test13_func), - prealloc ? "prealloc" : "dynamic"); - if (prealloc) { - taskq_dispatch_ent(system_taskq, splat_taskq_test13_func, - tq_arg, TQ_SLEEP, tqe); - id = tqe->tqent_id; - } else { - id = taskq_dispatch(system_taskq, splat_taskq_test13_func, - tq_arg, TQ_SLEEP); - } - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, - "Taskq '%s' function '%s' dispatch failed\n", - tq_arg->name, sym2str(splat_taskq_test13_func)); - kmem_free(tqe, sizeof (taskq_ent_t)); - kmem_free(tq_arg, sizeof (splat_taskq_arg_t)); - return -EINVAL; - } - - splat_vprint(file, SPLAT_TASKQ_TEST3_NAME, "Taskq '%s' waiting\n", - tq_arg->name); - taskq_wait(system_taskq); - - error = (tq_arg->flag) ? 0 : -EINVAL; - - kmem_free(tqe, sizeof (taskq_ent_t)); - kmem_free(tq_arg, sizeof (splat_taskq_arg_t)); - - return (error); -} - -static int -splat_taskq_test3(struct file *file, void *arg) -{ - int rc; - - rc = splat_taskq_test3_impl(file, arg, B_FALSE); - if (rc) - return rc; - - rc = splat_taskq_test3_impl(file, arg, B_TRUE); - - return rc; -} - -/* - * Create a taskq and dispatch a large number of tasks to the queue. - * Then use taskq_wait() to block until all the tasks complete, then - * cross check that all the tasks ran by checking the shared atomic - * counter which is incremented in the task function. - * - * First we try with a large 'maxalloc' value, then we try with a small one. - * We should not drop tasks when TQ_SLEEP is used in taskq_dispatch(), even - * if the number of pending tasks is above maxalloc. - */ -static void -splat_taskq_test4_func(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - ASSERT(tq_arg); - - atomic_inc(tq_arg->count); -} - -static int -splat_taskq_test4_common(struct file *file, void *arg, int minalloc, - int maxalloc, int nr_tasks, boolean_t prealloc) -{ - taskq_t *tq; - taskqid_t id; - splat_taskq_arg_t tq_arg; - taskq_ent_t *tqes; - atomic_t count; - int i, j, rc = 0; - - tqes = kmalloc(sizeof(*tqes) * nr_tasks, GFP_KERNEL); - if (tqes == NULL) - return -ENOMEM; - - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, - "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", - SPLAT_TASKQ_TEST4_NAME, - prealloc ? "prealloc" : "dynamic", - minalloc, maxalloc, nr_tasks); - if ((tq = taskq_create(SPLAT_TASKQ_TEST4_NAME, 1, defclsyspri, - minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, - "Taskq '%s' create failed\n", - SPLAT_TASKQ_TEST4_NAME); - rc = -EINVAL; - goto out_free; - } - - tq_arg.file = file; - tq_arg.name = SPLAT_TASKQ_TEST4_NAME; - tq_arg.count = &count; - - for (i = 1; i <= nr_tasks; i *= 2) { - atomic_set(tq_arg.count, 0); - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, - "Taskq '%s' function '%s' dispatched %d times\n", - tq_arg.name, sym2str(splat_taskq_test4_func), i); - - for (j = 0; j < i; j++) { - taskq_init_ent(&tqes[j]); - - if (prealloc) { - taskq_dispatch_ent(tq, splat_taskq_test4_func, - &tq_arg, TQ_SLEEP, &tqes[j]); - id = tqes[j].tqent_id; - } else { - id = taskq_dispatch(tq, splat_taskq_test4_func, - &tq_arg, TQ_SLEEP); - } - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, - "Taskq '%s' function '%s' dispatch " - "%d failed\n", tq_arg.name, - sym2str(splat_taskq_test4_func), j); - rc = -EINVAL; - goto out; - } - } - - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' " - "waiting for %d dispatches\n", tq_arg.name, i); - taskq_wait(tq); - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' " - "%d/%d dispatches finished\n", tq_arg.name, - atomic_read(&count), i); - if (atomic_read(&count) != i) { - rc = -ERANGE; - goto out; - - } - } -out: - splat_vprint(file, SPLAT_TASKQ_TEST4_NAME, "Taskq '%s' destroying\n", - tq_arg.name); - taskq_destroy(tq); - -out_free: - kfree(tqes); - - return rc; -} - -static int -splat_taskq_test4_impl(struct file *file, void *arg, boolean_t prealloc) -{ - int rc; - - rc = splat_taskq_test4_common(file, arg, 50, INT_MAX, 1024, prealloc); - if (rc) - return rc; - - rc = splat_taskq_test4_common(file, arg, 1, 1, 32, prealloc); - - return rc; -} - -static int -splat_taskq_test4(struct file *file, void *arg) -{ - int rc; - - rc = splat_taskq_test4_impl(file, arg, B_FALSE); - if (rc) - return rc; - - rc = splat_taskq_test4_impl(file, arg, B_TRUE); - - return rc; -} - -/* - * Create a taskq and dispatch a specific sequence of tasks carefully - * crafted to validate the order in which tasks are processed. When - * there are multiple worker threads each thread will process the - * next pending task as soon as it completes its current task. This - * means that tasks do not strictly complete in order in which they - * were dispatched (increasing task id). This is fine but we need to - * verify taskq_wait_outstanding() blocks until the passed task id and - * all lower task ids complete. We do this by dispatching the following - * specific sequence of tasks each of which block for N time units. - * We then use taskq_wait_outstanding() to unblock at specific task id and - * verify the only the expected task ids have completed and in the - * correct order. The two cases of interest are: - * - * 1) Task ids larger than the waited for task id can run and - * complete as long as there is an available worker thread. - * 2) All task ids lower than the waited one must complete before - * unblocking even if the waited task id itself has completed. - * - * The following table shows each task id and how they will be - * scheduled. Each rows represent one time unit and each column - * one of the three worker threads. The places taskq_wait_outstanding() - * must unblock for a specific id are identified as well as the - * task ids which must have completed and their order. - * - * +-----+ <--- taskq_wait_outstanding(tq, 8) unblocks - * | | Required Completion Order: 1,2,4,5,3,8,6,7 - * +-----+ | - * | | | - * | | +-----+ - * | | | 8 | - * | | +-----+ <--- taskq_wait_outstanding(tq, 3) unblocks - * | | 7 | | Required Completion Order: 1,2,4,5,3 - * | +-----+ | - * | 6 | | | - * +-----+ | | - * | | 5 | | - * | +-----+ | - * | 4 | | | - * +-----+ | | - * | 1 | 2 | 3 | - * +-----+-----+-----+ - * - */ -static void -splat_taskq_test5_func(void *arg) -{ - splat_taskq_id_t *tq_id = (splat_taskq_id_t *)arg; - splat_taskq_arg_t *tq_arg = tq_id->arg; - int factor; - - /* Delays determined by above table */ - switch (tq_id->id) { - default: factor = 0; break; - case 1: case 8: factor = 1; break; - case 2: case 4: case 5: factor = 2; break; - case 6: case 7: factor = 4; break; - case 3: factor = 5; break; - } - - msleep(factor * 100); - splat_vprint(tq_arg->file, tq_arg->name, - "Taskqid %d complete for taskq '%s'\n", - tq_id->id, tq_arg->name); - - spin_lock(&tq_arg->lock); - tq_arg->order[tq_arg->flag] = tq_id->id; - tq_arg->flag++; - spin_unlock(&tq_arg->lock); -} - -static int -splat_taskq_test_order(splat_taskq_arg_t *tq_arg, int *order) -{ - int i, j; - - for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { - if (tq_arg->order[i] != order[i]) { - splat_vprint(tq_arg->file, tq_arg->name, - "Taskq '%s' incorrect completion " - "order\n", tq_arg->name); - splat_vprint(tq_arg->file, tq_arg->name, - "%s", "Expected { "); - - for (j = 0; j < SPLAT_TASKQ_ORDER_MAX; j++) - splat_print(tq_arg->file, "%d ", order[j]); - - splat_print(tq_arg->file, "%s", "}\n"); - splat_vprint(tq_arg->file, tq_arg->name, - "%s", "Got { "); - - for (j = 0; j < SPLAT_TASKQ_ORDER_MAX; j++) - splat_print(tq_arg->file, "%d ", - tq_arg->order[j]); - - splat_print(tq_arg->file, "%s", "}\n"); - return -EILSEQ; - } - } - - splat_vprint(tq_arg->file, tq_arg->name, - "Taskq '%s' validated correct completion order\n", - tq_arg->name); - - return 0; -} - -static int -splat_taskq_test5_impl(struct file *file, void *arg, boolean_t prealloc) -{ - taskq_t *tq; - taskqid_t id; - splat_taskq_id_t tq_id[SPLAT_TASKQ_ORDER_MAX]; - splat_taskq_arg_t tq_arg; - int order1[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,0,0,0 }; - int order2[SPLAT_TASKQ_ORDER_MAX] = { 1,2,4,5,3,8,6,7 }; - taskq_ent_t *tqes; - int i, rc = 0; - - tqes = kmem_alloc(sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX, KM_SLEEP); - memset(tqes, 0, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); - - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, - "Taskq '%s' creating (%s dispatch)\n", - SPLAT_TASKQ_TEST5_NAME, - prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST5_NAME, 3, defclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, - "Taskq '%s' create failed\n", - SPLAT_TASKQ_TEST5_NAME); - return -EINVAL; - } - - tq_arg.flag = 0; - memset(&tq_arg.order, 0, sizeof(int) * SPLAT_TASKQ_ORDER_MAX); - spin_lock_init(&tq_arg.lock); - tq_arg.file = file; - tq_arg.name = SPLAT_TASKQ_TEST5_NAME; - - for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { - taskq_init_ent(&tqes[i]); - - tq_id[i].id = i + 1; - tq_id[i].arg = &tq_arg; - - if (prealloc) { - taskq_dispatch_ent(tq, splat_taskq_test5_func, - &tq_id[i], TQ_SLEEP, &tqes[i]); - id = tqes[i].tqent_id; - } else { - id = taskq_dispatch(tq, splat_taskq_test5_func, - &tq_id[i], TQ_SLEEP); - } - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, - "Taskq '%s' function '%s' dispatch failed\n", - tq_arg.name, sym2str(splat_taskq_test5_func)); - rc = -EINVAL; - goto out; - } - - if (tq_id[i].id != id) { - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, - "Taskq '%s' expected taskqid %d got %d\n", - tq_arg.name, (int)tq_id[i].id, (int)id); - rc = -EINVAL; - goto out; - } - } - - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " - "waiting for taskqid %d completion\n", tq_arg.name, 3); - taskq_wait_outstanding(tq, 3); - if ((rc = splat_taskq_test_order(&tq_arg, order1))) - goto out; - - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, "Taskq '%s' " - "waiting for taskqid %d completion\n", tq_arg.name, 8); - taskq_wait_outstanding(tq, 8); - rc = splat_taskq_test_order(&tq_arg, order2); - -out: - splat_vprint(file, SPLAT_TASKQ_TEST5_NAME, - "Taskq '%s' destroying\n", tq_arg.name); - taskq_destroy(tq); - - kmem_free(tqes, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); - - return rc; -} - -static int -splat_taskq_test5(struct file *file, void *arg) -{ - int rc; - - rc = splat_taskq_test5_impl(file, arg, B_FALSE); - if (rc) - return rc; - - rc = splat_taskq_test5_impl(file, arg, B_TRUE); - - return rc; -} - -/* - * Create a single task queue with three threads. Dispatch 8 tasks, - * setting TQ_FRONT on only the last three. Sleep after - * dispatching tasks 1-3 to ensure they will run and hold the threads - * busy while we dispatch the remaining tasks. Verify that tasks 6-8 - * run before task 4-5. - * - * The following table shows each task id and how they will be - * scheduled. Each rows represent one time unit and each column - * one of the three worker threads. - * - * NB: The Horizontal Line is the LAST Time unit consumed by the Task, - * and must be included in the factor calculation. - * T - * 17-> +-----+ - * 16 | T6 | - * 15-> +-----+ | - * 14 | T6 | | - * 13-> | | 5 +-----+ - * 12 | | | T6 | - * 11-> | +-----| | - * 10 | 4 | T6 | | - * 9-> +-----+ | 8 | - * 8 | T5 | | | - * 7-> | | 7 +-----+ - * 6 | | | T7 | - * 5-> | +-----+ | - * 4 | 6 | T5 | | - * 3-> +-----+ | | - * 2 | T3 | | | - * 1 | 1 | 2 | 3 | - * 0 +-----+-----+-----+ - * - */ -static void -splat_taskq_test6_func(void *arg) -{ - /* Delays determined by above table */ - static const int factor[SPLAT_TASKQ_ORDER_MAX+1] = {0,3,5,7,6,6,5,6,6}; - - splat_taskq_id_t *tq_id = (splat_taskq_id_t *)arg; - splat_taskq_arg_t *tq_arg = tq_id->arg; - - splat_vprint(tq_arg->file, tq_arg->name, - "Taskqid %d starting for taskq '%s'\n", - tq_id->id, tq_arg->name); - - if (tq_id->id < SPLAT_TASKQ_ORDER_MAX+1) { - msleep(factor[tq_id->id] * 50); - } - - spin_lock(&tq_arg->lock); - tq_arg->order[tq_arg->flag] = tq_id->id; - tq_arg->flag++; - spin_unlock(&tq_arg->lock); - - splat_vprint(tq_arg->file, tq_arg->name, - "Taskqid %d complete for taskq '%s'\n", - tq_id->id, tq_arg->name); -} - -static int -splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) -{ - taskq_t *tq; - taskqid_t id; - splat_taskq_id_t tq_id[SPLAT_TASKQ_ORDER_MAX]; - splat_taskq_arg_t tq_arg; - int order[SPLAT_TASKQ_ORDER_MAX] = { 1,2,3,6,7,8,4,5 }; - taskq_ent_t *tqes; - int i, rc = 0; - uint_t tflags; - - tqes = kmem_alloc(sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX, KM_SLEEP); - memset(tqes, 0, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); - - splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, - "Taskq '%s' creating (%s dispatch)\n", - SPLAT_TASKQ_TEST6_NAME, - prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST6_NAME, 3, defclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, - "Taskq '%s' create failed\n", - SPLAT_TASKQ_TEST6_NAME); - return -EINVAL; - } - - tq_arg.flag = 0; - memset(&tq_arg.order, 0, sizeof(int) * SPLAT_TASKQ_ORDER_MAX); - spin_lock_init(&tq_arg.lock); - tq_arg.file = file; - tq_arg.name = SPLAT_TASKQ_TEST6_NAME; - - for (i = 0; i < SPLAT_TASKQ_ORDER_MAX; i++) { - taskq_init_ent(&tqes[i]); - - tq_id[i].id = i + 1; - tq_id[i].arg = &tq_arg; - tflags = TQ_SLEEP; - if (i > 4) - tflags |= TQ_FRONT; - - if (prealloc) { - taskq_dispatch_ent(tq, splat_taskq_test6_func, - &tq_id[i], tflags, &tqes[i]); - id = tqes[i].tqent_id; - } else { - id = taskq_dispatch(tq, splat_taskq_test6_func, - &tq_id[i], tflags); - } - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, - "Taskq '%s' function '%s' dispatch failed\n", - tq_arg.name, sym2str(splat_taskq_test6_func)); - rc = -EINVAL; - goto out; - } - - if (tq_id[i].id != id) { - splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, - "Taskq '%s' expected taskqid %d got %d\n", - tq_arg.name, (int)tq_id[i].id, (int)id); - rc = -EINVAL; - goto out; - } - /* Sleep to let tasks 1-3 start executing. */ - if ( i == 2 ) - msleep(100); - } - - splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' " - "waiting for taskqid %d completion\n", tq_arg.name, - SPLAT_TASKQ_ORDER_MAX); - taskq_wait_outstanding(tq, SPLAT_TASKQ_ORDER_MAX); - rc = splat_taskq_test_order(&tq_arg, order); - -out: - splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, - "Taskq '%s' destroying\n", tq_arg.name); - taskq_destroy(tq); - - kmem_free(tqes, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); - - return rc; -} - -static int -splat_taskq_test6(struct file *file, void *arg) -{ - int rc; - - rc = splat_taskq_test6_impl(file, arg, B_FALSE); - if (rc) - return rc; - - rc = splat_taskq_test6_impl(file, arg, B_TRUE); - - return rc; -} - -static void -splat_taskq_test7_func(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - taskqid_t id; - - ASSERT(tq_arg); - - if (tq_arg->depth >= SPLAT_TASKQ_DEPTH_MAX) - return; - - tq_arg->depth++; - - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' function '%s' dispatching (depth = %u)\n", - tq_arg->name, sym2str(splat_taskq_test7_func), - tq_arg->depth); - - if (tq_arg->tqe) { - VERIFY(taskq_empty_ent(tq_arg->tqe)); - taskq_dispatch_ent(tq_arg->tq, splat_taskq_test7_func, - tq_arg, TQ_SLEEP, tq_arg->tqe); - id = tq_arg->tqe->tqent_id; - } else { - id = taskq_dispatch(tq_arg->tq, splat_taskq_test7_func, - tq_arg, TQ_SLEEP); - } - - if (id == TASKQID_INVALID) { - splat_vprint(tq_arg->file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' function '%s' dispatch failed " - "(depth = %u)\n", tq_arg->name, - sym2str(splat_taskq_test7_func), tq_arg->depth); - tq_arg->flag = -EINVAL; - return; - } -} - -static int -splat_taskq_test7_impl(struct file *file, void *arg, boolean_t prealloc) -{ - taskq_t *tq; - splat_taskq_arg_t *tq_arg; - taskq_ent_t *tqe; - int error; - - splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' creating (%s dispatch)\n", - SPLAT_TASKQ_TEST7_NAME, - prealloc ? "prealloc" : "dynamic"); - if ((tq = taskq_create(SPLAT_TASKQ_TEST7_NAME, 1, defclsyspri, - 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' create failed\n", - SPLAT_TASKQ_TEST7_NAME); - return -EINVAL; - } - - tq_arg = kmem_alloc(sizeof (splat_taskq_arg_t), KM_SLEEP); - tqe = kmem_alloc(sizeof (taskq_ent_t), KM_SLEEP); - - tq_arg->depth = 0; - tq_arg->flag = 0; - tq_arg->id = 0; - tq_arg->file = file; - tq_arg->name = SPLAT_TASKQ_TEST7_NAME; - tq_arg->tq = tq; - - if (prealloc) { - taskq_init_ent(tqe); - tq_arg->tqe = tqe; - } else { - tq_arg->tqe = NULL; - } - - splat_taskq_test7_func(tq_arg); - - if (tq_arg->flag == 0) { - splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' waiting\n", tq_arg->name); - taskq_wait_outstanding(tq, SPLAT_TASKQ_DEPTH_MAX); - } - - error = (tq_arg->depth == SPLAT_TASKQ_DEPTH_MAX ? 0 : -EINVAL); - - splat_vprint(file, SPLAT_TASKQ_TEST7_NAME, - "Taskq '%s' destroying\n", tq_arg->name); - - kmem_free(tqe, sizeof (taskq_ent_t)); - kmem_free(tq_arg, sizeof (splat_taskq_arg_t)); - - taskq_destroy(tq); - - return (error); -} - -static int -splat_taskq_test7(struct file *file, void *arg) -{ - int rc; - - rc = splat_taskq_test7_impl(file, arg, B_FALSE); - if (rc) - return (rc); - - rc = splat_taskq_test7_impl(file, arg, B_TRUE); - - return (rc); -} - -static void -splat_taskq_throughput_func(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - ASSERT(tq_arg); - - atomic_inc(tq_arg->count); -} - -static int -splat_taskq_throughput(struct file *file, void *arg, const char *name, - int nthreads, int minalloc, int maxalloc, int flags, int tasks, - struct timespec *delta) -{ - taskq_t *tq; - taskqid_t id; - splat_taskq_arg_t tq_arg; - taskq_ent_t **tqes; - atomic_t count; - struct timespec start, stop; - int i, j, rc = 0; - - tqes = vmalloc(sizeof (*tqes) * tasks); - if (tqes == NULL) - return (-ENOMEM); - - memset(tqes, 0, sizeof (*tqes) * tasks); - - splat_vprint(file, name, "Taskq '%s' creating (%d/%d/%d/%d)\n", - name, nthreads, minalloc, maxalloc, tasks); - if ((tq = taskq_create(name, nthreads, defclsyspri, - minalloc, maxalloc, flags)) == NULL) { - splat_vprint(file, name, "Taskq '%s' create failed\n", name); - rc = -EINVAL; - goto out_free; - } - - tq_arg.file = file; - tq_arg.name = name; - tq_arg.count = &count; - atomic_set(tq_arg.count, 0); - - getnstimeofday(&start); - - for (i = 0; i < tasks; i++) { - tqes[i] = kmalloc(sizeof (taskq_ent_t), GFP_KERNEL); - if (tqes[i] == NULL) { - rc = -ENOMEM; - goto out; - } - - taskq_init_ent(tqes[i]); - taskq_dispatch_ent(tq, splat_taskq_throughput_func, - &tq_arg, TQ_SLEEP, tqes[i]); - id = tqes[i]->tqent_id; - - if (id == TASKQID_INVALID) { - splat_vprint(file, name, "Taskq '%s' function '%s' " - "dispatch %d failed\n", tq_arg.name, - sym2str(splat_taskq_throughput_func), i); - rc = -EINVAL; - goto out; - } - } - - splat_vprint(file, name, "Taskq '%s' waiting for %d dispatches\n", - tq_arg.name, tasks); - - taskq_wait(tq); - - if (delta != NULL) { - getnstimeofday(&stop); - *delta = timespec_sub(stop, start); - } - - splat_vprint(file, name, "Taskq '%s' %d/%d dispatches finished\n", - tq_arg.name, atomic_read(tq_arg.count), tasks); - - if (atomic_read(tq_arg.count) != tasks) - rc = -ERANGE; - -out: - splat_vprint(file, name, "Taskq '%s' destroying\n", tq_arg.name); - taskq_destroy(tq); -out_free: - for (j = 0; j < tasks && tqes[j] != NULL; j++) - kfree(tqes[j]); - - vfree(tqes); - - return (rc); -} - -/* - * Create a taskq with 100 threads and dispatch a huge number of trivial - * tasks to generate contention on tq->tq_lock. This test should always - * pass. The purpose is to provide a benchmark for measuring the - * effectiveness of taskq optimizations. - */ -#define TEST8_NUM_TASKS 0x20000 -#define TEST8_THREADS_PER_TASKQ 100 - -static int -splat_taskq_test8(struct file *file, void *arg) -{ - return (splat_taskq_throughput(file, arg, - SPLAT_TASKQ_TEST8_NAME, TEST8_THREADS_PER_TASKQ, - 1, INT_MAX, TASKQ_PREPOPULATE, TEST8_NUM_TASKS, NULL)); -} - -/* - * Create a taskq and dispatch a number of delayed tasks to the queue. - * For each task verify that it was run no early than requested. - */ -static void -splat_taskq_test9_func(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - ASSERT(tq_arg); - - if (ddi_time_after_eq(ddi_get_lbolt(), tq_arg->expire)) - atomic_inc(tq_arg->count); - - kmem_free(tq_arg, sizeof(splat_taskq_arg_t)); -} - -static int -splat_taskq_test9(struct file *file, void *arg) -{ - taskq_t *tq; - atomic_t count; - int i, rc = 0; - int minalloc = 1; - int maxalloc = 10; - int nr_tasks = 100; - - splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, - "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", - SPLAT_TASKQ_TEST9_NAME, "delay", minalloc, maxalloc, nr_tasks); - if ((tq = taskq_create(SPLAT_TASKQ_TEST9_NAME, 3, defclsyspri, - minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, - "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST9_NAME); - return -EINVAL; - } - - atomic_set(&count, 0); - - for (i = 1; i <= nr_tasks; i++) { - splat_taskq_arg_t *tq_arg; - taskqid_t id; - uint32_t rnd; - - /* A random timeout in jiffies of at most 5 seconds */ - get_random_bytes((void *)&rnd, 4); - rnd = rnd % (5 * HZ); - - tq_arg = kmem_alloc(sizeof(splat_taskq_arg_t), KM_SLEEP); - tq_arg->file = file; - tq_arg->name = SPLAT_TASKQ_TEST9_NAME; - tq_arg->expire = ddi_get_lbolt() + rnd; - tq_arg->count = &count; - - splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, - "Taskq '%s' delay dispatch %u jiffies\n", - SPLAT_TASKQ_TEST9_NAME, rnd); - - id = taskq_dispatch_delay(tq, splat_taskq_test9_func, - tq_arg, TQ_SLEEP, ddi_get_lbolt() + rnd); - - if (id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, - "Taskq '%s' delay dispatch failed\n", - SPLAT_TASKQ_TEST9_NAME); - kmem_free(tq_arg, sizeof(splat_taskq_arg_t)); - taskq_wait(tq); - rc = -EINVAL; - goto out; - } - } - - splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' waiting for " - "%d delay dispatches\n", SPLAT_TASKQ_TEST9_NAME, nr_tasks); - - taskq_wait(tq); - if (atomic_read(&count) != nr_tasks) - rc = -ERANGE; - - splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' %d/%d delay " - "dispatches finished on time\n", SPLAT_TASKQ_TEST9_NAME, - atomic_read(&count), nr_tasks); - splat_vprint(file, SPLAT_TASKQ_TEST9_NAME, "Taskq '%s' destroying\n", - SPLAT_TASKQ_TEST9_NAME); -out: - taskq_destroy(tq); - - return rc; -} - -/* - * Create a taskq and dispatch then cancel tasks in the queue. - */ -static void -splat_taskq_test10_func(void *arg) -{ - splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg; - uint8_t rnd; - - if (ddi_time_after_eq(ddi_get_lbolt(), tq_arg->expire)) - atomic_inc(tq_arg->count); - - /* Randomly sleep to further perturb the system */ - get_random_bytes((void *)&rnd, 1); - msleep(1 + (rnd % 9)); -} - -static int -splat_taskq_test10(struct file *file, void *arg) -{ - taskq_t *tq; - splat_taskq_arg_t **tqas; - atomic_t count; - int i, j, rc = 0; - int minalloc = 1; - int maxalloc = 10; - int nr_tasks = 100; - int canceled = 0; - int completed = 0; - int blocked = 0; - clock_t start, cancel; - - tqas = vmalloc(sizeof(*tqas) * nr_tasks); - if (tqas == NULL) - return -ENOMEM; - memset(tqas, 0, sizeof(*tqas) * nr_tasks); - - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, - "Taskq '%s' creating (%s dispatch) (%d/%d/%d)\n", - SPLAT_TASKQ_TEST10_NAME, "delay", minalloc, maxalloc, nr_tasks); - if ((tq = taskq_create(SPLAT_TASKQ_TEST10_NAME, 3, defclsyspri, - minalloc, maxalloc, TASKQ_PREPOPULATE)) == NULL) { - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, - "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST10_NAME); - rc = -EINVAL; - goto out_free; - } - - atomic_set(&count, 0); - - for (i = 0; i < nr_tasks; i++) { - splat_taskq_arg_t *tq_arg; - uint32_t rnd; - - /* A random timeout in jiffies of at most 5 seconds */ - get_random_bytes((void *)&rnd, 4); - rnd = rnd % (5 * HZ); - - tq_arg = kmem_alloc(sizeof(splat_taskq_arg_t), KM_SLEEP); - tq_arg->file = file; - tq_arg->name = SPLAT_TASKQ_TEST10_NAME; - tq_arg->count = &count; - tqas[i] = tq_arg; - - /* - * Dispatch every 1/3 one immediately to mix it up, the cancel - * code is inherently racy and we want to try and provoke any - * subtle concurrently issues. - */ - if ((i % 3) == 0) { - tq_arg->expire = ddi_get_lbolt(); - tq_arg->id = taskq_dispatch(tq, splat_taskq_test10_func, - tq_arg, TQ_SLEEP); - } else { - tq_arg->expire = ddi_get_lbolt() + rnd; - tq_arg->id = taskq_dispatch_delay(tq, - splat_taskq_test10_func, - tq_arg, TQ_SLEEP, ddi_get_lbolt() + rnd); - } - - if (tq_arg->id == TASKQID_INVALID) { - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, - "Taskq '%s' dispatch failed\n", - SPLAT_TASKQ_TEST10_NAME); - kmem_free(tq_arg, sizeof(splat_taskq_arg_t)); - taskq_wait(tq); - rc = -EINVAL; - goto out; - } else { - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, - "Taskq '%s' dispatch %lu in %lu jiffies\n", - SPLAT_TASKQ_TEST10_NAME, (unsigned long)tq_arg->id, - !(i % 3) ? 0 : tq_arg->expire - ddi_get_lbolt()); - } - } - - /* - * Start randomly canceling tasks for the duration of the test. We - * happen to know the valid task id's will be in the range 1..nr_tasks - * because the taskq is private and was just created. However, we - * have no idea of a particular task has already executed or not. - */ - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' randomly " - "canceling task ids\n", SPLAT_TASKQ_TEST10_NAME); - - start = ddi_get_lbolt(); - i = 0; - - while (ddi_time_before(ddi_get_lbolt(), start + 5 * HZ)) { - taskqid_t id; - uint32_t rnd; - - i++; - cancel = ddi_get_lbolt(); - get_random_bytes((void *)&rnd, 4); - id = 1 + (rnd % nr_tasks); - rc = taskq_cancel_id(tq, id); - - /* - * Keep track of the results of the random cancels. - */ - if (rc == 0) { - canceled++; - } else if (rc == ENOENT) { - completed++; - } else if (rc == EBUSY) { - blocked++; - } else { - rc = -EINVAL; - break; - } - - /* - * Verify we never get blocked to long in taskq_cancel_id(). - * The worst case is 10ms if we happen to cancel the task - * which is currently executing. We allow a factor of 2x. - */ - if (ddi_get_lbolt() - cancel > HZ / 50) { - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, - "Taskq '%s' cancel for %lu took %lu\n", - SPLAT_TASKQ_TEST10_NAME, (unsigned long)id, - ddi_get_lbolt() - cancel); - rc = -ETIMEDOUT; - break; - } - - get_random_bytes((void *)&rnd, 4); - msleep(1 + (rnd % 100)); - rc = 0; - } - - taskq_wait(tq); - - /* - * Cross check the results of taskq_cancel_id() with the number of - * times the dispatched function actually ran successfully. - */ - if ((rc == 0) && (nr_tasks - canceled != atomic_read(&count))) - rc = -EDOM; - - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' %d attempts, " - "%d canceled, %d completed, %d blocked, %d/%d tasks run\n", - SPLAT_TASKQ_TEST10_NAME, i, canceled, completed, blocked, - atomic_read(&count), nr_tasks); - splat_vprint(file, SPLAT_TASKQ_TEST10_NAME, "Taskq '%s' destroying %d\n", - SPLAT_TASKQ_TEST10_NAME, rc); -out: - taskq_destroy(tq); -out_free: - for (j = 0; j < nr_tasks && tqas[j] != NULL; j++) - kmem_free(tqas[j], sizeof(splat_taskq_arg_t)); - vfree(tqas); - - return rc; -} - -/* - * Create a dynamic taskq with 100 threads and dispatch a huge number of - * trivial tasks. This will cause the taskq to grow quickly to its max - * thread count. This test should always pass. The purpose is to provide - * a benchmark for measuring the performance of dynamic taskqs. - */ -#define TEST11_NUM_TASKS 100000 -#define TEST11_THREADS_PER_TASKQ 100 - -static int -splat_taskq_test11(struct file *file, void *arg) -{ - struct timespec normal, dynamic; - int error; - - error = splat_taskq_throughput(file, arg, SPLAT_TASKQ_TEST11_NAME, - TEST11_THREADS_PER_TASKQ, 1, INT_MAX, - TASKQ_PREPOPULATE, TEST11_NUM_TASKS, &normal); - if (error) - return (error); - - error = splat_taskq_throughput(file, arg, SPLAT_TASKQ_TEST11_NAME, - TEST11_THREADS_PER_TASKQ, 1, INT_MAX, - TASKQ_PREPOPULATE | TASKQ_DYNAMIC, TEST11_NUM_TASKS, &dynamic); - if (error) - return (error); - - splat_vprint(file, SPLAT_TASKQ_TEST11_NAME, - "Timing taskq_wait(): normal=%ld.%09lds, dynamic=%ld.%09lds\n", - normal.tv_sec, normal.tv_nsec, - dynamic.tv_sec, dynamic.tv_nsec); - - /* A 10x increase in runtime is used to indicate a core problem. */ - if (((int64_t)dynamic.tv_sec * NANOSEC + (int64_t)dynamic.tv_nsec) > - (((int64_t)normal.tv_sec * NANOSEC + (int64_t)normal.tv_nsec) * 10)) - error = -ETIME; - - return (error); -} - -splat_subsystem_t * -splat_taskq_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_TASKQ_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_TASKQ_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_TASKQ; - - splat_test_init(sub, SPLAT_TASKQ_TEST1_NAME, SPLAT_TASKQ_TEST1_DESC, - SPLAT_TASKQ_TEST1_ID, splat_taskq_test1); - splat_test_init(sub, SPLAT_TASKQ_TEST2_NAME, SPLAT_TASKQ_TEST2_DESC, - SPLAT_TASKQ_TEST2_ID, splat_taskq_test2); - splat_test_init(sub, SPLAT_TASKQ_TEST3_NAME, SPLAT_TASKQ_TEST3_DESC, - SPLAT_TASKQ_TEST3_ID, splat_taskq_test3); - splat_test_init(sub, SPLAT_TASKQ_TEST4_NAME, SPLAT_TASKQ_TEST4_DESC, - SPLAT_TASKQ_TEST4_ID, splat_taskq_test4); - splat_test_init(sub, SPLAT_TASKQ_TEST5_NAME, SPLAT_TASKQ_TEST5_DESC, - SPLAT_TASKQ_TEST5_ID, splat_taskq_test5); - splat_test_init(sub, SPLAT_TASKQ_TEST6_NAME, SPLAT_TASKQ_TEST6_DESC, - SPLAT_TASKQ_TEST6_ID, splat_taskq_test6); - splat_test_init(sub, SPLAT_TASKQ_TEST7_NAME, SPLAT_TASKQ_TEST7_DESC, - SPLAT_TASKQ_TEST7_ID, splat_taskq_test7); - splat_test_init(sub, SPLAT_TASKQ_TEST8_NAME, SPLAT_TASKQ_TEST8_DESC, - SPLAT_TASKQ_TEST8_ID, splat_taskq_test8); - splat_test_init(sub, SPLAT_TASKQ_TEST9_NAME, SPLAT_TASKQ_TEST9_DESC, - SPLAT_TASKQ_TEST9_ID, splat_taskq_test9); - splat_test_init(sub, SPLAT_TASKQ_TEST10_NAME, SPLAT_TASKQ_TEST10_DESC, - SPLAT_TASKQ_TEST10_ID, splat_taskq_test10); - splat_test_init(sub, SPLAT_TASKQ_TEST11_NAME, SPLAT_TASKQ_TEST11_DESC, - SPLAT_TASKQ_TEST11_ID, splat_taskq_test11); - - return sub; -} - -void -splat_taskq_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_TASKQ_TEST11_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST10_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST9_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST8_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST7_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST6_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST5_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST4_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST3_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST2_ID); - splat_test_fini(sub, SPLAT_TASKQ_TEST1_ID); - - kfree(sub); -} - -int -splat_taskq_id(void) { - return SPLAT_SUBSYSTEM_TASKQ; -} diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c deleted file mode 100644 index f2e6bf15e..000000000 --- a/module/splat/splat-thread.c +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Thread Tests. - */ - -#include -#include -#include -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_THREAD_NAME "thread" -#define SPLAT_THREAD_DESC "Kernel Thread Tests" - -#define SPLAT_THREAD_TEST1_ID 0x0601 -#define SPLAT_THREAD_TEST1_NAME "create" -#define SPLAT_THREAD_TEST1_DESC "Validate thread creation" - -#define SPLAT_THREAD_TEST2_ID 0x0602 -#define SPLAT_THREAD_TEST2_NAME "exit" -#define SPLAT_THREAD_TEST2_DESC "Validate thread exit" - -#define SPLAT_THREAD_TEST3_ID 0x6003 -#define SPLAT_THREAD_TEST3_NAME "tsd" -#define SPLAT_THREAD_TEST3_DESC "Validate thread specific data" - -#define SPLAT_THREAD_TEST_MAGIC 0x4488CC00UL -#define SPLAT_THREAD_TEST_KEYS 32 -#define SPLAT_THREAD_TEST_THREADS 16 - -typedef struct thread_priv { - unsigned long tp_magic; - struct file *tp_file; - spinlock_t tp_lock; - spl_wait_queue_head_t tp_waitq; - uint_t tp_keys[SPLAT_THREAD_TEST_KEYS]; - int tp_rc; - int tp_count; - int tp_dtor_count; -} thread_priv_t; - -static int -splat_thread_rc(thread_priv_t *tp, int rc) -{ - int ret; - - spin_lock(&tp->tp_lock); - ret = (tp->tp_rc == rc); - spin_unlock(&tp->tp_lock); - - return ret; -} - -static int -splat_thread_count(thread_priv_t *tp, int count) -{ - int ret; - - spin_lock(&tp->tp_lock); - ret = (tp->tp_count == count); - spin_unlock(&tp->tp_lock); - - return ret; -} - -static void -splat_thread_work1(void *priv) -{ - thread_priv_t *tp = (thread_priv_t *)priv; - - spin_lock(&tp->tp_lock); - ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); - tp->tp_rc = 1; - wake_up(&tp->tp_waitq); - spin_unlock(&tp->tp_lock); - - thread_exit(); -} - -static int -splat_thread_test1(struct file *file, void *arg) -{ - thread_priv_t tp; - kthread_t *thr; - - tp.tp_magic = SPLAT_THREAD_TEST_MAGIC; - tp.tp_file = file; - spin_lock_init(&tp.tp_lock); - init_waitqueue_head(&tp.tp_waitq); - tp.tp_rc = 0; - - thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work1, &tp, 0, - &p0, TS_RUN, defclsyspri); - /* Must never fail under Solaris, but we check anyway since this - * can happen in the linux SPL, we may want to change this behavior */ - if (thr == NULL) - return -ESRCH; - - /* Sleep until the thread sets tp.tp_rc == 1 */ - wait_event(tp.tp_waitq, splat_thread_rc(&tp, 1)); - - splat_vprint(file, SPLAT_THREAD_TEST1_NAME, "%s", - "Thread successfully started properly\n"); - return 0; -} - -static void -splat_thread_work2(void *priv) -{ - thread_priv_t *tp = (thread_priv_t *)priv; - - spin_lock(&tp->tp_lock); - ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); - tp->tp_rc = 1; - wake_up(&tp->tp_waitq); - spin_unlock(&tp->tp_lock); - - thread_exit(); - - /* The following code is unreachable when thread_exit() is - * working properly, which is exactly what we're testing */ - spin_lock(&tp->tp_lock); - tp->tp_rc = 2; - wake_up(&tp->tp_waitq); - spin_unlock(&tp->tp_lock); -} - -static int -splat_thread_test2(struct file *file, void *arg) -{ - thread_priv_t tp; - kthread_t *thr; - int rc = 0; - - tp.tp_magic = SPLAT_THREAD_TEST_MAGIC; - tp.tp_file = file; - spin_lock_init(&tp.tp_lock); - init_waitqueue_head(&tp.tp_waitq); - tp.tp_rc = 0; - - thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work2, &tp, 0, - &p0, TS_RUN, defclsyspri); - /* Must never fail under Solaris, but we check anyway since this - * can happen in the linux SPL, we may want to change this behavior */ - if (thr == NULL) - return -ESRCH; - - /* Sleep until the thread sets tp.tp_rc == 1 */ - wait_event(tp.tp_waitq, splat_thread_rc(&tp, 1)); - - /* Sleep until the thread sets tp.tp_rc == 2, or until we hit - * the timeout. If thread exit is working properly we should - * hit the timeout and never see to.tp_rc == 2. */ - rc = wait_event_timeout(tp.tp_waitq, splat_thread_rc(&tp, 2), HZ / 10); - if (rc > 0) { - rc = -EINVAL; - splat_vprint(file, SPLAT_THREAD_TEST2_NAME, "%s", - "Thread did not exit properly at thread_exit()\n"); - } else { - splat_vprint(file, SPLAT_THREAD_TEST2_NAME, "%s", - "Thread successfully exited at thread_exit()\n"); - } - - return rc; -} - -static void -splat_thread_work3_common(thread_priv_t *tp) -{ - ulong_t rnd; - int i, rc = 0; - - /* set a unique value for each key using a random value */ - get_random_bytes((void *)&rnd, 4); - for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) - tsd_set(tp->tp_keys[i], (void *)(i + rnd)); - - /* verify the unique value for each key */ - for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) - if (tsd_get(tp->tp_keys[i]) != (void *)(i + rnd)) - rc = -EINVAL; - - /* set the value to thread_priv_t for use by the destructor */ - for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) - tsd_set(tp->tp_keys[i], (void *)tp); - - spin_lock(&tp->tp_lock); - if (rc && !tp->tp_rc) - tp->tp_rc = rc; - - tp->tp_count++; - wake_up_all(&tp->tp_waitq); - spin_unlock(&tp->tp_lock); -} - -static void -splat_thread_work3_wait(void *priv) -{ - thread_priv_t *tp = (thread_priv_t *)priv; - - ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); - splat_thread_work3_common(tp); - wait_event(tp->tp_waitq, splat_thread_count(tp, 0)); - thread_exit(); -} - -static void -splat_thread_work3_exit(void *priv) -{ - thread_priv_t *tp = (thread_priv_t *)priv; - - ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); - splat_thread_work3_common(tp); - thread_exit(); -} - -static void -splat_thread_dtor3(void *priv) -{ - thread_priv_t *tp = (thread_priv_t *)priv; - - ASSERT(tp->tp_magic == SPLAT_THREAD_TEST_MAGIC); - spin_lock(&tp->tp_lock); - tp->tp_dtor_count++; - spin_unlock(&tp->tp_lock); -} - -/* - * Create threads which set and verify SPLAT_THREAD_TEST_KEYS number of - * keys. These threads may then exit by calling thread_exit() which calls - * tsd_exit() resulting in all their thread specific data being reclaimed. - * Alternately, the thread may block in which case the thread specific - * data will be reclaimed as part of tsd_destroy(). In either case all - * thread specific data must be reclaimed, this is verified by ensuring - * the registered destructor is called the correct number of times. - */ -static int -splat_thread_test3(struct file *file, void *arg) -{ - int i, rc = 0, expected, wait_count = 0, exit_count = 0; - thread_priv_t tp; - - tp.tp_magic = SPLAT_THREAD_TEST_MAGIC; - tp.tp_file = file; - spin_lock_init(&tp.tp_lock); - init_waitqueue_head(&tp.tp_waitq); - tp.tp_rc = 0; - tp.tp_count = 0; - tp.tp_dtor_count = 0; - - for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) { - tp.tp_keys[i] = 0; - tsd_create(&tp.tp_keys[i], splat_thread_dtor3); - } - - /* Start tsd wait threads */ - for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) { - if (thread_create(NULL, 0, splat_thread_work3_wait, - &tp, 0, &p0, TS_RUN, defclsyspri)) - wait_count++; - } - - /* All wait threads have setup their tsd and are blocking. */ - wait_event(tp.tp_waitq, splat_thread_count(&tp, wait_count)); - - if (tp.tp_dtor_count != 0) { - splat_vprint(file, SPLAT_THREAD_TEST3_NAME, - "Prematurely ran %d tsd destructors\n", tp.tp_dtor_count); - if (!rc) - rc = -ERANGE; - } - - /* Start tsd exit threads */ - for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) { - if (thread_create(NULL, 0, splat_thread_work3_exit, - &tp, 0, &p0, TS_RUN, defclsyspri)) - exit_count++; - } - - /* All exit threads verified tsd and are in the process of exiting */ - wait_event(tp.tp_waitq,splat_thread_count(&tp, wait_count+exit_count)); - msleep(500); - - expected = (SPLAT_THREAD_TEST_KEYS * exit_count); - if (tp.tp_dtor_count != expected) { - splat_vprint(file, SPLAT_THREAD_TEST3_NAME, - "Expected %d exit tsd destructors but saw %d\n", - expected, tp.tp_dtor_count); - if (!rc) - rc = -ERANGE; - } - - /* Destroy all keys and associated tsd in blocked threads */ - for (i = 0; i < SPLAT_THREAD_TEST_KEYS; i++) - tsd_destroy(&tp.tp_keys[i]); - - expected = (SPLAT_THREAD_TEST_KEYS * (exit_count + wait_count)); - if (tp.tp_dtor_count != expected) { - splat_vprint(file, SPLAT_THREAD_TEST3_NAME, - "Expected %d wait+exit tsd destructors but saw %d\n", - expected, tp.tp_dtor_count); - if (!rc) - rc = -ERANGE; - } - - /* Release the remaining wait threads, sleep briefly while they exit */ - spin_lock(&tp.tp_lock); - tp.tp_count = 0; - wake_up_all(&tp.tp_waitq); - spin_unlock(&tp.tp_lock); - msleep(500); - - if (tp.tp_rc) { - splat_vprint(file, SPLAT_THREAD_TEST3_NAME, - "Thread tsd_get()/tsd_set() error %d\n", tp.tp_rc); - if (!rc) - rc = tp.tp_rc; - } else if (!rc) { - splat_vprint(file, SPLAT_THREAD_TEST3_NAME, "%s", - "Thread specific data verified\n"); - } - - return rc; -} - -splat_subsystem_t * -splat_thread_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_THREAD_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_THREAD_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_THREAD; - - splat_test_init(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC, - SPLAT_THREAD_TEST1_ID, splat_thread_test1); - splat_test_init(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC, - SPLAT_THREAD_TEST2_ID, splat_thread_test2); - splat_test_init(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC, - SPLAT_THREAD_TEST3_ID, splat_thread_test3); - - return sub; -} - -void -splat_thread_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - splat_test_fini(sub, SPLAT_THREAD_TEST3_ID); - splat_test_fini(sub, SPLAT_THREAD_TEST2_ID); - splat_test_fini(sub, SPLAT_THREAD_TEST1_ID); - - kfree(sub); -} - -int -splat_thread_id(void) { - return SPLAT_SUBSYSTEM_THREAD; -} diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c deleted file mode 100644 index a0e261956..000000000 --- a/module/splat/splat-time.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Time Tests. - */ - -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_TIME_NAME "time" -#define SPLAT_TIME_DESC "Kernel Time Tests" - -#define SPLAT_TIME_TEST1_ID 0x0801 -#define SPLAT_TIME_TEST1_NAME "time1" -#define SPLAT_TIME_TEST1_DESC "HZ Test" - -#define SPLAT_TIME_TEST2_ID 0x0802 -#define SPLAT_TIME_TEST2_NAME "time2" -#define SPLAT_TIME_TEST2_DESC "Monotonic Test" - -static int -splat_time_test1(struct file *file, void *arg) -{ - int myhz = hz; - splat_vprint(file, SPLAT_TIME_TEST1_NAME, "hz is %d\n", myhz); - return 0; -} - -static int -splat_time_test2(struct file *file, void *arg) -{ - hrtime_t tm1, tm2; - int i; - - tm1 = gethrtime(); - splat_vprint(file, SPLAT_TIME_TEST2_NAME, "time is %lld\n", tm1); - - for(i = 0; i < 100; i++) { - tm2 = gethrtime(); - splat_vprint(file, SPLAT_TIME_TEST2_NAME, "time is %lld\n", tm2); - - if(tm1 > tm2) { - splat_print(file, "%s: gethrtime() is not giving " - "monotonically increasing values\n", - SPLAT_TIME_TEST2_NAME); - return 1; - } - tm1 = tm2; - - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(10); - } - - return 0; -} - -splat_subsystem_t * -splat_time_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_TIME_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_TIME_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_TIME; - - splat_test_init(sub, SPLAT_TIME_TEST1_NAME, SPLAT_TIME_TEST1_DESC, - SPLAT_TIME_TEST1_ID, splat_time_test1); - splat_test_init(sub, SPLAT_TIME_TEST2_NAME, SPLAT_TIME_TEST2_DESC, - SPLAT_TIME_TEST2_ID, splat_time_test2); - - return sub; -} - -void -splat_time_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_TIME_TEST2_ID); - splat_test_fini(sub, SPLAT_TIME_TEST1_ID); - - kfree(sub); -} - -int -splat_time_id(void) -{ - return SPLAT_SUBSYSTEM_TIME; -} diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c deleted file mode 100644 index 4ccf24f1e..000000000 --- a/module/splat/splat-vnode.c +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Vnode Tests. - */ - -#include -#include "splat-internal.h" - -#define SPLAT_VNODE_NAME "vnode" -#define SPLAT_VNODE_DESC "Kernel Vnode Tests" - -#define SPLAT_VNODE_TEST1_ID 0x0901 -#define SPLAT_VNODE_TEST1_NAME "vn_open" -#define SPLAT_VNODE_TEST1_DESC "Vn_open Test" - -#define SPLAT_VNODE_TEST2_ID 0x0902 -#define SPLAT_VNODE_TEST2_NAME "vn_openat" -#define SPLAT_VNODE_TEST2_DESC "Vn_openat Test" - -#define SPLAT_VNODE_TEST3_ID 0x0903 -#define SPLAT_VNODE_TEST3_NAME "vn_rdwr" -#define SPLAT_VNODE_TEST3_DESC "Vn_rdwrt Test" - -#define SPLAT_VNODE_TEST5_ID 0x0905 -#define SPLAT_VNODE_TEST5_NAME "vn_getattr" -#define SPLAT_VNODE_TEST5_DESC "Vn_getattr Test" - -#define SPLAT_VNODE_TEST6_ID 0x0906 -#define SPLAT_VNODE_TEST6_NAME "vn_sync" -#define SPLAT_VNODE_TEST6_DESC "Vn_sync Test" - -#define SPLAT_VNODE_TEST_FILE "/etc/fstab" -#define SPLAT_VNODE_TEST_FILE_AT "etc/fstab" -#define SPLAT_VNODE_TEST_FILE_RW "/tmp/spl.vnode.tmp" -#define SPLAT_VNODE_TEST_FILE_RW1 "/tmp/spl.vnode.tmp.1" -#define SPLAT_VNODE_TEST_FILE_RW2 "/tmp/spl.vnode.tmp.2" - -static int -splat_vnode_user_cmd(struct file *file, void *arg, - char *name, char *cmd) -{ - char sh_path[] = "/bin/sh"; - char *argv[] = { sh_path, - "-c", - cmd, - NULL }; - char *envp[] = { "HOME=/", - "TERM=linux", - "PATH=/sbin:/usr/sbin:/bin:/usr/bin", - NULL }; - int rc; - - rc = call_usermodehelper(sh_path, argv, envp, UMH_WAIT_PROC); - if (rc) { - splat_vprint(file, name, - "Failed command: %s %s %s (%d)\n", - argv[0], argv[1], cmd, rc); - return -EPERM; - } - - return 0; -} - -static int -splat_vnode_unlink_all(struct file *file, void *arg, char *name) -{ - char *cmds[] = { "rm -f " SPLAT_VNODE_TEST_FILE_RW, - "rm -f " SPLAT_VNODE_TEST_FILE_RW1, - "rm -f " SPLAT_VNODE_TEST_FILE_RW2, - NULL }; - int i = 0, rc = 0; - - while (cmds[i] != NULL) { - if ((rc = splat_vnode_user_cmd(file, arg, name, cmds[i]))) - return rc; - - i++; - } - - return rc; -} - -static int -splat_vnode_test1(struct file *file, void *arg) -{ - vnode_t *vp; - int rc; - - if ((rc = vn_open(SPLAT_VNODE_TEST_FILE, UIO_SYSSPACE, - FREAD, 0644, &vp, 0, 0))) { - splat_vprint(file, SPLAT_VNODE_TEST1_NAME, - "Failed to vn_open test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE, rc); - return -rc; - } - - rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); - - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST1_NAME, - "Failed to vn_close test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE, rc); - return -rc; - } - - splat_vprint(file, SPLAT_VNODE_TEST1_NAME, "Successfully vn_open'ed " - "and vn_closed test file: %s\n", SPLAT_VNODE_TEST_FILE); - - return -rc; -} /* splat_vnode_test1() */ - -static int -splat_vnode_test2(struct file *file, void *arg) -{ - vnode_t *vp; - int rc; - - if ((rc = vn_openat(SPLAT_VNODE_TEST_FILE_AT, UIO_SYSSPACE, - FREAD, 0644, &vp, 0, 0, rootdir, 0))) { - splat_vprint(file, SPLAT_VNODE_TEST2_NAME, - "Failed to vn_openat test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE, rc); - return -rc; - } - - rc = VOP_CLOSE(vp, 0, 0, 0, 0, 0); - - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST2_NAME, - "Failed to vn_close test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE, rc); - return -rc; - } - - splat_vprint(file, SPLAT_VNODE_TEST2_NAME, "Successfully vn_openat'ed " - "and vn_closed test file: %s\n", SPLAT_VNODE_TEST_FILE); - - return -rc; -} /* splat_vnode_test2() */ - -static int -splat_vnode_test3(struct file *file, void *arg) -{ - vnode_t *vp; - char buf1[32] = "SPL VNode Interface Test File\n"; - char buf2[32] = ""; - int rc; - - if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST3_NAME))) - return rc; - - if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, - FWRITE | FREAD | FCREAT | FEXCL, - 0644, &vp, 0, 0))) { - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, - "Failed to vn_open test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - return -rc; - } - - rc = vn_rdwr(UIO_WRITE, vp, buf1, strlen(buf1), 0, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, - "Failed vn_rdwr write of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - goto out; - } - - rc = vn_rdwr(UIO_READ, vp, buf2, strlen(buf1), 0, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, - "Failed vn_rdwr read of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - goto out; - } - - if (strncmp(buf1, buf2, strlen(buf1))) { - rc = EINVAL; - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, - "Failed strncmp data written does not match " - "data read\nWrote: %sRead: %s\n", buf1, buf2); - goto out; - } - - rc = 0; - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Wrote: %s", buf1); - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Read: %s", buf2); - splat_vprint(file, SPLAT_VNODE_TEST3_NAME, "Successfully wrote and " - "read expected data pattern to test file: %s\n", - SPLAT_VNODE_TEST_FILE_RW); - -out: - VOP_CLOSE(vp, 0, 0, 0, 0, 0); - - return -rc; -} /* splat_vnode_test3() */ - -static int -splat_vnode_test5(struct file *file, void *arg) -{ - vnode_t *vp; - vattr_t vap; - int rc; - - if ((rc = vn_open(SPLAT_VNODE_TEST_FILE, UIO_SYSSPACE, - FREAD, 0644, &vp, 0, 0))) { - splat_vprint(file, SPLAT_VNODE_TEST5_NAME, - "Failed to vn_open test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE, rc); - return -rc; - } - - rc = VOP_GETATTR(vp, &vap, 0, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST5_NAME, - "Failed to vn_getattr test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE, rc); - goto out; - } - - if (vap.va_type != VREG) { - rc = EINVAL; - splat_vprint(file, SPLAT_VNODE_TEST5_NAME, - "Failed expected regular file type " - "(%d != VREG): %s (%d)\n", vap.va_type, - SPLAT_VNODE_TEST_FILE, rc); - goto out; - } - - splat_vprint(file, SPLAT_VNODE_TEST1_NAME, "Successfully " - "vn_getattr'ed test file: %s\n", SPLAT_VNODE_TEST_FILE); - -out: - VOP_CLOSE(vp, 0, 0, 0, 0, 0); - - return -rc; -} /* splat_vnode_test5() */ - -static int -splat_vnode_test6(struct file *file, void *arg) -{ - vnode_t *vp; - char buf[32] = "SPL VNode Interface Test File\n"; - int rc; - - if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST6_NAME))) - return rc; - - if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, - FWRITE | FCREAT | FEXCL, 0644, &vp, 0, 0))) { - splat_vprint(file, SPLAT_VNODE_TEST6_NAME, - "Failed to vn_open test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - return -rc; - } - - rc = vn_rdwr(UIO_WRITE, vp, buf, strlen(buf), 0, - UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST6_NAME, - "Failed vn_rdwr write of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - goto out; - } - - rc = vn_fsync(vp, 0, 0, 0); - if (rc) { - splat_vprint(file, SPLAT_VNODE_TEST6_NAME, - "Failed vn_fsync of test file: %s (%d)\n", - SPLAT_VNODE_TEST_FILE_RW, rc); - goto out; - } - - rc = 0; - splat_vprint(file, SPLAT_VNODE_TEST6_NAME, "Successfully " - "fsync'ed test file %s\n", SPLAT_VNODE_TEST_FILE_RW); -out: - VOP_CLOSE(vp, 0, 0, 0, 0, 0); - - return -rc; -} /* splat_vnode_test6() */ - -splat_subsystem_t * -splat_vnode_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_VNODE_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_VNODE_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_VNODE; - - splat_test_init(sub, SPLAT_VNODE_TEST1_NAME, SPLAT_VNODE_TEST1_DESC, - SPLAT_VNODE_TEST1_ID, splat_vnode_test1); - splat_test_init(sub, SPLAT_VNODE_TEST2_NAME, SPLAT_VNODE_TEST2_DESC, - SPLAT_VNODE_TEST2_ID, splat_vnode_test2); - splat_test_init(sub, SPLAT_VNODE_TEST3_NAME, SPLAT_VNODE_TEST3_DESC, - SPLAT_VNODE_TEST3_ID, splat_vnode_test3); - splat_test_init(sub, SPLAT_VNODE_TEST5_NAME, SPLAT_VNODE_TEST5_DESC, - SPLAT_VNODE_TEST5_ID, splat_vnode_test5); - splat_test_init(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC, - SPLAT_VNODE_TEST6_ID, splat_vnode_test6); - - return sub; -} /* splat_vnode_init() */ - -void -splat_vnode_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_VNODE_TEST6_ID); - splat_test_fini(sub, SPLAT_VNODE_TEST5_ID); - splat_test_fini(sub, SPLAT_VNODE_TEST3_ID); - splat_test_fini(sub, SPLAT_VNODE_TEST2_ID); - splat_test_fini(sub, SPLAT_VNODE_TEST1_ID); - - kfree(sub); -} /* splat_vnode_fini() */ - -int -splat_vnode_id(void) -{ - return SPLAT_SUBSYSTEM_VNODE; -} /* splat_vnode_id() */ diff --git a/module/splat/splat-zlib.c b/module/splat/splat-zlib.c deleted file mode 100644 index 28e521c82..000000000 --- a/module/splat/splat-zlib.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. - * Copyright (C) 2007 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Brian Behlendorf . - * UCRL-CODE-235197 - * - * This file is part of the SPL, Solaris Porting Layer. - * For details, see . - * - * The SPL is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The SPL is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with the SPL. If not, see . - ***************************************************************************** - * Solaris Porting LAyer Tests (SPLAT) Zlib Compression Tests. - */ - -#include -#include -#include -#include -#include "splat-internal.h" - -#define SPLAT_ZLIB_NAME "zlib" -#define SPLAT_ZLIB_DESC "Zlib Compression Tests" - -#define SPLAT_ZLIB_TEST1_ID 0x0f01 -#define SPLAT_ZLIB_TEST1_NAME "compress/uncompress" -#define SPLAT_ZLIB_TEST1_DESC "Compress/Uncompress Test" - -#define BUFFER_SIZE (128 * 1024) - -static int -splat_zlib_test1_check(struct file *file, void *src, void *dst, void *chk, - int level) -{ - size_t dst_len = BUFFER_SIZE; - size_t chk_len = BUFFER_SIZE; - int rc; - - memset(dst, 0, BUFFER_SIZE); - memset(chk, 0, BUFFER_SIZE); - - rc = z_compress_level(dst, &dst_len, src, BUFFER_SIZE, level); - if (rc != Z_OK) { - splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, - "Failed level %d z_compress_level(), %d\n", level, rc); - return -EINVAL; - } - - rc = z_uncompress(chk, &chk_len, dst, dst_len); - if (rc != Z_OK) { - splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, - "Failed level %d z_uncompress(), %d\n", level, rc); - return -EINVAL; - } - - rc = memcmp(src, chk, BUFFER_SIZE); - if (rc) { - splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, - "Failed level %d memcmp()), %d\n", level, rc); - return -EINVAL; - } - - splat_vprint(file, SPLAT_ZLIB_TEST1_NAME, - "Passed level %d, compressed %d bytes to %d bytes\n", - level, BUFFER_SIZE, (int)dst_len); - - return 0; -} - -/* - * Compress a buffer, uncompress the newly compressed buffer, then - * compare it to the original. Do this for all 9 compression levels. - */ -static int -splat_zlib_test1(struct file *file, void *arg) -{ - void *src = NULL, *dst = NULL, *chk = NULL; - int i, rc, level; - - src = vmalloc(BUFFER_SIZE); - if (src == NULL) { - rc = -ENOMEM; - goto out; - } - - dst = vmalloc(BUFFER_SIZE); - if (dst == NULL) { - rc = -ENOMEM; - goto out; - } - - chk = vmalloc(BUFFER_SIZE); - if (chk == NULL) { - rc = -ENOMEM; - goto out; - } - - /* Source buffer is a repeating 1024 byte random pattern. */ - random_get_pseudo_bytes(src, sizeof(uint8_t) * 1024); - for (i = 1; i < 128; i++) - memcpy(src + (i * 1024), src, 1024); - - for (level = 1; level <= 9; level++) - if ((rc = splat_zlib_test1_check(file, src, dst, chk, level))) - break; -out: - if (src) - vfree(src); - - if (dst) - vfree(dst); - - if (chk) - vfree(chk); - - return rc; -} - -splat_subsystem_t * -splat_zlib_init(void) -{ - splat_subsystem_t *sub; - - sub = kmalloc(sizeof(*sub), GFP_KERNEL); - if (sub == NULL) - return NULL; - - memset(sub, 0, sizeof(*sub)); - strncpy(sub->desc.name, SPLAT_ZLIB_NAME, SPLAT_NAME_SIZE); - strncpy(sub->desc.desc, SPLAT_ZLIB_DESC, SPLAT_DESC_SIZE); - INIT_LIST_HEAD(&sub->subsystem_list); - INIT_LIST_HEAD(&sub->test_list); - spin_lock_init(&sub->test_lock); - sub->desc.id = SPLAT_SUBSYSTEM_ZLIB; - - splat_test_init(sub, SPLAT_ZLIB_TEST1_NAME, SPLAT_ZLIB_TEST1_DESC, - SPLAT_ZLIB_TEST1_ID, splat_zlib_test1); - - return sub; -} - -void -splat_zlib_fini(splat_subsystem_t *sub) -{ - ASSERT(sub); - - splat_test_fini(sub, SPLAT_ZLIB_TEST1_ID); - - kfree(sub); -} - -int -splat_zlib_id(void) { - return SPLAT_SUBSYSTEM_ZLIB; -} diff --git a/rpm/Makefile.am b/rpm/Makefile.am deleted file mode 100644 index f2cf72cef..000000000 --- a/rpm/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = generic redhat diff --git a/rpm/generic/.gitignore b/rpm/generic/.gitignore deleted file mode 100644 index 67129ff14..000000000 --- a/rpm/generic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/spl-dkms.spec -/spl-kmod.spec -/spl.spec diff --git a/rpm/generic/Makefile.am b/rpm/generic/Makefile.am deleted file mode 100644 index da6c4abe2..000000000 --- a/rpm/generic/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = spl.spec.in spl-kmod.spec.in spl-dkms.spec.in diff --git a/rpm/generic/spl-dkms.spec.in b/rpm/generic/spl-dkms.spec.in deleted file mode 100644 index a8691d229..000000000 --- a/rpm/generic/spl-dkms.spec.in +++ /dev/null @@ -1,94 +0,0 @@ -%{?!packager: %define packager Brian Behlendorf } - -%if ! 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version} -%define not_rpm 1 -%endif - -%define module @PACKAGE@ -%define mkconf scripts/dkms.mkconf - -# Python permits the !/usr/bin/python shebang for scripts that are cross -# compatible between python2 and python3, but Fedora 28 does not. Fedora -# wants us to choose python3 for cross-compatible scripts. Since we want -# to support python2 and python3 users, exclude our scripts from Fedora 28's -# RPM build check, so that we don't get a bunch of build warnings. -# -# Details: https://github.com/zfsonlinux/zfs/issues/7360 -# -%global __brp_mangle_shebangs_exclude_from splslab.py - -Name: %{module}-dkms - -Version: @VERSION@ -Release: @RELEASE@%{?dist} -Summary: Kernel module(s) (dkms) - -Group: System Environment/Kernel -License: GPLv2+ -URL: http://zfsonlinux.org/ -Source0: %{module}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildArch: noarch - -Requires: dkms >= 2.2.0.2 -Requires: gcc, make, perl -%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version} -Requires: kernel-devel -%endif -Provides: %{module}-kmod = %{version} - -%description -This package contains the dkms kernel modules required to emulate -several interfaces provided by the Solaris kernel. - -%prep -%setup -q -n %{module}-%{version} - -%build -%{mkconf} -n %{module} -v %{version} -f dkms.conf - -%install -if [ "$RPM_BUILD_ROOT" != "/" ]; then - rm -rf $RPM_BUILD_ROOT -fi -mkdir -p $RPM_BUILD_ROOT/usr/src/ -cp -rf ${RPM_BUILD_DIR}/%{module}-%{version} $RPM_BUILD_ROOT/usr/src/ - -%clean -if [ "$RPM_BUILD_ROOT" != "/" ]; then - rm -rf $RPM_BUILD_ROOT -fi - -%files -%defattr(-,root,root) -/usr/src/%{module}-%{version} - -%post -for POSTINST in /usr/lib/dkms/common.postinst; do - if [ -f $POSTINST ]; then - $POSTINST %{module} %{version} - exit $? - fi - echo "WARNING: $POSTINST does not exist." -done -echo -e "ERROR: DKMS version is too old and %{module} was not" -echo -e "built with legacy DKMS support." -echo -e "You must either rebuild %{module} with legacy postinst" -echo -e "support or upgrade DKMS to a more current version." -exit 1 - -%preun -CONFIG_H="/var/lib/dkms/%{module}/%{version}/*/*/%{module}_config.h" -SPEC_META_ALIAS="@PACKAGE@-@VERSION@-@RELEASE@" -DKMS_META_ALIAS=`cat $CONFIG_H 2>/dev/null | - awk -F'"' '/META_ALIAS/ { print $2; exit 0 }'` -if [ "$SPEC_META_ALIAS" = "$DKMS_META_ALIAS" ]; then - echo -e - echo -e "Uninstall of %{module} module ($SPEC_META_ALIAS) beginning:" - dkms remove -m %{module} -v %{version} --all %{!?not_rpm:--rpm_safe_upgrade} -fi -exit 0 - -%changelog -* %(date "+%a %b %d %Y") %packager %{version}-%{release} -- Automatic build by DKMS diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in deleted file mode 100644 index c33c25069..000000000 --- a/rpm/generic/spl-kmod.spec.in +++ /dev/null @@ -1,172 +0,0 @@ -%define module @PACKAGE@ -#define repo rpmfusion -#define repo chaos - -# (un)define the next line to either build for the newest or all current kernels -%define buildforkernels newest -#define buildforkernels current -#define buildforkernels akmod - -%bcond_with debug -%bcond_with debug_log -%bcond_with debug_kmem -%bcond_with debug_kmem_tracking -%bcond_with atomic_spinlocks - - -Name: %{module}-kmod - -Version: @VERSION@ -Release: @RELEASE@%{?dist} -Summary: Kernel module(s) - -Group: System Environment/Kernel -License: GPLv2+ -URL: http://zfsonlinux.org/ -Source0: %{module}-%{version}.tar.gz -Source10: kmodtool -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n) - -# The developments headers will conflict with the dkms packages. -Conflicts: %{module}-dkms - -%if %{defined repo} - -# Building for a repository use the proper build-sysbuild package -# to determine which kernel-devel packages should be installed. -BuildRequires: %{_bindir}/kmodtool -%{!?kernels:BuildRequires: buildsys-build-%{repo}-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}} - -%else - -# Building local packages attempt to to use the installed kernel. -%{?rhel:BuildRequires: kernel-devel} -%{?fedora:BuildRequires: kernel-devel} -%{?suse_version:BuildRequires: kernel-source} - -%if !%{defined kernels} && !%{defined build_src_rpm} - %if 0%{?rhel}%{?fedora}%{?suse_version} - %define kernels %(ls -1 /usr/src/kernels) - %else - %define kernels %(ls -1 /lib/modules) - %endif -%endif -%endif - -# LDFLAGS are not sanitized by arch/*/Makefile for these architectures. -%ifarch ppc ppc64 ppc64le aarch64 -%global __global_ldflags %{nil} -%endif - -%if 0%{?fedora} >= 17 -%define prefix /usr -%endif - -# Kmodtool does its magic here. A patched version of kmodtool is shipped -# because the latest versions may not be available for your distribution. -# https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714 -%{expand:%(bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) } - - -%description -This package contains the kernel modules required to emulate -several interfaces provided by the Solaris kernel. - -%prep -# Error out if there was something wrong with kmodtool. -%{?kmodtool_check} - -# Print kmodtool output for debugging purposes: -bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null - -%if %{with debug} - %define debug --enable-debug -%else - %define debug --disable-debug -%endif - -%if %{with debug_log} - %define debug_log --enable-debug-log -%else - %define debug_log --disable-debug-log -%endif - -%if %{with debug_kmem} - %define debug_kmem --enable-debug-kmem -%else - %define debug_kmem --disable-debug-kmem -%endif - -%if %{with debug_kmem_tracking} - %define debug_kmem_tracking --enable-debug-kmem-tracking -%else - %define debug_kmem_tracking --disable-debug-kmem-tracking -%endif - -%if %{with atomic_spinlocks} - %define atomic_spinlocks --enable-atomic-spinlocks -%else - %define atomic_spinlocks --disable-atomic-spinlocks -%endif - -# Leverage VPATH from configure to avoid making multiple copies. -%define _configure ../%{module}-%{version}/configure - -%setup -q -c -T -a 0 - -for kernel_version in %{?kernel_versions}; do - %{__mkdir} _kmod_build_${kernel_version%%___*} -done - -%build -for kernel_version in %{?kernel_versions}; do - cd _kmod_build_${kernel_version%%___*} - %configure \ - --with-config=kernel \ -%if 0%{?rhel}%{?fedora} - --with-linux="${kernel_version##*___}" \ - --with-linux-obj="${kernel_version##*___}" \ -%else - --with-linux="$( \ - if [ -e "/lib/modules/${kernel_version%%___*}/source" ]; then \ - echo "/lib/modules/${kernel_version%%___*}/source"; \ - else \ - echo "/lib/modules/${kernel_version%%___*}/build"; \ - fi)" \ - --with-linux-obj="/lib/modules/${kernel_version%%___*}/build" \ -%endif - %{debug} \ - %{debug_log} \ - %{debug_kmem} \ - %{debug_kmem_tracking} \ - %{atomic_spinlocks} - make %{?_smp_mflags} - cd .. -done - - -%install -rm -rf ${RPM_BUILD_ROOT} - -# Relies on the kernel 'modules_install' make target. -for kernel_version in %{?kernel_versions}; do - cd _kmod_build_${kernel_version%%___*} - make install \ - DESTDIR=${RPM_BUILD_ROOT} \ - %{?prefix:INSTALL_MOD_PATH=%{?prefix}} \ - INSTALL_MOD_DIR=%{kmodinstdir_postfix} - cd .. -done - -# find-debuginfo.sh only considers executables -chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* -%{?akmod_install} - - -%clean -rm -rf $RPM_BUILD_ROOT - -%changelog -* Wed Jul 26 2017 Brian Behlendorf - 0.7.0-1 -- Released 0.7.0-1, detailed release notes are available at: -- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.0 diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in deleted file mode 100644 index 7ba71fd58..000000000 --- a/rpm/generic/spl.spec.in +++ /dev/null @@ -1,49 +0,0 @@ -# Python permits the !/usr/bin/python shebang for scripts that are cross -# compatible between python2 and python3, but Fedora 28 does not. Fedora -# wants us to choose python3 for cross-compatible scripts. Since we want -# to support python2 and python3 users, exclude our scripts from Fedora 28's -# RPM build check, so that we don't get a bunch of build warnings. -# -# Details: https://github.com/zfsonlinux/zfs/issues/7360 -# -%global __brp_mangle_shebangs_exclude_from splslab.py - -Name: @PACKAGE@ -Version: @VERSION@ -Release: @RELEASE@%{?dist} -Summary: Commands to control the kernel modules - -Group: System Environment/Kernel -License: GPLv2+ -URL: http://zfsonlinux.org/ -Source0: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: %{name}-kmod = %{version} -Provides: %{name}-kmod-common = %{version} - -%description -This package contains the commands to verify the SPL -kernel modules are functioning properly. - -%prep -%setup -q - -%build -%configure --with-config=user -make %{?_smp_mflags} - -%install -%{__rm} -rf $RPM_BUILD_ROOT -make install DESTDIR=%{?buildroot} - -%files -%doc AUTHORS COPYING DISCLAIMER -%{_bindir}/* -%{_sbindir}/* -%{_mandir}/man1/* -%{_mandir}/man5/* - -%changelog -* Wed Jul 26 2017 Brian Behlendorf - 0.7.0-1 -- Released 0.7.0-1, detailed release notes are available at: -- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.0 diff --git a/rpm/redhat/.gitignore b/rpm/redhat/.gitignore deleted file mode 100644 index 67129ff14..000000000 --- a/rpm/redhat/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/spl-dkms.spec -/spl-kmod.spec -/spl.spec diff --git a/rpm/redhat/Makefile.am b/rpm/redhat/Makefile.am deleted file mode 100644 index da6c4abe2..000000000 --- a/rpm/redhat/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = spl.spec.in spl-kmod.spec.in spl-dkms.spec.in diff --git a/rpm/redhat/spl-dkms.spec.in b/rpm/redhat/spl-dkms.spec.in deleted file mode 120000 index 900f524aa..000000000 --- a/rpm/redhat/spl-dkms.spec.in +++ /dev/null @@ -1 +0,0 @@ -../generic/spl-dkms.spec.in \ No newline at end of file diff --git a/rpm/redhat/spl-kmod.spec.in b/rpm/redhat/spl-kmod.spec.in deleted file mode 100644 index 4e2a9f955..000000000 --- a/rpm/redhat/spl-kmod.spec.in +++ /dev/null @@ -1,110 +0,0 @@ -%bcond_with debug -%bcond_with debug_log -%bcond_with debug_kmem -%bcond_with debug_kmem_tracking -%bcond_with atomic_spinlocks - -Name: @PACKAGE@-kmod -Version: @VERSION@ -Release: @RELEASE@%{?dist} - -Summary: Kernel module(s) -Group: System Environment/Kernel -License: GPLv2+ -URL: http://zfsonlinux.org/ -BuildRequires: %kernel_module_package_buildreqs -Source0: @PACKAGE@-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -# Additional dependency information for the kmod sub-package must be specified -# by generating a preamble text file which kmodtool can append to the spec file. -%(/bin/echo -e "\ -Requires: @PACKAGE@ = %{version}\n\ -Conflicts: @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble) - -# LDFLAGS are not sanitized by arch/*/Makefile for these architectures. -%ifarch ppc ppc64 ppc64le aarch64 -%global __global_ldflags %{nil} -%endif - -%description -This package contains the kernel modules required to emulate -several interfaces provided by the Solaris kernel. - -%define kmod_name spl - -%kernel_module_package -n %{kmod_name} -p %{_sourcedir}/kmod-preamble - -%define ksrc %{_usrsrc}/kernels/%{kverrel} -%define kobj %{ksrc} - -%package -n kmod-%{kmod_name}-devel -Summary: SPL kernel module(s) devel common -Group: System Environment/Kernel - -%description -n kmod-%{kmod_name}-devel -This package provides the header files and objects to build kernel modules -which depend on the SPL kernel module. - -%prep -if ! [ -d "%{ksrc}" ]; then - echo "Kernel build directory isn't set properly, cannot continue" - exit 1 -fi - -%if %{with debug} -%define debug --enable-debug -%else -%define debug --disable-debug -%endif - -%if %{with debug_log} -%define debug_log --enable-debug-log -%else -%define debug_log --disable-debug-log -%endif - -%if %{with debug_kmem} -%define debug_kmem --enable-debug-kmem -%else -%define debug_kmem --disable-debug-kmem -%endif - -%if %{with debug_kmem_tracking} -%define debug_kmem_tracking --enable-debug-kmem-tracking -%else -%define debug_kmem_tracking --disable-debug-kmem-tracking -%endif - -%if %{with atomic_spinlocks} -%define atomic_spinlocks --enable-atomic-spinlocks -%else -%define atomic_spinlocks --disable-atomic-spinlocks -%endif - -%setup -n %{kmod_name}-%{version} -%build -%configure \ - --with-config=kernel \ - --with-linux=%{ksrc} \ - --with-linux-obj=%{kobj} \ - %{debug} \ - %{debug_log} \ - %{debug_kmem} \ - %{debug_kmem_tracking} \ - %{atomic_spinlocks} -make %{?_smp_mflags} - -%install -make install \ - DESTDIR=${RPM_BUILD_ROOT} \ - INSTALL_MOD_DIR=extra/%{kmod_name} -%{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.* -# find-debuginfo.sh only considers executables -%{__chmod} u+x %{buildroot}/lib/modules/%{kverrel}/extra/*/*/* - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -n kmod-%{kmod_name}-devel -%{_usrsrc}/%{kmod_name}-%{version} diff --git a/rpm/redhat/spl.spec.in b/rpm/redhat/spl.spec.in deleted file mode 120000 index d3276f013..000000000 --- a/rpm/redhat/spl.spec.in +++ /dev/null @@ -1 +0,0 @@ -../generic/spl.spec.in \ No newline at end of file diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index a718c4b1a..000000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST = check.sh dkms.mkconf dkms.postbuild kmodtool - -check: - scripts/check.sh diff --git a/scripts/check.sh b/scripts/check.sh deleted file mode 100755 index 5f5cb18e2..000000000 --- a/scripts/check.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -############################################################################### -# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. -# Copyright (C) 2007 The Regents of the University of California. -# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). -# Written by Brian Behlendorf . -# UCRL-CODE-235197 -# -# This file is part of the SPL, Solaris Porting Layer. -# For details, see . -# -# The SPL is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# The SPL is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License along -# with the SPL. If not, see . -############################################################################### -# This script runs the full set of regression tests. -############################################################################### - -prog=check.sh -spl_module=../module/spl/spl.ko -splat_module=../module/splat/splat.ko -splat_cmd=../cmd/splat/splat -verbose= - -die() { - echo "${prog}: $1" >&2 - exit 1 -} - -warn() { - echo "${prog}: $1" >&2 -} - -if [ -n "$V" ]; then - verbose="-v" -fi - -if [ -n "$TESTS" ]; then - tests="$TESTS" -else - tests="-a" -fi - -if [ $(id -u) != 0 ]; then - die "Must run as root" -fi - -if /sbin/lsmod | egrep -q "^spl|^splat"; then - die "Must start with spl modules unloaded" -fi - -if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then - die "Source tree must be built, run 'make'" -fi - -/sbin/modprobe zlib_inflate &>/dev/null -/sbin/modprobe zlib_deflate &>/dev/null - -echo "Loading ${spl_module}" -/sbin/insmod ${spl_module} || die "Failed to load ${spl_module}" - -echo "Loading ${splat_module}" -/sbin/insmod ${splat_module} || die "Unable to load ${splat_module}" - -# Wait a maximum of 3 seconds for udev to detect the new splatctl -# device, if we do not see the character device file created assume -# udev is not running and manually create the character device. -for i in `seq 1 50`; do - sleep 0.1 - - if [ -c /dev/splatctl ]; then - break - fi - - if [ $i -eq 50 ]; then - mknod /dev/splatctl c 229 0 - fi -done - -$splat_cmd $tests $verbose - -echo "Unloading ${splat_module}" -/sbin/rmmod ${splat_module} || die "Failed to unload ${splat_module}" - -echo "Unloading ${spl_module}" -/sbin/rmmod ${spl_module} || die "Unable to unload ${spl_module}" - -exit 0 diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf deleted file mode 100755 index 67b9dad58..000000000 --- a/scripts/dkms.mkconf +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -PROG=$0 - -pkgcfg=/etc/sysconfig/spl - -while getopts "n:v:c:f:" opt; do - case $opt in - n) pkgname=$OPTARG ;; - v) pkgver=$OPTARG ;; - c) pkgcfg=$OPTARG ;; - f) filename=$OPTARG ;; - esac -done - -if [ -z "${pkgname}" -o -z "${pkgver}" -o -z "${filename}" ]; then - echo "Usage: $PROG -n -v -c -f " - exit 1 -fi - -cat >${filename} < -k -n " \ - "-t -v " - exit 1 -fi - -cp ${tree}/${pkgname}/${pkgver}/build/spl_config.h \ - ${tree}/${pkgname}/${pkgver}/build/module/Module.symvers \ - ${tree}/${pkgname}/${pkgver}/${kver}/${arch}/ diff --git a/scripts/kmodtool b/scripts/kmodtool deleted file mode 100644 index ce3f04294..000000000 --- a/scripts/kmodtool +++ /dev/null @@ -1,592 +0,0 @@ -#!/bin/bash - -# kmodtool - Helper script for building kernel module RPMs -# Copyright (c) 2003-2012 Ville Skyttä , -# Thorsten Leemhuis -# Nicolas Chauvet -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -shopt -s extglob - -myprog="kmodtool-${repo}" -myver="0.12.1" - -kmodname= -build_kernels="current" -kernels_known_variants= -kernel_versions= -kernel_versions_to_build_for= -prefix= -filterfile= -target= -buildroot= - -error_out() -{ - local errorlevel=${1} - shift - echo "Error: $@" >&2 - # the next line is not multi-line safe -- not needed *yet* - echo "%global kmodtool_check echo \"kmodtool error: $@\"; exit ${errorlevel};" - exit ${errorlevel} -} - -print_rpmtemplate_header() -{ - echo - echo '%global kmodinstdir_prefix '${prefix}/lib/modules/ - echo '%global kmodinstdir_postfix '/extra/${kmodname}/ - echo '%global kernel_versions '${kernel_versions} - echo -} - -print_akmodtemplate () -{ - echo - cat <= %{?epoch:%{epoch}:}%{version} -Provides: ${kmodname}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} -EOF - - if [[ ${obsolete_name} ]]; then - echo "Provides: akmod-${obsolete_name} = ${obsolete_version}" - echo "Obsoletes: akmod-${obsolete_name} < ${obsolete_version}" - fi - - cat < /dev/null & - -%files -n akmod-${kmodname} -%defattr(-,root,root,-) -%{_usrsrc}/akmods/* - -EOF -} - -print_akmodmeta () -{ - cat <= %{?epoch:%{epoch}:}%{version} -Requires(post): ${prefix}/sbin/depmod -Requires(postun): ${prefix}/sbin/depmod -EOF - - if [[ ${obsolete_name} ]]; then - echo "Provides: kmod-${obsolete_name}-${kernel_uname_r} = ${obsolete_version}" - echo "Obsoletes: kmod-${obsolete_name}-${kernel_uname_r} < ${obsolete_version}" - fi - - # second part - if [[ ! "${customkernel}" ]]; then - cat < /dev/null || : -%postun -n kmod-${kmodname}-${kernel_uname_r} -${prefix}/sbin/depmod -aF /boot/System.map-${kernel_uname_r} ${kernel_uname_r} &> /dev/null || : - -EOF - else - cat < /dev/null || : -%postun -n kmod-${kmodname}-${kernel_uname_r} -[[ "$(uname -r)" == "${kernel_uname_r}" ]] && ${prefix}/sbin/depmod -a > /dev/null || : - -EOF - fi - - # third part - cat <= %{?epoch:%{epoch}:}%{version}-%{release}" - fi - - if [[ ${obsolete_name} ]]; then - echo "Provides: kmod-${obsolete_name}-devel = ${obsolete_version}" - echo "Obsoletes: kmod-${obsolete_name}-devel < ${obsolete_version}" - fi - - cat < objects for the newest kernel. - -%files -n kmod-${kmodname}-devel -%defattr(644,root,root,755) -%{_usrsrc}/${kmodname}-%{version} -EOF - - for kernel in ${1}; do - local kernel_uname_r=${kernel} - echo "%exclude %{_usrsrc}/${kmodname}-%{version}/${kernel_uname_r}" - done - - echo - echo -} - -print_rpmtemplate_per_kmoddevelpkg () -{ - if [[ "${1}" == "--custom" ]]; then - shift - local customkernel=true - elif [[ "${1}" == "--redhat" ]]; then - # this is needed for akmods - shift - local redhatkernel=true - fi - - local kernel_uname_r=${1} - local kernel_variant="${2:+-${2}}" - - # first part - cat <= %{?epoch:%{epoch}:}%{version}-%{release} -%{?KmodsMetaRequires:Requires: %{?KmodsMetaRequires}} -EOF - - if [[ ${obsolete_name} ]]; then - echo "Provides: kmod-${obsolete_name}${kernel_variant} = ${obsolete_version}" - echo "Obsoletes: kmod-${obsolete_name}${kernel_variant} < ${obsolete_version}" - fi - - cat < -- filter the results with grep --file " - echo " --for-kernels -- created templates only for these kernels" - echo " --kmodname -- name of the kmod (required)" - echo " --devel -- make kmod-devel package" - echo " --noakmod -- no akmod package" - echo " --repo -- use buildsys-build--kerneldevpkgs" - echo " --target -- target-arch (required)" - echo " --buildroot -- Build root (place to look for build files)" -} - -while [ "${1}" ] ; do - case "${1}" in - --filterfile) - shift - if [[ ! "${1}" ]] ; then - error_out 2 "Please provide path to a filter-file together with --filterfile" >&2 - elif [[ ! -e "${1}" ]]; then - error_out 2 "Filterfile ${1} not found" >&2 - fi - filterfile="${1}" - shift - ;; - --kmodname) - shift - if [[ ! "${1}" ]] ; then - error_out 2 "Please provide the name of the kmod together with --kmodname" >&2 - fi - # strip pending -kmod - kmodname="${1%%-kmod}" - shift - ;; - --devel) - shift - devel="true" - ;; - --prefix) - shift - if [[ ! "${1}" ]] ; then - error_out 2 "Please provide a prefix with --prefix" >&2 - fi - prefix="${1}" - shift - ;; - --repo) - shift - if [[ ! "${1}" ]] ; then - error_out 2 "Please provide the name of the repo together with --repo" >&2 - fi - repo=${1} - shift - ;; - --for-kernels) - shift - if [[ ! "${1}" ]] ; then - error_out 2 "Please provide the name of the kmod together with --kmodname" >&2 - fi - for_kernels="${1}" - shift - ;; - --noakmod) - shift - noakmod="true" - ;; - --obsolete-name) - shift - if [[ ! "${1}" ]] ; then - error_out 2 "Please provide the name of the kmod to obsolte together with --obsolete-name" >&2 - fi - obsolete_name="${1}" - shift - ;; - --obsolete-version) - shift - if [[ ! "${1}" ]] ; then - error_out 2 "Please provide the version of the kmod to obsolte together with --obsolete-version" >&2 - fi - obsolete_version="${1}" - shift - ;; - --target) - shift - target="${1}" - shift - ;; - --akmod) - shift - build_kernels="akmod" - ;; - --newest) - shift - build_kernels="newest" - ;; - --current) - shift - build_kernels="current" - ;; - --buildroot) - shift - buildroot="${1}" - shift - ;; - --help) - myprog_help - exit 0 - ;; - --version) - echo "${myprog} ${myver}" - exit 0 - ;; - *) - echo "Error: Unknown option '${1}'." >&2 - usage >&2 - exit 2 - ;; - esac -done - -if [[ -e ./kmodtool-kernel-variants ]]; then - kernels_known_variants="$(cat ./kmodtool-kernel-variants)" -elif [[ -e /usr/share/kmodtool/kernel-variants ]] ; then - kernels_known_variants="$(cat /usr/share/kmodtool/kernel-variants)" -else - kernels_known_variants="@(smp?(-debug)|PAE?(-debug)|debug|kdump|xen|kirkwood|highbank|imx|omap|tegra)" -fi - -# general sanity checks -if [[ ! "${target}" ]]; then - error_out 2 "please pass target arch with --target" -elif [[ ! "${kmodname}" ]]; then - error_out 2 "please pass kmodname with --kmodname" -elif [[ ! "${kernels_known_variants}" ]] ; then - error_out 2 "could not determine known variants" -elif ( [[ "${obsolete_name}" ]] && [[ ! "${obsolete_version}" ]] ) || ( [[ ! "${obsolete_name}" ]] && [[ "${obsolete_version}" ]] ) ; then - error_out 2 "you need to provide both --obsolete-name and --obsolete-version" -fi - -# go -if [[ "${for_kernels}" ]]; then - # this is easy: - print_customrpmtemplate "${for_kernels}" -elif [[ "${build_kernels}" == "akmod" ]]; then - # do only a akmod package - print_akmodtemplate - print_akmodmeta -else - # seems we are on out own to decide for which kernels to build - - # we need more sanity checks in this case - if [[ ! "${repo}" ]]; then - error_out 2 "please provide repo name with --repo" - elif ! $(which buildsys-build-${repo}-kerneldevpkgs &> /dev/null) ; then - error_out 2 "buildsys-build-${repo}-kerneldevpkgs not found" - fi - - # call buildsys-build-${repo}-kerneldevpkgs to get the list of kernels - cmdoptions="--target ${target}" - - # filterfile to filter list of kernels? - if [[ "${filterfile}" ]] ; then - cmdoptions="${cmdoptions} --filterfile ${filterfile}" - fi - - kernel_versions_to_build_for="$(buildsys-build-${repo}-kerneldevpkgs --${build_kernels} ${cmdoptions})" - returncode=$? - if (( ${returncode} != 0 )); then - error_out 2 "buildsys-build-${repo}-kerneldevpkgs failed: $(buildsys-build-${repo}-kerneldevpkgs --${build_kernels} ${cmdoptions})" - fi - - if [[ "${build_kernels}" == "current" ]] && [[ ! "${noakmod}" ]]; then - print_akmodtemplate - fi - - print_rpmtemplate -fi diff --git a/spl.release.in b/spl.release.in deleted file mode 100644 index fd7c84c13..000000000 --- a/spl.release.in +++ /dev/null @@ -1 +0,0 @@ -@SPL_META_VERSION@-@SPL_META_RELEASE@